@robota-sdk/agent-tool-defaults 3.0.0-beta.86 → 3.0.0-beta.88
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/CHANGELOG.md +25 -0
- package/README.md +5 -5
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts +1 -0
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.ts +1 -0
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +11 -9
- package/src/__tests__/create-default-tools.test.ts +1 -1
- package/src/create-default-tools.ts +2 -1
- package/src/index.ts +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @robota-sdk/agent-tool-defaults
|
|
2
2
|
|
|
3
|
+
## 3.0.0-beta.88
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies [d994f60]
|
|
8
|
+
- @robota-sdk/agent-tools@3.0.0-beta.88
|
|
9
|
+
- @robota-sdk/agent-core@3.0.0-beta.88
|
|
10
|
+
|
|
11
|
+
## 3.0.0-beta.87
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Release the migrated Robota product with its public SDK namespace, robota command, compatible SDK exports, internal product configuration, and verified CLI startup and delivery corrections.
|
|
16
|
+
- Updated dependencies
|
|
17
|
+
- Updated dependencies [66af868]
|
|
18
|
+
- Updated dependencies [7d9cc66]
|
|
19
|
+
- Updated dependencies [7d9cc66]
|
|
20
|
+
- Updated dependencies [7d9cc66]
|
|
21
|
+
- Updated dependencies [7d9cc66]
|
|
22
|
+
- Updated dependencies [7d9cc66]
|
|
23
|
+
- Updated dependencies [7d9cc66]
|
|
24
|
+
- Updated dependencies [7d9cc66]
|
|
25
|
+
- @robota-sdk/agent-core@3.0.0-beta.87
|
|
26
|
+
- @robota-sdk/agent-tools@3.0.0-beta.87
|
|
27
|
+
|
|
3
28
|
## 3.0.0-beta.86
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @robota-sdk/agent-tool-defaults
|
|
2
2
|
|
|
3
|
-
The Robota SDK's built-in default tool set. `createDefaultTools()` builds the tools
|
|
3
|
+
The Robota SDK's built-in default tool set. `createDefaultTools()` builds the tools an agent session
|
|
4
4
|
gets when its composition root supplies no tool list of its own, using the tool factories from
|
|
5
5
|
`@robota-sdk/agent-tools`. It implements no tool itself. File tools that run on the host are
|
|
6
6
|
contained by the `cwd` you pass; with a `sandboxClient` that has its own filesystem, file paths go to
|
|
@@ -16,13 +16,13 @@ npm install @robota-sdk/agent-tool-defaults @robota-sdk/agent-core
|
|
|
16
16
|
## Usage
|
|
17
17
|
|
|
18
18
|
```typescript
|
|
19
|
-
import {
|
|
19
|
+
import { ConversationAgent } from '@robota-sdk/agent-core';
|
|
20
20
|
import type { IAIProvider } from '@robota-sdk/agent-core';
|
|
21
21
|
import { createDefaultTools } from '@robota-sdk/agent-tool-defaults';
|
|
22
22
|
|
|
23
23
|
declare const provider: IAIProvider;
|
|
24
24
|
|
|
25
|
-
const agent = new
|
|
25
|
+
const agent = new ConversationAgent({
|
|
26
26
|
name: 'DevAgent',
|
|
27
27
|
aiProviders: [provider],
|
|
28
28
|
defaultModel: { provider: 'anthropic', model: 'claude-sonnet-4-6' },
|
|
@@ -71,10 +71,10 @@ When the sandbox shares the host filesystem, file tools stay on the host, contai
|
|
|
71
71
|
|
|
72
72
|
- [`@robota-sdk/agent-tools`](../agent-tools/README.md): the tool factories, the tool registry and
|
|
73
73
|
the sandbox clients.
|
|
74
|
-
- [`@robota-sdk/agent-core`](../agent-core/README.md): the `
|
|
74
|
+
- [`@robota-sdk/agent-core`](../agent-core/README.md): the `ConversationAgent` agent and the tool contract.
|
|
75
75
|
|
|
76
76
|
See [docs/SPEC.md](docs/SPEC.md) for the package contract.
|
|
77
77
|
|
|
78
78
|
## License
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
This package is dual-licensed under the [GNU AGPL-3.0](../../LICENSE) or a [commercial license](../../COMMERCIAL.md). See [LICENSING.md](../../LICENSING.md).
|
package/dist/node/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@robota-sdk/agent-tools");function t(t){let n=(0,e.routesFilesThroughSandbox)(t.sandboxClient),{sandboxClient:r,...i}=t,a=n?t:i;return[(0,e.createShellTool)(t),(0,e.createBashTool)(t),(0,e.createReadTool)(a),(0,e.createWriteTool)(a),(0,e.createEditTool)(a),...n?[]:[(0,e.createGlobTool)(t),(0,e.createGrepTool)(t)],(0,e.createWebFetchTool)(),(0,e.createWebSearchTool)(),(0,e.createAskUserQuestionTool)(),...t.retrievalAdapter?[(0,e.createRetrievalTool)({adapter:t.retrievalAdapter})]:[],...t.computerDriver?(0,e.createComputerTool)({driver:t.computerDriver}):[]]}exports.createDefaultTools=t;
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@robota-sdk/agent-tools");function t(t){let n=(0,e.routesFilesThroughSandbox)(t.sandboxClient),{sandboxClient:r,...i}=t,a=n?t:i;return[(0,e.createShellTool)(t),(0,e.createBashTool)(t),(0,e.createReadTool)(a),(0,e.createWriteTool)(a),(0,e.createEditTool)(a),...n?[]:[(0,e.createGlobTool)(t),(0,e.createGrepTool)(t)],(0,e.createWebFetchTool)({userAgent:t.httpUserAgent}),(0,e.createWebSearchTool)(),(0,e.createAskUserQuestionTool)(),...t.retrievalAdapter?[(0,e.createRetrievalTool)({adapter:t.retrievalAdapter})]:[],...t.computerDriver?(0,e.createComputerTool)({driver:t.computerDriver}):[]]}exports.createDefaultTools=t;
|
package/dist/node/index.d.cts
CHANGED
|
@@ -9,6 +9,7 @@ interface ICreateDefaultToolsOptions {
|
|
|
9
9
|
sandboxClient?: ISandboxClient;
|
|
10
10
|
/** Host-selected executable for Shell and Bash. */
|
|
11
11
|
shellExecutable?: string;
|
|
12
|
+
httpUserAgent?: string;
|
|
12
13
|
/**
|
|
13
14
|
* The execution root every file tool is contained by. REQUIRED — ARCH-010.
|
|
14
15
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/create-default-tools.ts"],"mappings":";;;;;;;UA0CiB;EACf,gBAAgB;;EAEhB;;;;;;;;;EASA;;EAEA,mBAAmB;;;;;;EAMnB,iBAAiB;;;;;;;;;;;iBAYH,mBAAmB,SAAS,6BAA6B"}
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/create-default-tools.ts"],"mappings":";;;;;;;UA0CiB;EACf,gBAAgB;;EAEhB;EACA;;;;;;;;;EASA;;EAEA,mBAAmB;;;;;;EAMnB,iBAAiB;;;;;;;;;;;iBAYH,mBAAmB,SAAS,6BAA6B"}
|
package/dist/node/index.d.ts
CHANGED
|
@@ -9,6 +9,7 @@ interface ICreateDefaultToolsOptions {
|
|
|
9
9
|
sandboxClient?: ISandboxClient;
|
|
10
10
|
/** Host-selected executable for Shell and Bash. */
|
|
11
11
|
shellExecutable?: string;
|
|
12
|
+
httpUserAgent?: string;
|
|
12
13
|
/**
|
|
13
14
|
* The execution root every file tool is contained by. REQUIRED — ARCH-010.
|
|
14
15
|
*
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/create-default-tools.ts"],"mappings":";;;;;;;UA0CiB;EACf,gBAAgB;;EAEhB;;;;;;;;;EASA;;EAEA,mBAAmB;;;;;;EAMnB,iBAAiB;;;;;;;;;;;iBAYH,mBAAmB,SAAS,6BAA6B"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/create-default-tools.ts"],"mappings":";;;;;;;UA0CiB;EACf,gBAAgB;;EAEhB;EACA;;;;;;;;;EASA;;EAEA,mBAAmB;;;;;;EAMnB,iBAAiB;;;;;;;;;;;iBAYH,mBAAmB,SAAS,6BAA6B"}
|
package/dist/node/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{createAskUserQuestionTool as e,createBashTool as t,createComputerTool as n,createEditTool as r,createGlobTool as i,createGrepTool as a,createReadTool as o,createRetrievalTool as s,createShellTool as c,createWebFetchTool as l,createWebSearchTool as u,createWriteTool as d,routesFilesThroughSandbox as f}from"@robota-sdk/agent-tools";function p(p){let m=f(p.sandboxClient),{sandboxClient:h,...g}=p,_=m?p:g;return[c(p),t(p),o(_),d(_),r(_),...m?[]:[i(p),a(p)],l(),u(),e(),...p.retrievalAdapter?[s({adapter:p.retrievalAdapter})]:[],...p.computerDriver?n({driver:p.computerDriver}):[]]}export{p as createDefaultTools};
|
|
1
|
+
import{createAskUserQuestionTool as e,createBashTool as t,createComputerTool as n,createEditTool as r,createGlobTool as i,createGrepTool as a,createReadTool as o,createRetrievalTool as s,createShellTool as c,createWebFetchTool as l,createWebSearchTool as u,createWriteTool as d,routesFilesThroughSandbox as f}from"@robota-sdk/agent-tools";function p(p){let m=f(p.sandboxClient),{sandboxClient:h,...g}=p,_=m?p:g;return[c(p),t(p),o(_),d(_),r(_),...m?[]:[i(p),a(p)],l({userAgent:p.httpUserAgent}),u(),e(),...p.retrievalAdapter?[s({adapter:p.retrievalAdapter})]:[],...p.computerDriver?n({driver:p.computerDriver}):[]]}export{p as createDefaultTools};
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/create-default-tools.ts"],"sourcesContent":["/**\n * The DEFAULT TOOL SET — a composition leaf.\n *\n * ARCH-035 moved this out of `@robota-sdk/agent-framework`. It is a defaults aggregator, and\n * `.agents/project-structure.md` classifies that family as a composition leaf \"imported only at\n * composition roots (entry-point-only)\" — not something a mid-layer assembly library owns, publishes\n * and self-consumes.\n *\n * The move is what carries the guarantee. `agent-subagent-runner` may depend on `agent-framework`\n * (it needs `createSubagentSession` and friends) but has no manifest edge to THIS package, so\n * `import { createDefaultTools } from '@robota-sdk/agent-tool-defaults'` does not resolve there at\n * all. A neutral runner composing the product's tool surface is now a compile error rather than a\n * scan finding — the same shape ARCH-021 achieved on the provider axis with\n * `@robota-sdk/agent-builtin-providers`.\n *\n * `DEFAULT_TOOL_DESCRIPTIONS` deliberately did NOT come along: its only consumer builds the system\n * prompt synchronously, and dragging it here would force either a static edge back into this leaf or\n * a second async hop through prompt building. It stays beside its consumer in `agent-framework`.\n */\nimport {\n createAskUserQuestionTool,\n createShellTool,\n createBashTool,\n createReadTool,\n createWriteTool,\n createEditTool,\n createRetrievalTool,\n createComputerTool,\n createGlobTool,\n createGrepTool,\n createWebFetchTool,\n createWebSearchTool,\n routesFilesThroughSandbox,\n} from '@robota-sdk/agent-tools';\n\nimport type { FunctionTool } from '@robota-sdk/agent-core';\nimport type { ISandboxClient, IRetrievalAdapter, IComputerDriver } from '@robota-sdk/agent-tools';\n\n/**\n * Create the default set of CLI tools.\n * Returns the standard tools.\n */\nexport interface ICreateDefaultToolsOptions {\n sandboxClient?: ISandboxClient;\n /** Host-selected executable for Shell and Bash. */\n shellExecutable?: string;\n /**\n * The execution root every file tool is contained by. REQUIRED — ARCH-010.\n *\n * It was optional, and `child-process-subagent-worker.ts` called this factory with no argument at\n * all: `cwd` was `undefined`, the path guard was fail-open, and the subagent's `Read` returned\n * `/etc/hostname`. Requiring it means a construction site that forgets does not compile, which is\n * the only way a containment root stays a contract rather than a convention.\n */\n cwd: string;\n /** SELFHOST-003: when present, adds the adapter-gated `CodebaseRetrieval` tool (absent otherwise). */\n retrievalAdapter?: IRetrievalAdapter;\n /**\n * SELFHOST-010: when present, adds the adapter-gated `ComputerView` + `Computer` tools. Unlike the\n * shell tool's host `spawn` fallback, computer-use has NO host fallback — with no driver the tools are\n * simply ABSENT (there is no safe library-side \"local\" screen to fall back to).\n */\n computerDriver?: IComputerDriver;\n}\n\n/**\n * ARCH-035: returns `FunctionTool[]`, which is what every factory below actually returns.\n *\n * An earlier revision cast each one to `IToolWithEventService` because session assembly consumes that\n * interface. The cast was lossy in the direction that mattered: `ICapabilityPack.tools` is\n * `readonly FunctionTool[]`, so a pack CONSUMING this set could not assign it without a second cast\n * back — one erasure creating the need for another. `FunctionTool` satisfies `IToolWithEventService`,\n * so session assembly is unaffected and no cast is needed at either end.\n */\nexport function createDefaultTools(options: ICreateDefaultToolsOptions): FunctionTool[] {\n // Issue #3081: the sandbox's filesystem relation decides where file tools read and write. On a\n // SEPARATE filesystem every file tool goes through the sandbox — and `Glob`/`Grep`, which have no\n // sandbox path, are withheld, so a search can never read the host while an edit writes the\n // sandbox. On a SHARED filesystem (commands confined over the host's) file tools stay on the host\n // under the path guard, and only commands run through the sandbox.\n const separate = routesFilesThroughSandbox(options.sandboxClient);\n const { sandboxClient: _commandsOnly, ...hostFileOptions } = options;\n const fileOptions = separate ? options : hostFileOptions;\n return [\n createShellTool(options),\n createBashTool(options),\n createReadTool(fileOptions),\n createWriteTool(fileOptions),\n createEditTool(fileOptions),\n // SEC-007: built per call, NOT the module-level singletons. A singleton is context-free by\n // construction, so registering one meant `Glob`/`Grep` could enumerate outside the session's\n // working directory while `Read`/`Write`/`Edit` were contained.\n ...(separate ? [] : [createGlobTool(options), createGrepTool(options)]),\n // MUST 4: also built per call, for the same reason — `webFetchTool`/`webSearchTool` are\n // module-level singletons in `agent-tools`, so two concurrently open sessions built from this\n // set (e.g. two `sessionParticipant`s) shared them and tripped `resource-reused` even though\n // nothing about a WebFetch/WebSearch tool actually needs to be shared across sessions.\n createWebFetchTool(),\n createWebSearchTool(),\n createAskUserQuestionTool(),\n // Retrieval is adapter-gated: absent when no adapter is supplied (there is no host fallback).\n ...(options.retrievalAdapter\n ? [createRetrievalTool({ adapter: options.retrievalAdapter })]\n : []),\n // Computer-use is adapter-gated on the driver: absent when no driver is supplied. There is NO host\n // fallback (unlike the shell tool's host spawn) — no library-side \"local\" screen exists.\n ...(options.computerDriver ? createComputerTool({ driver: options.computerDriver }) : []),\n ];\n}\n"],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/create-default-tools.ts"],"sourcesContent":["/**\n * The DEFAULT TOOL SET — a composition leaf.\n *\n * ARCH-035 moved this out of `@robota-sdk/agent-framework`. It is a defaults aggregator, and\n * `.agents/project-structure.md` classifies that family as a composition leaf \"imported only at\n * composition roots (entry-point-only)\" — not something a mid-layer assembly library owns, publishes\n * and self-consumes.\n *\n * The move is what carries the guarantee. `agent-subagent-runner` may depend on `agent-framework`\n * (it needs `createSubagentSession` and friends) but has no manifest edge to THIS package, so\n * `import { createDefaultTools } from '@robota-sdk/agent-tool-defaults'` does not resolve there at\n * all. A neutral runner composing the product's tool surface is now a compile error rather than a\n * scan finding — the same shape ARCH-021 achieved on the provider axis with\n * `@robota-sdk/agent-builtin-providers`.\n *\n * `DEFAULT_TOOL_DESCRIPTIONS` deliberately did NOT come along: its only consumer builds the system\n * prompt synchronously, and dragging it here would force either a static edge back into this leaf or\n * a second async hop through prompt building. It stays beside its consumer in `agent-framework`.\n */\nimport {\n createAskUserQuestionTool,\n createShellTool,\n createBashTool,\n createReadTool,\n createWriteTool,\n createEditTool,\n createRetrievalTool,\n createComputerTool,\n createGlobTool,\n createGrepTool,\n createWebFetchTool,\n createWebSearchTool,\n routesFilesThroughSandbox,\n} from '@robota-sdk/agent-tools';\n\nimport type { FunctionTool } from '@robota-sdk/agent-core';\nimport type { ISandboxClient, IRetrievalAdapter, IComputerDriver } from '@robota-sdk/agent-tools';\n\n/**\n * Create the default set of CLI tools.\n * Returns the standard tools.\n */\nexport interface ICreateDefaultToolsOptions {\n sandboxClient?: ISandboxClient;\n /** Host-selected executable for Shell and Bash. */\n shellExecutable?: string;\n httpUserAgent?: string;\n /**\n * The execution root every file tool is contained by. REQUIRED — ARCH-010.\n *\n * It was optional, and `child-process-subagent-worker.ts` called this factory with no argument at\n * all: `cwd` was `undefined`, the path guard was fail-open, and the subagent's `Read` returned\n * `/etc/hostname`. Requiring it means a construction site that forgets does not compile, which is\n * the only way a containment root stays a contract rather than a convention.\n */\n cwd: string;\n /** SELFHOST-003: when present, adds the adapter-gated `CodebaseRetrieval` tool (absent otherwise). */\n retrievalAdapter?: IRetrievalAdapter;\n /**\n * SELFHOST-010: when present, adds the adapter-gated `ComputerView` + `Computer` tools. Unlike the\n * shell tool's host `spawn` fallback, computer-use has NO host fallback — with no driver the tools are\n * simply ABSENT (there is no safe library-side \"local\" screen to fall back to).\n */\n computerDriver?: IComputerDriver;\n}\n\n/**\n * ARCH-035: returns `FunctionTool[]`, which is what every factory below actually returns.\n *\n * An earlier revision cast each one to `IToolWithEventService` because session assembly consumes that\n * interface. The cast was lossy in the direction that mattered: `ICapabilityPack.tools` is\n * `readonly FunctionTool[]`, so a pack CONSUMING this set could not assign it without a second cast\n * back — one erasure creating the need for another. `FunctionTool` satisfies `IToolWithEventService`,\n * so session assembly is unaffected and no cast is needed at either end.\n */\nexport function createDefaultTools(options: ICreateDefaultToolsOptions): FunctionTool[] {\n // Issue #3081: the sandbox's filesystem relation decides where file tools read and write. On a\n // SEPARATE filesystem every file tool goes through the sandbox — and `Glob`/`Grep`, which have no\n // sandbox path, are withheld, so a search can never read the host while an edit writes the\n // sandbox. On a SHARED filesystem (commands confined over the host's) file tools stay on the host\n // under the path guard, and only commands run through the sandbox.\n const separate = routesFilesThroughSandbox(options.sandboxClient);\n const { sandboxClient: _commandsOnly, ...hostFileOptions } = options;\n const fileOptions = separate ? options : hostFileOptions;\n return [\n createShellTool(options),\n createBashTool(options),\n createReadTool(fileOptions),\n createWriteTool(fileOptions),\n createEditTool(fileOptions),\n // SEC-007: built per call, NOT the module-level singletons. A singleton is context-free by\n // construction, so registering one meant `Glob`/`Grep` could enumerate outside the session's\n // working directory while `Read`/`Write`/`Edit` were contained.\n ...(separate ? [] : [createGlobTool(options), createGrepTool(options)]),\n // MUST 4: also built per call, for the same reason — `webFetchTool`/`webSearchTool` are\n // module-level singletons in `agent-tools`, so two concurrently open sessions built from this\n // set (e.g. two `sessionParticipant`s) shared them and tripped `resource-reused` even though\n // nothing about a WebFetch/WebSearch tool actually needs to be shared across sessions.\n createWebFetchTool({ userAgent: options.httpUserAgent }),\n createWebSearchTool(),\n createAskUserQuestionTool(),\n // Retrieval is adapter-gated: absent when no adapter is supplied (there is no host fallback).\n ...(options.retrievalAdapter\n ? [createRetrievalTool({ adapter: options.retrievalAdapter })]\n : []),\n // Computer-use is adapter-gated on the driver: absent when no driver is supplied. There is NO host\n // fallback (unlike the shell tool's host spawn) — no library-side \"local\" screen exists.\n ...(options.computerDriver ? createComputerTool({ driver: options.computerDriver }) : []),\n ];\n}\n"],"mappings":"mVA2EA,SAAgB,EAAmB,EAAqD,CAMtF,IAAM,EAAW,EAA0B,EAAQ,aAAa,EAC1D,CAAE,cAAe,EAAe,GAAG,GAAoB,EACvD,EAAc,EAAW,EAAU,EACzC,MAAO,CACL,EAAgB,CAAO,EACvB,EAAe,CAAO,EACtB,EAAe,CAAW,EAC1B,EAAgB,CAAW,EAC3B,EAAe,CAAW,EAI1B,GAAI,EAAW,CAAC,EAAI,CAAC,EAAe,CAAO,EAAG,EAAe,CAAO,CAAC,EAKrE,EAAmB,CAAE,UAAW,EAAQ,aAAc,CAAC,EACvD,EAAoB,EACpB,EAA0B,EAE1B,GAAI,EAAQ,iBACR,CAAC,EAAoB,CAAE,QAAS,EAAQ,gBAAiB,CAAC,CAAC,EAC3D,CAAC,EAGL,GAAI,EAAQ,eAAiB,EAAmB,CAAE,OAAQ,EAAQ,cAAe,CAAC,EAAI,CAAC,CACzF,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robota-sdk/agent-tool-defaults",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.88",
|
|
4
4
|
"description": "The SDK's built-in default tool set (createDefaultTools) as a composition leaf over agent-tools",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"publishConfig": {
|
|
@@ -49,19 +49,21 @@
|
|
|
49
49
|
"vitest": "^3.2.6"
|
|
50
50
|
},
|
|
51
51
|
"license": "AGPL-3.0-only OR LicenseRef-Commercial",
|
|
52
|
-
"repository": {
|
|
53
|
-
"type": "git",
|
|
54
|
-
"url": "https://github.com/woojubb/robota.git",
|
|
55
|
-
"directory": "packages/agent-tool-defaults"
|
|
56
|
-
},
|
|
57
|
-
"homepage": "https://docs.robota.io/en/packages/agent-tool-defaults/",
|
|
58
52
|
"dependencies": {
|
|
59
|
-
"@robota-sdk/agent-core": "3.0.0-beta.
|
|
60
|
-
"@robota-sdk/agent-tools": "3.0.0-beta.
|
|
53
|
+
"@robota-sdk/agent-core": "3.0.0-beta.88",
|
|
54
|
+
"@robota-sdk/agent-tools": "3.0.0-beta.88"
|
|
61
55
|
},
|
|
62
56
|
"volta": {
|
|
63
57
|
"extends": "../../package.json"
|
|
64
58
|
},
|
|
59
|
+
"repository": {
|
|
60
|
+
"type": "git",
|
|
61
|
+
"url": "https://github.com/woojubb/robota"
|
|
62
|
+
},
|
|
63
|
+
"bugs": {
|
|
64
|
+
"url": "https://github.com/woojubb/robota/issues"
|
|
65
|
+
},
|
|
66
|
+
"homepage": "https://robota.io/",
|
|
65
67
|
"scripts": {
|
|
66
68
|
"build": "rimraf dist && tsdown",
|
|
67
69
|
"build:js": "pnpm run build",
|
|
@@ -16,7 +16,7 @@ import type { IRetrievalAdapter, IComputerDriver } from '@robota-sdk/agent-tools
|
|
|
16
16
|
* Every root sits, unmade, inside one private per-run directory rather than at a fixed name under
|
|
17
17
|
* /tmp that another local user could create first.
|
|
18
18
|
*/
|
|
19
|
-
const PRIVATE_BASE = mkdtempSync(join(tmpdir(), '
|
|
19
|
+
const PRIVATE_BASE = mkdtempSync(join(tmpdir(), 'agent-test-create-tools-'));
|
|
20
20
|
afterAll(() => rmSync(PRIVATE_BASE, { recursive: true, force: true }));
|
|
21
21
|
const ASSEMBLY_ROOT = join(PRIVATE_BASE, 'create-tools-assembly-root');
|
|
22
22
|
|
|
@@ -44,6 +44,7 @@ export interface ICreateDefaultToolsOptions {
|
|
|
44
44
|
sandboxClient?: ISandboxClient;
|
|
45
45
|
/** Host-selected executable for Shell and Bash. */
|
|
46
46
|
shellExecutable?: string;
|
|
47
|
+
httpUserAgent?: string;
|
|
47
48
|
/**
|
|
48
49
|
* The execution root every file tool is contained by. REQUIRED — ARCH-010.
|
|
49
50
|
*
|
|
@@ -95,7 +96,7 @@ export function createDefaultTools(options: ICreateDefaultToolsOptions): Functio
|
|
|
95
96
|
// module-level singletons in `agent-tools`, so two concurrently open sessions built from this
|
|
96
97
|
// set (e.g. two `sessionParticipant`s) shared them and tripped `resource-reused` even though
|
|
97
98
|
// nothing about a WebFetch/WebSearch tool actually needs to be shared across sessions.
|
|
98
|
-
createWebFetchTool(),
|
|
99
|
+
createWebFetchTool({ userAgent: options.httpUserAgent }),
|
|
99
100
|
createWebSearchTool(),
|
|
100
101
|
createAskUserQuestionTool(),
|
|
101
102
|
// Retrieval is adapter-gated: absent when no adapter is supplied (there is no host fallback).
|
package/src/index.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* `@robota-sdk/agent-tool-defaults` — the SDK's built-in default tool set, as a composition leaf.
|
|
3
3
|
*
|
|
4
|
-
* WHOSE defaults (#2202): the
|
|
4
|
+
* WHOSE defaults (#2202): the agent runtime SDK's own — the tools every product session gets unless the
|
|
5
5
|
* composition root supplies its own list. It composes ONE lower-layer package (`agent-tools`); it does
|
|
6
6
|
* not bundle same-level `agent-tool-*` siblings, so it is not an aggregator in the STRUCT-011 sense
|
|
7
7
|
* and keeps its name. Only the description had to say whose.
|