qlogicagent 2.20.6 → 2.20.8
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 +27 -54
- package/dist/agent-contract.js +1 -1
- package/dist/agent.js +42 -41
- package/dist/cli.js +1 -1
- package/dist/host-contract.js +1 -1
- package/dist/index.js +539 -565
- package/dist/orchestration.js +14 -14
- package/dist/project-memory-host.js +30 -33
- package/dist/protocol.js +1 -1
- package/dist/types/agent/memory-recall-context.d.ts +7 -0
- package/dist/types/agent/tool-loop/artifact-final-contract.d.ts +2 -0
- package/dist/types/agent/tool-loop/direct-response-contract.d.ts +12 -0
- package/dist/types/agent/tool-loop/final-status-stream-suppressor.d.ts +22 -0
- package/dist/types/agent/tool-loop/loop-helpers.d.ts +2 -2
- package/dist/types/agent/tool-loop.d.ts +5 -1
- package/dist/types/agent/types.d.ts +27 -15
- package/dist/types/cli/acp-commands.d.ts +1 -1
- package/dist/types/cli/acp-extended-handlers.d.ts +13 -3
- package/dist/types/cli/agent-runtime-session-state.d.ts +1 -0
- package/dist/types/cli/base-tool-bootstrap.d.ts +0 -7
- package/dist/types/cli/community-skill-installer.d.ts +2 -0
- package/dist/types/cli/core-tool-coordinator.d.ts +0 -3
- package/dist/types/cli/core-tools/registry.d.ts +1 -4
- package/dist/types/cli/handlers/config-handler.d.ts +0 -1
- package/dist/types/cli/handlers/goal-handler.d.ts +24 -0
- package/dist/types/cli/handlers/memory-handler.d.ts +1 -2
- package/dist/types/cli/handlers/skill-curator-handler.d.ts +8 -0
- package/dist/types/cli/handlers/turn-handler.d.ts +9 -12
- package/dist/types/cli/memory-candidate-service.d.ts +1 -8
- package/dist/types/cli/memory-coordinator.d.ts +1 -13
- package/dist/types/cli/product-acp-params.d.ts +1 -0
- package/dist/types/cli/provider-core-facade.d.ts +2 -30
- package/dist/types/cli/rpc-registry.d.ts +2 -4
- package/dist/types/cli/runtime-hook-bootstrap.d.ts +1 -2
- package/dist/types/cli/stdio-acp-request-host.d.ts +1 -2
- package/dist/types/cli/stdio-rpc-handler-hosts.d.ts +0 -2
- package/dist/types/cli/stdio-runtime-bootstrap.d.ts +0 -7
- package/dist/types/cli/stdio-runtime-services.d.ts +1 -8
- package/dist/types/cli/stdio-server.d.ts +0 -4
- package/dist/types/cli/tool-bootstrap-core-registration.d.ts +0 -4
- package/dist/types/cli/tool-bootstrap.d.ts +0 -17
- package/dist/types/contracts/memory-recall-packet.d.ts +31 -0
- package/dist/types/contracts/memory-response-contract.d.ts +2 -0
- package/dist/types/contracts/tool-execution-evidence.d.ts +8 -0
- package/dist/types/contracts/tool-name.d.ts +10 -0
- package/dist/types/contracts/turn-event.d.ts +36 -3
- package/dist/types/host-contract/acp-content.d.ts +45 -0
- package/dist/types/host-contract/index.d.ts +65 -48
- package/dist/types/orchestration/agent-instance.d.ts +21 -1
- package/dist/types/orchestration/agent-roster.d.ts +14 -15
- package/dist/types/orchestration/dag-scheduler.d.ts +4 -0
- package/dist/types/orchestration/goal-context-envelope.d.ts +7 -0
- package/dist/types/orchestration/goal-loop-coordinator.d.ts +55 -12
- package/dist/types/orchestration/goal-mode-adapters.d.ts +13 -1
- package/dist/types/orchestration/goal-run-persistence.d.ts +9 -2
- package/dist/types/orchestration/goal-run-types.d.ts +127 -13
- package/dist/types/orchestration/index.d.ts +1 -1
- package/dist/types/orchestration/product-persistence.d.ts +10 -1
- package/dist/types/orchestration/product-planner.d.ts +3 -3
- package/dist/types/orchestration/testing/delegate-test-bridge.d.ts +1 -0
- package/dist/types/orchestration/workflow/data-item.d.ts +1 -1
- package/dist/types/orchestration/workflow/expression.d.ts +1 -2
- package/dist/types/orchestration/workflow/workflow-patch.d.ts +1 -2
- package/dist/types/orchestration/workflow/workflow-render.d.ts +1 -2
- package/dist/types/project-memory-host.d.ts +1 -0
- package/dist/types/protocol/agent-contract.d.ts +10 -8
- package/dist/types/protocol/methods.d.ts +2 -19
- package/dist/types/protocol/notifications.d.ts +1 -1
- package/dist/types/protocol/wire/acp-agent-management.d.ts +48 -6
- package/dist/types/protocol/wire/acp-protocol.d.ts +11 -24
- package/dist/types/protocol/wire/agent-methods.d.ts +5 -142
- package/dist/types/protocol/wire/chat-types.d.ts +50 -0
- package/dist/types/protocol/wire/index.d.ts +2 -2
- package/dist/types/protocol/wire/notification-payloads.d.ts +73 -122
- package/dist/types/protocol/wire/thread-protocol.d.ts +4 -40
- package/dist/types/runtime/community/community-consent-client.d.ts +0 -13
- package/dist/types/runtime/context/context-compression-strategies.d.ts +29 -0
- package/dist/types/runtime/context/context-envelope.d.ts +3 -0
- package/dist/types/runtime/execution/dream-agent.d.ts +4 -5
- package/dist/types/runtime/execution/mcp-capability-selection.d.ts +54 -0
- package/dist/types/runtime/execution/memory-decay.d.ts +1 -1
- package/dist/types/runtime/execution/search-result-quality.d.ts +22 -0
- package/dist/types/runtime/execution/streaming-tool-executor.d.ts +2 -0
- package/dist/types/runtime/execution/tool-result-storage.d.ts +44 -0
- package/dist/types/runtime/hooks/memory-hooks.d.ts +3 -2
- package/dist/types/runtime/infra/agent-paths.d.ts +0 -8
- package/dist/types/runtime/infra/default-path-service.d.ts +0 -2
- package/dist/types/runtime/infra/llmrouter-managed-inference.d.ts +54 -1
- package/dist/types/runtime/infra/media-persistence.d.ts +6 -36
- package/dist/types/runtime/memory/implicit-extraction.d.ts +7 -15
- package/dist/types/runtime/memory/memory-recall-attribution.d.ts +24 -0
- package/dist/types/runtime/ports/agent-runtime-ports.d.ts +14 -0
- package/dist/types/runtime/ports/index.d.ts +1 -3
- package/dist/types/runtime/ports/memory-provider.d.ts +2 -19
- package/dist/types/runtime/ports/memory-writer.d.ts +1 -1
- package/dist/types/runtime/ports/path-service.d.ts +0 -2
- package/dist/types/runtime/prompt/capability-routing-policy.d.ts +13 -0
- package/dist/types/runtime/prompt/environment-context.d.ts +3 -6
- package/dist/types/runtime/prompt/fresh-workspace-evidence.d.ts +8 -13
- package/dist/types/runtime/prompt/tool-necessity-policy.d.ts +12 -0
- package/dist/types/skills/mcp/mcp-manager.d.ts +29 -4
- package/dist/types/skills/memory/host-memory-provider.d.ts +3 -9
- package/dist/types/skills/memory/memdir.d.ts +1 -1
- package/dist/types/skills/memory/memory-content-safety.d.ts +1 -0
- package/dist/types/skills/permissions/hook-runner.d.ts +3 -3
- package/dist/types/skills/portable-tool.d.ts +5 -0
- package/dist/types/skills/skill-system/skill-lifecycle.d.ts +1 -0
- package/dist/types/skills/tools/exec-tool.d.ts +1 -5
- package/dist/types/skills/tools/shell/command-compatibility.d.ts +3 -0
- package/dist/types/skills/tools/shell/index.d.ts +4 -3
- package/dist/types/skills/tools/shell/shell-exec.d.ts +15 -8
- package/dist/types/skills/tools/shell/shell-provider.d.ts +26 -0
- package/dist/types/transport/acp-server.d.ts +4 -1
- package/dist/types/transport/host-community-client.d.ts +0 -1
- package/dist/types/transport/host-request-client.d.ts +1 -0
- package/dist/types/transport/host-run-state-client.d.ts +1 -1
- package/dist/workflow-host.js +6 -6
- package/package.json +4 -3
- package/dist/skills/mcp/astraclaw-native-mcp-server.js +0 -12
- package/dist/types/cli/core-tools/checkpoint-tool-bootstrap.d.ts +0 -9
- package/dist/types/cli/core-tools/checkpoint-tool-service.d.ts +0 -7
- package/dist/types/cli/core-tools/config-tool-bootstrap.d.ts +0 -7
- package/dist/types/cli/core-tools/config-tool-service.d.ts +0 -13
- package/dist/types/cli/core-tools/monitor-tool-bootstrap.d.ts +0 -7
- package/dist/types/cli/core-tools/monitor-tool-service.d.ts +0 -6
- package/dist/types/cli/dev-tool-bootstrap.d.ts +0 -9
- package/dist/types/cli/dev-tools/dev-tool-bootstrap-service.d.ts +0 -7
- package/dist/types/cli/dev-tools/dev-tool-registry.d.ts +0 -8
- package/dist/types/cli/dev-tools/incremental-repo-map.d.ts +0 -81
- package/dist/types/cli/dev-tools/lsp-supervisor.d.ts +0 -59
- package/dist/types/cli/dev-tools/lsp-tool-service.d.ts +0 -7
- package/dist/types/cli/handlers/media-handler.d.ts +0 -19
- package/dist/types/cli/handlers/skills-handler.d.ts +0 -37
- package/dist/types/cli/industrial-runtime-store.d.ts +0 -16
- package/dist/types/cli/media-capability-schema.d.ts +0 -49
- package/dist/types/cli/media-file-api-service.d.ts +0 -73
- package/dist/types/cli/media-file-tool-service.d.ts +0 -13
- package/dist/types/cli/media-inline.d.ts +0 -31
- package/dist/types/cli/media-runtime-facade.d.ts +0 -51
- package/dist/types/cli/media-understanding.d.ts +0 -102
- package/dist/types/cli/skill-invocation-service.d.ts +0 -10
- package/dist/types/cli/skill-tools-bootstrap.d.ts +0 -35
- package/dist/types/cli/skills-query-service.d.ts +0 -41
- package/dist/types/cli/tool-bootstrap-media-registration.d.ts +0 -20
- package/dist/types/cli/turn-media-setup.d.ts +0 -34
- package/dist/types/cli/turn-preview-browser-setup.d.ts +0 -15
- package/dist/types/runtime/infra/astraclaw-capabilities.d.ts +0 -33
- package/dist/types/runtime/infra/builtin-skills-seed.d.ts +0 -31
- package/dist/types/runtime/infra/checkpoint-backend.d.ts +0 -9
- package/dist/types/runtime/infra/industrial-runtime-session-server.d.ts +0 -20
- package/dist/types/runtime/infra/migrate-project-skills.d.ts +0 -24
- package/dist/types/runtime/infra/project-skill-manifest.d.ts +0 -21
- package/dist/types/runtime/infra/skill-resolver.d.ts +0 -74
- package/dist/types/runtime/infra/worktree-backend.d.ts +0 -86
- package/dist/types/runtime/ports/checkpoint-contracts.d.ts +0 -19
- package/dist/types/runtime/ports/worktree-contracts.d.ts +0 -22
- package/dist/types/skills/mcp/astraclaw-native-mcp-server.d.ts +0 -1
- package/dist/types/skills/memory/memory-tool.d.ts +0 -87
- package/dist/types/skills/tools/checkpoint-tool.d.ts +0 -66
- package/dist/types/skills/tools/config-tool.d.ts +0 -61
- package/dist/types/skills/tools/file-management-tool.d.ts +0 -90
- package/dist/types/skills/tools/image-generate-tool.d.ts +0 -98
- package/dist/types/skills/tools/instructions-tool.d.ts +0 -65
- package/dist/types/skills/tools/lsp-tool.d.ts +0 -153
- package/dist/types/skills/tools/media-cancel-tool.d.ts +0 -30
- package/dist/types/skills/tools/media-understand-tool.d.ts +0 -28
- package/dist/types/skills/tools/monitor-tool.d.ts +0 -113
- package/dist/types/skills/tools/music-generate-tool.d.ts +0 -80
- package/dist/types/skills/tools/notebook-edit-tool.d.ts +0 -15
- package/dist/types/skills/tools/preview-browser-tool.d.ts +0 -136
- package/dist/types/skills/tools/repo-map-tool.d.ts +0 -52
- package/dist/types/skills/tools/skill-tool.d.ts +0 -142
- package/dist/types/skills/tools/sleep-tool.d.ts +0 -49
- package/dist/types/skills/tools/stt-tool.d.ts +0 -33
- package/dist/types/skills/tools/subagent-decision-tool.d.ts +0 -15
- package/dist/types/skills/tools/three-d-generate-tool.d.ts +0 -46
- package/dist/types/skills/tools/tts-tool.d.ts +0 -50
- package/dist/types/skills/tools/video-edit-tool.d.ts +0 -72
- package/dist/types/skills/tools/video-generate-tool.d.ts +0 -162
- package/dist/types/skills/tools/video-merge-tool.d.ts +0 -105
- package/dist/types/skills/tools/video-upscale-tool.d.ts +0 -45
- package/dist/types/skills/tools/voice-clone-tool.d.ts +0 -40
- package/dist/types/skills/tools/worktree-tool.d.ts +0 -69
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const MONITOR_TOOL_NAME: "monitor";
|
|
3
|
-
/** The kind of event source the agent can monitor. */
|
|
4
|
-
export type MonitorSource = "process" | "file" | "task" | "custom";
|
|
5
|
-
export type MonitorAction = "start" | "stop" | "list";
|
|
6
|
-
export interface MonitorToolParams {
|
|
7
|
-
action: MonitorAction;
|
|
8
|
-
/** Required for start/stop — identifies the monitor instance. */
|
|
9
|
-
monitorId?: string;
|
|
10
|
-
/** Required for start — what kind of event source to watch. */
|
|
11
|
-
source?: MonitorSource;
|
|
12
|
-
/** Required for start — selector for the target (pid, path, taskId, custom key). */
|
|
13
|
-
target?: string;
|
|
14
|
-
/** Optional for start — conditions that should trigger wake-up. */
|
|
15
|
-
conditions?: MonitorCondition[];
|
|
16
|
-
/** Optional for start — max time to monitor in seconds before auto-stop. */
|
|
17
|
-
timeoutSeconds?: number;
|
|
18
|
-
}
|
|
19
|
-
export interface MonitorCondition {
|
|
20
|
-
/** What to check: exit code, stdout pattern, file modification, task status. */
|
|
21
|
-
type: "exit" | "output_match" | "file_changed" | "task_status";
|
|
22
|
-
/** Pattern or value to match (regex for output_match, status name for task_status). */
|
|
23
|
-
value?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare const MONITOR_TOOL_SCHEMA: {
|
|
26
|
-
readonly type: "object";
|
|
27
|
-
readonly properties: {
|
|
28
|
-
readonly action: {
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
readonly enum: readonly ["start", "stop", "list"];
|
|
31
|
-
readonly description: "Action to perform: start a new monitor, stop an existing one, or list active monitors.";
|
|
32
|
-
};
|
|
33
|
-
readonly monitorId: {
|
|
34
|
-
readonly type: "string";
|
|
35
|
-
readonly description: "Identifier for the monitor instance. Required for start/stop.";
|
|
36
|
-
};
|
|
37
|
-
readonly source: {
|
|
38
|
-
readonly type: "string";
|
|
39
|
-
readonly enum: readonly ["file"];
|
|
40
|
-
readonly description: "Type of event source to watch. Currently only \"file\" is supported.";
|
|
41
|
-
};
|
|
42
|
-
readonly target: {
|
|
43
|
-
readonly type: "string";
|
|
44
|
-
readonly description: "Selector for the monitored target. For file: a path or glob pattern.";
|
|
45
|
-
};
|
|
46
|
-
readonly conditions: {
|
|
47
|
-
readonly type: "array";
|
|
48
|
-
readonly items: {
|
|
49
|
-
readonly type: "object";
|
|
50
|
-
readonly properties: {
|
|
51
|
-
readonly type: {
|
|
52
|
-
readonly type: "string";
|
|
53
|
-
readonly enum: readonly ["exit", "output_match", "file_changed", "task_status"];
|
|
54
|
-
};
|
|
55
|
-
readonly value: {
|
|
56
|
-
readonly type: "string";
|
|
57
|
-
};
|
|
58
|
-
};
|
|
59
|
-
readonly required: readonly ["type"];
|
|
60
|
-
};
|
|
61
|
-
readonly description: "Conditions that trigger a wake-up notification.";
|
|
62
|
-
};
|
|
63
|
-
readonly timeoutSeconds: {
|
|
64
|
-
readonly type: "number";
|
|
65
|
-
readonly description: "Auto-stop after this many seconds (default: 3600).";
|
|
66
|
-
readonly minimum: 1;
|
|
67
|
-
readonly maximum: 86400;
|
|
68
|
-
};
|
|
69
|
-
};
|
|
70
|
-
readonly required: readonly ["action"];
|
|
71
|
-
};
|
|
72
|
-
/** Info about an active monitor. */
|
|
73
|
-
export interface MonitorInfo {
|
|
74
|
-
monitorId: string;
|
|
75
|
-
source: MonitorSource;
|
|
76
|
-
target: string;
|
|
77
|
-
conditions: MonitorCondition[];
|
|
78
|
-
startedAt: number;
|
|
79
|
-
timeoutSeconds: number;
|
|
80
|
-
/** Events received so far. */
|
|
81
|
-
eventCount: number;
|
|
82
|
-
}
|
|
83
|
-
/** Result of monitor operations. */
|
|
84
|
-
export interface MonitorResult {
|
|
85
|
-
action: MonitorAction;
|
|
86
|
-
success: boolean;
|
|
87
|
-
monitorId?: string;
|
|
88
|
-
monitors?: MonitorInfo[];
|
|
89
|
-
error?: string;
|
|
90
|
-
}
|
|
91
|
-
/**
|
|
92
|
-
* Runtime dependencies injected by the host.
|
|
93
|
-
*
|
|
94
|
-
* The host is responsible for:
|
|
95
|
-
* 1. Actually watching the event source (polling, inotify, process hooks, etc.)
|
|
96
|
-
* 2. Delivering notifications back to the agent loop (via tick or wake-up)
|
|
97
|
-
* 3. Cleaning up monitors when they time out or are stopped.
|
|
98
|
-
*/
|
|
99
|
-
export interface MonitorToolDeps {
|
|
100
|
-
/** Start monitoring a target. Returns the created monitor info. */
|
|
101
|
-
startMonitor(params: {
|
|
102
|
-
monitorId: string;
|
|
103
|
-
source: MonitorSource;
|
|
104
|
-
target: string;
|
|
105
|
-
conditions: MonitorCondition[];
|
|
106
|
-
timeoutSeconds: number;
|
|
107
|
-
}): Promise<MonitorResult>;
|
|
108
|
-
/** Stop an active monitor. */
|
|
109
|
-
stopMonitor(monitorId: string): Promise<MonitorResult>;
|
|
110
|
-
/** List all active monitors for this session. */
|
|
111
|
-
listMonitors(): Promise<MonitorInfo[]>;
|
|
112
|
-
}
|
|
113
|
-
export declare function createMonitorTool(deps: MonitorToolDeps): PortableTool<MonitorToolParams>;
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const MUSIC_GENERATE_TOOL_NAME: "music_generate";
|
|
3
|
-
export interface MusicGenerateToolParams {
|
|
4
|
-
prompt: string;
|
|
5
|
-
purpose?: string;
|
|
6
|
-
style?: string;
|
|
7
|
-
lyrics?: string;
|
|
8
|
-
duration?: number;
|
|
9
|
-
is_instrumental?: boolean;
|
|
10
|
-
cover_audio_url?: string;
|
|
11
|
-
audio_format?: string;
|
|
12
|
-
}
|
|
13
|
-
export declare const MUSIC_GENERATE_TOOL_SCHEMA: {
|
|
14
|
-
readonly type: "object";
|
|
15
|
-
readonly properties: {
|
|
16
|
-
readonly prompt: {
|
|
17
|
-
readonly type: "string";
|
|
18
|
-
readonly description: string;
|
|
19
|
-
};
|
|
20
|
-
readonly purpose: {
|
|
21
|
-
readonly type: "string";
|
|
22
|
-
readonly description: "Intended use: 'background-music', 'ringtone', 'short-video-bgm', 'full-song', 'notification-sound', etc.";
|
|
23
|
-
};
|
|
24
|
-
readonly style: {
|
|
25
|
-
readonly type: "string";
|
|
26
|
-
readonly description: "Musical style/genre: 'lo-fi', 'pop', 'rock', 'jazz', 'classical', 'electronic', 'ambient', etc.";
|
|
27
|
-
};
|
|
28
|
-
readonly lyrics: {
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
readonly description: "Optional lyrics for vocal music. Structure with [verse], [chorus], [bridge] tags if desired.";
|
|
31
|
-
};
|
|
32
|
-
readonly duration: {
|
|
33
|
-
readonly type: "number";
|
|
34
|
-
readonly description: "Duration in seconds (5-300). Infer from purpose: ringtone 15-30s, BGM 30-60s, full song 120-180s.";
|
|
35
|
-
};
|
|
36
|
-
readonly is_instrumental: {
|
|
37
|
-
readonly type: "boolean";
|
|
38
|
-
readonly description: "Set true for pure instrumental music without vocals. Defaults to true when no lyrics are provided.";
|
|
39
|
-
};
|
|
40
|
-
readonly cover_audio_url: {
|
|
41
|
-
readonly type: "string";
|
|
42
|
-
readonly description: string;
|
|
43
|
-
};
|
|
44
|
-
readonly audio_format: {
|
|
45
|
-
readonly type: "string";
|
|
46
|
-
readonly enum: readonly ["mp3", "wav", "flac"];
|
|
47
|
-
readonly description: "Output audio format. Defaults to mp3.";
|
|
48
|
-
};
|
|
49
|
-
};
|
|
50
|
-
readonly required: readonly ["prompt"];
|
|
51
|
-
};
|
|
52
|
-
export interface MusicGenerateResult {
|
|
53
|
-
mediaUrls: string[];
|
|
54
|
-
model?: string;
|
|
55
|
-
durationMs?: number;
|
|
56
|
-
}
|
|
57
|
-
/** Deps injected by the host runtime for music generation. */
|
|
58
|
-
export interface MusicGenerateToolDeps {
|
|
59
|
-
/**
|
|
60
|
-
* Generate music via the configured backend.
|
|
61
|
-
* The host handles model selection, failover, and storage.
|
|
62
|
-
*/
|
|
63
|
-
generateMusic(params: {
|
|
64
|
-
prompt: string;
|
|
65
|
-
purpose?: string;
|
|
66
|
-
style?: string;
|
|
67
|
-
lyrics?: string;
|
|
68
|
-
duration?: number;
|
|
69
|
-
isInstrumental?: boolean;
|
|
70
|
-
audioUrl?: string;
|
|
71
|
-
audioFormat?: string;
|
|
72
|
-
}): Promise<MusicGenerateResult>;
|
|
73
|
-
/**
|
|
74
|
-
* Optional: auto-generate lyrics from a prompt (MiniMax Lyrics Generation API).
|
|
75
|
-
* When provided, the tool will auto-call this when no lyrics are supplied
|
|
76
|
-
* and the song is not marked as instrumental.
|
|
77
|
-
*/
|
|
78
|
-
generateLyrics?: (prompt: string) => Promise<string>;
|
|
79
|
-
}
|
|
80
|
-
export declare function createMusicGenerateTool(deps: MusicGenerateToolDeps): PortableTool<MusicGenerateToolParams>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export type NotebookEditMode = "replace" | "insert" | "delete";
|
|
3
|
-
export interface NotebookEditParams {
|
|
4
|
-
/** Absolute path to the .ipynb file */
|
|
5
|
-
notebook_path: string;
|
|
6
|
-
/** Cell number (1-based) to operate on */
|
|
7
|
-
cell_number: number;
|
|
8
|
-
/** New cell source content (required for replace/insert) */
|
|
9
|
-
new_source?: string;
|
|
10
|
-
/** Cell type for insert (default: "code") */
|
|
11
|
-
cell_type?: "code" | "markdown";
|
|
12
|
-
/** Edit mode (default: "replace") */
|
|
13
|
-
edit_mode?: NotebookEditMode;
|
|
14
|
-
}
|
|
15
|
-
export declare function createNotebookEditTool(): PortableTool<NotebookEditParams>;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
import { type PreviewBrowserDriveResult, type PreviewBrowserToolParams } from "../../host-contract/index.js";
|
|
3
|
-
export { PREVIEW_BROWSER_ACTIONS } from "../../host-contract/index.js";
|
|
4
|
-
export type { PreviewBrowserAction, PreviewBrowserDriveResult, PreviewBrowserToolParams, } from "../../host-contract/index.js";
|
|
5
|
-
export declare const PREVIEW_BROWSER_TOOL_NAME: "preview_browser";
|
|
6
|
-
export interface PreviewBrowserToolDeps {
|
|
7
|
-
/**
|
|
8
|
-
* Drive the host-side preview view for one action. The host renders/executes it and
|
|
9
|
-
* returns text and/or a screenshot. If the host is not connected or the action fails,
|
|
10
|
-
* it returns `{ error }` (never silently empty). `signal` aborts an in-flight action.
|
|
11
|
-
*/
|
|
12
|
-
drive(params: PreviewBrowserToolParams, signal?: AbortSignal): Promise<PreviewBrowserDriveResult>;
|
|
13
|
-
}
|
|
14
|
-
export declare const PREVIEW_BROWSER_TOOL_SCHEMA: {
|
|
15
|
-
readonly type: "object";
|
|
16
|
-
readonly properties: {
|
|
17
|
-
readonly action: {
|
|
18
|
-
readonly type: "string";
|
|
19
|
-
readonly enum: readonly ["navigate", "snapshot", "click", "type", "screenshot", "console", "network"];
|
|
20
|
-
readonly description: string;
|
|
21
|
-
};
|
|
22
|
-
readonly url: {
|
|
23
|
-
readonly type: "string";
|
|
24
|
-
readonly description: "URL to open. Required for action 'navigate'.";
|
|
25
|
-
};
|
|
26
|
-
readonly ref: {
|
|
27
|
-
readonly type: "string";
|
|
28
|
-
readonly description: "aria-ref of the target element, taken from a prior 'snapshot'. Required for 'click' and 'type'.";
|
|
29
|
-
};
|
|
30
|
-
readonly text: {
|
|
31
|
-
readonly type: "string";
|
|
32
|
-
readonly description: "Text to type into the element. Required for action 'type'.";
|
|
33
|
-
};
|
|
34
|
-
readonly submit: {
|
|
35
|
-
readonly type: "boolean";
|
|
36
|
-
readonly description: "For 'type': press Enter after typing to submit. Default false.";
|
|
37
|
-
};
|
|
38
|
-
readonly viewId: {
|
|
39
|
-
readonly type: "string";
|
|
40
|
-
readonly description: string;
|
|
41
|
-
};
|
|
42
|
-
};
|
|
43
|
-
readonly required: readonly ["action"];
|
|
44
|
-
readonly oneOf: readonly [{
|
|
45
|
-
readonly type: "object";
|
|
46
|
-
readonly properties: {
|
|
47
|
-
readonly action: {
|
|
48
|
-
readonly type: "string";
|
|
49
|
-
readonly const: "navigate";
|
|
50
|
-
};
|
|
51
|
-
readonly url: {
|
|
52
|
-
readonly type: "string";
|
|
53
|
-
readonly description: "URL to open.";
|
|
54
|
-
};
|
|
55
|
-
readonly viewId: {
|
|
56
|
-
type: "string";
|
|
57
|
-
description: string;
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
readonly required: readonly ["action", "url"];
|
|
61
|
-
readonly additionalProperties: false;
|
|
62
|
-
}, {
|
|
63
|
-
readonly type: "object";
|
|
64
|
-
readonly properties: {
|
|
65
|
-
readonly action: {
|
|
66
|
-
readonly type: "string";
|
|
67
|
-
readonly const: "snapshot";
|
|
68
|
-
};
|
|
69
|
-
readonly viewId: {
|
|
70
|
-
type: "string";
|
|
71
|
-
description: string;
|
|
72
|
-
};
|
|
73
|
-
};
|
|
74
|
-
readonly required: readonly ["action"];
|
|
75
|
-
readonly additionalProperties: false;
|
|
76
|
-
}, {
|
|
77
|
-
readonly type: "object";
|
|
78
|
-
readonly properties: {
|
|
79
|
-
readonly action: {
|
|
80
|
-
readonly type: "string";
|
|
81
|
-
readonly const: "click";
|
|
82
|
-
};
|
|
83
|
-
readonly ref: {
|
|
84
|
-
readonly type: "string";
|
|
85
|
-
readonly description: "aria-ref of the target element.";
|
|
86
|
-
};
|
|
87
|
-
readonly viewId: {
|
|
88
|
-
type: "string";
|
|
89
|
-
description: string;
|
|
90
|
-
};
|
|
91
|
-
};
|
|
92
|
-
readonly required: readonly ["action", "ref"];
|
|
93
|
-
readonly additionalProperties: false;
|
|
94
|
-
}, {
|
|
95
|
-
readonly type: "object";
|
|
96
|
-
readonly properties: {
|
|
97
|
-
readonly action: {
|
|
98
|
-
readonly type: "string";
|
|
99
|
-
readonly const: "type";
|
|
100
|
-
};
|
|
101
|
-
readonly ref: {
|
|
102
|
-
readonly type: "string";
|
|
103
|
-
readonly description: "aria-ref of the target element.";
|
|
104
|
-
};
|
|
105
|
-
readonly text: {
|
|
106
|
-
readonly type: "string";
|
|
107
|
-
readonly description: "Text to type into the element.";
|
|
108
|
-
};
|
|
109
|
-
readonly submit: {
|
|
110
|
-
readonly type: "boolean";
|
|
111
|
-
readonly description: "Press Enter after typing. Default false.";
|
|
112
|
-
};
|
|
113
|
-
readonly viewId: {
|
|
114
|
-
type: "string";
|
|
115
|
-
description: string;
|
|
116
|
-
};
|
|
117
|
-
};
|
|
118
|
-
readonly required: readonly ["action", "ref", "text"];
|
|
119
|
-
readonly additionalProperties: false;
|
|
120
|
-
}, ...{
|
|
121
|
-
type: "object";
|
|
122
|
-
properties: {
|
|
123
|
-
action: {
|
|
124
|
-
type: "string";
|
|
125
|
-
const: "screenshot" | "console" | "network";
|
|
126
|
-
};
|
|
127
|
-
viewId: {
|
|
128
|
-
type: "string";
|
|
129
|
-
description: string;
|
|
130
|
-
};
|
|
131
|
-
};
|
|
132
|
-
required: readonly ["action"];
|
|
133
|
-
additionalProperties: false;
|
|
134
|
-
}[]];
|
|
135
|
-
};
|
|
136
|
-
export declare function createPreviewBrowserTool(deps: PreviewBrowserToolDeps): PortableTool<PreviewBrowserToolParams>;
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const REPO_MAP_TOOL_NAME: "repo_map";
|
|
3
|
-
export type RepoMapRefreshMode = "full" | "incremental";
|
|
4
|
-
export type RepoMapSymbolKind = "class" | "function" | "interface" | "type" | "enum" | "constant";
|
|
5
|
-
export interface RepoMapSymbol {
|
|
6
|
-
kind: RepoMapSymbolKind;
|
|
7
|
-
name: string;
|
|
8
|
-
line: number;
|
|
9
|
-
}
|
|
10
|
-
export interface RepoMapFile {
|
|
11
|
-
path: string;
|
|
12
|
-
symbols: RepoMapSymbol[];
|
|
13
|
-
/** Conservative import/module specifiers; a lightweight navigation graph, not compiler resolution. */
|
|
14
|
-
dependencies?: string[];
|
|
15
|
-
}
|
|
16
|
-
export interface RepoMapMetadata {
|
|
17
|
-
mode: RepoMapRefreshMode;
|
|
18
|
-
scannedFiles: number;
|
|
19
|
-
changedFiles: number;
|
|
20
|
-
generation: number;
|
|
21
|
-
totalFiles: number;
|
|
22
|
-
matchedFiles: number;
|
|
23
|
-
truncated: boolean;
|
|
24
|
-
partial?: boolean;
|
|
25
|
-
stale?: boolean;
|
|
26
|
-
warning?: string;
|
|
27
|
-
}
|
|
28
|
-
export interface RepoMapResult {
|
|
29
|
-
files: RepoMapFile[];
|
|
30
|
-
metadata: RepoMapMetadata;
|
|
31
|
-
}
|
|
32
|
-
export interface RepoMapQuery {
|
|
33
|
-
query?: string;
|
|
34
|
-
path?: string;
|
|
35
|
-
maxFiles?: number;
|
|
36
|
-
forceFull?: boolean;
|
|
37
|
-
}
|
|
38
|
-
export interface RepoMapService {
|
|
39
|
-
getMap(query?: RepoMapQuery): Promise<RepoMapResult>;
|
|
40
|
-
}
|
|
41
|
-
export interface RepoMapToolParams {
|
|
42
|
-
query?: string;
|
|
43
|
-
path?: string;
|
|
44
|
-
maxFiles?: number;
|
|
45
|
-
refresh?: boolean;
|
|
46
|
-
}
|
|
47
|
-
export interface RepoMapToolDeps {
|
|
48
|
-
workspaceRoot: string;
|
|
49
|
-
repoMap: RepoMapService;
|
|
50
|
-
maxResultChars?: number;
|
|
51
|
-
}
|
|
52
|
-
export declare function createRepoMapTool(deps: RepoMapToolDeps): PortableTool<RepoMapToolParams>;
|
|
@@ -1,142 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
import type { WorkspaceSkill } from "../skill-system/skill-types.js";
|
|
3
|
-
export declare const SKILL_VIEW_TOOL_NAME: "skill_view";
|
|
4
|
-
export declare const SKILLS_LIST_TOOL_NAME: "skills_list";
|
|
5
|
-
export declare const SKILL_MANAGE_TOOL_NAME: "skill_manage";
|
|
6
|
-
export type SkillManageAction = "create" | "edit" | "patch" | "delete" | "promote";
|
|
7
|
-
export interface SkillViewParams {
|
|
8
|
-
name: string;
|
|
9
|
-
args?: string;
|
|
10
|
-
filePath?: string;
|
|
11
|
-
}
|
|
12
|
-
export interface SkillsListParams {
|
|
13
|
-
category?: string;
|
|
14
|
-
}
|
|
15
|
-
export interface SkillManageParams {
|
|
16
|
-
action: SkillManageAction;
|
|
17
|
-
name: string;
|
|
18
|
-
category?: string;
|
|
19
|
-
content?: string;
|
|
20
|
-
filePath?: string;
|
|
21
|
-
fileContent?: string;
|
|
22
|
-
oldString?: string;
|
|
23
|
-
newString?: string;
|
|
24
|
-
}
|
|
25
|
-
export declare const SKILL_VIEW_TOOL_SCHEMA: {
|
|
26
|
-
readonly type: "object";
|
|
27
|
-
readonly properties: {
|
|
28
|
-
readonly name: {
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
readonly description: "The skill to use. For a matching workflow, call skill_view before read/search/exec/MCP. Calling skill_view(name='X') loads that skill and you follow its instructions in THIS turn - that single call is all you need to USE a skill.";
|
|
31
|
-
};
|
|
32
|
-
readonly args: {
|
|
33
|
-
readonly type: "string";
|
|
34
|
-
readonly description: "Optional context/arguments to pass to the skill.";
|
|
35
|
-
};
|
|
36
|
-
readonly filePath: {
|
|
37
|
-
readonly type: "string";
|
|
38
|
-
readonly description: "Optional path of a supporting file inside the skill folder to read instead of running the skill (e.g. a reference doc or script). When omitted, the skill is loaded and run.";
|
|
39
|
-
};
|
|
40
|
-
};
|
|
41
|
-
readonly required: readonly ["name"];
|
|
42
|
-
};
|
|
43
|
-
export declare const SKILLS_LIST_TOOL_SCHEMA: {
|
|
44
|
-
readonly type: "object";
|
|
45
|
-
readonly properties: {
|
|
46
|
-
readonly category: {
|
|
47
|
-
readonly type: "string";
|
|
48
|
-
readonly description: "Optional category filter.";
|
|
49
|
-
};
|
|
50
|
-
};
|
|
51
|
-
readonly required: readonly [];
|
|
52
|
-
};
|
|
53
|
-
export declare const SKILL_MANAGE_TOOL_SCHEMA: {
|
|
54
|
-
readonly type: "object";
|
|
55
|
-
readonly properties: {
|
|
56
|
-
readonly action: {
|
|
57
|
-
readonly type: "string";
|
|
58
|
-
readonly enum: readonly ["create", "edit", "patch", "delete", "promote"];
|
|
59
|
-
readonly description: string;
|
|
60
|
-
};
|
|
61
|
-
readonly name: {
|
|
62
|
-
readonly type: "string";
|
|
63
|
-
readonly description: "The skill name to author or manage.";
|
|
64
|
-
};
|
|
65
|
-
readonly category: {
|
|
66
|
-
readonly type: "string";
|
|
67
|
-
readonly description: "Classification for create/edit — pick the ONE best-fitting label from: efficiency, dev, writing, data, search, automation, knowledge, lifestyle. Drives the skill card's color/tag on the plugins page.";
|
|
68
|
-
};
|
|
69
|
-
readonly content: {
|
|
70
|
-
readonly type: "string";
|
|
71
|
-
readonly description: "Full SKILL.md content for create/edit actions.";
|
|
72
|
-
};
|
|
73
|
-
readonly filePath: {
|
|
74
|
-
readonly type: "string";
|
|
75
|
-
readonly description: "Path of a file inside the skill folder to write with fileContent (create/edit). SKILL.md itself always goes through 'content'.";
|
|
76
|
-
};
|
|
77
|
-
readonly fileContent: {
|
|
78
|
-
readonly type: "string";
|
|
79
|
-
readonly description: "Supporting file content. With filePath, writes that file inside the skill folder.";
|
|
80
|
-
};
|
|
81
|
-
readonly oldString: {
|
|
82
|
-
readonly type: "string";
|
|
83
|
-
readonly description: "Text to find for the patch action.";
|
|
84
|
-
};
|
|
85
|
-
readonly newString: {
|
|
86
|
-
readonly type: "string";
|
|
87
|
-
readonly description: "Replacement text for the patch action.";
|
|
88
|
-
};
|
|
89
|
-
};
|
|
90
|
-
readonly required: readonly ["action", "name"];
|
|
91
|
-
};
|
|
92
|
-
export interface SkillListItem {
|
|
93
|
-
name: string;
|
|
94
|
-
description: string;
|
|
95
|
-
version?: string;
|
|
96
|
-
category?: string;
|
|
97
|
-
/** Where the skill lives: "global" (user-level) or "project" (cwd-level). */
|
|
98
|
-
scope?: "global" | "project" | "plugin" | "config";
|
|
99
|
-
}
|
|
100
|
-
export interface SkillListOutput {
|
|
101
|
-
skills: SkillListItem[];
|
|
102
|
-
categories: string[];
|
|
103
|
-
}
|
|
104
|
-
export interface SkillViewOutput {
|
|
105
|
-
name: string;
|
|
106
|
-
content: string;
|
|
107
|
-
skillDir?: string;
|
|
108
|
-
referenceFiles?: string[];
|
|
109
|
-
}
|
|
110
|
-
export interface SkillManageResult {
|
|
111
|
-
success: boolean;
|
|
112
|
-
message: string;
|
|
113
|
-
path?: string;
|
|
114
|
-
}
|
|
115
|
-
export interface SkillToolDeps {
|
|
116
|
-
/** List all available skills (Layer 0 metadata). */
|
|
117
|
-
listSkills(): Promise<WorkspaceSkill[]>;
|
|
118
|
-
/** List skills with full detail (for skills_list). */
|
|
119
|
-
listSkillsFull(category?: string): Promise<SkillListOutput>;
|
|
120
|
-
/** Read skill content (Layer 1 instructions). */
|
|
121
|
-
readSkillContent(name: string): Promise<string | null>;
|
|
122
|
-
/** View skill with optional file path. */
|
|
123
|
-
viewSkill(name: string, filePath?: string): Promise<SkillViewOutput | null>;
|
|
124
|
-
/** Run a skill — returns its instructions for the main model to follow inline (mainstream, no sub-turn). */
|
|
125
|
-
runSkillInvocation(skillName: string, skillContent: string, userArgs: string | undefined, skillDir: string | undefined, signal?: AbortSignal): Promise<string>;
|
|
126
|
-
/** Manage skill (create/edit/patch/delete). */
|
|
127
|
-
manageSkill(params: {
|
|
128
|
-
action: string;
|
|
129
|
-
name: string;
|
|
130
|
-
category?: string;
|
|
131
|
-
content?: string;
|
|
132
|
-
filePath?: string;
|
|
133
|
-
fileContent?: string;
|
|
134
|
-
oldString?: string;
|
|
135
|
-
newString?: string;
|
|
136
|
-
}): Promise<SkillManageResult>;
|
|
137
|
-
/** Promote a project-level skill to user/global level. Returns success message. */
|
|
138
|
-
promoteSkill?(name: string): Promise<SkillManageResult>;
|
|
139
|
-
}
|
|
140
|
-
export declare function createSkillViewTool(deps: SkillToolDeps): PortableTool<SkillViewParams>;
|
|
141
|
-
export declare function createSkillsListTool(deps: SkillToolDeps): PortableTool<SkillsListParams>;
|
|
142
|
-
export declare function createSkillManageTool(deps: SkillToolDeps): PortableTool<SkillManageParams>;
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const SLEEP_TOOL_NAME: "sleep";
|
|
3
|
-
export interface SleepToolParams {
|
|
4
|
-
/** Duration to sleep in seconds (1–3600). */
|
|
5
|
-
duration: number;
|
|
6
|
-
/** Reason for sleeping — helps the runtime decide whether to interrupt. */
|
|
7
|
-
reason?: string;
|
|
8
|
-
}
|
|
9
|
-
export declare const SLEEP_TOOL_SCHEMA: {
|
|
10
|
-
readonly type: "object";
|
|
11
|
-
readonly properties: {
|
|
12
|
-
readonly duration: {
|
|
13
|
-
readonly type: "number";
|
|
14
|
-
readonly description: "Duration to sleep in seconds (1–3600). Prefer short sleeps (10–60s) to stay responsive.";
|
|
15
|
-
readonly minimum: 1;
|
|
16
|
-
readonly maximum: 3600;
|
|
17
|
-
};
|
|
18
|
-
readonly reason: {
|
|
19
|
-
readonly type: "string";
|
|
20
|
-
readonly description: string;
|
|
21
|
-
};
|
|
22
|
-
};
|
|
23
|
-
readonly required: readonly ["duration"];
|
|
24
|
-
};
|
|
25
|
-
/** The result returned after a sleep completes or is interrupted. */
|
|
26
|
-
export interface SleepResult {
|
|
27
|
-
/** Actual time slept in seconds (may be less if interrupted). */
|
|
28
|
-
sleptSeconds: number;
|
|
29
|
-
/** Whether the sleep was interrupted before completing. */
|
|
30
|
-
interrupted: boolean;
|
|
31
|
-
/** The event that caused the interruption (undefined if not interrupted). */
|
|
32
|
-
interruptReason?: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Runtime dependencies injected by the host.
|
|
36
|
-
*
|
|
37
|
-
* The sleep mechanism is host-provided — the tool itself does NOT call
|
|
38
|
-
* setTimeout. The host decides how to implement the wait (timer, event loop
|
|
39
|
-
* integration, tick prompt scheduling, etc.).
|
|
40
|
-
*/
|
|
41
|
-
export interface SleepToolDeps {
|
|
42
|
-
/**
|
|
43
|
-
* Perform the actual sleep. Must resolve after `durationMs` or when
|
|
44
|
-
* interrupted (whichever is first). The AbortSignal fires if the user
|
|
45
|
-
* or the system requests an interrupt.
|
|
46
|
-
*/
|
|
47
|
-
sleep(durationMs: number, signal: AbortSignal): Promise<SleepResult>;
|
|
48
|
-
}
|
|
49
|
-
export declare function createSleepTool(deps: SleepToolDeps): PortableTool<SleepToolParams>;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const STT_TOOL_NAME: "stt";
|
|
3
|
-
export interface SttToolParams {
|
|
4
|
-
audio_url: string;
|
|
5
|
-
language?: string;
|
|
6
|
-
}
|
|
7
|
-
export declare const STT_TOOL_SCHEMA: {
|
|
8
|
-
readonly type: "object";
|
|
9
|
-
readonly properties: {
|
|
10
|
-
readonly audio_url: {
|
|
11
|
-
readonly type: "string";
|
|
12
|
-
readonly description: string;
|
|
13
|
-
};
|
|
14
|
-
readonly language: {
|
|
15
|
-
readonly type: "string";
|
|
16
|
-
readonly description: "Language hint for transcription: 'zh' (Chinese), 'en' (English), or auto-detect if omitted.";
|
|
17
|
-
};
|
|
18
|
-
};
|
|
19
|
-
readonly required: readonly ["audio_url"];
|
|
20
|
-
};
|
|
21
|
-
export interface SttResult {
|
|
22
|
-
transcription: string;
|
|
23
|
-
model?: string;
|
|
24
|
-
durationMs?: number;
|
|
25
|
-
}
|
|
26
|
-
/** Deps injected by the host runtime for STT. */
|
|
27
|
-
export interface SttToolDeps {
|
|
28
|
-
speechToText(params: {
|
|
29
|
-
audioUrl: string;
|
|
30
|
-
language?: string;
|
|
31
|
-
}): Promise<SttResult>;
|
|
32
|
-
}
|
|
33
|
-
export declare function createSttTool(deps: SttToolDeps): PortableTool<SttToolParams>;
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import type { PortableTool } from "../portable-tool.js";
|
|
2
|
-
export declare const SUBAGENT_DECISION_TOOL_NAME: "subagent_decision";
|
|
3
|
-
export type SubagentDecision = "adopted" | "partially_adopted" | "rejected";
|
|
4
|
-
export interface SubagentDecisionToolParams {
|
|
5
|
-
subagentId: string;
|
|
6
|
-
decision: SubagentDecision;
|
|
7
|
-
summary?: string;
|
|
8
|
-
}
|
|
9
|
-
export interface SubagentDecisionToolDeps {
|
|
10
|
-
readonly currentTurnId?: string;
|
|
11
|
-
readonly currentSessionId?: string;
|
|
12
|
-
getActiveProjectRoot?(): string;
|
|
13
|
-
sendNotification(method: string, params: Record<string, unknown>): void;
|
|
14
|
-
}
|
|
15
|
-
export declare function createSubagentDecisionTool(deps: SubagentDecisionToolDeps): PortableTool<SubagentDecisionToolParams>;
|