@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,109 @@
|
|
|
1
|
+
# ChatGPT plan access
|
|
2
|
+
|
|
3
|
+
Experimental in 3.8.0: opt-in access with fixture-based implementation tests.
|
|
4
|
+
Live subscription prompt/tool qualification remains outstanding.
|
|
5
|
+
|
|
6
|
+
Calliope AI CLI can explicitly select ChatGPT-plan inference instead of an OpenAI
|
|
7
|
+
Platform API key. This uses the open-source Sign in with ChatGPT flow and the public
|
|
8
|
+
Responses API. Availability and usage limits depend on the signed-in account.
|
|
9
|
+
|
|
10
|
+
```sh
|
|
11
|
+
calliope auth chatgpt login
|
|
12
|
+
calliope auth chatgpt status
|
|
13
|
+
calliope --provider openai
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Login opens the system browser with a temporary IPv4 loopback listener. Complete
|
|
17
|
+
consent in that browser. Calliope validates the signed identity before activating
|
|
18
|
+
an account. The initial sign-in registers a client; credentials and a stable host
|
|
19
|
+
ID are saved privately beside the CLI config, under `chatgpt-auth/`.
|
|
20
|
+
|
|
21
|
+
`status` lists registrations without credentials. Use `login <client-id>` to
|
|
22
|
+
reauthorize a saved registration, `use <client-id>` to select another signed-in
|
|
23
|
+
account, and `logout` to revoke the active renewable session and clear local tokens.
|
|
24
|
+
Logout retains the client/account mapping and host ID. Run `login` without an ID to
|
|
25
|
+
register another account/workspace. Concurrent credential changes fail with a busy
|
|
26
|
+
message; after a crash, remove `chatgpt-auth/lock` only when no Calliope process uses it.
|
|
27
|
+
|
|
28
|
+
`calliope auth chatgpt api-key` explicitly restores normal OpenAI API-key access.
|
|
29
|
+
An environment API key or configured proxy never overrides selected ChatGPT access.
|
|
30
|
+
Logout and refresh failures never change billing methods automatically. Quota
|
|
31
|
+
failures can use the explicitly configured paid fallback described below.
|
|
32
|
+
|
|
33
|
+
Models come from the active account's live catalog. The adapter sends the complete
|
|
34
|
+
history with `store: false`, streams through `response.completed`, and returns tool
|
|
35
|
+
calls to Calliope's existing permission and execution loop. Private reasoning state
|
|
36
|
+
is saved with conversation history and bound to the account and model. Outside
|
|
37
|
+
the configured quota fallback, start a new session to change either or switch
|
|
38
|
+
that history back to API-key access.
|
|
39
|
+
|
|
40
|
+
Subscription requests cannot enforce `max_output_tokens` or API dollar budgets;
|
|
41
|
+
Calliope rejects those requests before inference, including reviewed/bounded runs.
|
|
42
|
+
Token usage is recorded, but USD totals exclude subscription consumption. This does
|
|
43
|
+
not mean the subscription is free or unlimited. Plan limits remain with ChatGPT.
|
|
44
|
+
Cancellation and ordinary Calliope tool permissions still apply.
|
|
45
|
+
|
|
46
|
+
Implementation tests use synthetic OAuth/JWKS and streamed Responses fixtures.
|
|
47
|
+
They do not prove account eligibility or real subscription inference. Release
|
|
48
|
+
qualification requires a user-operated login, live model discovery and a minimal
|
|
49
|
+
prompt/tool round trip on an eligible account; no credentials belong in captures.
|
|
50
|
+
|
|
51
|
+
References (checked 2026-11-04):
|
|
52
|
+
- https://developers.openai.com/siwc/token-sharing-open-source/sign-in
|
|
53
|
+
- https://developers.openai.com/siwc/token-sharing-open-source/profiles-and-sessions
|
|
54
|
+
- https://developers.openai.com/siwc/token-sharing-open-source/models-and-inference
|
|
55
|
+
- https://developers.openai.com/siwc/token-sharing-open-source/preview-limitations
|
|
56
|
+
|
|
57
|
+
## Quota circuit breaking and paid fallback
|
|
58
|
+
|
|
59
|
+
Quota exhaustion opens an account-specific circuit for one hour; a rate limit
|
|
60
|
+
pauses subscription requests for one minute. The private state survives process
|
|
61
|
+
restarts. `status` shows the circuit and `reset` allows an explicit early probe.
|
|
62
|
+
|
|
63
|
+
Fallback is disabled by default. After configuring your OpenAI API key, opt in
|
|
64
|
+
with an exact model ID from that key's live model catalog and a shared project
|
|
65
|
+
spending ceiling (USD):
|
|
66
|
+
|
|
67
|
+
```sh
|
|
68
|
+
calliope auth chatgpt fallback models
|
|
69
|
+
calliope auth chatgpt fallback enable <api-model> <max-project-cost-usd> [max-output-tokens]
|
|
70
|
+
calliope auth chatgpt fallback status
|
|
71
|
+
calliope auth chatgpt fallback reset
|
|
72
|
+
calliope auth chatgpt fallback disable
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The `models` command lists the API key's live catalog and endpoint target digest
|
|
76
|
+
without changing your selected billing method or sending inference. Use that
|
|
77
|
+
digest when preparing a reviewed billing profile.
|
|
78
|
+
|
|
79
|
+
The output cap defaults to 4096 tokens. Existing recorded project spending counts toward
|
|
80
|
+
the ceiling; enabling fallback, starting a new process or resetting the quota
|
|
81
|
+
circuit does not replenish money. A stricter existing project cap still applies.
|
|
82
|
+
Each paid attempt reserves its maximum billable cost before dispatch using the
|
|
83
|
+
native project ledger. Concurrent callers share the same allowance. Failed or
|
|
84
|
+
cancelled requests retain their reservation; missing prices, capabilities or
|
|
85
|
+
limits stop inference. If the provider's model catalog omits these fields,
|
|
86
|
+
configure [reviewed billing metadata](reviewed-provider-metadata.md) for the
|
|
87
|
+
API-key endpoint before using fallback. Paid usage totals use the conservative
|
|
88
|
+
rates from the reservation; the provider's invoice remains authoritative.
|
|
89
|
+
|
|
90
|
+
On a quota failure before output, the ordinary terminal/headless/ACP turn can
|
|
91
|
+
continue through the API key. A visible warning identifies paid billing and its
|
|
92
|
+
cap. Public conversation and completed tool results are preserved; encrypted
|
|
93
|
+
subscription state is removed. The saved session stays on the paid model even
|
|
94
|
+
when the quota cooldown expires. Start a new session to try the plan again.
|
|
95
|
+
Changing the fallback model or account requires a new session. Disabling fallback
|
|
96
|
+
stops an existing fallback session rather than silently changing its billing.
|
|
97
|
+
|
|
98
|
+
There is no automatic replay after partial subscription output, cancellation,
|
|
99
|
+
refusal or authentication failure. Paid fallback has no transport retries; an API quota or rate-limit failure stops
|
|
100
|
+
the turn even if the client normally retries errors. It never switches back to an
|
|
101
|
+
exhausted subscription. Native tool permissions remain
|
|
102
|
+
in force. Reviewed task/ledger execution and reviewed Smart routing cannot change
|
|
103
|
+
billing targets this way; approve an API-key run explicitly for those workloads.
|
|
104
|
+
|
|
105
|
+
### Organization access denied
|
|
106
|
+
|
|
107
|
+
If OpenAI shows `3p_delegated_access_policy_denied` with “Your organization hasn’t enabled access for this app,” cancel the waiting CLI login and ask the ChatGPT workspace administrator to enable app access. Preserve the request ID for private OpenAI support if the setting is unavailable. Retry only after the policy changes. This is an authorization failure, not a quota event; it does not activate automatic paid fallback. You can explicitly select API-key access separately.
|
|
108
|
+
|
|
109
|
+
The 3.8.0 operator check reached the browser consent screen but was denied by this organization policy. Live subscription inference and tool execution remain unqualified.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# Local Claude plan delegation
|
|
2
|
+
|
|
3
|
+
Experimental in 3.8.0: opt-in access with fixture-based implementation tests.
|
|
4
|
+
Live subscription prompt/tool qualification remains outstanding.
|
|
5
|
+
|
|
6
|
+
Use your existing local Claude agent from Calliope AI CLI:
|
|
7
|
+
|
|
8
|
+
```sh
|
|
9
|
+
claude auth login
|
|
10
|
+
calliope claude status
|
|
11
|
+
calliope claude -- Review this project
|
|
12
|
+
calliope claude --print -- Summarize the README
|
|
13
|
+
calliope claude --model <model-from-Claude> --permission-mode plan -- Plan the change
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Install the official Claude Code CLI first. Authentication remains in that tool;
|
|
17
|
+
Calliope does not extract its tokens, offer its own Claude login, or send those
|
|
18
|
+
credentials to the Anthropic Messages API. Use a recent version supporting
|
|
19
|
+
`auth status` and `--permission-prompts` (2.1.259 or later).
|
|
20
|
+
|
|
21
|
+
This command delegates the whole agent session. Claude owns tools, permissions,
|
|
22
|
+
conversation state and plan usage. Calliope's native sandbox, reviewed-run ledger,
|
|
23
|
+
token/output bounds and dollar budgets do not apply. Native `--provider anthropic`
|
|
24
|
+
continues to use its existing API-key adapter.
|
|
25
|
+
|
|
26
|
+
Interactive delegation starts with default permissions unless `plan` is chosen.
|
|
27
|
+
Print mode denies unanswered permission prompts. Only the documented wrapper
|
|
28
|
+
options are accepted; use `--` before a prompt. No permission-bypass flag is added.
|
|
29
|
+
Model names are forwarded explicitly or left to Claude's own selection.
|
|
30
|
+
|
|
31
|
+
Calliope checks `claude auth status` for a saved `claude.ai` login before starting.
|
|
32
|
+
It removes inherited Anthropic credentials/provider selectors and disables
|
|
33
|
+
user/project settings sources for both the check and the delegated run. Managed
|
|
34
|
+
Claude policy still applies and can prevent launch. These settings mean personal
|
|
35
|
+
Claude configuration may differ from a normal direct launch. Claude's own plan and
|
|
36
|
+
extra-usage settings determine consumption; this is not a promise of unlimited or
|
|
37
|
+
zero-cost requests. Calliope does not silently switch to an API key.
|
|
38
|
+
|
|
39
|
+
Cancellation is forwarded to the child process; a child that does not terminate
|
|
40
|
+
receives SIGKILL after two seconds. The command returns Claude's exit status.
|
|
41
|
+
|
|
42
|
+
## Support guidance discrepancy
|
|
43
|
+
|
|
44
|
+
As checked on 2026-11-04, the support article says signed-in Agent SDK and `claude -p`
|
|
45
|
+
usage continues to draw from subscription limits. The SDK overview separately says
|
|
46
|
+
third-party products need prior approval to offer claude.ai login/rate limits.
|
|
47
|
+
This implementation is an explicit launcher of the user's installed local CLI,
|
|
48
|
+
not an embedded SDK provider or a new login offering. Broader embedded SDK
|
|
49
|
+
subscription support remains subject to clarification of that published guidance.
|
|
50
|
+
|
|
51
|
+
- https://support.claude.com/en/articles/15036540-use-the-claude-agent-sdk-with-your-claude-plan
|
|
52
|
+
- https://code.claude.com/docs/en/agent-sdk/overview
|
|
53
|
+
- https://code.claude.com/docs/en/cli-reference
|
|
54
|
+
- https://code.claude.com/docs/en/authentication
|
|
55
|
+
|
|
56
|
+
Automated tests cover argument/environment isolation, auth preflight, cancellation,
|
|
57
|
+
status-output limits and exit propagation. Subscription inference requires an
|
|
58
|
+
eligible user's existing Claude login; tests do not consume a real plan.
|
|
@@ -50,11 +50,23 @@ authority binding. Child credentials retain that binding. A sibling owner endpoi
|
|
|
50
50
|
cannot accept the token, and reservations, settlements and revocations enforce the
|
|
51
51
|
selected subtree. Each new request also checks the target account's native admission,
|
|
52
52
|
stop/escalation state, explicit reviewed provider/model choices and the host's
|
|
53
|
-
output cap.
|
|
53
|
+
output cap. Smart agents also enforce their reviewed initial pool. Task-bound
|
|
54
|
+
hosts derive escalation eligibility from that task's retained native failed-check
|
|
55
|
+
evidence; account-only hosts cannot select an escalation pool. Explicit reviewed
|
|
56
|
+
pins retain the same precedence as local Smart routing. The provider/model check
|
|
57
|
+
uses the current admitted graph and runs
|
|
54
58
|
again under the ledger writer lock before a new reservation commits. Existing requests can still settle
|
|
55
59
|
after owner cancellation; grant revocation and token expiry retain their existing
|
|
56
60
|
semantics.
|
|
57
61
|
|
|
62
|
+
Reviewed host capabilities additionally advertise `endpointBinding: 1`. Hosting
|
|
63
|
+
captures the owner's configured provider target hashes in the native budget approval
|
|
64
|
+
and token audience. New reservations must match that target for their provider;
|
|
65
|
+
changing an owner's endpoint fences existing hosts and changes newly issued tokens.
|
|
66
|
+
Restarting with unchanged endpoint configuration preserves credentials and allowance.
|
|
67
|
+
API key rotation does not change target identity. Child-side endpoint overrides cannot
|
|
68
|
+
widen this authority. Target hashes contain no API keys or raw endpoint strings.
|
|
69
|
+
|
|
58
70
|
The HTTP grant operation only returns credentials for an **exact, already admitted**
|
|
59
71
|
native child grant. It cannot create a proposal, approve children, bypass native
|
|
60
72
|
depth/count limits or promote an interrupted ledger grant into the execution graph.
|
|
@@ -69,10 +81,48 @@ that history requires verified restoration or an explicit owner-managed credenti
|
|
|
69
81
|
rotation; opening it never silently treats missing revocations as an empty history.
|
|
70
82
|
|
|
71
83
|
This is reviewed ledger hosting, not automatic Cykick/Astrolift enrollment. Remote
|
|
72
|
-
workspace identity, dispatcher credential delivery, task
|
|
84
|
+
workspace identity, dispatcher credential delivery, exclusive task ownership, transport
|
|
73
85
|
reachability and any narrower Cykick file-mutation policy still need their native
|
|
74
86
|
bindings. A loopback listener does not make a desktop reachable from a remote pod.
|
|
75
87
|
|
|
88
|
+
## Serve one active native task attempt
|
|
89
|
+
|
|
90
|
+
```sh
|
|
91
|
+
calliope ledger serve-task --run RUN_ID --task TASK_ID --attempt 1 \
|
|
92
|
+
--max-output-tokens 1024 --project /path/to/project \
|
|
93
|
+
--token-file /private/task.token
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
`prepareReviewedTaskLedger(cwd, runId, taskId, attempt, maxOutputTokens, options)`
|
|
97
|
+
derives the agent, session, immutable start-event ID/hash and native owner from
|
|
98
|
+
the current attributed `task_started` journal event. Pending, legacy unattributed,
|
|
99
|
+
stopped, completed and stale attempts cannot open this host. The private token's
|
|
100
|
+
audience binds that task, owner and output cap as well as the reviewed run.
|
|
101
|
+
Another task, changed owner, different cap or account-only host rejects the token.
|
|
102
|
+
This endpoint advertises reviewed capability version 2 with `taskBinding: 1`.
|
|
103
|
+
|
|
104
|
+
Its operations are only `hello`, `journal`, `task-execution`, `reserve` and `settle`.
|
|
105
|
+
There is no legacy `execution` fallback or child-grant mutation. Current clients
|
|
106
|
+
negotiate `task-execution`, validate its version 2 binding and automatically carry
|
|
107
|
+
the exact attribution and output cap into the shared execution guard. Older clients
|
|
108
|
+
refuse the missing legacy operation before inference. Each new reservation verifies
|
|
109
|
+
the attribution, agent, output cap and still-active native owner/attempt, including
|
|
110
|
+
under the ledger writer lock. Existing admissions may replay or settle after the
|
|
111
|
+
attempt ends; the original token expiry and accounting still apply.
|
|
112
|
+
|
|
113
|
+
Task-bound sessions retain version 2 restrictions with the start-event provenance.
|
|
114
|
+
A different task/attempt or an account-only connection cannot resume them. Reopening
|
|
115
|
+
the same active attempt preserves its token, allowance, history and deadline.
|
|
116
|
+
This does not dispatch work, acquire an exclusive process lease, implement Astrolift enrollment. A trusted scheduler still
|
|
117
|
+
owns those actions and the delivery of the private credential.
|
|
118
|
+
|
|
119
|
+
Run `CALLIOPE_REVIEWED_HOST_TASKS=1 npm run test:reviewed-host` for the real-process
|
|
120
|
+
task-host qualification. It checks two concurrent headless children, native ACP
|
|
121
|
+
session binding, exact request attribution, host restart, completed-attempt refusal, an active sibling
|
|
122
|
+
and run cancellation against a local deterministic provider with no paid requests.
|
|
123
|
+
The current reverse exec tunnel retains its child-grant contract; this task-host
|
|
124
|
+
mode is qualified through direct native HTTP transport.
|
|
125
|
+
|
|
76
126
|
## Run a delegated child
|
|
77
127
|
|
|
78
128
|
A host (Cy, an Astrolift task) grants the child, writes its scoped token to a private file and
|
|
@@ -102,6 +152,7 @@ undelegated fallback.
|
|
|
102
152
|
| `hello` | any | protocol and operations |
|
|
103
153
|
| `journal` | any | the full hash-chained history (`manifest`, `events`) |
|
|
104
154
|
| `execution` | account owner | verify `{agentId, project: {root, key}}` against the retained owner grant and return its native workspace binding |
|
|
155
|
+
| `task-execution` | task owner, task endpoint only | verify the account/workspace and return the immutable native start provenance and output cap |
|
|
105
156
|
| `reserve` | owner of `reservation.agentId` | charge before dispatch; same id replays the original admission |
|
|
106
157
|
| `settle` | owner of the reserved request | record usage or an outcome; same settlement replays |
|
|
107
158
|
| `grant` | parent, or a child for its own accounts | allocate child accounts; returns the child's scoped token |
|
|
@@ -169,10 +220,60 @@ Reservation errors optionally report `admission: refused` when the server has
|
|
|
169
220
|
verified non-admission after the local operation ends, or `unknown` otherwise.
|
|
170
221
|
Clients retain capacity when talking to older v1 servers that omit this evidence.
|
|
171
222
|
|
|
223
|
+
## Portable project identity
|
|
224
|
+
|
|
225
|
+
A manifest creator may add `project.portable = {version: 1, roots, origin}` to a
|
|
226
|
+
version 1 manifest. `roots` are the sorted root commits of `HEAD`'s history (1 to
|
|
227
|
+
16), and `origin` is a digest of the normalized `remote.origin.url` (`host/path`,
|
|
228
|
+
without scheme, credentials, port or trailing `.git`; the raw URL is never stored).
|
|
229
|
+
The field is optional and only the creator can set it: it is part of the manifest
|
|
230
|
+
hash, and `ReservationLedger.create` still checks the creator's own mount exactly
|
|
231
|
+
and rejects a declaration that mount does not derive. Library callers opt in with
|
|
232
|
+
`portableProjectIdentity(dir)` from `src/execution/portable-identity.ts`; the CLI
|
|
233
|
+
has no flag because it builds no execution manifests.
|
|
234
|
+
|
|
235
|
+
**The portable identity identifies a repository and authenticates nothing.** Any
|
|
236
|
+
checkout with the same root commits and origin matches, including a fresh clone at
|
|
237
|
+
the creator's path, and anyone who can edit `.git/config` controls the origin it
|
|
238
|
+
reports. Authority still comes from the ledger token and owner, never from this
|
|
239
|
+
value. It is not a replacement for the owner-bound workspace grant, which stays
|
|
240
|
+
exact and cannot carry `portable`.
|
|
241
|
+
|
|
242
|
+
Where it applies:
|
|
243
|
+
|
|
244
|
+
- Local ledger reads, reservations, settlements and `ExecutionGuard` accept a
|
|
245
|
+
matching checkout. Every path grant resolves against the realpath of the local
|
|
246
|
+
`cwd`, never the manifest's recorded root, so a `src/**` grant cannot reach the
|
|
247
|
+
creator's checkout or anything outside the local one.
|
|
248
|
+
- While the portable identity is in use, writes under `.git` are denied, so an
|
|
249
|
+
agent cannot rewrite the origin it is matched on. The guard derives the identity
|
|
250
|
+
once, at construction.
|
|
251
|
+
- A manifest without the field behaves exactly as before. Its hash is unchanged.
|
|
252
|
+
|
|
253
|
+
The identity is unavailable, so the check fails closed with "Execution belongs to a
|
|
254
|
+
different or replaced project.", when any of these hold: not a git project, `cwd`
|
|
255
|
+
is not the repository top level, `.git` is a file (linked worktree or submodule),
|
|
256
|
+
shallow clone, no commits, no `origin`, an `origin` that is a local path or
|
|
257
|
+
`file://` URL, more than 16 root commits, a missing git binary or a git error.
|
|
258
|
+
A project without git keeps the path-and-inode binding.
|
|
259
|
+
|
|
260
|
+
Limits in this release:
|
|
261
|
+
|
|
262
|
+
- Manifests with a `parent` and the remote ledger protocol still compare the exact
|
|
263
|
+
`{root, key}`; a remote parent refuses a second mount until the ledger checks
|
|
264
|
+
accept the portable identity.
|
|
265
|
+
- The `goals/*`, `improvement/*` and `orchestration/*` call sites that read
|
|
266
|
+
`manifest.project.root` literally are not supported from a second mount.
|
|
267
|
+
- Brain locators keyed to the creator's project key are denied on the second mount.
|
|
268
|
+
- Approvals (`describeApproval`) keep their local path-and-inode binding.
|
|
269
|
+
|
|
172
270
|
## Owner-bound remote workspaces
|
|
173
271
|
|
|
174
|
-
|
|
175
|
-
parent grant just because its files look the same.
|
|
272
|
+
By default a copied checkout has a different path and filesystem identity, and
|
|
273
|
+
it cannot use a parent grant just because its files look the same. A manifest
|
|
274
|
+
whose creator opts in to a portable project identity (see the next section) also
|
|
275
|
+
accepts another checkout of the same repository on the local ledger. Without that
|
|
276
|
+
field, the exact path-and-inode check applies. The ledger owner may issue a
|
|
176
277
|
version 2 child grant with `project: {root, key}`, captured using the CLI's
|
|
177
278
|
`projectIdentity()` on the intended child host. The existing proposal hash,
|
|
178
279
|
review revision and native run manifest references remain part of that immutable
|
|
@@ -323,9 +424,83 @@ The executable reports its tested artifact type and invariant results as JSON.
|
|
|
323
424
|
This is a local HTTP host example, not a deployed Astrolift acceptance test.
|
|
324
425
|
Use `delegation-ledger/v1`, reviewed host capability version 1 and the headless
|
|
325
426
|
capability tuple above; a matching package version alone is insufficient.
|
|
326
|
-
The
|
|
427
|
+
The account-only CLI entry point requests a 4096-token output limit, so the reviewed
|
|
327
428
|
host and discovered model must both permit that bound. Lower output caps are
|
|
328
429
|
available to library callers through `DelegatedExecutionOptions.maxOutputTokens`.
|
|
329
430
|
The existing ledger, workspace and session suites cover nested grants, lost
|
|
330
431
|
acknowledgments, rollback and approval/session replay; those are separate from
|
|
331
432
|
this example's process-level assertions.
|
|
433
|
+
|
|
434
|
+
### Native reviewed runs funded by a remote parent
|
|
435
|
+
|
|
436
|
+
The source API also accepts `RunActionOptions.parentBudget` version 2 when first
|
|
437
|
+
preparing a native run. This is distinct from attaching an ACP session: the child
|
|
438
|
+
still executes its own reviewed plan through `executeReviewedRun`, including
|
|
439
|
+
native task outcomes, questions, verification and supervision.
|
|
440
|
+
|
|
441
|
+
The link contains `url`, an absolute private `tokenFile`, an absolute private
|
|
442
|
+
`checkpointRoot`, `runId`, `budgetManifestHash`, `agentId`, `accountMap`, and the
|
|
443
|
+
owner's `reviewedContext`. Obtain that context from `prepareReviewedLedger`; it
|
|
444
|
+
binds the owner run manifest, approval revision, endpoint authority and bounded
|
|
445
|
+
run ancestry. The token and checkpoint must remain outside the worker workspace.
|
|
446
|
+
Never derive these fields from task text or model preferences.
|
|
447
|
+
|
|
448
|
+
Before preparing the child, the parent must admit the external workspace and its
|
|
449
|
+
accounts through native reviewed child admission. `accountMap` maps every child
|
|
450
|
+
account to a distinct, already admitted parent account. Parent relationships,
|
|
451
|
+
workspace, scopes, absolute deadlines and allowances must agree. A later child
|
|
452
|
+
grant also needs matching parent admissions; an embedded host cannot create an
|
|
453
|
+
independent root allowance by starting another coordinator. Reopening an existing
|
|
454
|
+
child preserves its original parent link.
|
|
455
|
+
|
|
456
|
+
`remoteParentBudgetCapabilities()` describes link version 2, execution manifest
|
|
457
|
+
version 2, execution event version 13 and reservation event version 6. The parent
|
|
458
|
+
must advertise `task-admit` and `task-release` alongside its reviewed ledger
|
|
459
|
+
context. Task-bound worker endpoints do not advertise these operations. Older
|
|
460
|
+
runtimes must reject unsupported records or capabilities instead of falling back
|
|
461
|
+
to unlinked execution.
|
|
462
|
+
|
|
463
|
+
Before a worker, controller or reviewer runs, the native child acquires a parent
|
|
464
|
+
execution slot bound to its run, manifest, start event, session, task/attempt or
|
|
465
|
+
review role/round. The parent's execution journal serializes these slots with
|
|
466
|
+
local workers and supervision. Nested funding propagates the same work identity
|
|
467
|
+
to every ancestor. Requests carry the admitted identity, while reservation and
|
|
468
|
+
settlement still use the existing parent-first budget chain.
|
|
469
|
+
|
|
470
|
+
Disconnection, a lost acknowledgement or elapsed time does not release a slot.
|
|
471
|
+
Replay the identical admission to recover its outcome. Once work has stopped,
|
|
472
|
+
release that exact admission; release is idempotent and propagates through the
|
|
473
|
+
funding chain. A restarted owner retains active slots. An unresolved dead worker
|
|
474
|
+
therefore needs authoritative reconciliation; starting another run or deleting a
|
|
475
|
+
checkpoint is not recovery. Cancellation blocks new work while recorded usage
|
|
476
|
+
can still settle. Expired or revoked credentials cannot be reused for recovery.
|
|
477
|
+
|
|
478
|
+
The source regression examples are `tests/remote-parent-budget.test.ts`,
|
|
479
|
+
`tests/remote-task-capacity.test.ts` and `tests/remote-parent-process.test.ts`.
|
|
480
|
+
The process suite compiles the current source into an isolated package and runs
|
|
481
|
+
separate native coordinators through real HTTP, including mixed local/remote
|
|
482
|
+
funding, owner restart, cancellation, worker death and retained-charge exhaustion. They exercise actual native coordinators,
|
|
483
|
+
HTTP ledgers and deterministic inference without paid provider requests. These
|
|
484
|
+
source checks do not establish published-release compatibility or disposable
|
|
485
|
+
Astrolift deployment acceptance.
|
|
486
|
+
|
|
487
|
+
Run the remote-parent process qualification with:
|
|
488
|
+
|
|
489
|
+
```sh
|
|
490
|
+
npx vitest run tests/remote-parent-process.test.ts --maxWorkers=1
|
|
491
|
+
```
|
|
492
|
+
|
|
493
|
+
It uses the normal `run resume` command in separate Node CLI processes. To run
|
|
494
|
+
those same scenarios against a standalone binary built from this source:
|
|
495
|
+
|
|
496
|
+
```sh
|
|
497
|
+
npm run build
|
|
498
|
+
bun packaging/build-binary.mjs --native
|
|
499
|
+
CALLIOPE_REMOTE_PARENT_BINARY="$PWD/packaging/dist/calliope-native" \
|
|
500
|
+
npx vitest run tests/remote-parent-process.test.ts --maxWorkers=1
|
|
501
|
+
```
|
|
502
|
+
|
|
503
|
+
Both modes use disposable configuration, real HTTP and deterministic local
|
|
504
|
+
inference. The worker-death case leaves its parent slot and charge unresolved;
|
|
505
|
+
the exhaustion case releases only the verified dead process's slot and proves
|
|
506
|
+
that its unknown provider charge still prevents another inference request.
|
|
@@ -50,6 +50,11 @@ external feedback or reinforcement-learning interface.
|
|
|
50
50
|
|
|
51
51
|
## Host review requests
|
|
52
52
|
|
|
53
|
+
Explicit host contract version 2 additionally exposes the
|
|
54
|
+
[reviewed task feedback](task-feedback.md) record/inspect/history API. Version 1
|
|
55
|
+
discovery remains unchanged. Feedback receipts do not award rewards or enable
|
|
56
|
+
cross-run learning.
|
|
57
|
+
|
|
53
58
|
The separately negotiated `improvementReviewCapabilities()` API (version 1,
|
|
54
59
|
`improvement.review-capabilities`) advertises `requestImprovementReview`,
|
|
55
60
|
`inspectImprovementReviews` and `dismissImprovementReview`. It is request-only;
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Calliope CLI 3.8.0
|
|
2
|
+
|
|
3
|
+
This release adds explicit subscription access, native task-bound delegation and
|
|
4
|
+
reviewed feedback. It also tightens reviewed inference authority and reads
|
|
5
|
+
Mimwell portable knowledge graphs.
|
|
6
|
+
|
|
7
|
+
## Experimental subscription access
|
|
8
|
+
|
|
9
|
+
`calliope auth chatgpt login` selects ChatGPT-plan access for the OpenAI provider.
|
|
10
|
+
Account selection, private credential storage, refresh/revocation and live model
|
|
11
|
+
discovery are separate from API-key access. Streamed Responses and tool calls use
|
|
12
|
+
Calliope's existing permission loop. Expired sessions stop; quota exhaustion can
|
|
13
|
+
use an explicitly configured paid API-key fallback. Subscription requests refuse output-token
|
|
14
|
+
and USD enforcement that the service cannot provide; USD totals exclude this
|
|
15
|
+
consumption. See [ChatGPT plan access](../chatgpt-plan.md).
|
|
16
|
+
|
|
17
|
+
Quota and rate-limit circuits persist across processes. Opt-in API-key fallback
|
|
18
|
+
reserves every paid request against a shared project ceiling, preserves public
|
|
19
|
+
conversation/tool context and strips encrypted subscription state. Paid sessions
|
|
20
|
+
stay on their selected model; partial output, cancellation, logout and reviewed
|
|
21
|
+
execution stop automatic transitions. A depleted API account stops without
|
|
22
|
+
retrying or switching back. Missing live/reviewed billing bounds refuse payment.
|
|
23
|
+
|
|
24
|
+
`calliope claude -- <prompt>` delegates a complete session to the installed,
|
|
25
|
+
authenticated official Claude Code CLI. `calliope claude status` checks that local
|
|
26
|
+
setup. Claude owns permissions, tools, sessions and plan usage; Calliope's native
|
|
27
|
+
sandbox and budgets do not govern the delegated session. See
|
|
28
|
+
[local Claude plan delegation](../claude-plan.md).
|
|
29
|
+
|
|
30
|
+
These integrations ship as opt-in experimental features. Tests use synthetic
|
|
31
|
+
authentication and response fixtures; live account eligibility and subscription
|
|
32
|
+
prompt/tool round trips remain unqualified. Complete the user-operated checks in
|
|
33
|
+
the linked guides before relying on either route for unattended work.
|
|
34
|
+
|
|
35
|
+
## Reviewed task authority and feedback
|
|
36
|
+
|
|
37
|
+
Delegated headless and ACP execution can bind to an exact native task attempt,
|
|
38
|
+
including its owner, output cap and original accounting across host restarts.
|
|
39
|
+
Completed or mismatched attempts refuse new inference. Reviewed Smart routing
|
|
40
|
+
pools and provider endpoints now constrain new reservations; an endpoint change
|
|
41
|
+
requires new review, while prior admissions retain replay and settlement.
|
|
42
|
+
See [delegation ledger](../delegation-ledger.md).
|
|
43
|
+
|
|
44
|
+
Version-2 improvement host discovery exposes reviewed task feedback. Receipts bind
|
|
45
|
+
an assessment to the exact observed completed attempt and retain private journal
|
|
46
|
+
evidence. They neither mark a task accepted nor activate a learned policy. See
|
|
47
|
+
[task feedback](../task-feedback.md). External placement and disposable remote
|
|
48
|
+
parent/child acceptance remain tracked in #415; cross-run learned strategy
|
|
49
|
+
selection remains tracked in #413.
|
|
50
|
+
|
|
51
|
+
## Compatibility and runtime
|
|
52
|
+
|
|
53
|
+
- `brain import` accepts `mimwell-kg/v1` alongside existing graph formats; exports
|
|
54
|
+
continue using `calliope-kg/v1`.
|
|
55
|
+
- OpenAI SDK 7 stream capture handling now recognizes delivered completion events.
|
|
56
|
+
Runtime SDKs, Conf, Ink and supporting dependencies are updated; container builds
|
|
57
|
+
include the metadata builder.
|
|
58
|
+
- Node 24 or later is required. The stable ACP wire protocol remains version 1.
|
|
59
|
+
- Mistral/Hugging Face SDK 7 live qualification follow-up remains in #457; xAI is
|
|
60
|
+
explicitly deferred by the existing publication gate.
|
|
61
|
+
|
|
62
|
+
Performance budgets from #210 remain enforced for cold start, keystroke rendering
|
|
63
|
+
and retained-session heap growth. See [performance measurements](../performance.md).
|
|
64
|
+
|
|
65
|
+
Refs: #474, #467, #468, #415, #455, #463, #457.
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# Calliope CLI 3.8.1
|
|
2
|
+
|
|
3
|
+
This patch makes generic headless reasoning effort explicit and distinguishes
|
|
4
|
+
missing provider usage from reported zero in the execution journal.
|
|
5
|
+
|
|
6
|
+
## Headless reasoning effort
|
|
7
|
+
|
|
8
|
+
Use `--reasoning-effort medium` or `CALLIOPE_REASONING_EFFORT=medium` for headless
|
|
9
|
+
execution. The flag overrides the environment default. Missing, invalid and
|
|
10
|
+
duplicate flag values exit 2. The shared runtime retains the selected effort
|
|
11
|
+
through model requests and tool continuations; existing live provider/model
|
|
12
|
+
capability and protocol checks refuse unsupported effort rather than silently
|
|
13
|
+
using a default. Calls without an effort keep their previous behavior.
|
|
14
|
+
|
|
15
|
+
Node and native artifact smoke tests exercise the actual SDK request against a
|
|
16
|
+
synthetic local Anthropic transport, including a real file-tool turn. They verify
|
|
17
|
+
effort forwarding and refusal before model dispatch when metadata does not
|
|
18
|
+
confirm support. This is packaging/transport qualification, not evidence of live
|
|
19
|
+
account eligibility or a completed paid factory run.
|
|
20
|
+
|
|
21
|
+
## Usage presence
|
|
22
|
+
|
|
23
|
+
Assistant journal events now include optional `usageReported`. `false` means the
|
|
24
|
+
provider omitted usage even if legacy numeric counters are zero; `true` preserves
|
|
25
|
+
a genuinely reported zero. Consumers must retain unknown telemetry as unknown
|
|
26
|
+
and keep subscription consumption separate from API estimates and actual charges.
|
|
27
|
+
Older journals without the field remain readable.
|
|
28
|
+
|
|
29
|
+
## Remote admission deadlines
|
|
30
|
+
|
|
31
|
+
A remote task admission that expires in transport now returns the typed deadline
|
|
32
|
+
refusal, matching a deadline reached before dispatch. Authorization and parent
|
|
33
|
+
budget bounds still apply first; an expired request allocates no execution slot
|
|
34
|
+
or budget charge. A deterministic HTTP regression covers this boundary.
|
|
35
|
+
|
|
36
|
+
Node 24 or later remains required. Experimental subscription integrations retain
|
|
37
|
+
their existing limitations; this patch does not qualify a remote subscription
|
|
38
|
+
factory route or provision accounts, mailboxes, credentials or grants.
|
|
39
|
+
|
|
40
|
+
Refs: #502, #503, #505, #507.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# Reviewed metadata for bounded provider calls
|
|
2
|
+
|
|
3
|
+
Some providers discover model IDs without publishing capabilities, limits or
|
|
4
|
+
prices through their models API. An operator can supply the missing evidence for
|
|
5
|
+
bounded execution in a private billing file. This does not enable Smart routing,
|
|
6
|
+
change a provider/model pin, or add models to discovery. The selected model and
|
|
7
|
+
endpoint must still match recent live discovery.
|
|
8
|
+
|
|
9
|
+
Use `~/.calliope-cli/billing.json` or `CALLIOPE_BILLING_FILE`, outside the worker
|
|
10
|
+
project. Protect it with `chmod 600`. The existing reader rejects aliases,
|
|
11
|
+
symlinks, hardlinks, group/world write access, files over 128 KiB and more than
|
|
12
|
+
64 profiles. Profiles are operator authority; workers must never generate or
|
|
13
|
+
install them from their outputs.
|
|
14
|
+
|
|
15
|
+
```json
|
|
16
|
+
{
|
|
17
|
+
"version": 2,
|
|
18
|
+
"profiles": [{
|
|
19
|
+
"version": 2,
|
|
20
|
+
"provider": "deepseek",
|
|
21
|
+
"model": "<exact live-discovered model ID>",
|
|
22
|
+
"target": "<configured providerTarget(provider).key digest>",
|
|
23
|
+
"checkedAt": 0,
|
|
24
|
+
"expiresAt": 0,
|
|
25
|
+
"sources": ["https://api-docs.deepseek.com/quick_start/pricing/"],
|
|
26
|
+
"prices": {"input": 0, "output": 0},
|
|
27
|
+
"capabilities": {"chat": true, "tools": true, "streaming": true},
|
|
28
|
+
"limits": {"contextLength": 0, "maxOutputTokens": 0},
|
|
29
|
+
"admission": "reviewed-full-context-v1"
|
|
30
|
+
}]
|
|
31
|
+
}
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
The placeholders are intentionally invalid. Set positive token limits from
|
|
35
|
+
current provider documentation and epoch-millisecond timestamps, with expiry at
|
|
36
|
+
most seven days after review. Review the exact endpoint's billing terms: a
|
|
37
|
+
gateway may charge differently from its upstream provider. Prices are USD per
|
|
38
|
+
million tokens and must upper-bound applicable cache, reasoning and time/tier
|
|
39
|
+
rates on the adapter path. URL presence alone does not verify metadata. Include
|
|
40
|
+
no keys, private prompts or response content; source URLs must be HTTPS without
|
|
41
|
+
credentials, queries or fragments. Every configured provider can use this schema;
|
|
42
|
+
the CLI bundles no model or pricing catalogue.
|
|
43
|
+
|
|
44
|
+
## Conservative admission
|
|
45
|
+
|
|
46
|
+
Each request reserves the larger of reviewed and live input capacity, plus its
|
|
47
|
+
requested maximum output. This is a full-capacity allowance, not a tokenizer
|
|
48
|
+
estimate or consumed tokens. A tiny prompt to a large-context model may therefore
|
|
49
|
+
need substantial token headroom before dispatch; do not reduce the reviewed
|
|
50
|
+
capacity to make a budget fit. Successful usage reporting settles the reservation
|
|
51
|
+
to reported usage at the reserved rates. Failures, cancellation and missing usage
|
|
52
|
+
retain the reservation, and overruns stop subsequent requests.
|
|
53
|
+
|
|
54
|
+
The output maximum is the smaller of the reviewed and live limits. Prices use
|
|
55
|
+
the larger rate for each input/output direction. Reviewed capabilities fill only
|
|
56
|
+
unknown live fields; a live rejection always vetoes the request. Unknown required
|
|
57
|
+
capabilities in both sources fail closed. Live routing metadata remains unchanged,
|
|
58
|
+
including unknown prices used by Smart ranking. This profile does not request
|
|
59
|
+
Anthropic token counting, accept supplied input counts or admit multimodal input.
|
|
60
|
+
|
|
61
|
+
The provider/model/endpoint binding, original run/agent/project budgets, policy,
|
|
62
|
+
deadlines and cancellation checks still apply. The profile is re-read before
|
|
63
|
+
reservation and before dispatch; deletion, edits or expiry revoke admission.
|
|
64
|
+
Revocation after a durable reservation retains that reservation conservatively.
|
|
65
|
+
No automatic paid probe or retry can replenish the original allowance.
|
|
66
|
+
|
|
67
|
+
## Versioning and recovery
|
|
68
|
+
|
|
69
|
+
Version-2 billing files can contain these profiles together with unchanged
|
|
70
|
+
[legacy counted profiles](counted-admission.md). Version-1 files retain their
|
|
71
|
+
original format and hashes; no file or historical journal is migrated.
|
|
72
|
+
|
|
73
|
+
New quotes carry `quoteEvidence.version = 2`, including the reviewed profile and
|
|
74
|
+
digest, quote time, live observations and required capabilities. Execution
|
|
75
|
+
reservations carrying that proof use reservation event version 4, also supporting
|
|
76
|
+
existing request attribution. Replay reconstructs the conservative bounds from
|
|
77
|
+
the recorded proof and rejects inconsistent prices, limits or event versions.
|
|
78
|
+
Historical replay checks validity at quote time, without fetching metadata or
|
|
79
|
+
requiring a now-expired profile to be renewed.
|
|
80
|
+
|
|
81
|
+
Ordinary project-capped turns include the same proof in their existing hash-linked
|
|
82
|
+
policy audit event. Execution journals retain it with the reservation. Neither
|
|
83
|
+
contains prompt bytes, tool arguments or credentials. The outer headless JSON
|
|
84
|
+
envelope and existing ledger projections retain their versions.
|