opencode-swarm 7.171.0 → 7.171.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/binaries/win32-arm64/swarm-sandbox-runner.exe +0 -0
- package/binaries/win32-x64/swarm-sandbox-runner.exe +0 -0
- package/dist/cli/{coder-settlement-pn26zx36.js → coder-settlement-9e696204.js} +7 -7
- package/dist/cli/{config-doctor-jrhpq41y.js → config-doctor-zr748h4m.js} +2 -2
- package/dist/cli/{core-r0nbh1k2.js → core-aa3jmzcs.js} +1 -1
- package/dist/cli/{curation-policy-qemp257w.js → curation-policy-fakrpw5t.js} +4 -4
- package/dist/cli/{curator-drift-3ssjr0nx.js → curator-drift-r9r8gepb.js} +2 -2
- package/dist/cli/{curator-llm-factory-89yjg1m4.js → curator-llm-factory-nshzhgs4.js} +32 -32
- package/dist/cli/{curator-0g733bka.js → curator-xgpxtaf1.js} +32 -32
- package/dist/cli/{evidence-summary-service-4r7sqb2h.js → evidence-summary-service-5e2323zr.js} +13 -13
- package/dist/cli/{gate-evidence-f13tm63x.js → gate-evidence-5htpsr5y.js} +4 -4
- package/dist/cli/{guardrail-explain-kt4w2rt8.js → guardrail-explain-d0h0p73g.js} +33 -33
- package/dist/cli/{guardrail-log-18wdr04f.js → guardrail-log-heejmjce.js} +6 -6
- package/dist/cli/{guardrail-reset-795t6nah.js → guardrail-reset-rdqxeqy0.js} +32 -32
- package/dist/cli/{hive-promoter-gwtvg5vc.js → hive-promoter-n262tkm3.js} +32 -32
- package/dist/cli/{index-ttyvcxxb.js → index-04ph4jp2.js} +2 -2
- package/dist/cli/{index-9fxnn8xg.js → index-0caqxnby.js} +1 -1
- package/dist/cli/{index-ak3ca0nv.js → index-0yffa3np.js} +5 -5
- package/dist/cli/{index-xdw0m34m.js → index-11gz0few.js} +1 -1
- package/dist/cli/{index-wp0396m1.js → index-2ryy0cwt.js} +6 -6
- package/dist/cli/{index-sz75avt3.js → index-3jcp3zb6.js} +1 -1
- package/dist/cli/{index-k2cpsr0d.js → index-5a8q4qr5.js} +1 -1
- package/dist/cli/{index-znf55hyt.js → index-6k5aq7b9.js} +2 -2
- package/dist/cli/{index-zjkkz9qh.js → index-7hnjs7tf.js} +2 -2
- package/dist/cli/{index-4m7q9hqd.js → index-7qqwx64h.js} +5 -5
- package/dist/cli/{index-bvr0p6ns.js → index-95e3a9en.js} +1 -1
- package/dist/cli/{index-cravqkxf.js → index-9dz2ee2g.js} +55 -50
- package/dist/cli/{index-wy4txsws.js → index-9txyxbqc.js} +7 -7
- package/dist/cli/{index-npst1d4g.js → index-9vfp6g53.js} +34 -34
- package/dist/cli/{index-br3mvbsa.js → index-aa2eyfvr.js} +2 -2
- package/dist/cli/{index-4dpsvbdt.js → index-d79q2f8z.js} +3 -3
- package/dist/cli/{index-gxbesz2h.js → index-dsgc303n.js} +3 -3
- package/dist/cli/{index-7s5cm87j.js → index-e7yv4xw1.js} +2 -2
- package/dist/cli/{index-v3e19zzm.js → index-er6sk4e6.js} +1 -1
- package/dist/cli/{index-cex3emb2.js → index-evxd1art.js} +1 -1
- package/dist/cli/{index-mvcjc28t.js → index-f1rj1j8t.js} +279 -179
- package/dist/cli/{index-bernkwgf.js → index-g6nen3gt.js} +1 -1
- package/dist/cli/{index-sz9qnjd6.js → index-gq2zdxep.js} +5 -5
- package/dist/cli/{index-003d071j.js → index-j6rq132j.js} +6 -6
- package/dist/cli/{index-nmffafb0.js → index-jr6pypmj.js} +32 -32
- package/dist/cli/{index-cgpwjctj.js → index-kb66he4e.js} +1 -1
- package/dist/cli/{index-g93g1c5r.js → index-mazy938h.js} +1 -1
- package/dist/cli/{index-fdz0076x.js → index-nfs78aqj.js} +1 -1
- package/dist/cli/{index-d7yc4ys8.js → index-ph94evsh.js} +3 -3
- package/dist/cli/{index-dgpdnve5.js → index-q2yk70rs.js} +2 -1
- package/dist/cli/{index-0qa2cqyv.js → index-qcy7eg6z.js} +5 -5
- package/dist/cli/{index-7c0e181h.js → index-qdy4a48x.js} +1 -1
- package/dist/cli/{index-yj0qrgyc.js → index-r60cw2jt.js} +6 -6
- package/dist/cli/{index-b3nw1bzp.js → index-rrc08h4q.js} +3 -3
- package/dist/cli/{index-j92fe86t.js → index-vqb65csb.js} +9 -9
- package/dist/cli/{index-h17tpj0y.js → index-wfh89qct.js} +4 -4
- package/dist/cli/{index-dvbf6fpn.js → index-yqbnsmmv.js} +39 -0
- package/dist/cli/index.js +32 -32
- package/dist/cli/{knowledge-escalator-kpfm536v.js → knowledge-escalator-kn74r5w8.js} +10 -10
- package/dist/cli/{knowledge-events-t3e721m2.js → knowledge-events-7gpw741m.js} +8 -8
- package/dist/cli/{knowledge-link-refyc1fz.js → knowledge-link-vh9pfnb9.js} +3 -3
- package/dist/cli/{knowledge-store-sk2bhh52.js → knowledge-store-3f9kke7z.js} +4 -4
- package/dist/cli/{knowledge-validator-nmc56pbg.js → knowledge-validator-c2z68v8v.js} +6 -6
- package/dist/cli/{pending-delegations-ckshrtar.js → pending-delegations-d5c07rb7.js} +9 -9
- package/dist/cli/{pr-subscriptions-h81nme2p.js → pr-subscriptions-krv0jvds.js} +9 -9
- package/dist/cli/{pr-workflow-gate-m1k4b8mr.js → pr-workflow-gate-hmdht1he.js} +32 -32
- package/dist/cli/{runner-kzs5wbqh.js → runner-8m8qhngm.js} +4 -4
- package/dist/cli/{scan-cursor-e7varrte.js → scan-cursor-b57xxs3q.js} +5 -5
- package/dist/cli/{schema-nsb0saad.js → schema-r8tv8dqm.js} +1 -1
- package/dist/cli/{scope-persistence-2s5h5ry7.js → scope-persistence-0sc90mpj.js} +13 -13
- package/dist/cli/{skill-generator-wpq9j1nf.js → skill-generator-syxa1mxm.js} +12 -12
- package/dist/cli/{snapshot-coordination-init-8nhmhefs.js → snapshot-coordination-init-x18mwxyv.js} +32 -32
- package/dist/cli/{telemetry-z9scwfbz.js → telemetry-0mz37v3h.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-2kmajcc9.js → worktree-collision-ownership-1tzw8qzp.js} +9 -9
- package/dist/cli/{worktree-isolation-kepgr7j2.js → worktree-isolation-ez0e48v3.js} +32 -32
- package/dist/db/observability-event-store.d.ts +17 -1
- package/dist/index.js +18 -17
- package/dist/observability/index.d.ts +1 -1
- package/dist/observability/observe.d.ts +6 -0
- package/dist/pr-review/reducer.d.ts +18 -10
- package/dist/pr-review/types.d.ts +43 -47
- package/dist/retention/dir-prune.d.ts +5 -1
- package/dist/telemetry.d.ts +10 -2
- package/package.json +2 -1
|
@@ -50,7 +50,7 @@ export type { TraceAndSpanId } from './ids.js';
|
|
|
50
50
|
export { newEventId, newSpanId, pseudonymousRef, SPAN_ID_HEX_LENGTH, TRACE_ID_HEX_LENGTH, } from './ids.js';
|
|
51
51
|
export { adaptLegacyTelemetryPayload, extractOutcome, extractWorkflowIds, KNOWN_TELEMETRY_KEYS, LEGACY_ADAPTER_RULES, NON_OBJECT_PAYLOAD_MARKER, } from './legacy.js';
|
|
52
52
|
export type { InitObservabilityInput } from './observe.js';
|
|
53
|
-
export { createObservation, initObservability, resetObservabilityForTesting, toLegacyTelemetryLine, } from './observe.js';
|
|
53
|
+
export { canonicalLineContent, createObservation, initObservability, resetObservabilityForTesting, toLegacyTelemetryLine, } from './observe.js';
|
|
54
54
|
export { mappingForEntry, OPENINFERENCE_ATTRIBUTES, OPENINFERENCE_MAPPING_VERSION, OTEL_GENAI_ATTRIBUTES, OTEL_GENAI_MAPPING_VERSION, } from './otel-mapping.js';
|
|
55
55
|
export type { RelationshipValidationResult } from './relationships.js';
|
|
56
56
|
export { RELATIONSHIP_VIOLATION_CODES, validateEventRelationships, } from './relationships.js';
|
|
@@ -101,6 +101,12 @@ export declare function createObservation(kind: string, data: unknown): Observab
|
|
|
101
101
|
* those inputs.
|
|
102
102
|
*/
|
|
103
103
|
export declare function toLegacyTelemetryLine(event: ObservabilityEvent): Record<string, unknown>;
|
|
104
|
+
/**
|
|
105
|
+
* The exact JSONL line content `emit()` writes, without the EOL. Single
|
|
106
|
+
* definition so the writer (src/telemetry.ts) and the observability store's
|
|
107
|
+
* content-derived `line_hash` correlation (issue #2487) can never drift apart.
|
|
108
|
+
*/
|
|
109
|
+
export declare function canonicalLineContent(event: ObservabilityEvent): string;
|
|
104
110
|
/**
|
|
105
111
|
* Reset all four module-scoped variables.
|
|
106
112
|
*
|
|
@@ -1,24 +1,30 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* PR-review transition authority (
|
|
2
|
+
* PR-review transition authority (issues #2385, #2512).
|
|
3
3
|
*
|
|
4
4
|
* Pure `(state, event) -> { state, effects }` reducer over the closed
|
|
5
5
|
* `PrReviewEvent` union. Rule computation is delegated to the focused
|
|
6
6
|
* boundary modules (`circuit.ts`, `completion.ts` via its settlement inputs,
|
|
7
7
|
* `critic-routing.ts`, `lifecycle.ts`); this module owns transition
|
|
8
8
|
* composition and the explicit rejection of every invalid transition class
|
|
9
|
-
* named by issue #2385:
|
|
9
|
+
* named by issue #2385 that is reducer-observable:
|
|
10
10
|
*
|
|
11
|
-
* - observer deadline / client absence → terminal child failure
|
|
12
|
-
* - raw transcript / parser failure → provider circuit signal
|
|
13
|
-
* - one lane → multiple circuit samples (delegated to circuit.ts's
|
|
14
|
-
* distinct-`(generation, batch, lane)` scan; asserted by property tests)
|
|
15
11
|
* - unresolved/live lane → terminal coverage report
|
|
16
|
-
* - partial
|
|
12
|
+
* - partial coverage → approval; zero coverage → anything but INCOMPLETE
|
|
17
13
|
* - ordinary MEDIUM → critic without typed high-impact/vulnerability evidence
|
|
18
14
|
* (enforced where critic inventory is composed, via critic-routing.ts)
|
|
19
|
-
* - stale/foreign authorization →
|
|
15
|
+
* - stale/foreign authorization → armed-recovery transition
|
|
20
16
|
* - late old-generation result → current-state mutation
|
|
21
|
-
*
|
|
17
|
+
*
|
|
18
|
+
* Rules that depend on facts this pure boundary cannot observe live at
|
|
19
|
+
* richer executors and are NOT reducer events (issue #2512 wire-or-retire
|
|
20
|
+
* census; see docs/pr-review-transition-authority.md): observer-deadline /
|
|
21
|
+
* client-absence / parser / stale-sweep evidence classification
|
|
22
|
+
* (`classifyPrReviewCircuitSignal`), structured-receipt downgrade protection
|
|
23
|
+
* (`validateExactStructuredReceiptCoverage`), operator lane cancellation
|
|
24
|
+
* (`collectOnce` cancel_pending), publication arming/settlement
|
|
25
|
+
* (`completePrWorkflow` + `allowedPrReviewReportVerdicts`), and reviewer
|
|
26
|
+
* re-entry consumption (`reservePrReviewReentryAuthorizationAgainstBinding` —
|
|
27
|
+
* a pure reducer cannot independently observe a concurrent storage mutation).
|
|
22
28
|
*
|
|
23
29
|
* The owning gate and `dispatch-lanes` are orchestration adapters: they build
|
|
24
30
|
* events from real I/O, apply the returned state, and map typed rejections to
|
|
@@ -30,7 +36,9 @@
|
|
|
30
36
|
* `pending-delegations.ts`; `emit_diagnostic` describes the collect
|
|
31
37
|
* observer's bounded diagnostics channel; `block_dispatch` describes the
|
|
32
38
|
* circuit-open admission refusal. No effect kind is emitted without a real
|
|
33
|
-
* executor (reviewer finding 1, issue #2385 Phase 8b)
|
|
39
|
+
* executor (reviewer finding 1, issue #2385 Phase 8b), and no event member is
|
|
40
|
+
* declared without a production construction site (issue #2512; enforced by
|
|
41
|
+
* tests/unit/pr-review/reducer-adapter-authority.test.ts).
|
|
34
42
|
*
|
|
35
43
|
* Probe outcomes other than an admission rollback are processed by the
|
|
36
44
|
* machine on the NEXT staged admission: the gate feeds the recorded probe's
|
|
@@ -78,7 +78,7 @@ export type PrReviewEffect = {
|
|
|
78
78
|
replay?: boolean;
|
|
79
79
|
} | {
|
|
80
80
|
kind: 'emit_diagnostic';
|
|
81
|
-
source: 'collection_observer'
|
|
81
|
+
source: 'collection_observer';
|
|
82
82
|
code: string;
|
|
83
83
|
boundedDetail?: string | undefined;
|
|
84
84
|
} | {
|
|
@@ -104,11 +104,38 @@ export type PrReviewCircuitProbeOutcome = {
|
|
|
104
104
|
} | {
|
|
105
105
|
result: 'rolled_back_admission';
|
|
106
106
|
};
|
|
107
|
+
/**
|
|
108
|
+
* A settled critic receipt: a critic verdict that terminates its assigned
|
|
109
|
+
* coverage obligation (issue #2512). UPHELD, DOWNGRADED, and DISPROVED each
|
|
110
|
+
* satisfy the critic coverage their finding was assigned; NEEDS_MORE_EVIDENCE
|
|
111
|
+
* is deliberately nonterminal and is not representable here. The digest is the
|
|
112
|
+
* authoritative reviewer verdict row the critic claim was bound to at
|
|
113
|
+
* composition time (`reviewerVerdictRowDigest`; composition rejects unbound
|
|
114
|
+
* claims), so a receipt can only be built from the current authoritative
|
|
115
|
+
* reviewer rows.
|
|
116
|
+
*/
|
|
117
|
+
export interface PrReviewCriticSettledReceipt {
|
|
118
|
+
findingId: string;
|
|
119
|
+
status: 'UPHELD' | 'DOWNGRADED' | 'DISPROVED';
|
|
120
|
+
reviewerRowDigest: string;
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* The closed event vocabulary for the PR-review transition authority
|
|
124
|
+
* (`reducer.ts`), issue #2512's registered-path contract: every declared event
|
|
125
|
+
* member has a production construction site (see
|
|
126
|
+
* docs/pr-review-transition-authority.md for the wire-or-retire table). Events
|
|
127
|
+
* whose production authority lives at a richer executor boundary — transcript
|
|
128
|
+
* downgrade protection (`validateExactStructuredReceiptCoverage`), provider
|
|
129
|
+
* terminal evidence classification (`classifyPrReviewCircuitSignal`),
|
|
130
|
+
* operator lane cancellation (`collectOnce` cancel_pending), publication
|
|
131
|
+
* arming/settlement (`completePrWorkflow`), and reviewer re-entry consumption
|
|
132
|
+
* (`reservePrReviewReentryAuthorizationAgainstBinding`) — are deliberately
|
|
133
|
+
* RETIRED from this union rather than declared without a dispatch site.
|
|
134
|
+
*/
|
|
107
135
|
export type PrReviewEvent = {
|
|
108
136
|
type: 'base_admission_requested';
|
|
109
137
|
batchId: string;
|
|
110
138
|
lanes: PrReviewBaseDispatchLane[];
|
|
111
|
-
depthTier: 'S' | 'M' | 'L';
|
|
112
139
|
maxBatches: number;
|
|
113
140
|
validatedAt: string;
|
|
114
141
|
} | {
|
|
@@ -128,34 +155,6 @@ export type PrReviewEvent = {
|
|
|
128
155
|
semanticEnvelopeDigest: string;
|
|
129
156
|
outcome: 'CLEAN' | 'FINDINGS' | 'INCOMPLETE';
|
|
130
157
|
existingReceiptDigest?: string | undefined;
|
|
131
|
-
} | {
|
|
132
|
-
type: 'transcript_evidence_presented';
|
|
133
|
-
batchId: string;
|
|
134
|
-
laneId: string;
|
|
135
|
-
laneHasStructuredReceipt: boolean;
|
|
136
|
-
} | {
|
|
137
|
-
type: 'provider_terminal_observed';
|
|
138
|
-
batchId: string;
|
|
139
|
-
laneId: string;
|
|
140
|
-
generation: number;
|
|
141
|
-
evidence: {
|
|
142
|
-
source: 'typed_terminal_error_class';
|
|
143
|
-
category: string;
|
|
144
|
-
kind: string;
|
|
145
|
-
} | {
|
|
146
|
-
source: 'observer_deadline';
|
|
147
|
-
} | {
|
|
148
|
-
source: 'client_unavailable';
|
|
149
|
-
} | {
|
|
150
|
-
source: 'parser_or_transcript';
|
|
151
|
-
} | {
|
|
152
|
-
source: 'stale_observation';
|
|
153
|
-
};
|
|
154
|
-
} | {
|
|
155
|
-
type: 'lane_cancelled';
|
|
156
|
-
batchId: string;
|
|
157
|
-
laneId: string;
|
|
158
|
-
generation: number;
|
|
159
158
|
} | {
|
|
160
159
|
type: 'circuit_advance_requested';
|
|
161
160
|
nowMs: number;
|
|
@@ -187,29 +186,26 @@ export type PrReviewEvent = {
|
|
|
187
186
|
} | {
|
|
188
187
|
type: 'critic_result_recorded';
|
|
189
188
|
criticRequiredFindingIds: readonly string[];
|
|
190
|
-
|
|
191
|
-
} | {
|
|
192
|
-
type: 'publication_armed';
|
|
193
|
-
coverageKind: PrReviewTerminalCoverageKind;
|
|
194
|
-
verdict: PrReviewReportVerdict;
|
|
195
|
-
} | {
|
|
196
|
-
type: 'publication_published';
|
|
197
|
-
binding: PrReviewAuthorizationBinding;
|
|
189
|
+
criticSettledReceipts: readonly PrReviewCriticSettledReceipt[];
|
|
198
190
|
} | {
|
|
199
191
|
type: 'armed_recovery_requested';
|
|
200
192
|
binding: PrReviewAuthorizationBinding;
|
|
201
193
|
dimensionsToCancel: PrReviewBaseDimensionId[];
|
|
202
194
|
nowIso: string;
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
binding: PrReviewAuthorizationBinding;
|
|
206
|
-
expectedRole: 'reviewer' | 'test_engineer';
|
|
207
|
-
role: 'reviewer' | 'test_engineer';
|
|
195
|
+
/** The operator's sanitized reason; the transition persists it verbatim. */
|
|
196
|
+
reason: string;
|
|
208
197
|
};
|
|
209
198
|
/**
|
|
210
|
-
* The exact-identity binding an armed recovery
|
|
211
|
-
*
|
|
212
|
-
*
|
|
199
|
+
* The exact-identity binding an armed recovery authorization must carry
|
|
200
|
+
* (issues #2383/#2385/#2512). Stale or foreign values are rejected with
|
|
201
|
+
* `stale_foreign_authorization`.
|
|
202
|
+
*
|
|
203
|
+
* Authority split (issue #2512): the reducer validates the fields the workflow
|
|
204
|
+
* state itself carries — `sessionID`, `workflowInstanceId`, `prHeadSha`, and
|
|
205
|
+
* `generation` (`bindingRejection` in reducer.ts). `revisionDigest` is only
|
|
206
|
+
* observable by the executor that resolved it (the armed publication record or
|
|
207
|
+
* the live binding context), so it is validated THERE — never here; a pure
|
|
208
|
+
* reducer cannot independently observe a concurrent storage mutation.
|
|
213
209
|
*/
|
|
214
210
|
export interface PrReviewAuthorizationBinding {
|
|
215
211
|
sessionID: string;
|
|
@@ -218,7 +214,7 @@ export interface PrReviewAuthorizationBinding {
|
|
|
218
214
|
revisionDigest?: string;
|
|
219
215
|
generation: number;
|
|
220
216
|
}
|
|
221
|
-
export type PrReviewTransitionRejectionCode = '
|
|
217
|
+
export type PrReviewTransitionRejectionCode = 'live_lane_blocks_coverage' | 'partial_coverage_cannot_approve' | 'no_coverage_requires_incomplete' | 'critic_required_unfulfilled' | 'stale_foreign_authorization' | 'stale_generation_result' | 'duplicate_conflicting_result' | 'base_batch_limit_reached' | 'rollback_preconditions_failed' | 'unknown_event';
|
|
222
218
|
export interface PrReviewTransitionRejection {
|
|
223
219
|
code: PrReviewTransitionRejectionCode;
|
|
224
220
|
detail: string;
|
|
@@ -23,6 +23,7 @@
|
|
|
23
23
|
* - per-entry failures are swallowed (fail-open): one unreadable entry
|
|
24
24
|
* never aborts the family.
|
|
25
25
|
*/
|
|
26
|
+
import * as fs from 'node:fs';
|
|
26
27
|
export interface PruneDirectoryOptions {
|
|
27
28
|
/** Keep at most this many entries (newest by mtime). */
|
|
28
29
|
maxEntries?: number;
|
|
@@ -39,7 +40,10 @@ export interface PruneDirectoryOptions {
|
|
|
39
40
|
maxScan?: number;
|
|
40
41
|
/** Count victims without deleting (blast-radius rehearsal / dry_run). */
|
|
41
42
|
dryRun?: boolean;
|
|
43
|
+
/** Optional allow-list for entries eligible for age/count pruning. */
|
|
44
|
+
includeEntry?: PruneEntryFilter;
|
|
42
45
|
}
|
|
46
|
+
export type PruneEntryFilter = (name: string, stat: fs.Stats) => boolean;
|
|
43
47
|
export interface PruneCandidate {
|
|
44
48
|
name: string;
|
|
45
49
|
mtimeMs: number;
|
|
@@ -61,7 +65,7 @@ export declare function subtreeNewestFileMtime(root: string, maxScan: number): n
|
|
|
61
65
|
*/
|
|
62
66
|
export declare const SUBTREE_SCAN_CAP = 2000;
|
|
63
67
|
/** List bounded entries with effective mtimes; symlinked entries are collected separately and refused. */
|
|
64
|
-
export declare function listPruneCandidates(dir: string, maxScan: number): {
|
|
68
|
+
export declare function listPruneCandidates(dir: string, maxScan: number, includeEntry?: PruneEntryFilter): {
|
|
65
69
|
candidates: PruneCandidate[];
|
|
66
70
|
refusedSymlinks: string[];
|
|
67
71
|
};
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import type { ObservabilityEvent } from './observability/envelope.js';
|
|
2
|
-
import { createObservation, toLegacyTelemetryLine } from './observability/index.js';
|
|
2
|
+
import { canonicalLineContent, createObservation, toLegacyTelemetryLine } from './observability/index.js';
|
|
3
3
|
import type { DelegationCostFields } from './services/cost-accounting.js';
|
|
4
4
|
export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'delegation_cost_correction' | 'delegation_cost_binding' | 'delegation_cost_join' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'gate_parse_error' | 'reviewer_gate_decision' | 'phase_changed' | 'budget_updated' | 'context_pruned' | 'retrieval_routed' | 'model_fallback'
|
|
5
5
|
/**
|
|
@@ -50,7 +50,14 @@ export type TelemetryListener = (event: TelemetryEvent, data: Record<string, unk
|
|
|
50
50
|
* two-argument listener stays assignable. The SQLite observability sink
|
|
51
51
|
* (`src/db/observability-event-store.ts`) is the canonical consumer.
|
|
52
52
|
*/
|
|
53
|
-
canonical?: ObservabilityEvent
|
|
53
|
+
canonical?: ObservabilityEvent,
|
|
54
|
+
/**
|
|
55
|
+
* The canonical JSONL line content for `canonical` (no trailing EOL),
|
|
56
|
+
* stringified exactly once by `emit()` and handed to listeners so the
|
|
57
|
+
* sink's line-hash path never re-stringifies the same envelope (issue
|
|
58
|
+
* #2487 review PRR-005).
|
|
59
|
+
*/
|
|
60
|
+
canonicalContent?: string) => void;
|
|
54
61
|
export declare function startHeartbeatTracking(): void;
|
|
55
62
|
export declare function getLastHeartbeat(sessionId: string): number | undefined;
|
|
56
63
|
export declare function stopHeartbeatTracking(): void;
|
|
@@ -510,4 +517,5 @@ export declare const _internals: {
|
|
|
510
517
|
heartbeatListenerCount: () => number;
|
|
511
518
|
createObservation: typeof createObservation;
|
|
512
519
|
toLegacyTelemetryLine: typeof toLegacyTelemetryLine;
|
|
520
|
+
canonicalLineContent: typeof canonicalLineContent;
|
|
513
521
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.171.
|
|
3
|
+
"version": "7.171.2",
|
|
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",
|
|
@@ -113,6 +113,7 @@
|
|
|
113
113
|
"repro:704": "node scripts/repro-704.mjs",
|
|
114
114
|
"repro:1144": "bun scripts/repro-1144.mjs",
|
|
115
115
|
"repro:1873": "bun build scripts/repro-1873-entry.ts --outdir dist-build-test/repro-1873 --target node --format esm && node scripts/repro-1873.mjs",
|
|
116
|
+
"repro:2487": "bun build scripts/repro-2487-parity-entry.ts --outdir dist-build-test/repro-2487 --target node --format esm && node scripts/repro-2487-parity.mjs",
|
|
116
117
|
"check:events": "bun run scripts/check-event-contract.ts",
|
|
117
118
|
"check:retention": "bun run scripts/check-retention-registry.ts",
|
|
118
119
|
"check:core-events": "bun run scripts/check-core-events-usage.ts",
|