opencode-swarm 7.154.2 → 7.154.3
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-xqs49g07.js → coder-settlement-7c9h07f5.js} +7 -7
- package/dist/cli/{config-doctor-69eebk90.js → config-doctor-8zjz6dej.js} +2 -2
- package/dist/cli/{core-dyp14hcb.js → core-dn8bn81g.js} +1 -1
- package/dist/cli/{curation-policy-jm9jsxtt.js → curation-policy-2jkbybw7.js} +4 -4
- package/dist/cli/{curator-drift-h57z6tm3.js → curator-drift-g6w4ga1q.js} +1 -1
- package/dist/cli/{curator-llm-factory-5tq9c4v5.js → curator-llm-factory-mxdjw6kz.js} +28 -28
- package/dist/cli/{curator-he8n9z9n.js → curator-v12rhct2.js} +28 -28
- package/dist/cli/{evidence-summary-service-05s5y8d6.js → evidence-summary-service-zzvvcaa9.js} +10 -10
- package/dist/cli/{gate-evidence-3ptr9af3.js → gate-evidence-16jkjre9.js} +5 -5
- package/dist/cli/{guardrail-explain-tebk344k.js → guardrail-explain-11fx66cx.js} +29 -29
- package/dist/cli/{guardrail-log-x3gz3x17.js → guardrail-log-ahvfn58c.js} +3 -3
- package/dist/cli/{guardrail-reset-716pdyf5.js → guardrail-reset-zp5xe0n5.js} +28 -28
- package/dist/cli/{hive-promoter-nvwpj2t9.js → hive-promoter-k6y06jj8.js} +28 -28
- package/dist/cli/{index-kemxyzc0.js → index-0f4b9ywa.js} +1 -1
- package/dist/cli/{index-6rcx6vr6.js → index-2rgm3hgq.js} +4 -4
- package/dist/cli/{index-pj2nycpg.js → index-4dt91x6e.js} +1 -1
- package/dist/cli/{index-6qwp46k0.js → index-4n557t8w.js} +3 -3
- package/dist/cli/{index-xt6jx41g.js → index-6vcrkz80.js} +4 -4
- package/dist/cli/{index-vhhdj49x.js → index-7fyv62b2.js} +8 -9
- package/dist/cli/{index-2w6vy9a9.js → index-7qky94rr.js} +1 -1
- package/dist/cli/{index-6rns7b2m.js → index-94e20w95.js} +2 -2
- package/dist/cli/{index-v2ryvr8k.js → index-9nw6z98k.js} +30 -30
- package/dist/cli/{index-f6qmar4k.js → index-a6xjn2zt.js} +5 -5
- package/dist/cli/{index-j6q3k628.js → index-bhjkxasn.js} +1 -1
- package/dist/cli/{index-7tw116n6.js → index-ckp0z9d4.js} +2 -2
- package/dist/cli/{index-mnxtkt8s.js → index-d7r6y724.js} +3 -3
- package/dist/cli/{index-4cgee5vh.js → index-dtn0pne5.js} +20 -1
- package/dist/cli/{index-r0dactw2.js → index-ed13peqr.js} +1 -1
- package/dist/cli/{index-fv9ddfta.js → index-env8fk17.js} +1 -1
- package/dist/cli/{index-8v69hfpt.js → index-g1bh7980.js} +3 -3
- package/dist/cli/{index-ynvw5kxc.js → index-gbkdj7ay.js} +2 -2
- package/dist/cli/{index-nh4axsxc.js → index-kck2gtxk.js} +2 -2
- package/dist/cli/{index-bxvkn0ye.js → index-m0fy8jra.js} +93 -65
- package/dist/cli/{index-n0gqre56.js → index-n7nnz0jp.js} +6 -6
- package/dist/cli/{index-dm9tc6qb.js → index-q0prhdds.js} +1 -1
- package/dist/cli/{index-399e8aze.js → index-qdnmnq65.js} +1 -1
- package/dist/cli/{index-xq2v52tt.js → index-qxj63890.js} +1 -1
- package/dist/cli/{index-p7ey2w90.js → index-s23q9v6t.js} +6 -6
- package/dist/cli/{index-dsqat5pg.js → index-s5p8ryar.js} +1 -1
- package/dist/cli/{index-v9585wjc.js → index-v6xkgxts.js} +2 -2
- package/dist/cli/{index-4xqa0sgz.js → index-vntggpez.js} +2 -2
- package/dist/cli/{index-07n87ctw.js → index-wkagbmpt.js} +1 -1
- package/dist/cli/{index-57t97rtr.js → index-y3kw1zpm.js} +2 -1
- package/dist/cli/{index-9avdncr2.js → index-ymgsmjba.js} +5 -5
- package/dist/cli/{index-14bz2t7b.js → index-zak50rve.js} +1 -1
- package/dist/cli/index.js +28 -28
- package/dist/cli/{knowledge-escalator-s0tye368.js → knowledge-escalator-yew2fbxb.js} +10 -10
- package/dist/cli/{knowledge-events-eyy9yf6b.js → knowledge-events-zfg423hp.js} +8 -8
- package/dist/cli/{knowledge-link-rb11f06y.js → knowledge-link-ydv6shg2.js} +3 -3
- package/dist/cli/{knowledge-store-zjq5mz2d.js → knowledge-store-zcv9stzz.js} +4 -4
- package/dist/cli/{knowledge-validator-yw5qqqpd.js → knowledge-validator-q68wx2bf.js} +6 -6
- package/dist/cli/{pending-delegations-rdzjq3nw.js → pending-delegations-yet1rza6.js} +2 -2
- package/dist/cli/{pr-subscriptions-2f5fne6z.js → pr-subscriptions-mp7fyh1r.js} +3 -3
- package/dist/cli/{runner-yaqrj388.js → runner-s89ja08q.js} +4 -4
- package/dist/cli/{scan-cursor-8f0s883y.js → scan-cursor-38bzfhwf.js} +5 -5
- package/dist/cli/{schema-2xw94dh3.js → schema-9hqyt4t6.js} +1 -1
- package/dist/cli/{scope-persistence-tap2q94x.js → scope-persistence-dd9s9q2b.js} +5 -5
- package/dist/cli/{skill-generator-2xbfryqb.js → skill-generator-b28ezazm.js} +12 -12
- package/dist/cli/{worktree-collision-ownership-5gwey8ms.js → worktree-collision-ownership-zw65t2p9.js} +4 -4
- package/dist/cli/{worktree-isolation-xsy14t5a.js → worktree-isolation-0ag393t0.js} +28 -28
- package/dist/hooks/final-context-accounting.d.ts +60 -0
- package/dist/hooks/index.d.ts +1 -0
- package/dist/hooks/knowledge-injector.d.ts +1 -1
- package/dist/hooks/system-enhancer.d.ts +13 -0
- package/dist/hooks/utils.d.ts +11 -0
- package/dist/index.js +65 -60
- package/dist/services/compaction-service.d.ts +9 -3
- package/dist/services/context-budget-service.d.ts +7 -3
- package/dist/services/injection-budget.d.ts +103 -26
- package/dist/state.d.ts +69 -0
- package/dist/summaries/summarizer.d.ts +34 -3
- package/package.json +2 -1
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
ALLOWED_SKILL_PATH_PREFIXES,
|
|
4
4
|
validateSkillPath
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-6vcrkz80.js";
|
|
6
6
|
import {
|
|
7
7
|
withTimeoutSignal
|
|
8
8
|
} from "./index-q7sjgr1y.js";
|
|
@@ -12,11 +12,11 @@ import {
|
|
|
12
12
|
resolveHiveKnowledgePath,
|
|
13
13
|
resolveSwarmKnowledgePath,
|
|
14
14
|
transactKnowledge
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-n7nnz0jp.js";
|
|
16
16
|
import {
|
|
17
17
|
effectiveRetrievalOutcomes,
|
|
18
18
|
readAuthoritativeKnowledgeCounterRollups
|
|
19
|
-
} from "./index-
|
|
19
|
+
} from "./index-s23q9v6t.js";
|
|
20
20
|
import {
|
|
21
21
|
advisoryWarn,
|
|
22
22
|
init_warning_buffer
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
import {
|
|
29
29
|
atomicWriteFileAnyRoot,
|
|
30
30
|
atomicWriteSwarmFile
|
|
31
|
-
} from "./index-
|
|
31
|
+
} from "./index-0f4b9ywa.js";
|
|
32
32
|
import {
|
|
33
33
|
init_logger,
|
|
34
34
|
log,
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
computePlanStructureHash,
|
|
4
4
|
derivePlanId
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-s5p8ryar.js";
|
|
6
6
|
import {
|
|
7
7
|
appendCoreEventSync
|
|
8
8
|
} from "./index-xdy28ngt.js";
|
|
@@ -11,11 +11,11 @@ import {
|
|
|
11
11
|
} from "./index-556ja8an.js";
|
|
12
12
|
import {
|
|
13
13
|
PlanSchema
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-q0prhdds.js";
|
|
15
15
|
import {
|
|
16
16
|
atomicWriteSwarmFile,
|
|
17
17
|
atomicWriteSwarmFileSync
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-0f4b9ywa.js";
|
|
19
19
|
import {
|
|
20
20
|
assertProjectRoot
|
|
21
21
|
} from "./index-xagq35tf.js";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
authorizeCuration
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-zak50rve.js";
|
|
5
5
|
import {
|
|
6
6
|
findNearDuplicate,
|
|
7
7
|
inferTags,
|
|
@@ -9,13 +9,13 @@ import {
|
|
|
9
9
|
resolveSwarmKnowledgePath,
|
|
10
10
|
resolveSwarmRejectedPath,
|
|
11
11
|
transactKnowledge
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-n7nnz0jp.js";
|
|
13
13
|
import {
|
|
14
14
|
resolveKnowledgeStoreDir
|
|
15
|
-
} from "./index-
|
|
15
|
+
} from "./index-ed13peqr.js";
|
|
16
16
|
import {
|
|
17
17
|
atomicWriteFile
|
|
18
|
-
} from "./index-
|
|
18
|
+
} from "./index-bhjkxasn.js";
|
|
19
19
|
import {
|
|
20
20
|
require_proper_lockfile
|
|
21
21
|
} from "./index-7g4c7s5r.js";
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
EvaluationRunV1Schema,
|
|
4
4
|
GateAuditResultV1Schema,
|
|
5
5
|
getProtectedEvaluationRunIds
|
|
6
|
-
} from "./index-
|
|
6
|
+
} from "./index-env8fk17.js";
|
|
7
7
|
import {
|
|
8
8
|
loadDatabaseCtor
|
|
9
9
|
} from "./index-134d35c1.js";
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
readTaskEvidence,
|
|
24
24
|
readTaskEvidenceRaw,
|
|
25
25
|
sanitizeTaskId
|
|
26
|
-
} from "./index-
|
|
26
|
+
} from "./index-g1bh7980.js";
|
|
27
27
|
import {
|
|
28
28
|
LedgerStaleWriterError,
|
|
29
29
|
appendLedgerEvent,
|
|
@@ -43,7 +43,7 @@ import {
|
|
|
43
43
|
replayFromLedgerWithStatus,
|
|
44
44
|
takeSnapshotEvent,
|
|
45
45
|
takeSnapshotWithRetry
|
|
46
|
-
} from "./index-
|
|
46
|
+
} from "./index-s5p8ryar.js";
|
|
47
47
|
import {
|
|
48
48
|
appendCoreEventSync
|
|
49
49
|
} from "./index-xdy28ngt.js";
|
|
@@ -58,9 +58,11 @@ import {
|
|
|
58
58
|
EvidenceSchema
|
|
59
59
|
} from "./index-gprxjmm7.js";
|
|
60
60
|
import {
|
|
61
|
+
estimateCharsForTokens,
|
|
62
|
+
estimateTokens,
|
|
61
63
|
readSwarmFileAsync,
|
|
62
64
|
validateSwarmPath
|
|
63
|
-
} from "./index-
|
|
65
|
+
} from "./index-dtn0pne5.js";
|
|
64
66
|
import {
|
|
65
67
|
bunHash,
|
|
66
68
|
bunWrite,
|
|
@@ -68,7 +70,7 @@ import {
|
|
|
68
70
|
} from "./index-r3mvsbtq.js";
|
|
69
71
|
import {
|
|
70
72
|
PlanSchema
|
|
71
|
-
} from "./index-
|
|
73
|
+
} from "./index-q0prhdds.js";
|
|
72
74
|
import {
|
|
73
75
|
GIT_BINARY_ENV_VAR,
|
|
74
76
|
describeGitResolution,
|
|
@@ -1413,9 +1415,6 @@ async function getRunMemorySummary(directory) {
|
|
|
1413
1415
|
Use this data to avoid repeating known failure patterns.`;
|
|
1414
1416
|
let summaryText = summaries.join(`
|
|
1415
1417
|
`);
|
|
1416
|
-
const estimateTokens = (text) => {
|
|
1417
|
-
return Math.ceil(text.length * 0.33);
|
|
1418
|
-
};
|
|
1419
1418
|
const totalText = prefix + summaryText + suffix;
|
|
1420
1419
|
const estimatedTokens = estimateTokens(totalText);
|
|
1421
1420
|
if (estimatedTokens > MAX_SUMMARY_TOKENS) {
|
|
@@ -1423,7 +1422,7 @@ Use this data to avoid repeating known failure patterns.`;
|
|
|
1423
1422
|
const suffixTokens = estimateTokens(suffix);
|
|
1424
1423
|
const availableContentTokens = MAX_SUMMARY_TOKENS - prefixTokens - suffixTokens;
|
|
1425
1424
|
if (availableContentTokens > 0) {
|
|
1426
|
-
const maxContentChars =
|
|
1425
|
+
const maxContentChars = estimateCharsForTokens(availableContentTokens);
|
|
1427
1426
|
summaryText = summaryText.slice(0, maxContentChars);
|
|
1428
1427
|
} else {
|
|
1429
1428
|
summaryText = "";
|
|
@@ -92,7 +92,7 @@ var _internals = {
|
|
|
92
92
|
symlinkSync: fs.symlinkSync
|
|
93
93
|
},
|
|
94
94
|
writeScopeToDisk: async (directory, taskId, files) => {
|
|
95
|
-
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-
|
|
95
|
+
const { writeScopeToDisk: realWrite } = await import("./scope-persistence-dd9s9q2b.js");
|
|
96
96
|
return realWrite(directory, taskId, files);
|
|
97
97
|
},
|
|
98
98
|
writeLaneProfileToDisk: async (_worktreePath, _laneIndex, _envOverrides) => {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
validateSwarmPath
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-dtn0pne5.js";
|
|
5
5
|
import {
|
|
6
6
|
atomicWriteSwarmFileSync
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-0f4b9ywa.js";
|
|
8
8
|
import {
|
|
9
9
|
withEvidenceLock
|
|
10
10
|
} from "./index-xagq35tf.js";
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// @bun
|
|
2
2
|
import {
|
|
3
3
|
handleGuardrailExplain
|
|
4
|
-
} from "./index-
|
|
4
|
+
} from "./index-ckp0z9d4.js";
|
|
5
5
|
import {
|
|
6
6
|
handleGuardrailLog
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-4dt91x6e.js";
|
|
8
8
|
import {
|
|
9
9
|
COMMAND_REGISTRY,
|
|
10
10
|
SWARM_COMMAND_TOOL_ALLOWLIST,
|
|
@@ -86,53 +86,53 @@ import {
|
|
|
86
86
|
handleWriteRetroCommand,
|
|
87
87
|
normalizeSwarmCommandInput,
|
|
88
88
|
resolveCommand
|
|
89
|
-
} from "./index-
|
|
90
|
-
import"./index-
|
|
91
|
-
import"./index-
|
|
92
|
-
import"./index-
|
|
93
|
-
import"./index-
|
|
94
|
-
import"./index-
|
|
89
|
+
} from "./index-m0fy8jra.js";
|
|
90
|
+
import"./index-qdnmnq65.js";
|
|
91
|
+
import"./index-qxj63890.js";
|
|
92
|
+
import"./index-wkagbmpt.js";
|
|
93
|
+
import"./index-7fyv62b2.js";
|
|
94
|
+
import"./index-env8fk17.js";
|
|
95
95
|
import"./index-134d35c1.js";
|
|
96
96
|
import"./index-nj6rmyeh.js";
|
|
97
97
|
import"./index-y8552snf.js";
|
|
98
|
-
import"./index-
|
|
99
|
-
import"./index-
|
|
98
|
+
import"./index-a6xjn2zt.js";
|
|
99
|
+
import"./index-v6xkgxts.js";
|
|
100
100
|
import"./index-70ha9e09.js";
|
|
101
101
|
import"./index-c8s9a3zh.js";
|
|
102
102
|
import"./index-9ss2m4rs.js";
|
|
103
|
-
import"./index-
|
|
103
|
+
import"./index-94e20w95.js";
|
|
104
104
|
import"./index-zsrtt42s.js";
|
|
105
|
-
import"./index-
|
|
106
|
-
import"./index-
|
|
107
|
-
import"./index-
|
|
108
|
-
import"./index-
|
|
109
|
-
import"./index-
|
|
105
|
+
import"./index-ymgsmjba.js";
|
|
106
|
+
import"./index-vntggpez.js";
|
|
107
|
+
import"./index-2rgm3hgq.js";
|
|
108
|
+
import"./index-6vcrkz80.js";
|
|
109
|
+
import"./index-zak50rve.js";
|
|
110
110
|
import"./index-rtry5xyf.js";
|
|
111
|
-
import"./index-
|
|
112
|
-
import"./index-
|
|
113
|
-
import"./index-
|
|
111
|
+
import"./index-g1bh7980.js";
|
|
112
|
+
import"./index-7qky94rr.js";
|
|
113
|
+
import"./index-kck2gtxk.js";
|
|
114
114
|
import"./index-ddszzne4.js";
|
|
115
115
|
import"./index-vnn7qq8c.js";
|
|
116
|
-
import"./index-
|
|
117
|
-
import"./index-
|
|
116
|
+
import"./index-4n557t8w.js";
|
|
117
|
+
import"./index-s5p8ryar.js";
|
|
118
118
|
import"./index-xdy28ngt.js";
|
|
119
119
|
import"./index-556ja8an.js";
|
|
120
120
|
import"./index-4fwbbad3.js";
|
|
121
121
|
import"./index-b43rt5ph.js";
|
|
122
122
|
import"./index-q7sjgr1y.js";
|
|
123
|
-
import"./index-
|
|
124
|
-
import"./index-
|
|
125
|
-
import"./index-
|
|
123
|
+
import"./index-n7nnz0jp.js";
|
|
124
|
+
import"./index-s23q9v6t.js";
|
|
125
|
+
import"./index-gbkdj7ay.js";
|
|
126
126
|
import"./index-gprxjmm7.js";
|
|
127
127
|
import"./index-n832052r.js";
|
|
128
|
-
import"./index-
|
|
128
|
+
import"./index-dtn0pne5.js";
|
|
129
129
|
import"./index-z6xqpmqg.js";
|
|
130
130
|
import"./index-r3mvsbtq.js";
|
|
131
|
-
import"./index-
|
|
131
|
+
import"./index-q0prhdds.js";
|
|
132
132
|
import {
|
|
133
133
|
init_schema,
|
|
134
134
|
stripKnownSwarmPrefix
|
|
135
|
-
} from "./index-
|
|
135
|
+
} from "./index-y3kw1zpm.js";
|
|
136
136
|
import {
|
|
137
137
|
AGENT_TOOL_MAP,
|
|
138
138
|
ORCHESTRATOR_NAME,
|
|
@@ -142,10 +142,10 @@ import"./index-zjygnfay.js";
|
|
|
142
142
|
import"./index-9e6fdz2h.js";
|
|
143
143
|
import"./index-4rhhvd1a.js";
|
|
144
144
|
import"./index-ae75rja9.js";
|
|
145
|
-
import"./index-
|
|
146
|
-
import"./index-
|
|
145
|
+
import"./index-ed13peqr.js";
|
|
146
|
+
import"./index-bhjkxasn.js";
|
|
147
147
|
import"./index-bk5tah7q.js";
|
|
148
|
-
import"./index-
|
|
148
|
+
import"./index-0f4b9ywa.js";
|
|
149
149
|
import"./index-xagq35tf.js";
|
|
150
150
|
import"./index-ed5ykebp.js";
|
|
151
151
|
import"./index-h1g8w4v0.js";
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
resolveSwarmKnowledgePath,
|
|
7
7
|
transactKnowledge,
|
|
8
8
|
wordBigrams
|
|
9
|
-
} from "./index-
|
|
9
|
+
} from "./index-n7nnz0jp.js";
|
|
10
10
|
import {
|
|
11
11
|
queryHistoricalOutcomes,
|
|
12
12
|
readKnowledgeEvents,
|
|
13
13
|
recordKnowledgeEvent
|
|
14
|
-
} from "./index-
|
|
14
|
+
} from "./index-s23q9v6t.js";
|
|
15
15
|
import {
|
|
16
16
|
init_knowledge_types,
|
|
17
17
|
isActiveStatus
|
|
@@ -224,11 +224,11 @@ async function maybeQuarantineOnContradiction(directory, entryId, threshold, win
|
|
|
224
224
|
alreadyInactive: true
|
|
225
225
|
};
|
|
226
226
|
}
|
|
227
|
-
const { quarantineEntry } = await import("./knowledge-validator-
|
|
227
|
+
const { quarantineEntry } = await import("./knowledge-validator-q68wx2bf.js");
|
|
228
228
|
let policyConfig;
|
|
229
229
|
try {
|
|
230
|
-
const { KnowledgeConfigSchema } = await import("./schema-
|
|
231
|
-
const { loadPluginConfigWithMeta } = await import("./index-
|
|
230
|
+
const { KnowledgeConfigSchema } = await import("./schema-9hqyt4t6.js");
|
|
231
|
+
const { loadPluginConfigWithMeta } = await import("./index-d7r6y724.js");
|
|
232
232
|
const { config: loadedConfig } = loadPluginConfigWithMeta(directory);
|
|
233
233
|
policyConfig = KnowledgeConfigSchema.parse(loadedConfig.knowledge ?? {});
|
|
234
234
|
} catch {
|
|
@@ -14,14 +14,14 @@ import {
|
|
|
14
14
|
detectWindowsWrites,
|
|
15
15
|
getSharedClassifierGuardrailBlock,
|
|
16
16
|
resolveWriteTargets
|
|
17
|
-
} from "./index-
|
|
17
|
+
} from "./index-m0fy8jra.js";
|
|
18
18
|
import {
|
|
19
19
|
checkFileAuthority,
|
|
20
20
|
classifyFile,
|
|
21
21
|
isInDeclaredScope,
|
|
22
22
|
redactPath,
|
|
23
23
|
redactShellCommand
|
|
24
|
-
} from "./index-
|
|
24
|
+
} from "./index-qxj63890.js";
|
|
25
25
|
|
|
26
26
|
// src/services/guardrail-explain-service.ts
|
|
27
27
|
import path from "path";
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import {
|
|
3
3
|
_internals,
|
|
4
4
|
resolveWorktreeIsolationConfig
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-gbkdj7ay.js";
|
|
6
6
|
import {
|
|
7
7
|
ApprovalEvidenceSchema,
|
|
8
8
|
BaseEvidenceSchema,
|
|
@@ -42,7 +42,7 @@ import {
|
|
|
42
42
|
loadPluginConfig,
|
|
43
43
|
loadPluginConfigWithMeta,
|
|
44
44
|
loadPluginConfigWithMetaAsync
|
|
45
|
-
} from "./index-
|
|
45
|
+
} from "./index-q0prhdds.js";
|
|
46
46
|
import {
|
|
47
47
|
AUTO_REVIEW_V8_BURN_IN_DECISION,
|
|
48
48
|
AgentOverrideConfigSchema,
|
|
@@ -64,7 +64,7 @@ import {
|
|
|
64
64
|
TurboConfigSchema,
|
|
65
65
|
WorktreeIsolationConfigSchema,
|
|
66
66
|
resolveAutoReviewConfig
|
|
67
|
-
} from "./index-
|
|
67
|
+
} from "./index-y3kw1zpm.js";
|
|
68
68
|
import {
|
|
69
69
|
ALL_AGENT_NAMES,
|
|
70
70
|
ALL_SUBAGENT_NAMES,
|
|
@@ -168,5 +168,24 @@ async function readSwarmFileAsync(directory, filename, cache) {
|
|
|
168
168
|
}
|
|
169
169
|
return null;
|
|
170
170
|
}
|
|
171
|
+
var TOKENS_PER_CHAR = 0.33;
|
|
172
|
+
function estimateTokensFromCharCount(chars) {
|
|
173
|
+
if (chars <= 0) {
|
|
174
|
+
return 0;
|
|
175
|
+
}
|
|
176
|
+
return Math.ceil(chars * TOKENS_PER_CHAR);
|
|
177
|
+
}
|
|
178
|
+
function estimateCharsForTokens(tokens) {
|
|
179
|
+
if (tokens <= 0) {
|
|
180
|
+
return 0;
|
|
181
|
+
}
|
|
182
|
+
return Math.floor(tokens / TOKENS_PER_CHAR);
|
|
183
|
+
}
|
|
184
|
+
function estimateTokens(text) {
|
|
185
|
+
if (!text) {
|
|
186
|
+
return 0;
|
|
187
|
+
}
|
|
188
|
+
return estimateTokensFromCharCount(text.length);
|
|
189
|
+
}
|
|
171
190
|
|
|
172
|
-
export { safeHook, validateSwarmPath, readSwarmFileAsync };
|
|
191
|
+
export { safeHook, validateSwarmPath, readSwarmFileAsync, estimateCharsForTokens, estimateTokens };
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
import {
|
|
3
3
|
autoCommitDirty,
|
|
4
4
|
cleanUntrackedFiles
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-7qky94rr.js";
|
|
6
6
|
import {
|
|
7
7
|
isPathWithinDeclaredScope,
|
|
8
8
|
unsafePathTextReason
|
|
9
9
|
} from "./index-556ja8an.js";
|
|
10
10
|
import {
|
|
11
11
|
validateSwarmPath
|
|
12
|
-
} from "./index-
|
|
12
|
+
} from "./index-dtn0pne5.js";
|
|
13
13
|
import {
|
|
14
14
|
bunSpawn,
|
|
15
15
|
classifySpawnFailure
|
|
@@ -26,7 +26,7 @@ import {
|
|
|
26
26
|
atomicWriteFile,
|
|
27
27
|
taskEvidencePath,
|
|
28
28
|
withTaskEvidenceLock
|
|
29
|
-
} from "./index-
|
|
29
|
+
} from "./index-bhjkxasn.js";
|
|
30
30
|
import {
|
|
31
31
|
assertProjectRoot
|
|
32
32
|
} from "./index-xagq35tf.js";
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
import {
|
|
3
3
|
init_loader,
|
|
4
4
|
loadPluginConfigWithMeta
|
|
5
|
-
} from "./index-
|
|
5
|
+
} from "./index-q0prhdds.js";
|
|
6
6
|
import {
|
|
7
7
|
init_schema
|
|
8
|
-
} from "./index-
|
|
8
|
+
} from "./index-y3kw1zpm.js";
|
|
9
9
|
import {
|
|
10
10
|
DEFAULT_WORKTREE_ISOLATION_CONFIG,
|
|
11
11
|
init_constants
|
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./index-ddszzne4.js";
|
|
5
5
|
import {
|
|
6
6
|
validateSwarmPath
|
|
7
|
-
} from "./index-
|
|
7
|
+
} from "./index-dtn0pne5.js";
|
|
8
8
|
import {
|
|
9
9
|
bunWrite
|
|
10
10
|
} from "./index-r3mvsbtq.js";
|
|
@@ -3096,7 +3096,7 @@ async function reconcileLegacyCoderSettlements(directory, maxRecords, onReconcil
|
|
|
3096
3096
|
const candidates = readDelegations(directory).filter((record) => record.normalizedAgent === "coder" && Boolean(record.legacyCoderSettlementTransfer) && Boolean(record.terminalResult)).slice(0, maxRecords);
|
|
3097
3097
|
if (candidates.length === 0)
|
|
3098
3098
|
return 0;
|
|
3099
|
-
const { transferCoderSettlementToBackground } = await import("./coder-settlement-
|
|
3099
|
+
const { transferCoderSettlementToBackground } = await import("./coder-settlement-7c9h07f5.js");
|
|
3100
3100
|
let transferred = 0;
|
|
3101
3101
|
for (const record of candidates) {
|
|
3102
3102
|
try {
|