@smithers-orchestrator/components 0.20.3 → 0.21.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithers-orchestrator/components",
3
- "version": "0.20.3",
3
+ "version": "0.21.0",
4
4
  "description": "React components for Smithers workflows",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -24,15 +24,15 @@
24
24
  "react": "^19.2.5",
25
25
  "react-dom": "^19.2.5",
26
26
  "zod": "^4.3.6",
27
- "@smithers-orchestrator/agents": "0.20.3",
28
- "@smithers-orchestrator/db": "0.20.3",
29
- "@smithers-orchestrator/driver": "0.20.3",
30
- "@smithers-orchestrator/errors": "0.20.3",
31
- "@smithers-orchestrator/memory": "0.20.3",
32
- "@smithers-orchestrator/graph": "0.20.3",
33
- "@smithers-orchestrator/observability": "0.20.3",
34
- "@smithers-orchestrator/react-reconciler": "0.20.3",
35
- "@smithers-orchestrator/scheduler": "0.20.3"
27
+ "@smithers-orchestrator/db": "0.21.0",
28
+ "@smithers-orchestrator/errors": "0.21.0",
29
+ "@smithers-orchestrator/graph": "0.21.0",
30
+ "@smithers-orchestrator/memory": "0.21.0",
31
+ "@smithers-orchestrator/observability": "0.21.0",
32
+ "@smithers-orchestrator/react-reconciler": "0.21.0",
33
+ "@smithers-orchestrator/agents": "0.21.0",
34
+ "@smithers-orchestrator/scheduler": "0.21.0",
35
+ "@smithers-orchestrator/driver": "0.21.0"
36
36
  },
37
37
  "devDependencies": {
38
38
  "@tanstack/react-query": "^5.99.1",
@@ -17,10 +17,12 @@ export function Sandbox(props) {
17
17
  id: props.id,
18
18
  key: props.key,
19
19
  output: props.output,
20
- runtime: props.runtime ?? "bubblewrap",
20
+ provider: props.provider,
21
+ runtime: props.runtime,
21
22
  allowNetwork: props.allowNetwork,
22
23
  reviewDiffs: props.reviewDiffs,
23
24
  autoAcceptDiffs: props.autoAcceptDiffs,
25
+ allowNested: props.allowNested,
24
26
  image: props.image,
25
27
  env: props.env,
26
28
  ports: props.ports,
@@ -40,9 +42,11 @@ export function Sandbox(props) {
40
42
  needs: props.needs,
41
43
  label: props.label ?? props.id,
42
44
  meta: props.meta,
45
+ __smithersSandboxProvider: props.provider,
43
46
  __smithersSandboxWorkflow: props.workflow,
44
47
  __smithersSandboxInput: props.input,
45
- __smithersSandboxRuntime: props.runtime ?? "bubblewrap",
48
+ __smithersSandboxRuntime: props.runtime,
49
+ __smithersSandboxAllowNested: props.allowNested,
46
50
  __smithersSandboxChildren: props.children,
47
51
  });
48
52
  }
@@ -14,10 +14,15 @@ export type SandboxProps = {
14
14
  /** Input passed to the child workflow. */
15
15
  input?: unknown;
16
16
  output: OutputTarget;
17
+ /** Injectable sandbox provider object or a provider id registered with the sandbox package. */
18
+ provider?: unknown;
19
+ /** @deprecated Prefer provider. Kept for legacy local transports. */
17
20
  runtime?: SandboxRuntime;
18
21
  allowNetwork?: boolean;
19
22
  reviewDiffs?: boolean;
20
23
  autoAcceptDiffs?: boolean;
24
+ /** Allow this sandbox to execute while already inside another sandbox. Disabled by default. */
25
+ allowNested?: boolean;
21
26
  image?: string;
22
27
  env?: Record<string, string>;
23
28
  ports?: Array<{
@@ -13,6 +13,7 @@ import { zodSchemaToJsonExample } from "../zod-to-example.js";
13
13
  import { SmithersError } from "@smithers-orchestrator/errors/SmithersError";
14
14
  import { SmithersContext } from "@smithers-orchestrator/react-reconciler/context";
15
15
  import { AspectContext } from "../aspects/AspectContext.js";
16
+ import { AntigravityAgent } from "@smithers-orchestrator/agents/AntigravityAgent";
16
17
  import { ClaudeCodeAgent } from "@smithers-orchestrator/agents/ClaudeCodeAgent";
17
18
  import { GeminiAgent } from "@smithers-orchestrator/agents/GeminiAgent";
18
19
  import { PiAgent } from "@smithers-orchestrator/agents/PiAgent";
@@ -174,6 +175,13 @@ function applyCliToolAllowlist(agent, allowTools) {
174
175
  allowedTools: [...allowTools],
175
176
  });
176
177
  }
178
+ if (agent instanceof AntigravityAgent) {
179
+ const opts = { ...agent.opts };
180
+ return new AntigravityAgent({
181
+ ...opts,
182
+ allowedTools: [...allowTools],
183
+ });
184
+ }
177
185
  return agent;
178
186
  }
179
187
  /**
@@ -5,7 +5,11 @@ import React from "react";
5
5
  */
6
6
  function mapChildren(node) {
7
7
  if (Array.isArray(node)) {
8
- return node.map((child) => forceContinueOnFail(child));
8
+ const mapped = [];
9
+ for (const child of node) {
10
+ mapped.push(forceContinueOnFail(child));
11
+ }
12
+ return mapped;
9
13
  }
10
14
  if (React.isValidElement(node)) {
11
15
  return forceContinueOnFail(node);
@@ -19,6 +23,9 @@ function mapChildren(node) {
19
23
  * @returns {React.ReactNode}
20
24
  */
21
25
  export function forceContinueOnFail(node) {
26
+ if (Array.isArray(node)) {
27
+ return mapChildren(node);
28
+ }
22
29
  if (!React.isValidElement(node)) {
23
30
  return node;
24
31
  }
package/src/index.d.ts CHANGED
@@ -316,10 +316,15 @@ type SandboxProps$2 = {
316
316
  /** Input passed to the child workflow. */
317
317
  input?: unknown;
318
318
  output: OutputTarget$1;
319
+ /** Injectable sandbox provider object or a provider id registered with the sandbox package. */
320
+ provider?: unknown;
321
+ /** @deprecated Prefer provider. Kept for legacy local transports. */
319
322
  runtime?: SandboxRuntime$1;
320
323
  allowNetwork?: boolean;
321
324
  reviewDiffs?: boolean;
322
325
  autoAcceptDiffs?: boolean;
326
+ /** Allow this sandbox to execute while already inside another sandbox. Disabled by default. */
327
+ allowNested?: boolean;
323
328
  image?: string;
324
329
  env?: Record<string, string>;
325
330
  ports?: Array<{
@@ -1201,10 +1206,12 @@ declare function Sandbox(props: SandboxProps$1): React.ReactElement<{
1201
1206
  id: string;
1202
1207
  key: string | undefined;
1203
1208
  output: OutputTarget$1;
1204
- runtime: SandboxRuntime$1;
1209
+ provider: unknown;
1210
+ runtime: SandboxRuntime$1 | undefined;
1205
1211
  allowNetwork: boolean | undefined;
1206
1212
  reviewDiffs: boolean | undefined;
1207
1213
  autoAcceptDiffs: boolean | undefined;
1214
+ allowNested: boolean | undefined;
1208
1215
  image: string | undefined;
1209
1216
  env: Record<string, string> | undefined;
1210
1217
  ports: {
@@ -1230,9 +1237,11 @@ declare function Sandbox(props: SandboxProps$1): React.ReactElement<{
1230
1237
  needs: Record<string, string> | undefined;
1231
1238
  label: string;
1232
1239
  meta: Record<string, unknown> | undefined;
1240
+ __smithersSandboxProvider: unknown;
1233
1241
  __smithersSandboxWorkflow: _smithers_driver.WorkflowDefinition<unknown> | undefined;
1234
1242
  __smithersSandboxInput: unknown;
1235
- __smithersSandboxRuntime: SandboxRuntime$1;
1243
+ __smithersSandboxRuntime: SandboxRuntime$1 | undefined;
1244
+ __smithersSandboxAllowNested: boolean | undefined;
1236
1245
  __smithersSandboxChildren: React.ReactNode;
1237
1246
  }, string | React.JSXElementConstructor<any>> | null;
1238
1247
  type SandboxProps$1 = SandboxProps$2;