@deepraxis/cli 0.1.0-dev.bba7594 → 0.1.0-dev.c01abef
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/COMMANDS.md +33 -7
- package/dist/praxis.js +1600 -223
- package/package.json +5 -5
package/dist/praxis.js
CHANGED
|
@@ -68,7 +68,7 @@ var operations = [
|
|
|
68
68
|
resource: "agent.agents",
|
|
69
69
|
method: "create",
|
|
70
70
|
summary: "Create agent",
|
|
71
|
-
description: 'Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. Unlike Anthropic Managed Agents, nonempty skills attachments
|
|
71
|
+
description: 'Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. Unlike Anthropic Managed Agents, nonempty skills attachments return 400; the native skill tool is separate from the skills field. Use tools: [{type: "agent_toolset_20260401"}] for built-in tools including codemode, skill and agent; inspect toolsets.list for names and schemas, and keep bash enabled for native additions. To offer only some tools, set default_config: {enabled: false} and list the tools to keep in configs, e.g. tools: [{type: "agent_toolset_20260401", default_config: {enabled: false}, configs: [{name: "codemode", enabled: true}, {name: "bash", enabled: true, permission_policy: {type: "always_ask"}}]}]; every tool not listed, including todo_write, enter_plan_mode, ask_user_question and goal_read, follows default_config, and the response echoes it. codemode runs through bash, so enabling codemode while bash is disabled returns 400. Optional mcp_toolset entries pair with mcp_servers. model accepts platform model IDs such as deepseek-flash, not only the Claude IDs in the protocol examples. model.settings.reasoning sets default thinking; other extra model controls return 400. Example: {"name":"helper","model":{"id":"deepseek-flash"},"tools":[{"type":"agent_toolset_20260401"}]}.',
|
|
72
72
|
http: "POST",
|
|
73
73
|
path: "/agent/v1/agents",
|
|
74
74
|
streaming: "no",
|
|
@@ -101,7 +101,7 @@ var operations = [
|
|
|
101
101
|
type: "array",
|
|
102
102
|
itemType: "object",
|
|
103
103
|
required: false,
|
|
104
|
-
description: "
|
|
104
|
+
description: "Praxis extension: HTTP, SSE or trusted stdio MCP servers paired with mcp_toolset entries and saved with the agent version."
|
|
105
105
|
},
|
|
106
106
|
{
|
|
107
107
|
name: "metadata",
|
|
@@ -136,6 +136,27 @@ var operations = [
|
|
|
136
136
|
description: `Tool configurations available to the agent. Maximum of 128 tools
|
|
137
137
|
across all toolsets allowed.`
|
|
138
138
|
},
|
|
139
|
+
{
|
|
140
|
+
name: "databases",
|
|
141
|
+
type: "array",
|
|
142
|
+
itemType: "object",
|
|
143
|
+
required: false,
|
|
144
|
+
description: "Database allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings."
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
name: "vector_stores",
|
|
148
|
+
type: "array",
|
|
149
|
+
itemType: "object",
|
|
150
|
+
required: false,
|
|
151
|
+
description: "Knowledge vector store allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings."
|
|
152
|
+
},
|
|
153
|
+
{
|
|
154
|
+
name: "files",
|
|
155
|
+
type: "array",
|
|
156
|
+
itemType: "object",
|
|
157
|
+
required: false,
|
|
158
|
+
description: "File allowlist for platform resources accessible through service-agent codemode. Only kind=service accepts nonempty bindings; personal agents return 400. At most 20 bindings per resource type, with no duplicate ids. Newly added bindings apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Unbound resources return 404; writes to read_only resources are refused. Other platform APIs return 403, except public API discovery. Invalid bindings and unknown item fields return 400. Omit on create for no bindings."
|
|
159
|
+
},
|
|
139
160
|
{
|
|
140
161
|
name: "kind",
|
|
141
162
|
type: "string",
|
|
@@ -183,6 +204,17 @@ across all toolsets allowed.`
|
|
|
183
204
|
type: "object",
|
|
184
205
|
required: false,
|
|
185
206
|
description: "Praxis extension: switchable model ids on /agent/v1 only. The default model must be included. When omitted, only the default model is selectable."
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "preset",
|
|
210
|
+
type: "string",
|
|
211
|
+
enum: [
|
|
212
|
+
"minimal",
|
|
213
|
+
"data-editor",
|
|
214
|
+
"full"
|
|
215
|
+
],
|
|
216
|
+
required: false,
|
|
217
|
+
description: "Optional tool preset. minimal enables read, glob, grep and ask_user_question; data-editor also enables write and edit; full uses the default toolset with always_allow. Explicit tools override matching preset entries. codemode requires bash and is absent from data-editor."
|
|
186
218
|
}
|
|
187
219
|
]
|
|
188
220
|
}
|
|
@@ -215,7 +247,7 @@ across all toolsets allowed.`
|
|
|
215
247
|
resource: "agent.agents",
|
|
216
248
|
method: "update",
|
|
217
249
|
summary: "Update agent",
|
|
218
|
-
description: "Update an agent. Send the current version in the body for optimistic concurrency: a stale version returns 409, and an update that changes nothing keeps the version number. Any real change saves a new version; existing sessions keep the version they were created with. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. Unlike Anthropic Managed Agents, nonempty skills attachments
|
|
250
|
+
description: "Update an agent. Send the current version in the body for optimistic concurrency: a stale version returns 409, and an update that changes nothing keeps the version number. Any real change saves a new version; existing sessions keep the version they were created with. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. Unlike Anthropic Managed Agents, nonempty skills attachments return 400; use the native skill tool for available runtime skills.",
|
|
219
251
|
http: "POST",
|
|
220
252
|
path: "/agent/v1/agents/{agent_id}",
|
|
221
253
|
streaming: "no",
|
|
@@ -241,7 +273,7 @@ across all toolsets allowed.`
|
|
|
241
273
|
type: "array",
|
|
242
274
|
itemType: "object",
|
|
243
275
|
required: false,
|
|
244
|
-
description: "
|
|
276
|
+
description: "Praxis extension: HTTP, SSE or trusted stdio MCP servers paired with mcp_toolset entries and saved with the agent version."
|
|
245
277
|
},
|
|
246
278
|
{
|
|
247
279
|
name: "metadata",
|
|
@@ -301,6 +333,27 @@ Obtain this value from a create or retrieve response. Must be at least 1 if
|
|
|
301
333
|
specified. When supplied, the request fails if it does not match the server's
|
|
302
334
|
current version; omit to apply the update unconditionally.`
|
|
303
335
|
},
|
|
336
|
+
{
|
|
337
|
+
name: "databases",
|
|
338
|
+
type: "array",
|
|
339
|
+
itemType: "object",
|
|
340
|
+
required: false,
|
|
341
|
+
description: "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings."
|
|
342
|
+
},
|
|
343
|
+
{
|
|
344
|
+
name: "vector_stores",
|
|
345
|
+
type: "array",
|
|
346
|
+
itemType: "object",
|
|
347
|
+
required: false,
|
|
348
|
+
description: "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings."
|
|
349
|
+
},
|
|
350
|
+
{
|
|
351
|
+
name: "files",
|
|
352
|
+
type: "array",
|
|
353
|
+
itemType: "object",
|
|
354
|
+
required: false,
|
|
355
|
+
description: "Replace this resource allowlist; omission preserves it, and null or [] clears it. Additions apply only to new sessions; disabling or removing a binding immediately revokes access in running sessions. Only service agents accept nonempty bindings."
|
|
356
|
+
},
|
|
304
357
|
{
|
|
305
358
|
name: "kind",
|
|
306
359
|
type: "string",
|
|
@@ -348,6 +401,17 @@ current version; omit to apply the update unconditionally.`
|
|
|
348
401
|
type: "object",
|
|
349
402
|
required: false,
|
|
350
403
|
description: "Praxis extension: switchable model ids on /agent/v1 only. The default model must be included. When omitted, only the default model is selectable."
|
|
404
|
+
},
|
|
405
|
+
{
|
|
406
|
+
name: "preset",
|
|
407
|
+
type: "string",
|
|
408
|
+
enum: [
|
|
409
|
+
"minimal",
|
|
410
|
+
"data-editor",
|
|
411
|
+
"full"
|
|
412
|
+
],
|
|
413
|
+
required: false,
|
|
414
|
+
description: "Optional tool preset. minimal enables read, glob, grep and ask_user_question; data-editor also enables write and edit; full uses the default toolset with always_allow. Explicit tools override matching preset entries. codemode requires bash and is absent from data-editor."
|
|
351
415
|
}
|
|
352
416
|
]
|
|
353
417
|
}
|
|
@@ -369,6 +433,206 @@ current version; omit to apply the update unconditionally.`
|
|
|
369
433
|
],
|
|
370
434
|
query: []
|
|
371
435
|
},
|
|
436
|
+
{
|
|
437
|
+
resource: "agent.agents.endUsers",
|
|
438
|
+
method: "list",
|
|
439
|
+
summary: "List End Users",
|
|
440
|
+
description: `List users who have sessions or token issuance history on a service agent.
|
|
441
|
+
|
|
442
|
+
Ordered by last_active_at and external_user_id descending. q is a case-sensitive literal prefix, including underscores. limit is 1–100, default 20. Reuse next_page with the same organization, agent, q and limit. Preemptively blocked users without history do not appear. End-user credentials and inaccessible or personal agents return 404.`,
|
|
443
|
+
http: "GET",
|
|
444
|
+
path: "/agent/v1/agents/{agent_id}/end_users",
|
|
445
|
+
streaming: "no",
|
|
446
|
+
pagination: false,
|
|
447
|
+
pathParams: [
|
|
448
|
+
{
|
|
449
|
+
name: "agent_id",
|
|
450
|
+
sdkName: "agent_id"
|
|
451
|
+
}
|
|
452
|
+
],
|
|
453
|
+
query: [
|
|
454
|
+
{
|
|
455
|
+
name: "limit",
|
|
456
|
+
type: "integer",
|
|
457
|
+
required: false,
|
|
458
|
+
description: "Maximum users per page; defaults to 20."
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
name: "page",
|
|
462
|
+
type: "string",
|
|
463
|
+
required: false,
|
|
464
|
+
description: "next_page from the previous response with the same agent, q and limit."
|
|
465
|
+
},
|
|
466
|
+
{
|
|
467
|
+
name: "q",
|
|
468
|
+
type: "string",
|
|
469
|
+
required: false,
|
|
470
|
+
description: "Case-sensitive literal prefix of external_user_id; omit or use an empty string for all users."
|
|
471
|
+
}
|
|
472
|
+
]
|
|
473
|
+
},
|
|
474
|
+
{
|
|
475
|
+
resource: "agent.agents.endUsers",
|
|
476
|
+
method: "delete",
|
|
477
|
+
summary: "Delete end-user data",
|
|
478
|
+
description: `Delete a host application's end-user data from one service agent after explicit confirmation.
|
|
479
|
+
|
|
480
|
+
Develop only. Set confirm to the exact external_user_id; missing or mismatched confirmation returns 400. Returns 202 with a pending task id, not completion. Poll the deletion endpoint. Concurrent requests reuse the unfinished task; retry DELETE after failure to resume it. Tokens are revoked and the user is blocked before a seven-day recovery snapshot is verified. Sessions including child sessions, conversation data, grants and feedback are then removed. A pre-existing block remains; a temporary block is removed on success. Attachment metadata is recorded and File attachments are retained. No charge is introduced by this operation. Example: DELETE /agent/v1/agents/agent_example/end_users/customer_123?confirm=customer_123.`,
|
|
481
|
+
http: "DELETE",
|
|
482
|
+
path: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}",
|
|
483
|
+
streaming: "no",
|
|
484
|
+
pagination: false,
|
|
485
|
+
pathParams: [
|
|
486
|
+
{
|
|
487
|
+
name: "agent_id",
|
|
488
|
+
sdkName: "agent_id"
|
|
489
|
+
},
|
|
490
|
+
{
|
|
491
|
+
name: "external_user_id",
|
|
492
|
+
sdkName: "external_user_id"
|
|
493
|
+
}
|
|
494
|
+
],
|
|
495
|
+
query: [
|
|
496
|
+
{
|
|
497
|
+
name: "confirm",
|
|
498
|
+
type: "string",
|
|
499
|
+
required: true,
|
|
500
|
+
description: "Must exactly equal the external_user_id path parameter to confirm destructive deletion."
|
|
501
|
+
}
|
|
502
|
+
]
|
|
503
|
+
},
|
|
504
|
+
{
|
|
505
|
+
resource: "agent.agents.endUsers",
|
|
506
|
+
method: "retrieve",
|
|
507
|
+
summary: "Get End User",
|
|
508
|
+
description: `Inspect one end user and their twenty most recently updated sessions.
|
|
509
|
+
|
|
510
|
+
Use external_user_id from listing or your host application. Users without session or issuance history return 404, including preemptively blocked users. End-user credentials and inaccessible or personal agents return 404.`,
|
|
511
|
+
http: "GET",
|
|
512
|
+
path: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}",
|
|
513
|
+
streaming: "no",
|
|
514
|
+
pagination: false,
|
|
515
|
+
pathParams: [
|
|
516
|
+
{
|
|
517
|
+
name: "agent_id",
|
|
518
|
+
sdkName: "agent_id"
|
|
519
|
+
},
|
|
520
|
+
{
|
|
521
|
+
name: "external_user_id",
|
|
522
|
+
sdkName: "external_user_id"
|
|
523
|
+
}
|
|
524
|
+
],
|
|
525
|
+
query: []
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
resource: "agent.agents.endUsers.block",
|
|
529
|
+
method: "create",
|
|
530
|
+
summary: "Block End User",
|
|
531
|
+
description: `Block token issuance and session creation, then revoke existing tokens for an end user.
|
|
532
|
+
|
|
533
|
+
May block a user before any history exists; timestamps are then null and counts and cost are zero. Requires an embed policy, otherwise returns 409 with setup guidance. Deduplicates the policy blocklist and retains its 1000-user maximum. If revocation returns 502, the user remains blocked; retry to finish revocation. Repeats keep the user blocked and revoke any remaining grants. End-user credentials and inaccessible or personal agents return 404.`,
|
|
534
|
+
http: "POST",
|
|
535
|
+
path: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block",
|
|
536
|
+
streaming: "no",
|
|
537
|
+
pagination: false,
|
|
538
|
+
pathParams: [
|
|
539
|
+
{
|
|
540
|
+
name: "agent_id",
|
|
541
|
+
sdkName: "agent_id"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
name: "external_user_id",
|
|
545
|
+
sdkName: "external_user_id"
|
|
546
|
+
}
|
|
547
|
+
],
|
|
548
|
+
query: []
|
|
549
|
+
},
|
|
550
|
+
{
|
|
551
|
+
resource: "agent.agents.endUsers",
|
|
552
|
+
method: "retrieveDeletion",
|
|
553
|
+
summary: "Get end-user deletion",
|
|
554
|
+
description: `Poll the latest deletion task for an end user, including after the user data has been removed.
|
|
555
|
+
|
|
556
|
+
Use the same agent_id and external_user_id as the confirmed DELETE. Status is pending, snapshotting, deleting, done or failed. Counts are empty until a verified snapshot exists. A failed task remains blocked and resumes when DELETE is retried with matching confirmation. snapshot_key is an operator recovery reference retained for seven days, not a public download URL. End-user credentials, inaccessible or personal agents, and missing tasks return 404. This read does not create a task or charge usage.`,
|
|
557
|
+
http: "GET",
|
|
558
|
+
path: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion",
|
|
559
|
+
streaming: "no",
|
|
560
|
+
pagination: false,
|
|
561
|
+
pathParams: [
|
|
562
|
+
{
|
|
563
|
+
name: "agent_id",
|
|
564
|
+
sdkName: "agent_id"
|
|
565
|
+
},
|
|
566
|
+
{
|
|
567
|
+
name: "external_user_id",
|
|
568
|
+
sdkName: "external_user_id"
|
|
569
|
+
}
|
|
570
|
+
],
|
|
571
|
+
query: []
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
resource: "agent.agents.endUsers.revokeTokens",
|
|
575
|
+
method: "create",
|
|
576
|
+
summary: "Revoke End User Tokens",
|
|
577
|
+
description: `Revoke all issued tokens for an end user and terminate their open embed streams.
|
|
578
|
+
|
|
579
|
+
Revokes credentials before marking grants revoked. Upstream failure returns 502 without changing grant revocation timestamps. Returns the count of newly revoked grants; a repeat without new grants returns zero. Does not block future issuance. End-user credentials and inaccessible or personal agents return 404.`,
|
|
580
|
+
http: "POST",
|
|
581
|
+
path: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens",
|
|
582
|
+
streaming: "no",
|
|
583
|
+
pagination: false,
|
|
584
|
+
pathParams: [
|
|
585
|
+
{
|
|
586
|
+
name: "agent_id",
|
|
587
|
+
sdkName: "agent_id"
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
name: "external_user_id",
|
|
591
|
+
sdkName: "external_user_id"
|
|
592
|
+
}
|
|
593
|
+
],
|
|
594
|
+
query: []
|
|
595
|
+
},
|
|
596
|
+
{
|
|
597
|
+
resource: "agent.agents.endUsers.unblock",
|
|
598
|
+
method: "create",
|
|
599
|
+
summary: "Unblock End User",
|
|
600
|
+
description: `Allow an end user to receive new tokens and create new sessions again.
|
|
601
|
+
|
|
602
|
+
Removes the user from the blocklist; previously revoked tokens stay revoked. Idempotent. Requires an embed policy, otherwise returns 409 with setup guidance. Returns null timestamps and zero counts and cost when no session or issuance history exists. End-user credentials and inaccessible or personal agents return 404.`,
|
|
603
|
+
http: "POST",
|
|
604
|
+
path: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock",
|
|
605
|
+
streaming: "no",
|
|
606
|
+
pagination: false,
|
|
607
|
+
pathParams: [
|
|
608
|
+
{
|
|
609
|
+
name: "agent_id",
|
|
610
|
+
sdkName: "agent_id"
|
|
611
|
+
},
|
|
612
|
+
{
|
|
613
|
+
name: "external_user_id",
|
|
614
|
+
sdkName: "external_user_id"
|
|
615
|
+
}
|
|
616
|
+
],
|
|
617
|
+
query: []
|
|
618
|
+
},
|
|
619
|
+
{
|
|
620
|
+
resource: "agent.agents.unarchive",
|
|
621
|
+
method: "create",
|
|
622
|
+
summary: "Unarchive Agent",
|
|
623
|
+
description: "Restore an archived agent without creating a configuration version. Already active agents are unchanged. Missing or inaccessible agents return 404. Use the returned agent id to create new sessions.",
|
|
624
|
+
http: "POST",
|
|
625
|
+
path: "/agent/v1/agents/{agent_id}/unarchive",
|
|
626
|
+
streaming: "no",
|
|
627
|
+
pagination: false,
|
|
628
|
+
pathParams: [
|
|
629
|
+
{
|
|
630
|
+
name: "agent_id",
|
|
631
|
+
sdkName: "agent_id"
|
|
632
|
+
}
|
|
633
|
+
],
|
|
634
|
+
query: []
|
|
635
|
+
},
|
|
372
636
|
{
|
|
373
637
|
resource: "agent.agents.versions",
|
|
374
638
|
method: "list",
|
|
@@ -580,7 +844,9 @@ Own-face superset: Managed Agents has no persistent Computer attachment director
|
|
|
580
844
|
summary: "Connect computer",
|
|
581
845
|
description: `Resume the computer and issue a sandbox connection.
|
|
582
846
|
|
|
583
|
-
Own-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials
|
|
847
|
+
Own-face extension: Managed Agents has no persistent Computer connection. Returns the public SDK sandbox_id, envd_access_token and template_id, plus the machine tier the computer is on now (light or heavy) and the lease that keeps it there (lease_id, lease_expires_at; lease_id is null when no lease exists). Keep the lease while the connection stays open: renew it about every 20 seconds (POST .../leases/{lease_id}/renew) and release it on close (DELETE .../leases/{lease_id}). An unrenewed lease simply expires, and the full machine is reclaimed only after that. Archived computers remain accessible; foreign or absent computers return 404. Never cache credentials.
|
|
848
|
+
|
|
849
|
+
Connect to a computer with a caller-held lease. Omit the body or send {} to request light: the lightweight shell, or the heavy instance while it is running. Send {"need":"heavy"} to request full Linux for interactive programs; files are synchronized before the heavy connection is returned with tier heavy. Renew the lease while using the connection and release it with DELETE when finished.`,
|
|
584
850
|
http: "POST",
|
|
585
851
|
path: "/agent/v1/computers/{computer_id}/connect",
|
|
586
852
|
streaming: "no",
|
|
@@ -591,7 +857,22 @@ Own-face extension: Managed Agents has no persistent Computer connection. Return
|
|
|
591
857
|
sdkName: "computer_id"
|
|
592
858
|
}
|
|
593
859
|
],
|
|
594
|
-
query: []
|
|
860
|
+
query: [],
|
|
861
|
+
body: {
|
|
862
|
+
required: false,
|
|
863
|
+
fields: [
|
|
864
|
+
{
|
|
865
|
+
name: "need",
|
|
866
|
+
type: "string",
|
|
867
|
+
enum: [
|
|
868
|
+
"light",
|
|
869
|
+
"heavy"
|
|
870
|
+
],
|
|
871
|
+
required: false,
|
|
872
|
+
description: "Defaults to light. light uses the lightweight shell, or the heavy instance while it is running. heavy requests a full Linux computer for interactive programs; heavy running time counts toward the daily budget in seconds."
|
|
873
|
+
}
|
|
874
|
+
]
|
|
875
|
+
}
|
|
595
876
|
},
|
|
596
877
|
{
|
|
597
878
|
resource: "agent.computers.files",
|
|
@@ -645,6 +926,52 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
645
926
|
}
|
|
646
927
|
]
|
|
647
928
|
},
|
|
929
|
+
{
|
|
930
|
+
resource: "agent.computers.leases",
|
|
931
|
+
method: "delete",
|
|
932
|
+
summary: "Release computer lease",
|
|
933
|
+
description: `Give the lease back when a connection closes so the full machine can be reclaimed without waiting for it to expire.
|
|
934
|
+
|
|
935
|
+
Own-face extension. Idempotent: an unknown or already released lease succeeds as well. Foreign or absent computers return 404.`,
|
|
936
|
+
http: "DELETE",
|
|
937
|
+
path: "/agent/v1/computers/{computer_id}/leases/{lease_id}",
|
|
938
|
+
streaming: "no",
|
|
939
|
+
pagination: false,
|
|
940
|
+
pathParams: [
|
|
941
|
+
{
|
|
942
|
+
name: "computer_id",
|
|
943
|
+
sdkName: "computer_id"
|
|
944
|
+
},
|
|
945
|
+
{
|
|
946
|
+
name: "lease_id",
|
|
947
|
+
sdkName: "lease_id"
|
|
948
|
+
}
|
|
949
|
+
],
|
|
950
|
+
query: []
|
|
951
|
+
},
|
|
952
|
+
{
|
|
953
|
+
resource: "agent.computers.leases.renew",
|
|
954
|
+
method: "create",
|
|
955
|
+
summary: "Renew computer lease",
|
|
956
|
+
description: `Extend the lease a connection holds so the full machine stays in service while the connection is open.
|
|
957
|
+
|
|
958
|
+
Own-face extension. A lease that is no longer valid (released, expired, or the computer moved to another machine) returns 409 LEASE_STALE; call connect again for a new connection and lease. Foreign or absent computers return 404.`,
|
|
959
|
+
http: "POST",
|
|
960
|
+
path: "/agent/v1/computers/{computer_id}/leases/{lease_id}/renew",
|
|
961
|
+
streaming: "no",
|
|
962
|
+
pagination: false,
|
|
963
|
+
pathParams: [
|
|
964
|
+
{
|
|
965
|
+
name: "computer_id",
|
|
966
|
+
sdkName: "computer_id"
|
|
967
|
+
},
|
|
968
|
+
{
|
|
969
|
+
name: "lease_id",
|
|
970
|
+
sdkName: "lease_id"
|
|
971
|
+
}
|
|
972
|
+
],
|
|
973
|
+
query: []
|
|
974
|
+
},
|
|
648
975
|
{
|
|
649
976
|
resource: "agent.deploymentRuns",
|
|
650
977
|
method: "list",
|
|
@@ -1074,6 +1401,43 @@ null to clear. Maximum 50.`
|
|
|
1074
1401
|
],
|
|
1075
1402
|
query: []
|
|
1076
1403
|
},
|
|
1404
|
+
{
|
|
1405
|
+
resource: "agent.embed",
|
|
1406
|
+
method: "retrieveAppearance",
|
|
1407
|
+
summary: "Read chat appearance",
|
|
1408
|
+
description: "Load saved appearance for an iframe or Hosted chat page. Supply an end-user embed token as Bearer authorization, or a console-issued publishable key in Praxis-Publishable-Key before anonymous token issuance. The credential selects the agent; identity_number and agent_id query parameters are rejected with 400. Missing appearance returns an empty object. Kit option names retain camelCase. Responses are private and cacheable for 60 seconds. Component hosts configure Kit in their own code instead.",
|
|
1409
|
+
http: "GET",
|
|
1410
|
+
path: "/agent/v1/embed/appearance",
|
|
1411
|
+
streaming: "no",
|
|
1412
|
+
pagination: false,
|
|
1413
|
+
pathParams: [],
|
|
1414
|
+
query: []
|
|
1415
|
+
},
|
|
1416
|
+
{
|
|
1417
|
+
resource: "agent.embed.exchange",
|
|
1418
|
+
method: "create",
|
|
1419
|
+
summary: "Exchange Hosted Code",
|
|
1420
|
+
description: `Redeem a single-use hosted link credential for an end-user token.
|
|
1421
|
+
|
|
1422
|
+
Read code from the c fragment parameter of hosted_url returned by embed token creation with hosted true, then remove the fragment before exchanging. No Authorization header is required; the code authenticates this request. The code expires after 60 seconds and is consumed atomically on exchange, so concurrent attempts have only one winner. Expired, used and unknown codes return the same 404 body. Keep the token in memory and return to the host website for a fresh link when it expires; exchange cannot refresh it. Requests are IP limited per minute using the anonymous entrypoint budget (default 20). Example body is {"code":"<code from hosted_url>"}.`,
|
|
1423
|
+
http: "POST",
|
|
1424
|
+
path: "/agent/v1/embed/exchange",
|
|
1425
|
+
streaming: "no",
|
|
1426
|
+
pagination: false,
|
|
1427
|
+
pathParams: [],
|
|
1428
|
+
query: [],
|
|
1429
|
+
body: {
|
|
1430
|
+
required: true,
|
|
1431
|
+
fields: [
|
|
1432
|
+
{
|
|
1433
|
+
name: "code",
|
|
1434
|
+
type: "string",
|
|
1435
|
+
required: true,
|
|
1436
|
+
description: "Single-use credential from the c fragment parameter of hosted_url returned by embed token creation. Valid for 60 seconds."
|
|
1437
|
+
}
|
|
1438
|
+
]
|
|
1439
|
+
}
|
|
1440
|
+
},
|
|
1077
1441
|
{
|
|
1078
1442
|
resource: "agent.embedTokens",
|
|
1079
1443
|
method: "list",
|
|
@@ -1119,7 +1483,7 @@ Includes expired and revoked grants; returns neither token nor token_id. Sorts b
|
|
|
1119
1483
|
summary: "Create Embed Token",
|
|
1120
1484
|
description: `Issue a short-lived credential on your backend for an end user of a service agent.
|
|
1121
1485
|
|
|
1122
|
-
Requires an active service agent in your organization with an embed policy. Pins the requested version or the latest version and snapshots the policy environment, vaults and resources; metadata comes from the request. Blocked users cannot receive tokens. Keep your API key on the backend and pass only the returned token to the frontend. Every call creates a new grant; issuance is not idempotent.
|
|
1486
|
+
Requires an active service agent in your organization with an embed policy. Pins the requested version or the latest version and snapshots the policy environment, vaults and resources; metadata comes from the request. Blocked users cannot receive tokens. Keep your API key on the backend and pass only the returned token to the frontend. Every call creates a new grant; issuance is not idempotent. Set hosted to true to also receive hosted_url; redirect the user there within 60 seconds. The agent must have an identity_number. The URL fragment contains a single-use exchange credential, not the token. Omit hosted or set false for ordinary token issuance.`,
|
|
1123
1487
|
http: "POST",
|
|
1124
1488
|
path: "/agent/v1/embed_tokens",
|
|
1125
1489
|
streaming: "no",
|
|
@@ -1129,6 +1493,12 @@ Requires an active service agent in your organization with an embed policy. Pins
|
|
|
1129
1493
|
body: {
|
|
1130
1494
|
required: true,
|
|
1131
1495
|
fields: [
|
|
1496
|
+
{
|
|
1497
|
+
name: "hosted",
|
|
1498
|
+
type: "boolean",
|
|
1499
|
+
required: false,
|
|
1500
|
+
description: "Set true to also return a hosted chat URL with a single-use credential valid for 60 seconds. Defaults to false; the agent must have an identity_number."
|
|
1501
|
+
},
|
|
1132
1502
|
{
|
|
1133
1503
|
name: "agent",
|
|
1134
1504
|
type: "string",
|
|
@@ -1188,6 +1558,37 @@ Requires an active service agent in your organization with an embed policy. Pins
|
|
|
1188
1558
|
]
|
|
1189
1559
|
}
|
|
1190
1560
|
},
|
|
1561
|
+
{
|
|
1562
|
+
resource: "agent.embedTokens.anonymous",
|
|
1563
|
+
method: "create",
|
|
1564
|
+
summary: "Issue anonymous visitor token",
|
|
1565
|
+
description: `Obtain a short-lived embedding token for a visitor without an account using the agent owner's publishable key.
|
|
1566
|
+
|
|
1567
|
+
No Authorization header is required. Send the browser Origin allowed by the agent policy. Save a returned visitor_secret and reuse it for refreshes; only new visitors receive one. Unknown secrets create new visitors, and extra fields including visitor_id return 400. Issuance uses the key creator's organization membership, the key session budget and the smaller of the policy TTL maximum and 3600 seconds. IP requests are limited per minute (default 20); UTC daily session and spending caps are checked across the key's primary sessions created that day. Token issuance itself does not create a session or charge usage; subsequent sessions bill the host organization. Example body: {"publishable_key":"pk_praxis_example"}.`,
|
|
1568
|
+
http: "POST",
|
|
1569
|
+
path: "/agent/v1/embed_tokens/anonymous",
|
|
1570
|
+
streaming: "no",
|
|
1571
|
+
pagination: false,
|
|
1572
|
+
pathParams: [],
|
|
1573
|
+
query: [],
|
|
1574
|
+
body: {
|
|
1575
|
+
required: true,
|
|
1576
|
+
fields: [
|
|
1577
|
+
{
|
|
1578
|
+
name: "publishable_key",
|
|
1579
|
+
type: "string",
|
|
1580
|
+
required: true,
|
|
1581
|
+
description: "Public key created by the service agent owner; safe to include in browser code."
|
|
1582
|
+
},
|
|
1583
|
+
{
|
|
1584
|
+
name: "visitor_secret",
|
|
1585
|
+
type: "string",
|
|
1586
|
+
required: false,
|
|
1587
|
+
description: "Secret returned by a previous anonymous issuance for this key. Omit for a new visitor; an unknown secret creates a new visitor."
|
|
1588
|
+
}
|
|
1589
|
+
]
|
|
1590
|
+
}
|
|
1591
|
+
},
|
|
1191
1592
|
{
|
|
1192
1593
|
resource: "agent.embedTokens.revoke",
|
|
1193
1594
|
method: "create",
|
|
@@ -1492,6 +1893,25 @@ owning account only.`
|
|
|
1492
1893
|
type: "string",
|
|
1493
1894
|
required: false,
|
|
1494
1895
|
description: "Opaque pagination cursor: pass the next_page value of the previous response unchanged. Omit it for the first page. A cursor from a different query or a malformed one returns 400."
|
|
1896
|
+
},
|
|
1897
|
+
{
|
|
1898
|
+
name: "external_user_id",
|
|
1899
|
+
type: "string",
|
|
1900
|
+
required: false,
|
|
1901
|
+
description: "Filter by an exact end-user identifier (1–128 characters: A-Z, a-z, 0-9, underscore, dot, colon, at sign or hyphen). Keep this filter unchanged when following page."
|
|
1902
|
+
},
|
|
1903
|
+
{
|
|
1904
|
+
name: "source",
|
|
1905
|
+
type: "string",
|
|
1906
|
+
enum: [
|
|
1907
|
+
"kit",
|
|
1908
|
+
"iframe",
|
|
1909
|
+
"hosted",
|
|
1910
|
+
"api",
|
|
1911
|
+
"automation"
|
|
1912
|
+
],
|
|
1913
|
+
required: false,
|
|
1914
|
+
description: "Filter by session origin: kit, iframe, hosted, api or automation. Keep this filter unchanged when following page."
|
|
1495
1915
|
}
|
|
1496
1916
|
]
|
|
1497
1917
|
},
|
|
@@ -1499,7 +1919,7 @@ owning account only.`
|
|
|
1499
1919
|
resource: "agent.sessions",
|
|
1500
1920
|
method: "create",
|
|
1501
1921
|
summary: "Create session",
|
|
1502
|
-
description: `Create a session: one conversation with an agent
|
|
1922
|
+
description: `Create a session: one conversation with an agent. Pass agent as an agent id (latest version) or {id, version, type:"agent"}. Unlike Anthropic Managed Agents, omit environment_id to get a light machine, unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, omission returns environment_id=light; explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Inline agent overrides are not supported. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Omitted budget defaults to USD 20; null removes the limit, and a limit object uses a positive integer string of USD cents. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion.`,
|
|
1503
1923
|
http: "POST",
|
|
1504
1924
|
path: "/agent/v1/sessions",
|
|
1505
1925
|
streaming: "no",
|
|
@@ -1519,7 +1939,7 @@ owning account only.`
|
|
|
1519
1939
|
name: "environment_id",
|
|
1520
1940
|
type: "string",
|
|
1521
1941
|
required: false,
|
|
1522
|
-
description: "
|
|
1942
|
+
description: "Execution environment id from agent.environments.list or agent.environments.create. For a service agent, omission selects the built-in light environment and returns session.environment_id=light; explicit null allocates no machine and makes machine tools, including codemode and bash, unavailable. Personal agents use their selected Computer."
|
|
1523
1943
|
},
|
|
1524
1944
|
{
|
|
1525
1945
|
name: "budget",
|
|
@@ -1599,6 +2019,23 @@ offsets ("+08:00") and unknown names return 400. Never stored in
|
|
|
1599
2019
|
]
|
|
1600
2020
|
}
|
|
1601
2021
|
},
|
|
2022
|
+
{
|
|
2023
|
+
resource: "agent.sessions",
|
|
2024
|
+
method: "delete",
|
|
2025
|
+
summary: "Delete session",
|
|
2026
|
+
description: "Delete an idle or terminated session and its event history after saving a deletion snapshot. Supply the session id from creation or listing. Running sessions return 409 INVALID_STATE: interrupt first or wait until idle or terminated. Afterwards retrieval and event listing return 404 and lists omit the session. Example: DELETE /agent/v1/sessions/sesn_example.",
|
|
2027
|
+
http: "DELETE",
|
|
2028
|
+
path: "/agent/v1/sessions/{session_id}",
|
|
2029
|
+
streaming: "no",
|
|
2030
|
+
pagination: false,
|
|
2031
|
+
pathParams: [
|
|
2032
|
+
{
|
|
2033
|
+
name: "session_id",
|
|
2034
|
+
sdkName: "session_id"
|
|
2035
|
+
}
|
|
2036
|
+
],
|
|
2037
|
+
query: []
|
|
2038
|
+
},
|
|
1602
2039
|
{
|
|
1603
2040
|
resource: "agent.sessions",
|
|
1604
2041
|
method: "retrieve",
|
|
@@ -1872,7 +2309,7 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
|
|
|
1872
2309
|
resource: "agent.sessions.events",
|
|
1873
2310
|
method: "list",
|
|
1874
2311
|
summary: "List session events",
|
|
1875
|
-
description: "Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval (session.status_idle with stop_reason requires_action lists their event_ids), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter.",
|
|
2312
|
+
description: "Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval or client custom tool results (session.status_idle with stop_reason requires_action lists their event_ids), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter.",
|
|
1876
2313
|
http: "GET",
|
|
1877
2314
|
path: "/agent/v1/sessions/{session_id}/events",
|
|
1878
2315
|
streaming: "no",
|
|
@@ -1943,7 +2380,7 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
|
|
|
1943
2380
|
resource: "agent.sessions.events",
|
|
1944
2381
|
method: "send",
|
|
1945
2382
|
summary: "Send session events",
|
|
1946
|
-
description: 'Send events to a session: user.message (exactly one nonempty text block), user.interrupt, user.tool_confirmation to allow or deny a pending tool call, user.steer to inject a queued user.message into a turn that is still running, and user.withdraw to retract a queued message. The response only acknowledges the inputs; read replies with sessions.events.list or sessions.events.stream. A message sent while the session waits for tool approval is queued (processed_at null) and runs in order after the approval is resolved. Archived sessions reject new messages. To approve, read a pending agent.tool_use or agent.mcp_tool_use event and send {type: "user.tool_confirmation", tool_use_id: <that event id>, result: "allow"} (or deny); include session_thread_id for a child approval. Native confirmations also accept updated_permissions, answers and annotations, which /anthropic/v1 rejects.',
|
|
2383
|
+
description: 'Attach optional praxis_context={items:[{name,value}]} to user.message for untrusted page context on this turn only (maximum 32 items, 4096 UTF-8 JSON bytes). /anthropic/v1 rejects this field. Send events to a session: user.message (exactly one nonempty text block), user.interrupt, user.tool_confirmation to allow or deny a pending tool call, user.custom_tool_result to return a custom tool result, user.steer to inject a queued user.message into a turn that is still running, and user.withdraw to retract a queued message. The response only acknowledges the inputs; read replies with sessions.events.list or sessions.events.stream. A message sent while the session waits for tool approval is queued (processed_at null) and runs in order after the approval is resolved. Archived sessions reject new messages. To approve, read a pending agent.tool_use or agent.mcp_tool_use event and send {type: "user.tool_confirmation", tool_use_id: <that event id>, result: "allow"} (or deny); include session_thread_id for a child approval. Native confirmations also accept updated_permissions, answers and annotations, which /anthropic/v1 rejects. Both faces accept user.custom_tool_result with custom_tool_use_id from agent.custom_tool_use.id or the requires_action stop_reason.event_ids. Unlike Anthropic, result content accepts only text blocks (omit it for an empty array). Omitted or null is_error means false. The server routes child calls by id; session_thread_id is rejected in this input. Unknown call ids return 400; duplicate results or calls no longer waiting return 409.',
|
|
1947
2384
|
http: "POST",
|
|
1948
2385
|
path: "/agent/v1/sessions/{session_id}/events",
|
|
1949
2386
|
streaming: "no",
|
|
@@ -2159,6 +2596,73 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2159
2596
|
}
|
|
2160
2597
|
]
|
|
2161
2598
|
},
|
|
2599
|
+
{
|
|
2600
|
+
resource: "agent.sessions.runs",
|
|
2601
|
+
method: "deleteFeedback",
|
|
2602
|
+
summary: "Delete Run Feedback",
|
|
2603
|
+
description: `Remove the rating and comment for a run.
|
|
2604
|
+
|
|
2605
|
+
Own-face extension. Use the session id from session creation or listing and the run_id from its events. Requires a readable session and a run belonging to it. Idempotent; returns 204 even when no feedback exists. End users can delete feedback only for their own sessions. Does not delete the run or messages, enter model context, or start another run.`,
|
|
2606
|
+
http: "DELETE",
|
|
2607
|
+
path: "/agent/v1/sessions/{session_id}/runs/{run_id}/feedback",
|
|
2608
|
+
streaming: "no",
|
|
2609
|
+
pagination: false,
|
|
2610
|
+
pathParams: [
|
|
2611
|
+
{
|
|
2612
|
+
name: "session_id",
|
|
2613
|
+
sdkName: "session_id"
|
|
2614
|
+
},
|
|
2615
|
+
{
|
|
2616
|
+
name: "run_id",
|
|
2617
|
+
sdkName: "run_id"
|
|
2618
|
+
}
|
|
2619
|
+
],
|
|
2620
|
+
query: []
|
|
2621
|
+
},
|
|
2622
|
+
{
|
|
2623
|
+
resource: "agent.sessions.runs.feedback",
|
|
2624
|
+
method: "create",
|
|
2625
|
+
summary: "Set Run Feedback",
|
|
2626
|
+
description: `Submit thumbs up or thumbs down for a run, with an optional comment.
|
|
2627
|
+
|
|
2628
|
+
Own-face extension. Use a readable session and a run_id from its events. Each submission replaces the previous rating and comment; omitted or null comment clears it, while created_at is preserved. Comments allow at most 2000 Unicode characters. End users can submit only for their own sessions. Feedback never enters model context or starts a run. For example, submit {"rating":"positive","comment":"Helpful"}. POST follows Managed Agents resource update conventions; the resource remains unique per session and run.`,
|
|
2629
|
+
http: "POST",
|
|
2630
|
+
path: "/agent/v1/sessions/{session_id}/runs/{run_id}/feedback",
|
|
2631
|
+
streaming: "no",
|
|
2632
|
+
pagination: false,
|
|
2633
|
+
pathParams: [
|
|
2634
|
+
{
|
|
2635
|
+
name: "session_id",
|
|
2636
|
+
sdkName: "session_id"
|
|
2637
|
+
},
|
|
2638
|
+
{
|
|
2639
|
+
name: "run_id",
|
|
2640
|
+
sdkName: "run_id"
|
|
2641
|
+
}
|
|
2642
|
+
],
|
|
2643
|
+
query: [],
|
|
2644
|
+
body: {
|
|
2645
|
+
required: true,
|
|
2646
|
+
fields: [
|
|
2647
|
+
{
|
|
2648
|
+
name: "rating",
|
|
2649
|
+
type: "string",
|
|
2650
|
+
enum: [
|
|
2651
|
+
"positive",
|
|
2652
|
+
"negative"
|
|
2653
|
+
],
|
|
2654
|
+
required: true,
|
|
2655
|
+
description: "positive means thumbs up; negative means thumbs down for this run."
|
|
2656
|
+
},
|
|
2657
|
+
{
|
|
2658
|
+
name: "comment",
|
|
2659
|
+
type: "string",
|
|
2660
|
+
required: false,
|
|
2661
|
+
description: "Optional comment, at most 2000 Unicode characters. Omit or send null to clear the previous comment."
|
|
2662
|
+
}
|
|
2663
|
+
]
|
|
2664
|
+
}
|
|
2665
|
+
},
|
|
2162
2666
|
{
|
|
2163
2667
|
resource: "agent.sessions.threads",
|
|
2164
2668
|
method: "list",
|
|
@@ -3046,6 +3550,27 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3046
3550
|
],
|
|
3047
3551
|
query: []
|
|
3048
3552
|
},
|
|
3553
|
+
{
|
|
3554
|
+
resource: "application.workers.versions.assets",
|
|
3555
|
+
method: "retrieveManifest",
|
|
3556
|
+
summary: "Get version asset manifest",
|
|
3557
|
+
description: "Read the retained asset paths, content hashes and byte sizes of a version for publication planning. This read creates no session or version. A version without assets returns an empty manifest; unavailable artifacts and foreign resources return 404.",
|
|
3558
|
+
http: "GET",
|
|
3559
|
+
path: "/application/v1/workers/{worker_id}/versions/{version_id}/assets/manifest",
|
|
3560
|
+
streaming: "no",
|
|
3561
|
+
pagination: false,
|
|
3562
|
+
pathParams: [
|
|
3563
|
+
{
|
|
3564
|
+
name: "worker_id",
|
|
3565
|
+
sdkName: "worker_id"
|
|
3566
|
+
},
|
|
3567
|
+
{
|
|
3568
|
+
name: "version_id",
|
|
3569
|
+
sdkName: "version_id"
|
|
3570
|
+
}
|
|
3571
|
+
],
|
|
3572
|
+
query: []
|
|
3573
|
+
},
|
|
3049
3574
|
{
|
|
3050
3575
|
resource: "automation.actions",
|
|
3051
3576
|
method: "list",
|
|
@@ -6469,7 +6994,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6469
6994
|
name: "{column}",
|
|
6470
6995
|
type: "string",
|
|
6471
6996
|
required: false,
|
|
6472
|
-
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
6997
|
+
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
6473
6998
|
},
|
|
6474
6999
|
{
|
|
6475
7000
|
name: "and",
|
|
@@ -6517,7 +7042,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6517
7042
|
name: "on_conflict",
|
|
6518
7043
|
type: "string",
|
|
6519
7044
|
required: false,
|
|
6520
|
-
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
7045
|
+
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
6521
7046
|
},
|
|
6522
7047
|
{
|
|
6523
7048
|
name: "columns",
|
|
@@ -6531,7 +7056,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6531
7056
|
resource: "database.databases.rest",
|
|
6532
7057
|
method: "retrieve",
|
|
6533
7058
|
summary: "Select rows",
|
|
6534
|
-
description: "Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property.
|
|
7059
|
+
description: "Read matching rows with filters, selected columns and ordering. Returns at most 1000 rows per request, including when limit is omitted. Content-Range reports the actual returned interval and the total when count is requested. PATCH and DELETE are not subject to this read cap. Unlike Supabase, casts, aggregates, spread and join modifiers are unsupported. Each table supports up to 1,000,000 rows. Query budget: 8,000 ms with a shared 3,000,000-row safety ceiling. Create indexes on filtered or sorted fields, or narrow the request when it exceeds its budget. Synchronous SQLite aggregates use candidate-row throughput estimates before execution; deployed Workers freeze clocks during synchronous CPU work, so the timer is not a guaranteed server-side interrupt. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Error table: QUERY_CANCELED / PostgREST 57014 is HTTP 500, retryable=false: Query timed out: index filtered or sorted fields, or narrow the range. DATABASE_INVALID_STATE is HTTP 409 for operations on a deleting database. Cleared or nonexistent databases return DATABASE_NOT_FOUND / HTTP 404. The count is an HTTP Content-Range response header, not a JSON property. Use praxis.database.count in the SDK or codemode to return { count: number | null }; a page length is not a total unless you know all matches fit in that page.",
|
|
6535
7060
|
http: "GET",
|
|
6536
7061
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6537
7062
|
streaming: "no",
|
|
@@ -6557,7 +7082,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6557
7082
|
name: "{column}",
|
|
6558
7083
|
type: "string",
|
|
6559
7084
|
required: false,
|
|
6560
|
-
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
7085
|
+
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
6561
7086
|
},
|
|
6562
7087
|
{
|
|
6563
7088
|
name: "and",
|
|
@@ -6605,7 +7130,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6605
7130
|
name: "on_conflict",
|
|
6606
7131
|
type: "string",
|
|
6607
7132
|
required: false,
|
|
6608
|
-
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
7133
|
+
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
6609
7134
|
},
|
|
6610
7135
|
{
|
|
6611
7136
|
name: "columns",
|
|
@@ -6619,7 +7144,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6619
7144
|
resource: "database.databases.rest",
|
|
6620
7145
|
method: "head",
|
|
6621
7146
|
summary: "Count rows",
|
|
6622
|
-
description: "Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is */*. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode.
|
|
7147
|
+
description: "Inspect the HTTP row count and range without retrieving row data; send Prefer: count=exact for a filtered count. Returns no body and does not fetch or serialize row data. A known count determines the interval using limit/offset or Range with a default and maximum page size of 1000. Without a count preference, or when the selected count mode cannot supply a total, Content-Range is */*. Singular Accept still validates page cardinality. Unlike Supabase, planned and estimated counts do not use PostgreSQL planner estimates. Count preferences: without filters, exact, planned and estimated all use SQLite's exact b-tree count. With filters, exact counts within budget; planned skips counting and reports an unknown total (Content-Range: 0-24/*); estimated attempts exact counting only when the preflight budget allows it, otherwise reports an unknown total. Preference-Applied echoes the requested count mode. Use praxis.database.count in the SDK or codemode to return { count: number | null } from this header without retrieving rows.",
|
|
6623
7148
|
http: "HEAD",
|
|
6624
7149
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6625
7150
|
streaming: "no",
|
|
@@ -6645,7 +7170,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6645
7170
|
name: "{column}",
|
|
6646
7171
|
type: "string",
|
|
6647
7172
|
required: false,
|
|
6648
|
-
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
7173
|
+
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
6649
7174
|
},
|
|
6650
7175
|
{
|
|
6651
7176
|
name: "and",
|
|
@@ -6693,7 +7218,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6693
7218
|
name: "on_conflict",
|
|
6694
7219
|
type: "string",
|
|
6695
7220
|
required: false,
|
|
6696
|
-
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
7221
|
+
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
6697
7222
|
},
|
|
6698
7223
|
{
|
|
6699
7224
|
name: "columns",
|
|
@@ -6733,7 +7258,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6733
7258
|
name: "{column}",
|
|
6734
7259
|
type: "string",
|
|
6735
7260
|
required: false,
|
|
6736
|
-
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
7261
|
+
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
6737
7262
|
},
|
|
6738
7263
|
{
|
|
6739
7264
|
name: "and",
|
|
@@ -6781,7 +7306,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6781
7306
|
name: "on_conflict",
|
|
6782
7307
|
type: "string",
|
|
6783
7308
|
required: false,
|
|
6784
|
-
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
7309
|
+
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
6785
7310
|
},
|
|
6786
7311
|
{
|
|
6787
7312
|
name: "columns",
|
|
@@ -6801,7 +7326,7 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6801
7326
|
summary: "Insert rows",
|
|
6802
7327
|
description: `Insert rows into an existing table after defining its fields; at most 500 rows per request. Each request is atomic: any failure rolls back the entire batch. There are no transactions across requests.
|
|
6803
7328
|
Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
6804
|
-
The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.`,
|
|
7329
|
+
The default is return=minimal: success returns HTTP 201 with an empty body. Send Prefer: return=representation to return the inserted rows. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. Unlike Supabase, upsert conflicts can target only id or one unique field, not a composite key. Each table supports up to 1,000,000 rows.`,
|
|
6805
7330
|
http: "POST",
|
|
6806
7331
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6807
7332
|
streaming: "no",
|
|
@@ -6827,7 +7352,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6827
7352
|
name: "{column}",
|
|
6828
7353
|
type: "string",
|
|
6829
7354
|
required: false,
|
|
6830
|
-
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns.
|
|
7355
|
+
description: "Horizontal filter: replace {column} with a field name or JSON path, e.g. title=eq.summary. Repeat for more columns. Supported operators: eq (equal), neq (not equal; ne is not supported), gt/gte/lt/lte (comparisons), like (case-sensitive text pattern), ilike (case-insensitive text pattern), in (membership), is (null/boolean test), cs (contains), cd (contained by), and ov (array overlap). For like/ilike, * or % matches any sequence and _ matches one character, e.g. title=ilike.*spring*; URL-encode a literal % as %25. Use days=in.(1,2,3), title=is.null, active=is.true or active=is.false; is.not_null and is.unknown are also accepted (unknown means null). Negate a condition with not., e.g. title=not.eq.draft. Multiple filters are ANDed; use or=(title.eq.a,title.eq.b), and=(days.gte.1,days.lte.3), not.or=(...) or not.and=(...), with nested and(...) and or(...) groups as needed. cs/cd accept JSON objects or arrays on JSON fields; cs also accepts a JSON scalar. For array values or multi-link fields, use cs.{a,b}, cd.{a,b} or ov.{a,b}. JSON paths use -> for JSON and ->> for text, e.g. attributes->>has_onsen=eq.true or attributes->tags=cs.[1,2]; chain -> segments and end with ->> for text. Dot paths such as attributes.has_onsen are unsupported. Full-text, regex, range operators and any/all modifiers are unsupported."
|
|
6831
7356
|
},
|
|
6832
7357
|
{
|
|
6833
7358
|
name: "and",
|
|
@@ -6875,7 +7400,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6875
7400
|
name: "on_conflict",
|
|
6876
7401
|
type: "string",
|
|
6877
7402
|
required: false,
|
|
6878
|
-
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
7403
|
+
description: "POST upsert: id or one unique field with resolution=merge-duplicates|ignore-duplicates. With resolution=merge-duplicates, a conflicting row keeps columns omitted from the request; supplied values replace the whole field value (including JSON objects), and explicit null clears a nullable field. With resolution=ignore-duplicates, a conflicting row is left unchanged. Without a conflict, both modes insert a new row using field defaults for omitted fields. In a batch, a key present in another row is filled with null when omitted in this row unless missing=default is set; that null can overwrite a value during merge. With missing=default, omitted keys stay omitted for conflict merges (existing values are preserved); new rows use defaults, or null when no default exists. Explicit null never invokes a default. POST accepts an optional client id matching [A-Za-z0-9_-]{1,64}; omitted ids are generated. PATCH cannot change id."
|
|
6879
7404
|
},
|
|
6880
7405
|
{
|
|
6881
7406
|
name: "columns",
|
|
@@ -6927,7 +7452,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6927
7452
|
resource: "database.databases.tables",
|
|
6928
7453
|
method: "create",
|
|
6929
7454
|
summary: "Create table",
|
|
6930
|
-
description:
|
|
7455
|
+
description: 'Creates a table together with its initial fields in one call and returns it (HTTP 201) with generated tbl_ and fld_ ids. name must match ^[a-z_][a-z0-9_]{0,62}$ and be unused in this database (duplicate: 409 UNIQUE_VIOLATION). fields is required and may be an empty array; fields can also be added later with databaseAddField. Limits: 50 tables per database, 64 fields per table, and 16 indexed or unique fields per table; exceeding one returns 400 LIMIT_EXCEEDED. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. Every row also has a system id column, which is not declared as a field. Insert data afterwards with databaseInsert. Unlike Supabase, define schema with this table API and the field APIs; PostgreSQL DDL and SQL migration files cannot be submitted. Each table supports up to 1,000,000 rows.',
|
|
6931
7456
|
http: "POST",
|
|
6932
7457
|
path: "/database/v1/databases/{database_id}/tables",
|
|
6933
7458
|
streaming: "no",
|
|
@@ -7048,7 +7573,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7048
7573
|
resource: "database.databases.tables.fields",
|
|
7049
7574
|
method: "create",
|
|
7050
7575
|
summary: "Add field",
|
|
7051
|
-
description:
|
|
7576
|
+
description: 'Adds one field to an existing table and returns the updated table (HTTP 201). Required inputs are name (lowercase letters, digits and underscores; id and names starting with _ are reserved) and type (string, integer, number, boolean, datetime, json or link); json needs options.schema and link needs options.linked_table_id and options.multiple. Adding a required field to a table that already has rows needs a default, otherwise the call fails with 400 VALIDATION_FAILED; a default is written into every existing row. Fields default to indexed:false. Set indexed:true explicitly for fields used in filters or ordering. Only indexed:true or unique:true consumes one of the 16 indexed-or-unique field slots; a field with both consumes one slot. Unique fields still consume a slot even with indexed:false. Existing fields are unchanged. Minimal field example: {"name":"notes","type":"string","indexed":false}. JSON and link fields cannot be indexed. Limits: 64 fields and 16 indexed or unique fields per table (400 LIMIT_EXCEEDED). Unlike Supabase, schema evolution uses field definitions rather than ALTER TABLE statements or SQL migrations.',
|
|
7052
7577
|
http: "POST",
|
|
7053
7578
|
path: "/database/v1/databases/{database_id}/tables/{table}/fields",
|
|
7054
7579
|
streaming: "no",
|
|
@@ -7218,7 +7743,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7218
7743
|
resource: "file.files",
|
|
7219
7744
|
method: "create",
|
|
7220
7745
|
summary: "Upload file",
|
|
7221
|
-
description: 'Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most
|
|
7746
|
+
description: 'Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data, assistants and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File(["Return within 23 days."], "policy.txt", { type: "text/plain" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–2592000), or praxis[expires_in_seconds] (3600–7776000), never both. Without expiry, the file persists until deleted.',
|
|
7222
7747
|
http: "POST",
|
|
7223
7748
|
path: "/file/v1/files",
|
|
7224
7749
|
streaming: "no",
|
|
@@ -7233,7 +7758,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7233
7758
|
name: "file",
|
|
7234
7759
|
type: "string",
|
|
7235
7760
|
required: true,
|
|
7236
|
-
description: "File bytes in one multipart file part, not a filename or file ID. The file must be nonempty and at most
|
|
7761
|
+
description: "File bytes in one multipart file part, not a filename or file ID. The file must be nonempty and at most 100000000 bytes; its content determines the MIME type."
|
|
7237
7762
|
},
|
|
7238
7763
|
{
|
|
7239
7764
|
name: "purpose",
|
|
@@ -7282,7 +7807,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7282
7807
|
resource: "file.files",
|
|
7283
7808
|
method: "retrieve",
|
|
7284
7809
|
summary: "Retrieve file",
|
|
7285
|
-
description: "Retrieve metadata for a live file owned by your tenant. Use its
|
|
7810
|
+
description: "Retrieve metadata for a live file owned by your tenant. Use its file- ID from upload or list. Missing, deleted, expired and other-tenant files return 404; use the content endpoint to download the bytes.",
|
|
7286
7811
|
http: "GET",
|
|
7287
7812
|
path: "/file/v1/files/{file_id}",
|
|
7288
7813
|
streaming: "no",
|
|
@@ -7299,7 +7824,7 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7299
7824
|
resource: "file.files",
|
|
7300
7825
|
method: "retrieveContent",
|
|
7301
7826
|
summary: "Retrieve file content",
|
|
7302
|
-
description: "Download the original bytes of a live file owned by your tenant. Supply its
|
|
7827
|
+
description: "Download the original bytes of a live file owned by your tenant. Supply its file- ID from upload or list. A single byte Range can return a partial response; a range outside the file returns 416. Missing, deleted, expired and other-tenant files return 404.",
|
|
7303
7828
|
http: "GET",
|
|
7304
7829
|
path: "/file/v1/files/{file_id}/content",
|
|
7305
7830
|
streaming: "no",
|
|
@@ -7312,6 +7837,152 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7312
7837
|
],
|
|
7313
7838
|
query: []
|
|
7314
7839
|
},
|
|
7840
|
+
{
|
|
7841
|
+
resource: "file.uploads",
|
|
7842
|
+
method: "create",
|
|
7843
|
+
summary: "Create an upload",
|
|
7844
|
+
description: "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data, assistants and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.",
|
|
7845
|
+
http: "POST",
|
|
7846
|
+
path: "/file/v1/uploads",
|
|
7847
|
+
streaming: "no",
|
|
7848
|
+
pagination: false,
|
|
7849
|
+
pathParams: [],
|
|
7850
|
+
query: [],
|
|
7851
|
+
body: {
|
|
7852
|
+
required: true,
|
|
7853
|
+
fields: [
|
|
7854
|
+
{
|
|
7855
|
+
name: "bytes",
|
|
7856
|
+
type: "integer",
|
|
7857
|
+
required: true,
|
|
7858
|
+
description: "Exact complete file length in bytes, from 1 through 2147483648 (2 GiB); the sum of completed parts must match."
|
|
7859
|
+
},
|
|
7860
|
+
{
|
|
7861
|
+
name: "filename",
|
|
7862
|
+
type: "string",
|
|
7863
|
+
required: true,
|
|
7864
|
+
description: "Filename for the resulting file, at most 255 UTF-8 bytes."
|
|
7865
|
+
},
|
|
7866
|
+
{
|
|
7867
|
+
name: "mime_type",
|
|
7868
|
+
type: "string",
|
|
7869
|
+
required: true,
|
|
7870
|
+
description: "Declared MIME type; validated against the assembled content."
|
|
7871
|
+
},
|
|
7872
|
+
{
|
|
7873
|
+
name: "purpose",
|
|
7874
|
+
type: "string",
|
|
7875
|
+
enum: [
|
|
7876
|
+
"user_data",
|
|
7877
|
+
"assistants",
|
|
7878
|
+
"vision"
|
|
7879
|
+
],
|
|
7880
|
+
required: true,
|
|
7881
|
+
description: "Use user_data for conversation attachments, assistants for assistant files, or vision for PNG, JPEG, GIF and WebP images."
|
|
7882
|
+
},
|
|
7883
|
+
{
|
|
7884
|
+
name: "expires_after",
|
|
7885
|
+
type: "object",
|
|
7886
|
+
required: false,
|
|
7887
|
+
description: "Optional expiry policy for the resulting file; omission retains the file until deletion."
|
|
7888
|
+
},
|
|
7889
|
+
{
|
|
7890
|
+
name: "part_size",
|
|
7891
|
+
type: "integer",
|
|
7892
|
+
required: false,
|
|
7893
|
+
description: "Optional fixed part size in bytes, 5242880–64000000. Requires part_number on every part; retries of identical bytes at the same number return the same part. Omit to use arbitrary-sized parts."
|
|
7894
|
+
}
|
|
7895
|
+
]
|
|
7896
|
+
}
|
|
7897
|
+
},
|
|
7898
|
+
{
|
|
7899
|
+
resource: "file.uploads",
|
|
7900
|
+
method: "cancel",
|
|
7901
|
+
summary: "Cancel an upload",
|
|
7902
|
+
description: "Cancel an unfinished upload using upload_id from create and release its reserved storage. Further parts and completion are rejected. Cancelling an already cancelled upload returns the same terminal result; a completed upload cannot be cancelled. Delete its resulting file instead.",
|
|
7903
|
+
http: "POST",
|
|
7904
|
+
path: "/file/v1/uploads/{upload_id}/cancel",
|
|
7905
|
+
streaming: "no",
|
|
7906
|
+
pagination: false,
|
|
7907
|
+
pathParams: [
|
|
7908
|
+
{
|
|
7909
|
+
name: "upload_id",
|
|
7910
|
+
sdkName: "upload_id"
|
|
7911
|
+
}
|
|
7912
|
+
],
|
|
7913
|
+
query: []
|
|
7914
|
+
},
|
|
7915
|
+
{
|
|
7916
|
+
resource: "file.uploads",
|
|
7917
|
+
method: "complete",
|
|
7918
|
+
summary: "Complete an upload",
|
|
7919
|
+
description: "Assemble the uploaded parts into a file. Supply upload_id from create and part_ids from addPart in file byte order; their sizes must total the declared bytes. Optional md5 verifies the assembled content. Retrying identical part_ids and normalized md5 returns the same result; different inputs return 409. Unlike OpenAI, completed can contain a file still processing (status uploaded). Poll files.retrieve using file.id until status processed (own face state active); error, expiry or 404 means processing failed and the file cannot be used.",
|
|
7920
|
+
http: "POST",
|
|
7921
|
+
path: "/file/v1/uploads/{upload_id}/complete",
|
|
7922
|
+
streaming: "no",
|
|
7923
|
+
pagination: false,
|
|
7924
|
+
pathParams: [
|
|
7925
|
+
{
|
|
7926
|
+
name: "upload_id",
|
|
7927
|
+
sdkName: "upload_id"
|
|
7928
|
+
}
|
|
7929
|
+
],
|
|
7930
|
+
query: [],
|
|
7931
|
+
body: {
|
|
7932
|
+
required: true,
|
|
7933
|
+
fields: [
|
|
7934
|
+
{
|
|
7935
|
+
name: "part_ids",
|
|
7936
|
+
type: "array",
|
|
7937
|
+
itemType: "string",
|
|
7938
|
+
required: true,
|
|
7939
|
+
description: "All part IDs in concatenation order, without duplicates. Fixed-size uploads require increasing part_number order."
|
|
7940
|
+
},
|
|
7941
|
+
{
|
|
7942
|
+
name: "md5",
|
|
7943
|
+
type: "string",
|
|
7944
|
+
required: false,
|
|
7945
|
+
description: "Optional whole-file MD5 as 32 hexadecimal characters; verified after assembly."
|
|
7946
|
+
}
|
|
7947
|
+
]
|
|
7948
|
+
}
|
|
7949
|
+
},
|
|
7950
|
+
{
|
|
7951
|
+
resource: "file.uploads.parts",
|
|
7952
|
+
method: "create",
|
|
7953
|
+
summary: "Add an upload part",
|
|
7954
|
+
description: "Send one nonempty part as the multipart data field, at most 64000000 bytes. Parts may arrive concurrently in any order. Use upload_id from create. For a fixed-size upload, supply part_number starting at 1 and exactly part_size bytes except for the final remainder; retry the same number with identical bytes to recover its part ID. Without part_size, each request creates a new part and part_number is ignored. Save the returned part IDs for complete.",
|
|
7955
|
+
http: "POST",
|
|
7956
|
+
path: "/file/v1/uploads/{upload_id}/parts",
|
|
7957
|
+
streaming: "no",
|
|
7958
|
+
pagination: false,
|
|
7959
|
+
multipart: true,
|
|
7960
|
+
pathParams: [
|
|
7961
|
+
{
|
|
7962
|
+
name: "upload_id",
|
|
7963
|
+
sdkName: "upload_id"
|
|
7964
|
+
}
|
|
7965
|
+
],
|
|
7966
|
+
query: [
|
|
7967
|
+
{
|
|
7968
|
+
name: "part_number",
|
|
7969
|
+
type: "integer",
|
|
7970
|
+
required: false,
|
|
7971
|
+
description: "Required when create set part_size; 1 through ceil(bytes / part_size). Ignored for general uploads."
|
|
7972
|
+
}
|
|
7973
|
+
],
|
|
7974
|
+
body: {
|
|
7975
|
+
required: true,
|
|
7976
|
+
fields: [
|
|
7977
|
+
{
|
|
7978
|
+
name: "data",
|
|
7979
|
+
type: "string",
|
|
7980
|
+
required: true,
|
|
7981
|
+
description: "Raw bytes of this part, nonempty and at most 64000000 bytes."
|
|
7982
|
+
}
|
|
7983
|
+
]
|
|
7984
|
+
}
|
|
7985
|
+
},
|
|
7315
7986
|
{
|
|
7316
7987
|
resource: "knowledge.vectorStores",
|
|
7317
7988
|
method: "list",
|
|
@@ -11599,6 +12270,43 @@ for more details.`
|
|
|
11599
12270
|
],
|
|
11600
12271
|
query: []
|
|
11601
12272
|
},
|
|
12273
|
+
{
|
|
12274
|
+
resource: "organization.feedback",
|
|
12275
|
+
method: "list",
|
|
12276
|
+
summary: "List your organization's feedback",
|
|
12277
|
+
description: "Feedback submitted by your organization, newest first, with phase and unread state. Filter by phase and search titles and message text (case-insensitive). Page with next_page. Requires a valid API key, Console session, or machine token of the organization.",
|
|
12278
|
+
http: "GET",
|
|
12279
|
+
path: "/organization/v1/feedback",
|
|
12280
|
+
streaming: "no",
|
|
12281
|
+
pagination: false,
|
|
12282
|
+
pathParams: [],
|
|
12283
|
+
query: [
|
|
12284
|
+
{
|
|
12285
|
+
name: "phase",
|
|
12286
|
+
type: "string",
|
|
12287
|
+
required: false,
|
|
12288
|
+
description: "Only feedback in these phases: a comma-separated list of open, awaiting_customer, in_progress, resolved or closed, for example open,in_progress; see the phase field of a feedback for what each means."
|
|
12289
|
+
},
|
|
12290
|
+
{
|
|
12291
|
+
name: "query",
|
|
12292
|
+
type: "string",
|
|
12293
|
+
required: false,
|
|
12294
|
+
description: "Case-insensitive text matched against titles and message bodies."
|
|
12295
|
+
},
|
|
12296
|
+
{
|
|
12297
|
+
name: "limit",
|
|
12298
|
+
type: "integer",
|
|
12299
|
+
required: false,
|
|
12300
|
+
description: "Items per page, 1 to 100."
|
|
12301
|
+
},
|
|
12302
|
+
{
|
|
12303
|
+
name: "page",
|
|
12304
|
+
type: "string",
|
|
12305
|
+
required: false,
|
|
12306
|
+
description: "Opaque cursor from next_page of the previous response."
|
|
12307
|
+
}
|
|
12308
|
+
]
|
|
12309
|
+
},
|
|
11602
12310
|
{
|
|
11603
12311
|
resource: "organization.feedback",
|
|
11604
12312
|
method: "create",
|
|
@@ -11617,7 +12325,7 @@ for more details.`
|
|
|
11617
12325
|
name: "message",
|
|
11618
12326
|
type: "string",
|
|
11619
12327
|
required: true,
|
|
11620
|
-
description: "Problem description
|
|
12328
|
+
description: "Problem description, at most 4096 Unicode code points; may be empty only when contexts.praxis.error.message is a non-empty string."
|
|
11621
12329
|
},
|
|
11622
12330
|
{
|
|
11623
12331
|
name: "contact_email",
|
|
@@ -11643,6 +12351,18 @@ for more details.`
|
|
|
11643
12351
|
required: false,
|
|
11644
12352
|
description: "X-Request-Id from the failed response or the related error event ID."
|
|
11645
12353
|
},
|
|
12354
|
+
{
|
|
12355
|
+
name: "title",
|
|
12356
|
+
type: "string",
|
|
12357
|
+
required: false,
|
|
12358
|
+
description: "Short summary shown in the feedback list; at most 200 Unicode code points."
|
|
12359
|
+
},
|
|
12360
|
+
{
|
|
12361
|
+
name: "type",
|
|
12362
|
+
type: "string",
|
|
12363
|
+
required: false,
|
|
12364
|
+
description: "Feedback type key enabled in the help settings, such as issue, suggestion, billing or other. Unknown or disabled keys are rejected with INVALID_PARAMS."
|
|
12365
|
+
},
|
|
11646
12366
|
{
|
|
11647
12367
|
name: "tags",
|
|
11648
12368
|
type: "object",
|
|
@@ -11675,6 +12395,100 @@ for more details.`
|
|
|
11675
12395
|
]
|
|
11676
12396
|
}
|
|
11677
12397
|
},
|
|
12398
|
+
{
|
|
12399
|
+
resource: "organization.feedback.counts",
|
|
12400
|
+
method: "list",
|
|
12401
|
+
summary: "Count your organization's feedback by phase",
|
|
12402
|
+
description: "How many of your organization's feedback are in each phase, for status tabs. Counts never include another organization's feedback.",
|
|
12403
|
+
http: "GET",
|
|
12404
|
+
path: "/organization/v1/feedback/counts",
|
|
12405
|
+
streaming: "no",
|
|
12406
|
+
pagination: false,
|
|
12407
|
+
pathParams: [],
|
|
12408
|
+
query: []
|
|
12409
|
+
},
|
|
12410
|
+
{
|
|
12411
|
+
resource: "organization.feedback",
|
|
12412
|
+
method: "retrieve",
|
|
12413
|
+
summary: "Get one of your organization's feedback",
|
|
12414
|
+
description: "Read one feedback submitted by your organization with its current phase and first-response timing. Another organization's feedback answers 404 FEEDBACK_NOT_FOUND exactly like a missing one.",
|
|
12415
|
+
http: "GET",
|
|
12416
|
+
path: "/organization/v1/feedback/{id}",
|
|
12417
|
+
streaming: "no",
|
|
12418
|
+
pagination: false,
|
|
12419
|
+
pathParams: [
|
|
12420
|
+
{
|
|
12421
|
+
name: "id",
|
|
12422
|
+
sdkName: "id"
|
|
12423
|
+
}
|
|
12424
|
+
],
|
|
12425
|
+
query: []
|
|
12426
|
+
},
|
|
12427
|
+
{
|
|
12428
|
+
resource: "organization.feedback.messages",
|
|
12429
|
+
method: "list",
|
|
12430
|
+
summary: "List the messages of a feedback",
|
|
12431
|
+
description: "The conversation of one feedback in time order: your messages, support replies and system events. Internal support notes are never returned. Page with next_page.",
|
|
12432
|
+
http: "GET",
|
|
12433
|
+
path: "/organization/v1/feedback/{id}/messages",
|
|
12434
|
+
streaming: "no",
|
|
12435
|
+
pagination: false,
|
|
12436
|
+
pathParams: [
|
|
12437
|
+
{
|
|
12438
|
+
name: "id",
|
|
12439
|
+
sdkName: "id"
|
|
12440
|
+
}
|
|
12441
|
+
],
|
|
12442
|
+
query: [
|
|
12443
|
+
{
|
|
12444
|
+
name: "limit",
|
|
12445
|
+
type: "integer",
|
|
12446
|
+
required: false,
|
|
12447
|
+
description: "Items per page, 1 to 100."
|
|
12448
|
+
},
|
|
12449
|
+
{
|
|
12450
|
+
name: "page",
|
|
12451
|
+
type: "string",
|
|
12452
|
+
required: false,
|
|
12453
|
+
description: "Opaque cursor from next_page of the previous response."
|
|
12454
|
+
}
|
|
12455
|
+
]
|
|
12456
|
+
},
|
|
12457
|
+
{
|
|
12458
|
+
resource: "organization.feedback.messages",
|
|
12459
|
+
method: "create",
|
|
12460
|
+
summary: "Reply on a feedback",
|
|
12461
|
+
description: "Add your message to a feedback conversation, for example to answer a question from support. A reply while the phase is awaiting_customer moves it to in_progress and notifies support.",
|
|
12462
|
+
http: "POST",
|
|
12463
|
+
path: "/organization/v1/feedback/{id}/messages",
|
|
12464
|
+
streaming: "no",
|
|
12465
|
+
pagination: false,
|
|
12466
|
+
pathParams: [
|
|
12467
|
+
{
|
|
12468
|
+
name: "id",
|
|
12469
|
+
sdkName: "id"
|
|
12470
|
+
}
|
|
12471
|
+
],
|
|
12472
|
+
query: [],
|
|
12473
|
+
body: {
|
|
12474
|
+
required: true,
|
|
12475
|
+
fields: [
|
|
12476
|
+
{
|
|
12477
|
+
name: "body",
|
|
12478
|
+
type: "string",
|
|
12479
|
+
required: true,
|
|
12480
|
+
description: "Markdown text; at most 4096 Unicode code points."
|
|
12481
|
+
},
|
|
12482
|
+
{
|
|
12483
|
+
name: "attachments",
|
|
12484
|
+
type: "array",
|
|
12485
|
+
itemType: "object",
|
|
12486
|
+
required: false,
|
|
12487
|
+
description: "Up to five attachments; decoded bytes must not exceed 10 MiB each or 20 MiB in total."
|
|
12488
|
+
}
|
|
12489
|
+
]
|
|
12490
|
+
}
|
|
12491
|
+
},
|
|
11678
12492
|
{
|
|
11679
12493
|
resource: "organization.usage",
|
|
11680
12494
|
method: "list",
|
|
@@ -14075,6 +14889,232 @@ for more details.`
|
|
|
14075
14889
|
}
|
|
14076
14890
|
];
|
|
14077
14891
|
|
|
14892
|
+
// ../../packages/sdk/typescript/src/core/errors.ts
|
|
14893
|
+
function problemFrom(status, headers, body, statusText) {
|
|
14894
|
+
const value = body && typeof body === "object" ? body : {};
|
|
14895
|
+
const nested = value.error && typeof value.error === "object" ? value.error : {};
|
|
14896
|
+
const string = (v) => typeof v === "string" && v.trim() ? v : undefined;
|
|
14897
|
+
const fallback = statusText || { 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", 405: "Method Not Allowed", 408: "Request Timeout", 409: "Conflict", 413: "Payload Too Large", 415: "Unsupported Media Type", 422: "Unprocessable Entity", 429: "Too Many Requests", 500: "Internal Server Error", 502: "Bad Gateway", 503: "Service Unavailable", 504: "Gateway Timeout" }[status] || `HTTP ${status}`;
|
|
14898
|
+
const detail = string(value.detail) ?? string(nested.message) ?? string(value.message) ?? string(body);
|
|
14899
|
+
const title = string(value.title) ?? fallback;
|
|
14900
|
+
const param = nested.param ?? value.param;
|
|
14901
|
+
return {
|
|
14902
|
+
status,
|
|
14903
|
+
message: detail ?? title,
|
|
14904
|
+
title,
|
|
14905
|
+
detail,
|
|
14906
|
+
code: string(value.code) ?? string(nested.code) ?? string(nested.type) ?? string(value.error_code),
|
|
14907
|
+
type: string(nested.type) ?? string(value.type),
|
|
14908
|
+
param: typeof param === "string" ? param : param === null || nested.param === null ? null : undefined,
|
|
14909
|
+
errors: Array.isArray(value.errors) ? value.errors : [],
|
|
14910
|
+
requestId: headers.get("x-request-id") ?? string(value.requestId) ?? string(value.request_id),
|
|
14911
|
+
raw: body
|
|
14912
|
+
};
|
|
14913
|
+
}
|
|
14914
|
+
|
|
14915
|
+
class PraxisError extends Error {
|
|
14916
|
+
status;
|
|
14917
|
+
code;
|
|
14918
|
+
type;
|
|
14919
|
+
title;
|
|
14920
|
+
detail;
|
|
14921
|
+
errors;
|
|
14922
|
+
requestId;
|
|
14923
|
+
param;
|
|
14924
|
+
raw;
|
|
14925
|
+
constructor(problem = {}, options) {
|
|
14926
|
+
super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ""}`, options);
|
|
14927
|
+
this.name = "PraxisError";
|
|
14928
|
+
this.status = problem.status;
|
|
14929
|
+
this.code = problem.code;
|
|
14930
|
+
this.type = problem.type;
|
|
14931
|
+
this.title = problem.title;
|
|
14932
|
+
this.detail = problem.detail;
|
|
14933
|
+
this.errors = problem.errors ?? [];
|
|
14934
|
+
this.requestId = problem.requestId;
|
|
14935
|
+
this.param = problem.param;
|
|
14936
|
+
this.raw = problem.raw;
|
|
14937
|
+
}
|
|
14938
|
+
static fromResponse(response, body) {
|
|
14939
|
+
return new PraxisError(problemFrom(response.status, response.headers, body, response.statusText));
|
|
14940
|
+
}
|
|
14941
|
+
}
|
|
14942
|
+
|
|
14943
|
+
class PraxisConnectionError extends PraxisError {
|
|
14944
|
+
constructor(cause) {
|
|
14945
|
+
super({ code: "CONNECTION_ERROR", title: "Unable to connect to Praxis" }, { cause });
|
|
14946
|
+
this.name = "PraxisConnectionError";
|
|
14947
|
+
}
|
|
14948
|
+
}
|
|
14949
|
+
|
|
14950
|
+
class PraxisTimeoutError extends PraxisError {
|
|
14951
|
+
constructor(timeoutMs) {
|
|
14952
|
+
super({ code: "TIMEOUT", title: `Praxis request exceeded ${timeoutMs} ms` });
|
|
14953
|
+
this.name = "PraxisTimeoutError";
|
|
14954
|
+
}
|
|
14955
|
+
}
|
|
14956
|
+
|
|
14957
|
+
// ../../packages/sdk/typescript/src/core/retry.ts
|
|
14958
|
+
function canRetry(request) {
|
|
14959
|
+
return request.method !== "POST" || Boolean(request.headers.get("Idempotency-Key")?.trim());
|
|
14960
|
+
}
|
|
14961
|
+
function retryAfterMs(value, now = Date.now()) {
|
|
14962
|
+
if (!value)
|
|
14963
|
+
return;
|
|
14964
|
+
if (/^\d+(?:\.\d+)?$/.test(value.trim()))
|
|
14965
|
+
return Number(value) * 1000;
|
|
14966
|
+
const date = Date.parse(value);
|
|
14967
|
+
return Number.isFinite(date) ? Math.max(0, date - now) : undefined;
|
|
14968
|
+
}
|
|
14969
|
+
function retryDelay(attempt, retryAfter, random = Math.random) {
|
|
14970
|
+
return retryAfterMs(retryAfter) ?? Math.min(30000, 500 * 2 ** attempt) * (0.5 + random() * 0.5);
|
|
14971
|
+
}
|
|
14972
|
+
function abortable(promise, signal) {
|
|
14973
|
+
signal.throwIfAborted();
|
|
14974
|
+
return new Promise((resolve, reject) => {
|
|
14975
|
+
const abort = () => reject(signal.reason);
|
|
14976
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
14977
|
+
promise.then(resolve, reject).finally(() => signal.removeEventListener("abort", abort));
|
|
14978
|
+
});
|
|
14979
|
+
}
|
|
14980
|
+
function sleep(ms, signal) {
|
|
14981
|
+
signal.throwIfAborted();
|
|
14982
|
+
return new Promise((resolve, reject) => {
|
|
14983
|
+
const abort = () => {
|
|
14984
|
+
clearTimeout(timer);
|
|
14985
|
+
reject(signal.reason);
|
|
14986
|
+
};
|
|
14987
|
+
const timer = setTimeout(() => {
|
|
14988
|
+
signal.removeEventListener("abort", abort);
|
|
14989
|
+
resolve();
|
|
14990
|
+
}, ms);
|
|
14991
|
+
signal.addEventListener("abort", abort, { once: true });
|
|
14992
|
+
});
|
|
14993
|
+
}
|
|
14994
|
+
async function fetchWithRetry(request, fetcher, options) {
|
|
14995
|
+
const eligible = canRetry(request);
|
|
14996
|
+
const wait = options.wait ?? sleep;
|
|
14997
|
+
for (let attempt = 0;; attempt++) {
|
|
14998
|
+
options.signal.throwIfAborted();
|
|
14999
|
+
let response;
|
|
15000
|
+
try {
|
|
15001
|
+
response = await abortable(fetcher(request.clone()), options.signal);
|
|
15002
|
+
} catch (cause) {
|
|
15003
|
+
options.signal.throwIfAborted();
|
|
15004
|
+
if (!eligible || attempt >= options.maxRetries)
|
|
15005
|
+
throw new PraxisConnectionError(cause);
|
|
15006
|
+
await wait(retryDelay(attempt, null, options.random), options.signal);
|
|
15007
|
+
continue;
|
|
15008
|
+
}
|
|
15009
|
+
const retriable = response.status === 408 || response.status === 429 || response.status >= 500 && response.status <= 599;
|
|
15010
|
+
if (!eligible || !retriable || attempt >= options.maxRetries)
|
|
15011
|
+
return response;
|
|
15012
|
+
const delay = retryDelay(attempt, response.headers.get("Retry-After"), options.random);
|
|
15013
|
+
await response.body?.cancel();
|
|
15014
|
+
await wait(delay, options.signal);
|
|
15015
|
+
}
|
|
15016
|
+
}
|
|
15017
|
+
|
|
15018
|
+
// ../../packages/sdk/typescript/src/helpers/file-upload.ts
|
|
15019
|
+
var MAX_RETRIES = 5;
|
|
15020
|
+
function retryable(error) {
|
|
15021
|
+
return error instanceof PraxisConnectionError || error instanceof PraxisTimeoutError || error instanceof SyntaxError || error instanceof PraxisError && (error.status === 408 || error.status === 429 || error.status !== undefined && error.status >= 500 && error.status <= 599);
|
|
15022
|
+
}
|
|
15023
|
+
async function retry(signal, operation) {
|
|
15024
|
+
for (let used = 0;; used++) {
|
|
15025
|
+
signal.throwIfAborted();
|
|
15026
|
+
try {
|
|
15027
|
+
return await operation();
|
|
15028
|
+
} catch (error) {
|
|
15029
|
+
signal.throwIfAborted();
|
|
15030
|
+
if (used >= MAX_RETRIES || !retryable(error))
|
|
15031
|
+
throw error;
|
|
15032
|
+
await sleep(500 * 2 ** used, signal);
|
|
15033
|
+
}
|
|
15034
|
+
}
|
|
15035
|
+
}
|
|
15036
|
+
async function uploadFile(client, file, options) {
|
|
15037
|
+
options.signal?.throwIfAborted();
|
|
15038
|
+
if (file.size < 1 || file.size > 2 * 1024 ** 3)
|
|
15039
|
+
throw new RangeError("File size must be 1 byte through 2 GiB");
|
|
15040
|
+
const partSize = options.partSize ?? 50 * 1024 ** 2;
|
|
15041
|
+
const concurrency = options.concurrency ?? 3;
|
|
15042
|
+
if (!Number.isSafeInteger(partSize) || partSize < 5 * 1024 ** 2 || partSize > 64000000)
|
|
15043
|
+
throw new RangeError("partSize must be an integer from 5242880 through 64000000");
|
|
15044
|
+
if (!Number.isSafeInteger(concurrency) || concurrency < 1)
|
|
15045
|
+
throw new RangeError("concurrency must be a positive integer");
|
|
15046
|
+
const filename = options.filename ?? (typeof File !== "undefined" && file instanceof File ? file.name : "upload");
|
|
15047
|
+
const work = new AbortController;
|
|
15048
|
+
const abort = () => work.abort(options.signal?.reason);
|
|
15049
|
+
options.signal?.addEventListener("abort", abort, { once: true });
|
|
15050
|
+
const signal = work.signal;
|
|
15051
|
+
const request = { signal, maxRetries: 0, timeoutMs: 120000 };
|
|
15052
|
+
let uploadId;
|
|
15053
|
+
const active = async (initial) => {
|
|
15054
|
+
let result = initial;
|
|
15055
|
+
for (let polls = 0;; polls++) {
|
|
15056
|
+
signal.throwIfAborted();
|
|
15057
|
+
if (result.state === "active")
|
|
15058
|
+
return result;
|
|
15059
|
+
if (result.state !== "processing")
|
|
15060
|
+
throw new PraxisError({ code: "FILE_PROCESSING_FAILED", message: `File ${result.id} is not active (${result.state})` });
|
|
15061
|
+
await sleep(Math.min(5000, 1000 * 2 ** polls), signal);
|
|
15062
|
+
result = await retry(signal, () => client.file.files.retrieve({ path: { file_id: result.id }, ...request }));
|
|
15063
|
+
}
|
|
15064
|
+
};
|
|
15065
|
+
try {
|
|
15066
|
+
signal.throwIfAborted();
|
|
15067
|
+
options.onProgress?.(0);
|
|
15068
|
+
if (file.size <= 32 * 1024 ** 2) {
|
|
15069
|
+
const result2 = await client.file.files.create({ body: { file: new File([file], filename, { type: file.type }), purpose: options.purpose }, ...request });
|
|
15070
|
+
options.onProgress?.(1);
|
|
15071
|
+
return await active(result2);
|
|
15072
|
+
}
|
|
15073
|
+
const upload = await client.file.uploads.create({ body: { bytes: file.size, filename, mime_type: file.type || "application/octet-stream", purpose: options.purpose, part_size: partSize }, ...request });
|
|
15074
|
+
uploadId = upload.id;
|
|
15075
|
+
signal.throwIfAborted();
|
|
15076
|
+
const path = { upload_id: uploadId };
|
|
15077
|
+
const count = Math.ceil(file.size / partSize);
|
|
15078
|
+
const ids = new Array(count);
|
|
15079
|
+
let cursor = 0, confirmed = 0;
|
|
15080
|
+
const worker = async () => {
|
|
15081
|
+
while (cursor < count) {
|
|
15082
|
+
signal.throwIfAborted();
|
|
15083
|
+
const index = cursor++;
|
|
15084
|
+
const chunk = file.slice(index * partSize, Math.min(file.size, (index + 1) * partSize));
|
|
15085
|
+
const part = await retry(signal, () => client.file.uploads.parts.create({ path, query: { part_number: index + 1 }, body: { data: new File([chunk], filename) }, ...request }));
|
|
15086
|
+
ids[index] = part.id;
|
|
15087
|
+
confirmed += chunk.size;
|
|
15088
|
+
options.onProgress?.(confirmed / file.size);
|
|
15089
|
+
}
|
|
15090
|
+
};
|
|
15091
|
+
const workers = Array.from({ length: Math.min(concurrency, count) }, worker);
|
|
15092
|
+
try {
|
|
15093
|
+
await Promise.all(workers);
|
|
15094
|
+
} catch (error) {
|
|
15095
|
+
work.abort();
|
|
15096
|
+
await Promise.allSettled(workers);
|
|
15097
|
+
throw error;
|
|
15098
|
+
}
|
|
15099
|
+
const result = await retry(signal, () => client.file.uploads.complete({ path, body: { part_ids: ids }, ...request }));
|
|
15100
|
+
if (result.error)
|
|
15101
|
+
throw new PraxisError({ code: result.error.code, message: result.error.message });
|
|
15102
|
+
if (result.status !== "completed" || !result.file)
|
|
15103
|
+
throw new PraxisError({ code: "INVALID_RESPONSE", message: "Complete did not return a completed Upload with a file" });
|
|
15104
|
+
return await active(result.file);
|
|
15105
|
+
} catch (error) {
|
|
15106
|
+
work.abort();
|
|
15107
|
+
if (uploadId) {
|
|
15108
|
+
await client.file.uploads.cancel({ path: { upload_id: uploadId }, maxRetries: 0, timeoutMs: 1e4 }).catch(() => {});
|
|
15109
|
+
}
|
|
15110
|
+
if (options.signal?.aborted)
|
|
15111
|
+
throw options.signal.reason;
|
|
15112
|
+
throw error;
|
|
15113
|
+
} finally {
|
|
15114
|
+
options.signal?.removeEventListener("abort", abort);
|
|
15115
|
+
}
|
|
15116
|
+
}
|
|
15117
|
+
|
|
14078
15118
|
// ../../packages/sdk/typescript/src/core/multipart.ts
|
|
14079
15119
|
function multipartBodySerializer(body) {
|
|
14080
15120
|
const data = new FormData;
|
|
@@ -14142,9 +15182,9 @@ function createSseClient({
|
|
|
14142
15182
|
...options
|
|
14143
15183
|
}) {
|
|
14144
15184
|
let lastEventId;
|
|
14145
|
-
const
|
|
15185
|
+
const sleep2 = sseSleepFn ?? ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
|
|
14146
15186
|
const createStream = async function* () {
|
|
14147
|
-
let
|
|
15187
|
+
let retryDelay2 = sseDefaultRetryDelay ?? 3000;
|
|
14148
15188
|
let attempt = 0;
|
|
14149
15189
|
const signal = options.signal ?? new AbortController().signal;
|
|
14150
15190
|
while (true) {
|
|
@@ -14208,7 +15248,7 @@ function createSseClient({
|
|
|
14208
15248
|
} else if (line.startsWith("retry:")) {
|
|
14209
15249
|
const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
|
|
14210
15250
|
if (!Number.isNaN(parsed)) {
|
|
14211
|
-
|
|
15251
|
+
retryDelay2 = parsed;
|
|
14212
15252
|
}
|
|
14213
15253
|
}
|
|
14214
15254
|
}
|
|
@@ -14236,7 +15276,7 @@ function createSseClient({
|
|
|
14236
15276
|
data,
|
|
14237
15277
|
event: eventName,
|
|
14238
15278
|
id: lastEventId,
|
|
14239
|
-
retry:
|
|
15279
|
+
retry: retryDelay2
|
|
14240
15280
|
});
|
|
14241
15281
|
if (dataLines.length) {
|
|
14242
15282
|
yield data;
|
|
@@ -14253,8 +15293,8 @@ function createSseClient({
|
|
|
14253
15293
|
if (sseMaxRetryAttempts !== undefined && attempt >= sseMaxRetryAttempts) {
|
|
14254
15294
|
break;
|
|
14255
15295
|
}
|
|
14256
|
-
const backoff = Math.min(
|
|
14257
|
-
await
|
|
15296
|
+
const backoff = Math.min(retryDelay2 * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
|
|
15297
|
+
await sleep2(backoff);
|
|
14258
15298
|
}
|
|
14259
15299
|
}
|
|
14260
15300
|
};
|
|
@@ -14897,6 +15937,156 @@ var createClient = (config = {}) => {
|
|
|
14897
15937
|
var client = createClient(createConfig({ baseUrl: "https://api.deepraxis.com" }));
|
|
14898
15938
|
|
|
14899
15939
|
// ../../packages/sdk/typescript/src/generated/sdk.gen.ts
|
|
15940
|
+
var unarchiveAgent = (options) => (options.client ?? client).post({
|
|
15941
|
+
security: [{
|
|
15942
|
+
key: "BearerAuth",
|
|
15943
|
+
scheme: "bearer",
|
|
15944
|
+
type: "http"
|
|
15945
|
+
}, {
|
|
15946
|
+
key: "ApiKeyAuth",
|
|
15947
|
+
name: "X-API-Key",
|
|
15948
|
+
type: "apiKey"
|
|
15949
|
+
}],
|
|
15950
|
+
url: "/agent/v1/agents/{agent_id}/unarchive",
|
|
15951
|
+
...options
|
|
15952
|
+
});
|
|
15953
|
+
var deleteRunFeedback = (options) => (options.client ?? client).delete({
|
|
15954
|
+
security: [{
|
|
15955
|
+
key: "BearerAuth",
|
|
15956
|
+
scheme: "bearer",
|
|
15957
|
+
type: "http"
|
|
15958
|
+
}, {
|
|
15959
|
+
key: "ApiKeyAuth",
|
|
15960
|
+
name: "X-API-Key",
|
|
15961
|
+
type: "apiKey"
|
|
15962
|
+
}],
|
|
15963
|
+
url: "/agent/v1/sessions/{session_id}/runs/{run_id}/feedback",
|
|
15964
|
+
...options
|
|
15965
|
+
});
|
|
15966
|
+
var setRunFeedback = (options) => (options.client ?? client).post({
|
|
15967
|
+
security: [{
|
|
15968
|
+
key: "BearerAuth",
|
|
15969
|
+
scheme: "bearer",
|
|
15970
|
+
type: "http"
|
|
15971
|
+
}, {
|
|
15972
|
+
key: "ApiKeyAuth",
|
|
15973
|
+
name: "X-API-Key",
|
|
15974
|
+
type: "apiKey"
|
|
15975
|
+
}],
|
|
15976
|
+
url: "/agent/v1/sessions/{session_id}/runs/{run_id}/feedback",
|
|
15977
|
+
...options,
|
|
15978
|
+
headers: {
|
|
15979
|
+
"Content-Type": "application/json",
|
|
15980
|
+
...options.headers
|
|
15981
|
+
}
|
|
15982
|
+
});
|
|
15983
|
+
var listEndUsers = (options) => (options.client ?? client).get({
|
|
15984
|
+
security: [{
|
|
15985
|
+
key: "BearerAuth",
|
|
15986
|
+
scheme: "bearer",
|
|
15987
|
+
type: "http"
|
|
15988
|
+
}, {
|
|
15989
|
+
key: "ApiKeyAuth",
|
|
15990
|
+
name: "X-API-Key",
|
|
15991
|
+
type: "apiKey"
|
|
15992
|
+
}],
|
|
15993
|
+
url: "/agent/v1/agents/{agent_id}/end_users",
|
|
15994
|
+
...options
|
|
15995
|
+
});
|
|
15996
|
+
var deleteEndUser = (options) => (options.client ?? client).delete({
|
|
15997
|
+
security: [{
|
|
15998
|
+
key: "BearerAuth",
|
|
15999
|
+
scheme: "bearer",
|
|
16000
|
+
type: "http"
|
|
16001
|
+
}, {
|
|
16002
|
+
key: "ApiKeyAuth",
|
|
16003
|
+
name: "X-API-Key",
|
|
16004
|
+
type: "apiKey"
|
|
16005
|
+
}],
|
|
16006
|
+
url: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}",
|
|
16007
|
+
...options
|
|
16008
|
+
});
|
|
16009
|
+
var getEndUser = (options) => (options.client ?? client).get({
|
|
16010
|
+
security: [{
|
|
16011
|
+
key: "BearerAuth",
|
|
16012
|
+
scheme: "bearer",
|
|
16013
|
+
type: "http"
|
|
16014
|
+
}, {
|
|
16015
|
+
key: "ApiKeyAuth",
|
|
16016
|
+
name: "X-API-Key",
|
|
16017
|
+
type: "apiKey"
|
|
16018
|
+
}],
|
|
16019
|
+
url: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}",
|
|
16020
|
+
...options
|
|
16021
|
+
});
|
|
16022
|
+
var getEndUserDeletion = (options) => (options.client ?? client).get({
|
|
16023
|
+
security: [{
|
|
16024
|
+
key: "BearerAuth",
|
|
16025
|
+
scheme: "bearer",
|
|
16026
|
+
type: "http"
|
|
16027
|
+
}, {
|
|
16028
|
+
key: "ApiKeyAuth",
|
|
16029
|
+
name: "X-API-Key",
|
|
16030
|
+
type: "apiKey"
|
|
16031
|
+
}],
|
|
16032
|
+
url: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/deletion",
|
|
16033
|
+
...options
|
|
16034
|
+
});
|
|
16035
|
+
var revokeEndUserTokens = (options) => (options.client ?? client).post({
|
|
16036
|
+
security: [{
|
|
16037
|
+
key: "BearerAuth",
|
|
16038
|
+
scheme: "bearer",
|
|
16039
|
+
type: "http"
|
|
16040
|
+
}, {
|
|
16041
|
+
key: "ApiKeyAuth",
|
|
16042
|
+
name: "X-API-Key",
|
|
16043
|
+
type: "apiKey"
|
|
16044
|
+
}],
|
|
16045
|
+
url: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/revoke_tokens",
|
|
16046
|
+
...options
|
|
16047
|
+
});
|
|
16048
|
+
var blockEndUser = (options) => (options.client ?? client).post({
|
|
16049
|
+
security: [{
|
|
16050
|
+
key: "BearerAuth",
|
|
16051
|
+
scheme: "bearer",
|
|
16052
|
+
type: "http"
|
|
16053
|
+
}, {
|
|
16054
|
+
key: "ApiKeyAuth",
|
|
16055
|
+
name: "X-API-Key",
|
|
16056
|
+
type: "apiKey"
|
|
16057
|
+
}],
|
|
16058
|
+
url: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/block",
|
|
16059
|
+
...options
|
|
16060
|
+
});
|
|
16061
|
+
var unblockEndUser = (options) => (options.client ?? client).post({
|
|
16062
|
+
security: [{
|
|
16063
|
+
key: "BearerAuth",
|
|
16064
|
+
scheme: "bearer",
|
|
16065
|
+
type: "http"
|
|
16066
|
+
}, {
|
|
16067
|
+
key: "ApiKeyAuth",
|
|
16068
|
+
name: "X-API-Key",
|
|
16069
|
+
type: "apiKey"
|
|
16070
|
+
}],
|
|
16071
|
+
url: "/agent/v1/agents/{agent_id}/end_users/{external_user_id}/unblock",
|
|
16072
|
+
...options
|
|
16073
|
+
});
|
|
16074
|
+
var exchangeEmbedCode = (options) => (options.client ?? client).post({
|
|
16075
|
+
url: "/agent/v1/embed/exchange",
|
|
16076
|
+
...options,
|
|
16077
|
+
headers: {
|
|
16078
|
+
"Content-Type": "application/json",
|
|
16079
|
+
...options.headers
|
|
16080
|
+
}
|
|
16081
|
+
});
|
|
16082
|
+
var createAnonymousEmbedToken = (options) => (options.client ?? client).post({
|
|
16083
|
+
url: "/agent/v1/embed_tokens/anonymous",
|
|
16084
|
+
...options,
|
|
16085
|
+
headers: {
|
|
16086
|
+
"Content-Type": "application/json",
|
|
16087
|
+
...options.headers
|
|
16088
|
+
}
|
|
16089
|
+
});
|
|
14900
16090
|
var listEmbedTokens = (options) => (options?.client ?? client).get({
|
|
14901
16091
|
security: [{
|
|
14902
16092
|
key: "BearerAuth",
|
|
@@ -15081,6 +16271,36 @@ var connectComputer = (options) => (options.client ?? client).post({
|
|
|
15081
16271
|
type: "apiKey"
|
|
15082
16272
|
}],
|
|
15083
16273
|
url: "/agent/v1/computers/{computer_id}/connect",
|
|
16274
|
+
...options,
|
|
16275
|
+
headers: {
|
|
16276
|
+
"Content-Type": "application/json",
|
|
16277
|
+
...options.headers
|
|
16278
|
+
}
|
|
16279
|
+
});
|
|
16280
|
+
var renewComputerLease = (options) => (options.client ?? client).post({
|
|
16281
|
+
security: [{
|
|
16282
|
+
key: "BearerAuth",
|
|
16283
|
+
scheme: "bearer",
|
|
16284
|
+
type: "http"
|
|
16285
|
+
}, {
|
|
16286
|
+
key: "ApiKeyAuth",
|
|
16287
|
+
name: "X-API-Key",
|
|
16288
|
+
type: "apiKey"
|
|
16289
|
+
}],
|
|
16290
|
+
url: "/agent/v1/computers/{computer_id}/leases/{lease_id}/renew",
|
|
16291
|
+
...options
|
|
16292
|
+
});
|
|
16293
|
+
var releaseComputerLease = (options) => (options.client ?? client).delete({
|
|
16294
|
+
security: [{
|
|
16295
|
+
key: "BearerAuth",
|
|
16296
|
+
scheme: "bearer",
|
|
16297
|
+
type: "http"
|
|
16298
|
+
}, {
|
|
16299
|
+
key: "ApiKeyAuth",
|
|
16300
|
+
name: "X-API-Key",
|
|
16301
|
+
type: "apiKey"
|
|
16302
|
+
}],
|
|
16303
|
+
url: "/agent/v1/computers/{computer_id}/leases/{lease_id}",
|
|
15084
16304
|
...options
|
|
15085
16305
|
});
|
|
15086
16306
|
var listToolsets = (options) => (options?.client ?? client).get({
|
|
@@ -15208,6 +16428,15 @@ var listSessionCompactions = (options) => (options.client ?? client).get({
|
|
|
15208
16428
|
url: "/agent/v1/sessions/{session_id}/compactions",
|
|
15209
16429
|
...options
|
|
15210
16430
|
});
|
|
16431
|
+
var getEmbedAppearance = (options) => (options?.client ?? client).get({
|
|
16432
|
+
security: [{
|
|
16433
|
+
key: "BearerAuth",
|
|
16434
|
+
scheme: "bearer",
|
|
16435
|
+
type: "http"
|
|
16436
|
+
}, { name: "Praxis-Publishable-Key", type: "apiKey" }],
|
|
16437
|
+
url: "/agent/v1/embed/appearance",
|
|
16438
|
+
...options
|
|
16439
|
+
});
|
|
15211
16440
|
var createAudioSpeech = (options) => (options.client ?? client).post({
|
|
15212
16441
|
security: [{
|
|
15213
16442
|
key: "BearerAuth",
|
|
@@ -15489,6 +16718,55 @@ var fileRetrieveFileContent = (options) => (options.client ?? client).get({
|
|
|
15489
16718
|
url: "/file/v1/files/{file_id}/content",
|
|
15490
16719
|
...options
|
|
15491
16720
|
});
|
|
16721
|
+
var fileCreateUpload = (options) => (options.client ?? client).post({
|
|
16722
|
+
security: [{
|
|
16723
|
+
key: "BearerAuth",
|
|
16724
|
+
scheme: "bearer",
|
|
16725
|
+
type: "http"
|
|
16726
|
+
}],
|
|
16727
|
+
url: "/file/v1/uploads",
|
|
16728
|
+
...options,
|
|
16729
|
+
headers: {
|
|
16730
|
+
"Content-Type": "application/json",
|
|
16731
|
+
...options.headers
|
|
16732
|
+
}
|
|
16733
|
+
});
|
|
16734
|
+
var fileAddUploadPart = (options) => (options.client ?? client).post({
|
|
16735
|
+
...formDataBodySerializer,
|
|
16736
|
+
security: [{
|
|
16737
|
+
key: "BearerAuth",
|
|
16738
|
+
scheme: "bearer",
|
|
16739
|
+
type: "http"
|
|
16740
|
+
}],
|
|
16741
|
+
url: "/file/v1/uploads/{upload_id}/parts",
|
|
16742
|
+
...options,
|
|
16743
|
+
headers: {
|
|
16744
|
+
"Content-Type": null,
|
|
16745
|
+
...options.headers
|
|
16746
|
+
}
|
|
16747
|
+
});
|
|
16748
|
+
var fileCompleteUpload = (options) => (options.client ?? client).post({
|
|
16749
|
+
security: [{
|
|
16750
|
+
key: "BearerAuth",
|
|
16751
|
+
scheme: "bearer",
|
|
16752
|
+
type: "http"
|
|
16753
|
+
}],
|
|
16754
|
+
url: "/file/v1/uploads/{upload_id}/complete",
|
|
16755
|
+
...options,
|
|
16756
|
+
headers: {
|
|
16757
|
+
"Content-Type": "application/json",
|
|
16758
|
+
...options.headers
|
|
16759
|
+
}
|
|
16760
|
+
});
|
|
16761
|
+
var fileCancelUpload = (options) => (options.client ?? client).post({
|
|
16762
|
+
security: [{
|
|
16763
|
+
key: "BearerAuth",
|
|
16764
|
+
scheme: "bearer",
|
|
16765
|
+
type: "http"
|
|
16766
|
+
}],
|
|
16767
|
+
url: "/file/v1/uploads/{upload_id}/cancel",
|
|
16768
|
+
...options
|
|
16769
|
+
});
|
|
15492
16770
|
var healthCheck = (options) => (options?.client ?? client).get({ url: "/meta/v1/health", ...options });
|
|
15493
16771
|
var metaMethodsSearch = (options) => (options?.client ?? client).get({ url: "/meta/v1/methods", ...options });
|
|
15494
16772
|
var metaMethodsRetrieve = (options) => (options.client ?? client).get({ url: "/meta/v1/methods/{name}", ...options });
|
|
@@ -15888,14 +17166,95 @@ var createMessage = (options) => (options.client ?? client).post({
|
|
|
15888
17166
|
name: "X-API-Key",
|
|
15889
17167
|
type: "apiKey"
|
|
15890
17168
|
}],
|
|
15891
|
-
url: "/model/v1/messages",
|
|
17169
|
+
url: "/model/v1/messages",
|
|
17170
|
+
...options,
|
|
17171
|
+
headers: {
|
|
17172
|
+
"Content-Type": "application/json",
|
|
17173
|
+
...options.headers
|
|
17174
|
+
}
|
|
17175
|
+
});
|
|
17176
|
+
var countTokens = (options) => (options.client ?? client).post({
|
|
17177
|
+
security: [{
|
|
17178
|
+
key: "BearerAuth",
|
|
17179
|
+
scheme: "bearer",
|
|
17180
|
+
type: "http"
|
|
17181
|
+
}, {
|
|
17182
|
+
key: "ApiKeyAuth",
|
|
17183
|
+
name: "X-API-Key",
|
|
17184
|
+
type: "apiKey"
|
|
17185
|
+
}],
|
|
17186
|
+
url: "/model/v1/messages/count_tokens",
|
|
17187
|
+
...options,
|
|
17188
|
+
headers: {
|
|
17189
|
+
"Content-Type": "application/json",
|
|
17190
|
+
...options.headers
|
|
17191
|
+
}
|
|
17192
|
+
});
|
|
17193
|
+
var compactResponse = (options) => (options.client ?? client).post({
|
|
17194
|
+
security: [{
|
|
17195
|
+
key: "BearerAuth",
|
|
17196
|
+
scheme: "bearer",
|
|
17197
|
+
type: "http"
|
|
17198
|
+
}, {
|
|
17199
|
+
key: "ApiKeyAuth",
|
|
17200
|
+
name: "X-API-Key",
|
|
17201
|
+
type: "apiKey"
|
|
17202
|
+
}],
|
|
17203
|
+
url: "/model/v1/responses/compact",
|
|
17204
|
+
...options,
|
|
17205
|
+
headers: {
|
|
17206
|
+
"Content-Type": "application/json",
|
|
17207
|
+
...options.headers
|
|
17208
|
+
}
|
|
17209
|
+
});
|
|
17210
|
+
var countResponseInputTokens = (options) => (options.client ?? client).post({
|
|
17211
|
+
security: [{
|
|
17212
|
+
key: "BearerAuth",
|
|
17213
|
+
scheme: "bearer",
|
|
17214
|
+
type: "http"
|
|
17215
|
+
}, {
|
|
17216
|
+
key: "ApiKeyAuth",
|
|
17217
|
+
name: "X-API-Key",
|
|
17218
|
+
type: "apiKey"
|
|
17219
|
+
}],
|
|
17220
|
+
url: "/model/v1/responses/input_tokens",
|
|
17221
|
+
...options,
|
|
17222
|
+
headers: {
|
|
17223
|
+
"Content-Type": "application/json",
|
|
17224
|
+
...options.headers
|
|
17225
|
+
}
|
|
17226
|
+
});
|
|
17227
|
+
var listOrganizationFeedback = (options) => (options?.client ?? client).get({
|
|
17228
|
+
security: [{
|
|
17229
|
+
key: "BearerAuth",
|
|
17230
|
+
scheme: "bearer",
|
|
17231
|
+
type: "http"
|
|
17232
|
+
}, {
|
|
17233
|
+
key: "ApiKeyAuth",
|
|
17234
|
+
name: "X-API-Key",
|
|
17235
|
+
type: "apiKey"
|
|
17236
|
+
}],
|
|
17237
|
+
url: "/organization/v1/feedback",
|
|
17238
|
+
...options
|
|
17239
|
+
});
|
|
17240
|
+
var createOrganizationFeedback = (options) => (options.client ?? client).post({
|
|
17241
|
+
security: [{
|
|
17242
|
+
key: "BearerAuth",
|
|
17243
|
+
scheme: "bearer",
|
|
17244
|
+
type: "http"
|
|
17245
|
+
}, {
|
|
17246
|
+
key: "ApiKeyAuth",
|
|
17247
|
+
name: "X-API-Key",
|
|
17248
|
+
type: "apiKey"
|
|
17249
|
+
}],
|
|
17250
|
+
url: "/organization/v1/feedback",
|
|
15892
17251
|
...options,
|
|
15893
17252
|
headers: {
|
|
15894
17253
|
"Content-Type": "application/json",
|
|
15895
17254
|
...options.headers
|
|
15896
17255
|
}
|
|
15897
17256
|
});
|
|
15898
|
-
var
|
|
17257
|
+
var getOrganizationFeedbackCounts = (options) => (options?.client ?? client).get({
|
|
15899
17258
|
security: [{
|
|
15900
17259
|
key: "BearerAuth",
|
|
15901
17260
|
scheme: "bearer",
|
|
@@ -15905,14 +17264,10 @@ var countTokens = (options) => (options.client ?? client).post({
|
|
|
15905
17264
|
name: "X-API-Key",
|
|
15906
17265
|
type: "apiKey"
|
|
15907
17266
|
}],
|
|
15908
|
-
url: "/
|
|
15909
|
-
...options
|
|
15910
|
-
headers: {
|
|
15911
|
-
"Content-Type": "application/json",
|
|
15912
|
-
...options.headers
|
|
15913
|
-
}
|
|
17267
|
+
url: "/organization/v1/feedback/counts",
|
|
17268
|
+
...options
|
|
15914
17269
|
});
|
|
15915
|
-
var
|
|
17270
|
+
var getOrganizationFeedback = (options) => (options.client ?? client).get({
|
|
15916
17271
|
security: [{
|
|
15917
17272
|
key: "BearerAuth",
|
|
15918
17273
|
scheme: "bearer",
|
|
@@ -15922,14 +17277,10 @@ var compactResponse = (options) => (options.client ?? client).post({
|
|
|
15922
17277
|
name: "X-API-Key",
|
|
15923
17278
|
type: "apiKey"
|
|
15924
17279
|
}],
|
|
15925
|
-
url: "/
|
|
15926
|
-
...options
|
|
15927
|
-
headers: {
|
|
15928
|
-
"Content-Type": "application/json",
|
|
15929
|
-
...options.headers
|
|
15930
|
-
}
|
|
17280
|
+
url: "/organization/v1/feedback/{id}",
|
|
17281
|
+
...options
|
|
15931
17282
|
});
|
|
15932
|
-
var
|
|
17283
|
+
var listOrganizationFeedbackMessages = (options) => (options.client ?? client).get({
|
|
15933
17284
|
security: [{
|
|
15934
17285
|
key: "BearerAuth",
|
|
15935
17286
|
scheme: "bearer",
|
|
@@ -15939,14 +17290,10 @@ var countResponseInputTokens = (options) => (options.client ?? client).post({
|
|
|
15939
17290
|
name: "X-API-Key",
|
|
15940
17291
|
type: "apiKey"
|
|
15941
17292
|
}],
|
|
15942
|
-
url: "/
|
|
15943
|
-
...options
|
|
15944
|
-
headers: {
|
|
15945
|
-
"Content-Type": "application/json",
|
|
15946
|
-
...options.headers
|
|
15947
|
-
}
|
|
17293
|
+
url: "/organization/v1/feedback/{id}/messages",
|
|
17294
|
+
...options
|
|
15948
17295
|
});
|
|
15949
|
-
var
|
|
17296
|
+
var createOrganizationFeedbackMessage = (options) => (options.client ?? client).post({
|
|
15950
17297
|
security: [{
|
|
15951
17298
|
key: "BearerAuth",
|
|
15952
17299
|
scheme: "bearer",
|
|
@@ -15956,7 +17303,7 @@ var createOrganizationFeedback = (options) => (options.client ?? client).post({
|
|
|
15956
17303
|
name: "X-API-Key",
|
|
15957
17304
|
type: "apiKey"
|
|
15958
17305
|
}],
|
|
15959
|
-
url: "/organization/v1/feedback",
|
|
17306
|
+
url: "/organization/v1/feedback/{id}/messages",
|
|
15960
17307
|
...options,
|
|
15961
17308
|
headers: {
|
|
15962
17309
|
"Content-Type": "application/json",
|
|
@@ -16255,7 +17602,7 @@ var runSandboxCommand = (options) => (options.client ?? client).post({
|
|
|
16255
17602
|
...options.headers
|
|
16256
17603
|
}
|
|
16257
17604
|
});
|
|
16258
|
-
var
|
|
17605
|
+
var sessionsDelete = (options) => (options.client ?? client).delete({
|
|
16259
17606
|
security: [{
|
|
16260
17607
|
key: "BearerAuth",
|
|
16261
17608
|
scheme: "bearer",
|
|
@@ -16265,10 +17612,10 @@ var agentsList = (options) => (options?.client ?? client).get({
|
|
|
16265
17612
|
name: "X-API-Key",
|
|
16266
17613
|
type: "apiKey"
|
|
16267
17614
|
}],
|
|
16268
|
-
url: "/agent/v1/
|
|
17615
|
+
url: "/agent/v1/sessions/{session_id}",
|
|
16269
17616
|
...options
|
|
16270
17617
|
});
|
|
16271
|
-
var
|
|
17618
|
+
var sessionsRetrieve = (options) => (options.client ?? client).get({
|
|
16272
17619
|
security: [{
|
|
16273
17620
|
key: "BearerAuth",
|
|
16274
17621
|
scheme: "bearer",
|
|
@@ -16278,14 +17625,27 @@ var agentsCreate = (options) => (options.client ?? client).post({
|
|
|
16278
17625
|
name: "X-API-Key",
|
|
16279
17626
|
type: "apiKey"
|
|
16280
17627
|
}],
|
|
16281
|
-
url: "/agent/v1/
|
|
17628
|
+
url: "/agent/v1/sessions/{session_id}",
|
|
17629
|
+
...options
|
|
17630
|
+
});
|
|
17631
|
+
var sessionsUpdate = (options) => (options.client ?? client).post({
|
|
17632
|
+
security: [{
|
|
17633
|
+
key: "BearerAuth",
|
|
17634
|
+
scheme: "bearer",
|
|
17635
|
+
type: "http"
|
|
17636
|
+
}, {
|
|
17637
|
+
key: "ApiKeyAuth",
|
|
17638
|
+
name: "X-API-Key",
|
|
17639
|
+
type: "apiKey"
|
|
17640
|
+
}],
|
|
17641
|
+
url: "/agent/v1/sessions/{session_id}",
|
|
16282
17642
|
...options,
|
|
16283
17643
|
headers: {
|
|
16284
17644
|
"Content-Type": "application/json",
|
|
16285
17645
|
...options.headers
|
|
16286
17646
|
}
|
|
16287
17647
|
});
|
|
16288
|
-
var
|
|
17648
|
+
var agentsList = (options) => (options?.client ?? client).get({
|
|
16289
17649
|
security: [{
|
|
16290
17650
|
key: "BearerAuth",
|
|
16291
17651
|
scheme: "bearer",
|
|
@@ -16295,10 +17655,10 @@ var agentsRetrieve = (options) => (options.client ?? client).get({
|
|
|
16295
17655
|
name: "X-API-Key",
|
|
16296
17656
|
type: "apiKey"
|
|
16297
17657
|
}],
|
|
16298
|
-
url: "/agent/v1/agents
|
|
17658
|
+
url: "/agent/v1/agents",
|
|
16299
17659
|
...options
|
|
16300
17660
|
});
|
|
16301
|
-
var
|
|
17661
|
+
var agentsCreate = (options) => (options.client ?? client).post({
|
|
16302
17662
|
security: [{
|
|
16303
17663
|
key: "BearerAuth",
|
|
16304
17664
|
scheme: "bearer",
|
|
@@ -16308,14 +17668,14 @@ var agentsUpdate = (options) => (options.client ?? client).post({
|
|
|
16308
17668
|
name: "X-API-Key",
|
|
16309
17669
|
type: "apiKey"
|
|
16310
17670
|
}],
|
|
16311
|
-
url: "/agent/v1/agents
|
|
17671
|
+
url: "/agent/v1/agents",
|
|
16312
17672
|
...options,
|
|
16313
17673
|
headers: {
|
|
16314
17674
|
"Content-Type": "application/json",
|
|
16315
17675
|
...options.headers
|
|
16316
17676
|
}
|
|
16317
17677
|
});
|
|
16318
|
-
var
|
|
17678
|
+
var agentsRetrieve = (options) => (options.client ?? client).get({
|
|
16319
17679
|
security: [{
|
|
16320
17680
|
key: "BearerAuth",
|
|
16321
17681
|
scheme: "bearer",
|
|
@@ -16325,10 +17685,10 @@ var agentsArchive = (options) => (options.client ?? client).post({
|
|
|
16325
17685
|
name: "X-API-Key",
|
|
16326
17686
|
type: "apiKey"
|
|
16327
17687
|
}],
|
|
16328
|
-
url: "/agent/v1/agents/{agent_id}
|
|
17688
|
+
url: "/agent/v1/agents/{agent_id}",
|
|
16329
17689
|
...options
|
|
16330
17690
|
});
|
|
16331
|
-
var
|
|
17691
|
+
var agentsUpdate = (options) => (options.client ?? client).post({
|
|
16332
17692
|
security: [{
|
|
16333
17693
|
key: "BearerAuth",
|
|
16334
17694
|
scheme: "bearer",
|
|
@@ -16338,10 +17698,14 @@ var agentsVersionsList = (options) => (options.client ?? client).get({
|
|
|
16338
17698
|
name: "X-API-Key",
|
|
16339
17699
|
type: "apiKey"
|
|
16340
17700
|
}],
|
|
16341
|
-
url: "/agent/v1/agents/{agent_id}
|
|
16342
|
-
...options
|
|
17701
|
+
url: "/agent/v1/agents/{agent_id}",
|
|
17702
|
+
...options,
|
|
17703
|
+
headers: {
|
|
17704
|
+
"Content-Type": "application/json",
|
|
17705
|
+
...options.headers
|
|
17706
|
+
}
|
|
16343
17707
|
});
|
|
16344
|
-
var
|
|
17708
|
+
var agentsArchive = (options) => (options.client ?? client).post({
|
|
16345
17709
|
security: [{
|
|
16346
17710
|
key: "BearerAuth",
|
|
16347
17711
|
scheme: "bearer",
|
|
@@ -16351,10 +17715,10 @@ var sessionsList = (options) => (options?.client ?? client).get({
|
|
|
16351
17715
|
name: "X-API-Key",
|
|
16352
17716
|
type: "apiKey"
|
|
16353
17717
|
}],
|
|
16354
|
-
url: "/agent/v1/
|
|
17718
|
+
url: "/agent/v1/agents/{agent_id}/archive",
|
|
16355
17719
|
...options
|
|
16356
17720
|
});
|
|
16357
|
-
var
|
|
17721
|
+
var agentsVersionsList = (options) => (options.client ?? client).get({
|
|
16358
17722
|
security: [{
|
|
16359
17723
|
key: "BearerAuth",
|
|
16360
17724
|
scheme: "bearer",
|
|
@@ -16364,14 +17728,10 @@ var sessionsCreate = (options) => (options.client ?? client).post({
|
|
|
16364
17728
|
name: "X-API-Key",
|
|
16365
17729
|
type: "apiKey"
|
|
16366
17730
|
}],
|
|
16367
|
-
url: "/agent/v1/
|
|
16368
|
-
...options
|
|
16369
|
-
headers: {
|
|
16370
|
-
"Content-Type": "application/json",
|
|
16371
|
-
...options.headers
|
|
16372
|
-
}
|
|
17731
|
+
url: "/agent/v1/agents/{agent_id}/versions",
|
|
17732
|
+
...options
|
|
16373
17733
|
});
|
|
16374
|
-
var
|
|
17734
|
+
var sessionsList = (options) => (options?.client ?? client).get({
|
|
16375
17735
|
security: [{
|
|
16376
17736
|
key: "BearerAuth",
|
|
16377
17737
|
scheme: "bearer",
|
|
@@ -16381,10 +17741,10 @@ var sessionsRetrieve = (options) => (options.client ?? client).get({
|
|
|
16381
17741
|
name: "X-API-Key",
|
|
16382
17742
|
type: "apiKey"
|
|
16383
17743
|
}],
|
|
16384
|
-
url: "/agent/v1/sessions
|
|
17744
|
+
url: "/agent/v1/sessions",
|
|
16385
17745
|
...options
|
|
16386
17746
|
});
|
|
16387
|
-
var
|
|
17747
|
+
var sessionsCreate = (options) => (options.client ?? client).post({
|
|
16388
17748
|
security: [{
|
|
16389
17749
|
key: "BearerAuth",
|
|
16390
17750
|
scheme: "bearer",
|
|
@@ -16394,7 +17754,7 @@ var sessionsUpdate = (options) => (options.client ?? client).post({
|
|
|
16394
17754
|
name: "X-API-Key",
|
|
16395
17755
|
type: "apiKey"
|
|
16396
17756
|
}],
|
|
16397
|
-
url: "/agent/v1/sessions
|
|
17757
|
+
url: "/agent/v1/sessions",
|
|
16398
17758
|
...options,
|
|
16399
17759
|
headers: {
|
|
16400
17760
|
"Content-Type": "application/json",
|
|
@@ -16895,6 +18255,15 @@ var applicationCreateVersion = (options) => (options.client ?? client).post({
|
|
|
16895
18255
|
...options.headers
|
|
16896
18256
|
}
|
|
16897
18257
|
});
|
|
18258
|
+
var applicationGetVersionAssetManifest = (options) => (options.client ?? client).get({
|
|
18259
|
+
security: [{
|
|
18260
|
+
key: "application-bearerAuth",
|
|
18261
|
+
scheme: "bearer",
|
|
18262
|
+
type: "http"
|
|
18263
|
+
}],
|
|
18264
|
+
url: "/application/v1/workers/{worker_id}/versions/{version_id}/assets/manifest",
|
|
18265
|
+
...options
|
|
18266
|
+
});
|
|
16898
18267
|
var applicationGetVersion = (options) => (options.client ?? client).get({
|
|
16899
18268
|
security: [{
|
|
16900
18269
|
key: "application-bearerAuth",
|
|
@@ -19715,8 +21084,26 @@ function createAgent(transport) {
|
|
|
19715
21084
|
agents: {
|
|
19716
21085
|
archive: bind(transport, agentsArchive),
|
|
19717
21086
|
create: bind(transport, agentsCreate),
|
|
21087
|
+
endUsers: {
|
|
21088
|
+
block: {
|
|
21089
|
+
create: bind(transport, blockEndUser)
|
|
21090
|
+
},
|
|
21091
|
+
delete: bind(transport, deleteEndUser),
|
|
21092
|
+
list: bind(transport, listEndUsers),
|
|
21093
|
+
retrieve: bind(transport, getEndUser),
|
|
21094
|
+
retrieveDeletion: bind(transport, getEndUserDeletion),
|
|
21095
|
+
revokeTokens: {
|
|
21096
|
+
create: bind(transport, revokeEndUserTokens)
|
|
21097
|
+
},
|
|
21098
|
+
unblock: {
|
|
21099
|
+
create: bind(transport, unblockEndUser)
|
|
21100
|
+
}
|
|
21101
|
+
},
|
|
19718
21102
|
list: bind(transport, agentsList),
|
|
19719
21103
|
retrieve: bind(transport, agentsRetrieve),
|
|
21104
|
+
unarchive: {
|
|
21105
|
+
create: bind(transport, unarchiveAgent)
|
|
21106
|
+
},
|
|
19720
21107
|
update: bind(transport, agentsUpdate),
|
|
19721
21108
|
versions: {
|
|
19722
21109
|
list: bind(transport, agentsVersionsList)
|
|
@@ -19734,6 +21121,12 @@ function createAgent(transport) {
|
|
|
19734
21121
|
list: bind(transport, computersFilesList),
|
|
19735
21122
|
retrieveContent: bind(transport, computersFilesContent)
|
|
19736
21123
|
},
|
|
21124
|
+
leases: {
|
|
21125
|
+
delete: bind(transport, releaseComputerLease),
|
|
21126
|
+
renew: {
|
|
21127
|
+
create: bind(transport, renewComputerLease)
|
|
21128
|
+
}
|
|
21129
|
+
},
|
|
19737
21130
|
list: bind(transport, computersList),
|
|
19738
21131
|
retrieve: bind(transport, computersRetrieve),
|
|
19739
21132
|
update: bind(transport, computersUpdate)
|
|
@@ -19756,7 +21149,16 @@ function createAgent(transport) {
|
|
|
19756
21149
|
},
|
|
19757
21150
|
update: bind(transport, deploymentsUpdate)
|
|
19758
21151
|
},
|
|
21152
|
+
embed: {
|
|
21153
|
+
exchange: {
|
|
21154
|
+
create: bind(transport, exchangeEmbedCode)
|
|
21155
|
+
},
|
|
21156
|
+
retrieveAppearance: bind(transport, getEmbedAppearance)
|
|
21157
|
+
},
|
|
19759
21158
|
embedTokens: {
|
|
21159
|
+
anonymous: {
|
|
21160
|
+
create: bind(transport, createAnonymousEmbedToken)
|
|
21161
|
+
},
|
|
19760
21162
|
create: bind(transport, createEmbedToken),
|
|
19761
21163
|
list: bind(transport, listEmbedTokens),
|
|
19762
21164
|
revoke: {
|
|
@@ -19782,6 +21184,7 @@ function createAgent(transport) {
|
|
|
19782
21184
|
list: bind(transport, listSessionCompactions)
|
|
19783
21185
|
},
|
|
19784
21186
|
create: bind(transport, sessionsCreate),
|
|
21187
|
+
delete: bind(transport, sessionsDelete),
|
|
19785
21188
|
events: {
|
|
19786
21189
|
list: bind(transport, sessionsEventsList),
|
|
19787
21190
|
send: bind(transport, sessionsEventsSend),
|
|
@@ -19798,6 +21201,12 @@ function createAgent(transport) {
|
|
|
19798
21201
|
retrieve: bind(transport, sessionsRetrieve),
|
|
19799
21202
|
retrieveCompact: bind(transport, getSessionCompaction),
|
|
19800
21203
|
retrieveContext: bind(transport, getSessionContext),
|
|
21204
|
+
runs: {
|
|
21205
|
+
deleteFeedback: bind(transport, deleteRunFeedback),
|
|
21206
|
+
feedback: {
|
|
21207
|
+
create: bind(transport, setRunFeedback)
|
|
21208
|
+
}
|
|
21209
|
+
},
|
|
19801
21210
|
threads: {
|
|
19802
21211
|
archive: bind(transport, aliasOperation(sessionsThreadsArchive, { query: { session_id: "query_session_id" } })),
|
|
19803
21212
|
events: {
|
|
@@ -19857,6 +21266,9 @@ function createApplication(transport) {
|
|
|
19857
21266
|
},
|
|
19858
21267
|
update: bind(transport, applicationUpdateWorker),
|
|
19859
21268
|
versions: {
|
|
21269
|
+
assets: {
|
|
21270
|
+
retrieveManifest: bind(transport, applicationGetVersionAssetManifest)
|
|
21271
|
+
},
|
|
19860
21272
|
create: bind(transport, applicationCreateVersion),
|
|
19861
21273
|
list: bindPage(transport, applicationListVersions),
|
|
19862
21274
|
retrieve: bind(transport, applicationGetVersion)
|
|
@@ -20064,6 +21476,14 @@ function createFile(transport) {
|
|
|
20064
21476
|
list: bind(transport, fileListFiles),
|
|
20065
21477
|
retrieve: bind(transport, fileRetrieveFile),
|
|
20066
21478
|
retrieveContent: bind(transport, fileRetrieveFileContent)
|
|
21479
|
+
},
|
|
21480
|
+
uploads: {
|
|
21481
|
+
cancel: bind(transport, fileCancelUpload),
|
|
21482
|
+
complete: bind(transport, fileCompleteUpload),
|
|
21483
|
+
create: bind(transport, fileCreateUpload),
|
|
21484
|
+
parts: {
|
|
21485
|
+
create: bind(transport, (options) => fileAddUploadPart({ ...options, bodySerializer: multipartBodySerializer, headers: { "Content-Type": null, ...options.headers } }))
|
|
21486
|
+
}
|
|
20067
21487
|
}
|
|
20068
21488
|
};
|
|
20069
21489
|
}
|
|
@@ -20272,7 +21692,16 @@ function createOrganization(transport) {
|
|
|
20272
21692
|
retrieve: bind(transport, getOrganizationEvent)
|
|
20273
21693
|
},
|
|
20274
21694
|
feedback: {
|
|
20275
|
-
|
|
21695
|
+
counts: {
|
|
21696
|
+
list: bind(transport, getOrganizationFeedbackCounts)
|
|
21697
|
+
},
|
|
21698
|
+
create: bind(transport, createOrganizationFeedback),
|
|
21699
|
+
list: bind(transport, listOrganizationFeedback),
|
|
21700
|
+
messages: {
|
|
21701
|
+
create: bind(transport, createOrganizationFeedbackMessage),
|
|
21702
|
+
list: bind(transport, listOrganizationFeedbackMessages)
|
|
21703
|
+
},
|
|
21704
|
+
retrieve: bind(transport, getOrganizationFeedback)
|
|
20276
21705
|
},
|
|
20277
21706
|
usage: {
|
|
20278
21707
|
list: bind(transport, listOrganizationUsage)
|
|
@@ -20425,132 +21854,6 @@ var resourceFactories = {
|
|
|
20425
21854
|
vault: createVault
|
|
20426
21855
|
};
|
|
20427
21856
|
|
|
20428
|
-
// ../../packages/sdk/typescript/src/core/errors.ts
|
|
20429
|
-
function problemFrom(status, headers, body, statusText) {
|
|
20430
|
-
const value = body && typeof body === "object" ? body : {};
|
|
20431
|
-
const nested = value.error && typeof value.error === "object" ? value.error : {};
|
|
20432
|
-
const string = (v) => typeof v === "string" && v.trim() ? v : undefined;
|
|
20433
|
-
const fallback = statusText || { 400: "Bad Request", 401: "Unauthorized", 403: "Forbidden", 404: "Not Found", 405: "Method Not Allowed", 408: "Request Timeout", 409: "Conflict", 413: "Payload Too Large", 415: "Unsupported Media Type", 422: "Unprocessable Entity", 429: "Too Many Requests", 500: "Internal Server Error", 502: "Bad Gateway", 503: "Service Unavailable", 504: "Gateway Timeout" }[status] || `HTTP ${status}`;
|
|
20434
|
-
const detail = string(value.detail) ?? string(nested.message) ?? string(value.message) ?? string(body);
|
|
20435
|
-
const title = string(value.title) ?? fallback;
|
|
20436
|
-
const param = nested.param ?? value.param;
|
|
20437
|
-
return {
|
|
20438
|
-
status,
|
|
20439
|
-
message: detail ?? title,
|
|
20440
|
-
title,
|
|
20441
|
-
detail,
|
|
20442
|
-
code: string(value.code) ?? string(nested.code) ?? string(nested.type) ?? string(value.error_code),
|
|
20443
|
-
type: string(nested.type) ?? string(value.type),
|
|
20444
|
-
param: typeof param === "string" ? param : param === null || nested.param === null ? null : undefined,
|
|
20445
|
-
errors: Array.isArray(value.errors) ? value.errors : [],
|
|
20446
|
-
requestId: headers.get("x-request-id") ?? string(value.requestId) ?? string(value.request_id),
|
|
20447
|
-
raw: body
|
|
20448
|
-
};
|
|
20449
|
-
}
|
|
20450
|
-
|
|
20451
|
-
class PraxisError extends Error {
|
|
20452
|
-
status;
|
|
20453
|
-
code;
|
|
20454
|
-
type;
|
|
20455
|
-
title;
|
|
20456
|
-
detail;
|
|
20457
|
-
errors;
|
|
20458
|
-
requestId;
|
|
20459
|
-
param;
|
|
20460
|
-
raw;
|
|
20461
|
-
constructor(problem = {}, options) {
|
|
20462
|
-
super(problem.message ?? problem.detail ?? problem.title ?? `Praxis request failed${problem.status ? ` (${problem.status})` : ""}`, options);
|
|
20463
|
-
this.name = "PraxisError";
|
|
20464
|
-
this.status = problem.status;
|
|
20465
|
-
this.code = problem.code;
|
|
20466
|
-
this.type = problem.type;
|
|
20467
|
-
this.title = problem.title;
|
|
20468
|
-
this.detail = problem.detail;
|
|
20469
|
-
this.errors = problem.errors ?? [];
|
|
20470
|
-
this.requestId = problem.requestId;
|
|
20471
|
-
this.param = problem.param;
|
|
20472
|
-
this.raw = problem.raw;
|
|
20473
|
-
}
|
|
20474
|
-
static fromResponse(response, body) {
|
|
20475
|
-
return new PraxisError(problemFrom(response.status, response.headers, body, response.statusText));
|
|
20476
|
-
}
|
|
20477
|
-
}
|
|
20478
|
-
|
|
20479
|
-
class PraxisConnectionError extends PraxisError {
|
|
20480
|
-
constructor(cause) {
|
|
20481
|
-
super({ code: "CONNECTION_ERROR", title: "Unable to connect to Praxis" }, { cause });
|
|
20482
|
-
this.name = "PraxisConnectionError";
|
|
20483
|
-
}
|
|
20484
|
-
}
|
|
20485
|
-
|
|
20486
|
-
class PraxisTimeoutError extends PraxisError {
|
|
20487
|
-
constructor(timeoutMs) {
|
|
20488
|
-
super({ code: "TIMEOUT", title: `Praxis request exceeded ${timeoutMs} ms` });
|
|
20489
|
-
this.name = "PraxisTimeoutError";
|
|
20490
|
-
}
|
|
20491
|
-
}
|
|
20492
|
-
|
|
20493
|
-
// ../../packages/sdk/typescript/src/core/retry.ts
|
|
20494
|
-
function canRetry(request) {
|
|
20495
|
-
return request.method !== "POST" || Boolean(request.headers.get("Idempotency-Key")?.trim());
|
|
20496
|
-
}
|
|
20497
|
-
function retryAfterMs(value, now = Date.now()) {
|
|
20498
|
-
if (!value)
|
|
20499
|
-
return;
|
|
20500
|
-
if (/^\d+(?:\.\d+)?$/.test(value.trim()))
|
|
20501
|
-
return Number(value) * 1000;
|
|
20502
|
-
const date = Date.parse(value);
|
|
20503
|
-
return Number.isFinite(date) ? Math.max(0, date - now) : undefined;
|
|
20504
|
-
}
|
|
20505
|
-
function retryDelay(attempt, retryAfter, random = Math.random) {
|
|
20506
|
-
return retryAfterMs(retryAfter) ?? Math.min(30000, 500 * 2 ** attempt) * (0.5 + random() * 0.5);
|
|
20507
|
-
}
|
|
20508
|
-
function abortable(promise, signal) {
|
|
20509
|
-
signal.throwIfAborted();
|
|
20510
|
-
return new Promise((resolve, reject) => {
|
|
20511
|
-
const abort = () => reject(signal.reason);
|
|
20512
|
-
signal.addEventListener("abort", abort, { once: true });
|
|
20513
|
-
promise.then(resolve, reject).finally(() => signal.removeEventListener("abort", abort));
|
|
20514
|
-
});
|
|
20515
|
-
}
|
|
20516
|
-
function sleep(ms, signal) {
|
|
20517
|
-
signal.throwIfAborted();
|
|
20518
|
-
return new Promise((resolve, reject) => {
|
|
20519
|
-
const abort = () => {
|
|
20520
|
-
clearTimeout(timer);
|
|
20521
|
-
reject(signal.reason);
|
|
20522
|
-
};
|
|
20523
|
-
const timer = setTimeout(() => {
|
|
20524
|
-
signal.removeEventListener("abort", abort);
|
|
20525
|
-
resolve();
|
|
20526
|
-
}, ms);
|
|
20527
|
-
signal.addEventListener("abort", abort, { once: true });
|
|
20528
|
-
});
|
|
20529
|
-
}
|
|
20530
|
-
async function fetchWithRetry(request, fetcher, options) {
|
|
20531
|
-
const eligible = canRetry(request);
|
|
20532
|
-
const wait = options.wait ?? sleep;
|
|
20533
|
-
for (let attempt = 0;; attempt++) {
|
|
20534
|
-
options.signal.throwIfAborted();
|
|
20535
|
-
let response;
|
|
20536
|
-
try {
|
|
20537
|
-
response = await abortable(fetcher(request.clone()), options.signal);
|
|
20538
|
-
} catch (cause) {
|
|
20539
|
-
options.signal.throwIfAborted();
|
|
20540
|
-
if (!eligible || attempt >= options.maxRetries)
|
|
20541
|
-
throw new PraxisConnectionError(cause);
|
|
20542
|
-
await wait(retryDelay(attempt, null, options.random), options.signal);
|
|
20543
|
-
continue;
|
|
20544
|
-
}
|
|
20545
|
-
const retriable = response.status === 408 || response.status === 429 || response.status >= 500 && response.status <= 599;
|
|
20546
|
-
if (!eligible || !retriable || attempt >= options.maxRetries)
|
|
20547
|
-
return response;
|
|
20548
|
-
const delay = retryDelay(attempt, response.headers.get("Retry-After"), options.random);
|
|
20549
|
-
await response.body?.cancel();
|
|
20550
|
-
await wait(delay, options.signal);
|
|
20551
|
-
}
|
|
20552
|
-
}
|
|
20553
|
-
|
|
20554
21857
|
// ../../packages/sdk/typescript/src/core/sse.ts
|
|
20555
21858
|
async function* parseSSE(body, options = {}) {
|
|
20556
21859
|
const reader = body.getReader();
|
|
@@ -20764,9 +22067,13 @@ class Transport {
|
|
|
20764
22067
|
};
|
|
20765
22068
|
}
|
|
20766
22069
|
async request(operation, options = {}) {
|
|
22070
|
+
return (await this.requestWithResponse(operation, options)).data;
|
|
22071
|
+
}
|
|
22072
|
+
async requestWithResponse(operation, options = {}) {
|
|
20767
22073
|
const scope = this.scope(options, false);
|
|
20768
22074
|
try {
|
|
20769
|
-
|
|
22075
|
+
const result = await abortable(operation(scope.options), scope.signal);
|
|
22076
|
+
return { data: result.data, response: result.response };
|
|
20770
22077
|
} finally {
|
|
20771
22078
|
scope.close();
|
|
20772
22079
|
}
|
|
@@ -20798,6 +22105,10 @@ function base64(bytes) {
|
|
|
20798
22105
|
return btoa(chunks.join(""));
|
|
20799
22106
|
}
|
|
20800
22107
|
async function publish(client2, input) {
|
|
22108
|
+
const rolloutFields = ["gradual", "gradualRollout", "gradual_rollout", "canary", "rollout", "percentage", "percent", "traffic", "traffic_percentage", "strategy", "versions"];
|
|
22109
|
+
if (Object.keys(input).some((key) => rolloutFields.includes(key) || /percentage|percent|canary|gradual|rollout|灰度/i.test(key))) {
|
|
22110
|
+
throw new PraxisError({ code: "INVALID_PARAMS", message: '平台不支持灰度 (gradual rollout is not supported). Roll back with praxis.application.workers.deployments.create({ path: { worker_id }, body: { strategy: "percentage", versions: [{ version_id: previousVersionId, percentage: 100 }] } }); the previous version artifacts must still be retained.' });
|
|
22111
|
+
}
|
|
20801
22112
|
const timeout = input.timeout_ms ?? 120000;
|
|
20802
22113
|
if (!Number.isFinite(timeout) || timeout < 0)
|
|
20803
22114
|
throw new RangeError("timeout_ms must be non-negative and finite");
|
|
@@ -20816,7 +22127,7 @@ async function publish(client2, input) {
|
|
|
20816
22127
|
const files = Object.entries(input.files);
|
|
20817
22128
|
if (files.length > 1e5)
|
|
20818
22129
|
throw new PraxisError({ code: "LIMIT_EXCEEDED", message: "At most 100000 asset paths can be published" });
|
|
20819
|
-
|
|
22130
|
+
let manifest = {};
|
|
20820
22131
|
const contents = new Map;
|
|
20821
22132
|
for (const [path2, content] of files) {
|
|
20822
22133
|
const normalized = path2.startsWith("/") ? path2 : `/${path2}`;
|
|
@@ -20825,8 +22136,8 @@ async function publish(client2, input) {
|
|
|
20825
22136
|
const bytes = typeof content === "string" ? new TextEncoder().encode(content) : new Uint8Array(content);
|
|
20826
22137
|
if (bytes.length > FILE_BYTES)
|
|
20827
22138
|
throw new PraxisError({ code: "LIMIT_EXCEEDED", message: `Asset ${normalized} exceeds 25 MiB` });
|
|
20828
|
-
const
|
|
20829
|
-
const hash = Array.from(
|
|
22139
|
+
const digest2 = new Uint8Array(await crypto.subtle.digest("SHA-256", bytes));
|
|
22140
|
+
const hash = Array.from(digest2.subarray(0, 16), (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
20830
22141
|
manifest[normalized] = { hash, size: bytes.length };
|
|
20831
22142
|
contents.set(hash, bytes);
|
|
20832
22143
|
}
|
|
@@ -20839,9 +22150,60 @@ async function publish(client2, input) {
|
|
|
20839
22150
|
}
|
|
20840
22151
|
}
|
|
20841
22152
|
const created = !worker;
|
|
22153
|
+
if (!worker && input.dryRun)
|
|
22154
|
+
throw new PraxisError({ code: "NOT_FOUND", message: "请先创建应用 (create the application before dryRun)" });
|
|
20842
22155
|
worker ??= await workers.create({ body: { name: input.name, subdomain: { enabled: true } } });
|
|
20843
22156
|
const path = { worker_id: worker.id };
|
|
22157
|
+
let currentVersion;
|
|
22158
|
+
let currentDeployment;
|
|
22159
|
+
let previous = {};
|
|
22160
|
+
if (worker.praxis?.current_deployment_id) {
|
|
22161
|
+
currentDeployment = await workers.deployments.retrieve({ path: { ...path, deployment_id: worker.praxis.current_deployment_id } });
|
|
22162
|
+
const active = currentDeployment.versions[0];
|
|
22163
|
+
if (!active)
|
|
22164
|
+
throw new PraxisError({ code: "INVALID_RESPONSE", message: "Current deployment has no version" });
|
|
22165
|
+
currentVersion = await workers.versions.retrieve({ path: { ...path, version_id: active.version_id } });
|
|
22166
|
+
previous = (await workers.versions.assets.retrieveManifest({ path: { ...path, version_id: active.version_id } })).manifest;
|
|
22167
|
+
}
|
|
22168
|
+
manifest = {
|
|
22169
|
+
...Object.fromEntries(Object.entries(previous).filter(([key]) => input.keepExisting || Object.hasOwn(manifest, key))),
|
|
22170
|
+
...manifest
|
|
22171
|
+
};
|
|
22172
|
+
if (Object.keys(manifest).length > 1e5)
|
|
22173
|
+
throw new PraxisError({ code: "LIMIT_EXCEEDED", message: "At most 100000 asset paths can be published" });
|
|
22174
|
+
const added = Object.keys(manifest).filter((key) => !Object.hasOwn(previous, key));
|
|
22175
|
+
const changed = Object.keys(manifest).filter((key) => previous[key] && (previous[key].hash !== manifest[key].hash || previous[key].size !== manifest[key].size));
|
|
22176
|
+
const removed = Object.keys(previous).filter((key) => !Object.hasOwn(manifest, key));
|
|
22177
|
+
const digest = new Uint8Array(await crypto.subtle.digest("SHA-256", new TextEncoder().encode(JSON.stringify(manifest))));
|
|
22178
|
+
const manifestHash = Array.from(digest, (byte) => byte.toString(16).padStart(2, "0")).join("");
|
|
22179
|
+
const staticOnly = !["main", "bindings", "compatibility_date", "compatibility_flags", "assets_config"].some((key) => Object.hasOwn(input, key));
|
|
22180
|
+
const unchanged = staticOnly && !!currentVersion && manifestHash === currentVersion.praxis.assets_manifest?.manifest_hash;
|
|
22181
|
+
const hashes = new Set(Object.values(manifest).map((entry) => entry.hash));
|
|
22182
|
+
const currentResult = {
|
|
22183
|
+
url: worker.subdomain.url,
|
|
22184
|
+
worker_id: worker.id,
|
|
22185
|
+
version_id: currentVersion?.id ?? null,
|
|
22186
|
+
deployment_id: currentDeployment?.id ?? null,
|
|
22187
|
+
status: currentDeployment?.praxis.status ?? "draft",
|
|
22188
|
+
created,
|
|
22189
|
+
...currentVersion ? { version: currentVersion } : {},
|
|
22190
|
+
unchanged,
|
|
22191
|
+
uploaded: 0,
|
|
22192
|
+
reused: hashes.size
|
|
22193
|
+
};
|
|
22194
|
+
if (unchanged && !input.dryRun)
|
|
22195
|
+
return currentResult;
|
|
20844
22196
|
const session = await workers.assetsUploadSession.create({ path, body: { manifest } });
|
|
22197
|
+
if (input.dryRun) {
|
|
22198
|
+
const missing = new Set(session.buckets.flat());
|
|
22199
|
+
if ([...missing].some((hash) => !hashes.has(hash)))
|
|
22200
|
+
throw new PraxisError({ code: "INVALID_RESPONSE", message: "Upload session requested an unknown hash" });
|
|
22201
|
+
return {
|
|
22202
|
+
...currentResult,
|
|
22203
|
+
reused: hashes.size - missing.size,
|
|
22204
|
+
plan: { added, changed, removed, upload_hashes: missing.size, existing_hashes: hashes.size - missing.size }
|
|
22205
|
+
};
|
|
22206
|
+
}
|
|
20845
22207
|
let jwt = session.buckets.length ? null : session.jwt;
|
|
20846
22208
|
const uploaded = new Set;
|
|
20847
22209
|
for (const bucket of session.buckets) {
|
|
@@ -20912,16 +22274,31 @@ async function publish(client2, input) {
|
|
|
20912
22274
|
status: deployment.praxis.status,
|
|
20913
22275
|
created,
|
|
20914
22276
|
uploaded: uploaded.size,
|
|
20915
|
-
reused:
|
|
22277
|
+
reused: hashes.size - uploaded.size
|
|
20916
22278
|
};
|
|
20917
22279
|
}
|
|
20918
22280
|
|
|
22281
|
+
// ../../packages/sdk/typescript/src/helpers/database-count.ts
|
|
22282
|
+
async function count(transport, input) {
|
|
22283
|
+
const { response } = await transport.requestWithResponse(databaseHead, {
|
|
22284
|
+
path: { database_id: input.database_id, table: input.table },
|
|
22285
|
+
query: input.filters,
|
|
22286
|
+
headers: { Prefer: `count=${input.count ?? "exact"}` }
|
|
22287
|
+
});
|
|
22288
|
+
const total = response.headers.get("Content-Range")?.split("/")[1];
|
|
22289
|
+
return { count: total === undefined || total === "*" ? null : Number(total) };
|
|
22290
|
+
}
|
|
22291
|
+
|
|
20919
22292
|
// ../../packages/sdk/typescript/src/core/client.ts
|
|
20920
22293
|
class Praxis {
|
|
20921
22294
|
constructor(options) {
|
|
20922
22295
|
const transport = new Transport(options);
|
|
20923
22296
|
for (const [name, create] of Object.entries(resourceFactories)) {
|
|
20924
22297
|
const resource = create(transport);
|
|
22298
|
+
if (name === "file")
|
|
22299
|
+
Object.assign(resource, { uploadFile: (file, options2) => uploadFile(this, file, options2) });
|
|
22300
|
+
if (name === "database")
|
|
22301
|
+
Object.assign(resource, { count: (input) => count(transport, input) });
|
|
20925
22302
|
if (name === "application")
|
|
20926
22303
|
Object.assign(resource, { publish: (input) => publish(this, input) });
|
|
20927
22304
|
Object.defineProperty(this, name, { value: resource, enumerable: true });
|
|
@@ -22053,7 +23430,7 @@ function plain(value) {
|
|
|
22053
23430
|
}
|
|
22054
23431
|
|
|
22055
23432
|
// src/output/human.ts
|
|
22056
|
-
var
|
|
23433
|
+
var count3 = (n, noun) => `${n} ${noun}${n === 1 ? "" : "s"}`;
|
|
22057
23434
|
function identity(result, ctx) {
|
|
22058
23435
|
const op = "op" in result ? result.op : undefined;
|
|
22059
23436
|
const split = op?.lastIndexOf(".") ?? -1;
|
|
@@ -22141,7 +23518,7 @@ function objectView(data, resource, id, ctx, paint) {
|
|
|
22141
23518
|
return v.map(scalar).map(plain).join(", ");
|
|
22142
23519
|
folded = true;
|
|
22143
23520
|
const preview = v.slice(0, 3).map((item) => record(item).id ?? record(item).name).filter((x) => x !== undefined).map((x) => plain(scalar(x)));
|
|
22144
|
-
return `${
|
|
23521
|
+
return `${count3(v.length, "item")}${preview.length ? ` (${preview.join(", ")})` : ""}`;
|
|
22145
23522
|
}
|
|
22146
23523
|
if (v !== null && typeof v === "object") {
|
|
22147
23524
|
if (depth >= 1) {
|
|
@@ -22182,7 +23559,7 @@ function renderHuman(result, ctx) {
|
|
|
22182
23559
|
return {
|
|
22183
23560
|
stdout: result.items.length ? table(result.items, ctx, out) : out.dim(`No ${plain(resource)}${/(s|x|ch|sh)$/.test(resource) ? "es" : "s"}.`) + `
|
|
22184
23561
|
`,
|
|
22185
|
-
stderr: err.dim(`${result.total !== undefined ? `${result.items.length} of ${result.total} items` :
|
|
23562
|
+
stderr: err.dim(`${result.total !== undefined ? `${result.items.length} of ${result.total} items` : count3(result.items.length, "item")}${result.nextCursor ? ` · next: ${ctx.nextCommand ?? "praxis --help"}` : ""}`) + `
|
|
22186
23563
|
`
|
|
22187
23564
|
};
|
|
22188
23565
|
case "object": {
|
|
@@ -22462,7 +23839,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
22462
23839
|
}
|
|
22463
23840
|
|
|
22464
23841
|
// src/main.ts
|
|
22465
|
-
var version = "0.1.0-dev.
|
|
23842
|
+
var version = "0.1.0-dev.c01abef";
|
|
22466
23843
|
var commands = commandTree(operations);
|
|
22467
23844
|
var manual = [["login"], ["logout"], ["whoami"], ["org", "list"], ["org", "switch"], ["api"], ["skill"]];
|
|
22468
23845
|
function route(argv) {
|