@robota-sdk/agent-tool-defaults 3.0.0-beta.81 → 3.0.0-beta.83

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 ADDED
@@ -0,0 +1,147 @@
1
+ # @robota-sdk/agent-tool-defaults
2
+
3
+ ## 3.0.0-beta.83
4
+
5
+ ### Patch Changes
6
+
7
+ - 57280bf: Every published package now declares `"engines": { "node": ">=22.12.0" }`. Before, 27 of the 38
8
+ packages declared no floor (`agent-core`, `agent-tools` and every provider among them),
9
+ `agent-session` and `agent-file-authority` declared `>=20.19.0`, and the other nine declared
10
+ `>=22.0.0`, so a consumer on Node 20 saw at most a warning from a transitive dependency.
11
+
12
+ Why 22.12: `agent-cli` and `agent-ui-terminal` need Node 22 through `ink` 7, and the CommonJS entries
13
+ of `agent-tools` and its dependents, `agent-transport`/`node` and its dependents, and
14
+ `agent-ui-terminal` `require()` ESM-only dependencies (`p-limit`, `jose`, `chalk`), which Node 22
15
+ supports unflagged only from 22.12. `engines` is advisory unless the consumer enables `engine-strict`.
16
+
17
+ No code changes: `tsdown` now reads `node22.12.0` as its build target from the field.
18
+
19
+ - 18c0d5c: Every published package now exports `./package.json`, so `require('<package>/package.json')` and
20
+ `import('<package>/package.json', { with: { type: 'json' } })` work instead of failing with
21
+ `ERR_PACKAGE_PATH_NOT_EXPORTED`, and each tarball now ships the package's `CHANGELOG.md`.
22
+ - Updated dependencies [e689c8e]
23
+ - Updated dependencies [be0e53c]
24
+ - Updated dependencies [8bd5fac]
25
+ - Updated dependencies [57280bf]
26
+ - Updated dependencies [5033dd9]
27
+ - Updated dependencies [18c0d5c]
28
+ - Updated dependencies [dbd888d]
29
+ - Updated dependencies [1887e54]
30
+ - Updated dependencies [0368058]
31
+ - @robota-sdk/agent-core@3.0.0-beta.83
32
+ - @robota-sdk/agent-tools@3.0.0-beta.83
33
+
34
+ ## 3.0.0-beta.82
35
+
36
+ ### Patch Changes
37
+
38
+ - Updated dependencies [c7f9203]
39
+ - @robota-sdk/agent-core@3.0.0-beta.82
40
+ - @robota-sdk/agent-tools@3.0.0-beta.82
41
+
42
+ ## 3.0.0-beta.81
43
+
44
+ ### Patch Changes
45
+
46
+ - Updated dependencies [3038eb7]
47
+ - Updated dependencies [02b7452]
48
+ - Updated dependencies [ec5e477]
49
+ - @robota-sdk/agent-core@3.0.0-beta.81
50
+ - @robota-sdk/agent-tools@3.0.0-beta.81
51
+
52
+ ## 3.0.0-beta.80
53
+
54
+ ### Minor Changes
55
+
56
+ - 267af5f: The execution containment seam states where tools run.
57
+
58
+ - **`ISandboxClient.filesystem`** (`'shared' | 'separate'`, absent means `separate`).
59
+ - With a **separate** filesystem (E2B, in-memory), every file tool goes through the sandbox, and
60
+ `Glob`/`Grep`, which can only read the host, are withheld. Previously a remote sandbox still
61
+ offered host-reading search tools beside sandbox-writing edit tools.
62
+ - With a **shared** filesystem (OS-level confinement over the host's files), file tools stay on
63
+ the host under the path guard, and only commands go through the sandbox.
64
+ - **`describeExecutionContainment` / `routesFilesThroughSandbox`** name the containment (`host`,
65
+ `sandbox-shared`, `sandbox-separate`) instead of inferring it from an absent value.
66
+ - **`robota doctor` reports `execution.containment`.** Robota composes no sandbox today, so the
67
+ doctor says shell commands run unconfined on the host and the permission rules are the only
68
+ boundary. The CLI composition and the doctor read the same value.
69
+ - **The `Agent` and `BackgroundProcess` tools no longer fall back to `process.cwd()`** when they
70
+ were built without an execution root. They report an assembly error instead, as the file tools
71
+ already did (ARCH-010).
72
+
73
+ - 7b85767: ARCH-035 — the default tool set becomes a composition leaf.
74
+
75
+ **New package: `@robota-sdk/agent-tool-defaults`.** It owns `createDefaultTools` and
76
+ `ICreateDefaultToolsOptions`, including the adapter gating that adds `CodebaseRetrieval` when a
77
+ `retrievalAdapter` is supplied and the Computer tools when a `computerDriver` is.
78
+
79
+ **Breaking for `@robota-sdk/agent-framework`:** `createDefaultTools` and `ICreateDefaultToolsOptions`
80
+ are no longer exported from it. Import them from `@robota-sdk/agent-tool-defaults`. The packages are
81
+ pre-release and this repo keeps no compatibility shims, so they are moved rather than deprecated.
82
+
83
+ **Also breaking:** the internal `createSession` assembly factory is now `async`. This does NOT affect
84
+ `IAgentRuntime.createSession`, which stays synchronous — it does not call that factory, and a
85
+ verification scenario now asserts that explicitly, because propagating async through it would break
86
+ every consumer that builds a session without supplying `defaultTools`.
87
+
88
+ **Zero-config behaviour is unchanged**, deliberately. `createQuery` and the headless runtime have no
89
+ `defaultTools` seam, so a session built without one still receives the built-in tool tier —
90
+ `agent-framework` reaches the new leaf through a dynamic `import()`. An earlier revision of this work
91
+ proposed deleting the tier outright and was rejected on measurement: two published surfaces cannot
92
+ express the alternative, and the failure mode was a silently toolless agent behind a green typecheck.
93
+
94
+ **Why the move matters.** `agent-subagent-runner` legitimately depends on `agent-framework`, so while
95
+ the aggregator sat on that barrel a neutral runner could compose the product's tool surface with only
96
+ a scan in the way. It has no manifest edge to the new leaf, so that import does not resolve there at
97
+ all — the guarantee is carried by the type system now, mirroring what `@robota-sdk/agent-provider-defaults`
98
+ already does on the provider axis.
99
+
100
+ `@robota-sdk/pack-coding` is a patch: it consumes the leaf instead of rebuilding the same list by
101
+ hand. Its contributed tool surface is unchanged — verified from the published tarballs.
102
+
103
+ ### Patch Changes
104
+
105
+ - 4f3c075: Assemble complete, verified package generations before switching build output; preserve the previous generation on build failure and pack only verified regular-file images. Include copied CLI web assets in affected-build ordering and artifact transfer. Preserve the CLI version in managed build paths. Public runtime contracts remain compatible (patch).
106
+ - Updated dependencies [7b6234c]
107
+ - Updated dependencies [4eea54b]
108
+ - Updated dependencies [2345c0b]
109
+ - Updated dependencies [118fe0e]
110
+ - Updated dependencies [240777e]
111
+ - Updated dependencies [718bdf5]
112
+ - Updated dependencies [1698be4]
113
+ - Updated dependencies [d4189b9]
114
+ - Updated dependencies [9edae52]
115
+ - Updated dependencies [4078a72]
116
+ - Updated dependencies [4c73a0b]
117
+ - Updated dependencies [267af5f]
118
+ - Updated dependencies [196a900]
119
+ - Updated dependencies [f336838]
120
+ - Updated dependencies [34e50f0]
121
+ - Updated dependencies [722e88a]
122
+ - Updated dependencies [d23c848]
123
+ - Updated dependencies [807d161]
124
+ - Updated dependencies [fec722f]
125
+ - Updated dependencies [2d3b2c0]
126
+ - Updated dependencies [4772067]
127
+ - Updated dependencies [9fbab1b]
128
+ - Updated dependencies [a009f5b]
129
+ - Updated dependencies [61db70f]
130
+ - Updated dependencies [db80aba]
131
+ - Updated dependencies [4f3c075]
132
+ - Updated dependencies [475e085]
133
+ - Updated dependencies [e477440]
134
+ - Updated dependencies [9dcb5da]
135
+ - Updated dependencies [a95ca85]
136
+ - Updated dependencies [b6d14ce]
137
+ - Updated dependencies [0382a51]
138
+ - Updated dependencies [93d061d]
139
+ - Updated dependencies [39554a1]
140
+ - Updated dependencies [d28430a]
141
+ - Updated dependencies [07b627f]
142
+ - Updated dependencies [d0de5b2]
143
+ - Updated dependencies [833afe1]
144
+ - Updated dependencies [d6b9404]
145
+ - Updated dependencies [9814afc]
146
+ - @robota-sdk/agent-core@3.0.0-beta.80
147
+ - @robota-sdk/agent-tools@3.0.0-beta.80
package/README.md ADDED
@@ -0,0 +1,80 @@
1
+ # @robota-sdk/agent-tool-defaults
2
+
3
+ The Robota SDK's built-in default tool set. `createDefaultTools()` builds the tools a Robota session
4
+ gets when its composition root supplies no tool list of its own, using the tool factories from
5
+ `@robota-sdk/agent-tools`. It implements no tool itself. File tools that run on the host are
6
+ contained by the `cwd` you pass; with a `sandboxClient` that has its own filesystem, file paths go to
7
+ the sandbox and `cwd` does not confine them. Adapter-gated tools appear only when you supply their
8
+ adapter. Import it at a composition root (the place that assembles an agent), not from library code.
9
+
10
+ ## Installation
11
+
12
+ ```bash
13
+ npm install @robota-sdk/agent-tool-defaults @robota-sdk/agent-core
14
+ ```
15
+
16
+ ## Usage
17
+
18
+ ```typescript
19
+ import { Robota } from '@robota-sdk/agent-core';
20
+ import type { IAIProvider } from '@robota-sdk/agent-core';
21
+ import { createDefaultTools } from '@robota-sdk/agent-tool-defaults';
22
+
23
+ declare const provider: IAIProvider;
24
+
25
+ const agent = new Robota({
26
+ name: 'DevAgent',
27
+ aiProviders: [provider],
28
+ defaultModel: { provider: 'anthropic', model: 'claude-sonnet-4-6' },
29
+ tools: createDefaultTools({ cwd: process.cwd() }),
30
+ });
31
+ ```
32
+
33
+ `createDefaultTools()` is synchronous and performs no I/O, and the same options always produce the
34
+ same set of tools. Most tools are built fresh on each call; `WebFetch` and `WebSearch` are shared
35
+ instances.
36
+
37
+ ## Tools
38
+
39
+ | Tool | Included when |
40
+ | -------------------------- | --------------------------------------------------------------- |
41
+ | `Shell`, `Bash` | Always |
42
+ | `Read`, `Write`, `Edit` | Always |
43
+ | `Glob`, `Grep` | Unless a `sandboxClient` with a separate filesystem is supplied |
44
+ | `WebFetch`, `WebSearch` | Always |
45
+ | `AskUserQuestion` | Always |
46
+ | `CodebaseRetrieval` | `retrievalAdapter` is supplied |
47
+ | `ComputerView`, `Computer` | `computerDriver` is supplied |
48
+
49
+ With a `sandboxClient`, `Shell` and `Bash` run commands through the sandbox. When the sandbox has
50
+ its own filesystem (the default for a client that does not declare `filesystem: 'shared'`), `Read`,
51
+ `Write` and `Edit` also go through it, and `Glob` / `Grep` are left out because they have no
52
+ sandbox path. File paths are then passed to the sandbox as given, and `cwd` does not confine them.
53
+ When the sandbox shares the host filesystem, file tools stay on the host, contained by `cwd`.
54
+
55
+ ## Options
56
+
57
+ `createDefaultTools(options: ICreateDefaultToolsOptions): FunctionTool[]`
58
+
59
+ | Option | Type | Description |
60
+ | ------------------ | ------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
61
+ | `cwd` | `string` | Required. The root that host file tools are contained by (not file tools routed to a separate-filesystem sandbox), and the default working directory for `Shell` / `Bash`. |
62
+ | `sandboxClient` | `ISandboxClient` | Runs commands (and, on a separate filesystem, file tools) in a sandbox. |
63
+ | `shellExecutable` | `string` | Host-selected executable for `Shell` and `Bash`. |
64
+ | `retrievalAdapter` | `IRetrievalAdapter` | Adds the `CodebaseRetrieval` tool. |
65
+ | `computerDriver` | `IComputerDriver` | Adds the `ComputerView` and `Computer` tools. There is no host fallback. |
66
+
67
+ `ISandboxClient`, `IRetrievalAdapter` and `IComputerDriver` are exported by
68
+ `@robota-sdk/agent-tools`.
69
+
70
+ ## Related packages
71
+
72
+ - [`@robota-sdk/agent-tools`](../agent-tools/README.md): the tool factories, the tool registry and
73
+ the sandbox clients.
74
+ - [`@robota-sdk/agent-core`](../agent-core/README.md): the `Robota` agent and the tool contract.
75
+
76
+ See [docs/SPEC.md](docs/SPEC.md) for the package contract.
77
+
78
+ ## License
79
+
80
+ Robota is dual-licensed under the [GNU AGPL-3.0](../../LICENSE) or a [commercial license](../../COMMERCIAL.md). See [LICENSING.md](../../LICENSING.md).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@robota-sdk/agent-tool-defaults",
3
- "version": "3.0.0-beta.81",
3
+ "version": "3.0.0-beta.83",
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": {
@@ -31,11 +31,16 @@
31
31
  "default": "./dist/node/index.cjs"
32
32
  }
33
33
  }
34
- }
34
+ },
35
+ "./package.json": "./package.json"
36
+ },
37
+ "engines": {
38
+ "node": ">=22.12.0"
35
39
  },
36
40
  "files": [
37
41
  "dist",
38
- "src"
42
+ "src",
43
+ "CHANGELOG.md"
39
44
  ],
40
45
  "devDependencies": {
41
46
  "@types/node": "^22.19.21",
@@ -44,9 +49,14 @@
44
49
  "vitest": "^3.2.6"
45
50
  },
46
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
+ },
47
57
  "dependencies": {
48
- "@robota-sdk/agent-core": "3.0.0-beta.81",
49
- "@robota-sdk/agent-tools": "3.0.0-beta.81"
58
+ "@robota-sdk/agent-core": "3.0.0-beta.83",
59
+ "@robota-sdk/agent-tools": "3.0.0-beta.83"
50
60
  },
51
61
  "volta": {
52
62
  "extends": "../../package.json"
@@ -1,5 +1,9 @@
1
+ import { mkdtempSync, rmSync } from 'node:fs';
2
+ import { tmpdir } from 'node:os';
3
+ import { join } from 'node:path';
4
+
1
5
  import { InMemorySandboxClient } from '@robota-sdk/agent-tools';
2
- import { describe, expect, it } from 'vitest';
6
+ import { afterAll, describe, expect, it } from 'vitest';
3
7
 
4
8
  import { createDefaultTools } from '../create-default-tools.js';
5
9
 
@@ -9,8 +13,12 @@ import type { IRetrievalAdapter, IComputerDriver } from '@robota-sdk/agent-tools
9
13
  * ARCH-010 made `cwd` a required field of `ICreateDefaultToolsOptions`. The cases that assert the tool
10
14
  * LIST never execute a tool and so never reach a path guard; this root is named once, here, so that
11
15
  * inertness is visible rather than implied. The containment cases below choose their own roots.
16
+ * Every root sits, unmade, inside one private per-run directory rather than at a fixed name under
17
+ * /tmp that another local user could create first.
12
18
  */
13
- const ASSEMBLY_ROOT = '/tmp/create-tools-assembly-root';
19
+ const PRIVATE_BASE = mkdtempSync(join(tmpdir(), 'robota-create-tools-'));
20
+ afterAll(() => rmSync(PRIVATE_BASE, { recursive: true, force: true }));
21
+ const ASSEMBLY_ROOT = join(PRIVATE_BASE, 'create-tools-assembly-root');
14
22
 
15
23
  describe('createDefaultTools', () => {
16
24
  it('assembles all default local tools and describes web tools as local tools', () => {
@@ -51,11 +59,11 @@ describe('createDefaultTools', () => {
51
59
  // asserted is that the assembly produces a CONTAINED tool, not merely that a factory can accept a
52
60
  // `cwd` nobody passes.
53
61
  it('SEC-007: Glob and Grep are bound to the assembly cwd, not context-free singletons', async () => {
54
- const contained = createDefaultTools({ cwd: '/tmp/sec007-assembly-scope' });
62
+ const contained = createDefaultTools({ cwd: join(PRIVATE_BASE, 'sec007-assembly-scope') });
55
63
  // ARCH-010 — this used to be `createDefaultTools()` with no root at all, which is no longer
56
64
  // constructible. A SECOND root serves the same purpose and states it better: one shared singleton
57
65
  // could not carry two different roots either way.
58
- const otherRoot = createDefaultTools({ cwd: '/tmp/sec007-other-scope' });
66
+ const otherRoot = createDefaultTools({ cwd: join(PRIVATE_BASE, 'sec007-other-scope') });
59
67
 
60
68
  for (const name of ['Glob', 'Grep']) {
61
69
  const tool = contained.find((candidate) => candidate.getName() === name);