opencode-swarm 7.98.2 → 7.99.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/README.md +1 -0
- package/dist/cli/{config-doctor-7yrxfa6b.js → config-doctor-9fhfy6p7.js} +2 -2
- package/dist/cli/{evidence-summary-service-559nas1m.js → evidence-summary-service-4hs44n2c.js} +5 -5
- package/dist/cli/{gate-evidence-nphg8hay.js → gate-evidence-ywys9vfs.js} +4 -4
- package/dist/cli/{guardrail-explain-xktjjh53.js → guardrail-explain-ktm6szbm.js} +13 -13
- package/dist/cli/{guardrail-log-53z1cf46.js → guardrail-log-ya49kpwn.js} +3 -3
- package/dist/cli/{index-91qtsbce.js → index-3naa2ajc.js} +1 -1
- package/dist/cli/{index-chan9mkv.js → index-4pt2py5p.js} +16 -14
- package/dist/cli/{index-a0dv2c7k.js → index-5fxjagjt.js} +1 -1
- package/dist/cli/{index-471qxz9g.js → index-7hnwnw5g.js} +11 -1
- package/dist/cli/{index-kv4dd5c5.js → index-9b7qp18e.js} +1 -1
- package/dist/cli/{index-hb10a2g8.js → index-f7nma02k.js} +2 -2
- package/dist/cli/{index-rvweaxsd.js → index-ft4gehk1.js} +2 -2
- package/dist/cli/{index-gnd1280x.js → index-h9ptj4b1.js} +1 -1
- package/dist/cli/{index-72k57f21.js → index-hw8r3e5p.js} +1098 -790
- package/dist/cli/{index-mh1ej70w.js → index-r8f89sm9.js} +2 -2
- package/dist/cli/{index-zy22fg5h.js → index-svf2zjxs.js} +5 -1
- package/dist/cli/{index-xchgryg4.js → index-vn263hqt.js} +16 -2
- package/dist/cli/{index-fjxjb66n.js → index-vwyjkzgs.js} +3 -3
- package/dist/cli/{index-yrzfbqqh.js → index-wwnjw0fb.js} +3 -3
- package/dist/cli/{index-5z2e78tv.js → index-xsswhy6k.js} +1 -1
- package/dist/cli/index.js +12 -12
- package/dist/cli/{knowledge-store-pa58msy5.js → knowledge-store-tsa8ezka.js} +4 -4
- package/dist/cli/{pending-delegations-8b2js1vq.js → pending-delegations-c785p5n2.js} +2 -2
- package/dist/cli/{pr-subscriptions-ttvr1ta9.js → pr-subscriptions-fqrzm0tv.js} +3 -3
- package/dist/cli/{schema-mygkbbe9.js → schema-nz638xc3.js} +5 -1
- package/dist/cli/{skill-generator-3tkwcg4x.js → skill-generator-99rrfwae.js} +5 -5
- package/dist/cli/{telemetry-aa1ma1dr.js → telemetry-jm7t8031.js} +1 -1
- package/dist/commands/costs.d.ts +4 -0
- package/dist/commands/index.d.ts +1 -0
- package/dist/commands/registry.d.ts +9 -2
- package/dist/config/evidence-schema.d.ts +44 -44
- package/dist/config/index.d.ts +2 -2
- package/dist/config/schema.d.ts +24 -0
- package/dist/index.js +2933 -2314
- package/dist/services/cost-accounting.d.ts +65 -0
- package/dist/telemetry.d.ts +2 -1
- package/package.json +1 -1
|
@@ -3,13 +3,13 @@ import {
|
|
|
3
3
|
atomicWriteFile,
|
|
4
4
|
taskEvidencePath,
|
|
5
5
|
withTaskEvidenceLock
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-9b7qp18e.js";
|
|
7
7
|
import {
|
|
8
8
|
exports_external
|
|
9
9
|
} from "./index-293f68mj.js";
|
|
10
10
|
import {
|
|
11
11
|
telemetry
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-vn263hqt.js";
|
|
13
13
|
|
|
14
14
|
// src/gate-evidence.ts
|
|
15
15
|
import { mkdirSync, readFileSync, realpathSync } from "fs";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
ALL_AGENT_NAMES,
|
|
4
4
|
PluginConfigSchema,
|
|
5
5
|
stripKnownSwarmPrefix
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-7hnwnw5g.js";
|
|
7
7
|
import {
|
|
8
8
|
log
|
|
9
9
|
} from "./index-zgwm4ryv.js";
|
|
@@ -599,6 +599,10 @@ function validateConfigKey(path2, value) {
|
|
|
599
599
|
emitObjectTypeMismatch("context_budget", value, findings);
|
|
600
600
|
break;
|
|
601
601
|
}
|
|
602
|
+
case "pricing": {
|
|
603
|
+
emitObjectTypeMismatch("pricing", value, findings);
|
|
604
|
+
break;
|
|
605
|
+
}
|
|
602
606
|
case "guardrails": {
|
|
603
607
|
emitObjectTypeMismatch("guardrails", value, findings);
|
|
604
608
|
break;
|
|
@@ -110,8 +110,22 @@ var telemetry = {
|
|
|
110
110
|
delegationBegin(sessionId, agentName, taskId) {
|
|
111
111
|
_internals.emit("delegation_begin", { sessionId, agentName, taskId });
|
|
112
112
|
},
|
|
113
|
-
delegationEnd(sessionId, agentName, taskId, result) {
|
|
114
|
-
_internals.emit("delegation_end", {
|
|
113
|
+
delegationEnd(sessionId, agentName, taskId, result, costFields) {
|
|
114
|
+
_internals.emit("delegation_end", {
|
|
115
|
+
sessionId,
|
|
116
|
+
agentName,
|
|
117
|
+
taskId,
|
|
118
|
+
result,
|
|
119
|
+
tokens_input: costFields?.tokens_input ?? 0,
|
|
120
|
+
tokens_output: costFields?.tokens_output ?? 0,
|
|
121
|
+
tokens_reasoning: costFields?.tokens_reasoning ?? 0,
|
|
122
|
+
tokens_cache: costFields?.tokens_cache ?? 0,
|
|
123
|
+
cost_usd: costFields?.cost_usd ?? null,
|
|
124
|
+
cost_source: costFields?.cost_source ?? "unavailable",
|
|
125
|
+
model: costFields?.model,
|
|
126
|
+
gate: costFields?.gate,
|
|
127
|
+
retry_index: costFields?.retry_index
|
|
128
|
+
});
|
|
115
129
|
},
|
|
116
130
|
taskStateChanged(sessionId, taskId, newState, oldState) {
|
|
117
131
|
_internals.emit("task_state_changed", {
|
|
@@ -10,17 +10,17 @@ import {
|
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
rewriteKnowledge,
|
|
12
12
|
transactKnowledge
|
|
13
|
-
} from "./index-
|
|
13
|
+
} from "./index-f7nma02k.js";
|
|
14
14
|
import {
|
|
15
15
|
atomicWriteFile
|
|
16
|
-
} from "./index-
|
|
16
|
+
} from "./index-9b7qp18e.js";
|
|
17
17
|
import {
|
|
18
18
|
init_logger,
|
|
19
19
|
warn
|
|
20
20
|
} from "./index-zgwm4ryv.js";
|
|
21
21
|
import {
|
|
22
22
|
require_proper_lockfile
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-3naa2ajc.js";
|
|
24
24
|
import {
|
|
25
25
|
__require,
|
|
26
26
|
__toESM
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
readTaskEvidence,
|
|
5
5
|
readTaskEvidenceRaw,
|
|
6
6
|
sanitizeTaskId
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-r8f89sm9.js";
|
|
8
8
|
import {
|
|
9
9
|
readSwarmFileAsync,
|
|
10
10
|
validateSwarmPath
|
|
@@ -20,7 +20,7 @@ import {
|
|
|
20
20
|
} from "./index-zgwm4ryv.js";
|
|
21
21
|
import {
|
|
22
22
|
withEvidenceLock
|
|
23
|
-
} from "./index-
|
|
23
|
+
} from "./index-3naa2ajc.js";
|
|
24
24
|
import {
|
|
25
25
|
ZodError,
|
|
26
26
|
exports_external
|
|
@@ -31,7 +31,7 @@ import {
|
|
|
31
31
|
} from "./index-b9v501fr.js";
|
|
32
32
|
import {
|
|
33
33
|
emit
|
|
34
|
-
} from "./index-
|
|
34
|
+
} from "./index-vn263hqt.js";
|
|
35
35
|
|
|
36
36
|
// src/plan/manager.ts
|
|
37
37
|
import {
|
package/dist/cli/index.js
CHANGED
|
@@ -7,30 +7,30 @@ import {
|
|
|
7
7
|
getPluginLockFilePaths,
|
|
8
8
|
package_default,
|
|
9
9
|
resolveCommand
|
|
10
|
-
} from "./index-
|
|
11
|
-
import"./index-
|
|
10
|
+
} from "./index-hw8r3e5p.js";
|
|
11
|
+
import"./index-xsswhy6k.js";
|
|
12
12
|
import"./index-2a6ppa65.js";
|
|
13
|
-
import"./index-
|
|
14
|
-
import"./index-
|
|
15
|
-
import"./index-
|
|
13
|
+
import"./index-vwyjkzgs.js";
|
|
14
|
+
import"./index-f7nma02k.js";
|
|
15
|
+
import"./index-svf2zjxs.js";
|
|
16
16
|
import {
|
|
17
17
|
DEFAULT_AGENT_CONFIGS
|
|
18
|
-
} from "./index-
|
|
19
|
-
import"./index-
|
|
18
|
+
} from "./index-7hnwnw5g.js";
|
|
19
|
+
import"./index-wwnjw0fb.js";
|
|
20
20
|
import"./index-adz3nk9b.js";
|
|
21
21
|
import"./index-v4fcn4tr.js";
|
|
22
|
-
import"./index-
|
|
23
|
-
import"./index-
|
|
24
|
-
import"./index-
|
|
22
|
+
import"./index-r8f89sm9.js";
|
|
23
|
+
import"./index-9b7qp18e.js";
|
|
24
|
+
import"./index-5fxjagjt.js";
|
|
25
25
|
import"./index-we94wkty.js";
|
|
26
26
|
import"./index-jtqkh8jf.js";
|
|
27
27
|
import"./index-5e4e2hvv.js";
|
|
28
28
|
import"./index-p0arc26j.js";
|
|
29
29
|
import"./index-zgwm4ryv.js";
|
|
30
|
-
import"./index-
|
|
30
|
+
import"./index-3naa2ajc.js";
|
|
31
31
|
import"./index-293f68mj.js";
|
|
32
32
|
import"./index-b9v501fr.js";
|
|
33
|
-
import"./index-
|
|
33
|
+
import"./index-vn263hqt.js";
|
|
34
34
|
import"./index-a76rekgs.js";
|
|
35
35
|
|
|
36
36
|
// src/cli/index.ts
|
|
@@ -32,12 +32,12 @@ import {
|
|
|
32
32
|
transactFile,
|
|
33
33
|
transactKnowledge,
|
|
34
34
|
wordBigrams
|
|
35
|
-
} from "./index-
|
|
36
|
-
import"./index-
|
|
35
|
+
} from "./index-f7nma02k.js";
|
|
36
|
+
import"./index-9b7qp18e.js";
|
|
37
37
|
import"./index-jtqkh8jf.js";
|
|
38
|
-
import"./index-
|
|
38
|
+
import"./index-3naa2ajc.js";
|
|
39
39
|
import"./index-b9v501fr.js";
|
|
40
|
-
import"./index-
|
|
40
|
+
import"./index-vn263hqt.js";
|
|
41
41
|
import"./index-a76rekgs.js";
|
|
42
42
|
export {
|
|
43
43
|
wordBigrams,
|
|
@@ -11,12 +11,12 @@ import {
|
|
|
11
11
|
} from "./index-zgwm4ryv.js";
|
|
12
12
|
import {
|
|
13
13
|
withEvidenceLock
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-3naa2ajc.js";
|
|
15
15
|
import {
|
|
16
16
|
exports_external
|
|
17
17
|
} from "./index-293f68mj.js";
|
|
18
18
|
import"./index-b9v501fr.js";
|
|
19
|
-
import"./index-
|
|
19
|
+
import"./index-vn263hqt.js";
|
|
20
20
|
import"./index-a76rekgs.js";
|
|
21
21
|
|
|
22
22
|
// src/background/pending-delegations.ts
|
|
@@ -9,16 +9,16 @@ import {
|
|
|
9
9
|
sweepStale,
|
|
10
10
|
unsubscribe,
|
|
11
11
|
updateSnapshot
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-5fxjagjt.js";
|
|
13
13
|
import"./index-we94wkty.js";
|
|
14
14
|
import"./index-jtqkh8jf.js";
|
|
15
15
|
import"./index-5e4e2hvv.js";
|
|
16
16
|
import"./index-p0arc26j.js";
|
|
17
17
|
import"./index-zgwm4ryv.js";
|
|
18
|
-
import"./index-
|
|
18
|
+
import"./index-3naa2ajc.js";
|
|
19
19
|
import"./index-293f68mj.js";
|
|
20
20
|
import"./index-b9v501fr.js";
|
|
21
|
-
import"./index-
|
|
21
|
+
import"./index-vn263hqt.js";
|
|
22
22
|
import"./index-a76rekgs.js";
|
|
23
23
|
export {
|
|
24
24
|
updateSnapshot,
|
|
@@ -47,6 +47,7 @@ import {
|
|
|
47
47
|
LeanTurboStrategyConfigSchema,
|
|
48
48
|
LintConfigSchema,
|
|
49
49
|
MemoryConfigSchema,
|
|
50
|
+
ModelPricingConfigSchema,
|
|
50
51
|
ParallelizationConfigSchema,
|
|
51
52
|
PhaseCompleteConfigSchema,
|
|
52
53
|
PipelineConfigSchema,
|
|
@@ -54,6 +55,7 @@ import {
|
|
|
54
55
|
PlanCursorConfigSchema,
|
|
55
56
|
PluginConfigSchema,
|
|
56
57
|
PrMonitorConfigSchema,
|
|
58
|
+
PricingConfigSchema,
|
|
57
59
|
PrmConfigSchema,
|
|
58
60
|
QualityBudgetConfigSchema,
|
|
59
61
|
RepoGraphConfigSchema,
|
|
@@ -83,7 +85,7 @@ import {
|
|
|
83
85
|
resolveGeneratedAgentRole,
|
|
84
86
|
resolveGuardrailsConfig,
|
|
85
87
|
stripKnownSwarmPrefix
|
|
86
|
-
} from "./index-
|
|
88
|
+
} from "./index-7hnwnw5g.js";
|
|
87
89
|
import"./index-p0arc26j.js";
|
|
88
90
|
import"./index-293f68mj.js";
|
|
89
91
|
import"./index-a76rekgs.js";
|
|
@@ -117,6 +119,7 @@ export {
|
|
|
117
119
|
RepoGraphConfigSchema,
|
|
118
120
|
QualityBudgetConfigSchema,
|
|
119
121
|
PrmConfigSchema,
|
|
122
|
+
PricingConfigSchema,
|
|
120
123
|
PrMonitorConfigSchema,
|
|
121
124
|
PluginConfigSchema,
|
|
122
125
|
PlanCursorConfigSchema,
|
|
@@ -124,6 +127,7 @@ export {
|
|
|
124
127
|
PipelineConfigSchema,
|
|
125
128
|
PhaseCompleteConfigSchema,
|
|
126
129
|
ParallelizationConfigSchema,
|
|
130
|
+
ModelPricingConfigSchema,
|
|
127
131
|
MemoryConfigSchema,
|
|
128
132
|
LintConfigSchema,
|
|
129
133
|
LeanTurboStrategyConfigSchema,
|
|
@@ -27,14 +27,14 @@ import {
|
|
|
27
27
|
retireSkill,
|
|
28
28
|
sanitizeSlug,
|
|
29
29
|
selectCandidateEntries
|
|
30
|
-
} from "./index-
|
|
31
|
-
import"./index-
|
|
32
|
-
import"./index-
|
|
30
|
+
} from "./index-vwyjkzgs.js";
|
|
31
|
+
import"./index-f7nma02k.js";
|
|
32
|
+
import"./index-9b7qp18e.js";
|
|
33
33
|
import"./index-jtqkh8jf.js";
|
|
34
34
|
import"./index-zgwm4ryv.js";
|
|
35
|
-
import"./index-
|
|
35
|
+
import"./index-3naa2ajc.js";
|
|
36
36
|
import"./index-b9v501fr.js";
|
|
37
|
-
import"./index-
|
|
37
|
+
import"./index-vn263hqt.js";
|
|
38
38
|
import"./index-a76rekgs.js";
|
|
39
39
|
export {
|
|
40
40
|
selectCandidateEntries,
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type CostSummary } from '../services/cost-accounting.js';
|
|
2
|
+
export declare function handleCostsCommand(directory: string, args: string[]): Promise<string>;
|
|
3
|
+
export declare function renderCostSummary(summary: CostSummary): string;
|
|
4
|
+
export declare function formatUsd(value: number): string;
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -16,6 +16,7 @@ export { COMMAND_NAME_SET, COMMAND_NAMES } from './command-names.js';
|
|
|
16
16
|
export { handleConcurrencyCommand } from './concurrency';
|
|
17
17
|
export { handleConfigCommand } from './config';
|
|
18
18
|
export { handleConsolidateCommand } from './consolidate';
|
|
19
|
+
export { handleCostsCommand } from './costs';
|
|
19
20
|
export { handleCouncilCommand } from './council';
|
|
20
21
|
export { handleCurateCommand } from './curate';
|
|
21
22
|
export { handleDarkMatterCommand } from './dark-matter';
|
|
@@ -199,8 +199,15 @@ export declare const COMMAND_REGISTRY: {
|
|
|
199
199
|
};
|
|
200
200
|
readonly benchmark: {
|
|
201
201
|
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
202
|
-
readonly description: "Show performance metrics [--cumulative] [--ci-gate]";
|
|
203
|
-
readonly args: "--cumulative, --ci-gate";
|
|
202
|
+
readonly description: "Show performance metrics [--cumulative] [--ci-gate] [--max-cost-usd <n>]";
|
|
203
|
+
readonly args: "--cumulative, --ci-gate, --max-cost-usd <n>";
|
|
204
|
+
readonly category: "diagnostics";
|
|
205
|
+
readonly toolPolicy: "agent";
|
|
206
|
+
};
|
|
207
|
+
readonly costs: {
|
|
208
|
+
readonly handler: (ctx: CommandContext) => Promise<string>;
|
|
209
|
+
readonly description: "Show per-agent and per-task token/cost telemetry [--json]";
|
|
210
|
+
readonly args: "--json";
|
|
204
211
|
readonly category: "diagnostics";
|
|
205
212
|
readonly toolPolicy: "agent";
|
|
206
213
|
};
|