@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
package/dist/agents.js ADDED
@@ -0,0 +1,1367 @@
1
+ // @generated by sylphx-gen. 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.AgentModels': [],
18
+ 'sylphx.agents.v1.AgentSession': [
19
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
20
+ ['agentVersion', 'agent_version'],
21
+ ['endUser', 'end_user'],
22
+ ['turnCount', 'turn_count'],
23
+ ['lastEventSequence', 'last_event_sequence'],
24
+ ['createTime', 'create_time'],
25
+ ['updateTime', 'update_time'],
26
+ ['usage', 'usage', 'sylphx.agents.v1.SessionUsage'],
27
+ ['environmentLease', 'environment_lease'],
28
+ ['environment', 'environment', 'sylphx.agents.v1.EnvironmentSpec'],
29
+ ['credentials', 'credentials', 'sylphx.agents.v1.CredentialBinding', 'map'],
30
+ ['profiles', 'profiles', 'sylphx.agents.v1.ProfileMount'],
31
+ ['archiveTime', 'archive_time'],
32
+ ['organizationContext', 'organization_context', undefined, 'json'],
33
+ ['organizationLayer', 'organization_layer', 'sylphx.agents.v1.OrganizationLayer'],
34
+ ],
35
+ 'sylphx.agents.v1.AgentSpec': [
36
+ ['tools', 'tools', 'sylphx.agents.v1.Tool'],
37
+ ['mcpServers', 'mcp_servers', 'sylphx.agents.v1.McpServer'],
38
+ ['skills', 'skills', 'sylphx.agents.v1.Skill'],
39
+ ['memoryStores', 'memory_stores'],
40
+ ['toolPolicy', 'tool_policy', 'sylphx.agents.v1.ToolPolicy'],
41
+ ['budget', 'budget', 'sylphx.agents.v1.AgentBudget'],
42
+ ['endUserAccess', 'end_user_access'],
43
+ ['environment', 'environment', 'sylphx.agents.v1.EnvironmentSpec'],
44
+ ['models', 'models', 'sylphx.agents.v1.AgentModels'],
45
+ ['readOnly', 'read_only'],
46
+ ],
47
+ 'sylphx.agents.v1.AgentStatus': [
48
+ ['observedGeneration', 'observed_generation'],
49
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
50
+ ['currentVersion', 'current_version'],
51
+ ['currentVersionNumber', 'current_version_number'],
52
+ ],
53
+ 'sylphx.agents.v1.AgentVersion': [
54
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
55
+ ['versionNumber', 'version_number'],
56
+ ['spec', 'spec', 'sylphx.agents.v1.AgentSpec'],
57
+ ['agentGeneration', 'agent_generation'],
58
+ ['createTime', 'create_time'],
59
+ ],
60
+ 'sylphx.agents.v1.Approval': [
61
+ ['callId', 'call_id'],
62
+ ],
63
+ 'sylphx.agents.v1.ArchiveAgentSessionRequest': [],
64
+ 'sylphx.agents.v1.BuiltinTool': [
65
+ ['config', 'config', undefined, 'json'],
66
+ ],
67
+ 'sylphx.agents.v1.CaptureCredentialRequest': [
68
+ ['expiresAt', 'expires_at'],
69
+ ['allowedTools', 'allowed_tools'],
70
+ ],
71
+ 'sylphx.agents.v1.CatalogTool': [
72
+ ['inputSchema', 'input_schema', undefined, 'json'],
73
+ ],
74
+ 'sylphx.agents.v1.ClientTool': [],
75
+ 'sylphx.agents.v1.CompletionCall': [
76
+ ['arguments', 'arguments', undefined, 'json'],
77
+ ['resultFields', 'result_fields', undefined, 'map'],
78
+ ],
79
+ 'sylphx.agents.v1.ContentPart': [
80
+ ['file', 'file', 'sylphx.agents.v1.FileRef'],
81
+ ],
82
+ 'sylphx.agents.v1.CreateAgentRequest': [
83
+ ['agentId', 'agent_id'],
84
+ ['agent', 'agent', 'sylphx.agents.v1.Agent'],
85
+ ['validateOnly', 'validate_only'],
86
+ ],
87
+ 'sylphx.agents.v1.CreateAgentSessionRequest': [
88
+ ['agentSessionId', 'agent_session_id'],
89
+ ['agentSession', 'agent_session', 'sylphx.agents.v1.AgentSession'],
90
+ ['validateOnly', 'validate_only'],
91
+ ],
92
+ 'sylphx.agents.v1.CreateMemoryRequest': [
93
+ ['memoryId', 'memory_id'],
94
+ ['memory', 'memory', 'sylphx.agents.v1.Memory'],
95
+ ['validateOnly', 'validate_only'],
96
+ ],
97
+ 'sylphx.agents.v1.CreateMemoryStoreRequest': [
98
+ ['memoryStoreId', 'memory_store_id'],
99
+ ['memoryStore', 'memory_store', 'sylphx.agents.v1.MemoryStore'],
100
+ ['validateOnly', 'validate_only'],
101
+ ],
102
+ 'sylphx.agents.v1.CreateOwnerPoolRequest': [
103
+ ['ownerPoolId', 'owner_pool_id'],
104
+ ['ownerPool', 'owner_pool', 'sylphx.agents.v1.OwnerPool'],
105
+ ],
106
+ 'sylphx.agents.v1.CredentialBinding': [
107
+ ['endUserProvider', 'end_user_provider'],
108
+ ],
109
+ 'sylphx.agents.v1.CredentialHandle': [
110
+ ['expiresAt', 'expires_at'],
111
+ ],
112
+ 'sylphx.agents.v1.DecideAgentSessionApprovalRequest': [
113
+ ['callId', 'call_id'],
114
+ ],
115
+ 'sylphx.agents.v1.DeleteAgentRequest': [
116
+ ['allowMissing', 'allow_missing'],
117
+ ['validateOnly', 'validate_only'],
118
+ ],
119
+ 'sylphx.agents.v1.DeleteAgentSessionRequest': [
120
+ ['allowMissing', 'allow_missing'],
121
+ ['validateOnly', 'validate_only'],
122
+ ],
123
+ 'sylphx.agents.v1.DeleteMemoryRequest': [
124
+ ['allowMissing', 'allow_missing'],
125
+ ['validateOnly', 'validate_only'],
126
+ ],
127
+ 'sylphx.agents.v1.DeleteMemoryStoreRequest': [
128
+ ['allowMissing', 'allow_missing'],
129
+ ['validateOnly', 'validate_only'],
130
+ ],
131
+ 'sylphx.agents.v1.DeleteOwnerPoolRequest': [],
132
+ 'sylphx.agents.v1.EnvironmentSpec': [
133
+ ['idleStandby', 'idle_standby'],
134
+ ['repo', 'repo', 'sylphx.agents.v1.RepositorySpec'],
135
+ ['egress', 'egress', 'sylphx.sandboxes.v1.LeaseNetwork'],
136
+ ['budget', 'budget', 'sylphx.sandboxes.v1.LeaseBudget'],
137
+ ],
138
+ 'sylphx.agents.v1.ErrorEvent': [],
139
+ 'sylphx.agents.v1.FileChange': [
140
+ ['oldPath', 'old_path'],
141
+ ],
142
+ 'sylphx.agents.v1.FileRef': [
143
+ ['mediaType', 'media_type'],
144
+ ],
145
+ 'sylphx.agents.v1.FunctionTool': [],
146
+ 'sylphx.agents.v1.GetAgentRequest': [],
147
+ 'sylphx.agents.v1.GetAgentSessionRequest': [],
148
+ 'sylphx.agents.v1.GetAgentVersionRequest': [],
149
+ 'sylphx.agents.v1.GetMemoryRequest': [],
150
+ 'sylphx.agents.v1.GetMemoryStoreRequest': [],
151
+ 'sylphx.agents.v1.GetOwnerPoolRequest': [],
152
+ 'sylphx.agents.v1.GetSessionEventRequest': [],
153
+ 'sylphx.agents.v1.HttpTool': [
154
+ ['openapiUri', 'openapi_uri'],
155
+ ['openapi', 'openapi', undefined, 'json'],
156
+ ['operationId', 'operation_id'],
157
+ ['credential', 'credential', 'sylphx.agents.v1.CredentialBinding'],
158
+ ],
159
+ 'sylphx.agents.v1.InterruptAgentSessionRequest': [],
160
+ 'sylphx.agents.v1.InvokeToolRequest': [
161
+ ['arguments', 'arguments', undefined, 'json'],
162
+ ['opId', 'op_id'],
163
+ ],
164
+ 'sylphx.agents.v1.ListAgentSessionsRequest': [
165
+ ['pageSize', 'page_size'],
166
+ ['pageToken', 'page_token'],
167
+ ],
168
+ 'sylphx.agents.v1.ListAgentSessionsResponse': [
169
+ ['agentSessions', 'agent_sessions', 'sylphx.agents.v1.AgentSession'],
170
+ ['nextPageToken', 'next_page_token'],
171
+ ],
172
+ 'sylphx.agents.v1.ListAgentVersionsRequest': [
173
+ ['pageSize', 'page_size'],
174
+ ['pageToken', 'page_token'],
175
+ ],
176
+ 'sylphx.agents.v1.ListAgentVersionsResponse': [
177
+ ['agentVersions', 'agent_versions', 'sylphx.agents.v1.AgentVersion'],
178
+ ['nextPageToken', 'next_page_token'],
179
+ ],
180
+ 'sylphx.agents.v1.ListAgentsRequest': [
181
+ ['pageSize', 'page_size'],
182
+ ['pageToken', 'page_token'],
183
+ ['orderBy', 'order_by'],
184
+ ],
185
+ 'sylphx.agents.v1.ListAgentsResponse': [
186
+ ['agents', 'agents', 'sylphx.agents.v1.Agent'],
187
+ ['nextPageToken', 'next_page_token'],
188
+ ],
189
+ 'sylphx.agents.v1.ListMemoriesRequest': [
190
+ ['pageSize', 'page_size'],
191
+ ['pageToken', 'page_token'],
192
+ ],
193
+ 'sylphx.agents.v1.ListMemoriesResponse': [
194
+ ['memories', 'memories', 'sylphx.agents.v1.Memory'],
195
+ ['nextPageToken', 'next_page_token'],
196
+ ],
197
+ 'sylphx.agents.v1.ListMemoryStoresRequest': [
198
+ ['pageSize', 'page_size'],
199
+ ['pageToken', 'page_token'],
200
+ ['orderBy', 'order_by'],
201
+ ],
202
+ 'sylphx.agents.v1.ListMemoryStoresResponse': [
203
+ ['memoryStores', 'memory_stores', 'sylphx.agents.v1.MemoryStore'],
204
+ ['nextPageToken', 'next_page_token'],
205
+ ],
206
+ 'sylphx.agents.v1.ListOwnerPoolsRequest': [
207
+ ['pageSize', 'page_size'],
208
+ ['pageToken', 'page_token'],
209
+ ],
210
+ 'sylphx.agents.v1.ListOwnerPoolsResponse': [
211
+ ['ownerPools', 'owner_pools', 'sylphx.agents.v1.OwnerPool'],
212
+ ['nextPageToken', 'next_page_token'],
213
+ ],
214
+ 'sylphx.agents.v1.ListSessionEventsRequest': [
215
+ ['pageSize', 'page_size'],
216
+ ['pageToken', 'page_token'],
217
+ ],
218
+ 'sylphx.agents.v1.ListSessionEventsResponse': [
219
+ ['sessionEvents', 'session_events', 'sylphx.agents.v1.SessionEvent'],
220
+ ['nextPageToken', 'next_page_token'],
221
+ ],
222
+ 'sylphx.agents.v1.McpServer': [
223
+ ['allowedTools', 'allowed_tools'],
224
+ ['credential', 'credential', 'sylphx.agents.v1.CredentialBinding'],
225
+ ],
226
+ 'sylphx.agents.v1.Memory': [
227
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
228
+ ['endUser', 'end_user'],
229
+ ['provenance', 'provenance', 'sylphx.agents.v1.MemoryProvenance'],
230
+ ['createTime', 'create_time'],
231
+ ['updateTime', 'update_time'],
232
+ ],
233
+ 'sylphx.agents.v1.MemoryMatch': [
234
+ ['memory', 'memory', 'sylphx.agents.v1.Memory'],
235
+ ],
236
+ 'sylphx.agents.v1.MemoryProvenance': [],
237
+ 'sylphx.agents.v1.MemoryStore': [
238
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
239
+ ['spec', 'spec', 'sylphx.agents.v1.MemoryStoreSpec'],
240
+ ['status', 'status', 'sylphx.agents.v1.MemoryStoreStatus'],
241
+ ],
242
+ 'sylphx.agents.v1.MemoryStoreSpec': [
243
+ ['agentWrites', 'agent_writes'],
244
+ ],
245
+ 'sylphx.agents.v1.MemoryStoreStatus': [
246
+ ['observedGeneration', 'observed_generation'],
247
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
248
+ ['memoryCount', 'memory_count'],
249
+ ['storedBytes', 'stored_bytes'],
250
+ ],
251
+ 'sylphx.agents.v1.Message': [
252
+ ['parts', 'parts', 'sylphx.agents.v1.ContentPart'],
253
+ ],
254
+ 'sylphx.agents.v1.ObserveOwnerPoolMemberRequest': [
255
+ ['agentVersion', 'agent_version'],
256
+ ['metrics', 'metrics', undefined, 'map'],
257
+ ],
258
+ 'sylphx.agents.v1.OrganizationLayer': [
259
+ ['skills', 'skills', 'sylphx.agents.v1.OrganizationSkill'],
260
+ ],
261
+ 'sylphx.agents.v1.OrganizationSkill': [],
262
+ 'sylphx.agents.v1.OwnerPool': [
263
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
264
+ ['spec', 'spec', 'sylphx.agents.v1.OwnerPoolSpec'],
265
+ ['status', 'status', 'sylphx.agents.v1.OwnerPoolStatus'],
266
+ ],
267
+ 'sylphx.agents.v1.OwnerPoolAdmission': [
268
+ ['minScores', 'min_scores', undefined, 'map'],
269
+ ['suiteVersion', 'suite_version'],
270
+ ],
271
+ 'sylphx.agents.v1.OwnerPoolDemotionRule': [
272
+ ['maxRegression', 'max_regression'],
273
+ ['minSamples', 'min_samples'],
274
+ ['baselineObservations', 'baseline_observations'],
275
+ ],
276
+ 'sylphx.agents.v1.OwnerPoolMember': [
277
+ ['agentVersion', 'agent_version'],
278
+ ['scores', 'scores', undefined, 'map'],
279
+ ['baseline', 'baseline', undefined, 'map'],
280
+ ['observed', 'observed', undefined, 'map'],
281
+ ['qualifyTime', 'qualify_time'],
282
+ ['demoteTime', 'demote_time'],
283
+ ['updateTime', 'update_time'],
284
+ ['suiteVersion', 'suite_version'],
285
+ ],
286
+ 'sylphx.agents.v1.OwnerPoolSpec': [
287
+ ['admission', 'admission', 'sylphx.agents.v1.OwnerPoolAdmission'],
288
+ ['demotion', 'demotion', 'sylphx.agents.v1.OwnerPoolDemotionRule'],
289
+ ],
290
+ 'sylphx.agents.v1.OwnerPoolStatus': [
291
+ ['observedGeneration', 'observed_generation'],
292
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
293
+ ['members', 'members', 'sylphx.agents.v1.OwnerPoolMember'],
294
+ ],
295
+ 'sylphx.agents.v1.ProfileMount': [],
296
+ 'sylphx.agents.v1.QualifyOwnerPoolMemberRequest': [
297
+ ['agentVersion', 'agent_version'],
298
+ ['scores', 'scores', undefined, 'map'],
299
+ ['suiteVersion', 'suite_version'],
300
+ ],
301
+ 'sylphx.agents.v1.RenewalCall': [
302
+ ['arguments', 'arguments', undefined, 'json'],
303
+ ['cancelField', 'cancel_field'],
304
+ ['reasonField', 'reason_field'],
305
+ ['credentialUpdates', 'credential_updates', undefined, 'map'],
306
+ ['credentialExpiries', 'credential_expiries', undefined, 'map'],
307
+ ['idempotencyArgument', 'idempotency_argument'],
308
+ ],
309
+ 'sylphx.agents.v1.RepositorySpec': [],
310
+ 'sylphx.agents.v1.RevokeCredentialRequest': [],
311
+ 'sylphx.agents.v1.RotateCredentialRequest': [
312
+ ['expiresAt', 'expires_at'],
313
+ ],
314
+ 'sylphx.agents.v1.RunAgentRequest': [
315
+ ['agentVersion', 'agent_version'],
316
+ ['agentSessionId', 'agent_session_id'],
317
+ ['message', 'message', 'sylphx.agents.v1.Message'],
318
+ ['environment', 'environment', 'sylphx.agents.v1.EnvironmentSpec'],
319
+ ['credentials', 'credentials', 'sylphx.agents.v1.CredentialBinding', 'map'],
320
+ ['profiles', 'profiles', 'sylphx.agents.v1.ProfileMount'],
321
+ ['completion', 'completion', 'sylphx.agents.v1.CompletionCall'],
322
+ ['workspaceKnowledge', 'workspace_knowledge', undefined, 'json'],
323
+ ['taskRef', 'task_ref'],
324
+ ['renewal', 'renewal', 'sylphx.agents.v1.RenewalCall'],
325
+ ['runtimeCredentialHandle', 'runtime_credential_handle'],
326
+ ['environmentMask', 'environment_mask'],
327
+ ['itemKey', 'item_key'],
328
+ ['ownerPool', 'owner_pool'],
329
+ ['organizationLayer', 'organization_layer', 'sylphx.agents.v1.OrganizationLayer'],
330
+ ],
331
+ 'sylphx.agents.v1.RunAgentResponse': [
332
+ ['session', 'session', 'sylphx.agents.v1.AgentSession'],
333
+ ['initialEvent', 'initial_event', 'sylphx.agents.v1.SessionEvent'],
334
+ ],
335
+ 'sylphx.agents.v1.SandboxActivity': [
336
+ ['sandboxSeconds', 'sandbox_seconds'],
337
+ ],
338
+ 'sylphx.agents.v1.SearchMemoriesRequest': [
339
+ ['endUser', 'end_user'],
340
+ ['pageSize', 'page_size'],
341
+ ['pageToken', 'page_token'],
342
+ ],
343
+ 'sylphx.agents.v1.SearchMemoriesResponse': [
344
+ ['matches', 'matches', 'sylphx.agents.v1.MemoryMatch'],
345
+ ['nextPageToken', 'next_page_token'],
346
+ ],
347
+ 'sylphx.agents.v1.SendAgentSessionMessageRequest': [
348
+ ['message', 'message', 'sylphx.agents.v1.Message'],
349
+ ],
350
+ 'sylphx.agents.v1.SessionEvent': [
351
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
352
+ ['createTime', 'create_time'],
353
+ ['usage', 'usage', 'sylphx.agents.v1.StepUsage'],
354
+ ['stepKey', 'step_key'],
355
+ ['message', 'message', 'sylphx.agents.v1.Message'],
356
+ ['toolCall', 'tool_call', 'sylphx.agents.v1.ToolCall'],
357
+ ['toolResult', 'tool_result', 'sylphx.agents.v1.ToolResult'],
358
+ ['approval', 'approval', 'sylphx.agents.v1.Approval'],
359
+ ['statusChange', 'status_change', 'sylphx.agents.v1.StatusChange'],
360
+ ['thought', 'thought', 'sylphx.agents.v1.Message'],
361
+ ['fileChange', 'file_change', 'sylphx.agents.v1.FileChange'],
362
+ ['response', 'response', 'sylphx.agents.v1.TurnResult'],
363
+ ['error', 'error', 'sylphx.agents.v1.ErrorEvent'],
364
+ ['sandbox', 'sandbox', 'sylphx.agents.v1.SandboxActivity'],
365
+ ],
366
+ 'sylphx.agents.v1.SessionUsage': [
367
+ ['activeTurnDuration', 'active_turn_duration'],
368
+ ['gatewayCalls', 'gateway_calls'],
369
+ ['spendMicros', 'spend_micros'],
370
+ ],
371
+ 'sylphx.agents.v1.Skill': [],
372
+ 'sylphx.agents.v1.StatusChange': [],
373
+ 'sylphx.agents.v1.SteerAgentSessionRequest': [
374
+ ['message', 'message', 'sylphx.agents.v1.Message'],
375
+ ],
376
+ 'sylphx.agents.v1.StepUsage': [
377
+ ['inputTokens', 'input_tokens'],
378
+ ['cachedTokens', 'cached_tokens'],
379
+ ['outputTokens', 'output_tokens'],
380
+ ['costUsd', 'cost_usd'],
381
+ ['firstDeltaTime', 'first_delta_time'],
382
+ ],
383
+ 'sylphx.agents.v1.SubmitAgentSessionToolResultRequest': [
384
+ ['callId', 'call_id'],
385
+ ['output', 'output', undefined, 'json'],
386
+ ],
387
+ 'sylphx.agents.v1.Tool': [
388
+ ['inputSchema', 'input_schema', undefined, 'json'],
389
+ ['builtin', 'builtin', 'sylphx.agents.v1.BuiltinTool'],
390
+ ['http', 'http', 'sylphx.agents.v1.HttpTool'],
391
+ ['appFunction', 'app_function', 'sylphx.agents.v1.FunctionTool'],
392
+ ['client', 'client', 'sylphx.agents.v1.ClientTool'],
393
+ ['runtimeOnly', 'runtime_only'],
394
+ ],
395
+ 'sylphx.agents.v1.ToolCall': [
396
+ ['input', 'input', undefined, 'json'],
397
+ ['modelCallId', 'model_call_id'],
398
+ ],
399
+ 'sylphx.agents.v1.ToolCatalogRequest': [],
400
+ 'sylphx.agents.v1.ToolCatalogResponse': [
401
+ ['tools', 'tools', 'sylphx.agents.v1.CatalogTool'],
402
+ ],
403
+ 'sylphx.agents.v1.ToolPolicy': [
404
+ ['defaultDecision', 'default_decision'],
405
+ ['rules', 'rules', 'sylphx.agents.v1.ToolPolicyRule'],
406
+ ['approvalTimeout', 'approval_timeout'],
407
+ ['egressAllowHosts', 'egress_allow_hosts'],
408
+ ],
409
+ 'sylphx.agents.v1.ToolPolicyRule': [],
410
+ 'sylphx.agents.v1.ToolResult': [
411
+ ['callId', 'call_id'],
412
+ ['output', 'output', undefined, 'json'],
413
+ ],
414
+ 'sylphx.agents.v1.TurnResult': [
415
+ ['isError', 'is_error'],
416
+ ['usage', 'usage', 'sylphx.agents.v1.TurnTokenUsage'],
417
+ ['costMicros', 'cost_micros'],
418
+ ['firstDeltaTime', 'first_delta_time'],
419
+ ],
420
+ 'sylphx.agents.v1.TurnTokenUsage': [
421
+ ['inputTokens', 'input_tokens'],
422
+ ['outputTokens', 'output_tokens'],
423
+ ['cacheReadTokens', 'cache_read_tokens'],
424
+ ['cacheWriteTokens', 'cache_write_tokens'],
425
+ ],
426
+ 'sylphx.agents.v1.UpdateAgentRequest': [
427
+ ['agent', 'agent', 'sylphx.agents.v1.Agent'],
428
+ ['updateMask', 'update_mask'],
429
+ ['allowMissing', 'allow_missing'],
430
+ ['validateOnly', 'validate_only'],
431
+ ],
432
+ 'sylphx.agents.v1.UpdateMemoryRequest': [
433
+ ['memory', 'memory', 'sylphx.agents.v1.Memory'],
434
+ ['updateMask', 'update_mask'],
435
+ ['validateOnly', 'validate_only'],
436
+ ],
437
+ 'sylphx.agents.v1.UpdateMemoryStoreRequest': [
438
+ ['memoryStore', 'memory_store', 'sylphx.agents.v1.MemoryStore'],
439
+ ['updateMask', 'update_mask'],
440
+ ['allowMissing', 'allow_missing'],
441
+ ['validateOnly', 'validate_only'],
442
+ ],
443
+ 'sylphx.agents.v1.UpdateOwnerPoolRequest': [
444
+ ['ownerPool', 'owner_pool', 'sylphx.agents.v1.OwnerPool'],
445
+ ['updateMask', 'update_mask'],
446
+ ],
447
+ });
448
+ /**
449
+ * AgentsService is Sylphx Agents, the platform's hosted agent runtime
450
+ * (ADR-01M495TCCBZGSQ68A4P4G428H2). Apps call it instead of building their
451
+ * own agent loop, session store, memory and credential handling.
452
+ *
453
+ * Scopes: `agents:read` and `agents:write` manage agents, versions and
454
+ * memory stores with a secret key. `agents:sessions` runs sessions and reads
455
+ * and deletes session and memory records. `agents:admin` governs owner pools
456
+ * (their admission minimums and demotion rules); no wildcard reaches it.
457
+ * `agents:qualify` records admission-suite results and live metrics for
458
+ * owner pool members: a grader's grant, held only by name, and refused to the
459
+ * principal whose create or update minted the version. All methods
460
+ * currently require a secret key. Publishable-key access is deferred until
461
+ * the backend enforces end-user ownership of sessions and memories and
462
+ * `end_user_access` on Agents.
463
+ * Credential actions capture existing grants; handles are not CRUD resources.
464
+ *
465
+ * Namespace of Sylphx Agents on `Sylphx`.
466
+ */
467
+ export class AgentsApi {
468
+ /** The `agents` collection. */
469
+ agents;
470
+ /** The `agent_versions` collection. */
471
+ agentVersions;
472
+ /** The `agent_sessions` collection. */
473
+ agentSessions;
474
+ /** The `session_events` collection. */
475
+ sessionEvents;
476
+ /** The `memory_stores` collection. */
477
+ memoryStores;
478
+ /** The `memories` collection. */
479
+ memories;
480
+ /** The `owner_pools` collection. */
481
+ ownerPools;
482
+ constructor(client) {
483
+ this.agents = new AgentsCollection(client);
484
+ this.agentVersions = new AgentVersionsCollection(client);
485
+ this.agentSessions = new AgentSessionsCollection(client);
486
+ this.sessionEvents = new SessionEventsCollection(client);
487
+ this.memoryStores = new MemoryStoresCollection(client);
488
+ this.memories = new MemoriesCollection(client);
489
+ this.ownerPools = new OwnerPoolsCollection(client);
490
+ }
491
+ }
492
+ /** `agents` of Sylphx Agents: Resource type `agents.sylphx.com/Agent`. */
493
+ export class AgentsCollection {
494
+ client;
495
+ constructor(client) {
496
+ this.client = client;
497
+ }
498
+ /**
499
+ * Captures an existing grant for one session and purpose; never issues a key.
500
+ *
501
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:capture-credential` · permission `agents:sessions` · effect `write`
502
+ *
503
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
504
+ */
505
+ async captureCredential(request) {
506
+ return this.client.call({
507
+ method: 'POST',
508
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents:capture-credential`,
509
+ body: runtime.omit(request, ['parent']),
510
+ bodyType: 'sylphx.agents.v1.CaptureCredentialRequest',
511
+ responseType: 'sylphx.agents.v1.CredentialHandle',
512
+ mutation: true,
513
+ });
514
+ }
515
+ /**
516
+ * Rotates the captured value under the same handle with generation fencing.
517
+ *
518
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:rotate-credential` · permission `agents:sessions` · effect `write`
519
+ *
520
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
521
+ */
522
+ async rotateCredential(request) {
523
+ return this.client.call({
524
+ method: 'POST',
525
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents:rotate-credential`,
526
+ body: runtime.omit(request, ['parent']),
527
+ bodyType: 'sylphx.agents.v1.RotateCredentialRequest',
528
+ responseType: 'sylphx.agents.v1.CredentialHandle',
529
+ mutation: true,
530
+ });
531
+ }
532
+ /**
533
+ * Revokes one captured handle. Repeating the revocation is harmless.
534
+ *
535
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents:revoke-credential` · permission `agents:sessions` · effect `write`
536
+ *
537
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
538
+ */
539
+ async revokeCredential(request) {
540
+ return this.client.call({
541
+ method: 'POST',
542
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents:revoke-credential`,
543
+ body: runtime.omit(request, ['parent']),
544
+ bodyType: 'sylphx.agents.v1.RevokeCredentialRequest',
545
+ mutation: true,
546
+ });
547
+ }
548
+ /**
549
+ * Gets an agent.
550
+ *
551
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:read` · effect `read`
552
+ *
553
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
554
+ */
555
+ async get(request) {
556
+ return this.client.call({
557
+ method: 'GET',
558
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agents/*', 'name')}`,
559
+ responseType: 'sylphx.agents.v1.Agent',
560
+ mutation: false,
561
+ });
562
+ }
563
+ /**
564
+ * Lists agents.
565
+ *
566
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/agents` · permission `agents:read` · effect `read`
567
+ *
568
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
569
+ */
570
+ async list(request) {
571
+ return this.client.call({
572
+ method: 'GET',
573
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents`,
574
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
575
+ responseType: 'sylphx.agents.v1.ListAgentsResponse',
576
+ mutation: false,
577
+ });
578
+ }
579
+ /** Every item of every page of `list`. */
580
+ async *listAll(request) {
581
+ let next = request;
582
+ for (;;) {
583
+ const page = await this.list(next);
584
+ yield* page.agents ?? [];
585
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
586
+ return;
587
+ next = { ...request, pageToken: page.nextPageToken };
588
+ }
589
+ }
590
+ /**
591
+ * Creates an agent and its version 1.
592
+ *
593
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agents` · permission `agents:write` · effect `write`
594
+ *
595
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
596
+ */
597
+ async create(request) {
598
+ return this.client.call({
599
+ method: 'POST',
600
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agents`,
601
+ query: { agent_id: request.agentId, validate_only: request.validateOnly },
602
+ body: request.agent ?? {},
603
+ bodyType: 'sylphx.agents.v1.Agent',
604
+ responseType: 'sylphx.agents.v1.Agent',
605
+ mutation: true,
606
+ });
607
+ }
608
+ /**
609
+ * Updates an agent. A change to `spec` mints the next AgentVersion;
610
+ * sessions already started keep the version they pinned.
611
+ *
612
+ * `PATCH /v1/{agent.name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:write` · effect `write`
613
+ *
614
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
615
+ */
616
+ async update(request) {
617
+ return this.client.call({
618
+ method: 'PATCH',
619
+ path: `/v1/${runtime.pathParam(request.agent?.name, 'orgs/*/projects/*/envs/*/agents/*', 'agent.name')}`,
620
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
621
+ body: request.agent ?? {},
622
+ bodyType: 'sylphx.agents.v1.Agent',
623
+ responseType: 'sylphx.agents.v1.Agent',
624
+ mutation: true,
625
+ });
626
+ }
627
+ /**
628
+ * Deletes an agent and its versions. An agent with sessions is refused
629
+ * with `INVALID_STATE` unless `force` is set, which deletes them too.
630
+ *
631
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}` · permission `agents:write` · effect `destructive`
632
+ *
633
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
634
+ */
635
+ async delete(request) {
636
+ return this.client.call({
637
+ method: 'DELETE',
638
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agents/*', 'name')}`,
639
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
640
+ mutation: true,
641
+ });
642
+ }
643
+ /**
644
+ * Atomically admits a pinned task session, initial event and pending turn.
645
+ *
646
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}:run` · permission `agents:sessions` · effect `write`
647
+ *
648
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`, `INVALID_STATE`.
649
+ */
650
+ async run(request) {
651
+ return this.client.call({
652
+ method: 'POST',
653
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agents/*', 'name')}:run`,
654
+ body: runtime.omit(request, ['name']),
655
+ bodyType: 'sylphx.agents.v1.RunAgentRequest',
656
+ responseType: 'sylphx.agents.v1.RunAgentResponse',
657
+ mutation: true,
658
+ });
659
+ }
660
+ }
661
+ /** `agent_versions` of Sylphx Agents: Resource type `agents.sylphx.com/AgentVersion`. */
662
+ export class AgentVersionsCollection {
663
+ client;
664
+ constructor(client) {
665
+ this.client = client;
666
+ }
667
+ /**
668
+ * Gets an agent version.
669
+ *
670
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*\/agent_versions/*}` · permission `agents:read` · effect `read`
671
+ *
672
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
673
+ */
674
+ async get(request) {
675
+ return this.client.call({
676
+ method: 'GET',
677
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agents/*/agent_versions/*', 'name')}`,
678
+ responseType: 'sylphx.agents.v1.AgentVersion',
679
+ mutation: false,
680
+ });
681
+ }
682
+ /**
683
+ * Lists an agent's versions, newest first.
684
+ *
685
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agents/*}/agent_versions` · permission `agents:read` · effect `read`
686
+ *
687
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
688
+ */
689
+ async list(request) {
690
+ return this.client.call({
691
+ method: 'GET',
692
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/agents/*', 'parent')}/agent_versions`,
693
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
694
+ responseType: 'sylphx.agents.v1.ListAgentVersionsResponse',
695
+ mutation: false,
696
+ });
697
+ }
698
+ /** Every item of every page of `list`. */
699
+ async *listAll(request) {
700
+ let next = request;
701
+ for (;;) {
702
+ const page = await this.list(next);
703
+ yield* page.agentVersions ?? [];
704
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
705
+ return;
706
+ next = { ...request, pageToken: page.nextPageToken };
707
+ }
708
+ }
709
+ }
710
+ /** `agent_sessions` of Sylphx Agents: Resource type `agents.sylphx.com/AgentSession`. */
711
+ export class AgentSessionsCollection {
712
+ client;
713
+ constructor(client) {
714
+ this.client = client;
715
+ }
716
+ /**
717
+ * Guest execution capability authentication, not an Access management key.
718
+ * Preserve any JSON tool result, including scalars and arrays.
719
+ *
720
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:invoke-tool` · permission `agents:sessions` · effect `write`
721
+ *
722
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
723
+ */
724
+ async invokeTool(request) {
725
+ return this.client.call({
726
+ method: 'POST',
727
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:invoke-tool`,
728
+ body: runtime.omit(request, ['name']),
729
+ bodyType: 'sylphx.agents.v1.InvokeToolRequest',
730
+ responseType: 'google.protobuf.Value',
731
+ mutation: true,
732
+ });
733
+ }
734
+ /**
735
+ * The immutable pinned HTTP-tool catalog exposed to the guest's MCP bridge.
736
+ *
737
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:tool-catalog` · permission `agents:sessions` · effect `read`
738
+ *
739
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`.
740
+ */
741
+ async toolCatalog(request) {
742
+ return this.client.call({
743
+ method: 'GET',
744
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:tool-catalog`,
745
+ responseType: 'sylphx.agents.v1.ToolCatalogResponse',
746
+ mutation: false,
747
+ });
748
+ }
749
+ /**
750
+ * Starts a session of an agent, pinned to its current version unless
751
+ * `agent_version` names another. Requires a secret key until end-user
752
+ * ownership is implemented. The session starts idle; `:send` starts its
753
+ * first turn.
754
+ *
755
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/agent_sessions` · permission `agents:sessions` · effect `write`
756
+ *
757
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
758
+ */
759
+ async create(request) {
760
+ return this.client.call({
761
+ method: 'POST',
762
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agent_sessions`,
763
+ query: { agent_session_id: request.agentSessionId, validate_only: request.validateOnly },
764
+ body: request.agentSession ?? {},
765
+ bodyType: 'sylphx.agents.v1.AgentSession',
766
+ responseType: 'sylphx.agents.v1.AgentSession',
767
+ mutation: true,
768
+ });
769
+ }
770
+ /**
771
+ * Gets a session.
772
+ *
773
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}` · permission `agents:sessions` · effect `read`
774
+ *
775
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
776
+ */
777
+ async get(request) {
778
+ return this.client.call({
779
+ method: 'GET',
780
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}`,
781
+ responseType: 'sylphx.agents.v1.AgentSession',
782
+ mutation: false,
783
+ });
784
+ }
785
+ /**
786
+ * Lists sessions, newest first. With a publishable key, only the caller's
787
+ * end user's sessions.
788
+ *
789
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/agent_sessions` · permission `agents:sessions` · effect `read`
790
+ *
791
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
792
+ */
793
+ async list(request) {
794
+ return this.client.call({
795
+ method: 'GET',
796
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/agent_sessions`,
797
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
798
+ responseType: 'sylphx.agents.v1.ListAgentSessionsResponse',
799
+ mutation: false,
800
+ });
801
+ }
802
+ /** Every item of every page of `list`. */
803
+ async *listAll(request) {
804
+ let next = request;
805
+ for (;;) {
806
+ const page = await this.list(next);
807
+ yield* page.agentSessions ?? [];
808
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
809
+ return;
810
+ next = { ...request, pageToken: page.nextPageToken };
811
+ }
812
+ }
813
+ /**
814
+ * Deletes a session and its events. A session whose turn is running is
815
+ * refused with `INVALID_STATE` unless `force` is set, which interrupts it
816
+ * first.
817
+ *
818
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}` · permission `agents:sessions` · effect `destructive`
819
+ *
820
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
821
+ */
822
+ async delete(request) {
823
+ return this.client.call({
824
+ method: 'DELETE',
825
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}`,
826
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
827
+ mutation: true,
828
+ });
829
+ }
830
+ /**
831
+ * Archives a session: the session and its event log stay readable, but no
832
+ * new turn may start and the session's captured credential handles are
833
+ * revoked. An idle or failed session archives at once; a running turn is
834
+ * refused with `INVALID_STATE` (interrupt it first). Repeating the call
835
+ * with the same `Idempotency-Key` returns the same session.
836
+ *
837
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:archive` · permission `agents:sessions` · effect `write`
838
+ *
839
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
840
+ */
841
+ async archive(request) {
842
+ return this.client.call({
843
+ method: 'POST',
844
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:archive`,
845
+ body: runtime.omit(request, ['name']),
846
+ bodyType: 'sylphx.agents.v1.ArchiveAgentSessionRequest',
847
+ responseType: 'sylphx.agents.v1.AgentSession',
848
+ mutation: true,
849
+ });
850
+ }
851
+ /**
852
+ * Sends a user message. On an idle or failed session it starts a new turn;
853
+ * while a turn runs it is refused with `INVALID_STATE` (use `:steer`).
854
+ * The same `Idempotency-Key` returns the same event.
855
+ *
856
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:send` · permission `agents:sessions` · effect `write`
857
+ *
858
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `SPEND_LIMIT_REACHED`.
859
+ */
860
+ async send(request) {
861
+ return this.client.call({
862
+ method: 'POST',
863
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:send`,
864
+ body: runtime.omit(request, ['name']),
865
+ bodyType: 'sylphx.agents.v1.SendAgentSessionMessageRequest',
866
+ responseType: 'sylphx.agents.v1.SessionEvent',
867
+ mutation: true,
868
+ });
869
+ }
870
+ /**
871
+ * Sends a message into the running turn; the agent reads it at its next
872
+ * step. On an idle session it is the same as `:send`.
873
+ *
874
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:steer` · permission `agents:sessions` · effect `write`
875
+ *
876
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
877
+ */
878
+ async steer(request) {
879
+ return this.client.call({
880
+ method: 'POST',
881
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:steer`,
882
+ body: runtime.omit(request, ['name']),
883
+ bodyType: 'sylphx.agents.v1.SteerAgentSessionRequest',
884
+ responseType: 'sylphx.agents.v1.SessionEvent',
885
+ mutation: true,
886
+ });
887
+ }
888
+ /**
889
+ * Stops the running turn at its current step. Calls already made keep
890
+ * their results; the session becomes idle. A no-op on an idle session.
891
+ *
892
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:interrupt` · permission `agents:sessions` · effect `write`
893
+ *
894
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
895
+ */
896
+ async interrupt(request) {
897
+ return this.client.call({
898
+ method: 'POST',
899
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:interrupt`,
900
+ body: runtime.omit(request, ['name']),
901
+ bodyType: 'sylphx.agents.v1.InterruptAgentSessionRequest',
902
+ responseType: 'sylphx.agents.v1.AgentSession',
903
+ mutation: true,
904
+ });
905
+ }
906
+ /**
907
+ * Answers a tool call waiting for approval; the turn continues.
908
+ *
909
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:decideApproval` · permission `agents:sessions` · effect `write`
910
+ *
911
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
912
+ */
913
+ async decideApproval(request) {
914
+ return this.client.call({
915
+ method: 'POST',
916
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:decideApproval`,
917
+ body: runtime.omit(request, ['name']),
918
+ bodyType: 'sylphx.agents.v1.DecideAgentSessionApprovalRequest',
919
+ responseType: 'sylphx.agents.v1.SessionEvent',
920
+ mutation: true,
921
+ });
922
+ }
923
+ /**
924
+ * Returns the result of a client tool call; the turn continues.
925
+ *
926
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:submitToolResult` · permission `agents:sessions` · effect `write`
927
+ *
928
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
929
+ */
930
+ async submitToolResult(request) {
931
+ return this.client.call({
932
+ method: 'POST',
933
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:submitToolResult`,
934
+ body: runtime.omit(request, ['name']),
935
+ bodyType: 'sylphx.agents.v1.SubmitAgentSessionToolResultRequest',
936
+ responseType: 'sylphx.agents.v1.SessionEvent',
937
+ mutation: true,
938
+ });
939
+ }
940
+ }
941
+ /** `session_events` of Sylphx Agents: Resource type `agents.sylphx.com/SessionEvent`. */
942
+ export class SessionEventsCollection {
943
+ client;
944
+ constructor(client) {
945
+ this.client = client;
946
+ }
947
+ /**
948
+ * Gets a session event.
949
+ *
950
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/session_events/*}` · permission `agents:sessions` · effect `read`
951
+ *
952
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
953
+ */
954
+ async get(request) {
955
+ return this.client.call({
956
+ method: 'GET',
957
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/session_events/*', 'name')}`,
958
+ responseType: 'sylphx.agents.v1.SessionEvent',
959
+ mutation: false,
960
+ });
961
+ }
962
+ /**
963
+ * Lists a session's events in sequence order. To follow a session, call
964
+ * again with the filter `sequence > N`, N the last sequence read; `wait`
965
+ * holds the call open until a newer event is appended or the wait ends.
966
+ *
967
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agent_sessions/*}/session_events` · permission `agents:sessions` · effect `read`
968
+ *
969
+ * Errors: `RESOURCE_NOT_FOUND`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
970
+ */
971
+ async list(request) {
972
+ return this.client.call({
973
+ method: 'GET',
974
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'parent')}/session_events`,
975
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, wait: request.wait },
976
+ responseType: 'sylphx.agents.v1.ListSessionEventsResponse',
977
+ mutation: false,
978
+ });
979
+ }
980
+ /** Every item of every page of `list`. */
981
+ async *listAll(request) {
982
+ let next = request;
983
+ for (;;) {
984
+ const page = await this.list(next);
985
+ yield* page.sessionEvents ?? [];
986
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
987
+ return;
988
+ next = { ...request, pageToken: page.nextPageToken };
989
+ }
990
+ }
991
+ }
992
+ /** `memory_stores` of Sylphx Agents: Resource type `agents.sylphx.com/MemoryStore`. */
993
+ export class MemoryStoresCollection {
994
+ client;
995
+ constructor(client) {
996
+ this.client = client;
997
+ }
998
+ /**
999
+ * Gets a memory store.
1000
+ *
1001
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:read` · effect `read`
1002
+ *
1003
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1004
+ */
1005
+ async get(request) {
1006
+ return this.client.call({
1007
+ method: 'GET',
1008
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/memory_stores/*', 'name')}`,
1009
+ responseType: 'sylphx.agents.v1.MemoryStore',
1010
+ mutation: false,
1011
+ });
1012
+ }
1013
+ /**
1014
+ * Lists memory stores.
1015
+ *
1016
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/memory_stores` · permission `agents:read` · effect `read`
1017
+ *
1018
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1019
+ */
1020
+ async list(request) {
1021
+ return this.client.call({
1022
+ method: 'GET',
1023
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/memory_stores`,
1024
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter, order_by: request.orderBy },
1025
+ responseType: 'sylphx.agents.v1.ListMemoryStoresResponse',
1026
+ mutation: false,
1027
+ });
1028
+ }
1029
+ /** Every item of every page of `list`. */
1030
+ async *listAll(request) {
1031
+ let next = request;
1032
+ for (;;) {
1033
+ const page = await this.list(next);
1034
+ yield* page.memoryStores ?? [];
1035
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1036
+ return;
1037
+ next = { ...request, pageToken: page.nextPageToken };
1038
+ }
1039
+ }
1040
+ /**
1041
+ * Creates a memory store.
1042
+ *
1043
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/memory_stores` · permission `agents:write` · effect `write`
1044
+ *
1045
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1046
+ */
1047
+ async create(request) {
1048
+ return this.client.call({
1049
+ method: 'POST',
1050
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/memory_stores`,
1051
+ query: { memory_store_id: request.memoryStoreId, validate_only: request.validateOnly },
1052
+ body: request.memoryStore ?? {},
1053
+ bodyType: 'sylphx.agents.v1.MemoryStore',
1054
+ responseType: 'sylphx.agents.v1.MemoryStore',
1055
+ mutation: true,
1056
+ });
1057
+ }
1058
+ /**
1059
+ * Updates a memory store.
1060
+ *
1061
+ * `PATCH /v1/{memory_store.name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:write` · effect `write`
1062
+ *
1063
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1064
+ */
1065
+ async update(request) {
1066
+ return this.client.call({
1067
+ method: 'PATCH',
1068
+ path: `/v1/${runtime.pathParam(request.memoryStore?.name, 'orgs/*/projects/*/envs/*/memory_stores/*', 'memory_store.name')}`,
1069
+ query: { update_mask: request.updateMask, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1070
+ body: request.memoryStore ?? {},
1071
+ bodyType: 'sylphx.agents.v1.MemoryStore',
1072
+ responseType: 'sylphx.agents.v1.MemoryStore',
1073
+ mutation: true,
1074
+ });
1075
+ }
1076
+ /**
1077
+ * Deletes a memory store. A store an agent names is refused with
1078
+ * `RESOURCE_IN_USE`; a store with memories is refused with `INVALID_STATE`
1079
+ * unless `force` is set, which deletes them too.
1080
+ *
1081
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*}` · permission `agents:write` · effect `destructive`
1082
+ *
1083
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `RESOURCE_IN_USE`.
1084
+ */
1085
+ async delete(request) {
1086
+ return this.client.call({
1087
+ method: 'DELETE',
1088
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/memory_stores/*', 'name')}`,
1089
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly, force: request.force },
1090
+ mutation: true,
1091
+ });
1092
+ }
1093
+ }
1094
+ /** `memories` of Sylphx Agents: Resource type `agents.sylphx.com/Memory`. */
1095
+ export class MemoriesCollection {
1096
+ client;
1097
+ constructor(client) {
1098
+ this.client = client;
1099
+ }
1100
+ /**
1101
+ * Gets a memory.
1102
+ *
1103
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:sessions` · effect `read`
1104
+ *
1105
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1106
+ */
1107
+ async get(request) {
1108
+ return this.client.call({
1109
+ method: 'GET',
1110
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/memory_stores/*/memories/*', 'name')}`,
1111
+ responseType: 'sylphx.agents.v1.Memory',
1112
+ mutation: false,
1113
+ });
1114
+ }
1115
+ /**
1116
+ * Lists a store's memories, newest first. With a publishable key, only the
1117
+ * caller's end user's memories.
1118
+ *
1119
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories` · permission `agents:sessions` · effect `read`
1120
+ *
1121
+ * Errors: `RESOURCE_NOT_FOUND`, `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1122
+ */
1123
+ async list(request) {
1124
+ return this.client.call({
1125
+ method: 'GET',
1126
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/memory_stores/*', 'parent')}/memories`,
1127
+ query: { page_size: request.pageSize, page_token: request.pageToken, filter: request.filter },
1128
+ responseType: 'sylphx.agents.v1.ListMemoriesResponse',
1129
+ mutation: false,
1130
+ });
1131
+ }
1132
+ /** Every item of every page of `list`. */
1133
+ async *listAll(request) {
1134
+ let next = request;
1135
+ for (;;) {
1136
+ const page = await this.list(next);
1137
+ yield* page.memories ?? [];
1138
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1139
+ return;
1140
+ next = { ...request, pageToken: page.nextPageToken };
1141
+ }
1142
+ }
1143
+ /**
1144
+ * Writes a memory.
1145
+ *
1146
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories` · permission `agents:write` · effect `write`
1147
+ *
1148
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`.
1149
+ */
1150
+ async create(request) {
1151
+ return this.client.call({
1152
+ method: 'POST',
1153
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/memory_stores/*', 'parent')}/memories`,
1154
+ query: { memory_id: request.memoryId, validate_only: request.validateOnly },
1155
+ body: request.memory ?? {},
1156
+ bodyType: 'sylphx.agents.v1.Memory',
1157
+ responseType: 'sylphx.agents.v1.Memory',
1158
+ mutation: true,
1159
+ });
1160
+ }
1161
+ /**
1162
+ * Changes a memory's content.
1163
+ *
1164
+ * `PATCH /v1/{memory.name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:write` · effect `write`
1165
+ *
1166
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1167
+ */
1168
+ async update(request) {
1169
+ return this.client.call({
1170
+ method: 'PATCH',
1171
+ path: `/v1/${runtime.pathParam(request.memory?.name, 'orgs/*/projects/*/envs/*/memory_stores/*/memories/*', 'memory.name')}`,
1172
+ query: { update_mask: request.updateMask, validate_only: request.validateOnly },
1173
+ body: request.memory ?? {},
1174
+ bodyType: 'sylphx.agents.v1.Memory',
1175
+ responseType: 'sylphx.agents.v1.Memory',
1176
+ mutation: true,
1177
+ });
1178
+ }
1179
+ /**
1180
+ * Deletes a memory. An end user may delete their own.
1181
+ *
1182
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/memory_stores/*\/memories/*}` · permission `agents:sessions` · effect `destructive`
1183
+ *
1184
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_STATE`, `ETAG_MISMATCH`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1185
+ */
1186
+ async delete(request) {
1187
+ return this.client.call({
1188
+ method: 'DELETE',
1189
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/memory_stores/*/memories/*', 'name')}`,
1190
+ query: { etag: request.etag, allow_missing: request.allowMissing, validate_only: request.validateOnly },
1191
+ mutation: true,
1192
+ });
1193
+ }
1194
+ /**
1195
+ * Recalls the memories that best match a query, by hybrid full-text and
1196
+ * vector search. With a publishable key, only the caller's end user's
1197
+ * memories. A read with a request body, like a query.
1198
+ *
1199
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/memory_stores/*}/memories:search` · permission `agents:sessions` · effect `read`
1200
+ *
1201
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
1202
+ */
1203
+ async search(request) {
1204
+ return this.client.call({
1205
+ method: 'POST',
1206
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/memory_stores/*', 'parent')}/memories:search`,
1207
+ body: runtime.omit(request, ['parent']),
1208
+ bodyType: 'sylphx.agents.v1.SearchMemoriesRequest',
1209
+ responseType: 'sylphx.agents.v1.SearchMemoriesResponse',
1210
+ mutation: true,
1211
+ });
1212
+ }
1213
+ }
1214
+ /** `owner_pools` of Sylphx Agents: Resource type `agents.sylphx.com/OwnerPool`. */
1215
+ export class OwnerPoolsCollection {
1216
+ client;
1217
+ constructor(client) {
1218
+ this.client = client;
1219
+ }
1220
+ /**
1221
+ * Gets an owner pool with its members.
1222
+ *
1223
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:read` · effect `read`
1224
+ *
1225
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1226
+ */
1227
+ async get(request) {
1228
+ return this.client.call({
1229
+ method: 'GET',
1230
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'name')}`,
1231
+ responseType: 'sylphx.agents.v1.OwnerPool',
1232
+ mutation: false,
1233
+ });
1234
+ }
1235
+ /**
1236
+ * Lists owner pools, newest first.
1237
+ *
1238
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/owner_pools` · permission `agents:read` · effect `read`
1239
+ *
1240
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1241
+ */
1242
+ async list(request) {
1243
+ return this.client.call({
1244
+ method: 'GET',
1245
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/owner_pools`,
1246
+ query: { page_size: request.pageSize, page_token: request.pageToken },
1247
+ responseType: 'sylphx.agents.v1.ListOwnerPoolsResponse',
1248
+ mutation: false,
1249
+ });
1250
+ }
1251
+ /** Every item of every page of `list`. */
1252
+ async *listAll(request) {
1253
+ let next = request;
1254
+ for (;;) {
1255
+ const page = await this.list(next);
1256
+ yield* page.ownerPools ?? [];
1257
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1258
+ return;
1259
+ next = { ...request, pageToken: page.nextPageToken };
1260
+ }
1261
+ }
1262
+ /**
1263
+ * Creates an owner pool with no members. Its minimums and demotion rules
1264
+ * are governance, so the caller needs `agents:admin`.
1265
+ *
1266
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/owner_pools` · permission `agents:admin` · effect `write`
1267
+ *
1268
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1269
+ */
1270
+ async create(request) {
1271
+ return this.client.call({
1272
+ method: 'POST',
1273
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/owner_pools`,
1274
+ query: { owner_pool_id: request.ownerPoolId },
1275
+ body: request.ownerPool ?? {},
1276
+ bodyType: 'sylphx.agents.v1.OwnerPool',
1277
+ responseType: 'sylphx.agents.v1.OwnerPool',
1278
+ mutation: true,
1279
+ });
1280
+ }
1281
+ /**
1282
+ * Replaces an owner pool's spec (`agents:admin`). Members keep their
1283
+ * standing; a changed suite or minimum applies from the next `:qualify`.
1284
+ *
1285
+ * `PATCH /v1/{owner_pool.name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:admin` · effect `write`
1286
+ *
1287
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1288
+ */
1289
+ async update(request) {
1290
+ return this.client.call({
1291
+ method: 'PATCH',
1292
+ path: `/v1/${runtime.pathParam(request.ownerPool?.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'owner_pool.name')}`,
1293
+ query: { update_mask: request.updateMask },
1294
+ body: request.ownerPool ?? {},
1295
+ bodyType: 'sylphx.agents.v1.OwnerPool',
1296
+ responseType: 'sylphx.agents.v1.OwnerPool',
1297
+ mutation: true,
1298
+ });
1299
+ }
1300
+ /**
1301
+ * Deletes an owner pool and its members (`agents:admin`). Sessions already
1302
+ * admitted keep running.
1303
+ *
1304
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:admin` · effect `destructive`
1305
+ *
1306
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1307
+ */
1308
+ async delete(request) {
1309
+ return this.client.call({
1310
+ method: 'DELETE',
1311
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'name')}`,
1312
+ mutation: true,
1313
+ });
1314
+ }
1315
+ /**
1316
+ * Records an admission suite result for an Agent version. The caller holds
1317
+ * `agents:qualify` and is not the principal whose create or update minted
1318
+ * the version (`PERMISSION_DENIED`). Every minimum
1319
+ * met: the member is `QUALIFIED`. Any score missing or below its minimum:
1320
+ * the member is recorded `REFUSED` with the reason. Each qualification is
1321
+ * recorded with its suite, suite version, result and caller; a `result`
1322
+ * already recorded for the member is refused with `INVALID_FIELD`, so a
1323
+ * demoted member returns only with a new suite result. A read-only version
1324
+ * is refused with `PERMISSION_DENIED`; a suite or suite version other than
1325
+ * the pool's with `INVALID_FIELD`. Re-qualifying keeps the member's
1326
+ * baseline: the baseline belongs to the version and its pinned model.
1327
+ *
1328
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}:qualify` · permission `agents:qualify` · effect `write`
1329
+ *
1330
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1331
+ */
1332
+ async qualify(request) {
1333
+ return this.client.call({
1334
+ method: 'POST',
1335
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'name')}:qualify`,
1336
+ body: runtime.omit(request, ['name']),
1337
+ bodyType: 'sylphx.agents.v1.QualifyOwnerPoolMemberRequest',
1338
+ responseType: 'sylphx.agents.v1.OwnerPoolMember',
1339
+ mutation: true,
1340
+ });
1341
+ }
1342
+ /**
1343
+ * Records a live-metric observation for a member and applies the pool's
1344
+ * demotion rules (`agents:qualify`, refused to the version's authors as in
1345
+ * `:qualify`). The platform computes each rule's baseline: the median of
1346
+ * the member's first `baseline_observations` counted observations of the
1347
+ * metric, set only when it is finite and positive. Values of a rule metric
1348
+ * are lower-is-better and must not be negative. Once the baseline is set, a
1349
+ * metric past `baseline * (1 + max_regression)` demotes a qualified member.
1350
+ * Only `:qualify` brings a demoted member back.
1351
+ *
1352
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}:observe` · permission `agents:qualify` · effect `write`
1353
+ *
1354
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1355
+ */
1356
+ async observe(request) {
1357
+ return this.client.call({
1358
+ method: 'POST',
1359
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'name')}:observe`,
1360
+ body: runtime.omit(request, ['name']),
1361
+ bodyType: 'sylphx.agents.v1.ObserveOwnerPoolMemberRequest',
1362
+ responseType: 'sylphx.agents.v1.OwnerPoolMember',
1363
+ mutation: true,
1364
+ });
1365
+ }
1366
+ }
1367
+ //# sourceMappingURL=agents.js.map