@mcoda/codali 0.1.133 → 0.1.135-codali.2
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/CHANGELOG.md +37 -0
- package/ORCHESTRATION.md +387 -0
- package/README.md +103 -1
- package/config/alternate-local.example.json +49 -0
- package/config/docdex-runtime.json +21 -0
- package/config/orchestration.schema.json +548 -0
- package/config/raijin-suku.example.json +172 -0
- package/config/terminal-long-scenarios.v1.json +70 -0
- package/dist/agents/RoleResolution.d.ts.map +1 -1
- package/dist/agents/RoleResolution.js +4 -4
- package/dist/api/CodaliApi.d.ts +16 -0
- package/dist/api/CodaliApi.d.ts.map +1 -1
- package/dist/api/CodaliApi.js +39 -10
- package/dist/cli/AskCommand.d.ts +3 -0
- package/dist/cli/AskCommand.d.ts.map +1 -1
- package/dist/cli/AskCommand.js +76 -13
- package/dist/cli/RunCommand.d.ts +4 -0
- package/dist/cli/RunCommand.d.ts.map +1 -1
- package/dist/cli/RunCommand.js +110 -24
- package/dist/cli/TerminalCommand.d.ts +35 -0
- package/dist/cli/TerminalCommand.d.ts.map +1 -0
- package/dist/cli/TerminalCommand.js +616 -0
- package/dist/cli/TerminalCredentials.d.ts +3 -0
- package/dist/cli/TerminalCredentials.d.ts.map +1 -0
- package/dist/cli/TerminalCredentials.js +89 -0
- package/dist/cli/TerminalInput.d.ts +24 -0
- package/dist/cli/TerminalInput.d.ts.map +1 -0
- package/dist/cli/TerminalInput.js +98 -0
- package/dist/cli/TerminalText.d.ts +10 -0
- package/dist/cli/TerminalText.d.ts.map +1 -0
- package/dist/cli/TerminalText.js +53 -0
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +33 -4
- package/dist/cognitive/ConfiguredPipeline.d.ts +34 -0
- package/dist/cognitive/ConfiguredPipeline.d.ts.map +1 -0
- package/dist/cognitive/ConfiguredPipeline.js +50 -0
- package/dist/cognitive/ValidationRunner.d.ts +4 -0
- package/dist/cognitive/ValidationRunner.d.ts.map +1 -1
- package/dist/cognitive/ValidationRunner.js +18 -41
- package/dist/config/NodeOrchestration.d.ts +21 -0
- package/dist/config/NodeOrchestration.d.ts.map +1 -0
- package/dist/config/NodeOrchestration.js +54 -0
- package/dist/config/OrchestrationConfig.d.ts +100 -0
- package/dist/config/OrchestrationConfig.d.ts.map +1 -0
- package/dist/config/OrchestrationConfig.js +245 -0
- package/dist/connectors/mcp/McpClient.d.ts +3 -1
- package/dist/connectors/mcp/McpClient.d.ts.map +1 -1
- package/dist/connectors/mcp/McpClient.js +3 -2
- package/dist/connectors/mcp/McpServerRegistry.d.ts +2 -2
- package/dist/connectors/mcp/McpServerRegistry.d.ts.map +1 -1
- package/dist/connectors/mcp/McpServerRegistry.js +39 -16
- package/dist/connectors/mcp/McpToolAdapter.js +2 -2
- package/dist/connectors/media/ConfiguredMediaTools.d.ts +6 -0
- package/dist/connectors/media/ConfiguredMediaTools.d.ts.map +1 -0
- package/dist/connectors/media/ConfiguredMediaTools.js +41 -0
- package/dist/connectors/media/ImageGenerationTool.js +3 -3
- package/dist/connectors/media/MediaArtifactReceipt.d.ts +5 -0
- package/dist/connectors/media/MediaArtifactReceipt.d.ts.map +1 -0
- package/dist/connectors/media/MediaArtifactReceipt.js +65 -0
- package/dist/connectors/media/MediaJobStore.d.ts +68 -0
- package/dist/connectors/media/MediaJobStore.d.ts.map +1 -0
- package/dist/connectors/media/MediaJobStore.js +199 -0
- package/dist/connectors/media/MediaJobWorker.d.ts +2 -0
- package/dist/connectors/media/MediaJobWorker.d.ts.map +1 -0
- package/dist/connectors/media/MediaJobWorker.js +65 -0
- package/dist/connectors/media/RemoteMediaJob.d.ts +6 -0
- package/dist/connectors/media/RemoteMediaJob.d.ts.map +1 -0
- package/dist/connectors/media/RemoteMediaJob.js +80 -0
- package/dist/docdex/DocdexClient.d.ts +18 -1
- package/dist/docdex/DocdexClient.d.ts.map +1 -1
- package/dist/docdex/DocdexClient.js +135 -19
- package/dist/docdex/ManagedDocdex.d.ts +29 -0
- package/dist/docdex/ManagedDocdex.d.ts.map +1 -0
- package/dist/docdex/ManagedDocdex.js +215 -0
- package/dist/docdex/ManagedRuntime.d.ts +28 -0
- package/dist/docdex/ManagedRuntime.d.ts.map +1 -0
- package/dist/docdex/ManagedRuntime.js +212 -0
- package/dist/eval/EvaluationProcess.d.ts +13 -0
- package/dist/eval/EvaluationProcess.d.ts.map +1 -0
- package/dist/eval/EvaluationProcess.js +76 -0
- package/dist/eval/LongWorkflowJourney.d.ts +34 -0
- package/dist/eval/LongWorkflowJourney.d.ts.map +1 -0
- package/dist/eval/LongWorkflowJourney.js +243 -0
- package/dist/eval/PlanningCorpus.d.ts +45 -0
- package/dist/eval/PlanningCorpus.d.ts.map +1 -0
- package/dist/eval/PlanningCorpus.js +189 -0
- package/dist/eval/PlanningCorpusRunner.d.ts +13 -0
- package/dist/eval/PlanningCorpusRunner.d.ts.map +1 -0
- package/dist/eval/PlanningCorpusRunner.js +89 -0
- package/dist/eval/TerminalCorpusRunner.d.ts +36 -0
- package/dist/eval/TerminalCorpusRunner.d.ts.map +1 -0
- package/dist/eval/TerminalCorpusRunner.js +222 -0
- package/dist/eval/TerminalTaskCorpus.d.ts +26 -0
- package/dist/eval/TerminalTaskCorpus.d.ts.map +1 -0
- package/dist/eval/TerminalTaskCorpus.js +105 -0
- package/dist/eval/TerminalWorkflowCorpus.d.ts +11 -0
- package/dist/eval/TerminalWorkflowCorpus.d.ts.map +1 -0
- package/dist/eval/TerminalWorkflowCorpus.js +116 -0
- package/dist/eval/fixtures/TerminalRecoveryJourney.d.ts +4 -0
- package/dist/eval/fixtures/TerminalRecoveryJourney.d.ts.map +1 -0
- package/dist/eval/fixtures/TerminalRecoveryJourney.js +132 -0
- package/dist/gateway/CodaliGateway.d.ts +2 -0
- package/dist/gateway/CodaliGateway.d.ts.map +1 -1
- package/dist/gateway/CodaliGateway.js +16 -4
- package/dist/gateway/ConfiguredGateway.d.ts +23 -0
- package/dist/gateway/ConfiguredGateway.d.ts.map +1 -0
- package/dist/gateway/ConfiguredGateway.js +44 -0
- package/dist/gateway/GatewayTracer.d.ts +1 -1
- package/dist/gateway/GatewayTracer.d.ts.map +1 -1
- package/dist/gateway/GatewayTracer.js +2 -27
- package/dist/gateway/LocalGatewayTaskRunner.d.ts.map +1 -1
- package/dist/gateway/LocalGatewayTaskRunner.js +13 -1
- package/dist/index.d.ts +23 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +12 -0
- package/dist/permissions/PermissionGate.d.ts +44 -0
- package/dist/permissions/PermissionGate.d.ts.map +1 -0
- package/dist/permissions/PermissionGate.js +97 -0
- package/dist/providers/ConfiguredEmbeddings.d.ts +43 -0
- package/dist/providers/ConfiguredEmbeddings.d.ts.map +1 -0
- package/dist/providers/ConfiguredEmbeddings.js +87 -0
- package/dist/providers/ConfiguredModelScope.d.ts +69 -0
- package/dist/providers/ConfiguredModelScope.d.ts.map +1 -0
- package/dist/providers/ConfiguredModelScope.js +113 -0
- package/dist/providers/ConfiguredProvider.d.ts +79 -0
- package/dist/providers/ConfiguredProvider.d.ts.map +1 -0
- package/dist/providers/ConfiguredProvider.js +238 -0
- package/dist/providers/ModelServiceError.d.ts +10 -0
- package/dist/providers/ModelServiceError.d.ts.map +1 -0
- package/dist/providers/ModelServiceError.js +45 -0
- package/dist/providers/MswarmWorkerProvider.d.ts.map +1 -1
- package/dist/providers/MswarmWorkerProvider.js +4 -0
- package/dist/providers/OpenAiCompatibleProvider.d.ts.map +1 -1
- package/dist/providers/OpenAiCompatibleProvider.js +134 -52
- package/dist/providers/ProviderTypes.d.ts +14 -0
- package/dist/providers/ProviderTypes.d.ts.map +1 -1
- package/dist/runtime/CodaliJobRuntime.d.ts +6 -0
- package/dist/runtime/CodaliJobRuntime.d.ts.map +1 -1
- package/dist/runtime/CodaliJobRuntime.js +36 -1
- package/dist/runtime/CodaliRuntime.d.ts +30 -0
- package/dist/runtime/CodaliRuntime.d.ts.map +1 -1
- package/dist/runtime/CodaliRuntime.js +71 -1
- package/dist/runtime/CompletionReport.d.ts +5 -0
- package/dist/runtime/CompletionReport.d.ts.map +1 -0
- package/dist/runtime/CompletionReport.js +12 -0
- package/dist/runtime/ProgressTracker.d.ts +17 -0
- package/dist/runtime/ProgressTracker.d.ts.map +1 -0
- package/dist/runtime/ProgressTracker.js +27 -0
- package/dist/runtime/RequestedTestEvidence.d.ts +12 -0
- package/dist/runtime/RequestedTestEvidence.d.ts.map +1 -0
- package/dist/runtime/RequestedTestEvidence.js +16 -0
- package/dist/runtime/RequiredRetrieval.d.ts +13 -0
- package/dist/runtime/RequiredRetrieval.d.ts.map +1 -0
- package/dist/runtime/RequiredRetrieval.js +25 -0
- package/dist/runtime/ReviewSource.d.ts +6 -0
- package/dist/runtime/ReviewSource.d.ts.map +1 -0
- package/dist/runtime/ReviewSource.js +38 -0
- package/dist/runtime/Runner.d.ts +13 -0
- package/dist/runtime/Runner.d.ts.map +1 -1
- package/dist/runtime/Runner.js +220 -158
- package/dist/runtime/SecretRedaction.d.ts +11 -0
- package/dist/runtime/SecretRedaction.d.ts.map +1 -0
- package/dist/runtime/SecretRedaction.js +85 -0
- package/dist/runtime/SessionController.d.ts +148 -0
- package/dist/runtime/SessionController.d.ts.map +1 -0
- package/dist/runtime/SessionController.js +1356 -0
- package/dist/runtime/StructuralEvidence.d.ts +22 -0
- package/dist/runtime/StructuralEvidence.d.ts.map +1 -0
- package/dist/runtime/StructuralEvidence.js +87 -0
- package/dist/runtime/TaskReviewContext.d.ts +34 -0
- package/dist/runtime/TaskReviewContext.d.ts.map +1 -0
- package/dist/runtime/TaskReviewContext.js +34 -0
- package/dist/runtime/ValidationOutput.d.ts +5 -0
- package/dist/runtime/ValidationOutput.d.ts.map +1 -0
- package/dist/runtime/ValidationOutput.js +32 -0
- package/dist/runtime/VerificationCommand.d.ts +3 -0
- package/dist/runtime/VerificationCommand.d.ts.map +1 -0
- package/dist/runtime/VerificationCommand.js +48 -0
- package/dist/runtime/WorkStatusPage.d.ts +15 -0
- package/dist/runtime/WorkStatusPage.d.ts.map +1 -0
- package/dist/runtime/WorkStatusPage.js +58 -0
- package/dist/runtime/WorkspaceLedger.d.ts +13 -0
- package/dist/runtime/WorkspaceLedger.d.ts.map +1 -0
- package/dist/runtime/WorkspaceLedger.js +145 -0
- package/dist/runtime/WorkspaceLock.d.ts.map +1 -1
- package/dist/runtime/WorkspaceLock.js +20 -17
- package/dist/runtime/WorkspaceSnapshot.d.ts +13 -0
- package/dist/runtime/WorkspaceSnapshot.d.ts.map +1 -0
- package/dist/runtime/WorkspaceSnapshot.js +88 -0
- package/dist/session/AtomicState.d.ts +13 -0
- package/dist/session/AtomicState.d.ts.map +1 -0
- package/dist/session/AtomicState.js +109 -0
- package/dist/session/SessionStoragePath.d.ts +15 -0
- package/dist/session/SessionStoragePath.d.ts.map +1 -0
- package/dist/session/SessionStoragePath.js +89 -0
- package/dist/session/SessionStore.d.ts +9 -0
- package/dist/session/SessionStore.d.ts.map +1 -1
- package/dist/session/SessionStore.js +181 -47
- package/dist/session/WorkState.d.ts +23 -0
- package/dist/session/WorkState.d.ts.map +1 -0
- package/dist/session/WorkState.js +367 -0
- package/dist/session/WorkTypes.d.ts +94 -0
- package/dist/session/WorkTypes.d.ts.map +1 -0
- package/dist/session/WorkTypes.js +1 -0
- package/dist/tools/ToolRegistry.d.ts +2 -0
- package/dist/tools/ToolRegistry.d.ts.map +1 -1
- package/dist/tools/ToolRegistry.js +12 -2
- package/dist/tools/ToolTypes.d.ts +16 -0
- package/dist/tools/ToolTypes.d.ts.map +1 -1
- package/dist/tools/docdex/DocdexTools.d.ts +2 -0
- package/dist/tools/docdex/DocdexTools.d.ts.map +1 -1
- package/dist/tools/docdex/DocdexTools.js +17 -2
- package/dist/tools/filesystem/FileTools.d.ts.map +1 -1
- package/dist/tools/filesystem/FileTools.js +30 -10
- package/dist/tools/shell/AsyncProcess.d.ts +16 -0
- package/dist/tools/shell/AsyncProcess.d.ts.map +1 -0
- package/dist/tools/shell/AsyncProcess.js +94 -0
- package/dist/tools/shell/DarwinRuntimeLibraries.d.ts +13 -0
- package/dist/tools/shell/DarwinRuntimeLibraries.d.ts.map +1 -0
- package/dist/tools/shell/DarwinRuntimeLibraries.js +130 -0
- package/dist/tools/shell/HostToolchain.d.ts +19 -0
- package/dist/tools/shell/HostToolchain.d.ts.map +1 -0
- package/dist/tools/shell/HostToolchain.js +264 -0
- package/dist/tools/shell/IsolatedExecutor.d.ts +15 -0
- package/dist/tools/shell/IsolatedExecutor.d.ts.map +1 -0
- package/dist/tools/shell/IsolatedExecutor.js +134 -0
- package/dist/tools/shell/ShellTool.d.ts.map +1 -1
- package/dist/tools/shell/ShellTool.js +9 -29
- package/dist/tools/shell/ShellWorkingDirectory.d.ts +3 -0
- package/dist/tools/shell/ShellWorkingDirectory.d.ts.map +1 -0
- package/dist/tools/shell/ShellWorkingDirectory.js +30 -0
- package/package.json +27 -24
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,43 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
## 0.1.135-codali.2 - 2026-10-26
|
|
6
|
+
|
|
7
|
+
- Keep core tool definitions available across task handoffs, while requiring a
|
|
8
|
+
fresh task claim before execution. Record advertised tools for diagnosis.
|
|
9
|
+
- Explain stale verification with affected tasks and changed inputs so agents
|
|
10
|
+
can revalidate existing work without replacing the plan.
|
|
11
|
+
- Preserve Windows workspace identity across short-path aliases and repair
|
|
12
|
+
interrupted transcript tails. Retain mandatory file flushes on every platform.
|
|
13
|
+
- Resolve macOS Python native library dependencies within the shell sandbox,
|
|
14
|
+
including Homebrew SSL libraries, without mounting broad installation roots.
|
|
15
|
+
- Internal validation prerelease for the `next` channel. Quality evaluation,
|
|
16
|
+
consumer rollout and the 24-hour canary remain open promotion gates.
|
|
17
|
+
|
|
18
|
+
## 0.1.135-codali.1 - 2026-10-26
|
|
19
|
+
|
|
20
|
+
- Internal terminal CLI prerelease with mSwarm authentication, configuration-driven
|
|
21
|
+
model roles and effort, durable goals and tasks, scoped permissions, asynchronous
|
|
22
|
+
shell execution, session recovery, and interactive or JSONL operation.
|
|
23
|
+
- Add managed Docdex with verified runtime artifacts, pinned embedding identity,
|
|
24
|
+
public embedding transport, memory persistence, and success/failure usage receipts.
|
|
25
|
+
- Add durable image, audio, and video jobs with artifact checksums and recovery.
|
|
26
|
+
- Preserve native Strata reasoning metadata and shared orchestration budgets;
|
|
27
|
+
correct false worker-substitution diagnostics for embedded consumers.
|
|
28
|
+
- This tagged candidate was not published: platform qualification exposed
|
|
29
|
+
macOS runtime and Windows persistence issues addressed in codali.2.
|
|
30
|
+
|
|
31
|
+
## 0.1.134 - 2026-10-25
|
|
32
|
+
|
|
33
|
+
- Forward final synthesis schemas and preserve OpenAI tool-call history.
|
|
34
|
+
- Merge prompt-only format constraints into the initial system message.
|
|
35
|
+
- Surface JSON error envelopes after HTTP 200 keepalives with bounded,
|
|
36
|
+
credential-redacted diagnostics.
|
|
37
|
+
- Bound combined local worker tool results by UTF-8 bytes while preserving
|
|
38
|
+
their audit records and truncation notices.
|
|
39
|
+
|
|
40
|
+
## Earlier changes
|
|
41
|
+
|
|
5
42
|
- Report the run's grounding mode on `CodaliResult`. An `open` run answers from
|
|
6
43
|
the model and deliberately carries no sources, which a host could not tell
|
|
7
44
|
apart from a search that found nothing: okacam's chat suppresses any answer
|
package/ORCHESTRATION.md
ADDED
|
@@ -0,0 +1,387 @@
|
|
|
1
|
+
# Orchestration configuration
|
|
2
|
+
|
|
3
|
+
The JSON file declares providers, model identities, role bindings, effort limits
|
|
4
|
+
and task-control policy. It contains credential references, never secret values.
|
|
5
|
+
The loader rejects unknown fields, undeclared models, alias cycles, unsafe URLs,
|
|
6
|
+
unsupported operations and policies that allow more than one workspace writer.
|
|
7
|
+
The packaged `config/orchestration.schema.json` describes the structural contract;
|
|
8
|
+
the runtime additionally validates references, backend intersections and URL trust.
|
|
9
|
+
|
|
10
|
+
Providers use `mswarm` or `openai-compatible`, with `baseUrl` and optional
|
|
11
|
+
`credentialRef: "env:VARIABLE"`. mSwarm requires a credential reference. Catalog
|
|
12
|
+
and usage URLs must share the provider origin. HTTPS is required except for local
|
|
13
|
+
loopback development. Redirects do not receive credentials.
|
|
14
|
+
|
|
15
|
+
Every model declares `provider`, `catalogId`, `revision`, `operations`,
|
|
16
|
+
`contextWindow` and `maxOutputTokens`. Optional properties identify `backend`,
|
|
17
|
+
`host`, `resourcePool`, tool/streaming support and embedding dimensions. A catalog
|
|
18
|
+
that does not expose an artifact revision must be labeled `catalog-unversioned`;
|
|
19
|
+
that label is not a verified weight checksum. Configuration hashes identify the
|
|
20
|
+
effective routing policy, not a physical model artifact.
|
|
21
|
+
|
|
22
|
+
Operations are `chat.completions`, `embeddings`, `images.generations`,
|
|
23
|
+
`audio.generations` and `videos.generations`. A binding declares ordered
|
|
24
|
+
`candidates`, aliases another binding using `useBinding`, or is explicitly
|
|
25
|
+
disabled. Aliases inherit all backend restrictions along their chain. Discovery
|
|
26
|
+
only filters declared candidates; it never adds unconfigured routes. If no
|
|
27
|
+
candidate is eligible, execution fails before dispatch. A submitted request is
|
|
28
|
+
not automatically replayed against another host.
|
|
29
|
+
|
|
30
|
+
The lead owns task progression. `reviewer` independently evaluates evidence;
|
|
31
|
+
`helper` accepts a bounded capsule and returns a draft with source references.
|
|
32
|
+
Helpers cannot execute tools or grant permissions. `image`, `audio` and `video`
|
|
33
|
+
bind generation operations. Media parameters are checked against advertised
|
|
34
|
+
formats and limits, and every artifact records its model, config hash and SHA-256.
|
|
35
|
+
Roles such as `planner`, `architect`, `worker`, `router`, `repair`, `compactor`,
|
|
36
|
+
`adjudicator`, `synthesizer` and `verifier` can explicitly alias the lead. Disabled
|
|
37
|
+
optional capabilities do not silently invoke a model from daemon defaults.
|
|
38
|
+
|
|
39
|
+
Effort controls shared limits, not a claim about hidden model reasoning:
|
|
40
|
+
|
|
41
|
+
| Effort | Steps | Model calls | Tool calls | Total tokens | Time |
|
|
42
|
+
| --- | ---: | ---: | ---: | ---: | ---: |
|
|
43
|
+
| low | 12 | 12 | 12 | 32,000 | 5 min |
|
|
44
|
+
| medium | 32 | 36 | 48 | 128,000 | 15 min |
|
|
45
|
+
| high | 64 | 72 | 128 | 320,000 | 30 min |
|
|
46
|
+
| max | 128 | 144 | 256 | 640,000 | 60 min |
|
|
47
|
+
|
|
48
|
+
An `effort` object may override positive integer limits by level. Provider output
|
|
49
|
+
and context limits remain enforced. Native `reasoning_effort`, `reasoning_budget`,
|
|
50
|
+
`reasoning_budget_tokens` or `enable_thinking` settings belong in that model's `reasoning` mapping only after
|
|
51
|
+
the adapter has been tested with them. Unreported usage is estimated and shown as
|
|
52
|
+
such; an unknown server balance is not treated as a known zero balance.
|
|
53
|
+
|
|
54
|
+
The Raijin/Suku example maps low to native `none`, medium to `low` with a
|
|
55
|
+
512-token thinking cap, and high/max to `high` with a 1,024-token cap. These are
|
|
56
|
+
request settings; `/status` and model-route events expose them without claiming
|
|
57
|
+
that an older server applied them. Both the mSwarm proxy and node must contain
|
|
58
|
+
the native-reasoning transport update before enabling this profile in service.
|
|
59
|
+
The CLI checks the proxy's authenticated model catalog before reserving inference
|
|
60
|
+
tokens. The selected model must advertise `native_reasoning.transport_version: 1`
|
|
61
|
+
and every requested parameter. The proxy publishes this contract for pinned nodes
|
|
62
|
+
advertising `native_reasoning_transport_version: 1`, and rejects native requests to older
|
|
63
|
+
nodes before dispatch. A generic `supports_reasoning` flag is insufficient.
|
|
64
|
+
Load-balanced aliases do not yet advertise this contract; configure explicit
|
|
65
|
+
candidate models on each host for native-reasoning failover. Direct compatible
|
|
66
|
+
providers retain their explicitly configured native parameter contract.
|
|
67
|
+
Node requests retain the approved model and endpoint, preserve the source
|
|
68
|
+
profile hash, and record a distinct effective hash when a request overrides
|
|
69
|
+
native reasoning. The shared output/token/deadline limits still apply. A native
|
|
70
|
+
thinking cap of zero means no separate thinking cap, not zero thinking tokens;
|
|
71
|
+
use `reasoning_effort: "none"` to disable it on Strata.
|
|
72
|
+
|
|
73
|
+
Configuration changes apply between turns using `/config reload`. Saved grants
|
|
74
|
+
are revoked when reloading. Jobs already submitted retain their pinned provider,
|
|
75
|
+
model and request. Switching a retrieval embedding space requires explicit index
|
|
76
|
+
migration; changing a role alias does not make incompatible vectors compatible.
|
|
77
|
+
|
|
78
|
+
The Raijin/Suku example deliberately leaves unqualified specialist and embedding
|
|
79
|
+
routes disabled. Use `setup` to generate identifiers authorized for your account,
|
|
80
|
+
then qualify and enable optional bindings. GPU free space alone is insufficient
|
|
81
|
+
to admit another resident model or a concurrent media workload.
|
|
82
|
+
|
|
83
|
+
An enabled `embedding` binding requires a pinned artifact revision, explicit
|
|
84
|
+
`embeddingDimensions`, and an `embedding` object declaring `queryPrefix`,
|
|
85
|
+
`documentPrefix`, `normalization` (`none` or `l2`) and `pooling`. All fallback
|
|
86
|
+
candidates must share that exact embedding contract. For example, a qualified
|
|
87
|
+
Nomic service may use `search_query: `, `search_document: `, `l2`, `mean` and 768
|
|
88
|
+
dimensions; confirm these against the deployed artifact before configuring it.
|
|
89
|
+
Use `mcoda agent add/update --config-model-digest sha256:<artifact checksum>`
|
|
90
|
+
and an `embeddings` operation with `limits.embeddingDimensions` to expose a
|
|
91
|
+
qualified runner. Declare its preprocessing with `--config-embedding-json`
|
|
92
|
+
using the four explicit fields above; `none` removes that metadata. Setup selects
|
|
93
|
+
healthy catalog entries only when digest, dimensions and preprocessing are all
|
|
94
|
+
present, and groups identical contracts as replicas. The mSwarm catalog and
|
|
95
|
+
response must attest the pinned digest.
|
|
96
|
+
|
|
97
|
+
With this binding enabled, the terminal controller owns a private Docdex process.
|
|
98
|
+
Repository embeddings pass through the configured provider and shared session
|
|
99
|
+
budget. Docdex text inference uses the configured helper, or the lead when no
|
|
100
|
+
helper is enabled. Private indexes live outside the repository, are separated by
|
|
101
|
+
embedding-space identity, and are reused on restart. The session also pins its
|
|
102
|
+
space; an incompatible upgrade requires a separate index and session. Query and
|
|
103
|
+
document receipts retain purpose, model, configuration hash and reported usage.
|
|
104
|
+
|
|
105
|
+
The managed daemon must advertise workspace-metadata control, query/document
|
|
106
|
+
embedding input types, strict repository embeddings and deterministic profile
|
|
107
|
+
embeddings. An older daemon fails startup with an explicit compatibility error.
|
|
108
|
+
`docdex.binary` selects an installed qualified binary; `binarySha256` pins its
|
|
109
|
+
bytes and is checked before every managed launch. `startupTimeoutMs` bounds
|
|
110
|
+
startup. Setup uses the packaged release artifact manifest for a private install,
|
|
111
|
+
or validates the explicit `--docdex-binary` path through `runtime-info`. It does
|
|
112
|
+
not rewrite Git ignore files or create repository-local metadata.
|
|
113
|
+
Global profile preferences use separate persistent deterministic hash storage,
|
|
114
|
+
which makes no LLM call and survives repository embedding upgrades. Failed remote
|
|
115
|
+
repository embeddings never substitute vectors from this hash space.
|
|
116
|
+
|
|
117
|
+
Large plans remain complete in durable storage. The model context reserves the
|
|
118
|
+
original goal, constraints, active task criteria and applicable architecture
|
|
119
|
+
decisions, while paging unrelated work out of the prompt. `work_status` supports
|
|
120
|
+
`offset`/`limit`, `taskIds` and `requirementIds`. Every required criterion remains
|
|
121
|
+
subject to the final completion gate. A changed prerequisite or superseded
|
|
122
|
+
decision invalidates dependent attempts before another write can proceed.
|
|
123
|
+
|
|
124
|
+
Before editing existing source, the controller requires a current file read and
|
|
125
|
+
successful symbols/AST plus impact-graph receipts for that content hash. Parser
|
|
126
|
+
skips and failed requests do not satisfy the gate. Index ingestion uses the bound
|
|
127
|
+
repository's absolute paths, independent of the daemon's working directory.
|
|
128
|
+
An empty dependency graph is still incomplete dependency evidence: review imports
|
|
129
|
+
and relevant callers, and verify behavior with tests.
|
|
130
|
+
|
|
131
|
+
Direct English instructions to add/write/extend tests have an additional
|
|
132
|
+
evidence check: the session must have changed a surviving test source relative
|
|
133
|
+
to its original workspace baseline. An unchanged passing suite, deleted test,
|
|
134
|
+
symlink or JSON fixture alone does not satisfy that check. This recognizes a
|
|
135
|
+
bounded set of direct instruction forms; it is not a general requirement
|
|
136
|
+
parser. Independent review still evaluates meaningful coverage and the full
|
|
137
|
+
request, including instructions outside those forms.
|
|
138
|
+
|
|
139
|
+
Review receives the actual changed-file list and scoped test source, including
|
|
140
|
+
unchanged tests. Source hashes must match the checked inputs. Review text is
|
|
141
|
+
bounded; large/truncated inputs are explicit and binary artifacts are represented
|
|
142
|
+
by checksums and tool receipts. Review must reject unavailable evidence needed
|
|
143
|
+
to decide correctness. Passing a test or obtaining reviewer approval alone does
|
|
144
|
+
not establish a universal correctness guarantee; observed false completions
|
|
145
|
+
remain release blockers and become regression fixtures.
|
|
146
|
+
|
|
147
|
+
Ordinary task review includes its assigned requirements, owned changes and diff,
|
|
148
|
+
plus relevant read-only dependencies. Other tasks' pending deliverables remain
|
|
149
|
+
in the canonical backlog. A task assigned the original whole-objective criterion
|
|
150
|
+
receives the complete current goal and all changes for integration review.
|
|
151
|
+
Both review scopes retain the same global validation and source-freshness checks.
|
|
152
|
+
|
|
153
|
+
Terminal `model_receipt` events link usage to `model_intent` by ID and identify
|
|
154
|
+
the role binding. Completed receipts include the reported route and usage;
|
|
155
|
+
missing usage is explicitly estimated. An unknown transport outcome retains its
|
|
156
|
+
reservation, while a native-capability preflight refusal records zero usage and
|
|
157
|
+
`not_dispatched`. Usage received during cancellation is settled before the
|
|
158
|
+
answer is discarded. These receipts allow helper/lead usage to be compared
|
|
159
|
+
without attributing another role's tokens to the helper.
|
|
160
|
+
|
|
161
|
+
Terminal shell commands default to a read-only workspace. `command` contains a
|
|
162
|
+
single executable and `args` contains its arguments. Optional `writePaths` names
|
|
163
|
+
existing files/directories inside the claimed task scope; existing source below
|
|
164
|
+
them needs the same read/analysis preconditions, including Git-ignored source.
|
|
165
|
+
Narrow writable paths avoid inspecting unrelated build and dependency trees.
|
|
166
|
+
|
|
167
|
+
Use `work_release` with the current task/attempt IDs and a reason before replanning
|
|
168
|
+
a claimed task. It preserves the goal, criteria and historical receipts while
|
|
169
|
+
invalidating the old attempt. A checkpoint saves context without releasing the
|
|
170
|
+
claim. Rejected tool attempts are recorded and consume the shared tool budget.
|
|
171
|
+
|
|
172
|
+
Resolved credentials are registered for exact-value redaction as well as common
|
|
173
|
+
token-pattern detection. Stream processing buffers incomplete words so credentials
|
|
174
|
+
split across chunks cannot expose their prefix or tail. Human-facing output also
|
|
175
|
+
removes terminal control sequences; approvals retain complete operation arguments
|
|
176
|
+
with credential fields redacted.
|
|
177
|
+
|
|
178
|
+
## Shared embedded model scope
|
|
179
|
+
|
|
180
|
+
`ConfiguredModelScope` pins a validated configuration and effort at invocation start. Every role provider shares call/token reservations, a deadline and cancellation. Missing or failed usage retains a conservative token reservation; `pendingCalls` counts unresolved accounting, not a claim that remote inference is still running. The caller persists `onEvent` intents/receipts when recovery is required.
|
|
181
|
+
|
|
182
|
+
Legacy automation can opt into the same configuration with `codali run --orchestration-config /path/models.json --effort high ...` or `codali ask --orchestration-config /path/models.json --effort low ...`. `CODALI_ORCHESTRATION_CONFIG` supplies the deployment default. For `run`, the old `--config` still selects workflow/validation settings. Explicit legacy model/provider/agent overrides are rejected when orchestration configuration is selected. Old commands without an orchestration file retain their compatibility behavior.
|
|
183
|
+
|
|
184
|
+
The configured entry points use these bindings:
|
|
185
|
+
|
|
186
|
+
| Entry point | Model bindings | Shared boundary |
|
|
187
|
+
| --- | --- | --- |
|
|
188
|
+
| Terminal `chat`/`exec` | Lead, configured helpers/reviewer, embedding and media | Durable session controller |
|
|
189
|
+
| Legacy `run` direct | `lead` | One scope for the command |
|
|
190
|
+
| Legacy `run` smart | `router`, `architect`, `worker`, optional `summarizer` and `repair` | One scope across retrieval, summarization and retries |
|
|
191
|
+
| Legacy `ask` and public `runCodali` API | `planner`, `worker`, `synthesizer` | One scope across classifier, planner, workers and final answer |
|
|
192
|
+
| `runCodaliTask` | Explicit binding or `lead` | Owned scope or validated parent scope |
|
|
193
|
+
| `runCodaliJob` | Each stage's explicit role or kind, including repair | One scope shared by parallel stages |
|
|
194
|
+
|
|
195
|
+
The public API accepts `{ orchestration: { resolved, effort, caller }, signal }` in its trusted dependency argument. `caller` contains the authenticated `clientIdentity` and `clientProduct`; it is pinned and accompanies both mSwarm catalog and inference calls. Do not copy model configuration or caller identity from an untrusted tenant request. Pass each tenant's approved credential reference in its resolved host configuration. Tenant tool context remains mandatory; configuring a model does not authorize operator credential fallback. Request-level media overrides are refused in configured API mode; a host can register approved media tools and explicitly authorize them through its tool context.
|
|
196
|
+
|
|
197
|
+
Runtime/job result accounting includes the configuration hash, actual selected catalog routes and cumulative shared usage. Borrowed scopes must match configuration, effort and any explicit caller identity; children never close their parent's scope. Nested tool hooks reserve from the shared tool budget. Configured CLI retrieval also meters every underlying Docdex HTTP attempt, including negotiation/retries, so a logical Docdex tool can consume more than one operation reservation. This conservative accounting is explicit rather than unmetered background work. Syntax validation uses cancellable processes.
|
|
198
|
+
|
|
199
|
+
These library and CLI paths are implemented. Production applications must still pass their trusted configuration/caller context and be deployed and tested.
|
|
200
|
+
|
|
201
|
+
The mSwarm node executor reads an operator-selected profile from the admitted
|
|
202
|
+
agent's registry `codaliOrchestrationPath`. Set it with
|
|
203
|
+
`mcoda agent update AGENT --config-orchestration-path /absolute/models.json`;
|
|
204
|
+
`none` restores legacy execution for rollback. This setting is never accepted
|
|
205
|
+
from a tenant invocation. Every declared provider must match the admitted
|
|
206
|
+
loopback runner and its catalog endpoint; every model must match the admitted
|
|
207
|
+
model, artifact when pinned, operations and capability/size limits. Calling the
|
|
208
|
+
public mSwarm gateway from this path is rejected. A node profile uses the same
|
|
209
|
+
schema and explicit role aliases as a terminal profile.
|
|
210
|
+
|
|
211
|
+
The executor resolves runner credentials from the trusted registry/auth store
|
|
212
|
+
into an invocation-local scope. It never sets process-global credential variables.
|
|
213
|
+
Direct calls, gateway planning/synthesis and job stages share that scope's model,
|
|
214
|
+
token, tool and cancellation limits. Required Docdex retrieval runs through the
|
|
215
|
+
ordinary authorized protocol/tool path without a synthetic model override or an
|
|
216
|
+
invented model-call receipt. A failed job propagates as a server error. The new
|
|
217
|
+
node path has regression coverage; production activation and live qualification
|
|
218
|
+
remain release requirements.
|
|
219
|
+
|
|
220
|
+
`runConfiguredGateway` uses that scope for planner and synthesizer calls; host workers obtain their role providers from the same scope. The host still owns tool policy, tool budgets and cancellation of external operations. Legacy provider/planner overrides are rejected. If the gateway requires a final large model, every configured synthesizer candidate must have an eligible assignment in the host inventory/policy before any model dispatch. Traces identify the selected catalog route; configuration host labels are not physical execution attestations.
|
|
221
|
+
|
|
222
|
+
## Existing mcoda project tasks
|
|
223
|
+
|
|
224
|
+
Use `mcoda codali chat --project-task TASK_KEY --workspace-root /path/to/repo`, or `mcoda codali exec "Complete the existing task" --project-task TASK_KEY` with the desired permission profile. This opens an existing workspace task database; it does not initialize a project in an ordinary repository. Resume attached sessions through `mcoda codali resume SESSION_ID`. The standalone library accepts the small `ProjectTaskAuthority` contract for embedded hosts.
|
|
225
|
+
|
|
226
|
+
The project task title/description remains part of the original objective. Terminal phases/subtasks describe execution of that one parent task. `McodaProjectTaskAuthority` uses the existing `WorkspaceRepository` transaction and `TaskStateService` status-event path. Canonical task revision and predecessor status fence claims; lease renewal and checks before model/tool execution stop stale owners. A running legacy task without a Codali lease cannot be taken over. Planning permissions read project state without claiming or submitting it.
|
|
227
|
+
|
|
228
|
+
Verified local completion writes a durable submission intent, hands the task to `ready_to_code_review`, then acknowledges local completion. mcoda review and QA remain required. Replaying a lost response checks the operation ID, evidence digest, original revision and accepted revision. Recovery refuses changed inputs or a changed project review state. Session evidence cannot be deleted until the project task is completed or cancelled. A local project execution fork is refused because it would introduce another status owner.
|
|
229
|
+
|
|
230
|
+
`runConfiguredPipeline` adapts the existing cognitive pipeline to the same model scope. Its retrieval-query, architect, builder and optional interpreter use the `router`, `architect`, `worker` and `repair` bindings. Builder tool calls share a counter across retries. The embedded host remains responsible for retrieval-tool metering, a configured Docdex client, policy checks/patch permissions, memory persistence and a validator using the scope signal. Legacy callbacks that silently swap providers are rejected. These adapters are available for migration; older application call sites still require rollout and qualification before the configuration migration is complete.
|
|
231
|
+
|
|
232
|
+
`ValidationRunner` executes checks asynchronously, accepts the host cancellation signal and an optional shell executor, and preserves timeout/failure outcomes. The terminal's executor remains the isolation boundary; using an allowlisted command alone is not isolation.
|
|
233
|
+
|
|
234
|
+
Media workers persist an artifact receipt before atomically publishing the complete, synced output file. A restarted client can validate the receipt's session/job/model/configuration identity, file format, byte count and checksum, then acknowledge success without another render. An incomplete or corrupt receipt leaves the job uncertain. Reconciliation probes the SQLite execution lock rather than trusting a PID that may have been reused. This closes the local receipt crash window; remote jobs whose responses never reached the client still require backend reconciliation support or an explicitly confirmed outcome.
|
|
235
|
+
Durable media providers can declare `mediaJobsUrl` on the same origin as
|
|
236
|
+
`baseUrl`. The `mswarm-media-jobs-v1` transport persists a client UUID before
|
|
237
|
+
submission and reconciles by that UUID after a disconnect. Reusing a UUID with
|
|
238
|
+
different input is rejected. Recovery reads the original job; it does not
|
|
239
|
+
resubmit an uncertain render. Job summaries include the server invocation and
|
|
240
|
+
node IDs, cancellation acknowledgement, expiry and available usage.
|
|
241
|
+
|
|
242
|
+
The server retains a completed artifact for one hour, or until the client
|
|
243
|
+
acknowledges its response checksum after persisting a verified local artifact.
|
|
244
|
+
Expired server artifacts cannot be recovered by regenerating them silently.
|
|
245
|
+
Cancellation that wins before the node start acknowledgement prevents
|
|
246
|
+
inference. Cancellation after that boundary remains requested and unconfirmed;
|
|
247
|
+
disconnecting an HTTP request does not prove that a native render stopped.
|
|
248
|
+
Synchronous providers remain supported with explicitly limited remote recovery.
|
|
249
|
+
`codali setup` negotiates this API; `codali doctor` reports the selected protocol.
|
|
250
|
+
|
|
251
|
+
The isolated executor discovers host Node/npm/pnpm/yarn/bun installations outside
|
|
252
|
+
the workspace. On Linux it mounts only the executable or a matching package root
|
|
253
|
+
read-only and installs sandbox PATH aliases. It does not mount the user's home,
|
|
254
|
+
adjacent packages, credentials or package-manager caches. Other tools already
|
|
255
|
+
under system runtime paths keep working; additional private toolchains are not
|
|
256
|
+
implicitly exposed. The installed Raijin pnpm has passed an isolated fixture
|
|
257
|
+
test. Linux and macOS Node 20/22 platform CI passes the isolation/toolchain suite;
|
|
258
|
+
this does not replace clean-package and production qualification. The macOS adapter creates a private
|
|
259
|
+
temporary directory for each command, points HOME/TMPDIR there, and removes it
|
|
260
|
+
after process cleanup. It grants no general read/write access to other users'
|
|
261
|
+
temporary files. Linux uses a private temporary filesystem and pins TMPDIR to
|
|
262
|
+
that filesystem.
|
|
263
|
+
|
|
264
|
+
Release qualification uses `scripts/verify-codali-package-install.mjs` after
|
|
265
|
+
the package build. It packs twice, compares archive hashes, installs the
|
|
266
|
+
Codali/shared/database tarballs into an empty project, and exercises the
|
|
267
|
+
installed executable, public API, native SQLite and session persistence.
|
|
268
|
+
Configuration failures must emit valid JSON without modifying user files;
|
|
269
|
+
local uninstall must preserve workspace data. The platform workflow covers
|
|
270
|
+
Linux x64 and macOS Intel/ARM on Node 20/22. Its recorded results, rather than
|
|
271
|
+
the matrix definition, determine which builds are qualified. The Intel runner
|
|
272
|
+
uses GitHub's explicit `macos-15-intel` label; see the
|
|
273
|
+
[runner architecture table](https://docs.github.com/en/actions/reference/runners/github-hosted-runners).
|
|
274
|
+
|
|
275
|
+
The packer canonicalizes the packed JSON manifest because pnpm can insert
|
|
276
|
+
rewritten workspace dependencies in a different order between packs. Other
|
|
277
|
+
archive entries remain unchanged. The publisher checks all manifests and
|
|
278
|
+
versions before registry writes, publishes those exact tarballs, and explicitly
|
|
279
|
+
uses `next` for prereleases and `latest` for stable versions. An existing
|
|
280
|
+
version must have identical registry integrity; rerunning a release does not
|
|
281
|
+
move its dist-tags. Registry errors other than an explicit missing version
|
|
282
|
+
stop publication.
|
|
283
|
+
|
|
284
|
+
CI now builds the Linux publication tarballs once and supplies those same bytes
|
|
285
|
+
to every terminal installation job. `package-artifacts.json` records package
|
|
286
|
+
identities, SHA256 values and the CI source revision. Consumers validate those
|
|
287
|
+
records before installation; the release publisher consumes the qualified
|
|
288
|
+
bundle through `MCODA_PUBLISH_ARTIFACTS_DIR` without repacking it. Release
|
|
289
|
+
publication waits for the six Node/platform installation jobs. Local checks can
|
|
290
|
+
use `--artifacts-dir PATH`; their report leaves source revision unknown when
|
|
291
|
+
they were not run with a CI revision.
|
|
292
|
+
|
|
293
|
+
Codali publication also requires checksum-pinned Docdex archives for Linux
|
|
294
|
+
x64 GNU, macOS Intel and macOS ARM. An empty development runtime manifest is
|
|
295
|
+
valid for local work with an explicit qualified binary, but cannot be
|
|
296
|
+
published through the release script. Clean installation does not substitute
|
|
297
|
+
for the live routing, media, long-session and canary gates in the build plan.
|
|
298
|
+
|
|
299
|
+
### Session storage
|
|
300
|
+
|
|
301
|
+
Session storage rejects redirected directories beneath its configured boundary,
|
|
302
|
+
symlink or hard-linked state files, unsafe summary references and unknown
|
|
303
|
+
metadata/transcript/summary versions. Host-selected external storage remains
|
|
304
|
+
supported; repository configuration cannot enable it. Atomic replacement syncs
|
|
305
|
+
the file and directory. An I/O error after rename can leave the new complete
|
|
306
|
+
state visible while the caller receives an error: recovery must reread the
|
|
307
|
+
durable revision instead of assuming rollback. These checks do not isolate the
|
|
308
|
+
CLI from a hostile process running as the same OS user.
|
|
309
|
+
|
|
310
|
+
### Planning evaluation
|
|
311
|
+
|
|
312
|
+
Planning mode uses a separate planning instruction set and refuses task claims,
|
|
313
|
+
execution verification and goal completion at the permission gate, even if a
|
|
314
|
+
model fabricates a call to an unadvertised tool. It records plans and decisions
|
|
315
|
+
while leaving the future implementation goal open.
|
|
316
|
+
|
|
317
|
+
`eval/PlanningCorpusRunner.runPlanningCorpus` runs six bounded planning probes
|
|
318
|
+
through the real session controller, configured provider and `plan` permission
|
|
319
|
+
profile. It accepts `configPath`, a new `outputRoot`, optional `caseIds`, `effort`
|
|
320
|
+
and cancellation `signal`. Use a frozen package installation and retain its
|
|
321
|
+
manifest; the runner refuses configuration or compiled-client changes between
|
|
322
|
+
cases. It does not publish, execute a planned task or modify the supplied
|
|
323
|
+
production repositories.
|
|
324
|
+
|
|
325
|
+
The probes cover additive migration, artifact recovery, embedding-space changes,
|
|
326
|
+
worker fencing, connector authorization and usage accounting. Grading checks
|
|
327
|
+
durable requirement IDs/text, ownership, dependency reachability, narrow paths,
|
|
328
|
+
phases, constrained architecture choices, original intent, workspace preservation
|
|
329
|
+
and compaction/resume. Invented criteria and premature completion fail. The
|
|
330
|
+
grader's reference plans and dependency answers stay outside model workspaces;
|
|
331
|
+
mutation tests deliberately break each major contract.
|
|
332
|
+
|
|
333
|
+
These are closed-world planning probes with explicit criterion labels and
|
|
334
|
+
architecture options. Rationale grading checks presence, not its semantic
|
|
335
|
+
quality. Docdex is disabled because the probes contain no code; retrieval,
|
|
336
|
+
implementation, multi-hour retention, helper benefit and unrestricted architecture
|
|
337
|
+
quality require separate evidence. Reports retain failures, routes, usage and
|
|
338
|
+
the actual work record. A rerun used to debug a failure is diagnostic evidence,
|
|
339
|
+
not a fresh held-out result.
|
|
340
|
+
|
|
341
|
+
### Workflow evaluation
|
|
342
|
+
|
|
343
|
+
Pass `terminalWorkflowCorpusDefinition()` from `eval/TerminalWorkflowCorpus`
|
|
344
|
+
as the `corpus` option to `runTerminalCorpus` to run twelve separate workflow
|
|
345
|
+
fixtures. Eight require coordinated changes in two modules and public regression
|
|
346
|
+
tests. Three require source-backed repository reports, and one researches pinned
|
|
347
|
+
fictional vendor documents. Report tasks permit only the report file to change;
|
|
348
|
+
their tests and source files remain immutable. This research fixture does not
|
|
349
|
+
measure live web retrieval.
|
|
350
|
+
|
|
351
|
+
Each corpus owns its version, content hash, task list and stated limitations.
|
|
352
|
+
Reference implementations and hidden assertions stay outside the agent's
|
|
353
|
+
workspace. The isolated grader checks behavior, public test outcomes, required
|
|
354
|
+
test extensions, protected files and exact change scope. Reference/starter checks
|
|
355
|
+
and deliberately wrong reports, test weakening and unauthorized edits validate
|
|
356
|
+
the grader before live runs. Retain the frozen installed client and configuration
|
|
357
|
+
with every result. First attempts are qualification observations; corrective
|
|
358
|
+
reruns must be labeled diagnostic, with the original failures preserved.
|
|
359
|
+
|
|
360
|
+
`eval/LongWorkflowJourney.runLongWorkflowJourney` composes four module contracts
|
|
361
|
+
into one durable goal. Select `data-delivery`, `service-adapters`, `billing-audit`
|
|
362
|
+
or `localized-export`, and supply `configPath` and a new `outputRoot`. Four child
|
|
363
|
+
processes perform planning, execution to a verified-task checkpoint, resumed
|
|
364
|
+
execution with an additional delivery requirement and concurrent user notes,
|
|
365
|
+
then final recovery. Five explicit compactions are required. Each boundary
|
|
366
|
+
compares the exact durable state; final grading checks the original requirements,
|
|
367
|
+
architecture history, dependency ordering, protected notes and module artifacts.
|
|
368
|
+
|
|
369
|
+
These journeys reuse coding contracts and measure continuity separately from
|
|
370
|
+
fresh coding accuracy. They retain failed stages instead of automatically
|
|
371
|
+
retrying them. `multiHourDurationReached` reports whether actual elapsed work
|
|
372
|
+
reached two hours; the runner never inserts idle time. Clean checkpoint recovery
|
|
373
|
+
does not replace crash/uncertain-side-effect fixtures or mixed-media tests. The
|
|
374
|
+
host-owned child launcher passes declared provider credentials to the CLI process
|
|
375
|
+
only; model-requested shell tools retain their separate restricted environment.
|
|
376
|
+
|
|
377
|
+
Focused replanning can use `work_plan` with `mode: "update"`: only the named
|
|
378
|
+
contracts change, and omitted tasks and phases remain canonical. The default
|
|
379
|
+
`replace` mode still requires the full plan. Both modes enforce required
|
|
380
|
+
coverage, verified task/phase immutability, dependency validity and the single
|
|
381
|
+
active writer rule.
|
|
382
|
+
|
|
383
|
+
Host-issued tool receipt references survive model-context truncation. Shell
|
|
384
|
+
receipts and independent-review excerpts preserve the beginning, a detected
|
|
385
|
+
failure region, and the end of bounded output; omission markers never imply
|
|
386
|
+
that an unretained full log is available. Successful test exit status remains
|
|
387
|
+
separate from whether the tests prove the requested behavior.
|
package/README.md
CHANGED
|
@@ -1,6 +1,108 @@
|
|
|
1
1
|
# @mcoda/codali
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Codali is mcoda's terminal coding agent and embeddable tool runtime.
|
|
4
|
+
|
|
5
|
+
## Terminal quick start
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
codali login # masked mSwarm API-key entry
|
|
9
|
+
codali setup # discover authorized model routes and prepare private Docdex
|
|
10
|
+
codali doctor
|
|
11
|
+
codali chat --permissions ask --effort medium
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
For automation, inject `MCODA_MSWARM_API_KEY` through your secret manager, or pipe
|
|
15
|
+
the key to `codali login --stdin`. Keys are never command-line arguments. Existing
|
|
16
|
+
encrypted mcoda credentials are reused when their service origin matches.
|
|
17
|
+
`codali logout` removes the terminal credential and disables that fallback;
|
|
18
|
+
an explicitly supplied environment credential still takes precedence.
|
|
19
|
+
|
|
20
|
+
```sh
|
|
21
|
+
codali exec 'Fix the failing parser test and verify the fix' \
|
|
22
|
+
--permissions workspace --effort high --json
|
|
23
|
+
codali sessions
|
|
24
|
+
codali resume SESSION_ID --permissions workspace --effort high --json
|
|
25
|
+
codali inspect SESSION_ID
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The terminal uses a versioned orchestration file: `--config PATH`, then
|
|
29
|
+
`CODALI_ORCHESTRATION_CONFIG`, then `~/.codali/orchestration.json`. Repository files
|
|
30
|
+
cannot silently select credential destinations or change terminal permissions.
|
|
31
|
+
See [the configuration reference](ORCHESTRATION.md) and the packaged `config/`
|
|
32
|
+
examples. `setup` never overwrites an existing profile. `/config reload` applies
|
|
33
|
+
an edited, validated profile between turns; submitted media jobs keep their
|
|
34
|
+
original configuration. All optional model roles must be explicitly bound or
|
|
35
|
+
disabled. Setup selects only catalog routes that identify their backend as Strata
|
|
36
|
+
for large-model work; it does not choose a paid fallback.
|
|
37
|
+
|
|
38
|
+
Setup enables embeddings only when the catalog declares a pinned model digest,
|
|
39
|
+
dimensions, query/document prefixes, normalization and pooling. Replicas must
|
|
40
|
+
match that entire contract. When embeddings are available, setup installs the
|
|
41
|
+
release-pinned Docdex binary in `~/.local/state/codali/runtimes/docdex/`, verifies
|
|
42
|
+
archive and binary checksums, and checks managed-client capabilities. It records
|
|
43
|
+
the binary path and checksum in the profile; sessions verify the checksum before
|
|
44
|
+
launching a private daemon. `doctor` checks this configured runtime.
|
|
45
|
+
|
|
46
|
+
For a locally built qualified binary, use `codali setup --docdex-binary /absolute/path/docdexd`.
|
|
47
|
+
Development builds without pinned release artifacts require this option. Setup
|
|
48
|
+
does not initialize the global daemon or overwrite its configuration. A failed
|
|
49
|
+
runtime qualification leaves the new profile unwritten; previous installed
|
|
50
|
+
runtime versions remain available for existing profiles.
|
|
51
|
+
|
|
52
|
+
| Command | Purpose |
|
|
53
|
+
| --- | --- |
|
|
54
|
+
| `/status`, `/usage` | Current execution state, local accounting and server limits |
|
|
55
|
+
| `/permissions [plan\|ask\|workspace\|clear]` | Inspect/change policy or revoke exact session grants |
|
|
56
|
+
| `/effort [low\|medium\|high\|max]` | Change the shared model, tool, token and time budget between turns |
|
|
57
|
+
| `/goal`, `/plan`, `/tasks`, `/decisions` | Read the durable objective, criteria, dependencies and architecture decisions |
|
|
58
|
+
| `/models`, `/config [reload]` | Inspect configured routes and the effective configuration hash |
|
|
59
|
+
| `/context`, `/diff`, `/review` | Inspect retained context/changes or request a new review task |
|
|
60
|
+
| `/checkpoint`, `/compact` | Save progress or reduce conversation context while preserving canonical work state |
|
|
61
|
+
| `/cancel`, `/continue`, `/steer TEXT` | Interrupt, continue, or apply an explicit goal amendment |
|
|
62
|
+
| `/sessions`, `/resume ID`, `/fork`, `/new TEXT` | Manage sessions; forks require fresh verification and reset grants |
|
|
63
|
+
| `/artifacts` | Inspect durable image, audio and video jobs and artifact checksums |
|
|
64
|
+
| `/reconcile ID success\|failed NOTE` | Record an observed outcome for an interrupted tool invocation |
|
|
65
|
+
| `/export`, `/retention DAYS`, `/delete-session ID` | Export redacted events, preview retention candidates, or delete an inactive session |
|
|
66
|
+
|
|
67
|
+
`plan` permits reads; `ask` asks before side effects; `workspace` permits scoped
|
|
68
|
+
file edits and isolated shell commands. Web research, memory writes and media
|
|
69
|
+
generation have separate approval categories. Automation can explicitly enable
|
|
70
|
+
them with `--allow-web`, `--allow-memory` and `--allow-media`. Shell networking is
|
|
71
|
+
disabled unless `--allow-network` is supplied. Noninteractive requests for approval
|
|
72
|
+
are denied. Session grants match the exact tool arguments and remain subordinate
|
|
73
|
+
to the current policy. Linux execution requires bubblewrap; run `doctor` to check
|
|
74
|
+
the available platform executor.
|
|
75
|
+
|
|
76
|
+
The executor discovers installed Node/package-manager, Python and Rust tools from
|
|
77
|
+
the host's trusted PATH. Private Python standard libraries and the selected Rust
|
|
78
|
+
toolchain libraries are exposed read-only; Cargo and Python caches use a temporary
|
|
79
|
+
private home. Rustup proxies resolve to an already-installed host toolchain (the
|
|
80
|
+
host's `RUSTUP_TOOLCHAIN` or default), without repository-triggered downloads.
|
|
81
|
+
On macOS, the selected installed Xcode developer tools and SDK are also read-only.
|
|
82
|
+
Use `doctor` to inspect selected executable paths. Dependency installation still
|
|
83
|
+
requires network permission, and build outputs must fit the task's write scope.
|
|
84
|
+
|
|
85
|
+
Each task is tied to the original goal and a bounded path scope. A successful tool
|
|
86
|
+
call is not task completion: changed code needs recorded validation and separate
|
|
87
|
+
review, and the goal gate checks requirement coverage, current file hashes and
|
|
88
|
+
unresolved operations. Interruptions preserve checkpoints and uncertain outcomes;
|
|
89
|
+
they do not trigger an automatic retry of a side effect. Session data lives under
|
|
90
|
+
`~/.local/state/codali/workspaces/`, outside the editable repository. Media workers
|
|
91
|
+
survive terminal disconnects and keep binary artifacts out of model transcripts.
|
|
92
|
+
|
|
93
|
+
`--json` emits JSONL events. Stable fields are `schemaVersion`, `type` and `data`;
|
|
94
|
+
session events also carry `id`, `sessionId`, `sequence` and `at`. `turn_result`
|
|
95
|
+
contains `completed`; consumers must check it. `command_failed` covers command
|
|
96
|
+
failures. Exit codes are 0 for verified completion (or a requested planning turn),
|
|
97
|
+
1 for errors, 2 for open/blocked work, and 130 for cancellation. `--plain` disables
|
|
98
|
+
terminal editing escapes and token streaming. Ctrl-C requests cancellation;
|
|
99
|
+
a second Ctrl-C closes the terminal after cleanup.
|
|
100
|
+
|
|
101
|
+
## Legacy runtime commands
|
|
102
|
+
|
|
103
|
+
The following commands preserve the previous provider/configuration contract.
|
|
104
|
+
They do not automatically inherit the terminal orchestration profile. Embedded
|
|
105
|
+
hosts opt in with the trusted `orchestration.resolved` runtime input.
|
|
4
106
|
|
|
5
107
|
## Usage
|
|
6
108
|
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"profile": "alternate-local-example",
|
|
4
|
+
"providers": {
|
|
5
|
+
"local": {
|
|
6
|
+
"adapter": "openai-compatible",
|
|
7
|
+
"baseUrl": "http://127.0.0.1:8080/v1"
|
|
8
|
+
}
|
|
9
|
+
},
|
|
10
|
+
"models": {
|
|
11
|
+
"local-coder": {
|
|
12
|
+
"provider": "local",
|
|
13
|
+
"catalogId": "replace-with-your-model-id",
|
|
14
|
+
"revision": "replace-with-artifact-revision",
|
|
15
|
+
"operations": [
|
|
16
|
+
"chat.completions"
|
|
17
|
+
],
|
|
18
|
+
"contextWindow": 32768,
|
|
19
|
+
"maxOutputTokens": 4096,
|
|
20
|
+
"supportsTools": true,
|
|
21
|
+
"supportsStreaming": false
|
|
22
|
+
}
|
|
23
|
+
},
|
|
24
|
+
"bindings": {
|
|
25
|
+
"lead": {
|
|
26
|
+
"candidates": [
|
|
27
|
+
"local-coder"
|
|
28
|
+
]
|
|
29
|
+
},
|
|
30
|
+
"reviewer": {
|
|
31
|
+
"useBinding": "lead"
|
|
32
|
+
},
|
|
33
|
+
"helper": {
|
|
34
|
+
"enabled": false
|
|
35
|
+
},
|
|
36
|
+
"embedding": {
|
|
37
|
+
"enabled": false
|
|
38
|
+
},
|
|
39
|
+
"image": {
|
|
40
|
+
"enabled": false
|
|
41
|
+
},
|
|
42
|
+
"audio": {
|
|
43
|
+
"enabled": false
|
|
44
|
+
},
|
|
45
|
+
"video": {
|
|
46
|
+
"enabled": false
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
{
|
|
2
|
+
"schemaVersion": 1,
|
|
3
|
+
"version": "0.2.100-codali.4",
|
|
4
|
+
"artifacts": {
|
|
5
|
+
"linux-x64-gnu": {
|
|
6
|
+
"url": "https://github.com/bekirdag/docdex/releases/download/v0.2.100-codali.4/docdexd-linux-x64-gnu.tar.gz",
|
|
7
|
+
"archiveSha256": "e13db7de311eae5a19361d14f9782e798bb99313f33fcedc3e689b4e0ef432e2",
|
|
8
|
+
"binarySha256": "c8db1cce2edfad91774f42b053e7641ab0442ecaf060304cdc398bc8bb8e4964"
|
|
9
|
+
},
|
|
10
|
+
"darwin-x64": {
|
|
11
|
+
"url": "https://github.com/bekirdag/docdex/releases/download/v0.2.100-codali.4/docdexd-darwin-x64.tar.gz",
|
|
12
|
+
"archiveSha256": "46230b0edd2babca8b010aa1dd7b07dbf89fccae0b1ac807bda4e8cd78e89f5a",
|
|
13
|
+
"binarySha256": "5b5e93bb4661bb3fdf4da2535177f9adb02298aecf0a44b27ee9dad2b89309a9"
|
|
14
|
+
},
|
|
15
|
+
"darwin-arm64": {
|
|
16
|
+
"url": "https://github.com/bekirdag/docdex/releases/download/v0.2.100-codali.4/docdexd-darwin-arm64.tar.gz",
|
|
17
|
+
"archiveSha256": "7e0199ec8f708f62e55e274e27755bfde149807b0a61a0a81519e667a96005c5",
|
|
18
|
+
"binarySha256": "abd359b39bb7e3caa63d78b4e383caa7f4ec3f32d4ec5b8a9bb2be16bc97babb"
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|