@ai-hero/sandcastle 0.0.1 → 0.1.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 +132 -87
- package/dist/AgentProvider.d.ts.map +1 -1
- package/dist/CopyToSandbox.d.ts +1 -1
- package/dist/CopyToSandbox.d.ts.map +1 -1
- package/dist/Display.d.ts +7 -1
- package/dist/Display.d.ts.map +1 -1
- package/dist/Display.js +7 -0
- package/dist/Display.js.map +1 -1
- package/dist/DockerLifecycle.d.ts +6 -6
- package/dist/DockerLifecycle.d.ts.map +1 -1
- package/dist/EnvResolver.d.ts.map +1 -1
- package/dist/ErrorHandler.d.ts.map +1 -1
- package/dist/InitService.d.ts.map +1 -1
- package/dist/InitService.js +3 -3
- package/dist/InitService.js.map +1 -1
- package/dist/Orchestrator.d.ts +16 -3
- package/dist/Orchestrator.d.ts.map +1 -1
- package/dist/Orchestrator.js +76 -18
- package/dist/Orchestrator.js.map +1 -1
- package/dist/PromptArgumentSubstitution.d.ts +5 -0
- package/dist/PromptArgumentSubstitution.d.ts.map +1 -1
- package/dist/PromptArgumentSubstitution.js.map +1 -1
- package/dist/PromptPreprocessor.d.ts.map +1 -1
- package/dist/PromptResolver.d.ts.map +1 -1
- package/dist/RecoveryMessage.d.ts.map +1 -1
- package/dist/SandboxFactory.d.ts +3 -3
- package/dist/SandboxFactory.d.ts.map +1 -1
- package/dist/SandboxLifecycle.d.ts +1 -1
- package/dist/SandboxLifecycle.d.ts.map +1 -1
- package/dist/SandboxLifecycle.js +7 -7
- package/dist/SandboxLifecycle.js.map +1 -1
- package/dist/WorktreeManager.d.ts +6 -6
- package/dist/WorktreeManager.d.ts.map +1 -1
- package/dist/cli.d.ts +1 -3
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +4 -15
- package/dist/cli.js.map +1 -1
- package/dist/run.d.ts +31 -5
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +27 -11
- package/dist/run.js.map +1 -1
- package/dist/templates/parallel-planner/implement-prompt.md +1 -1
- package/dist/templates/parallel-planner/main.ts +3 -3
- package/dist/templates/parallel-planner/merge-prompt.md +1 -1
- package/dist/templates/sequential-reviewer/implement-prompt.md +1 -1
- package/dist/templates/sequential-reviewer/main.ts +3 -3
- package/dist/templates/simple-loop/main.ts +3 -3
- package/dist/templates/simple-loop/prompt.md +1 -1
- package/dist/terminalCleanup.d.ts +2 -2
- package/dist/terminalCleanup.d.ts.map +1 -1
- package/dist/testSandbox.d.ts +1 -1
- package/dist/testSandbox.d.ts.map +1 -1
- package/package.json +15 -15
- package/dist/Config.d.ts +0 -35
- package/dist/Config.d.ts.map +0 -1
- package/dist/Config.js +0 -56
- package/dist/Config.js.map +0 -1
- package/dist/DockerSandbox.d.ts +0 -6
- package/dist/DockerSandbox.d.ts.map +0 -1
- package/dist/DockerSandbox.js +0 -122
- package/dist/DockerSandbox.js.map +0 -1
- package/dist/FilesystemSandbox.d.ts +0 -6
- package/dist/FilesystemSandbox.d.ts.map +0 -1
- package/dist/FilesystemSandbox.js +0 -83
- package/dist/FilesystemSandbox.js.map +0 -1
- package/dist/Sandbox.d.ts +0 -23
- package/dist/Sandbox.d.ts.map +0 -1
- package/dist/Sandbox.js +0 -5
- package/dist/Sandbox.js.map +0 -1
- package/dist/SyncService.d.ts +0 -20
- package/dist/SyncService.d.ts.map +0 -1
- package/dist/SyncService.js +0 -504
- package/dist/SyncService.js.map +0 -1
- package/dist/TokenResolver.d.ts +0 -6
- package/dist/TokenResolver.d.ts.map +0 -1
- package/dist/TokenResolver.js +0 -43
- package/dist/TokenResolver.js.map +0 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Matt Pocock
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,28 +1,36 @@
|
|
|
1
1
|
# Sandcastle
|
|
2
2
|
|
|
3
|
-
A TypeScript
|
|
3
|
+
A TypeScript library for orchestrating AI coding agents in isolated Docker containers. Sandcastle handles the hard parts — building worktrees, invoking the agent, and merging commits back — so you can run AFK agents with a single `run()`.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
7
7
|
- [Docker Desktop](https://www.docker.com/)
|
|
8
8
|
- [Git](https://git-scm.com/)
|
|
9
9
|
|
|
10
|
-
##
|
|
10
|
+
## Quick start
|
|
11
|
+
|
|
12
|
+
1. Install the package:
|
|
11
13
|
|
|
12
14
|
```bash
|
|
13
15
|
pnpm add @ai-hero/sandcastle
|
|
14
16
|
```
|
|
15
17
|
|
|
16
|
-
|
|
18
|
+
2. Run `sandcastle init`. This scaffolds a `.sandcastle` directory with all the files needed.
|
|
17
19
|
|
|
18
20
|
```bash
|
|
19
|
-
# 1. Initialize — scaffolds .sandcastle/ config directory and builds the Docker image
|
|
20
|
-
cd /path/to/your/repo
|
|
21
21
|
npx sandcastle init
|
|
22
|
+
```
|
|
22
23
|
|
|
23
|
-
|
|
24
|
+
3. Edit `.sandcastle/.env` and fill in your default values for `ANTHROPIC_API_KEY`
|
|
25
|
+
|
|
26
|
+
```bash
|
|
24
27
|
cp .sandcastle/.env.example .sandcastle/.env
|
|
25
|
-
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
4. Run the `.sandcastle/main.ts` file with `npx tsx`
|
|
31
|
+
|
|
32
|
+
```bash
|
|
33
|
+
npx tsx .sandcastle/main.ts
|
|
26
34
|
```
|
|
27
35
|
|
|
28
36
|
```typescript
|
|
@@ -34,59 +42,64 @@ await run({
|
|
|
34
42
|
});
|
|
35
43
|
```
|
|
36
44
|
|
|
37
|
-
|
|
38
|
-
npx tsx main.ts
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## CLI commands
|
|
45
|
+
## API
|
|
42
46
|
|
|
43
|
-
|
|
47
|
+
Sandcastle exports a programmatic `run()` function for use in scripts, CI pipelines, or custom tooling.
|
|
44
48
|
|
|
45
|
-
|
|
49
|
+
```typescript
|
|
50
|
+
import { run } from "@ai-hero/sandcastle";
|
|
46
51
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
52
|
+
const result = await run({
|
|
53
|
+
// Prompt source — provide one of these, not both:
|
|
54
|
+
promptFile: ".sandcastle/prompt.md", // path to a prompt file (default: .sandcastle/prompt.md)
|
|
55
|
+
// prompt: "Fix issue #42 in this repo", // OR an inline prompt string
|
|
51
56
|
|
|
52
|
-
|
|
57
|
+
// Values substituted for {{KEY}} placeholders in the prompt.
|
|
58
|
+
promptArgs: {
|
|
59
|
+
ISSUE_NUMBER: "42",
|
|
60
|
+
},
|
|
53
61
|
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
├── Dockerfile # Sandbox environment (customize as needed)
|
|
57
|
-
├── prompt.md # Agent instructions
|
|
58
|
-
├── .env.example # Token placeholders
|
|
59
|
-
└── .gitignore # Ignores .env, patches/, logs/
|
|
60
|
-
```
|
|
62
|
+
// Maximum number of agent iterations to run before stopping. Default: 1
|
|
63
|
+
maxIterations: 5,
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
// Branch the agent commits to inside the sandbox.
|
|
66
|
+
branch: "agent/fix-42",
|
|
63
67
|
|
|
64
|
-
|
|
68
|
+
// Claude model passed to the agent. Default: "claude-opus-4-6"
|
|
69
|
+
model: "claude-opus-4-6",
|
|
65
70
|
|
|
66
|
-
|
|
71
|
+
// Docker image used for the sandbox. Default: "sandcastle:<repo-dir-name>"
|
|
72
|
+
imageName: "sandcastle:local",
|
|
67
73
|
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
| `--image-name` | No | `sandcastle:local` | Docker image name |
|
|
71
|
-
| `--dockerfile` | No | — | Path to a custom Dockerfile (build context will be the current working directory) |
|
|
74
|
+
// Display name for this run, shown as a prefix in log output.
|
|
75
|
+
name: "fix-issue-42",
|
|
72
76
|
|
|
73
|
-
|
|
77
|
+
// Lifecycle hooks — arrays of shell commands run sequentially inside the sandbox.
|
|
78
|
+
hooks: {
|
|
79
|
+
// Runs after the worktree is mounted into the sandbox.
|
|
80
|
+
onSandboxReady: [{ command: "pnpm install" }],
|
|
81
|
+
},
|
|
74
82
|
|
|
75
|
-
|
|
83
|
+
// Host-relative file paths to copy into the worktree before the container starts.
|
|
84
|
+
copyToSandbox: [".env"],
|
|
76
85
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
| `--model` | No | `claude-opus-4-6` | Model to use for the agent |
|
|
81
|
-
| `--agent` | No | `claude-code` | Agent provider to use |
|
|
86
|
+
// How to record progress. Default: write to a file under .sandcastle/logs/
|
|
87
|
+
logging: { type: "file", path: ".sandcastle/logs/my-run.log" },
|
|
88
|
+
// logging: { type: "stdout" }, // OR render an interactive UI in the terminal
|
|
82
89
|
|
|
83
|
-
|
|
90
|
+
// String the agent emits to end the iteration loop early.
|
|
91
|
+
// Default: "<promise>COMPLETE</promise>"
|
|
92
|
+
completionSignal: "<promise>COMPLETE</promise>",
|
|
84
93
|
|
|
85
|
-
|
|
94
|
+
// Maximum wall-clock time for the entire run, in seconds. Default: 1200 (20 minutes)
|
|
95
|
+
timeoutSeconds: 1200,
|
|
96
|
+
});
|
|
86
97
|
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
98
|
+
console.log(result.iterationsRun); // number of iterations executed
|
|
99
|
+
console.log(result.wasCompletionSignalDetected); // true if agent emitted <promise>COMPLETE</promise>
|
|
100
|
+
console.log(result.commits); // array of { sha } for commits created
|
|
101
|
+
console.log(result.branch); // target branch name
|
|
102
|
+
```
|
|
90
103
|
|
|
91
104
|
## Prompts
|
|
92
105
|
|
|
@@ -106,7 +119,7 @@ The prompt is resolved from one of three sources (in order of precedence):
|
|
|
106
119
|
|
|
107
120
|
Use `` !`command` `` expressions in your prompt to pull in dynamic context. Each expression is replaced with the command's stdout before the prompt is sent to the agent.
|
|
108
121
|
|
|
109
|
-
Commands run **inside the sandbox** after
|
|
122
|
+
Commands run **inside the sandbox** after the worktree is mounted and `onSandboxReady` hooks complete, so they see the same repo state the agent sees (including installed dependencies).
|
|
110
123
|
|
|
111
124
|
```markdown
|
|
112
125
|
# Open issues
|
|
@@ -166,41 +179,71 @@ This is useful for task-based workflows where the agent should stop once it has
|
|
|
166
179
|
|
|
167
180
|
Select a template during `sandcastle init` when prompted, or re-run init in a fresh repo to try a different one.
|
|
168
181
|
|
|
169
|
-
##
|
|
182
|
+
## CLI commands
|
|
170
183
|
|
|
171
|
-
|
|
184
|
+
### `sandcastle init`
|
|
172
185
|
|
|
173
|
-
|
|
174
|
-
import { run } from "@ai-hero/sandcastle";
|
|
186
|
+
Scaffolds the `.sandcastle/` config directory and builds the Docker image. This is the first command you run in a new repo.
|
|
175
187
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
188
|
+
| Option | Required | Default | Description |
|
|
189
|
+
| -------------- | -------- | ------------------ | ----------------- |
|
|
190
|
+
| `--image-name` | No | `sandcastle:local` | Docker image name |
|
|
191
|
+
|
|
192
|
+
Creates the following files:
|
|
181
193
|
|
|
182
|
-
console.log(result.iterationsRun); // number of iterations executed
|
|
183
|
-
console.log(result.wasCompletionSignalDetected); // true if agent emitted <promise>COMPLETE</promise>
|
|
184
|
-
console.log(result.commits); // array of { sha } for commits created
|
|
185
|
-
console.log(result.branch); // target branch name
|
|
186
194
|
```
|
|
195
|
+
.sandcastle/
|
|
196
|
+
├── Dockerfile # Sandbox environment (customize as needed)
|
|
197
|
+
├── prompt.md # Agent instructions
|
|
198
|
+
├── .env.example # Token placeholders
|
|
199
|
+
└── .gitignore # Ignores .env, patches/, logs/
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
Errors if `.sandcastle/` already exists to prevent overwriting customizations.
|
|
203
|
+
|
|
204
|
+
### `sandcastle build-image`
|
|
205
|
+
|
|
206
|
+
Rebuilds the Docker image from an existing `.sandcastle/` directory. Use this after modifying the Dockerfile.
|
|
207
|
+
|
|
208
|
+
| Option | Required | Default | Description |
|
|
209
|
+
| -------------- | -------- | ------------------ | --------------------------------------------------------------------------------- |
|
|
210
|
+
| `--image-name` | No | `sandcastle:local` | Docker image name |
|
|
211
|
+
| `--dockerfile` | No | — | Path to a custom Dockerfile (build context will be the current working directory) |
|
|
212
|
+
|
|
213
|
+
### `sandcastle interactive`
|
|
214
|
+
|
|
215
|
+
Opens an interactive Claude Code session inside the sandbox. Creates a worktree, bind-mounts it into the sandbox, launches Claude with TTY passthrough, and merges commits back when you exit.
|
|
216
|
+
|
|
217
|
+
| Option | Required | Default | Description |
|
|
218
|
+
| -------------- | -------- | ------------------ | -------------------------- |
|
|
219
|
+
| `--image-name` | No | `sandcastle:local` | Docker image name |
|
|
220
|
+
| `--model` | No | `claude-opus-4-6` | Model to use for the agent |
|
|
221
|
+
|
|
222
|
+
### `sandcastle remove-image`
|
|
223
|
+
|
|
224
|
+
Removes the Docker image.
|
|
225
|
+
|
|
226
|
+
| Option | Required | Default | Description |
|
|
227
|
+
| -------------- | -------- | ------------------ | ----------------- |
|
|
228
|
+
| `--image-name` | No | `sandcastle:local` | Docker image name |
|
|
187
229
|
|
|
188
230
|
### `RunOptions`
|
|
189
231
|
|
|
190
|
-
| Option | Type | Default | Description
|
|
191
|
-
| ------------------ | ---------- | ----------------------------- |
|
|
192
|
-
| `prompt` | string | — | Inline prompt (mutually exclusive with `promptFile`)
|
|
193
|
-
| `promptFile` | string | `.sandcastle/prompt.md` | Path to prompt file (mutually exclusive with `prompt`)
|
|
194
|
-
| `maxIterations` | number | `
|
|
195
|
-
| `hooks` | object | — | Lifecycle hooks (`onSandboxReady`)
|
|
196
|
-
| `branch` | string | — | Target branch for sandbox work
|
|
197
|
-
| `model` | string | `claude-opus-4-6` | Model to use for the agent
|
|
198
|
-
| `
|
|
199
|
-
| `
|
|
200
|
-
| `promptArgs` | PromptArgs | — | Key-value map for `{{KEY}}` placeholder substitution
|
|
201
|
-
| `
|
|
202
|
-
| `
|
|
203
|
-
| `
|
|
232
|
+
| Option | Type | Default | Description |
|
|
233
|
+
| ------------------ | ---------- | ----------------------------- | --------------------------------------------------------------- |
|
|
234
|
+
| `prompt` | string | — | Inline prompt (mutually exclusive with `promptFile`) |
|
|
235
|
+
| `promptFile` | string | `.sandcastle/prompt.md` | Path to prompt file (mutually exclusive with `prompt`) |
|
|
236
|
+
| `maxIterations` | number | `1` | Maximum iterations to run |
|
|
237
|
+
| `hooks` | object | — | Lifecycle hooks (`onSandboxReady`) |
|
|
238
|
+
| `branch` | string | — | Target branch for sandbox work |
|
|
239
|
+
| `model` | string | `claude-opus-4-6` | Model to use for the agent |
|
|
240
|
+
| `imageName` | string | `sandcastle:<repo-dir-name>` | Docker image name for the sandbox |
|
|
241
|
+
| `name` | string | — | Display name for the run, shown as a prefix in log output |
|
|
242
|
+
| `promptArgs` | PromptArgs | — | Key-value map for `{{KEY}}` placeholder substitution |
|
|
243
|
+
| `copyToSandbox` | string[] | — | Host-relative file paths to copy into the worktree before start |
|
|
244
|
+
| `logging` | object | file (auto-generated) | `{ type: 'file', path }` or `{ type: 'stdout' }` |
|
|
245
|
+
| `completionSignal` | string | `<promise>COMPLETE</promise>` | Custom string the agent emits to stop the iteration loop early |
|
|
246
|
+
| `timeoutSeconds` | number | `1200` | Timeout for the entire run in seconds |
|
|
204
247
|
|
|
205
248
|
### `RunResult`
|
|
206
249
|
|
|
@@ -234,7 +277,7 @@ The `.sandcastle/Dockerfile` controls the sandbox environment. The default templ
|
|
|
234
277
|
When customizing the Dockerfile, ensure you keep:
|
|
235
278
|
|
|
236
279
|
- A non-root user (the default `agent` user) for Claude to run as
|
|
237
|
-
- `git` (required for
|
|
280
|
+
- `git` (required for commits and branch operations)
|
|
238
281
|
- `gh` (required for issue fetching)
|
|
239
282
|
- Claude Code CLI installed and on PATH
|
|
240
283
|
|
|
@@ -244,18 +287,18 @@ Add your project-specific dependencies (e.g., language runtimes, build tools) to
|
|
|
244
287
|
|
|
245
288
|
Hooks are arrays of `{ "command": "..." }` objects executed sequentially inside the sandbox. If any command exits with a non-zero code, execution stops immediately with an error.
|
|
246
289
|
|
|
247
|
-
| Hook | When it runs
|
|
248
|
-
| ---------------- |
|
|
249
|
-
| `onSandboxReady` | After
|
|
290
|
+
| Hook | When it runs | Working directory |
|
|
291
|
+
| ---------------- | -------------------------- | ---------------------- |
|
|
292
|
+
| `onSandboxReady` | After the sandbox is ready | Sandbox repo directory |
|
|
250
293
|
|
|
251
|
-
**`onSandboxReady`** runs after the
|
|
294
|
+
**`onSandboxReady`** runs after the worktree is mounted into the sandbox. Use it for dependency installation or build steps (e.g., `pnpm install`).
|
|
252
295
|
|
|
253
296
|
Pass hooks programmatically via `run()`:
|
|
254
297
|
|
|
255
298
|
```ts
|
|
256
299
|
await run({
|
|
257
300
|
hooks: {
|
|
258
|
-
onSandboxReady: [{ command: "
|
|
301
|
+
onSandboxReady: [{ command: "pnpm install" }],
|
|
259
302
|
},
|
|
260
303
|
// ...
|
|
261
304
|
});
|
|
@@ -263,20 +306,22 @@ await run({
|
|
|
263
306
|
|
|
264
307
|
## How it works
|
|
265
308
|
|
|
266
|
-
Sandcastle uses
|
|
309
|
+
Sandcastle uses a worktree-based architecture for direct, zero-sync agent execution:
|
|
267
310
|
|
|
268
|
-
- **
|
|
269
|
-
- **
|
|
311
|
+
- **Worktree**: Sandcastle creates a git worktree on the host at `.sandcastle/worktrees/`. The worktree is a real checkout of your repo — no copying or bundling required.
|
|
312
|
+
- **Bind-mount**: The worktree directory is bind-mounted into the sandbox container as the agent's working directory. The agent writes directly to the host filesystem through the mount.
|
|
313
|
+
- **No sync needed**: Because the agent writes directly to the host filesystem, there are no sync-in or sync-out operations. Commits made by the agent are immediately visible on the host.
|
|
314
|
+
- **Merge back**: After the run completes, the temp worktree branch is fast-forward merged back to the target branch, and the worktree is cleaned up.
|
|
270
315
|
|
|
271
|
-
This approach
|
|
316
|
+
This approach eliminates the complexity of patch-based sync and ensures the agent always works with the exact repo state on the host.
|
|
272
317
|
|
|
273
318
|
## Development
|
|
274
319
|
|
|
275
320
|
```bash
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
321
|
+
pnpm install
|
|
322
|
+
pnpm run build # Build with tsgo
|
|
323
|
+
pnpm test # Run tests with vitest
|
|
324
|
+
pnpm run typecheck # Type-check
|
|
280
325
|
```
|
|
281
326
|
|
|
282
327
|
## License
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentProvider.d.ts","sourceRoot":"","sources":["../src/AgentProvider.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AA2CD,eAAO,MAAM,kBAAkB,EAAE,aAShC,CAAC;AAMF,eAAO,MAAM,gBAAgB,
|
|
1
|
+
{"version":3,"file":"AgentProvider.d.ts","sourceRoot":"","sources":["../src/AgentProvider.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC7C,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;CACrC;AA2CD,eAAO,MAAM,kBAAkB,EAAE,aAShC,CAAC;AAMF,eAAO,MAAM,gBAAgB,SAAU,MAAM,KAAG,aAQ/C,CAAC"}
|
package/dist/CopyToSandbox.d.ts
CHANGED
|
@@ -4,5 +4,5 @@ import { Effect } from "effect";
|
|
|
4
4
|
* using `cp -R --reflink=auto` for copy-on-write when the filesystem supports it.
|
|
5
5
|
* Missing paths are silently skipped.
|
|
6
6
|
*/
|
|
7
|
-
export declare const copyToSandbox: (paths: string[], hostRepoDir: string, worktreePath: string) => Effect.Effect<void, never
|
|
7
|
+
export declare const copyToSandbox: (paths: string[], hostRepoDir: string, worktreePath: string) => Effect.Effect<void, never>;
|
|
8
8
|
//# sourceMappingURL=CopyToSandbox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CopyToSandbox.d.ts","sourceRoot":"","sources":["../src/CopyToSandbox.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"CopyToSandbox.d.ts","sourceRoot":"","sources":["../src/CopyToSandbox.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC;;;;GAIG;AACH,eAAO,MAAM,aAAa,UACjB,MAAM,EAAE,eACF,MAAM,gBACL,MAAM,KACnB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,CAqBxB,CAAC"}
|
package/dist/Display.d.ts
CHANGED
|
@@ -22,6 +22,10 @@ export type DisplayEntry = {
|
|
|
22
22
|
} | {
|
|
23
23
|
readonly _tag: "text";
|
|
24
24
|
readonly message: string;
|
|
25
|
+
} | {
|
|
26
|
+
readonly _tag: "toolCall";
|
|
27
|
+
readonly name: string;
|
|
28
|
+
readonly formattedArgs: string;
|
|
25
29
|
};
|
|
26
30
|
export interface DisplayService {
|
|
27
31
|
readonly intro: (title: string) => Effect.Effect<void>;
|
|
@@ -30,12 +34,13 @@ export interface DisplayService {
|
|
|
30
34
|
readonly summary: (title: string, rows: Record<string, string>) => Effect.Effect<void>;
|
|
31
35
|
readonly taskLog: <A, E, R>(title: string, effect: (message: (msg: string) => void) => Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
|
|
32
36
|
readonly text: (message: string) => Effect.Effect<void>;
|
|
37
|
+
readonly toolCall: (name: string, formattedArgs: string) => Effect.Effect<void>;
|
|
33
38
|
}
|
|
34
39
|
declare const Display_base: Context.TagClass<Display, "Display", DisplayService>;
|
|
35
40
|
export declare class Display extends Display_base {
|
|
36
41
|
}
|
|
37
42
|
export declare const SilentDisplay: {
|
|
38
|
-
layer: (ref: Ref.Ref<
|
|
43
|
+
layer: (ref: Ref.Ref<ReadonlyArray<DisplayEntry>>) => Layer.Layer<Display>;
|
|
39
44
|
};
|
|
40
45
|
export declare const FileDisplay: {
|
|
41
46
|
layer: (filePath: string) => Layer.Layer<Display, never, FileSystem.FileSystem>;
|
|
@@ -44,6 +49,7 @@ export declare const terminalStyle: {
|
|
|
44
49
|
status: (message: string) => string;
|
|
45
50
|
summaryTitle: (title: string) => string;
|
|
46
51
|
summaryRow: (key: string, value: string) => string;
|
|
52
|
+
toolCall: (text: string) => string;
|
|
47
53
|
};
|
|
48
54
|
export declare const ClackDisplay: {
|
|
49
55
|
layer: Layer.Layer<Display, never, never>;
|
package/dist/Display.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Display.d.ts","sourceRoot":"","sources":["../src/Display.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AAGrD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,OAAO,CAAC;AAE7D,MAAM,MAAM,YAAY,GACpB;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAClD;IACE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IACxB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,QAAQ,EAAE,QAAQ,CAAC;CAC7B,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACtD;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC,GACD;IACE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CAC1C,GACD;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CA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SAAQ,YAG1B;CAAG;AAEN,eAAO,MAAM,aAAa;IACxB,KAAK,QAAQ,GAAG,CAAC,GAAG,CAAC,aAAa,CAAC,YAAY,CAAC,CAAC,KAAG,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC;CA4DzE,CAAC;AAEF,eAAO,MAAM,WAAW;IACtB,KAAK,aACO,MAAM,KACf,KAAK,CAAC,KAAK,CAAC,OAAO,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAAC;CA6DtD,CAAC;AASF,eAAO,MAAM,aAAa;IACxB,MAAM,YAAY,MAAM,KAAG,MAAM;IACjC,YAAY,UAAU,MAAM,KAAG,MAAM;IACrC,UAAU,QAAQ,MAAM,SAAS,MAAM,KAAG,MAAM;IAEhD,QAAQ,SAAS,MAAM,KAAG,MAAM;CACjC,CAAC;AAEF,eAAO,MAAM,YAAY;IACvB,KAAK;CAwDN,CAAC"}
|
package/dist/Display.js
CHANGED
|
@@ -38,6 +38,10 @@ export const SilentDisplay = {
|
|
|
38
38
|
...entries,
|
|
39
39
|
{ _tag: "text", message },
|
|
40
40
|
]),
|
|
41
|
+
toolCall: (name, formattedArgs) => Ref.update(ref, (entries) => [
|
|
42
|
+
...entries,
|
|
43
|
+
{ _tag: "toolCall", name, formattedArgs },
|
|
44
|
+
]),
|
|
41
45
|
}),
|
|
42
46
|
};
|
|
43
47
|
export const FileDisplay = {
|
|
@@ -82,6 +86,7 @@ export const FileDisplay = {
|
|
|
82
86
|
return result;
|
|
83
87
|
}),
|
|
84
88
|
text: (message) => appendToLog(message),
|
|
89
|
+
toolCall: (name, formattedArgs) => appendToLog(`${name}(${formattedArgs})`),
|
|
85
90
|
};
|
|
86
91
|
})),
|
|
87
92
|
};
|
|
@@ -95,6 +100,7 @@ export const terminalStyle = {
|
|
|
95
100
|
status: (message) => styleText("bold", message),
|
|
96
101
|
summaryTitle: (title) => styleText("bold", title),
|
|
97
102
|
summaryRow: (key, value) => `${styleText("bold", key)}: ${styleText("dim", value)}`,
|
|
103
|
+
toolCall: (text) => styleText("dim", text),
|
|
98
104
|
};
|
|
99
105
|
export const ClackDisplay = {
|
|
100
106
|
layer: Layer.succeed(Display, {
|
|
@@ -127,6 +133,7 @@ export const ClackDisplay = {
|
|
|
127
133
|
}
|
|
128
134
|
})),
|
|
129
135
|
text: (message) => Effect.sync(() => clack.log.message(message)),
|
|
136
|
+
toolCall: (name, formattedArgs) => Effect.sync(() => clack.log.step(terminalStyle.toolCall(`${name}(${formattedArgs})`))),
|
|
130
137
|
}),
|
|
131
138
|
};
|
|
132
139
|
//# sourceMappingURL=Display.js.map
|
package/dist/Display.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Display.js","sourceRoot":"","sources":["../src/Display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"Display.js","sourceRoot":"","sources":["../src/Display.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AACrD,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAyDtC,MAAM,OAAO,OAAQ,SAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAGhD;CAAG;AAEN,MAAM,CAAC,MAAM,aAAa,GAAG;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AAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACxC,CAAC;iBAAM,CAAC;gBACN,GAAG,CAAC,KAAK,CAAC,KAAK,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;YACtC,CAAC;QACH,CAAC,CAAC,CACL;QAEH,IAAI,EAAE,CAAC,OAAO,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QAEhE,QAAQ,EAAE,CAAC,IAAI,EAAE,aAAa,EAAE,EAAE,CAChC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CACf,KAAK,CAAC,GAAG,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,GAAG,IAAI,IAAI,aAAa,GAAG,CAAC,CAAC,CACpE;KACJ,CAAC;CACH,CAAC"}
|
|
@@ -8,8 +8,8 @@ import { DockerError } from "./errors.js";
|
|
|
8
8
|
* Otherwise, uses `docker build <dockerfileDir>` (the default .sandcastle/ directory).
|
|
9
9
|
*/
|
|
10
10
|
export declare const buildImage: (imageName: string, dockerfileDir: string, options?: {
|
|
11
|
-
readonly dockerfile?: string
|
|
12
|
-
}
|
|
11
|
+
readonly dockerfile?: string;
|
|
12
|
+
}) => Effect.Effect<void, DockerError>;
|
|
13
13
|
export interface StartContainerOptions {
|
|
14
14
|
readonly volumeMounts?: readonly string[];
|
|
15
15
|
readonly workdir?: string;
|
|
@@ -19,19 +19,19 @@ export interface StartContainerOptions {
|
|
|
19
19
|
/**
|
|
20
20
|
* Start a new container with environment variables injected.
|
|
21
21
|
*/
|
|
22
|
-
export declare const startContainer: (containerName: string, imageName: string, env: Record<string, string>, options?: StartContainerOptions
|
|
22
|
+
export declare const startContainer: (containerName: string, imageName: string, env: Record<string, string>, options?: StartContainerOptions) => Effect.Effect<void, DockerError>;
|
|
23
23
|
/**
|
|
24
24
|
* Fix ownership of a directory inside the container.
|
|
25
25
|
* Runs as root so the target owner can write to the path.
|
|
26
26
|
* @param owner - chown-compatible owner spec, e.g. "1000:1000" or "agent"
|
|
27
27
|
*/
|
|
28
|
-
export declare const chownInContainer: (containerName: string, owner: string, path: string) => Effect.Effect<void, DockerError
|
|
28
|
+
export declare const chownInContainer: (containerName: string, owner: string, path: string) => Effect.Effect<void, DockerError>;
|
|
29
29
|
/**
|
|
30
30
|
* Stop and remove a container without removing the image.
|
|
31
31
|
*/
|
|
32
|
-
export declare const removeContainer: (containerName: string) => Effect.Effect<void, DockerError
|
|
32
|
+
export declare const removeContainer: (containerName: string) => Effect.Effect<void, DockerError>;
|
|
33
33
|
/**
|
|
34
34
|
* Remove a Docker image.
|
|
35
35
|
*/
|
|
36
|
-
export declare const removeImage: (imageName: string) => Effect.Effect<void, DockerError
|
|
36
|
+
export declare const removeImage: (imageName: string) => Effect.Effect<void, DockerError>;
|
|
37
37
|
//# sourceMappingURL=DockerLifecycle.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DockerLifecycle.d.ts","sourceRoot":"","sources":["../src/DockerLifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAwB1C;;;;;;GAMG;AACH,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"DockerLifecycle.d.ts","sourceRoot":"","sources":["../src/DockerLifecycle.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAwB1C;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,cACV,MAAM,iBACF,MAAM,YACX;IAAE,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAAE,KACzC,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAc9B,CAAC;AAEL,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC1C,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;IAC1B,0EAA0E;IAC1E,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;CACxB;AAED;;GAEG;AACH,eAAO,MAAM,cAAc,kBACV,MAAM,aACV,MAAM,OACZ,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,YACjB,qBAAqB,KAC9B,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CA4C9B,CAAC;AAEL;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,kBACZ,MAAM,SACd,MAAM,QACP,MAAM,KACX,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAY/B,CAAC;AAEJ;;GAEG;AACH,eAAO,MAAM,eAAe,kBACX,MAAM,KACpB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAM9B,CAAC;AAEL;;GAEG;AACH,eAAO,MAAM,WAAW,cACX,MAAM,KAChB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,WAAW,CAG9B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EnvResolver.d.ts","sourceRoot":"","sources":["../src/EnvResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAyBhC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"EnvResolver.d.ts","sourceRoot":"","sources":["../src/EnvResolver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAyBhC;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,YACZ,MAAM,KACd,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CAejE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ErrorHandler.d.ts","sourceRoot":"","sources":["../src/ErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,
|
|
1
|
+
{"version":3,"file":"ErrorHandler.d.ts","sourceRoot":"","sources":["../src/ErrorHandler.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AACvC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAEhD;;;GAGG;AACH,eAAO,MAAM,kBAAkB,UAAW,YAAY,KAAG,MAyBxD,CAAC;AASF;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAAI,CAAC,EAAE,CAAC,EAAE,CAAC,UAChC,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAC7B,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,OAAO,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,GAAG,OAAO,CAcM,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitService.d.ts","sourceRoot":"","sources":["../src/InitService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAQxD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAuBD,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"InitService.d.ts","sourceRoot":"","sources":["../src/InitService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGhC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAQxD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;CACrB;AAuBD,eAAO,MAAM,aAAa,QAAO,gBAAgB,EAAe,CAAC;AAEjE,wBAAgB,iBAAiB,CAC/B,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,aAAa,GACtB,MAAM,EAAE,CAyBV;AAyDD,eAAO,MAAM,QAAQ,YACV,MAAM,YACL,aAAa,4BAEtB,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,KAAK,EAAE,UAAU,CAAC,UAAU,CA2C/C,CAAC"}
|
package/dist/InitService.js
CHANGED
|
@@ -36,7 +36,7 @@ export function getNextStepsLines(template, provider) {
|
|
|
36
36
|
"2. Read and customize .sandcastle/prompt.md to describe what you want the agent to do",
|
|
37
37
|
`3. Customize .sandcastle/main.ts — it uses the JS API (\`run()\`) to control how the agent runs`,
|
|
38
38
|
`4. Add "sandcastle": "npx tsx .sandcastle/main.ts" to your package.json scripts`,
|
|
39
|
-
"5. Run `
|
|
39
|
+
"5. Run `pnpm run sandcastle` to start the agent",
|
|
40
40
|
];
|
|
41
41
|
}
|
|
42
42
|
else {
|
|
@@ -44,9 +44,9 @@ export function getNextStepsLines(template, provider) {
|
|
|
44
44
|
"Next steps:",
|
|
45
45
|
...envStep,
|
|
46
46
|
`2. Add "sandcastle": "npx tsx .sandcastle/main.ts" to your package.json scripts`,
|
|
47
|
-
'3. Templates use `copyToSandbox: ["node_modules"]` to copy your host node_modules into the sandbox for fast startup — the `
|
|
47
|
+
'3. Templates use `copyToSandbox: ["node_modules"]` to copy your host node_modules into the sandbox for fast startup — the `pnpm install` in the onSandboxReady hook is a safety net for platform-specific binaries. Adjust both if you use a different package manager',
|
|
48
48
|
"4. Read and customize the prompt files in .sandcastle/ — they shape what the agent does",
|
|
49
|
-
"5. Run `
|
|
49
|
+
"5. Run `pnpm run sandcastle` to start the agent",
|
|
50
50
|
];
|
|
51
51
|
}
|
|
52
52
|
}
|
package/dist/InitService.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InitService.js","sourceRoot":"","sources":["../src/InitService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAGzC,MAAM,SAAS,GAAG;;;;CAIjB,CAAC;AAOF,MAAM,SAAS,GAAuB;IACpC;QACE,IAAI,EAAE,OAAO;QACb,WAAW,EAAE,yDAAyD;KACvE;IACD;QACE,IAAI,EAAE,aAAa;QACnB,WAAW,EAAE,gDAAgD;KAC9D;IACD;QACE,IAAI,EAAE,qBAAqB;QAC3B,WAAW,EACT,kEAAkE;KACrE;IACD;QACE,IAAI,EAAE,kBAAkB;QACxB,WAAW,EACT,oEAAoE;KACvE;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,GAAuB,EAAE,CAAC,SAAS,CAAC;AAEjE,MAAM,UAAU,iBAAiB,CAC/B,QAAgB,EAChB,QAAuB;IAEvB,MAAM,QAAQ,GAAG,MAAM,CAAC,OAAO,CAAC,QAAQ,C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