deepclause-sdk 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/agent.d.ts +12 -0
- package/dist/agent.d.ts.map +1 -1
- package/dist/agent.js +116 -9
- package/dist/agent.js.map +1 -1
- package/dist/cli/config.d.ts +24 -24
- package/dist/cli/repl.d.ts +2 -0
- package/dist/cli/repl.d.ts.map +1 -1
- package/dist/cli/repl.js +26 -0
- package/dist/cli/repl.js.map +1 -1
- package/dist/cli/run.d.ts.map +1 -1
- package/dist/cli/run.js +10 -0
- package/dist/cli/run.js.map +1 -1
- package/dist/prolog/loader.d.ts +32 -0
- package/dist/prolog/loader.d.ts.map +1 -1
- package/dist/prolog/loader.js +87 -0
- package/dist/prolog/loader.js.map +1 -1
- package/dist/prolog-src/deepclause_mi.pl +1028 -118
- package/dist/repl/agent.d.ts +15 -1
- package/dist/repl/agent.d.ts.map +1 -1
- package/dist/repl/agent.js +44 -5
- package/dist/repl/agent.js.map +1 -1
- package/dist/repl/harness-tools.d.ts +24 -2
- package/dist/repl/harness-tools.d.ts.map +1 -1
- package/dist/repl/harness-tools.js +14 -5
- package/dist/repl/harness-tools.js.map +1 -1
- package/dist/repl/index.d.ts +8 -0
- package/dist/repl/index.d.ts.map +1 -1
- package/dist/repl/index.js +1 -0
- package/dist/repl/index.js.map +1 -1
- package/dist/repl/render.d.ts +8 -1
- package/dist/repl/render.d.ts.map +1 -1
- package/dist/repl/render.js +81 -16
- package/dist/repl/render.js.map +1 -1
- package/dist/repl/session.d.ts +61 -4
- package/dist/repl/session.d.ts.map +1 -1
- package/dist/repl/session.js +174 -9
- package/dist/repl/session.js.map +1 -1
- package/dist/repl/tool-arguments.d.ts +36 -0
- package/dist/repl/tool-arguments.d.ts.map +1 -0
- package/dist/repl/tool-arguments.js +123 -0
- package/dist/repl/tool-arguments.js.map +1 -0
- package/dist/repl/toolset.d.ts +28 -1
- package/dist/repl/toolset.d.ts.map +1 -1
- package/dist/repl/toolset.js +52 -4
- package/dist/repl/toolset.js.map +1 -1
- package/dist/runner.d.ts +31 -0
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +192 -17
- package/dist/runner.js.map +1 -1
- package/dist/system/assets/docs/AGENT_PROMPT.md +925 -43
- package/dist/system/assets/docs/DML_AUTHORING.md +96 -17
- package/dist/system/assets/docs/DML_REFERENCE.md +620 -39
- package/dist/system/assets/docs/PROLOG_SNIPPETS.md +45 -1
- package/dist/system/assets/docs/TASK_PROMPT.md +2 -0
- package/dist/system/environment.d.ts +36 -0
- package/dist/system/environment.d.ts.map +1 -0
- package/dist/system/environment.js +81 -0
- package/dist/system/environment.js.map +1 -0
- package/dist/system/runtime/shell-manager.d.ts +40 -2
- package/dist/system/runtime/shell-manager.d.ts.map +1 -1
- package/dist/system/runtime/shell-manager.js +82 -16
- package/dist/system/runtime/shell-manager.js.map +1 -1
- package/dist/system/runtime/shell-tool-events.js +25 -1
- package/dist/system/runtime/shell-tool-events.js.map +1 -1
- package/dist/types.d.ts +20 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +4 -2
- package/src/prolog-src/deepclause_mi.pl +1028 -118
- package/dist/compaction.d.ts +0 -98
- package/dist/compaction.d.ts.map +0 -1
- package/dist/compaction.js +0 -471
- package/dist/compaction.js.map +0 -1
- package/dist/repl/tools.d.ts +0 -53
- package/dist/repl/tools.d.ts.map +0 -1
- package/dist/repl/tools.js +0 -307
- package/dist/repl/tools.js.map +0 -1
- package/dist/system/assets/compactors/default-loop-compactor.dml +0 -43
- package/dist/system/assets/compactors/default-session-compactor.dml +0 -30
- package/dist/system/assets/docs/META_PROMPT.md +0 -68
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tool-call parameter validation.
|
|
3
|
+
*
|
|
4
|
+
* A tool call with an unknown parameter used to be accepted and the extra key
|
|
5
|
+
* silently dropped, so `exec(bash(command: "cat", stdin: "…"), R)` looked
|
|
6
|
+
* reasonable, ran `cat` with no input, and reported success. That is the worst
|
|
7
|
+
* kind of failure: nothing to see, nothing to fix, and the DML author blames
|
|
8
|
+
* their own logic. Rejecting the call names the mistake at the point it is made.
|
|
9
|
+
*
|
|
10
|
+
* Deliberately shallow — unknown keys, missing required keys, and the primitive
|
|
11
|
+
* types. Deep or conditional validation belongs in the tool, which knows its own
|
|
12
|
+
* semantics; this exists to catch a call that cannot mean what it says.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* Extra advice for mistakes that are easy to make and hard to read back. The
|
|
16
|
+
* generic "unknown parameter" message is enough for a typo, but not for a field
|
|
17
|
+
* that looks like it should exist.
|
|
18
|
+
*/
|
|
19
|
+
const PARAMETER_HINTS = {
|
|
20
|
+
stdin: 'exec(bash(...)) has no stdin. Pass the data as an `argv` element '
|
|
21
|
+
+ '(quoted by the runtime), or write it to a workspace file and name the file.',
|
|
22
|
+
input: 'Pass data as an `argv` element or through a workspace file.',
|
|
23
|
+
shell: 'exec(bash(...)) always runs a shell; put the command in `command`, '
|
|
24
|
+
+ 'or pass a program and its arguments as `argv`.',
|
|
25
|
+
cwd: 'The working directory is always the workspace (/workspace); do not pass one.',
|
|
26
|
+
};
|
|
27
|
+
/** Read `properties`/`required` out of a JSON Schema tool parameter block. */
|
|
28
|
+
export function readToolSchema(schema) {
|
|
29
|
+
if (!schema || typeof schema !== 'object')
|
|
30
|
+
return undefined;
|
|
31
|
+
const record = schema;
|
|
32
|
+
const properties = record.properties;
|
|
33
|
+
if (!properties || typeof properties !== 'object')
|
|
34
|
+
return undefined;
|
|
35
|
+
return {
|
|
36
|
+
properties: properties,
|
|
37
|
+
required: Array.isArray(record.required) ? record.required : [],
|
|
38
|
+
additionalProperties: record.additionalProperties,
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/** Does `value` satisfy the declared primitive type? */
|
|
42
|
+
function matchesType(value, type) {
|
|
43
|
+
if (!type)
|
|
44
|
+
return true;
|
|
45
|
+
const types = Array.isArray(type) ? type : [type];
|
|
46
|
+
return types.some((candidate) => {
|
|
47
|
+
switch (candidate) {
|
|
48
|
+
case 'string':
|
|
49
|
+
return typeof value === 'string';
|
|
50
|
+
case 'number':
|
|
51
|
+
return typeof value === 'number' && Number.isFinite(value);
|
|
52
|
+
case 'integer':
|
|
53
|
+
return typeof value === 'number' && Number.isInteger(value);
|
|
54
|
+
case 'boolean':
|
|
55
|
+
return typeof value === 'boolean';
|
|
56
|
+
case 'array':
|
|
57
|
+
return Array.isArray(value);
|
|
58
|
+
case 'object':
|
|
59
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
60
|
+
case 'null':
|
|
61
|
+
return value === null;
|
|
62
|
+
default:
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
function describeAccepted(properties) {
|
|
68
|
+
const names = Object.keys(properties);
|
|
69
|
+
return names.length > 0 ? names.join(', ') : '(none)';
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Validate a tool call's arguments. Nothing to check is not a failure: a tool
|
|
73
|
+
* with no declared properties, or a schema this cannot read (a Zod schema is
|
|
74
|
+
* enforced by the AI SDK instead), passes.
|
|
75
|
+
*/
|
|
76
|
+
export function validateToolArguments(toolName, schema, args) {
|
|
77
|
+
const declared = readToolSchema(schema);
|
|
78
|
+
// Nothing declared means nothing to check — a tool with no parameters (which
|
|
79
|
+
// may still be called positionally) cannot have a wrong one.
|
|
80
|
+
if (!declared?.properties || Object.keys(declared.properties).length === 0)
|
|
81
|
+
return { ok: true };
|
|
82
|
+
const properties = declared.properties;
|
|
83
|
+
const unknownKeys = declared.additionalProperties === true
|
|
84
|
+
? []
|
|
85
|
+
: Object.keys(args).filter((key) => !(key in properties) && !key.startsWith('$'));
|
|
86
|
+
if (unknownKeys.length > 0) {
|
|
87
|
+
const quoted = unknownKeys.map((key) => `'${key}'`).join(', ');
|
|
88
|
+
// The hint explains the mistake; the accepted list says what to write
|
|
89
|
+
// instead. Both, or the author is left guessing which parameter was meant.
|
|
90
|
+
const hints = unknownKeys
|
|
91
|
+
.map((key) => PARAMETER_HINTS[key])
|
|
92
|
+
.filter(Boolean)
|
|
93
|
+
.join(' ');
|
|
94
|
+
return {
|
|
95
|
+
ok: false,
|
|
96
|
+
error: `${toolName}: unknown parameter ${quoted}. ${hints} `
|
|
97
|
+
+ `Accepted: ${describeAccepted(properties)}.`.replace(/\s+/g, ' '),
|
|
98
|
+
};
|
|
99
|
+
}
|
|
100
|
+
const missing = (declared.required ?? []).filter((key) => args[key] === undefined || args[key] === null);
|
|
101
|
+
if (missing.length > 0) {
|
|
102
|
+
return {
|
|
103
|
+
ok: false,
|
|
104
|
+
error: `${toolName}: missing required parameter${missing.length > 1 ? 's' : ''} `
|
|
105
|
+
+ `${missing.join(', ')}.`,
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
for (const [key, value] of Object.entries(args)) {
|
|
109
|
+
if (value === undefined || key.startsWith('$'))
|
|
110
|
+
continue;
|
|
111
|
+
const expected = properties[key]?.type;
|
|
112
|
+
if (!matchesType(value, expected)) {
|
|
113
|
+
const typeLabel = Array.isArray(expected) ? expected.join('|') : String(expected);
|
|
114
|
+
const actual = Array.isArray(value) ? 'array' : value === null ? 'null' : typeof value;
|
|
115
|
+
return {
|
|
116
|
+
ok: false,
|
|
117
|
+
error: `${toolName}: parameter ${key} should be ${typeLabel}, got ${actual}.`,
|
|
118
|
+
};
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
return { ok: true };
|
|
122
|
+
}
|
|
123
|
+
//# sourceMappingURL=tool-arguments.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tool-arguments.js","sourceRoot":"","sources":["../../src/repl/tool-arguments.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAWH;;;;GAIG;AACH,MAAM,eAAe,GAA2B;IAC9C,KAAK,EAAE,mEAAmE;UACtE,6EAA6E;IACjF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CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,CAAC;QAChD,IAAI,KAAK,KAAK,SAAS,IAAI,GAAG,CAAC,UAAU,CAAC,GAAG,CAAC;YAAE,SAAS;QACzD,MAAM,QAAQ,GAAG,UAAU,CAAC,GAAG,CAAC,EAAE,IAAI,CAAC;QACvC,IAAI,CAAC,WAAW,CAAC,KAAK,EAAE,QAAQ,CAAC,EAAE,CAAC;YAClC,MAAM,SAAS,GAAG,KAAK,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;YAClF,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,KAAK,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC;YACvF,OAAO;gBACL,EAAE,EAAE,KAAK;gBACT,KAAK,EAAE,GAAG,QAAQ,eAAe,GAAG,cAAc,SAAS,SAAS,MAAM,GAAG;aAC9E,CAAC;QACJ,CAAC;IACH,CAAC;IAED,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;AACtB,CAAC"}
|
package/dist/repl/toolset.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* human-in-the-loop channel (`ask_user` / `input/2`). `--tools`/`--no-tools`
|
|
8
8
|
* control whether `bash` is registered.
|
|
9
9
|
*/
|
|
10
|
-
import { type HostShellConfig } from '../system/runtime/shell-manager.js';
|
|
10
|
+
import { type ExecutionEnvironment, type HostShellConfig } from '../system/runtime/shell-manager.js';
|
|
11
11
|
import type { DMLEvent, ToolDefinition } from '../types.js';
|
|
12
12
|
export declare const DEFAULT_REPL_TOOLS: readonly ["bash"];
|
|
13
13
|
export interface ReplToolsetOptions {
|
|
@@ -24,9 +24,36 @@ export interface ReplToolset {
|
|
|
24
24
|
tools: Map<string, ToolDefinition>;
|
|
25
25
|
/** Catalog text injected into the meta prompt. */
|
|
26
26
|
catalog: string;
|
|
27
|
+
/**
|
|
28
|
+
* How shell commands will actually run here. The caller passes this to the
|
|
29
|
+
* session so the harness `require_sandbox` check, the model's environment
|
|
30
|
+
* block and this toolset all agree on one answer.
|
|
31
|
+
*/
|
|
32
|
+
environment: ExecutionEnvironment;
|
|
27
33
|
dispose(): Promise<void>;
|
|
28
34
|
}
|
|
35
|
+
/**
|
|
36
|
+
* Describe the `bash` tool, including where it runs.
|
|
37
|
+
*
|
|
38
|
+
* The agent has to reconcile two surfaces — its own tools and DML's `exec` — and
|
|
39
|
+
* they must not disagree about what a path means. So the description states the
|
|
40
|
+
* one name, and states whether anything is actually isolated, rather than
|
|
41
|
+
* letting the agent assume a sandbox is there.
|
|
42
|
+
*/
|
|
43
|
+
export declare function describeBashTool(environment: ExecutionEnvironment): string;
|
|
29
44
|
/** Human-readable catalog of the registered capability tools. */
|
|
30
45
|
export declare function buildToolCatalog(tools: Map<string, ToolDefinition>): string;
|
|
46
|
+
/**
|
|
47
|
+
* Join an argv list into a shell command, quoting every element.
|
|
48
|
+
*
|
|
49
|
+
* This is what makes `exec(bash(argv: [...]))` worth having: the author passes
|
|
50
|
+
* values as a list and never writes a quote, so data containing spaces, quotes,
|
|
51
|
+
* `$`, backticks, `;` or newlines cannot escape into the command. It still runs
|
|
52
|
+
* through the same launch plan, so the sandbox and wrapper are unchanged.
|
|
53
|
+
*
|
|
54
|
+
* POSIX single-quote quoting: wrap in `'`, and end/restart the quote around any
|
|
55
|
+
* embedded `'` (`'\''`).
|
|
56
|
+
*/
|
|
57
|
+
export declare function quoteArgv(argv: readonly string[]): string;
|
|
31
58
|
export declare function createReplToolset(options: ReplToolsetOptions): Promise<ReplToolset>;
|
|
32
59
|
//# sourceMappingURL=toolset.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolset.d.ts","sourceRoot":"","sources":["../../src/repl/toolset.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"toolset.d.ts","sourceRoot":"","sources":["../../src/repl/toolset.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EAGL,KAAK,oBAAoB,EACzB,KAAK,eAAe,EACrB,MAAM,oCAAoC,CAAC;AAE5C,OAAO,KAAK,EAAE,QAAQ,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE5D,eAAO,MAAM,kBAAkB,mBAAoB,CAAC;AAEpD,MAAM,WAAW,kBAAkB;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,UAAU,CAAC,EAAE,eAAe,CAAC;IAC7B,iFAAiF;IACjF,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,QAAQ,KAAK,IAAI,CAAC;CACrC;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;IACnC,kDAAkD;IAClD,OAAO,EAAE,MAAM,CAAC;IAChB;;;;OAIG;IACH,WAAW,EAAE,oBAAoB,CAAC;IAClC,OAAO,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1B;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,CAAC,WAAW,EAAE,oBAAoB,GAAG,MAAM,CAc1E;AAED,iEAAiE;AACjE,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,GAAG,CAAC,MAAM,EAAE,cAAc,CAAC,GAAG,MAAM,CAa3E;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,CAEzD;AAED,wBAAsB,iBAAiB,CAAC,OAAO,EAAE,kBAAkB,GAAG,OAAO,CAAC,WAAW,CAAC,CAuEzF"}
|
package/dist/repl/toolset.js
CHANGED
|
@@ -7,9 +7,32 @@
|
|
|
7
7
|
* human-in-the-loop channel (`ask_user` / `input/2`). `--tools`/`--no-tools`
|
|
8
8
|
* control whether `bash` is registered.
|
|
9
9
|
*/
|
|
10
|
-
import { createShellManager } from '../system/runtime/shell-manager.js';
|
|
10
|
+
import { createShellManager, describeShellExecutionBackend, } from '../system/runtime/shell-manager.js';
|
|
11
11
|
import { createShellToolEventBridge } from '../system/runtime/shell-tool-events.js';
|
|
12
12
|
export const DEFAULT_REPL_TOOLS = ['bash'];
|
|
13
|
+
/**
|
|
14
|
+
* Describe the `bash` tool, including where it runs.
|
|
15
|
+
*
|
|
16
|
+
* The agent has to reconcile two surfaces — its own tools and DML's `exec` — and
|
|
17
|
+
* they must not disagree about what a path means. So the description states the
|
|
18
|
+
* one name, and states whether anything is actually isolated, rather than
|
|
19
|
+
* letting the agent assume a sandbox is there.
|
|
20
|
+
*/
|
|
21
|
+
export function describeBashTool(environment) {
|
|
22
|
+
const isolation = environment.kind === 'clean-room'
|
|
23
|
+
? 'There is NO sandbox: commands run as your user account, and anything you '
|
|
24
|
+
+ 'write outside the workspace is real and persists.'
|
|
25
|
+
: `Isolated by ${environment.description}.`;
|
|
26
|
+
return [
|
|
27
|
+
'Run a shell command in the session workspace.',
|
|
28
|
+
'Your working directory is the workspace, and /workspace names that same '
|
|
29
|
+
+ 'directory (DML uses the same name), so out/report.txt and '
|
|
30
|
+
+ '/workspace/out/report.txt are one file.',
|
|
31
|
+
'Only files under the workspace are shared with the host. For scratch use '
|
|
32
|
+
+ '"$TMPDIR" (a per-session directory), not a fixed path like /tmp.',
|
|
33
|
+
isolation,
|
|
34
|
+
].join(' ');
|
|
35
|
+
}
|
|
13
36
|
/** Human-readable catalog of the registered capability tools. */
|
|
14
37
|
export function buildToolCatalog(tools) {
|
|
15
38
|
if (tools.size === 0) {
|
|
@@ -25,10 +48,25 @@ export function buildToolCatalog(tools) {
|
|
|
25
48
|
lines.push('DML file I/O always uses the MI predicates (open/3, close/1, read_string/3, write/2, write_file/2, read_file/2, append_file/2); it is not a host tool.');
|
|
26
49
|
return lines.join('\n');
|
|
27
50
|
}
|
|
51
|
+
/**
|
|
52
|
+
* Join an argv list into a shell command, quoting every element.
|
|
53
|
+
*
|
|
54
|
+
* This is what makes `exec(bash(argv: [...]))` worth having: the author passes
|
|
55
|
+
* values as a list and never writes a quote, so data containing spaces, quotes,
|
|
56
|
+
* `$`, backticks, `;` or newlines cannot escape into the command. It still runs
|
|
57
|
+
* through the same launch plan, so the sandbox and wrapper are unchanged.
|
|
58
|
+
*
|
|
59
|
+
* POSIX single-quote quoting: wrap in `'`, and end/restart the quote around any
|
|
60
|
+
* embedded `'` (`'\''`).
|
|
61
|
+
*/
|
|
62
|
+
export function quoteArgv(argv) {
|
|
63
|
+
return argv.map((item) => `'${item.replace(/'/g, `'\\''`)}'`).join(' ');
|
|
64
|
+
}
|
|
28
65
|
export async function createReplToolset(options) {
|
|
29
66
|
const requested = options.toolNames === null
|
|
30
67
|
? []
|
|
31
68
|
: options.toolNames ?? [...DEFAULT_REPL_TOOLS];
|
|
69
|
+
const environment = describeShellExecutionBackend(options.sandbox, options.hostConfig ?? {});
|
|
32
70
|
const tools = new Map();
|
|
33
71
|
let shell = requested.includes('bash')
|
|
34
72
|
? createShellManager({
|
|
@@ -41,20 +79,29 @@ export async function createReplToolset(options) {
|
|
|
41
79
|
if (shell) {
|
|
42
80
|
const shellManager = shell;
|
|
43
81
|
tools.set('bash', {
|
|
44
|
-
description:
|
|
82
|
+
description: describeBashTool(environment),
|
|
45
83
|
parameters: {
|
|
46
84
|
type: 'object',
|
|
47
85
|
properties: {
|
|
48
86
|
command: { type: 'string', description: 'Shell command to execute.' },
|
|
87
|
+
argv: {
|
|
88
|
+
type: 'array',
|
|
89
|
+
description: 'Command and arguments as a list, quoted by the runtime. '
|
|
90
|
+
+ 'Prefer this over `command` when any argument is data.',
|
|
91
|
+
},
|
|
49
92
|
timeoutMs: {
|
|
50
93
|
type: 'integer',
|
|
51
94
|
description: 'Wall-clock timeout in milliseconds (optional; overrides DC_HOST_SHELL_TIMEOUT_MS).',
|
|
52
95
|
},
|
|
53
96
|
},
|
|
54
|
-
required: ['command'],
|
|
55
97
|
},
|
|
56
98
|
execute: async (args, context) => {
|
|
57
|
-
const
|
|
99
|
+
const argv = Array.isArray(args.argv)
|
|
100
|
+
? args.argv.map((item) => String(item))
|
|
101
|
+
: undefined;
|
|
102
|
+
const command = argv && argv.length > 0
|
|
103
|
+
? quoteArgv(argv)
|
|
104
|
+
: String(args.command ?? args.arg1 ?? '');
|
|
58
105
|
const timeoutMs = typeof args.timeoutMs === 'number' && Number.isFinite(args.timeoutMs) && args.timeoutMs > 0
|
|
59
106
|
? args.timeoutMs
|
|
60
107
|
: undefined;
|
|
@@ -71,6 +118,7 @@ export async function createReplToolset(options) {
|
|
|
71
118
|
return {
|
|
72
119
|
tools,
|
|
73
120
|
catalog: buildToolCatalog(tools),
|
|
121
|
+
environment,
|
|
74
122
|
dispose: async () => {
|
|
75
123
|
if (shell) {
|
|
76
124
|
await shell.dispose();
|
package/dist/repl/toolset.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toolset.js","sourceRoot":"","sources":["../../src/repl/toolset.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,
|
|
1
|
+
{"version":3,"file":"toolset.js","sourceRoot":"","sources":["../../src/repl/toolset.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,kBAAkB,EAClB,6BAA6B,GAG9B,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAGpF,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,MAAM,CAAU,CAAC;AA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AE,CAAC;gBACV,MAAM,KAAK,CAAC,OAAO,EAAE,CAAC;gBACtB,KAAK,GAAG,IAAI,CAAC;YACf,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/runner.d.ts
CHANGED
|
@@ -47,6 +47,8 @@ export interface RunnerOptions {
|
|
|
47
47
|
imageBackend?: ImageBackend;
|
|
48
48
|
/** Resolves `with_model/2` scopes to concrete models. */
|
|
49
49
|
modelResolver?: ModelResolver;
|
|
50
|
+
/** Effective shell backend, passed to nested task agents for their env block. */
|
|
51
|
+
environment?: import('./system/runtime/shell-manager.js').ExecutionEnvironment;
|
|
50
52
|
}
|
|
51
53
|
export interface InternalRunOptions {
|
|
52
54
|
args?: unknown[];
|
|
@@ -67,6 +69,24 @@ export interface InternalRunOptions {
|
|
|
67
69
|
*/
|
|
68
70
|
onModelCall?: () => boolean | Promise<boolean>;
|
|
69
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* User tool info from Prolog
|
|
74
|
+
*/
|
|
75
|
+
/**
|
|
76
|
+
* The error a tool call gets when the tool is already running further up the
|
|
77
|
+
* call chain. Shared by the runtime guard and the withheld-tool stub.
|
|
78
|
+
*/
|
|
79
|
+
export declare function unavailableToolError(toolName: string): string;
|
|
80
|
+
/**
|
|
81
|
+
* Parse the `toolScope` a `task/N` carries from `with_tools/2` / `without_tools/2`.
|
|
82
|
+
*
|
|
83
|
+
* Shape: `{$t:'t', whitelist:[[Names]]}` / `blacklist:[[Names]]`, or the atom
|
|
84
|
+
* `none`. The extra list nesting comes from the term's argument list.
|
|
85
|
+
*/
|
|
86
|
+
export declare function parseToolScope(raw: unknown): {
|
|
87
|
+
type: 'none' | 'whitelist' | 'blacklist';
|
|
88
|
+
list: string[];
|
|
89
|
+
};
|
|
70
90
|
/**
|
|
71
91
|
* A frame in the runner's reentrant execution stack.
|
|
72
92
|
*
|
|
@@ -96,6 +116,16 @@ export declare class DMLRunner {
|
|
|
96
116
|
private currentMemory;
|
|
97
117
|
private stepCounter;
|
|
98
118
|
private judgeCache;
|
|
119
|
+
/**
|
|
120
|
+
* DML tools currently executing, innermost last.
|
|
121
|
+
*
|
|
122
|
+
* A tool must not be reachable by any agent it spawns, or `foo(A) :- task(...)`
|
|
123
|
+
* recurses: the agent inside `task/N` calls `foo`, which spawns another agent,
|
|
124
|
+
* and so on. The tool list is built *before* the tool runs (so a static list
|
|
125
|
+
* cannot know), which is why the check is applied when the model calls the
|
|
126
|
+
* tool rather than when the list is built.
|
|
127
|
+
*/
|
|
128
|
+
private toolCallStack;
|
|
99
129
|
/**
|
|
100
130
|
* Runner-owned frame table: FrameId -> { frame, engine }.
|
|
101
131
|
* The Prolog session owns the authoritative engine handles
|
|
@@ -265,6 +295,7 @@ export declare class DMLRunner {
|
|
|
265
295
|
* @param onToolCall - Callback to emit tool call events from nested tasks
|
|
266
296
|
*/
|
|
267
297
|
private executeToolIsolated;
|
|
298
|
+
private executeToolIsolatedInner;
|
|
268
299
|
private applyHostCompaction;
|
|
269
300
|
private extractMessagesFromValue;
|
|
270
301
|
/** Decode `media{path:..., mime:...}` dicts into reference-only refs. */
|
package/dist/runner.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAAY,EAGZ,aAAa,EACb,UAAU,EAEV,cAAc,EACd,UAAU,EACV,QAAQ,EACT,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"runner.d.ts","sourceRoot":"","sources":["../src/runner.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,KAAK,EACV,UAAU,EACV,QAAQ,EACR,SAAS,EACT,YAA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