Chores
What every repository currently measures, and what has been done about it
On this page(3 sections)
Maintenance evidence: read the measurements, ask for one to be retaken, record what somebody concluded. There is deliberately no "run this chore" route, because a chore run is an ordinary conversation and so already has its own working copy, record and cost.
GET/choresWhat maintenance the repos are asking for
Every repo's standing evidence in one read: what the last measurement found and how old it is, the cheap signals that are always current, and what has already been decided about each.
What you send
Nothing. Call it as it is.
What comes back
| Field | Type |
|---|---|
reposEvery repository's standing evidence | object[] |
repoWhich repository | string |
probesThe expensive measurements, served from a… | object[] |
idWhich measurement this is | "outdated" | "audit" | "knip" | "jscpd" … (6) |
stateWhether the tool ran and reported,… | "ok" | "unavailable" | "failed" |
ranAtWhen it last finished, in milliseconds,… | number |
tookMsHow long it took | integer |
factsWhat it found, including finding nothing,… | object |
id | "outdated" |
packages | object[] |
reasonWhy it broke, quoted from the… | string |
signalsThe cheap facts, worked out fresh… | object |
packagesEach package in the repository, as… | object[] |
dirWhere the package lives | string |
nameWhat it declares itself as | string |
enginesWhich runtime versions it says it… | object |
dependenciesWhat it depends on | string[] |
devDependenciesWhat it needs only to build | string[] |
documentedWhether it has a README, which… | boolean |
shapeWhat the repository is made of,… | object |
docsThe repository's own architecture documents, when… | string[] |
dockerfilesContainer definitions in it | string[] |
ciPipeline definitions in it | string[] |
lockfileWhether dependencies are pinned to exact… | boolean |
packageManifestWhether it is a JavaScript project… | boolean |
depsEvery dependency name declared anywhere in… | string[] |
hotspotsFiles that change often and are… | object[] |
path | string |
commits | number |
adds | number |
dels | number |
complexity | number |
score | number |
latestMs | number |
keyModulesThe parts the rest of the… | object[] |
path | string |
exports | number |
totalsThe repository in numbers | object |
filesFiles counted | number |
symbolsNamed things they export | number |
complexityBranch points added up | number |
hotspotsHow many files qualify as hotspots… | number |
indexedWhether the index these rankings came… | boolean |
ledgerWhat has already been done about… | object[] |
repoWhich repository | string |
choreWhich chore | string |
ranAtWhen it ran, in milliseconds | number |
runIdThe conversation that ran it, so… | string |
outcomeWhat it concluded: it did something,… | "acted" | "reported" | "clean" |
digestA fingerprint of the evidence standing… | string |
snoozedUntilNot until then, in milliseconds | number |
runningWhat is being measured right now… | object[] |
repoWhich repository | string |
idWhich measurement | "outdated" | "audit" | "knip" | "jscpd" … (6) |
askedAtWhen it was asked for, in… | number |
startedAtWhen it actually began | number |
nodeThe runtime version this sandbox is… | string |
curl "$SANDBOX/chores" \
-H "x-intentic-control: $INTENTIC_TOKEN"import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.chores.list();POST/chores/probeMeasure one repo again now
Re-runs a single check without waiting for it to go stale. Answers immediately: the work happens in the background and the result turns up in the next read, because some of these sweeps outlive any sane request.
What you send
| Field | Type | Where |
|---|---|---|
reporequiredWhich repository | string | body |
idrequiredWhich measurement to retake, ahead of… | "outdated" | "audit" | "knip" | "jscpd" … (6) | body |
What comes back
| Field | Type |
|---|---|
okAlways true | true |
curl -X POST "$SANDBOX/chores/probe" \
-H "x-intentic-control: $INTENTIC_TOKEN" \
-H "content-type: application/json" \
-d '{"repo":"root","id":"outdated"}'import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.chores.probe({
"repo": "root",
"id": "outdated"
});POST/chores/ledgerRecord a verdict, or snooze one
Writes what somebody concluded about one repo's chore, replacing the previous verdict. A chore has one current answer, not a growing pile of times it was fine.
What you send
| Field | Type | Where |
|---|---|---|
reporequiredWhich repository | string | body |
chorerequiredWhich chore | string | body |
ranAtrequiredWhen it ran, in milliseconds | number | body |
runIdrequiredThe conversation that ran it, so… | string | body |
outcomerequiredWhat it concluded: it did something,… | "acted" | "reported" | "clean" | body |
digestrequiredA fingerprint of the evidence standing… | string | body |
snoozedUntilNot until then, in milliseconds | number | body |
What comes back
| Field | Type |
|---|---|
okAlways true | true |
curl -X POST "$SANDBOX/chores/ledger" \
-H "x-intentic-control: $INTENTIC_TOKEN" \
-H "content-type: application/json" \
-d '{"repo":"root","chore":"…","ranAt":1,"runId":"run_8c2f41d9","outcome":"acted","digest":"…","snoozedUntil":1}'import { sandbox } from "@intentic/sandbox-client";
const result = await sandbox.chores.record({
"repo": "root",
"chore": "…",
"ranAt": 1,
"runId": "run_8c2f41d9",
"outcome": "acted",
"digest": "…",
"snoozedUntil": 1
});