@cleocode/contracts 2026.10.27 → 2026.11.1-canary.11
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 +2 -1
- package/dist/.source-stamp.json +4 -0
- package/dist/__tests__/acceptance-gate.test.js +15 -3
- package/dist/__tests__/acceptance-gate.test.js.map +1 -1
- package/dist/__tests__/completion-operation-contracts.test.js +1 -1
- package/dist/__tests__/completion-operation-contracts.test.js.map +1 -1
- package/dist/__tests__/evidence-atom-schema.test.js +3 -1
- package/dist/__tests__/evidence-atom-schema.test.js.map +1 -1
- package/dist/__tests__/gateway-contract.test.js +1 -1
- package/dist/__tests__/gateway-contract.test.js.map +1 -1
- package/dist/__tests__/memory-wire-shapes.test.js.map +1 -1
- package/dist/__tests__/operation-def.test.js +4 -3
- package/dist/__tests__/operation-def.test.js.map +1 -1
- package/dist/acceptance-gate-schema.d.ts +25 -0
- package/dist/acceptance-gate-schema.d.ts.map +1 -1
- package/dist/acceptance-gate-schema.js +5 -0
- package/dist/acceptance-gate-schema.js.map +1 -1
- package/dist/acceptance-gate.d.ts +8 -0
- package/dist/acceptance-gate.d.ts.map +1 -1
- package/dist/brain-graph.d.ts +1 -1
- package/dist/brain-graph.js +1 -1
- package/dist/caamp-markers.d.ts +11 -0
- package/dist/caamp-markers.d.ts.map +1 -1
- package/dist/config/manifest.d.ts.map +1 -1
- package/dist/config/manifest.js +13 -0
- package/dist/config/manifest.js.map +1 -1
- package/dist/{config.d.ts → config/types.d.ts} +130 -6
- package/dist/config/types.d.ts.map +1 -0
- package/dist/{config.js → config/types.js} +1 -1
- package/dist/config/types.js.map +1 -0
- package/dist/config/worker-policy.d.ts +42 -0
- package/dist/config/worker-policy.d.ts.map +1 -0
- package/dist/config/worker-policy.js +35 -0
- package/dist/config/worker-policy.js.map +1 -0
- package/dist/data-accessor.d.ts +15 -0
- package/dist/data-accessor.d.ts.map +1 -1
- package/dist/data-accessor.js.map +1 -1
- package/dist/dependency.d.ts +2 -0
- package/dist/dependency.d.ts.map +1 -1
- package/dist/dispatch/__tests__/operation-envelope-snapshots.test.js +0 -6
- package/dist/dispatch/__tests__/operation-envelope-snapshots.test.js.map +1 -1
- package/dist/dispatch/identity.d.ts +3 -8
- package/dist/dispatch/identity.d.ts.map +1 -1
- package/dist/dispatch/identity.js +2 -8
- package/dist/dispatch/identity.js.map +1 -1
- package/dist/dispatch/operations-registry.d.ts.map +1 -1
- package/dist/dispatch/operations-registry.js +360 -513
- package/dist/dispatch/operations-registry.js.map +1 -1
- package/dist/docs/modernize.d.ts +468 -0
- package/dist/docs/modernize.d.ts.map +1 -0
- package/dist/docs/modernize.js +145 -0
- package/dist/docs/modernize.js.map +1 -0
- package/dist/docs/provenance.d.ts +6 -6
- package/dist/docs-taxonomy.d.ts +6 -0
- package/dist/docs-taxonomy.d.ts.map +1 -1
- package/dist/docs-taxonomy.js +38 -1
- package/dist/docs-taxonomy.js.map +1 -1
- package/dist/done-plan.d.ts +34 -3
- package/dist/done-plan.d.ts.map +1 -1
- package/dist/evidence-atom-schema.d.ts +78 -4
- package/dist/evidence-atom-schema.d.ts.map +1 -1
- package/dist/evidence-atom-schema.js +136 -11
- package/dist/evidence-atom-schema.js.map +1 -1
- package/dist/evidence-record-schema.d.ts +2 -2
- package/dist/exit-codes.d.ts +93 -0
- package/dist/exit-codes.d.ts.map +1 -1
- package/dist/exit-codes.js +93 -0
- package/dist/exit-codes.js.map +1 -1
- package/dist/{gateway.d.ts → gateway/index.d.ts} +4 -4
- package/dist/gateway/index.d.ts.map +1 -0
- package/dist/{gateway.js → gateway/index.js} +2 -2
- package/dist/gateway/index.js.map +1 -0
- package/dist/gateway/rpc/messages.d.ts +4 -4
- package/dist/gateway/rpc/messages.js +1 -1
- package/dist/gateway/rpc/messages.js.map +1 -1
- package/dist/git-hooks.d.ts +29 -3
- package/dist/git-hooks.d.ts.map +1 -1
- package/dist/git-hooks.js +34 -3
- package/dist/git-hooks.js.map +1 -1
- package/dist/heavy-command-hook.d.ts +5 -0
- package/dist/heavy-command-hook.d.ts.map +1 -1
- package/dist/index.d.ts +23 -19
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +10 -6
- package/dist/index.js.map +1 -1
- package/dist/invariants/sync-write-invariants.d.ts.map +1 -1
- package/dist/invariants/sync-write-invariants.js +29 -1
- package/dist/invariants/sync-write-invariants.js.map +1 -1
- package/dist/jobs.d.ts +5 -0
- package/dist/jobs.d.ts.map +1 -1
- package/dist/lease-ipc/messages.d.ts +5 -5
- package/dist/llm/onboarding.d.ts +1 -1
- package/dist/llm/system-of-use.d.ts +1 -1
- package/dist/llm/system-of-use.d.ts.map +1 -1
- package/dist/llm/system-resolver.d.ts +1 -1
- package/dist/llm/system-resolver.d.ts.map +1 -1
- package/dist/{memory.d.ts → memory/index.d.ts} +1 -1
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/{memory.js → memory/index.js} +1 -1
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/search.d.ts +20 -2
- package/dist/memory/search.d.ts.map +1 -1
- package/dist/merge-close.d.ts +277 -0
- package/dist/merge-close.d.ts.map +1 -0
- package/dist/merge-close.js +16 -0
- package/dist/merge-close.js.map +1 -0
- package/dist/nexus-cloud.d.ts +1 -1
- package/dist/operations/admin.d.ts +6 -0
- package/dist/operations/admin.d.ts.map +1 -1
- package/dist/operations/docs.d.ts +233 -9
- package/dist/operations/docs.d.ts.map +1 -1
- package/dist/operations/docs.js.map +1 -1
- package/dist/operations/index.d.ts +0 -1
- package/dist/operations/index.d.ts.map +1 -1
- package/dist/operations/index.js +0 -1
- package/dist/operations/index.js.map +1 -1
- package/dist/operations/memory.d.ts +7 -4
- package/dist/operations/memory.d.ts.map +1 -1
- package/dist/operations/nexus-scope-map.d.ts +0 -8
- package/dist/operations/nexus-scope-map.d.ts.map +1 -1
- package/dist/operations/nexus-scope-map.js +0 -8
- package/dist/operations/nexus-scope-map.js.map +1 -1
- package/dist/operations/nexus.d.ts +2 -10
- package/dist/operations/nexus.d.ts.map +1 -1
- package/dist/operations/nexus.js.map +1 -1
- package/dist/operations/orchestrate.d.ts +219 -6
- package/dist/operations/orchestrate.d.ts.map +1 -1
- package/dist/operations/orchestrate.js +329 -1
- package/dist/operations/orchestrate.js.map +1 -1
- package/dist/operations/output-contracts-data.js +1 -1
- package/dist/operations/output-contracts-data.js.map +1 -1
- package/dist/operations/release.d.ts +0 -79
- package/dist/operations/release.d.ts.map +1 -1
- package/dist/operations/session.d.ts +1 -1
- package/dist/operations/session.d.ts.map +1 -1
- package/dist/operations/tasks.d.ts +18 -6
- package/dist/operations/tasks.d.ts.map +1 -1
- package/dist/operations/tasks.js.map +1 -1
- package/dist/operations/validate.d.ts +6 -0
- package/dist/operations/validate.d.ts.map +1 -1
- package/dist/operations/worktree.d.ts +209 -19
- package/dist/operations/worktree.d.ts.map +1 -1
- package/dist/orca-execution.d.ts +533 -0
- package/dist/orca-execution.d.ts.map +1 -0
- package/dist/orca-execution.js +385 -0
- package/dist/orca-execution.js.map +1 -0
- package/dist/project-context.d.ts +31 -0
- package/dist/project-context.d.ts.map +1 -1
- package/dist/project-hooks.d.ts +8 -8
- package/dist/release/authorization.d.ts +46 -0
- package/dist/release/authorization.d.ts.map +1 -0
- package/dist/release/authorization.js +10 -0
- package/dist/release/authorization.js.map +1 -0
- package/dist/release/hook-pilot.d.ts +1 -1
- package/dist/resource-governor.d.ts +44 -0
- package/dist/resource-governor.d.ts.map +1 -1
- package/dist/resource-governor.js +10 -0
- package/dist/resource-governor.js.map +1 -1
- package/dist/review-verdict.d.ts +253 -0
- package/dist/review-verdict.d.ts.map +1 -0
- package/dist/review-verdict.js +20 -0
- package/dist/review-verdict.js.map +1 -0
- package/dist/row-identity.d.ts +11 -0
- package/dist/row-identity.d.ts.map +1 -1
- package/dist/session-journal.d.ts.map +1 -1
- package/dist/session-journal.js +7 -1
- package/dist/session-journal.js.map +1 -1
- package/dist/session.d.ts +11 -0
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js.map +1 -1
- package/dist/skills/migrate.d.ts +1 -1
- package/dist/skills/migrate.js +1 -1
- package/dist/skills/stats.d.ts +1 -1
- package/dist/skills/stats.js +1 -1
- package/dist/spawn-types.d.ts +57 -0
- package/dist/spawn-types.d.ts.map +1 -1
- package/dist/spawn.d.ts +43 -0
- package/dist/spawn.d.ts.map +1 -1
- package/dist/spawn.js +1 -0
- package/dist/spawn.js.map +1 -1
- package/dist/status-registry.d.ts +27 -0
- package/dist/status-registry.d.ts.map +1 -1
- package/dist/status-registry.js +28 -0
- package/dist/status-registry.js.map +1 -1
- package/dist/table-classification.d.ts +22 -0
- package/dist/table-classification.d.ts.map +1 -1
- package/dist/task-id.d.ts +8 -10
- package/dist/task-id.d.ts.map +1 -1
- package/dist/task-id.js +9 -48
- package/dist/task-id.js.map +1 -1
- package/dist/task-record.d.ts +10 -1
- package/dist/task-record.d.ts.map +1 -1
- package/dist/task.d.ts +177 -4
- package/dist/task.d.ts.map +1 -1
- package/dist/task.js.map +1 -1
- package/dist/{tasks.d.ts → tasks/index.d.ts} +3 -3
- package/dist/tasks/index.d.ts.map +1 -0
- package/dist/{tasks.js → tasks/index.js} +2 -2
- package/dist/tasks/index.js.map +1 -0
- package/dist/templates/manifest.d.ts +1 -1
- package/dist/tools/build-task-tree.d.ts +1 -1
- package/dist/tools/build-task-tree.d.ts.map +1 -1
- package/dist/workgraph.d.ts +56 -56
- package/package.json +22 -6
- package/schemas/acceptance-gate.schema.json +24 -0
- package/schemas/task.schema.json +24 -0
- package/src/__tests__/__snapshots__/operations-registry.test.ts.snap +1 -1
- package/src/__tests__/acceptance-gate.test.ts +16 -3
- package/src/__tests__/completion-operation-contracts.test.ts +1 -1
- package/src/__tests__/evidence-atom-schema.test.ts +3 -1
- package/src/__tests__/gateway-contract.test.ts +1 -1
- package/src/__tests__/llm-config-schema.test.ts +1 -1
- package/src/__tests__/memory-wire-shapes.test.ts +4 -1
- package/src/__tests__/operation-def.test.ts +4 -3
- package/src/acceptance-gate-schema.ts +5 -0
- package/src/acceptance-gate.ts +9 -0
- package/src/brain-graph.ts +1 -1
- package/src/caamp-markers.ts +11 -0
- package/src/config/manifest.ts +13 -0
- package/src/{config.ts → config/types.ts} +134 -5
- package/src/config/worker-policy.ts +55 -0
- package/src/data-accessor.ts +16 -0
- package/src/dependency.ts +2 -0
- package/src/dispatch/__tests__/operation-envelope-snapshots.test.ts +0 -6
- package/src/dispatch/identity.ts +2 -8
- package/src/dispatch/operations-registry.ts +377 -525
- package/src/docs/modernize.ts +442 -0
- package/src/docs-taxonomy.ts +44 -1
- package/src/done-plan.ts +33 -2
- package/src/evidence-atom-schema.ts +167 -14
- package/src/exit-codes.ts +95 -0
- package/src/{gateway.ts → gateway/index.ts} +3 -3
- package/src/gateway/rpc/messages.ts +1 -1
- package/src/git-hooks.ts +43 -3
- package/src/heavy-command-hook.ts +5 -0
- package/src/index.ts +132 -48
- package/src/invariants/sync-write-invariants.ts +30 -0
- package/src/jobs.ts +5 -0
- package/src/llm/onboarding.ts +1 -1
- package/src/llm/system-of-use.ts +1 -1
- package/src/llm/system-resolver.ts +1 -1
- package/src/memory/search.ts +17 -2
- package/src/merge-close.ts +291 -0
- package/src/operations/admin.ts +6 -0
- package/src/operations/docs.ts +242 -10
- package/src/operations/index.ts +0 -1
- package/src/operations/memory.ts +7 -4
- package/src/operations/nexus-scope-map.ts +0 -8
- package/src/operations/nexus.ts +2 -11
- package/src/operations/orchestrate.ts +490 -6
- package/src/operations/output-contracts-data.ts +1 -1
- package/src/operations/release.ts +0 -87
- package/src/operations/session.ts +1 -1
- package/src/operations/tasks.ts +20 -7
- package/src/operations/validate.ts +6 -0
- package/src/operations/worktree.ts +216 -19
- package/src/orca-execution.ts +528 -0
- package/src/project-context.ts +33 -0
- package/src/release/authorization.ts +48 -0
- package/src/resource-governor.ts +47 -0
- package/src/review-verdict.ts +265 -0
- package/src/row-identity.ts +11 -0
- package/src/session-journal.ts +7 -1
- package/src/session.ts +11 -0
- package/src/skills/migrate.ts +1 -1
- package/src/skills/stats.ts +1 -1
- package/src/spawn-types.ts +75 -0
- package/src/spawn.ts +48 -0
- package/src/status-registry.ts +37 -0
- package/src/table-classification.ts +23 -0
- package/src/task-id.ts +9 -47
- package/src/task-record.ts +10 -1
- package/src/task.ts +171 -4
- package/src/{tasks.ts → tasks/index.ts} +3 -3
- package/src/tools/build-task-tree.ts +1 -1
- package/dist/config.d.ts.map +0 -1
- package/dist/config.js.map +0 -1
- package/dist/gateway.d.ts.map +0 -1
- package/dist/gateway.js.map +0 -1
- package/dist/memory.d.ts.map +0 -1
- package/dist/memory.js.map +0 -1
- package/dist/operations/conduit.d.ts +0 -285
- package/dist/operations/conduit.d.ts.map +0 -1
- package/dist/operations/conduit.js +0 -39
- package/dist/operations/conduit.js.map +0 -1
- package/dist/tasks.d.ts.map +0 -1
- package/dist/tasks.js.map +0 -1
- package/src/operations/conduit.ts +0 -348
- /package/src/{memory.ts → memory/index.ts} +0 -0
|
@@ -0,0 +1,385 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Local Orca execution contracts, independent of model/provider registration.
|
|
3
|
+
*
|
|
4
|
+
* @task T14455
|
|
5
|
+
* @packageDocumentation
|
|
6
|
+
*/
|
|
7
|
+
import { z } from 'zod';
|
|
8
|
+
/** Current public Orca launch APIs cannot carry the native lead's enforced guards. */
|
|
9
|
+
export const ORCA_LEAD_LAUNCH_REFUSAL = {
|
|
10
|
+
code: 'E_LEAD_TOOLS_UNSTRIPPED',
|
|
11
|
+
message: 'Orca cannot enforce lead tool/permission restrictions (--restricted, --tools, --allowedTools, --disallowedTools, --permission-mode, --setting-sources), strict MCP isolation (--mcp-config, --strict-mcp-config), or the owner channel and own session (--session-id, --settings, inherited owner terminal or validated user-only mbx) before launch.',
|
|
12
|
+
fix: 'Run cleo orchestrate lead <epicId> --adapter claude-code for the enforced native lead route, including inside Orca, with validated user-scope mbx for --detached; keep orchestrate.leadWorker.v1 enabled. The Orca backend needs a constrained launch API carrying these argv/settings before it can start a lead.',
|
|
13
|
+
};
|
|
14
|
+
const identifier = z.string().min(1);
|
|
15
|
+
/** Orca server agent ids supported by the local routing contract. */
|
|
16
|
+
export const orcaAgentSchema = z.enum(['codex', 'opencode2', 'claude', 'grok']);
|
|
17
|
+
/** Ordered rotation defaults; availability is verified on the execution host. */
|
|
18
|
+
export const DEFAULT_ORCA_AGENTS = ['codex', 'opencode2', 'claude'];
|
|
19
|
+
/** Harness identity for each supported Orca server agent. */
|
|
20
|
+
export const ORCA_AGENT_HARNESSES = {
|
|
21
|
+
codex: 'codex',
|
|
22
|
+
opencode2: 'opencode',
|
|
23
|
+
claude: 'claude-code',
|
|
24
|
+
grok: 'grok',
|
|
25
|
+
};
|
|
26
|
+
/** Account inventory provider; Grok uses its server-side sign-in. */
|
|
27
|
+
export const ORCA_AGENT_PROVIDERS = {
|
|
28
|
+
codex: 'codex',
|
|
29
|
+
opencode2: 'opencode',
|
|
30
|
+
claude: 'claude',
|
|
31
|
+
grok: null,
|
|
32
|
+
};
|
|
33
|
+
/** Project rotation configuration; duplicates and unsupported ids refuse. */
|
|
34
|
+
export const orchestrateOrcaConfigSchema = z.object({
|
|
35
|
+
agents: z
|
|
36
|
+
.array(orcaAgentSchema)
|
|
37
|
+
.min(1)
|
|
38
|
+
.refine((agents) => new Set(agents).size === agents.length, 'Agent ids must be unique.')
|
|
39
|
+
.default(DEFAULT_ORCA_AGENTS),
|
|
40
|
+
});
|
|
41
|
+
/** Explicit execution endpoint and caller; never inferred from the newest Run. */
|
|
42
|
+
export const orcaContextSchema = z.object({
|
|
43
|
+
runtimeId: identifier,
|
|
44
|
+
coordinatorHandle: identifier,
|
|
45
|
+
executionHostId: z.literal('local'),
|
|
46
|
+
});
|
|
47
|
+
/** Durable routing state for one exact runtime/coordinator Run. */
|
|
48
|
+
export const orcaRoutingRunSchema = z.object({
|
|
49
|
+
runId: identifier.nullable(),
|
|
50
|
+
unconfiguredAgents: z.array(orcaAgentSchema),
|
|
51
|
+
});
|
|
52
|
+
/** Canonically prepared CLEO assignment consumed without allocating another session. */
|
|
53
|
+
export const orcaLaunchSchema = z.object({
|
|
54
|
+
projectId: identifier,
|
|
55
|
+
projectRoot: identifier,
|
|
56
|
+
taskId: identifier,
|
|
57
|
+
instanceId: identifier,
|
|
58
|
+
workerSessionId: identifier,
|
|
59
|
+
agentId: identifier,
|
|
60
|
+
role: z.enum(['worker', 'lead']),
|
|
61
|
+
protocol: identifier,
|
|
62
|
+
worktreePath: identifier,
|
|
63
|
+
worktreeBranch: identifier,
|
|
64
|
+
projectHash: identifier,
|
|
65
|
+
lockToken: identifier,
|
|
66
|
+
prompt: identifier,
|
|
67
|
+
harness: z.enum(['claude-code', 'codex', 'opencode', 'grok', 'kimi']),
|
|
68
|
+
leadMailbox: identifier.nullable(),
|
|
69
|
+
model: identifier.optional(),
|
|
70
|
+
effort: identifier.optional(),
|
|
71
|
+
accountId: identifier.optional(),
|
|
72
|
+
});
|
|
73
|
+
/** Original launch addressing, retained even when a partial receipt supplies ids. */
|
|
74
|
+
export const orcaStartBindingSchema = z.object({
|
|
75
|
+
runId: identifier.nullable(),
|
|
76
|
+
orcaTaskId: identifier.nullable(),
|
|
77
|
+
retryOf: identifier.nullable(),
|
|
78
|
+
});
|
|
79
|
+
/** Durable attempt, stored in the existing local worker record before launch. */
|
|
80
|
+
export const orcaAttemptSchema = z.object({
|
|
81
|
+
backend: z.literal('orca'),
|
|
82
|
+
version: z.literal(1),
|
|
83
|
+
/** Monotonic local CAS revision; repeated identical observations still serialize. */
|
|
84
|
+
revision: z.number().int().nonnegative(),
|
|
85
|
+
context: orcaContextSchema,
|
|
86
|
+
launch: orcaLaunchSchema,
|
|
87
|
+
promptDigest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
88
|
+
workspaceId: identifier,
|
|
89
|
+
workspaceSelector: identifier,
|
|
90
|
+
state: z.enum([
|
|
91
|
+
'prepared',
|
|
92
|
+
'launching',
|
|
93
|
+
'ready',
|
|
94
|
+
'turn_unobserved',
|
|
95
|
+
'outcome_unknown',
|
|
96
|
+
'stop_pending',
|
|
97
|
+
'stop_unknown',
|
|
98
|
+
'stopped',
|
|
99
|
+
'failed',
|
|
100
|
+
'circuit_broken',
|
|
101
|
+
]),
|
|
102
|
+
runId: identifier.nullable(),
|
|
103
|
+
orcaTaskId: identifier.nullable(),
|
|
104
|
+
dispatchId: identifier.nullable(),
|
|
105
|
+
retryOf: identifier.nullable(),
|
|
106
|
+
/** Absent on legacy records, whose original argv cannot safely be reconstructed. */
|
|
107
|
+
startBinding: orcaStartBindingSchema.optional(),
|
|
108
|
+
/** UUID reserved before committing a retry; its first send and every replay use this key. */
|
|
109
|
+
startRequestKey: z.string().uuid().optional(),
|
|
110
|
+
startRequestId: identifier.nullable(),
|
|
111
|
+
/** UUID reserved before committing a stop; its first send and every replay use this key. */
|
|
112
|
+
stopRequestKey: z.string().uuid().optional(),
|
|
113
|
+
/** Orca-issued stop request id, retained only when the stop receipt was received. */
|
|
114
|
+
stopRequestId: identifier.nullable(),
|
|
115
|
+
/**
|
|
116
|
+
* Set when the worker-stop reply came from a runtime that proved it enumerates
|
|
117
|
+
* every helper it stopped, so an omitted helper list means the worker had none.
|
|
118
|
+
*/
|
|
119
|
+
stopHelperEvidence: z.literal('enumerated').optional(),
|
|
120
|
+
failureCount: z.number().int().nonnegative(),
|
|
121
|
+
resourceState: z.string(),
|
|
122
|
+
/** Full receipts retain effects, residual resources and recovery advice. */
|
|
123
|
+
lastReceipt: z.string().nullable(),
|
|
124
|
+
lastError: z.string().nullable(),
|
|
125
|
+
/** Confirmed pre-dispatch refusal; never inferred from a process exit. */
|
|
126
|
+
startRefusal: z.literal('agent_unconfigured').optional(),
|
|
127
|
+
observedAt: z.string(),
|
|
128
|
+
});
|
|
129
|
+
/** Selected worker_done transport, independent of the canonical CLEO report bytes. */
|
|
130
|
+
export const orcaWorkerDoneSchema = z.object({
|
|
131
|
+
messageId: identifier,
|
|
132
|
+
runtimeId: identifier,
|
|
133
|
+
runId: identifier,
|
|
134
|
+
orcaTaskId: identifier,
|
|
135
|
+
dispatchId: identifier,
|
|
136
|
+
senderHandle: identifier,
|
|
137
|
+
outcome: z.enum(['succeeded', 'failed']),
|
|
138
|
+
body: z.string(),
|
|
139
|
+
reportPath: identifier,
|
|
140
|
+
});
|
|
141
|
+
/** Durable report settlement; no task acceptance or process-release state is implied. */
|
|
142
|
+
export const orcaWorkerReportSchema = z.object({
|
|
143
|
+
event: orcaWorkerDoneSchema,
|
|
144
|
+
manifestId: identifier,
|
|
145
|
+
manifestDigest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
146
|
+
reportText: z.string().min(1).max(65_536),
|
|
147
|
+
reportDigest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
148
|
+
ingestedAt: z.string().datetime(),
|
|
149
|
+
});
|
|
150
|
+
/** Durable AgentMBX outbox state for the first validated report of one Dispatch. */
|
|
151
|
+
export const orcaReportDeliverySchema = z.object({
|
|
152
|
+
key: identifier,
|
|
153
|
+
mailbox: identifier.nullable(),
|
|
154
|
+
state: z.enum(['pending', 'delivered']),
|
|
155
|
+
messageId: identifier.nullable(),
|
|
156
|
+
deliveredAt: z.string().datetime().nullable(),
|
|
157
|
+
lastError: z.string().nullable(),
|
|
158
|
+
});
|
|
159
|
+
/** Separate physical exit, execution retirement and logical report delivery receipts. */
|
|
160
|
+
export const orcaWorkerSettlementSchema = z.object({
|
|
161
|
+
resourceRelease: z
|
|
162
|
+
.object({
|
|
163
|
+
dispatchId: identifier,
|
|
164
|
+
releasedAt: z.string().datetime(),
|
|
165
|
+
receiptDigest: z.string().regex(/^[a-f0-9]{64}$/),
|
|
166
|
+
receipt: identifier,
|
|
167
|
+
})
|
|
168
|
+
.optional(),
|
|
169
|
+
retiredAt: z.string().datetime().optional(),
|
|
170
|
+
reportDelivery: orcaReportDeliverySchema.optional(),
|
|
171
|
+
});
|
|
172
|
+
/** Full transport fields validated only for the requested inbox message id. */
|
|
173
|
+
export const orcaReportMessageSchema = z.object({
|
|
174
|
+
id: identifier,
|
|
175
|
+
run_id: z.string().nullable(),
|
|
176
|
+
delivery_contract: z.string(),
|
|
177
|
+
from_handle: z.string(),
|
|
178
|
+
to_handle: z.string(),
|
|
179
|
+
type: z.string(),
|
|
180
|
+
body: z.string(),
|
|
181
|
+
payload: z.string().nullable(),
|
|
182
|
+
sender_pane_key: z.string().nullable(),
|
|
183
|
+
});
|
|
184
|
+
/** Full report source envelope; unrelated inbox rows remain unvalidated JSON. */
|
|
185
|
+
export const orcaReportSourceSchema = z.object({
|
|
186
|
+
ok: z.literal(true),
|
|
187
|
+
_meta: z.object({ runtimeId: identifier }),
|
|
188
|
+
result: z.object({
|
|
189
|
+
messages: z.array(z.json()).optional(),
|
|
190
|
+
dispatch: z
|
|
191
|
+
.object({
|
|
192
|
+
id: identifier,
|
|
193
|
+
run_id: identifier,
|
|
194
|
+
task_id: identifier,
|
|
195
|
+
assignee_handle: identifier,
|
|
196
|
+
assignee_pane_key: z.string().nullable(),
|
|
197
|
+
status: z.string(),
|
|
198
|
+
})
|
|
199
|
+
.optional(),
|
|
200
|
+
}),
|
|
201
|
+
});
|
|
202
|
+
/** Fields Orca records from worker_done flags; prose never supplies a report or proof. */
|
|
203
|
+
export const orcaWorkerDonePayloadSchema = z.object({
|
|
204
|
+
taskId: identifier,
|
|
205
|
+
dispatchId: identifier,
|
|
206
|
+
outcome: z.enum(['succeeded', 'failed']),
|
|
207
|
+
reportPath: identifier,
|
|
208
|
+
});
|
|
209
|
+
/** Exact-record supervision request; recovery never chooses a task's newest attempt. */
|
|
210
|
+
export const orcaWorkerRequestSchema = z
|
|
211
|
+
.object({
|
|
212
|
+
action: z.enum([
|
|
213
|
+
'show',
|
|
214
|
+
'read',
|
|
215
|
+
'recover-start',
|
|
216
|
+
'recover-stop',
|
|
217
|
+
'retry',
|
|
218
|
+
'stop',
|
|
219
|
+
'ingest-report',
|
|
220
|
+
'relay-report',
|
|
221
|
+
]),
|
|
222
|
+
recordId: identifier,
|
|
223
|
+
cursor: identifier.optional(),
|
|
224
|
+
messageId: identifier.optional(),
|
|
225
|
+
})
|
|
226
|
+
.refine(({ action, cursor }) => cursor === undefined || action === 'read', {
|
|
227
|
+
message: 'A source-pinned cursor is accepted only for read.',
|
|
228
|
+
path: ['cursor'],
|
|
229
|
+
})
|
|
230
|
+
.refine(({ action, messageId }) => (action === 'ingest-report') === (messageId !== undefined), {
|
|
231
|
+
message: 'ingest-report requires an exact message id; other actions do not accept one.',
|
|
232
|
+
path: ['messageId'],
|
|
233
|
+
});
|
|
234
|
+
const effectSchema = z.object({
|
|
235
|
+
kind: z.string(),
|
|
236
|
+
role: z.string().optional(),
|
|
237
|
+
action: z.string().optional(),
|
|
238
|
+
id: z.string().optional(),
|
|
239
|
+
});
|
|
240
|
+
const selectionSchema = z.object({
|
|
241
|
+
agent: z.string().nullable().optional(),
|
|
242
|
+
model: z.string().nullable().optional(),
|
|
243
|
+
effort: z.string().nullable().optional(),
|
|
244
|
+
});
|
|
245
|
+
/**
|
|
246
|
+
* Validates the wire fields used for admission and fencing. Unknown fields are
|
|
247
|
+
* ignored here and preserved in the original receipt, never treated as evidence.
|
|
248
|
+
* Audited against the installed Orca 1.4.255 full CLI views.
|
|
249
|
+
*/
|
|
250
|
+
export const orcaReplySchema = z.object({
|
|
251
|
+
ok: z.boolean(),
|
|
252
|
+
_meta: z.object({ runtimeId: z.string().nullable() }).optional(),
|
|
253
|
+
error: z
|
|
254
|
+
.object({
|
|
255
|
+
code: z.string(),
|
|
256
|
+
message: z.string(),
|
|
257
|
+
data: z
|
|
258
|
+
.object({
|
|
259
|
+
requestId: identifier.optional(),
|
|
260
|
+
orchestrationRequestId: identifier.optional(),
|
|
261
|
+
dispatchId: identifier.optional(),
|
|
262
|
+
})
|
|
263
|
+
.optional(),
|
|
264
|
+
})
|
|
265
|
+
.optional(),
|
|
266
|
+
result: z
|
|
267
|
+
.object({
|
|
268
|
+
state: z.string().optional(),
|
|
269
|
+
requestId: identifier.optional(),
|
|
270
|
+
/**
|
|
271
|
+
* Mutation ledger identity Orca stamps on every successful mutation result.
|
|
272
|
+
* @remarks Installed Orca 1.4.255 attaches `{ requestId, replayed }` to the
|
|
273
|
+
* result it records (`Jy` in the retained source), so a successful stop can
|
|
274
|
+
* be bound to the request key this attempt issued.
|
|
275
|
+
*/
|
|
276
|
+
mutation: z
|
|
277
|
+
.object({
|
|
278
|
+
requestId: identifier.optional(),
|
|
279
|
+
replayed: z.boolean().optional(),
|
|
280
|
+
})
|
|
281
|
+
.optional(),
|
|
282
|
+
stage: z.string().optional(),
|
|
283
|
+
turnStart: z.string().optional(),
|
|
284
|
+
runId: identifier.optional(),
|
|
285
|
+
run: z.object({ id: identifier }).nullable().optional(),
|
|
286
|
+
taskId: identifier.optional(),
|
|
287
|
+
dispatchId: identifier.optional(),
|
|
288
|
+
failureCount: z.number().int().nonnegative().optional(),
|
|
289
|
+
effects: z.array(effectSchema).optional(),
|
|
290
|
+
residualResources: z.array(effectSchema).optional(),
|
|
291
|
+
launch: z.object({ effective: selectionSchema.optional() }).optional(),
|
|
292
|
+
lastError: z.string().nullable().optional(),
|
|
293
|
+
processAction: z.string().optional(),
|
|
294
|
+
helpers: z
|
|
295
|
+
.array(z.object({
|
|
296
|
+
dispatchId: identifier.optional(),
|
|
297
|
+
creatorDispatchId: identifier.optional(),
|
|
298
|
+
outcome: z.string(),
|
|
299
|
+
keptOpenBy: identifier.optional(),
|
|
300
|
+
state: z.string().optional(),
|
|
301
|
+
lastError: z.string().nullable().optional(),
|
|
302
|
+
}))
|
|
303
|
+
.optional(),
|
|
304
|
+
helperStopError: z.string().nullable().optional(),
|
|
305
|
+
status: z.string().optional(),
|
|
306
|
+
terminal: z
|
|
307
|
+
.object({
|
|
308
|
+
handle: identifier,
|
|
309
|
+
connected: z.boolean(),
|
|
310
|
+
writable: z.boolean(),
|
|
311
|
+
executionHostId: identifier,
|
|
312
|
+
})
|
|
313
|
+
.optional(),
|
|
314
|
+
runtime: z
|
|
315
|
+
.object({
|
|
316
|
+
runtimeId: identifier,
|
|
317
|
+
reachable: z.boolean(),
|
|
318
|
+
state: z.string(),
|
|
319
|
+
capabilities: z.array(z.string()),
|
|
320
|
+
})
|
|
321
|
+
.optional(),
|
|
322
|
+
worktree: z
|
|
323
|
+
.object({
|
|
324
|
+
id: identifier,
|
|
325
|
+
path: identifier,
|
|
326
|
+
branch: identifier,
|
|
327
|
+
hostId: identifier,
|
|
328
|
+
address: z.object({ worktree: identifier }).optional(),
|
|
329
|
+
})
|
|
330
|
+
.optional(),
|
|
331
|
+
dispatch: z
|
|
332
|
+
.object({
|
|
333
|
+
id: identifier,
|
|
334
|
+
runId: identifier,
|
|
335
|
+
taskId: identifier,
|
|
336
|
+
/** Direct creator Dispatch that started this one; null for a Run root. */
|
|
337
|
+
creatorDispatchId: identifier.nullable().optional(),
|
|
338
|
+
failureCount: z.number().int().nonnegative(),
|
|
339
|
+
})
|
|
340
|
+
.optional(),
|
|
341
|
+
worker: z
|
|
342
|
+
.object({
|
|
343
|
+
dispatchId: identifier,
|
|
344
|
+
runtimeEpoch: identifier,
|
|
345
|
+
state: z.string(),
|
|
346
|
+
stage: z.string(),
|
|
347
|
+
worktreeId: identifier.nullable(),
|
|
348
|
+
})
|
|
349
|
+
.optional(),
|
|
350
|
+
observation: z.object({ status: z.string(), exactWorker: z.boolean().optional() }).optional(),
|
|
351
|
+
projection: z
|
|
352
|
+
.object({
|
|
353
|
+
resource: z
|
|
354
|
+
.object({
|
|
355
|
+
state: z.string(),
|
|
356
|
+
terminalState: z.string(),
|
|
357
|
+
ownerDispatchId: identifier.optional(),
|
|
358
|
+
releaseState: z.string().optional(),
|
|
359
|
+
})
|
|
360
|
+
.optional(),
|
|
361
|
+
})
|
|
362
|
+
.optional(),
|
|
363
|
+
})
|
|
364
|
+
.optional(),
|
|
365
|
+
});
|
|
366
|
+
/** Installed command declarations; PATH presence alone never authorizes a launch. */
|
|
367
|
+
export const orcaCommandRegistrySchema = z.object({
|
|
368
|
+
schemaVersion: z.number().int().positive(),
|
|
369
|
+
commands: z.array(z.object({ command: identifier, flags: z.array(z.string()) })),
|
|
370
|
+
});
|
|
371
|
+
const accountProviderSchema = z.object({
|
|
372
|
+
accounts: z.array(z.object({})),
|
|
373
|
+
activeAccountId: identifier.nullable(),
|
|
374
|
+
});
|
|
375
|
+
/** Private account wire fields: account attributes are discarded during parsing. */
|
|
376
|
+
export const orcaAccountReplySchema = z.object({
|
|
377
|
+
ok: z.literal(true),
|
|
378
|
+
_meta: z.object({ runtimeId: identifier }),
|
|
379
|
+
result: z.object({
|
|
380
|
+
codex: accountProviderSchema,
|
|
381
|
+
opencode: accountProviderSchema,
|
|
382
|
+
claude: accountProviderSchema,
|
|
383
|
+
}),
|
|
384
|
+
});
|
|
385
|
+
//# sourceMappingURL=orca-execution.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"orca-execution.js","sourceRoot":"","sources":["../src/orca-execution.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,sFAAsF;AACtF,MAAM,CAAC,MAAM,wBAAwB,GAAG;IACtC,IAAI,EAAE,yBAAyB;IAC/B,OAAO,EACL,uVAAuV;IACzV,GAAG,EAAE,oTAAoT;CACjT,CAAC;AAEX,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;AAErC,qEAAqE;AACrE,MAAM,CAAC,MAAM,eAAe,GAAG,CAAC,CAAC,IAAI,CAAC,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;AAKhF,iFAAiF;AACjF,MAAM,CAAC,MAAM,mBAAmB,GAAgB,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,CAAC,CAAC;AAEjF,6DAA6D;AAC7D,MAAM,CAAC,MAAM,oBAAoB,GAAG;IAClC,KAAK,EAAE,OAAO;IACd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EAAE;KACd,CAAC;SACD,QAAQ,EAAE;CACd,CAAC,CAAC;AAQH,qFAAqF;AACrF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChD,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE;IAC1C,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,EAAE,CAAC,CAAC;CACjF,CAAC,CAAC;AAEH,MAAM,qBAAqB,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,QAAQ,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IAC/B,eAAe,EAAE,UAAU,CAAC,QAAQ,EAAE;CACvC,CAAC,CAAC;AAEH,oFAAoF;AACpF,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC7C,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACnB,KAAK,EAAE,CAAC,CAAC,MAAM,CAAC,EAAE,SAAS,EAAE,UAAU,EAAE,CAAC;IAC1C,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC;QACf,KAAK,EAAE,qBAAqB;QAC5B,QAAQ,EAAE,qBAAqB;QAC/B,MAAM,EAAE,qBAAqB;KAC9B,CAAC;CACH,CAAC,CAAC"}
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
*
|
|
11
11
|
* @adr ADR-013
|
|
12
12
|
*/
|
|
13
|
+
import type { VerificationGate } from './task.js';
|
|
13
14
|
/** Detected project ecosystem. Matches the writer in `detectProjectType`. */
|
|
14
15
|
export type ProjectType = 'node' | 'python' | 'rust' | 'go' | 'ruby' | 'java' | 'dotnet' | 'bash' | 'elixir' | 'php' | 'deno' | 'bun' | 'unknown';
|
|
15
16
|
/** Detected test framework. */
|
|
@@ -41,6 +42,14 @@ export interface ProjectEvidenceContext {
|
|
|
41
42
|
* @task T12634
|
|
42
43
|
*/
|
|
43
44
|
ciSatisfies?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* Gates a probed `deploy:` atom satisfies (T14083). No default: unset or
|
|
47
|
+
* empty, a deploy atom satisfies nothing, and never `testsPassed` unless
|
|
48
|
+
* listed here.
|
|
49
|
+
*
|
|
50
|
+
* @task T14083
|
|
51
|
+
*/
|
|
52
|
+
deploySatisfies?: VerificationGate[];
|
|
44
53
|
/**
|
|
45
54
|
* Which required checks attest each gate for `ci:<pr>`. Each list must be a
|
|
46
55
|
* subset of the required-check list; a gate without a list refuses `ci:`.
|
|
@@ -72,6 +81,23 @@ export interface ProjectEvidenceContext {
|
|
|
72
81
|
* refused (E_EVIDENCE_RUNTIME_PATH_PROTECTED). Default: none.
|
|
73
82
|
*/
|
|
74
83
|
runtimePaths?: string[];
|
|
84
|
+
/**
|
|
85
|
+
* Further git repositories this project's evidence may come from (an SDK in
|
|
86
|
+
* a separate repository, T14078). A typed gate names one by `repo`; any
|
|
87
|
+
* repository not declared here is refused.
|
|
88
|
+
*/
|
|
89
|
+
repositories?: EvidenceRepositoryDeclaration[];
|
|
90
|
+
}
|
|
91
|
+
/**
|
|
92
|
+
* A git repository outside the project that typed gates may run in (T14078).
|
|
93
|
+
*/
|
|
94
|
+
export interface EvidenceRepositoryDeclaration {
|
|
95
|
+
/** Name a typed gate's `repo` field uses. */
|
|
96
|
+
name: string;
|
|
97
|
+
/** The checkout's root, relative to the CLEO store root or absolute. */
|
|
98
|
+
path: string;
|
|
99
|
+
/** Why the project's evidence comes from it. */
|
|
100
|
+
purpose: string;
|
|
75
101
|
}
|
|
76
102
|
/**
|
|
77
103
|
* A required check named in `release.prRequiredWorkflows`, optionally pinned to
|
|
@@ -126,6 +152,11 @@ export interface ProjectContext {
|
|
|
126
152
|
build?: {
|
|
127
153
|
command?: string;
|
|
128
154
|
outputDir?: string;
|
|
155
|
+
/**
|
|
156
|
+
* Globs, relative to the project root, of scripts that run heavy tools:
|
|
157
|
+
* `cleo run` charges them as heavy whatever their content shows (T14162).
|
|
158
|
+
*/
|
|
159
|
+
heavyScripts?: string[];
|
|
129
160
|
};
|
|
130
161
|
directories?: {
|
|
131
162
|
source?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"project-context.d.ts","sourceRoot":"","sources":["../src/project-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,QAAQ,GACR,MAAM,GACN,IAAI,GACJ,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,GACL,SAAS,CAAC;AAEd,+BAA+B;AAC/B,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,MAAM,GACN,OAAO,GACP,IAAI,GACJ,OAAO,GACP,OAAO,GACP,YAAY,GACZ,SAAS,GACT,KAAK,GACL,KAAK,GACL,KAAK,GACL,WAAW,GACX,MAAM,GACN,KAAK,GACL,QAAQ,GACR,SAAS,CAAC;AAEd,yDAAyD;AACzD,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,CAAC;AAE5F,2BAA2B;AAC3B,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;;;OAKG;IACH,QAAQ,CAAC,EAAE;QACT,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;QACjB,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC;QACd,8EAA8E;QAC9E,IAAI,CAAC,EAAE;YAAE,KAAK,CAAC,EAAE,MAAM,EAAE,CAAC;YAAC,EAAE,CAAC,EAAE,MAAM,EAAE,CAAA;SAAE,CAAC;KAC5C,CAAC;IACF;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB;;;;;;;OAOG;IACH,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"project-context.d.ts","sourceRoot":"","sources":["../src/project-context.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAC;AAElD,6EAA6E;AAC7E,MAAM,MAAM,WAAW,GACnB,MAAM,GACN,QAAQ,GACR,MAAM,GACN,IAAI,GACJ,MAAM,GACN,MAAM,GACN,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,KAAK,GACL,MAAM,GACN,KAAK,GACL,SAAS,CAAC;AAEd,+BAA+B;AAC/B,MAAM,MAAM,aAAa,GACrB,MAAM,GACN,QAAQ,GACR,OAAO,GACP,QAAQ,GACR,MAAM,GACN,OAAO,GACP,IAAI,GACJ,OAAO,GACP,OAAO,GACP,YAAY,GACZ,SAAS,GACT,KAAK,GACL,KAAK,GACL,KAAK,GACL,WAAW,GACX,MAAM,GACN,KAAK,GACL,QAAQ,GACR,SAAS,CAAC;AAEd,yDAAyD;AACzD,MAAM,MAAM,oBAAoB,GAAG,YAAY,GAAG,YAAY,GAAG,WAAW,GAAG,YAAY,CAAC;AAE5F,2BAA2B;AAC3B,MAAM,MAAM,WAAW,GAAG,KAAK,GAAG,UAAU,GAAG,OAAO,CAAC;AAEvD;;;;GAIG;AACH,MAAM,WAAW,sBAAsB;IACrC;;;;;;;OAOG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;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AO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,uCAAuC;IACvC,KAAK,CAAC,EAAE;QACN,qDAAqD;QACrD,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,4EAA4E;IAC5E,eAAe,CAAC,EAAE;QAChB,sDAAsD;QACtD,OAAO,CAAC,EAAE,MAAM,CAAC;KAClB,CAAC;IACF,sDAAsD;IACtD,OAAO,CAAC,EAAE,qBAAqB,CAAC;IAChC,8DAA8D;IAC9D,QAAQ,CAAC,EAAE,sBAAsB,CAAC;CACnC;AAED;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB"}
|
package/dist/project-hooks.d.ts
CHANGED
|
@@ -5,9 +5,9 @@ import type { HookJsonValue } from './heavy-command-hook.js';
|
|
|
5
5
|
export declare const HookSourceSchema: z.ZodEnum<{
|
|
6
6
|
direct: "direct";
|
|
7
7
|
ci: "ci";
|
|
8
|
-
worktree: "worktree";
|
|
9
8
|
agent: "agent";
|
|
10
9
|
git: "git";
|
|
10
|
+
worktree: "worktree";
|
|
11
11
|
}>;
|
|
12
12
|
/** Shared invocation origin. */
|
|
13
13
|
export type HookSource = z.infer<typeof HookSourceSchema>;
|
|
@@ -28,9 +28,9 @@ export declare const ProjectHookDefinitionSchema: z.ZodObject<{
|
|
|
28
28
|
source: z.ZodEnum<{
|
|
29
29
|
direct: "direct";
|
|
30
30
|
ci: "ci";
|
|
31
|
-
worktree: "worktree";
|
|
32
31
|
agent: "agent";
|
|
33
32
|
git: "git";
|
|
33
|
+
worktree: "worktree";
|
|
34
34
|
}>;
|
|
35
35
|
event: z.ZodString;
|
|
36
36
|
}, z.core.$strict>>;
|
|
@@ -58,9 +58,9 @@ export declare const ProjectHooksManifestSchema: z.ZodObject<{
|
|
|
58
58
|
source: z.ZodEnum<{
|
|
59
59
|
direct: "direct";
|
|
60
60
|
ci: "ci";
|
|
61
|
-
worktree: "worktree";
|
|
62
61
|
agent: "agent";
|
|
63
62
|
git: "git";
|
|
63
|
+
worktree: "worktree";
|
|
64
64
|
}>;
|
|
65
65
|
event: z.ZodString;
|
|
66
66
|
}, z.core.$strict>>;
|
|
@@ -122,8 +122,8 @@ export declare const ProjectHookVerdictSchema: z.ZodObject<{
|
|
|
122
122
|
status: z.ZodEnum<{
|
|
123
123
|
pass: "pass";
|
|
124
124
|
warn: "warn";
|
|
125
|
-
skip: "skip";
|
|
126
125
|
block: "block";
|
|
126
|
+
skip: "skip";
|
|
127
127
|
"checker-error": "checker-error";
|
|
128
128
|
}>;
|
|
129
129
|
message: z.ZodOptional<z.ZodString>;
|
|
@@ -168,9 +168,9 @@ export declare const HookActivationSchema: z.ZodObject<{
|
|
|
168
168
|
source: z.ZodEnum<{
|
|
169
169
|
direct: "direct";
|
|
170
170
|
ci: "ci";
|
|
171
|
-
worktree: "worktree";
|
|
172
171
|
agent: "agent";
|
|
173
172
|
git: "git";
|
|
173
|
+
worktree: "worktree";
|
|
174
174
|
}>;
|
|
175
175
|
event: z.ZodString;
|
|
176
176
|
}, z.core.$strict>>>>;
|
|
@@ -197,9 +197,9 @@ export declare const ProjectHooksLocalStateSchema: z.ZodObject<{
|
|
|
197
197
|
source: z.ZodEnum<{
|
|
198
198
|
direct: "direct";
|
|
199
199
|
ci: "ci";
|
|
200
|
-
worktree: "worktree";
|
|
201
200
|
agent: "agent";
|
|
202
201
|
git: "git";
|
|
202
|
+
worktree: "worktree";
|
|
203
203
|
}>;
|
|
204
204
|
event: z.ZodString;
|
|
205
205
|
}, z.core.$strict>>>>;
|
|
@@ -230,9 +230,9 @@ export declare const HookExecutionReceiptSchema: z.ZodObject<{
|
|
|
230
230
|
source: z.ZodEnum<{
|
|
231
231
|
direct: "direct";
|
|
232
232
|
ci: "ci";
|
|
233
|
-
worktree: "worktree";
|
|
234
233
|
agent: "agent";
|
|
235
234
|
git: "git";
|
|
235
|
+
worktree: "worktree";
|
|
236
236
|
}>;
|
|
237
237
|
event: z.ZodString;
|
|
238
238
|
recordedAt: z.ZodString;
|
|
@@ -241,8 +241,8 @@ export declare const HookExecutionReceiptSchema: z.ZodObject<{
|
|
|
241
241
|
status: z.ZodEnum<{
|
|
242
242
|
pass: "pass";
|
|
243
243
|
warn: "warn";
|
|
244
|
-
skip: "skip";
|
|
245
244
|
block: "block";
|
|
245
|
+
skip: "skip";
|
|
246
246
|
"checker-error": "checker-error";
|
|
247
247
|
timeout: "timeout";
|
|
248
248
|
"infrastructure-error": "infrastructure-error";
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standing release authorization (T14141 · owner decision D11215): a grant the
|
|
3
|
+
* owner signs with the enrolled owner key so a non-interactive
|
|
4
|
+
* `cleo release cut --yes` (an agent) may tag without a typed terminal
|
|
5
|
+
* confirmation.
|
|
6
|
+
*
|
|
7
|
+
* @task T14141
|
|
8
|
+
*/
|
|
9
|
+
/**
|
|
10
|
+
* What a grant covers: `canary` (`-canary.N` versions), `prerelease` (any
|
|
11
|
+
* `-suffix`), `stable` (no suffix), or one exact `v`-prefixed version.
|
|
12
|
+
*/
|
|
13
|
+
export type ReleaseAuthorizationScope = 'canary' | 'prerelease' | 'stable' | `v${string}`;
|
|
14
|
+
/** One owner-signed standing release authorization. */
|
|
15
|
+
export interface ReleaseAuthorizationGrant {
|
|
16
|
+
/** Grant id (`ra-<hex>`), named in the cut audit row and the tag message. */
|
|
17
|
+
id: string;
|
|
18
|
+
/** Versions the grant covers. */
|
|
19
|
+
scope: ReleaseAuthorizationScope;
|
|
20
|
+
/** Why the owner granted it. */
|
|
21
|
+
reason: string;
|
|
22
|
+
/** ISO time the grant was issued. */
|
|
23
|
+
issuedAt: string;
|
|
24
|
+
/** ISO time it stops counting (at most 30 days after issue). */
|
|
25
|
+
expiresAt: string;
|
|
26
|
+
/** Optional cap on cuts it may allow; null = no limit (D11215). */
|
|
27
|
+
uses: number | null;
|
|
28
|
+
/** The owner decision recorded for the grant (BRAIN decision id). */
|
|
29
|
+
decisionId: string;
|
|
30
|
+
/** Revocations on record when it was issued; a shorter revocation list later means tampering. */
|
|
31
|
+
revocationsAtIssue: number;
|
|
32
|
+
/** Enrolled owner public key (hex) that signed it. */
|
|
33
|
+
ownerPubkey: string;
|
|
34
|
+
/** Ed25519 signature (hex) over the grant's fields. */
|
|
35
|
+
sig: string;
|
|
36
|
+
}
|
|
37
|
+
/** A grant as `cleo release authorize --list` reports it. */
|
|
38
|
+
export interface ReleaseAuthorizationStatus extends ReleaseAuthorizationGrant {
|
|
39
|
+
/** Whether it currently allows a cut, and if not why. */
|
|
40
|
+
state: 'active' | 'expired' | 'used-up' | 'revoked' | 'tampered';
|
|
41
|
+
/** Cuts it has allowed (audit rows and tags naming it). */
|
|
42
|
+
used: number;
|
|
43
|
+
/** Why it is tampered, when it is. */
|
|
44
|
+
why?: string;
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=authorization.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.d.ts","sourceRoot":"","sources":["../../src/release/authorization.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH;;;GAGG;AACH,MAAM,MAAM,yBAAyB,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,GAAG,IAAI,MAAM,EAAE,CAAC;AAE1F,uDAAuD;AACvD,MAAM,WAAW,yBAAyB;IACxC,6EAA6E;IAC7E,EAAE,EAAE,MAAM,CAAC;IACX,iCAAiC;IACjC,KAAK,EAAE,yBAAyB,CAAC;IACjC,gCAAgC;IAChC,MAAM,EAAE,MAAM,CAAC;IACf,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAC;IACjB,gEAAgE;IAChE,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,qEAAqE;IACrE,UAAU,EAAE,MAAM,CAAC;IACnB,iGAAiG;IACjG,kBAAkB,EAAE,MAAM,CAAC;IAC3B,sDAAsD;IACtD,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,GAAG,EAAE,MAAM,CAAC;CACb;AAED,6DAA6D;AAC7D,MAAM,WAAW,0BAA2B,SAAQ,yBAAyB;IAC3E,yDAAyD;IACzD,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,UAAU,CAAC;IACjE,2DAA2D;IAC3D,IAAI,EAAE,MAAM,CAAC;IACb,sCAAsC;IACtC,GAAG,CAAC,EAAE,MAAM,CAAC;CACd"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Standing release authorization (T14141 · owner decision D11215): a grant the
|
|
3
|
+
* owner signs with the enrolled owner key so a non-interactive
|
|
4
|
+
* `cleo release cut --yes` (an agent) may tag without a typed terminal
|
|
5
|
+
* confirmation.
|
|
6
|
+
*
|
|
7
|
+
* @task T14141
|
|
8
|
+
*/
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=authorization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"authorization.js","sourceRoot":"","sources":["../../src/release/authorization.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG"}
|
|
@@ -83,8 +83,8 @@ export declare const HookPilotNativeReceiptSchema: z.ZodObject<{
|
|
|
83
83
|
status: z.ZodEnum<{
|
|
84
84
|
pass: "pass";
|
|
85
85
|
warn: "warn";
|
|
86
|
-
skip: "skip";
|
|
87
86
|
block: "block";
|
|
87
|
+
skip: "skip";
|
|
88
88
|
"checker-error": "checker-error";
|
|
89
89
|
timeout: "timeout";
|
|
90
90
|
"infrastructure-error": "infrastructure-error";
|