@sylphx/sdk 0.32.1 → 0.32.3

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 (123) hide show
  1. package/README.md +105 -0
  2. package/dist/access.d.ts +24 -4
  3. package/dist/access.js +7 -7
  4. package/dist/access.js.map +1 -1
  5. package/dist/agents.d.ts +1048 -26
  6. package/dist/agents.js +771 -5
  7. package/dist/agents.js.map +1 -1
  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.js +1 -1
  25. package/dist/auth/end-user-keys-mock.js.map +1 -1
  26. package/dist/auth/end-user-keys.js +1 -1
  27. package/dist/auth/end-user-keys.js.map +1 -1
  28. package/dist/auth/verify.js +1 -1
  29. package/dist/auth/verify.js.map +1 -1
  30. package/dist/auth.d.ts +169 -0
  31. package/dist/auth.js +135 -1
  32. package/dist/auth.js.map +1 -1
  33. package/dist/billing.d.ts +13 -6
  34. package/dist/billing.js +3 -1
  35. package/dist/billing.js.map +1 -1
  36. package/dist/broker.d.ts +165 -33
  37. package/dist/broker.js +103 -7
  38. package/dist/broker.js.map +1 -1
  39. package/dist/browser-upload.d.ts +101 -0
  40. package/dist/browser-upload.js +130 -0
  41. package/dist/browser-upload.js.map +1 -0
  42. package/dist/build.js +1 -1
  43. package/dist/build.js.map +1 -1
  44. package/dist/common.d.ts +1 -1
  45. package/dist/common.js +1 -1
  46. package/dist/common.js.map +1 -1
  47. package/dist/config/flags.d.ts +12 -2
  48. package/dist/config/flags.js +54 -6
  49. package/dist/config/flags.js.map +1 -1
  50. package/dist/config.d.ts +24 -0
  51. package/dist/config.js +22 -1
  52. package/dist/config.js.map +1 -1
  53. package/dist/connections.d.ts +128 -25
  54. package/dist/connections.js +72 -25
  55. package/dist/connections.js.map +1 -1
  56. package/dist/data.d.ts +306 -13
  57. package/dist/data.js +110 -9
  58. package/dist/data.js.map +1 -1
  59. package/dist/entitlement.js +1 -1
  60. package/dist/entitlement.js.map +1 -1
  61. package/dist/events/realtime.js +1 -1
  62. package/dist/events/realtime.js.map +1 -1
  63. package/dist/events/webhooks.js +1 -1
  64. package/dist/events/webhooks.js.map +1 -1
  65. package/dist/events.d.ts +36 -0
  66. package/dist/events.js +29 -1
  67. package/dist/events.js.map +1 -1
  68. package/dist/flags.d.ts +2 -0
  69. package/dist/flags.js +5 -1
  70. package/dist/flags.js.map +1 -1
  71. package/dist/hosting.d.ts +229 -0
  72. package/dist/hosting.js +168 -1
  73. package/dist/hosting.js.map +1 -1
  74. package/dist/ids.d.ts +75 -0
  75. package/dist/ids.js +16 -1
  76. package/dist/ids.js.map +1 -1
  77. package/dist/index.d.ts +5 -1
  78. package/dist/index.js +14 -2
  79. package/dist/index.js.map +1 -1
  80. package/dist/keys.js +1 -1
  81. package/dist/keys.js.map +1 -1
  82. package/dist/knowledge.d.ts +32 -9
  83. package/dist/knowledge.js +21 -11
  84. package/dist/knowledge.js.map +1 -1
  85. package/dist/localization.js +1 -1
  86. package/dist/localization.js.map +1 -1
  87. package/dist/methods.js +818 -15
  88. package/dist/methods.js.map +1 -1
  89. package/dist/money.d.ts +263 -7
  90. package/dist/money.js +121 -7
  91. package/dist/money.js.map +1 -1
  92. package/dist/network.js +1 -1
  93. package/dist/network.js.map +1 -1
  94. package/dist/notify.d.ts +579 -0
  95. package/dist/notify.js +497 -1
  96. package/dist/notify.js.map +1 -1
  97. package/dist/observability.d.ts +303 -0
  98. package/dist/observability.js +221 -1
  99. package/dist/observability.js.map +1 -1
  100. package/dist/realtime.js +1 -1
  101. package/dist/realtime.js.map +1 -1
  102. package/dist/release.js +1 -1
  103. package/dist/release.js.map +1 -1
  104. package/dist/runners.js +1 -1
  105. package/dist/runners.js.map +1 -1
  106. package/dist/runtime.d.ts +5 -1
  107. package/dist/runtime.js +81 -9
  108. package/dist/runtime.js.map +1 -1
  109. package/dist/sandboxes/stream-mock.d.ts +124 -0
  110. package/dist/sandboxes/stream-mock.js +476 -0
  111. package/dist/sandboxes/stream-mock.js.map +1 -0
  112. package/dist/sandboxes/stream.d.ts +407 -0
  113. package/dist/sandboxes/stream.js +335 -0
  114. package/dist/sandboxes/stream.js.map +1 -0
  115. package/dist/sandboxes.d.ts +137 -26
  116. package/dist/sandboxes.js +46 -4
  117. package/dist/sandboxes.js.map +1 -1
  118. package/dist/secrets.js +1 -1
  119. package/dist/secrets.js.map +1 -1
  120. package/dist/workflows.d.ts +53 -1
  121. package/dist/workflows.js +39 -3
  122. package/dist/workflows.js.map +1 -1
  123. package/package.json +1 -1
package/dist/agents.js CHANGED
@@ -1,9 +1,14 @@
1
- // @generated by sylphx-gen 0.1.0 from contracts@c8a7361c53e572321b0ec9fb014fd1e8279b007b62562423038e0d0e5b9d767a. Do not edit.
1
+ // @generated by sylphx-gen. Do not edit.
2
2
  // `sylphx.agents.v1`.
3
3
  import * as runtime from './runtime.js';
4
4
  import './common.js';
5
5
  import './sandboxes.js';
6
6
  runtime.registerSchemas({
7
+ 'sylphx.agents.v1.AbortAgentSessionTransferRequest': [],
8
+ 'sylphx.agents.v1.AdoptAgentSessionTransferRequest': [
9
+ ['receiptSha256', 'receipt_sha256'],
10
+ ['sourceFenceSha256', 'source_fence_sha256'],
11
+ ],
7
12
  'sylphx.agents.v1.Agent': [
8
13
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
9
14
  ['spec', 'spec', 'sylphx.agents.v1.AgentSpec'],
@@ -14,6 +19,7 @@ runtime.registerSchemas({
14
19
  ['turnTimeout', 'turn_timeout'],
15
20
  ['maxSessionSpendMicros', 'max_session_spend_micros'],
16
21
  ],
22
+ 'sylphx.agents.v1.AgentModels': [],
17
23
  'sylphx.agents.v1.AgentSession': [
18
24
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
19
25
  ['agentVersion', 'agent_version'],
@@ -27,6 +33,38 @@ runtime.registerSchemas({
27
33
  ['environment', 'environment', 'sylphx.agents.v1.EnvironmentSpec'],
28
34
  ['credentials', 'credentials', 'sylphx.agents.v1.CredentialBinding', 'map'],
29
35
  ['profiles', 'profiles', 'sylphx.agents.v1.ProfileMount'],
36
+ ['archiveTime', 'archive_time'],
37
+ ['organizationContext', 'organization_context', undefined, 'json'],
38
+ ['organizationLayer', 'organization_layer', 'sylphx.agents.v1.OrganizationLayer'],
39
+ ],
40
+ 'sylphx.agents.v1.AgentSessionGoal': [
41
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
42
+ ['tokenBudget', 'token_budget'],
43
+ ['tokensUsed', 'tokens_used'],
44
+ ['usageUnavailable', 'usage_unavailable'],
45
+ ['ownerPaused', 'owner_paused'],
46
+ ['receipt', 'receipt', 'sylphx.agents.v1.SessionGoalReceipt'],
47
+ ['createTime', 'create_time'],
48
+ ['updateTime', 'update_time'],
49
+ ],
50
+ 'sylphx.agents.v1.AgentSessionTransfer': [
51
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
52
+ ['manifest', 'manifest', undefined, 'json'],
53
+ ['manifestSha256', 'manifest_sha256'],
54
+ ['sourceFenceSha256', 'source_fence_sha256'],
55
+ ['receivedParts', 'received_parts', 'sylphx.agents.v1.SessionTransferPart'],
56
+ ['receipt', 'receipt', undefined, 'json'],
57
+ ['receiptSha256', 'receipt_sha256'],
58
+ ['createTime', 'create_time'],
59
+ ['updateTime', 'update_time'],
60
+ ],
61
+ 'sylphx.agents.v1.AgentSessionWait': [
62
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
63
+ ['resumePrompt', 'resume_prompt'],
64
+ ['evidence', 'evidence', undefined, 'json'],
65
+ ['resumedTurn', 'resumed_turn'],
66
+ ['createTime', 'create_time'],
67
+ ['updateTime', 'update_time'],
30
68
  ],
31
69
  'sylphx.agents.v1.AgentSpec': [
32
70
  ['tools', 'tools', 'sylphx.agents.v1.Tool'],
@@ -37,6 +75,8 @@ runtime.registerSchemas({
37
75
  ['budget', 'budget', 'sylphx.agents.v1.AgentBudget'],
38
76
  ['endUserAccess', 'end_user_access'],
39
77
  ['environment', 'environment', 'sylphx.agents.v1.EnvironmentSpec'],
78
+ ['models', 'models', 'sylphx.agents.v1.AgentModels'],
79
+ ['readOnly', 'read_only'],
40
80
  ],
41
81
  'sylphx.agents.v1.AgentStatus': [
42
82
  ['observedGeneration', 'observed_generation'],
@@ -54,9 +94,22 @@ runtime.registerSchemas({
54
94
  'sylphx.agents.v1.Approval': [
55
95
  ['callId', 'call_id'],
56
96
  ],
97
+ 'sylphx.agents.v1.ArchiveAgentSessionRequest': [],
98
+ 'sylphx.agents.v1.BeginAgentSessionTransferRequest': [
99
+ ['operationId', 'operation_id'],
100
+ ['manifest', 'manifest', undefined, 'json'],
101
+ ['sourceFenceSha256', 'source_fence_sha256'],
102
+ ],
57
103
  'sylphx.agents.v1.BuiltinTool': [
58
104
  ['config', 'config', undefined, 'json'],
59
105
  ],
106
+ 'sylphx.agents.v1.CancelAgentSessionWaitRequest': [
107
+ ['operationId', 'operation_id'],
108
+ ],
109
+ 'sylphx.agents.v1.CancelQueuedSessionExecutionRequest': [
110
+ ['operationId', 'operation_id'],
111
+ ['expectedGeneration', 'expected_generation'],
112
+ ],
60
113
  'sylphx.agents.v1.CaptureCredentialRequest': [
61
114
  ['expiresAt', 'expires_at'],
62
115
  ['allowedTools', 'allowed_tools'],
@@ -72,16 +125,31 @@ runtime.registerSchemas({
72
125
  'sylphx.agents.v1.ContentPart': [
73
126
  ['file', 'file', 'sylphx.agents.v1.FileRef'],
74
127
  ],
128
+ 'sylphx.agents.v1.ControlAgentSessionGoalRequest': [
129
+ ['expectedVersion', 'expected_version'],
130
+ ['operationId', 'operation_id'],
131
+ ['tokenBudget', 'token_budget'],
132
+ ['clearTokenBudget', 'clear_token_budget'],
133
+ ],
75
134
  'sylphx.agents.v1.CreateAgentRequest': [
76
135
  ['agentId', 'agent_id'],
77
136
  ['agent', 'agent', 'sylphx.agents.v1.Agent'],
78
137
  ['validateOnly', 'validate_only'],
79
138
  ],
139
+ 'sylphx.agents.v1.CreateAgentSessionGoalRequest': [
140
+ ['agentSessionGoal', 'agent_session_goal', 'sylphx.agents.v1.AgentSessionGoal'],
141
+ ['operationId', 'operation_id'],
142
+ ],
80
143
  'sylphx.agents.v1.CreateAgentSessionRequest': [
81
144
  ['agentSessionId', 'agent_session_id'],
82
145
  ['agentSession', 'agent_session', 'sylphx.agents.v1.AgentSession'],
83
146
  ['validateOnly', 'validate_only'],
84
147
  ],
148
+ 'sylphx.agents.v1.CreateAgentSessionWaitRequest': [
149
+ ['agentSessionWait', 'agent_session_wait', 'sylphx.agents.v1.AgentSessionWait'],
150
+ ['operationId', 'operation_id'],
151
+ ['expectedGoalVersion', 'expected_goal_version'],
152
+ ],
85
153
  'sylphx.agents.v1.CreateMemoryRequest': [
86
154
  ['memoryId', 'memory_id'],
87
155
  ['memory', 'memory', 'sylphx.agents.v1.Memory'],
@@ -92,6 +160,10 @@ runtime.registerSchemas({
92
160
  ['memoryStore', 'memory_store', 'sylphx.agents.v1.MemoryStore'],
93
161
  ['validateOnly', 'validate_only'],
94
162
  ],
163
+ 'sylphx.agents.v1.CreateOwnerPoolRequest': [
164
+ ['ownerPoolId', 'owner_pool_id'],
165
+ ['ownerPool', 'owner_pool', 'sylphx.agents.v1.OwnerPool'],
166
+ ],
95
167
  'sylphx.agents.v1.CredentialBinding': [
96
168
  ['endUserProvider', 'end_user_provider'],
97
169
  ],
@@ -117,6 +189,7 @@ runtime.registerSchemas({
117
189
  ['allowMissing', 'allow_missing'],
118
190
  ['validateOnly', 'validate_only'],
119
191
  ],
192
+ 'sylphx.agents.v1.DeleteOwnerPoolRequest': [],
120
193
  'sylphx.agents.v1.EnvironmentSpec': [
121
194
  ['idleStandby', 'idle_standby'],
122
195
  ['repo', 'repo', 'sylphx.agents.v1.RepositorySpec'],
@@ -130,12 +203,18 @@ runtime.registerSchemas({
130
203
  'sylphx.agents.v1.FileRef': [
131
204
  ['mediaType', 'media_type'],
132
205
  ],
206
+ 'sylphx.agents.v1.FinalizeAgentSessionTransferRequest': [],
133
207
  'sylphx.agents.v1.FunctionTool': [],
134
208
  'sylphx.agents.v1.GetAgentRequest': [],
209
+ 'sylphx.agents.v1.GetAgentSessionGoalRequest': [],
135
210
  'sylphx.agents.v1.GetAgentSessionRequest': [],
211
+ 'sylphx.agents.v1.GetAgentSessionTransferRequest': [],
212
+ 'sylphx.agents.v1.GetAgentSessionWaitRequest': [],
136
213
  'sylphx.agents.v1.GetAgentVersionRequest': [],
137
214
  'sylphx.agents.v1.GetMemoryRequest': [],
138
215
  'sylphx.agents.v1.GetMemoryStoreRequest': [],
216
+ 'sylphx.agents.v1.GetOwnerPoolRequest': [],
217
+ 'sylphx.agents.v1.GetQueuedSessionExecutionRequest': [],
139
218
  'sylphx.agents.v1.GetSessionEventRequest': [],
140
219
  'sylphx.agents.v1.HttpTool': [
141
220
  ['openapiUri', 'openapi_uri'],
@@ -148,6 +227,14 @@ runtime.registerSchemas({
148
227
  ['arguments', 'arguments', undefined, 'json'],
149
228
  ['opId', 'op_id'],
150
229
  ],
230
+ 'sylphx.agents.v1.ListAgentSessionWaitsRequest': [
231
+ ['pageSize', 'page_size'],
232
+ ['pageToken', 'page_token'],
233
+ ],
234
+ 'sylphx.agents.v1.ListAgentSessionWaitsResponse': [
235
+ ['agentSessionWaits', 'agent_session_waits', 'sylphx.agents.v1.AgentSessionWait'],
236
+ ['nextPageToken', 'next_page_token'],
237
+ ],
151
238
  'sylphx.agents.v1.ListAgentSessionsRequest': [
152
239
  ['pageSize', 'page_size'],
153
240
  ['pageToken', 'page_token'],
@@ -190,6 +277,14 @@ runtime.registerSchemas({
190
277
  ['memoryStores', 'memory_stores', 'sylphx.agents.v1.MemoryStore'],
191
278
  ['nextPageToken', 'next_page_token'],
192
279
  ],
280
+ 'sylphx.agents.v1.ListOwnerPoolsRequest': [
281
+ ['pageSize', 'page_size'],
282
+ ['pageToken', 'page_token'],
283
+ ],
284
+ 'sylphx.agents.v1.ListOwnerPoolsResponse': [
285
+ ['ownerPools', 'owner_pools', 'sylphx.agents.v1.OwnerPool'],
286
+ ['nextPageToken', 'next_page_token'],
287
+ ],
193
288
  'sylphx.agents.v1.ListSessionEventsRequest': [
194
289
  ['pageSize', 'page_size'],
195
290
  ['pageToken', 'page_token'],
@@ -230,7 +325,67 @@ runtime.registerSchemas({
230
325
  'sylphx.agents.v1.Message': [
231
326
  ['parts', 'parts', 'sylphx.agents.v1.ContentPart'],
232
327
  ],
328
+ 'sylphx.agents.v1.ObserveOwnerPoolMemberRequest': [
329
+ ['agentVersion', 'agent_version'],
330
+ ['metrics', 'metrics', undefined, 'map'],
331
+ ],
332
+ 'sylphx.agents.v1.OrganizationLayer': [
333
+ ['skills', 'skills', 'sylphx.agents.v1.OrganizationSkill'],
334
+ ],
335
+ 'sylphx.agents.v1.OrganizationSkill': [],
336
+ 'sylphx.agents.v1.OwnerPool': [
337
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
338
+ ['spec', 'spec', 'sylphx.agents.v1.OwnerPoolSpec'],
339
+ ['status', 'status', 'sylphx.agents.v1.OwnerPoolStatus'],
340
+ ],
341
+ 'sylphx.agents.v1.OwnerPoolAdmission': [
342
+ ['minScores', 'min_scores', undefined, 'map'],
343
+ ['suiteVersion', 'suite_version'],
344
+ ],
345
+ 'sylphx.agents.v1.OwnerPoolDemotionRule': [
346
+ ['maxRegression', 'max_regression'],
347
+ ['minSamples', 'min_samples'],
348
+ ['baselineObservations', 'baseline_observations'],
349
+ ],
350
+ 'sylphx.agents.v1.OwnerPoolMember': [
351
+ ['agentVersion', 'agent_version'],
352
+ ['scores', 'scores', undefined, 'map'],
353
+ ['baseline', 'baseline', undefined, 'map'],
354
+ ['observed', 'observed', undefined, 'map'],
355
+ ['qualifyTime', 'qualify_time'],
356
+ ['demoteTime', 'demote_time'],
357
+ ['updateTime', 'update_time'],
358
+ ['suiteVersion', 'suite_version'],
359
+ ],
360
+ 'sylphx.agents.v1.OwnerPoolSpec': [
361
+ ['admission', 'admission', 'sylphx.agents.v1.OwnerPoolAdmission'],
362
+ ['demotion', 'demotion', 'sylphx.agents.v1.OwnerPoolDemotionRule'],
363
+ ],
364
+ 'sylphx.agents.v1.OwnerPoolStatus': [
365
+ ['observedGeneration', 'observed_generation'],
366
+ ['conditions', 'conditions', 'sylphx.common.v1.Condition'],
367
+ ['members', 'members', 'sylphx.agents.v1.OwnerPoolMember'],
368
+ ],
233
369
  'sylphx.agents.v1.ProfileMount': [],
370
+ 'sylphx.agents.v1.QualifyOwnerPoolMemberRequest': [
371
+ ['agentVersion', 'agent_version'],
372
+ ['scores', 'scores', undefined, 'map'],
373
+ ['suiteVersion', 'suite_version'],
374
+ ],
375
+ 'sylphx.agents.v1.QueueAgentSessionExecutionRequest': [
376
+ ['execution', 'execution', 'sylphx.agents.v1.SessionTurnExecution'],
377
+ ['expectedGoalVersion', 'expected_goal_version'],
378
+ ['operationId', 'operation_id'],
379
+ ['expectedGeneration', 'expected_generation'],
380
+ ],
381
+ 'sylphx.agents.v1.QueuedSessionExecution': [
382
+ ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
383
+ ['expireTime', 'expire_time'],
384
+ ['createTime', 'create_time'],
385
+ ['updateTime', 'update_time'],
386
+ ['continuationState', 'continuation_state'],
387
+ ['blockedReason', 'blocked_reason'],
388
+ ],
234
389
  'sylphx.agents.v1.RenewalCall': [
235
390
  ['arguments', 'arguments', undefined, 'json'],
236
391
  ['cancelField', 'cancel_field'],
@@ -240,6 +395,15 @@ runtime.registerSchemas({
240
395
  ['idempotencyArgument', 'idempotency_argument'],
241
396
  ],
242
397
  'sylphx.agents.v1.RepositorySpec': [],
398
+ 'sylphx.agents.v1.ResolveAgentSessionWaitRequest': [
399
+ ['operationId', 'operation_id'],
400
+ ['evidence', 'evidence', undefined, 'json'],
401
+ ],
402
+ 'sylphx.agents.v1.ResumeAgentSessionRequest': [
403
+ ['operationId', 'operation_id'],
404
+ ['execution', 'execution', 'sylphx.agents.v1.SessionTurnExecution'],
405
+ ['queuedExecutionGeneration', 'queued_execution_generation'],
406
+ ],
243
407
  'sylphx.agents.v1.RevokeCredentialRequest': [],
244
408
  'sylphx.agents.v1.RotateCredentialRequest': [
245
409
  ['expiresAt', 'expires_at'],
@@ -257,11 +421,17 @@ runtime.registerSchemas({
257
421
  ['renewal', 'renewal', 'sylphx.agents.v1.RenewalCall'],
258
422
  ['runtimeCredentialHandle', 'runtime_credential_handle'],
259
423
  ['environmentMask', 'environment_mask'],
424
+ ['itemKey', 'item_key'],
425
+ ['ownerPool', 'owner_pool'],
426
+ ['organizationLayer', 'organization_layer', 'sylphx.agents.v1.OrganizationLayer'],
260
427
  ],
261
428
  'sylphx.agents.v1.RunAgentResponse': [
262
429
  ['session', 'session', 'sylphx.agents.v1.AgentSession'],
263
430
  ['initialEvent', 'initial_event', 'sylphx.agents.v1.SessionEvent'],
264
431
  ],
432
+ 'sylphx.agents.v1.SandboxActivity': [
433
+ ['sandboxSeconds', 'sandbox_seconds'],
434
+ ],
265
435
  'sylphx.agents.v1.SearchMemoriesRequest': [
266
436
  ['endUser', 'end_user'],
267
437
  ['pageSize', 'page_size'],
@@ -273,10 +443,13 @@ runtime.registerSchemas({
273
443
  ],
274
444
  'sylphx.agents.v1.SendAgentSessionMessageRequest': [
275
445
  ['message', 'message', 'sylphx.agents.v1.Message'],
446
+ ['execution', 'execution', 'sylphx.agents.v1.SessionTurnExecution'],
276
447
  ],
277
448
  'sylphx.agents.v1.SessionEvent': [
278
449
  ['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
279
450
  ['createTime', 'create_time'],
451
+ ['usage', 'usage', 'sylphx.agents.v1.StepUsage'],
452
+ ['stepKey', 'step_key'],
280
453
  ['message', 'message', 'sylphx.agents.v1.Message'],
281
454
  ['toolCall', 'tool_call', 'sylphx.agents.v1.ToolCall'],
282
455
  ['toolResult', 'tool_result', 'sylphx.agents.v1.ToolResult'],
@@ -286,16 +459,43 @@ runtime.registerSchemas({
286
459
  ['fileChange', 'file_change', 'sylphx.agents.v1.FileChange'],
287
460
  ['response', 'response', 'sylphx.agents.v1.TurnResult'],
288
461
  ['error', 'error', 'sylphx.agents.v1.ErrorEvent'],
462
+ ['sandbox', 'sandbox', 'sylphx.agents.v1.SandboxActivity'],
463
+ ['wait', 'wait', 'sylphx.agents.v1.AgentSessionWait'],
464
+ ['waitContinuation', 'wait_continuation', 'sylphx.agents.v1.SessionWaitContinuation'],
465
+ ],
466
+ 'sylphx.agents.v1.SessionGoalReceipt': [
467
+ ['evidence', 'evidence', undefined, 'json'],
468
+ ],
469
+ 'sylphx.agents.v1.SessionTransferPart': [],
470
+ 'sylphx.agents.v1.SessionTurnExecution': [
471
+ ['runtimeCredentialHandle', 'runtime_credential_handle'],
472
+ ['credentials', 'credentials', 'sylphx.agents.v1.CredentialBinding', 'map'],
289
473
  ],
290
474
  'sylphx.agents.v1.SessionUsage': [
291
475
  ['activeTurnDuration', 'active_turn_duration'],
292
476
  ['gatewayCalls', 'gateway_calls'],
293
477
  ['spendMicros', 'spend_micros'],
294
478
  ],
479
+ 'sylphx.agents.v1.SessionWaitContinuation': [
480
+ ['waits', 'waits', 'sylphx.agents.v1.AgentSessionWait'],
481
+ ],
482
+ 'sylphx.agents.v1.SettleAgentSessionGoalRequest': [
483
+ ['expectedVersion', 'expected_version'],
484
+ ['receipt', 'receipt', 'sylphx.agents.v1.SessionGoalReceipt'],
485
+ ['operationId', 'operation_id'],
486
+ ],
295
487
  'sylphx.agents.v1.Skill': [],
296
488
  'sylphx.agents.v1.StatusChange': [],
297
489
  'sylphx.agents.v1.SteerAgentSessionRequest': [
298
490
  ['message', 'message', 'sylphx.agents.v1.Message'],
491
+ ['execution', 'execution', 'sylphx.agents.v1.SessionTurnExecution'],
492
+ ],
493
+ 'sylphx.agents.v1.StepUsage': [
494
+ ['inputTokens', 'input_tokens'],
495
+ ['cachedTokens', 'cached_tokens'],
496
+ ['outputTokens', 'output_tokens'],
497
+ ['costUsd', 'cost_usd'],
498
+ ['firstDeltaTime', 'first_delta_time'],
299
499
  ],
300
500
  'sylphx.agents.v1.SubmitAgentSessionToolResultRequest': [
301
501
  ['callId', 'call_id'],
@@ -307,6 +507,7 @@ runtime.registerSchemas({
307
507
  ['http', 'http', 'sylphx.agents.v1.HttpTool'],
308
508
  ['appFunction', 'app_function', 'sylphx.agents.v1.FunctionTool'],
309
509
  ['client', 'client', 'sylphx.agents.v1.ClientTool'],
510
+ ['runtimeOnly', 'runtime_only'],
310
511
  ],
311
512
  'sylphx.agents.v1.ToolCall': [
312
513
  ['input', 'input', undefined, 'json'],
@@ -331,6 +532,7 @@ runtime.registerSchemas({
331
532
  ['isError', 'is_error'],
332
533
  ['usage', 'usage', 'sylphx.agents.v1.TurnTokenUsage'],
333
534
  ['costMicros', 'cost_micros'],
535
+ ['firstDeltaTime', 'first_delta_time'],
334
536
  ],
335
537
  'sylphx.agents.v1.TurnTokenUsage': [
336
538
  ['inputTokens', 'input_tokens'],
@@ -355,6 +557,11 @@ runtime.registerSchemas({
355
557
  ['allowMissing', 'allow_missing'],
356
558
  ['validateOnly', 'validate_only'],
357
559
  ],
560
+ 'sylphx.agents.v1.UpdateOwnerPoolRequest': [
561
+ ['ownerPool', 'owner_pool', 'sylphx.agents.v1.OwnerPool'],
562
+ ['updateMask', 'update_mask'],
563
+ ],
564
+ 'sylphx.agents.v1.WriteAgentSessionTransferPartRequest': [],
358
565
  });
359
566
  /**
360
567
  * AgentsService is Sylphx Agents, the platform's hosted agent runtime
@@ -363,33 +570,166 @@ runtime.registerSchemas({
363
570
  *
364
571
  * Scopes: `agents:read` and `agents:write` manage agents, versions and
365
572
  * 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.
573
+ * and deletes session and memory records. `agents:admin` governs owner pools
574
+ * (their admission minimums and demotion rules); no wildcard reaches it.
575
+ * `agents:qualify` records admission-suite results and live metrics for
576
+ * owner pool members: a grader's grant, held only by name, and refused to the
577
+ * principal whose create or update minted the version. All methods
578
+ * currently require a secret key. Publishable-key access is deferred until
579
+ * the backend enforces end-user ownership of sessions and memories and
580
+ * `end_user_access` on Agents.
369
581
  * Credential actions capture existing grants; handles are not CRUD resources.
370
582
  *
371
583
  * Namespace of Sylphx Agents on `Sylphx`.
372
584
  */
373
585
  export class AgentsApi {
586
+ /** The `transfers` collection. */
587
+ transfers;
374
588
  /** The `agents` collection. */
375
589
  agents;
376
590
  /** The `agent_versions` collection. */
377
591
  agentVersions;
378
592
  /** The `agent_sessions` collection. */
379
593
  agentSessions;
594
+ /** The `goals` collection. */
595
+ goals;
596
+ /** The `waits` collection. */
597
+ waits;
598
+ /** The `queued_executions` collection. */
599
+ queuedExecutions;
380
600
  /** The `session_events` collection. */
381
601
  sessionEvents;
382
602
  /** The `memory_stores` collection. */
383
603
  memoryStores;
384
604
  /** The `memories` collection. */
385
605
  memories;
606
+ /** The `owner_pools` collection. */
607
+ ownerPools;
386
608
  constructor(client) {
609
+ this.transfers = new TransfersCollection(client);
387
610
  this.agents = new AgentsCollection(client);
388
611
  this.agentVersions = new AgentVersionsCollection(client);
389
612
  this.agentSessions = new AgentSessionsCollection(client);
613
+ this.goals = new GoalsCollection(client);
614
+ this.waits = new WaitsCollection(client);
615
+ this.queuedExecutions = new QueuedExecutionsCollection(client);
390
616
  this.sessionEvents = new SessionEventsCollection(client);
391
617
  this.memoryStores = new MemoryStoresCollection(client);
392
618
  this.memories = new MemoriesCollection(client);
619
+ this.ownerPools = new OwnerPoolsCollection(client);
620
+ }
621
+ }
622
+ /** `transfers` of Sylphx Agents: Resource type `agents.sylphx.com/AgentSessionTransfer`. */
623
+ export class TransfersCollection {
624
+ client;
625
+ constructor(client) {
626
+ this.client = client;
627
+ }
628
+ /**
629
+ * Stages a uniquely identified source epoch on an empty idle Session.
630
+ * The source adapter must already hold its durable one-writer fence.
631
+ *
632
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/agent_sessions/*}/transfers:begin` · permission `agents:sessions` · effect `write`
633
+ *
634
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`.
635
+ */
636
+ async begin(request) {
637
+ return this.client.call({
638
+ method: 'POST',
639
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'parent')}/transfers:begin`,
640
+ body: runtime.omit(request, ['parent']),
641
+ bodyType: 'sylphx.agents.v1.BeginAgentSessionTransferRequest',
642
+ responseType: 'sylphx.agents.v1.AgentSessionTransfer',
643
+ mutation: true,
644
+ });
645
+ }
646
+ /**
647
+ * Returns hashes and original/destination mappings, never private payload.
648
+ *
649
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/transfers/*}` · permission `agents:sessions` · effect `read`
650
+ *
651
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
652
+ */
653
+ async get(request) {
654
+ return this.client.call({
655
+ method: 'GET',
656
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/transfers/*', 'name')}`,
657
+ responseType: 'sylphx.agents.v1.AgentSessionTransfer',
658
+ mutation: false,
659
+ });
660
+ }
661
+ /**
662
+ * Stores at most 256 KiB of exact bytes under its declared part digest.
663
+ * An acknowledgement loss can repeat the identical part without mutation.
664
+ *
665
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/transfers/*}:writePart` · permission `agents:sessions` · effect `write`
666
+ *
667
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `RESOURCE_ALREADY_EXISTS`.
668
+ */
669
+ async writePart(request) {
670
+ return this.client.call({
671
+ method: 'POST',
672
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/transfers/*', 'name')}:writePart`,
673
+ body: runtime.omit(request, ['name']),
674
+ bodyType: 'sylphx.agents.v1.WriteAgentSessionTransferPartRequest',
675
+ responseType: 'sylphx.agents.v1.SessionTransferPart',
676
+ mutation: true,
677
+ });
678
+ }
679
+ /**
680
+ * Re-reads ordered parts, checks the whole snapshot and validates the
681
+ * portable state. An unknown effect stays held; this call never executes.
682
+ *
683
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/transfers/*}:finalize` · permission `agents:sessions` · effect `write`
684
+ *
685
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
686
+ */
687
+ async finalize(request) {
688
+ return this.client.call({
689
+ method: 'POST',
690
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/transfers/*', 'name')}:finalize`,
691
+ body: runtime.omit(request, ['name']),
692
+ bodyType: 'sylphx.agents.v1.FinalizeAgentSessionTransferRequest',
693
+ responseType: 'sylphx.agents.v1.AgentSessionTransfer',
694
+ mutation: true,
695
+ });
696
+ }
697
+ /**
698
+ * After the source durably records the exact verified receipt under its
699
+ * writer fence, atomically projects conserved state without starting a turn.
700
+ * Unknown outcomes or incompatible pinned model context remain held.
701
+ *
702
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/transfers/*}:adopt` · permission `agents:sessions` · effect `write`
703
+ *
704
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
705
+ */
706
+ async adopt(request) {
707
+ return this.client.call({
708
+ method: 'POST',
709
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/transfers/*', 'name')}:adopt`,
710
+ body: runtime.omit(request, ['name']),
711
+ bodyType: 'sylphx.agents.v1.AdoptAgentSessionTransferRequest',
712
+ responseType: 'sylphx.agents.v1.AgentSessionTransfer',
713
+ mutation: true,
714
+ });
715
+ }
716
+ /**
717
+ * Releases only a destination that has not adopted source state. Immutable
718
+ * source bytes/epoch remain retained; source writer release is app-owned.
719
+ *
720
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/transfers/*}:abort` · permission `agents:sessions` · effect `write`
721
+ *
722
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`.
723
+ */
724
+ async abort(request) {
725
+ return this.client.call({
726
+ method: 'POST',
727
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/transfers/*', 'name')}:abort`,
728
+ body: runtime.omit(request, ['name']),
729
+ bodyType: 'sylphx.agents.v1.AbortAgentSessionTransferRequest',
730
+ responseType: 'sylphx.agents.v1.AgentSessionTransfer',
731
+ mutation: true,
732
+ });
393
733
  }
394
734
  }
395
735
  /** `agents` of Sylphx Agents: Resource type `agents.sylphx.com/Agent`. */
@@ -548,7 +888,7 @@ export class AgentsCollection {
548
888
  *
549
889
  * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agents/*}:run` · permission `agents:sessions` · effect `write`
550
890
  *
551
- * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`.
891
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`, `PLAN_LIMIT_REACHED`, `SPEND_LIMIT_REACHED`, `INVALID_STATE`.
552
892
  */
553
893
  async run(request) {
554
894
  return this.client.call({
@@ -730,6 +1070,61 @@ export class AgentSessionsCollection {
730
1070
  mutation: true,
731
1071
  });
732
1072
  }
1073
+ /**
1074
+ * Archives a session: the session and its event log stay readable, but no
1075
+ * new turn may start and the session's captured credential handles are
1076
+ * revoked. An idle or failed session archives at once; a running turn is
1077
+ * refused with `INVALID_STATE` (interrupt it first). Repeating the call
1078
+ * with the same `Idempotency-Key` returns the same session.
1079
+ *
1080
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:archive` · permission `agents:sessions` · effect `write`
1081
+ *
1082
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1083
+ */
1084
+ async archive(request) {
1085
+ return this.client.call({
1086
+ method: 'POST',
1087
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:archive`,
1088
+ body: runtime.omit(request, ['name']),
1089
+ bodyType: 'sylphx.agents.v1.ArchiveAgentSessionRequest',
1090
+ responseType: 'sylphx.agents.v1.AgentSession',
1091
+ mutation: true,
1092
+ });
1093
+ }
1094
+ /**
1095
+ * Explicitly reserves existing captured authority for one future turn, without executing it.
1096
+ *
1097
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:queueExecution` · permission `agents:sessions` · effect `write`
1098
+ *
1099
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1100
+ */
1101
+ async queueExecution(request) {
1102
+ return this.client.call({
1103
+ method: 'POST',
1104
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:queueExecution`,
1105
+ body: runtime.omit(request, ['name']),
1106
+ bodyType: 'sylphx.agents.v1.QueueAgentSessionExecutionRequest',
1107
+ responseType: 'sylphx.agents.v1.QueuedSessionExecution',
1108
+ mutation: true,
1109
+ });
1110
+ }
1111
+ /**
1112
+ * Consumes all ready owners atomically with fresh exact-next-turn authority.
1113
+ *
1114
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*}:resume` · permission `agents:sessions` · effect `write`
1115
+ *
1116
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1117
+ */
1118
+ async resume(request) {
1119
+ return this.client.call({
1120
+ method: 'POST',
1121
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'name')}:resume`,
1122
+ body: runtime.omit(request, ['name']),
1123
+ bodyType: 'sylphx.agents.v1.ResumeAgentSessionRequest',
1124
+ responseType: 'sylphx.agents.v1.SessionEvent',
1125
+ mutation: true,
1126
+ });
1127
+ }
733
1128
  /**
734
1129
  * Sends a user message. On an idle or failed session it starts a new turn;
735
1130
  * while a turn runs it is refused with `INVALID_STATE` (use `:steer`).
@@ -820,6 +1215,224 @@ export class AgentSessionsCollection {
820
1215
  });
821
1216
  }
822
1217
  }
1218
+ /** `goals` of Sylphx Agents: Resource type `agents.sylphx.com/AgentSessionGoal`. */
1219
+ export class GoalsCollection {
1220
+ client;
1221
+ constructor(client) {
1222
+ this.client = client;
1223
+ }
1224
+ /**
1225
+ * Creates an optional objective owned by this Session, without an external Task.
1226
+ * The operation_id keeps the original receipt beyond request replay expiry.
1227
+ *
1228
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/agent_sessions/*}/goals` · permission `agents:sessions` · effect `write`
1229
+ *
1230
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1231
+ */
1232
+ async create(request) {
1233
+ return this.client.call({
1234
+ method: 'POST',
1235
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'parent')}/goals`,
1236
+ query: { operation_id: request.operationId },
1237
+ body: request.agentSessionGoal ?? {},
1238
+ bodyType: 'sylphx.agents.v1.AgentSessionGoal',
1239
+ responseType: 'sylphx.agents.v1.AgentSessionGoal',
1240
+ mutation: true,
1241
+ });
1242
+ }
1243
+ /**
1244
+ * Reads the exact Goal, including its terminal receipt after a successor starts.
1245
+ *
1246
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/goals/*}` · permission `agents:sessions` · effect `read`
1247
+ *
1248
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
1249
+ */
1250
+ async get(request) {
1251
+ return this.client.call({
1252
+ method: 'GET',
1253
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/goals/*', 'name')}`,
1254
+ responseType: 'sylphx.agents.v1.AgentSessionGoal',
1255
+ mutation: false,
1256
+ });
1257
+ }
1258
+ /**
1259
+ * Settles only the named Goal/version with an observed environment receipt.
1260
+ * Replaying operation_id returns its original receipt, never its successor.
1261
+ *
1262
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/goals/*}:settle` · permission `agents:sessions` · effect `write`
1263
+ *
1264
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1265
+ */
1266
+ async settle(request) {
1267
+ return this.client.call({
1268
+ method: 'POST',
1269
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/goals/*', 'name')}:settle`,
1270
+ body: runtime.omit(request, ['name']),
1271
+ bodyType: 'sylphx.agents.v1.SettleAgentSessionGoalRequest',
1272
+ responseType: 'sylphx.agents.v1.AgentSessionGoal',
1273
+ mutation: true,
1274
+ });
1275
+ }
1276
+ /**
1277
+ * Applies an explicit owner control to this exact Goal/version. Pause
1278
+ * interrupts only its current execution; resume does not resolve a wait or
1279
+ * clear observed usage. Amend changes only supplied objective/budget fields.
1280
+ *
1281
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/goals/*}:control` · permission `agents:sessions` · effect `write`
1282
+ *
1283
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1284
+ */
1285
+ async control(request) {
1286
+ return this.client.call({
1287
+ method: 'POST',
1288
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/goals/*', 'name')}:control`,
1289
+ body: runtime.omit(request, ['name']),
1290
+ bodyType: 'sylphx.agents.v1.ControlAgentSessionGoalRequest',
1291
+ responseType: 'sylphx.agents.v1.AgentSessionGoal',
1292
+ mutation: true,
1293
+ });
1294
+ }
1295
+ }
1296
+ /** `waits` of Sylphx Agents: Resource type `agents.sylphx.com/AgentSessionWait`. */
1297
+ export class WaitsCollection {
1298
+ client;
1299
+ constructor(client) {
1300
+ this.client = client;
1301
+ }
1302
+ /**
1303
+ * Creates a durable wait on an idle Session, with permanent operation replay.
1304
+ *
1305
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*\/agent_sessions/*}/waits` · permission `agents:sessions` · effect `write`
1306
+ *
1307
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1308
+ */
1309
+ async create(request) {
1310
+ return this.client.call({
1311
+ method: 'POST',
1312
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'parent')}/waits`,
1313
+ query: { operation_id: request.operationId, expected_goal_version: request.expectedGoalVersion },
1314
+ body: request.agentSessionWait ?? {},
1315
+ bodyType: 'sylphx.agents.v1.AgentSessionWait',
1316
+ responseType: 'sylphx.agents.v1.AgentSessionWait',
1317
+ mutation: true,
1318
+ });
1319
+ }
1320
+ /**
1321
+ * Reads an exact wait and its retained evidence.
1322
+ *
1323
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/waits/*}` · permission `agents:sessions` · effect `read`
1324
+ *
1325
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
1326
+ */
1327
+ async get(request) {
1328
+ return this.client.call({
1329
+ method: 'GET',
1330
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/waits/*', 'name')}`,
1331
+ responseType: 'sylphx.agents.v1.AgentSessionWait',
1332
+ mutation: false,
1333
+ });
1334
+ }
1335
+ /**
1336
+ * Lists durable waits, including ready undelivered owners.
1337
+ *
1338
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*\/agent_sessions/*}/waits` · permission `agents:sessions` · effect `read`
1339
+ *
1340
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1341
+ */
1342
+ async list(request) {
1343
+ return this.client.call({
1344
+ method: 'GET',
1345
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*/agent_sessions/*', 'parent')}/waits`,
1346
+ query: { page_size: request.pageSize, page_token: request.pageToken },
1347
+ responseType: 'sylphx.agents.v1.ListAgentSessionWaitsResponse',
1348
+ mutation: false,
1349
+ });
1350
+ }
1351
+ /** Every item of every page of `list`. */
1352
+ async *listAll(request) {
1353
+ let next = request;
1354
+ for (;;) {
1355
+ const page = await this.list(next);
1356
+ yield* page.agentSessionWaits ?? [];
1357
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1358
+ return;
1359
+ next = { ...request, pageToken: page.nextPageToken };
1360
+ }
1361
+ }
1362
+ /**
1363
+ * Records observed signal evidence or checks a timer against its actual due time.
1364
+ *
1365
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/waits/*}:resolve` · permission `agents:sessions` · effect `write`
1366
+ *
1367
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1368
+ */
1369
+ async resolve(request) {
1370
+ return this.client.call({
1371
+ method: 'POST',
1372
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/waits/*', 'name')}:resolve`,
1373
+ body: runtime.omit(request, ['name']),
1374
+ bodyType: 'sylphx.agents.v1.ResolveAgentSessionWaitRequest',
1375
+ responseType: 'sylphx.agents.v1.AgentSessionWait',
1376
+ mutation: true,
1377
+ });
1378
+ }
1379
+ /**
1380
+ * Cancels only this exact undelivered wait; repeated operations retain receipts.
1381
+ *
1382
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/waits/*}:cancel` · permission `agents:sessions` · effect `write`
1383
+ *
1384
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1385
+ */
1386
+ async cancel(request) {
1387
+ return this.client.call({
1388
+ method: 'POST',
1389
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/waits/*', 'name')}:cancel`,
1390
+ body: runtime.omit(request, ['name']),
1391
+ bodyType: 'sylphx.agents.v1.CancelAgentSessionWaitRequest',
1392
+ responseType: 'sylphx.agents.v1.AgentSessionWait',
1393
+ mutation: true,
1394
+ });
1395
+ }
1396
+ }
1397
+ /** `queued_executions` of Sylphx Agents: Resource type `agents.sylphx.com/QueuedSessionExecution`. */
1398
+ export class QueuedExecutionsCollection {
1399
+ client;
1400
+ constructor(client) {
1401
+ this.client = client;
1402
+ }
1403
+ /**
1404
+ * Reads the state of an exact future-turn authorization.
1405
+ *
1406
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/queued_executions/*}` · permission `agents:sessions` · effect `read`
1407
+ *
1408
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`.
1409
+ */
1410
+ async get(request) {
1411
+ return this.client.call({
1412
+ method: 'GET',
1413
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/queued_executions/*', 'name')}`,
1414
+ responseType: 'sylphx.agents.v1.QueuedSessionExecution',
1415
+ mutation: false,
1416
+ });
1417
+ }
1418
+ /**
1419
+ * Cancels only a queued future execution; an already admitted turn retains its receipt.
1420
+ *
1421
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/agent_sessions/*\/queued_executions/*}:cancel` · permission `agents:sessions` · effect `write`
1422
+ *
1423
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `INVALID_STATE`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1424
+ */
1425
+ async cancel(request) {
1426
+ return this.client.call({
1427
+ method: 'POST',
1428
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/agent_sessions/*/queued_executions/*', 'name')}:cancel`,
1429
+ body: runtime.omit(request, ['name']),
1430
+ bodyType: 'sylphx.agents.v1.CancelQueuedSessionExecutionRequest',
1431
+ responseType: 'sylphx.agents.v1.QueuedSessionExecution',
1432
+ mutation: true,
1433
+ });
1434
+ }
1435
+ }
823
1436
  /** `session_events` of Sylphx Agents: Resource type `agents.sylphx.com/SessionEvent`. */
824
1437
  export class SessionEventsCollection {
825
1438
  client;
@@ -1093,4 +1706,157 @@ export class MemoriesCollection {
1093
1706
  });
1094
1707
  }
1095
1708
  }
1709
+ /** `owner_pools` of Sylphx Agents: Resource type `agents.sylphx.com/OwnerPool`. */
1710
+ export class OwnerPoolsCollection {
1711
+ client;
1712
+ constructor(client) {
1713
+ this.client = client;
1714
+ }
1715
+ /**
1716
+ * Gets an owner pool with its members.
1717
+ *
1718
+ * `GET /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:read` · effect `read`
1719
+ *
1720
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`.
1721
+ */
1722
+ async get(request) {
1723
+ return this.client.call({
1724
+ method: 'GET',
1725
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'name')}`,
1726
+ responseType: 'sylphx.agents.v1.OwnerPool',
1727
+ mutation: false,
1728
+ });
1729
+ }
1730
+ /**
1731
+ * Lists owner pools, newest first.
1732
+ *
1733
+ * `GET /v1/{parent=orgs/*\/projects/*\/envs/*}/owner_pools` · permission `agents:read` · effect `read`
1734
+ *
1735
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `INVALID_FIELD`, `PAGE_TOKEN_MISMATCH`.
1736
+ */
1737
+ async list(request) {
1738
+ return this.client.call({
1739
+ method: 'GET',
1740
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/owner_pools`,
1741
+ query: { page_size: request.pageSize, page_token: request.pageToken },
1742
+ responseType: 'sylphx.agents.v1.ListOwnerPoolsResponse',
1743
+ mutation: false,
1744
+ });
1745
+ }
1746
+ /** Every item of every page of `list`. */
1747
+ async *listAll(request) {
1748
+ let next = request;
1749
+ for (;;) {
1750
+ const page = await this.list(next);
1751
+ yield* page.ownerPools ?? [];
1752
+ if (page.nextPageToken === undefined || page.nextPageToken === '')
1753
+ return;
1754
+ next = { ...request, pageToken: page.nextPageToken };
1755
+ }
1756
+ }
1757
+ /**
1758
+ * Creates an owner pool with no members. Its minimums and demotion rules
1759
+ * are governance, so the caller needs `agents:admin`.
1760
+ *
1761
+ * `POST /v1/{parent=orgs/*\/projects/*\/envs/*}/owner_pools` · permission `agents:admin` · effect `write`
1762
+ *
1763
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `RESOURCE_ALREADY_EXISTS`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1764
+ */
1765
+ async create(request) {
1766
+ return this.client.call({
1767
+ method: 'POST',
1768
+ path: `/v1/${runtime.pathParam(request.parent, 'orgs/*/projects/*/envs/*', 'parent')}/owner_pools`,
1769
+ query: { owner_pool_id: request.ownerPoolId },
1770
+ body: request.ownerPool ?? {},
1771
+ bodyType: 'sylphx.agents.v1.OwnerPool',
1772
+ responseType: 'sylphx.agents.v1.OwnerPool',
1773
+ mutation: true,
1774
+ });
1775
+ }
1776
+ /**
1777
+ * Replaces an owner pool's spec (`agents:admin`). Members keep their
1778
+ * standing; a changed suite or minimum applies from the next `:qualify`.
1779
+ *
1780
+ * `PATCH /v1/{owner_pool.name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:admin` · effect `write`
1781
+ *
1782
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `UNKNOWN_FIELD`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1783
+ */
1784
+ async update(request) {
1785
+ return this.client.call({
1786
+ method: 'PATCH',
1787
+ path: `/v1/${runtime.pathParam(request.ownerPool?.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'owner_pool.name')}`,
1788
+ query: { update_mask: request.updateMask },
1789
+ body: request.ownerPool ?? {},
1790
+ bodyType: 'sylphx.agents.v1.OwnerPool',
1791
+ responseType: 'sylphx.agents.v1.OwnerPool',
1792
+ mutation: true,
1793
+ });
1794
+ }
1795
+ /**
1796
+ * Deletes an owner pool and its members (`agents:admin`). Sessions already
1797
+ * admitted keep running.
1798
+ *
1799
+ * `DELETE /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}` · permission `agents:admin` · effect `destructive`
1800
+ *
1801
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1802
+ */
1803
+ async delete(request) {
1804
+ return this.client.call({
1805
+ method: 'DELETE',
1806
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'name')}`,
1807
+ mutation: true,
1808
+ });
1809
+ }
1810
+ /**
1811
+ * Records an admission suite result for an Agent version. The caller holds
1812
+ * `agents:qualify` and is not the principal whose create or update minted
1813
+ * the version (`PERMISSION_DENIED`). Every minimum
1814
+ * met: the member is `QUALIFIED`. Any score missing or below its minimum:
1815
+ * the member is recorded `REFUSED` with the reason. Each qualification is
1816
+ * recorded with its suite, suite version, result and caller; a `result`
1817
+ * already recorded for the member is refused with `INVALID_FIELD`, so a
1818
+ * demoted member returns only with a new suite result. A read-only version
1819
+ * is refused with `PERMISSION_DENIED`; a suite or suite version other than
1820
+ * the pool's with `INVALID_FIELD`. Re-qualifying keeps the member's
1821
+ * baseline: the baseline belongs to the version and its pinned model.
1822
+ *
1823
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}:qualify` · permission `agents:qualify` · effect `write`
1824
+ *
1825
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1826
+ */
1827
+ async qualify(request) {
1828
+ return this.client.call({
1829
+ method: 'POST',
1830
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'name')}:qualify`,
1831
+ body: runtime.omit(request, ['name']),
1832
+ bodyType: 'sylphx.agents.v1.QualifyOwnerPoolMemberRequest',
1833
+ responseType: 'sylphx.agents.v1.OwnerPoolMember',
1834
+ mutation: true,
1835
+ });
1836
+ }
1837
+ /**
1838
+ * Records a live-metric observation for a member and applies the pool's
1839
+ * demotion rules (`agents:qualify`, refused to the version's authors as in
1840
+ * `:qualify`). The platform computes each rule's baseline: the median of
1841
+ * the member's first `baseline_observations` counted observations of the
1842
+ * metric, set only when it is finite and positive. Values of a rule metric
1843
+ * are lower-is-better and must not be negative. Once the baseline is set, a
1844
+ * metric past `baseline * (1 + max_regression)` demotes a qualified member.
1845
+ * Only `:qualify` brings a demoted member back.
1846
+ *
1847
+ * `POST /v1/{name=orgs/*\/projects/*\/envs/*\/owner_pools/*}:observe` · permission `agents:qualify` · effect `write`
1848
+ *
1849
+ * Errors: `UNAUTHENTICATED`, `PERMISSION_DENIED`, `RESOURCE_NOT_FOUND`, `INVALID_FIELD`, `IDEMPOTENCY_KEY_REUSED`, `IDEMPOTENCY_IN_PROGRESS`.
1850
+ */
1851
+ async observe(request) {
1852
+ return this.client.call({
1853
+ method: 'POST',
1854
+ path: `/v1/${runtime.pathParam(request.name, 'orgs/*/projects/*/envs/*/owner_pools/*', 'name')}:observe`,
1855
+ body: runtime.omit(request, ['name']),
1856
+ bodyType: 'sylphx.agents.v1.ObserveOwnerPoolMemberRequest',
1857
+ responseType: 'sylphx.agents.v1.OwnerPoolMember',
1858
+ mutation: true,
1859
+ });
1860
+ }
1861
+ }
1096
1862
  //# sourceMappingURL=agents.js.map