@calliopelabs/cli 3.5.3 → 3.6.0
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 +8 -0
- package/dist/acp.d.ts +10 -3
- package/dist/acp.d.ts.map +1 -1
- package/dist/acp.js +27 -7
- package/dist/acp.js.map +1 -1
- package/dist/bin.d.ts.map +1 -1
- package/dist/bin.js +28 -11
- package/dist/bin.js.map +1 -1
- package/dist/brain/access.d.ts.map +1 -1
- package/dist/brain/access.js +2 -1
- package/dist/brain/access.js.map +1 -1
- package/dist/config.d.ts +2 -2
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +7 -6
- package/dist/config.js.map +1 -1
- package/dist/execution/authority.d.ts +4 -1
- package/dist/execution/authority.d.ts.map +1 -1
- package/dist/execution/authority.js +23 -7
- package/dist/execution/authority.js.map +1 -1
- package/dist/execution/child-grants.d.ts +2 -0
- package/dist/execution/child-grants.d.ts.map +1 -1
- package/dist/execution/child-grants.js +19 -4
- package/dist/execution/child-grants.js.map +1 -1
- package/dist/execution/delegated.d.ts +14 -0
- package/dist/execution/delegated.d.ts.map +1 -0
- package/dist/execution/delegated.js +66 -0
- package/dist/execution/delegated.js.map +1 -0
- package/dist/execution/files.js +6 -6
- package/dist/execution/files.js.map +1 -1
- package/dist/execution/guard.d.ts +5 -0
- package/dist/execution/guard.d.ts.map +1 -1
- package/dist/execution/guard.js +31 -16
- package/dist/execution/guard.js.map +1 -1
- package/dist/execution/index.d.ts +4 -0
- package/dist/execution/index.d.ts.map +1 -1
- package/dist/execution/index.js +4 -0
- package/dist/execution/index.js.map +1 -1
- package/dist/execution/ledger-cli.d.ts +2 -1
- package/dist/execution/ledger-cli.d.ts.map +1 -1
- package/dist/execution/ledger-cli.js +51 -14
- package/dist/execution/ledger-cli.js.map +1 -1
- package/dist/execution/ledger-protocol.d.ts +6 -2
- package/dist/execution/ledger-protocol.d.ts.map +1 -1
- package/dist/execution/ledger-protocol.js +110 -24
- package/dist/execution/ledger-protocol.js.map +1 -1
- package/dist/execution/ledger-server.d.ts +13 -0
- package/dist/execution/ledger-server.d.ts.map +1 -1
- package/dist/execution/ledger-server.js +57 -13
- package/dist/execution/ledger-server.js.map +1 -1
- package/dist/execution/ledger-tunnel.d.ts +50 -0
- package/dist/execution/ledger-tunnel.d.ts.map +1 -0
- package/dist/execution/ledger-tunnel.js +307 -0
- package/dist/execution/ledger-tunnel.js.map +1 -0
- package/dist/execution/ledger.d.ts +4 -0
- package/dist/execution/ledger.d.ts.map +1 -1
- package/dist/execution/ledger.js +30 -4
- package/dist/execution/ledger.js.map +1 -1
- package/dist/execution/parent-accounting.d.ts +41 -0
- package/dist/execution/parent-accounting.d.ts.map +1 -0
- package/dist/execution/parent-accounting.js +52 -0
- package/dist/execution/parent-accounting.js.map +1 -0
- package/dist/execution/parent-budget.d.ts +25 -0
- package/dist/execution/parent-budget.d.ts.map +1 -0
- package/dist/execution/parent-budget.js +102 -0
- package/dist/execution/parent-budget.js.map +1 -0
- package/dist/execution/project-spend.d.ts.map +1 -1
- package/dist/execution/project-spend.js +35 -5
- package/dist/execution/project-spend.js.map +1 -1
- package/dist/execution/quote.js +1 -1
- package/dist/execution/quote.js.map +1 -1
- package/dist/execution/remote-checkpoint.d.ts +15 -0
- package/dist/execution/remote-checkpoint.d.ts.map +1 -0
- package/dist/execution/remote-checkpoint.js +165 -0
- package/dist/execution/remote-checkpoint.js.map +1 -0
- package/dist/execution/remote-ledger.d.ts +12 -2
- package/dist/execution/remote-ledger.d.ts.map +1 -1
- package/dist/execution/remote-ledger.js +53 -21
- package/dist/execution/remote-ledger.js.map +1 -1
- package/dist/execution/types.d.ts +23 -5
- package/dist/execution/types.d.ts.map +1 -1
- package/dist/execution/types.js.map +1 -1
- package/dist/goals/supervised.js +2 -2
- package/dist/goals/supervised.js.map +1 -1
- package/dist/headless.d.ts +2 -6
- package/dist/headless.d.ts.map +1 -1
- package/dist/headless.js +17 -21
- package/dist/headless.js.map +1 -1
- package/dist/health/target.js +1 -1
- package/dist/health/target.js.map +1 -1
- package/dist/improvement/actions.d.ts +3 -4
- package/dist/improvement/actions.d.ts.map +1 -1
- package/dist/improvement/actions.js +10 -7
- package/dist/improvement/actions.js.map +1 -1
- package/dist/improvement/capabilities.d.ts +54 -0
- package/dist/improvement/capabilities.d.ts.map +1 -0
- package/dist/improvement/capabilities.js +44 -0
- package/dist/improvement/capabilities.js.map +1 -0
- package/dist/improvement/cli.d.ts +1 -1
- package/dist/improvement/cli.d.ts.map +1 -1
- package/dist/improvement/cli.js +14 -2
- package/dist/improvement/cli.js.map +1 -1
- package/dist/improvement/index.d.ts +5 -0
- package/dist/improvement/index.d.ts.map +1 -1
- package/dist/improvement/index.js +5 -0
- package/dist/improvement/index.js.map +1 -1
- package/dist/improvement/proposal-hash.d.ts +3 -0
- package/dist/improvement/proposal-hash.d.ts.map +1 -0
- package/dist/improvement/proposal-hash.js +5 -0
- package/dist/improvement/proposal-hash.js.map +1 -0
- package/dist/improvement/review-contract.d.ts +32 -0
- package/dist/improvement/review-contract.d.ts.map +1 -0
- package/dist/improvement/review-contract.js +62 -0
- package/dist/improvement/review-contract.js.map +1 -0
- package/dist/improvement/review-requests.d.ts +72 -0
- package/dist/improvement/review-requests.d.ts.map +1 -0
- package/dist/improvement/review-requests.js +63 -0
- package/dist/improvement/review-requests.js.map +1 -0
- package/dist/improvement/source-changes.d.ts +78 -0
- package/dist/improvement/source-changes.d.ts.map +1 -0
- package/dist/improvement/source-changes.js +91 -0
- package/dist/improvement/source-changes.js.map +1 -0
- package/dist/improvement/task-outcomes.d.ts +82 -0
- package/dist/improvement/task-outcomes.d.ts.map +1 -0
- package/dist/improvement/task-outcomes.js +72 -0
- package/dist/improvement/task-outcomes.js.map +1 -0
- package/dist/index.d.ts +10 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -0
- package/dist/index.js.map +1 -1
- package/dist/isolation/contracts.d.ts +13 -0
- package/dist/isolation/contracts.d.ts.map +1 -1
- package/dist/isolation/contracts.js +9 -1
- package/dist/isolation/contracts.js.map +1 -1
- package/dist/isolation/coordinator.d.ts.map +1 -1
- package/dist/isolation/coordinator.js +4 -0
- package/dist/isolation/coordinator.js.map +1 -1
- package/dist/isolation/process.d.ts.map +1 -1
- package/dist/isolation/process.js +3 -1
- package/dist/isolation/process.js.map +1 -1
- package/dist/isolation/worktree.d.ts +9 -1
- package/dist/isolation/worktree.d.ts.map +1 -1
- package/dist/isolation/worktree.js +8 -3
- package/dist/isolation/worktree.js.map +1 -1
- package/dist/local-model.d.ts +4 -4
- package/dist/local-model.js +5 -5
- package/dist/local-model.js.map +1 -1
- package/dist/memory.d.ts +5 -3
- package/dist/memory.d.ts.map +1 -1
- package/dist/memory.js +8 -6
- package/dist/memory.js.map +1 -1
- package/dist/migration/assessment-contract.d.ts +60 -0
- package/dist/migration/assessment-contract.d.ts.map +1 -0
- package/dist/migration/assessment-contract.js +132 -0
- package/dist/migration/assessment-contract.js.map +1 -0
- package/dist/migration/assessment-schema.d.ts +19 -0
- package/dist/migration/assessment-schema.d.ts.map +1 -0
- package/dist/migration/assessment-schema.js +43 -0
- package/dist/migration/assessment-schema.js.map +1 -0
- package/dist/migration/assessment.d.ts +159 -0
- package/dist/migration/assessment.d.ts.map +1 -0
- package/dist/migration/assessment.js +219 -0
- package/dist/migration/assessment.js.map +1 -0
- package/dist/migration/cli.d.ts +6 -0
- package/dist/migration/cli.d.ts.map +1 -0
- package/dist/migration/cli.js +101 -0
- package/dist/migration/cli.js.map +1 -0
- package/dist/migration/evidence.d.ts +27 -0
- package/dist/migration/evidence.d.ts.map +1 -0
- package/dist/migration/evidence.js +124 -0
- package/dist/migration/evidence.js.map +1 -0
- package/dist/migration/example.d.ts +33 -0
- package/dist/migration/example.d.ts.map +1 -0
- package/dist/migration/example.js +28 -0
- package/dist/migration/example.js.map +1 -0
- package/dist/migration/index.d.ts +21 -0
- package/dist/migration/index.d.ts.map +1 -0
- package/dist/migration/index.js +15 -0
- package/dist/migration/index.js.map +1 -0
- package/dist/migration/inventory.d.ts +70 -0
- package/dist/migration/inventory.d.ts.map +1 -0
- package/dist/migration/inventory.js +233 -0
- package/dist/migration/inventory.js.map +1 -0
- package/dist/migration/schema.d.ts +61 -0
- package/dist/migration/schema.d.ts.map +1 -0
- package/dist/migration/schema.js +76 -0
- package/dist/migration/schema.js.map +1 -0
- package/dist/migration/verification.d.ts +146 -0
- package/dist/migration/verification.d.ts.map +1 -0
- package/dist/migration/verification.js +260 -0
- package/dist/migration/verification.js.map +1 -0
- package/dist/model-detection.d.ts.map +1 -1
- package/dist/model-detection.js +2 -39
- package/dist/model-detection.js.map +1 -1
- package/dist/orchestration/actions.d.ts +2 -0
- package/dist/orchestration/actions.d.ts.map +1 -1
- package/dist/orchestration/actions.js.map +1 -1
- package/dist/orchestration/artifact-host.d.ts +46 -0
- package/dist/orchestration/artifact-host.d.ts.map +1 -0
- package/dist/orchestration/artifact-host.js +64 -0
- package/dist/orchestration/artifact-host.js.map +1 -0
- package/dist/orchestration/coordinator-actions.d.ts +1 -1
- package/dist/orchestration/coordinator-actions.d.ts.map +1 -1
- package/dist/orchestration/coordinator-actions.js +5 -3
- package/dist/orchestration/coordinator-actions.js.map +1 -1
- package/dist/orchestration/coordinator-types.d.ts +23 -2
- package/dist/orchestration/coordinator-types.d.ts.map +1 -1
- package/dist/orchestration/coordinator.d.ts +5 -0
- package/dist/orchestration/coordinator.d.ts.map +1 -1
- package/dist/orchestration/coordinator.js +30 -13
- package/dist/orchestration/coordinator.js.map +1 -1
- package/dist/orchestration/execution-cli.d.ts +1 -1
- package/dist/orchestration/execution-cli.d.ts.map +1 -1
- package/dist/orchestration/execution-cli.js +29 -6
- package/dist/orchestration/execution-cli.js.map +1 -1
- package/dist/orchestration/execution-journal.d.ts.map +1 -1
- package/dist/orchestration/execution-journal.js +79 -6
- package/dist/orchestration/execution-journal.js.map +1 -1
- package/dist/orchestration/execution-store.d.ts +5 -1
- package/dist/orchestration/execution-store.d.ts.map +1 -1
- package/dist/orchestration/execution-store.js +66 -5
- package/dist/orchestration/execution-store.js.map +1 -1
- package/dist/orchestration/execution.d.ts.map +1 -1
- package/dist/orchestration/execution.js +37 -10
- package/dist/orchestration/execution.js.map +1 -1
- package/dist/orchestration/index.d.ts +6 -0
- package/dist/orchestration/index.d.ts.map +1 -1
- package/dist/orchestration/index.js +6 -0
- package/dist/orchestration/index.js.map +1 -1
- package/dist/orchestration/interruption.d.ts +10 -0
- package/dist/orchestration/interruption.d.ts.map +1 -0
- package/dist/orchestration/interruption.js +38 -0
- package/dist/orchestration/interruption.js.map +1 -0
- package/dist/orchestration/question-contract.d.ts +19 -0
- package/dist/orchestration/question-contract.d.ts.map +1 -0
- package/dist/orchestration/question-contract.js +21 -0
- package/dist/orchestration/question-contract.js.map +1 -0
- package/dist/orchestration/questions.d.ts +9 -0
- package/dist/orchestration/questions.d.ts.map +1 -0
- package/dist/orchestration/questions.js +75 -0
- package/dist/orchestration/questions.js.map +1 -0
- package/dist/orchestration/reviewed-ledger.d.ts +23 -0
- package/dist/orchestration/reviewed-ledger.d.ts.map +1 -0
- package/dist/orchestration/reviewed-ledger.js +49 -0
- package/dist/orchestration/reviewed-ledger.js.map +1 -0
- package/dist/orchestration/source-candidates.d.ts +64 -0
- package/dist/orchestration/source-candidates.d.ts.map +1 -0
- package/dist/orchestration/source-candidates.js +95 -0
- package/dist/orchestration/source-candidates.js.map +1 -0
- package/dist/orchestration/validation.js +1 -1
- package/dist/orchestration/validation.js.map +1 -1
- package/dist/providers/compat.d.ts +1 -1
- package/dist/providers/compat.d.ts.map +1 -1
- package/dist/providers/compat.js +4 -8
- package/dist/providers/compat.js.map +1 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js +6 -7
- package/dist/providers/index.js.map +1 -1
- package/dist/runlog.js +2 -2
- package/dist/runlog.js.map +1 -1
- package/dist/runtime/permissions.d.ts.map +1 -1
- package/dist/runtime/permissions.js +3 -2
- package/dist/runtime/permissions.js.map +1 -1
- package/dist/runtime/turn.d.ts +2 -0
- package/dist/runtime/turn.d.ts.map +1 -1
- package/dist/runtime/turn.js +21 -7
- package/dist/runtime/turn.js.map +1 -1
- package/dist/session-management/actions.js +1 -1
- package/dist/session-management/actions.js.map +1 -1
- package/dist/sessions/execution-binding.d.ts +8 -0
- package/dist/sessions/execution-binding.d.ts.map +1 -0
- package/dist/sessions/execution-binding.js +9 -0
- package/dist/sessions/execution-binding.js.map +1 -0
- package/dist/sessions/index.d.ts +1 -0
- package/dist/sessions/index.d.ts.map +1 -1
- package/dist/sessions/index.js +1 -0
- package/dist/sessions/index.js.map +1 -1
- package/dist/setup.d.ts.map +1 -1
- package/dist/setup.js +1 -26
- package/dist/setup.js.map +1 -1
- package/dist/source-changes/writer.d.ts +77 -0
- package/dist/source-changes/writer.d.ts.map +1 -0
- package/dist/source-changes/writer.js +189 -0
- package/dist/source-changes/writer.js.map +1 -0
- package/dist/spawning/actions.d.ts +10 -1
- package/dist/spawning/actions.d.ts.map +1 -1
- package/dist/spawning/actions.js +26 -7
- package/dist/spawning/actions.js.map +1 -1
- package/dist/spawning/cli.js +1 -1
- package/dist/spawning/cli.js.map +1 -1
- package/dist/spawning/execution.d.ts.map +1 -1
- package/dist/spawning/execution.js +2 -0
- package/dist/spawning/execution.js.map +1 -1
- package/dist/spawning/types.d.ts +19 -6
- package/dist/spawning/types.d.ts.map +1 -1
- package/dist/spawning/validation.d.ts +16 -0
- package/dist/spawning/validation.d.ts.map +1 -1
- package/dist/spawning/validation.js +44 -8
- package/dist/spawning/validation.js.map +1 -1
- package/dist/storage.d.ts +3 -0
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +6 -1
- package/dist/storage.js.map +1 -1
- package/dist/supervision/contracts.js +4 -1
- package/dist/supervision/contracts.js.map +1 -1
- package/dist/tools.d.ts +1 -0
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +7 -2
- package/dist/tools.js.map +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js +0 -1
- package/dist/types.js.map +1 -1
- package/dist/ui/regions/modal-host.d.ts.map +1 -1
- package/dist/ui/regions/modal-host.js +1 -3
- package/dist/ui/regions/modal-host.js.map +1 -1
- package/dist/ui/state/use-chat-controller.js +2 -2
- package/dist/ui/state/use-chat-controller.js.map +1 -1
- package/docs/README.md +66 -0
- package/docs/delegation-ledger.md +329 -0
- package/docs/migration-assessment.md +113 -0
- package/docs/migration-example-plan.json +88 -0
- package/docs/migration-example-report.json +511 -0
- package/docs/migration-inventory.md +63 -0
- package/docs/migration-playbook.md +152 -0
- package/docs/migration-verification.md +177 -0
- package/docs/releases/3.6.0.md +43 -0
- package/package.json +7 -2
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
# Code migration playbook v1
|
|
2
|
+
|
|
3
|
+
This Calliope-owned playbook pairs the `migration-v1` CLI helpers with the native
|
|
4
|
+
reviewed execution and improvement contracts. It is packaged with the npm CLI.
|
|
5
|
+
It supports one initial adapter: self-contained JavaScript `.mjs` to TypeScript
|
|
6
|
+
`.mts` command-line programs on an exact Node 24 Linux image. Other language,
|
|
7
|
+
framework and API migrations require another qualified adapter.
|
|
8
|
+
|
|
9
|
+
## Establish the contract
|
|
10
|
+
|
|
11
|
+
Select the source repository, full commit, literal read paths, target runtime,
|
|
12
|
+
allowed worker tools and paths, total budget, deadline and concurrency. Preserve
|
|
13
|
+
original tests, build configuration and lockfiles. Inventory only reads committed
|
|
14
|
+
objects; an uncommitted checkout is not evidence for the pinned source.
|
|
15
|
+
|
|
16
|
+
```sh
|
|
17
|
+
calliope migration capabilities --json
|
|
18
|
+
calliope migration schema --json
|
|
19
|
+
calliope migration inventory --repository REPOSITORY --revision FULL_COMMIT --json
|
|
20
|
+
calliope migration example --json
|
|
21
|
+
calliope migration baseline-schema --json
|
|
22
|
+
calliope migration verification-schema --json
|
|
23
|
+
calliope migration assessment-schema --json
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
The example supplies source, candidate, known-regression and rulebook templates,
|
|
27
|
+
plus positive, empty, negative-value and invalid-input cases. Save them only in an
|
|
28
|
+
authorized disposable repository and commit them before creating pins. Resolve
|
|
29
|
+
each pin to its full commit, relative path and blob ID. Replace the runtime with
|
|
30
|
+
an already-present image ID and its exact Node version. No helper installs an
|
|
31
|
+
image or adopts a downloaded program automatically.
|
|
32
|
+
|
|
33
|
+
The chosen cases are a public-interface contract, not proof of general program
|
|
34
|
+
equivalence. An independent reviewer must approve changes to cases, expectations,
|
|
35
|
+
rules and compatibility obligations. Missing coverage remains a finding; it must
|
|
36
|
+
not be removed to obtain a passing report.
|
|
37
|
+
|
|
38
|
+
## Baseline, pilot and assessment
|
|
39
|
+
|
|
40
|
+
Create a `calliope.migration.baseline-plan/v1` from the emitted schemas and example.
|
|
41
|
+
It has no candidate field. Review its complete contents and exact digest before
|
|
42
|
+
execution:
|
|
43
|
+
|
|
44
|
+
```sh
|
|
45
|
+
calliope migration review-baseline --plan baseline.json --json
|
|
46
|
+
calliope migration verify-baseline --repository REPOSITORY --plan baseline.json --approve REVIEW_DIGEST --json
|
|
47
|
+
calliope migration review-baseline-evidence --plan baseline.json --report baseline-report.json --json
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
A baseline must pass the original cases and detect the declared negative control
|
|
51
|
+
before implementation. The built-in comparator also checks its own adversarial
|
|
52
|
+
cases. Keep baseline failures, verifier failures and environment failures separate.
|
|
53
|
+
Neither a failed baseline nor an ineffective negative control permits migration.
|
|
54
|
+
|
|
55
|
+
After a separately reviewed pilot implementation, create and approve a full
|
|
56
|
+
verification plan containing the candidate's immutable pin:
|
|
57
|
+
|
|
58
|
+
```sh
|
|
59
|
+
calliope migration review-verification --plan verification.json --json
|
|
60
|
+
calliope migration verify --repository REPOSITORY --plan verification.json --approve REVIEW_DIGEST --json
|
|
61
|
+
calliope migration review-evidence --plan verification.json --report verification-report.json --json
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
Use a `calliope.migration.assessment-request/v1` to bind the inventory, source and
|
|
65
|
+
rule pins, target/runtime, declared unit dependencies, explicit exclusions,
|
|
66
|
+
representative pilot plans/reports and independently evidenced measurements.
|
|
67
|
+
Every selected source file must be assigned or excluded with a reason. Preserve
|
|
68
|
+
package cycles and unsupported dependency declarations as findings.
|
|
69
|
+
|
|
70
|
+
```sh
|
|
71
|
+
calliope migration review-assessment --request assessment.json --json
|
|
72
|
+
calliope migration assess --repository REPOSITORY --request assessment.json --json
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
The standalone assessment can report `investigate` or `do-not-migrate` and does
|
|
76
|
+
not approve dispatch. A trusted host uses `assessMigration` with its installed
|
|
77
|
+
kit/verifier hashes and independent evidence-review callback before a `go`
|
|
78
|
+
recommendation is possible. Cost and time ranges are pilot extrapolations, not
|
|
79
|
+
confidence intervals or new execution allowances.
|
|
80
|
+
|
|
81
|
+
## Execute under the native owner
|
|
82
|
+
|
|
83
|
+
Translate the reviewed work manifest into a native Calliope plan. The native
|
|
84
|
+
coordinator owns review, admission, scheduling, workers, cancellations, attempts
|
|
85
|
+
and the original allowance. Use dependency-first ordering and retain task/unit
|
|
86
|
+
IDs with their source, rule, configuration and implementation binding digests.
|
|
87
|
+
The kit does not supply a second scheduler or allow a worker to mint a root budget.
|
|
88
|
+
|
|
89
|
+
The host must constrain tools and file paths and bind each worker's budget and
|
|
90
|
+
absolute deadline before dispatch. Verification library callers use the existing
|
|
91
|
+
`VerificationOptions` approval and command-reservation callbacks plus the
|
|
92
|
+
inherited deadline; CLI users
|
|
93
|
+
approve the exact verification digest for one invocation. A JSON report, model
|
|
94
|
+
instruction or claimed review receipt is never authority to execute.
|
|
95
|
+
|
|
96
|
+
A collected task patch may become an explicitly reviewed, unverified source
|
|
97
|
+
candidate through the native source-candidate API. Creating a candidate is not
|
|
98
|
+
verification, merge, publication or permission to modify the original checkout.
|
|
99
|
+
Re-run the full verification contract against the candidate's exact commit.
|
|
100
|
+
|
|
101
|
+
## Rule changes, invalidation and replay
|
|
102
|
+
|
|
103
|
+
Record recurring failures as proposed rule changes with their failing unit,
|
|
104
|
+
source/candidate/rule pins, observation/report digests, hypothesis, risk and
|
|
105
|
+
rollback reference. Use the native bounded improvement review contract for the
|
|
106
|
+
execution strategy. A strategy proposal or rollback does not edit the rulebook;
|
|
107
|
+
source changes need their own reviewed candidate and independent approval.
|
|
108
|
+
|
|
109
|
+
After an approved source, rule, configuration, case or runtime change, generate a
|
|
110
|
+
new inventory and assessment. Compare the new manifest's per-unit binding
|
|
111
|
+
against the recorded binding before reusing a result. Version 1 includes the full
|
|
112
|
+
assessment context in each binding, so a changed context conservatively
|
|
113
|
+
invalidates every unit and its dependants. Re-run the baseline and pilot/full
|
|
114
|
+
verification under the new exact pins, preserving old reports for audit. Do not
|
|
115
|
+
rewrite a saved report or attach it to a new digest.
|
|
116
|
+
|
|
117
|
+
Use `calliope improve capabilities --json` before exposing improvement controls.
|
|
118
|
+
Only advertised bounded strategy operations are available. A reviewed rule update
|
|
119
|
+
or successful migration is not reinforcement learning; cross-run learned policies
|
|
120
|
+
and model-weight training are not provided by this kit.
|
|
121
|
+
|
|
122
|
+
## Evidence and distribution
|
|
123
|
+
|
|
124
|
+
Retain the inventory, reviewed plan/request digests, rulebook, work manifest,
|
|
125
|
+
baseline and candidate reports, command/cleanup receipts, source candidate,
|
|
126
|
+
accounting measurements and independent review reference. An example complete
|
|
127
|
+
verification and adversarial qualification can be generated by
|
|
128
|
+
`scripts/qualification/migration-baseline.mjs` from the source repository; its
|
|
129
|
+
arguments require an empty owned directory and an exact local image/runtime.
|
|
130
|
+
The packaged [example plan](migration-example-plan.json) and
|
|
131
|
+
[completed report](migration-example-report.json) are a snapshot from an actual
|
|
132
|
+
disposable local run. Its source commit IDs refer to that synthetic repository;
|
|
133
|
+
this example is not evidence for a user project. Review the pair without executing
|
|
134
|
+
code using `migration review-evidence --plan docs/migration-example-plan.json
|
|
135
|
+
--report docs/migration-example-report.json --json` (on one shell line).
|
|
136
|
+
|
|
137
|
+
The qualification checks unsupported adapters, stale source and rule pins, a
|
|
138
|
+
broken baseline, an ineffective negative control, a regressing candidate,
|
|
139
|
+
distinct baseline/candidate approvals and actual container cleanup.
|
|
140
|
+
|
|
141
|
+
Schemas and deterministic helpers ship in `dist/migration`. The example is
|
|
142
|
+
available offline through `migration example --json`; a host can consume the same
|
|
143
|
+
structured artifacts through `dist/migration/index.js` without Cy. Match the
|
|
144
|
+
package source and exact kit/verifier hashes to the reviewed artifact. Keep
|
|
145
|
+
replay evidence separate from current execution authority.
|
|
146
|
+
|
|
147
|
+
Reference evaluated: Anthropic's code-migration kit at
|
|
148
|
+
[`cf91c9d5068d9aaf95a36164169f08c3e636c909`](https://github.com/anthropics/code-migration-kit-with-claude-code/tree/cf91c9d5068d9aaf95a36164169f08c3e636c909),
|
|
149
|
+
licensed Apache-2.0 and described by its authors as unmaintained reference code.
|
|
150
|
+
No upstream script, prompt or template is copied into this implementation, and
|
|
151
|
+
no upstream code is executed by this playbook. Future reuse requires a separate
|
|
152
|
+
code audit, tests and retention of its required license/notices.
|
|
@@ -0,0 +1,177 @@
|
|
|
1
|
+
# Migration behavior verification
|
|
2
|
+
|
|
3
|
+
The `javascript-to-typescript-cli/v1` adapter compares self-contained JavaScript
|
|
4
|
+
`.mjs` and TypeScript `.mts` command-line programs through their public interface:
|
|
5
|
+
one argument, stdout bytes, stderr bytes and exit status. It runs the original,
|
|
6
|
+
a known regression and the candidate in the existing native isolated-command
|
|
7
|
+
backend. No model, new scheduler or repository-wide translation is involved.
|
|
8
|
+
|
|
9
|
+
```sh
|
|
10
|
+
calliope migration example --json
|
|
11
|
+
calliope migration verification-schema --json
|
|
12
|
+
calliope migration review-verification --plan verification.json --json
|
|
13
|
+
calliope migration verify --repository /path/to/repository --plan verification.json --approve REVIEW_DIGEST --json
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
`example` emits files and cases as JSON without installing, writing or executing
|
|
17
|
+
them. The example sums an array of safe integers, including empty, negative and
|
|
18
|
+
invalid inputs; its known-bad target adds an extra one per input. Its wrong result
|
|
19
|
+
has the same byte length as the correct result. To use it, save its four
|
|
20
|
+
files in a disposable repository and commit them. Create a plan from the emitted
|
|
21
|
+
cases, negative control and limits, with these additional fields:
|
|
22
|
+
|
|
23
|
+
- `format`: `calliope.migration.verification-plan/v1`.
|
|
24
|
+
- `adapter` and `verifier`: the example's `javascript-to-typescript-cli/v1` and
|
|
25
|
+
`byte-parity-v1` identities.
|
|
26
|
+
- `runtime`: an already present Linux Docker image's full `sha256:...` ID and
|
|
27
|
+
exact Node version (`v24.x.y`). The runtime probe verifies the actual version;
|
|
28
|
+
the helper never pulls an image.
|
|
29
|
+
- `source`, `candidate`, `negative`, `rules`: each has `revision` (full commit ID),
|
|
30
|
+
`path` (repository-relative file) and `object` (the exact Git blob ID). Use
|
|
31
|
+
`migration inventory` to obtain those identities. Different roles may use
|
|
32
|
+
different commits in the same repository. Each file must be regular UTF-8 and
|
|
33
|
+
at most 64 KiB; source is `.mjs`, candidate/negative are `.mts`.
|
|
34
|
+
|
|
35
|
+
Review the full plan before passing its returned digest to `verify`. Changing a
|
|
36
|
+
case, rule pin, program pin, runtime or limit changes that digest. A mismatched
|
|
37
|
+
approval does not execute code. The schema is a transport contract; native
|
|
38
|
+
validation additionally checks byte bounds, related fields and Git object pins.
|
|
39
|
+
|
|
40
|
+
## Evidence and outcomes
|
|
41
|
+
|
|
42
|
+
### Establish a baseline before implementation
|
|
43
|
+
|
|
44
|
+
An original-system baseline does not need a candidate commit. Discover
|
|
45
|
+
`verify-baseline` and `review-baseline-evidence` in `migration capabilities`, then
|
|
46
|
+
use the separate baseline contracts:
|
|
47
|
+
|
|
48
|
+
```sh
|
|
49
|
+
calliope migration baseline-schema --json
|
|
50
|
+
calliope migration review-baseline --plan baseline.json --json
|
|
51
|
+
calliope migration verify-baseline --repository /path/to/repository --plan baseline.json --approve REVIEW_DIGEST --json
|
|
52
|
+
calliope migration review-baseline-evidence --plan baseline.json --report baseline-report.json --json
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
The plan format is `calliope.migration.baseline-plan/v1`. It has the same adapter,
|
|
56
|
+
verifier, runtime, source, negative-control, rules, cases and limits as a full
|
|
57
|
+
verification plan, with **no `candidate` field**. Candidate pins are refused rather
|
|
58
|
+
than ignored. Review approves exactly the source, negative and rules pins and
|
|
59
|
+
`cases.length + 2` commands: runtime, original cases and one known regression.
|
|
60
|
+
No candidate is read, mounted or executed. The same isolated command backend,
|
|
61
|
+
inherited deadline, reservation callback and cleanup checks apply.
|
|
62
|
+
|
|
63
|
+
Success returns `baseline-verified` in a `calliope.migration.baseline-report/v1`.
|
|
64
|
+
Read-only review returns `baseline-observations` in a distinct baseline evidence
|
|
65
|
+
review. Neither is candidate verification or authorization to implement. A host
|
|
66
|
+
must establish provenance and review scope independently; hashes alone do not
|
|
67
|
+
authenticate the observations. Failed, cancelled, incomplete or contradictory
|
|
68
|
+
baseline evidence remains nonpassing.
|
|
69
|
+
|
|
70
|
+
Library hosts use `analyzeBaselinePlan`, `verifyMigrationBaseline` and
|
|
71
|
+
`analyzeBaselineEvidence`, with the existing `VerificationOptions` host callbacks.
|
|
72
|
+
After implementation, create a normal full verification plan with the exact
|
|
73
|
+
candidate commit and obtain separate approval. Full verification still repeats
|
|
74
|
+
baseline and known-regression checks before testing the candidate. Baseline
|
|
75
|
+
approval digests and reports cannot be substituted for full verification.
|
|
76
|
+
|
|
77
|
+
For a native isolated implementation task, the host can create that commit with
|
|
78
|
+
the [generated source candidate](source-candidates.md) capability. It consumes the
|
|
79
|
+
exact collected task/attempt patch, requires separate review and preserves the
|
|
80
|
+
source checkout. Its `candidate` status explicitly requires independent
|
|
81
|
+
verification; it cannot stand in for a passing verification report.
|
|
82
|
+
|
|
83
|
+
The existing full-verification v1 formats and digests are unchanged. Baseline
|
|
84
|
+
evidence also cannot satisfy assessment's passing candidate-pilot requirement.
|
|
85
|
+
|
|
86
|
+
### Full verification
|
|
87
|
+
|
|
88
|
+
Before reading program contents, the host approves the exact plan and read pins.
|
|
89
|
+
Verification then reads immutable Git blobs, checks their identities and creates
|
|
90
|
+
private temporary snapshots. Dirty and untracked checkout files are preserved.
|
|
91
|
+
The selected image sees only the current role's snapshot, read-only, with no host
|
|
92
|
+
credentials, network or writable host mount. Existing CPU/memory/process/output
|
|
93
|
+
limits and container-cleanup receipts apply. No package installation occurs.
|
|
94
|
+
|
|
95
|
+
The comparator's adversarial self-test runs first. Execution checks the runtime,
|
|
96
|
+
every baseline case, then the pinned negative-control case. The negative control
|
|
97
|
+
must both reproduce its declared wrong behavior and differ from the baseline.
|
|
98
|
+
Only then does it execute candidate cases. Stdout/stderr hashes are computed on
|
|
99
|
+
raw captured bytes before display redaction; truncated or legacy receipts without
|
|
100
|
+
those hashes cannot pass. Reports omit display output, retaining hashes, byte
|
|
101
|
+
counts, exit status, commands and native cleanup evidence.
|
|
102
|
+
|
|
103
|
+
| Outcome | Meaning |
|
|
104
|
+
| --- | --- |
|
|
105
|
+
| `passed` | All declared cases passed after baseline and negative-control checks. |
|
|
106
|
+
| `input-failure` | A program/rule pin or snapshot is stale, oversized or unsupported. |
|
|
107
|
+
| `baseline-failure` | The original does not satisfy the proposed contract. |
|
|
108
|
+
| `verifier-failure` | Comparator or known-regression validation failed. |
|
|
109
|
+
| `regression` | The candidate differs on a declared case. |
|
|
110
|
+
| `environment-failure` | Runtime, observation, deadline, host allowance or cleanup prevented complete evidence. |
|
|
111
|
+
| `cancelled` | The caller cancelled; retained observations are not a pass. |
|
|
112
|
+
|
|
113
|
+
Reports bind the plan digest, exact source/candidate/negative/rule pins, runtime,
|
|
114
|
+
verifier version and observations. Their own digest covers the canonical body
|
|
115
|
+
excluding `digest`. A passing report applies only to those commits and cases. It
|
|
116
|
+
does not imply that a newer branch tip passed. Replan changed inputs and obtain
|
|
117
|
+
independent review of changes to success criteria; this helper does not supply
|
|
118
|
+
that review authority or automatically invalidate a larger workflow's units.
|
|
119
|
+
|
|
120
|
+
## Host policy and limits
|
|
121
|
+
|
|
122
|
+
Library hosts use `analyzeVerificationPlan` and `verifyMigration`. The mandatory
|
|
123
|
+
`approve` callback receives the plan digest, canonical repository, exact read pins, image,
|
|
124
|
+
command count and time limit. Intersect these with existing task grants before
|
|
125
|
+
approving. `deadline` can shorten the execution allowance; `reserveCommand` can
|
|
126
|
+
charge or deny each command through the host's existing ledger. These callbacks
|
|
127
|
+
are trusted host code, never fields accepted from agent-authored JSON.
|
|
128
|
+
|
|
129
|
+
There are 1–8 cases, at most 18 verification commands, 100–10,000ms per command and
|
|
130
|
+
at most 300,000ms after approval. Read-only Git inspection shares that deadline.
|
|
131
|
+
Cleanup may take the shared runner's additional bounded cleanup
|
|
132
|
+
time. A missing or unconfirmed execution receipt retains the exact temporary
|
|
133
|
+
workspace for inspection; the report identifies it. Confirmed cleanup allows
|
|
134
|
+
removal of the disposable snapshots. Existing repository files are not deleted.
|
|
135
|
+
|
|
136
|
+
The CLI's explicit approval applies to one verification invocation. It does not
|
|
137
|
+
create a reusable permission grant or replenish an existing hosted allowance.
|
|
138
|
+
Hosted callers must carry their parent deadline and command reservations forward.
|
|
139
|
+
|
|
140
|
+
## Current support boundary
|
|
141
|
+
|
|
142
|
+
This is one small language-pair adapter and verification phase of #414. It does
|
|
143
|
+
not prove general program equivalence, type-check TypeScript, install dependencies,
|
|
144
|
+
verify imported project modules, dispatch migration workers or approve rollout.
|
|
145
|
+
Application/framework adapters, source dependency analysis, rule-update review,
|
|
146
|
+
unit invalidation, headless tool discovery and Cykick/Astrolift workflow integration
|
|
147
|
+
remain separate work. Keep generated, reviewed and verified states distinct.
|
|
148
|
+
## Review saved observations
|
|
149
|
+
|
|
150
|
+
`calliope migration review-evidence --plan plan.json --report report.json --json`
|
|
151
|
+
re-evaluates a saved report without Docker, repository access, provider credentials
|
|
152
|
+
or executing any program. Exit 0 means `passing-observations`; exit 1 means
|
|
153
|
+
nonpassing or invalid evidence. `migration evidence-schema` returns the packaged
|
|
154
|
+
JSON Schema. Hosts can import `analyzeVerificationEvidence` from `migration/index`.
|
|
155
|
+
|
|
156
|
+
The review binds the exact plan digest, source/candidate/negative/rules pins,
|
|
157
|
+
runtime, case order and command arguments. It checks report integrity, complete
|
|
158
|
+
command coverage, distinct container identities, cleanup receipts, raw output
|
|
159
|
+
fingerprints and exit status. It recomputes every comparison, including baseline
|
|
160
|
+
and known-regression observations. A rewritten `passed` label or `matches` value
|
|
161
|
+
cannot override contradictory observations, even after recomputing the JSON digest.
|
|
162
|
+
The comparator runs its adversarial self-check before inspecting a report.
|
|
163
|
+
|
|
164
|
+
A valid interrupted report remains `not-passing`, with finding codes and observation
|
|
165
|
+
indexes; malformed or differently bound reports are refused. Legacy receipts that
|
|
166
|
+
lack explicit cleanup or raw output evidence cannot receive passing status. Review
|
|
167
|
+
accepts native confirmed absence and bounded cleanup recovery receipts. It does
|
|
168
|
+
not contact the daemon to assert that a recorded container is absent now.
|
|
169
|
+
|
|
170
|
+
The result contains plan/report digests, case IDs and findings, never raw program
|
|
171
|
+
output, retained workspace paths or free-form report reasons. A digest proves
|
|
172
|
+
consistency, not provenance: anyone able to fabricate all observations can also
|
|
173
|
+
fabricate their digest. **Passing observations do not authenticate their producer,
|
|
174
|
+
supply independent review, establish general behavioral equivalence, or authorize
|
|
175
|
+
migration dispatch.** Assessment hosts must establish trusted evidence provenance
|
|
176
|
+
and review coverage separately. Changing the source, cases, rules or target/runtime
|
|
177
|
+
requires evidence for a new exact plan; old evidence is never silently rebound.
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Calliope CLI 3.6.0
|
|
2
|
+
|
|
3
|
+
This release adds reviewed host execution and a packaged code migration kit.
|
|
4
|
+
It retains the provider retirement and credential-redaction fixes from 3.5.4.
|
|
5
|
+
|
|
6
|
+
## Reviewed host execution
|
|
7
|
+
|
|
8
|
+
Embedded hosts can bind remote children to a reviewed native run, its owner,
|
|
9
|
+
workspace and original allowance. The parent ledger retains reservations across
|
|
10
|
+
process restarts and refuses new work after exhaustion, cancellation or revoked
|
|
11
|
+
authority. Native questions, outcomes and retained sessions preserve their account
|
|
12
|
+
binding. This adds no separate scheduler or replacement root budget.
|
|
13
|
+
|
|
14
|
+
`calliope --version --json` advertises headless protocol 1, delegation 1 and
|
|
15
|
+
workspace binding 1. ACP remains protocol 1. Hosts must negotiate the applicable
|
|
16
|
+
capability and provision the reviewed authority explicitly; an ordinary ACP
|
|
17
|
+
session is not delegated execution.
|
|
18
|
+
|
|
19
|
+
See [the delegation contract](../delegation-ledger.md) for credential delivery,
|
|
20
|
+
private retained state, workspace binding and the runnable process qualification.
|
|
21
|
+
The source qualification uses deterministic inference with real ledger and child
|
|
22
|
+
processes. Deployment through Astrolift and Cykick requires separate consumer
|
|
23
|
+
qualification; publishing this CLI does not establish their remote acceptance.
|
|
24
|
+
|
|
25
|
+
## Code migration kit
|
|
26
|
+
|
|
27
|
+
`calliope migration` packages committed-source inventory, baseline verification,
|
|
28
|
+
candidate verification and reviewed assessment. The initial adapter covers
|
|
29
|
+
self-contained JavaScript `.mjs` to TypeScript `.mts` command-line programs on a
|
|
30
|
+
pinned Node 24 Linux image. Verification preserves exact source/rule/runtime pins,
|
|
31
|
+
tests a declared negative control and retains command and cleanup evidence.
|
|
32
|
+
|
|
33
|
+
The [migration playbook](../migration-playbook.md), schemas and example evidence
|
|
34
|
+
ship with the npm package. Verification requires the reviewed digest and an
|
|
35
|
+
already-present container image. Reports do not authorize execution, and passing
|
|
36
|
+
the declared cases does not prove general program equivalence. The kit reuses
|
|
37
|
+
native execution authority and bounded improvement; it does not provide
|
|
38
|
+
cross-run learned policies or model-weight training.
|
|
39
|
+
|
|
40
|
+
Refs: [#414](https://github.com/calliopeai/calliope-cli/issues/414),
|
|
41
|
+
[#415](https://github.com/calliopeai/calliope-cli/issues/415),
|
|
42
|
+
[#413](https://github.com/calliopeai/calliope-cli/issues/413),
|
|
43
|
+
[#293](https://github.com/calliopeai/calliope-cli/issues/293).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@calliopelabs/cli",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.6.0",
|
|
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,7 +34,11 @@
|
|
|
34
34
|
"files": [
|
|
35
35
|
"dist",
|
|
36
36
|
"README.md",
|
|
37
|
-
"scripts/verify-runlog.mjs"
|
|
37
|
+
"scripts/verify-runlog.mjs",
|
|
38
|
+
"docs/migration-*.md",
|
|
39
|
+
"docs/migration-example-*.json",
|
|
40
|
+
"docs/delegation-ledger.md",
|
|
41
|
+
"docs/releases/3.6.0.md"
|
|
38
42
|
],
|
|
39
43
|
"scripts": {
|
|
40
44
|
"build": "tsc && chmod +x dist/bin.js",
|
|
@@ -44,6 +48,7 @@
|
|
|
44
48
|
"test:watch": "vitest",
|
|
45
49
|
"test:coverage": "vitest run --coverage",
|
|
46
50
|
"test:ahp-protocol": "npm run build && node --test scripts/qualification/ahp-protocol.mjs",
|
|
51
|
+
"test:reviewed-host": "npm run build && node scripts/qualification/reviewed-host.mjs",
|
|
47
52
|
"test:native-policy": "npm run build && node --test scripts/qualification/native-policy.mjs",
|
|
48
53
|
"bench": "node bench/run.mjs",
|
|
49
54
|
"bench:cold": "npm run build && node bench/cold-start.mjs",
|