@sylphx/sdk 0.32.0 → 0.32.1

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 (80) hide show
  1. package/README.md +20 -0
  2. package/dist/access.d.ts +34 -0
  3. package/dist/access.js +14 -2
  4. package/dist/access.js.map +1 -1
  5. package/dist/agents.d.ts +1564 -0
  6. package/dist/agents.js +1096 -0
  7. package/dist/agents.js.map +1 -0
  8. package/dist/ai.js +1 -1
  9. package/dist/artifacts.js +1 -1
  10. package/dist/assets.js +1 -1
  11. package/dist/auth/client.js +1 -1
  12. package/dist/auth/end-user-keys-mock.d.ts +83 -0
  13. package/dist/auth/end-user-keys-mock.js +427 -0
  14. package/dist/auth/end-user-keys-mock.js.map +1 -0
  15. package/dist/auth/end-user-keys.d.ts +219 -0
  16. package/dist/auth/end-user-keys.js +240 -0
  17. package/dist/auth/end-user-keys.js.map +1 -0
  18. package/dist/auth/verify.js +1 -1
  19. package/dist/auth.d.ts +201 -2
  20. package/dist/auth.js +148 -2
  21. package/dist/auth.js.map +1 -1
  22. package/dist/billing.d.ts +86 -8
  23. package/dist/billing.js +39 -1
  24. package/dist/billing.js.map +1 -1
  25. package/dist/broker.js +1 -1
  26. package/dist/build.d.ts +361 -28
  27. package/dist/build.js +302 -10
  28. package/dist/build.js.map +1 -1
  29. package/dist/common.js +1 -1
  30. package/dist/config/flags.js +1 -1
  31. package/dist/config.js +1 -1
  32. package/dist/connections.js +1 -1
  33. package/dist/data.d.ts +52 -0
  34. package/dist/data.js +57 -1
  35. package/dist/data.js.map +1 -1
  36. package/dist/entitlement.js +1 -1
  37. package/dist/events/realtime.js +1 -1
  38. package/dist/events/webhooks.js +1 -1
  39. package/dist/events.js +1 -1
  40. package/dist/flags.d.ts +18 -0
  41. package/dist/flags.js +44 -0
  42. package/dist/flags.js.map +1 -0
  43. package/dist/hosting.js +1 -1
  44. package/dist/ids.d.ts +152 -2
  45. package/dist/ids.js +32 -2
  46. package/dist/ids.js.map +1 -1
  47. package/dist/index.d.ts +14 -1
  48. package/dist/index.js +20 -2
  49. package/dist/index.js.map +1 -1
  50. package/dist/keys.js +1 -1
  51. package/dist/knowledge.d.ts +1192 -0
  52. package/dist/knowledge.js +1002 -0
  53. package/dist/knowledge.js.map +1 -0
  54. package/dist/localization.js +1 -1
  55. package/dist/methods.js +1563 -40
  56. package/dist/methods.js.map +1 -1
  57. package/dist/money.d.ts +1687 -7
  58. package/dist/money.js +1269 -1
  59. package/dist/money.js.map +1 -1
  60. package/dist/network.js +1 -1
  61. package/dist/notify.d.ts +346 -1
  62. package/dist/notify.js +249 -1
  63. package/dist/notify.js.map +1 -1
  64. package/dist/observability.d.ts +138 -0
  65. package/dist/observability.js +89 -1
  66. package/dist/observability.js.map +1 -1
  67. package/dist/realtime.d.ts +404 -0
  68. package/dist/realtime.js +312 -0
  69. package/dist/realtime.js.map +1 -0
  70. package/dist/release.js +1 -1
  71. package/dist/runners.js +1 -1
  72. package/dist/runtime.js +1 -1
  73. package/dist/sandboxes.js +1 -1
  74. package/dist/secrets.d.ts +336 -0
  75. package/dist/secrets.js +268 -1
  76. package/dist/secrets.js.map +1 -1
  77. package/dist/workflows.d.ts +119 -3
  78. package/dist/workflows.js +144 -4
  79. package/dist/workflows.js.map +1 -1
  80. package/package.json +2 -2
package/dist/agents.js ADDED
@@ -0,0 +1,1096 @@
1
+ // @generated by sylphx-gen 0.1.0 from contracts@c8a7361c53e572321b0ec9fb014fd1e8279b007b62562423038e0d0e5b9d767a. Do not edit.
2
+ // `sylphx.agents.v1`.
3
+ import * as runtime from './runtime.js';
4
+ import './common.js';
5
+ import './sandboxes.js';
6
+ runtime.registerSchemas({
7
+ 'sylphx.agents.v1.Agent': [
8
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
9
+ ['spec', 'spec', 'sylphx.agents.v1.AgentSpec'],
10
+ ['status', 'status', 'sylphx.agents.v1.AgentStatus'],
11
+ ],
12
+ 'sylphx.agents.v1.AgentBudget': [
13
+ ['maxStepsPerTurn', 'max_steps_per_turn'],
14
+ ['turnTimeout', 'turn_timeout'],
15
+ ['maxSessionSpendMicros', 'max_session_spend_micros'],
16
+ ],
17
+ 'sylphx.agents.v1.AgentSession': [
18
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
19
+ ['agentVersion', 'agent_version'],
20
+ ['endUser', 'end_user'],
21
+ ['turnCount', 'turn_count'],
22
+ ['lastEventSequence', 'last_event_sequence'],
23
+ ['createTime', 'create_time'],
24
+ ['updateTime', 'update_time'],
25
+ ['usage', 'usage', 'sylphx.agents.v1.SessionUsage'],
26
+ ['environmentLease', 'environment_lease'],
27
+ ['environment', 'environment', 'sylphx.agents.v1.EnvironmentSpec'],
28
+ ['credentials', 'credentials', 'sylphx.agents.v1.CredentialBinding', 'map'],
29
+ ['profiles', 'profiles', 'sylphx.agents.v1.ProfileMount'],
30
+ ],
31
+ 'sylphx.agents.v1.AgentSpec': [
32
+ ['tools', 'tools', 'sylphx.agents.v1.Tool'],
33
+ ['mcpServers', 'mcp_servers', 'sylphx.agents.v1.McpServer'],
34
+ ['skills', 'skills', 'sylphx.agents.v1.Skill'],
35
+ ['memoryStores', 'memory_stores'],
36
+ ['toolPolicy', 'tool_policy', 'sylphx.agents.v1.ToolPolicy'],
37
+ ['budget', 'budget', 'sylphx.agents.v1.AgentBudget'],
38
+ ['endUserAccess', 'end_user_access'],
39
+ ['environment', 'environment', 'sylphx.agents.v1.EnvironmentSpec'],
40
+ ],
41
+ 'sylphx.agents.v1.AgentStatus': [
42
+ ['observedGeneration', 'observed_generation'],
43
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
44
+ ['currentVersion', 'current_version'],
45
+ ['currentVersionNumber', 'current_version_number'],
46
+ ],
47
+ 'sylphx.agents.v1.AgentVersion': [
48
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
49
+ ['versionNumber', 'version_number'],
50
+ ['spec', 'spec', 'sylphx.agents.v1.AgentSpec'],
51
+ ['agentGeneration', 'agent_generation'],
52
+ ['createTime', 'create_time'],
53
+ ],
54
+ 'sylphx.agents.v1.Approval': [
55
+ ['callId', 'call_id'],
56
+ ],
57
+ 'sylphx.agents.v1.BuiltinTool': [
58
+ ['config', 'config', undefined, 'json'],
59
+ ],
60
+ 'sylphx.agents.v1.CaptureCredentialRequest': [
61
+ ['expiresAt', 'expires_at'],
62
+ ['allowedTools', 'allowed_tools'],
63
+ ],
64
+ 'sylphx.agents.v1.CatalogTool': [
65
+ ['inputSchema', 'input_schema', undefined, 'json'],
66
+ ],
67
+ 'sylphx.agents.v1.ClientTool': [],
68
+ 'sylphx.agents.v1.CompletionCall': [
69
+ ['arguments', 'arguments', undefined, 'json'],
70
+ ['resultFields', 'result_fields', undefined, 'map'],
71
+ ],
72
+ 'sylphx.agents.v1.ContentPart': [
73
+ ['file', 'file', 'sylphx.agents.v1.FileRef'],
74
+ ],
75
+ 'sylphx.agents.v1.CreateAgentRequest': [
76
+ ['agentId', 'agent_id'],
77
+ ['agent', 'agent', 'sylphx.agents.v1.Agent'],
78
+ ['validateOnly', 'validate_only'],
79
+ ],
80
+ 'sylphx.agents.v1.CreateAgentSessionRequest': [
81
+ ['agentSessionId', 'agent_session_id'],
82
+ ['agentSession', 'agent_session', 'sylphx.agents.v1.AgentSession'],
83
+ ['validateOnly', 'validate_only'],
84
+ ],
85
+ 'sylphx.agents.v1.CreateMemoryRequest': [
86
+ ['memoryId', 'memory_id'],
87
+ ['memory', 'memory', 'sylphx.agents.v1.Memory'],
88
+ ['validateOnly', 'validate_only'],
89
+ ],
90
+ 'sylphx.agents.v1.CreateMemoryStoreRequest': [
91
+ ['memoryStoreId', 'memory_store_id'],
92
+ ['memoryStore', 'memory_store', 'sylphx.agents.v1.MemoryStore'],
93
+ ['validateOnly', 'validate_only'],
94
+ ],
95
+ 'sylphx.agents.v1.CredentialBinding': [
96
+ ['endUserProvider', 'end_user_provider'],
97
+ ],
98
+ 'sylphx.agents.v1.CredentialHandle': [
99
+ ['expiresAt', 'expires_at'],
100
+ ],
101
+ 'sylphx.agents.v1.DecideAgentSessionApprovalRequest': [
102
+ ['callId', 'call_id'],
103
+ ],
104
+ 'sylphx.agents.v1.DeleteAgentRequest': [
105
+ ['allowMissing', 'allow_missing'],
106
+ ['validateOnly', 'validate_only'],
107
+ ],
108
+ 'sylphx.agents.v1.DeleteAgentSessionRequest': [
109
+ ['allowMissing', 'allow_missing'],
110
+ ['validateOnly', 'validate_only'],
111
+ ],
112
+ 'sylphx.agents.v1.DeleteMemoryRequest': [
113
+ ['allowMissing', 'allow_missing'],
114
+ ['validateOnly', 'validate_only'],
115
+ ],
116
+ 'sylphx.agents.v1.DeleteMemoryStoreRequest': [
117
+ ['allowMissing', 'allow_missing'],
118
+ ['validateOnly', 'validate_only'],
119
+ ],
120
+ 'sylphx.agents.v1.EnvironmentSpec': [
121
+ ['idleStandby', 'idle_standby'],
122
+ ['repo', 'repo', 'sylphx.agents.v1.RepositorySpec'],
123
+ ['egress', 'egress', 'sylphx.sandboxes.v1.LeaseNetwork'],
124
+ ['budget', 'budget', 'sylphx.sandboxes.v1.LeaseBudget'],
125
+ ],
126
+ 'sylphx.agents.v1.ErrorEvent': [],
127
+ 'sylphx.agents.v1.FileChange': [
128
+ ['oldPath', 'old_path'],
129
+ ],
130
+ 'sylphx.agents.v1.FileRef': [
131
+ ['mediaType', 'media_type'],
132
+ ],
133
+ 'sylphx.agents.v1.FunctionTool': [],
134
+ 'sylphx.agents.v1.GetAgentRequest': [],
135
+ 'sylphx.agents.v1.GetAgentSessionRequest': [],
136
+ 'sylphx.agents.v1.GetAgentVersionRequest': [],
137
+ 'sylphx.agents.v1.GetMemoryRequest': [],
138
+ 'sylphx.agents.v1.GetMemoryStoreRequest': [],
139
+ 'sylphx.agents.v1.GetSessionEventRequest': [],
140
+ 'sylphx.agents.v1.HttpTool': [
141
+ ['openapiUri', 'openapi_uri'],
142
+ ['openapi', 'openapi', undefined, 'json'],
143
+ ['operationId', 'operation_id'],
144
+ ['credential', 'credential', 'sylphx.agents.v1.CredentialBinding'],
145
+ ],
146
+ 'sylphx.agents.v1.InterruptAgentSessionRequest': [],
147
+ 'sylphx.agents.v1.InvokeToolRequest': [
148
+ ['arguments', 'arguments', undefined, 'json'],
149
+ ['opId', 'op_id'],
150
+ ],
151
+ 'sylphx.agents.v1.ListAgentSessionsRequest': [
152
+ ['pageSize', 'page_size'],
153
+ ['pageToken', 'page_token'],
154
+ ],
155
+ 'sylphx.agents.v1.ListAgentSessionsResponse': [
156
+ ['agentSessions', 'agent_sessions', 'sylphx.agents.v1.AgentSession'],
157
+ ['nextPageToken', 'next_page_token'],
158
+ ],
159
+ 'sylphx.agents.v1.ListAgentVersionsRequest': [
160
+ ['pageSize', 'page_size'],
161
+ ['pageToken', 'page_token'],
162
+ ],
163
+ 'sylphx.agents.v1.ListAgentVersionsResponse': [
164
+ ['agentVersions', 'agent_versions', 'sylphx.agents.v1.AgentVersion'],
165
+ ['nextPageToken', 'next_page_token'],
166
+ ],
167
+ 'sylphx.agents.v1.ListAgentsRequest': [
168
+ ['pageSize', 'page_size'],
169
+ ['pageToken', 'page_token'],
170
+ ['orderBy', 'order_by'],
171
+ ],
172
+ 'sylphx.agents.v1.ListAgentsResponse': [
173
+ ['agents', 'agents', 'sylphx.agents.v1.Agent'],
174
+ ['nextPageToken', 'next_page_token'],
175
+ ],
176
+ 'sylphx.agents.v1.ListMemoriesRequest': [
177
+ ['pageSize', 'page_size'],
178
+ ['pageToken', 'page_token'],
179
+ ],
180
+ 'sylphx.agents.v1.ListMemoriesResponse': [
181
+ ['memories', 'memories', 'sylphx.agents.v1.Memory'],
182
+ ['nextPageToken', 'next_page_token'],
183
+ ],
184
+ 'sylphx.agents.v1.ListMemoryStoresRequest': [
185
+ ['pageSize', 'page_size'],
186
+ ['pageToken', 'page_token'],
187
+ ['orderBy', 'order_by'],
188
+ ],
189
+ 'sylphx.agents.v1.ListMemoryStoresResponse': [
190
+ ['memoryStores', 'memory_stores', 'sylphx.agents.v1.MemoryStore'],
191
+ ['nextPageToken', 'next_page_token'],
192
+ ],
193
+ 'sylphx.agents.v1.ListSessionEventsRequest': [
194
+ ['pageSize', 'page_size'],
195
+ ['pageToken', 'page_token'],
196
+ ],
197
+ 'sylphx.agents.v1.ListSessionEventsResponse': [
198
+ ['sessionEvents', 'session_events', 'sylphx.agents.v1.SessionEvent'],
199
+ ['nextPageToken', 'next_page_token'],
200
+ ],
201
+ 'sylphx.agents.v1.McpServer': [
202
+ ['allowedTools', 'allowed_tools'],
203
+ ['credential', 'credential', 'sylphx.agents.v1.CredentialBinding'],
204
+ ],
205
+ 'sylphx.agents.v1.Memory': [
206
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
207
+ ['endUser', 'end_user'],
208
+ ['provenance', 'provenance', 'sylphx.agents.v1.MemoryProvenance'],
209
+ ['createTime', 'create_time'],
210
+ ['updateTime', 'update_time'],
211
+ ],
212
+ 'sylphx.agents.v1.MemoryMatch': [
213
+ ['memory', 'memory', 'sylphx.agents.v1.Memory'],
214
+ ],
215
+ 'sylphx.agents.v1.MemoryProvenance': [],
216
+ 'sylphx.agents.v1.MemoryStore': [
217
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
218
+ ['spec', 'spec', 'sylphx.agents.v1.MemoryStoreSpec'],
219
+ ['status', 'status', 'sylphx.agents.v1.MemoryStoreStatus'],
220
+ ],
221
+ 'sylphx.agents.v1.MemoryStoreSpec': [
222
+ ['agentWrites', 'agent_writes'],
223
+ ],
224
+ 'sylphx.agents.v1.MemoryStoreStatus': [
225
+ ['observedGeneration', 'observed_generation'],
226
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
227
+ ['memoryCount', 'memory_count'],
228
+ ['storedBytes', 'stored_bytes'],
229
+ ],
230
+ 'sylphx.agents.v1.Message': [
231
+ ['parts', 'parts', 'sylphx.agents.v1.ContentPart'],
232
+ ],
233
+ 'sylphx.agents.v1.ProfileMount': [],
234
+ 'sylphx.agents.v1.RenewalCall': [
235
+ ['arguments', 'arguments', undefined, 'json'],
236
+ ['cancelField', 'cancel_field'],
237
+ ['reasonField', 'reason_field'],
238
+ ['credentialUpdates', 'credential_updates', undefined, 'map'],
239
+ ['credentialExpiries', 'credential_expiries', undefined, 'map'],
240
+ ['idempotencyArgument', 'idempotency_argument'],
241
+ ],
242
+ 'sylphx.agents.v1.RepositorySpec': [],
243
+ 'sylphx.agents.v1.RevokeCredentialRequest': [],
244
+ 'sylphx.agents.v1.RotateCredentialRequest': [
245
+ ['expiresAt', 'expires_at'],
246
+ ],
247
+ 'sylphx.agents.v1.RunAgentRequest': [
248
+ ['agentVersion', 'agent_version'],
249
+ ['agentSessionId', 'agent_session_id'],
250
+ ['message', 'message', 'sylphx.agents.v1.Message'],
251
+ ['environment', 'environment', 'sylphx.agents.v1.EnvironmentSpec'],
252
+ ['credentials', 'credentials', 'sylphx.agents.v1.CredentialBinding', 'map'],
253
+ ['profiles', 'profiles', 'sylphx.agents.v1.ProfileMount'],
254
+ ['completion', 'completion', 'sylphx.agents.v1.CompletionCall'],
255
+ ['workspaceKnowledge', 'workspace_knowledge', undefined, 'json'],
256
+ ['taskRef', 'task_ref'],
257
+ ['renewal', 'renewal', 'sylphx.agents.v1.RenewalCall'],
258
+ ['runtimeCredentialHandle', 'runtime_credential_handle'],
259
+ ['environmentMask', 'environment_mask'],
260
+ ],
261
+ 'sylphx.agents.v1.RunAgentResponse': [
262
+ ['session', 'session', 'sylphx.agents.v1.AgentSession'],
263
+ ['initialEvent', 'initial_event', 'sylphx.agents.v1.SessionEvent'],
264
+ ],
265
+ 'sylphx.agents.v1.SearchMemoriesRequest': [
266
+ ['endUser', 'end_user'],
267
+ ['pageSize', 'page_size'],
268
+ ['pageToken', 'page_token'],
269
+ ],
270
+ 'sylphx.agents.v1.SearchMemoriesResponse': [
271
+ ['matches', 'matches', 'sylphx.agents.v1.MemoryMatch'],
272
+ ['nextPageToken', 'next_page_token'],
273
+ ],
274
+ 'sylphx.agents.v1.SendAgentSessionMessageRequest': [
275
+ ['message', 'message', 'sylphx.agents.v1.Message'],
276
+ ],
277
+ 'sylphx.agents.v1.SessionEvent': [
278
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
279
+ ['createTime', 'create_time'],
280
+ ['message', 'message', 'sylphx.agents.v1.Message'],
281
+ ['toolCall', 'tool_call', 'sylphx.agents.v1.ToolCall'],
282
+ ['toolResult', 'tool_result', 'sylphx.agents.v1.ToolResult'],
283
+ ['approval', 'approval', 'sylphx.agents.v1.Approval'],
284
+ ['statusChange', 'status_change', 'sylphx.agents.v1.StatusChange'],
285
+ ['thought', 'thought', 'sylphx.agents.v1.Message'],
286
+ ['fileChange', 'file_change', 'sylphx.agents.v1.FileChange'],
287
+ ['response', 'response', 'sylphx.agents.v1.TurnResult'],
288
+ ['error', 'error', 'sylphx.agents.v1.ErrorEvent'],
289
+ ],
290
+ 'sylphx.agents.v1.SessionUsage': [
291
+ ['activeTurnDuration', 'active_turn_duration'],
292
+ ['gatewayCalls', 'gateway_calls'],
293
+ ['spendMicros', 'spend_micros'],
294
+ ],
295
+ 'sylphx.agents.v1.Skill': [],
296
+ 'sylphx.agents.v1.StatusChange': [],
297
+ 'sylphx.agents.v1.SteerAgentSessionRequest': [
298
+ ['message', 'message', 'sylphx.agents.v1.Message'],
299
+ ],
300
+ 'sylphx.agents.v1.SubmitAgentSessionToolResultRequest': [
301
+ ['callId', 'call_id'],
302
+ ['output', 'output', undefined, 'json'],
303
+ ],
304
+ 'sylphx.agents.v1.Tool': [
305
+ ['inputSchema', 'input_schema', undefined, 'json'],
306
+ ['builtin', 'builtin', 'sylphx.agents.v1.BuiltinTool'],
307
+ ['http', 'http', 'sylphx.agents.v1.HttpTool'],
308
+ ['appFunction', 'app_function', 'sylphx.agents.v1.FunctionTool'],
309
+ ['client', 'client', 'sylphx.agents.v1.ClientTool'],
310
+ ],
311
+ 'sylphx.agents.v1.ToolCall': [
312
+ ['input', 'input', undefined, 'json'],
313
+ ['modelCallId', 'model_call_id'],
314
+ ],
315
+ 'sylphx.agents.v1.ToolCatalogRequest': [],
316
+ 'sylphx.agents.v1.ToolCatalogResponse': [
317
+ ['tools', 'tools', 'sylphx.agents.v1.CatalogTool'],
318
+ ],
319
+ 'sylphx.agents.v1.ToolPolicy': [
320
+ ['defaultDecision', 'default_decision'],
321
+ ['rules', 'rules', 'sylphx.agents.v1.ToolPolicyRule'],
322
+ ['approvalTimeout', 'approval_timeout'],
323
+ ['egressAllowHosts', 'egress_allow_hosts'],
324
+ ],
325
+ 'sylphx.agents.v1.ToolPolicyRule': [],
326
+ 'sylphx.agents.v1.ToolResult': [
327
+ ['callId', 'call_id'],
328
+ ['output', 'output', undefined, 'json'],
329
+ ],
330
+ 'sylphx.agents.v1.TurnResult': [
331
+ ['isError', 'is_error'],
332
+ ['usage', 'usage', 'sylphx.agents.v1.TurnTokenUsage'],
333
+ ['costMicros', 'cost_micros'],
334
+ ],
335
+ 'sylphx.agents.v1.TurnTokenUsage': [
336
+ ['inputTokens', 'input_tokens'],
337
+ ['outputTokens', 'output_tokens'],
338
+ ['cacheReadTokens', 'cache_read_tokens'],
339
+ ['cacheWriteTokens', 'cache_write_tokens'],
340
+ ],
341
+ 'sylphx.agents.v1.UpdateAgentRequest': [
342
+ ['agent', 'agent', 'sylphx.agents.v1.Agent'],
343
+ ['updateMask', 'update_mask'],
344
+ ['allowMissing', 'allow_missing'],
345
+ ['validateOnly', 'validate_only'],
346
+ ],
347
+ 'sylphx.agents.v1.UpdateMemoryRequest': [
348
+ ['memory', 'memory', 'sylphx.agents.v1.Memory'],
349
+ ['updateMask', 'update_mask'],
350
+ ['validateOnly', 'validate_only'],
351
+ ],
352
+ 'sylphx.agents.v1.UpdateMemoryStoreRequest': [
353
+ ['memoryStore', 'memory_store', 'sylphx.agents.v1.MemoryStore'],
354
+ ['updateMask', 'update_mask'],
355
+ ['allowMissing', 'allow_missing'],
356
+ ['validateOnly', 'validate_only'],
357
+ ],
358
+ });
359
+ /**
360
+ * AgentsService is Sylphx Agents, the platform's hosted agent runtime
361
+ * (ADR-01M495TCCBZGSQ68A4P4G428H2). Apps call it instead of building their
362
+ * own agent loop, session store, memory and credential handling.
363
+ *
364
+ * Scopes: `agents:read` and `agents:write` manage agents, versions and
365
+ * memory stores with a secret key. `agents:sessions` runs sessions and reads
366
+ * and deletes session and memory records. All methods currently require a
367
+ * secret key. Publishable-key access is deferred until the backend enforces
368
+ * end-user ownership of sessions and memories and `end_user_access` on Agents.
369
+ * Credential actions capture existing grants; handles are not CRUD resources.
370
+ *
371
+ * Namespace of Sylphx Agents on `Sylphx`.
372
+ */
373
+ export class AgentsApi {
374
+ /** The `agents` collection. */
375
+ agents;
376
+ /** The `agent_versions` collection. */
377
+ agentVersions;
378
+ /** The `agent_sessions` collection. */
379
+ agentSessions;
380
+ /** The `session_events` collection. */
381
+ sessionEvents;
382
+ /** The `memory_stores` collection. */
383
+ memoryStores;
384
+ /** The `memories` collection. */
385
+ memories;
386
+ constructor(client) {
387
+ this.agents = new AgentsCollection(client);
388
+ this.agentVersions = new AgentVersionsCollection(client);
389
+ this.agentSessions = new AgentSessionsCollection(client);
390
+ this.sessionEvents = new SessionEventsCollection(client);
391
+ this.memoryStores = new MemoryStoresCollection(client);
392
+ this.memories = new MemoriesCollection(client);
393
+ }
394
+ }
395
+ /** `agents` of Sylphx Agents: Resource type `agents.sylphx.com/Agent`. */
396
+ export class AgentsCollection {
397
+ client;
398
+ constructor(client) {
399
+ this.client = client;
400
+ }
401
+ /**
402
+ * Captures an existing grant for one session and purpose; never issues a key.
403
+ *
404
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:capture-credential` · permission `agents:sessions` · effect `write`
405
+ *
406
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
407
+ */
408
+ async captureCredential(request) {
409
+ return this.client.call({
410
+ method: 'POST',
411
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents:capture-credential`,
412
+ body: runtime.omit(request, ['parent']),
413
+ bodyType: 'sylphx.agents.v1.CaptureCredentialRequest',
414
+ responseType: 'sylphx.agents.v1.CredentialHandle',
415
+ mutation: true,
416
+ });
417
+ }
418
+ /**
419
+ * Rotates the captured value under the same handle with generation fencing.
420
+ *
421
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:rotate-credential` · permission `agents:sessions` · effect `write`
422
+ *
423
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
424
+ */
425
+ async rotateCredential(request) {
426
+ return this.client.call({
427
+ method: 'POST',
428
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents:rotate-credential`,
429
+ body: runtime.omit(request, ['parent']),
430
+ bodyType: 'sylphx.agents.v1.RotateCredentialRequest',
431
+ responseType: 'sylphx.agents.v1.CredentialHandle',
432
+ mutation: true,
433
+ });
434
+ }
435
+ /**
436
+ * Revokes one captured handle. Repeating the revocation is harmless.
437
+ *
438
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:revoke-credential` · permission `agents:sessions` · effect `write`
439
+ *
440
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
441
+ */
442
+ async revokeCredential(request) {
443
+ return this.client.call({
444
+ method: 'POST',
445
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents:revoke-credential`,
446
+ body: runtime.omit(request, ['parent']),
447
+ bodyType: 'sylphx.agents.v1.RevokeCredentialRequest',
448
+ mutation: true,
449
+ });
450
+ }
451
+ /**
452
+ * Gets an agent.
453
+ *
454
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:read` · effect `read`
455
+ *
456
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
457
+ */
458
+ async get(request) {
459
+ return this.client.call({
460
+ method: 'GET',
461
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agents/*', 'name')}`,
462
+ responseType: 'sylphx.agents.v1.Agent',
463
+ mutation: false,
464
+ });
465
+ }
466
+ /**
467
+ * Lists agents.
468
+ *
469
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/agents` · permission `agents:read` · effect `read`
470
+ *
471
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
472
+ */
473
+ async list(request) {
474
+ return this.client.call({
475
+ method: 'GET',
476
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents`,
477
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
478
+ responseType: 'sylphx.agents.v1.ListAgentsResponse',
479
+ mutation: false,
480
+ });
481
+ }
482
+ /** Every item of every page of `list`. */
483
+ async *listAll(request) {
484
+ let next = request;
485
+ for (;;) {
486
+ const page = await this.list(next);
487
+ yield* page.agents ?? [];
488
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
489
+ return;
490
+ next = { ...request, pageToken: page.nextPageToken };
491
+ }
492
+ }
493
+ /**
494
+ * Creates an agent and its version 1.
495
+ *
496
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents` · permission `agents:write` · effect `write`
497
+ *
498
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
499
+ */
500
+ async create(request) {
501
+ return this.client.call({
502
+ method: 'POST',
503
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents`,
504
+ query: { agent_id: request.agentId, validate_only: request.validateOnly },
505
+ body: request.agent ?? {},
506
+ bodyType: 'sylphx.agents.v1.Agent',
507
+ responseType: 'sylphx.agents.v1.Agent',
508
+ mutation: true,
509
+ });
510
+ }
511
+ /**
512
+ * Updates an agent. A change to `spec` mints the next AgentVersion;
513
+ * sessions already started keep the version they pinned.
514
+ *
515
+ * `PATCH /v1/{agent.name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:write` · effect `write`
516
+ *
517
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
518
+ */
519
+ async update(request) {
520
+ return this.client.call({
521
+ method: 'PATCH',
522
+ path: `/v1/${runtime.pathParam(request.agent?.name, 'orgs/*/projects/*/envs/*/agents/*', 'agent.name')}`,
523
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
524
+ body: request.agent ?? {},
525
+ bodyType: 'sylphx.agents.v1.Agent',
526
+ responseType: 'sylphx.agents.v1.Agent',
527
+ mutation: true,
528
+ });
529
+ }
530
+ /**
531
+ * Deletes an agent and its versions. An agent with sessions is refused
532
+ * with `INVALID_STATE` unless `force` is set, which deletes them too.
533
+ *
534
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:write` · effect `destructive`
535
+ *
536
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
537
+ */
538
+ async delete(request) {
539
+ return this.client.call({
540
+ method: 'DELETE',
541
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agents/*', 'name')}`,
542
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
543
+ mutation: true,
544
+ });
545
+ }
546
+ /**
547
+ * Atomically admits a pinned task session, initial event and pending turn.
548
+ *
549
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}:run` · permission `agents:sessions` · effect `write`
550
+ *
551
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
552
+ */
553
+ async run(request) {
554
+ return this.client.call({
555
+ method: 'POST',
556
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agents/*', 'name')}:run`,
557
+ body: runtime.omit(request, ['name']),
558
+ bodyType: 'sylphx.agents.v1.RunAgentRequest',
559
+ responseType: 'sylphx.agents.v1.RunAgentResponse',
560
+ mutation: true,
561
+ });
562
+ }
563
+ }
564
+ /** `agent_versions` of Sylphx Agents: Resource type `agents.sylphx.com/AgentVersion`. */
565
+ export class AgentVersionsCollection {
566
+ client;
567
+ constructor(client) {
568
+ this.client = client;
569
+ }
570
+ /**
571
+ * Gets an agent version.
572
+ *
573
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*\/agent_versions/*}` · permission `agents:read` · effect `read`
574
+ *
575
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
576
+ */
577
+ async get(request) {
578
+ return this.client.call({
579
+ method: 'GET',
580
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agents/*/agent_versions/*', 'name')}`,
581
+ responseType: 'sylphx.agents.v1.AgentVersion',
582
+ mutation: false,
583
+ });
584
+ }
585
+ /**
586
+ * Lists an agent's versions, newest first.
587
+ *
588
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agents/*}/agent_versions` · permission `agents:read` · effect `read`
589
+ *
590
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
591
+ */
592
+ async list(request) {
593
+ return this.client.call({
594
+ method: 'GET',
595
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/agents/*', 'parent')}/agent_versions`,
596
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
597
+ responseType: 'sylphx.agents.v1.ListAgentVersionsResponse',
598
+ mutation: false,
599
+ });
600
+ }
601
+ /** Every item of every page of `list`. */
602
+ async *listAll(request) {
603
+ let next = request;
604
+ for (;;) {
605
+ const page = await this.list(next);
606
+ yield* page.agentVersions ?? [];
607
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
608
+ return;
609
+ next = { ...request, pageToken: page.nextPageToken };
610
+ }
611
+ }
612
+ }
613
+ /** `agent_sessions` of Sylphx Agents: Resource type `agents.sylphx.com/AgentSession`. */
614
+ export class AgentSessionsCollection {
615
+ client;
616
+ constructor(client) {
617
+ this.client = client;
618
+ }
619
+ /**
620
+ * Guest execution capability authentication, not an Access management key.
621
+ * Preserve any JSON tool result, including scalars and arrays.
622
+ *
623
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:invoke-tool` · permission `agents:sessions` · effect `write`
624
+ *
625
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
626
+ */
627
+ async invokeTool(request) {
628
+ return this.client.call({
629
+ method: 'POST',
630
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:invoke-tool`,
631
+ body: runtime.omit(request, ['name']),
632
+ bodyType: 'sylphx.agents.v1.InvokeToolRequest',
633
+ responseType: 'google.protobuf.Value',
634
+ mutation: true,
635
+ });
636
+ }
637
+ /**
638
+ * The immutable pinned HTTP-tool catalog exposed to the guest's MCP bridge.
639
+ *
640
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:tool-catalog` · permission `agents:sessions` · effect `read`
641
+ *
642
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
643
+ */
644
+ async toolCatalog(request) {
645
+ return this.client.call({
646
+ method: 'GET',
647
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:tool-catalog`,
648
+ responseType: 'sylphx.agents.v1.ToolCatalogResponse',
649
+ mutation: false,
650
+ });
651
+ }
652
+ /**
653
+ * Starts a session of an agent, pinned to its current version unless
654
+ * `agent_version` names another. Requires a secret key until end-user
655
+ * ownership is implemented. The session starts idle; `:send` starts its
656
+ * first turn.
657
+ *
658
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agent_sessions` · permission `agents:sessions` · effect `write`
659
+ *
660
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
661
+ */
662
+ async create(request) {
663
+ return this.client.call({
664
+ method: 'POST',
665
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agent_sessions`,
666
+ query: { agent_session_id: request.agentSessionId, validate_only: request.validateOnly },
667
+ body: request.agentSession ?? {},
668
+ bodyType: 'sylphx.agents.v1.AgentSession',
669
+ responseType: 'sylphx.agents.v1.AgentSession',
670
+ mutation: true,
671
+ });
672
+ }
673
+ /**
674
+ * Gets a session.
675
+ *
676
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}` · permission `agents:sessions` · effect `read`
677
+ *
678
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
679
+ */
680
+ async get(request) {
681
+ return this.client.call({
682
+ method: 'GET',
683
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}`,
684
+ responseType: 'sylphx.agents.v1.AgentSession',
685
+ mutation: false,
686
+ });
687
+ }
688
+ /**
689
+ * Lists sessions, newest first. With a publishable key, only the caller's
690
+ * end user's sessions.
691
+ *
692
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/agent_sessions` · permission `agents:sessions` · effect `read`
693
+ *
694
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
695
+ */
696
+ async list(request) {
697
+ return this.client.call({
698
+ method: 'GET',
699
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agent_sessions`,
700
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
701
+ responseType: 'sylphx.agents.v1.ListAgentSessionsResponse',
702
+ mutation: false,
703
+ });
704
+ }
705
+ /** Every item of every page of `list`. */
706
+ async *listAll(request) {
707
+ let next = request;
708
+ for (;;) {
709
+ const page = await this.list(next);
710
+ yield* page.agentSessions ?? [];
711
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
712
+ return;
713
+ next = { ...request, pageToken: page.nextPageToken };
714
+ }
715
+ }
716
+ /**
717
+ * Deletes a session and its events. A session whose turn is running is
718
+ * refused with `INVALID_STATE` unless `force` is set, which interrupts it
719
+ * first.
720
+ *
721
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}` · permission `agents:sessions` · effect `destructive`
722
+ *
723
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
724
+ */
725
+ async delete(request) {
726
+ return this.client.call({
727
+ method: 'DELETE',
728
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}`,
729
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
730
+ mutation: true,
731
+ });
732
+ }
733
+ /**
734
+ * Sends a user message. On an idle or failed session it starts a new turn;
735
+ * while a turn runs it is refused with `INVALID_STATE` (use `:steer`).
736
+ * The same `Idempotency-Key` returns the same event.
737
+ *
738
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:send` · permission `agents:sessions` · effect `write`
739
+ *
740
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `SPEND_LIMIT_REACHED`.
741
+ */
742
+ async send(request) {
743
+ return this.client.call({
744
+ method: 'POST',
745
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:send`,
746
+ body: runtime.omit(request, ['name']),
747
+ bodyType: 'sylphx.agents.v1.SendAgentSessionMessageRequest',
748
+ responseType: 'sylphx.agents.v1.SessionEvent',
749
+ mutation: true,
750
+ });
751
+ }
752
+ /**
753
+ * Sends a message into the running turn; the agent reads it at its next
754
+ * step. On an idle session it is the same as `:send`.
755
+ *
756
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:steer` · permission `agents:sessions` · effect `write`
757
+ *
758
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
759
+ */
760
+ async steer(request) {
761
+ return this.client.call({
762
+ method: 'POST',
763
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:steer`,
764
+ body: runtime.omit(request, ['name']),
765
+ bodyType: 'sylphx.agents.v1.SteerAgentSessionRequest',
766
+ responseType: 'sylphx.agents.v1.SessionEvent',
767
+ mutation: true,
768
+ });
769
+ }
770
+ /**
771
+ * Stops the running turn at its current step. Calls already made keep
772
+ * their results; the session becomes idle. A no-op on an idle session.
773
+ *
774
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:interrupt` · permission `agents:sessions` · effect `write`
775
+ *
776
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
777
+ */
778
+ async interrupt(request) {
779
+ return this.client.call({
780
+ method: 'POST',
781
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:interrupt`,
782
+ body: runtime.omit(request, ['name']),
783
+ bodyType: 'sylphx.agents.v1.InterruptAgentSessionRequest',
784
+ responseType: 'sylphx.agents.v1.AgentSession',
785
+ mutation: true,
786
+ });
787
+ }
788
+ /**
789
+ * Answers a tool call waiting for approval; the turn continues.
790
+ *
791
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:decideApproval` · permission `agents:sessions` · effect `write`
792
+ *
793
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
794
+ */
795
+ async decideApproval(request) {
796
+ return this.client.call({
797
+ method: 'POST',
798
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:decideApproval`,
799
+ body: runtime.omit(request, ['name']),
800
+ bodyType: 'sylphx.agents.v1.DecideAgentSessionApprovalRequest',
801
+ responseType: 'sylphx.agents.v1.SessionEvent',
802
+ mutation: true,
803
+ });
804
+ }
805
+ /**
806
+ * Returns the result of a client tool call; the turn continues.
807
+ *
808
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:submitToolResult` · permission `agents:sessions` · effect `write`
809
+ *
810
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
811
+ */
812
+ async submitToolResult(request) {
813
+ return this.client.call({
814
+ method: 'POST',
815
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:submitToolResult`,
816
+ body: runtime.omit(request, ['name']),
817
+ bodyType: 'sylphx.agents.v1.SubmitAgentSessionToolResultRequest',
818
+ responseType: 'sylphx.agents.v1.SessionEvent',
819
+ mutation: true,
820
+ });
821
+ }
822
+ }
823
+ /** `session_events` of Sylphx Agents: Resource type `agents.sylphx.com/SessionEvent`. */
824
+ export class SessionEventsCollection {
825
+ client;
826
+ constructor(client) {
827
+ this.client = client;
828
+ }
829
+ /**
830
+ * Gets a session event.
831
+ *
832
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/session_events/*}` · permission `agents:sessions` · effect `read`
833
+ *
834
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
835
+ */
836
+ async get(request) {
837
+ return this.client.call({
838
+ method: 'GET',
839
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/session_events/*', 'name')}`,
840
+ responseType: 'sylphx.agents.v1.SessionEvent',
841
+ mutation: false,
842
+ });
843
+ }
844
+ /**
845
+ * Lists a session's events in sequence order. To follow a session, call
846
+ * again with the filter `sequence > N`, N the last sequence read; `wait`
847
+ * holds the call open until a newer event is appended or the wait ends.
848
+ *
849
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agent_sessions/*}/session_events` · permission `agents:sessions` · effect `read`
850
+ *
851
+ * Errors: `RESOURCE_NOT_FOUND`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
852
+ */
853
+ async list(request) {
854
+ return this.client.call({
855
+ method: 'GET',
856
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'parent')}/session_events`,
857
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, wait: request.wait },
858
+ responseType: 'sylphx.agents.v1.ListSessionEventsResponse',
859
+ mutation: false,
860
+ });
861
+ }
862
+ /** Every item of every page of `list`. */
863
+ async *listAll(request) {
864
+ let next = request;
865
+ for (;;) {
866
+ const page = await this.list(next);
867
+ yield* page.sessionEvents ?? [];
868
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
869
+ return;
870
+ next = { ...request, pageToken: page.nextPageToken };
871
+ }
872
+ }
873
+ }
874
+ /** `memory_stores` of Sylphx Agents: Resource type `agents.sylphx.com/MemoryStore`. */
875
+ export class MemoryStoresCollection {
876
+ client;
877
+ constructor(client) {
878
+ this.client = client;
879
+ }
880
+ /**
881
+ * Gets a memory store.
882
+ *
883
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:read` · effect `read`
884
+ *
885
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
886
+ */
887
+ async get(request) {
888
+ return this.client.call({
889
+ method: 'GET',
890
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/memory_stores/*', 'name')}`,
891
+ responseType: 'sylphx.agents.v1.MemoryStore',
892
+ mutation: false,
893
+ });
894
+ }
895
+ /**
896
+ * Lists memory stores.
897
+ *
898
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/memory_stores` · permission `agents:read` · effect `read`
899
+ *
900
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
901
+ */
902
+ async list(request) {
903
+ return this.client.call({
904
+ method: 'GET',
905
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/memory_stores`,
906
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
907
+ responseType: 'sylphx.agents.v1.ListMemoryStoresResponse',
908
+ mutation: false,
909
+ });
910
+ }
911
+ /** Every item of every page of `list`. */
912
+ async *listAll(request) {
913
+ let next = request;
914
+ for (;;) {
915
+ const page = await this.list(next);
916
+ yield* page.memoryStores ?? [];
917
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
918
+ return;
919
+ next = { ...request, pageToken: page.nextPageToken };
920
+ }
921
+ }
922
+ /**
923
+ * Creates a memory store.
924
+ *
925
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/memory_stores` · permission `agents:write` · effect `write`
926
+ *
927
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
928
+ */
929
+ async create(request) {
930
+ return this.client.call({
931
+ method: 'POST',
932
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/memory_stores`,
933
+ query: { memory_store_id: request.memoryStoreId, validate_only: request.validateOnly },
934
+ body: request.memoryStore ?? {},
935
+ bodyType: 'sylphx.agents.v1.MemoryStore',
936
+ responseType: 'sylphx.agents.v1.MemoryStore',
937
+ mutation: true,
938
+ });
939
+ }
940
+ /**
941
+ * Updates a memory store.
942
+ *
943
+ * `PATCH /v1/{memory_store.name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:write` · effect `write`
944
+ *
945
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
946
+ */
947
+ async update(request) {
948
+ return this.client.call({
949
+ method: 'PATCH',
950
+ path: `/v1/${runtime.pathParam(request.memoryStore?.name, 'orgs/*/projects/*/envs/*/memory_stores/*', 'memory_store.name')}`,
951
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
952
+ body: request.memoryStore ?? {},
953
+ bodyType: 'sylphx.agents.v1.MemoryStore',
954
+ responseType: 'sylphx.agents.v1.MemoryStore',
955
+ mutation: true,
956
+ });
957
+ }
958
+ /**
959
+ * Deletes a memory store. A store an agent names is refused with
960
+ * `RESOURCE_IN_USE`; a store with memories is refused with `INVALID_STATE`
961
+ * unless `force` is set, which deletes them too.
962
+ *
963
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:write` · effect `destructive`
964
+ *
965
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `RESOURCE_IN_USE`.
966
+ */
967
+ async delete(request) {
968
+ return this.client.call({
969
+ method: 'DELETE',
970
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/memory_stores/*', 'name')}`,
971
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
972
+ mutation: true,
973
+ });
974
+ }
975
+ }
976
+ /** `memories` of Sylphx Agents: Resource type `agents.sylphx.com/Memory`. */
977
+ export class MemoriesCollection {
978
+ client;
979
+ constructor(client) {
980
+ this.client = client;
981
+ }
982
+ /**
983
+ * Gets a memory.
984
+ *
985
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:sessions` · effect `read`
986
+ *
987
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
988
+ */
989
+ async get(request) {
990
+ return this.client.call({
991
+ method: 'GET',
992
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/memory_stores/*/memories/*', 'name')}`,
993
+ responseType: 'sylphx.agents.v1.Memory',
994
+ mutation: false,
995
+ });
996
+ }
997
+ /**
998
+ * Lists a store's memories, newest first. With a publishable key, only the
999
+ * caller's end user's memories.
1000
+ *
1001
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories` · permission `agents:sessions` · effect `read`
1002
+ *
1003
+ * Errors: `RESOURCE_NOT_FOUND`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1004
+ */
1005
+ async list(request) {
1006
+ return this.client.call({
1007
+ method: 'GET',
1008
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/memory_stores/*', 'parent')}/memories`,
1009
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
1010
+ responseType: 'sylphx.agents.v1.ListMemoriesResponse',
1011
+ mutation: false,
1012
+ });
1013
+ }
1014
+ /** Every item of every page of `list`. */
1015
+ async *listAll(request) {
1016
+ let next = request;
1017
+ for (;;) {
1018
+ const page = await this.list(next);
1019
+ yield* page.memories ?? [];
1020
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1021
+ return;
1022
+ next = { ...request, pageToken: page.nextPageToken };
1023
+ }
1024
+ }
1025
+ /**
1026
+ * Writes a memory.
1027
+ *
1028
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories` · permission `agents:write` · effect `write`
1029
+ *
1030
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1031
+ */
1032
+ async create(request) {
1033
+ return this.client.call({
1034
+ method: 'POST',
1035
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/memory_stores/*', 'parent')}/memories`,
1036
+ query: { memory_id: request.memoryId, validate_only: request.validateOnly },
1037
+ body: request.memory ?? {},
1038
+ bodyType: 'sylphx.agents.v1.Memory',
1039
+ responseType: 'sylphx.agents.v1.Memory',
1040
+ mutation: true,
1041
+ });
1042
+ }
1043
+ /**
1044
+ * Changes a memory's content.
1045
+ *
1046
+ * `PATCH /v1/{memory.name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:write` · effect `write`
1047
+ *
1048
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1049
+ */
1050
+ async update(request) {
1051
+ return this.client.call({
1052
+ method: 'PATCH',
1053
+ path: `/v1/${runtime.pathParam(request.memory?.name, 'orgs/*/projects/*/envs/*/memory_stores/*/memories/*', 'memory.name')}`,
1054
+ query: { update_mask: request.updateMask, validate_only: request.validateOnly },
1055
+ body: request.memory ?? {},
1056
+ bodyType: 'sylphx.agents.v1.Memory',
1057
+ responseType: 'sylphx.agents.v1.Memory',
1058
+ mutation: true,
1059
+ });
1060
+ }
1061
+ /**
1062
+ * Deletes a memory. An end user may delete their own.
1063
+ *
1064
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:sessions` · effect `destructive`
1065
+ *
1066
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1067
+ */
1068
+ async delete(request) {
1069
+ return this.client.call({
1070
+ method: 'DELETE',
1071
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/memory_stores/*/memories/*', 'name')}`,
1072
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1073
+ mutation: true,
1074
+ });
1075
+ }
1076
+ /**
1077
+ * Recalls the memories that best match a query, by hybrid full-text and
1078
+ * vector search. With a publishable key, only the caller's end user's
1079
+ * memories. A read with a request body, like a query.
1080
+ *
1081
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories:search` · permission `agents:sessions` · effect `read`
1082
+ *
1083
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
1084
+ */
1085
+ async search(request) {
1086
+ return this.client.call({
1087
+ method: 'POST',
1088
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/memory_stores/*', 'parent')}/memories:search`,
1089
+ body: runtime.omit(request, ['parent']),
1090
+ bodyType: 'sylphx.agents.v1.SearchMemoriesRequest',
1091
+ responseType: 'sylphx.agents.v1.SearchMemoriesResponse',
1092
+ mutation: true,
1093
+ });
1094
+ }
1095
+ }
1096
+ //# sourceMappingURL=agents.js.map