@comma-agents/core 2.0.0-rc.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/LICENSE +21 -0
- package/README.md +18 -0
- package/dist/abortable/abortable.d.ts +5 -0
- package/dist/abortable/abortable.types.d.ts +10 -0
- package/dist/abortable/index.d.ts +2 -0
- package/dist/agents/agent/agent.constants.d.ts +5 -0
- package/dist/agents/agent/agent.d.ts +24 -0
- package/dist/agents/agent/agent.types.d.ts +408 -0
- package/dist/agents/agent/agent.utils.d.ts +107 -0
- package/dist/agents/built-in/user/user-agent.d.ts +32 -0
- package/dist/agents/built-in/user/user-agent.types.d.ts +53 -0
- package/dist/agents/built-in/user/user-agent.utils.d.ts +2 -0
- package/dist/agents/hook-into-agent/hook-into-agent.d.ts +29 -0
- package/dist/agents/hooks/hooks.types.d.ts +64 -0
- package/dist/agents/hooks/hooks.utils.d.ts +9 -0
- package/dist/agents/hooks/index.d.ts +2 -0
- package/dist/agents/loader/index.d.ts +4 -0
- package/dist/agents/loader/loader.d.ts +49 -0
- package/dist/agents/loader/loader.schema.d.ts +270 -0
- package/dist/agents/loader/loader.types.d.ts +15 -0
- package/dist/conversation-context/conversation-context.d.ts +78 -0
- package/dist/conversation-context/conversation-context.types.d.ts +111 -0
- package/dist/conversation-context/conversation-context.utils.d.ts +6 -0
- package/dist/conversation-context/index.d.ts +3 -0
- package/dist/conversation-context/retention/compaction/compaction.constants.d.ts +3 -0
- package/dist/conversation-context/retention/compaction/compaction.d.ts +21 -0
- package/dist/conversation-context/retention/compaction/compaction.types.d.ts +26 -0
- package/dist/conversation-context/retention/compaction/index.d.ts +2 -0
- package/dist/conversation-context/retention/index.d.ts +4 -0
- package/dist/conversation-context/retention/retention.d.ts +9 -0
- package/dist/conversation-context/retention/retention.types.d.ts +90 -0
- package/dist/conversation-context/retention/retention.utils.d.ts +3 -0
- package/dist/conversation-context/retention/rolling-window/index.d.ts +2 -0
- package/dist/conversation-context/retention/rolling-window/rolling-window.d.ts +13 -0
- package/dist/conversation-context/retention/rolling-window/rolling-window.types.d.ts +5 -0
- package/dist/credentials/backends/json-file.d.ts +21 -0
- package/dist/credentials/credentials.constants.d.ts +9 -0
- package/dist/credentials/credentials.d.ts +18 -0
- package/dist/credentials/credentials.schema.d.ts +102 -0
- package/dist/credentials/credentials.types.d.ts +118 -0
- package/dist/credentials/credentials.utils.d.ts +30 -0
- package/dist/credentials/index.d.ts +6 -0
- package/dist/defaults/defaults.d.ts +108 -0
- package/dist/defaults/defaults.types.d.ts +51 -0
- package/dist/defaults/index.d.ts +2 -0
- package/dist/errors/index.d.ts +70 -0
- package/dist/flows/built-in/broadcast/broadcast-flow.constants.d.ts +2 -0
- package/dist/flows/built-in/broadcast/broadcast-flow.d.ts +30 -0
- package/dist/flows/built-in/cycle/cycle-flow.d.ts +53 -0
- package/dist/flows/built-in/sequential/sequential-flow.d.ts +25 -0
- package/dist/flows/flow/flow.d.ts +79 -0
- package/dist/flows/flow/flow.types.d.ts +179 -0
- package/dist/flows/flow/flow.utils.d.ts +18 -0
- package/dist/flows/hook-into-flow/hook-into-flow.d.ts +30 -0
- package/dist/flows/index.d.ts +6 -0
- package/dist/flows/loader/index.d.ts +4 -0
- package/dist/flows/loader/loader.d.ts +55 -0
- package/dist/flows/loader/loader.schema.d.ts +195 -0
- package/dist/flows/loader/loader.types.d.ts +27 -0
- package/dist/guard/guard.d.ts +17 -0
- package/dist/guard/guard.types.d.ts +112 -0
- package/dist/guard/index.d.ts +3 -0
- package/dist/guard/policies.d.ts +28 -0
- package/dist/hooks/built-in/token-tracking/index.d.ts +2 -0
- package/dist/hooks/built-in/token-tracking/token-tracking.constants.d.ts +14 -0
- package/dist/hooks/built-in/token-tracking/token-tracking.d.ts +87 -0
- package/dist/hooks/built-in/token-tracking/token-tracking.types.d.ts +136 -0
- package/dist/hooks/hooks.d.ts +10 -0
- package/dist/hooks/hooks.types.d.ts +11 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/index.d.ts +50 -0
- package/dist/index.js +8961 -0
- package/dist/language/index.d.ts +1 -0
- package/dist/language/language.types.d.ts +60 -0
- package/dist/model/index.d.ts +5 -0
- package/dist/model/model.d.ts +63 -0
- package/dist/model/model.types.d.ts +85 -0
- package/dist/model/model.utils.d.ts +151 -0
- package/dist/model/providers/catalog/catalog.d.ts +57 -0
- package/dist/model/providers/catalog/catalog.types.d.ts +50 -0
- package/dist/model/providers/catalog/catalog.utils.d.ts +15 -0
- package/dist/model/providers/catalog/index.d.ts +3 -0
- package/dist/model/providers/index.d.ts +7 -0
- package/dist/model/providers/listers/copilot.d.ts +10 -0
- package/dist/model/providers/listers/index.d.ts +2 -0
- package/dist/model/providers/listers/ollama.d.ts +9 -0
- package/dist/model/providers/providers.d.ts +69 -0
- package/dist/model/providers/providers.types.d.ts +157 -0
- package/dist/model/providers/providers.utils.d.ts +16 -0
- package/dist/prompts/index.d.ts +4 -0
- package/dist/prompts/message-builder.d.ts +89 -0
- package/dist/prompts/prompts.types.d.ts +86 -0
- package/dist/prompts/template/prompt-template.d.ts +22 -0
- package/dist/sandbox/in-sandbox.d.ts +31 -0
- package/dist/sandbox/index.d.ts +4 -0
- package/dist/sandbox/sandbox.constants.d.ts +31 -0
- package/dist/sandbox/sandbox.d.ts +11 -0
- package/dist/sandbox/sandbox.types.d.ts +105 -0
- package/dist/skills/index.d.ts +4 -0
- package/dist/skills/skills.constants.d.ts +10 -0
- package/dist/skills/skills.loader.d.ts +46 -0
- package/dist/skills/skills.registry.d.ts +18 -0
- package/dist/skills/skills.types.d.ts +66 -0
- package/dist/skills/skills.utils.d.ts +37 -0
- package/dist/strategy/discover/discover.d.ts +16 -0
- package/dist/strategy/discover/discover.types.d.ts +70 -0
- package/dist/strategy/discover/discover.utils.d.ts +95 -0
- package/dist/strategy/discover/index.d.ts +3 -0
- package/dist/strategy/exporter/exporter.d.ts +27 -0
- package/dist/strategy/exporter/exporter.types.d.ts +6 -0
- package/dist/strategy/index.d.ts +10 -0
- package/dist/strategy/loader/loader.d.ts +39 -0
- package/dist/strategy/loader/loader.types.d.ts +106 -0
- package/dist/strategy/loader/loader.utils.d.ts +20 -0
- package/dist/strategy/loader/project-loader.d.ts +9 -0
- package/dist/strategy/schema.d.ts +1032 -0
- package/dist/timeline/index.d.ts +4 -0
- package/dist/timeline/projections/conversation-context.d.ts +19 -0
- package/dist/timeline/projections/file-state.d.ts +8 -0
- package/dist/timeline/projections/index.d.ts +3 -0
- package/dist/timeline/timeline.d.ts +11 -0
- package/dist/timeline/timeline.types.d.ts +97 -0
- package/dist/tools/build-tool-system-prompt.d.ts +41 -0
- package/dist/tools/built-in/ask-question/ask-question.d.ts +21 -0
- package/dist/tools/built-in/ask-question/index.d.ts +2 -0
- package/dist/tools/built-in/create-file/create-file.d.ts +18 -0
- package/dist/tools/built-in/create-file/create-file.types.d.ts +11 -0
- package/dist/tools/built-in/create-file/index.d.ts +2 -0
- package/dist/tools/built-in/delete-file/delete-file.constants.d.ts +14 -0
- package/dist/tools/built-in/delete-file/delete-file.d.ts +5 -0
- package/dist/tools/built-in/delete-file/delete-file.types.d.ts +26 -0
- package/dist/tools/built-in/delete-file/index.d.ts +2 -0
- package/dist/tools/built-in/describe-tool.d.ts +61 -0
- package/dist/tools/built-in/edit-file/edit-file.d.ts +46 -0
- package/dist/tools/built-in/edit-file/edit-file.replacers.d.ts +81 -0
- package/dist/tools/built-in/edit-file/edit-file.types.d.ts +59 -0
- package/dist/tools/built-in/edit-file/edit-file.utils.d.ts +70 -0
- package/dist/tools/built-in/edit-file/index.d.ts +2 -0
- package/dist/tools/built-in/glob/glob.constants.d.ts +3 -0
- package/dist/tools/built-in/glob/glob.d.ts +25 -0
- package/dist/tools/built-in/glob/glob.types.d.ts +31 -0
- package/dist/tools/built-in/glob/glob.utils.d.ts +4 -0
- package/dist/tools/built-in/glob/index.d.ts +2 -0
- package/dist/tools/built-in/launch-strategy/index.d.ts +2 -0
- package/dist/tools/built-in/launch-strategy/launch-strategy.d.ts +26 -0
- package/dist/tools/built-in/launch-strategy/launch-strategy.types.d.ts +14 -0
- package/dist/tools/built-in/list-directory/index.d.ts +2 -0
- package/dist/tools/built-in/list-directory/list-directory.constants.d.ts +3 -0
- package/dist/tools/built-in/list-directory/list-directory.d.ts +20 -0
- package/dist/tools/built-in/list-directory/list-directory.types.d.ts +41 -0
- package/dist/tools/built-in/list-directory/list-directory.utils.d.ts +4 -0
- package/dist/tools/built-in/list-skills/index.d.ts +2 -0
- package/dist/tools/built-in/list-skills/list-skills.d.ts +5 -0
- package/dist/tools/built-in/list-skills/list-skills.types.d.ts +10 -0
- package/dist/tools/built-in/list-strategy/index.d.ts +2 -0
- package/dist/tools/built-in/list-strategy/list-strategy.d.ts +14 -0
- package/dist/tools/built-in/list-strategy/list-strategy.types.d.ts +33 -0
- package/dist/tools/built-in/load-skill/index.d.ts +2 -0
- package/dist/tools/built-in/load-skill/load-skill.d.ts +24 -0
- package/dist/tools/built-in/load-skill/load-skill.types.d.ts +15 -0
- package/dist/tools/built-in/lsp-request/index.d.ts +2 -0
- package/dist/tools/built-in/lsp-request/lsp-request.d.ts +4 -0
- package/dist/tools/built-in/lsp-request/lsp-request.schema.d.ts +23 -0
- package/dist/tools/built-in/lsp-request/lsp-request.types.d.ts +4 -0
- package/dist/tools/built-in/move-file/index.d.ts +2 -0
- package/dist/tools/built-in/move-file/move-file.d.ts +21 -0
- package/dist/tools/built-in/move-file/move-file.types.d.ts +12 -0
- package/dist/tools/built-in/read-file/index.d.ts +2 -0
- package/dist/tools/built-in/read-file/read-file.constants.d.ts +1 -0
- package/dist/tools/built-in/read-file/read-file.d.ts +32 -0
- package/dist/tools/built-in/read-file/read-file.types.d.ts +34 -0
- package/dist/tools/built-in/read-file/read-file.utils.d.ts +14 -0
- package/dist/tools/built-in/restore-file/index.d.ts +2 -0
- package/dist/tools/built-in/restore-file/restore-file.d.ts +16 -0
- package/dist/tools/built-in/restore-file/restore-file.types.d.ts +11 -0
- package/dist/tools/built-in/run-command/index.d.ts +2 -0
- package/dist/tools/built-in/run-command/run-command.constants.d.ts +23 -0
- package/dist/tools/built-in/run-command/run-command.d.ts +21 -0
- package/dist/tools/built-in/run-command/run-command.types.d.ts +81 -0
- package/dist/tools/built-in/run-command/run-command.utils.d.ts +37 -0
- package/dist/tools/built-in/search-files/index.d.ts +2 -0
- package/dist/tools/built-in/search-files/search-files.constants.d.ts +5 -0
- package/dist/tools/built-in/search-files/search-files.d.ts +30 -0
- package/dist/tools/built-in/search-files/search-files.types.d.ts +19 -0
- package/dist/tools/built-in/search-files/search-files.utils.d.ts +11 -0
- package/dist/tools/built-in/todo/todo.d.ts +62 -0
- package/dist/tools/built-in/todo/todo.types.d.ts +7 -0
- package/dist/tools/built-in/webfetch/webfetch.constants.d.ts +3 -0
- package/dist/tools/built-in/webfetch/webfetch.d.ts +33 -0
- package/dist/tools/built-in/webfetch/webfetch.types.d.ts +8 -0
- package/dist/tools/built-in/webfetch/webfetch.utils.d.ts +19 -0
- package/dist/tools/built-in/write-file/index.d.ts +2 -0
- package/dist/tools/built-in/write-file/write-file.d.ts +18 -0
- package/dist/tools/built-in/write-file/write-file.types.d.ts +11 -0
- package/dist/tools/define/define-tool.d.ts +15 -0
- package/dist/tools/io/atomic-write.d.ts +37 -0
- package/dist/tools/io/audit-sink.d.ts +29 -0
- package/dist/tools/io/audit.types.d.ts +115 -0
- package/dist/tools/io/audit.utils.d.ts +48 -0
- package/dist/tools/io/binary.d.ts +16 -0
- package/dist/tools/io/bom.d.ts +15 -0
- package/dist/tools/io/diff.d.ts +27 -0
- package/dist/tools/io/hash.d.ts +25 -0
- package/dist/tools/io/index.d.ts +19 -0
- package/dist/tools/io/newline.d.ts +34 -0
- package/dist/tools/io/sandbox-error.d.ts +13 -0
- package/dist/tools/io/session-file-state.d.ts +68 -0
- package/dist/tools/io/stale-file.d.ts +9 -0
- package/dist/tools/io/trash.d.ts +57 -0
- package/dist/tools/launch-strategy.types.d.ts +38 -0
- package/dist/tools/result/index.d.ts +1 -0
- package/dist/tools/result/result.d.ts +47 -0
- package/dist/tools/tool.constants.d.ts +7 -0
- package/dist/tools/tool.registry.d.ts +54 -0
- package/dist/tools/tool.types.d.ts +191 -0
- package/package.json +48 -0
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export interface GlobToolConfig {
|
|
2
|
+
/**
|
|
3
|
+
* Maximum number of matches returned. Excess entries are dropped and
|
|
4
|
+
* `data.truncated` is set. Default: 1000.
|
|
5
|
+
*/
|
|
6
|
+
readonly maxResults?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Maximum depth of directory traversal. Default: 32.
|
|
9
|
+
*/
|
|
10
|
+
readonly maxDepth?: number;
|
|
11
|
+
}
|
|
12
|
+
export interface GlobData {
|
|
13
|
+
/** Glob pattern that was matched. */
|
|
14
|
+
readonly pattern: string;
|
|
15
|
+
/** Root directory that was searched (echoed input, normalized). */
|
|
16
|
+
readonly root: string;
|
|
17
|
+
/** Matched paths and details. */
|
|
18
|
+
readonly matches: readonly GlobMatch[];
|
|
19
|
+
/** True when the result was capped by `maxResults`. */
|
|
20
|
+
readonly truncated: boolean;
|
|
21
|
+
}
|
|
22
|
+
export interface GlobMatch {
|
|
23
|
+
/** Path relative to the workspace. */
|
|
24
|
+
readonly path: string;
|
|
25
|
+
/** Entry kind. */
|
|
26
|
+
readonly type: "file" | "directory" | "symlink";
|
|
27
|
+
/** Size in bytes. `0` for directories and symlinks. */
|
|
28
|
+
readonly size: number;
|
|
29
|
+
/** ISO-8601 modification timestamp. */
|
|
30
|
+
readonly mtime: string;
|
|
31
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { GlobData } from "./glob.types";
|
|
2
|
+
export declare function toForwardSlash(pathString: string): string;
|
|
3
|
+
export declare function matchesAnyGlob(relPath: string, patterns: readonly string[]): boolean;
|
|
4
|
+
export declare function formatGlobResults(data: GlobData): string;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { LaunchStrategyData } from "./launch-strategy.types";
|
|
4
|
+
export declare const launchStrategyParams: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
input: z.ZodString;
|
|
7
|
+
modelOverride: z.ZodOptional<z.ZodString>;
|
|
8
|
+
}, "strip", z.ZodTypeAny, {
|
|
9
|
+
name: string;
|
|
10
|
+
input: string;
|
|
11
|
+
modelOverride?: string | undefined;
|
|
12
|
+
}, {
|
|
13
|
+
name: string;
|
|
14
|
+
input: string;
|
|
15
|
+
modelOverride?: string | undefined;
|
|
16
|
+
}>;
|
|
17
|
+
/**
|
|
18
|
+
* Build the `launch_strategy` tool.
|
|
19
|
+
*
|
|
20
|
+
* Resolves `name` via {@link discoverStrategies}, then either delegates
|
|
21
|
+
* to the runtime-supplied {@link ToolContext.launchStrategy} handle (in
|
|
22
|
+
* the daemon, so nested agent activity is broadcast to the parent run)
|
|
23
|
+
* or falls back to an in-process `loadStrategyFromString` +
|
|
24
|
+
* `flow.call(input)` invocation when no handle is configured.
|
|
25
|
+
*/
|
|
26
|
+
export declare function createLaunchStrategyTool(): ToolDefinition<typeof launchStrategyParams, LaunchStrategyData>;
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/** Structured payload returned by `launch_strategy.execute`. */
|
|
2
|
+
export interface LaunchStrategyData {
|
|
3
|
+
/** The launched strategy's `name` field. */
|
|
4
|
+
readonly strategyName: string;
|
|
5
|
+
/** Absolute path to the strategy file that was launched. */
|
|
6
|
+
readonly path: string;
|
|
7
|
+
/**
|
|
8
|
+
* Final text produced by the sub-strategy's entry flow.
|
|
9
|
+
* Mirrors `AgentCallResult.text` from the underlying flow call.
|
|
10
|
+
*/
|
|
11
|
+
readonly result: string;
|
|
12
|
+
/** Why the flow stopped, when reported by the underlying runtime. */
|
|
13
|
+
readonly finishReason?: string;
|
|
14
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { ListDirectoryData, ListDirectoryToolConfig } from "./list-directory.types";
|
|
4
|
+
export declare const listDirectoryParams: z.ZodObject<{
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
recursive: z.ZodOptional<z.ZodBoolean>;
|
|
7
|
+
maxDepth: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
includeHidden: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
path: string;
|
|
11
|
+
recursive?: boolean | undefined;
|
|
12
|
+
maxDepth?: number | undefined;
|
|
13
|
+
includeHidden?: boolean | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
path: string;
|
|
16
|
+
recursive?: boolean | undefined;
|
|
17
|
+
maxDepth?: number | undefined;
|
|
18
|
+
includeHidden?: boolean | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function createListDirectoryTool(config?: ListDirectoryToolConfig): ToolDefinition<typeof listDirectoryParams, ListDirectoryData>;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export interface ListDirectoryToolConfig {
|
|
2
|
+
/**
|
|
3
|
+
* Hard cap on recursion depth. Calls passing a larger `maxDepth` are
|
|
4
|
+
* clamped to this value. Default: 32.
|
|
5
|
+
*/
|
|
6
|
+
readonly absoluteMaxDepth?: number;
|
|
7
|
+
/**
|
|
8
|
+
* Default `maxDepth` when `recursive: true` is set without an explicit
|
|
9
|
+
* depth. Default: 8.
|
|
10
|
+
*/
|
|
11
|
+
readonly defaultRecursiveDepth?: number;
|
|
12
|
+
/**
|
|
13
|
+
* Maximum number of entries returned. Excess entries are dropped and
|
|
14
|
+
* `data.truncated` is set. Default: 5000.
|
|
15
|
+
*/
|
|
16
|
+
readonly maxEntries?: number;
|
|
17
|
+
}
|
|
18
|
+
export interface ListDirectoryData {
|
|
19
|
+
/** Directory that was listed (echoed input, normalized). */
|
|
20
|
+
readonly path: string;
|
|
21
|
+
/** Sorted entries. */
|
|
22
|
+
readonly entries: readonly ListDirectoryEntry[];
|
|
23
|
+
/** Effective recursion depth used for this call. */
|
|
24
|
+
readonly maxDepth: number;
|
|
25
|
+
/** True when the result was capped by `maxEntries`. */
|
|
26
|
+
readonly truncated: boolean;
|
|
27
|
+
}
|
|
28
|
+
export interface ListDirectoryEntry {
|
|
29
|
+
/** Basename of the entry. */
|
|
30
|
+
readonly name: string;
|
|
31
|
+
/** Path relative to the listed directory (forward-slash separated). */
|
|
32
|
+
readonly relativePath: string;
|
|
33
|
+
/** Entry kind. */
|
|
34
|
+
readonly type: "file" | "directory" | "symlink";
|
|
35
|
+
/** Size in bytes. `0` for directories and symlinks. */
|
|
36
|
+
readonly size: number;
|
|
37
|
+
/** ISO-8601 modification timestamp. */
|
|
38
|
+
readonly mtime: string;
|
|
39
|
+
/** Depth below the listed directory (1 = direct child). */
|
|
40
|
+
readonly depth: number;
|
|
41
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ListDirectoryData, ListDirectoryEntry } from "./list-directory.types";
|
|
2
|
+
export declare function toForwardSlash(pathString: string): string;
|
|
3
|
+
export declare function formatListing(data: ListDirectoryData): string;
|
|
4
|
+
export declare function typeRank(type: ListDirectoryEntry["type"]): number;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { ListSkillsData } from "./list-skills.types";
|
|
4
|
+
export declare const listSkillsParams: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
5
|
+
export declare function createListSkillsTool(): ToolDefinition<typeof listSkillsParams, ListSkillsData>;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export interface ListSkillsEntry {
|
|
2
|
+
readonly name: string;
|
|
3
|
+
readonly description: string;
|
|
4
|
+
readonly origin: "global" | "project";
|
|
5
|
+
readonly sourcePath: string;
|
|
6
|
+
}
|
|
7
|
+
export interface ListSkillsData {
|
|
8
|
+
readonly skills: readonly ListSkillsEntry[];
|
|
9
|
+
readonly count: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { ListStrategyData } from "./list-strategy.types";
|
|
4
|
+
export declare const listStrategyParams: z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>;
|
|
5
|
+
/**
|
|
6
|
+
* Build the `list_strategy` tool.
|
|
7
|
+
*
|
|
8
|
+
* Enumerates every strategy that {@link discoverStrategies} can find on
|
|
9
|
+
* disk (bundled, cwd `.comma/strategies/`, cwd projects, data dir, data
|
|
10
|
+
* dir projects) and returns them in a structured payload plus a
|
|
11
|
+
* human-readable summary. Strategies that fail schema validation are
|
|
12
|
+
* not included; their paths are surfaced in `data.warnings`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function createListStrategyTool(): ToolDefinition<typeof listStrategyParams, ListStrategyData>;
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { DiscoveredStrategyOrigin } from "../../../strategy/discover/discover.types";
|
|
2
|
+
/** A single entry in the `list_strategy` result. */
|
|
3
|
+
export interface ListStrategyEntry {
|
|
4
|
+
/** Strategy `name` field. */
|
|
5
|
+
readonly name: string;
|
|
6
|
+
/** Strategy `description` field, when present. */
|
|
7
|
+
readonly description?: string;
|
|
8
|
+
/** Strategy `version` field. */
|
|
9
|
+
readonly version: string;
|
|
10
|
+
/** Absolute path to the strategy file on disk. */
|
|
11
|
+
readonly path: string;
|
|
12
|
+
/** Where the strategy was found. See {@link DiscoveredStrategyOrigin}. */
|
|
13
|
+
readonly origin: DiscoveredStrategyOrigin;
|
|
14
|
+
/** Project manifest path when the strategy is part of a project. */
|
|
15
|
+
readonly manifestPath?: string;
|
|
16
|
+
/** Human-readable label (project-qualified when applicable). */
|
|
17
|
+
readonly label: string;
|
|
18
|
+
}
|
|
19
|
+
/** Structured payload returned by `list_strategy.execute`. */
|
|
20
|
+
export interface ListStrategyData {
|
|
21
|
+
/** Validated, ready-to-launch strategies in discovery-priority order. */
|
|
22
|
+
readonly strategies: readonly ListStrategyEntry[];
|
|
23
|
+
/** Total number of strategies returned. */
|
|
24
|
+
readonly count: number;
|
|
25
|
+
/**
|
|
26
|
+
* Files that were skipped during discovery (parse / schema errors).
|
|
27
|
+
* Surfaced for diagnostics; never includable in {@link strategies}.
|
|
28
|
+
*/
|
|
29
|
+
readonly warnings: readonly {
|
|
30
|
+
readonly path: string;
|
|
31
|
+
readonly reason: string;
|
|
32
|
+
}[];
|
|
33
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { LoadSkillData } from "./load-skill.types";
|
|
4
|
+
export declare const loadSkillParams: z.ZodObject<{
|
|
5
|
+
name: z.ZodString;
|
|
6
|
+
}, "strip", z.ZodTypeAny, {
|
|
7
|
+
name: string;
|
|
8
|
+
}, {
|
|
9
|
+
name: string;
|
|
10
|
+
}>;
|
|
11
|
+
/**
|
|
12
|
+
* Create the `load_skill` tool.
|
|
13
|
+
*
|
|
14
|
+
* Reads from `ToolContext.skillRegistry`. When no registry is configured
|
|
15
|
+
* — for example, because the strategy loader found no skills directories
|
|
16
|
+
* — every call returns `skill_unavailable` with a helpful message rather
|
|
17
|
+
* than `not_found`, so the LLM can stop trying.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```ts
|
|
21
|
+
* const loadSkill = createLoadSkillTool();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export declare function createLoadSkillTool(): ToolDefinition<typeof loadSkillParams, LoadSkillData>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { z } from "zod";
|
|
2
|
+
import type { loadSkillParams } from "./load-skill";
|
|
3
|
+
export interface LoadSkillData {
|
|
4
|
+
/** The skill's identifier. */
|
|
5
|
+
readonly name: string;
|
|
6
|
+
/** The one-line description shown in the system prompt. */
|
|
7
|
+
readonly description: string;
|
|
8
|
+
/** Full markdown body of the skill (frontmatter stripped). */
|
|
9
|
+
readonly content: string;
|
|
10
|
+
/** Absolute path to the source `SKILL.md` for debugging / provenance. */
|
|
11
|
+
readonly sourcePath: string;
|
|
12
|
+
/** Whether the skill came from the global config dir or the project. */
|
|
13
|
+
readonly origin: "global" | "project";
|
|
14
|
+
}
|
|
15
|
+
export type LoadSkillParams = z.infer<typeof loadSkillParams>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
2
|
+
import { lspRequestParams } from "./lsp-request.schema";
|
|
3
|
+
import type { LspRequestData } from "./lsp-request.types";
|
|
4
|
+
export declare function createLspRequestTool(): ToolDefinition<typeof lspRequestParams, LspRequestData>;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
export declare const lspRequestParams: z.ZodObject<{
|
|
3
|
+
method: z.ZodEnum<["textDocument/diagnostic", "textDocument/hover", "textDocument/definition", "textDocument/typeDefinition", "textDocument/implementation", "textDocument/references", "textDocument/documentSymbol", "workspace/symbol"]>;
|
|
4
|
+
languageId: z.ZodOptional<z.ZodString>;
|
|
5
|
+
path: z.ZodOptional<z.ZodString>;
|
|
6
|
+
line: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
character: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
query: z.ZodOptional<z.ZodString>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
method: "textDocument/diagnostic" | "textDocument/hover" | "textDocument/definition" | "textDocument/typeDefinition" | "textDocument/implementation" | "textDocument/references" | "textDocument/documentSymbol" | "workspace/symbol";
|
|
11
|
+
path?: string | undefined;
|
|
12
|
+
languageId?: string | undefined;
|
|
13
|
+
line?: number | undefined;
|
|
14
|
+
character?: number | undefined;
|
|
15
|
+
query?: string | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
method: "textDocument/diagnostic" | "textDocument/hover" | "textDocument/definition" | "textDocument/typeDefinition" | "textDocument/implementation" | "textDocument/references" | "textDocument/documentSymbol" | "workspace/symbol";
|
|
18
|
+
path?: string | undefined;
|
|
19
|
+
languageId?: string | undefined;
|
|
20
|
+
line?: number | undefined;
|
|
21
|
+
character?: number | undefined;
|
|
22
|
+
query?: string | undefined;
|
|
23
|
+
}>;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { MoveFileData, MoveFileToolConfig } from "./move-file.types";
|
|
4
|
+
declare const moveFileParams: z.ZodObject<{
|
|
5
|
+
fromPath: z.ZodString;
|
|
6
|
+
toPath: z.ZodString;
|
|
7
|
+
expectedSha256: z.ZodString;
|
|
8
|
+
overwrite: z.ZodOptional<z.ZodBoolean>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
expectedSha256: string;
|
|
11
|
+
fromPath: string;
|
|
12
|
+
toPath: string;
|
|
13
|
+
overwrite?: boolean | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
expectedSha256: string;
|
|
16
|
+
fromPath: string;
|
|
17
|
+
toPath: string;
|
|
18
|
+
overwrite?: boolean | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function createMoveFileTool(config?: MoveFileToolConfig): ToolDefinition<typeof moveFileParams, MoveFileData>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { AuditSink } from "../../io/audit.types";
|
|
2
|
+
export interface MoveFileToolConfig {
|
|
3
|
+
readonly defaultAuditSink?: AuditSink;
|
|
4
|
+
}
|
|
5
|
+
export interface MoveFileData {
|
|
6
|
+
readonly moved: true;
|
|
7
|
+
readonly fromPath: string;
|
|
8
|
+
readonly toPath: string;
|
|
9
|
+
readonly sha256: string;
|
|
10
|
+
readonly sizeBytes: number;
|
|
11
|
+
readonly overwroteTrashedTo?: string;
|
|
12
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const DEFAULT_MAX_BYTES: number;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { ReadFileData, ReadFileToolConfig } from "./read-file.types";
|
|
4
|
+
export declare const readFileParams: z.ZodObject<{
|
|
5
|
+
path: z.ZodString;
|
|
6
|
+
startLine: z.ZodOptional<z.ZodNumber>;
|
|
7
|
+
endLine: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
maxBytes: z.ZodOptional<z.ZodNumber>;
|
|
9
|
+
allowBinary: z.ZodOptional<z.ZodBoolean>;
|
|
10
|
+
}, "strip", z.ZodTypeAny, {
|
|
11
|
+
path: string;
|
|
12
|
+
startLine?: number | undefined;
|
|
13
|
+
endLine?: number | undefined;
|
|
14
|
+
maxBytes?: number | undefined;
|
|
15
|
+
allowBinary?: boolean | undefined;
|
|
16
|
+
}, {
|
|
17
|
+
path: string;
|
|
18
|
+
startLine?: number | undefined;
|
|
19
|
+
endLine?: number | undefined;
|
|
20
|
+
maxBytes?: number | undefined;
|
|
21
|
+
allowBinary?: boolean | undefined;
|
|
22
|
+
}>;
|
|
23
|
+
/**
|
|
24
|
+
* Create the `read_file` tool.
|
|
25
|
+
*
|
|
26
|
+
* @param config - Optional configuration overriding the default max-bytes cap.
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const readFile = createReadFileTool();
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function createReadFileTool(config?: ReadFileToolConfig): ToolDefinition<typeof readFileParams, ReadFileData>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { NewlineStyle } from "../../io/newline";
|
|
2
|
+
export interface ReadFileToolConfig {
|
|
3
|
+
/**
|
|
4
|
+
* Default cap on the UTF-8 byte length of returned `content`. Applied
|
|
5
|
+
* when the caller does not pass `maxBytes`. Defaults to 256 KiB.
|
|
6
|
+
*/
|
|
7
|
+
readonly defaultMaxBytes?: number;
|
|
8
|
+
}
|
|
9
|
+
export interface ReadFileData {
|
|
10
|
+
/** UTF-8 content of the (possibly sliced) text file. Absent for binary reads. */
|
|
11
|
+
readonly content?: string;
|
|
12
|
+
/** Base64-encoded full content. Only present for `allowBinary: true` reads. */
|
|
13
|
+
readonly contentBase64?: string;
|
|
14
|
+
/** Encoding of `content` / `contentBase64`. */
|
|
15
|
+
readonly encoding: "utf8" | "base64";
|
|
16
|
+
/** 1-indexed start line of the returned slice (1 when no slicing applied). */
|
|
17
|
+
readonly startLine: number;
|
|
18
|
+
/** 1-indexed end line of the returned slice (inclusive). */
|
|
19
|
+
readonly endLine: number;
|
|
20
|
+
/** Total line count of the underlying file (post LF-normalization). */
|
|
21
|
+
readonly lineCount: number;
|
|
22
|
+
/** Size of the on-disk file in bytes. */
|
|
23
|
+
readonly sizeBytes: number;
|
|
24
|
+
/** SHA-256 of the **full** on-disk bytes. */
|
|
25
|
+
readonly sha256: string;
|
|
26
|
+
/** True when the returned content was capped by `maxBytes`. */
|
|
27
|
+
readonly truncated: boolean;
|
|
28
|
+
/** True when the file was detected as binary. */
|
|
29
|
+
readonly binary: boolean;
|
|
30
|
+
/** Newline style of the underlying file. Absent for binary reads. */
|
|
31
|
+
readonly newlineStyle?: NewlineStyle;
|
|
32
|
+
/** True when the file begins with a UTF-8 BOM. Absent for binary reads. */
|
|
33
|
+
readonly hasBom?: boolean;
|
|
34
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { ReadFileData } from "./read-file.types";
|
|
2
|
+
/**
|
|
3
|
+
* Format a short LLM-facing summary of a successful text read.
|
|
4
|
+
*/
|
|
5
|
+
export declare function formatTextSummary(filePath: string, data: Required<Pick<ReadFileData, "startLine" | "endLine" | "lineCount" | "sizeBytes" | "sha256">> & {
|
|
6
|
+
truncated: boolean;
|
|
7
|
+
}): string;
|
|
8
|
+
/**
|
|
9
|
+
* Truncate a UTF-8 string to at most `maxBytes` bytes without splitting a code point.
|
|
10
|
+
*/
|
|
11
|
+
export declare function truncateUtf8(content: string, maxBytes: number): {
|
|
12
|
+
content: string;
|
|
13
|
+
truncated: boolean;
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { RestoreFileData } from "./restore-file.types";
|
|
4
|
+
declare const restoreFileParams: z.ZodObject<{
|
|
5
|
+
trashedPath: z.ZodString;
|
|
6
|
+
targetPath: z.ZodOptional<z.ZodString>;
|
|
7
|
+
}, "strip", z.ZodTypeAny, {
|
|
8
|
+
trashedPath: string;
|
|
9
|
+
targetPath?: string | undefined;
|
|
10
|
+
}, {
|
|
11
|
+
trashedPath: string;
|
|
12
|
+
targetPath?: string | undefined;
|
|
13
|
+
}>;
|
|
14
|
+
/** Create the `restore_file` tool. */
|
|
15
|
+
export declare function createRestoreFileTool(): ToolDefinition<typeof restoreFileParams, RestoreFileData>;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** Structured payload returned by `restore_file`. */
|
|
2
|
+
export interface RestoreFileData {
|
|
3
|
+
/** Always `true` on success. */
|
|
4
|
+
readonly restored: true;
|
|
5
|
+
/** Workspace-relative path where the file was restored. */
|
|
6
|
+
readonly path: string;
|
|
7
|
+
/** Absolute path of the trash archive this was restored from. */
|
|
8
|
+
readonly from: string;
|
|
9
|
+
/** Byte length of the restored content. */
|
|
10
|
+
readonly sizeBytes: number;
|
|
11
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Default timeout: 60 seconds. */
|
|
2
|
+
export declare const RUN_COMMAND_DEFAULT_TIMEOUT_MS = 60000;
|
|
3
|
+
/** Hard cap on `timeoutMs`: 10 minutes. */
|
|
4
|
+
export declare const RUN_COMMAND_MAX_TIMEOUT_MS: number;
|
|
5
|
+
/** Maximum bytes captured from stdout before truncation flag is set. */
|
|
6
|
+
export declare const RUN_COMMAND_MAX_STDOUT_BYTES = 1048576;
|
|
7
|
+
/** Maximum bytes captured from stderr before truncation flag is set. */
|
|
8
|
+
export declare const RUN_COMMAND_MAX_STDERR_BYTES = 1048576;
|
|
9
|
+
/**
|
|
10
|
+
* Default deny patterns. Commands matching any of these are rejected
|
|
11
|
+
* outright with `permission_denied`. The patterns are intentionally
|
|
12
|
+
* conservative — they target catastrophic, irreversible operations.
|
|
13
|
+
*/
|
|
14
|
+
export declare const RUN_COMMAND_DEFAULT_DENY_PATTERNS: readonly RegExp[];
|
|
15
|
+
/**
|
|
16
|
+
* Default approval-required patterns. Commands matching any of these
|
|
17
|
+
* route through the sandbox `PermissionRequester` with operation
|
|
18
|
+
* `"fs.exec"`. Empty by default — production deployments are expected
|
|
19
|
+
* to configure these on a per-environment basis.
|
|
20
|
+
*/
|
|
21
|
+
export declare const RUN_COMMAND_DEFAULT_REQUIRE_APPROVAL_PATTERNS: readonly RegExp[];
|
|
22
|
+
/** Truncation marker appended to stdout/stderr when over the cap. */
|
|
23
|
+
export declare const RUN_COMMAND_TRUNCATION_MARKER = "\n\u2026[output truncated by run_command]";
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
import type { ToolDefinition } from "../../tool.types";
|
|
3
|
+
import type { RunCommandData, RunCommandToolConfigWithRequester } from "./run-command.types";
|
|
4
|
+
declare const runCommandParams: z.ZodObject<{
|
|
5
|
+
command: z.ZodString;
|
|
6
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
7
|
+
timeoutMs: z.ZodOptional<z.ZodNumber>;
|
|
8
|
+
env: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
|
|
9
|
+
}, "strip", z.ZodTypeAny, {
|
|
10
|
+
command: string;
|
|
11
|
+
cwd?: string | undefined;
|
|
12
|
+
timeoutMs?: number | undefined;
|
|
13
|
+
env?: Record<string, string> | undefined;
|
|
14
|
+
}, {
|
|
15
|
+
command: string;
|
|
16
|
+
cwd?: string | undefined;
|
|
17
|
+
timeoutMs?: number | undefined;
|
|
18
|
+
env?: Record<string, string> | undefined;
|
|
19
|
+
}>;
|
|
20
|
+
export declare function createRunCommandTool(config?: RunCommandToolConfigWithRequester): ToolDefinition<typeof runCommandParams, RunCommandData>;
|
|
21
|
+
export {};
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import type { PermissionRequester } from "../../../sandbox/sandbox.types";
|
|
2
|
+
/**
|
|
3
|
+
* Snapshot of the host platform captured when the tool factory is
|
|
4
|
+
* created. Surfaced in the tool description so the model knows which
|
|
5
|
+
* shell idioms (POSIX vs PowerShell, `brew` vs `apt`, etc.) apply.
|
|
6
|
+
*/
|
|
7
|
+
export interface PlatformInfo {
|
|
8
|
+
/** `process.platform` value (e.g. `"darwin"`, `"linux"`, `"win32"`). */
|
|
9
|
+
readonly platform: NodeJS.Platform;
|
|
10
|
+
/** Friendly OS name (e.g. `"macOS"`, `"Linux"`, `"Windows"`). */
|
|
11
|
+
readonly osName: string;
|
|
12
|
+
/** `os.release()` — kernel/build version string. */
|
|
13
|
+
readonly osRelease: string;
|
|
14
|
+
/** `process.arch` (e.g. `"arm64"`, `"x64"`). */
|
|
15
|
+
readonly arch: string;
|
|
16
|
+
/** Absolute path of the shell that will execute `command`. */
|
|
17
|
+
readonly shellPath: string;
|
|
18
|
+
/** Argv element used to invoke the shell with a command string. */
|
|
19
|
+
readonly shellFlag: string;
|
|
20
|
+
/** Runtime identifier: `"bun"` or `"node"` plus version. */
|
|
21
|
+
readonly runtime: string;
|
|
22
|
+
}
|
|
23
|
+
/** Configuration for `run_command`. */
|
|
24
|
+
export interface RunCommandToolConfig {
|
|
25
|
+
/**
|
|
26
|
+
* Override the auto-detected platform info. Primarily intended for
|
|
27
|
+
* tests that need deterministic descriptions; production callers
|
|
28
|
+
* should leave this undefined.
|
|
29
|
+
*/
|
|
30
|
+
readonly platformInfo?: PlatformInfo;
|
|
31
|
+
/**
|
|
32
|
+
* Regex patterns that mark commands as outright denied. Defaults to
|
|
33
|
+
* `RUN_COMMAND_DEFAULT_DENY_PATTERNS`. Provide `[]` to disable.
|
|
34
|
+
*/
|
|
35
|
+
readonly denyPatterns?: readonly RegExp[];
|
|
36
|
+
/**
|
|
37
|
+
* Regex patterns that route commands through the sandbox
|
|
38
|
+
* PermissionRequester with operation `"fs.exec"`. Empty by default.
|
|
39
|
+
*/
|
|
40
|
+
readonly requireApprovalPatterns?: readonly RegExp[];
|
|
41
|
+
/** Override stdout capture cap (bytes). */
|
|
42
|
+
readonly maxStdoutBytes?: number;
|
|
43
|
+
/** Override stderr capture cap (bytes). */
|
|
44
|
+
readonly maxStderrBytes?: number;
|
|
45
|
+
/** Override the default timeout (ms). */
|
|
46
|
+
readonly defaultTimeoutMs?: number;
|
|
47
|
+
}
|
|
48
|
+
/** Extended config that accepts an injected permission requester. */
|
|
49
|
+
export interface RunCommandToolConfigWithRequester extends RunCommandToolConfig {
|
|
50
|
+
/**
|
|
51
|
+
* Permission requester invoked when the command matches a
|
|
52
|
+
* `requireApprovalPatterns` entry. If absent and an approval is
|
|
53
|
+
* required, the call fails closed with `permission_denied`.
|
|
54
|
+
*/
|
|
55
|
+
readonly requestPermission?: PermissionRequester;
|
|
56
|
+
}
|
|
57
|
+
/** Structured payload returned by `run_command`. */
|
|
58
|
+
export interface RunCommandData {
|
|
59
|
+
/** The command string as executed (echoed verbatim). */
|
|
60
|
+
readonly command: string;
|
|
61
|
+
/** Absolute cwd the command ran in. */
|
|
62
|
+
readonly cwd: string;
|
|
63
|
+
/** Exit code. `null` only when the process was killed before exiting. */
|
|
64
|
+
readonly exitCode: number | null;
|
|
65
|
+
/** Signal that terminated the process, if any (e.g. `"SIGTERM"`). */
|
|
66
|
+
readonly signal: NodeJS.Signals | null;
|
|
67
|
+
/** Captured stdout (UTF-8 decoded, truncated to `maxStdoutBytes`). */
|
|
68
|
+
readonly stdout: string;
|
|
69
|
+
/** Captured stderr (UTF-8 decoded, truncated to `maxStderrBytes`). */
|
|
70
|
+
readonly stderr: string;
|
|
71
|
+
/** True when stdout was truncated by the cap. */
|
|
72
|
+
readonly stdoutTruncated: boolean;
|
|
73
|
+
/** True when stderr was truncated by the cap. */
|
|
74
|
+
readonly stderrTruncated: boolean;
|
|
75
|
+
/** True when the command exceeded `timeoutMs`. */
|
|
76
|
+
readonly timedOut: boolean;
|
|
77
|
+
/** Wall-clock duration of the command in milliseconds. */
|
|
78
|
+
readonly durationMs: number;
|
|
79
|
+
/** Platform snapshot used by the tool — surfaced for the model. */
|
|
80
|
+
readonly platform: PlatformInfo;
|
|
81
|
+
}
|