@agentstep/agent-sdk 0.4.13 → 0.4.14
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/auth/middleware.js +6 -6
- package/dist/backends/claude/args.js +6 -6
- package/dist/backends/claude/index.js +8 -8
- package/dist/backends/claude/wrapper-script.js +1 -1
- package/dist/backends/codex/auth.js +6 -6
- package/dist/backends/codex/index.js +11 -11
- package/dist/backends/codex/setup.js +4 -4
- package/dist/backends/codex/wrapper-script.js +1 -1
- package/dist/backends/factory/auth.js +6 -6
- package/dist/backends/factory/index.js +11 -11
- package/dist/backends/factory/setup.js +4 -4
- package/dist/backends/factory/wrapper-script.js +1 -1
- package/dist/backends/gemini/auth.js +6 -6
- package/dist/backends/gemini/index.js +11 -11
- package/dist/backends/gemini/setup.js +4 -4
- package/dist/backends/gemini/wrapper-script.js +1 -1
- package/dist/backends/opencode/auth.js +6 -6
- package/dist/backends/opencode/index.js +11 -11
- package/dist/backends/opencode/setup.js +4 -4
- package/dist/backends/opencode/wrapper-script.js +1 -1
- package/dist/backends/pi/auth.js +6 -6
- package/dist/backends/pi/index.js +11 -11
- package/dist/backends/pi/setup.js +4 -4
- package/dist/backends/pi/wrapper-script.js +1 -1
- package/dist/backends/registry.js +29 -29
- package/dist/{chunk-7YYEE7XR.js → chunk-24NL6GPL.js} +5 -5
- package/dist/{chunk-5GDMWWYD.js → chunk-2BDD6OHG.js} +10 -2
- package/dist/{chunk-XLVCC4IB.js → chunk-374KGHBM.js} +5 -5
- package/dist/{chunk-ME6IR4T6.js → chunk-3W6KEDQE.js} +4 -4
- package/dist/{chunk-4INVRCRD.js → chunk-42O6EBUN.js} +2 -2
- package/dist/{chunk-LP7AQJCU.js → chunk-4MHPOB7A.js} +3 -3
- package/dist/{chunk-DZDWNOEY.js → chunk-5GZEX4HV.js} +1 -1
- package/dist/{chunk-MAW3HLIO.js → chunk-6NZPNYHA.js} +2 -2
- package/dist/{chunk-3KDZP45U.js → chunk-6QQKTF55.js} +11 -8
- package/dist/{chunk-U4F4JSME.js → chunk-7GPKEOAO.js} +3 -3
- package/dist/{chunk-JZ5RFO77.js → chunk-7LQN7NVU.js} +5 -5
- package/dist/{chunk-X3U7IVTN.js → chunk-7OAMTB47.js} +2 -2
- package/dist/{chunk-JFY6EH24.js → chunk-A7MX6RSQ.js} +15 -15
- package/dist/{chunk-IJEZAD5O.js → chunk-ADK2TYO4.js} +2 -2
- package/dist/{chunk-PMEF3X3C.js → chunk-B47IDF63.js} +2 -2
- package/dist/{chunk-RTS2QUZB.js → chunk-B6LPLXPB.js} +8 -8
- package/dist/{chunk-V7OXXKAL.js → chunk-BZ6HFTHU.js} +1 -1
- package/dist/{chunk-I3AP3LEY.js → chunk-CDK25PRU.js} +5 -5
- package/dist/{chunk-TSYQ4XKJ.js → chunk-CSNIN5YZ.js} +2 -2
- package/dist/{chunk-3WJMUX5B.js → chunk-DO4WVWW7.js} +1 -1
- package/dist/{chunk-4FHRWC4H.js → chunk-EDRLRJNT.js} +5 -5
- package/dist/{chunk-AKRE4OEL.js → chunk-EFOIR7R3.js} +5 -3
- package/dist/{chunk-MXRGQRFX.js → chunk-EOFJ2MWJ.js} +4 -4
- package/dist/{chunk-TV2VE2LX.js → chunk-F6M4RLDQ.js} +2 -2
- package/dist/{chunk-NHY4Q6LS.js → chunk-F7DOI3B5.js} +12 -12
- package/dist/{chunk-6BDLNY5J.js → chunk-FVFMYO5W.js} +2 -2
- package/dist/{chunk-KDAZ5TBL.js → chunk-G37JVAOI.js} +5 -5
- package/dist/{chunk-OQWHKEYE.js → chunk-GAFFXICQ.js} +3 -3
- package/dist/{chunk-VVH5DQ2C.js → chunk-GCMYVWZ6.js} +1 -1
- package/dist/{chunk-TQHS4W74.js → chunk-GGYTAWW6.js} +1 -1
- package/dist/{chunk-3NZQBGUJ.js → chunk-GHDY4DVK.js} +13 -13
- package/dist/{chunk-UVCPCX74.js → chunk-GR4QPRB7.js} +5 -5
- package/dist/{chunk-OHYPVKTP.js → chunk-GSODOHNB.js} +4 -4
- package/dist/{chunk-Q4XYK6FF.js → chunk-HE7EOIPA.js} +5 -5
- package/dist/{chunk-KEV4OMRF.js → chunk-HIDFQDFP.js} +9 -9
- package/dist/{chunk-ZA4JVJJE.js → chunk-HOPCVGWL.js} +1 -1
- package/dist/{chunk-3MNDEAPX.js → chunk-HR5YA24J.js} +5 -5
- package/dist/{chunk-MBLMAWSE.js → chunk-I5ZA45YL.js} +7 -7
- package/dist/{chunk-TH54MJMX.js → chunk-IEG5LIX7.js} +1 -1
- package/dist/{chunk-X7W6S3TE.js → chunk-IU457W7Q.js} +5 -5
- package/dist/{chunk-HWTECG57.js → chunk-J4TYHQQG.js} +1 -1
- package/dist/{chunk-Y2SC7HU5.js → chunk-JDBXIJKG.js} +4 -4
- package/dist/{chunk-FDY5BA67.js → chunk-JDELTTHV.js} +1 -1
- package/dist/{chunk-BAH4JSTO.js → chunk-JEI7I3EH.js} +3 -3
- package/dist/{chunk-CKPGSS76.js → chunk-JK5TPJHH.js} +1 -1
- package/dist/{chunk-CX4VNHL6.js → chunk-K2ITIAVJ.js} +73 -31
- package/dist/{chunk-UX6I36QR.js → chunk-LDKZ2SMC.js} +122 -122
- package/dist/{chunk-N5CUDEUJ.js → chunk-LHHBOQUR.js} +2 -2
- package/dist/{chunk-6QDHS2MR.js → chunk-LUQP36Y3.js} +1 -1
- package/dist/{chunk-ETGRQMFJ.js → chunk-M5QX5E5Z.js} +1 -1
- package/dist/{chunk-QKRWCXDU.js → chunk-M674W5NT.js} +1 -1
- package/dist/{chunk-UXZSRUXD.js → chunk-MEEY7BYC.js} +2 -2
- package/dist/{chunk-FXLGGDLM.js → chunk-MFEOQ26S.js} +4 -4
- package/dist/{chunk-RL6XEYOD.js → chunk-MHQXDTJB.js} +1 -1
- package/dist/{chunk-YOFB6CO5.js → chunk-MOLWE2ZY.js} +7 -7
- package/dist/{chunk-6UXT3RG5.js → chunk-MRJMXGCG.js} +4 -4
- package/dist/{chunk-5A6E4F5D.js → chunk-N2RHTKW7.js} +2 -1
- package/dist/{chunk-YM2LYRYY.js → chunk-NCUIEBQY.js} +3 -3
- package/dist/{chunk-7BGILLYC.js → chunk-NIOWKTIF.js} +2 -2
- package/dist/{chunk-OXREXXAQ.js → chunk-NUINUAXO.js} +2 -2
- package/dist/{chunk-XTZ5RQDF.js → chunk-NUO56TF7.js} +4 -4
- package/dist/{chunk-ZIV74JWW.js → chunk-NXRJ7Z4G.js} +2 -2
- package/dist/{chunk-AHHH4PYB.js → chunk-O45IQUWS.js} +3 -3
- package/dist/{chunk-QYFD2OBI.js → chunk-OWTXN2FU.js} +1 -1
- package/dist/{chunk-V4P46OHG.js → chunk-P7P2NWZD.js} +5 -5
- package/dist/{chunk-FB6FOIAY.js → chunk-PCKFMALU.js} +1 -1
- package/dist/{chunk-2FWZ247V.js → chunk-PFLR7INE.js} +2 -2
- package/dist/{chunk-M4RE42AY.js → chunk-PGSOOOB4.js} +3 -3
- package/dist/{chunk-2PKJSOXX.js → chunk-PTGANYUM.js} +1 -1
- package/dist/{chunk-WUNJJNOV.js → chunk-Q3CV35V6.js} +4 -4
- package/dist/{chunk-6A74MTSB.js → chunk-QICG4KW4.js} +3 -3
- package/dist/{chunk-2QGVGXIT.js → chunk-QQDSHL27.js} +4 -4
- package/dist/{chunk-3EGA6TEL.js → chunk-QSYXHYQU.js} +1 -1
- package/dist/{chunk-J4NKW3L5.js → chunk-QYSDP6V5.js} +5 -5
- package/dist/{chunk-LPWEFC55.js → chunk-R5OZHLAD.js} +2 -2
- package/dist/{chunk-CU5GUNFW.js → chunk-R6X47I23.js} +2 -2
- package/dist/{chunk-XLMHG3KR.js → chunk-R7PAZ5OA.js} +38 -35
- package/dist/{chunk-DFE7VZWD.js → chunk-RMEX55EU.js} +4 -4
- package/dist/{chunk-D5XOXR3A.js → chunk-S3SKODVV.js} +4 -4
- package/dist/{chunk-OGONPLTA.js → chunk-SHKBQQ7W.js} +6 -6
- package/dist/{chunk-5ZRGJTR3.js → chunk-SNZ4PDVT.js} +6 -6
- package/dist/{chunk-JMDS2RJJ.js → chunk-SS2EEKNM.js} +1 -1
- package/dist/{chunk-7XFIUYFM.js → chunk-SWIP7JBQ.js} +4 -4
- package/dist/{chunk-XNK2KUTI.js → chunk-SXE7H3VK.js} +2 -2
- package/dist/{chunk-G5RQN53K.js → chunk-TBSWWUJS.js} +1 -1
- package/dist/{chunk-TY7XTT5N.js → chunk-TJA3RHWR.js} +1 -1
- package/dist/{chunk-4BYPJFC5.js → chunk-UF25F3MH.js} +56 -48
- package/dist/{chunk-V364DYC3.js → chunk-UVUSSZ74.js} +1 -1
- package/dist/{chunk-HERWBOQ7.js → chunk-V7WEALLX.js} +5 -5
- package/dist/{chunk-UN3LHCWQ.js → chunk-VIGJQU6V.js} +3 -3
- package/dist/{chunk-7TW4LHPM.js → chunk-X37MWWUA.js} +2 -2
- package/dist/{chunk-W3M3ME6B.js → chunk-XG4UIGDH.js} +5 -5
- package/dist/{chunk-Q5KHBU7P.js → chunk-YEUALILD.js} +3 -3
- package/dist/{chunk-KZGAZPNV.js → chunk-YGAHGTVZ.js} +3 -3
- package/dist/{chunk-6ZJ6X6H7.js → chunk-YIYEPKVQ.js} +1 -1
- package/dist/{chunk-BM34UHSS.js → chunk-YJPQFLY3.js} +4 -4
- package/dist/{chunk-H74BPBKE.js → chunk-YSUPRYX2.js} +5 -5
- package/dist/{chunk-Y5553CX6.js → chunk-ZP5VMV5O.js} +4 -4
- package/dist/config/index.js +5 -5
- package/dist/containers/client.js +6 -6
- package/dist/containers/exec.js +6 -6
- package/dist/containers/lifecycle.js +46 -46
- package/dist/containers/pool.js +3 -3
- package/dist/containers/setup.js +9 -9
- package/dist/db/agents.js +6 -6
- package/dist/db/api_keys.js +5 -5
- package/dist/db/audit.js +3 -3
- package/dist/db/batch.js +10 -10
- package/dist/db/client.js +2 -2
- package/dist/db/credentials.js +3 -3
- package/dist/db/drizzle.js +4 -4
- package/dist/db/environments.js +6 -6
- package/dist/db/events.js +5 -5
- package/dist/db/files.js +5 -5
- package/dist/db/memory.js +5 -5
- package/dist/db/migrations.js +1 -1
- package/dist/db/proxy.js +5 -5
- package/dist/db/schema.js +1 -1
- package/dist/db/session-resources.js +5 -5
- package/dist/db/sessions.js +9 -9
- package/dist/db/sync.js +5 -5
- package/dist/db/tenants.js +3 -3
- package/dist/db/traces.js +5 -5
- package/dist/db/upstream_keys.js +3 -3
- package/dist/db/vaults.js +6 -6
- package/dist/handlers/agents.js +57 -57
- package/dist/handlers/api_keys.js +57 -57
- package/dist/handlers/audit.js +57 -57
- package/dist/handlers/batch.js +57 -57
- package/dist/handlers/credentials.js +57 -57
- package/dist/handlers/environments.js +58 -58
- package/dist/handlers/events.js +61 -61
- package/dist/handlers/files.js +57 -57
- package/dist/handlers/index.js +97 -97
- package/dist/handlers/license.js +56 -56
- package/dist/handlers/memory.js +57 -57
- package/dist/handlers/metrics.js +56 -56
- package/dist/handlers/models.js +57 -57
- package/dist/handlers/openapi.js +3 -3
- package/dist/handlers/providers.js +56 -56
- package/dist/handlers/resources.js +56 -56
- package/dist/handlers/sessions.js +60 -60
- package/dist/handlers/settings.js +56 -56
- package/dist/handlers/skills-write.js +56 -56
- package/dist/handlers/skills.js +57 -57
- package/dist/handlers/stream.js +57 -57
- package/dist/handlers/tenants.js +57 -57
- package/dist/handlers/threads.js +56 -56
- package/dist/handlers/traces.js +57 -57
- package/dist/handlers/ui.js +1 -1
- package/dist/handlers/upstream_keys.js +59 -59
- package/dist/handlers/vaults.js +56 -56
- package/dist/handlers/whoami.js +56 -56
- package/dist/http.js +55 -55
- package/dist/index.js +62 -62
- package/dist/init.js +53 -53
- package/dist/lib/model-registry.js +6 -6
- package/dist/lib/skills-cache.js +6 -6
- package/dist/observability/otlp.js +12 -12
- package/dist/observability/redactor.js +8 -8
- package/dist/openapi/schemas.js +1 -1
- package/dist/openapi/spec.js +2 -2
- package/dist/providers/fly.js +5 -5
- package/dist/providers/modal.js +5 -5
- package/dist/providers/registry.js +1 -1
- package/dist/providers/resolve-secrets.js +7 -7
- package/dist/providers/sprites.js +7 -7
- package/dist/providers/upstream-keys.js +11 -11
- package/dist/providers/vercel.js +5 -5
- package/dist/proxy/forward.js +6 -6
- package/dist/queue/index.js +6 -6
- package/dist/sessions/bus.js +10 -10
- package/dist/sessions/driver.js +46 -46
- package/dist/sessions/grader.js +5 -5
- package/dist/sessions/secrets.js +8 -8
- package/dist/sessions/sweeper.js +43 -43
- package/dist/sessions/threads.js +46 -46
- package/dist/shutdown.js +44 -44
- package/dist/sync/anthropic.js +10 -10
- package/dist/sync/container-file-sync.js +27 -15
- package/dist/sync/file-sync.js +17 -17
- package/package.json +1 -1
|
@@ -94,7 +94,7 @@ var init_schema = __esm({
|
|
|
94
94
|
metadata_json: text("metadata_json").notNull().default("{}"),
|
|
95
95
|
state: text("state").notNull().default("preparing"),
|
|
96
96
|
state_message: text("state_message"),
|
|
97
|
-
|
|
97
|
+
template_sandbox: text("template_sandbox"),
|
|
98
98
|
checkpoint_id: text("checkpoint_id"),
|
|
99
99
|
// v0.5 ALTER TABLE addition:
|
|
100
100
|
tenant_id: text("tenant_id"),
|
|
@@ -106,7 +106,7 @@ var init_schema = __esm({
|
|
|
106
106
|
agent_id: text("agent_id").notNull(),
|
|
107
107
|
agent_version: integer("agent_version").notNull(),
|
|
108
108
|
environment_id: text("environment_id").notNull(),
|
|
109
|
-
|
|
109
|
+
sandbox_name: text("sandbox_name"),
|
|
110
110
|
claude_session_id: text("claude_session_id"),
|
|
111
111
|
status: text("status").notNull().default("idle"),
|
|
112
112
|
stop_reason: text("stop_reason"),
|
|
@@ -4,11 +4,11 @@ import {
|
|
|
4
4
|
} from "./chunk-23UKWXJH.js";
|
|
5
5
|
import {
|
|
6
6
|
listAudit
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-MHQXDTJB.js";
|
|
8
8
|
import {
|
|
9
9
|
jsonOk,
|
|
10
10
|
routeWrap
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-PFLR7INE.js";
|
|
12
12
|
import {
|
|
13
13
|
badRequest
|
|
14
14
|
} from "./chunk-EZYKRG4W.js";
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
listTraces
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JK5TPJHH.js";
|
|
4
4
|
import {
|
|
5
5
|
jsonOk,
|
|
6
6
|
routeWrap
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-PFLR7INE.js";
|
|
8
8
|
import {
|
|
9
9
|
exportTrace
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-CDK25PRU.js";
|
|
11
11
|
import {
|
|
12
12
|
listEventsByTrace,
|
|
13
13
|
rowToManagedEvent
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-O45IQUWS.js";
|
|
15
15
|
import {
|
|
16
16
|
badRequest,
|
|
17
17
|
notFound
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
resolveContainerProvider
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-N2RHTKW7.js";
|
|
4
4
|
import {
|
|
5
5
|
getEnvironmentRow,
|
|
6
6
|
updateEnvironmentState
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-NUO56TF7.js";
|
|
8
8
|
import {
|
|
9
9
|
installClaudeWrapper
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-IU457W7Q.js";
|
|
11
11
|
import {
|
|
12
12
|
init_ids,
|
|
13
13
|
newId
|
|
@@ -47,14 +47,14 @@ function buildInstallCommands(packages) {
|
|
|
47
47
|
function shellEscape(s) {
|
|
48
48
|
return `'${s.replace(/'/g, "'\\''")}'`;
|
|
49
49
|
}
|
|
50
|
-
async function prepareSprite(
|
|
50
|
+
async function prepareSprite(sandboxName, packages, provider) {
|
|
51
51
|
const p = provider ?? await resolveContainerProvider();
|
|
52
|
-
await installClaudeWrapper(
|
|
52
|
+
await installClaudeWrapper(sandboxName, p);
|
|
53
53
|
const hash = hashPackages(packages);
|
|
54
54
|
const sentinel = `${SENTINEL_DIR}/.claude-agents-setup-${hash}`;
|
|
55
55
|
const installCmds = buildInstallCommands(packages);
|
|
56
56
|
if (installCmds.length === 0) {
|
|
57
|
-
await p.exec(
|
|
57
|
+
await p.exec(sandboxName, ["bash", "-c", `touch ${sentinel}`]);
|
|
58
58
|
return;
|
|
59
59
|
}
|
|
60
60
|
const script = [
|
|
@@ -63,7 +63,7 @@ async function prepareSprite(spriteName, packages, provider) {
|
|
|
63
63
|
...installCmds,
|
|
64
64
|
`touch ${sentinel}`
|
|
65
65
|
].join(" && ");
|
|
66
|
-
const result = await p.exec(
|
|
66
|
+
const result = await p.exec(sandboxName, ["bash", "-c", script], {
|
|
67
67
|
timeoutMs: 30 * 6e4
|
|
68
68
|
});
|
|
69
69
|
if (result.exit_code !== 0) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SUPPORTED_PROVIDERS
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-GSODOHNB.js";
|
|
4
4
|
import {
|
|
5
5
|
addUpstreamKey,
|
|
6
6
|
deleteUpstreamKey,
|
|
@@ -8,20 +8,20 @@ import {
|
|
|
8
8
|
enableUpstreamKey,
|
|
9
9
|
getUpstreamKey,
|
|
10
10
|
listUpstreamKeys
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-BZ6HFTHU.js";
|
|
12
12
|
import {
|
|
13
13
|
requireGlobalAdmin
|
|
14
14
|
} from "./chunk-23UKWXJH.js";
|
|
15
15
|
import {
|
|
16
16
|
recordAudit
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-MHQXDTJB.js";
|
|
18
18
|
import {
|
|
19
19
|
requireFeature
|
|
20
20
|
} from "./chunk-2N2KL4KM.js";
|
|
21
21
|
import {
|
|
22
22
|
jsonOk,
|
|
23
23
|
routeWrap
|
|
24
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-PFLR7INE.js";
|
|
25
25
|
import {
|
|
26
26
|
badRequest,
|
|
27
27
|
notFound
|
|
@@ -14,7 +14,8 @@ var PROVIDERS = {
|
|
|
14
14
|
anthropic: async () => (await import("./providers/anthropic.js")).anthropicProvider
|
|
15
15
|
};
|
|
16
16
|
async function resolveContainerProvider(providerName) {
|
|
17
|
-
|
|
17
|
+
if (!providerName) throw new Error("No container provider specified \u2014 set provider in the environment config");
|
|
18
|
+
const key = providerName;
|
|
18
19
|
const loader = PROVIDERS[key];
|
|
19
20
|
if (!loader) throw new Error(`Unknown provider: "${key}". Available: ${Object.keys(PROVIDERS).join(", ")}`);
|
|
20
21
|
return loader();
|
|
@@ -5,15 +5,15 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
jsonOk,
|
|
7
7
|
routeWrap
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PFLR7INE.js";
|
|
9
9
|
import {
|
|
10
10
|
getSession,
|
|
11
11
|
listSessions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-I5ZA45YL.js";
|
|
13
13
|
import {
|
|
14
14
|
getDb,
|
|
15
15
|
init_client
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-5GZEX4HV.js";
|
|
17
17
|
import {
|
|
18
18
|
notFound
|
|
19
19
|
} from "./chunk-EZYKRG4W.js";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_TENANT_ID
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JDELTTHV.js";
|
|
4
4
|
import {
|
|
5
5
|
init_ids,
|
|
6
6
|
newId
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
import {
|
|
9
9
|
getDrizzle,
|
|
10
10
|
init_drizzle
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-SXE7H3VK.js";
|
|
12
12
|
import {
|
|
13
13
|
schema_exports
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-LHHBOQUR.js";
|
|
15
15
|
import {
|
|
16
16
|
init_clock,
|
|
17
17
|
nowMs,
|
|
@@ -83,7 +83,7 @@ function updateEnvironmentState(id, state, message) {
|
|
|
83
83
|
}
|
|
84
84
|
function updateEnvironmentCheckpoint(id, checkpointId, templateSprite) {
|
|
85
85
|
const db = getDrizzle();
|
|
86
|
-
db.update(schema_exports.environments).set({ checkpoint_id: checkpointId,
|
|
86
|
+
db.update(schema_exports.environments).set({ checkpoint_id: checkpointId, template_sandbox: templateSprite }).where(eq(schema_exports.environments.id, id)).run();
|
|
87
87
|
}
|
|
88
88
|
function archiveEnvironment(id) {
|
|
89
89
|
const db = getDrizzle();
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
import {
|
|
6
6
|
getDrizzle,
|
|
7
7
|
init_drizzle
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-SXE7H3VK.js";
|
|
9
9
|
import {
|
|
10
10
|
schema_exports
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-LHHBOQUR.js";
|
|
12
12
|
import {
|
|
13
13
|
init_clock,
|
|
14
14
|
nowMs,
|
|
@@ -17,7 +17,7 @@ import {
|
|
|
17
17
|
import {
|
|
18
18
|
getDb,
|
|
19
19
|
init_client
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-5GZEX4HV.js";
|
|
21
21
|
|
|
22
22
|
// src/db/events.ts
|
|
23
23
|
init_client();
|
|
@@ -173,7 +173,7 @@ var EnvironmentPackages = z.object({
|
|
|
173
173
|
npm: z.array(z.string()).optional(),
|
|
174
174
|
pip: z.array(z.string()).optional()
|
|
175
175
|
}).openapi({
|
|
176
|
-
description: "Package lists installed into the
|
|
176
|
+
description: "Package lists installed into the sandbox during environment setup. All are optional."
|
|
177
177
|
});
|
|
178
178
|
var EnvironmentNetworking = z.union([
|
|
179
179
|
z.object({ type: z.literal("unrestricted") }),
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
installOpencodeWrapper
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-SWIP7JBQ.js";
|
|
4
4
|
|
|
5
5
|
// src/backends/opencode/setup.ts
|
|
6
6
|
var SENTINEL_NAME = ".claude-agents-opencode-installed";
|
|
7
|
-
async function
|
|
8
|
-
await installOpencodeWrapper(
|
|
7
|
+
async function prepareOpencodeOnSandbox(sandboxName, provider) {
|
|
8
|
+
await installOpencodeWrapper(sandboxName, provider);
|
|
9
9
|
const script = [
|
|
10
10
|
"set -euo pipefail",
|
|
11
11
|
`SENTINEL="$HOME/${SENTINEL_NAME}"`,
|
|
@@ -19,7 +19,7 @@ async function prepareOpencodeOnSprite(spriteName, provider) {
|
|
|
19
19
|
"/usr/local/bin/opencode --version || $PREFIX/bin/opencode --version",
|
|
20
20
|
'touch "$SENTINEL"'
|
|
21
21
|
].join(" && ");
|
|
22
|
-
const result = await provider.exec(
|
|
22
|
+
const result = await provider.exec(sandboxName, ["bash", "-c", script], {
|
|
23
23
|
timeoutMs: 5 * 6e4
|
|
24
24
|
// 5 minutes — cold install typically <30s but leave headroom
|
|
25
25
|
});
|
|
@@ -31,5 +31,5 @@ async function prepareOpencodeOnSprite(spriteName, provider) {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
export {
|
|
34
|
-
|
|
34
|
+
prepareOpencodeOnSandbox
|
|
35
35
|
};
|
|
@@ -4,13 +4,13 @@ import {
|
|
|
4
4
|
} from "./chunk-D2XITRN6.js";
|
|
5
5
|
import {
|
|
6
6
|
authenticate
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-GCMYVWZ6.js";
|
|
8
8
|
import {
|
|
9
9
|
checkAndBump
|
|
10
10
|
} from "./chunk-HVUWXUUI.js";
|
|
11
11
|
import {
|
|
12
12
|
ensureInitialized
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-K2ITIAVJ.js";
|
|
14
14
|
import {
|
|
15
15
|
captureException
|
|
16
16
|
} from "./chunk-3MQ2FWXS.js";
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
jsonOk,
|
|
3
3
|
routeWrap
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-PFLR7INE.js";
|
|
5
5
|
import {
|
|
6
6
|
resolveContainerProvider
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-N2RHTKW7.js";
|
|
8
8
|
import {
|
|
9
9
|
getConfig
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-YEUALILD.js";
|
|
11
11
|
|
|
12
12
|
// src/handlers/providers.ts
|
|
13
13
|
var LOCAL_PROVIDERS = ["docker", "apple-container", "podman"];
|
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
import {
|
|
7
7
|
jsonOk,
|
|
8
8
|
routeWrap
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PFLR7INE.js";
|
|
10
10
|
import {
|
|
11
11
|
createVault,
|
|
12
12
|
deleteEntry,
|
|
@@ -16,14 +16,14 @@ import {
|
|
|
16
16
|
listEntries,
|
|
17
17
|
listVaults,
|
|
18
18
|
setEntry
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-VIGJQU6V.js";
|
|
20
20
|
import {
|
|
21
21
|
getAgent
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-JEI7I3EH.js";
|
|
23
23
|
import {
|
|
24
24
|
getDb,
|
|
25
25
|
init_client
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-5GZEX4HV.js";
|
|
27
27
|
import {
|
|
28
28
|
badRequest,
|
|
29
29
|
conflict,
|
|
@@ -11,18 +11,18 @@ import {
|
|
|
11
11
|
getFileRecord,
|
|
12
12
|
listFiles,
|
|
13
13
|
updateFileStoragePath
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-NXRJ7Z4G.js";
|
|
15
15
|
import {
|
|
16
16
|
assertResourceTenant
|
|
17
17
|
} from "./chunk-23UKWXJH.js";
|
|
18
18
|
import {
|
|
19
19
|
jsonOk,
|
|
20
20
|
routeWrap
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-PFLR7INE.js";
|
|
22
22
|
import {
|
|
23
23
|
getDb,
|
|
24
24
|
init_client
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-5GZEX4HV.js";
|
|
26
26
|
import {
|
|
27
27
|
badRequest,
|
|
28
28
|
notFound
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// src/backends/factory/wrapper-script.ts
|
|
2
2
|
var FACTORY_WRAPPER_PATH = "/tmp/.factory-wrapper";
|
|
3
|
-
var
|
|
3
|
+
var SANDBOX_WRAPPER_SCRIPT = [
|
|
4
4
|
"#!/bin/bash",
|
|
5
5
|
"set -e",
|
|
6
6
|
'while IFS= read -r line; do [ -z "$line" ] && break; export "$line"; done',
|
|
7
7
|
"PROMPT=$(cat)",
|
|
8
8
|
'exec droid "$@" "$PROMPT"'
|
|
9
9
|
].join("\n");
|
|
10
|
-
async function installFactoryWrapper(
|
|
11
|
-
const escaped =
|
|
12
|
-
await provider.exec(
|
|
10
|
+
async function installFactoryWrapper(sandboxName, provider) {
|
|
11
|
+
const escaped = SANDBOX_WRAPPER_SCRIPT.replace(/'/g, "'\\''");
|
|
12
|
+
await provider.exec(sandboxName, [
|
|
13
13
|
"bash",
|
|
14
14
|
"-c",
|
|
15
15
|
`printf '%s' '${escaped}' > ${FACTORY_WRAPPER_PATH} && chmod +x ${FACTORY_WRAPPER_PATH}`
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
installPiWrapper
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-JDBXIJKG.js";
|
|
4
4
|
|
|
5
5
|
// src/backends/pi/setup.ts
|
|
6
6
|
var SENTINEL_NAME = ".claude-agents-pi-installed";
|
|
7
|
-
async function
|
|
8
|
-
await installPiWrapper(
|
|
7
|
+
async function preparePiOnSandbox(sandboxName, provider) {
|
|
8
|
+
await installPiWrapper(sandboxName, provider);
|
|
9
9
|
const script = [
|
|
10
10
|
"set -euo pipefail",
|
|
11
11
|
`SENTINEL="$HOME/${SENTINEL_NAME}"`,
|
|
@@ -16,7 +16,7 @@ async function preparePiOnSprite(spriteName, provider) {
|
|
|
16
16
|
"/usr/local/bin/pi --version || $PREFIX/bin/pi --version",
|
|
17
17
|
'touch "$SENTINEL"'
|
|
18
18
|
].join(" && ");
|
|
19
|
-
const result = await provider.exec(
|
|
19
|
+
const result = await provider.exec(sandboxName, ["bash", "-c", script], {
|
|
20
20
|
timeoutMs: 5 * 6e4
|
|
21
21
|
});
|
|
22
22
|
if (result.exit_code !== 0) {
|
|
@@ -27,5 +27,5 @@ async function preparePiOnSprite(spriteName, provider) {
|
|
|
27
27
|
}
|
|
28
28
|
|
|
29
29
|
export {
|
|
30
|
-
|
|
30
|
+
preparePiOnSandbox
|
|
31
31
|
};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
markStopping
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-HIDFQDFP.js";
|
|
4
4
|
import {
|
|
5
5
|
closeDb,
|
|
6
6
|
init_client,
|
|
7
7
|
syncDb
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5GZEX4HV.js";
|
|
9
9
|
import {
|
|
10
10
|
getRuntime
|
|
11
11
|
} from "./chunk-UYTSKFGK.js";
|