opencode-swarm 7.159.0 → 7.159.1
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/dist/cli/{coder-settlement-66mqw0xt.js → coder-settlement-d89tqam8.js} +9 -9
- package/dist/cli/{config-doctor-nkx61b9e.js → config-doctor-8zawz3qh.js} +2 -2
- package/dist/cli/{core-b3db7gf6.js → core-pp64ys5v.js} +1 -1
- package/dist/cli/{curation-policy-vn3m5nq2.js → curation-policy-2gq8307w.js} +6 -6
- package/dist/cli/{curator-llm-factory-c4y1mrr5.js → curator-llm-factory-m3yw6sn5.js} +30 -30
- package/dist/cli/{curator-w4ntvkz5.js → curator-mpqpbr0r.js} +30 -30
- package/dist/cli/{evidence-summary-service-vadgnzk6.js → evidence-summary-service-qaq1eba9.js} +12 -12
- package/dist/cli/{gate-evidence-0chatz5e.js → gate-evidence-r0c71n04.js} +6 -6
- package/dist/cli/{guardrail-explain-ax2qmsp4.js → guardrail-explain-5z64w3ah.js} +31 -31
- package/dist/cli/{guardrail-log-t3c9g8tc.js → guardrail-log-f9nf687y.js} +5 -5
- package/dist/cli/{guardrail-reset-wvdb5sv5.js → guardrail-reset-yjwk20rb.js} +30 -30
- package/dist/cli/{hive-promoter-mfq3ee0n.js → hive-promoter-zjtgbh4w.js} +30 -30
- package/dist/cli/{index-nwkr6tvv.js → index-0zerbq1v.js} +1 -1
- package/dist/cli/{index-mc9qgkwd.js → index-1qpagg2t.js} +3 -3
- package/dist/cli/{index-fcp41snp.js → index-29wav1x0.js} +4 -4
- package/dist/cli/{index-ghjs1n7k.js → index-2z00wqvb.js} +3 -3
- package/dist/cli/{index-8kfbdrxa.js → index-36sgq7n9.js} +32 -32
- package/dist/cli/{index-9vt2hknx.js → index-3rcqxbwt.js} +1 -1
- package/dist/cli/{index-hte1e31d.js → index-3scbg6n2.js} +2 -2
- package/dist/cli/{index-e2s08v0q.js → index-4k9pqbxw.js} +2 -2
- package/dist/cli/{index-xmz69g65.js → index-4nc9npx5.js} +2 -2
- package/dist/cli/{index-pfnj5pvs.js → index-54pkyasv.js} +1 -1
- package/dist/cli/{index-6e6qxf5q.js → index-60mzwj91.js} +1 -1
- package/dist/cli/{index-8fqb0ynp.js → index-6z53bew2.js} +1 -1
- package/dist/cli/{index-tcbjjppb.js → index-7yg4ypyg.js} +1 -1
- package/dist/cli/{index-3e8600a7.js → index-86dvzyac.js} +703 -222
- package/dist/cli/{index-vywbn766.js → index-8819vcke.js} +4 -4
- package/dist/cli/{index-04yrxg0z.js → index-9fphcxes.js} +2 -2
- package/dist/cli/{index-1sdb57jv.js → index-9yxyc1gb.js} +6 -6
- package/dist/cli/{index-zcmwwp1x.js → index-a5w29k1t.js} +1 -1
- package/dist/cli/{index-xagq35tf.js → index-av3gnekk.js} +1 -1
- package/dist/cli/{index-erdsawqz.js → index-bea260ta.js} +6 -6
- package/dist/cli/{index-ynjy98vv.js → index-bz7ayg01.js} +5 -5
- package/dist/cli/{index-k4arrwrz.js → index-f3yphmk6.js} +7 -7
- package/dist/cli/{index-5zgf140g.js → index-g6d8xam2.js} +1 -1
- package/dist/cli/{index-k48kgm6z.js → index-gkw7kq6z.js} +5 -5
- package/dist/cli/{index-b82tq895.js → index-k6y6btb6.js} +3 -3
- package/dist/cli/{index-h1g8w4v0.js → index-prknc0xn.js} +129 -44
- package/dist/cli/{index-z54qw70y.js → index-tvz43tea.js} +1 -1
- package/dist/cli/{index-h52hs4e9.js → index-v3jy0tc6.js} +2 -2
- package/dist/cli/{index-pvzaryhr.js → index-ve3v09kq.js} +1 -1
- package/dist/cli/{index-b1tenv2s.js → index-wae55z9w.js} +7 -1
- package/dist/cli/{index-8jnzp5ct.js → index-wttqayp1.js} +2 -2
- package/dist/cli/{index-35grv4jg.js → index-yw26j0q7.js} +7 -7
- package/dist/cli/{index-we3nf5as.js → index-zmc8mm7v.js} +4 -4
- package/dist/cli/{index-7s1hmrfh.js → index-zxkv8x5n.js} +2 -2
- package/dist/cli/index.js +30 -30
- package/dist/cli/{knowledge-escalator-x85t1e66.js → knowledge-escalator-585m4927.js} +11 -11
- package/dist/cli/{knowledge-events-bwx99mxc.js → knowledge-events-ssegqfmy.js} +9 -9
- package/dist/cli/{knowledge-link-cj2abbae.js → knowledge-link-a9fafeb3.js} +5 -5
- package/dist/cli/{knowledge-store-21m81zsa.js → knowledge-store-nznky6cv.js} +6 -6
- package/dist/cli/{knowledge-validator-yxcadg1p.js → knowledge-validator-3byea8gp.js} +8 -8
- package/dist/cli/{pending-delegations-b8qka5nf.js → pending-delegations-qrjq3s29.js} +3 -3
- package/dist/cli/{pr-review-reentry-authorization-wv3ck5kh.js → pr-review-reentry-authorization-w8ja0m2p.js} +30 -30
- package/dist/cli/{pr-subscriptions-j9j70bmd.js → pr-subscriptions-fvmey1x6.js} +4 -4
- package/dist/cli/{runner-sj5sf36c.js → runner-atbehryj.js} +6 -6
- package/dist/cli/{scan-cursor-m3w0tapb.js → scan-cursor-kv9scb2v.js} +7 -7
- package/dist/cli/{schema-0b0dqn28.js → schema-a7f88yc3.js} +1 -1
- package/dist/cli/{scope-persistence-199f7yqc.js → scope-persistence-x6de46s4.js} +8 -8
- package/dist/cli/{skill-generator-a2ekcbe2.js → skill-generator-vwcrfrw3.js} +13 -13
- package/dist/cli/{telemetry-r8e8zey7.js → telemetry-3rh94wv3.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-5qaab3q7.js → worktree-collision-ownership-7kf9mm5z.js} +5 -5
- package/dist/cli/{worktree-isolation-esesc842.js → worktree-isolation-6zh5bxrd.js} +30 -30
- package/dist/config/schema.d.ts +20 -0
- package/dist/evaluation/contracts.d.ts +5 -5
- package/dist/evaluation/ephemeral-agent-dispatcher.d.ts +2 -0
- package/dist/evaluation/model-dispatcher.d.ts +2 -2
- package/dist/index.js +189 -189
- package/dist/observability/catalog.d.ts +5 -3
- package/dist/review/contracts.d.ts +2 -1
- package/dist/review/evidence.d.ts +12 -0
- package/dist/services/cost-accounting.d.ts +100 -0
- package/dist/services/status-service.d.ts +12 -0
- package/dist/telemetry.d.ts +1 -1
- package/opencode-swarm.schema.json +40 -0
- package/package.json +1 -1
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* The event catalog (issue #2029).
|
|
3
3
|
*
|
|
4
|
-
* Exactly
|
|
4
|
+
* Exactly 54 entries, matching the `TelemetryEvent` union at
|
|
5
5
|
* `src/telemetry.ts:15-131`. 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
|
|
@@ -22,7 +22,9 @@
|
|
|
22
22
|
* the bounded `trajectory_health` storage audit for the issue-#2041
|
|
23
23
|
* `.swarm/trajectories/` PRM session store, and the 51st is the bounded
|
|
24
24
|
* `pr_subscription_health` storage audit for the issue-#2042
|
|
25
|
-
* `.swarm/pr-monitor/`
|
|
25
|
+
* `.swarm/pr-monitor/` subscription checkpoint store. The 52nd is
|
|
26
|
+
* `delegation_cost_correction`, the 53rd is `delegation_cost_binding`, and the
|
|
27
|
+
* 54th is `delegation_cost_join`. These late
|
|
26
28
|
* additions are instances
|
|
27
29
|
* of the defect class this contract exists to close: an event kind entering
|
|
28
30
|
* the stream with no registration.
|
|
@@ -78,7 +80,7 @@ export interface CatalogEntry {
|
|
|
78
80
|
/**
|
|
79
81
|
* Whether an event of this kind must carry `trace.parentSpanId`.
|
|
80
82
|
*
|
|
81
|
-
* `false` for all
|
|
83
|
+
* `false` for all 54 entries today, and that is a truthful statement about
|
|
82
84
|
* the current system rather than a placeholder: no producer supplies a
|
|
83
85
|
* parent span, so `createObservation` never sets one. Setting this to `true`
|
|
84
86
|
* for a kind whose producer cannot supply a parent would make every
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { OpencodeClient } from '@opencode-ai/sdk';
|
|
2
2
|
import { type EphemeralAgentDispatchResult } from '../evaluation/ephemeral-agent-dispatcher.js';
|
|
3
|
+
import type { PricingConfig } from '../services/cost-accounting.js';
|
|
3
4
|
import type { ModelOverride } from '../utils/model-dispatch-fallback.js';
|
|
4
5
|
export type ReviewDispatchRequest = {
|
|
5
6
|
directory: string;
|
|
@@ -26,4 +27,4 @@ export interface ReviewModelDispatcher {
|
|
|
26
27
|
* The returned dispatcher is instance-local and safe to inject into hooks and
|
|
27
28
|
* tools; it does not read or mutate module-level client state.
|
|
28
29
|
*/
|
|
29
|
-
export declare function createReviewModelDispatcher(client: OpencodeClient): ReviewModelDispatcher;
|
|
30
|
+
export declare function createReviewModelDispatcher(client: OpencodeClient, pricing?: PricingConfig): ReviewModelDispatcher;
|
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
import * as fs from 'node:fs';
|
|
1
2
|
import { type FindingValidation, type ReviewFinding } from '../agents/agent-output-schema.js';
|
|
2
3
|
import type { Plan } from '../config/plan-schema.js';
|
|
3
4
|
import type { AutoReviewConfig } from '../config/schema.js';
|
|
4
5
|
import { type ReviewFindingSeverity, type ReviewReceipt } from '../hooks/review-receipt.js';
|
|
6
|
+
import type { CostEvidence, CostEvidenceReason, CostEvidenceStatus } from '../services/cost-accounting.js';
|
|
7
|
+
import { bunWrite } from '../utils/bun-compat.js';
|
|
5
8
|
import type { ReviewDiffCompleteness, ReviewDiffManifest, ReviewDiffSelector } from './diff-source.js';
|
|
6
9
|
export interface AutoReviewEvidenceFinding extends ReviewFinding {
|
|
7
10
|
finding_id: string;
|
|
@@ -64,6 +67,10 @@ export interface AutoReviewEvidence {
|
|
|
64
67
|
tokens_cache: number;
|
|
65
68
|
cost_usd: number | null;
|
|
66
69
|
cost_source: 'reported' | 'estimated' | 'unavailable';
|
|
70
|
+
/** Bounded per-dispatch provenance; scalar totals remain compatibility projections. */
|
|
71
|
+
cost_evidence: CostEvidence[];
|
|
72
|
+
evidence_status: CostEvidenceStatus;
|
|
73
|
+
evidence_reason?: CostEvidenceReason;
|
|
67
74
|
};
|
|
68
75
|
}
|
|
69
76
|
export declare function computeAutoReviewManifestHash(manifest: Omit<AutoReviewScopeManifest, 'hash'>): string;
|
|
@@ -72,6 +79,11 @@ export interface PersistAutoReviewEvidenceOptions {
|
|
|
72
79
|
/** Rebuild the exact reviewed scope immediately before the atomic rename. */
|
|
73
80
|
verifyCurrent?: () => Promise<boolean>;
|
|
74
81
|
}
|
|
82
|
+
/** Dependency seam for failure-path tests; production defaults stay unchanged. */
|
|
83
|
+
export declare const _internals: {
|
|
84
|
+
bunWrite: typeof bunWrite;
|
|
85
|
+
renameSync: typeof fs.renameSync;
|
|
86
|
+
};
|
|
75
87
|
export declare function persistAutoReviewEvidence(directory: string, evidence: AutoReviewEvidence, options?: PersistAutoReviewEvidenceOptions): Promise<string>;
|
|
76
88
|
export declare function readAutoReviewEvidenceForPhase(directory: string, phase: number): AutoReviewEvidence | null;
|
|
77
89
|
export declare function isAutoReviewEvidence(value: unknown): value is AutoReviewEvidence;
|
|
@@ -1,4 +1,33 @@
|
|
|
1
1
|
export type CostSource = 'reported' | 'estimated' | 'unavailable';
|
|
2
|
+
export type CostEvidenceKind = 'provider_reported' | 'normalized_estimate';
|
|
3
|
+
export type CostEvidenceStatus = 'complete' | 'inconclusive';
|
|
4
|
+
export type CostCurrency = 'USD' | 'unknown' | (string & {});
|
|
5
|
+
export type CostEvidenceReason = 'authoritative' | 'missing_cost' | 'invalid_number' | 'pricing_missing' | 'unsupported_currency' | 'conflict' | 'unbilled' | 'join_miss' | 'legacy' | 'unreadable' | 'partial';
|
|
6
|
+
/** Fixed, non-provider-controlled paths accepted by the evidence adapter. */
|
|
7
|
+
export type CostEvidenceSourcePath = 'assistant.cost' | 'step-finish.cost' | 'response.info.cost' | 'response.cost' | 'legacy.cost' | 'pricing.model';
|
|
8
|
+
export type CostEvidence = {
|
|
9
|
+
kind: CostEvidenceKind;
|
|
10
|
+
amount_usd: number | null;
|
|
11
|
+
currency: CostCurrency;
|
|
12
|
+
source_path: CostEvidenceSourcePath;
|
|
13
|
+
reason: CostEvidenceReason;
|
|
14
|
+
usage: TokenUsage;
|
|
15
|
+
model?: string;
|
|
16
|
+
pricing_version?: string;
|
|
17
|
+
pricing_effective_at?: string;
|
|
18
|
+
billing_basis?: string;
|
|
19
|
+
/** A bounded canonical digest is useful to correction producers. */
|
|
20
|
+
digest?: string;
|
|
21
|
+
};
|
|
22
|
+
export type CostCandidate = {
|
|
23
|
+
kind: CostEvidenceKind;
|
|
24
|
+
amount: number | null;
|
|
25
|
+
currency: CostCurrency;
|
|
26
|
+
source_path: CostEvidenceSourcePath;
|
|
27
|
+
usage: TokenUsage;
|
|
28
|
+
model?: string;
|
|
29
|
+
reason?: CostEvidenceReason;
|
|
30
|
+
};
|
|
2
31
|
export type ModelPricing = {
|
|
3
32
|
input_per_million: number;
|
|
4
33
|
output_per_million: number;
|
|
@@ -7,6 +36,14 @@ export type ModelPricing = {
|
|
|
7
36
|
};
|
|
8
37
|
export type PricingConfig = {
|
|
9
38
|
models?: Record<string, ModelPricing>;
|
|
39
|
+
/** Currency of normalized table rows. Defaults to USD for compatibility. */
|
|
40
|
+
currency?: string;
|
|
41
|
+
version?: string;
|
|
42
|
+
effective_at?: string;
|
|
43
|
+
billing_basis?: string;
|
|
44
|
+
/** Explicit provider declarations; reported currency is never inferred. */
|
|
45
|
+
reported_cost_currency?: Record<string, string>;
|
|
46
|
+
subscription_unbilled?: boolean;
|
|
10
47
|
};
|
|
11
48
|
export type TokenUsage = {
|
|
12
49
|
tokens_input: number;
|
|
@@ -17,6 +54,15 @@ export type TokenUsage = {
|
|
|
17
54
|
export type DelegationCostFields = TokenUsage & {
|
|
18
55
|
cost_usd: number | null;
|
|
19
56
|
cost_source: CostSource;
|
|
57
|
+
cost_evidence?: CostEvidence[];
|
|
58
|
+
evidence_status?: CostEvidenceStatus;
|
|
59
|
+
evidence_reason?: CostEvidenceReason;
|
|
60
|
+
record_id?: string;
|
|
61
|
+
identity_fingerprint?: string;
|
|
62
|
+
child_session_digest?: string;
|
|
63
|
+
parent_session_digest?: string;
|
|
64
|
+
version?: number;
|
|
65
|
+
currency?: CostCurrency;
|
|
20
66
|
model?: string;
|
|
21
67
|
gate?: string;
|
|
22
68
|
retry_index?: number;
|
|
@@ -27,6 +73,7 @@ export type DelegationCostInput = {
|
|
|
27
73
|
gate?: string;
|
|
28
74
|
retry_index?: number;
|
|
29
75
|
pricing?: PricingConfig;
|
|
76
|
+
reported_cost_currency?: string;
|
|
30
77
|
};
|
|
31
78
|
export type CostSummary = {
|
|
32
79
|
total_cost_usd: number;
|
|
@@ -46,6 +93,16 @@ export type CostSummary = {
|
|
|
46
93
|
delegations: number;
|
|
47
94
|
cost_usd: number;
|
|
48
95
|
}>;
|
|
96
|
+
total_legacy_usd: number;
|
|
97
|
+
conflict_count: number;
|
|
98
|
+
legacy_count: number;
|
|
99
|
+
join_miss_count: number;
|
|
100
|
+
telemetry_error_count: number;
|
|
101
|
+
accepted_corrections: number;
|
|
102
|
+
rejected_corrections: number;
|
|
103
|
+
duplicate_corrections: number;
|
|
104
|
+
evidence_status: CostEvidenceStatus;
|
|
105
|
+
currencies: string[];
|
|
49
106
|
};
|
|
50
107
|
export type CostSummaryRow = {
|
|
51
108
|
name: string;
|
|
@@ -59,7 +116,50 @@ export type CostSummaryRow = {
|
|
|
59
116
|
};
|
|
60
117
|
export declare const BUNDLED_MODEL_PRICING: Record<string, ModelPricing>;
|
|
61
118
|
export declare function buildDelegationCostFields(input?: DelegationCostInput): DelegationCostFields;
|
|
119
|
+
/**
|
|
120
|
+
* Extract only the pinned SDK shapes. The old generic traversal was
|
|
121
|
+
* intentionally removed: a wrapper's default cost must not shadow a child
|
|
122
|
+
* AssistantMessage/StepFinishPart report.
|
|
123
|
+
*/
|
|
124
|
+
export declare function extractCostEvidence(raw: unknown, input?: Pick<DelegationCostInput, 'model' | 'pricing' | 'reported_cost_currency'>): CostEvidence[];
|
|
125
|
+
export type CostProjection = {
|
|
126
|
+
cost_usd: number | null;
|
|
127
|
+
cost_source: CostSource;
|
|
128
|
+
evidence_status: CostEvidenceStatus;
|
|
129
|
+
reason: CostEvidenceReason;
|
|
130
|
+
currency: CostCurrency;
|
|
131
|
+
};
|
|
132
|
+
/** Project additive evidence to the legacy scalar fields. Unknown is never zero. */
|
|
133
|
+
export declare function projectCostEvidence(evidence: readonly CostEvidence[]): CostProjection;
|
|
134
|
+
export declare function isCostEvidenceComplete(evidence: readonly CostEvidence[] | undefined): boolean;
|
|
62
135
|
export declare function summarizeTelemetryCosts(directory: string): CostSummary;
|
|
136
|
+
export type CostFoldStats = {
|
|
137
|
+
conflict_count: number;
|
|
138
|
+
join_miss_count: number;
|
|
139
|
+
telemetry_error_count: number;
|
|
140
|
+
accepted_corrections: number;
|
|
141
|
+
rejected_corrections: number;
|
|
142
|
+
duplicate_corrections: number;
|
|
143
|
+
};
|
|
144
|
+
export type FoldedCostTelemetry = {
|
|
145
|
+
events: Record<string, unknown>[];
|
|
146
|
+
stats: CostFoldStats;
|
|
147
|
+
versions: Record<string, number>;
|
|
148
|
+
};
|
|
149
|
+
/**
|
|
150
|
+
* Fold append-only cost corrections into one effective delegation snapshot.
|
|
151
|
+
* Corrections are buffered and replayed in version order so telemetry arrival
|
|
152
|
+
* order cannot permanently discard a valid correction. Invalid/orphan
|
|
153
|
+
* corrections remain diagnostics and can never create a row.
|
|
154
|
+
*/
|
|
155
|
+
export declare function foldTelemetryEvents(events: readonly Record<string, unknown>[]): FoldedCostTelemetry;
|
|
156
|
+
export declare function isCostUpgrade(current: readonly CostEvidence[], next: readonly CostEvidence[]): boolean;
|
|
63
157
|
export declare function readTelemetryEvents(directory: string): Record<string, unknown>[];
|
|
158
|
+
/**
|
|
159
|
+
* Bounded asynchronous telemetry reader for live recovery paths. The status
|
|
160
|
+
* service and offline summaries retain the atomic synchronous snapshot above;
|
|
161
|
+
* recovery must not block event delivery on a full-file synchronous read.
|
|
162
|
+
*/
|
|
163
|
+
export declare function readTelemetryEventsAsync(directory: string): Promise<Record<string, unknown>[]>;
|
|
64
164
|
export declare function estimateCostUsd(usage: TokenUsage, model?: string, pricing?: PricingConfig): number | null;
|
|
65
165
|
export declare function roundUsd(value: number): number;
|
|
@@ -4,6 +4,7 @@ import { loadFullAutoRunState } from '../full-auto/state';
|
|
|
4
4
|
import { type RecentEscalation } from '../hooks/knowledge-escalator';
|
|
5
5
|
import { getActiveFullAutoSessionID, hasActiveFullAuto, hasActiveLeanTurbo } from '../state';
|
|
6
6
|
import { loadLeanTurboRunState } from '../turbo/lean/state';
|
|
7
|
+
import { summarizeTelemetryCosts } from './cost-accounting.js';
|
|
7
8
|
/**
|
|
8
9
|
* Dependency-injection seam for status-service.
|
|
9
10
|
* Allows tests to intercept Lean Turbo state queries without mock.module leakage.
|
|
@@ -14,6 +15,7 @@ export declare const _internals: {
|
|
|
14
15
|
hasActiveFullAuto: typeof hasActiveFullAuto;
|
|
15
16
|
getActiveFullAutoSessionID: typeof getActiveFullAutoSessionID;
|
|
16
17
|
loadFullAutoRunState: typeof loadFullAutoRunState;
|
|
18
|
+
summarizeTelemetryCosts: typeof summarizeTelemetryCosts;
|
|
17
19
|
};
|
|
18
20
|
/**
|
|
19
21
|
* Structured status data returned by the status service.
|
|
@@ -175,6 +177,16 @@ export interface StatusData {
|
|
|
175
177
|
* stores surface as typed uncertainty, never partially-trusted counts.
|
|
176
178
|
*/
|
|
177
179
|
backgroundWork?: BackgroundWorkStatus;
|
|
180
|
+
/** Issue #2043: compatibility total plus provenance completeness. */
|
|
181
|
+
costs?: {
|
|
182
|
+
totalCostUsd: number;
|
|
183
|
+
delegations: number;
|
|
184
|
+
unavailableDelegations: number;
|
|
185
|
+
evidenceStatus: 'complete' | 'inconclusive';
|
|
186
|
+
conflictCount: number;
|
|
187
|
+
joinMissCount: number;
|
|
188
|
+
telemetryErrorCount: number;
|
|
189
|
+
};
|
|
178
190
|
}
|
|
179
191
|
/** Issue #2104: opt-in background-work status snapshot for /swarm status. */
|
|
180
192
|
export interface BackgroundWorkStatus {
|
package/dist/telemetry.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { createObservation, toLegacyTelemetryLine } from './observability/index.js';
|
|
2
2
|
import type { DelegationCostFields } from './services/cost-accounting.js';
|
|
3
|
-
export type TelemetryEvent = 'session_started' | 'session_ended' | 'agent_activated' | 'delegation_begin' | 'delegation_end' | 'task_state_changed' | 'gate_passed' | 'gate_failed' | 'gate_parse_error' | 'reviewer_gate_decision' | 'phase_changed' | 'budget_updated' | 'context_pruned' | 'model_fallback'
|
|
3
|
+
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' | 'model_fallback'
|
|
4
4
|
/**
|
|
5
5
|
* Issue #2271 bug 4 — a configured agent model id was POSITIVELY confirmed
|
|
6
6
|
* unresolvable against the live provider catalog (distinct from a runtime
|
|
@@ -746,6 +746,46 @@
|
|
|
746
746
|
"description": "Token/cost estimation fallback table. Provider-reported cost wins when present; entries only estimate from usage tokens when reports omit cost.",
|
|
747
747
|
"type": "object",
|
|
748
748
|
"properties": {
|
|
749
|
+
"currency": {
|
|
750
|
+
"default": "USD",
|
|
751
|
+
"type": "string",
|
|
752
|
+
"const": "USD"
|
|
753
|
+
},
|
|
754
|
+
"version": {
|
|
755
|
+
"type": "string",
|
|
756
|
+
"minLength": 1,
|
|
757
|
+
"maxLength": 128
|
|
758
|
+
},
|
|
759
|
+
"effective_at": {
|
|
760
|
+
"type": "string",
|
|
761
|
+
"format": "date-time",
|
|
762
|
+
"pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$"
|
|
763
|
+
},
|
|
764
|
+
"billing_basis": {
|
|
765
|
+
"type": "string",
|
|
766
|
+
"enum": [
|
|
767
|
+
"token",
|
|
768
|
+
"request",
|
|
769
|
+
"subscription"
|
|
770
|
+
]
|
|
771
|
+
},
|
|
772
|
+
"reported_cost_currency": {
|
|
773
|
+
"default": {},
|
|
774
|
+
"type": "object",
|
|
775
|
+
"propertyNames": {
|
|
776
|
+
"type": "string",
|
|
777
|
+
"minLength": 1,
|
|
778
|
+
"maxLength": 128
|
|
779
|
+
},
|
|
780
|
+
"additionalProperties": {
|
|
781
|
+
"type": "string",
|
|
782
|
+
"const": "USD"
|
|
783
|
+
}
|
|
784
|
+
},
|
|
785
|
+
"subscription_unbilled": {
|
|
786
|
+
"default": false,
|
|
787
|
+
"type": "boolean"
|
|
788
|
+
},
|
|
749
789
|
"models": {
|
|
750
790
|
"default": {},
|
|
751
791
|
"type": "object",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "opencode-swarm",
|
|
3
|
-
"version": "7.159.
|
|
3
|
+
"version": "7.159.1",
|
|
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",
|