@sylphx/sdk 0.32.0 → 0.32.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 (127) hide show
  1. package/README.md +125 -0
  2. package/dist/access.d.ts +50 -1
  3. package/dist/access.js +14 -2
  4. package/dist/access.js.map +1 -1
  5. package/dist/agents.d.ts +2002 -0
  6. package/dist/agents.js +1367 -0
  7. package/dist/agents.js.map +1 -0
  8. package/dist/ai.js +1 -1
  9. package/dist/ai.js.map +1 -1
  10. package/dist/analytics.d.ts +232 -0
  11. package/dist/analytics.js +126 -0
  12. package/dist/analytics.js.map +1 -0
  13. package/dist/artifacts.d.ts +47 -1
  14. package/dist/artifacts.js +30 -2
  15. package/dist/artifacts.js.map +1 -1
  16. package/dist/assets.js +1 -1
  17. package/dist/assets.js.map +1 -1
  18. package/dist/auth/client.d.ts +34 -3
  19. package/dist/auth/client.js +42 -5
  20. package/dist/auth/client.js.map +1 -1
  21. package/dist/auth/continue-mock.d.ts +21 -0
  22. package/dist/auth/continue-mock.js +75 -0
  23. package/dist/auth/continue-mock.js.map +1 -0
  24. package/dist/auth/end-user-keys-mock.d.ts +83 -0
  25. package/dist/auth/end-user-keys-mock.js +427 -0
  26. package/dist/auth/end-user-keys-mock.js.map +1 -0
  27. package/dist/auth/end-user-keys.d.ts +219 -0
  28. package/dist/auth/end-user-keys.js +240 -0
  29. package/dist/auth/end-user-keys.js.map +1 -0
  30. package/dist/auth/verify.js +1 -1
  31. package/dist/auth/verify.js.map +1 -1
  32. package/dist/auth.d.ts +370 -2
  33. package/dist/auth.js +282 -2
  34. package/dist/auth.js.map +1 -1
  35. package/dist/billing.d.ts +96 -11
  36. package/dist/billing.js +41 -1
  37. package/dist/billing.js.map +1 -1
  38. package/dist/broker.d.ts +165 -33
  39. package/dist/broker.js +103 -7
  40. package/dist/broker.js.map +1 -1
  41. package/dist/browser-upload.d.ts +101 -0
  42. package/dist/browser-upload.js +130 -0
  43. package/dist/browser-upload.js.map +1 -0
  44. package/dist/build.d.ts +361 -28
  45. package/dist/build.js +302 -10
  46. package/dist/build.js.map +1 -1
  47. package/dist/common.d.ts +1 -1
  48. package/dist/common.js +1 -1
  49. package/dist/common.js.map +1 -1
  50. package/dist/config/flags.d.ts +12 -2
  51. package/dist/config/flags.js +54 -6
  52. package/dist/config/flags.js.map +1 -1
  53. package/dist/config.d.ts +24 -0
  54. package/dist/config.js +22 -1
  55. package/dist/config.js.map +1 -1
  56. package/dist/connections.d.ts +128 -25
  57. package/dist/connections.js +72 -25
  58. package/dist/connections.js.map +1 -1
  59. package/dist/data.d.ts +358 -13
  60. package/dist/data.js +166 -9
  61. package/dist/data.js.map +1 -1
  62. package/dist/entitlement.js +1 -1
  63. package/dist/entitlement.js.map +1 -1
  64. package/dist/events/realtime.js +1 -1
  65. package/dist/events/realtime.js.map +1 -1
  66. package/dist/events/webhooks.js +1 -1
  67. package/dist/events/webhooks.js.map +1 -1
  68. package/dist/events.d.ts +36 -0
  69. package/dist/events.js +29 -1
  70. package/dist/events.js.map +1 -1
  71. package/dist/flags.d.ts +20 -0
  72. package/dist/flags.js +48 -0
  73. package/dist/flags.js.map +1 -0
  74. package/dist/hosting.js +1 -1
  75. package/dist/hosting.js.map +1 -1
  76. package/dist/ids.d.ts +192 -2
  77. package/dist/ids.js +40 -2
  78. package/dist/ids.js.map +1 -1
  79. package/dist/index.d.ts +18 -1
  80. package/dist/index.js +32 -2
  81. package/dist/index.js.map +1 -1
  82. package/dist/keys.js +1 -1
  83. package/dist/keys.js.map +1 -1
  84. package/dist/knowledge.d.ts +1215 -0
  85. package/dist/knowledge.js +1012 -0
  86. package/dist/knowledge.js.map +1 -0
  87. package/dist/localization.js +1 -1
  88. package/dist/localization.js.map +1 -1
  89. package/dist/methods.js +1938 -15
  90. package/dist/methods.js.map +1 -1
  91. package/dist/money.d.ts +1989 -53
  92. package/dist/money.js +1401 -19
  93. package/dist/money.js.map +1 -1
  94. package/dist/network.js +1 -1
  95. package/dist/network.js.map +1 -1
  96. package/dist/notify.d.ts +686 -1
  97. package/dist/notify.js +552 -1
  98. package/dist/notify.js.map +1 -1
  99. package/dist/observability.d.ts +138 -0
  100. package/dist/observability.js +89 -1
  101. package/dist/observability.js.map +1 -1
  102. package/dist/realtime.d.ts +404 -0
  103. package/dist/realtime.js +312 -0
  104. package/dist/realtime.js.map +1 -0
  105. package/dist/release.js +1 -1
  106. package/dist/release.js.map +1 -1
  107. package/dist/runners.js +1 -1
  108. package/dist/runners.js.map +1 -1
  109. package/dist/runtime.d.ts +3 -0
  110. package/dist/runtime.js +54 -1
  111. package/dist/runtime.js.map +1 -1
  112. package/dist/sandboxes/stream-mock.d.ts +124 -0
  113. package/dist/sandboxes/stream-mock.js +476 -0
  114. package/dist/sandboxes/stream-mock.js.map +1 -0
  115. package/dist/sandboxes/stream.d.ts +407 -0
  116. package/dist/sandboxes/stream.js +335 -0
  117. package/dist/sandboxes/stream.js.map +1 -0
  118. package/dist/sandboxes.d.ts +94 -17
  119. package/dist/sandboxes.js +33 -4
  120. package/dist/sandboxes.js.map +1 -1
  121. package/dist/secrets.d.ts +336 -0
  122. package/dist/secrets.js +268 -1
  123. package/dist/secrets.js.map +1 -1
  124. package/dist/workflows.d.ts +119 -3
  125. package/dist/workflows.js +144 -4
  126. package/dist/workflows.js.map +1 -1
  127. package/package.json +2 -2
@@ -0,0 +1,2002 @@
1
+ import * as runtime from './runtime.js';
2
+ import './common.js';
3
+ import type * as common from './common.js';
4
+ import './sandboxes.js';
5
+ import type * as sandboxes from './sandboxes.js';
6
+ /**
7
+ * An Agent is a versioned agent definition: model, instructions, tools, MCP
8
+ * servers, skills, memory stores, tool policy and budget. Each create or
9
+ * update that changes `spec` mints a new immutable AgentVersion; a session
10
+ * pins the version it started on, so a change never alters a running
11
+ * conversation.
12
+ */
13
+ export interface Agent {
14
+ /** `orgs/{org}/projects/{project}/envs/{env}/agents/{agent}`. */
15
+ name?: string;
16
+ /** `agt_<cell><ulid>`; never reused. */
17
+ readonly uid?: string;
18
+ /** Resource metadata. */
19
+ meta?: common.ResourceMeta;
20
+ /** Desired state: the definition the next version takes. */
21
+ spec?: AgentSpec;
22
+ /** Observed state. */
23
+ readonly status?: AgentStatus;
24
+ }
25
+ /** AgentBudget caps what one turn and one session may spend. */
26
+ export interface AgentBudget {
27
+ /** Model and tool steps per turn, 1 to 1000; default 100. */
28
+ maxStepsPerTurn?: number;
29
+ /** One turn's wall-clock deadline, 10s to 24h; default 30m. */
30
+ turnTimeout?: string;
31
+ /**
32
+ * Spend per session in micro-USD, models and tools together; 0 is the
33
+ * project's spend limit only.
34
+ */
35
+ maxSessionSpendMicros?: string;
36
+ }
37
+ /** The owner's pinned model and the cheap inference-only tool/compaction model. */
38
+ export interface AgentModels {
39
+ /**
40
+ * The exact Sylphx AI catalog id (`ai_models`) of the owner model, pinned
41
+ * for the life of a session; the runtime never remaps it.
42
+ */
43
+ primary?: string;
44
+ /**
45
+ * The exact catalog id of the cheap model used only for owner-briefed
46
+ * `subcall.*` tools and in-loop compaction; never an owner.
47
+ */
48
+ light?: string;
49
+ }
50
+ /**
51
+ * An AgentSession is a durable conversation with one pinned AgentVersion.
52
+ * Its conversation is its SessionEvent log. Each turn runs as one Sylphx
53
+ * Workflows Run, and each model call and tool call is a step keyed by
54
+ * `(session, turn, step)`, assigned by the runtime and never taken from the
55
+ * model's tool-call id. An idle session holds no Run and no compute.
56
+ */
57
+ export interface AgentSession {
58
+ /** `orgs/{org}/projects/{project}/envs/{env}/agent_sessions/{agent_session}`. */
59
+ name?: string;
60
+ /** `ases_<cell><ulid>`; never reused. */
61
+ readonly uid?: string;
62
+ /** Resource metadata. */
63
+ meta?: common.ResourceMeta;
64
+ /** The Agent the session talks to. */
65
+ agent?: string;
66
+ /**
67
+ * The AgentVersion the session pinned; the Agent's current version when
68
+ * unset at create.
69
+ */
70
+ agentVersion?: string;
71
+ /**
72
+ * The Sylphx Auth end user the session belongs to, set from the caller's
73
+ * end-user session; empty for a session a secret key started. An end user
74
+ * reads and changes only their own sessions.
75
+ */
76
+ readonly endUser?: string;
77
+ /** A short title; set by the caller or summarised by the runtime. */
78
+ title?: string;
79
+ /** The session's state. */
80
+ readonly state?: SessionState;
81
+ /** The number of turns started, from 0. */
82
+ readonly turnCount?: string;
83
+ /** The sequence of the newest event, from 0. */
84
+ readonly lastEventSequence?: string;
85
+ /** When the session was created. */
86
+ readonly createTime?: string;
87
+ /** When the last event was appended. */
88
+ readonly updateTime?: string;
89
+ /** What the session has used so far. */
90
+ readonly usage?: SessionUsage;
91
+ /** The Sylphx Sandboxes lease attached to the session, while it has one. */
92
+ readonly environmentLease?: string;
93
+ /**
94
+ * The immutable effective environment for this session. RunAgent resolves it
95
+ * from the pinned AgentVersion's frozen default and selected request overrides.
96
+ * For CreateAgentSession, omission inherits the pinned default; an explicit
97
+ * environment replaces it.
98
+ */
99
+ environment?: EnvironmentSpec;
100
+ /**
101
+ * Session-scoped credential bindings, keyed by the tool or MCP credential
102
+ * name. Values are references or opaque handles, never secret values.
103
+ */
104
+ credentials?: Record<string, CredentialBinding>;
105
+ /**
106
+ * Granted platform Profiles to mount when the session starts, each by
107
+ * resource name and mode. The runtime never puts profile values in events.
108
+ */
109
+ profiles?: ProfileMount[];
110
+ /**
111
+ * The maker sessions this session verifies, as its `:run` named them;
112
+ * empty for any other session.
113
+ */
114
+ readonly verifies?: string[];
115
+ /** When the session was archived; unset while it is not archived. */
116
+ readonly archiveTime?: string;
117
+ /**
118
+ * The pinned organization layer: its sha256 digest, instructions and skill
119
+ * names and descriptions. Skill bodies are never returned.
120
+ */
121
+ readonly organizationContext?: Record<string, unknown>;
122
+ /**
123
+ * The organization layer the caller binds at assignment, read from its own
124
+ * versioned store. Admission pins it for the session's life: its
125
+ * instructions and skill index are injected at every activation, and a
126
+ * skill body is read from the pin only when the agent loads it. Never
127
+ * returned; organization_context shows the pin.
128
+ */
129
+ organizationLayer?: OrganizationLayer;
130
+ }
131
+ /**
132
+ * AgentSpec is the caller-writable definition of an Agent. An AgentVersion
133
+ * holds a frozen copy of it.
134
+ */
135
+ export interface AgentSpec {
136
+ /** The system instructions, at most 256 KiB. */
137
+ instructions?: string;
138
+ /** The tools the agent may call, at most 128, each `name` once. */
139
+ tools?: Tool[];
140
+ /** The MCP servers whose tools the agent may call, at most 32. */
141
+ mcpServers?: McpServer[];
142
+ /** Skills: instruction packs the agent loads when relevant, at most 64. */
143
+ skills?: Skill[];
144
+ /**
145
+ * The memory stores the agent recalls from and writes to, as MemoryStore
146
+ * names; at most 8.
147
+ */
148
+ memoryStores?: string[];
149
+ /** The policy every tool call passes before it runs. */
150
+ toolPolicy?: ToolPolicy;
151
+ /** Spend and time limits per turn and per session. */
152
+ budget?: AgentBudget;
153
+ /**
154
+ * Whether end-user session access is intended for this agent. Reserved
155
+ * until the backend enforces end-user ownership; all contract methods
156
+ * currently require a secret key.
157
+ */
158
+ endUserAccess?: boolean;
159
+ /**
160
+ * Default session environment (shell, files, browser, computer use), frozen
161
+ * in each AgentVersion. RunAgent overlays only its selected environment
162
+ * fields on that pinned default and requires a valid fresh finite lease.
163
+ */
164
+ environment?: EnvironmentSpec;
165
+ /** Exact owner and cheap-tool model ids. Neither is silently substituted. */
166
+ models?: AgentModels;
167
+ /**
168
+ * Read-only: the version holds no write grant, so it may verify another
169
+ * agent's work but never own it. Create and update refuse memory stores,
170
+ * MCP servers, `app_function` and `client` tools, the `memory`, `browser`
171
+ * and `computer` built-ins, and an HTTP tool whose pinned operation is not
172
+ * GET or HEAD unless it is `runtime_only`. The `shell` and `files`
173
+ * built-ins, and a `claude_code` or `codex` harness (which bring their own),
174
+ * need `environment.egress` that denies by default: `DENY`, or `ALLOWLIST`
175
+ * of the configured Sylphx API and inference gateways and the
176
+ * version's GET or HEAD tool hosts, with no CIDRs. Session create, `:send`
177
+ * and `:run` check the version and the session's effective environment
178
+ * again, and refuse any model-facing credential that is not a captured
179
+ * Access key holding only `<service>:read` and `ai:inference` scopes; a
180
+ * renewal's `credential_updates` value for a model-facing binding is held to
181
+ * the same rule. A run's `completion.result_fields` never map into the
182
+ * completion tool's path or query parameters. An OwnerPool never qualifies
183
+ * the version.
184
+ */
185
+ readOnly?: boolean;
186
+ }
187
+ /** AgentStatus is the observed state of an Agent. */
188
+ export interface AgentStatus {
189
+ /** The generation this status was computed from. */
190
+ readonly observedGeneration?: string;
191
+ /** Ready, Reconciling, Stalled. */
192
+ readonly conditions?: common.Condition[];
193
+ /** The newest version, which new sessions pin unless they name another. */
194
+ readonly currentVersion?: string;
195
+ /** The number of the newest version, from 1. */
196
+ readonly currentVersionNumber?: string;
197
+ }
198
+ /**
199
+ * An AgentVersion is one immutable snapshot of an Agent's definition. It is
200
+ * written by the create or update that changed the Agent's spec, and never
201
+ * changed after.
202
+ */
203
+ export interface AgentVersion {
204
+ /** `orgs/{org}/projects/{project}/envs/{env}/agents/{agent}/agent_versions/{agent_version}`. */
205
+ name?: string;
206
+ /** `agv_<cell><ulid>`; never reused. */
207
+ readonly uid?: string;
208
+ /** Resource metadata. */
209
+ meta?: common.ResourceMeta;
210
+ /** The version number within the agent, from 1, with no gaps. */
211
+ readonly versionNumber?: string;
212
+ /** The definition, frozen. */
213
+ readonly spec?: AgentSpec;
214
+ /** The Agent generation that minted it. */
215
+ readonly agentGeneration?: string;
216
+ /** When it was minted. */
217
+ readonly createTime?: string;
218
+ }
219
+ /** An Approval is a tool call the policy sent to a person, and its answer. */
220
+ export interface Approval {
221
+ /** The ToolCall's `id`. */
222
+ readonly callId?: string;
223
+ /** The answer, once given; unset while it waits. */
224
+ readonly decision?: ApprovalDecision;
225
+ /**
226
+ * Whether the answer covers later calls of the same tool in this session
227
+ * ("always allow").
228
+ */
229
+ readonly remember?: boolean;
230
+ /** Who answered. */
231
+ readonly principal?: string;
232
+ /** The reason given, if any. */
233
+ readonly reason?: string;
234
+ }
235
+ /** The request of ArchiveAgentSession. */
236
+ export interface ArchiveAgentSessionRequest {
237
+ /** The name of the session to archive. */
238
+ name: string;
239
+ }
240
+ /** A BuiltinTool is a tool the platform provides. */
241
+ export interface BuiltinTool {
242
+ /** The built-in tool's id. */
243
+ id?: string;
244
+ /** Tool-specific settings, at most 16 KiB of JSON. */
245
+ config?: Record<string, unknown>;
246
+ }
247
+ /** Caller-owned grant capture; only opaque metadata is returned. */
248
+ export interface CaptureCredentialRequest {
249
+ /** The environment in which the caller holds the existing grant. */
250
+ parent: string;
251
+ /** The prospective or existing session to bind this handle to. */
252
+ session: string;
253
+ /** The turn allowed to use the execution credential. */
254
+ turn: string;
255
+ /** The existing caller-owned credential, stored encrypted and never logged. */
256
+ credential: string;
257
+ /** The issuer-provided expiry of the captured credential. */
258
+ expiresAt: string;
259
+ /** Pinned tool names allowed to inject this credential. */
260
+ allowedTools: string[];
261
+ /** execution, completion, or runtime; runtime handles never enter the guest. */
262
+ purpose: string;
263
+ }
264
+ /** A tool description embedded in a session catalog, not a named resource. */
265
+ export interface CatalogTool {
266
+ /** The tool name in the pinned agent version. */
267
+ name?: string;
268
+ /** The tool description presented to the agent harness. */
269
+ description?: string;
270
+ /** The JSON Schema of the tool's validated input. */
271
+ inputSchema?: Record<string, unknown>;
272
+ }
273
+ /**
274
+ * A ClientTool is a tool the client runs: the session waits for its result
275
+ * in state `AWAITING_CLIENT`.
276
+ */
277
+ export interface ClientTool {
278
+ /**
279
+ * How long the session waits for the result before the call fails, 1s to
280
+ * 24h; default 10m.
281
+ */
282
+ timeout?: string;
283
+ }
284
+ /** Completion uses a tool in the pinned version, never a caller-supplied URL. */
285
+ export interface CompletionCall {
286
+ /** The authorized tool name in the pinned agent version. */
287
+ tool?: string;
288
+ /** Immutable literal tool input, excluding credentials and mapped result fields. */
289
+ arguments?: Record<string, unknown>;
290
+ /** Destination argument names mapped to runtime-produced result selectors. */
291
+ resultFields?: Record<string, ResultField>;
292
+ }
293
+ /** A ContentPart is one piece of a message. */
294
+ export interface ContentPart {
295
+ /** Text. */
296
+ text?: string;
297
+ /** A file, by Sylphx Data object URL or an https URL. */
298
+ file?: FileRef;
299
+ }
300
+ /** The request of CreateAgent. */
301
+ export interface CreateAgentRequest {
302
+ /** The parent to create in. */
303
+ parent: string;
304
+ /**
305
+ * The agent id, the final name segment; the server assigns one when
306
+ * empty.
307
+ */
308
+ agentId?: string;
309
+ /** The agent to create; only caller-writable fields are read. */
310
+ agent: Agent;
311
+ /** Validate and return the result without writing anything. */
312
+ validateOnly?: boolean;
313
+ }
314
+ /** The request of CreateAgentSession. */
315
+ export interface CreateAgentSessionRequest {
316
+ /** The parent to create in. */
317
+ parent: string;
318
+ /**
319
+ * The session id, the final name segment; the server assigns one when
320
+ * empty.
321
+ */
322
+ agentSessionId?: string;
323
+ /** The session to create; only caller-writable fields are read. */
324
+ agentSession: AgentSession;
325
+ /** Validate and return the result without writing anything. */
326
+ validateOnly?: boolean;
327
+ }
328
+ /** The request of CreateMemory. */
329
+ export interface CreateMemoryRequest {
330
+ /** The memory store to create in. */
331
+ parent: string;
332
+ /**
333
+ * The memory id, the final name segment; the server assigns one when
334
+ * empty.
335
+ */
336
+ memoryId?: string;
337
+ /** The memory to create; only caller-writable fields are read. */
338
+ memory: Memory;
339
+ /** Validate and return the result without writing anything. */
340
+ validateOnly?: boolean;
341
+ }
342
+ /** The request of CreateMemoryStore. */
343
+ export interface CreateMemoryStoreRequest {
344
+ /** The parent to create in. */
345
+ parent: string;
346
+ /**
347
+ * The memory store id, the final name segment; the server assigns one when
348
+ * empty.
349
+ */
350
+ memoryStoreId?: string;
351
+ /** The memory store to create; only caller-writable fields are read. */
352
+ memoryStore: MemoryStore;
353
+ /** Validate and return the result without writing anything. */
354
+ validateOnly?: boolean;
355
+ }
356
+ /** The request of CreateOwnerPool. */
357
+ export interface CreateOwnerPoolRequest {
358
+ /** The parent to create in. */
359
+ parent: string;
360
+ /** The owner pool id, the final name segment. */
361
+ ownerPoolId: string;
362
+ /** The owner pool to create; only caller-writable fields are read. */
363
+ ownerPool: OwnerPool;
364
+ }
365
+ /**
366
+ * A CredentialBinding names where the gateway takes a credential from. The
367
+ * value is resolved at egress only; the model, the event log and traces see
368
+ * the binding, never the value.
369
+ */
370
+ export interface CredentialBinding {
371
+ /** A Kernel Secret of this environment, by name. */
372
+ secret?: string;
373
+ /** A Kernel Connection (a third-party OAuth installation), by name. */
374
+ connection?: string;
375
+ /**
376
+ * The end user's own grant in Sylphx Auth's agent token vault, by
377
+ * provider id; the session's end user must hold it.
378
+ */
379
+ endUserProvider?: string;
380
+ /**
381
+ * How the value is sent: `bearer` (default), `header:<Name>` or
382
+ * `query:<name>`.
383
+ */
384
+ placement?: string;
385
+ /**
386
+ * An opaque credential handle issued for this session, resolved only at
387
+ * egress. This is never a credential value.
388
+ */
389
+ handle?: string;
390
+ }
391
+ /** An opaque session-bound reference to a captured grant, not a CRUD resource. */
392
+ export interface CredentialHandle {
393
+ /** The opaque handle; it never reveals the captured credential. */
394
+ readonly handle?: string;
395
+ /** The current fencing generation of the captured handle. */
396
+ readonly generation?: string;
397
+ /** The issuer-provided expiry of the captured credential. */
398
+ readonly expiresAt?: string;
399
+ }
400
+ /** The request of DecideAgentSessionApproval. */
401
+ export interface DecideAgentSessionApprovalRequest {
402
+ /** The name of the session. */
403
+ name: string;
404
+ /** The waiting ToolCall's `id`. */
405
+ callId: string;
406
+ /** The answer. */
407
+ decision: ApprovalDecision;
408
+ /**
409
+ * Also allow later calls of the same tool in this session without asking
410
+ * ("always allow"); only with APPROVE.
411
+ */
412
+ remember?: boolean;
413
+ /** Why, at most 500 characters; the agent reads it with a rejection. */
414
+ reason?: string;
415
+ }
416
+ /** The request of DeleteAgent. */
417
+ export interface DeleteAgentRequest {
418
+ /** The name of the agent to delete. */
419
+ name: string;
420
+ /** Delete only if the current etag matches. */
421
+ etag?: string;
422
+ /** Succeed when the agent does not exist. */
423
+ allowMissing?: boolean;
424
+ /** Validate without deleting anything. */
425
+ validateOnly?: boolean;
426
+ /**
427
+ * Also delete the agent's sessions; without it, an agent with sessions
428
+ * is refused with `INVALID_STATE`.
429
+ */
430
+ force?: boolean;
431
+ }
432
+ /** The request of DeleteAgentSession. */
433
+ export interface DeleteAgentSessionRequest {
434
+ /** The name of the session to delete. */
435
+ name: string;
436
+ /** Delete only if the current etag matches. */
437
+ etag?: string;
438
+ /** Succeed when the session does not exist. */
439
+ allowMissing?: boolean;
440
+ /** Validate without deleting anything. */
441
+ validateOnly?: boolean;
442
+ /**
443
+ * Interrupt a running turn and delete; without it, a running session is
444
+ * refused with `INVALID_STATE`.
445
+ */
446
+ force?: boolean;
447
+ }
448
+ /** The request of DeleteMemory. */
449
+ export interface DeleteMemoryRequest {
450
+ /** The name of the memory to delete. */
451
+ name: string;
452
+ /** Delete only if the current etag matches. */
453
+ etag?: string;
454
+ /** Succeed when the memory does not exist. */
455
+ allowMissing?: boolean;
456
+ /** Validate without deleting anything. */
457
+ validateOnly?: boolean;
458
+ }
459
+ /** The request of DeleteMemoryStore. */
460
+ export interface DeleteMemoryStoreRequest {
461
+ /** The name of the memory store to delete. */
462
+ name: string;
463
+ /** Delete only if the current etag matches. */
464
+ etag?: string;
465
+ /** Succeed when the memory store does not exist. */
466
+ allowMissing?: boolean;
467
+ /** Validate without deleting anything. */
468
+ validateOnly?: boolean;
469
+ /**
470
+ * Also delete the store's memories; without it, a store with memories is
471
+ * refused with `INVALID_STATE`.
472
+ */
473
+ force?: boolean;
474
+ }
475
+ /** The request of DeleteOwnerPool. */
476
+ export interface DeleteOwnerPoolRequest {
477
+ /** The name of the owner pool to delete. */
478
+ name: string;
479
+ }
480
+ /**
481
+ * EnvironmentSpec describes a session's Sandboxes environment. The pinned
482
+ * AgentVersion may provide a default. RunAgent overlays selected fields using
483
+ * RunAgentRequest.environment_mask; an explicit environment on
484
+ * CreateAgentSession replaces the default instead.
485
+ */
486
+ export interface EnvironmentSpec {
487
+ /** A Sylphx Sandboxes shape; empty gives sessions no environment. */
488
+ shape?: string;
489
+ /**
490
+ * Put the environment in standby after this long idle, 1m to 24h; default
491
+ * 10m.
492
+ */
493
+ idleStandby?: string;
494
+ /**
495
+ * The Sandboxes image: `template:<name>` or an artifact image by digest,
496
+ * passed unchanged to the lease's `image` field.
497
+ */
498
+ template?: string;
499
+ /** The repository to prepare inside the fresh lease, if any. */
500
+ repo?: RepositorySpec;
501
+ /** The lease's outbound policy, using the Sandboxes network contract. */
502
+ egress?: sandboxes.LeaseNetwork;
503
+ /** The lease's CPU and cost ceiling, separate from model and tool spend. */
504
+ budget?: sandboxes.LeaseBudget;
505
+ /**
506
+ * The lease's maximum wall time, passed to Sandboxes as `ttl`. The lease
507
+ * is released when the session ends even if this bound has not been reached.
508
+ */
509
+ ttl?: string;
510
+ }
511
+ /** ErrorEvent is a step or harness failure, without credential values. */
512
+ export interface ErrorEvent {
513
+ /** The registry error code or harness error kind. */
514
+ readonly kind?: string;
515
+ /** A safe error description. */
516
+ readonly message?: string;
517
+ }
518
+ /** FileChange is a file changed by a step's harness. */
519
+ export interface FileChange {
520
+ /** The path relative to the session's repository root. */
521
+ readonly path?: string;
522
+ /** `added`, `modified`, `deleted`, `renamed` or `copied`. */
523
+ readonly change?: string;
524
+ /** Lines added, when reported by the harness. */
525
+ readonly added?: string;
526
+ /** Lines removed, when reported by the harness. */
527
+ readonly removed?: string;
528
+ /** The previous path, for a rename or copy. */
529
+ readonly oldPath?: string;
530
+ /** `edit` for an incremental edit or `final` for the turn's final diff. */
531
+ readonly source?: string;
532
+ }
533
+ /** A FileRef names a file attached to a message. */
534
+ export interface FileRef {
535
+ /** Where the file is. */
536
+ uri?: string;
537
+ /** Its media type, for example `image/png`. */
538
+ mediaType?: string;
539
+ /** Its display name. */
540
+ filename?: string;
541
+ }
542
+ /** A FunctionTool is a tool whose logic is the app's own server code. */
543
+ export interface FunctionTool {
544
+ /**
545
+ * The HTTPS endpoint the gateway calls, a Hosting route or a verified
546
+ * Network Domain of this project.
547
+ */
548
+ uri?: string;
549
+ /** One call's deadline, 1s to 15m; default 60s. */
550
+ timeout?: string;
551
+ }
552
+ /** The request of GetAgent. */
553
+ export interface GetAgentRequest {
554
+ /** The name of the agent to get. */
555
+ name: string;
556
+ }
557
+ /** The request of GetAgentSession. */
558
+ export interface GetAgentSessionRequest {
559
+ /** The name of the session to get. */
560
+ name: string;
561
+ }
562
+ /** The request of GetAgentVersion. */
563
+ export interface GetAgentVersionRequest {
564
+ /** The name of the agent version to get. */
565
+ name: string;
566
+ }
567
+ /** The request of GetMemory. */
568
+ export interface GetMemoryRequest {
569
+ /** The name of the memory to get. */
570
+ name: string;
571
+ }
572
+ /** The request of GetMemoryStore. */
573
+ export interface GetMemoryStoreRequest {
574
+ /** The name of the memory store to get. */
575
+ name: string;
576
+ }
577
+ /** The request of GetOwnerPool. */
578
+ export interface GetOwnerPoolRequest {
579
+ /** The name of the owner pool to get. */
580
+ name: string;
581
+ }
582
+ /** The request of GetSessionEvent. */
583
+ export interface GetSessionEventRequest {
584
+ /** The name of the session event to get. */
585
+ name: string;
586
+ }
587
+ /** An HttpTool is an HTTP API the gateway calls on the agent's behalf. */
588
+ export interface HttpTool {
589
+ /** An HTTPS URL of an OpenAPI 3 document. */
590
+ openapiUri?: string;
591
+ /** An OpenAPI 3 document, at most 1 MiB of JSON. */
592
+ openapi?: Record<string, unknown>;
593
+ /**
594
+ * The operation the tool calls; empty exposes every operation as its own
595
+ * tool named `<tool>_<operationId>`.
596
+ */
597
+ operationId?: string;
598
+ /** The credential the gateway injects at egress; the model never sees it. */
599
+ credential?: CredentialBinding;
600
+ }
601
+ /** The request of InterruptAgentSession. */
602
+ export interface InterruptAgentSessionRequest {
603
+ /** The name of the session. */
604
+ name: string;
605
+ /** Why, recorded on the status event; at most 500 characters. */
606
+ reason?: string;
607
+ }
608
+ /** The request to execute one pinned tool through the session gateway. */
609
+ export interface InvokeToolRequest {
610
+ /** The name of the session whose pinned tools are used. */
611
+ name: string;
612
+ /** The live turn whose execution capability authorizes the call. */
613
+ turn: string;
614
+ /** The tool name in the session's pinned agent version. */
615
+ tool: string;
616
+ /** The tool input, validated against its pinned input schema. */
617
+ arguments: Record<string, unknown>;
618
+ /** The stable operation identifier, reused for idempotent tool-call retries. */
619
+ opId: string;
620
+ }
621
+ /** The request of ListAgentSessions. */
622
+ export interface ListAgentSessionsRequest {
623
+ /** The parent to list in. */
624
+ parent: string;
625
+ /** At most this many; default 50, clamped to 1000. */
626
+ pageSize?: number;
627
+ /** `next_page_token` of the previous page. */
628
+ pageToken?: string;
629
+ /** AIP-160 filter, limited to `agent`, `end_user` and `state`. */
630
+ filter?: string;
631
+ }
632
+ /** The response of ListAgentSessions. */
633
+ export interface ListAgentSessionsResponse {
634
+ /** The page. */
635
+ agentSessions?: AgentSession[];
636
+ /** The token of the next page; empty on the last page. */
637
+ nextPageToken?: string;
638
+ }
639
+ /** The request of ListAgentVersions. */
640
+ export interface ListAgentVersionsRequest {
641
+ /** The agent to list in. */
642
+ parent: string;
643
+ /** At most this many; default 50, clamped to 1000. */
644
+ pageSize?: number;
645
+ /** `next_page_token` of the previous page. */
646
+ pageToken?: string;
647
+ /** AIP-160 filter, limited to `version_number`. */
648
+ filter?: string;
649
+ }
650
+ /** The response of ListAgentVersions. */
651
+ export interface ListAgentVersionsResponse {
652
+ /** The page. */
653
+ agentVersions?: AgentVersion[];
654
+ /** The token of the next page; empty on the last page. */
655
+ nextPageToken?: string;
656
+ }
657
+ /** The request of ListAgents. */
658
+ export interface ListAgentsRequest {
659
+ /** The parent to list in. */
660
+ parent: string;
661
+ /** At most this many; default 50, clamped to 1000. */
662
+ pageSize?: number;
663
+ /** `next_page_token` of the previous page. */
664
+ pageToken?: string;
665
+ /** AIP-160 filter over labels and filterable fields. */
666
+ filter?: string;
667
+ /** AIP-132 ordering over filterable fields. */
668
+ orderBy?: string;
669
+ }
670
+ /** The response of ListAgents. */
671
+ export interface ListAgentsResponse {
672
+ /** The page. */
673
+ agents?: Agent[];
674
+ /** The token of the next page; empty on the last page. */
675
+ nextPageToken?: string;
676
+ }
677
+ /** The request of ListMemories. */
678
+ export interface ListMemoriesRequest {
679
+ /** The memory store to list in. */
680
+ parent: string;
681
+ /** At most this many; default 50, clamped to 1000. */
682
+ pageSize?: number;
683
+ /** `next_page_token` of the previous page. */
684
+ pageToken?: string;
685
+ /** AIP-160 filter, limited to `end_user` and `agent`. */
686
+ filter?: string;
687
+ }
688
+ /** The response of ListMemories. */
689
+ export interface ListMemoriesResponse {
690
+ /** The page. */
691
+ memories?: Memory[];
692
+ /** The token of the next page; empty on the last page. */
693
+ nextPageToken?: string;
694
+ }
695
+ /** The request of ListMemoryStores. */
696
+ export interface ListMemoryStoresRequest {
697
+ /** The parent to list in. */
698
+ parent: string;
699
+ /** At most this many; default 50, clamped to 1000. */
700
+ pageSize?: number;
701
+ /** `next_page_token` of the previous page. */
702
+ pageToken?: string;
703
+ /** AIP-160 filter over labels and filterable fields. */
704
+ filter?: string;
705
+ /** AIP-132 ordering over filterable fields. */
706
+ orderBy?: string;
707
+ }
708
+ /** The response of ListMemoryStores. */
709
+ export interface ListMemoryStoresResponse {
710
+ /** The page. */
711
+ memoryStores?: MemoryStore[];
712
+ /** The token of the next page; empty on the last page. */
713
+ nextPageToken?: string;
714
+ }
715
+ /** The request of ListOwnerPools. */
716
+ export interface ListOwnerPoolsRequest {
717
+ /** The parent to list in. */
718
+ parent: string;
719
+ /** At most this many; default 50, clamped to 1000. */
720
+ pageSize?: number;
721
+ /** `next_page_token` of the previous page. */
722
+ pageToken?: string;
723
+ }
724
+ /** The response of ListOwnerPools. */
725
+ export interface ListOwnerPoolsResponse {
726
+ /** The page. */
727
+ ownerPools?: OwnerPool[];
728
+ /** The token of the next page; empty on the last page. */
729
+ nextPageToken?: string;
730
+ }
731
+ /** The request of ListSessionEvents. */
732
+ export interface ListSessionEventsRequest {
733
+ /** The session to list in. */
734
+ parent: string;
735
+ /** At most this many; default 50, clamped to 1000. */
736
+ pageSize?: number;
737
+ /** `next_page_token` of the previous page. */
738
+ pageToken?: string;
739
+ /**
740
+ * AIP-160 filter, limited to `type` and `sequence`; for example
741
+ * `sequence > 42`.
742
+ */
743
+ filter?: string;
744
+ /**
745
+ * When no event matches the filter, wait up to this long for one, at most
746
+ * 60s; unset answers at once.
747
+ */
748
+ wait?: string;
749
+ }
750
+ /** The response of ListSessionEvents. */
751
+ export interface ListSessionEventsResponse {
752
+ /** The page. */
753
+ sessionEvents?: SessionEvent[];
754
+ /** The token of the next page; empty on the last page. */
755
+ nextPageToken?: string;
756
+ }
757
+ /** An McpServer is a remote MCP server whose tools the agent may call. */
758
+ export interface McpServer {
759
+ /** The label its tools are prefixed with, unique within the agent. */
760
+ label?: string;
761
+ /** The server's Streamable HTTP endpoint. */
762
+ uri?: string;
763
+ /** Only these of its tools; empty allows every tool it lists. */
764
+ allowedTools?: string[];
765
+ /** The credential the gateway presents to the server. */
766
+ credential?: CredentialBinding;
767
+ }
768
+ /** A Memory is one long-term memory record: a fact with its provenance. */
769
+ export interface Memory {
770
+ /** `orgs/{org}/projects/{project}/envs/{env}/memory_stores/{memory_store}/memories/{memory}`. */
771
+ name?: string;
772
+ /** `mem_<cell><ulid>`; never reused. */
773
+ readonly uid?: string;
774
+ /** Resource metadata. */
775
+ meta?: common.ResourceMeta;
776
+ /** The memory, at most 16 KiB of text. */
777
+ content?: string;
778
+ /** The end user it is about, for a store scoped to end users. */
779
+ endUser?: string;
780
+ /** The agent it belongs to, for a store scoped to agents. */
781
+ agent?: string;
782
+ /** Where it came from. */
783
+ readonly provenance?: MemoryProvenance;
784
+ /** When it was written. */
785
+ readonly createTime?: string;
786
+ /** When it was last changed. */
787
+ readonly updateTime?: string;
788
+ }
789
+ /** A MemoryMatch is one recalled memory and how well it matched. */
790
+ export interface MemoryMatch {
791
+ /** The memory. */
792
+ memory?: Memory;
793
+ /** The relevance, 0 to 1. */
794
+ score?: number;
795
+ }
796
+ /** MemoryProvenance records where a memory came from. */
797
+ export interface MemoryProvenance {
798
+ /** Who wrote it. */
799
+ readonly source?: MemorySource;
800
+ /** The session it was learned in, when an agent wrote it. */
801
+ readonly session?: string;
802
+ /** The event it was learned from, when an agent wrote it. */
803
+ readonly event?: string;
804
+ /** The principal that wrote it, when a caller did. */
805
+ readonly principal?: string;
806
+ }
807
+ /**
808
+ * A MemoryStore holds long-term memory records with provenance, recalled by
809
+ * hybrid full-text and vector search. The records are Sylphx Knowledge
810
+ * episodes in the store's Knowledge spaces, read and written as the caller.
811
+ * Agents name the stores they use; a store may be shared by many agents.
812
+ */
813
+ export interface MemoryStore {
814
+ /** `orgs/{org}/projects/{project}/envs/{env}/memory_stores/{memory_store}`. */
815
+ name?: string;
816
+ /** `mst_<cell><ulid>`; never reused. */
817
+ readonly uid?: string;
818
+ /** Resource metadata. */
819
+ meta?: common.ResourceMeta;
820
+ /** Desired state. */
821
+ spec?: MemoryStoreSpec;
822
+ /** Observed state. */
823
+ readonly status?: MemoryStoreStatus;
824
+ }
825
+ /** MemoryStoreSpec is the caller-writable state of a MemoryStore. */
826
+ export interface MemoryStoreSpec {
827
+ /** What the store is for, shown to agents; at most 1024 characters. */
828
+ description?: string;
829
+ /** Whose memories are kept apart. */
830
+ scope?: MemoryScope;
831
+ /**
832
+ * Memories older than this since their last update are deleted, 1d to
833
+ * 3650d; unset keeps them until deleted. Not accepted yet: memories are
834
+ * Knowledge episodes and Knowledge has no time-based deletion, so a set
835
+ * value is refused with `INVALID_FIELD`.
836
+ */
837
+ retention?: string;
838
+ /**
839
+ * Whether agents write memories themselves after each turn; otherwise
840
+ * only callers write them. Not accepted yet: the turn runtime has no
841
+ * after-turn memory hook, so `true` is refused with `INVALID_FIELD`.
842
+ */
843
+ agentWrites?: boolean;
844
+ }
845
+ /** MemoryStoreStatus is the observed state of a MemoryStore. */
846
+ export interface MemoryStoreStatus {
847
+ /** The generation this status was computed from. */
848
+ readonly observedGeneration?: string;
849
+ /** Ready, Reconciling, Stalled. */
850
+ readonly conditions?: common.Condition[];
851
+ /** The number of memories. */
852
+ readonly memoryCount?: string;
853
+ /** Bytes of the memories' current content. Knowledge meters their storage. */
854
+ readonly storedBytes?: string;
855
+ }
856
+ /** A Message is text and files from a user or the agent. */
857
+ export interface Message {
858
+ /** The content, in order; 1 to 64 parts. */
859
+ parts?: ContentPart[];
860
+ }
861
+ /** The request of ObserveOwnerPoolMember. */
862
+ export interface ObserveOwnerPoolMemberRequest {
863
+ /** The owner pool. */
864
+ name: string;
865
+ /** The member version. */
866
+ agentVersion: string;
867
+ /**
868
+ * The observed value per metric over the caller's window, lower is better;
869
+ * 1 to 64. A demotion rule's metric is never negative.
870
+ */
871
+ metrics: Record<string, number>;
872
+ /** The number of outcomes the values summarize. */
873
+ samples: string;
874
+ }
875
+ /**
876
+ * The organization layer of an agent's context: always-on instructions and a
877
+ * skill index whose bodies load only on use (Agent Skills progressive
878
+ * disclosure). Its versioned store and authoring belong to the caller (such
879
+ * as a work layer); the engine keeps only the immutable pin a session
880
+ * was admitted with. Per-kind roles add their own instructions and skills
881
+ * above this layer; the Agent version's instructions remain additive.
882
+ */
883
+ export interface OrganizationLayer {
884
+ /** Always loaded organization instructions, at most 256 KiB. */
885
+ instructions?: string;
886
+ /** Up to 256 skills with unique names; the layer is at most 1 MiB in total. */
887
+ skills?: OrganizationSkill[];
888
+ }
889
+ /** A discoverable organization instruction pack. */
890
+ export interface OrganizationSkill {
891
+ /** The model-facing name, [a-z0-9][a-z0-9_-]{0,62}. */
892
+ name?: string;
893
+ /** Discovery description, nonempty and at most 4 KiB. */
894
+ description?: string;
895
+ /** Instructions loaded by organization.skill.get, nonempty and at most 256 KiB. */
896
+ body?: string;
897
+ }
898
+ /**
899
+ * An OwnerPool is the set of Agent versions qualified to own work. A version
900
+ * joins only by passing the pool's admission suite (`:qualify`) and leaves
901
+ * automatically when a live metric regresses past a demotion rule
902
+ * (`:observe`). `:run` with `owner_pool` admits only a qualified member. The
903
+ * suite, the metrics and their thresholds are the caller's own; the pool
904
+ * stores no method of its own.
905
+ */
906
+ export interface OwnerPool {
907
+ /** `orgs/{org}/projects/{project}/envs/{env}/owner_pools/{owner_pool}`. */
908
+ name?: string;
909
+ /** `aop_<cell><ulid>`; never reused. */
910
+ readonly uid?: string;
911
+ /** Resource metadata. */
912
+ meta?: common.ResourceMeta;
913
+ /** Desired state. */
914
+ spec?: OwnerPoolSpec;
915
+ /** Observed state: the members. */
916
+ readonly status?: OwnerPoolStatus;
917
+ }
918
+ /** OwnerPoolAdmission is a fixed benchmark suite with minimum scores. */
919
+ export interface OwnerPoolAdmission {
920
+ /** The suite's id, matched exactly by `:qualify`; at most 200 characters. */
921
+ suite?: string;
922
+ /**
923
+ * Minimum score per suite metric, higher is better; 1 to 64 metrics. A
924
+ * member qualifies only when every metric is reported at or above its
925
+ * minimum.
926
+ */
927
+ minScores?: Record<string, number>;
928
+ /**
929
+ * The suite's version, matched exactly by `:qualify`; at most 200
930
+ * characters.
931
+ */
932
+ suiteVersion?: string;
933
+ }
934
+ /**
935
+ * OwnerPoolDemotionRule demotes a member whose live metric, lower is better
936
+ * and never negative, regresses past its baseline. The platform computes the
937
+ * baseline; no caller sets it.
938
+ */
939
+ export interface OwnerPoolDemotionRule {
940
+ /** The live metric's name, as `:observe` reports it. */
941
+ metric?: string;
942
+ /**
943
+ * The tolerated regression as a fraction of the baseline: a member is
944
+ * demoted when the observed value exceeds `baseline * (1 + max_regression)`.
945
+ */
946
+ maxRegression?: number;
947
+ /**
948
+ * Observations over fewer samples than this are recorded but never count
949
+ * toward the baseline or demote; default 1.
950
+ */
951
+ minSamples?: string;
952
+ /**
953
+ * The baseline is the median of the member's first this many counted
954
+ * observations of the metric, set once it is finite and positive (while
955
+ * the median is zero the window moves on). 1 to 100; default 5.
956
+ */
957
+ baselineObservations?: string;
958
+ }
959
+ /** An OwnerPoolMember is one Agent version's standing in a pool. */
960
+ export interface OwnerPoolMember {
961
+ /** The member version. */
962
+ readonly agentVersion?: string;
963
+ /** The model the version pins. */
964
+ readonly model?: string;
965
+ /** Qualified, refused or demoted. */
966
+ readonly state?: OwnerPoolMemberState;
967
+ /** The suite of the latest `:qualify`. */
968
+ readonly suite?: string;
969
+ /** The scores of the latest `:qualify`. */
970
+ readonly scores?: Record<string, number>;
971
+ /**
972
+ * The baseline per demotion metric, computed by the platform from counted
973
+ * observations; a re-qualify keeps it.
974
+ */
975
+ readonly baseline?: Record<string, number>;
976
+ /** The latest observation per metric. */
977
+ readonly observed?: Record<string, number>;
978
+ /** When it last qualified. */
979
+ readonly qualifyTime?: string;
980
+ /** When it was last demoted. */
981
+ readonly demoteTime?: string;
982
+ /** Why it was refused or demoted. */
983
+ readonly reason?: string;
984
+ /** When the state last changed. */
985
+ readonly updateTime?: string;
986
+ /** The suite version of the latest `:qualify`. */
987
+ readonly suiteVersion?: string;
988
+ /** The suite result of the latest `:qualify`. */
989
+ readonly result?: string;
990
+ /** The principal that recorded the latest `:qualify`. */
991
+ readonly qualifier?: string;
992
+ }
993
+ /** OwnerPoolSpec is the caller-writable state of an OwnerPool. */
994
+ export interface OwnerPoolSpec {
995
+ /** The admission test every member passes. */
996
+ admission?: OwnerPoolAdmission;
997
+ /** Live-metric rules that demote a member; at most 16, each metric once. */
998
+ demotion?: OwnerPoolDemotionRule[];
999
+ }
1000
+ /** OwnerPoolStatus is the observed state of an OwnerPool. */
1001
+ export interface OwnerPoolStatus {
1002
+ /** The generation this status was computed from. */
1003
+ readonly observedGeneration?: string;
1004
+ /** Ready. */
1005
+ readonly conditions?: common.Condition[];
1006
+ /** Every version ever submitted to `:qualify`, most recently changed first. */
1007
+ readonly members?: OwnerPoolMember[];
1008
+ }
1009
+ /** ProfileMount attaches a platform Profile by name, never its sign-in values. */
1010
+ export interface ProfileMount {
1011
+ /** `orgs/{org}/projects/{project}/envs/{env}/profiles/{profile}`. */
1012
+ name?: string;
1013
+ /**
1014
+ * `read_only` (default) or `write_back`. Only a write_back grant saves
1015
+ * changes at session end while its lease still answers; empty is read_only.
1016
+ */
1017
+ mode?: string;
1018
+ }
1019
+ /** The request of QualifyOwnerPoolMember. */
1020
+ export interface QualifyOwnerPoolMemberRequest {
1021
+ /** The owner pool. */
1022
+ name: string;
1023
+ /** The Agent version that ran the suite, in the pool's environment. */
1024
+ agentVersion: string;
1025
+ /** The suite that ran; must equal the pool's `admission.suite`. */
1026
+ suite: string;
1027
+ /** The score per suite metric; at most 64. */
1028
+ scores: Record<string, number>;
1029
+ /**
1030
+ * The suite version that ran; must equal the pool's
1031
+ * `admission.suite_version`.
1032
+ */
1033
+ suiteVersion: string;
1034
+ /**
1035
+ * The grader's id of this suite run, for example its evidence record; 1 to
1036
+ * 200 characters. Each result is recorded once per member.
1037
+ */
1038
+ result: string;
1039
+ }
1040
+ /** A pinned tool called periodically while the accepted task owns its grant. */
1041
+ export interface RenewalCall {
1042
+ /** The authorized renewal tool name in the pinned agent version. */
1043
+ tool?: string;
1044
+ /** Immutable literal renewal-tool input, with credential injection by the gateway. */
1045
+ arguments?: Record<string, unknown>;
1046
+ /** Positive interval, from five seconds to five minutes. */
1047
+ interval?: string;
1048
+ /** JSON pointers into the tool response; no domain-specific field names. */
1049
+ cancelField?: string;
1050
+ /** A response JSON pointer selecting the cancellation reason. */
1051
+ reasonField?: string;
1052
+ /** Credential binding alias to a response JSON pointer for its replacement. */
1053
+ credentialUpdates?: Record<string, string>;
1054
+ /** Matching aliases to issuer-returned RFC3339 expiry response pointers. */
1055
+ credentialExpiries?: Record<string, string>;
1056
+ /**
1057
+ * Top-level argument receiving a stable per-tick runtime idempotency key.
1058
+ * Omit this argument from literal input; retries reuse it, later ticks change it.
1059
+ */
1060
+ idempotencyArgument?: string;
1061
+ }
1062
+ /** RepositorySpec identifies the source to prepare in a session's lease. */
1063
+ export interface RepositorySpec {
1064
+ /** The repository URI. Access uses the session's bound credential handles. */
1065
+ uri?: string;
1066
+ /** The commit or ref to check out; empty uses the repository's default branch. */
1067
+ revision?: string;
1068
+ }
1069
+ /** The request to revoke a captured credential handle. */
1070
+ export interface RevokeCredentialRequest {
1071
+ /** The environment that owns the captured handle. */
1072
+ parent: string;
1073
+ /** The opaque handle to revoke; repeated revocation is harmless. */
1074
+ handle: string;
1075
+ }
1076
+ /** The request to rotate a captured credential without changing its handle. */
1077
+ export interface RotateCredentialRequest {
1078
+ /** The environment that owns the captured handle. */
1079
+ parent: string;
1080
+ /** The opaque handle whose captured credential is being replaced. */
1081
+ handle: string;
1082
+ /** The current handle generation; stale rotations are refused. */
1083
+ generation: string;
1084
+ /** The replacement issuer-provided credential, stored encrypted. */
1085
+ credential: string;
1086
+ /** The issuer-provided expiry of the replacement credential. */
1087
+ expiresAt: string;
1088
+ }
1089
+ /** Immutable task-attempt input; the caller pins its own task/profile context. */
1090
+ export interface RunAgentRequest {
1091
+ /** The name of the agent to run under the caller's environment grant. */
1092
+ name: string;
1093
+ /** The immutable agent version pinned for this task attempt. */
1094
+ agentVersion: string;
1095
+ /** The stable session identifier; reusing it for another attempt is refused. */
1096
+ agentSessionId: string;
1097
+ /** The initial task message appended atomically with session acceptance. */
1098
+ message: Message;
1099
+ /**
1100
+ * Optional overrides of the environment in the pinned AgentVersion's frozen
1101
+ * spec, never the Agent's current head. Omitted or empty with no mask keeps
1102
+ * that default unchanged. Only selected fields are overlaid; see
1103
+ * environment_mask. The effective environment must have a supported shape,
1104
+ * finite positive TTL and valid repository, network and budget before admission.
1105
+ */
1106
+ environment?: EnvironmentSpec;
1107
+ /** Captured credential bindings by alias; credentials never enter context. */
1108
+ credentials?: Record<string, CredentialBinding>;
1109
+ /** Granted profile mounts for the fresh session lease. */
1110
+ profiles?: ProfileMount[];
1111
+ /** The pinned tool call used by the runtime to deliver the terminal result. */
1112
+ completion: CompletionCall;
1113
+ /** Opaque, claim-pinned workspace knowledge, including its rendered instruction. */
1114
+ workspaceKnowledge?: Record<string, unknown>;
1115
+ /** Caller-owned opaque reference, not interpreted by Agents. */
1116
+ taskRef?: string;
1117
+ /** Optional pinned grant-renewal call, owned by the runtime after acceptance. */
1118
+ renewal?: RenewalCall;
1119
+ /**
1120
+ * Same-session handle to a caller-owned scoped Access credential. Runtime only,
1121
+ * never installed in the guest or sent to the model.
1122
+ */
1123
+ runtimeCredentialHandle: string;
1124
+ /**
1125
+ * Fields of environment to overlay, relative to EnvironmentSpec, using proto
1126
+ * snake_case paths such as ttl, repo.uri, repo.revision,
1127
+ * egress.allowed_domains and budget.max_cost_micros. The wire value is a
1128
+ * comma-separated string; SDK property naming does not change these paths.
1129
+ * Omitted or empty infers populated serialized leaf fields recursively,
1130
+ * preserving unselected siblings from the pinned version. Proto defaults
1131
+ * (including empty lists) need an explicit mask to reset a selected field.
1132
+ * Selected lists replace, rather than append to, the inherited list.
1133
+ * The sole path "*" replaces the whole environment, resetting unpopulated
1134
+ * fields. Unknown, invalid and output-only paths are rejected, as is a
1135
+ * nonempty mask without environment. Effective validation also applies to
1136
+ * explicit resets and whole-environment replacement.
1137
+ */
1138
+ environmentMask?: string;
1139
+ /**
1140
+ * The caller's stable identity of the work item, not interpreted otherwise.
1141
+ * Every session and attempt with the same item key works on one repository
1142
+ * branch derived from it, so a new attempt continues the pushed work.
1143
+ * Omitted, the session is the item.
1144
+ */
1145
+ itemKey?: string;
1146
+ /**
1147
+ * The OwnerPool this run owns work for. Admission refuses with
1148
+ * `INVALID_STATE` unless `agent_version` is a `QUALIFIED` member at that
1149
+ * moment; later turns of the session are not re-checked.
1150
+ */
1151
+ ownerPool?: string;
1152
+ /**
1153
+ * The maker sessions this run verifies, 1 to 16; empty for an ordinary
1154
+ * run. Admission refuses with `PERMISSION_DENIED` unless `agent_version` is
1155
+ * read-only and its Agent differs from every maker session's Agent. The
1156
+ * verifier session never receives a maker transcript. Set at most one of
1157
+ * `owner_pool` and `verifies`.
1158
+ */
1159
+ verifies?: string[];
1160
+ /**
1161
+ * The organization layer the caller binds at assignment, read from its own
1162
+ * versioned store. The session pins it; see AgentSession.organization_layer.
1163
+ */
1164
+ organizationLayer?: OrganizationLayer;
1165
+ }
1166
+ /** Durable acceptance, not task completion or sandbox readiness. */
1167
+ export interface RunAgentResponse {
1168
+ /** The durably accepted session; acceptance is not task completion. */
1169
+ readonly session?: AgentSession;
1170
+ /** The initial message event committed with the session and pending turn. */
1171
+ readonly initialEvent?: SessionEvent;
1172
+ /** Result-delivery progress, independent of lease cleanup. */
1173
+ readonly delivery?: string;
1174
+ /** Lease-cleanup progress; released requires terminal lease evidence. */
1175
+ readonly cleanup?: string;
1176
+ }
1177
+ /** A public lease fact recorded at allocation and confirmed physical release. */
1178
+ export interface SandboxActivity {
1179
+ /** The lease's resource name. */
1180
+ readonly lease?: string;
1181
+ /** `allocated` or `released` (the release was read back as ENDED). */
1182
+ readonly state?: string;
1183
+ /** On `released`: exact decimal seconds from allocation to release. */
1184
+ readonly sandboxSeconds?: string;
1185
+ }
1186
+ /** The request of SearchMemories. */
1187
+ export interface SearchMemoriesRequest {
1188
+ /** The memory store to search. */
1189
+ parent: string;
1190
+ /** What to recall, 1 to 2000 characters. */
1191
+ query: string;
1192
+ /** Only memories about this end user. */
1193
+ endUser?: string;
1194
+ /** Only memories of this agent. */
1195
+ agent?: string;
1196
+ /** At most this many; default 10, clamped to 100. */
1197
+ pageSize?: number;
1198
+ /** `next_page_token` of the previous page. */
1199
+ pageToken?: string;
1200
+ }
1201
+ /** The response of SearchMemories. */
1202
+ export interface SearchMemoriesResponse {
1203
+ /** The matches, best first. */
1204
+ matches?: MemoryMatch[];
1205
+ /** The token of the next page; empty on the last page. */
1206
+ nextPageToken?: string;
1207
+ }
1208
+ /** The request of SendAgentSessionMessage. */
1209
+ export interface SendAgentSessionMessageRequest {
1210
+ /** The name of the session. */
1211
+ name: string;
1212
+ /** The message, 1 to 64 parts. */
1213
+ message: Message;
1214
+ }
1215
+ /**
1216
+ * A SessionEvent is one entry of a session's append-only log: a user
1217
+ * message, model output, a tool call or result, an approval, or a status
1218
+ * change. Events are never changed or reordered; `sequence` is their order.
1219
+ */
1220
+ export interface SessionEvent {
1221
+ /** `orgs/{org}/projects/{project}/envs/{env}/agent_sessions/{agent_session}/session_events/{session_event}`. */
1222
+ name?: string;
1223
+ /** `sevt_<cell><ulid>`; never reused. */
1224
+ readonly uid?: string;
1225
+ /** Resource metadata. */
1226
+ meta?: common.ResourceMeta;
1227
+ /** The position in the session's log, from 1, with no gaps. */
1228
+ readonly sequence?: string;
1229
+ /** What the event is. */
1230
+ readonly type?: SessionEventType;
1231
+ /** The turn it belongs to, from 1; 0 for an event outside a turn. */
1232
+ readonly turn?: string;
1233
+ /**
1234
+ * The step within the turn, from 1, assigned by the runtime; 0 for an
1235
+ * event that is not a step.
1236
+ */
1237
+ readonly step?: string;
1238
+ /** When it was appended. */
1239
+ readonly createTime?: string;
1240
+ /** Observed accounting for this step; absent values are unknown, never zero. */
1241
+ readonly usage?: StepUsage;
1242
+ /** Stable runtime-assigned effect key, independent of invocation attempts. */
1243
+ readonly stepKey?: string;
1244
+ /** For USER_MESSAGE, STEER and AGENT_MESSAGE. */
1245
+ message?: Message;
1246
+ /** For TOOL_CALL. */
1247
+ toolCall?: ToolCall;
1248
+ /** For TOOL_RESULT. */
1249
+ toolResult?: ToolResult;
1250
+ /** For APPROVAL_REQUESTED and APPROVAL_DECIDED. */
1251
+ approval?: Approval;
1252
+ /** For STATUS. */
1253
+ statusChange?: StatusChange;
1254
+ /** For THOUGHT: a reasoning summary, never private model reasoning. */
1255
+ thought?: Message;
1256
+ /** For FILE_CHANGE. */
1257
+ fileChange?: FileChange;
1258
+ /** For RESPONSE: the completed turn's answer and usage. */
1259
+ response?: TurnResult;
1260
+ /** For ERROR. */
1261
+ error?: ErrorEvent;
1262
+ /** For SANDBOX: authoritative allocation/release history, including replacements. */
1263
+ sandbox?: SandboxActivity;
1264
+ }
1265
+ /**
1266
+ * SessionUsage is what a session has used. Model tokens are on the Sylphx AI
1267
+ * meter; this is the Agents part.
1268
+ */
1269
+ export interface SessionUsage {
1270
+ /** Time turns were active. */
1271
+ readonly activeTurnDuration?: string;
1272
+ /** Tool calls made through the gateway. */
1273
+ readonly gatewayCalls?: string;
1274
+ /** Spend so far in micro-USD, models and tools together. */
1275
+ readonly spendMicros?: string;
1276
+ }
1277
+ /**
1278
+ * A Skill is an instruction pack the agent loads when its description
1279
+ * matches the task.
1280
+ */
1281
+ export interface Skill {
1282
+ /** The skill's name, unique within the agent. */
1283
+ name?: string;
1284
+ /** When to use it, shown to the model; at most 1024 characters. */
1285
+ description?: string;
1286
+ /** The instructions it loads, at most 256 KiB. */
1287
+ instructions?: string;
1288
+ }
1289
+ /** A StatusChange is the session moving to a new state. */
1290
+ export interface StatusChange {
1291
+ /** The state after the change. */
1292
+ readonly state?: SessionState;
1293
+ /** Why, for FAILED and INTERRUPTED: a registry error code and message. */
1294
+ readonly reason?: string;
1295
+ }
1296
+ /** The request of SteerAgentSession. */
1297
+ export interface SteerAgentSessionRequest {
1298
+ /** The name of the session. */
1299
+ name: string;
1300
+ /** The message, 1 to 64 parts. */
1301
+ message: Message;
1302
+ }
1303
+ /** Observed per-step accounting. Exact decimal USD avoids binary rounding. */
1304
+ export interface StepUsage {
1305
+ /** Uncached input tokens the step was charged for; absent when unknown. */
1306
+ readonly inputTokens?: string;
1307
+ /** Input tokens served from the provider cache; absent when unknown. */
1308
+ readonly cachedTokens?: string;
1309
+ /** Output tokens; absent when unknown. */
1310
+ readonly outputTokens?: string;
1311
+ /** The exact decimal USD charge the gateway reported; absent when unknown. */
1312
+ readonly costUsd?: string;
1313
+ /** The catalog id the step ran on; empty for a step with no inference. */
1314
+ readonly model?: string;
1315
+ /** `model`, `tool`, `compaction` or `subcall`. */
1316
+ readonly kind?: string;
1317
+ /**
1318
+ * For a model step: when the runtime received the stream's first non-empty
1319
+ * assistant text or tool-call delta (not a role-only or empty chunk), on
1320
+ * the runtime's clock, from the attempt that produced the recorded step.
1321
+ */
1322
+ readonly firstDeltaTime?: string;
1323
+ }
1324
+ /** The request of SubmitAgentSessionToolResult. */
1325
+ export interface SubmitAgentSessionToolResultRequest {
1326
+ /** The name of the session. */
1327
+ name: string;
1328
+ /** The waiting client ToolCall's `id`. */
1329
+ callId: string;
1330
+ /** The result, at most 1 MiB of JSON. */
1331
+ output: unknown;
1332
+ /** Whether the call failed; `output` then holds the error. */
1333
+ error?: boolean;
1334
+ }
1335
+ /**
1336
+ * A Tool is one tool an agent may call. Every call goes through the tool
1337
+ * gateway: the policy check, credential injection at egress (the model, the
1338
+ * event log and traces see a handle, never the value), the egress guard, and
1339
+ * one usage record and trace span per call.
1340
+ */
1341
+ export interface Tool {
1342
+ /** The name the model calls, unique within the agent. */
1343
+ name?: string;
1344
+ /** What the tool does, shown to the model; at most 4096 characters. */
1345
+ description?: string;
1346
+ /** The JSON Schema of the tool's input. Built-in tools carry their own. */
1347
+ inputSchema?: Record<string, unknown>;
1348
+ /**
1349
+ * A platform tool: `shell`, `files`, `browser`, `computer`, `web_fetch`,
1350
+ * `web_search`, `remember`, `recall`, `knowledge_search` or `skill_load`.
1351
+ */
1352
+ builtin?: BuiltinTool;
1353
+ /** An HTTP API described by OpenAPI. */
1354
+ http?: HttpTool;
1355
+ /**
1356
+ * The app's own server code: the gateway calls it with a short-lived
1357
+ * signed token bound to the session, turn and step.
1358
+ */
1359
+ appFunction?: FunctionTool;
1360
+ /**
1361
+ * Run by the client: the app executes it and returns the result as an
1362
+ * event (`:submitToolResult`).
1363
+ */
1364
+ client?: ClientTool;
1365
+ /**
1366
+ * Called only by the runtime, as a run's `completion` or `renewal` tool:
1367
+ * never offered to the model, which cannot call it.
1368
+ */
1369
+ runtimeOnly?: boolean;
1370
+ }
1371
+ /**
1372
+ * A ToolCall is the agent asking to call a tool. `id` is assigned by the
1373
+ * runtime; the model's own tool-call id is kept only as `model_call_id`, so
1374
+ * a model that repeats an id never collides two calls.
1375
+ */
1376
+ export interface ToolCall {
1377
+ /** The call's id within the session, `(turn, step)` based. */
1378
+ readonly id?: string;
1379
+ /** The tool name. */
1380
+ readonly tool?: string;
1381
+ /** The input, as the model sent it. */
1382
+ readonly input?: Record<string, unknown>;
1383
+ /** The model's own id for the call, as sent; never used as a key. */
1384
+ readonly modelCallId?: string;
1385
+ /** Whether the client runs it (a ClientTool). */
1386
+ readonly client?: boolean;
1387
+ }
1388
+ /** The request for the tools available to a session execution capability. */
1389
+ export interface ToolCatalogRequest {
1390
+ /** The name of the session whose pinned tool catalog is requested. */
1391
+ name: string;
1392
+ }
1393
+ /** The tool catalog visible to the authorized session execution capability. */
1394
+ export interface ToolCatalogResponse {
1395
+ /** The tools in the session's pinned version, with no credential values. */
1396
+ tools?: CatalogTool[];
1397
+ }
1398
+ /**
1399
+ * A ToolPolicy decides each tool call before it runs. A grant is the
1400
+ * authorization: the policy asks a person only for a call no existing grant
1401
+ * covers. An OAuth scope, a credential bound to the tool, or an earlier
1402
+ * "always allow" is that grant.
1403
+ */
1404
+ export interface ToolPolicy {
1405
+ /** The decision for a call no rule matches; default allow. */
1406
+ defaultDecision?: PolicyDecision;
1407
+ /** Rules in order; the first match decides. At most 256. */
1408
+ rules?: ToolPolicyRule[];
1409
+ /**
1410
+ * How long a call waits for a person's answer before it is denied, 1m to
1411
+ * 7d; default 24h.
1412
+ */
1413
+ approvalTimeout?: string;
1414
+ /**
1415
+ * Hosts every network call of the agent's tools may reach, beyond the
1416
+ * tools' own endpoints; `*.example.com` matches subdomains. Private and
1417
+ * internal addresses are refused whatever this says.
1418
+ */
1419
+ egressAllowHosts?: string[];
1420
+ }
1421
+ /** A ToolPolicyRule matches tool calls by tool name. */
1422
+ export interface ToolPolicyRule {
1423
+ /**
1424
+ * A tool name, `<mcp label>__<tool>` for an MCP tool; `*` matches any
1425
+ * characters.
1426
+ */
1427
+ tool?: string;
1428
+ /** The decision. */
1429
+ decision?: PolicyDecision;
1430
+ /**
1431
+ * A CEL condition over the call's `input`, the session's `end_user` and
1432
+ * `labels`; the rule matches only when it is true. Empty always matches.
1433
+ */
1434
+ condition?: string;
1435
+ }
1436
+ /** A ToolResult is the outcome of one tool call. */
1437
+ export interface ToolResult {
1438
+ /** The ToolCall's `id`. */
1439
+ readonly callId?: string;
1440
+ /** The output. */
1441
+ readonly output?: unknown;
1442
+ /** Whether the call failed; `output` then holds the error. */
1443
+ readonly error?: boolean;
1444
+ /** How long the call took. */
1445
+ readonly duration?: string;
1446
+ }
1447
+ /** TurnResult is a completed turn's response, usage and duration. */
1448
+ export interface TurnResult {
1449
+ /** The final response's text. */
1450
+ readonly text?: string;
1451
+ /** Whether the turn ended with an error. */
1452
+ readonly isError?: boolean;
1453
+ /** Model token usage reported by the harness. */
1454
+ readonly usage?: TurnTokenUsage;
1455
+ /** The reported cost, in micro-USD. */
1456
+ readonly costMicros?: string;
1457
+ /** How long the turn ran. */
1458
+ readonly duration?: string;
1459
+ /**
1460
+ * The first non-empty assistant text or tool-call delta of the turn: the
1461
+ * earliest `first_delta_time` of its recorded model steps.
1462
+ */
1463
+ readonly firstDeltaTime?: string;
1464
+ }
1465
+ /** TurnTokenUsage is the model token usage reported for a completed turn. */
1466
+ export interface TurnTokenUsage {
1467
+ /** Input tokens. */
1468
+ readonly inputTokens?: string;
1469
+ /** Output tokens. */
1470
+ readonly outputTokens?: string;
1471
+ /** Input tokens read from the model's cache. */
1472
+ readonly cacheReadTokens?: string;
1473
+ /** Input tokens written to the model's cache. */
1474
+ readonly cacheWriteTokens?: string;
1475
+ }
1476
+ /** The request of UpdateAgent. */
1477
+ export interface UpdateAgentRequest {
1478
+ /** The agent to update; `name` identifies it. */
1479
+ agent: Agent;
1480
+ /** The fields to write; unset writes every populated field. */
1481
+ updateMask?: string;
1482
+ /** Create the agent when it does not exist (declarative upsert). */
1483
+ allowMissing?: boolean;
1484
+ /** Validate and return the result without writing anything. */
1485
+ validateOnly?: boolean;
1486
+ }
1487
+ /** The request of UpdateMemory. */
1488
+ export interface UpdateMemoryRequest {
1489
+ /** The memory to update; `name` identifies it. */
1490
+ memory: Memory;
1491
+ /** The fields to write; unset writes every populated field. */
1492
+ updateMask?: string;
1493
+ /** Validate and return the result without writing anything. */
1494
+ validateOnly?: boolean;
1495
+ }
1496
+ /** The request of UpdateMemoryStore. */
1497
+ export interface UpdateMemoryStoreRequest {
1498
+ /** The memory store to update; `name` identifies it. */
1499
+ memoryStore: MemoryStore;
1500
+ /** The fields to write; unset writes every populated field. */
1501
+ updateMask?: string;
1502
+ /** Create the memory store when it does not exist (declarative upsert). */
1503
+ allowMissing?: boolean;
1504
+ /** Validate and return the result without writing anything. */
1505
+ validateOnly?: boolean;
1506
+ }
1507
+ /** The request of UpdateOwnerPool. */
1508
+ export interface UpdateOwnerPoolRequest {
1509
+ /** The owner pool to update; `name` identifies it. */
1510
+ ownerPool: OwnerPool;
1511
+ /** The fields to write: `spec`, `meta` or both; unset writes both. */
1512
+ updateMask?: string;
1513
+ }
1514
+ /** ApprovalDecision is a person's answer to an approval. */
1515
+ export type ApprovalDecision = 'approve' | 'reject' | (string & {});
1516
+ /** MemoryScope is whose memories a store keeps apart. */
1517
+ export type MemoryScope = 'project' | 'agent' | 'end_user' | (string & {});
1518
+ /** MemorySource is who wrote a memory. */
1519
+ export type MemorySource = 'agent' | 'api' | 'import' | (string & {});
1520
+ /** The standing of an OwnerPool member. */
1521
+ export type OwnerPoolMemberState = 'qualified' | 'refused' | 'demoted' | (string & {});
1522
+ /** PolicyDecision is what the tool policy does with a call. */
1523
+ export type PolicyDecision = 'allow' | 'deny' | 'ask' | (string & {});
1524
+ /** Runtime-produced fields mapped into an authorized completion tool call. */
1525
+ export type ResultField = 'text' | 'done' | 'next' | 'where' | 'outcome' | 'awaits' | 'checkpoint' | 'counted' | 'retry_at' | (string & {});
1526
+ /** SessionEventType is what a session event records. */
1527
+ export type SessionEventType = 'user_message' | 'steer' | 'agent_message' | 'tool_call' | 'tool_result' | 'approval_requested' | 'approval_decided' | 'status' | 'compaction' | 'thought' | 'file_change' | 'response' | 'error' | 'usage' | 'sandbox' | (string & {});
1528
+ /** SessionState is where a session is. */
1529
+ export type SessionState = 'idle' | 'running' | 'awaiting_approval' | 'awaiting_client' | 'failed' | 'archived' | (string & {});
1530
+ /**
1531
+ * AgentsService is Sylphx Agents, the platform's hosted agent runtime
1532
+ * (ADR-01M495TCCBZGSQ68A4P4G428H2). Apps call it instead of building their
1533
+ * own agent loop, session store, memory and credential handling.
1534
+ *
1535
+ * Scopes: `agents:read` and `agents:write` manage agents, versions and
1536
+ * memory stores with a secret key. `agents:sessions` runs sessions and reads
1537
+ * and deletes session and memory records. `agents:admin` governs owner pools
1538
+ * (their admission minimums and demotion rules); no wildcard reaches it.
1539
+ * `agents:qualify` records admission-suite results and live metrics for
1540
+ * owner pool members: a grader's grant, held only by name, and refused to the
1541
+ * principal whose create or update minted the version. All methods
1542
+ * currently require a secret key. Publishable-key access is deferred until
1543
+ * the backend enforces end-user ownership of sessions and memories and
1544
+ * `end_user_access` on Agents.
1545
+ * Credential actions capture existing grants; handles are not CRUD resources.
1546
+ *
1547
+ * Namespace of Sylphx Agents on `Sylphx`.
1548
+ */
1549
+ export declare class AgentsApi {
1550
+ /** The `agents` collection. */
1551
+ readonly agents: AgentsCollection;
1552
+ /** The `agent_versions` collection. */
1553
+ readonly agentVersions: AgentVersionsCollection;
1554
+ /** The `agent_sessions` collection. */
1555
+ readonly agentSessions: AgentSessionsCollection;
1556
+ /** The `session_events` collection. */
1557
+ readonly sessionEvents: SessionEventsCollection;
1558
+ /** The `memory_stores` collection. */
1559
+ readonly memoryStores: MemoryStoresCollection;
1560
+ /** The `memories` collection. */
1561
+ readonly memories: MemoriesCollection;
1562
+ /** The `owner_pools` collection. */
1563
+ readonly ownerPools: OwnerPoolsCollection;
1564
+ constructor(client: runtime.Client);
1565
+ }
1566
+ /** `agents` of Sylphx Agents: Resource type `agents.sylphx.com/Agent`. */
1567
+ export declare class AgentsCollection {
1568
+ private readonly client;
1569
+ constructor(client: runtime.Client);
1570
+ /**
1571
+ * Captures an existing grant for one session and purpose; never issues a key.
1572
+ *
1573
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:capture-credential` · permission `agents:sessions` · effect `write`
1574
+ *
1575
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
1576
+ */
1577
+ captureCredential(request: CaptureCredentialRequest): Promise<CredentialHandle>;
1578
+ /**
1579
+ * Rotates the captured value under the same handle with generation fencing.
1580
+ *
1581
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:rotate-credential` · permission `agents:sessions` · effect `write`
1582
+ *
1583
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
1584
+ */
1585
+ rotateCredential(request: RotateCredentialRequest): Promise<CredentialHandle>;
1586
+ /**
1587
+ * Revokes one captured handle. Repeating the revocation is harmless.
1588
+ *
1589
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:revoke-credential` · permission `agents:sessions` · effect `write`
1590
+ *
1591
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
1592
+ */
1593
+ revokeCredential(request: RevokeCredentialRequest): Promise<Record<string, never>>;
1594
+ /**
1595
+ * Gets an agent.
1596
+ *
1597
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:read` · effect `read`
1598
+ *
1599
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1600
+ */
1601
+ get(request: GetAgentRequest): Promise<Agent>;
1602
+ /**
1603
+ * Lists agents.
1604
+ *
1605
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/agents` · permission `agents:read` · effect `read`
1606
+ *
1607
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1608
+ */
1609
+ list(request: ListAgentsRequest): Promise<ListAgentsResponse>;
1610
+ /** Every item of every page of `list`. */
1611
+ listAll(request: ListAgentsRequest): AsyncGenerator<Agent>;
1612
+ /**
1613
+ * Creates an agent and its version 1.
1614
+ *
1615
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents` · permission `agents:write` · effect `write`
1616
+ *
1617
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1618
+ */
1619
+ create(request: CreateAgentRequest): Promise<Agent>;
1620
+ /**
1621
+ * Updates an agent. A change to `spec` mints the next AgentVersion;
1622
+ * sessions already started keep the version they pinned.
1623
+ *
1624
+ * `PATCH /v1/{agent.name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:write` · effect `write`
1625
+ *
1626
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1627
+ */
1628
+ update(request: UpdateAgentRequest): Promise<Agent>;
1629
+ /**
1630
+ * Deletes an agent and its versions. An agent with sessions is refused
1631
+ * with `INVALID_STATE` unless `force` is set, which deletes them too.
1632
+ *
1633
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:write` · effect `destructive`
1634
+ *
1635
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1636
+ */
1637
+ delete(request: DeleteAgentRequest): Promise<Record<string, never>>;
1638
+ /**
1639
+ * Atomically admits a pinned task session, initial event and pending turn.
1640
+ *
1641
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}:run` · permission `agents:sessions` · effect `write`
1642
+ *
1643
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`, `INVALID_STATE`.
1644
+ */
1645
+ run(request: RunAgentRequest): Promise<RunAgentResponse>;
1646
+ }
1647
+ /** `agent_versions` of Sylphx Agents: Resource type `agents.sylphx.com/AgentVersion`. */
1648
+ export declare class AgentVersionsCollection {
1649
+ private readonly client;
1650
+ constructor(client: runtime.Client);
1651
+ /**
1652
+ * Gets an agent version.
1653
+ *
1654
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*\/agent_versions/*}` · permission `agents:read` · effect `read`
1655
+ *
1656
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1657
+ */
1658
+ get(request: GetAgentVersionRequest): Promise<AgentVersion>;
1659
+ /**
1660
+ * Lists an agent's versions, newest first.
1661
+ *
1662
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agents/*}/agent_versions` · permission `agents:read` · effect `read`
1663
+ *
1664
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1665
+ */
1666
+ list(request: ListAgentVersionsRequest): Promise<ListAgentVersionsResponse>;
1667
+ /** Every item of every page of `list`. */
1668
+ listAll(request: ListAgentVersionsRequest): AsyncGenerator<AgentVersion>;
1669
+ }
1670
+ /** `agent_sessions` of Sylphx Agents: Resource type `agents.sylphx.com/AgentSession`. */
1671
+ export declare class AgentSessionsCollection {
1672
+ private readonly client;
1673
+ constructor(client: runtime.Client);
1674
+ /**
1675
+ * Guest execution capability authentication, not an Access management key.
1676
+ * Preserve any JSON tool result, including scalars and arrays.
1677
+ *
1678
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:invoke-tool` · permission `agents:sessions` · effect `write`
1679
+ *
1680
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
1681
+ */
1682
+ invokeTool(request: InvokeToolRequest): Promise<unknown>;
1683
+ /**
1684
+ * The immutable pinned HTTP-tool catalog exposed to the guest's MCP bridge.
1685
+ *
1686
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:tool-catalog` · permission `agents:sessions` · effect `read`
1687
+ *
1688
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
1689
+ */
1690
+ toolCatalog(request: ToolCatalogRequest): Promise<ToolCatalogResponse>;
1691
+ /**
1692
+ * Starts a session of an agent, pinned to its current version unless
1693
+ * `agent_version` names another. Requires a secret key until end-user
1694
+ * ownership is implemented. The session starts idle; `:send` starts its
1695
+ * first turn.
1696
+ *
1697
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agent_sessions` · permission `agents:sessions` · effect `write`
1698
+ *
1699
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
1700
+ */
1701
+ create(request: CreateAgentSessionRequest): Promise<AgentSession>;
1702
+ /**
1703
+ * Gets a session.
1704
+ *
1705
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}` · permission `agents:sessions` · effect `read`
1706
+ *
1707
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1708
+ */
1709
+ get(request: GetAgentSessionRequest): Promise<AgentSession>;
1710
+ /**
1711
+ * Lists sessions, newest first. With a publishable key, only the caller's
1712
+ * end user's sessions.
1713
+ *
1714
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/agent_sessions` · permission `agents:sessions` · effect `read`
1715
+ *
1716
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1717
+ */
1718
+ list(request: ListAgentSessionsRequest): Promise<ListAgentSessionsResponse>;
1719
+ /** Every item of every page of `list`. */
1720
+ listAll(request: ListAgentSessionsRequest): AsyncGenerator<AgentSession>;
1721
+ /**
1722
+ * Deletes a session and its events. A session whose turn is running is
1723
+ * refused with `INVALID_STATE` unless `force` is set, which interrupts it
1724
+ * first.
1725
+ *
1726
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}` · permission `agents:sessions` · effect `destructive`
1727
+ *
1728
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1729
+ */
1730
+ delete(request: DeleteAgentSessionRequest): Promise<Record<string, never>>;
1731
+ /**
1732
+ * Archives a session: the session and its event log stay readable, but no
1733
+ * new turn may start and the session's captured credential handles are
1734
+ * revoked. An idle or failed session archives at once; a running turn is
1735
+ * refused with `INVALID_STATE` (interrupt it first). Repeating the call
1736
+ * with the same `Idempotency-Key` returns the same session.
1737
+ *
1738
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:archive` · permission `agents:sessions` · effect `write`
1739
+ *
1740
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1741
+ */
1742
+ archive(request: ArchiveAgentSessionRequest): Promise<AgentSession>;
1743
+ /**
1744
+ * Sends a user message. On an idle or failed session it starts a new turn;
1745
+ * while a turn runs it is refused with `INVALID_STATE` (use `:steer`).
1746
+ * The same `Idempotency-Key` returns the same event.
1747
+ *
1748
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:send` · permission `agents:sessions` · effect `write`
1749
+ *
1750
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `SPEND_LIMIT_REACHED`.
1751
+ */
1752
+ send(request: SendAgentSessionMessageRequest): Promise<SessionEvent>;
1753
+ /**
1754
+ * Sends a message into the running turn; the agent reads it at its next
1755
+ * step. On an idle session it is the same as `:send`.
1756
+ *
1757
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:steer` · permission `agents:sessions` · effect `write`
1758
+ *
1759
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1760
+ */
1761
+ steer(request: SteerAgentSessionRequest): Promise<SessionEvent>;
1762
+ /**
1763
+ * Stops the running turn at its current step. Calls already made keep
1764
+ * their results; the session becomes idle. A no-op on an idle session.
1765
+ *
1766
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:interrupt` · permission `agents:sessions` · effect `write`
1767
+ *
1768
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1769
+ */
1770
+ interrupt(request: InterruptAgentSessionRequest): Promise<AgentSession>;
1771
+ /**
1772
+ * Answers a tool call waiting for approval; the turn continues.
1773
+ *
1774
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:decideApproval` · permission `agents:sessions` · effect `write`
1775
+ *
1776
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1777
+ */
1778
+ decideApproval(request: DecideAgentSessionApprovalRequest): Promise<SessionEvent>;
1779
+ /**
1780
+ * Returns the result of a client tool call; the turn continues.
1781
+ *
1782
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:submitToolResult` · permission `agents:sessions` · effect `write`
1783
+ *
1784
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1785
+ */
1786
+ submitToolResult(request: SubmitAgentSessionToolResultRequest): Promise<SessionEvent>;
1787
+ }
1788
+ /** `session_events` of Sylphx Agents: Resource type `agents.sylphx.com/SessionEvent`. */
1789
+ export declare class SessionEventsCollection {
1790
+ private readonly client;
1791
+ constructor(client: runtime.Client);
1792
+ /**
1793
+ * Gets a session event.
1794
+ *
1795
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/session_events/*}` · permission `agents:sessions` · effect `read`
1796
+ *
1797
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1798
+ */
1799
+ get(request: GetSessionEventRequest): Promise<SessionEvent>;
1800
+ /**
1801
+ * Lists a session's events in sequence order. To follow a session, call
1802
+ * again with the filter `sequence > N`, N the last sequence read; `wait`
1803
+ * holds the call open until a newer event is appended or the wait ends.
1804
+ *
1805
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agent_sessions/*}/session_events` · permission `agents:sessions` · effect `read`
1806
+ *
1807
+ * Errors: `RESOURCE_NOT_FOUND`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1808
+ */
1809
+ list(request: ListSessionEventsRequest): Promise<ListSessionEventsResponse>;
1810
+ /** Every item of every page of `list`. */
1811
+ listAll(request: ListSessionEventsRequest): AsyncGenerator<SessionEvent>;
1812
+ }
1813
+ /** `memory_stores` of Sylphx Agents: Resource type `agents.sylphx.com/MemoryStore`. */
1814
+ export declare class MemoryStoresCollection {
1815
+ private readonly client;
1816
+ constructor(client: runtime.Client);
1817
+ /**
1818
+ * Gets a memory store.
1819
+ *
1820
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:read` · effect `read`
1821
+ *
1822
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1823
+ */
1824
+ get(request: GetMemoryStoreRequest): Promise<MemoryStore>;
1825
+ /**
1826
+ * Lists memory stores.
1827
+ *
1828
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/memory_stores` · permission `agents:read` · effect `read`
1829
+ *
1830
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1831
+ */
1832
+ list(request: ListMemoryStoresRequest): Promise<ListMemoryStoresResponse>;
1833
+ /** Every item of every page of `list`. */
1834
+ listAll(request: ListMemoryStoresRequest): AsyncGenerator<MemoryStore>;
1835
+ /**
1836
+ * Creates a memory store.
1837
+ *
1838
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/memory_stores` · permission `agents:write` · effect `write`
1839
+ *
1840
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1841
+ */
1842
+ create(request: CreateMemoryStoreRequest): Promise<MemoryStore>;
1843
+ /**
1844
+ * Updates a memory store.
1845
+ *
1846
+ * `PATCH /v1/{memory_store.name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:write` · effect `write`
1847
+ *
1848
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1849
+ */
1850
+ update(request: UpdateMemoryStoreRequest): Promise<MemoryStore>;
1851
+ /**
1852
+ * Deletes a memory store. A store an agent names is refused with
1853
+ * `RESOURCE_IN_USE`; a store with memories is refused with `INVALID_STATE`
1854
+ * unless `force` is set, which deletes them too.
1855
+ *
1856
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:write` · effect `destructive`
1857
+ *
1858
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `RESOURCE_IN_USE`.
1859
+ */
1860
+ delete(request: DeleteMemoryStoreRequest): Promise<Record<string, never>>;
1861
+ }
1862
+ /** `memories` of Sylphx Agents: Resource type `agents.sylphx.com/Memory`. */
1863
+ export declare class MemoriesCollection {
1864
+ private readonly client;
1865
+ constructor(client: runtime.Client);
1866
+ /**
1867
+ * Gets a memory.
1868
+ *
1869
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:sessions` · effect `read`
1870
+ *
1871
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1872
+ */
1873
+ get(request: GetMemoryRequest): Promise<Memory>;
1874
+ /**
1875
+ * Lists a store's memories, newest first. With a publishable key, only the
1876
+ * caller's end user's memories.
1877
+ *
1878
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories` · permission `agents:sessions` · effect `read`
1879
+ *
1880
+ * Errors: `RESOURCE_NOT_FOUND`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1881
+ */
1882
+ list(request: ListMemoriesRequest): Promise<ListMemoriesResponse>;
1883
+ /** Every item of every page of `list`. */
1884
+ listAll(request: ListMemoriesRequest): AsyncGenerator<Memory>;
1885
+ /**
1886
+ * Writes a memory.
1887
+ *
1888
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories` · permission `agents:write` · effect `write`
1889
+ *
1890
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1891
+ */
1892
+ create(request: CreateMemoryRequest): Promise<Memory>;
1893
+ /**
1894
+ * Changes a memory's content.
1895
+ *
1896
+ * `PATCH /v1/{memory.name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:write` · effect `write`
1897
+ *
1898
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1899
+ */
1900
+ update(request: UpdateMemoryRequest): Promise<Memory>;
1901
+ /**
1902
+ * Deletes a memory. An end user may delete their own.
1903
+ *
1904
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:sessions` · effect `destructive`
1905
+ *
1906
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1907
+ */
1908
+ delete(request: DeleteMemoryRequest): Promise<Record<string, never>>;
1909
+ /**
1910
+ * Recalls the memories that best match a query, by hybrid full-text and
1911
+ * vector search. With a publishable key, only the caller's end user's
1912
+ * memories. A read with a request body, like a query.
1913
+ *
1914
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories:search` · permission `agents:sessions` · effect `read`
1915
+ *
1916
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
1917
+ */
1918
+ search(request: SearchMemoriesRequest): Promise<SearchMemoriesResponse>;
1919
+ }
1920
+ /** `owner_pools` of Sylphx Agents: Resource type `agents.sylphx.com/OwnerPool`. */
1921
+ export declare class OwnerPoolsCollection {
1922
+ private readonly client;
1923
+ constructor(client: runtime.Client);
1924
+ /**
1925
+ * Gets an owner pool with its members.
1926
+ *
1927
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:read` · effect `read`
1928
+ *
1929
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1930
+ */
1931
+ get(request: GetOwnerPoolRequest): Promise<OwnerPool>;
1932
+ /**
1933
+ * Lists owner pools, newest first.
1934
+ *
1935
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/owner_pools` · permission `agents:read` · effect `read`
1936
+ *
1937
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1938
+ */
1939
+ list(request: ListOwnerPoolsRequest): Promise<ListOwnerPoolsResponse>;
1940
+ /** Every item of every page of `list`. */
1941
+ listAll(request: ListOwnerPoolsRequest): AsyncGenerator<OwnerPool>;
1942
+ /**
1943
+ * Creates an owner pool with no members. Its minimums and demotion rules
1944
+ * are governance, so the caller needs `agents:admin`.
1945
+ *
1946
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/owner_pools` · permission `agents:admin` · effect `write`
1947
+ *
1948
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1949
+ */
1950
+ create(request: CreateOwnerPoolRequest): Promise<OwnerPool>;
1951
+ /**
1952
+ * Replaces an owner pool's spec (`agents:admin`). Members keep their
1953
+ * standing; a changed suite or minimum applies from the next `:qualify`.
1954
+ *
1955
+ * `PATCH /v1/{owner_pool.name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:admin` · effect `write`
1956
+ *
1957
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1958
+ */
1959
+ update(request: UpdateOwnerPoolRequest): Promise<OwnerPool>;
1960
+ /**
1961
+ * Deletes an owner pool and its members (`agents:admin`). Sessions already
1962
+ * admitted keep running.
1963
+ *
1964
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:admin` · effect `destructive`
1965
+ *
1966
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1967
+ */
1968
+ delete(request: DeleteOwnerPoolRequest): Promise<Record<string, never>>;
1969
+ /**
1970
+ * Records an admission suite result for an Agent version. The caller holds
1971
+ * `agents:qualify` and is not the principal whose create or update minted
1972
+ * the version (`PERMISSION_DENIED`). Every minimum
1973
+ * met: the member is `QUALIFIED`. Any score missing or below its minimum:
1974
+ * the member is recorded `REFUSED` with the reason. Each qualification is
1975
+ * recorded with its suite, suite version, result and caller; a `result`
1976
+ * already recorded for the member is refused with `INVALID_FIELD`, so a
1977
+ * demoted member returns only with a new suite result. A read-only version
1978
+ * is refused with `PERMISSION_DENIED`; a suite or suite version other than
1979
+ * the pool's with `INVALID_FIELD`. Re-qualifying keeps the member's
1980
+ * baseline: the baseline belongs to the version and its pinned model.
1981
+ *
1982
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}:qualify` · permission `agents:qualify` · effect `write`
1983
+ *
1984
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1985
+ */
1986
+ qualify(request: QualifyOwnerPoolMemberRequest): Promise<OwnerPoolMember>;
1987
+ /**
1988
+ * Records a live-metric observation for a member and applies the pool's
1989
+ * demotion rules (`agents:qualify`, refused to the version's authors as in
1990
+ * `:qualify`). The platform computes each rule's baseline: the median of
1991
+ * the member's first `baseline_observations` counted observations of the
1992
+ * metric, set only when it is finite and positive. Values of a rule metric
1993
+ * are lower-is-better and must not be negative. Once the baseline is set, a
1994
+ * metric past `baseline * (1 + max_regression)` demotes a qualified member.
1995
+ * Only `:qualify` brings a demoted member back.
1996
+ *
1997
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}:observe` · permission `agents:qualify` · effect `write`
1998
+ *
1999
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
2000
+ */
2001
+ observe(request: ObserveOwnerPoolMemberRequest): Promise<OwnerPoolMember>;
2002
+ }