@b3os/sdk 0.2.1 → 0.2.2

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 (138) hide show
  1. package/dist/cjs/core/util.d.ts +1 -1
  2. package/dist/cjs/core/util.js +1 -1
  3. package/dist/cjs/generated/client.d.ts +13 -0
  4. package/dist/cjs/generated/client.js +25 -0
  5. package/dist/cjs/generated/client.js.map +1 -1
  6. package/dist/cjs/generated/errors.d.ts +1 -1
  7. package/dist/cjs/generated/errors.js +75 -0
  8. package/dist/cjs/generated/errors.js.map +1 -1
  9. package/dist/cjs/generated/ids.d.ts +61 -0
  10. package/dist/cjs/generated/ids.js +15 -0
  11. package/dist/cjs/generated/ids.js.map +1 -1
  12. package/dist/cjs/generated/jobs.js +4 -0
  13. package/dist/cjs/generated/jobs.js.map +1 -1
  14. package/dist/cjs/generated/ns/actions.d.ts +267 -33
  15. package/dist/cjs/generated/ns/actions.js +375 -33
  16. package/dist/cjs/generated/ns/actions.js.map +1 -1
  17. package/dist/cjs/generated/ns/agents.d.ts +229 -0
  18. package/dist/cjs/generated/ns/agents.js +402 -0
  19. package/dist/cjs/generated/ns/agents.js.map +1 -0
  20. package/dist/cjs/generated/ns/images.d.ts +81 -0
  21. package/dist/cjs/generated/ns/images.js +122 -0
  22. package/dist/cjs/generated/ns/images.js.map +1 -0
  23. package/dist/cjs/generated/ns/infer.d.ts +71 -3
  24. package/dist/cjs/generated/ns/infer.js +98 -3
  25. package/dist/cjs/generated/ns/infer.js.map +1 -1
  26. package/dist/cjs/generated/ns/keys.d.ts +3 -1
  27. package/dist/cjs/generated/ns/keys.js +3 -1
  28. package/dist/cjs/generated/ns/keys.js.map +1 -1
  29. package/dist/cjs/generated/ns/listeners.d.ts +159 -0
  30. package/dist/cjs/generated/ns/listeners.js +264 -0
  31. package/dist/cjs/generated/ns/listeners.js.map +1 -0
  32. package/dist/cjs/generated/ns/orgs.d.ts +10 -0
  33. package/dist/cjs/generated/ns/orgs.js +26 -1
  34. package/dist/cjs/generated/ns/orgs.js.map +1 -1
  35. package/dist/cjs/generated/ns/projects.d.ts +32 -0
  36. package/dist/cjs/generated/ns/projects.js +66 -0
  37. package/dist/cjs/generated/ns/projects.js.map +1 -1
  38. package/dist/cjs/generated/ns/render.d.ts +192 -21
  39. package/dist/cjs/generated/ns/render.js +267 -24
  40. package/dist/cjs/generated/ns/render.js.map +1 -1
  41. package/dist/cjs/generated/ns/requests.d.ts +3 -1
  42. package/dist/cjs/generated/ns/requests.js +3 -1
  43. package/dist/cjs/generated/ns/requests.js.map +1 -1
  44. package/dist/cjs/generated/ns/routines.d.ts +11 -4
  45. package/dist/cjs/generated/ns/routines.js +11 -4
  46. package/dist/cjs/generated/ns/routines.js.map +1 -1
  47. package/dist/cjs/generated/ns/sandboxes.d.ts +292 -7
  48. package/dist/cjs/generated/ns/sandboxes.js +444 -6
  49. package/dist/cjs/generated/ns/sandboxes.js.map +1 -1
  50. package/dist/cjs/generated/ns/usage.d.ts +1 -1
  51. package/dist/cjs/generated/ns/usage.js +1 -1
  52. package/dist/cjs/generated/ns/vision.d.ts +59 -17
  53. package/dist/cjs/generated/ns/vision.js +59 -21
  54. package/dist/cjs/generated/ns/vision.js.map +1 -1
  55. package/dist/cjs/generated/types.d.ts +2564 -68
  56. package/dist/cjs/helpers/sandboxes.d.ts +20 -1
  57. package/dist/cjs/helpers/sandboxes.js +13 -1
  58. package/dist/cjs/helpers/sandboxes.js.map +1 -1
  59. package/dist/esm/core/util.d.ts +1 -1
  60. package/dist/esm/core/util.js +1 -1
  61. package/dist/esm/generated/client.d.ts +13 -0
  62. package/dist/esm/generated/client.js +25 -0
  63. package/dist/esm/generated/client.js.map +1 -1
  64. package/dist/esm/generated/errors.d.ts +1 -1
  65. package/dist/esm/generated/errors.js +75 -0
  66. package/dist/esm/generated/errors.js.map +1 -1
  67. package/dist/esm/generated/ids.d.ts +61 -0
  68. package/dist/esm/generated/ids.js +15 -0
  69. package/dist/esm/generated/ids.js.map +1 -1
  70. package/dist/esm/generated/jobs.js +4 -0
  71. package/dist/esm/generated/jobs.js.map +1 -1
  72. package/dist/esm/generated/ns/actions.d.ts +267 -33
  73. package/dist/esm/generated/ns/actions.js +375 -33
  74. package/dist/esm/generated/ns/actions.js.map +1 -1
  75. package/dist/esm/generated/ns/agents.d.ts +229 -0
  76. package/dist/esm/generated/ns/agents.js +398 -0
  77. package/dist/esm/generated/ns/agents.js.map +1 -0
  78. package/dist/esm/generated/ns/images.d.ts +81 -0
  79. package/dist/esm/generated/ns/images.js +118 -0
  80. package/dist/esm/generated/ns/images.js.map +1 -0
  81. package/dist/esm/generated/ns/infer.d.ts +71 -3
  82. package/dist/esm/generated/ns/infer.js +98 -3
  83. package/dist/esm/generated/ns/infer.js.map +1 -1
  84. package/dist/esm/generated/ns/keys.d.ts +3 -1
  85. package/dist/esm/generated/ns/keys.js +3 -1
  86. package/dist/esm/generated/ns/keys.js.map +1 -1
  87. package/dist/esm/generated/ns/listeners.d.ts +159 -0
  88. package/dist/esm/generated/ns/listeners.js +260 -0
  89. package/dist/esm/generated/ns/listeners.js.map +1 -0
  90. package/dist/esm/generated/ns/orgs.d.ts +10 -0
  91. package/dist/esm/generated/ns/orgs.js +26 -1
  92. package/dist/esm/generated/ns/orgs.js.map +1 -1
  93. package/dist/esm/generated/ns/projects.d.ts +32 -0
  94. package/dist/esm/generated/ns/projects.js +66 -0
  95. package/dist/esm/generated/ns/projects.js.map +1 -1
  96. package/dist/esm/generated/ns/render.d.ts +192 -21
  97. package/dist/esm/generated/ns/render.js +267 -24
  98. package/dist/esm/generated/ns/render.js.map +1 -1
  99. package/dist/esm/generated/ns/requests.d.ts +3 -1
  100. package/dist/esm/generated/ns/requests.js +3 -1
  101. package/dist/esm/generated/ns/requests.js.map +1 -1
  102. package/dist/esm/generated/ns/routines.d.ts +11 -4
  103. package/dist/esm/generated/ns/routines.js +11 -4
  104. package/dist/esm/generated/ns/routines.js.map +1 -1
  105. package/dist/esm/generated/ns/sandboxes.d.ts +292 -7
  106. package/dist/esm/generated/ns/sandboxes.js +444 -6
  107. package/dist/esm/generated/ns/sandboxes.js.map +1 -1
  108. package/dist/esm/generated/ns/usage.d.ts +1 -1
  109. package/dist/esm/generated/ns/usage.js +1 -1
  110. package/dist/esm/generated/ns/vision.d.ts +59 -17
  111. package/dist/esm/generated/ns/vision.js +59 -21
  112. package/dist/esm/generated/ns/vision.js.map +1 -1
  113. package/dist/esm/generated/types.d.ts +2564 -68
  114. package/dist/esm/helpers/sandboxes.d.ts +20 -1
  115. package/dist/esm/helpers/sandboxes.js +13 -1
  116. package/dist/esm/helpers/sandboxes.js.map +1 -1
  117. package/package.json +1 -1
  118. package/src/core/util.ts +1 -1
  119. package/src/generated/client.ts +28 -0
  120. package/src/generated/errors.ts +150 -0
  121. package/src/generated/ids.ts +15 -0
  122. package/src/generated/jobs.ts +4 -0
  123. package/src/generated/ns/actions.ts +403 -33
  124. package/src/generated/ns/agents.ts +461 -0
  125. package/src/generated/ns/images.ts +128 -0
  126. package/src/generated/ns/infer.ts +100 -3
  127. package/src/generated/ns/keys.ts +3 -1
  128. package/src/generated/ns/listeners.ts +296 -0
  129. package/src/generated/ns/orgs.ts +27 -1
  130. package/src/generated/ns/projects.ts +74 -0
  131. package/src/generated/ns/render.ts +277 -24
  132. package/src/generated/ns/requests.ts +3 -1
  133. package/src/generated/ns/routines.ts +11 -4
  134. package/src/generated/ns/sandboxes.ts +492 -7
  135. package/src/generated/ns/usage.ts +1 -1
  136. package/src/generated/ns/vision.ts +59 -21
  137. package/src/generated/types.ts +2907 -192
  138. package/src/helpers/sandboxes.ts +31 -2
@@ -0,0 +1,229 @@
1
+ import type { RequestOptions, StreamOptions } from "../../core/client.ts";
2
+ import { Namespace } from "../../core/namespace.ts";
3
+ import type { Op } from "../../core/op.ts";
4
+ import type { APIPromise, JobPromise, ListPromise } from "../../core/promise.ts";
5
+ import type { EventStream } from "../../core/sse.ts";
6
+ import type * as T from "../types.ts";
7
+ /** Descriptors of every agents operation, keyed by method name (for tooling and custom clients). */
8
+ export declare const agentsOps: {
9
+ readonly listAgents: Op;
10
+ readonly createAgent: Op;
11
+ readonly getSession: Op;
12
+ readonly cancelSession: Op;
13
+ readonly streamSession: Op;
14
+ readonly deleteAgent: Op;
15
+ readonly getAgent: Op;
16
+ readonly updateAgent: Op;
17
+ readonly listInstances: Op;
18
+ readonly deleteInstance: Op;
19
+ readonly getInstance: Op;
20
+ readonly putInstance: Op;
21
+ readonly listInstanceEvents: Op;
22
+ readonly sendMessage: Op;
23
+ readonly sleepInstance: Op;
24
+ readonly listSessions: Op;
25
+ };
26
+ /**
27
+ * Actors: agent definitions, keyed instances (one microVM per key) and agent sessions; a message wakes its instance (`/v1/agents`).
28
+ */
29
+ export declare class AgentsAPI extends Namespace {
30
+ /**
31
+ * List agents
32
+ *
33
+ * Lists the project's agents, newest first.
34
+ *
35
+ * `GET /v1/agents` · scope `agents:read` · served by the node
36
+ */
37
+ listAgents(params?: T.AgentsListAgentsParams, options?: RequestOptions): ListPromise<T.AgentList, T.Agent>;
38
+ /**
39
+ * Create an agent
40
+ *
41
+ * Creates an agent: the definition every instance of it starts from. Nothing starts until the first message to
42
+ * a key (or `PUT /v1/agents/{agent}/instances/{key}`). `name` is unique in the project and is how the other
43
+ * operations name the agent (its `agt_` ID works too).
44
+ *
45
+ * `entry` is the harness: `command` runs in each instance, and the node delivers each message as a `POST` to
46
+ * `entry.port` and `entry.path` inside it. `api` is the grant each instance runs with, at most your own scopes:
47
+ * its `scopes`, its vault `connections` and its actions rule, whose packs it calls as MCP tools at
48
+ * `B3OS_MCP_URL`. `agents:write` is granted only when named exactly, so a harness changes its own memory and
49
+ * disk, never its definition. Instances belong to the project: revoking the key that created the agent does
50
+ * not stop them.
51
+ *
52
+ * `POST /v1/agents` · scope `agents:write` · served by the node
53
+ */
54
+ createAgent(body: T.AgentCreateRequest, options?: RequestOptions): APIPromise<T.Agent>;
55
+ /**
56
+ * Get an agent session
57
+ *
58
+ * One turn: its status and phase, who sent it (`initiator`), its conversation, how its instance woke
59
+ * (`woke_from`), its trace and its timing. The message and the harness's answer are kept only for a session that
60
+ * was answered `202` (so you can read the result here, for 24 hours) or when the project's
61
+ * `platform.capture_content` setting is on. Sessions are kept 30 days after they end.
62
+ *
63
+ * `GET /v1/agents/sessions/{session_id}` · scope `agents:read` · served by the node
64
+ */
65
+ getSession(sessionId: string, options?: RequestOptions): APIPromise<T.AgentSession>;
66
+ /**
67
+ * Cancel an agent session
68
+ *
69
+ * Cancels a turn. A queued session leaves the queue and is never delivered. A delivered one has its request into
70
+ * the harness closed; what the harness already did stands. Cancelling an ended session returns it unchanged.
71
+ *
72
+ * `POST /v1/agents/sessions/{session_id}/cancel` · scope `agents:run` · served by the node
73
+ */
74
+ cancelSession(sessionId: string, options?: RequestOptions): APIPromise<T.AgentSession>;
75
+ /**
76
+ * Stream an agent session's events
77
+ *
78
+ * Server-sent events for one turn: `job.queued` when it was accepted, `session.waking` when its instance began
79
+ * to wake (with `woke_from`), `session.delivered` when the harness received it, `session.output` for each event
80
+ * the harness streamed back (when it answered with `text/event-stream`), and the terminal `job.succeeded`,
81
+ * `job.failed` or `job.canceled`, which carries the final session and ends the stream. Reconnect with
82
+ * `Last-Event-ID` to resume while the session runs; a session that ended sends its terminal event alone.
83
+ *
84
+ * `GET /v1/agents/sessions/{session_id}/events` · scope `agents:read` · served by the node
85
+ */
86
+ streamSession(sessionId: string, options?: StreamOptions): EventStream<T.AgentSessionEvent>;
87
+ /**
88
+ * Delete an agent
89
+ *
90
+ * Deletes the agent and every instance of it: their microVMs, memory snapshots and disks. Their sessions stay
91
+ * readable until they expire.
92
+ *
93
+ * `DELETE /v1/agents/{agent}` · scope `agents:write` · served by the node
94
+ */
95
+ deleteAgent(agent: string, options?: RequestOptions): APIPromise<T.Deleted>;
96
+ /**
97
+ * Get an agent
98
+ *
99
+ * The agent, by name or `agt_` ID, with its current revision and how many instances it has.
100
+ *
101
+ * `GET /v1/agents/{agent}` · scope `agents:read` · served by the node
102
+ */
103
+ getAgent(agent: string, options?: RequestOptions): APIPromise<T.Agent>;
104
+ /**
105
+ * Update an agent
106
+ *
107
+ * Changes the definition and makes a new revision. `upgrade` says what happens to instances of earlier
108
+ * revisions: `new_instances` (the default) leaves them on the revision they were made from, so their memory
109
+ * and disk stay as they are, and only new instances take the change; `on_wake` makes a sleeping instance of an
110
+ * earlier revision again from this one at its next wake, which ends its memory and disk. `name` cannot change.
111
+ * The grant is checked again against your own scopes.
112
+ *
113
+ * `PATCH /v1/agents/{agent}` · scope `agents:write` · served by the node
114
+ */
115
+ updateAgent(agent: string, body: T.AgentUpdateRequest, options?: RequestOptions): APIPromise<T.Agent>;
116
+ /**
117
+ * List an agent's instances
118
+ *
119
+ * Lists the agent's instances, most recently messaged first. Filter by `status`.
120
+ *
121
+ * `GET /v1/agents/{agent}/instances` · scope `agents:read` · served by the node
122
+ */
123
+ listInstances(agent: string, params?: T.AgentsListInstancesParams, options?: RequestOptions): ListPromise<T.AgentInstanceList, T.AgentInstance>;
124
+ /**
125
+ * Delete an instance
126
+ *
127
+ * Deletes the instance: its microVM, its memory snapshot and its disk. Queued messages end `canceled` and are
128
+ * never delivered. This and deleting the agent are the only ways an instance ends; idleness never does. The
129
+ * next message to the key makes a new instance unless it sends `create: false`.
130
+ *
131
+ * `DELETE /v1/agents/{agent}/instances/{key}` · scope `agents:write` · served by the node
132
+ */
133
+ deleteInstance(agent: string, key: string, options?: RequestOptions): APIPromise<T.Deleted>;
134
+ /**
135
+ * Get an instance
136
+ *
137
+ * The instance for `key`: its status (`running`, `paused` in memory, `hibernated` as a memory snapshot,
138
+ * `dormant` on its disk alone), the host memory it holds now (`resident_mib`), the disk it holds on the node
139
+ * (`storage_bytes`), how many messages wait in its queue, and when it last got a message and went to sleep.
140
+ *
141
+ * `GET /v1/agents/{agent}/instances/{key}` · scope `agents:read` · served by the node
142
+ */
143
+ getInstance(agent: string, key: string, options?: RequestOptions): APIPromise<T.AgentInstance>;
144
+ /**
145
+ * Get or create an instance
146
+ *
147
+ * The instance for `key`, made if it does not exist: `201` when this request made it (its microVM started and
148
+ * its harness passed readiness), `200` when it existed. An existing instance is not woken unless `wake: true`.
149
+ * `replace: true` deletes an existing instance (its memory, snapshot and disk) and makes it again from the
150
+ * agent's current revision. Two requests for a new key at once make one instance.
151
+ *
152
+ * Each instance is its own microVM: instances of different keys never share one. The key is stored and shown as
153
+ * written, so never use a credential or a personal detail as a key.
154
+ *
155
+ * `PUT /v1/agents/{agent}/instances/{key}` · scope `agents:run` · served by the node
156
+ */
157
+ putInstance(agent: string, key: string, body?: T.AgentInstancePutRequest, options?: RequestOptions): APIPromise<T.AgentInstance>;
158
+ /**
159
+ * List an instance's lifecycle events
160
+ *
161
+ * What happened to the instance, newest first: `instance.created`, `instance.paused`, `instance.hibernated`,
162
+ * `instance.dormant`, `instance.woke` (with `woke_from`), `instance.failed`, `instance.recovered` (with
163
+ * `woke_from`: from its memory snapshot, which takes memory and disk back to the snapshot's time together,
164
+ * from its disk, with memory lost, or `new`, when its disk was gone too) and `instance.upgraded`. The last 200
165
+ * are kept.
166
+ *
167
+ * `GET /v1/agents/{agent}/instances/{key}/events` · scope `agents:read` · served by the node
168
+ */
169
+ listInstanceEvents(agent: string, key: string, params?: T.AgentsListInstanceEventsParams, options?: RequestOptions): ListPromise<T.AgentInstanceEventList, T.AgentInstanceEvent>;
170
+ /**
171
+ * Send a message to an instance
172
+ *
173
+ * Sends one message to the instance for `key` and starts a session (one turn). The instance is made if it does
174
+ * not exist, unless `create: false`; a sleeping one is woken, from memory, from its memory snapshot or from its
175
+ * disk (`woke_from`). Nobody calls resume.
176
+ *
177
+ * The message is written to disk before any answer. With `?wait=0` (the default) the answer is `202` with the
178
+ * session `queued` right after that write, before the instance wakes or the turn runs: from then on the message
179
+ * is not lost when the node's daemon restarts. With `?wait=N` the answer waits up to N seconds for the turn;
180
+ * with `Accept: text/event-stream` it streams the session's events, the harness's own streamed events among
181
+ * them (`session.output`). A `200` carries the harness's answer as `result` (its JSON body, or its text).
182
+ *
183
+ * An instance runs one turn at a time. A message that arrives during a turn waits in the instance's queue, in
184
+ * order, up to the agent's `turns.queue_max`; past it the answer is `429 instance_busy` with `Retry-After`, and
185
+ * nothing was queued. Retry with the same `Idempotency-Key`: a retry within 24 hours returns the first answer
186
+ * and never queues the message twice.
187
+ *
188
+ * The node delivers the message as a `POST` to the agent's `entry.port` and `entry.path` inside the instance,
189
+ * with the JSON body `{session, message, conversation, subject, initiator}` and the headers `traceparent`,
190
+ * `baggage` and `x-b3os-session`. `message` is your request body without the reserved members. A 2xx answer
191
+ * ends the session `succeeded`; any other ends it `failed` with `harness_error`. A message is delivered into
192
+ * the harness at most once: if the node restarts while the harness has it, the session ends `failed` with
193
+ * `session_interrupted`, unless the agent sets `turns.redeliver: true`.
194
+ *
195
+ * `conversation` and `subject` are taken from the body, else from the `b3os.conversation` and `b3os.subject`
196
+ * baggage that `b3.traces.turn` sends. `initiator` (the key, dashboard user, sandbox, instance, routine run or
197
+ * listener that sent the message) is taken from the credential, never from the body. A message whose key is
198
+ * revoked before it is delivered ends `failed` with `credential_revoked`. Code in an instance cannot message
199
+ * that same instance (`409 instance_self_message`).
200
+ *
201
+ * `Server-Timing` and the session's `timing` split the turn into `queue`, `wake` (`desc` names the tier),
202
+ * `deliver` and `harness`.
203
+ *
204
+ * `POST /v1/agents/{agent}/instances/{key}/messages` · scope `agents:run` · served by the node
205
+ */
206
+ sendMessage(agent: string, key: string, body: T.AgentMessageRequest, options?: RequestOptions): JobPromise<T.AgentSession, T.AgentSessionEvent>;
207
+ /**
208
+ * Put an instance to sleep now
209
+ *
210
+ * Sends the instance to a sleep tier now instead of waiting for its timers: `ram` pauses it, `snapshot` writes
211
+ * its memory snapshot and frees its memory (an instance with a volume answers `409 volume_attached` and stays as
212
+ * it was). A harness may call this on its own instance when it knows it is done
213
+ * (from inside, at `http://127.0.0.1:7700`); the pause then happens once its current turn ends. An instance with
214
+ * a turn running or messages queued goes to sleep after them. Asleep already in that tier or a deeper one:
215
+ * returned unchanged.
216
+ *
217
+ * `POST /v1/agents/{agent}/instances/{key}/sleep` · scope `agents:run` · served by the node
218
+ */
219
+ sleepInstance(agent: string, key: string, body?: T.AgentInstanceSleepRequest, options?: RequestOptions): APIPromise<T.AgentInstance>;
220
+ /**
221
+ * List an agent's sessions
222
+ *
223
+ * Lists the agent's sessions, newest first. Filter by instance `key`, by `conversation` (the ID you sent with the
224
+ * message, or the `b3os.conversation` baggage of `b3.traces.turn`) or by `status`.
225
+ *
226
+ * `GET /v1/agents/{agent}/sessions` · scope `agents:read` · served by the node
227
+ */
228
+ listSessions(agent: string, params?: T.AgentsListSessionsParams, options?: RequestOptions): ListPromise<T.AgentSessionList, T.AgentSession>;
229
+ }
@@ -0,0 +1,402 @@
1
+ "use strict";
2
+ // Generated by packages/sdk/scripts/generate.mjs from packages/spec/dist. Do not edit; run `pnpm generate`.
3
+ Object.defineProperty(exports, "__esModule", { value: true });
4
+ exports.AgentsAPI = exports.agentsOps = void 0;
5
+ const jobs_ts_1 = require("../../core/jobs.js");
6
+ const namespace_ts_1 = require("../../core/namespace.js");
7
+ const listAgentsOp = {
8
+ id: "agentsListAgents",
9
+ method: "GET",
10
+ path: "/v1/agents",
11
+ timeoutMs: 10000,
12
+ scope: "agents:read",
13
+ };
14
+ const createAgentOp = {
15
+ id: "agentsCreateAgent",
16
+ method: "POST",
17
+ path: "/v1/agents",
18
+ body: "json",
19
+ idem: true,
20
+ timeoutMs: 10000,
21
+ scope: "agents:write",
22
+ };
23
+ const getSessionOp = {
24
+ id: "agentsGetSession",
25
+ method: "GET",
26
+ path: "/v1/agents/sessions/{session_id}",
27
+ params: ["session_id"],
28
+ timeoutMs: 10000,
29
+ scope: "agents:read",
30
+ };
31
+ const cancelSessionOp = {
32
+ id: "agentsCancelSession",
33
+ method: "POST",
34
+ path: "/v1/agents/sessions/{session_id}/cancel",
35
+ params: ["session_id"],
36
+ timeoutMs: 10000,
37
+ scope: "agents:run",
38
+ };
39
+ const streamSessionOp = {
40
+ id: "agentsStreamSession",
41
+ method: "GET",
42
+ path: "/v1/agents/sessions/{session_id}/events",
43
+ params: ["session_id"],
44
+ stream: "sse",
45
+ timeoutMs: 3600000,
46
+ scope: "agents:read",
47
+ };
48
+ const deleteAgentOp = {
49
+ id: "agentsDeleteAgent",
50
+ method: "DELETE",
51
+ path: "/v1/agents/{agent}",
52
+ params: ["agent"],
53
+ timeoutMs: 30000,
54
+ scope: "agents:write",
55
+ };
56
+ const getAgentOp = {
57
+ id: "agentsGetAgent",
58
+ method: "GET",
59
+ path: "/v1/agents/{agent}",
60
+ params: ["agent"],
61
+ timeoutMs: 10000,
62
+ scope: "agents:read",
63
+ };
64
+ const updateAgentOp = {
65
+ id: "agentsUpdateAgent",
66
+ method: "PATCH",
67
+ path: "/v1/agents/{agent}",
68
+ params: ["agent"],
69
+ body: "json",
70
+ timeoutMs: 10000,
71
+ scope: "agents:write",
72
+ };
73
+ const listInstancesOp = {
74
+ id: "agentsListInstances",
75
+ method: "GET",
76
+ path: "/v1/agents/{agent}/instances",
77
+ params: ["agent"],
78
+ timeoutMs: 10000,
79
+ scope: "agents:read",
80
+ };
81
+ const deleteInstanceOp = {
82
+ id: "agentsDeleteInstance",
83
+ method: "DELETE",
84
+ path: "/v1/agents/{agent}/instances/{key}",
85
+ params: ["agent", "key"],
86
+ timeoutMs: 30000,
87
+ scope: "agents:write",
88
+ };
89
+ const getInstanceOp = {
90
+ id: "agentsGetInstance",
91
+ method: "GET",
92
+ path: "/v1/agents/{agent}/instances/{key}",
93
+ params: ["agent", "key"],
94
+ timeoutMs: 10000,
95
+ scope: "agents:read",
96
+ };
97
+ const putInstanceOp = {
98
+ id: "agentsPutInstance",
99
+ method: "PUT",
100
+ path: "/v1/agents/{agent}/instances/{key}",
101
+ params: ["agent", "key"],
102
+ body: "json",
103
+ timeoutMs: 65000,
104
+ scope: "agents:run",
105
+ };
106
+ const listInstanceEventsOp = {
107
+ id: "agentsListInstanceEvents",
108
+ method: "GET",
109
+ path: "/v1/agents/{agent}/instances/{key}/events",
110
+ params: ["agent", "key"],
111
+ timeoutMs: 10000,
112
+ scope: "agents:read",
113
+ };
114
+ const sleepInstanceOp = {
115
+ id: "agentsSleepInstance",
116
+ method: "POST",
117
+ path: "/v1/agents/{agent}/instances/{key}/sleep",
118
+ params: ["agent", "key"],
119
+ body: "json",
120
+ timeoutMs: 30000,
121
+ scope: "agents:run",
122
+ };
123
+ const listSessionsOp = {
124
+ id: "agentsListSessions",
125
+ method: "GET",
126
+ path: "/v1/agents/{agent}/sessions",
127
+ params: ["agent"],
128
+ timeoutMs: 10000,
129
+ scope: "agents:read",
130
+ };
131
+ const sendMessageOp = {
132
+ id: "agentsSendMessage",
133
+ method: "POST",
134
+ path: "/v1/agents/{agent}/instances/{key}/messages",
135
+ params: ["agent", "key"],
136
+ body: "json",
137
+ idem: true,
138
+ stream: "sse",
139
+ timeoutMs: 3600000,
140
+ scope: "agents:run",
141
+ job: { get: getSessionOp, events: streamSessionOp, cancel: cancelSessionOp },
142
+ };
143
+ /** Descriptors of every agents operation, keyed by method name (for tooling and custom clients). */
144
+ exports.agentsOps = {
145
+ listAgents: listAgentsOp,
146
+ createAgent: createAgentOp,
147
+ getSession: getSessionOp,
148
+ cancelSession: cancelSessionOp,
149
+ streamSession: streamSessionOp,
150
+ deleteAgent: deleteAgentOp,
151
+ getAgent: getAgentOp,
152
+ updateAgent: updateAgentOp,
153
+ listInstances: listInstancesOp,
154
+ deleteInstance: deleteInstanceOp,
155
+ getInstance: getInstanceOp,
156
+ putInstance: putInstanceOp,
157
+ listInstanceEvents: listInstanceEventsOp,
158
+ sendMessage: sendMessageOp,
159
+ sleepInstance: sleepInstanceOp,
160
+ listSessions: listSessionsOp,
161
+ };
162
+ /**
163
+ * Actors: agent definitions, keyed instances (one microVM per key) and agent sessions; a message wakes its instance (`/v1/agents`).
164
+ */
165
+ class AgentsAPI extends namespace_ts_1.Namespace {
166
+ /**
167
+ * List agents
168
+ *
169
+ * Lists the project's agents, newest first.
170
+ *
171
+ * `GET /v1/agents` · scope `agents:read` · served by the node
172
+ */
173
+ listAgents(params, options) {
174
+ return this._client._list(listAgentsOp, { query: params }, options);
175
+ }
176
+ /**
177
+ * Create an agent
178
+ *
179
+ * Creates an agent: the definition every instance of it starts from. Nothing starts until the first message to
180
+ * a key (or `PUT /v1/agents/{agent}/instances/{key}`). `name` is unique in the project and is how the other
181
+ * operations name the agent (its `agt_` ID works too).
182
+ *
183
+ * `entry` is the harness: `command` runs in each instance, and the node delivers each message as a `POST` to
184
+ * `entry.port` and `entry.path` inside it. `api` is the grant each instance runs with, at most your own scopes:
185
+ * its `scopes`, its vault `connections` and its actions rule, whose packs it calls as MCP tools at
186
+ * `B3OS_MCP_URL`. `agents:write` is granted only when named exactly, so a harness changes its own memory and
187
+ * disk, never its definition. Instances belong to the project: revoking the key that created the agent does
188
+ * not stop them.
189
+ *
190
+ * `POST /v1/agents` · scope `agents:write` · served by the node
191
+ */
192
+ createAgent(body, options) {
193
+ return this._client._call(createAgentOp, { body }, options);
194
+ }
195
+ /**
196
+ * Get an agent session
197
+ *
198
+ * One turn: its status and phase, who sent it (`initiator`), its conversation, how its instance woke
199
+ * (`woke_from`), its trace and its timing. The message and the harness's answer are kept only for a session that
200
+ * was answered `202` (so you can read the result here, for 24 hours) or when the project's
201
+ * `platform.capture_content` setting is on. Sessions are kept 30 days after they end.
202
+ *
203
+ * `GET /v1/agents/sessions/{session_id}` · scope `agents:read` · served by the node
204
+ */
205
+ getSession(sessionId, options) {
206
+ return this._client._call(getSessionOp, { path: [sessionId] }, options);
207
+ }
208
+ /**
209
+ * Cancel an agent session
210
+ *
211
+ * Cancels a turn. A queued session leaves the queue and is never delivered. A delivered one has its request into
212
+ * the harness closed; what the harness already did stands. Cancelling an ended session returns it unchanged.
213
+ *
214
+ * `POST /v1/agents/sessions/{session_id}/cancel` · scope `agents:run` · served by the node
215
+ */
216
+ cancelSession(sessionId, options) {
217
+ return this._client._call(cancelSessionOp, { path: [sessionId] }, options);
218
+ }
219
+ /**
220
+ * Stream an agent session's events
221
+ *
222
+ * Server-sent events for one turn: `job.queued` when it was accepted, `session.waking` when its instance began
223
+ * to wake (with `woke_from`), `session.delivered` when the harness received it, `session.output` for each event
224
+ * the harness streamed back (when it answered with `text/event-stream`), and the terminal `job.succeeded`,
225
+ * `job.failed` or `job.canceled`, which carries the final session and ends the stream. Reconnect with
226
+ * `Last-Event-ID` to resume while the session runs; a session that ended sends its terminal event alone.
227
+ *
228
+ * `GET /v1/agents/sessions/{session_id}/events` · scope `agents:read` · served by the node
229
+ */
230
+ streamSession(sessionId, options) {
231
+ return this._client._stream(streamSessionOp, { path: [sessionId] }, options, {
232
+ terminal: jobs_ts_1.isTerminalJobEvent,
233
+ reconnectOnEnd: true,
234
+ });
235
+ }
236
+ /**
237
+ * Delete an agent
238
+ *
239
+ * Deletes the agent and every instance of it: their microVMs, memory snapshots and disks. Their sessions stay
240
+ * readable until they expire.
241
+ *
242
+ * `DELETE /v1/agents/{agent}` · scope `agents:write` · served by the node
243
+ */
244
+ deleteAgent(agent, options) {
245
+ return this._client._call(deleteAgentOp, { path: [agent] }, options);
246
+ }
247
+ /**
248
+ * Get an agent
249
+ *
250
+ * The agent, by name or `agt_` ID, with its current revision and how many instances it has.
251
+ *
252
+ * `GET /v1/agents/{agent}` · scope `agents:read` · served by the node
253
+ */
254
+ getAgent(agent, options) {
255
+ return this._client._call(getAgentOp, { path: [agent] }, options);
256
+ }
257
+ /**
258
+ * Update an agent
259
+ *
260
+ * Changes the definition and makes a new revision. `upgrade` says what happens to instances of earlier
261
+ * revisions: `new_instances` (the default) leaves them on the revision they were made from, so their memory
262
+ * and disk stay as they are, and only new instances take the change; `on_wake` makes a sleeping instance of an
263
+ * earlier revision again from this one at its next wake, which ends its memory and disk. `name` cannot change.
264
+ * The grant is checked again against your own scopes.
265
+ *
266
+ * `PATCH /v1/agents/{agent}` · scope `agents:write` · served by the node
267
+ */
268
+ updateAgent(agent, body, options) {
269
+ return this._client._call(updateAgentOp, { path: [agent], body }, options);
270
+ }
271
+ /**
272
+ * List an agent's instances
273
+ *
274
+ * Lists the agent's instances, most recently messaged first. Filter by `status`.
275
+ *
276
+ * `GET /v1/agents/{agent}/instances` · scope `agents:read` · served by the node
277
+ */
278
+ listInstances(agent, params, options) {
279
+ return this._client._list(listInstancesOp, { path: [agent], query: params }, options);
280
+ }
281
+ /**
282
+ * Delete an instance
283
+ *
284
+ * Deletes the instance: its microVM, its memory snapshot and its disk. Queued messages end `canceled` and are
285
+ * never delivered. This and deleting the agent are the only ways an instance ends; idleness never does. The
286
+ * next message to the key makes a new instance unless it sends `create: false`.
287
+ *
288
+ * `DELETE /v1/agents/{agent}/instances/{key}` · scope `agents:write` · served by the node
289
+ */
290
+ deleteInstance(agent, key, options) {
291
+ return this._client._call(deleteInstanceOp, { path: [agent, key] }, options);
292
+ }
293
+ /**
294
+ * Get an instance
295
+ *
296
+ * The instance for `key`: its status (`running`, `paused` in memory, `hibernated` as a memory snapshot,
297
+ * `dormant` on its disk alone), the host memory it holds now (`resident_mib`), the disk it holds on the node
298
+ * (`storage_bytes`), how many messages wait in its queue, and when it last got a message and went to sleep.
299
+ *
300
+ * `GET /v1/agents/{agent}/instances/{key}` · scope `agents:read` · served by the node
301
+ */
302
+ getInstance(agent, key, options) {
303
+ return this._client._call(getInstanceOp, { path: [agent, key] }, options);
304
+ }
305
+ /**
306
+ * Get or create an instance
307
+ *
308
+ * The instance for `key`, made if it does not exist: `201` when this request made it (its microVM started and
309
+ * its harness passed readiness), `200` when it existed. An existing instance is not woken unless `wake: true`.
310
+ * `replace: true` deletes an existing instance (its memory, snapshot and disk) and makes it again from the
311
+ * agent's current revision. Two requests for a new key at once make one instance.
312
+ *
313
+ * Each instance is its own microVM: instances of different keys never share one. The key is stored and shown as
314
+ * written, so never use a credential or a personal detail as a key.
315
+ *
316
+ * `PUT /v1/agents/{agent}/instances/{key}` · scope `agents:run` · served by the node
317
+ */
318
+ putInstance(agent, key, body, options) {
319
+ return this._client._call(putInstanceOp, { path: [agent, key], body }, options);
320
+ }
321
+ /**
322
+ * List an instance's lifecycle events
323
+ *
324
+ * What happened to the instance, newest first: `instance.created`, `instance.paused`, `instance.hibernated`,
325
+ * `instance.dormant`, `instance.woke` (with `woke_from`), `instance.failed`, `instance.recovered` (with
326
+ * `woke_from`: from its memory snapshot, which takes memory and disk back to the snapshot's time together,
327
+ * from its disk, with memory lost, or `new`, when its disk was gone too) and `instance.upgraded`. The last 200
328
+ * are kept.
329
+ *
330
+ * `GET /v1/agents/{agent}/instances/{key}/events` · scope `agents:read` · served by the node
331
+ */
332
+ listInstanceEvents(agent, key, params, options) {
333
+ return this._client._list(listInstanceEventsOp, { path: [agent, key], query: params }, options);
334
+ }
335
+ /**
336
+ * Send a message to an instance
337
+ *
338
+ * Sends one message to the instance for `key` and starts a session (one turn). The instance is made if it does
339
+ * not exist, unless `create: false`; a sleeping one is woken, from memory, from its memory snapshot or from its
340
+ * disk (`woke_from`). Nobody calls resume.
341
+ *
342
+ * The message is written to disk before any answer. With `?wait=0` (the default) the answer is `202` with the
343
+ * session `queued` right after that write, before the instance wakes or the turn runs: from then on the message
344
+ * is not lost when the node's daemon restarts. With `?wait=N` the answer waits up to N seconds for the turn;
345
+ * with `Accept: text/event-stream` it streams the session's events, the harness's own streamed events among
346
+ * them (`session.output`). A `200` carries the harness's answer as `result` (its JSON body, or its text).
347
+ *
348
+ * An instance runs one turn at a time. A message that arrives during a turn waits in the instance's queue, in
349
+ * order, up to the agent's `turns.queue_max`; past it the answer is `429 instance_busy` with `Retry-After`, and
350
+ * nothing was queued. Retry with the same `Idempotency-Key`: a retry within 24 hours returns the first answer
351
+ * and never queues the message twice.
352
+ *
353
+ * The node delivers the message as a `POST` to the agent's `entry.port` and `entry.path` inside the instance,
354
+ * with the JSON body `{session, message, conversation, subject, initiator}` and the headers `traceparent`,
355
+ * `baggage` and `x-b3os-session`. `message` is your request body without the reserved members. A 2xx answer
356
+ * ends the session `succeeded`; any other ends it `failed` with `harness_error`. A message is delivered into
357
+ * the harness at most once: if the node restarts while the harness has it, the session ends `failed` with
358
+ * `session_interrupted`, unless the agent sets `turns.redeliver: true`.
359
+ *
360
+ * `conversation` and `subject` are taken from the body, else from the `b3os.conversation` and `b3os.subject`
361
+ * baggage that `b3.traces.turn` sends. `initiator` (the key, dashboard user, sandbox, instance, routine run or
362
+ * listener that sent the message) is taken from the credential, never from the body. A message whose key is
363
+ * revoked before it is delivered ends `failed` with `credential_revoked`. Code in an instance cannot message
364
+ * that same instance (`409 instance_self_message`).
365
+ *
366
+ * `Server-Timing` and the session's `timing` split the turn into `queue`, `wake` (`desc` names the tier),
367
+ * `deliver` and `harness`.
368
+ *
369
+ * `POST /v1/agents/{agent}/instances/{key}/messages` · scope `agents:run` · served by the node
370
+ */
371
+ sendMessage(agent, key, body, options) {
372
+ return this._client._job(sendMessageOp, { path: [agent, key], body }, options);
373
+ }
374
+ /**
375
+ * Put an instance to sleep now
376
+ *
377
+ * Sends the instance to a sleep tier now instead of waiting for its timers: `ram` pauses it, `snapshot` writes
378
+ * its memory snapshot and frees its memory (an instance with a volume answers `409 volume_attached` and stays as
379
+ * it was). A harness may call this on its own instance when it knows it is done
380
+ * (from inside, at `http://127.0.0.1:7700`); the pause then happens once its current turn ends. An instance with
381
+ * a turn running or messages queued goes to sleep after them. Asleep already in that tier or a deeper one:
382
+ * returned unchanged.
383
+ *
384
+ * `POST /v1/agents/{agent}/instances/{key}/sleep` · scope `agents:run` · served by the node
385
+ */
386
+ sleepInstance(agent, key, body, options) {
387
+ return this._client._call(sleepInstanceOp, { path: [agent, key], body }, options);
388
+ }
389
+ /**
390
+ * List an agent's sessions
391
+ *
392
+ * Lists the agent's sessions, newest first. Filter by instance `key`, by `conversation` (the ID you sent with the
393
+ * message, or the `b3os.conversation` baggage of `b3.traces.turn`) or by `status`.
394
+ *
395
+ * `GET /v1/agents/{agent}/sessions` · scope `agents:read` · served by the node
396
+ */
397
+ listSessions(agent, params, options) {
398
+ return this._client._list(listSessionsOp, { path: [agent], query: params }, options);
399
+ }
400
+ }
401
+ exports.AgentsAPI = AgentsAPI;
402
+ //# sourceMappingURL=agents.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agents.js","sourceRoot":"","sources":["../../../../src/generated/ns/agents.ts"],"names":[],"mappings":";AAAA,4GAA4G;;;AAG5G,gDAAwD;AACxD,0DAAoD;AAMpD,MAAM,YAAY,GAAO;IACvB,EAAE,EAAE,kBAAkB;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,YAAY;IAClB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,aAAa;CACrB,CAAC;AACF,MAAM,aAAa,GAAO;IACxB,EAAE,EAAE,mBAAmB;IACvB,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,YAAY;IAClB,IAAI,EAAE,MAAM;IACZ,IAAI,EAAE,IAAI;IACV,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,cAAc;CACtB,CAAC;AACF,MAAM,YAAY,GAAO;IACvB,EAAE,EAAE,kBAAkB;IACtB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,kCAAkC;IACxC,MAAM,EAAE,CAAC,YAAY,CAAC;IACtB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,aAAa;CACrB,CAAC;AACF,MAAM,eAAe,GAAO;IAC1B,EAAE,EAAE,qBAAqB;IACzB,MAAM,EAAE,MAAM;IACd,IAAI,EAAE,yCAAyC;IAC/C,MAAM,EAAE,CAAC,YAAY,CAAC;IACtB,SAAS,EAAE,KAAK;IAChB,KAAK,EAAE,YAAY;CACpB,CAAC;AACF,MAAM,eAAe,GAAO;IAC1B,EAAE,EAAE,qBAAqB;IACzB,MAAM,EAAE,KAAK;IACb,IAAI,EAAE,yCAAyC;IAC/C,MAAM,EAAE,CAAC,YAAY,CAAC;IACtB,MAAM,EAAE,KAAK;IACb,SAAS,EAAE,OAAO;IAClB,K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