agent-lattice 0.22.0 → 0.23.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/README.md CHANGED
@@ -578,6 +578,26 @@ explicit `outputSchema` still applies. Whenever a schema is in effect, the
578
578
  generated tool description states that the tool returns the target's
579
579
  validated structured output as JSON.
580
580
 
581
+ Two more contract combinations are pinned down since 0.23.0:
582
+
583
+ - **Target declares no `outputSchema`, `agentTool()` declares one
584
+ explicitly.** Assembly allows it (nothing to cross-check against), and an
585
+ `ask` call validates the child's `structuredResult` against the parent-side
586
+ schema and returns it as JSON. This fits children that end through a custom
587
+ `endTurn` + `structuredResult` tool performing domain validation beyond the
588
+ schema (for example reference truthfulness), with the contract declared by
589
+ the parent alone.
590
+ - **Neither side declares a schema.** When the child ends with a
591
+ `structuredResult`, the `ask` tool result is its JSON as-is (unvalidated)
592
+ instead of falling back to the text content and dropping it. The trust
593
+ level is the same as the text result; the schema's job is validation only,
594
+ not gating the structured channel. This applies on both the direct path and
595
+ the team runtime delegate path.
596
+
597
+ *Behavior change in 0.23.0:* existing code where the child ends with
598
+ `endTurn` + `structuredResult` and the parent declares no schema now receives
599
+ the structured JSON from `ask` instead of the text content.
600
+
581
601
  ### Typed delegation
582
602
 
583
603
  *Requires 0.21.0 or later.*
@@ -1390,6 +1410,14 @@ production hosts should pair write and shell access with a permission callback.
1390
1410
  Shell redirects to `/dev/null` are treated as discard targets, not workspace
1391
1411
  writes.
1392
1412
 
1413
+ Pass `workspace: false` to opt out of the built-in workspace entirely — no
1414
+ built-in file/shell tools and no workspace prompt section, equivalent to
1415
+ `createBareAgent()` (*requires 0.23.0 or later*). Unlike `createBareAgent()`,
1416
+ the option also works through `defineAgent()`, so
1417
+ `defineAgent({ workspace: false })` spawns bare sessions — handy for
1418
+ typed-delegation specialists that should have no filesystem or shell surface
1419
+ at all.
1420
+
1393
1421
  ## Multi-turn Session
1394
1422
 
1395
1423
  ```ts
package/dist/index.d.ts CHANGED
@@ -612,7 +612,13 @@ export type AgentOptions<TContext = unknown> = {
612
612
  autoCompact?: boolean | AutoCompactOptions;
613
613
  toolConcurrency?: ToolConcurrencyOptions;
614
614
  skills?: SkillDefinition[];
615
- workspace?: AgentWorkspaceOptions;
615
+ /**
616
+ * Workspace root for the built-in file/shell tools. `false` disables the
617
+ * built-in workspace entirely: no workspace tools, no workspace prompt
618
+ * section — equivalent to `createBareAgent`, and the way to make
619
+ * `defineAgent` spawn bare sessions.
620
+ */
621
+ workspace?: AgentWorkspaceOptions | false;
616
622
  permission?: (request: PermissionRequest) => Promise<PermissionDecision> | PermissionDecision;
617
623
  modelClient?: ModelClient;
618
624
  tracer?: ContextTracer;
@@ -845,7 +851,10 @@ export type AgentToolOptions = {
845
851
  * With the schema in effect, the tool result is the target's validated
846
852
  * structured output as JSON; a target that ends without submitting — or
847
853
  * submits a payload that fails the schema — produces a `child_output_invalid`
848
- * tool error the parent can retry.
854
+ * tool error the parent can retry. Without any schema, a `structuredResult`
855
+ * the target produced is still passed through as JSON (same trust level as
856
+ * the text result); schema only adds validation, it does not gate the
857
+ * structured channel.
849
858
  */
850
859
  outputSchema?: OutputSchema;
851
860
  /**