assent-cli 0.0.0-stage → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +157 -2
- package/dist/args.d.ts +29 -0
- package/dist/args.js +103 -0
- package/dist/bin.d.ts +2 -0
- package/dist/bin.js +45 -0
- package/dist/claude-code.d.ts +19 -0
- package/dist/claude-code.js +144 -0
- package/dist/cli.d.ts +38 -0
- package/dist/cli.js +636 -0
- package/dist/client.d.ts +224 -0
- package/dist/client.js +112 -0
- package/dist/config.d.ts +20 -0
- package/dist/config.js +98 -0
- package/dist/diff.d.ts +1 -0
- package/dist/diff.js +46 -0
- package/dist/exit-codes.d.ts +19 -0
- package/dist/exit-codes.js +27 -0
- package/dist/hook-ask.d.ts +39 -0
- package/dist/hook-ask.js +241 -0
- package/dist/hook.d.ts +20 -0
- package/dist/hook.js +177 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.js +24 -0
- package/dist/mcp-bridge.d.ts +11 -0
- package/dist/mcp-bridge.js +100 -0
- package/dist/redact.d.ts +2 -0
- package/dist/redact.js +32 -0
- package/dist/shell.d.ts +2 -0
- package/dist/shell.js +12 -0
- package/dist/usage.d.ts +5 -0
- package/dist/usage.js +90 -0
- package/package.json +22 -4
package/dist/usage.js
ADDED
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.USAGE = exports.LEGACY_COMMAND = exports.COMMAND = exports.VERSION = void 0;
|
|
4
|
+
exports.usage = usage;
|
|
5
|
+
exports.VERSION = "0.6.1";
|
|
6
|
+
exports.COMMAND = "assent";
|
|
7
|
+
exports.LEGACY_COMMAND = "ordia";
|
|
8
|
+
function usage(command) {
|
|
9
|
+
return `Usage: ${command} <command> [options]
|
|
10
|
+
${USAGE_BODY}`;
|
|
11
|
+
}
|
|
12
|
+
const USAGE_BODY = `
|
|
13
|
+
whoami Show the agent this key belongs to
|
|
14
|
+
run start [--summary s] [--max-minutes n]
|
|
15
|
+
run progress <run-uuid> --done n --total m [--label l] Show progress on the phone (Live Activity)
|
|
16
|
+
run finish <run-uuid> (--exit-code n | --status ok|fail|deferred) [--summary s] [--log-file path] [--log-tail-bytes n]
|
|
17
|
+
[--task task-uuid] [--result-json path|-] [--done n] [--skipped n] [--needs-you n] [--failed n] With --task, counts come from that task's item results
|
|
18
|
+
[--retry-at when] Only with --status deferred
|
|
19
|
+
[--issue-reason needs_action|recovery_exhausted|deadline_at_risk --impact text --action-needed text] Raises an action for the owner; not allowed with ok; at most 500 characters each
|
|
20
|
+
run defer <run-uuid> --retry-at when Show the run as deferred until that time (for example after a usage limit)
|
|
21
|
+
ask --title t [--kind approve|todo|pay|login|code|reply] [--detail d] [--url u] [--draft text | --draft-file path|-]
|
|
22
|
+
[--action id:label[:primary|secondary|danger]]... [--item id:title[:unselected]]...
|
|
23
|
+
[--item-json path|-] [--recommend item-id]... [--reason item-id:text]... [--badge item-id:label[:tone]]... [--link item-id:label:url]... [--why text] [--field key:label[:type]:value]...
|
|
24
|
+
[--attach item-id:path]...
|
|
25
|
+
[--group key:title] [--conflict-on field-key]... [--total-of field-key] [--decline-action action-id]
|
|
26
|
+
[--rule-action name] [--target t]
|
|
27
|
+
[--due when] [--remind when] [--dedupe key] [--wait [--timeout seconds] [--interval seconds] [--no-pickup]]
|
|
28
|
+
[--question text] [--answer-type yes_no|choice|text|number|done] [--effort minutes] [--series key] [--idempotency-key uuid] [--allow-duplicate]
|
|
29
|
+
attach <path> [--name n] Upload a file (pdf, png, jpeg, gif, webp, txt, md; at most 10 MB) and print its uuid, once the owner turns attachments on for this agent
|
|
30
|
+
answers Your answered asks that are not picked up yet
|
|
31
|
+
picked-up <task-uuid> Mark an answer as acted on
|
|
32
|
+
task add --title t --why text [--detail d] [--url u] [--due when] [--remind when] [--dedupe key] [--project project-uuid [--track name]]
|
|
33
|
+
[--effort minutes] [--series key] [--idempotency-key uuid] [--allow-duplicate] [--parent ask-uuid --parent-item item-id]
|
|
34
|
+
--parent and --parent-item link the to-do to one item of your own ask: marking the to-do done marks that item done,
|
|
35
|
+
and resolving the item in the ask closes the to-do
|
|
36
|
+
task resolve <task-uuid> [--withdraw] [--note text] Close your own ask once the work is done (or withdraw it); its reminders stop
|
|
37
|
+
task update <task-uuid> [--due when|none] [--remind when|none] Only tasks this agent created
|
|
38
|
+
task get <task-uuid>
|
|
39
|
+
task item-result <task-uuid> <item-id> done|skipped|needs_you|failed [--reason r] [--url u] Report each item as it finishes
|
|
40
|
+
task item-status <task-uuid> <item-id> Prints go, held, withdrawn, not_selected or the recorded outcome for an item
|
|
41
|
+
note --title t (--content text | --content-file path | --content-file -) [--tag t]... [--run run-uuid]
|
|
42
|
+
note update <note-uuid> [--title t] [--content text | --content-file path | --content-file -] [--tag t]...
|
|
43
|
+
link --from type:uuid --to type:uuid [--relation produced|about|blocks|related] types: note, task, run, agent
|
|
44
|
+
memory get Pinned memory notes shared with this agent
|
|
45
|
+
lock acquire <resource> [--ttl minutes] [--wait seconds] [--interval seconds]
|
|
46
|
+
lock release <resource> [--token t]
|
|
47
|
+
handoff (--to <agent name> | --to-uuid <agent uuid>) --title t [--detail d] [--run run-uuid]
|
|
48
|
+
handoffs Open hand-offs other agents gave you
|
|
49
|
+
handoffs done <task-uuid> Mark a hand-off you received as done
|
|
50
|
+
project get <project-uuid> Read a project this agent is linked to
|
|
51
|
+
project overview <project-uuid> Progress, tracks, milestones, this week and overdue for a linked project
|
|
52
|
+
plan create --file path|- [--idempotency-key uuid] JSON { title, summary?, tracks: [{key,title}], sessions: [{key,trackKey,title,dueAt,detail?,sessionMinutes?,habitKey?,url?}] }, at most 1000 sessions
|
|
53
|
+
plan get <plan-uuid> Read back a plan this agent created
|
|
54
|
+
plan sessions <plan-uuid> --file path|- JSON { sessions: [{key, dueAt?, title?, detail?, status?: open|done|cancelled}] }, at most 500
|
|
55
|
+
rules check --action name [--target t] [--summary s] Ask the person's standing rules first; exit 0 allow, 10 deny, 11 ask
|
|
56
|
+
rules list Standing rules that apply to this agent
|
|
57
|
+
rules add --deny --action pattern [--target pattern] [--reason r] [--expires 1d|7d|30d|none] Agents can only add deny rules for themselves
|
|
58
|
+
rules remove <rule-uuid> Remove a deny rule this agent added
|
|
59
|
+
hook pre-tool-use [--ask [--max-wait seconds]] Read a PreToolUse hook event on stdin and print allow, deny or ask; always exits 0
|
|
60
|
+
--ask: for calls on the ask list, ask the person in Assent and wait (at most --max-wait, default 45); no answer or any error blocks the call
|
|
61
|
+
hook claude-code install|uninstall [--settings path] [--config path] [--yes] Add or remove the Assent hook in Claude Code settings (default ~/.claude/settings.json), showing the change first
|
|
62
|
+
mcp Run a stdio MCP server that forwards to the Assent MCP endpoint with this agent key
|
|
63
|
+
|
|
64
|
+
--field types: text, money (GBP 42.00), date, datetime, number, score (8/10). Per-item fields and field tones (primary, tone) go through --item-json, a JSON array of items;
|
|
65
|
+
--recommend, --reason, --badge (tones neutral, ok, warn, danger, note; at most 4) and --link (http or https; at most 4) then mark items by id.
|
|
66
|
+
--attach uploads the file first, then puts its uuid on that item (at most 4 per item); an item-json item can also carry attachments: [{ "uuid": "..." }].
|
|
67
|
+
--group puts separate asks from this agent with one key into one decision card; the key cannot contain a colon. --conflict-on (a field key, up to 4) flags members sharing that field's day or value, --total-of (a money field key) totals open members per currency, and --decline-action (an action id of the ask) is what "Keep one" answers the others with.
|
|
68
|
+
|
|
69
|
+
when is a date and time: 2026-10-15T17:00 or 2026-10-15 17:00 (this computer's time zone), or with an offset like 2026-10-15T17:00:00+01:00.
|
|
70
|
+
A bare date like 2026-10-15 means 09:00 that day in your Assent time zone, and prints a warning on stderr.
|
|
71
|
+
--remind sets when the reminder push goes out. For a to-do (task add, or ask --kind todo) it is sent at that exact moment, even in quiet hours;
|
|
72
|
+
for other asks a reminder that falls in quiet hours waits until they end. Without --remind, Assent reminds at the due time.
|
|
73
|
+
|
|
74
|
+
--kind reply needs --draft (or --draft-file, a path or - for stdin, for multi-line text; one final line break is dropped), at most 4000 characters,
|
|
75
|
+
and refuses them for other kinds. The person can edit the draft in Assent; the send action's answer.value is the final text to send (answers or task get).
|
|
76
|
+
Default actions: send (primary) and skip; your own actions need one primary action, the send action. The draft is sent as written, without redaction.
|
|
77
|
+
|
|
78
|
+
--rule-action (for example deploy:web or post) and --target (for example production or linkedin) name what an approve ask is about, so the person
|
|
79
|
+
can answer Always or Never in Assent; a later ask that matches their standing rule comes back already answered. Allow rules only come from the person.
|
|
80
|
+
Rule patterns use * as a wildcard and ignore case. hook pre-tool-use fails open: on any error it answers ask. ASSENT_HOOK_TIMEOUT_MS sets its timeout (default 3000).
|
|
81
|
+
With --ask, calls matching hook.ask in the config file (default: git push, git reset --hard, rm -r, deploys, npm publish, terraform apply or destroy,
|
|
82
|
+
kubectl delete, docker push) go to the person as an approve ask; it waits hook.waitSeconds or ASSENT_HOOK_WAIT_SECONDS (default 120) and blocks without an answer.
|
|
83
|
+
|
|
84
|
+
--project files the new ask or task into a project the owner linked this agent to; --track puts it on that project track (for example "Weekly habits").
|
|
85
|
+
ask, task add, note and handoff link the new item to --run, or to $ASSENT_RUN_UUID, as produced by that run.
|
|
86
|
+
|
|
87
|
+
Every command prints JSON; --get <field> prints one field instead.
|
|
88
|
+
Config: ASSENT_AGENT_KEY, and ASSENT_API_URL to use another server, or ASSENT_CONFIG or ~/.assent/config.json with {"agentKey": "oak_..."}. ASSENT_TIMEOUT_MS sets the request timeout (default 10000).
|
|
89
|
+
Exit codes: 0 ok, 1 error, 2 usage, 3 conflict, lock held or expired, 4 not found, 5 not configured or unauthorised, 6 wait timed out, 10 rule says deny, 11 no rule (ask), 69 Assent unreachable.`;
|
|
90
|
+
exports.USAGE = usage(exports.COMMAND);
|
package/package.json
CHANGED
|
@@ -1,6 +1,24 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "assent-cli",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
}
|
|
3
|
+
"version": "0.6.1",
|
|
4
|
+
"description": "Assent command line for agents: asks, runs, notes, tasks, locks, rules and hand-offs",
|
|
5
|
+
"license": "UNLICENSED",
|
|
6
|
+
"bin": { "assent-cli": "dist/bin.js", "assent": "dist/bin.js", "ordia": "dist/bin.js" },
|
|
7
|
+
"main": "dist/index.js",
|
|
8
|
+
"types": "dist/index.d.ts",
|
|
9
|
+
"files": ["dist", "README.md"],
|
|
10
|
+
"engines": { "node": ">=20" },
|
|
11
|
+
"scripts": {
|
|
12
|
+
"build": "rm -rf dist && tsc -p tsconfig.build.json",
|
|
13
|
+
"test": "jest",
|
|
14
|
+
"test:cov": "jest --coverage",
|
|
15
|
+
"prepublishOnly": "npm run build && npm test"
|
|
16
|
+
},
|
|
17
|
+
"devDependencies": {
|
|
18
|
+
"@types/jest": "^29.5.13",
|
|
19
|
+
"@types/node": "^20.16.10",
|
|
20
|
+
"jest": "^29.7.0",
|
|
21
|
+
"ts-jest": "^29.2.5",
|
|
22
|
+
"typescript": "^5.5.4"
|
|
23
|
+
}
|
|
24
|
+
}
|