opencode-swarm 7.181.4 → 7.183.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.opencode/skills/issue-ingest/SKILL.md +19 -1
- package/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{coder-settlement-vbs5rj3z.js → coder-settlement-6m5stw7s.js} +12 -12
- package/dist/cli/{config-doctor-3cb51z08.js → config-doctor-g6r21wdz.js} +3 -3
- package/dist/cli/{core-0h7y8z0s.js → core-6dzx3z8q.js} +4 -4
- package/dist/cli/{curation-policy-r4dkajw9.js → curation-policy-fm7mtvbk.js} +5 -5
- package/dist/cli/{curator-9sn55eyk.js → curator-0xqj2rxm.js} +39 -39
- package/dist/cli/{curator-drift-d4jkgrba.js → curator-drift-art0x91j.js} +9 -9
- package/dist/cli/curator-llm-factory-grnfsaa2.js +74 -0
- package/dist/cli/{evidence-summary-service-sb5seqs3.js → evidence-summary-service-h1vb58rd.js} +18 -18
- package/dist/cli/{gate-evidence-emq2y7kz.js → gate-evidence-ps3rg5fh.js} +7 -7
- package/dist/cli/guardrail-explain-2sb06877.js +75 -0
- package/dist/cli/{guardrail-log-ftv03v4x.js → guardrail-log-x2gdf8ys.js} +8 -8
- package/dist/cli/{guardrail-reset-d6qmnvff.js → guardrail-reset-mwkys4ff.js} +39 -39
- package/dist/cli/{hive-promoter-pktjn46n.js → hive-promoter-gndjyg7e.js} +39 -39
- package/dist/cli/{index-dwc1wztn.js → index-0n24h4zb.js} +7 -7
- package/dist/cli/{index-x4am0jxt.js → index-1ex9ecf5.js} +4 -4
- package/dist/cli/{index-by9wfeja.js → index-1kpa3an2.js} +2 -2
- package/dist/cli/{index-a2hvmc3a.js → index-25m6rekr.js} +1 -1
- package/dist/cli/{index-1epynxc4.js → index-29f69hzd.js} +2 -2
- package/dist/cli/{index-nw3z614g.js → index-30pz2xvj.js} +7 -7
- package/dist/cli/{index-23mdeh2a.js → index-3bcmw8pc.js} +1 -1
- package/dist/cli/{index-v4h99xhr.js → index-4aggsva0.js} +4 -4
- package/dist/cli/{index-vvgpgcyn.js → index-5cvm6ykc.js} +1 -1
- package/dist/cli/{index-hqa71xfm.js → index-6f7tfq3m.js} +8 -8
- package/dist/cli/{index-68ben2q8.js → index-6nhzekvt.js} +2 -2
- package/dist/cli/{index-enmvd9ap.js → index-7p6s4yfb.js} +1 -1
- package/dist/cli/{index-ved1325w.js → index-820e6w22.js} +2 -2
- package/dist/cli/{index-4qpz7mpn.js → index-94pwd45k.js} +4 -4
- package/dist/cli/{index-dkprb20b.js → index-9gehw4xb.js} +2 -2
- package/dist/cli/{index-y03jadcy.js → index-a6np52p4.js} +3 -3
- package/dist/cli/{index-zp6fss8c.js → index-brfs5jqw.js} +4 -4
- package/dist/cli/{index-9eg8f4zm.js → index-c6zrffwn.js} +2281 -2038
- package/dist/cli/{index-3ga3ts3h.js → index-fb0v3e71.js} +2 -2
- package/dist/cli/{index-gtpq64q7.js → index-fqc1a1vj.js} +4 -4
- package/dist/cli/{index-sf51gh68.js → index-ht88g5mc.js} +1 -1
- package/dist/cli/{index-j97nc02q.js → index-jf9cvkzr.js} +4 -4
- package/dist/cli/{index-myacmqmf.js → index-jsdnhdzg.js} +39 -39
- package/dist/cli/{index-y28np6j9.js → index-k88thqa0.js} +6 -6
- package/dist/cli/{index-fsye9ygy.js → index-kv0k3b60.js} +6 -6
- package/dist/cli/{index-rgfz80gt.js → index-mewsqwbq.js} +1 -1
- package/dist/cli/{index-0ea0c676.js → index-nmfnggaa.js} +13 -13
- package/dist/cli/{index-r4vve32m.js → index-pvtf7cjg.js} +7 -7
- package/dist/cli/{index-9s2rp2j5.js → index-qws72zbs.js} +3 -3
- package/dist/cli/{index-6jrn46zy.js → index-r65yxdv7.js} +1 -1
- package/dist/cli/{index-s34y6gbh.js → index-r7dqevkc.js} +1 -1
- package/dist/cli/{index-427x3j6p.js → index-rfggc332.js} +2 -2
- package/dist/cli/{index-989v83pb.js → index-s1y70y0w.js} +8 -2
- package/dist/cli/{index-mkpdcbye.js → index-tt705bap.js} +86 -48
- package/dist/cli/{index-ap6hs8fj.js → index-v2rbpcqy.js} +2 -2
- package/dist/cli/{index-jrxrjz89.js → index-v8ja5zcr.js} +2 -2
- package/dist/cli/{index-54sd9bbn.js → index-w670pfv4.js} +5 -5
- package/dist/cli/{index-kkrbybgt.js → index-w6hrms7j.js} +2 -2
- package/dist/cli/{index-01r2wrwa.js → index-wjqc2mnc.js} +1 -1
- package/dist/cli/{index-w1ydvzef.js → index-wnkx6gs0.js} +1 -1
- package/dist/cli/{index-1msszzg2.js → index-wqg2j647.js} +7 -7
- package/dist/cli/{index-2t21pv2v.js → index-wzec3c4g.js} +13 -1
- package/dist/cli/{index-12fxtcce.js → index-ybrwvrd4.js} +41 -41
- package/dist/cli/{index-epq8am78.js → index-yv5fmjcf.js} +2 -2
- package/dist/cli/index.js +40 -40
- package/dist/cli/{knowledge-escalator-5q4y97e4.js → knowledge-escalator-gjp71cn2.js} +13 -13
- package/dist/cli/{knowledge-events-x7q8yepd.js → knowledge-events-d8k9fmkg.js} +11 -11
- package/dist/cli/{knowledge-link-655xa3db.js → knowledge-link-anzhs41w.js} +4 -4
- package/dist/cli/{knowledge-store-r7ng2nf8.js → knowledge-store-sqmwvcjd.js} +5 -5
- package/dist/cli/{knowledge-validator-e78m6cqe.js → knowledge-validator-gjqm2zby.js} +7 -7
- package/dist/cli/{mcp-208jwxps.js → mcp-phvvtsmt.js} +1 -1
- package/dist/cli/{model-preflight-xakn1356.js → model-preflight-ehqa8h7x.js} +39 -39
- package/dist/cli/{pending-delegations-w4a5tg11.js → pending-delegations-mxs88d0x.js} +11 -11
- package/dist/cli/{pr-subscriptions-8289esc9.js → pr-subscriptions-n3ymnt5w.js} +11 -11
- package/dist/cli/{pr-workflow-gate-b7yx0x21.js → pr-workflow-gate-t8axhfzw.js} +39 -39
- package/dist/cli/{runner-b5vt1any.js → runner-9kd080km.js} +5 -5
- package/dist/cli/{scan-cursor-edpbzp72.js → scan-cursor-qg4eg6ah.js} +6 -6
- package/dist/cli/{schema-dnsxhyr3.js → schema-73z5xbmd.js} +2 -2
- package/dist/cli/{scope-persistence-z1f7d4tw.js → scope-persistence-b9924hz1.js} +15 -15
- package/dist/cli/{server-t2edntv4.js → server-jn6xd5bh.js} +39 -39
- package/dist/cli/{skill-generator-5n7vf0s3.js → skill-generator-k344y5m2.js} +15 -15
- package/dist/cli/{snapshot-coordination-init-t14dk9je.js → snapshot-coordination-init-a8992336.js} +39 -39
- package/dist/cli/{speckit-checkoff-4ws84g13.js → speckit-checkoff-0tctprtz.js} +5 -5
- package/dist/cli/{telemetry-6k8t2mrw.js → telemetry-vqyy5nha.js} +1 -1
- package/dist/cli/{workspace-snapshot-hsssm50w.js → workspace-snapshot-7e9me3q7.js} +3 -3
- package/dist/cli/{worktree-collision-ownership-wj6337ec.js → worktree-collision-ownership-6r6jekr9.js} +12 -12
- package/dist/cli/{worktree-isolation-9fyj85tc.js → worktree-isolation-5kw6jnej.js} +39 -39
- package/dist/commands/registry.d.ts +1 -1
- package/dist/commands/report.d.ts +20 -4
- package/dist/hooks/guardrails/stage-a-route.d.ts +16 -0
- package/dist/hooks/issue-trace-reducer.d.ts +29 -6
- package/dist/hooks/issue-trace-state.d.ts +29 -0
- package/dist/hooks/issue-trace.d.ts +4 -1
- package/dist/index.js +410 -409
- package/dist/observability/catalog.d.ts +2 -2
- package/dist/observability/envelope.d.ts +4 -0
- package/dist/services/execution-attempt.d.ts +80 -0
- package/dist/services/task-cohort.d.ts +123 -0
- package/dist/telemetry.d.ts +1 -1
- package/dist/tools/index.d.ts +3 -0
- package/dist/tools/manifest.d.ts +3 -0
- package/dist/tools/record-branch-freshness.d.ts +17 -0
- package/dist/tools/record-merge-approval.d.ts +17 -0
- package/dist/tools/record-trace-validation.d.ts +18 -0
- package/dist/tools/tool-metadata.d.ts +12 -0
- package/package.json +1 -1
- package/dist/cli/curator-llm-factory-zwc2gpe7.js +0 -74
- package/dist/cli/guardrail-explain-a3hcrpwv.js +0 -75
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The event catalog (issue #2029).
|
|
3
3
|
*
|
|
4
|
-
* Exactly
|
|
4
|
+
* Exactly 65 entries, matching the `TelemetryEvent` union at
|
|
5
5
|
* `src/telemetry.ts:20-172`. Thirty-eight predate the #2029 contract; the 39th is
|
|
6
6
|
* `agent_conflict_detected` (previously emitted through a force-cast past the
|
|
7
7
|
* type system), the 40th is `close_archive_result` (issue #2030 — the
|
|
@@ -89,7 +89,7 @@ export interface CatalogEntry {
|
|
|
89
89
|
/**
|
|
90
90
|
* Whether an event of this kind must carry `trace.parentSpanId`.
|
|
91
91
|
*
|
|
92
|
-
* `false` for all
|
|
92
|
+
* `false` for all 65 entries today, and that is a truthful statement about
|
|
93
93
|
* the current system rather than a placeholder: no producer supplies a
|
|
94
94
|
* parent span, so `createObservation` never sets one. Setting this to `true`
|
|
95
95
|
* for a kind whose producer cannot supply a parent would make every
|
|
@@ -136,6 +136,8 @@ export declare const WorkflowIdsSchema: z.ZodObject<{
|
|
|
136
136
|
hostSessionId: z.ZodOptional<z.ZodString>;
|
|
137
137
|
swarmSessionId: z.ZodOptional<z.ZodString>;
|
|
138
138
|
taskId: z.ZodOptional<z.ZodString>;
|
|
139
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
140
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
139
141
|
phaseId: z.ZodOptional<z.ZodString>;
|
|
140
142
|
laneId: z.ZodOptional<z.ZodString>;
|
|
141
143
|
batchId: z.ZodOptional<z.ZodString>;
|
|
@@ -329,6 +331,8 @@ export declare const ObservabilityEventSchema: z.ZodObject<{
|
|
|
329
331
|
hostSessionId: z.ZodOptional<z.ZodString>;
|
|
330
332
|
swarmSessionId: z.ZodOptional<z.ZodString>;
|
|
331
333
|
taskId: z.ZodOptional<z.ZodString>;
|
|
334
|
+
callId: z.ZodOptional<z.ZodString>;
|
|
335
|
+
invocationId: z.ZodOptional<z.ZodString>;
|
|
332
336
|
phaseId: z.ZodOptional<z.ZodString>;
|
|
333
337
|
laneId: z.ZodOptional<z.ZodString>;
|
|
334
338
|
batchId: z.ZodOptional<z.ZodString>;
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/** Closed attempt/outcome record-class vocabulary (issue #2676 AC1). */
|
|
2
|
+
export type ExecutionAttemptClass = 'denial' | 'attempt' | 'result' | 'duplicate' | 'late' | 'cancelled' | 'provider_failed';
|
|
3
|
+
export declare const EXECUTION_ATTEMPT_CLASSES: readonly ExecutionAttemptClass[];
|
|
4
|
+
/** Terminal disposition of the attempt, when the producer reported one. */
|
|
5
|
+
export type ExecutionAttemptOutcomeStatus = 'success' | 'failure' | 'partial' | 'unknown';
|
|
6
|
+
/** The frozen per-attempt cost axes (issue #2676 AC2). */
|
|
7
|
+
export declare const TASK_ATTEMPT_COST_AXES: readonly ["latencyMs", "inputTokens", "outputTokens", "cacheReadTokens", "estimatedCostUsd", "billedCostUsd"];
|
|
8
|
+
export type TaskAttemptCostAxis = (typeof TASK_ATTEMPT_COST_AXES)[number];
|
|
9
|
+
/** Caller-held cost facts. An absent key means the producer did not hold it. */
|
|
10
|
+
export interface TaskAttemptCostInput {
|
|
11
|
+
taskId?: string;
|
|
12
|
+
attemptId?: string;
|
|
13
|
+
latencyMs?: number;
|
|
14
|
+
inputTokens?: number;
|
|
15
|
+
outputTokens?: number;
|
|
16
|
+
cacheReadTokens?: number;
|
|
17
|
+
estimatedCostUsd?: number;
|
|
18
|
+
billedCostUsd?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* The built cost record: every axis is `number | null`, `null` meaning the
|
|
22
|
+
* producer did not hold the value, with `unavailable` listing exactly the
|
|
23
|
+
* axes that are null. Zero is a legal KNOWN value (zero tokens used) and is
|
|
24
|
+
* never produced as a fallback for a missing input.
|
|
25
|
+
*/
|
|
26
|
+
export interface TaskAttemptCost extends Record<TaskAttemptCostAxis, number | null> {
|
|
27
|
+
taskId?: string;
|
|
28
|
+
attemptId?: string;
|
|
29
|
+
unavailable: readonly string[];
|
|
30
|
+
}
|
|
31
|
+
/** A known axis value must be finite and non-negative to count as held. */
|
|
32
|
+
declare function knownCostValue(value: number | undefined): number | null;
|
|
33
|
+
/**
|
|
34
|
+
* Build the per-attempt cost record. Caller-omitted (or invalid) axes are
|
|
35
|
+
* strictly `null` AND listed in `unavailable`; known axes pass through
|
|
36
|
+
* verbatim and never appear in `unavailable`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildTaskAttemptCost(partial: TaskAttemptCostInput): TaskAttemptCost;
|
|
39
|
+
/** Recorder input. `sessionID`/`callID` are the Stage A casing aliases. */
|
|
40
|
+
export interface ExecutionAttemptInput {
|
|
41
|
+
sessionId?: string;
|
|
42
|
+
/** Stage A casing alias for {@link sessionId}; normalized before emit. */
|
|
43
|
+
sessionID?: string;
|
|
44
|
+
taskId?: string;
|
|
45
|
+
callId?: string;
|
|
46
|
+
/** Stage A casing alias for {@link callId}; normalized before emit. */
|
|
47
|
+
callID?: string;
|
|
48
|
+
invocationId?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Monotonic generation cursor for the (task, call) pair. REQUIRED for
|
|
51
|
+
* class `late` — it is the cursor the record was late against. A `late`
|
|
52
|
+
* caller that cannot supply it is refused fail-open with a warn, never
|
|
53
|
+
* silently downgraded.
|
|
54
|
+
*/
|
|
55
|
+
generation?: number;
|
|
56
|
+
retryIndex?: number;
|
|
57
|
+
laneId?: string;
|
|
58
|
+
knowledgeTraceId?: string;
|
|
59
|
+
attemptClass: ExecutionAttemptClass;
|
|
60
|
+
outcomeStatus?: ExecutionAttemptOutcomeStatus;
|
|
61
|
+
/**
|
|
62
|
+
* Identity (record_id / event id) of the already-committed record this
|
|
63
|
+
* one duplicates. REQUIRED for class `duplicate`; never synthesized — a
|
|
64
|
+
* duplicate caller holding no original identity is refused fail-open.
|
|
65
|
+
*/
|
|
66
|
+
duplicateOf?: string;
|
|
67
|
+
cost?: TaskAttemptCostInput;
|
|
68
|
+
}
|
|
69
|
+
/** Sanitize an identifier for emission: printable, bounded (Stage A pattern). */
|
|
70
|
+
declare function boundedId(value: string | undefined): string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* Record ONE execution attempt as an `execution_attempt_recorded` telemetry
|
|
73
|
+
* event. Fail-open: invalid input logs a warn and returns without emitting.
|
|
74
|
+
*/
|
|
75
|
+
export declare function recordExecutionAttempt(input: ExecutionAttemptInput): void;
|
|
76
|
+
export declare const _internals: {
|
|
77
|
+
boundedId: typeof boundedId;
|
|
78
|
+
knownCostValue: typeof knownCostValue;
|
|
79
|
+
};
|
|
80
|
+
export {};
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Task-attempt cohort snapshot and qualification (issue #2676 / Workstream D16).
|
|
3
|
+
*
|
|
4
|
+
* A causal-rate claim over task attempts requires a stable cohort: a snapshot
|
|
5
|
+
* of the live population taken at a recorded instant (so later mutation cannot
|
|
6
|
+
* change a reported denominator), captured provenance manifests for the
|
|
7
|
+
* trigger / WAL / event / host-status sources (stats + bounded digests, never
|
|
8
|
+
* content parsing), configuration/version strata, and an uncertainty channel
|
|
9
|
+
* that is present whenever sample size or cost fields are incomplete. Reports
|
|
10
|
+
* that cannot meet the contract stay explicitly unqualified and render as
|
|
11
|
+
* descriptive operational counts (the boundary documented in
|
|
12
|
+
* docs/execution-attempt-tracing.md).
|
|
13
|
+
*
|
|
14
|
+
* The mutable-population rule: `snapshotTaskAttemptCohort` deep-copies the
|
|
15
|
+
* population it is handed; every later mutation of the caller's array (or of
|
|
16
|
+
* a nested field of a captured record) is invisible to the snapshot and to
|
|
17
|
+
* every report built from it.
|
|
18
|
+
*
|
|
19
|
+
* Durability: when `directory` is provided, the snapshot persists ONE frozen
|
|
20
|
+
* manifest JSON under `.swarm/observability/cohorts/` (FIFO-bounded to the
|
|
21
|
+
* latest 20 files; write failures are warn-logged and never propagate). This
|
|
22
|
+
* is the only filesystem side effect, and it is registered in the retention
|
|
23
|
+
* registry (row `observability-cohorts`).
|
|
24
|
+
*/
|
|
25
|
+
/** Number of frozen cohort manifests retained on disk (FIFO). */
|
|
26
|
+
export declare const COHORT_MANIFEST_RETENTION = 20;
|
|
27
|
+
/** Sample size below which a cohort always reports a sample-size uncertainty. */
|
|
28
|
+
export declare const COHORT_SAMPLE_SIZE_THRESHOLD = 30;
|
|
29
|
+
/** The provenance manifest sources captured before a cohort is reported. */
|
|
30
|
+
export type CohortManifestSource = 'trigger' | 'wal' | 'event' | 'host_status';
|
|
31
|
+
export interface CohortManifestEntry {
|
|
32
|
+
source: CohortManifestSource;
|
|
33
|
+
status: 'captured' | 'unavailable';
|
|
34
|
+
capturedAt: string;
|
|
35
|
+
sizeBytes?: number;
|
|
36
|
+
digest?: string;
|
|
37
|
+
}
|
|
38
|
+
/** One population record (a folded execution-attempt row or equivalent). */
|
|
39
|
+
export interface TaskAttemptPopulationRecord {
|
|
40
|
+
taskId?: string;
|
|
41
|
+
attemptClass?: string;
|
|
42
|
+
outcomeStatus?: string;
|
|
43
|
+
cost?: unknown;
|
|
44
|
+
[key: string]: unknown;
|
|
45
|
+
}
|
|
46
|
+
export interface TaskAttemptCohortStrata {
|
|
47
|
+
pluginVersion?: string;
|
|
48
|
+
runtime?: string;
|
|
49
|
+
configHash?: string;
|
|
50
|
+
}
|
|
51
|
+
export interface TaskAttemptCohortSnapshot {
|
|
52
|
+
tasks: readonly TaskAttemptPopulationRecord[];
|
|
53
|
+
capturedAt: string;
|
|
54
|
+
count: number;
|
|
55
|
+
strata: TaskAttemptCohortStrata;
|
|
56
|
+
manifests: readonly CohortManifestEntry[];
|
|
57
|
+
}
|
|
58
|
+
export interface TaskCohortReport {
|
|
59
|
+
denominator: number;
|
|
60
|
+
capturedAt: string;
|
|
61
|
+
perClassCounts: Record<string, number>;
|
|
62
|
+
/** Sum over records that HELD the axis (unknown axes contribute nothing). */
|
|
63
|
+
costTotalsKnown: Record<string, number>;
|
|
64
|
+
/** Per axis: how many captured records did not hold the value. */
|
|
65
|
+
costUnavailableCounts: Record<string, number>;
|
|
66
|
+
strata: TaskAttemptCohortStrata;
|
|
67
|
+
/** Non-empty whenever sample size or cost fields are incomplete. */
|
|
68
|
+
uncertainty: string[];
|
|
69
|
+
qualification: {
|
|
70
|
+
qualified: boolean;
|
|
71
|
+
reasons: string[];
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
declare function deepCopyRecord(record: TaskAttemptPopulationRecord): TaskAttemptPopulationRecord;
|
|
75
|
+
declare function captureFileManifest(source: CohortManifestSource, filePath: string, capturedAt: string): CohortManifestEntry;
|
|
76
|
+
/** Minimal shape of `process.versions` this module derives a label from. */
|
|
77
|
+
export type RuntimeVersions = {
|
|
78
|
+
bun?: string;
|
|
79
|
+
node?: string;
|
|
80
|
+
};
|
|
81
|
+
/**
|
|
82
|
+
* Derive the honest runtime label from the host's version table. Bun also
|
|
83
|
+
* defines `process.versions.node`, so the branch must test bun PRESENCE —
|
|
84
|
+
* never string truthiness (a `.trim()`-based `||` fallback yields the bare,
|
|
85
|
+
* version-less "bun" under Node, which sha256-hashes into a poisoned
|
|
86
|
+
* host-status digest).
|
|
87
|
+
*/
|
|
88
|
+
export declare function deriveRuntimeLabel(versions: RuntimeVersions): string;
|
|
89
|
+
declare function captureHostStatusManifest(capturedAt: string, strata: TaskAttemptCohortStrata): CohortManifestEntry;
|
|
90
|
+
declare function manifestFileName(capturedAt: string, manifests: readonly CohortManifestEntry[]): string;
|
|
91
|
+
declare function persistSnapshotManifest(directory: string, snapshot: TaskAttemptCohortSnapshot): void;
|
|
92
|
+
/**
|
|
93
|
+
* Snapshot the live task-attempt population. The population is DEEP-copied:
|
|
94
|
+
* later mutation of the caller's array or of nested record fields cannot
|
|
95
|
+
* change this snapshot or any report built from it. Provenance manifests for
|
|
96
|
+
* the trigger / WAL / event stores are captured BEFORE the population copy is
|
|
97
|
+
* returned, so the reported cohort metric is bound to the population state
|
|
98
|
+
* the manifests describe. When `directory` is provided the snapshot is
|
|
99
|
+
* persisted as a frozen manifest under `.swarm/observability/cohorts/`.
|
|
100
|
+
*/
|
|
101
|
+
export declare function snapshotTaskAttemptCohort(input: {
|
|
102
|
+
tasks: TaskAttemptPopulationRecord[];
|
|
103
|
+
directory?: string;
|
|
104
|
+
strata?: TaskAttemptCohortStrata;
|
|
105
|
+
now?: Date;
|
|
106
|
+
}): TaskAttemptCohortSnapshot;
|
|
107
|
+
/**
|
|
108
|
+
* Build the cohort report from a snapshot. The denominator is the SNAPSHOT's
|
|
109
|
+
* captured count — never a live recount. Uncertainty entries are present
|
|
110
|
+
* whenever the sample is below threshold, any cost axis is unavailable on any
|
|
111
|
+
* record, or any record lacks an outcome; qualification is false with
|
|
112
|
+
* enumerated reasons when the cohort cannot support a causal-rate claim.
|
|
113
|
+
*/
|
|
114
|
+
export declare function buildTaskCohortReport(snapshot: TaskAttemptCohortSnapshot): TaskCohortReport;
|
|
115
|
+
export declare const _internals: {
|
|
116
|
+
captureFileManifest: typeof captureFileManifest;
|
|
117
|
+
captureHostStatusManifest: typeof captureHostStatusManifest;
|
|
118
|
+
deriveRuntimeLabel: typeof deriveRuntimeLabel;
|
|
119
|
+
manifestFileName: typeof manifestFileName;
|
|
120
|
+
persistSnapshotManifest: typeof persistSnapshotManifest;
|
|
121
|
+
deepCopyRecord: typeof deepCopyRecord;
|
|
122
|
+
};
|
|
123
|
+
export {};
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -41,7 +41,7 @@ export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activa
|
|
|
41
41
|
* `prm_hard_stop` TRIGGER emitted by `src/prm/escalation.ts`. A trigger with
|
|
42
42
|
* no matching delivery means the containment never reached the agent.
|
|
43
43
|
*/
|
|
44
|
-
| 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result' | 'knowledge_receipt_transition' | 'knowledge_maintenance' | 'residue_health' | 'context_telemetry_health' | 'skill_usage_health' | 'core_events_health' | 'shell_audit_health' | 'trajectory_health' | 'learning_health_alarm' | 'pr_subscription_health' | 'council_attempt' | 'council_round_transition' | 'council_attempt_unscoped' | 'context_source_attribution' | 'verdict_row_pipe_recovery' | 'training_vault_health';
|
|
44
|
+
| 'prm_hard_stop_delivered' | 'agent_conflict_detected' | 'close_archive_result' | 'knowledge_receipt_transition' | 'knowledge_maintenance' | 'residue_health' | 'context_telemetry_health' | 'skill_usage_health' | 'core_events_health' | 'shell_audit_health' | 'trajectory_health' | 'learning_health_alarm' | 'pr_subscription_health' | 'execution_attempt_recorded' | 'council_attempt' | 'council_round_transition' | 'council_attempt_unscoped' | 'context_source_attribution' | 'verdict_row_pipe_recovery' | 'training_vault_health';
|
|
45
45
|
/** Stable classification for how a reviewer-gate decision was established. */
|
|
46
46
|
export type ReviewerGateEvidenceKind = 'genuine' | 'fallback' | 'data_quality' | 'block';
|
|
47
47
|
/**
|
package/dist/tools/index.d.ts
CHANGED
|
@@ -119,10 +119,13 @@ export { lint_spec } from './lint-spec';
|
|
|
119
119
|
export { mutation_test } from './mutation-test';
|
|
120
120
|
export { executePreparePrWorkflowCheckout, prepare_pr_workflow_checkout, } from './prepare-pr-workflow-checkout';
|
|
121
121
|
export { executeRebindPrFeedbackHead, rebind_pr_feedback_head, } from './rebind-pr-feedback-head';
|
|
122
|
+
export { executeRecordBranchFreshness, record_branch_freshness, } from './record-branch-freshness';
|
|
122
123
|
export { executeRecordImplementationReview, record_implementation_review, } from './record-implementation-review';
|
|
123
124
|
export { executeRecordIssuePublication, record_issue_publication, } from './record-issue-publication';
|
|
124
125
|
export { executeRecordIssueReproduction, record_issue_reproduction, } from './record-issue-reproduction';
|
|
126
|
+
export { executeRecordMergeApproval, record_merge_approval, } from './record-merge-approval';
|
|
125
127
|
export { executeRecordRecurrenceSweep, record_recurrence_sweep, } from './record-recurrence-sweep';
|
|
128
|
+
export { executeRecordTraceValidation, record_trace_validation, } from './record-trace-validation';
|
|
126
129
|
export { executeRecoverReworkTask, recover_rework_task, } from './recover-rework-task';
|
|
127
130
|
export { executeRunPrFeedbackStageA, run_pr_feedback_stage_a, } from './run-pr-feedback-stage-a';
|
|
128
131
|
export { symbols } from './symbols';
|
package/dist/tools/manifest.d.ts
CHANGED
|
@@ -54,6 +54,9 @@ export declare const TOOL_MANIFEST: {
|
|
|
54
54
|
record_issue_publication: () => ToolDefinition;
|
|
55
55
|
record_issue_reproduction: () => ToolDefinition;
|
|
56
56
|
record_recurrence_sweep: () => ToolDefinition;
|
|
57
|
+
record_branch_freshness: () => ToolDefinition;
|
|
58
|
+
record_trace_validation: () => ToolDefinition;
|
|
59
|
+
record_merge_approval: () => ToolDefinition;
|
|
57
60
|
invalidate_pr_feedback_publication: () => ToolDefinition;
|
|
58
61
|
rebind_pr_feedback_head: () => ToolDefinition;
|
|
59
62
|
run_pr_feedback_stage_a: () => ToolDefinition;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* record_branch_freshness — persist the issue-tracer v3 Phase 0
|
|
3
|
+
* branch-freshness receipt (issue #2564).
|
|
4
|
+
*
|
|
5
|
+
* Mirrors trace-check.sh phase0: the receipt RECORDS the fetch outcome —
|
|
6
|
+
* `synced`, `behind:<n>`, or `fetch-failed:<reason>` — and an optional
|
|
7
|
+
* verbatim user override string. Recording any outcome is a successful write;
|
|
8
|
+
* the READER (issue-trace-state.ts branchFreshnessReceiptExists) decides
|
|
9
|
+
* whether the outcome permits the trace: synced permits, behind never
|
|
10
|
+
* permits, fetch-failed permits only with a non-empty recorded override.
|
|
11
|
+
* The reducer's FRESHNESS_GATE consumes that verdict before PLAN.
|
|
12
|
+
*/
|
|
13
|
+
import { createSwarmTool } from './create-tool';
|
|
14
|
+
export declare function executeRecordBranchFreshness(args: unknown, directory: string, context?: {
|
|
15
|
+
sessionID?: string;
|
|
16
|
+
}): Promise<string>;
|
|
17
|
+
export declare const record_branch_freshness: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* record_merge_approval — persist the PR-head-bound merge-approval receipt
|
|
3
|
+
* (issue-tracer v3 Phase 5.1 / 10b-merge-approval, issue #2564).
|
|
4
|
+
*
|
|
5
|
+
* RECORDED, NEVER CERTIFIED: this receipt mirrors trace-check.sh merge_check's
|
|
6
|
+
* presence-and-binding posture — the PR head SHA must equal the final critic's
|
|
7
|
+
* reviewed commit (both 40-hex), and the user approval is captured VERBATIM.
|
|
8
|
+
* The plugin never verifies the approval's authenticity, never drives the
|
|
9
|
+
* merge, and never treats the receipt as authorization; the merge remains a
|
|
10
|
+
* human-enforced gate. The reducer records the trace's terminal
|
|
11
|
+
* `merge_approval_recorded` status when the reader observes this receipt.
|
|
12
|
+
*/
|
|
13
|
+
import { createSwarmTool } from './create-tool';
|
|
14
|
+
export declare function executeRecordMergeApproval(args: unknown, directory: string, context?: {
|
|
15
|
+
sessionID?: string;
|
|
16
|
+
}): Promise<string>;
|
|
17
|
+
export declare const record_merge_approval: ReturnType<typeof createSwarmTool>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* record_trace_validation — persist a per-phase `trace-check.sh` validator
|
|
3
|
+
* receipt for the issue-trace v3 workflow (issue #2564).
|
|
4
|
+
*
|
|
5
|
+
* One entry per validator run: the phase validated, the outcome (pass/fail),
|
|
6
|
+
* and the exact identities the validator reported (reviewedCommit + treeId,
|
|
7
|
+
* both 40-hex). The receipt file upserts per phase — re-running a phase
|
|
8
|
+
* replaces its entry, other phases are preserved — so the reader
|
|
9
|
+
* (issue-trace-state.ts traceValidationReceiptExists) can demand "every
|
|
10
|
+
* recorded phase's latest run passed". The reducer's TRACE_VALIDATION_GATE
|
|
11
|
+
* blocks the commit-pr handoff while any entry is missing, failing, or
|
|
12
|
+
* malformed.
|
|
13
|
+
*/
|
|
14
|
+
import { createSwarmTool } from './create-tool';
|
|
15
|
+
export declare function executeRecordTraceValidation(args: unknown, directory: string, context?: {
|
|
16
|
+
sessionID?: string;
|
|
17
|
+
}): Promise<string>;
|
|
18
|
+
export declare const record_trace_validation: ReturnType<typeof createSwarmTool>;
|
|
@@ -205,6 +205,18 @@ export declare const TOOL_METADATA: {
|
|
|
205
205
|
description: string;
|
|
206
206
|
agents: "architect"[];
|
|
207
207
|
};
|
|
208
|
+
record_branch_freshness: {
|
|
209
|
+
description: string;
|
|
210
|
+
agents: "architect"[];
|
|
211
|
+
};
|
|
212
|
+
record_trace_validation: {
|
|
213
|
+
description: string;
|
|
214
|
+
agents: "architect"[];
|
|
215
|
+
};
|
|
216
|
+
record_merge_approval: {
|
|
217
|
+
description: string;
|
|
218
|
+
agents: "architect"[];
|
|
219
|
+
};
|
|
208
220
|
rebind_pr_feedback_head: {
|
|
209
221
|
description: string;
|
|
210
222
|
agents: "architect"[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.183.0",
|
|
4
4
|
"description": "Architect-centric agentic swarm plugin for OpenCode - hub-and-spoke orchestration with SME consultation, code generation, and QA review",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -1,74 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
createCuratorLLMDelegate
|
|
4
|
-
} from "./index-9eg8f4zm.js";
|
|
5
|
-
import"./index-gtpq64q7.js";
|
|
6
|
-
import"./index-hamqvzqn.js";
|
|
7
|
-
import"./index-01r2wrwa.js";
|
|
8
|
-
import"./index-y03jadcy.js";
|
|
9
|
-
import"./index-dkprb20b.js";
|
|
10
|
-
import"./index-0ea0c676.js";
|
|
11
|
-
import"./index-sf51gh68.js";
|
|
12
|
-
import"./index-txdagbh7.js";
|
|
13
|
-
import"./index-rgfz80gt.js";
|
|
14
|
-
import"./index-6b295cas.js";
|
|
15
|
-
import"./index-x4am0jxt.js";
|
|
16
|
-
import"./index-54sd9bbn.js";
|
|
17
|
-
import"./index-1epynxc4.js";
|
|
18
|
-
import"./index-rdec0y3z.js";
|
|
19
|
-
import"./index-nw3z614g.js";
|
|
20
|
-
import"./index-cjapb4hy.js";
|
|
21
|
-
import"./index-zsrtt42s.js";
|
|
22
|
-
import"./index-r4vve32m.js";
|
|
23
|
-
import"./index-jrxrjz89.js";
|
|
24
|
-
import"./index-by9wfeja.js";
|
|
25
|
-
import"./index-pt7h91zc.js";
|
|
26
|
-
import"./index-q7sjgr1y.js";
|
|
27
|
-
import"./index-epq8am78.js";
|
|
28
|
-
import"./index-j97nc02q.js";
|
|
29
|
-
import"./index-v4h99xhr.js";
|
|
30
|
-
import"./index-1msszzg2.js";
|
|
31
|
-
import"./index-hqa71xfm.js";
|
|
32
|
-
import"./index-a2hvmc3a.js";
|
|
33
|
-
import"./index-2s7dvzff.js";
|
|
34
|
-
import"./index-4qpz7mpn.js";
|
|
35
|
-
import"./index-s34y6gbh.js";
|
|
36
|
-
import"./index-rtry5xyf.js";
|
|
37
|
-
import"./index-9s2rp2j5.js";
|
|
38
|
-
import"./index-frcemc0b.js";
|
|
39
|
-
import"./index-0725jpp7.js";
|
|
40
|
-
import"./index-y28np6j9.js";
|
|
41
|
-
import"./index-fsye9ygy.js";
|
|
42
|
-
import"./index-427x3j6p.js";
|
|
43
|
-
import"./index-ved1325w.js";
|
|
44
|
-
import"./index-w1ydvzef.js";
|
|
45
|
-
import"./index-vvgpgcyn.js";
|
|
46
|
-
import"./index-rdm3px0g.js";
|
|
47
|
-
import"./index-ry16d01s.js";
|
|
48
|
-
import"./index-kkrbybgt.js";
|
|
49
|
-
import"./index-dwc1wztn.js";
|
|
50
|
-
import"./index-vzm6zre7.js";
|
|
51
|
-
import"./index-ae75rja9.js";
|
|
52
|
-
import"./index-23mdeh2a.js";
|
|
53
|
-
import"./index-ap6hs8fj.js";
|
|
54
|
-
import"./index-mkpdcbye.js";
|
|
55
|
-
import"./index-1xnse449.js";
|
|
56
|
-
import"./index-c1ggtmpm.js";
|
|
57
|
-
import"./index-ejhxgyvm.js";
|
|
58
|
-
import"./index-7g4c7s5r.js";
|
|
59
|
-
import"./index-989v83pb.js";
|
|
60
|
-
import"./index-gx2vp8gx.js";
|
|
61
|
-
import"./index-6jrn46zy.js";
|
|
62
|
-
import"./index-zxdawwc7.js";
|
|
63
|
-
import"./index-3ga3ts3h.js";
|
|
64
|
-
import"./index-2t21pv2v.js";
|
|
65
|
-
import"./index-bk5tah7q.js";
|
|
66
|
-
import"./index-gknz3bv1.js";
|
|
67
|
-
import"./index-zpsr8rpc.js";
|
|
68
|
-
import"./index-wvghb3x6.js";
|
|
69
|
-
import"./index-9rwhas09.js";
|
|
70
|
-
import"./index-zgwm4ryv.js";
|
|
71
|
-
import"./index-a76rekgs.js";
|
|
72
|
-
export {
|
|
73
|
-
createCuratorLLMDelegate
|
|
74
|
-
};
|
|
@@ -1,75 +0,0 @@
|
|
|
1
|
-
// @bun
|
|
2
|
-
import {
|
|
3
|
-
handleGuardrailExplain
|
|
4
|
-
} from "./index-68ben2q8.js";
|
|
5
|
-
import"./index-9eg8f4zm.js";
|
|
6
|
-
import"./index-gtpq64q7.js";
|
|
7
|
-
import"./index-hamqvzqn.js";
|
|
8
|
-
import"./index-01r2wrwa.js";
|
|
9
|
-
import"./index-y03jadcy.js";
|
|
10
|
-
import"./index-dkprb20b.js";
|
|
11
|
-
import"./index-0ea0c676.js";
|
|
12
|
-
import"./index-sf51gh68.js";
|
|
13
|
-
import"./index-txdagbh7.js";
|
|
14
|
-
import"./index-rgfz80gt.js";
|
|
15
|
-
import"./index-6b295cas.js";
|
|
16
|
-
import"./index-x4am0jxt.js";
|
|
17
|
-
import"./index-54sd9bbn.js";
|
|
18
|
-
import"./index-1epynxc4.js";
|
|
19
|
-
import"./index-rdec0y3z.js";
|
|
20
|
-
import"./index-nw3z614g.js";
|
|
21
|
-
import"./index-cjapb4hy.js";
|
|
22
|
-
import"./index-zsrtt42s.js";
|
|
23
|
-
import"./index-r4vve32m.js";
|
|
24
|
-
import"./index-jrxrjz89.js";
|
|
25
|
-
import"./index-by9wfeja.js";
|
|
26
|
-
import"./index-pt7h91zc.js";
|
|
27
|
-
import"./index-q7sjgr1y.js";
|
|
28
|
-
import"./index-epq8am78.js";
|
|
29
|
-
import"./index-j97nc02q.js";
|
|
30
|
-
import"./index-v4h99xhr.js";
|
|
31
|
-
import"./index-1msszzg2.js";
|
|
32
|
-
import"./index-hqa71xfm.js";
|
|
33
|
-
import"./index-a2hvmc3a.js";
|
|
34
|
-
import"./index-2s7dvzff.js";
|
|
35
|
-
import"./index-4qpz7mpn.js";
|
|
36
|
-
import"./index-s34y6gbh.js";
|
|
37
|
-
import"./index-rtry5xyf.js";
|
|
38
|
-
import"./index-9s2rp2j5.js";
|
|
39
|
-
import"./index-frcemc0b.js";
|
|
40
|
-
import"./index-0725jpp7.js";
|
|
41
|
-
import"./index-y28np6j9.js";
|
|
42
|
-
import"./index-fsye9ygy.js";
|
|
43
|
-
import"./index-427x3j6p.js";
|
|
44
|
-
import"./index-ved1325w.js";
|
|
45
|
-
import"./index-w1ydvzef.js";
|
|
46
|
-
import"./index-vvgpgcyn.js";
|
|
47
|
-
import"./index-rdm3px0g.js";
|
|
48
|
-
import"./index-ry16d01s.js";
|
|
49
|
-
import"./index-kkrbybgt.js";
|
|
50
|
-
import"./index-dwc1wztn.js";
|
|
51
|
-
import"./index-vzm6zre7.js";
|
|
52
|
-
import"./index-ae75rja9.js";
|
|
53
|
-
import"./index-23mdeh2a.js";
|
|
54
|
-
import"./index-ap6hs8fj.js";
|
|
55
|
-
import"./index-mkpdcbye.js";
|
|
56
|
-
import"./index-1xnse449.js";
|
|
57
|
-
import"./index-c1ggtmpm.js";
|
|
58
|
-
import"./index-ejhxgyvm.js";
|
|
59
|
-
import"./index-7g4c7s5r.js";
|
|
60
|
-
import"./index-989v83pb.js";
|
|
61
|
-
import"./index-gx2vp8gx.js";
|
|
62
|
-
import"./index-6jrn46zy.js";
|
|
63
|
-
import"./index-zxdawwc7.js";
|
|
64
|
-
import"./index-3ga3ts3h.js";
|
|
65
|
-
import"./index-2t21pv2v.js";
|
|
66
|
-
import"./index-bk5tah7q.js";
|
|
67
|
-
import"./index-gknz3bv1.js";
|
|
68
|
-
import"./index-zpsr8rpc.js";
|
|
69
|
-
import"./index-wvghb3x6.js";
|
|
70
|
-
import"./index-9rwhas09.js";
|
|
71
|
-
import"./index-zgwm4ryv.js";
|
|
72
|
-
import"./index-a76rekgs.js";
|
|
73
|
-
export {
|
|
74
|
-
handleGuardrailExplain
|
|
75
|
-
};
|