opencode-swarm 7.164.1 → 7.164.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/.opencode/skills/codebase-review-swarm/SKILL.md +4 -0
- package/.opencode/skills/commit-pr/SKILL.md +4 -1
- package/.opencode/skills/critic-gate/SKILL.md +4 -0
- package/.opencode/skills/deep-dive/SKILL.md +4 -0
- package/.opencode/skills/engineering-conventions/SKILL.md +2 -0
- package/.opencode/skills/execute/SKILL.md +4 -0
- package/.opencode/skills/phase-wrap/SKILL.md +4 -0
- package/.opencode/skills/plan/SKILL.md +4 -0
- package/.opencode/skills/running-tests/SKILL.md +4 -0
- package/.opencode/skills/swarm-pr-review/SKILL.md +4 -0
- package/.opencode/skills/swarm-pr-review/references/prompt-templates.md +2 -0
- package/.opencode/skills/writing-tests/SKILL.md +4 -0
- package/dist/agents/critic.d.ts +6 -6
- package/dist/cli/{coder-settlement-w4qk90kh.js → coder-settlement-kv1x94w6.js} +9 -9
- package/dist/cli/{config-doctor-r81bp1nd.js → config-doctor-8d7ydxck.js} +3 -3
- package/dist/cli/{core-xfw4s9b9.js → core-7jjgxczp.js} +2 -2
- package/dist/cli/{curation-policy-2h37sd6p.js → curation-policy-7pnmnfct.js} +5 -5
- package/dist/cli/{curator-7zy6bdmw.js → curator-5nyth2rj.js} +30 -30
- package/dist/cli/{curator-llm-factory-7gjvm4ds.js → curator-llm-factory-d415s169.js} +30 -30
- package/dist/cli/{evidence-summary-service-519ny6b1.js → evidence-summary-service-aebn7nb9.js} +13 -13
- package/dist/cli/{gate-evidence-a7st3vbc.js → gate-evidence-es59pysy.js} +6 -6
- package/dist/cli/{guardrail-explain-ewcm37em.js → guardrail-explain-mn2x7w2y.js} +31 -31
- package/dist/cli/{guardrail-log-kp51by1v.js → guardrail-log-fd3c5rks.js} +7 -7
- package/dist/cli/{guardrail-reset-reyfwtwn.js → guardrail-reset-r49rvptv.js} +30 -30
- package/dist/cli/{hive-promoter-zf2vf5sw.js → hive-promoter-qp2kjhhp.js} +30 -30
- package/dist/cli/{index-dhzsvmx6.js → index-0145kpjr.js} +2 -2
- package/dist/cli/{index-vrxx0ea4.js → index-1r6p1wpa.js} +4 -4
- package/dist/cli/{index-6097tx05.js → index-2xj34nkh.js} +1 -1
- package/dist/cli/{index-r5jn0ah5.js → index-34exj2e3.js} +2 -2
- package/dist/cli/{index-2s40e3b0.js → index-3704v4e6.js} +2 -2
- package/dist/cli/{index-6kd3jnaf.js → index-5d7bzpfn.js} +1 -1
- package/dist/cli/{index-5084szce.js → index-6vtm4rd0.js} +7 -7
- package/dist/cli/{index-hzaw10zh.js → index-92q98ry8.js} +5 -5
- package/dist/cli/{index-j0ajeary.js → index-ac39znep.js} +1 -1
- package/dist/cli/{index-b98r3pyv.js → index-axtnc0xf.js} +4 -4
- package/dist/cli/{index-h2f21caa.js → index-b85jnfp4.js} +2 -2
- package/dist/cli/{index-jczbtx2x.js → index-br7q79t2.js} +6 -6
- package/dist/cli/{index-1b1h770t.js → index-bzd67m2j.js} +3 -3
- package/dist/cli/{index-x2qmpkth.js → index-c8k4cs94.js} +3 -3
- package/dist/cli/{index-644t46hr.js → index-cm4r8gh2.js} +1 -1
- package/dist/cli/{index-pmmfhzsp.js → index-fyt5byhd.js} +3 -3
- package/dist/cli/{index-1af3rb5n.js → index-gz5rn6w6.js} +8 -8
- package/dist/cli/{index-n1wcq816.js → index-h9wnkr2e.js} +4 -4
- package/dist/cli/{index-yc415pzf.js → index-hnwg5gt6.js} +3 -3
- package/dist/cli/{index-vc3zmtxb.js → index-jw9wbwdh.js} +32 -32
- package/dist/cli/{index-e630pvvw.js → index-kwd09y5a.js} +3 -3
- package/dist/cli/{index-2yd732fd.js → index-m1nrd3yd.js} +2 -1
- package/dist/cli/{index-fwfhbs27.js → index-pcnhh2vt.js} +2 -2
- package/dist/cli/{index-wnf1ej2q.js → index-q3xn3m3g.js} +4 -4
- package/dist/cli/{index-wv4b01ex.js → index-qmeewt3g.js} +4 -4
- package/dist/cli/{index-k8j7m0e2.js → index-sb4eanpv.js} +1 -1
- package/dist/cli/{index-vkckf2ch.js → index-w5jpjaqe.js} +2 -2
- package/dist/cli/{index-vdgw2k4c.js → index-w8qt2612.js} +3 -3
- package/dist/cli/{index-862c0xhc.js → index-xm6c1tnf.js} +1 -1
- package/dist/cli/{index-36nt17m8.js → index-yep24wn4.js} +1 -1
- package/dist/cli/{index-2ee2g27m.js → index-yjftcanv.js} +404 -119
- package/dist/cli/{index-6ay5zp1v.js → index-yqhwrjw9.js} +5 -5
- package/dist/cli/{index-5bza8nxz.js → index-zgeqwbhw.js} +2 -2
- package/dist/cli/{index-6t35714n.js → index-zs1jrsta.js} +1 -1
- package/dist/cli/index.js +30 -30
- package/dist/cli/{knowledge-escalator-wwkbsgvw.js → knowledge-escalator-439jajb3.js} +12 -12
- package/dist/cli/{knowledge-events-vmmgwfmc.js → knowledge-events-wz3h98kk.js} +10 -10
- package/dist/cli/{knowledge-link-bvra01zv.js → knowledge-link-2gh1cnk3.js} +4 -4
- package/dist/cli/{knowledge-store-6wbagbqm.js → knowledge-store-y1cwe80n.js} +5 -5
- package/dist/cli/{knowledge-validator-q1z4fmeg.js → knowledge-validator-bk2qfqe2.js} +7 -7
- package/dist/cli/{model-preflight-1ecjbg73.js → model-preflight-pmnbfzjv.js} +1 -1
- package/dist/cli/{pending-delegations-cq5g4rr4.js → pending-delegations-kh4mkvzb.js} +4 -4
- package/dist/cli/{pr-subscriptions-m0z5wxkb.js → pr-subscriptions-sdv0n59c.js} +4 -4
- package/dist/cli/{pr-workflow-gate-0zvp0qs9.js → pr-workflow-gate-a9vj11e5.js} +30 -30
- package/dist/cli/{runner-s55g5233.js → runner-m95v9d47.js} +5 -5
- package/dist/cli/{scan-cursor-z6zepy3r.js → scan-cursor-pjek24k7.js} +6 -6
- package/dist/cli/{schema-skf0ckh4.js → schema-674qw3aj.js} +2 -2
- package/dist/cli/{scope-persistence-f6davq7x.js → scope-persistence-sq331eqh.js} +9 -9
- package/dist/cli/{skill-generator-wqbazppk.js → skill-generator-pcw7c50r.js} +14 -14
- package/dist/cli/{telemetry-q51s6tyt.js → telemetry-c4j18da8.js} +1 -1
- package/dist/cli/{worktree-collision-ownership-c0030qbm.js → worktree-collision-ownership-vnj31rgc.js} +4 -4
- package/dist/cli/{worktree-isolation-09qq8066.js → worktree-isolation-tje6p4zt.js} +30 -30
- package/dist/hooks/delegate-ack-collector.d.ts +5 -0
- package/dist/hooks/delegation-gate.d.ts +13 -2
- package/dist/hooks/plan-task-id-context.d.ts +24 -0
- package/dist/hooks/skill-injection.d.ts +7 -3
- package/dist/hooks/skill-propagation-gate.d.ts +1 -1
- package/dist/hooks/task-id-resolver.d.ts +46 -0
- package/dist/index.js +73 -48
- package/dist/tools/tool-metadata.d.ts +1 -1
- package/opencode-swarm.schema.json +4 -1
- package/package.json +1 -1
|
@@ -21,64 +21,64 @@ 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-yjftcanv.js";
|
|
25
|
+
import"./index-2xj34nkh.js";
|
|
26
|
+
import"./index-qmeewt3g.js";
|
|
27
|
+
import"./index-34exj2e3.js";
|
|
28
|
+
import"./index-6vtm4rd0.js";
|
|
29
|
+
import"./index-w5jpjaqe.js";
|
|
30
30
|
import"./index-txdagbh7.js";
|
|
31
31
|
import"./index-3146wmgv.js";
|
|
32
|
-
import"./index-
|
|
33
|
-
import"./index-
|
|
34
|
-
import"./index-
|
|
32
|
+
import"./index-kwd09y5a.js";
|
|
33
|
+
import"./index-yqhwrjw9.js";
|
|
34
|
+
import"./index-b85jnfp4.js";
|
|
35
35
|
import"./index-70ha9e09.js";
|
|
36
36
|
import"./index-y2f5s2cf.js";
|
|
37
37
|
import"./index-hcn69kp0.js";
|
|
38
38
|
import"./index-zaab1wz9.js";
|
|
39
|
-
import"./index-
|
|
39
|
+
import"./index-c8k4cs94.js";
|
|
40
40
|
import"./index-zsrtt42s.js";
|
|
41
|
-
import"./index-
|
|
41
|
+
import"./index-92q98ry8.js";
|
|
42
42
|
import"./index-3f7hqtgg.js";
|
|
43
43
|
import"./index-qbr05tbw.js";
|
|
44
|
-
import"./index-
|
|
45
|
-
import"./index-
|
|
44
|
+
import"./index-q3xn3m3g.js";
|
|
45
|
+
import"./index-sb4eanpv.js";
|
|
46
46
|
import"./index-rtry5xyf.js";
|
|
47
|
-
import"./index-
|
|
48
|
-
import"./index-
|
|
49
|
-
import"./index-
|
|
47
|
+
import"./index-h9wnkr2e.js";
|
|
48
|
+
import"./index-zgeqwbhw.js";
|
|
49
|
+
import"./index-hnwg5gt6.js";
|
|
50
50
|
import"./index-ddszzne4.js";
|
|
51
|
-
import"./index-
|
|
52
|
-
import"./index-
|
|
53
|
-
import"./index-
|
|
51
|
+
import"./index-axtnc0xf.js";
|
|
52
|
+
import"./index-w8qt2612.js";
|
|
53
|
+
import"./index-0145kpjr.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-br7q79t2.js";
|
|
59
|
+
import"./index-gz5rn6w6.js";
|
|
60
60
|
import {
|
|
61
61
|
resolveWorktreeIsolationConfig
|
|
62
|
-
} from "./index-
|
|
62
|
+
} from "./index-fyt5byhd.js";
|
|
63
63
|
import"./index-zg9d392c.js";
|
|
64
64
|
import"./index-n832052r.js";
|
|
65
65
|
import"./index-v56mhyhs.js";
|
|
66
66
|
import"./index-z6xqpmqg.js";
|
|
67
67
|
import"./index-r3mvsbtq.js";
|
|
68
|
-
import"./index-
|
|
69
|
-
import"./index-
|
|
68
|
+
import"./index-xm6c1tnf.js";
|
|
69
|
+
import"./index-3704v4e6.js";
|
|
70
70
|
import"./index-9e6fdz2h.js";
|
|
71
71
|
import"./index-4rhhvd1a.js";
|
|
72
|
-
import"./index-
|
|
73
|
-
import"./index-
|
|
72
|
+
import"./index-ac39znep.js";
|
|
73
|
+
import"./index-m1nrd3yd.js";
|
|
74
74
|
import"./index-zjygnfay.js";
|
|
75
75
|
import"./index-ae75rja9.js";
|
|
76
|
-
import"./index-
|
|
77
|
-
import"./index-
|
|
76
|
+
import"./index-5d7bzpfn.js";
|
|
77
|
+
import"./index-zs1jrsta.js";
|
|
78
78
|
import"./index-bk5tah7q.js";
|
|
79
|
-
import"./index-
|
|
79
|
+
import"./index-yep24wn4.js";
|
|
80
80
|
import"./index-f9nfknjg.js";
|
|
81
|
-
import"./index-
|
|
81
|
+
import"./index-bzd67m2j.js";
|
|
82
82
|
import"./index-7g4c7s5r.js";
|
|
83
83
|
import"./index-bpmtbmy9.js";
|
|
84
84
|
import"./index-zgwm4ryv.js";
|
|
@@ -27,6 +27,7 @@
|
|
|
27
27
|
* durable `delegate_directive` memberships) and Task collections share ONE
|
|
28
28
|
* implementation — not a second lifecycle copy.
|
|
29
29
|
*/
|
|
30
|
+
import { type TaskIdResolution } from './task-id-resolver.js';
|
|
30
31
|
export interface DelegateAckInput {
|
|
31
32
|
tool: unknown;
|
|
32
33
|
agent?: unknown;
|
|
@@ -36,6 +37,8 @@ export interface DelegateAckInput {
|
|
|
36
37
|
export interface DelegateAckOutput {
|
|
37
38
|
output?: unknown;
|
|
38
39
|
}
|
|
40
|
+
/** Best-effort extraction of a task id from a delegation prompt envelope. */
|
|
41
|
+
export declare function resolveDelegateAckTaskId(args: Record<string, unknown>, knownPlanTaskIds?: ReadonlySet<string>, planContextOverLimit?: boolean): string | undefined;
|
|
39
42
|
export interface CollectDelegateAcksResult {
|
|
40
43
|
emitted: Array<{
|
|
41
44
|
id: string;
|
|
@@ -113,6 +116,8 @@ export declare function collectDelegateAcks(params: {
|
|
|
113
116
|
agent: string;
|
|
114
117
|
sessionId?: string;
|
|
115
118
|
taskId?: string;
|
|
119
|
+
/** A caller-owned resolution attempt; non-resolved states forbid reparsing. */
|
|
120
|
+
taskIdResolution?: TaskIdResolution;
|
|
116
121
|
}): Promise<CollectDelegateAcksResult>;
|
|
117
122
|
export interface CollectLaneDelegateAcksResult extends CollectDelegateAcksResult {
|
|
118
123
|
/**
|
|
@@ -11,6 +11,9 @@ import { type QaGates } from '../db/qa-gate-profile.js';
|
|
|
11
11
|
import { loadPlanJsonOnly } from '../plan/manager';
|
|
12
12
|
import type { AgentSessionState } from '../state';
|
|
13
13
|
import type { DelegationEnvelope, EnvelopeValidationResult } from '../types/delegation.js';
|
|
14
|
+
import { type PlanTaskIdContext } from './plan-task-id-context.js';
|
|
15
|
+
import { resolveDelegatedPlanTaskId } from './task-id-resolver.js';
|
|
16
|
+
export { resolveDelegatedPlanTaskId } from './task-id-resolver.js';
|
|
14
17
|
import { resetStandardWorktreeIsolationState } from './delegation-gate/worktree-isolation';
|
|
15
18
|
export { resetStandardWorktreeIsolationState };
|
|
16
19
|
import { _internals as _wtiInternals } from './delegation-gate/worktree-isolation';
|
|
@@ -351,6 +354,14 @@ interface MessageWithParts {
|
|
|
351
354
|
info: MessageInfo;
|
|
352
355
|
parts: MessagePart[];
|
|
353
356
|
}
|
|
357
|
+
/**
|
|
358
|
+
* Extracts a plan task ID (N.M or N.M.P format) from text.
|
|
359
|
+
* Checks for:
|
|
360
|
+
* 1. Task IDs in task list format: "- [ ] 1.1: ..." or "- [x] 1.1: ..."
|
|
361
|
+
* 2. Standalone task IDs like "1.1" or "1.2.3" near the TASK: line
|
|
362
|
+
* Returns the plan task ID if found, otherwise null.
|
|
363
|
+
*/
|
|
364
|
+
declare function extractPlanTaskId(text: string): string | null;
|
|
354
365
|
declare function extractPlanCriticVerdict(output: unknown): 'APPROVED' | 'NEEDS_REVISION' | 'REJECTED' | null;
|
|
355
366
|
/**
|
|
356
367
|
* Returns whether the plan in the given directory has a valid plan-critic
|
|
@@ -407,7 +418,6 @@ export declare function forceRecordPlanCriticApproval(directory: string, session
|
|
|
407
418
|
reason?: string;
|
|
408
419
|
userConfirmed: boolean;
|
|
409
420
|
}>;
|
|
410
|
-
export declare function resolveDelegatedPlanTaskId(args: Record<string, unknown>, knownPlanTaskIds?: ReadonlySet<string>): string | null;
|
|
411
421
|
/**
|
|
412
422
|
* Builds a cause-specific diagnostic for `prepareCoderScope`'s SCOPE_NOT_DECLARED
|
|
413
423
|
* throw when `resolveDelegatedPlanTaskId` returns null. Re-runs extraction with
|
|
@@ -418,7 +428,7 @@ export declare function resolveDelegatedPlanTaskId(args: Record<string, unknown>
|
|
|
418
428
|
* latency, and does NOT handle plan-task-shaped-but-unknown ids (those are
|
|
419
429
|
* rejected by the membership gate in prepareCoderScope with their own message).
|
|
420
430
|
*/
|
|
421
|
-
declare function describeCoderScopeFailure(args: Record<string, unknown>,
|
|
431
|
+
declare function describeCoderScopeFailure(args: Record<string, unknown>, planTaskIdContext: PlanTaskIdContext): string;
|
|
422
432
|
type FileDirectiveExtractionMode = 'enforce' | 'observe';
|
|
423
433
|
declare function extractTaskFileDirectives(args: Record<string, unknown>, mode?: FileDirectiveExtractionMode): {
|
|
424
434
|
present: boolean;
|
|
@@ -493,6 +503,7 @@ export declare const _internals: {
|
|
|
493
503
|
resetStandardWorktreeIsolationState: typeof resetStandardWorktreeIsolationState;
|
|
494
504
|
PLAN_CRITIC_TASK_SIGNALS: readonly ["critic-gate", "plan critic", "review plan", "review the plan", "plan.md", "approve the plan", "plan approval", "pre-implementation review", "evaluate this plan", "evaluate the plan", "assess this plan", "assess the plan", "plan soundness", "before implementation", "review the plan below"];
|
|
495
505
|
extractPlanCriticVerdict: typeof extractPlanCriticVerdict;
|
|
506
|
+
extractPlanTaskId: typeof extractPlanTaskId;
|
|
496
507
|
forceRecordPlanCriticApproval: typeof forceRecordPlanCriticApproval;
|
|
497
508
|
beforePrFeedbackScopeConsume: (() => Promise<void>) | undefined;
|
|
498
509
|
provisionWorktree: typeof _wtiInternals.provisionWorktree;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { type TaskIdPlanContextOptions } from './task-id-resolver.js';
|
|
2
|
+
export type PlanTaskIdContext = {
|
|
3
|
+
status: 'available';
|
|
4
|
+
taskIds: ReadonlySet<string>;
|
|
5
|
+
} | {
|
|
6
|
+
status: 'unavailable';
|
|
7
|
+
} | {
|
|
8
|
+
status: 'over_limit';
|
|
9
|
+
};
|
|
10
|
+
/** Traverse plan phases without first materializing an unbounded flat task list. */
|
|
11
|
+
export declare function collectPlanTaskIdContextFromPhases(phases: ReadonlyArray<{
|
|
12
|
+
tasks?: ReadonlyArray<{
|
|
13
|
+
id?: string;
|
|
14
|
+
} | null> | null;
|
|
15
|
+
} | null | undefined>): PlanTaskIdContext;
|
|
16
|
+
/**
|
|
17
|
+
* Best-effort caller-side plan context for the pure task-ID resolver.
|
|
18
|
+
* Missing/corrupt plans remain distinguishable from valid plans whose task-ID
|
|
19
|
+
* cardinality exceeds the resolver bound. Callers must preserve that distinction
|
|
20
|
+
* so numeric IDs never become unfiltered when a plan is merely too large.
|
|
21
|
+
*/
|
|
22
|
+
export declare function loadPlanTaskIdContext(directory: string): Promise<PlanTaskIdContext>;
|
|
23
|
+
/** Convert a typed loader result into the resolver's bounded plan context. */
|
|
24
|
+
export declare function toTaskIdPlanContextOptions(context: PlanTaskIdContext): TaskIdPlanContextOptions;
|
|
@@ -15,9 +15,9 @@
|
|
|
15
15
|
* the three other recording sites in `skill-propagation-gate.ts`, (b) broke
|
|
16
16
|
* the SKILL_COMPLIANCE round-trip join except by coincidence, and (c)
|
|
17
17
|
* inflated frequency / taskID-diversity scoring. The fallback is
|
|
18
|
-
* `'auto-injected'`
|
|
19
|
-
*
|
|
20
|
-
*
|
|
18
|
+
* `'auto-injected'` to preserve a stable local audit ID for the injection
|
|
19
|
+
* entry; reviewer compliance attribution still requires an explicit TASK
|
|
20
|
+
* marker and otherwise fails closed as `'unknown'`.
|
|
21
21
|
*
|
|
22
22
|
* 2. Observability — a `skill_injection_decision` event is emitted to
|
|
23
23
|
* `.swarm/events.jsonl` for BOTH the qualified-injection and the
|
|
@@ -40,6 +40,10 @@ export interface RecommendedSkill {
|
|
|
40
40
|
export interface SkillInjectionOptions {
|
|
41
41
|
/** When true, suppresses console.warn output (does not affect event emission). */
|
|
42
42
|
quiet?: boolean;
|
|
43
|
+
/** Caller-loaded finite plan IDs for plan-aware attribution. */
|
|
44
|
+
knownPlanTaskIds?: ReadonlySet<string>;
|
|
45
|
+
/** The caller observed a valid plan whose task-ID cardinality exceeded the bound. */
|
|
46
|
+
planContextOverLimit?: boolean;
|
|
43
47
|
}
|
|
44
48
|
/** Result of an injection attempt. */
|
|
45
49
|
export interface SkillInjectionResult {
|
|
@@ -160,7 +160,7 @@ export declare function validateExplicitSkillReferencesBefore(directory: string,
|
|
|
160
160
|
* Looks for patterns like "taskId: <id>" or "TASK: <id>" (case-insensitive).
|
|
161
161
|
* Returns "unknown" when no pattern is found.
|
|
162
162
|
*/
|
|
163
|
-
export declare function extractTaskIdFromPrompt(prompt: string): string;
|
|
163
|
+
export declare function extractTaskIdFromPrompt(prompt: string, knownPlanTaskIds?: ReadonlySet<string>, planContextOverLimit?: boolean): string;
|
|
164
164
|
/**
|
|
165
165
|
* Pre-tool gate. When the architect delegates via Task tool to a skill-capable
|
|
166
166
|
* agent and the SKILLS field is missing or 'none' while skills exist in the
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Pure, bounded task-identity resolution shared by delegation hooks.
|
|
3
|
+
*
|
|
4
|
+
* This leaf deliberately performs no I/O and imports no plan, hook, or tool
|
|
5
|
+
* modules. Callers own plan loading and may supply only finite known IDs and an
|
|
6
|
+
* optional fallback whose uniqueness they have already proved.
|
|
7
|
+
*/
|
|
8
|
+
export declare const TASK_ID_RESOLUTION_LIMITS: {
|
|
9
|
+
readonly maxFields: 4;
|
|
10
|
+
readonly maxFieldChars: number;
|
|
11
|
+
readonly maxTotalChars: number;
|
|
12
|
+
readonly maxKnownIds: 1024;
|
|
13
|
+
readonly maxCandidates: 32;
|
|
14
|
+
readonly maxTokenChars: 80;
|
|
15
|
+
};
|
|
16
|
+
export type TaskIdPolicy = 'plan' | 'attribution';
|
|
17
|
+
export type TaskIdSource = 'explicit' | 'task_line' | 'text' | 'marker' | 'fallback';
|
|
18
|
+
export type TaskIdResolution = {
|
|
19
|
+
status: 'resolved';
|
|
20
|
+
taskId: string;
|
|
21
|
+
source: TaskIdSource;
|
|
22
|
+
} | {
|
|
23
|
+
status: 'missing';
|
|
24
|
+
} | {
|
|
25
|
+
status: 'ambiguous';
|
|
26
|
+
candidates: string[];
|
|
27
|
+
} | {
|
|
28
|
+
status: 'over_limit';
|
|
29
|
+
input: string;
|
|
30
|
+
} | {
|
|
31
|
+
status: 'invalid';
|
|
32
|
+
input: string;
|
|
33
|
+
};
|
|
34
|
+
export interface ResolveTaskIdOptions {
|
|
35
|
+
policy: TaskIdPolicy;
|
|
36
|
+
knownPlanTaskIds?: ReadonlySet<string>;
|
|
37
|
+
/** The caller observed a valid plan whose task-ID cardinality exceeded the bound. */
|
|
38
|
+
planContextOverLimit?: boolean;
|
|
39
|
+
fallback?: string;
|
|
40
|
+
fallbackProvenUnique?: boolean;
|
|
41
|
+
}
|
|
42
|
+
export type TaskIdPlanContextOptions = Pick<ResolveTaskIdOptions, 'knownPlanTaskIds' | 'planContextOverLimit'>;
|
|
43
|
+
/** Resolve a task identity without I/O or mutable session state. */
|
|
44
|
+
export declare function resolveTaskId(input: Record<string, unknown>, options: ResolveTaskIdOptions): TaskIdResolution;
|
|
45
|
+
/** Backward-compatible delegation API backed by the bounded plan policy. */
|
|
46
|
+
export declare function resolveDelegatedPlanTaskId(args: Record<string, unknown>, planContext?: ReadonlySet<string> | TaskIdPlanContextOptions): string | null;
|