agent-lattice 0.9.20 → 0.9.21
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 +8 -0
- package/dist/index.d.ts +9 -2
- package/dist/index.js +7 -7
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -533,6 +533,14 @@ delivery: the runtime waits for the member's upstream reply, feeds it back to
|
|
|
533
533
|
the lead, and keeps going until the root lead returns the final result or the
|
|
534
534
|
run terminates.
|
|
535
535
|
|
|
536
|
+
Accepted handoffs use work-item failure isolation by default. If one member
|
|
537
|
+
returns an agent error such as `MaxTurnsError` or `APIError`, the runtime marks
|
|
538
|
+
that work item `failed`, sends a failure report to the lead, and continues the
|
|
539
|
+
other accepted handoffs. The lead receives successful and failed reports
|
|
540
|
+
together and decides whether to retry, revise the task, accept a partial result,
|
|
541
|
+
or finish. A run-wide `AbortError` still stops the runner; the runtime marks the
|
|
542
|
+
current and remaining accepted work `cancelled` before propagating the abort.
|
|
543
|
+
|
|
536
544
|
Team member tools can also request explicit shared workspace write grants:
|
|
537
545
|
|
|
538
546
|
```ts
|
package/dist/index.d.ts
CHANGED
|
@@ -53,13 +53,19 @@ export type AgentRuntimeDelegateInput = {
|
|
|
53
53
|
workspaceGrants?: WorkspaceGrantInput[];
|
|
54
54
|
};
|
|
55
55
|
export type AgentRuntimeDelegateResult = {
|
|
56
|
-
status: "completed" | "accepted";
|
|
56
|
+
status: "completed" | "accepted" | "failed";
|
|
57
57
|
content: string;
|
|
58
58
|
request: TeamMessage;
|
|
59
59
|
reply?: TeamMessage;
|
|
60
60
|
result?: SDKResultMessage;
|
|
61
|
+
error?: AgentRuntimeFailure;
|
|
61
62
|
workspaceGrants?: WorkspaceGrant[];
|
|
62
63
|
};
|
|
64
|
+
export type AgentRuntimeFailure = {
|
|
65
|
+
code: "max_turns_exceeded" | "api_error" | "tool_execution_error" | "permission_denied" | "agent_error";
|
|
66
|
+
message: string;
|
|
67
|
+
name: string;
|
|
68
|
+
};
|
|
63
69
|
export type WorkspaceAccess = "read" | "write" | "execute";
|
|
64
70
|
export type WorkspaceGrantInput = {
|
|
65
71
|
root: string;
|
|
@@ -442,10 +448,11 @@ export type SDKMessage = SDKSystemInitMessage | SDKStreamEventMessage | SDKAssis
|
|
|
442
448
|
export type TeamRunnerSource = AgentRuntimeSource;
|
|
443
449
|
export type TeamRunnerTeamMessage = {
|
|
444
450
|
type: "team_message";
|
|
445
|
-
subtype: "sent" | "claimed" | "replied" | "followup" | "done" | "failed";
|
|
451
|
+
subtype: "sent" | "claimed" | "replied" | "followup" | "done" | "failed" | "cancelled";
|
|
446
452
|
source: TeamRunnerSource;
|
|
447
453
|
mailbox: string;
|
|
448
454
|
message: TeamMessage;
|
|
455
|
+
error?: AgentRuntimeFailure;
|
|
449
456
|
};
|
|
450
457
|
export type TeamRunnerAgentMessage = {
|
|
451
458
|
type: "agent_message";
|