@usine/agents 0.3.0 → 0.4.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 (94) hide show
  1. package/README.md +92 -30
  2. package/dist/child-host/child-host.d.ts +60 -0
  3. package/dist/child-host/child-host.d.ts.map +1 -0
  4. package/dist/child-host/child-host.js +84 -0
  5. package/dist/child-host/child-host.js.map +1 -0
  6. package/dist/child-host/command.d.ts +11 -0
  7. package/dist/child-host/command.d.ts.map +1 -0
  8. package/dist/child-host/command.js +26 -0
  9. package/dist/child-host/command.js.map +1 -0
  10. package/dist/pi/authentication.d.ts +11 -2
  11. package/dist/pi/authentication.d.ts.map +1 -1
  12. package/dist/pi/authentication.js +15 -2
  13. package/dist/pi/authentication.js.map +1 -1
  14. package/dist/pi/children.d.ts +1 -4
  15. package/dist/pi/children.d.ts.map +1 -1
  16. package/dist/pi/children.js +1 -4
  17. package/dist/pi/children.js.map +1 -1
  18. package/dist/pi/claude.d.ts +8 -9
  19. package/dist/pi/claude.d.ts.map +1 -1
  20. package/dist/pi/claude.js +366 -50
  21. package/dist/pi/claude.js.map +1 -1
  22. package/dist/pi/codex/account.d.ts +3 -3
  23. package/dist/pi/codex/account.d.ts.map +1 -1
  24. package/dist/pi/codex/account.js +5 -5
  25. package/dist/pi/codex/account.js.map +1 -1
  26. package/dist/pi/codex/app-server.d.ts +19 -7
  27. package/dist/pi/codex/app-server.d.ts.map +1 -1
  28. package/dist/pi/codex/app-server.js +41 -36
  29. package/dist/pi/codex/app-server.js.map +1 -1
  30. package/dist/pi/codex/codec.d.ts +35 -13
  31. package/dist/pi/codex/codec.d.ts.map +1 -1
  32. package/dist/pi/codex/codec.js +42 -15
  33. package/dist/pi/codex/codec.js.map +1 -1
  34. package/dist/pi/codex/codex.d.ts +0 -1
  35. package/dist/pi/codex/codex.d.ts.map +1 -1
  36. package/dist/pi/codex/codex.js +75 -14
  37. package/dist/pi/codex/codex.js.map +1 -1
  38. package/dist/pi/conversation.d.ts +29 -12
  39. package/dist/pi/conversation.d.ts.map +1 -1
  40. package/dist/pi/conversation.js +54 -18
  41. package/dist/pi/conversation.js.map +1 -1
  42. package/dist/pi/pi.d.ts +1 -4
  43. package/dist/pi/pi.d.ts.map +1 -1
  44. package/dist/pi/pi.js +24 -175
  45. package/dist/pi/pi.js.map +1 -1
  46. package/dist/pi/sdk.d.ts +11 -15
  47. package/dist/pi/sdk.d.ts.map +1 -1
  48. package/dist/pi/sdk.js +35 -53
  49. package/dist/pi/sdk.js.map +1 -1
  50. package/dist/pi/session.d.ts +13 -14
  51. package/dist/pi/session.d.ts.map +1 -1
  52. package/dist/pi/session.js +63 -24
  53. package/dist/pi/session.js.map +1 -1
  54. package/dist/pi/turns.d.ts +7 -7
  55. package/dist/pi/turns.d.ts.map +1 -1
  56. package/dist/pi/turns.js +22 -9
  57. package/dist/pi/turns.js.map +1 -1
  58. package/dist/pi/usage.d.ts +29 -15
  59. package/dist/pi/usage.d.ts.map +1 -1
  60. package/dist/pi/usage.js +48 -24
  61. package/dist/pi/usage.js.map +1 -1
  62. package/dist/preflight/command.d.ts +16 -3
  63. package/dist/preflight/command.d.ts.map +1 -1
  64. package/dist/preflight/command.js +30 -17
  65. package/dist/preflight/command.js.map +1 -1
  66. package/dist/preflight/preflight.d.ts +10 -5
  67. package/dist/preflight/preflight.d.ts.map +1 -1
  68. package/dist/preflight/preflight.js +52 -25
  69. package/dist/preflight/preflight.js.map +1 -1
  70. package/dist/prompt.d.ts +12 -9
  71. package/dist/prompt.d.ts.map +1 -1
  72. package/dist/prompt.js +33 -4
  73. package/dist/prompt.js.map +1 -1
  74. package/dist/protocol/codex.d.ts +4 -7
  75. package/dist/protocol/codex.d.ts.map +1 -1
  76. package/dist/protocol/codex.js +1 -1
  77. package/dist/protocol/codex.js.map +1 -1
  78. package/dist/runtime.d.ts +100 -55
  79. package/dist/runtime.d.ts.map +1 -1
  80. package/dist/runtime.js +108 -27
  81. package/dist/runtime.js.map +1 -1
  82. package/package.json +22 -10
  83. package/dist/pi/live.d.ts +0 -4
  84. package/dist/pi/live.d.ts.map +0 -1
  85. package/dist/pi/live.js +0 -11
  86. package/dist/pi/live.js.map +0 -1
  87. package/dist/pi/subagents.d.ts +0 -29
  88. package/dist/pi/subagents.d.ts.map +0 -1
  89. package/dist/pi/subagents.js +0 -120
  90. package/dist/pi/subagents.js.map +0 -1
  91. package/dist/pi/thinking.d.ts +0 -8
  92. package/dist/pi/thinking.d.ts.map +0 -1
  93. package/dist/pi/thinking.js +0 -15
  94. package/dist/pi/thinking.js.map +0 -1
package/dist/runtime.d.ts CHANGED
@@ -1,23 +1,28 @@
1
- import { AgentSession, AgentSessionEvent, ChildSession } from "@usine/core/agent/session";
1
+ import { AgentSession, AgentSessionEvent, AgentSessionId, ChildSession } from "@usine/core/agent/session";
2
2
  import * as AttemptChannel from "@usine/core/attempt/channel";
3
+ import { WorkerName } from "@usine/core/worker";
3
4
  import { AttemptFailure } from "@usine/core/attempt/failure";
4
- import { Context, Effect, Schema, Scope, Stream } from "effect";
5
- /** The checkout directory one Attempt runs in. */
5
+ import { Context, Effect, Option, Schema, Scope, Stream } from "effect";
6
+ /** The checkout directory of an Attempt. */
6
7
  export declare const WorkingDirectory: Schema.brand<Schema.NonEmptyString, "AgentWorkingDirectory">;
7
8
  export type WorkingDirectory = typeof WorkingDirectory.Type;
8
- declare const LaunchRequest_base: Schema.Class<LaunchRequest, Schema.Struct<{
9
- readonly spec: typeof AttemptChannel.RunSpec;
10
- readonly cwd: Schema.brand<Schema.NonEmptyString, "AgentWorkingDirectory">;
11
- }>, {}>;
12
- /** The Attempt's task and Agent choices, together with the prepared checkout where its parent starts. */
13
- export declare class LaunchRequest extends LaunchRequest_base {
14
- }
15
9
  declare const ChildRequest_base: Schema.Class<ChildRequest, Schema.Struct<{
16
10
  readonly session: typeof ChildSession;
11
+ /** The checkout directory on `host`. */
17
12
  readonly cwd: Schema.brand<Schema.NonEmptyString, "AgentWorkingDirectory">;
18
13
  readonly prompt: Schema.NonEmptyString;
14
+ /**
15
+ * The complete environment of the child process and its commands: the Worker's allowlisted
16
+ * variables plus the Attempt's credential configuration, with nothing inherited from the launching
17
+ * process (ADR 0011). On a `RemoteShell` host, the variables are exported on top of the remote
18
+ * environment, which contains no orchestrator secret.
19
+ */
20
+ readonly environment: Schema.$Record<Schema.String, Schema.String>;
21
+ readonly host: Schema.Union<readonly [typeof import("./child-host/child-host.ts").LocalProcess, typeof import("./child-host/child-host.ts").RemoteShell]>;
22
+ /** The Worker that `host` runs on; Claude children on one Worker share its Claude login. */
23
+ readonly worker: Schema.brand<Schema.String, "WorkerName">;
19
24
  }>, {}>;
20
- /** Work delegated to one child, with its assigned identity and the checkout it shares with the parent. */
25
+ /** A task delegated to one child, with its session and the checkout it shares with the parent. */
21
26
  export declare class ChildRequest extends ChildRequest_base {
22
27
  }
23
28
  declare const SessionResult_base: Schema.Class<SessionResult, Schema.Struct<{
@@ -31,7 +36,7 @@ declare const UnknownModelError_base: Schema.Class<UnknownModelError, Schema.Tag
31
36
  readonly model: Schema.brand<Schema.String, "ModelId">;
32
37
  readonly message: Schema.NonEmptyString;
33
38
  }>, import("effect/Cause").YieldableError>;
34
- /** The rostered model id is well-formed but the SDK's registry does not list it. */
39
+ /** An error for a well-formed rostered model ID that the SDK's registry does not list. */
35
40
  export declare class UnknownModelError extends UnknownModelError_base {
36
41
  }
37
42
  declare const PoolUnavailableError_base: Schema.Class<PoolUnavailableError, Schema.TaggedStruct<"PoolUnavailableError", {
@@ -40,7 +45,7 @@ declare const PoolUnavailableError_base: Schema.Class<PoolUnavailableError, Sche
40
45
  readonly pool: Schema.Literals<readonly ["apiKeys", "claudePlan", "chatgptPlan"]>;
41
46
  readonly message: Schema.NonEmptyString;
42
47
  }>, import("effect/Cause").YieldableError>;
43
- /** The credential cannot spend from the billing pool this session needs. */
48
+ /** An error for a credential that cannot use the billing pool the session needs. */
44
49
  export declare class PoolUnavailableError extends PoolUnavailableError_base {
45
50
  }
46
51
  declare const UnsupportedEffortError_base: Schema.Class<UnsupportedEffortError, Schema.TaggedStruct<"UnsupportedEffortError", {
@@ -49,22 +54,52 @@ declare const UnsupportedEffortError_base: Schema.Class<UnsupportedEffortError,
49
54
  readonly effort: Schema.Literals<readonly ["off", "minimal", "low", "medium", "high", "xhigh", "max"]>;
50
55
  readonly message: Schema.NonEmptyString;
51
56
  }>, import("effect/Cause").YieldableError>;
52
- /** The model exists but does not support the rostered reasoning effort. */
57
+ /** An error for a model that does not support the rostered reasoning effort. */
53
58
  export declare class UnsupportedEffortError extends UnsupportedEffortError_base {
54
59
  }
60
+ /**
61
+ * The reserved prefix of a final answer that reports an unresolved blocker. The session fails with
62
+ * `AgentBlockedError`, whose message is the text after the marker.
63
+ */
64
+ export declare const BLOCKED_MARKER = "[usine:blocked]";
65
+ /**
66
+ * The reserved prefix of a final answer that asks the operator for a decision. The session fails
67
+ * with `AgentQuestionError`, whose message is the text after the marker.
68
+ */
69
+ export declare const QUESTION_MARKER = "[usine:question]";
70
+ /**
71
+ * The reserved prefix of a report that relays a harness failure, such as a child's failed Codex
72
+ * turn, to the parent. The session fails with `AgentResultError`, which ends the Attempt with
73
+ * `AgentFailure`.
74
+ */
75
+ export declare const FAILED_MARKER = "[usine:failed]";
55
76
  declare const AgentResultError_base: Schema.Class<AgentResultError, Schema.TaggedStruct<"AgentResultError", {
56
77
  readonly sessionId: Schema.OptionFromNullOr<Schema.brand<Schema.NonEmptyString, "AgentSessionId">>;
57
78
  readonly message: Schema.NonEmptyString;
58
79
  }>, import("effect/Cause").YieldableError>;
59
- /** The session finished and reported that the work itself failed. */
80
+ /** An error for a session that finished and reported that the work failed. */
60
81
  export declare class AgentResultError extends AgentResultError_base {
61
82
  }
83
+ declare const AgentBlockedError_base: Schema.Class<AgentBlockedError, Schema.TaggedStruct<"AgentBlockedError", {
84
+ readonly sessionId: Schema.OptionFromNullOr<Schema.brand<Schema.NonEmptyString, "AgentSessionId">>;
85
+ readonly message: Schema.NonEmptyString;
86
+ }>, import("effect/Cause").YieldableError>;
87
+ /** An error for a session that finished with the blocker marker; `message` is the blocker text. */
88
+ export declare class AgentBlockedError extends AgentBlockedError_base {
89
+ }
90
+ declare const AgentQuestionError_base: Schema.Class<AgentQuestionError, Schema.TaggedStruct<"AgentQuestionError", {
91
+ readonly sessionId: Schema.OptionFromNullOr<Schema.brand<Schema.NonEmptyString, "AgentSessionId">>;
92
+ readonly message: Schema.NonEmptyString;
93
+ }>, import("effect/Cause").YieldableError>;
94
+ /** An error for a session that finished with a question for the operator; `message` is the question. */
95
+ export declare class AgentQuestionError extends AgentQuestionError_base {
96
+ }
62
97
  declare const ChildSessionBudgetExceededError_base: Schema.Class<ChildSessionBudgetExceededError, Schema.TaggedStruct<"ChildSessionBudgetExceededError", {
63
98
  readonly maxChildren: Schema.brand<Schema.Int, "ChildSessionBudget">;
64
99
  readonly attemptedChildren: Schema.brand<Schema.Int, "ChildSessionCount">;
65
100
  readonly message: Schema.NonEmptyString;
66
101
  }>, import("effect/Cause").YieldableError>;
67
- /** The Pi parent asked for one more child than this Attempt's budget allows. */
102
+ /** An error for a Pi parent that requested more children than the Attempt's budget allows. */
68
103
  export declare class ChildSessionBudgetExceededError extends ChildSessionBudgetExceededError_base {
69
104
  }
70
105
  export declare const SESSION_OPERATIONS: readonly ["launch", "stream", "steer", "interrupt"];
@@ -76,73 +111,83 @@ declare const SessionOperationError_base: Schema.Class<SessionOperationError, Sc
76
111
  readonly message: Schema.NonEmptyString;
77
112
  readonly cause: Schema.Defect;
78
113
  }>, import("effect/Cause").YieldableError>;
79
- /** The SDK or its process failed after the model and harness were validated. */
114
+ /** An error for an SDK or process failure after the model and harness were validated. */
80
115
  export declare class SessionOperationError extends SessionOperationError_base {
81
116
  }
82
- /** A session could not start, continue, or finish its work; the failure determines whether retry needs an operator. */
83
- export declare const AgentSessionError: Schema.Union<readonly [typeof UnknownModelError, typeof PoolUnavailableError, typeof UnsupportedEffortError, typeof AgentResultError, typeof ChildSessionBudgetExceededError, typeof SessionOperationError]>;
117
+ /** Any error that stops a session from starting, continuing, or finishing; the error type determines whether a retry needs the operator. */
118
+ export declare const AgentSessionError: Schema.Union<readonly [typeof UnknownModelError, typeof PoolUnavailableError, typeof UnsupportedEffortError, typeof AgentResultError, typeof AgentBlockedError, typeof AgentQuestionError, typeof ChildSessionBudgetExceededError, typeof SessionOperationError]>;
84
119
  export type AgentSessionError = typeof AgentSessionError.Type;
85
120
  /**
86
- * Maps session errors onto the retry taxonomy: an SDK or process failure is
87
- * retryable infrastructure, while a bad roster spec or the agent failing its
88
- * own work waits for the operator (ADR 0002).
121
+ * A report that a session ends with: a blocker or question marked in its final answer, or a failure
122
+ * reported by its harness. A child relays each report to the parent with the same marker.
123
+ */
124
+ export type AgentReport = AgentResultError | AgentBlockedError | AgentQuestionError;
125
+ /**
126
+ * Returns the report of a final answer that starts with `[usine:blocked]`, `[usine:question]`, or
127
+ * `[usine:failed]`; the details can follow on the same line or the next. Returns `None` if the answer
128
+ * does not start with a marker.
129
+ */
130
+ export declare const reportedOutcome: (sessionId: Option.Option<AgentSessionId>, answer: string) => Option.Option<AgentReport>;
131
+ /** Returns the final answer that relays `report`, starting with its marker. */
132
+ export declare const reportText: (report: AgentReport) => string;
133
+ /**
134
+ * Maps a session error to an Attempt failure: SDK and process failures are retryable infrastructure
135
+ * failures; roster errors and Agent-reported failures wait for the operator (ADR 0002).
89
136
  */
90
137
  export declare const toAttemptFailure: (error: AgentSessionError) => AttemptFailure;
91
- /** A live parent or child session whose activity can be observed while its work continues. */
138
+ /** A running parent or child session. */
92
139
  export interface RunningSession {
93
140
  readonly session: AgentSession;
94
- /** Activity to record in the Attempt transcript while waiting for the result. */
141
+ /** The session activity to record in the Attempt transcript. */
95
142
  readonly events: Stream.Stream<AgentSessionEvent, AgentSessionError>;
96
- /** Waits for the final message or the failure that ends this session's work. */
143
+ /** Waits for the session's final message, or fails with the error that ended it. */
97
144
  readonly result: Effect.Effect<SessionResult, AgentSessionError>;
98
145
  /** Adds operator guidance to the running session without creating a new Attempt. */
99
146
  readonly steer: (message: string) => Effect.Effect<void, AgentSessionError>;
100
- /** Requests that this session stop its current work. */
147
+ /** Requests that the session stop its current work. */
101
148
  readonly interrupt: Effect.Effect<void, AgentSessionError>;
102
- /** Applies a nonterminal operator action; child messages hold completion until release. */
103
- readonly intervene: (action: AttemptChannel.OperatorAction) => Effect.Effect<AttemptChannel.InterventionState, AgentSessionError>;
104
- }
105
- /**
106
- * Records each live child session so the run host can route operator input
107
- * (steer, interrupt, or a takeover message) to one by the id it reports in the
108
- * normalized event stream. The parent registers no child; it is addressed
109
- * directly. Registration is scoped: the entry is removed when the child's scope
110
- * closes, so a returned child is no longer addressable (ADR 0018).
111
- */
112
- export interface ChildSessions {
113
- readonly register: (session: RunningSession) => Effect.Effect<void, never, Scope.Scope>;
149
+ /**
150
+ * Applies a nonterminal operator action; after a child message, the session does not complete
151
+ * until release. If the harness reads the message only at its next boundary, returns `queued` and
152
+ * calls `onDelivery` once: with the session state when it is read, or `None` if the session stops
153
+ * first.
154
+ */
155
+ readonly intervene: (action: AttemptChannel.OperatorAction, onDelivery: OnDelivery) => Effect.Effect<AttemptChannel.InterventionState, AgentSessionError>;
114
156
  }
115
- /** Launches coding sessions for tasks delegated by an Attempt's parent. */
157
+ /** A callback, called once for a queued operator message with the session state when it was read, or `None` if the session stopped first. */
158
+ export type OnDelivery = (delivered: Option.Option<AttemptChannel.InterventionState>) => Effect.Effect<void>;
159
+ /** A backend that launches child sessions for tasks delegated by an Attempt's parent. */
116
160
  export interface ChildBackendService {
117
- /** Starts the assigned child and returns its controls; its result is awaited separately. */
161
+ /** Starts the child and returns its controls; `result` is awaited separately. */
118
162
  readonly launch: (request: ChildRequest) => Effect.Effect<RunningSession, AgentSessionError, Scope.Scope>;
119
163
  }
120
164
  declare const ChildBackend_base: Context.ServiceClass<ChildBackend, "@usine/agents/ChildBackend", ChildBackendService>;
121
- /** Runs the coding work delegated by an Attempt's parent. */
165
+ /** The service that runs tasks delegated by an Attempt's parent. */
122
166
  export declare class ChildBackend extends ChildBackend_base {
123
167
  }
168
+ declare const ClaudeLoginLock_base: Context.ServiceClass<ClaudeLoginLock, "@usine/agents/ClaudeLoginLock", {
169
+ /** Runs `effect` with `worker`'s lock, after waiting for any other effect that has the lock. */
170
+ readonly withLock: (worker: WorkerName) => <A, E, R>(effect: Effect.Effect<A, E, R>) => Effect.Effect<A, E, R>;
171
+ }>;
172
+ /**
173
+ * A per-Worker lock for Claude commands that can refresh the Worker's shared Claude login: the
174
+ * preflight login check and the start of a Claude child. Claude Code ends a process that finds
175
+ * another process refreshing the login (#453). Provide one instance to both the executor and the
176
+ * Attempt runtime.
177
+ */
178
+ export declare class ClaudeLoginLock extends ClaudeLoginLock_base {
179
+ }
124
180
  declare const ClaudeChildBackend_base: Context.ServiceClass<ClaudeChildBackend, "@usine/agents/ClaudeChildBackend", ChildBackendService>;
125
- /** Runs delegated coding work with Claude Code. */
181
+ /** The child backend for Claude Code. */
126
182
  export declare class ClaudeChildBackend extends ClaudeChildBackend_base {
127
183
  }
128
184
  declare const CodexChildBackend_base: Context.ServiceClass<CodexChildBackend, "@usine/agents/CodexChildBackend", ChildBackendService>;
129
- /** Runs delegated coding work with Codex. */
185
+ /** The child backend for Codex. */
130
186
  export declare class CodexChildBackend extends CodexChildBackend_base {
131
187
  }
132
188
  declare const PiChildBackend_base: Context.ServiceClass<PiChildBackend, "@usine/agents/PiChildBackend", ChildBackendService>;
133
- /** Runs delegated coding work with Pi. */
189
+ /** The child backend for Pi. */
134
190
  export declare class PiChildBackend extends PiChildBackend_base {
135
191
  }
136
- declare const AgentRuntime_base: Context.ServiceClass<AgentRuntime, "@usine/agents/AgentRuntime", {
137
- /**
138
- * Starts work in the prepared checkout and returns controls for observing and
139
- * guiding the parent. Each child it spawns registers with `children` so the
140
- * run host can address a takeover to it by id.
141
- */
142
- readonly launch: (request: LaunchRequest, children: ChildSessions) => Effect.Effect<RunningSession, AgentSessionError, Scope.Scope>;
143
- }>;
144
- /** Starts the parent that coordinates one Attempt's task and delegates coding work to children. */
145
- export declare class AgentRuntime extends AgentRuntime_base {
146
- }
147
192
  export {};
148
193
  //# sourceMappingURL=runtime.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AACA,OAAO,EACL,YAAY,EACZ,iBAAiB,EAGjB,YAAY,EAGb,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EAEL,cAAc,EAGf,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,EAAS,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEvE,kDAAkD;AAClD,eAAO,MAAM,gBAAgB,8DAAoE,CAAC;AAClG,MAAM,MAAM,gBAAgB,GAAG,OAAO,gBAAgB,CAAC,IAAI,CAAC;;;;;AAE5D,yGAAyG;AACzG,qBAAa,aAAc,SAAQ,kBAGjC;CAAG;;;;;;AAEL,0GAA0G;AAC1G,qBAAa,YAAa,SAAQ,iBAIhC;CAAG;;;;AAEL,2DAA2D;AAC3D,qBAAa,aAAc,SAAQ,kBAEjC;CAAG;;;;;;AAEL,oFAAoF;AACpF,qBAAa,iBAAkB,SAAQ,sBAMrC;CAAG;;;;;;;AAEL,4EAA4E;AAC5E,qBAAa,oBAAqB,SAAQ,yBAOxC;CAAG;;;;;;;AAEL,2EAA2E;AAC3E,qBAAa,sBAAuB,SAAQ,2BAO1C;CAAG;;;;;AAEL,qEAAqE;AACrE,qBAAa,gBAAiB,SAAQ,qBAKpC;CAAG;;;;;;AAEL,gFAAgF;AAChF,qBAAa,+BAAgC,SAAQ,oCAMnD;CAAG;AAEL,eAAO,MAAM,kBAAkB,YAAI,QAAQ,EAAE,QAAQ,EAAE,OAAO,EAAE,WAAW,CAAU,CAAC;AACtF,eAAO,MAAM,gBA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,EAAE,YAAY,KAClB,MAAM,CAAC,MAAM,CAAC,cAAc,EAAE,iBAAiB,EAAE,KAAK,CAAC,KAAK,CAAC,CAAC;CACpE;;AAED,oEAAoE;AACpE,qBAAa,YAAa,SAAQ,iBAEjC;CAAG;;IAWA,gGAAgG;uBAC7E,CACjB,MAAM,EAAE,UAAU,KACf,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,KAAK,MAAM,CAAC,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;;AAZ5E;;;;;GAKG;AACH,qBAAa,eAAgB,SAAQ,oBAQD;CAAG;;AAEvC,yCAAyC;AACzC,qBAAa,kBAAmB,SAAQ,uBAEvC;CAAG;;AAEJ,mCAAmC;AACnC,qBAAa,iBAAkB,SAAQ,sBAEtC;CAAG;;AAEJ,gCAAgC;AAChC,qBAAa,cAAe,SAAQ,mBAEnC;CAAG"}
package/dist/runtime.js CHANGED
@@ -1,21 +1,28 @@
1
1
  import { Effort, Harness, ModelId } from "@usine/core/agent/brain";
2
2
  import { AgentSession, AgentSessionEvent, AgentSessionId, BillingPool, ChildSession, ChildSessionBudget, ChildSessionCount, } from "@usine/core/agent/session";
3
3
  import * as AttemptChannel from "@usine/core/attempt/channel";
4
- import { AgentFailure, AttemptFailure, ChildSessionBudgetFailure, InfraFailure, } from "@usine/core/attempt/failure";
5
- import { Context, Effect, Match, Schema, Scope, Stream } from "effect";
6
- /** The checkout directory one Attempt runs in. */
4
+ import { WorkerName } from "@usine/core/worker";
5
+ import { AgentFailure, AttemptFailure, BlockedFailure, ChildSessionBudgetFailure, InfraFailure, QuestionFailure, } from "@usine/core/attempt/failure";
6
+ import { Context, Effect, Match, Option, Schema, Scope, Stream } from "effect";
7
+ import { ChildHost } from "./child-host/child-host.js";
8
+ /** The checkout directory of an Attempt. */
7
9
  export const WorkingDirectory = Schema.NonEmptyString.pipe(Schema.brand("AgentWorkingDirectory"));
8
- /** The Attempt's task and Agent choices, together with the prepared checkout where its parent starts. */
9
- export class LaunchRequest extends Schema.Class("@usine/agents/LaunchRequest")({
10
- spec: AttemptChannel.RunSpec,
11
- cwd: WorkingDirectory,
12
- }) {
13
- }
14
- /** Work delegated to one child, with its assigned identity and the checkout it shares with the parent. */
10
+ /** A task delegated to one child, with its session and the checkout it shares with the parent. */
15
11
  export class ChildRequest extends Schema.Class("@usine/agents/ChildRequest")({
16
12
  session: ChildSession,
13
+ /** The checkout directory on `host`. */
17
14
  cwd: WorkingDirectory,
18
15
  prompt: Schema.NonEmptyString,
16
+ /**
17
+ * The complete environment of the child process and its commands: the Worker's allowlisted
18
+ * variables plus the Attempt's credential configuration, with nothing inherited from the launching
19
+ * process (ADR 0011). On a `RemoteShell` host, the variables are exported on top of the remote
20
+ * environment, which contains no orchestrator secret.
21
+ */
22
+ environment: Schema.Record(Schema.String, Schema.String),
23
+ host: ChildHost,
24
+ /** The Worker that `host` runs on; Claude children on one Worker share its Claude login. */
25
+ worker: WorkerName,
19
26
  }) {
20
27
  }
21
28
  /** The final message a parent or child session returns. */
@@ -23,14 +30,14 @@ export class SessionResult extends Schema.Class("@usine/agents/SessionResult")({
23
30
  message: Schema.NonEmptyString,
24
31
  }) {
25
32
  }
26
- /** The rostered model id is well-formed but the SDK's registry does not list it. */
33
+ /** An error for a well-formed rostered model ID that the SDK's registry does not list. */
27
34
  export class UnknownModelError extends Schema.TaggedError("@usine/agents/UnknownModelError")("UnknownModelError", {
28
35
  harness: Harness,
29
36
  model: ModelId,
30
37
  message: Schema.NonEmptyString,
31
38
  }) {
32
39
  }
33
- /** The credential cannot spend from the billing pool this session needs. */
40
+ /** An error for a credential that cannot use the billing pool the session needs. */
34
41
  export class PoolUnavailableError extends Schema.TaggedError("@usine/agents/PoolUnavailableError")("PoolUnavailableError", {
35
42
  harness: Harness,
36
43
  model: ModelId,
@@ -38,7 +45,7 @@ export class PoolUnavailableError extends Schema.TaggedError("@usine/agents/Pool
38
45
  message: Schema.NonEmptyString,
39
46
  }) {
40
47
  }
41
- /** The model exists but does not support the rostered reasoning effort. */
48
+ /** An error for a model that does not support the rostered reasoning effort. */
42
49
  export class UnsupportedEffortError extends Schema.TaggedError("@usine/agents/UnsupportedEffortError")("UnsupportedEffortError", {
43
50
  harness: Harness,
44
51
  model: ModelId,
@@ -46,13 +53,41 @@ export class UnsupportedEffortError extends Schema.TaggedError("@usine/agents/Un
46
53
  message: Schema.NonEmptyString,
47
54
  }) {
48
55
  }
49
- /** The session finished and reported that the work itself failed. */
56
+ /**
57
+ * The reserved prefix of a final answer that reports an unresolved blocker. The session fails with
58
+ * `AgentBlockedError`, whose message is the text after the marker.
59
+ */
60
+ export const BLOCKED_MARKER = "[usine:blocked]";
61
+ /**
62
+ * The reserved prefix of a final answer that asks the operator for a decision. The session fails
63
+ * with `AgentQuestionError`, whose message is the text after the marker.
64
+ */
65
+ export const QUESTION_MARKER = "[usine:question]";
66
+ /**
67
+ * The reserved prefix of a report that relays a harness failure, such as a child's failed Codex
68
+ * turn, to the parent. The session fails with `AgentResultError`, which ends the Attempt with
69
+ * `AgentFailure`.
70
+ */
71
+ export const FAILED_MARKER = "[usine:failed]";
72
+ /** An error for a session that finished and reported that the work failed. */
50
73
  export class AgentResultError extends Schema.TaggedError("@usine/agents/AgentResultError")("AgentResultError", {
51
74
  sessionId: Schema.OptionFromNullOr(AgentSessionId),
52
75
  message: Schema.NonEmptyString,
53
76
  }) {
54
77
  }
55
- /** The Pi parent asked for one more child than this Attempt's budget allows. */
78
+ /** An error for a session that finished with the blocker marker; `message` is the blocker text. */
79
+ export class AgentBlockedError extends Schema.TaggedError("@usine/agents/AgentBlockedError")("AgentBlockedError", {
80
+ sessionId: Schema.OptionFromNullOr(AgentSessionId),
81
+ message: Schema.NonEmptyString,
82
+ }) {
83
+ }
84
+ /** An error for a session that finished with a question for the operator; `message` is the question. */
85
+ export class AgentQuestionError extends Schema.TaggedError("@usine/agents/AgentQuestionError")("AgentQuestionError", {
86
+ sessionId: Schema.OptionFromNullOr(AgentSessionId),
87
+ message: Schema.NonEmptyString,
88
+ }) {
89
+ }
90
+ /** An error for a Pi parent that requested more children than the Attempt's budget allows. */
56
91
  export class ChildSessionBudgetExceededError extends Schema.TaggedError("@usine/agents/ChildSessionBudgetExceededError")("ChildSessionBudgetExceededError", {
57
92
  maxChildren: ChildSessionBudget,
58
93
  attemptedChildren: ChildSessionCount,
@@ -61,7 +96,7 @@ export class ChildSessionBudgetExceededError extends Schema.TaggedError("@usine/
61
96
  }
62
97
  export const SESSION_OPERATIONS = ["launch", "stream", "steer", "interrupt"];
63
98
  export const SessionOperation = Schema.Literals(SESSION_OPERATIONS);
64
- /** The SDK or its process failed after the model and harness were validated. */
99
+ /** An error for an SDK or process failure after the model and harness were validated. */
65
100
  export class SessionOperationError extends Schema.TaggedError("@usine/agents/SessionOperationError")("SessionOperationError", {
66
101
  operation: SessionOperation,
67
102
  sessionId: Schema.OptionFromNullOr(AgentSessionId),
@@ -69,19 +104,58 @@ export class SessionOperationError extends Schema.TaggedError("@usine/agents/Ses
69
104
  cause: Schema.Defect(),
70
105
  }) {
71
106
  }
72
- /** A session could not start, continue, or finish its work; the failure determines whether retry needs an operator. */
107
+ /** Any error that stops a session from starting, continuing, or finishing; the error type determines whether a retry needs the operator. */
73
108
  export const AgentSessionError = Schema.Union([
74
109
  UnknownModelError,
75
110
  PoolUnavailableError,
76
111
  UnsupportedEffortError,
77
112
  AgentResultError,
113
+ AgentBlockedError,
114
+ AgentQuestionError,
78
115
  ChildSessionBudgetExceededError,
79
116
  SessionOperationError,
80
117
  ]);
81
118
  /**
82
- * Maps session errors onto the retry taxonomy: an SDK or process failure is
83
- * retryable infrastructure, while a bad roster spec or the agent failing its
84
- * own work waits for the operator (ADR 0002).
119
+ * Returns the report of a final answer that starts with `[usine:blocked]`, `[usine:question]`, or
120
+ * `[usine:failed]`; the details can follow on the same line or the next. Returns `None` if the answer
121
+ * does not start with a marker.
122
+ */
123
+ export const reportedOutcome = (sessionId, answer) => {
124
+ const trimmed = answer.trim();
125
+ if (trimmed.startsWith(QUESTION_MARKER)) {
126
+ return Option.some(new AgentQuestionError({
127
+ sessionId,
128
+ message: trimmed.slice(QUESTION_MARKER.length).trim() ||
129
+ "Agent asked the operator a question without writing it.",
130
+ }));
131
+ }
132
+ if (trimmed.startsWith(BLOCKED_MARKER)) {
133
+ return Option.some(new AgentBlockedError({
134
+ sessionId,
135
+ message: trimmed.slice(BLOCKED_MARKER.length).trim() ||
136
+ "Agent reported an unresolved blocker without details.",
137
+ }));
138
+ }
139
+ if (trimmed.startsWith(FAILED_MARKER)) {
140
+ return Option.some(new AgentResultError({
141
+ sessionId,
142
+ message: trimmed.slice(FAILED_MARKER.length).trim() || "Agent reported a failure without details.",
143
+ }));
144
+ }
145
+ return Option.none();
146
+ };
147
+ /** Returns the final answer that relays `report`, starting with its marker. */
148
+ export const reportText = (report) => {
149
+ const marker = Match.valueTags(report, {
150
+ AgentResultError: () => FAILED_MARKER,
151
+ AgentBlockedError: () => BLOCKED_MARKER,
152
+ AgentQuestionError: () => QUESTION_MARKER,
153
+ });
154
+ return `${marker}\n${report.message}`;
155
+ };
156
+ /**
157
+ * Maps a session error to an Attempt failure: SDK and process failures are retryable infrastructure
158
+ * failures; roster errors and Agent-reported failures wait for the operator (ADR 0002).
85
159
  */
86
160
  export const toAttemptFailure = (error) => Match.valueTags(error, {
87
161
  SessionOperationError: (operation) => new InfraFailure({ message: operation.message, cause: operation.cause }),
@@ -89,21 +163,28 @@ export const toAttemptFailure = (error) => Match.valueTags(error, {
89
163
  PoolUnavailableError: ({ message }) => new AgentFailure({ message }),
90
164
  UnsupportedEffortError: ({ message }) => new AgentFailure({ message }),
91
165
  AgentResultError: ({ message }) => new AgentFailure({ message }),
166
+ AgentBlockedError: ({ message }) => new BlockedFailure({ message }),
167
+ AgentQuestionError: ({ message }) => new QuestionFailure({ question: message }),
92
168
  ChildSessionBudgetExceededError: ({ attemptedChildren, maxChildren }) => new ChildSessionBudgetFailure({ attemptedChildren, maxChildren }),
93
169
  });
94
- /** Runs the coding work delegated by an Attempt's parent. */
170
+ /** The service that runs tasks delegated by an Attempt's parent. */
95
171
  export class ChildBackend extends Context.Service()("@usine/agents/ChildBackend") {
96
172
  }
97
- /** Runs delegated coding work with Claude Code. */
173
+ /**
174
+ * A per-Worker lock for Claude commands that can refresh the Worker's shared Claude login: the
175
+ * preflight login check and the start of a Claude child. Claude Code ends a process that finds
176
+ * another process refreshing the login (#453). Provide one instance to both the executor and the
177
+ * Attempt runtime.
178
+ */
179
+ export class ClaudeLoginLock extends Context.Service()("@usine/agents/ClaudeLoginLock") {
180
+ }
181
+ /** The child backend for Claude Code. */
98
182
  export class ClaudeChildBackend extends Context.Service()("@usine/agents/ClaudeChildBackend") {
99
183
  }
100
- /** Runs delegated coding work with Codex. */
184
+ /** The child backend for Codex. */
101
185
  export class CodexChildBackend extends Context.Service()("@usine/agents/CodexChildBackend") {
102
186
  }
103
- /** Runs delegated coding work with Pi. */
187
+ /** The child backend for Pi. */
104
188
  export class PiChildBackend extends Context.Service()("@usine/agents/PiChildBackend") {
105
189
  }
106
- /** Starts the parent that coordinates one Attempt's task and delegates coding work to children. */
107
- export class AgentRuntime extends Context.Service()("@usine/agents/AgentRuntime") {
108
- }
109
190
  //# sourceMappingURL=runtime.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"runtime.js","sourceRoot":"","sources":["../src/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EACL,YAAY,EACZ,iBAAiB,EACjB,cAAc,EACd,WAAW,EACX,YAAY,EACZ,kBAAkB,EAClB,iBAAiB,GAClB,MAAM,2BAA2B,CAAC;AACnC,OAAO,KAAK,cAAc,MAAM,6BAA6B,CAAC;AAC9D,OAAO,EACL,YAAY,EACZ,cAAc,EACd,yBAAy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,CAAC;IACnE,kBAAkB,EAAE,CAAC,EAAE,OAAO,EAAE,EAAE,EAAE,CAAC,IAAI,eAAe,CAAC,EAAE,QAAQ,EAAE,OAAO,EAAE,CAAC;IAC/E,+BAA+B,EAAE,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAE,EAAE,EAAE,CACtE,IAAI,yBAAyB,CAAC,EAAE,iBAAiB,EAAE,WAAW,EAAE,CAAC;CACpE,CAAC,CAAC;AAsCL,oEAAoE;AACpE,MAAM,OAAO,YAAa,SAAQ,OAAO,CAAC,OAAO,EAAqC,CACpF,4BAA4B,CAC7B;CAAG;AAEJ;;;;;GAKG;AACH,MAAM,OAAO,eAAgB,SAAQ,OAAO,CAAC,OAAO,EAQjD,CAAC,+BAA+B,CAAC;CAAG;AAEvC,yCAAyC;AACzC,MAAM,OAAO,kBAAmB,SAAQ,OAAO,CAAC,OAAO,EAA2C,CAChG,kCAAkC,CACnC;CAAG;AAEJ,mCAAmC;AACnC,MAAM,OAAO,iBAAkB,SAAQ,OAAO,CAAC,OAAO,EAA0C,CAC9F,iCAAiC,CAClC;CAAG;AAEJ,gCAAgC;AAChC,MAAM,OAAO,cAAe,SAAQ,OAAO,CAAC,OAAO,EAAuC,CACxF,8BAA8B,CAC/B;CAAG"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@usine/agents",
3
- "version": "0.3.0",
4
- "description": "The usine agent layer: Pi parent adapter, subagents extension, team roster and brain specs.",
3
+ "version": "0.4.0",
4
+ "description": "The usine agent layer: Claude Code, Codex, and Pi child backends, Attempt prompts, and harness preflight.",
5
5
  "license": "MIT",
6
6
  "repository": {
7
7
  "type": "git",
@@ -9,7 +9,8 @@
9
9
  "directory": "packages/agents"
10
10
  },
11
11
  "files": [
12
- "dist"
12
+ "dist",
13
+ "!dist/tsconfig.tsbuildinfo"
13
14
  ],
14
15
  "type": "module",
15
16
  "sideEffects": false,
@@ -18,6 +19,10 @@
18
19
  "types": "./dist/pi/pi.d.ts",
19
20
  "default": "./dist/pi/pi.js"
20
21
  },
22
+ "./child-host": {
23
+ "types": "./dist/child-host/child-host.d.ts",
24
+ "default": "./dist/child-host/child-host.js"
25
+ },
21
26
  "./children": {
22
27
  "types": "./dist/pi/children.d.ts",
23
28
  "default": "./dist/pi/children.js"
@@ -30,9 +35,9 @@
30
35
  "types": "./dist/pi/codex/codex.d.ts",
31
36
  "default": "./dist/pi/codex/codex.js"
32
37
  },
33
- "./pi/live": {
34
- "types": "./dist/pi/live.d.ts",
35
- "default": "./dist/pi/live.js"
38
+ "./pi/authentication": {
39
+ "types": "./dist/pi/authentication.d.ts",
40
+ "default": "./dist/pi/authentication.js"
36
41
  },
37
42
  "./prompt": {
38
43
  "types": "./dist/prompt.d.ts",
@@ -51,10 +56,16 @@
51
56
  "access": "public"
52
57
  },
53
58
  "dependencies": {
54
- "@anthropic-ai/claude-agent-sdk": "0.3.261",
55
- "@earendil-works/pi-coding-agent": "0.85.1",
56
- "typebox": "1.3.7",
57
- "@usine/core": "0.3.0"
59
+ "@anthropic-ai/claude-agent-sdk": "0.3.308",
60
+ "@earendil-works/chord": "1.1.0",
61
+ "@earendil-works/pi-agent-core": "1.1.0",
62
+ "@earendil-works/pi-ai": "1.1.0",
63
+ "@earendil-works/pi-codemode": "1.1.0",
64
+ "@earendil-works/pi-coding-agent": "1.1.0",
65
+ "@earendil-works/pi-mcp": "1.1.0",
66
+ "@earendil-works/pi-telemetry": "1.1.0",
67
+ "@earendil-works/pi-tui": "1.1.0",
68
+ "@usine/core": "0.4.0"
58
69
  },
59
70
  "devDependencies": {
60
71
  "@effect/platform-node": "4.0.0-rc.111",
@@ -75,6 +86,7 @@
75
86
  "build": "tsc -b",
76
87
  "check": "tsc -p tsconfig.check.json && tsc -p tsconfig.conformance.json",
77
88
  "test": "vitest run --exclude 'test/integration/**'",
89
+ "test:integration:claude": "vitest run test/integration/claude.test.ts",
78
90
  "test:integration:codex": "vitest run test/integration/codex.test.ts",
79
91
  "test:integration:pi": "vitest run test/integration/pi.test.ts"
80
92
  }
package/dist/pi/live.d.ts DELETED
@@ -1,4 +0,0 @@
1
- import { Layer } from "effect";
2
- /** The Node agent runtime: the Pi parent with the Claude, Codex, and Pi child backends. */
3
- export declare const layer: Layer.Layer<import("../runtime.ts").AgentRuntime, never, import("effect/unstable/process/ChildProcessSpawner").ChildProcessSpawner>;
4
- //# sourceMappingURL=live.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"live.d.ts","sourceRoot":"","sources":["../../src/pi/live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAgB/B,2FAA2F;AAC3F,eAAO,MAAM,KAAK,qIAAuE,CAAC"}
package/dist/pi/live.js DELETED
@@ -1,11 +0,0 @@
1
- import { Layer } from "effect";
2
- import { claudeChildBackendLayer, claudeSdkLive } from "./claude.js";
3
- import { childDispatcherLayer } from "./children.js";
4
- import { codexAppServerLive } from "./codex/app-server.js";
5
- import { codexChildBackendLayer } from "./codex/codex.js";
6
- import { piChildBackendLayer, piParentLayer, piSdkLive } from "./pi.js";
7
- const childImplementations = Layer.merge(claudeChildBackendLayer.pipe(Layer.provide(claudeSdkLive)), Layer.merge(codexChildBackendLayer.pipe(Layer.provide(codexAppServerLive)), piChildBackendLayer.pipe(Layer.provide(piSdkLive))));
8
- const childLive = childDispatcherLayer.pipe(Layer.provide(childImplementations));
9
- /** The Node agent runtime: the Pi parent with the Claude, Codex, and Pi child backends. */
10
- export const layer = piParentLayer.pipe(Layer.provide(Layer.merge(piSdkLive, childLive)));
11
- //# sourceMappingURL=live.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"live.js","sourceRoot":"","sources":["../../src/pi/live.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AAC/B,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACrE,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAExE,MAAM,oBAAoB,GAAG,KAAK,CAAC,KAAK,CACtC,uBAAuB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,EAC1D,KAAK,CAAC,KAAK,CACT,sBAAsB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,kBAAkB,CAAC,CAAC,EAC9D,mBAAmB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC,CACnD,CACF,CAAC;AACF,MAAM,SAAS,GAAG,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC;AAEjF,2FAA2F;AAC3F,MAAM,CAAC,MAAM,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAC"}