opencode-swarm 7.160.2 → 7.161.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/dist/background/delegation-lifecycle.d.ts +374 -0
- package/dist/background/pending-delegations.d.ts +6 -0
- package/dist/cli/{coder-settlement-gzar5ypz.js → coder-settlement-nayk1bbf.js} +8 -8
- package/dist/cli/{config-doctor-ancn1sj7.js → config-doctor-b1w7yvcs.js} +2 -2
- package/dist/cli/{core-bhmqtxev.js → core-whesnhpf.js} +1 -1
- package/dist/cli/{curation-policy-47przjwg.js → curation-policy-ej9xc0cd.js} +5 -5
- package/dist/cli/{curator-sgmynbpm.js → curator-1rzb285s.js} +29 -29
- package/dist/cli/{curator-llm-factory-6mw01jx1.js → curator-llm-factory-bqfkaq6y.js} +29 -29
- package/dist/cli/{evidence-summary-service-1pcfsqhv.js → evidence-summary-service-ma8drpv5.js} +12 -12
- package/dist/cli/{gate-evidence-w0kjqmew.js → gate-evidence-7eh82zs0.js} +5 -5
- package/dist/cli/{guardrail-explain-k99eje1y.js → guardrail-explain-em2mqz9a.js} +30 -30
- package/dist/cli/{guardrail-log-md5gcpk7.js → guardrail-log-845tfrwb.js} +6 -6
- package/dist/cli/{guardrail-reset-3385eqmq.js → guardrail-reset-091xw53a.js} +29 -29
- package/dist/cli/{hive-promoter-r0ekyn5m.js → hive-promoter-kx8t5em3.js} +29 -29
- package/dist/cli/{index-vv760pbg.js → index-14dgnwmh.js} +2 -2
- package/dist/cli/{index-k0qy284k.js → index-3cxfqdpv.js} +3 -3
- package/dist/cli/{index-vsy942dt.js → index-52f67bbh.js} +31 -31
- package/dist/cli/{index-yd6y4qr7.js → index-54jznpq7.js} +1 -1
- package/dist/cli/{index-7h2armwf.js → index-7619tk9a.js} +2 -2
- package/dist/cli/{index-am5bz6mf.js → index-7qera0f6.js} +2 -2
- package/dist/cli/{index-re338hf1.js → index-93pf824c.js} +3 -3
- package/dist/cli/{index-xsd7y4hp.js → index-ambz0ryy.js} +4 -4
- package/dist/cli/{index-prv20xq6.js → index-c6zyqgpq.js} +1 -1
- package/dist/cli/{index-war2dt6a.js → index-d1h4sf8f.js} +6 -6
- package/dist/cli/{index-7ezv5j23.js → index-d8st72j7.js} +1 -1
- package/dist/cli/{index-nk498mx6.js → index-dq41vsf9.js} +2 -2
- package/dist/cli/{index-2123hwbj.js → index-et1jpj6z.js} +3 -3
- package/dist/cli/{index-717pmdce.js → index-etdtfhhv.js} +1 -1
- package/dist/cli/{index-zbnf26br.js → index-f4dmccpd.js} +7 -7
- package/dist/cli/{index-znf683sm.js → index-f5axf6vq.js} +1 -1
- package/dist/cli/{index-dke4wzkn.js → index-fx3em0dr.js} +17 -1
- package/dist/cli/{index-3a35tt6a.js → index-gkv7s4xy.js} +8 -8
- package/dist/cli/{index-xtwny1ae.js → index-h6wtxzvm.js} +1 -1
- package/dist/cli/{index-mmr96pwr.js → index-k55td019.js} +1 -1
- package/dist/cli/{index-k50kxd3w.js → index-mbktm1ah.js} +7 -4
- package/dist/cli/{index-yp81ebrx.js → index-mj6ndvee.js} +4 -4
- package/dist/cli/{index-b5adxpy6.js → index-nqbqkx4c.js} +1 -1
- package/dist/cli/{index-s7w6ntw6.js → index-qjge2m9r.js} +63 -63
- package/dist/cli/{index-j3ss86kf.js → index-s33ee2w3.js} +1 -1
- package/dist/cli/{index-4dcz9fpn.js → index-t81fmfjj.js} +4 -4
- package/dist/cli/{index-xkmzsfg5.js → index-trmqq4wm.js} +2 -2
- package/dist/cli/{index-4d8cq6e1.js → index-w9g58t3j.js} +5 -5
- package/dist/cli/{index-5xfx5sbw.js → index-wrtgyvre.js} +5 -5
- package/dist/cli/{index-kqzba6ex.js → index-xy0e0r5f.js} +1 -1
- package/dist/cli/{index-5th50g17.js → index-y0ra2v4w.js} +3 -3
- package/dist/cli/{index-497a3hhj.js → index-y14mwbk8.js} +3 -3
- package/dist/cli/{index-6scakreq.js → index-zkgrayya.js} +1 -1
- package/dist/cli/index.js +29 -29
- package/dist/cli/{knowledge-escalator-saekqp8t.js → knowledge-escalator-9eqpsbw5.js} +11 -11
- package/dist/cli/{knowledge-events-ej8yz3yq.js → knowledge-events-a8r4ej12.js} +9 -9
- package/dist/cli/{knowledge-link-xezm8hr3.js → knowledge-link-8knefv8x.js} +4 -4
- package/dist/cli/{knowledge-store-3jamj5n4.js → knowledge-store-ydzeppv7.js} +5 -5
- package/dist/cli/{knowledge-validator-26w2mvqv.js → knowledge-validator-mnv58he9.js} +7 -7
- package/dist/cli/{pending-delegations-7xak7g59.js → pending-delegations-9mwmrwwm.js} +6 -4
- package/dist/cli/{pr-review-reentry-authorization-v97q63q4.js → pr-review-reentry-authorization-h1ssfq37.js} +29 -29
- package/dist/cli/{pr-subscriptions-asjevc5p.js → pr-subscriptions-3zwthnan.js} +4 -4
- package/dist/cli/{runner-wsdcy2d6.js → runner-fzgkd6m1.js} +5 -5
- package/dist/cli/{scan-cursor-1agr50f8.js → scan-cursor-5rmaqw2t.js} +6 -6
- package/dist/cli/{schema-z0ygrqgy.js → schema-72vpr9xy.js} +1 -1
- package/dist/cli/{scope-persistence-tncg38by.js → scope-persistence-39mwns79.js} +8 -8
- package/dist/cli/{skill-generator-jq20a09m.js → skill-generator-9aay0t53.js} +13 -13
- package/dist/cli/{telemetry-gpr9s3sm.js → telemetry-cmbjv240.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-b9cp9zvw.js → worktree-collision-ownership-ybhktnq4.js} +4 -4
- package/dist/cli/{worktree-isolation-dzyxf8hn.js → worktree-isolation-w8ett6bs.js} +29 -29
- package/dist/config/evidence-schema.d.ts +2 -2
- package/dist/config/schema.d.ts +7 -7
- package/dist/hooks/delegate-ack-collector.d.ts +74 -0
- package/dist/hooks/knowledge-injector.d.ts +12 -1
- package/dist/index.js +93 -93
- package/dist/learning/admission.d.ts +2 -2
- package/dist/memory/schema.d.ts +3 -3
- package/dist/observability/catalog.d.ts +2 -2
- package/dist/prm/types.d.ts +9 -0
- package/dist/telemetry.d.ts +9 -1
- package/dist/tools/repo-graph/retrieval-router.d.ts +57 -0
- package/dist/tools/repo-graph.d.ts +2 -0
- package/dist/tools/repo-map.d.ts +202 -0
- package/dist/tools/search.d.ts +2 -2
- package/package.json +1 -1
|
@@ -21,65 +21,65 @@ import {
|
|
|
21
21
|
sanitizeWorktreeTaskId,
|
|
22
22
|
standardWorktreeByCallID,
|
|
23
23
|
standardWorktreeSerializationSessions
|
|
24
|
-
} from "./index-
|
|
25
|
-
import"./index-
|
|
26
|
-
import"./index-
|
|
27
|
-
import"./index-
|
|
28
|
-
import"./index-
|
|
29
|
-
import"./index-
|
|
24
|
+
} from "./index-qjge2m9r.js";
|
|
25
|
+
import"./index-s33ee2w3.js";
|
|
26
|
+
import"./index-et1jpj6z.js";
|
|
27
|
+
import"./index-h6wtxzvm.js";
|
|
28
|
+
import"./index-f4dmccpd.js";
|
|
29
|
+
import"./index-dq41vsf9.js";
|
|
30
30
|
import"./index-txdagbh7.js";
|
|
31
31
|
import"./index-134d35c1.js";
|
|
32
32
|
import"./index-3146wmgv.js";
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
35
|
-
import"./index-
|
|
33
|
+
import"./index-93pf824c.js";
|
|
34
|
+
import"./index-wrtgyvre.js";
|
|
35
|
+
import"./index-7qera0f6.js";
|
|
36
36
|
import"./index-70ha9e09.js";
|
|
37
37
|
import"./index-c8s9a3zh.js";
|
|
38
38
|
import"./index-9ss2m4rs.js";
|
|
39
|
-
import"./index-
|
|
39
|
+
import"./index-y14mwbk8.js";
|
|
40
40
|
import"./index-zsrtt42s.js";
|
|
41
|
-
import"./index-
|
|
41
|
+
import"./index-w9g58t3j.js";
|
|
42
42
|
import"./index-3f7hqtgg.js";
|
|
43
43
|
import"./index-awjx0wgk.js";
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
44
|
+
import"./index-mj6ndvee.js";
|
|
45
|
+
import"./index-f5axf6vq.js";
|
|
46
46
|
import"./index-rtry5xyf.js";
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
47
|
+
import"./index-t81fmfjj.js";
|
|
48
|
+
import"./index-xy0e0r5f.js";
|
|
49
|
+
import"./index-mbktm1ah.js";
|
|
50
50
|
import"./index-ddszzne4.js";
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
51
|
+
import"./index-ambz0ryy.js";
|
|
52
|
+
import"./index-y0ra2v4w.js";
|
|
53
|
+
import"./index-7619tk9a.js";
|
|
54
54
|
import"./index-556ja8an.js";
|
|
55
55
|
import"./index-4fwbbad3.js";
|
|
56
56
|
import"./index-b43rt5ph.js";
|
|
57
57
|
import"./index-q7sjgr1y.js";
|
|
58
|
-
import"./index-
|
|
59
|
-
import"./index-
|
|
58
|
+
import"./index-d1h4sf8f.js";
|
|
59
|
+
import"./index-gkv7s4xy.js";
|
|
60
60
|
import {
|
|
61
61
|
resolveWorktreeIsolationConfig
|
|
62
|
-
} from "./index-
|
|
62
|
+
} from "./index-trmqq4wm.js";
|
|
63
63
|
import"./index-q8hm27yj.js";
|
|
64
64
|
import"./index-n832052r.js";
|
|
65
65
|
import"./index-dtn0pne5.js";
|
|
66
66
|
import"./index-z6xqpmqg.js";
|
|
67
67
|
import"./index-r3mvsbtq.js";
|
|
68
|
-
import"./index-
|
|
69
|
-
import"./index-
|
|
68
|
+
import"./index-etdtfhhv.js";
|
|
69
|
+
import"./index-zkgrayya.js";
|
|
70
70
|
import"./index-9e6fdz2h.js";
|
|
71
71
|
import"./index-4rhhvd1a.js";
|
|
72
|
-
import"./index-
|
|
72
|
+
import"./index-k55td019.js";
|
|
73
73
|
import"./index-c9zp4xwc.js";
|
|
74
74
|
import"./index-zjygnfay.js";
|
|
75
75
|
import"./index-ae75rja9.js";
|
|
76
|
-
import"./index-
|
|
77
|
-
import"./index-
|
|
76
|
+
import"./index-c6zyqgpq.js";
|
|
77
|
+
import"./index-d8st72j7.js";
|
|
78
78
|
import"./index-bk5tah7q.js";
|
|
79
|
-
import"./index-
|
|
79
|
+
import"./index-nqbqkx4c.js";
|
|
80
80
|
import"./index-dh5q6z7y.js";
|
|
81
81
|
import"./index-ed5ykebp.js";
|
|
82
|
-
import"./index-
|
|
82
|
+
import"./index-fx3em0dr.js";
|
|
83
83
|
import"./index-7g4c7s5r.js";
|
|
84
84
|
import"./index-bpmtbmy9.js";
|
|
85
85
|
import"./index-zgwm4ryv.js";
|
|
@@ -4,11 +4,11 @@ export declare const EVIDENCE_MAX_PATCH_BYTES: number;
|
|
|
4
4
|
export declare const EVIDENCE_MAX_TASK_BYTES: number;
|
|
5
5
|
export declare const EvidenceTypeSchema: z.ZodEnum<{
|
|
6
6
|
note: "note";
|
|
7
|
+
test: "test";
|
|
7
8
|
diff: "diff";
|
|
8
9
|
secretscan: "secretscan";
|
|
9
10
|
quality_budget: "quality_budget";
|
|
10
11
|
placeholder: "placeholder";
|
|
11
|
-
test: "test";
|
|
12
12
|
build: "build";
|
|
13
13
|
review: "review";
|
|
14
14
|
approval: "approval";
|
|
@@ -35,11 +35,11 @@ export declare const BaseEvidenceSchema: z.ZodObject<{
|
|
|
35
35
|
task_id: z.ZodString;
|
|
36
36
|
type: z.ZodEnum<{
|
|
37
37
|
note: "note";
|
|
38
|
+
test: "test";
|
|
38
39
|
diff: "diff";
|
|
39
40
|
secretscan: "secretscan";
|
|
40
41
|
quality_budget: "quality_budget";
|
|
41
42
|
placeholder: "placeholder";
|
|
42
|
-
test: "test";
|
|
43
43
|
build: "build";
|
|
44
44
|
review: "review";
|
|
45
45
|
approval: "approval";
|
package/dist/config/schema.d.ts
CHANGED
|
@@ -659,9 +659,9 @@ export declare const ApplyPatchConfigSchema: z.ZodObject<{
|
|
|
659
659
|
}, z.core.$strict>;
|
|
660
660
|
export type ApplyPatchConfig = z.infer<typeof ApplyPatchConfigSchema>;
|
|
661
661
|
export declare const AutomationModeSchema: z.ZodEnum<{
|
|
662
|
+
hybrid: "hybrid";
|
|
662
663
|
auto: "auto";
|
|
663
664
|
manual: "manual";
|
|
664
|
-
hybrid: "hybrid";
|
|
665
665
|
}>;
|
|
666
666
|
export type AutomationMode = z.infer<typeof AutomationModeSchema>;
|
|
667
667
|
export declare const AutomationCapabilitiesSchema: z.ZodObject<{
|
|
@@ -675,9 +675,9 @@ export declare const AutomationCapabilitiesSchema: z.ZodObject<{
|
|
|
675
675
|
export type AutomationCapabilities = z.infer<typeof AutomationCapabilitiesSchema>;
|
|
676
676
|
declare const AutomationConfigSchemaBase: z.ZodObject<{
|
|
677
677
|
mode: z.ZodDefault<z.ZodEnum<{
|
|
678
|
+
hybrid: "hybrid";
|
|
678
679
|
auto: "auto";
|
|
679
680
|
manual: "manual";
|
|
680
|
-
hybrid: "hybrid";
|
|
681
681
|
}>>;
|
|
682
682
|
capabilities: z.ZodDefault<z.ZodObject<{
|
|
683
683
|
plan_sync: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1148,9 +1148,9 @@ export declare const AgentAuthorityRuleSchema: z.ZodObject<{
|
|
|
1148
1148
|
blockedPrefix: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1149
1149
|
allowedPrefix: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1150
1150
|
blockedZones: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1151
|
+
test: "test";
|
|
1151
1152
|
docs: "docs";
|
|
1152
1153
|
production: "production";
|
|
1153
|
-
test: "test";
|
|
1154
1154
|
config: "config";
|
|
1155
1155
|
generated: "generated";
|
|
1156
1156
|
build: "build";
|
|
@@ -1169,9 +1169,9 @@ export declare const AuthorityConfigSchema: z.ZodObject<{
|
|
|
1169
1169
|
blockedPrefix: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1170
1170
|
allowedPrefix: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
1171
1171
|
blockedZones: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
1172
|
+
test: "test";
|
|
1172
1173
|
docs: "docs";
|
|
1173
1174
|
production: "production";
|
|
1174
|
-
test: "test";
|
|
1175
1175
|
config: "config";
|
|
1176
1176
|
generated: "generated";
|
|
1177
1177
|
build: "build";
|
|
@@ -2106,9 +2106,9 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
2106
2106
|
blockedPrefix: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2107
2107
|
allowedPrefix: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
2108
2108
|
blockedZones: z.ZodOptional<z.ZodArray<z.ZodEnum<{
|
|
2109
|
+
test: "test";
|
|
2109
2110
|
docs: "docs";
|
|
2110
2111
|
production: "production";
|
|
2111
|
-
test: "test";
|
|
2112
2112
|
config: "config";
|
|
2113
2113
|
generated: "generated";
|
|
2114
2114
|
build: "build";
|
|
@@ -2234,7 +2234,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
2234
2234
|
fuzzy_match_context_aware: z.ZodDefault<z.ZodBoolean>;
|
|
2235
2235
|
}, z.core.$strict>>;
|
|
2236
2236
|
automation: z.ZodOptional<z.ZodType<{
|
|
2237
|
-
mode: "
|
|
2237
|
+
mode: "hybrid" | "auto" | "manual";
|
|
2238
2238
|
capabilities: {
|
|
2239
2239
|
plan_sync: boolean;
|
|
2240
2240
|
phase_preflight: boolean;
|
|
@@ -2244,7 +2244,7 @@ export declare const PluginConfigSchema: z.ZodObject<{
|
|
|
2244
2244
|
decision_drift_detection: boolean;
|
|
2245
2245
|
};
|
|
2246
2246
|
}, unknown, z.core.$ZodTypeInternals<{
|
|
2247
|
-
mode: "
|
|
2247
|
+
mode: "hybrid" | "auto" | "manual";
|
|
2248
2248
|
capabilities: {
|
|
2249
2249
|
plan_sync: boolean;
|
|
2250
2250
|
phase_preflight: boolean;
|
|
@@ -21,6 +21,11 @@
|
|
|
21
21
|
* Stateless by design: it re-parses the prompt rather than relying on
|
|
22
22
|
* cross-hook mutable state, so it is safe under parallel delegations. Fail-open:
|
|
23
23
|
* never throws, never blocks.
|
|
24
|
+
*
|
|
25
|
+
* Issue #2045: the reconciliation itself lives in {@link reconcileShownDirectives}
|
|
26
|
+
* so lane collections (`collectLaneDelegateAcks`, keyed by the lane session's
|
|
27
|
+
* durable `delegate_directive` memberships) and Task collections share ONE
|
|
28
|
+
* implementation — not a second lifecycle copy.
|
|
24
29
|
*/
|
|
25
30
|
export interface DelegateAckInput {
|
|
26
31
|
tool: unknown;
|
|
@@ -59,6 +64,44 @@ export interface CollectDelegateAcksResult {
|
|
|
59
64
|
detail: string;
|
|
60
65
|
};
|
|
61
66
|
}
|
|
67
|
+
/** A directive proven shown to a delegate, with the priority it was shown at. */
|
|
68
|
+
export interface ShownDirective {
|
|
69
|
+
id: string;
|
|
70
|
+
priority: string;
|
|
71
|
+
}
|
|
72
|
+
export interface ReconcileShownDirectivesParams {
|
|
73
|
+
directory: string;
|
|
74
|
+
/** Directives proven shown (anti-spoofing scope); never trust the ack list. */
|
|
75
|
+
shown: readonly ShownDirective[];
|
|
76
|
+
/**
|
|
77
|
+
* Retrieval trace the directives were shown under. `undefined` marks a
|
|
78
|
+
* legacy unverifiable prompt (pre-#1849): no receipt validation, no
|
|
79
|
+
* terminals, no fabricated trace.
|
|
80
|
+
*/
|
|
81
|
+
traceId?: string;
|
|
82
|
+
transcript: string;
|
|
83
|
+
agent: string;
|
|
84
|
+
/** Host session the shown-set membership is bound to (V2 authority). */
|
|
85
|
+
sessionId: string;
|
|
86
|
+
taskId?: string;
|
|
87
|
+
/**
|
|
88
|
+
* Replay mode (issue #2045 crash recovery): the AUTHORITATIVE receipts
|
|
89
|
+
* (validator/ledger-committed ACK terminals, unacknowledged-critical
|
|
90
|
+
* violations) still run — the ledger dedupes them — but the audit-only
|
|
91
|
+
* `unacknowledged` NON-critical observation is exactly-once-at-emit (it
|
|
92
|
+
* bypasses the ledger and would double-append on replay).
|
|
93
|
+
*/
|
|
94
|
+
replay?: boolean;
|
|
95
|
+
}
|
|
96
|
+
/**
|
|
97
|
+
* Shared reconciliation core (issue #2045): reconcile a proven-shown directive
|
|
98
|
+
* set against the ack markers in a transcript. Used by the Task
|
|
99
|
+
* `tool.execute.after` adapter (shown-set parsed from the delegation prompt)
|
|
100
|
+
* and by lane terminal observations (shown-set from the receipt ledger's
|
|
101
|
+
* session-bound `delegate_directive` memberships). Returns a summary of what
|
|
102
|
+
* was emitted. Never throws.
|
|
103
|
+
*/
|
|
104
|
+
export declare function reconcileShownDirectives(params: ReconcileShownDirectivesParams): Promise<CollectDelegateAcksResult>;
|
|
62
105
|
/**
|
|
63
106
|
* Core reconciliation used by both the runtime hook and tests. Returns a summary
|
|
64
107
|
* of what was emitted. Never throws.
|
|
@@ -71,6 +114,37 @@ export declare function collectDelegateAcks(params: {
|
|
|
71
114
|
sessionId?: string;
|
|
72
115
|
taskId?: string;
|
|
73
116
|
}): Promise<CollectDelegateAcksResult>;
|
|
117
|
+
export interface CollectLaneDelegateAcksResult extends CollectDelegateAcksResult {
|
|
118
|
+
/**
|
|
119
|
+
* Phases recorded on the lane session's `delegate_directive` memberships
|
|
120
|
+
* (issue #2045). The reviewer verdict reconciliation windows by this phase.
|
|
121
|
+
*/
|
|
122
|
+
phases: string[];
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Lane-side delegate-ack reconciliation (issue #2045). Task delegations are
|
|
126
|
+
* reconciled by the `tool.execute.after` hook; lane outputs never pass through
|
|
127
|
+
* that hook, so this variant derives the proven-shown set from the receipt
|
|
128
|
+
* ledger's session-bound `delegate_directive` memberships — the durable record
|
|
129
|
+
* of exactly what the transform-path injector displayed to the lane session —
|
|
130
|
+
* and runs the SAME shared core. Idempotent per trace: replayed settlements
|
|
131
|
+
* hit the validator's idempotency, never double terminals.
|
|
132
|
+
*
|
|
133
|
+
* `sessionId` MUST be the lane SUBAGENT session id (memberships bind to the
|
|
134
|
+
* child session); a parent-session id queries zero rows by design.
|
|
135
|
+
*/
|
|
136
|
+
export declare function collectLaneDelegateAcks(params: {
|
|
137
|
+
directory: string;
|
|
138
|
+
sessionId: string;
|
|
139
|
+
agent: string;
|
|
140
|
+
transcript: string;
|
|
141
|
+
/**
|
|
142
|
+
* Replay mode (issue #2045 crash recovery): set by the lifecycle module's
|
|
143
|
+
* duplicate-settle path so the ledger-committed receipts still close while
|
|
144
|
+
* the audit-only non-critical observation stays exactly-once-at-emit.
|
|
145
|
+
*/
|
|
146
|
+
replay?: boolean;
|
|
147
|
+
}): Promise<CollectLaneDelegateAcksResult>;
|
|
74
148
|
/**
|
|
75
149
|
* `tool.execute.after` adapter. Reconciles delegate acks for a completed Task.
|
|
76
150
|
*/
|
|
@@ -18,13 +18,24 @@ import type { DirectivePriority, KnowledgeConfig, MessageWithParts } from './kno
|
|
|
18
18
|
import { searchKnowledge } from './search-knowledge.js';
|
|
19
19
|
/** Marker that uniquely identifies the delegate directive block in a transcript. */
|
|
20
20
|
export declare const DELEGATE_DIRECTIVE_BLOCK_TAG = "<delegate_knowledge_directives>";
|
|
21
|
+
/**
|
|
22
|
+
* Issue #2045: hard ceiling for the delegate directive block. The configured
|
|
23
|
+
* `inject_char_budget` (default 2,000) governs the effective budget, but a
|
|
24
|
+
* delegate block may never exceed this cap even when the budget is configured
|
|
25
|
+
* higher — lane and Task delegations share the same bound.
|
|
26
|
+
*/
|
|
27
|
+
export declare const DELEGATE_INJECT_HARD_CHAR_CAP = 2000;
|
|
21
28
|
/**
|
|
22
29
|
* Render a sanitized, deterministic `<delegate_knowledge_directives>` block for
|
|
23
30
|
* a delegated subagent (Change 1, Task 1.3). Entries are sorted by priority
|
|
24
31
|
* (critical first) then ID so the block is stable across runs and prompt caches
|
|
25
32
|
* remain warm. Returns null when there are no entries (no empty wrapper).
|
|
33
|
+
*
|
|
34
|
+
* Issue #2045: `charBudget` (when provided) trims WHOLE records from the end —
|
|
35
|
+
* mirroring the architect block's trim loop — so the delegate injection can
|
|
36
|
+
* never exceed the configured ceiling / hard cap.
|
|
26
37
|
*/
|
|
27
|
-
export declare function buildDelegateDirectiveBlock(entries: RankedEntry[], cfg: KnowledgeConfig, traceId?: string): string | null;
|
|
38
|
+
export declare function buildDelegateDirectiveBlock(entries: RankedEntry[], cfg: KnowledgeConfig, traceId?: string, charBudget?: number): string | null;
|
|
28
39
|
/** A directive that was rendered into a delegate block, recovered by parsing. */
|
|
29
40
|
export interface ShownDelegateDirective {
|
|
30
41
|
id: string;
|