@a3s-lab/code 2.3.0 → 2.5.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.
Files changed (3) hide show
  1. package/README.md +22 -0
  2. package/index.d.ts +4 -0
  3. package/package.json +7 -7
package/README.md CHANGED
@@ -135,6 +135,7 @@ const session = agent.session('/my-project', {
135
135
  model: 'openai/gpt-4o',
136
136
  maxSteps: 24,
137
137
  prompt: 'Keep patches focused and run the narrowest relevant check.',
138
+ confirmationInheritance: 'auto_approve', // child runs auto-approve Ask decisions
138
139
  },
139
140
  { name: 'review-cow', description: 'Adversarial review', kind: 'reviewer' },
140
141
  ],
@@ -159,6 +160,27 @@ session.registerWorkerAgent({
159
160
 
160
161
  For a worker as the top-level actor, use `agent.sessionForWorker(workspace, spec)`.
161
162
 
163
+ ### Confirmation Inheritance
164
+
165
+ Control how child runs resolve Ask decisions with `confirmationInheritance`:
166
+
167
+ - `'auto_approve'` (default): Child runs auto-approve all Ask decisions
168
+ - `'deny_on_ask'`: Child runs fail immediately when encountering an Ask
169
+ - `'inherit_parent'`: Child runs inherit the parent's confirmation policy
170
+
171
+ ```js
172
+ const session = agent.session('/my-project', {
173
+ workerAgents: [
174
+ {
175
+ name: 'restricted-writer',
176
+ description: 'Write files with parent confirmation',
177
+ kind: 'implementer',
178
+ confirmationInheritance: 'inherit_parent', // requires parent approval
179
+ },
180
+ ],
181
+ })
182
+ ```
183
+
162
184
  ## AHP-Supervised Advice
163
185
 
164
186
  Background advice belongs in the host or AHP harness. A3S Code forwards hooks,
package/index.d.ts CHANGED
@@ -226,6 +226,8 @@ export interface WorkerAgentSpec {
226
226
  prompt?: string
227
227
  /** Maximum execution steps/tool rounds. */
228
228
  maxSteps?: number
229
+ /** How child runs resolve Ask decisions: "auto_approve" (default), "deny_on_ask", or "inherit_parent". */
230
+ confirmationInheritance?: string
229
231
  }
230
232
  export interface AgentDefinition {
231
233
  name: string
@@ -235,6 +237,8 @@ export interface AgentDefinition {
235
237
  model?: string
236
238
  prompt?: string
237
239
  maxSteps?: number
240
+ /** How child runs resolve Ask decisions: "auto_approve", "deny_on_ask", or "inherit_parent". */
241
+ confirmationInheritance?: string
238
242
  }
239
243
  /**
240
244
  * HITL confirmation policy configuration.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a3s-lab/code",
3
- "version": "2.3.0",
3
+ "version": "2.5.0",
4
4
  "description": "A3S Code - Native Node.js bindings for the coding-agent runtime",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -40,11 +40,11 @@
40
40
  "test:helpers": "node test-helpers.mjs"
41
41
  },
42
42
  "optionalDependencies": {
43
- "@a3s-lab/code-darwin-arm64": "2.3.0",
44
- "@a3s-lab/code-linux-x64-gnu": "2.3.0",
45
- "@a3s-lab/code-linux-x64-musl": "2.3.0",
46
- "@a3s-lab/code-linux-arm64-gnu": "2.3.0",
47
- "@a3s-lab/code-linux-arm64-musl": "2.3.0",
48
- "@a3s-lab/code-win32-x64-msvc": "2.3.0"
43
+ "@a3s-lab/code-darwin-arm64": "2.5.0",
44
+ "@a3s-lab/code-linux-x64-gnu": "2.5.0",
45
+ "@a3s-lab/code-linux-x64-musl": "2.5.0",
46
+ "@a3s-lab/code-linux-arm64-gnu": "2.5.0",
47
+ "@a3s-lab/code-linux-arm64-musl": "2.5.0",
48
+ "@a3s-lab/code-win32-x64-msvc": "2.5.0"
49
49
  }
50
50
  }