funolio-agent 1.0.75 → 1.1.65
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/auth/credential-reader.d.ts.map +1 -1
- package/dist/auth/credential-reader.js +4 -3
- package/dist/auth/credential-reader.js.map +1 -1
- package/dist/auth/token-refresh.d.ts +8 -0
- package/dist/auth/token-refresh.d.ts.map +1 -1
- package/dist/auth/token-refresh.js +82 -52
- package/dist/auth/token-refresh.js.map +1 -1
- package/dist/auto-organizer.d.ts.map +1 -1
- package/dist/auto-organizer.js +6 -7
- package/dist/auto-organizer.js.map +1 -1
- package/dist/bench-prefix.d.ts +16 -0
- package/dist/bench-prefix.d.ts.map +1 -0
- package/dist/bench-prefix.js +25 -0
- package/dist/bench-prefix.js.map +1 -0
- package/dist/bot-manager.d.ts.map +1 -1
- package/dist/bot-manager.js +23 -14
- package/dist/bot-manager.js.map +1 -1
- package/dist/chat-sync.d.ts +42 -0
- package/dist/chat-sync.d.ts.map +1 -0
- package/dist/chat-sync.js +95 -0
- package/dist/chat-sync.js.map +1 -0
- package/dist/clerk-model.d.ts +7 -0
- package/dist/clerk-model.d.ts.map +1 -1
- package/dist/clerk-model.js +42 -8
- package/dist/clerk-model.js.map +1 -1
- package/dist/cli-bootstrap-history.d.ts +10 -0
- package/dist/cli-bootstrap-history.d.ts.map +1 -0
- package/dist/cli-bootstrap-history.js +112 -0
- package/dist/cli-bootstrap-history.js.map +1 -0
- package/dist/cli-models.d.ts +8 -0
- package/dist/cli-models.d.ts.map +1 -0
- package/dist/cli-models.js +91 -0
- package/dist/cli-models.js.map +1 -0
- package/dist/cli-session-epoch.d.ts +13 -3
- package/dist/cli-session-epoch.d.ts.map +1 -1
- package/dist/cli-session-epoch.js +53 -4
- package/dist/cli-session-epoch.js.map +1 -1
- package/dist/codex-app-server-manager.d.ts +64 -4
- package/dist/codex-app-server-manager.d.ts.map +1 -1
- package/dist/codex-app-server-manager.js +755 -55
- package/dist/codex-app-server-manager.js.map +1 -1
- package/dist/commands/pool.d.ts +32 -0
- package/dist/commands/pool.d.ts.map +1 -1
- package/dist/commands/pool.js +145 -66
- package/dist/commands/pool.js.map +1 -1
- package/dist/commands/start.d.ts +21 -0
- package/dist/commands/start.d.ts.map +1 -1
- package/dist/commands/start.js +484 -63
- package/dist/commands/start.js.map +1 -1
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +5 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/config.d.ts +1 -0
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +170 -58
- package/dist/config.js.map +1 -1
- package/dist/context-window.d.ts +37 -1
- package/dist/context-window.d.ts.map +1 -1
- package/dist/context-window.js +202 -16
- package/dist/context-window.js.map +1 -1
- package/dist/live-activity.d.ts +3 -1
- package/dist/live-activity.d.ts.map +1 -1
- package/dist/live-activity.js.map +1 -1
- package/dist/local-chat-execution.d.ts +114 -0
- package/dist/local-chat-execution.d.ts.map +1 -0
- package/dist/local-chat-execution.js +349 -0
- package/dist/local-chat-execution.js.map +1 -0
- package/dist/local-cli-pty-manager.d.ts +138 -3
- package/dist/local-cli-pty-manager.d.ts.map +1 -1
- package/dist/local-cli-pty-manager.js +1415 -111
- package/dist/local-cli-pty-manager.js.map +1 -1
- package/dist/local-conversation-gateway.d.ts +110 -0
- package/dist/local-conversation-gateway.d.ts.map +1 -0
- package/dist/local-conversation-gateway.js +175 -0
- package/dist/local-conversation-gateway.js.map +1 -0
- package/dist/local-data.d.ts +235 -5
- package/dist/local-data.d.ts.map +1 -1
- package/dist/local-data.js +1066 -87
- package/dist/local-data.js.map +1 -1
- package/dist/local-db.d.ts +6 -0
- package/dist/local-db.d.ts.map +1 -1
- package/dist/local-db.js +376 -4
- package/dist/local-db.js.map +1 -1
- package/dist/local-funnel.d.ts.map +1 -1
- package/dist/local-funnel.js +6 -5
- package/dist/local-funnel.js.map +1 -1
- package/dist/local-server.d.ts +30 -0
- package/dist/local-server.d.ts.map +1 -1
- package/dist/local-server.js +2898 -319
- package/dist/local-server.js.map +1 -1
- package/dist/managed-process-registry.d.ts +59 -0
- package/dist/managed-process-registry.d.ts.map +1 -0
- package/dist/managed-process-registry.js +390 -0
- package/dist/managed-process-registry.js.map +1 -0
- package/dist/mcp/claude-config-writer.d.ts +5 -5
- package/dist/mcp/claude-config-writer.d.ts.map +1 -1
- package/dist/mcp/claude-config-writer.js +19 -11
- package/dist/mcp/claude-config-writer.js.map +1 -1
- package/dist/mcp/index.d.ts +4 -2
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js.map +1 -1
- package/dist/mcp/sync-cli-config.d.ts +42 -4
- package/dist/mcp/sync-cli-config.d.ts.map +1 -1
- package/dist/mcp/sync-cli-config.js +497 -17
- package/dist/mcp/sync-cli-config.js.map +1 -1
- package/dist/message-loop.d.ts.map +1 -1
- package/dist/message-loop.js +43 -1
- package/dist/message-loop.js.map +1 -1
- package/dist/mqtt-client.d.ts +34 -0
- package/dist/mqtt-client.d.ts.map +1 -1
- package/dist/mqtt-client.js +270 -45
- package/dist/mqtt-client.js.map +1 -1
- package/dist/mqtt-data-relay.d.ts +44 -0
- package/dist/mqtt-data-relay.d.ts.map +1 -0
- package/dist/mqtt-data-relay.js +106 -0
- package/dist/mqtt-data-relay.js.map +1 -0
- package/dist/orchestration/capabilities.d.ts +13 -0
- package/dist/orchestration/capabilities.d.ts.map +1 -0
- package/dist/orchestration/capabilities.js +152 -0
- package/dist/orchestration/capabilities.js.map +1 -0
- package/dist/orchestration/dispatch-executor.d.ts +83 -0
- package/dist/orchestration/dispatch-executor.d.ts.map +1 -0
- package/dist/orchestration/dispatch-executor.js +266 -0
- package/dist/orchestration/dispatch-executor.js.map +1 -0
- package/dist/orchestration/dispatch-hint.d.ts +134 -0
- package/dist/orchestration/dispatch-hint.d.ts.map +1 -0
- package/dist/orchestration/dispatch-hint.js +247 -0
- package/dist/orchestration/dispatch-hint.js.map +1 -0
- package/dist/orchestration/dispatch-runner.d.ts +106 -0
- package/dist/orchestration/dispatch-runner.d.ts.map +1 -0
- package/dist/orchestration/dispatch-runner.js +604 -0
- package/dist/orchestration/dispatch-runner.js.map +1 -0
- package/dist/orchestration/dispatch-tools.d.ts +167 -0
- package/dist/orchestration/dispatch-tools.d.ts.map +1 -0
- package/dist/orchestration/dispatch-tools.js +328 -0
- package/dist/orchestration/dispatch-tools.js.map +1 -0
- package/dist/orchestration/front-door-policy.d.ts +35 -10
- package/dist/orchestration/front-door-policy.d.ts.map +1 -1
- package/dist/orchestration/front-door-policy.js +30 -267
- package/dist/orchestration/front-door-policy.js.map +1 -1
- package/dist/orchestration/orchestrator-dispatch-prompt.d.ts +43 -0
- package/dist/orchestration/orchestrator-dispatch-prompt.d.ts.map +1 -0
- package/dist/orchestration/orchestrator-dispatch-prompt.js +267 -0
- package/dist/orchestration/orchestrator-dispatch-prompt.js.map +1 -0
- package/dist/orchestration/orchestrator-operating-prompt.d.ts +14 -0
- package/dist/orchestration/orchestrator-operating-prompt.d.ts.map +1 -1
- package/dist/orchestration/orchestrator-operating-prompt.js +157 -31
- package/dist/orchestration/orchestrator-operating-prompt.js.map +1 -1
- package/dist/orchestration/plan-import.d.ts +39 -0
- package/dist/orchestration/plan-import.d.ts.map +1 -0
- package/dist/orchestration/plan-import.js +547 -0
- package/dist/orchestration/plan-import.js.map +1 -0
- package/dist/orchestration/worker-operating-prompt.d.ts +2 -0
- package/dist/orchestration/worker-operating-prompt.d.ts.map +1 -1
- package/dist/orchestration/worker-operating-prompt.js +36 -46
- package/dist/orchestration/worker-operating-prompt.js.map +1 -1
- package/dist/orchestrator.d.ts +195 -3
- package/dist/orchestrator.d.ts.map +1 -1
- package/dist/orchestrator.js +1970 -432
- package/dist/orchestrator.js.map +1 -1
- package/dist/providers/anthropic.d.ts.map +1 -1
- package/dist/providers/anthropic.js +8 -4
- package/dist/providers/anthropic.js.map +1 -1
- package/dist/providers/claude-cli.d.ts.map +1 -1
- package/dist/providers/claude-cli.js +28 -3
- package/dist/providers/claude-cli.js.map +1 -1
- package/dist/providers/codex-cli.d.ts +10 -6
- package/dist/providers/codex-cli.d.ts.map +1 -1
- package/dist/providers/codex-cli.js +190 -17
- package/dist/providers/codex-cli.js.map +1 -1
- package/dist/providers/google.d.ts.map +1 -1
- package/dist/providers/google.js +15 -5
- package/dist/providers/google.js.map +1 -1
- package/dist/providers/index.d.ts +15 -1
- package/dist/providers/index.d.ts.map +1 -1
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/openai.d.ts +1 -1
- package/dist/providers/openai.d.ts.map +1 -1
- package/dist/providers/openai.js +13 -5
- package/dist/providers/openai.js.map +1 -1
- package/dist/server-adapter.d.ts +8 -0
- package/dist/server-adapter.d.ts.map +1 -1
- package/dist/server-adapter.js +7 -0
- package/dist/server-adapter.js.map +1 -1
- package/dist/service-mode.d.ts +1 -1
- package/dist/service-mode.d.ts.map +1 -1
- package/dist/service-mode.js +64 -1
- package/dist/service-mode.js.map +1 -1
- package/dist/service-setup-only.d.ts +8 -0
- package/dist/service-setup-only.d.ts.map +1 -0
- package/dist/service-setup-only.js +37 -0
- package/dist/service-setup-only.js.map +1 -0
- package/dist/slash-commands.d.ts +21 -0
- package/dist/slash-commands.d.ts.map +1 -0
- package/dist/slash-commands.js +99 -0
- package/dist/slash-commands.js.map +1 -0
- package/dist/subagent/index.d.ts +4 -2
- package/dist/subagent/index.d.ts.map +1 -1
- package/dist/subagent/index.js.map +1 -1
- package/dist/summarization-pipeline.d.ts.map +1 -1
- package/dist/summarization-pipeline.js +1 -9
- package/dist/summarization-pipeline.js.map +1 -1
- package/dist/token-counter.d.ts.map +1 -1
- package/dist/token-counter.js +11 -4
- package/dist/token-counter.js.map +1 -1
- package/dist/tool-filter.d.ts.map +1 -1
- package/dist/tool-filter.js +10 -6
- package/dist/tool-filter.js.map +1 -1
- package/dist/tools/admin-tools.d.ts.map +1 -1
- package/dist/tools/admin-tools.js +13 -4
- package/dist/tools/admin-tools.js.map +1 -1
- package/dist/tools/run-command.d.ts.map +1 -1
- package/dist/tools/run-command.js +5 -1
- package/dist/tools/run-command.js.map +1 -1
- package/dist/tools/search-conversation-history.d.ts.map +1 -1
- package/dist/tools/search-conversation-history.js +12 -2
- package/dist/tools/search-conversation-history.js.map +1 -1
- package/dist/tools/todo-tasks.d.ts.map +1 -1
- package/dist/tools/todo-tasks.js +77 -5
- package/dist/tools/todo-tasks.js.map +1 -1
- package/dist/usage-log.d.ts +62 -0
- package/dist/usage-log.d.ts.map +1 -0
- package/dist/usage-log.js +98 -0
- package/dist/usage-log.js.map +1 -0
- package/dist/wizard-state.d.ts +13 -0
- package/dist/wizard-state.d.ts.map +1 -1
- package/dist/wizard-state.js +61 -3
- package/dist/wizard-state.js.map +1 -1
- package/dist/wizard-support.d.ts.map +1 -1
- package/dist/wizard-support.js +27 -1
- package/dist/wizard-support.js.map +1 -1
- package/dist/workflow-engine.d.ts +40 -1
- package/dist/workflow-engine.d.ts.map +1 -1
- package/dist/workflow-engine.js +753 -93
- package/dist/workflow-engine.js.map +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,134 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestration dispatch hint builder (Phase A — dead code).
|
|
3
|
+
*
|
|
4
|
+
* Per orchestration-plan.txt Decision 5, the orchestrator LLM receives a
|
|
5
|
+
* structured JSON context block every turn. This module is a PURE function
|
|
6
|
+
* that produces that block from conversation + bot + project state.
|
|
7
|
+
*
|
|
8
|
+
* Two tiers:
|
|
9
|
+
* - Tier 1 (essential facts): user_prompt, conversation, available_bots,
|
|
10
|
+
* existing_todos, effective_policy
|
|
11
|
+
* - Tier 2 (advisory hints): candidate_roles_detected, candidate_bots,
|
|
12
|
+
* suggested_mode, reasoning
|
|
13
|
+
*
|
|
14
|
+
* Tier 2 replaces what the regex dispatchers used to do AUTHORITATIVELY.
|
|
15
|
+
* Now it is ADVISORY — the LLM can accept, override, or ignore it.
|
|
16
|
+
*
|
|
17
|
+
* Implementation guardrails (Codex 2026-04-18 review):
|
|
18
|
+
* - Hint size is bounded (Guardrail #5). TODO count caps, per-field char
|
|
19
|
+
* caps, recent_summary + effective_policy length caps.
|
|
20
|
+
* - Advisory helpers are PURE — they accept inputs and return data; no
|
|
21
|
+
* side effects, no class dependencies. Easy to unit-test in isolation.
|
|
22
|
+
* - `project_folder` is INCLUDED by design (Decision 5); callers running
|
|
23
|
+
* through an API provider should treat this as documented behavior.
|
|
24
|
+
*/
|
|
25
|
+
import * as data from '../local-data';
|
|
26
|
+
export declare const HINT_BUDGETS: {
|
|
27
|
+
readonly MAX_TODOS: 30;
|
|
28
|
+
readonly MAX_TODO_TITLE_CHARS: 200;
|
|
29
|
+
readonly MAX_TODO_DETAILS_CHARS: 200;
|
|
30
|
+
readonly MAX_RECENT_SUMMARY_CHARS: 2000;
|
|
31
|
+
readonly MAX_RECENT_TURNS_CHARS: 6000;
|
|
32
|
+
readonly MAX_EFFECTIVE_POLICY_CHARS: 1000;
|
|
33
|
+
};
|
|
34
|
+
export interface HintBotEntry {
|
|
35
|
+
name: string;
|
|
36
|
+
provider: string;
|
|
37
|
+
model: string | null;
|
|
38
|
+
role_priorities: string[];
|
|
39
|
+
is_active: boolean;
|
|
40
|
+
}
|
|
41
|
+
export interface HintTodoEntry {
|
|
42
|
+
id: string;
|
|
43
|
+
owner: string | null;
|
|
44
|
+
title: string;
|
|
45
|
+
status: string | null;
|
|
46
|
+
}
|
|
47
|
+
export interface HintSelectedWorkflowTemplate {
|
|
48
|
+
id: string;
|
|
49
|
+
name: string;
|
|
50
|
+
description: string | null;
|
|
51
|
+
steps: Array<{
|
|
52
|
+
index: number;
|
|
53
|
+
bot_name: string;
|
|
54
|
+
role_priorities: string[];
|
|
55
|
+
saved_instruction: string | null;
|
|
56
|
+
is_checkpoint: boolean;
|
|
57
|
+
}>;
|
|
58
|
+
}
|
|
59
|
+
export interface HintCandidateWorkflowPlan {
|
|
60
|
+
source: 'selected_workflow_template' | 'named_workflow_template' | 'explicit_bot_sequence';
|
|
61
|
+
reason: string;
|
|
62
|
+
steps: Array<{
|
|
63
|
+
index: number;
|
|
64
|
+
bot_name: string;
|
|
65
|
+
role_priorities: string[];
|
|
66
|
+
suggested_role: string | null;
|
|
67
|
+
confidence?: 'low' | 'medium' | 'high';
|
|
68
|
+
reason?: string;
|
|
69
|
+
}>;
|
|
70
|
+
}
|
|
71
|
+
export interface HintConversation {
|
|
72
|
+
id: string;
|
|
73
|
+
title: string | null;
|
|
74
|
+
topic_id: string | null;
|
|
75
|
+
project_name: string | null;
|
|
76
|
+
project_folder: string | null;
|
|
77
|
+
turn_count: number;
|
|
78
|
+
recent_summary: string | null;
|
|
79
|
+
recent_turns: string | null;
|
|
80
|
+
bootstrap_history_file: string | null;
|
|
81
|
+
}
|
|
82
|
+
export interface AdvisoryBlock {
|
|
83
|
+
candidate_roles_detected: string[];
|
|
84
|
+
candidate_bots_mentioned_by_name: string[];
|
|
85
|
+
suggested_mode: 'reply_directly' | 'delegate_single' | 'create_workflow';
|
|
86
|
+
reasoning: string;
|
|
87
|
+
}
|
|
88
|
+
export interface PlanExecutionIntent {
|
|
89
|
+
mode: 'none' | 'per_step_todos' | 'per_step_workflow';
|
|
90
|
+
requires_file_read_before_dispatch: boolean;
|
|
91
|
+
mentioned_bots: string[];
|
|
92
|
+
candidate_roles: string[];
|
|
93
|
+
reasoning: string;
|
|
94
|
+
}
|
|
95
|
+
export interface DispatchHint {
|
|
96
|
+
user_prompt: string;
|
|
97
|
+
conversation: HintConversation;
|
|
98
|
+
available_bots: HintBotEntry[];
|
|
99
|
+
selected_workflow_template: HintSelectedWorkflowTemplate | null;
|
|
100
|
+
candidate_workflow_plan: HintCandidateWorkflowPlan | null;
|
|
101
|
+
plan_execution_intent: PlanExecutionIntent;
|
|
102
|
+
existing_todos: HintTodoEntry[];
|
|
103
|
+
todos_truncated: boolean;
|
|
104
|
+
effective_policy: string | null;
|
|
105
|
+
advisory: AdvisoryBlock;
|
|
106
|
+
}
|
|
107
|
+
export interface BuildHintInput {
|
|
108
|
+
userPrompt: string;
|
|
109
|
+
conversation: {
|
|
110
|
+
id: string;
|
|
111
|
+
title: string | null;
|
|
112
|
+
topic_id?: string | null;
|
|
113
|
+
project_name: string | null;
|
|
114
|
+
project_folder: string | null;
|
|
115
|
+
turn_count: number;
|
|
116
|
+
recent_summary: string | null;
|
|
117
|
+
recent_turns?: string | null;
|
|
118
|
+
bootstrap_history_file?: string | null;
|
|
119
|
+
};
|
|
120
|
+
activeBots: data.AgentProfileRow[];
|
|
121
|
+
selectedWorkflowTemplate?: HintSelectedWorkflowTemplate | null;
|
|
122
|
+
candidateWorkflowPlan?: HintCandidateWorkflowPlan | null;
|
|
123
|
+
existingTodos: Array<{
|
|
124
|
+
id: string | number;
|
|
125
|
+
owner_name: string | null;
|
|
126
|
+
title: string;
|
|
127
|
+
status: string | null;
|
|
128
|
+
}>;
|
|
129
|
+
effectivePolicyText: string | null;
|
|
130
|
+
}
|
|
131
|
+
export declare function buildDispatchHint(input: BuildHintInput): DispatchHint;
|
|
132
|
+
export declare function computePlanExecutionIntent(userPrompt: string, bots: HintBotEntry[]): PlanExecutionIntent;
|
|
133
|
+
export declare function computeAdvisory(userPrompt: string, bots: HintBotEntry[], precomputedPlanIntent?: PlanExecutionIntent): AdvisoryBlock;
|
|
134
|
+
//# sourceMappingURL=dispatch-hint.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-hint.d.ts","sourceRoot":"","sources":["../../src/orchestration/dispatch-hint.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAOtC,eAAO,MAAM,YAAY;;;;;;;CAOf,CAAC;AAMX,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,eAAe,EAAE,MAAM,EAAE,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AAG,IAAI,CAAC;QAC9B,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QAC7B,sBAAsB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;KACxC,CAAC;IACF,UAAU,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;IACnC,wBAAwB,CAAC,EAAE,4BAA4B,GAAG,IAAI,CAAC;IAC/D,qBAAqB,CAAC,EAAE,yBAAyB,GAAG,IAAI,CAAC;IACzD,aAAa,EAAE,KAAK,CAAC;QACnB,EAAE,EAAE,MAAM,GAAG,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;QAC1B,KAAK,EAAE,MAAM,CAAC;QACd,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;KACvB,CAAC,CAAC;IACH,mBAAmB,EAAE,MAAM,GAAG,IAAI,CAAC;CACpC;AA4BD,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,cAAc,GAAG,YAAY,CA4BrE;AA0ED,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,EAAE,IAAI,EAAE,YAAY,EAAE,GAAG,mBAAmB,CAoDxG;AAwDD,wBAAgB,eAAe,CAC7B,UAAU,EAAE,MAAM,EAClB,IAAI,EAAE,YAAY,EAAE,EACpB,qBAAqB,CAAC,EAAE,mBAAmB,GAC1C,aAAa,CAWf"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.HINT_BUDGETS = void 0;
|
|
4
|
+
exports.buildDispatchHint = buildDispatchHint;
|
|
5
|
+
exports.computePlanExecutionIntent = computePlanExecutionIntent;
|
|
6
|
+
exports.computeAdvisory = computeAdvisory;
|
|
7
|
+
const local_data_1 = require("../local-data");
|
|
8
|
+
// -----------------------------------------------------------------------------
|
|
9
|
+
// Budgets (per Guardrail #5)
|
|
10
|
+
// -----------------------------------------------------------------------------
|
|
11
|
+
exports.HINT_BUDGETS = {
|
|
12
|
+
MAX_TODOS: 30,
|
|
13
|
+
MAX_TODO_TITLE_CHARS: 200,
|
|
14
|
+
MAX_TODO_DETAILS_CHARS: 200,
|
|
15
|
+
MAX_RECENT_SUMMARY_CHARS: 2000,
|
|
16
|
+
MAX_RECENT_TURNS_CHARS: 6000,
|
|
17
|
+
MAX_EFFECTIVE_POLICY_CHARS: 1000,
|
|
18
|
+
};
|
|
19
|
+
function truncate(text, max) {
|
|
20
|
+
if (text == null)
|
|
21
|
+
return null;
|
|
22
|
+
const s = String(text);
|
|
23
|
+
if (s.length <= max)
|
|
24
|
+
return s;
|
|
25
|
+
return s.slice(0, Math.max(0, max - 1)).trimEnd() + '…';
|
|
26
|
+
}
|
|
27
|
+
function toHintBot(bot) {
|
|
28
|
+
return {
|
|
29
|
+
name: bot.name,
|
|
30
|
+
provider: bot.provider,
|
|
31
|
+
model: bot.model || null,
|
|
32
|
+
role_priorities: (0, local_data_1.getAgentRolePriorities)(bot),
|
|
33
|
+
is_active: bot.is_active === 1,
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function toHintTodo(t) {
|
|
37
|
+
return {
|
|
38
|
+
id: String(t.id),
|
|
39
|
+
owner: t.owner_name || null,
|
|
40
|
+
title: truncate(t.title, exports.HINT_BUDGETS.MAX_TODO_TITLE_CHARS) || '',
|
|
41
|
+
status: t.status || null,
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
function buildDispatchHint(input) {
|
|
45
|
+
const todosCapped = input.existingTodos.slice(0, exports.HINT_BUDGETS.MAX_TODOS);
|
|
46
|
+
const todosTruncated = input.existingTodos.length > exports.HINT_BUDGETS.MAX_TODOS;
|
|
47
|
+
const availableBots = input.activeBots.filter((b) => b.is_active === 1).map(toHintBot);
|
|
48
|
+
const planExecutionIntent = computePlanExecutionIntent(input.userPrompt, availableBots);
|
|
49
|
+
const advisory = computeAdvisory(input.userPrompt, availableBots, planExecutionIntent);
|
|
50
|
+
return {
|
|
51
|
+
user_prompt: input.userPrompt,
|
|
52
|
+
conversation: {
|
|
53
|
+
id: input.conversation.id,
|
|
54
|
+
title: input.conversation.title,
|
|
55
|
+
topic_id: input.conversation.topic_id ?? null,
|
|
56
|
+
project_name: input.conversation.project_name,
|
|
57
|
+
project_folder: input.conversation.project_folder,
|
|
58
|
+
turn_count: input.conversation.turn_count,
|
|
59
|
+
recent_summary: truncate(input.conversation.recent_summary, exports.HINT_BUDGETS.MAX_RECENT_SUMMARY_CHARS),
|
|
60
|
+
recent_turns: truncate(input.conversation.recent_turns, exports.HINT_BUDGETS.MAX_RECENT_TURNS_CHARS),
|
|
61
|
+
bootstrap_history_file: input.conversation.bootstrap_history_file || null,
|
|
62
|
+
},
|
|
63
|
+
available_bots: availableBots,
|
|
64
|
+
selected_workflow_template: input.selectedWorkflowTemplate || null,
|
|
65
|
+
candidate_workflow_plan: input.candidateWorkflowPlan || null,
|
|
66
|
+
plan_execution_intent: planExecutionIntent,
|
|
67
|
+
existing_todos: todosCapped.map(toHintTodo),
|
|
68
|
+
todos_truncated: todosTruncated,
|
|
69
|
+
effective_policy: truncate(input.effectivePolicyText, exports.HINT_BUDGETS.MAX_EFFECTIVE_POLICY_CHARS),
|
|
70
|
+
advisory,
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
// -----------------------------------------------------------------------------
|
|
74
|
+
// Advisory computation (replaces the OLD dispatchers as a hint, not a decision)
|
|
75
|
+
// -----------------------------------------------------------------------------
|
|
76
|
+
/**
|
|
77
|
+
* Detects likely roles in a user prompt using simple keyword patterns.
|
|
78
|
+
* The set of candidates is derived from the actual roles configured on the
|
|
79
|
+
* current bot roster — so this adapts to any domain (software, legal,
|
|
80
|
+
* medical, etc.) without a hardcoded list.
|
|
81
|
+
*/
|
|
82
|
+
function detectCandidateRoles(userPrompt, bots) {
|
|
83
|
+
const normalizedPrompt = userPrompt.toLowerCase();
|
|
84
|
+
const seen = new Set();
|
|
85
|
+
const result = [];
|
|
86
|
+
for (const bot of bots) {
|
|
87
|
+
for (const role of bot.role_priorities) {
|
|
88
|
+
const key = role.trim().toLowerCase();
|
|
89
|
+
if (!key || seen.has(key))
|
|
90
|
+
continue;
|
|
91
|
+
// Match if the role word (or its first meaningful token) appears in the prompt.
|
|
92
|
+
// Uses word-boundary regex with case-insensitive match to avoid sub-word hits.
|
|
93
|
+
const rolePattern = new RegExp(`\\b${key.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\$&')}\\b`, 'i');
|
|
94
|
+
if (rolePattern.test(userPrompt) || rolePattern.test(normalizedPrompt)) {
|
|
95
|
+
seen.add(key);
|
|
96
|
+
result.push(role);
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
// Also detect common role keywords the user might mention even if no bot has
|
|
101
|
+
// them listed — the LLM can still use these as hints.
|
|
102
|
+
// verify/validate kept DISTINCT from qa (Codex QA 2026-04-18, finding #5).
|
|
103
|
+
// Collapsing them was the original bug the refactor was supposed to fix.
|
|
104
|
+
const commonKeywords = [
|
|
105
|
+
{ word: /\b(prompt builder|prompt building|user prompt|rewrite prompt|better prompt)\b/i, label: 'Prompt Building' },
|
|
106
|
+
{ word: /\b(code|coding|build|implement|create|write|develop)\b/i, label: 'coding' },
|
|
107
|
+
{ word: /\b(qa|review|test|testing|audit)\b/i, label: 'qa' },
|
|
108
|
+
{ word: /\b(verify|verification|validate|validation)\b/i, label: 'verify' },
|
|
109
|
+
{ word: /\b(research|investigate|analy[sz]e|analysis|brainstorm)\b/i, label: 'research' },
|
|
110
|
+
{ word: /\b(design|ui\/?ux|layout|visual)\b/i, label: 'Design' },
|
|
111
|
+
{ word: /\b(debug|debugging|troubleshoot|root cause)\b/i, label: 'Debugging' },
|
|
112
|
+
{ word: /\b(database|db|sqlite|schema|migration)\b/i, label: 'Data' },
|
|
113
|
+
{ word: /\b(documentation|docs|readme|release notes)\b/i, label: 'Documentation' },
|
|
114
|
+
{ word: /\b(deploy|deployment|release|ship)\b/i, label: 'deploy' },
|
|
115
|
+
];
|
|
116
|
+
for (const { word, label } of commonKeywords) {
|
|
117
|
+
if (!seen.has(label) && word.test(userPrompt)) {
|
|
118
|
+
seen.add(label);
|
|
119
|
+
result.push(label);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
return result;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* Finds bot names mentioned verbatim (case-insensitive) in the user prompt.
|
|
126
|
+
* Returns only bot names that exist in the roster — prevents false positives
|
|
127
|
+
* on common words that happen to match a bot name elsewhere.
|
|
128
|
+
*/
|
|
129
|
+
function detectMentionedBotNames(userPrompt, bots) {
|
|
130
|
+
const result = [];
|
|
131
|
+
for (const bot of bots) {
|
|
132
|
+
const nameEscaped = bot.name.replace(/[.*+?^${}()|[\\]\\\\]/g, '\\$&');
|
|
133
|
+
const pattern = new RegExp(`\\b${nameEscaped}\\b`, 'i');
|
|
134
|
+
if (pattern.test(userPrompt)) {
|
|
135
|
+
result.push(bot.name);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
return result;
|
|
139
|
+
}
|
|
140
|
+
function computePlanExecutionIntent(userPrompt, bots) {
|
|
141
|
+
const candidateRoles = detectCandidateRoles(userPrompt, bots);
|
|
142
|
+
const mentionedBots = detectMentionedBotNames(userPrompt, bots);
|
|
143
|
+
const text = String(userPrompt || '').trim();
|
|
144
|
+
if (!text) {
|
|
145
|
+
return {
|
|
146
|
+
mode: 'none',
|
|
147
|
+
requires_file_read_before_dispatch: false,
|
|
148
|
+
mentioned_bots: [],
|
|
149
|
+
candidate_roles: [],
|
|
150
|
+
reasoning: 'No user prompt text.',
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
const referencesFileOrPlan = /\b(read|open|inspect|use|apply|take)\b[\s\S]{0,80}\b(file|plan|document|txt|text file|markdown|md)\b/i.test(text)
|
|
154
|
+
|| /\bsteps?\s+(?:presented|listed|defined)\s+in\s+(?:this|the)\s+file\b/i.test(text)
|
|
155
|
+
|| /\bfrom\s+(?:this|the)\s+file\b/i.test(text);
|
|
156
|
+
const perStepSignal = /\b(each|every|individual)\s+step\b/i.test(text)
|
|
157
|
+
|| /\bone\s+(?:todo|task|workflow\s+step)\s+per\s+step\b/i.test(text);
|
|
158
|
+
const todoSignal = /\b(todo|to-do|task)\b/i.test(text);
|
|
159
|
+
const normalWorkflowSignal = /\b(?:use|run|apply)\b[\s\S]{0,40}\b(?:my|our|the|selected|normal|default|project team)\s+workflow\b/i.test(text)
|
|
160
|
+
|| /\buse\b[\s\S]{0,20}\bworkflow\b[\s\S]{0,40}\b(?:each|every|individual)\s+step\b/i.test(text);
|
|
161
|
+
if (referencesFileOrPlan && perStepSignal && normalWorkflowSignal) {
|
|
162
|
+
return {
|
|
163
|
+
mode: 'per_step_workflow',
|
|
164
|
+
requires_file_read_before_dispatch: true,
|
|
165
|
+
mentioned_bots: mentionedBots,
|
|
166
|
+
candidate_roles: candidateRoles,
|
|
167
|
+
reasoning: 'User explicitly asked to apply a saved/normal workflow to each structured step in a file or plan.',
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
if (referencesFileOrPlan && perStepSignal && todoSignal && (mentionedBots.length > 0 || candidateRoles.length > 0)) {
|
|
171
|
+
return {
|
|
172
|
+
mode: 'per_step_todos',
|
|
173
|
+
requires_file_read_before_dispatch: true,
|
|
174
|
+
mentioned_bots: mentionedBots,
|
|
175
|
+
candidate_roles: candidateRoles,
|
|
176
|
+
reasoning: 'User explicitly asked to turn each structured step in a file or plan into sequential worker TODOs.',
|
|
177
|
+
};
|
|
178
|
+
}
|
|
179
|
+
return {
|
|
180
|
+
mode: 'none',
|
|
181
|
+
requires_file_read_before_dispatch: false,
|
|
182
|
+
mentioned_bots: mentionedBots,
|
|
183
|
+
candidate_roles: candidateRoles,
|
|
184
|
+
reasoning: referencesFileOrPlan
|
|
185
|
+
? 'Prompt references a file or plan, but does not explicitly request per-step TODO/workflow expansion.'
|
|
186
|
+
: 'No explicit plan-file execution request detected.',
|
|
187
|
+
};
|
|
188
|
+
}
|
|
189
|
+
/**
|
|
190
|
+
* Suggests a dispatch mode based on the prompt shape.
|
|
191
|
+
* Purely advisory — the orchestrator LLM is free to override.
|
|
192
|
+
*/
|
|
193
|
+
function suggestMode(userPrompt, candidateRoles, mentionedBots, planIntent) {
|
|
194
|
+
const text = userPrompt.trim();
|
|
195
|
+
if (!text)
|
|
196
|
+
return 'reply_directly';
|
|
197
|
+
if (planIntent.mode !== 'none')
|
|
198
|
+
return 'create_workflow';
|
|
199
|
+
const hasQuestionMark = text.includes('?');
|
|
200
|
+
const workflowSignals = /\b(first\b.*\bthen\b|after\s+(that|you|qa|coding)|handoff|multi[- ]step)\b/i.test(text)
|
|
201
|
+
|| candidateRoles.length >= 2
|
|
202
|
+
|| mentionedBots.length >= 2;
|
|
203
|
+
if (workflowSignals)
|
|
204
|
+
return 'create_workflow';
|
|
205
|
+
if (candidateRoles.length === 1 || mentionedBots.length === 1)
|
|
206
|
+
return 'delegate_single';
|
|
207
|
+
// Pure question with no role or bot hint — probably a direct reply.
|
|
208
|
+
if (hasQuestionMark && candidateRoles.length === 0 && mentionedBots.length === 0) {
|
|
209
|
+
return 'reply_directly';
|
|
210
|
+
}
|
|
211
|
+
// Default conservative: delegate_single when the prompt looks task-shaped.
|
|
212
|
+
if (/\b(do|make|build|write|fix|finish|create|implement)\b/i.test(text)) {
|
|
213
|
+
return 'delegate_single';
|
|
214
|
+
}
|
|
215
|
+
return 'reply_directly';
|
|
216
|
+
}
|
|
217
|
+
function buildAdvisoryReasoning(mode, candidateRoles, mentionedBots) {
|
|
218
|
+
const parts = [];
|
|
219
|
+
if (mentionedBots.length > 0) {
|
|
220
|
+
parts.push(`prompt mentions bot${mentionedBots.length > 1 ? 's' : ''} by name (${mentionedBots.join(', ')})`);
|
|
221
|
+
}
|
|
222
|
+
if (candidateRoles.length > 0) {
|
|
223
|
+
parts.push(`detected role keyword${candidateRoles.length > 1 ? 's' : ''}: ${candidateRoles.join(', ')}`);
|
|
224
|
+
}
|
|
225
|
+
if (parts.length === 0) {
|
|
226
|
+
parts.push('no role or bot-name signals detected');
|
|
227
|
+
}
|
|
228
|
+
const modeLabel = mode === 'reply_directly'
|
|
229
|
+
? 'direct reply'
|
|
230
|
+
: mode === 'delegate_single'
|
|
231
|
+
? 'single delegation'
|
|
232
|
+
: 'multi-step workflow';
|
|
233
|
+
return `Suggesting ${modeLabel}: ${parts.join('; ')}.`;
|
|
234
|
+
}
|
|
235
|
+
function computeAdvisory(userPrompt, bots, precomputedPlanIntent) {
|
|
236
|
+
const candidateRoles = detectCandidateRoles(userPrompt, bots);
|
|
237
|
+
const mentionedBots = detectMentionedBotNames(userPrompt, bots);
|
|
238
|
+
const planIntent = precomputedPlanIntent || computePlanExecutionIntent(userPrompt, bots);
|
|
239
|
+
const suggested_mode = suggestMode(userPrompt, candidateRoles, mentionedBots, planIntent);
|
|
240
|
+
return {
|
|
241
|
+
candidate_roles_detected: candidateRoles,
|
|
242
|
+
candidate_bots_mentioned_by_name: mentionedBots,
|
|
243
|
+
suggested_mode,
|
|
244
|
+
reasoning: buildAdvisoryReasoning(suggested_mode, candidateRoles, mentionedBots),
|
|
245
|
+
};
|
|
246
|
+
}
|
|
247
|
+
//# sourceMappingURL=dispatch-hint.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-hint.js","sourceRoot":"","sources":["../../src/orchestration/dispatch-hint.ts"],"names":[],"mappings":";;;AAoLA,8CA4BC;AA0ED,gEAoDC;AAwDD,0CAeC;AA5XD,8CAAuD;AAEvD,gFAAgF;AAChF,6BAA6B;AAC7B,gFAAgF;AAEnE,QAAA,YAAY,GAAG;IAC1B,SAAS,EAAE,EAAE;IACb,oBAAoB,EAAE,GAAG;IACzB,sBAAsB,EAAE,GAAG;IAC3B,wBAAwB,EAAE,IAAI;IAC9B,sBAAsB,EAAE,IAAI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ACzD,CAAC;AAED,SAAgB,eAAe,CAC7B,UAAkB,EAClB,IAAoB,EACpB,qBAA2C;IAE3C,MAAM,cAAc,GAAG,oBAAoB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAC9D,MAAM,aAAa,GAAG,uBAAuB,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IAChE,MAAM,UAAU,GAAG,qBAAqB,IAAI,0BAA0B,CAAC,UAAU,EAAE,IAAI,CAAC,CAAC;IACzF,MAAM,cAAc,GAAG,WAAW,CAAC,UAAU,EAAE,cAAc,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;IAC1F,OAAO;QACL,wBAAwB,EAAE,cAAc;QACxC,gCAAgC,EAAE,aAAa;QAC/C,cAAc;QACd,SAAS,EAAE,sBAAsB,CAAC,cAAc,EAAE,cAAc,EAAE,aAAa,CAAC;KACjF,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Orchestration dispatch runner — the live wiring for Phase A.
|
|
3
|
+
*
|
|
4
|
+
* Ties together dispatch-tools (validators), dispatch-hint (context builder),
|
|
5
|
+
* orchestrator-dispatch-prompt (system prompt), and dispatch-executor
|
|
6
|
+
* (TODO creation). Called from OrchestratorAgent.handleUserMessage when
|
|
7
|
+
* the feature flag `orchestration.tool_dispatch_enabled` is true.
|
|
8
|
+
*
|
|
9
|
+
* Flow:
|
|
10
|
+
* 1. Build the hint from conversation state.
|
|
11
|
+
* 2. Build the orchestrator system prompt.
|
|
12
|
+
* 3. Call the LLM with three tools exposed (reply_directly,
|
|
13
|
+
* delegate_single, create_workflow). toolChoice='required' so the
|
|
14
|
+
* LLM must call one of them.
|
|
15
|
+
* 4. Extract the tool call.
|
|
16
|
+
* 5. Validate the arguments. On failure, send the error back to the LLM
|
|
17
|
+
* for one retry. On second failure, surface to user.
|
|
18
|
+
* 6. Execute the validated call via dispatch-executor.
|
|
19
|
+
* 7. Format a user-facing reply describing what happened.
|
|
20
|
+
*
|
|
21
|
+
* This module intentionally does NOT trigger workflow execution (the
|
|
22
|
+
* existing workflow-engine handles that once TODOs are created with
|
|
23
|
+
* next_worker_* links). It just creates the TODOs and returns a summary.
|
|
24
|
+
*/
|
|
25
|
+
import type { LLMProvider, LLMToolCall } from '../providers/index';
|
|
26
|
+
import type { ToolDefinition, ToolContext } from '../types';
|
|
27
|
+
import * as data from '../local-data';
|
|
28
|
+
import { type DispatchActor } from './dispatch-executor';
|
|
29
|
+
import type { HintCandidateWorkflowPlan, HintSelectedWorkflowTemplate } from './dispatch-hint';
|
|
30
|
+
export interface DispatchRunnerInput {
|
|
31
|
+
userPrompt: string;
|
|
32
|
+
orchestratorBot?: data.AgentProfileRow | null;
|
|
33
|
+
orchestratorActor?: DispatchActor;
|
|
34
|
+
llm: LLMProvider;
|
|
35
|
+
conversationId: string;
|
|
36
|
+
projectId: string | null;
|
|
37
|
+
conversationTitle: string | null;
|
|
38
|
+
topicId: string | null;
|
|
39
|
+
projectName: string | null;
|
|
40
|
+
projectFolder: string | null;
|
|
41
|
+
turnCount: number;
|
|
42
|
+
recentSummary: string | null;
|
|
43
|
+
recentTurnsForHint?: string | null;
|
|
44
|
+
bootstrapHistoryFilePath?: string | null;
|
|
45
|
+
recentContext?: string | null;
|
|
46
|
+
activeBots: data.AgentProfileRow[];
|
|
47
|
+
selectedWorkflowTemplate?: HintSelectedWorkflowTemplate | null;
|
|
48
|
+
candidateWorkflowPlan?: HintCandidateWorkflowPlan | null;
|
|
49
|
+
precreatedCandidateTaskIds?: Array<string | number>;
|
|
50
|
+
existingTodos: Array<{
|
|
51
|
+
id: string | number;
|
|
52
|
+
owner_name: string | null;
|
|
53
|
+
title: string;
|
|
54
|
+
status: string | null;
|
|
55
|
+
}>;
|
|
56
|
+
effectivePolicyText: string | null;
|
|
57
|
+
additionalGuidance?: string | null;
|
|
58
|
+
/** Optional abort signal forwarded to the LLM call. */
|
|
59
|
+
abortSignal?: AbortSignal;
|
|
60
|
+
/**
|
|
61
|
+
* Read-side tools the orchestrator LLM can call directly without
|
|
62
|
+
* delegating (read_file, list_directory, search_codebase,
|
|
63
|
+
* search_local_memory, list_tasks, web_search, web_fetch). The
|
|
64
|
+
* runner executes these inline and feeds results back to the LLM
|
|
65
|
+
* for the next turn (multi-turn tool use). After the LLM uses
|
|
66
|
+
* these to gather context, it must call one of the three dispatch
|
|
67
|
+
* tools to end the turn.
|
|
68
|
+
*/
|
|
69
|
+
orchestratorTools?: ToolDefinition[];
|
|
70
|
+
/** ToolContext used to execute orchestratorTools. Required if orchestratorTools is non-empty. */
|
|
71
|
+
toolContext?: ToolContext;
|
|
72
|
+
}
|
|
73
|
+
export interface DispatchRunnerResult {
|
|
74
|
+
userReplyText: string;
|
|
75
|
+
outcome: {
|
|
76
|
+
kind: 'reply_directly';
|
|
77
|
+
} | {
|
|
78
|
+
kind: 'delegate_single';
|
|
79
|
+
taskId: string | number;
|
|
80
|
+
ownerName: string;
|
|
81
|
+
} | {
|
|
82
|
+
kind: 'create_workflow';
|
|
83
|
+
taskIds: Array<string | number>;
|
|
84
|
+
ownerNames: string[];
|
|
85
|
+
} | {
|
|
86
|
+
kind: 'error';
|
|
87
|
+
error: string;
|
|
88
|
+
};
|
|
89
|
+
}
|
|
90
|
+
export declare function runDispatchTurn(input: DispatchRunnerInput): Promise<DispatchRunnerResult>;
|
|
91
|
+
/**
|
|
92
|
+
* Parse fenced JSON dispatch blocks from an LLM text response. Used when
|
|
93
|
+
* the provider can't return native tool calls (Claude CLI, Codex CLI, or
|
|
94
|
+
* any other text-only interface). The prompt instructs the LLM to emit
|
|
95
|
+
* exactly one fenced block of the form:
|
|
96
|
+
*
|
|
97
|
+
* ```json
|
|
98
|
+
* {"tool": "delegate_single", "arguments": { ... }}
|
|
99
|
+
* ```
|
|
100
|
+
*
|
|
101
|
+
* Blocks that are malformed JSON, not objects, or whose `tool` is not one
|
|
102
|
+
* of the three dispatch tools are silently skipped — the caller's
|
|
103
|
+
* zero/many rejection logic will flag the overall turn appropriately.
|
|
104
|
+
*/
|
|
105
|
+
export declare function extractTextFallbackDispatchCalls(content: string): LLMToolCall[];
|
|
106
|
+
//# sourceMappingURL=dispatch-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dispatch-runner.d.ts","sourceRoot":"","sources":["../../src/orchestration/dispatch-runner.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,KAAK,EAAE,WAAW,EAAiC,WAAW,EAAE,MAAM,oBAAoB,CAAC;AAClG,OAAO,KAAK,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5D,OAAO,KAAK,IAAI,MAAM,eAAe,CAAC;AAetC,OAAO,EAKL,KAAK,aAAa,EACnB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,KAAK,EAAE,yBAAyB,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAO/F,MAAM,WAAW,mBAAmB;IAClC,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,CAAC,EAAE,IAAI,CAAC,eAAe,GAAG,IAAI,CAAC;IAC9C,iBAAiB,CAAC,EAAE,aAAa,CAAC;IAClC,GAAG,EAAE,WAAW,CAAC;IACjB,cAAc,EAAE,MAAM,CAAC;IACvB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;IACjC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,WAAW,EAAE,MAAM,GAAG,IAAI,CAAC;IAC3B,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IAC7B,kBAAkB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACnC,wBAAwB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzC,aAAa,CAAC,EAAE,MAAM,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