@zhijiewang/openharness 2.0.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/dist/DeferredTool.js +3 -1
- package/dist/Tool.d.ts +1 -1
- package/dist/agents/roles.js +58 -62
- package/dist/commands/cybergotchi.d.ts +1 -1
- package/dist/commands/cybergotchi.js +30 -30
- package/dist/commands/index.js +360 -122
- package/dist/components/App.d.ts +1 -1
- package/dist/components/App.js +6 -6
- package/dist/components/CompanionFooter.d.ts +1 -1
- package/dist/components/CompanionFooter.js +6 -8
- package/dist/components/CybergotchiBubble.js +5 -5
- package/dist/components/CybergotchiPanel.d.ts +1 -1
- package/dist/components/CybergotchiPanel.js +7 -7
- package/dist/components/CybergotchiPanelConnected.js +2 -2
- package/dist/components/CybergotchiSetup.js +26 -24
- package/dist/components/CybergotchiSprite.d.ts +1 -1
- package/dist/components/CybergotchiSprite.js +8 -12
- package/dist/components/DiffView.d.ts +1 -1
- package/dist/components/DiffView.js +10 -10
- package/dist/components/ErrorBoundary.d.ts +1 -1
- package/dist/components/ErrorBoundary.js +1 -1
- package/dist/components/InitWizard.js +65 -33
- package/dist/components/Markdown.js +2 -4
- package/dist/components/Messages.js +4 -4
- package/dist/components/PermissionPrompt.d.ts +1 -1
- package/dist/components/PermissionPrompt.js +15 -17
- package/dist/components/REPL.d.ts +1 -1
- package/dist/components/REPL.js +74 -49
- package/dist/components/Spinner.js +2 -2
- package/dist/components/TextInput.js +35 -29
- package/dist/components/ToolCallDisplay.js +3 -5
- package/dist/cybergotchi/bones.d.ts +1 -1
- package/dist/cybergotchi/bones.js +8 -8
- package/dist/cybergotchi/config.d.ts +2 -2
- package/dist/cybergotchi/config.js +13 -13
- package/dist/cybergotchi/events.d.ts +5 -5
- package/dist/cybergotchi/events.js +7 -7
- package/dist/cybergotchi/needs.d.ts +2 -2
- package/dist/cybergotchi/needs.js +7 -9
- package/dist/cybergotchi/personality.d.ts +2 -2
- package/dist/cybergotchi/personality.js +2 -2
- package/dist/cybergotchi/species.d.ts +1 -1
- package/dist/cybergotchi/species.js +145 -217
- package/dist/cybergotchi/speech.d.ts +2 -2
- package/dist/cybergotchi/speech.js +43 -43
- package/dist/cybergotchi/types.d.ts +4 -4
- package/dist/cybergotchi/types.js +26 -26
- package/dist/cybergotchi/useCybergotchi.d.ts +1 -1
- package/dist/cybergotchi/useCybergotchi.js +29 -25
- package/dist/git/index.js +11 -9
- package/dist/harness/checkpoints.js +29 -21
- package/dist/harness/config.d.ts +12 -2
- package/dist/harness/config.js +15 -9
- package/dist/harness/context-warning.d.ts +1 -1
- package/dist/harness/context-warning.js +1 -1
- package/dist/harness/cost.js +1 -1
- package/dist/harness/credentials.js +13 -13
- package/dist/harness/hooks.js +7 -5
- package/dist/harness/keybindings.js +20 -18
- package/dist/harness/marketplace.d.ts +3 -3
- package/dist/harness/marketplace.js +55 -42
- package/dist/harness/memory.d.ts +23 -5
- package/dist/harness/memory.js +142 -41
- package/dist/harness/onboarding.js +30 -10
- package/dist/harness/plugins.d.ts +9 -1
- package/dist/harness/plugins.js +54 -30
- package/dist/harness/rules.js +12 -7
- package/dist/harness/sandbox.d.ts +34 -0
- package/dist/harness/sandbox.js +104 -0
- package/dist/harness/session-db.d.ts +55 -0
- package/dist/harness/session-db.js +165 -0
- package/dist/harness/session.d.ts +1 -1
- package/dist/harness/session.js +34 -15
- package/dist/harness/store.d.ts +3 -3
- package/dist/harness/store.js +6 -4
- package/dist/harness/submit-handler.d.ts +4 -4
- package/dist/harness/submit-handler.js +57 -21
- package/dist/harness/telemetry.d.ts +1 -1
- package/dist/harness/telemetry.js +23 -19
- package/dist/harness/traces.d.ts +2 -2
- package/dist/harness/traces.js +44 -33
- package/dist/harness/verification.d.ts +1 -1
- package/dist/harness/verification.js +50 -44
- package/dist/lsp/client.js +44 -40
- package/dist/main.js +100 -59
- package/dist/mcp/DeferredMcpTool.d.ts +4 -4
- package/dist/mcp/DeferredMcpTool.js +9 -5
- package/dist/mcp/McpTool.d.ts +4 -4
- package/dist/mcp/McpTool.js +8 -4
- package/dist/mcp/client.d.ts +2 -2
- package/dist/mcp/client.js +21 -21
- package/dist/mcp/loader.d.ts +1 -1
- package/dist/mcp/loader.js +17 -12
- package/dist/mcp/registry.d.ts +3 -3
- package/dist/mcp/registry.js +97 -97
- package/dist/mcp/schema.d.ts +1 -1
- package/dist/mcp/schema.js +16 -16
- package/dist/mcp/server.d.ts +1 -1
- package/dist/mcp/server.js +21 -21
- package/dist/mcp/types.d.ts +3 -3
- package/dist/providers/anthropic.d.ts +2 -2
- package/dist/providers/anthropic.js +10 -9
- package/dist/providers/base.d.ts +1 -1
- package/dist/providers/index.js +10 -3
- package/dist/providers/llamacpp.d.ts +2 -2
- package/dist/providers/llamacpp.js +1 -3
- package/dist/providers/ollama.d.ts +2 -2
- package/dist/providers/ollama.js +3 -4
- package/dist/providers/openai.d.ts +2 -2
- package/dist/providers/openai.js +3 -5
- package/dist/providers/openrouter.d.ts +2 -2
- package/dist/providers/router.d.ts +1 -1
- package/dist/providers/router.js +7 -7
- package/dist/query/compress.d.ts +2 -2
- package/dist/query/compress.js +22 -21
- package/dist/query/context-manager.d.ts +2 -2
- package/dist/query/context-manager.js +8 -11
- package/dist/query/errors.js +1 -1
- package/dist/query/index.d.ts +1 -1
- package/dist/query/index.js +30 -22
- package/dist/query/tools.js +15 -12
- package/dist/query/types.d.ts +1 -1
- package/dist/query.d.ts +1 -1
- package/dist/query.js +1 -1
- package/dist/remote/auth.d.ts +2 -2
- package/dist/remote/auth.js +8 -8
- package/dist/remote/server.d.ts +3 -3
- package/dist/remote/server.js +60 -60
- package/dist/renderer/cells.js +9 -9
- package/dist/renderer/colors.js +24 -6
- package/dist/renderer/diff.d.ts +2 -2
- package/dist/renderer/diff.js +27 -19
- package/dist/renderer/differ.d.ts +1 -1
- package/dist/renderer/differ.js +9 -9
- package/dist/renderer/image.js +19 -19
- package/dist/renderer/index.d.ts +6 -6
- package/dist/renderer/index.js +163 -93
- package/dist/renderer/input.js +66 -48
- package/dist/renderer/layout.d.ts +6 -6
- package/dist/renderer/layout.js +163 -124
- package/dist/renderer/markdown.d.ts +2 -2
- package/dist/renderer/markdown.js +173 -54
- package/dist/renderer/session-browser.d.ts +2 -2
- package/dist/renderer/session-browser.js +19 -21
- package/dist/repl.d.ts +5 -5
- package/dist/repl.js +300 -198
- package/dist/sdk/index.d.ts +8 -7
- package/dist/sdk/index.js +59 -42
- package/dist/services/AgentDispatcher.d.ts +3 -3
- package/dist/services/AgentDispatcher.js +33 -29
- package/dist/services/CronExecutor.d.ts +4 -4
- package/dist/services/CronExecutor.js +12 -8
- package/dist/services/EvaluatorLoop.d.ts +3 -3
- package/dist/services/EvaluatorLoop.js +29 -21
- package/dist/services/MetaHarness.d.ts +1 -1
- package/dist/services/MetaHarness.js +41 -33
- package/dist/services/PipelineExecutor.d.ts +1 -1
- package/dist/services/PipelineExecutor.js +23 -25
- package/dist/services/SkillExtractor.d.ts +43 -0
- package/dist/services/SkillExtractor.js +143 -0
- package/dist/services/StreamingToolExecutor.d.ts +2 -2
- package/dist/services/StreamingToolExecutor.js +11 -7
- package/dist/services/a2a.d.ts +8 -8
- package/dist/services/a2a.js +44 -34
- package/dist/services/agent-messaging.d.ts +33 -15
- package/dist/services/agent-messaging.js +65 -13
- package/dist/services/cron.js +16 -16
- package/dist/tools/AgentTool/index.d.ts +5 -2
- package/dist/tools/AgentTool/index.js +35 -15
- package/dist/tools/AskUserTool/index.js +1 -1
- package/dist/tools/BashTool/index.d.ts +2 -2
- package/dist/tools/BashTool/index.js +18 -10
- package/dist/tools/CronTool/index.d.ts +2 -2
- package/dist/tools/CronTool/index.js +30 -12
- package/dist/tools/DiagnosticsTool/index.js +28 -22
- package/dist/tools/EnterPlanModeTool/index.js +93 -14
- package/dist/tools/EnterWorktreeTool/index.js +7 -3
- package/dist/tools/ExitPlanModeTool/index.d.ts +22 -1
- package/dist/tools/ExitPlanModeTool/index.js +20 -5
- package/dist/tools/ExitWorktreeTool/index.js +11 -4
- package/dist/tools/FileEditTool/index.js +3 -5
- package/dist/tools/FileReadTool/index.js +16 -10
- package/dist/tools/FileWriteTool/index.js +2 -2
- package/dist/tools/GlobTool/index.js +5 -9
- package/dist/tools/GrepTool/index.d.ts +2 -2
- package/dist/tools/GrepTool/index.js +14 -9
- package/dist/tools/ImageReadTool/index.js +2 -2
- package/dist/tools/KillProcessTool/index.js +11 -7
- package/dist/tools/LSTool/index.js +3 -3
- package/dist/tools/MemoryTool/index.d.ts +11 -11
- package/dist/tools/MemoryTool/index.js +28 -14
- package/dist/tools/MonitorTool/index.d.ts +2 -2
- package/dist/tools/MonitorTool/index.js +24 -19
- package/dist/tools/MultiEditTool/index.js +9 -5
- package/dist/tools/NotebookEditTool/index.js +3 -3
- package/dist/tools/ParallelAgentTool/index.d.ts +4 -4
- package/dist/tools/ParallelAgentTool/index.js +12 -6
- package/dist/tools/PipelineTool/index.d.ts +4 -4
- package/dist/tools/PipelineTool/index.js +3 -3
- package/dist/tools/PowerShellTool/index.js +10 -6
- package/dist/tools/RemoteTriggerTool/index.js +8 -4
- package/dist/tools/ScheduleWakeupTool/index.d.ts +42 -0
- package/dist/tools/ScheduleWakeupTool/index.js +115 -0
- package/dist/tools/SendMessageTool/index.js +25 -7
- package/dist/tools/SessionSearchTool/index.d.ts +15 -0
- package/dist/tools/SessionSearchTool/index.js +36 -0
- package/dist/tools/SkillTool/index.d.ts +3 -0
- package/dist/tools/SkillTool/index.js +39 -9
- package/dist/tools/TaskCreateTool/index.d.ts +2 -2
- package/dist/tools/TaskCreateTool/index.js +2 -2
- package/dist/tools/TaskGetTool/index.js +2 -2
- package/dist/tools/TaskListTool/index.js +3 -5
- package/dist/tools/TaskOutputTool/index.js +2 -2
- package/dist/tools/TaskStopTool/index.js +3 -3
- package/dist/tools/TaskUpdateTool/index.d.ts +4 -4
- package/dist/tools/TaskUpdateTool/index.js +2 -2
- package/dist/tools/ToolSearchTool/index.js +9 -6
- package/dist/tools/WebFetchTool/index.js +1 -1
- package/dist/tools/WebSearchTool/index.js +2 -6
- package/dist/tools.js +31 -30
- package/dist/types/permissions.js +15 -9
- package/dist/utils/bash-safety.d.ts +1 -1
- package/dist/utils/bash-safety.js +64 -54
- package/dist/utils/diff-algorithm.d.ts +3 -3
- package/dist/utils/diff-algorithm.js +7 -7
- package/dist/utils/fs.js +3 -3
- package/dist/utils/safe-env.js +1 -1
- package/dist/utils/theme-data.d.ts +1 -1
- package/dist/utils/theme-data.js +1 -1
- package/dist/utils/theme.d.ts +1 -1
- package/dist/utils/theme.js +1 -1
- package/dist/utils/tool-summary.d.ts +1 -1
- package/dist/utils/tool-summary.js +27 -9
- package/package.json +10 -3
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Tool } from "../../Tool.js";
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
delaySeconds: z.ZodNumber;
|
|
5
|
+
reason: z.ZodString;
|
|
6
|
+
prompt: z.ZodString;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
prompt: string;
|
|
9
|
+
reason: string;
|
|
10
|
+
delaySeconds: number;
|
|
11
|
+
}, {
|
|
12
|
+
prompt: string;
|
|
13
|
+
reason: string;
|
|
14
|
+
delaySeconds: number;
|
|
15
|
+
}>;
|
|
16
|
+
/**
|
|
17
|
+
* Pending wakeup state — consumed by the REPL loop to schedule the next iteration.
|
|
18
|
+
*/
|
|
19
|
+
export type PendingWakeup = {
|
|
20
|
+
delaySeconds: number;
|
|
21
|
+
reason: string;
|
|
22
|
+
prompt: string;
|
|
23
|
+
scheduledAt: number;
|
|
24
|
+
};
|
|
25
|
+
/** Called by the REPL to check if a wakeup was scheduled */
|
|
26
|
+
export declare function consumeWakeup(): PendingWakeup | null;
|
|
27
|
+
/** Cancel any pending wakeup */
|
|
28
|
+
export declare function cancelWakeup(): void;
|
|
29
|
+
/** Check if there's a pending wakeup without consuming it */
|
|
30
|
+
export declare function hasPendingWakeup(): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Suggest an optimal delay based on what you're waiting for.
|
|
33
|
+
* Returns a delay in seconds that respects cache TTL boundaries.
|
|
34
|
+
*
|
|
35
|
+
* @param estimatedWaitSeconds - How long you think the thing will take
|
|
36
|
+
* @param isIdle - True if there's nothing specific to check, just periodic polling
|
|
37
|
+
* @returns Recommended delay in seconds
|
|
38
|
+
*/
|
|
39
|
+
export declare function suggestDelay(estimatedWaitSeconds: number, isIdle?: boolean): number;
|
|
40
|
+
export declare const ScheduleWakeupTool: Tool<typeof inputSchema>;
|
|
41
|
+
export {};
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
/** Prompt cache TTL in seconds (Anthropic's ephemeral cache) */
|
|
3
|
+
const CACHE_TTL = 300;
|
|
4
|
+
/** Maximum warm-cache delay — stay under TTL with margin */
|
|
5
|
+
const CACHE_WARM_MAX = 270;
|
|
6
|
+
const inputSchema = z.object({
|
|
7
|
+
delaySeconds: z.number().describe("Seconds from now to wake up. Clamped to [60, 3600]."),
|
|
8
|
+
reason: z.string().describe("One short sentence explaining the chosen delay. Shown to the user."),
|
|
9
|
+
prompt: z
|
|
10
|
+
.string()
|
|
11
|
+
.describe("The /loop prompt to fire on wake-up. Pass the same prompt each turn to continue the loop. Omit to end the loop."),
|
|
12
|
+
});
|
|
13
|
+
let pendingWakeup = null;
|
|
14
|
+
/** Called by the REPL to check if a wakeup was scheduled */
|
|
15
|
+
export function consumeWakeup() {
|
|
16
|
+
const w = pendingWakeup;
|
|
17
|
+
pendingWakeup = null;
|
|
18
|
+
return w;
|
|
19
|
+
}
|
|
20
|
+
/** Cancel any pending wakeup */
|
|
21
|
+
export function cancelWakeup() {
|
|
22
|
+
pendingWakeup = null;
|
|
23
|
+
}
|
|
24
|
+
/** Check if there's a pending wakeup without consuming it */
|
|
25
|
+
export function hasPendingWakeup() {
|
|
26
|
+
return pendingWakeup !== null;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Suggest an optimal delay based on what you're waiting for.
|
|
30
|
+
* Returns a delay in seconds that respects cache TTL boundaries.
|
|
31
|
+
*
|
|
32
|
+
* @param estimatedWaitSeconds - How long you think the thing will take
|
|
33
|
+
* @param isIdle - True if there's nothing specific to check, just periodic polling
|
|
34
|
+
* @returns Recommended delay in seconds
|
|
35
|
+
*/
|
|
36
|
+
export function suggestDelay(estimatedWaitSeconds, isIdle = false) {
|
|
37
|
+
if (isIdle) {
|
|
38
|
+
// Idle polling: 20-30 min range. One cache miss, long amortization.
|
|
39
|
+
return 1200;
|
|
40
|
+
}
|
|
41
|
+
if (estimatedWaitSeconds <= CACHE_WARM_MAX) {
|
|
42
|
+
// Short wait: stay in cache window. Round up to at least 60s.
|
|
43
|
+
return Math.max(60, Math.min(CACHE_WARM_MAX, Math.round(estimatedWaitSeconds)));
|
|
44
|
+
}
|
|
45
|
+
if (estimatedWaitSeconds <= CACHE_TTL) {
|
|
46
|
+
// Awkward zone: would barely miss cache. Drop to warm max.
|
|
47
|
+
return CACHE_WARM_MAX;
|
|
48
|
+
}
|
|
49
|
+
if (estimatedWaitSeconds <= 600) {
|
|
50
|
+
// 5-10 min: commit to the cache miss, wait the full estimated time.
|
|
51
|
+
return Math.round(estimatedWaitSeconds);
|
|
52
|
+
}
|
|
53
|
+
// Longer waits: cap at estimated time, but don't exceed 3600.
|
|
54
|
+
return Math.min(3600, Math.round(estimatedWaitSeconds));
|
|
55
|
+
}
|
|
56
|
+
/**
|
|
57
|
+
* Classify a delay into a cache-awareness category.
|
|
58
|
+
*/
|
|
59
|
+
function classifyDelay(delay) {
|
|
60
|
+
if (delay <= CACHE_WARM_MAX) {
|
|
61
|
+
return { zone: "warm", note: "prompt cache stays warm" };
|
|
62
|
+
}
|
|
63
|
+
if (delay > CACHE_WARM_MAX && delay <= CACHE_TTL + 30) {
|
|
64
|
+
return {
|
|
65
|
+
zone: "boundary",
|
|
66
|
+
note: `~5min cache TTL boundary — consider ${CACHE_WARM_MAX}s (warm) or 1200s+ (amortized cold)`,
|
|
67
|
+
};
|
|
68
|
+
}
|
|
69
|
+
const missCount = Math.floor(delay / CACHE_TTL);
|
|
70
|
+
return { zone: "cold", note: `cache miss expected (${missCount > 1 ? `${missCount} windows` : "once"})` };
|
|
71
|
+
}
|
|
72
|
+
export const ScheduleWakeupTool = {
|
|
73
|
+
name: "ScheduleWakeup",
|
|
74
|
+
description: "Schedule when to resume work in /loop dynamic mode. The model self-paces iterations of a recurring task.",
|
|
75
|
+
inputSchema,
|
|
76
|
+
riskLevel: "low",
|
|
77
|
+
isReadOnly() {
|
|
78
|
+
return true;
|
|
79
|
+
},
|
|
80
|
+
isConcurrencySafe() {
|
|
81
|
+
return true;
|
|
82
|
+
},
|
|
83
|
+
async call(input, _context) {
|
|
84
|
+
// Clamp delay to [60, 3600]
|
|
85
|
+
const delay = Math.max(60, Math.min(3600, Math.round(input.delaySeconds)));
|
|
86
|
+
pendingWakeup = {
|
|
87
|
+
delaySeconds: delay,
|
|
88
|
+
reason: input.reason,
|
|
89
|
+
prompt: input.prompt,
|
|
90
|
+
scheduledAt: Date.now(),
|
|
91
|
+
};
|
|
92
|
+
const { zone, note } = classifyDelay(delay);
|
|
93
|
+
const icon = zone === "warm" ? "cache:warm" : zone === "boundary" ? "cache:boundary" : "cache:cold";
|
|
94
|
+
return {
|
|
95
|
+
output: `Wakeup scheduled in ${delay}s [${icon}] (${note})\nReason: ${input.reason}`,
|
|
96
|
+
isError: false,
|
|
97
|
+
};
|
|
98
|
+
},
|
|
99
|
+
prompt() {
|
|
100
|
+
return `ScheduleWakeup: Schedule when to resume work in /loop dynamic mode.
|
|
101
|
+
|
|
102
|
+
The prompt cache has a ${CACHE_TTL}s (5-minute) TTL. Choose delays with cache in mind:
|
|
103
|
+
- 60-${CACHE_WARM_MAX}s: cache stays warm. For active work — checking builds, polling state changes.
|
|
104
|
+
- AVOID ~${CACHE_TTL}s: you pay the cache miss without amortizing it. Drop to ${CACHE_WARM_MAX}s or commit to 1200s+.
|
|
105
|
+
- 1200-1800s (20-30min): ideal for idle ticks. One cache miss buys a long wait.
|
|
106
|
+
|
|
107
|
+
Think about what you're waiting for, not round numbers. If a build takes ~8 min, sleep ${CACHE_WARM_MAX}s twice rather than 60s eight times.
|
|
108
|
+
|
|
109
|
+
Parameters:
|
|
110
|
+
- delaySeconds: 60-3600. Clamped by runtime.
|
|
111
|
+
- reason: Short sentence shown to user (e.g., "checking build output").
|
|
112
|
+
- prompt: The /loop prompt to repeat. Pass the same prompt each turn to continue. Omit the ScheduleWakeup call to end the loop.`;
|
|
113
|
+
},
|
|
114
|
+
};
|
|
115
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,29 +1,47 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
2
|
import { getMessageBus } from "../../services/agent-messaging.js";
|
|
3
3
|
const inputSchema = z.object({
|
|
4
|
-
to: z
|
|
4
|
+
to: z
|
|
5
|
+
.string()
|
|
6
|
+
.describe("Target agent ID or name, or '*' for broadcast. Use a background agent's ID to send it a message."),
|
|
5
7
|
content: z.string().describe("Message content"),
|
|
6
8
|
type: z.enum(["request", "response", "status", "error"]).optional(),
|
|
7
9
|
});
|
|
8
10
|
export const SendMessageTool = {
|
|
9
11
|
name: "SendMessage",
|
|
10
|
-
description: "Send a message to another agent. Use for coordination in multi-agent workflows.",
|
|
12
|
+
description: "Send a message to another agent. Use for coordination in multi-agent workflows. Can target background agents by ID.",
|
|
11
13
|
inputSchema,
|
|
12
14
|
riskLevel: "low",
|
|
13
|
-
isReadOnly() {
|
|
14
|
-
|
|
15
|
+
isReadOnly() {
|
|
16
|
+
return true;
|
|
17
|
+
},
|
|
18
|
+
isConcurrencySafe() {
|
|
19
|
+
return true;
|
|
20
|
+
},
|
|
15
21
|
async call(input) {
|
|
16
22
|
const bus = getMessageBus();
|
|
23
|
+
// Check if target is a background agent
|
|
24
|
+
const bgAgent = bus.getBackgroundAgent(input.to);
|
|
25
|
+
if (bgAgent) {
|
|
26
|
+
bus.sendToBackgroundAgent(input.to, input.content);
|
|
27
|
+
const statusInfo = bgAgent.status === "completed"
|
|
28
|
+
? `Agent completed. Result: ${bgAgent.result?.slice(0, 500) ?? "(no result)"}${(bgAgent.result?.length ?? 0) > 500 ? "..." : ""}`
|
|
29
|
+
: bgAgent.status === "error"
|
|
30
|
+
? `Agent errored: ${bgAgent.result ?? "unknown error"}`
|
|
31
|
+
: `Agent still running (started ${Math.round((Date.now() - bgAgent.startedAt) / 1000)}s ago)`;
|
|
32
|
+
return { output: `Message queued for background agent ${input.to}.\nStatus: ${statusInfo}`, isError: false };
|
|
33
|
+
}
|
|
34
|
+
// Standard agent messaging
|
|
17
35
|
bus.send({
|
|
18
|
-
from:
|
|
36
|
+
from: "lead",
|
|
19
37
|
to: input.to,
|
|
20
|
-
type: input.type ??
|
|
38
|
+
type: input.type ?? "request",
|
|
21
39
|
content: input.content,
|
|
22
40
|
});
|
|
23
41
|
return { output: `Message sent to ${input.to}`, isError: false };
|
|
24
42
|
},
|
|
25
43
|
prompt() {
|
|
26
|
-
return "SendMessage: Send messages to other agents for coordination. Use to: '*' for broadcast.";
|
|
44
|
+
return "SendMessage: Send messages to other agents for coordination. Use to: '*' for broadcast, or use a background agent's ID to query its status and send follow-up messages.";
|
|
27
45
|
},
|
|
28
46
|
};
|
|
29
47
|
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { Tool } from "../../Tool.js";
|
|
3
|
+
declare const inputSchema: z.ZodObject<{
|
|
4
|
+
query: z.ZodString;
|
|
5
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
query: string;
|
|
8
|
+
limit?: number | undefined;
|
|
9
|
+
}, {
|
|
10
|
+
query: string;
|
|
11
|
+
limit?: number | undefined;
|
|
12
|
+
}>;
|
|
13
|
+
export declare const SessionSearchTool: Tool<typeof inputSchema>;
|
|
14
|
+
export {};
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import { getSessionDb, searchSessions } from "../../harness/session-db.js";
|
|
3
|
+
const inputSchema = z.object({
|
|
4
|
+
query: z.string().describe("Search query — keywords or phrases to find in past sessions"),
|
|
5
|
+
limit: z.number().optional().describe("Max results to return (default: 5)"),
|
|
6
|
+
});
|
|
7
|
+
export const SessionSearchTool = {
|
|
8
|
+
name: "SessionSearch",
|
|
9
|
+
description: "Search past sessions for relevant context. Use when the current task seems related to previous work.",
|
|
10
|
+
inputSchema,
|
|
11
|
+
riskLevel: "low",
|
|
12
|
+
isReadOnly() {
|
|
13
|
+
return true;
|
|
14
|
+
},
|
|
15
|
+
isConcurrencySafe() {
|
|
16
|
+
return true;
|
|
17
|
+
},
|
|
18
|
+
async call(input, _context) {
|
|
19
|
+
try {
|
|
20
|
+
const db = getSessionDb();
|
|
21
|
+
const results = searchSessions(db, input.query, input.limit ?? 5);
|
|
22
|
+
if (results.length === 0) {
|
|
23
|
+
return { output: `No matching sessions found for "${input.query}".`, isError: false };
|
|
24
|
+
}
|
|
25
|
+
const lines = results.map((r, i) => `${i + 1}. [${r.sessionId}] ${r.model} (${r.messageCount} msgs, $${r.cost.toFixed(3)})\n ${r.snippet}`);
|
|
26
|
+
return { output: `Found ${results.length} matching session(s):\n\n${lines.join("\n\n")}`, isError: false };
|
|
27
|
+
}
|
|
28
|
+
catch (err) {
|
|
29
|
+
return { output: `Session search failed: ${err instanceof Error ? err.message : String(err)}`, isError: true };
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
prompt() {
|
|
33
|
+
return "SessionSearch: Search past sessions for relevant context using full-text search. Use when the current task may relate to previous work. Returns snippets from matching sessions ranked by relevance.";
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -3,11 +3,14 @@ import type { Tool } from "../../Tool.js";
|
|
|
3
3
|
declare const inputSchema: z.ZodObject<{
|
|
4
4
|
skill: z.ZodString;
|
|
5
5
|
args: z.ZodOptional<z.ZodString>;
|
|
6
|
+
path: z.ZodOptional<z.ZodString>;
|
|
6
7
|
}, "strip", z.ZodTypeAny, {
|
|
7
8
|
skill: string;
|
|
9
|
+
path?: string | undefined;
|
|
8
10
|
args?: string | undefined;
|
|
9
11
|
}, {
|
|
10
12
|
skill: string;
|
|
13
|
+
path?: string | undefined;
|
|
11
14
|
args?: string | undefined;
|
|
12
15
|
}>;
|
|
13
16
|
export declare const SkillTool: Tool<typeof inputSchema>;
|
|
@@ -1,44 +1,74 @@
|
|
|
1
|
+
import { readFileSync } from "node:fs";
|
|
2
|
+
import { resolve } from "node:path";
|
|
1
3
|
import { z } from "zod";
|
|
2
|
-
import {
|
|
4
|
+
import { discoverSkills, findSkill } from "../../harness/plugins.js";
|
|
3
5
|
const inputSchema = z.object({
|
|
4
6
|
skill: z.string(),
|
|
5
7
|
args: z.string().optional(),
|
|
8
|
+
path: z.string().optional().describe("Path to a supporting file within the skill directory (Level 2)"),
|
|
6
9
|
});
|
|
7
10
|
export const SkillTool = {
|
|
8
11
|
name: "Skill",
|
|
9
12
|
description: "Execute a skill by loading its definition from project or global skills.",
|
|
10
13
|
inputSchema,
|
|
11
14
|
riskLevel: "low",
|
|
12
|
-
isReadOnly() {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
+
isReadOnly() {
|
|
16
|
+
return true;
|
|
17
|
+
},
|
|
18
|
+
isConcurrencySafe() {
|
|
19
|
+
return false;
|
|
20
|
+
},
|
|
21
|
+
async call(input, _context) {
|
|
15
22
|
// Path traversal protection
|
|
16
23
|
if (input.skill.includes("..") || input.skill.includes("/") || input.skill.includes("\\")) {
|
|
17
24
|
return { output: "Error: Invalid skill name.", isError: true };
|
|
18
25
|
}
|
|
26
|
+
// Early path traversal check for Level 2
|
|
27
|
+
if (input.path && input.path.includes("..")) {
|
|
28
|
+
return { output: "Error: Path traversal not allowed.", isError: true };
|
|
29
|
+
}
|
|
19
30
|
// List skills if "list" or "ls"
|
|
20
31
|
if (input.skill === "list" || input.skill === "ls") {
|
|
21
32
|
const skills = discoverSkills();
|
|
22
33
|
if (skills.length === 0)
|
|
23
34
|
return { output: "No skills found. Create .oh/skills/*.md to add skills.", isError: false };
|
|
24
|
-
const lines = skills.map(s => `${s.name.padEnd(20)} [${s.source}] ${s.description.slice(0, 50)}`);
|
|
25
|
-
return { output: lines.join(
|
|
35
|
+
const lines = skills.map((s) => `${s.name.padEnd(20)} [${s.source}] ${s.description.slice(0, 50)}`);
|
|
36
|
+
return { output: lines.join("\n"), isError: false };
|
|
26
37
|
}
|
|
27
38
|
// Find skill across all sources
|
|
28
39
|
const skill = findSkill(input.skill);
|
|
29
40
|
if (!skill) {
|
|
30
|
-
const available = discoverSkills()
|
|
41
|
+
const available = discoverSkills()
|
|
42
|
+
.map((s) => s.name)
|
|
43
|
+
.join(", ");
|
|
31
44
|
return {
|
|
32
|
-
output: `Error: Skill "${input.skill}" not found.${available ? ` Available: ${available}` :
|
|
45
|
+
output: `Error: Skill "${input.skill}" not found.${available ? ` Available: ${available}` : " Create .oh/skills/*.md to add skills."}`,
|
|
33
46
|
isError: true,
|
|
34
47
|
};
|
|
35
48
|
}
|
|
49
|
+
// Level 2: supporting file access
|
|
50
|
+
if (input.path) {
|
|
51
|
+
const skillDir = resolve(skill.filePath.replace(/\.md$/, ""));
|
|
52
|
+
const filePath = resolve(skillDir, input.path);
|
|
53
|
+
// Block path traversal via absolute paths, .., or any escape from skillDir
|
|
54
|
+
if (!filePath.startsWith(skillDir)) {
|
|
55
|
+
return { output: "Error: Path traversal not allowed.", isError: true };
|
|
56
|
+
}
|
|
57
|
+
try {
|
|
58
|
+
const content = readFileSync(filePath, "utf-8");
|
|
59
|
+
return { output: content, isError: false };
|
|
60
|
+
}
|
|
61
|
+
catch {
|
|
62
|
+
return { output: `File not found: ${input.path} (looked in ${skillDir}/)`, isError: true };
|
|
63
|
+
}
|
|
64
|
+
}
|
|
36
65
|
return { output: skill.content, isError: false };
|
|
37
66
|
},
|
|
38
67
|
prompt() {
|
|
39
68
|
return `Execute a skill by loading its definition. Skills are searched in .oh/skills/ (project) and ~/.oh/skills/ (global). Parameters:
|
|
40
69
|
- skill (string, required): The skill name (or "list" to see available skills).
|
|
41
|
-
- args (string, optional): Arguments to pass to the skill
|
|
70
|
+
- args (string, optional): Arguments to pass to the skill.
|
|
71
|
+
- path (string, optional): Path to a supporting file within the skill's directory (for reference docs, scripts, templates).`;
|
|
42
72
|
},
|
|
43
73
|
};
|
|
44
74
|
//# sourceMappingURL=index.js.map
|
|
@@ -8,13 +8,13 @@ declare const inputSchema: z.ZodObject<{
|
|
|
8
8
|
}, "strip", z.ZodTypeAny, {
|
|
9
9
|
description: string;
|
|
10
10
|
subject: string;
|
|
11
|
-
activeForm?: string | undefined;
|
|
12
11
|
metadata?: Record<string, unknown> | undefined;
|
|
12
|
+
activeForm?: string | undefined;
|
|
13
13
|
}, {
|
|
14
14
|
description: string;
|
|
15
15
|
subject: string;
|
|
16
|
-
activeForm?: string | undefined;
|
|
17
16
|
metadata?: Record<string, unknown> | undefined;
|
|
17
|
+
activeForm?: string | undefined;
|
|
18
18
|
}>;
|
|
19
19
|
export declare const TaskCreateTool: Tool<typeof inputSchema>;
|
|
20
20
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
1
3
|
import { z } from "zod";
|
|
2
|
-
import * as fs from "fs/promises";
|
|
3
|
-
import * as path from "path";
|
|
4
4
|
const inputSchema = z.object({});
|
|
5
5
|
export const TaskListTool = {
|
|
6
6
|
name: "TaskList",
|
|
@@ -21,9 +21,7 @@ export const TaskListTool = {
|
|
|
21
21
|
if (tasks.length === 0) {
|
|
22
22
|
return { output: "No tasks found.", isError: false };
|
|
23
23
|
}
|
|
24
|
-
const output = tasks
|
|
25
|
-
.map((t) => `#${t.id} [${t.status}] ${t.subject}\n ${t.description}`)
|
|
26
|
-
.join("\n\n");
|
|
24
|
+
const output = tasks.map((t) => `#${t.id} [${t.status}] ${t.subject}\n ${t.description}`).join("\n\n");
|
|
27
25
|
return { output, isError: false };
|
|
28
26
|
}
|
|
29
27
|
catch (err) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
1
3
|
import { z } from "zod";
|
|
2
|
-
import * as fs from "fs/promises";
|
|
3
|
-
import * as path from "path";
|
|
4
4
|
const inputSchema = z.object({
|
|
5
5
|
taskId: z.number(),
|
|
6
6
|
reason: z.string().optional(),
|
|
@@ -30,7 +30,7 @@ export const TaskStopTool = {
|
|
|
30
30
|
}
|
|
31
31
|
task.status = "cancelled";
|
|
32
32
|
if (input.reason) {
|
|
33
|
-
task.output =
|
|
33
|
+
task.output = `${task.output ? `${task.output}\n` : ""}Cancelled: ${input.reason}`;
|
|
34
34
|
}
|
|
35
35
|
await fs.writeFile(filePath, JSON.stringify(tasks, null, 2), "utf-8");
|
|
36
36
|
return { output: `Task #${task.id} cancelled.${input.reason ? ` Reason: ${input.reason}` : ""}`, isError: false };
|
|
@@ -12,21 +12,21 @@ declare const inputSchema: z.ZodObject<{
|
|
|
12
12
|
addBlockedBy: z.ZodOptional<z.ZodArray<z.ZodNumber, "many">>;
|
|
13
13
|
}, "strip", z.ZodTypeAny, {
|
|
14
14
|
taskId: number;
|
|
15
|
-
status?: "completed" | "pending" | "
|
|
15
|
+
status?: "completed" | "pending" | "cancelled" | "in_progress" | "deleted" | undefined;
|
|
16
|
+
metadata?: Record<string, unknown> | undefined;
|
|
16
17
|
description?: string | undefined;
|
|
17
18
|
subject?: string | undefined;
|
|
18
19
|
activeForm?: string | undefined;
|
|
19
|
-
metadata?: Record<string, unknown> | undefined;
|
|
20
20
|
owner?: string | undefined;
|
|
21
21
|
addBlocks?: number[] | undefined;
|
|
22
22
|
addBlockedBy?: number[] | undefined;
|
|
23
23
|
}, {
|
|
24
24
|
taskId: number;
|
|
25
|
-
status?: "completed" | "pending" | "
|
|
25
|
+
status?: "completed" | "pending" | "cancelled" | "in_progress" | "deleted" | undefined;
|
|
26
|
+
metadata?: Record<string, unknown> | undefined;
|
|
26
27
|
description?: string | undefined;
|
|
27
28
|
subject?: string | undefined;
|
|
28
29
|
activeForm?: string | undefined;
|
|
29
|
-
metadata?: Record<string, unknown> | undefined;
|
|
30
30
|
owner?: string | undefined;
|
|
31
31
|
addBlocks?: number[] | undefined;
|
|
32
32
|
addBlockedBy?: number[] | undefined;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
+
import * as fs from "node:fs/promises";
|
|
2
|
+
import * as path from "node:path";
|
|
1
3
|
import { z } from "zod";
|
|
2
|
-
import * as fs from "fs/promises";
|
|
3
|
-
import * as path from "path";
|
|
4
4
|
const inputSchema = z.object({
|
|
5
5
|
taskId: z.number(),
|
|
6
6
|
status: z.enum(["pending", "in_progress", "completed", "cancelled", "deleted"]).optional(),
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
-
import { DeferredMcpTool } from "../../mcp/DeferredMcpTool.js";
|
|
3
2
|
import { DeferredTool } from "../../DeferredTool.js";
|
|
3
|
+
import { DeferredMcpTool } from "../../mcp/DeferredMcpTool.js";
|
|
4
4
|
const inputSchema = z.object({
|
|
5
5
|
query: z.string().describe("Tool name or keyword to search for"),
|
|
6
6
|
maxResults: z.number().optional().default(5).describe("Maximum results to return"),
|
|
@@ -10,16 +10,19 @@ export const ToolSearchTool = {
|
|
|
10
10
|
description: "Search for available tools by name or keyword. Resolves deferred MCP tool schemas.",
|
|
11
11
|
inputSchema,
|
|
12
12
|
riskLevel: "low",
|
|
13
|
-
isReadOnly() {
|
|
14
|
-
|
|
13
|
+
isReadOnly() {
|
|
14
|
+
return true;
|
|
15
|
+
},
|
|
16
|
+
isConcurrencySafe() {
|
|
17
|
+
return true;
|
|
18
|
+
},
|
|
15
19
|
async call(input, context) {
|
|
16
20
|
const allTools = context.tools ?? [];
|
|
17
21
|
const query = input.query.toLowerCase();
|
|
18
22
|
const max = input.maxResults ?? 5;
|
|
19
23
|
// Search by name or description
|
|
20
24
|
const matches = allTools
|
|
21
|
-
.filter(t => t.name.toLowerCase().includes(query) ||
|
|
22
|
-
t.description.toLowerCase().includes(query))
|
|
25
|
+
.filter((t) => t.name.toLowerCase().includes(query) || t.description.toLowerCase().includes(query))
|
|
23
26
|
.slice(0, max);
|
|
24
27
|
if (matches.length === 0) {
|
|
25
28
|
return { output: `No tools found matching "${input.query}".`, isError: false };
|
|
@@ -46,7 +49,7 @@ export const ToolSearchTool = {
|
|
|
46
49
|
results.push(`${tool.name}: ${tool.prompt().slice(0, 200)}`);
|
|
47
50
|
}
|
|
48
51
|
}
|
|
49
|
-
return { output: results.join(
|
|
52
|
+
return { output: results.join("\n\n"), isError: false };
|
|
50
53
|
},
|
|
51
54
|
prompt() {
|
|
52
55
|
return `Search for available tools by name or keyword. Use this to discover MCP tools and resolve their schemas before calling them. Parameters:
|
|
@@ -86,7 +86,7 @@ export const WebFetchTool = {
|
|
|
86
86
|
text = stripHtml(text);
|
|
87
87
|
}
|
|
88
88
|
if (text.length > MAX_OUTPUT) {
|
|
89
|
-
text = text.slice(0, MAX_OUTPUT)
|
|
89
|
+
text = `${text.slice(0, MAX_OUTPUT)}\n... [truncated]`;
|
|
90
90
|
}
|
|
91
91
|
return { output: text, isError: false };
|
|
92
92
|
}
|
|
@@ -39,9 +39,7 @@ export const WebSearchTool = {
|
|
|
39
39
|
const title = match[2].replace(/<[^>]*>/g, "").trim();
|
|
40
40
|
// DuckDuckGo wraps URLs in a redirect; extract the actual URL
|
|
41
41
|
const actualUrlMatch = rawUrl.match(/uddg=([^&]+)/);
|
|
42
|
-
const actualUrl = actualUrlMatch
|
|
43
|
-
? decodeURIComponent(actualUrlMatch[1])
|
|
44
|
-
: rawUrl;
|
|
42
|
+
const actualUrl = actualUrlMatch ? decodeURIComponent(actualUrlMatch[1]) : rawUrl;
|
|
45
43
|
titles.push({ url: actualUrl, title });
|
|
46
44
|
}
|
|
47
45
|
const snippets = [];
|
|
@@ -58,9 +56,7 @@ export const WebSearchTool = {
|
|
|
58
56
|
if (results.length === 0) {
|
|
59
57
|
return { output: "No results found.", isError: false };
|
|
60
58
|
}
|
|
61
|
-
const output = results
|
|
62
|
-
.map((r, i) => `${i + 1}. ${r.title}\n ${r.url}\n ${r.snippet}`)
|
|
63
|
-
.join("\n\n");
|
|
59
|
+
const output = results.map((r, i) => `${i + 1}. ${r.title}\n ${r.url}\n ${r.snippet}`).join("\n\n");
|
|
64
60
|
return { output, isError: false };
|
|
65
61
|
}
|
|
66
62
|
catch (err) {
|
package/dist/tools.js
CHANGED
|
@@ -6,44 +6,46 @@
|
|
|
6
6
|
* activated via ToolSearch or first invocation.
|
|
7
7
|
*/
|
|
8
8
|
import { DeferredTool } from "./DeferredTool.js";
|
|
9
|
+
import { AgentTool } from "./tools/AgentTool/index.js";
|
|
10
|
+
import { AskUserTool } from "./tools/AskUserTool/index.js";
|
|
9
11
|
// Core tools — always fully loaded with complete prompts
|
|
10
12
|
import { BashTool } from "./tools/BashTool/index.js";
|
|
13
|
+
import { CronCreateTool, CronDeleteTool, CronListTool } from "./tools/CronTool/index.js";
|
|
14
|
+
import { DiagnosticsTool } from "./tools/DiagnosticsTool/index.js";
|
|
15
|
+
import { EnterPlanModeTool } from "./tools/EnterPlanModeTool/index.js";
|
|
16
|
+
import { EnterWorktreeTool } from "./tools/EnterWorktreeTool/index.js";
|
|
17
|
+
import { ExitPlanModeTool } from "./tools/ExitPlanModeTool/index.js";
|
|
18
|
+
import { ExitWorktreeTool } from "./tools/ExitWorktreeTool/index.js";
|
|
19
|
+
import { FileEditTool } from "./tools/FileEditTool/index.js";
|
|
11
20
|
import { FileReadTool } from "./tools/FileReadTool/index.js";
|
|
12
21
|
import { FileWriteTool } from "./tools/FileWriteTool/index.js";
|
|
13
|
-
import { FileEditTool } from "./tools/FileEditTool/index.js";
|
|
14
22
|
import { GlobTool } from "./tools/GlobTool/index.js";
|
|
15
23
|
import { GrepTool } from "./tools/GrepTool/index.js";
|
|
24
|
+
import { ImageReadTool } from "./tools/ImageReadTool/index.js";
|
|
25
|
+
import { KillProcessTool } from "./tools/KillProcessTool/index.js";
|
|
16
26
|
import { LSTool } from "./tools/LSTool/index.js";
|
|
17
|
-
import { AskUserTool } from "./tools/AskUserTool/index.js";
|
|
18
|
-
import { AgentTool } from "./tools/AgentTool/index.js";
|
|
19
|
-
import { TaskCreateTool } from "./tools/TaskCreateTool/index.js";
|
|
20
|
-
import { TaskUpdateTool } from "./tools/TaskUpdateTool/index.js";
|
|
21
|
-
import { TaskListTool } from "./tools/TaskListTool/index.js";
|
|
22
|
-
import { EnterPlanModeTool } from "./tools/EnterPlanModeTool/index.js";
|
|
23
|
-
import { ExitPlanModeTool } from "./tools/ExitPlanModeTool/index.js";
|
|
24
|
-
import { ToolSearchTool } from "./tools/ToolSearchTool/index.js";
|
|
25
27
|
import { MemoryTool } from "./tools/MemoryTool/index.js";
|
|
26
|
-
import {
|
|
27
|
-
|
|
28
|
-
import { WebFetchTool } from "./tools/WebFetchTool/index.js";
|
|
29
|
-
import { WebSearchTool } from "./tools/WebSearchTool/index.js";
|
|
30
|
-
import { TaskGetTool } from "./tools/TaskGetTool/index.js";
|
|
31
|
-
import { TaskStopTool } from "./tools/TaskStopTool/index.js";
|
|
32
|
-
import { TaskOutputTool } from "./tools/TaskOutputTool/index.js";
|
|
33
|
-
import { SkillTool } from "./tools/SkillTool/index.js";
|
|
28
|
+
import { MonitorTool } from "./tools/MonitorTool/index.js";
|
|
29
|
+
import { MultiEditTool } from "./tools/MultiEditTool/index.js";
|
|
34
30
|
import { NotebookEditTool } from "./tools/NotebookEditTool/index.js";
|
|
35
|
-
import { DiagnosticsTool } from "./tools/DiagnosticsTool/index.js";
|
|
36
31
|
import { ParallelAgentTool } from "./tools/ParallelAgentTool/index.js";
|
|
37
|
-
import { SendMessageTool } from "./tools/SendMessageTool/index.js";
|
|
38
|
-
import { CronCreateTool, CronDeleteTool, CronListTool } from "./tools/CronTool/index.js";
|
|
39
|
-
import { EnterWorktreeTool } from "./tools/EnterWorktreeTool/index.js";
|
|
40
|
-
import { ExitWorktreeTool } from "./tools/ExitWorktreeTool/index.js";
|
|
41
|
-
import { KillProcessTool } from "./tools/KillProcessTool/index.js";
|
|
42
|
-
import { RemoteTriggerTool } from "./tools/RemoteTriggerTool/index.js";
|
|
43
|
-
import { MultiEditTool } from "./tools/MultiEditTool/index.js";
|
|
44
32
|
import { PipelineTool } from "./tools/PipelineTool/index.js";
|
|
45
33
|
import { PowerShellTool } from "./tools/PowerShellTool/index.js";
|
|
46
|
-
import {
|
|
34
|
+
import { RemoteTriggerTool } from "./tools/RemoteTriggerTool/index.js";
|
|
35
|
+
import { ScheduleWakeupTool } from "./tools/ScheduleWakeupTool/index.js";
|
|
36
|
+
import { SendMessageTool } from "./tools/SendMessageTool/index.js";
|
|
37
|
+
// Extended tools — deferred loading (minimal prompt until first use)
|
|
38
|
+
import { SessionSearchTool } from "./tools/SessionSearchTool/index.js";
|
|
39
|
+
import { SkillTool } from "./tools/SkillTool/index.js";
|
|
40
|
+
import { TaskCreateTool } from "./tools/TaskCreateTool/index.js";
|
|
41
|
+
import { TaskGetTool } from "./tools/TaskGetTool/index.js";
|
|
42
|
+
import { TaskListTool } from "./tools/TaskListTool/index.js";
|
|
43
|
+
import { TaskOutputTool } from "./tools/TaskOutputTool/index.js";
|
|
44
|
+
import { TaskStopTool } from "./tools/TaskStopTool/index.js";
|
|
45
|
+
import { TaskUpdateTool } from "./tools/TaskUpdateTool/index.js";
|
|
46
|
+
import { ToolSearchTool } from "./tools/ToolSearchTool/index.js";
|
|
47
|
+
import { WebFetchTool } from "./tools/WebFetchTool/index.js";
|
|
48
|
+
import { WebSearchTool } from "./tools/WebSearchTool/index.js";
|
|
47
49
|
/**
|
|
48
50
|
* Returns all registered tools.
|
|
49
51
|
*
|
|
@@ -100,10 +102,9 @@ export function getAllTools() {
|
|
|
100
102
|
MultiEditTool,
|
|
101
103
|
PowerShellTool,
|
|
102
104
|
MonitorTool,
|
|
105
|
+
ScheduleWakeupTool,
|
|
106
|
+
SessionSearchTool,
|
|
103
107
|
];
|
|
104
|
-
return [
|
|
105
|
-
...core,
|
|
106
|
-
...extended.map(t => new DeferredTool(t)),
|
|
107
|
-
];
|
|
108
|
+
return [...core, ...extended.map((t) => new DeferredTool(t))];
|
|
108
109
|
}
|
|
109
110
|
//# sourceMappingURL=tools.js.map
|