@sylphx/sdk 0.32.2 → 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.
- package/dist/access.d.ts +8 -3
- package/dist/access.js +6 -6
- package/dist/access.js.map +1 -1
- package/dist/agents.d.ts +586 -2
- package/dist/agents.js +495 -0
- package/dist/agents.js.map +1 -1
- package/dist/hosting.d.ts +229 -0
- package/dist/hosting.js +167 -0
- package/dist/hosting.js.map +1 -1
- package/dist/ids.d.ts +35 -0
- package/dist/ids.js +7 -0
- package/dist/ids.js.map +1 -1
- package/dist/methods.js +410 -7
- package/dist/methods.js.map +1 -1
- package/dist/notify.d.ts +239 -0
- package/dist/notify.js +193 -0
- package/dist/notify.js.map +1 -1
- package/dist/observability.d.ts +303 -0
- package/dist/observability.js +220 -0
- package/dist/observability.js.map +1 -1
- package/dist/runtime.d.ts +2 -1
- package/dist/runtime.js +27 -8
- package/dist/runtime.js.map +1 -1
- package/dist/sandboxes.d.ts +47 -13
- package/dist/sandboxes.js +13 -0
- package/dist/sandboxes.js.map +1 -1
- package/dist/workflows.d.ts +53 -1
- package/dist/workflows.js +38 -2
- package/dist/workflows.js.map +1 -1
- package/package.json +1 -1
package/dist/agents.js
CHANGED
|
@@ -4,6 +4,11 @@ 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'],
|
|
@@ -32,6 +37,35 @@ runtime.registerSchemas({
|
|
|
32
37
|
['organizationContext', 'organization_context', undefined, 'json'],
|
|
33
38
|
['organizationLayer', 'organization_layer', 'sylphx.agents.v1.OrganizationLayer'],
|
|
34
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'],
|
|
68
|
+
],
|
|
35
69
|
'sylphx.agents.v1.AgentSpec': [
|
|
36
70
|
['tools', 'tools', 'sylphx.agents.v1.Tool'],
|
|
37
71
|
['mcpServers', 'mcp_servers', 'sylphx.agents.v1.McpServer'],
|
|
@@ -61,9 +95,21 @@ runtime.registerSchemas({
|
|
|
61
95
|
['callId', 'call_id'],
|
|
62
96
|
],
|
|
63
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
|
+
],
|
|
64
103
|
'sylphx.agents.v1.BuiltinTool': [
|
|
65
104
|
['config', 'config', undefined, 'json'],
|
|
66
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
|
+
],
|
|
67
113
|
'sylphx.agents.v1.CaptureCredentialRequest': [
|
|
68
114
|
['expiresAt', 'expires_at'],
|
|
69
115
|
['allowedTools', 'allowed_tools'],
|
|
@@ -79,16 +125,31 @@ runtime.registerSchemas({
|
|
|
79
125
|
'sylphx.agents.v1.ContentPart': [
|
|
80
126
|
['file', 'file', 'sylphx.agents.v1.FileRef'],
|
|
81
127
|
],
|
|
128
|
+
'sylphx.agents.v1.ControlAgentSessionGoalRequest': [
|
|
129
|
+
['expectedVersion', 'expected_version'],
|
|
130
|
+
['operationId', 'operation_id'],
|
|
131
|
+
['tokenBudget', 'token_budget'],
|
|
132
|
+
['clearTokenBudget', 'clear_token_budget'],
|
|
133
|
+
],
|
|
82
134
|
'sylphx.agents.v1.CreateAgentRequest': [
|
|
83
135
|
['agentId', 'agent_id'],
|
|
84
136
|
['agent', 'agent', 'sylphx.agents.v1.Agent'],
|
|
85
137
|
['validateOnly', 'validate_only'],
|
|
86
138
|
],
|
|
139
|
+
'sylphx.agents.v1.CreateAgentSessionGoalRequest': [
|
|
140
|
+
['agentSessionGoal', 'agent_session_goal', 'sylphx.agents.v1.AgentSessionGoal'],
|
|
141
|
+
['operationId', 'operation_id'],
|
|
142
|
+
],
|
|
87
143
|
'sylphx.agents.v1.CreateAgentSessionRequest': [
|
|
88
144
|
['agentSessionId', 'agent_session_id'],
|
|
89
145
|
['agentSession', 'agent_session', 'sylphx.agents.v1.AgentSession'],
|
|
90
146
|
['validateOnly', 'validate_only'],
|
|
91
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
|
+
],
|
|
92
153
|
'sylphx.agents.v1.CreateMemoryRequest': [
|
|
93
154
|
['memoryId', 'memory_id'],
|
|
94
155
|
['memory', 'memory', 'sylphx.agents.v1.Memory'],
|
|
@@ -142,13 +203,18 @@ runtime.registerSchemas({
|
|
|
142
203
|
'sylphx.agents.v1.FileRef': [
|
|
143
204
|
['mediaType', 'media_type'],
|
|
144
205
|
],
|
|
206
|
+
'sylphx.agents.v1.FinalizeAgentSessionTransferRequest': [],
|
|
145
207
|
'sylphx.agents.v1.FunctionTool': [],
|
|
146
208
|
'sylphx.agents.v1.GetAgentRequest': [],
|
|
209
|
+
'sylphx.agents.v1.GetAgentSessionGoalRequest': [],
|
|
147
210
|
'sylphx.agents.v1.GetAgentSessionRequest': [],
|
|
211
|
+
'sylphx.agents.v1.GetAgentSessionTransferRequest': [],
|
|
212
|
+
'sylphx.agents.v1.GetAgentSessionWaitRequest': [],
|
|
148
213
|
'sylphx.agents.v1.GetAgentVersionRequest': [],
|
|
149
214
|
'sylphx.agents.v1.GetMemoryRequest': [],
|
|
150
215
|
'sylphx.agents.v1.GetMemoryStoreRequest': [],
|
|
151
216
|
'sylphx.agents.v1.GetOwnerPoolRequest': [],
|
|
217
|
+
'sylphx.agents.v1.GetQueuedSessionExecutionRequest': [],
|
|
152
218
|
'sylphx.agents.v1.GetSessionEventRequest': [],
|
|
153
219
|
'sylphx.agents.v1.HttpTool': [
|
|
154
220
|
['openapiUri', 'openapi_uri'],
|
|
@@ -161,6 +227,14 @@ runtime.registerSchemas({
|
|
|
161
227
|
['arguments', 'arguments', undefined, 'json'],
|
|
162
228
|
['opId', 'op_id'],
|
|
163
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
|
+
],
|
|
164
238
|
'sylphx.agents.v1.ListAgentSessionsRequest': [
|
|
165
239
|
['pageSize', 'page_size'],
|
|
166
240
|
['pageToken', 'page_token'],
|
|
@@ -298,6 +372,20 @@ runtime.registerSchemas({
|
|
|
298
372
|
['scores', 'scores', undefined, 'map'],
|
|
299
373
|
['suiteVersion', 'suite_version'],
|
|
300
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
|
+
],
|
|
301
389
|
'sylphx.agents.v1.RenewalCall': [
|
|
302
390
|
['arguments', 'arguments', undefined, 'json'],
|
|
303
391
|
['cancelField', 'cancel_field'],
|
|
@@ -307,6 +395,15 @@ runtime.registerSchemas({
|
|
|
307
395
|
['idempotencyArgument', 'idempotency_argument'],
|
|
308
396
|
],
|
|
309
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
|
+
],
|
|
310
407
|
'sylphx.agents.v1.RevokeCredentialRequest': [],
|
|
311
408
|
'sylphx.agents.v1.RotateCredentialRequest': [
|
|
312
409
|
['expiresAt', 'expires_at'],
|
|
@@ -346,6 +443,7 @@ runtime.registerSchemas({
|
|
|
346
443
|
],
|
|
347
444
|
'sylphx.agents.v1.SendAgentSessionMessageRequest': [
|
|
348
445
|
['message', 'message', 'sylphx.agents.v1.Message'],
|
|
446
|
+
['execution', 'execution', 'sylphx.agents.v1.SessionTurnExecution'],
|
|
349
447
|
],
|
|
350
448
|
'sylphx.agents.v1.SessionEvent': [
|
|
351
449
|
['meta', 'meta', 'sylphx.common.v1.ResourceMeta'],
|
|
@@ -362,16 +460,35 @@ runtime.registerSchemas({
|
|
|
362
460
|
['response', 'response', 'sylphx.agents.v1.TurnResult'],
|
|
363
461
|
['error', 'error', 'sylphx.agents.v1.ErrorEvent'],
|
|
364
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'],
|
|
365
473
|
],
|
|
366
474
|
'sylphx.agents.v1.SessionUsage': [
|
|
367
475
|
['activeTurnDuration', 'active_turn_duration'],
|
|
368
476
|
['gatewayCalls', 'gateway_calls'],
|
|
369
477
|
['spendMicros', 'spend_micros'],
|
|
370
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
|
+
],
|
|
371
487
|
'sylphx.agents.v1.Skill': [],
|
|
372
488
|
'sylphx.agents.v1.StatusChange': [],
|
|
373
489
|
'sylphx.agents.v1.SteerAgentSessionRequest': [
|
|
374
490
|
['message', 'message', 'sylphx.agents.v1.Message'],
|
|
491
|
+
['execution', 'execution', 'sylphx.agents.v1.SessionTurnExecution'],
|
|
375
492
|
],
|
|
376
493
|
'sylphx.agents.v1.StepUsage': [
|
|
377
494
|
['inputTokens', 'input_tokens'],
|
|
@@ -444,6 +561,7 @@ runtime.registerSchemas({
|
|
|
444
561
|
['ownerPool', 'owner_pool', 'sylphx.agents.v1.OwnerPool'],
|
|
445
562
|
['updateMask', 'update_mask'],
|
|
446
563
|
],
|
|
564
|
+
'sylphx.agents.v1.WriteAgentSessionTransferPartRequest': [],
|
|
447
565
|
});
|
|
448
566
|
/**
|
|
449
567
|
* AgentsService is Sylphx Agents, the platform's hosted agent runtime
|
|
@@ -465,12 +583,20 @@ runtime.registerSchemas({
|
|
|
465
583
|
* Namespace of Sylphx Agents on `Sylphx`.
|
|
466
584
|
*/
|
|
467
585
|
export class AgentsApi {
|
|
586
|
+
/** The `transfers` collection. */
|
|
587
|
+
transfers;
|
|
468
588
|
/** The `agents` collection. */
|
|
469
589
|
agents;
|
|
470
590
|
/** The `agent_versions` collection. */
|
|
471
591
|
agentVersions;
|
|
472
592
|
/** The `agent_sessions` collection. */
|
|
473
593
|
agentSessions;
|
|
594
|
+
/** The `goals` collection. */
|
|
595
|
+
goals;
|
|
596
|
+
/** The `waits` collection. */
|
|
597
|
+
waits;
|
|
598
|
+
/** The `queued_executions` collection. */
|
|
599
|
+
queuedExecutions;
|
|
474
600
|
/** The `session_events` collection. */
|
|
475
601
|
sessionEvents;
|
|
476
602
|
/** The `memory_stores` collection. */
|
|
@@ -480,15 +606,132 @@ export class AgentsApi {
|
|
|
480
606
|
/** The `owner_pools` collection. */
|
|
481
607
|
ownerPools;
|
|
482
608
|
constructor(client) {
|
|
609
|
+
this.transfers = new TransfersCollection(client);
|
|
483
610
|
this.agents = new AgentsCollection(client);
|
|
484
611
|
this.agentVersions = new AgentVersionsCollection(client);
|
|
485
612
|
this.agentSessions = new AgentSessionsCollection(client);
|
|
613
|
+
this.goals = new GoalsCollection(client);
|
|
614
|
+
this.waits = new WaitsCollection(client);
|
|
615
|
+
this.queuedExecutions = new QueuedExecutionsCollection(client);
|
|
486
616
|
this.sessionEvents = new SessionEventsCollection(client);
|
|
487
617
|
this.memoryStores = new MemoryStoresCollection(client);
|
|
488
618
|
this.memories = new MemoriesCollection(client);
|
|
489
619
|
this.ownerPools = new OwnerPoolsCollection(client);
|
|
490
620
|
}
|
|
491
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
|
+
});
|
|
733
|
+
}
|
|
734
|
+
}
|
|
492
735
|
/** `agents` of Sylphx Agents: Resource type `agents.sylphx.com/Agent`. */
|
|
493
736
|
export class AgentsCollection {
|
|
494
737
|
client;
|
|
@@ -848,6 +1091,40 @@ export class AgentSessionsCollection {
|
|
|
848
1091
|
mutation: true,
|
|
849
1092
|
});
|
|
850
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
|
+
}
|
|
851
1128
|
/**
|
|
852
1129
|
* Sends a user message. On an idle or failed session it starts a new turn;
|
|
853
1130
|
* while a turn runs it is refused with `INVALID_STATE` (use `:steer`).
|
|
@@ -938,6 +1215,224 @@ export class AgentSessionsCollection {
|
|
|
938
1215
|
});
|
|
939
1216
|
}
|
|
940
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
|
+
}
|
|
941
1436
|
/** `session_events` of Sylphx Agents: Resource type `agents.sylphx.com/SessionEvent`. */
|
|
942
1437
|
export class SessionEventsCollection {
|
|
943
1438
|
client;
|