@superatomai/sdk-node 0.0.62-dsp → 0.0.63-dsp
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/index.d.mts +9 -0
- package/dist/index.d.ts +9 -0
- package/dist/index.js +3 -0
- package/dist/index.mjs +3 -0
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -5389,6 +5389,15 @@ interface CodingAgentDefinition<TInput = unknown, TOutput = unknown> {
|
|
|
5389
5389
|
* connection. Omit for an agent that only needs the files it is given.
|
|
5390
5390
|
*/
|
|
5391
5391
|
tools?: Record<string, McpServerSpec>;
|
|
5392
|
+
/**
|
|
5393
|
+
* Environment for this run's session — how a SHARED executable learns what is
|
|
5394
|
+
* specific to this run (bridge URL, identity token, source id).
|
|
5395
|
+
*
|
|
5396
|
+
* The alternative is a per-workspace copy of each tool with those values
|
|
5397
|
+
* baked in, which makes a tool edit reach only new workspaces and leaves the
|
|
5398
|
+
* run's identity token on disk after it is revoked.
|
|
5399
|
+
*/
|
|
5400
|
+
env?(input: TInput, ctx: AgentRunContext): Record<string, string> | Promise<Record<string, string>>;
|
|
5392
5401
|
/**
|
|
5393
5402
|
* Put the job's inputs in the workspace as FILES, not prompt text. A coding
|
|
5394
5403
|
* agent can grep, aggregate and script over a file; it cannot do any of that
|
package/dist/index.d.ts
CHANGED
|
@@ -5389,6 +5389,15 @@ interface CodingAgentDefinition<TInput = unknown, TOutput = unknown> {
|
|
|
5389
5389
|
* connection. Omit for an agent that only needs the files it is given.
|
|
5390
5390
|
*/
|
|
5391
5391
|
tools?: Record<string, McpServerSpec>;
|
|
5392
|
+
/**
|
|
5393
|
+
* Environment for this run's session — how a SHARED executable learns what is
|
|
5394
|
+
* specific to this run (bridge URL, identity token, source id).
|
|
5395
|
+
*
|
|
5396
|
+
* The alternative is a per-workspace copy of each tool with those values
|
|
5397
|
+
* baked in, which makes a tool edit reach only new workspaces and leaves the
|
|
5398
|
+
* run's identity token on disk after it is revoked.
|
|
5399
|
+
*/
|
|
5400
|
+
env?(input: TInput, ctx: AgentRunContext): Record<string, string> | Promise<Record<string, string>>;
|
|
5392
5401
|
/**
|
|
5393
5402
|
* Put the job's inputs in the workspace as FILES, not prompt text. A coding
|
|
5394
5403
|
* agent can grep, aggregate and script over a file; it cannot do any of that
|
package/dist/index.js
CHANGED
|
@@ -24628,12 +24628,14 @@ async function runCodingAgent(agentId, options = {}) {
|
|
|
24628
24628
|
// prepare() actually ran.
|
|
24629
24629
|
(runAsJob && def.buildPrompt ? await def.buildPrompt(ws, input, ctx) : outputPath ? `Carry out the task described in AGENTS.md. Write your finished result to this exact absolute path: ${outputPath}` : "Carry out the task described in AGENTS.md.");
|
|
24630
24630
|
const tools = { ...cfg.sharedTools ?? {}, ...def.tools ?? {} };
|
|
24631
|
+
const sessionEnv = def.env ? await def.env(input, ctx) : void 0;
|
|
24631
24632
|
const session = createCodingAgentSession(def.harness || cfg.harness, {
|
|
24632
24633
|
cwd: dir,
|
|
24633
24634
|
model: def.model || cfg.model,
|
|
24634
24635
|
resumeId,
|
|
24635
24636
|
// undefined, not {}, when this agent has no tools — see the driver.
|
|
24636
24637
|
mcpServers: tools && Object.keys(tools).length ? tools : void 0,
|
|
24638
|
+
...sessionEnv ? { env: sessionEnv } : {},
|
|
24637
24639
|
...def.networkAccessEnabled !== void 0 ? { networkAccessEnabled: def.networkAccessEnabled } : {},
|
|
24638
24640
|
...def.sandboxMode ? { sandboxMode: def.sandboxMode } : {}
|
|
24639
24641
|
});
|
|
@@ -24717,6 +24719,7 @@ async function runCodingAgent(agentId, options = {}) {
|
|
|
24717
24719
|
model: def.model || cfg.model,
|
|
24718
24720
|
resumeId: result.sessionId,
|
|
24719
24721
|
mcpServers: tools && Object.keys(tools).length ? tools : void 0,
|
|
24722
|
+
...sessionEnv ? { env: sessionEnv } : {},
|
|
24720
24723
|
...def.networkAccessEnabled !== void 0 ? { networkAccessEnabled: def.networkAccessEnabled } : {},
|
|
24721
24724
|
...def.sandboxMode ? { sandboxMode: def.sandboxMode } : {}
|
|
24722
24725
|
});
|
package/dist/index.mjs
CHANGED
|
@@ -24522,12 +24522,14 @@ async function runCodingAgent(agentId, options = {}) {
|
|
|
24522
24522
|
// prepare() actually ran.
|
|
24523
24523
|
(runAsJob && def.buildPrompt ? await def.buildPrompt(ws, input, ctx) : outputPath ? `Carry out the task described in AGENTS.md. Write your finished result to this exact absolute path: ${outputPath}` : "Carry out the task described in AGENTS.md.");
|
|
24524
24524
|
const tools = { ...cfg.sharedTools ?? {}, ...def.tools ?? {} };
|
|
24525
|
+
const sessionEnv = def.env ? await def.env(input, ctx) : void 0;
|
|
24525
24526
|
const session = createCodingAgentSession(def.harness || cfg.harness, {
|
|
24526
24527
|
cwd: dir,
|
|
24527
24528
|
model: def.model || cfg.model,
|
|
24528
24529
|
resumeId,
|
|
24529
24530
|
// undefined, not {}, when this agent has no tools — see the driver.
|
|
24530
24531
|
mcpServers: tools && Object.keys(tools).length ? tools : void 0,
|
|
24532
|
+
...sessionEnv ? { env: sessionEnv } : {},
|
|
24531
24533
|
...def.networkAccessEnabled !== void 0 ? { networkAccessEnabled: def.networkAccessEnabled } : {},
|
|
24532
24534
|
...def.sandboxMode ? { sandboxMode: def.sandboxMode } : {}
|
|
24533
24535
|
});
|
|
@@ -24611,6 +24613,7 @@ async function runCodingAgent(agentId, options = {}) {
|
|
|
24611
24613
|
model: def.model || cfg.model,
|
|
24612
24614
|
resumeId: result.sessionId,
|
|
24613
24615
|
mcpServers: tools && Object.keys(tools).length ? tools : void 0,
|
|
24616
|
+
...sessionEnv ? { env: sessionEnv } : {},
|
|
24614
24617
|
...def.networkAccessEnabled !== void 0 ? { networkAccessEnabled: def.networkAccessEnabled } : {},
|
|
24615
24618
|
...def.sandboxMode ? { sandboxMode: def.sandboxMode } : {}
|
|
24616
24619
|
});
|