@calliopelabs/cli 3.7.0 → 3.8.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 +31 -0
- package/dist/acp.d.ts.map +1 -1
- package/dist/acp.js +2 -0
- package/dist/acp.js.map +1 -1
- package/dist/approvals/request.d.ts.map +1 -1
- package/dist/approvals/request.js +10 -0
- package/dist/approvals/request.js.map +1 -1
- package/dist/auth/chatgpt/fallback.d.ts +31 -0
- package/dist/auth/chatgpt/fallback.d.ts.map +1 -0
- package/dist/auth/chatgpt/fallback.js +111 -0
- package/dist/auth/chatgpt/fallback.js.map +1 -0
- package/dist/auth/chatgpt/index.d.ts +6 -0
- package/dist/auth/chatgpt/index.d.ts.map +1 -0
- package/dist/auth/chatgpt/index.js +6 -0
- package/dist/auth/chatgpt/index.js.map +1 -0
- package/dist/auth/chatgpt/login.d.ts +4 -0
- package/dist/auth/chatgpt/login.d.ts.map +1 -0
- package/dist/auth/chatgpt/login.js +82 -0
- package/dist/auth/chatgpt/login.js.map +1 -0
- package/dist/auth/chatgpt/protocol.d.ts +24 -0
- package/dist/auth/chatgpt/protocol.d.ts.map +1 -0
- package/dist/auth/chatgpt/protocol.js +71 -0
- package/dist/auth/chatgpt/protocol.js.map +1 -0
- package/dist/auth/chatgpt/session.d.ts +24 -0
- package/dist/auth/chatgpt/session.d.ts.map +1 -0
- package/dist/auth/chatgpt/session.js +101 -0
- package/dist/auth/chatgpt/session.js.map +1 -0
- package/dist/auth/chatgpt/store.d.ts +28 -0
- package/dist/auth/chatgpt/store.d.ts.map +1 -0
- package/dist/auth/chatgpt/store.js +75 -0
- package/dist/auth/chatgpt/store.js.map +1 -0
- package/dist/auth/cli.d.ts +2 -0
- package/dist/auth/cli.d.ts.map +1 -0
- package/dist/auth/cli.js +38 -0
- package/dist/auth/cli.js.map +1 -0
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +2 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +50 -3
- package/dist/bin.js.map +1 -1
- package/dist/brain/exchange.d.ts.map +1 -1
- package/dist/brain/exchange.js +3 -1
- package/dist/brain/exchange.js.map +1 -1
- package/dist/brain/kg-export.d.ts +1 -1
- package/dist/brain/kg.d.ts +1 -1
- package/dist/brain/kg.d.ts.map +1 -1
- package/dist/brain/kg.js +3 -1
- package/dist/brain/kg.js.map +1 -1
- package/dist/build-metadata.json +1 -1
- package/dist/config.d.ts +13 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +10 -2
- package/dist/config.js.map +1 -1
- package/dist/delegation/claude.d.ts +28 -0
- package/dist/delegation/claude.d.ts.map +1 -0
- package/dist/delegation/claude.js +107 -0
- package/dist/delegation/claude.js.map +1 -0
- package/dist/delegation/index.d.ts +2 -0
- package/dist/delegation/index.d.ts.map +1 -0
- package/dist/delegation/index.js +2 -0
- package/dist/delegation/index.js.map +1 -0
- package/dist/execution/attribution.d.ts +3 -0
- package/dist/execution/attribution.d.ts.map +1 -1
- package/dist/execution/attribution.js.map +1 -1
- package/dist/execution/authority.d.ts +18 -4
- package/dist/execution/authority.d.ts.map +1 -1
- package/dist/execution/authority.js +66 -12
- package/dist/execution/authority.js.map +1 -1
- package/dist/execution/child-grants.js +4 -1
- package/dist/execution/child-grants.js.map +1 -1
- package/dist/execution/delegated.d.ts.map +1 -1
- package/dist/execution/delegated.js +5 -2
- package/dist/execution/delegated.js.map +1 -1
- package/dist/execution/guard.d.ts.map +1 -1
- package/dist/execution/guard.js +7 -3
- package/dist/execution/guard.js.map +1 -1
- package/dist/execution/ledger-cli.d.ts.map +1 -1
- package/dist/execution/ledger-cli.js +9 -7
- package/dist/execution/ledger-cli.js.map +1 -1
- package/dist/execution/ledger-protocol.d.ts +1 -1
- package/dist/execution/ledger-protocol.d.ts.map +1 -1
- package/dist/execution/ledger-protocol.js +1 -1
- package/dist/execution/ledger-protocol.js.map +1 -1
- package/dist/execution/ledger-server.d.ts +11 -1
- package/dist/execution/ledger-server.d.ts.map +1 -1
- package/dist/execution/ledger-server.js +65 -4
- package/dist/execution/ledger-server.js.map +1 -1
- package/dist/execution/ledger.d.ts +2 -0
- package/dist/execution/ledger.d.ts.map +1 -1
- package/dist/execution/ledger.js +46 -12
- package/dist/execution/ledger.js.map +1 -1
- package/dist/execution/parent-budget.d.ts +25 -3
- package/dist/execution/parent-budget.d.ts.map +1 -1
- package/dist/execution/parent-budget.js +126 -4
- package/dist/execution/parent-budget.js.map +1 -1
- package/dist/execution/parent-uncertainty.d.ts +3 -0
- package/dist/execution/parent-uncertainty.d.ts.map +1 -0
- package/dist/execution/parent-uncertainty.js +6 -0
- package/dist/execution/parent-uncertainty.js.map +1 -0
- package/dist/execution/portable-identity.d.ts +15 -0
- package/dist/execution/portable-identity.d.ts.map +1 -0
- package/dist/execution/portable-identity.js +80 -0
- package/dist/execution/portable-identity.js.map +1 -0
- package/dist/execution/quote.d.ts +1 -1
- package/dist/execution/quote.d.ts.map +1 -1
- package/dist/execution/quote.js +4 -2
- package/dist/execution/quote.js.map +1 -1
- package/dist/execution/remote-checkpoint.d.ts.map +1 -1
- package/dist/execution/remote-checkpoint.js +23 -16
- package/dist/execution/remote-checkpoint.js.map +1 -1
- package/dist/execution/remote-ledger.d.ts +20 -0
- package/dist/execution/remote-ledger.d.ts.map +1 -1
- package/dist/execution/remote-ledger.js +93 -14
- package/dist/execution/remote-ledger.js.map +1 -1
- package/dist/execution/types.d.ts +30 -2
- package/dist/execution/types.d.ts.map +1 -1
- package/dist/execution/types.js.map +1 -1
- package/dist/headless.d.ts +27 -1
- package/dist/headless.d.ts.map +1 -1
- package/dist/headless.js +107 -7
- package/dist/headless.js.map +1 -1
- package/dist/health/target.d.ts +11 -0
- package/dist/health/target.d.ts.map +1 -1
- package/dist/health/target.js +48 -21
- package/dist/health/target.js.map +1 -1
- package/dist/improvement/cli.d.ts +1 -1
- package/dist/improvement/cli.d.ts.map +1 -1
- package/dist/improvement/cli.js +4 -4
- package/dist/improvement/cli.js.map +1 -1
- package/dist/improvement/host-capabilities.d.ts +134 -1
- package/dist/improvement/host-capabilities.d.ts.map +1 -1
- package/dist/improvement/host-capabilities.js +8 -1
- package/dist/improvement/host-capabilities.js.map +1 -1
- package/dist/improvement/index.d.ts +2 -0
- package/dist/improvement/index.d.ts.map +1 -1
- package/dist/improvement/index.js +2 -0
- package/dist/improvement/index.js.map +1 -1
- package/dist/improvement/task-feedback-contract.d.ts +41 -0
- package/dist/improvement/task-feedback-contract.d.ts.map +1 -0
- package/dist/improvement/task-feedback-contract.js +83 -0
- package/dist/improvement/task-feedback-contract.js.map +1 -0
- package/dist/improvement/task-feedback.d.ts +149 -0
- package/dist/improvement/task-feedback.d.ts.map +1 -0
- package/dist/improvement/task-feedback.js +117 -0
- package/dist/improvement/task-feedback.js.map +1 -0
- package/dist/improvement/task-outcomes.d.ts +2 -2
- package/dist/improvement/task-outcomes.d.ts.map +1 -1
- package/dist/improvement/task-outcomes.js +2 -3
- package/dist/improvement/task-outcomes.js.map +1 -1
- package/dist/model-detection.d.ts +0 -5
- package/dist/model-detection.d.ts.map +1 -1
- package/dist/model-detection.js +5 -5
- package/dist/model-detection.js.map +1 -1
- package/dist/orchestration/coordinator-types.d.ts +15 -2
- package/dist/orchestration/coordinator-types.d.ts.map +1 -1
- package/dist/orchestration/coordinator.d.ts.map +1 -1
- package/dist/orchestration/coordinator.js +18 -3
- package/dist/orchestration/coordinator.js.map +1 -1
- package/dist/orchestration/execution-journal.d.ts.map +1 -1
- package/dist/orchestration/execution-journal.js +51 -6
- package/dist/orchestration/execution-journal.js.map +1 -1
- package/dist/orchestration/execution-store.js +1 -1
- package/dist/orchestration/execution-store.js.map +1 -1
- package/dist/orchestration/execution.d.ts +3 -1
- package/dist/orchestration/execution.d.ts.map +1 -1
- package/dist/orchestration/execution.js +1 -1
- package/dist/orchestration/execution.js.map +1 -1
- package/dist/orchestration/index.d.ts +1 -0
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +1 -0
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/remote-task-capacity.d.ts +31 -0
- package/dist/orchestration/remote-task-capacity.d.ts.map +1 -0
- package/dist/orchestration/remote-task-capacity.js +83 -0
- package/dist/orchestration/remote-task-capacity.js.map +1 -0
- package/dist/orchestration/reviewed-ledger.d.ts +58 -0
- package/dist/orchestration/reviewed-ledger.d.ts.map +1 -1
- package/dist/orchestration/reviewed-ledger.js +66 -10
- package/dist/orchestration/reviewed-ledger.js.map +1 -1
- package/dist/orchestration/routing.d.ts +2 -0
- package/dist/orchestration/routing.d.ts.map +1 -1
- package/dist/orchestration/routing.js +10 -1
- package/dist/orchestration/routing.js.map +1 -1
- package/dist/orchestration/task-configuration.d.ts +8 -0
- package/dist/orchestration/task-configuration.d.ts.map +1 -0
- package/dist/orchestration/task-configuration.js +23 -0
- package/dist/orchestration/task-configuration.js.map +1 -0
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +17 -1
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/bedrock.d.ts.map +1 -1
- package/dist/providers/bedrock.js +16 -1
- package/dist/providers/bedrock.js.map +1 -1
- package/dist/providers/chatgpt.d.ts +11 -0
- package/dist/providers/chatgpt.d.ts.map +1 -0
- package/dist/providers/chatgpt.js +156 -0
- package/dist/providers/chatgpt.js.map +1 -0
- package/dist/providers/compat.d.ts.map +1 -1
- package/dist/providers/compat.js +33 -16
- package/dist/providers/compat.js.map +1 -1
- package/dist/providers/index.d.ts +0 -5
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +10 -2
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +24 -11
- package/dist/providers/openai.js.map +1 -1
- package/dist/providers/types.d.ts +5 -0
- package/dist/providers/types.d.ts.map +1 -1
- package/dist/providers/types.js.map +1 -1
- package/dist/routing/select.d.ts.map +1 -1
- package/dist/routing/select.js +20 -1
- package/dist/routing/select.js.map +1 -1
- package/dist/runlog.d.ts +3 -1
- package/dist/runlog.d.ts.map +1 -1
- package/dist/runlog.js.map +1 -1
- package/dist/runtime/permissions.d.ts.map +1 -1
- package/dist/runtime/permissions.js +1 -0
- package/dist/runtime/permissions.js.map +1 -1
- package/dist/runtime/turn.d.ts +12 -1
- package/dist/runtime/turn.d.ts.map +1 -1
- package/dist/runtime/turn.js +109 -19
- package/dist/runtime/turn.js.map +1 -1
- package/dist/sessions/execution-binding.d.ts +8 -3
- package/dist/sessions/execution-binding.d.ts.map +1 -1
- package/dist/sessions/execution-binding.js +13 -3
- package/dist/sessions/execution-binding.js.map +1 -1
- package/dist/supervision/runtime.d.ts.map +1 -1
- package/dist/supervision/runtime.js +10 -3
- package/dist/supervision/runtime.js.map +1 -1
- package/dist/types.d.ts +3 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ui/agent.d.ts.map +1 -1
- package/dist/ui/agent.js +4 -0
- package/dist/ui/agent.js.map +1 -1
- package/dist/ui/components.d.ts.map +1 -1
- package/dist/ui/components.js +3 -5
- package/dist/ui/components.js.map +1 -1
- package/dist/ui/frame.js +3 -3
- package/dist/ui/frame.js.map +1 -1
- package/dist/ui/modals/tool-output.d.ts.map +1 -1
- package/dist/ui/modals/tool-output.js +5 -6
- package/dist/ui/modals/tool-output.js.map +1 -1
- package/dist/ui/state/use-terminal-width.d.ts.map +1 -1
- package/dist/ui/state/use-terminal-width.js +2 -13
- package/dist/ui/state/use-terminal-width.js.map +1 -1
- package/docs/chatgpt-plan.md +109 -0
- package/docs/claude-plan.md +58 -0
- package/docs/delegation-ledger.md +180 -5
- package/docs/improvement-cycles.md +5 -0
- package/docs/releases/3.8.0.md +65 -0
- package/docs/releases/3.8.1.md +40 -0
- package/docs/reviewed-provider-metadata.md +84 -0
- package/docs/task-feedback.md +77 -0
- package/package.json +20 -11
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# Reviewed task feedback
|
|
2
|
+
|
|
3
|
+
Hosts discover this interface explicitly through
|
|
4
|
+
`calliope improve host-capabilities --contract-version 2 --json` or the
|
|
5
|
+
`taskFeedbackCapabilities()` library API. Default/version-1 host discovery and
|
|
6
|
+
the existing execution capability contract retain their original shapes.
|
|
7
|
+
|
|
8
|
+
`recordTaskFeedback` records one native-policy-reviewed assessment of an exact
|
|
9
|
+
completed task attempt. It does not mark the task accepted, change a check,
|
|
10
|
+
allocate execution, award a numeric reward or activate a learned policy. A host's
|
|
11
|
+
claimed user/workflow identity is not independently authenticated by this API.
|
|
12
|
+
The trust boundary is the operator-owned native permission decision and store.
|
|
13
|
+
|
|
14
|
+
```ts
|
|
15
|
+
import {randomUUID} from 'node:crypto';
|
|
16
|
+
import {inspectTaskOutcome, recordTaskFeedback} from
|
|
17
|
+
'@calliopelabs/cli/dist/improvement/index.js';
|
|
18
|
+
|
|
19
|
+
const selection = {taskId, attempt, executionRevision};
|
|
20
|
+
const observation = await inspectTaskOutcome(cwd, runId, selection, options);
|
|
21
|
+
const result = await recordTaskFeedback(cwd, runId, {
|
|
22
|
+
version: 1,
|
|
23
|
+
id: randomUUID(),
|
|
24
|
+
selection,
|
|
25
|
+
observationHash: observation.hash,
|
|
26
|
+
assessment: {decision: 'accepted', reason: 'Reviewed against the requested result.'},
|
|
27
|
+
references: [{kind: 'workflow', id: workflowId, revision: workflowHash}],
|
|
28
|
+
}, options);
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
The caller first presents the native observation and assessment for review.
|
|
32
|
+
The request binds its exact observation hash and execution revision. The shared
|
|
33
|
+
permission resolver applies plan-mode denial, hooks, policy and mutation
|
|
34
|
+
confirmation. Missing confirmation denies by default. An operator may explicitly
|
|
35
|
+
provide the usual native noninteractive permission options; request data cannot
|
|
36
|
+
set its own trust or approval. The writer checks current run approval, ownership,
|
|
37
|
+
revision, retained artifact bytes and accounting again before commit.
|
|
38
|
+
|
|
39
|
+
Requests accept only the versioned identity, assessment and optional declared
|
|
40
|
+
workflow/skill/policy references. Each reference has a bounded ID and immutable
|
|
41
|
+
revision hash. Unknown fields, including reward, cost, check results and trust
|
|
42
|
+
flags, are rejected. The native configuration hash identifies the actual task,
|
|
43
|
+
agent and applied strategy at that attempt, including prior strategy restoration
|
|
44
|
+
after withdrawal. Declared external references are reviewed metadata; they do not
|
|
45
|
+
prove the content of an external workflow or skill.
|
|
46
|
+
|
|
47
|
+
## Persistence and inspection
|
|
48
|
+
|
|
49
|
+
The receipt is a version-12 event in the existing private execution journal.
|
|
50
|
+
Its source includes the native run, manifest, plan, approval, configuration,
|
|
51
|
+
graph, task/start/session and attempt identities. Older journal readers that
|
|
52
|
+
cannot read version 12 must refuse it. The previous journal versions are unchanged.
|
|
53
|
+
At most 64 receipts can be retained in one run, inside the existing journal byte
|
|
54
|
+
limits. Preserve the run when that limit is reached.
|
|
55
|
+
|
|
56
|
+
Identical request IDs and payloads return the same receipt after rechecking
|
|
57
|
+
native permission. Changed payloads cannot reuse an ID. A lost acknowledgement
|
|
58
|
+
does not append another event, reset the original clock or alter reservations.
|
|
59
|
+
|
|
60
|
+
`taskFeedbackHistory(cwd, runId, options)` returns recorded receipt history, with
|
|
61
|
+
an explicit notice that its outcome evidence has not been revalidated.
|
|
62
|
+
`inspectTaskFeedback(cwd, runId, feedbackId, options)` reuses `inspectTaskOutcome`
|
|
63
|
+
to verify native evidence and derive current checks, duration and accounting.
|
|
64
|
+
An active coordinator or altered artifact refuses inspection. A later native
|
|
65
|
+
outcome change, including explicit task acceptance, marks the old assessment
|
|
66
|
+
`stale`. Late billing settlement updates the observed accounting without
|
|
67
|
+
rewriting the assessment or converting unknown costs to zero.
|
|
68
|
+
|
|
69
|
+
Both inspection APIs return `{data, redacted}`. Known credentials are rejected
|
|
70
|
+
on write. Read-time redaction also protects strings that later become configured
|
|
71
|
+
credentials; redacted display data is not a byte-for-byte copy of the retained
|
|
72
|
+
receipt. No raw worker prose, tool logs or artifact contents are imported into
|
|
73
|
+
the assessment record.
|
|
74
|
+
|
|
75
|
+
Cross-run learned strategy selection, training data admission, reward weighting,
|
|
76
|
+
baseline/held-out evaluation and candidate activation/withdrawal remain separate
|
|
77
|
+
work under #413. This receipt API does not claim those capabilities.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calliopelabs/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.8.1",
|
|
4
4
|
"description": "The private-AI agent CLI - one terminal agent for any model backend, including the ones you run yourself",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ai",
|
|
@@ -34,14 +34,20 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|
|
36
36
|
"README.md",
|
|
37
|
+
"docs/claude-plan.md",
|
|
37
38
|
"scripts/verify-runlog.mjs",
|
|
38
39
|
"docs/migration-*.md",
|
|
39
40
|
"docs/migration-example-*.json",
|
|
40
41
|
"docs/delegation-ledger.md",
|
|
41
42
|
"docs/improvement-cycles.md",
|
|
43
|
+
"docs/task-feedback.md",
|
|
42
44
|
"docs/acp.md",
|
|
43
45
|
"docs/releases/3.7.0.md",
|
|
44
|
-
"docs/releases/3.6.0.md"
|
|
46
|
+
"docs/releases/3.6.0.md",
|
|
47
|
+
"docs/chatgpt-plan.md",
|
|
48
|
+
"docs/releases/3.8.0.md",
|
|
49
|
+
"docs/reviewed-provider-metadata.md",
|
|
50
|
+
"docs/releases/3.8.1.md"
|
|
45
51
|
],
|
|
46
52
|
"scripts": {
|
|
47
53
|
"build": "tsc && node scripts/build-metadata.mjs && chmod +x dist/bin.js",
|
|
@@ -50,6 +56,8 @@
|
|
|
50
56
|
"test": "vitest run",
|
|
51
57
|
"test:watch": "vitest",
|
|
52
58
|
"test:coverage": "vitest run --coverage",
|
|
59
|
+
"test:affected": "node scripts/coverage-map.mjs select --base origin/main --run",
|
|
60
|
+
"coverage:map": "node scripts/coverage-map.mjs build",
|
|
53
61
|
"test:ahp-protocol": "npm run build && node --test scripts/qualification/ahp-protocol.mjs",
|
|
54
62
|
"test:reviewed-host": "npm run build && node scripts/qualification/reviewed-host.mjs",
|
|
55
63
|
"test:native-policy": "npm run build && node --test scripts/qualification/native-policy.mjs",
|
|
@@ -66,21 +74,22 @@
|
|
|
66
74
|
"capture:semantics": "npm run build && node scripts/conformance/capture-semantic.mjs"
|
|
67
75
|
},
|
|
68
76
|
"dependencies": {
|
|
69
|
-
"@agentclientprotocol/sdk": "2.0
|
|
70
|
-
"@anthropic-ai/sdk": "
|
|
71
|
-
"@aws-sdk/credential-provider-ini": "3.973.
|
|
72
|
-
"@aws-sdk/credential-provider-node": "3.972.
|
|
77
|
+
"@agentclientprotocol/sdk": "2.2.0",
|
|
78
|
+
"@anthropic-ai/sdk": "1.3.0",
|
|
79
|
+
"@aws-sdk/credential-provider-ini": "3.973.24",
|
|
80
|
+
"@aws-sdk/credential-provider-node": "3.972.91",
|
|
73
81
|
"@google/genai": "^2.22.0",
|
|
74
82
|
"@inquirer/prompts": "^8.5.2",
|
|
75
|
-
"conf": "
|
|
76
|
-
"ink": "
|
|
77
|
-
"
|
|
83
|
+
"conf": "16.0.0",
|
|
84
|
+
"ink": "8.0.0",
|
|
85
|
+
"jose": "6.2.15",
|
|
86
|
+
"openai": "7.43.0",
|
|
78
87
|
"react": "^19.2.3",
|
|
79
|
-
"sql.js": "1.15.
|
|
88
|
+
"sql.js": "1.15.2",
|
|
80
89
|
"string-width": "8.3.0",
|
|
81
90
|
"ws": "8.22.0",
|
|
82
91
|
"yaml": "^2.8.2",
|
|
83
|
-
"zod": "4.6.
|
|
92
|
+
"zod": "4.6.7"
|
|
84
93
|
},
|
|
85
94
|
"devDependencies": {
|
|
86
95
|
"@types/node": "^26.1.1",
|