@deepraxis/cli 0.1.0-dev.244cd7e → 0.1.0-dev.e57ae6a
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/README.md +1 -29
- package/dist/praxis.js +36 -1035
- package/package.json +1 -1
package/dist/praxis.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
// src/main.ts
|
|
4
|
-
import { readFile
|
|
5
|
-
import { spawn
|
|
4
|
+
import { readFile } from "node:fs/promises";
|
|
5
|
+
import { spawn } from "node:child_process";
|
|
6
6
|
import { createInterface } from "node:readline";
|
|
7
7
|
|
|
8
8
|
// ../../packages/sdk/typescript/src/operations.generated.ts
|
|
@@ -10,8 +10,6 @@ var operations = [
|
|
|
10
10
|
{
|
|
11
11
|
resource: "agent.agents",
|
|
12
12
|
method: "list",
|
|
13
|
-
summary: "",
|
|
14
|
-
description: "List the agents of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Use it to find an agent id before creating a session; to read one agent use agents.retrieve, to see its history use agents.versions.list. Archived agents are hidden unless include_archived is true. Filter kind=personal for durable-computer agents or kind=service for per-session environments. Pass next_page from the response as page to read the next page; a null next_page means the end.",
|
|
15
13
|
http: "GET",
|
|
16
14
|
path: "/agent/v1/agents",
|
|
17
15
|
streaming: "no",
|
|
@@ -67,8 +65,6 @@ var operations = [
|
|
|
67
65
|
{
|
|
68
66
|
resource: "agent.agents",
|
|
69
67
|
method: "create",
|
|
70
|
-
summary: "",
|
|
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 and custom tool entries 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
68
|
http: "POST",
|
|
73
69
|
path: "/agent/v1/agents",
|
|
74
70
|
streaming: "no",
|
|
@@ -190,8 +186,6 @@ across all toolsets allowed.`
|
|
|
190
186
|
{
|
|
191
187
|
resource: "agent.agents",
|
|
192
188
|
method: "retrieve",
|
|
193
|
-
summary: "",
|
|
194
|
-
description: "Read one agent by id, at its latest version or, with version, at a specific earlier version. The response lists every native tool with its resolved configuration in one agent_toolset_20260401 entry, so it can be sent back unchanged to agents.update. Use agents.versions.list to enumerate versions.",
|
|
195
189
|
http: "GET",
|
|
196
190
|
path: "/agent/v1/agents/{agent_id}",
|
|
197
191
|
streaming: "no",
|
|
@@ -214,8 +208,6 @@ across all toolsets allowed.`
|
|
|
214
208
|
{
|
|
215
209
|
resource: "agent.agents",
|
|
216
210
|
method: "update",
|
|
217
|
-
summary: "",
|
|
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 and custom tools return 400; use the native skill tool for available runtime skills.",
|
|
219
211
|
http: "POST",
|
|
220
212
|
path: "/agent/v1/agents/{agent_id}",
|
|
221
213
|
streaming: "no",
|
|
@@ -355,8 +347,6 @@ current version; omit to apply the update unconditionally.`
|
|
|
355
347
|
{
|
|
356
348
|
resource: "agent.agents",
|
|
357
349
|
method: "archive",
|
|
358
|
-
summary: "",
|
|
359
|
-
description: "Archive an agent so it can no longer be updated and no new session can be created from it (AGENT_ARCHIVED). The agent and all of its versions stay readable. Use it to retire an agent you no longer want to run; it does not delete anything.",
|
|
360
350
|
http: "POST",
|
|
361
351
|
path: "/agent/v1/agents/{agent_id}/archive",
|
|
362
352
|
streaming: "no",
|
|
@@ -372,8 +362,6 @@ current version; omit to apply the update unconditionally.`
|
|
|
372
362
|
{
|
|
373
363
|
resource: "agent.agents.versions",
|
|
374
364
|
method: "list",
|
|
375
|
-
summary: "",
|
|
376
|
-
description: "List the saved versions of one agent, in pages of at most 100 (default 20). Each item is the full agent definition at that version, so you can compare what changed between versions. Use agents.retrieve with version to read a single one; agent_id comes from agents.list or agents.create.",
|
|
377
365
|
http: "GET",
|
|
378
366
|
path: "/agent/v1/agents/{agent_id}/versions",
|
|
379
367
|
streaming: "no",
|
|
@@ -402,10 +390,6 @@ current version; omit to apply the update unconditionally.`
|
|
|
402
390
|
{
|
|
403
391
|
resource: "agent.computers",
|
|
404
392
|
method: "list",
|
|
405
|
-
summary: "ComputersList",
|
|
406
|
-
description: `Tenant-owned durable computer resource.
|
|
407
|
-
|
|
408
|
-
Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.`,
|
|
409
393
|
http: "GET",
|
|
410
394
|
path: "/agent/v1/computers",
|
|
411
395
|
streaming: "no",
|
|
@@ -429,10 +413,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
429
413
|
{
|
|
430
414
|
resource: "agent.computers",
|
|
431
415
|
method: "create",
|
|
432
|
-
summary: "ComputersCreate",
|
|
433
|
-
description: `Tenant-owned durable computer resource.
|
|
434
|
-
|
|
435
|
-
Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.`,
|
|
436
416
|
http: "POST",
|
|
437
417
|
path: "/agent/v1/computers",
|
|
438
418
|
streaming: "no",
|
|
@@ -460,10 +440,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
460
440
|
{
|
|
461
441
|
resource: "agent.computers",
|
|
462
442
|
method: "delete",
|
|
463
|
-
summary: "Delete Archived Computer",
|
|
464
|
-
description: `Permanently delete an archived explicit computer and its files and code runs.
|
|
465
|
-
|
|
466
|
-
Own-face superset: Managed Agents has no persistent Computer deletion lifecycle. Only archived computers can be deleted. Active computers return 400 COMPUTER_ACTIVE (archive first). Destroy storage before removing registration. Success returns id and type=computer_deleted; missing or foreign computers return 404.`,
|
|
467
443
|
http: "DELETE",
|
|
468
444
|
path: "/agent/v1/computers/{computer_id}",
|
|
469
445
|
streaming: "no",
|
|
@@ -479,10 +455,6 @@ Own-face superset: Managed Agents has no persistent Computer deletion lifecycle.
|
|
|
479
455
|
{
|
|
480
456
|
resource: "agent.computers",
|
|
481
457
|
method: "retrieve",
|
|
482
|
-
summary: "ComputersRetrieve",
|
|
483
|
-
description: `Tenant-owned durable computer resource.
|
|
484
|
-
|
|
485
|
-
Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.`,
|
|
486
458
|
http: "GET",
|
|
487
459
|
path: "/agent/v1/computers/{computer_id}",
|
|
488
460
|
streaming: "no",
|
|
@@ -498,10 +470,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
498
470
|
{
|
|
499
471
|
resource: "agent.computers",
|
|
500
472
|
method: "update",
|
|
501
|
-
summary: "ComputersUpdate",
|
|
502
|
-
description: `Tenant-owned durable computer resource.
|
|
503
|
-
|
|
504
|
-
Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.`,
|
|
505
473
|
http: "POST",
|
|
506
474
|
path: "/agent/v1/computers/{computer_id}",
|
|
507
475
|
streaming: "no",
|
|
@@ -528,10 +496,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
528
496
|
{
|
|
529
497
|
resource: "agent.computers",
|
|
530
498
|
method: "archive",
|
|
531
|
-
summary: "ComputersArchive",
|
|
532
|
-
description: `Tenant-owned durable computer resource.
|
|
533
|
-
|
|
534
|
-
Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.`,
|
|
535
499
|
http: "POST",
|
|
536
500
|
path: "/agent/v1/computers/{computer_id}/archive",
|
|
537
501
|
streaming: "no",
|
|
@@ -547,10 +511,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
547
511
|
{
|
|
548
512
|
resource: "agent.computers.attachments",
|
|
549
513
|
method: "create",
|
|
550
|
-
summary: "Upload Computer Attachment",
|
|
551
|
-
description: `Upload raw bytes into /attachments and return the same FileInfo as the file list.
|
|
552
|
-
|
|
553
|
-
Own-face superset: Managed Agents has no persistent Computer attachment directory. User uploads overwrite the same name; agents retain read-only access. Run-token uploads return 403 READ_ONLY. name is one filename of at most 255 UTF-8 bytes; MIME is inferred from the extension; custom Content-Type is not persisted and digest may be absent. Limit 16 MiB (413); invalid names return 400. Archived computers accept uploads; foreign computers return 404.`,
|
|
554
514
|
http: "POST",
|
|
555
515
|
path: "/agent/v1/computers/{computer_id}/attachments",
|
|
556
516
|
streaming: "no",
|
|
@@ -577,10 +537,6 @@ Own-face superset: Managed Agents has no persistent Computer attachment director
|
|
|
577
537
|
{
|
|
578
538
|
resource: "agent.computers",
|
|
579
539
|
method: "connect",
|
|
580
|
-
summary: "Connect computer",
|
|
581
|
-
description: `Resume the computer and issue a sandbox connection.
|
|
582
|
-
|
|
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.`,
|
|
584
540
|
http: "POST",
|
|
585
541
|
path: "/agent/v1/computers/{computer_id}/connect",
|
|
586
542
|
streaming: "no",
|
|
@@ -596,10 +552,6 @@ Own-face extension: Managed Agents has no persistent Computer connection. Return
|
|
|
596
552
|
{
|
|
597
553
|
resource: "agent.computers.files",
|
|
598
554
|
method: "list",
|
|
599
|
-
summary: "ComputersFilesList",
|
|
600
|
-
description: `Tenant-owned durable computer resource.
|
|
601
|
-
|
|
602
|
-
Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.`,
|
|
603
555
|
http: "GET",
|
|
604
556
|
path: "/agent/v1/computers/{computer_id}/files",
|
|
605
557
|
streaming: "no",
|
|
@@ -622,10 +574,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
622
574
|
{
|
|
623
575
|
resource: "agent.computers.files",
|
|
624
576
|
method: "retrieveContent",
|
|
625
|
-
summary: "ComputersFilesContent",
|
|
626
|
-
description: `Tenant-owned durable computer resource.
|
|
627
|
-
|
|
628
|
-
Praxis extension: MA only has session-scoped temporary containers and memory_stores, not durable browsable computers. Archived files remain readable, but new sessions cannot bind them. environment_id is an optional recipe reference; computers start with a light sandbox and expose the public SDK sandbox_id. Lists include archived computers.`,
|
|
629
577
|
http: "GET",
|
|
630
578
|
path: "/agent/v1/computers/{computer_id}/files/content",
|
|
631
579
|
streaming: "no",
|
|
@@ -648,8 +596,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
648
596
|
{
|
|
649
597
|
resource: "agent.deploymentRuns",
|
|
650
598
|
method: "list",
|
|
651
|
-
summary: "",
|
|
652
|
-
description: "List deployment runs newest first. Filter by deployment_id, has_error, trigger_type (manual or schedule) and created_at[gt|gte|lt|lte]. The default limit is 20, maximum 100; pass next_page as page with the same filters to continue. Each record identifies the resolved agent version and either its session or creation error.",
|
|
653
599
|
http: "GET",
|
|
654
600
|
path: "/agent/v1/deployment_runs",
|
|
655
601
|
streaming: "no",
|
|
@@ -723,8 +669,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
723
669
|
{
|
|
724
670
|
resource: "agent.deploymentRuns",
|
|
725
671
|
method: "retrieve",
|
|
726
|
-
summary: "",
|
|
727
|
-
description: "Read a deployment run by the drun_ id returned by deployments.run or deployment_runs.list. Exactly one of session_id and error is non-null. Scheduled runs include scheduled_at in trigger_context. Foreign or absent ids return 404.",
|
|
728
672
|
http: "GET",
|
|
729
673
|
path: "/agent/v1/deployment_runs/{deployment_run_id}",
|
|
730
674
|
streaming: "no",
|
|
@@ -740,8 +684,6 @@ Praxis extension: MA only has session-scoped temporary containers and memory_sto
|
|
|
740
684
|
{
|
|
741
685
|
resource: "agent.deployments",
|
|
742
686
|
method: "list",
|
|
743
|
-
summary: "",
|
|
744
|
-
description: "List stored deployments newest first. Filter by agent_id, status, or inclusive created_at bounds; status and include_archived cannot be combined, even when include_archived is false. The default limit is 20, maximum 100; pass next_page as page to continue. Archived deployments are hidden by default. Schedules show up to five future wall-clock occurrences, also while paused; archived schedules show none.",
|
|
745
687
|
http: "GET",
|
|
746
688
|
path: "/agent/v1/deployments",
|
|
747
689
|
streaming: "no",
|
|
@@ -804,8 +746,6 @@ archived).`
|
|
|
804
746
|
{
|
|
805
747
|
resource: "agent.deployments",
|
|
806
748
|
method: "create",
|
|
807
|
-
summary: "",
|
|
808
|
-
description: "Freeze session parameters as a deployment; this operation does not open a session. Pass an agent id or versioned reference, a name, 1–50 user.message initial events and an environment_id from environments.list. Unlike Anthropic Managed Agents, /agent/v1 also accepts agent_with_overrides (model, permission_mode and cwd) and target=computer for personal agents, with environment_id omitted. Cron schedules use five POSIX fields and an IANA timezone. File resources and empty vault_ids are accepted. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.",
|
|
809
749
|
http: "POST",
|
|
810
750
|
path: "/agent/v1/deployments",
|
|
811
751
|
streaming: "no",
|
|
@@ -894,8 +834,6 @@ created from this deployment. Maximum 50.`
|
|
|
894
834
|
{
|
|
895
835
|
resource: "agent.deployments",
|
|
896
836
|
method: "retrieve",
|
|
897
|
-
summary: "",
|
|
898
|
-
description: "Read a stored deployment by its depl_ id from deployments.create or deployments.list. The agent reference has a concrete version; own-face overrides are echoed unchanged. This read recomputes upcoming schedule times and does not execute the deployment. Foreign or absent ids return 404.",
|
|
899
837
|
http: "GET",
|
|
900
838
|
path: "/agent/v1/deployments/{deployment_id}",
|
|
901
839
|
streaming: "no",
|
|
@@ -911,8 +849,6 @@ created from this deployment. Maximum 50.`
|
|
|
911
849
|
{
|
|
912
850
|
resource: "agent.deployments",
|
|
913
851
|
method: "update",
|
|
914
|
-
summary: "",
|
|
915
|
-
description: "Partially update a deployment. Omitted fields keep their values; a supplied agent id re-pins the latest version, or supply a versioned reference. Metadata merges string values and deletes keys set to null. Null clears schedule, resources and description; name, environment_id and initial_events cannot be cleared. Archived deployments return 409. Overrides apply to new sessions; updating a schedule recalculates its next occurrence.",
|
|
916
852
|
http: "POST",
|
|
917
853
|
path: "/agent/v1/deployments/{deployment_id}",
|
|
918
854
|
streaming: "no",
|
|
@@ -1009,8 +945,6 @@ null to clear. Maximum 50.`
|
|
|
1009
945
|
{
|
|
1010
946
|
resource: "agent.deployments",
|
|
1011
947
|
method: "archive",
|
|
1012
|
-
summary: "",
|
|
1013
|
-
description: "Archive a deployment by its depl_ id. Repeated calls are idempotent; archived deployments remain readable and have no upcoming schedule times. Subsequent update, pause and unpause calls return 409. This operation does not create a deployment run.",
|
|
1014
948
|
http: "POST",
|
|
1015
949
|
path: "/agent/v1/deployments/{deployment_id}/archive",
|
|
1016
950
|
streaming: "no",
|
|
@@ -1026,8 +960,6 @@ null to clear. Maximum 50.`
|
|
|
1026
960
|
{
|
|
1027
961
|
resource: "agent.deployments",
|
|
1028
962
|
method: "pause",
|
|
1029
|
-
summary: "",
|
|
1030
|
-
description: "Pause an active deployment and set paused_reason to {type: manual}. Repeated pause calls are idempotent; archived deployments return 409. Upcoming schedule times remain visible while paused; no run is executed.",
|
|
1031
963
|
http: "POST",
|
|
1032
964
|
path: "/agent/v1/deployments/{deployment_id}/pause",
|
|
1033
965
|
streaming: "no",
|
|
@@ -1043,8 +975,6 @@ null to clear. Maximum 50.`
|
|
|
1043
975
|
{
|
|
1044
976
|
resource: "agent.deployments.run",
|
|
1045
977
|
method: "create",
|
|
1046
|
-
summary: "",
|
|
1047
|
-
description: "Create one session from an active deployment using its pinned agent version and stored parameters. Pass the depl_ id from deployments.create or deployments.list; no request body is needed. Returns a drun_ record with exactly one of session_id or error populated. Creation errors automatically pause the deployment; paused or archived deployments return 409 without a run. Unlike the own face, the compatible face rejects computer targets with 400.",
|
|
1048
978
|
http: "POST",
|
|
1049
979
|
path: "/agent/v1/deployments/{deployment_id}/run",
|
|
1050
980
|
streaming: "no",
|
|
@@ -1060,8 +990,6 @@ null to clear. Maximum 50.`
|
|
|
1060
990
|
{
|
|
1061
991
|
resource: "agent.deployments.unpause",
|
|
1062
992
|
method: "create",
|
|
1063
|
-
summary: "",
|
|
1064
|
-
description: "Resume a paused deployment and clear paused_reason. Repeated unpause calls on an active deployment are idempotent; archived deployments return 409. This operation changes resource state only and does not execute a run.",
|
|
1065
993
|
http: "POST",
|
|
1066
994
|
path: "/agent/v1/deployments/{deployment_id}/unpause",
|
|
1067
995
|
streaming: "no",
|
|
@@ -1077,10 +1005,6 @@ null to clear. Maximum 50.`
|
|
|
1077
1005
|
{
|
|
1078
1006
|
resource: "agent.embedTokens",
|
|
1079
1007
|
method: "create",
|
|
1080
|
-
summary: "Create Embed Token",
|
|
1081
|
-
description: `Issue a short-lived credential on your backend for an end user of a service agent.
|
|
1082
|
-
|
|
1083
|
-
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. The hosted field is not supported.`,
|
|
1084
1008
|
http: "POST",
|
|
1085
1009
|
path: "/agent/v1/embed_tokens",
|
|
1086
1010
|
streaming: "no",
|
|
@@ -1152,8 +1076,6 @@ Requires an active service agent in your organization with an embed policy. Pins
|
|
|
1152
1076
|
{
|
|
1153
1077
|
resource: "agent.environments",
|
|
1154
1078
|
method: "list",
|
|
1155
|
-
summary: "",
|
|
1156
|
-
description: "List execution environments: the built-in recipes and the tenant-owned cloud environments that a session can run in. Archived environments are hidden unless include_archived is true. Pages hold at most 100 items (default 20); pass next_page as page to continue. Use the returned id as environment_id when creating a session.",
|
|
1157
1079
|
http: "GET",
|
|
1158
1080
|
path: "/agent/v1/environments",
|
|
1159
1081
|
streaming: "no",
|
|
@@ -1187,8 +1109,6 @@ Requires an active service agent in your organization with an embed policy. Pins
|
|
|
1187
1109
|
{
|
|
1188
1110
|
resource: "agent.environments",
|
|
1189
1111
|
method: "create",
|
|
1190
|
-
summary: "",
|
|
1191
|
-
description: "Create a tenant-owned cloud environment: a sandbox recipe (packages to install and networking policy) that sessions can select through environment_id. Package installation happens when the session's sandbox is created; a failed install terminates that session with ENVIRONMENT_PACKAGE_INSTALL_FAILED. Limited networking is applied at sandbox creation. Unlike Anthropic Managed Agents, self_hosted environments, scope and cross-session package caching are not supported.",
|
|
1192
1112
|
http: "POST",
|
|
1193
1113
|
path: "/agent/v1/environments",
|
|
1194
1114
|
streaming: "no",
|
|
@@ -1241,8 +1161,6 @@ rejected. If not specified, defaults based on organization type.`
|
|
|
1241
1161
|
{
|
|
1242
1162
|
resource: "agent.environments",
|
|
1243
1163
|
method: "retrieve",
|
|
1244
|
-
summary: "",
|
|
1245
|
-
description: "Read one environment's configuration and status by id. Built-in environments are readable but never editable; tenant-owned ones can be updated or archived. environment_id comes from environments.list or environments.create.",
|
|
1246
1164
|
http: "GET",
|
|
1247
1165
|
path: "/agent/v1/environments/{environment_id}",
|
|
1248
1166
|
streaming: "no",
|
|
@@ -1258,8 +1176,6 @@ rejected. If not specified, defaults based on organization type.`
|
|
|
1258
1176
|
{
|
|
1259
1177
|
resource: "agent.environments",
|
|
1260
1178
|
method: "update",
|
|
1261
|
-
summary: "",
|
|
1262
|
-
description: "Update the configuration of a tenant-owned cloud environment. Built-in environments are read-only. Package installation and limited networking are applied when a session's sandbox is created. Omitted fields keep their value.",
|
|
1263
1179
|
http: "POST",
|
|
1264
1180
|
path: "/agent/v1/environments/{environment_id}",
|
|
1265
1181
|
streaming: "no",
|
|
@@ -1317,8 +1233,6 @@ owning account only.`
|
|
|
1317
1233
|
{
|
|
1318
1234
|
resource: "agent.environments",
|
|
1319
1235
|
method: "archive",
|
|
1320
|
-
summary: "",
|
|
1321
|
-
description: "Soft-archive a tenant-owned cloud environment so it can no longer be used to create new sessions. Built-in environments are read-only and cannot be archived.",
|
|
1322
1236
|
http: "POST",
|
|
1323
1237
|
path: "/agent/v1/environments/{environment_id}/archive",
|
|
1324
1238
|
streaming: "no",
|
|
@@ -1334,8 +1248,6 @@ owning account only.`
|
|
|
1334
1248
|
{
|
|
1335
1249
|
resource: "agent.sessions",
|
|
1336
1250
|
method: "list",
|
|
1337
|
-
summary: "",
|
|
1338
|
-
description: "List sessions of the workspace behind your API key, newest first, in pages of at most 100 (default 20). Unlike Anthropic Managed Agents, only limit, page, agent_id and deployment_id are honored; the other filters declared here (agent_version, created_at ranges, memory_store_id, include_archived, order, statuses) are not supported and return 400. Use the returned id with sessions.retrieve or sessions.events.list; pass next_page as page for the next page.",
|
|
1339
1251
|
http: "GET",
|
|
1340
1252
|
path: "/agent/v1/sessions",
|
|
1341
1253
|
streaming: "no",
|
|
@@ -1440,8 +1352,6 @@ owning account only.`
|
|
|
1440
1352
|
{
|
|
1441
1353
|
resource: "agent.sessions",
|
|
1442
1354
|
method: "create",
|
|
1443
|
-
summary: "",
|
|
1444
|
-
description: `Create a session: one conversation with an agent, running on a machine. 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 environment_id for a sandbox recipe. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|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 and nonempty vault_ids are not supported. 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.`,
|
|
1445
1355
|
http: "POST",
|
|
1446
1356
|
path: "/agent/v1/sessions",
|
|
1447
1357
|
streaming: "no",
|
|
@@ -1544,8 +1454,6 @@ offsets ("+08:00") and unknown names return 400. Never stored in
|
|
|
1544
1454
|
{
|
|
1545
1455
|
resource: "agent.sessions",
|
|
1546
1456
|
method: "retrieve",
|
|
1547
|
-
summary: "",
|
|
1548
|
-
description: "Read one session by id: its agent snapshot, status, model and thinking selection, resources, title, metadata and, for a fork, forked_from. Use it to poll status; to read what happened use sessions.events.list. This response does not include a machine object or sandbox id. With no environment_id or Computer selected at creation, the session starts on a light machine; no environment lookup or provisioning is needed for a codemode calculation.",
|
|
1549
1457
|
http: "GET",
|
|
1550
1458
|
path: "/agent/v1/sessions/{session_id}",
|
|
1551
1459
|
streaming: "no",
|
|
@@ -1561,8 +1469,6 @@ offsets ("+08:00") and unknown names return 400. Never stored in
|
|
|
1561
1469
|
{
|
|
1562
1470
|
resource: "agent.sessions",
|
|
1563
1471
|
method: "update",
|
|
1564
|
-
summary: "",
|
|
1565
|
-
description: "Update a session's title, metadata, model or thinking selection. metadata follows patch semantics: a string value sets the key, null deletes it, a null metadata clears all keys, untouched keys stay. model must be allowed by the session's agent version; thinking is {effort} or null (null restores inheritance); a model-only change clears a session thinking that the new model does not support, and combined changes are validated against the new model, with the previous selection kept on a 400. Changes apply from the next turn, not to a turn already running. Agent overrides and nonempty vault_ids are not supported (400 naming the field). A budget limit must exceed consumed cost; null removes it permanently for this session. Updating an archived session returns 409.",
|
|
1566
1472
|
http: "POST",
|
|
1567
1473
|
path: "/agent/v1/sessions/{session_id}",
|
|
1568
1474
|
streaming: "no",
|
|
@@ -1627,8 +1533,6 @@ delete it. Omit the field to preserve.`
|
|
|
1627
1533
|
{
|
|
1628
1534
|
resource: "agent.sessions",
|
|
1629
1535
|
method: "archive",
|
|
1630
|
-
summary: "",
|
|
1631
|
-
description: "Archive a session. An archived session refuses new messages with 400 invalid_request_error, while its details and event history stay readable. Archiving again is idempotent and archived_at keeps the first archive time. Use it when a conversation is finished; it does not delete anything.",
|
|
1632
1536
|
http: "POST",
|
|
1633
1537
|
path: "/agent/v1/sessions/{session_id}/archive",
|
|
1634
1538
|
streaming: "no",
|
|
@@ -1644,10 +1548,6 @@ delete it. Omit the field to preserve.`
|
|
|
1644
1548
|
{
|
|
1645
1549
|
resource: "agent.sessions.backgroundTasks",
|
|
1646
1550
|
method: "list",
|
|
1647
|
-
summary: "List Session Background Tasks (Extension)",
|
|
1648
|
-
description: `List running and ended background tasks for a session.
|
|
1649
|
-
|
|
1650
|
-
Own-face extension. Returns { data: BackgroundTask[] }. Each task has id, kind, title, thread_id, status, started_at, ended_at, cancellable, notified_at and trigger_count. Subagent rows link to their child thread via thread_id; other kinds have null. kind is an open string; tolerate unknown kinds. Status is running, result_pending, completed, failed, cancelled or lost. Only completed tasks with pending delivery are result_pending. Timestamps are RFC3339; ended_at is null while running. notified_at is the admission time of the latest system notification batch, or null. trigger_count counts admitted monitor event batches, or is null without records and for other kinds. Only supported running tasks without stop intent are cancellable. Missing or inaccessible sessions return 404.`,
|
|
1651
1551
|
http: "GET",
|
|
1652
1552
|
path: "/agent/v1/sessions/{session_id}/background_tasks",
|
|
1653
1553
|
streaming: "no",
|
|
@@ -1663,10 +1563,6 @@ Own-face extension. Returns { data: BackgroundTask[] }. Each task has id, kind,
|
|
|
1663
1563
|
{
|
|
1664
1564
|
resource: "agent.sessions.backgroundTasks",
|
|
1665
1565
|
method: "retrieveOutput",
|
|
1666
|
-
summary: "Get Background Task Output (Extension)",
|
|
1667
|
-
description: `Read a byte page of task output without waking the sandbox.
|
|
1668
|
-
|
|
1669
|
-
Own-face extension. offset defaults to 0; max_bytes defaults to 65536 and must be between 1 and 262144. Returns text, next_offset and eof. Offsets count UTF-8 bytes, not characters; partial trailing characters are retained for the next read. eof describes the current log, which may grow while running. A paused or missing sandbox returns empty text, the original offset, eof=true and unavailable=true, without waking it. Reading does not acknowledge model result delivery. Missing or inaccessible sessions or tasks return 404; invalid ranges return 400.`,
|
|
1670
1566
|
http: "GET",
|
|
1671
1567
|
path: "/agent/v1/sessions/{session_id}/background_tasks/{task_id}/output",
|
|
1672
1568
|
streaming: "no",
|
|
@@ -1699,10 +1595,6 @@ Own-face extension. offset defaults to 0; max_bytes defaults to 65536 and must b
|
|
|
1699
1595
|
{
|
|
1700
1596
|
resource: "agent.sessions.backgroundTasks",
|
|
1701
1597
|
method: "stop",
|
|
1702
|
-
summary: "Stop Background Task (Extension)",
|
|
1703
|
-
description: `Request termination of a running task and return its current state.
|
|
1704
|
-
|
|
1705
|
-
Own-face extension. No request body is required. Uses the same stop implementation as TaskStop: records stop_requested_at and signals the process group. Returns BackgroundTask with the same fields as the list operation. Until termination is observed, status may remain running with cancellable=false. An ended or unsupported task returns 409. Missing or inaccessible sessions or tasks return 404.`,
|
|
1706
1598
|
http: "POST",
|
|
1707
1599
|
path: "/agent/v1/sessions/{session_id}/background_tasks/{task_id}/stop",
|
|
1708
1600
|
streaming: "no",
|
|
@@ -1722,10 +1614,6 @@ Own-face extension. No request body is required. Uses the same stop implementati
|
|
|
1722
1614
|
{
|
|
1723
1615
|
resource: "agent.sessions",
|
|
1724
1616
|
method: "compact",
|
|
1725
|
-
summary: "Compact Session (Extension)",
|
|
1726
|
-
description: `Request session context compaction and retrieve an operation receipt.
|
|
1727
|
-
|
|
1728
|
-
Available only on /agent/v1. The body may be omitted or {}. Optional instructions must be a string and is forwarded unchanged. Idempotency-Key is forwarded unchanged; a UUID is generated when absent. Returns { type: session_compaction, id, status, reason? }, where id is the operation ID. queued/running return 202; skipped/succeeded/failed return 200. Non-string instructions return 400 invalid_request_error. Missing or inaccessible managed sessions return 404 not_found_error.`,
|
|
1729
1617
|
http: "POST",
|
|
1730
1618
|
path: "/agent/v1/sessions/{session_id}/compact",
|
|
1731
1619
|
streaming: "no",
|
|
@@ -1752,10 +1640,6 @@ Available only on /agent/v1. The body may be omitted or {}. Optional instruction
|
|
|
1752
1640
|
{
|
|
1753
1641
|
resource: "agent.sessions",
|
|
1754
1642
|
method: "retrieveCompact",
|
|
1755
|
-
summary: "Get Session Compaction (Extension)",
|
|
1756
|
-
description: `Read session compaction status by operation ID.
|
|
1757
|
-
|
|
1758
|
-
Available only on /agent/v1. Returns { type: session_compaction, id, status, reason? } with HTTP 200 for every status. A missing operation or inaccessible session returns 404 not_found_error.`,
|
|
1759
1643
|
http: "GET",
|
|
1760
1644
|
path: "/agent/v1/sessions/{session_id}/compact/{operation_id}",
|
|
1761
1645
|
streaming: "no",
|
|
@@ -1775,10 +1659,6 @@ Available only on /agent/v1. Returns { type: session_compaction, id, status, rea
|
|
|
1775
1659
|
{
|
|
1776
1660
|
resource: "agent.sessions.compactions",
|
|
1777
1661
|
method: "list",
|
|
1778
|
-
summary: "List Session Compactions (Extension)",
|
|
1779
|
-
description: `Read session compaction history and summaries.
|
|
1780
|
-
|
|
1781
|
-
Available only on /agent/v1. Returns { data: [...] }. Each entry contains type, id, event_id, trigger, status, model, compacted_message_count, input_tokens_before, input_tokens_after, summary, error and created_at, as recorded by the service. Missing or inaccessible managed sessions return 404 not_found_error.`,
|
|
1782
1662
|
http: "GET",
|
|
1783
1663
|
path: "/agent/v1/sessions/{session_id}/compactions",
|
|
1784
1664
|
streaming: "no",
|
|
@@ -1794,10 +1674,6 @@ Available only on /agent/v1. Returns { data: [...] }. Each entry contains type,
|
|
|
1794
1674
|
{
|
|
1795
1675
|
resource: "agent.sessions",
|
|
1796
1676
|
method: "retrieveContext",
|
|
1797
|
-
summary: "Get Session Context (Extension)",
|
|
1798
|
-
description: `Read the latest context measurement and the currently selected model’s window and compaction thresholds.
|
|
1799
|
-
|
|
1800
|
-
Praxis extension available only on /agent/v1, following Claude Agent SDK getContextUsage() with snake_case fields. detail is summary: the latest actual model usage takes precedence, and local estimates apportion source totals; used categories sum to total_tokens. Only nonzero sources appear. Classify rows by kind (used/free/buffer/deferred). key is a stable source identifier extension; clients must tolerate unknown keys and new sources, falling back to name. MCP tools group by server, plugin blocks by id, and compaction summaries are counted separately. excluded_items is currently zero. Before measurement, total_tokens, total_tokens_source and measured_at are null, categories is empty, and details are zero or empty arrays. Model selection recalculates max_tokens, auto_compact_threshold and free/buffer while preserving the latest measurement. is_auto_compact_enabled is false for unknown capacity or a tripped compaction breaker. For example model.thinking is {efforts: [high, xhigh], can_disable: true, default_effort: high}. model.thinking contains efforts, can_disable and nullable default_effort; the entire thinking value is null when capability is unknown. Missing or inaccessible sessions return 404.`,
|
|
1801
1677
|
http: "GET",
|
|
1802
1678
|
path: "/agent/v1/sessions/{session_id}/context",
|
|
1803
1679
|
streaming: "no",
|
|
@@ -1813,8 +1689,6 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
|
|
|
1813
1689
|
{
|
|
1814
1690
|
resource: "agent.sessions.events",
|
|
1815
1691
|
method: "list",
|
|
1816
|
-
summary: "",
|
|
1817
|
-
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.",
|
|
1818
1692
|
http: "GET",
|
|
1819
1693
|
path: "/agent/v1/sessions/{session_id}/events",
|
|
1820
1694
|
streaming: "no",
|
|
@@ -1884,8 +1758,6 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
|
|
|
1884
1758
|
{
|
|
1885
1759
|
resource: "agent.sessions.events",
|
|
1886
1760
|
method: "send",
|
|
1887
|
-
summary: "",
|
|
1888
|
-
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.',
|
|
1889
1761
|
http: "POST",
|
|
1890
1762
|
path: "/agent/v1/sessions/{session_id}/events",
|
|
1891
1763
|
streaming: "no",
|
|
@@ -1913,8 +1785,6 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
|
|
|
1913
1785
|
{
|
|
1914
1786
|
resource: "agent.sessions.events",
|
|
1915
1787
|
method: "stream",
|
|
1916
|
-
summary: "",
|
|
1917
|
-
description: "Open a Server-Sent Events stream of a session's events in real time. Use it to show a reply as it is produced; to read past events use sessions.events.list. Send a message through sessions.events.send in another request while the stream is open. Closing the stream only drops your subscription and does not stop the agent. Pass event_deltas[]=agent.message, agent.thinking or agent.tool_use to also receive event_start / event_delta previews before the final event.",
|
|
1918
1788
|
http: "GET",
|
|
1919
1789
|
path: "/agent/v1/sessions/{session_id}/events/stream",
|
|
1920
1790
|
streaming: "always",
|
|
@@ -1942,10 +1812,6 @@ Praxis extension available only on /agent/v1, following Claude Agent SDK getCont
|
|
|
1942
1812
|
{
|
|
1943
1813
|
resource: "agent.sessions",
|
|
1944
1814
|
method: "fork",
|
|
1945
|
-
summary: "Fork Session (Extension)",
|
|
1946
|
-
description: `Create an independent session at the last assistant message of a successfully completed turn.
|
|
1947
|
-
|
|
1948
|
-
Available only on /agent/v1. Use the message_id field from own-face events, not the event id. Copies every message and part through the target, including tool calls and results. The parent is unchanged; another running turn does not prevent forking an earlier completed turn. The new root session appears in the session list with the same agent version, current model and thinking settings, and cwd working directory. Its title is the parent title plus “ 的分支”. If the parent has a sandbox, the new session owns an independent fork including a memory snapshot. Inherited running tasks are terminated, ring targets are replaced with the new session only, and its background-task table starts empty. Without a parent sandbox, creation remains lazy. Returns 201 with the same Session shape as retrieval. forked_from is {session_id, message_id}, or null for ordinary sessions. Imported history ends with session.forked containing forked_from_session_id and forked_from_message_id. These fields and this event are own-face only. Invalid requests return 400; ineligible targets return 409 FORK_TARGET_INVALID; missing sessions or sessions belonging to another caller return 404. Initialization failures leave the child unpublished and reclaim the forked sandbox.`,
|
|
1949
1815
|
http: "POST",
|
|
1950
1816
|
path: "/agent/v1/sessions/{session_id}/fork",
|
|
1951
1817
|
streaming: "no",
|
|
@@ -1972,8 +1838,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
1972
1838
|
{
|
|
1973
1839
|
resource: "agent.sessions.resources",
|
|
1974
1840
|
method: "list",
|
|
1975
|
-
summary: "",
|
|
1976
|
-
description: "List the extra resources (file references) attached to a session, oldest first, at most 1000 per page (default 1000). Use the returned id with sessions.resources.retrieve or sessions.resources.delete; next_page continues a truncated list.",
|
|
1977
1841
|
http: "GET",
|
|
1978
1842
|
path: "/agent/v1/sessions/{session_id}/resources",
|
|
1979
1843
|
streaming: "no",
|
|
@@ -2002,8 +1866,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2002
1866
|
{
|
|
2003
1867
|
resource: "agent.sessions.resources",
|
|
2004
1868
|
method: "create",
|
|
2005
|
-
summary: "",
|
|
2006
|
-
description: "Attach a file resource to a session by file_id, up to 500 per session. The file must exist and belong to your tenant. It is mounted under /mnt/session/uploads/<file_id> unless mount_path is given; custom paths are rooted there and parent traversal is rejected. File content is immutable through this API, and synchronizing it into a running sandbox is not implemented in this version.",
|
|
2007
1869
|
http: "POST",
|
|
2008
1870
|
path: "/agent/v1/sessions/{session_id}/resources",
|
|
2009
1871
|
streaming: "no",
|
|
@@ -2046,8 +1908,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2046
1908
|
{
|
|
2047
1909
|
resource: "agent.sessions.resources",
|
|
2048
1910
|
method: "delete",
|
|
2049
|
-
summary: "",
|
|
2050
|
-
description: "Detach a resource from a session. Only the reference is removed; the underlying file is not deleted. The response is {id, type: session_resource_deleted}. resource_id comes from sessions.resources.list or the add call.",
|
|
2051
1911
|
http: "DELETE",
|
|
2052
1912
|
path: "/agent/v1/sessions/{session_id}/resources/{resource_id}",
|
|
2053
1913
|
streaming: "no",
|
|
@@ -2075,8 +1935,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2075
1935
|
{
|
|
2076
1936
|
resource: "agent.sessions.resources",
|
|
2077
1937
|
method: "retrieve",
|
|
2078
|
-
summary: "",
|
|
2079
|
-
description: "Read one resource attached to a session: its type, file_id, mount_path and timestamps. resource_id comes from sessions.resources.list or sessions.resources.add.",
|
|
2080
1938
|
http: "GET",
|
|
2081
1939
|
path: "/agent/v1/sessions/{session_id}/resources/{resource_id}",
|
|
2082
1940
|
streaming: "no",
|
|
@@ -2104,8 +1962,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2104
1962
|
{
|
|
2105
1963
|
resource: "agent.sessions.threads",
|
|
2106
1964
|
method: "list",
|
|
2107
|
-
summary: "",
|
|
2108
|
-
description: "List the execution threads of a session: the primary thread plus every child thread started by subagents or advisors, in created_at order. Child threads reference the primary through parent_thread_id. Pages hold at most 100 threads (default 20). Use a thread id with sessions.threads.retrieve, sessions.threads.events.list or sessions.threads.events.stream.",
|
|
2109
1965
|
http: "GET",
|
|
2110
1966
|
path: "/agent/v1/sessions/{session_id}/threads",
|
|
2111
1967
|
streaming: "no",
|
|
@@ -2134,8 +1990,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2134
1990
|
{
|
|
2135
1991
|
resource: "agent.sessions.threads",
|
|
2136
1992
|
method: "retrieve",
|
|
2137
|
-
summary: "",
|
|
2138
|
-
description: "Read one execution thread of a session, field for field the same as its list item. Thread ids that are unknown, malformed or belong to another session all return 404, so existence is not revealed. thread_id comes from sessions.threads.list or from the session_thread_id of a session.thread_created event.",
|
|
2139
1993
|
http: "GET",
|
|
2140
1994
|
path: "/agent/v1/sessions/{session_id}/threads/{thread_id}",
|
|
2141
1995
|
streaming: "no",
|
|
@@ -2163,8 +2017,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2163
2017
|
{
|
|
2164
2018
|
resource: "agent.sessions.threads",
|
|
2165
2019
|
method: "archive",
|
|
2166
|
-
summary: "",
|
|
2167
|
-
description: "Archive one execution thread. Archiving the primary thread archives the session; archiving a child archives only that child, leaving the parent and its siblings untouched. An archived child has status terminated and archived_at set, receives no new events and keeps its history readable.",
|
|
2168
2020
|
http: "POST",
|
|
2169
2021
|
path: "/agent/v1/sessions/{session_id}/threads/{thread_id}/archive",
|
|
2170
2022
|
streaming: "no",
|
|
@@ -2192,8 +2044,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2192
2044
|
{
|
|
2193
2045
|
resource: "agent.sessions.threads.events",
|
|
2194
2046
|
method: "list",
|
|
2195
|
-
summary: "",
|
|
2196
|
-
description: "Read the event history of one execution thread: the session itself for the primary thread, or the child session for a child thread. It accepts the same filters, ordering and paging as sessions.events.list and returns the same data + next_page envelope. Child approvals carry session_thread_id so you can route a confirmation to the owning thread.",
|
|
2197
2047
|
http: "GET",
|
|
2198
2048
|
path: "/agent/v1/sessions/{session_id}/threads/{thread_id}/events",
|
|
2199
2049
|
streaming: "no",
|
|
@@ -2233,8 +2083,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2233
2083
|
{
|
|
2234
2084
|
resource: "agent.sessions.threads",
|
|
2235
2085
|
method: "stream",
|
|
2236
|
-
summary: "",
|
|
2237
|
-
description: "Open a Server-Sent Events stream of one execution thread's live events, using the same implementation as sessions.events.stream; a read-only WebSocket is also available on this path. The parent session stream additionally carries child creation, status and message events. Pass event_deltas[]=agent.message, agent.thinking or agent.tool_use for incremental previews.",
|
|
2238
2086
|
http: "GET",
|
|
2239
2087
|
path: "/agent/v1/sessions/{session_id}/threads/{thread_id}/stream",
|
|
2240
2088
|
streaming: "always",
|
|
@@ -2273,8 +2121,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2273
2121
|
{
|
|
2274
2122
|
resource: "agent.toolsets",
|
|
2275
2123
|
method: "list",
|
|
2276
|
-
summary: "List Toolsets",
|
|
2277
|
-
description: "Discover tool names, input schemas, read-only status and default permission policies before configuring an agent. The catalog is read-only: enable tools through agents.create or agents.update. agent_toolset_20260401 includes bash, edit, glob, grep, read, write, web_search, web_fetch, task_output, task_stop, monitor, agent, send_message, codemode and skill, plus todo_write, enter_plan_mode, ask_user_question and goal_read, which are listed so they can be switched off. Native additions require bash enabled; codemode requires bash (enabling it with bash disabled returns 400; keep bash enabled with permission_policy always_ask to restrict it); send_message also requires agent. To keep only some tools, set default_config.enabled to false and enable the wanted tools in configs; unlisted tools follow default_config. The catalog includes plugin names and versions. Sessions created through /anthropic/v1 expose only the eight official tools.",
|
|
2278
2124
|
http: "GET",
|
|
2279
2125
|
path: "/agent/v1/toolsets",
|
|
2280
2126
|
streaming: "no",
|
|
@@ -2285,8 +2131,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2285
2131
|
{
|
|
2286
2132
|
resource: "application.assets.upload",
|
|
2287
2133
|
method: "create",
|
|
2288
|
-
summary: "Upload assets",
|
|
2289
|
-
description: "Upload one batch: files maps hash to base64 content. The last batch returns the completion token.",
|
|
2290
2134
|
http: "POST",
|
|
2291
2135
|
path: "/application/v1/assets/upload",
|
|
2292
2136
|
streaming: "no",
|
|
@@ -2314,8 +2158,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2314
2158
|
{
|
|
2315
2159
|
resource: "application.subdomain",
|
|
2316
2160
|
method: "retrieve",
|
|
2317
|
-
summary: "Get account subdomain",
|
|
2318
|
-
description: "Return the account subdomain used in every Worker URL. A default is created on first use.",
|
|
2319
2161
|
http: "GET",
|
|
2320
2162
|
path: "/application/v1/subdomain",
|
|
2321
2163
|
streaming: "no",
|
|
@@ -2326,8 +2168,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2326
2168
|
{
|
|
2327
2169
|
resource: "application.subdomain",
|
|
2328
2170
|
method: "update",
|
|
2329
|
-
summary: "Change account subdomain",
|
|
2330
|
-
description: "Change the account subdomain. Every Worker moves to the new address at once; old addresses stop resolving.",
|
|
2331
2171
|
http: "PUT",
|
|
2332
2172
|
path: "/application/v1/subdomain",
|
|
2333
2173
|
streaming: "no",
|
|
@@ -2349,8 +2189,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2349
2189
|
{
|
|
2350
2190
|
resource: "application.workers",
|
|
2351
2191
|
method: "list",
|
|
2352
|
-
summary: "List Workers",
|
|
2353
|
-
description: "List Workers in your account. Filter by status or by label with label.<key>=<value>.",
|
|
2354
2192
|
http: "GET",
|
|
2355
2193
|
path: "/application/v1/workers",
|
|
2356
2194
|
streaming: "no",
|
|
@@ -2380,8 +2218,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2380
2218
|
{
|
|
2381
2219
|
resource: "application.workers",
|
|
2382
2220
|
method: "create",
|
|
2383
|
-
summary: "Create Worker",
|
|
2384
|
-
description: "Create a Worker. It serves nothing until a version is deployed.",
|
|
2385
2221
|
http: "POST",
|
|
2386
2222
|
path: "/application/v1/workers",
|
|
2387
2223
|
streaming: "no",
|
|
@@ -2428,8 +2264,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2428
2264
|
{
|
|
2429
2265
|
resource: "application.workers",
|
|
2430
2266
|
method: "delete",
|
|
2431
|
-
summary: "Delete Worker",
|
|
2432
|
-
description: "Soft-delete a Worker. Unlike Cloudflare, deletion is reversible: it stops serving at once and can be restored with RestoreWorker for 7 days, after which it is purged.",
|
|
2433
2267
|
http: "DELETE",
|
|
2434
2268
|
path: "/application/v1/workers/{worker_id}",
|
|
2435
2269
|
streaming: "no",
|
|
@@ -2445,8 +2279,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2445
2279
|
{
|
|
2446
2280
|
resource: "application.workers",
|
|
2447
2281
|
method: "retrieve",
|
|
2448
|
-
summary: "Get Worker",
|
|
2449
|
-
description: "Get a Worker. expand returns related objects in the same response.",
|
|
2450
2282
|
http: "GET",
|
|
2451
2283
|
path: "/application/v1/workers/{worker_id}",
|
|
2452
2284
|
streaming: "no",
|
|
@@ -2469,8 +2301,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2469
2301
|
{
|
|
2470
2302
|
resource: "application.workers",
|
|
2471
2303
|
method: "update",
|
|
2472
|
-
summary: "Update Worker",
|
|
2473
|
-
description: "Change name, tags, observability, subdomain or labels. Omitted fields stay unchanged.",
|
|
2474
2304
|
http: "PATCH",
|
|
2475
2305
|
path: "/application/v1/workers/{worker_id}",
|
|
2476
2306
|
streaming: "no",
|
|
@@ -2522,8 +2352,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2522
2352
|
{
|
|
2523
2353
|
resource: "application.workers.assetsUploadSession",
|
|
2524
2354
|
method: "create",
|
|
2525
|
-
summary: "Create asset upload session",
|
|
2526
|
-
description: "Declare the static file manifest. The answer lists the hashes still missing, grouped into upload batches, and an upload token.",
|
|
2527
2355
|
http: "POST",
|
|
2528
2356
|
path: "/application/v1/workers/{worker_id}/assets-upload-session",
|
|
2529
2357
|
streaming: "no",
|
|
@@ -2550,8 +2378,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2550
2378
|
{
|
|
2551
2379
|
resource: "application.workers.components",
|
|
2552
2380
|
method: "list",
|
|
2553
|
-
summary: "List components",
|
|
2554
|
-
description: "List the databases, namespaces and buckets this Worker owns.",
|
|
2555
2381
|
http: "GET",
|
|
2556
2382
|
path: "/application/v1/workers/{worker_id}/components",
|
|
2557
2383
|
streaming: "no",
|
|
@@ -2567,8 +2393,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2567
2393
|
{
|
|
2568
2394
|
resource: "application.workers.deployments",
|
|
2569
2395
|
method: "list",
|
|
2570
|
-
summary: "List deployments",
|
|
2571
|
-
description: "List the deployments of a Worker, newest first; the first active one is serving. Page with next_cursor.",
|
|
2572
2396
|
http: "GET",
|
|
2573
2397
|
path: "/application/v1/workers/{worker_id}/deployments",
|
|
2574
2398
|
streaming: "no",
|
|
@@ -2597,8 +2421,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2597
2421
|
{
|
|
2598
2422
|
resource: "application.workers.deployments",
|
|
2599
2423
|
method: "create",
|
|
2600
|
-
summary: "Create deployment",
|
|
2601
|
-
description: "Deploy one version to serve the Worker. Unlike Cloudflare, a deployment holds exactly one version at 100 percent (no gradual rollout), so strategy must be percentage. Deployment is asynchronous; poll the deployment until praxis.status is active or failed.",
|
|
2602
2424
|
http: "POST",
|
|
2603
2425
|
path: "/application/v1/workers/{worker_id}/deployments",
|
|
2604
2426
|
streaming: "no",
|
|
@@ -2647,8 +2469,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2647
2469
|
{
|
|
2648
2470
|
resource: "application.workers.deployments",
|
|
2649
2471
|
method: "retrieve",
|
|
2650
|
-
summary: "Get deployment",
|
|
2651
|
-
description: "Get one deployment with its status and upload progress; poll this after CreateDeployment until praxis.status is active or failed.",
|
|
2652
2472
|
http: "GET",
|
|
2653
2473
|
path: "/application/v1/workers/{worker_id}/deployments/{deployment_id}",
|
|
2654
2474
|
streaming: "no",
|
|
@@ -2668,8 +2488,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2668
2488
|
{
|
|
2669
2489
|
resource: "application.workers.events",
|
|
2670
2490
|
method: "list",
|
|
2671
|
-
summary: "List events",
|
|
2672
|
-
description: "List lifecycle events of a Worker in sequence order.",
|
|
2673
2491
|
http: "GET",
|
|
2674
2492
|
path: "/application/v1/workers/{worker_id}/events",
|
|
2675
2493
|
streaming: "no",
|
|
@@ -2698,8 +2516,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2698
2516
|
{
|
|
2699
2517
|
resource: "application.workers.grants",
|
|
2700
2518
|
method: "list",
|
|
2701
|
-
summary: "List grants",
|
|
2702
|
-
description: "List resources this Worker's platform token may access.",
|
|
2703
2519
|
http: "GET",
|
|
2704
2520
|
path: "/application/v1/workers/{worker_id}/grants",
|
|
2705
2521
|
streaming: "no",
|
|
@@ -2715,8 +2531,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2715
2531
|
{
|
|
2716
2532
|
resource: "application.workers.grants",
|
|
2717
2533
|
method: "create",
|
|
2718
|
-
summary: "Create grant",
|
|
2719
|
-
description: "Let this Worker's platform token access one of your databases, folders or knowledge bases.",
|
|
2720
2534
|
http: "POST",
|
|
2721
2535
|
path: "/application/v1/workers/{worker_id}/grants",
|
|
2722
2536
|
streaming: "no",
|
|
@@ -2753,8 +2567,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2753
2567
|
{
|
|
2754
2568
|
resource: "application.workers.grants",
|
|
2755
2569
|
method: "delete",
|
|
2756
|
-
summary: "Delete grant",
|
|
2757
|
-
description: "Revoke a grant so this Worker's platform token can no longer access the granted resource. Takes effect for new requests at once.",
|
|
2758
2570
|
http: "DELETE",
|
|
2759
2571
|
path: "/application/v1/workers/{worker_id}/grants/{grant_id}",
|
|
2760
2572
|
streaming: "no",
|
|
@@ -2774,8 +2586,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2774
2586
|
{
|
|
2775
2587
|
resource: "application.workers",
|
|
2776
2588
|
method: "restore",
|
|
2777
|
-
summary: "Restore Worker",
|
|
2778
|
-
description: "Bring back a soft-deleted Worker within 7 days of deletion, with its versions and deployments. Cloudflare has no equivalent.",
|
|
2779
2589
|
http: "POST",
|
|
2780
2590
|
path: "/application/v1/workers/{worker_id}/restore",
|
|
2781
2591
|
streaming: "no",
|
|
@@ -2791,8 +2601,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2791
2601
|
{
|
|
2792
2602
|
resource: "application.workers.secrets",
|
|
2793
2603
|
method: "list",
|
|
2794
|
-
summary: "List secrets",
|
|
2795
|
-
description: "List secret names and sources. Values are never returned.",
|
|
2796
2604
|
http: "GET",
|
|
2797
2605
|
path: "/application/v1/workers/{worker_id}/secrets",
|
|
2798
2606
|
streaming: "no",
|
|
@@ -2808,8 +2616,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2808
2616
|
{
|
|
2809
2617
|
resource: "application.workers.secrets",
|
|
2810
2618
|
method: "delete",
|
|
2811
|
-
summary: "Delete secret",
|
|
2812
|
-
description: "Delete a secret. Unlike Cloudflare, this derives a new version without it and deploys that version.",
|
|
2813
2619
|
http: "DELETE",
|
|
2814
2620
|
path: "/application/v1/workers/{worker_id}/secrets/{name}",
|
|
2815
2621
|
streaming: "no",
|
|
@@ -2829,8 +2635,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2829
2635
|
{
|
|
2830
2636
|
resource: "application.workers.secrets",
|
|
2831
2637
|
method: "update",
|
|
2832
|
-
summary: "Put secret",
|
|
2833
|
-
description: "Create or replace a secret by value or vault reference. Unlike Cloudflare, this derives a new version from the current one and deploys it, so the change is live only once that deployment is active.",
|
|
2834
2638
|
http: "PUT",
|
|
2835
2639
|
path: "/application/v1/workers/{worker_id}/secrets/{name}",
|
|
2836
2640
|
streaming: "no",
|
|
@@ -2861,8 +2665,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2861
2665
|
{
|
|
2862
2666
|
resource: "application.workers.versions",
|
|
2863
2667
|
method: "list",
|
|
2864
|
-
summary: "List versions",
|
|
2865
|
-
description: "List the versions of a Worker, newest first, to pick one to deploy or inspect. Page with next_cursor.",
|
|
2866
2668
|
http: "GET",
|
|
2867
2669
|
path: "/application/v1/workers/{worker_id}/versions",
|
|
2868
2670
|
streaming: "no",
|
|
@@ -2891,8 +2693,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2891
2693
|
{
|
|
2892
2694
|
resource: "application.workers.versions",
|
|
2893
2695
|
method: "create",
|
|
2894
|
-
summary: "Create version",
|
|
2895
|
-
description: "Upload code and bindings as a new version; a version serves nothing until deployed. Set deploy true to create the pending deployment in the same call. Rejected binding types return UNSUPPORTED.",
|
|
2896
2696
|
http: "POST",
|
|
2897
2697
|
path: "/application/v1/workers/{worker_id}/versions",
|
|
2898
2698
|
streaming: "no",
|
|
@@ -2970,8 +2770,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2970
2770
|
{
|
|
2971
2771
|
resource: "application.workers.versions",
|
|
2972
2772
|
method: "retrieve",
|
|
2973
|
-
summary: "Get version",
|
|
2974
|
-
description: "Get one version of a Worker with its modules, bindings and asset settings; secret values are never returned.",
|
|
2975
2773
|
http: "GET",
|
|
2976
2774
|
path: "/application/v1/workers/{worker_id}/versions/{version_id}",
|
|
2977
2775
|
streaming: "no",
|
|
@@ -2991,8 +2789,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
2991
2789
|
{
|
|
2992
2790
|
resource: "automation.actions",
|
|
2993
2791
|
method: "list",
|
|
2994
|
-
summary: "List actions",
|
|
2995
|
-
description: "Discover callable Actions and their ns/name references without executing them. Combine each returned namespace and name as ns/name; Action calls use the current revision and do not accept @version or @tag. Filter by name or description; results include seven-day statistics and revision summaries without implementation source. Archived actions are excluded by default.",
|
|
2996
2792
|
http: "GET",
|
|
2997
2793
|
path: "/automation/v1/actions",
|
|
2998
2794
|
streaming: "no",
|
|
@@ -3076,8 +2872,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3076
2872
|
{
|
|
3077
2873
|
resource: "automation.actions",
|
|
3078
2874
|
method: "create",
|
|
3079
|
-
summary: "Create an action",
|
|
3080
|
-
description: "Create an action definition and its first revision, folding names to lowercase. Duplicate names within the tenant return NAME_TAKEN; the praxis namespace is read-only.",
|
|
3081
2875
|
http: "POST",
|
|
3082
2876
|
path: "/automation/v1/actions",
|
|
3083
2877
|
streaming: "no",
|
|
@@ -3160,8 +2954,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3160
2954
|
{
|
|
3161
2955
|
resource: "automation.actions",
|
|
3162
2956
|
method: "retrieve",
|
|
3163
|
-
summary: "Get an action",
|
|
3164
|
-
description: "Read the action and its full current implementation. The response ETag is the current revision ID for conditional updates.",
|
|
3165
2957
|
http: "GET",
|
|
3166
2958
|
path: "/automation/v1/actions/{ns}/{name}",
|
|
3167
2959
|
streaming: "no",
|
|
@@ -3181,8 +2973,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3181
2973
|
{
|
|
3182
2974
|
resource: "automation.actions",
|
|
3183
2975
|
method: "update",
|
|
3184
|
-
summary: "Update an action",
|
|
3185
|
-
description: "Update after checking compatibility against the current and five recent revisions. Widening inputs and narrowing outputs are compatible, including length, item count, property count, type (integer/number), and multipleOf (the new input factor divides the old one; the reverse holds for outputs). dry_run=true returns only CompatResult and may omit If-Match; a supplied header is still checked, and * matches any existing representation. Normal updates require If-Match and return ActionDef with ETag; previews return no ETag. Omitted optional fields retain their existing values only for description and labels; when constructing a new revision, errors defaults to [], omitted annotations keys to false, timeout_ms to 30000, and message to null. Incompatible normal updates return 422 SCHEMA_INCOMPATIBLE with issues; unchanged contents retain the existing revision.",
|
|
3186
2976
|
http: "PUT",
|
|
3187
2977
|
path: "/automation/v1/actions/{ns}/{name}",
|
|
3188
2978
|
streaming: "no",
|
|
@@ -3269,8 +3059,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3269
3059
|
{
|
|
3270
3060
|
resource: "automation.actions",
|
|
3271
3061
|
method: "archive",
|
|
3272
|
-
summary: "Archive an action",
|
|
3273
|
-
description: "Archive the action while retaining its name and history, hiding it from the default list. The response includes dependents_count.",
|
|
3274
3062
|
http: "POST",
|
|
3275
3063
|
path: "/automation/v1/actions/{ns}/{name}/archive",
|
|
3276
3064
|
streaming: "no",
|
|
@@ -3294,8 +3082,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3294
3082
|
{
|
|
3295
3083
|
resource: "automation.actions.dependents",
|
|
3296
3084
|
method: "list",
|
|
3297
|
-
summary: "List action dependents",
|
|
3298
|
-
description: "List orchestrations referencing this action. The search covers scripts and workflows in their drafts or latest versions.",
|
|
3299
3085
|
http: "GET",
|
|
3300
3086
|
path: "/automation/v1/actions/{ns}/{name}/dependents",
|
|
3301
3087
|
streaming: "no",
|
|
@@ -3328,8 +3114,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3328
3114
|
{
|
|
3329
3115
|
resource: "automation.actions.invocations",
|
|
3330
3116
|
method: "list",
|
|
3331
|
-
summary: "List action invocations",
|
|
3332
|
-
description: "List this action’s invocations, filtering by status, revision, calling definition and time. Results identify the run and call site.",
|
|
3333
3117
|
http: "GET",
|
|
3334
3118
|
path: "/automation/v1/actions/{ns}/{name}/invocations",
|
|
3335
3119
|
streaming: "no",
|
|
@@ -3403,8 +3187,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3403
3187
|
{
|
|
3404
3188
|
resource: "automation.actions",
|
|
3405
3189
|
method: "restore",
|
|
3406
|
-
summary: "Restore an action",
|
|
3407
|
-
description: "Restore an archived action to the default list. Its current revision is preserved.",
|
|
3408
3190
|
http: "POST",
|
|
3409
3191
|
path: "/automation/v1/actions/{ns}/{name}/restore",
|
|
3410
3192
|
streaming: "no",
|
|
@@ -3428,8 +3210,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3428
3210
|
{
|
|
3429
3211
|
resource: "automation.actions.revisions",
|
|
3430
3212
|
method: "list",
|
|
3431
|
-
summary: "List action revisions",
|
|
3432
|
-
description: "List revisions newest first with rollback eligibility. Results include the current marker and compatibility issues. Lists omit source by default; only expand=source includes full source, and other values return 400. Detail endpoints retain full source.",
|
|
3433
3213
|
http: "GET",
|
|
3434
3214
|
path: "/automation/v1/actions/{ns}/{name}/revisions",
|
|
3435
3215
|
streaming: "no",
|
|
@@ -3471,8 +3251,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3471
3251
|
{
|
|
3472
3252
|
resource: "automation.actions.revisions",
|
|
3473
3253
|
method: "retrieve",
|
|
3474
|
-
summary: "Get an action revision",
|
|
3475
|
-
description: "Read a specific revision with its full implementation and rollback compatibility result. A missing revision returns VERSION_NOT_FOUND. Details always return full source.",
|
|
3476
3254
|
http: "GET",
|
|
3477
3255
|
path: "/automation/v1/actions/{ns}/{name}/revisions/{revision}",
|
|
3478
3256
|
streaming: "no",
|
|
@@ -3496,8 +3274,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3496
3274
|
{
|
|
3497
3275
|
resource: "automation.actions",
|
|
3498
3276
|
method: "rollback",
|
|
3499
|
-
summary: "Roll back an action",
|
|
3500
|
-
description: "Create a compatible new revision from historical contents. Compatibility is checked against the current and five recent historical revisions. The current pointer does not revert to the old ID. Optional If-Match accepts the current revision or *; * matches any existing representation.",
|
|
3501
3277
|
http: "POST",
|
|
3502
3278
|
path: "/automation/v1/actions/{ns}/{name}/rollback",
|
|
3503
3279
|
streaming: "no",
|
|
@@ -3534,8 +3310,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3534
3310
|
{
|
|
3535
3311
|
resource: "automation.hooks",
|
|
3536
3312
|
method: "send",
|
|
3537
|
-
summary: "Receive a webhook",
|
|
3538
|
-
description: "No API key is needed: the URL token authenticates requests. Invalid tokens, absent triggers, wrong kinds and inactive time windows return 404; a paused trigger (circuit breaker after 5 consecutive failures, or manual pause) returns 409 TRIGGER_PAUSED whose message gives the reason and whose hint gives the way back, POST /automation/v1/triggers/{id}/resume. Raw bodies are limited to 512 KiB; serialized run input, including raw and parsed copies, must fit within 1 MiB. Exceeding either limit returns 413 synchronously without recording a firing; webhook-id deduplicates for 24 hours. A 202 with outcome=accepted acknowledges receipt; the final outcome is updated later, and repeats return deduped. Invalid JSON yields body=null; other UTF-8 is text and non-UTF-8 is base64. The envelope contains body, raw_body, raw_body_encoding, allowlisted headers, webhook_id and received_at. raw_body preserves exact bytes with utf8 or base64 encoding for caller-side signature verification.",
|
|
3539
3313
|
http: "POST",
|
|
3540
3314
|
path: "/automation/v1/hooks/{trigger_id}/{token}",
|
|
3541
3315
|
streaming: "no",
|
|
@@ -3559,8 +3333,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3559
3333
|
{
|
|
3560
3334
|
resource: "automation.resolve",
|
|
3561
3335
|
method: "retrieve",
|
|
3562
|
-
summary: "Resolve a run target",
|
|
3563
|
-
description: "Resolve ns/name@tag, an exact version or a version range to a runnable exact version. Omitting @ selects latest; archived targets are rejected and no match returns NO_MATCHING_VERSION.",
|
|
3564
3336
|
http: "GET",
|
|
3565
3337
|
path: "/automation/v1/resolve",
|
|
3566
3338
|
streaming: "no",
|
|
@@ -3578,8 +3350,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3578
3350
|
{
|
|
3579
3351
|
resource: "automation.runs",
|
|
3580
3352
|
method: "list",
|
|
3581
|
-
summary: "List runs",
|
|
3582
|
-
description: "Filter tenant runs and list them newest first. Filters include multiple statuses, target, origin, labels[k] and a creation-time lower bound. q matches a run ID exactly when it starts with run_; otherwise it matches a definition-name prefix. Large input/output values are null in lists with input_truncated/output_truncated true; get run details for full values.",
|
|
3583
3353
|
http: "GET",
|
|
3584
3354
|
path: "/automation/v1/runs",
|
|
3585
3355
|
streaming: "no",
|
|
@@ -3735,8 +3505,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3735
3505
|
{
|
|
3736
3506
|
resource: "automation.runs",
|
|
3737
3507
|
method: "create",
|
|
3738
|
-
summary: "Create a run",
|
|
3739
|
-
description: "Execute a published script or workflow with target, or test unpublished code directly with source and language (ts for TypeScript, yaml for workflow YAML), without first saving or publishing a definition. target and source are mutually exclusive; target accepts ns/name@version, @tag or @range and defaults to latest when @ is omitted. Source/input validation precedes run creation, so a separate validate call is optional. input defaults to {} and must match the input schema and fit within 1 MiB. wait is 0–60 seconds (default 0): a terminal run returns 200, otherwise 202. Use the returned id with praxis.automation.runs.retrieve and inspect status, output and error; acceptance does not mean successful completion. Idempotency-Key is scoped to tenant, method and path for 24 hours, excluding wait from the fingerprint; replay returns the current run with Idempotent-Replayed: true, changed contents return 422 and an in-flight request returns 409. New non-deterministic run IDs contain 78 characters (run_ + 10-character base36 millisecond timestamp + 64-character hexadecimal DO ID), compared with 46 for legacy random IDs. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed. Minimal body: {\"source\":\"export default async () => ({ok: true});\",\"language\":\"ts\",\"wait\":10}.",
|
|
3740
3508
|
http: "POST",
|
|
3741
3509
|
path: "/automation/v1/runs",
|
|
3742
3510
|
streaming: "no",
|
|
@@ -3751,8 +3519,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3751
3519
|
{
|
|
3752
3520
|
resource: "automation.runs",
|
|
3753
3521
|
method: "retrieve",
|
|
3754
|
-
summary: "Get a run",
|
|
3755
|
-
description: "Read status, output and error for the id returned by praxis.automation.runs.create; output needs no expand option. A completed status confirms success; faulted and cancelled are terminal without successful completion. Optionally expand calls, tasks, task groups, logs or source in the same request. Pass wait (seconds, 0–60) to hold the request until the run is terminal or the time is up, instead of polling. Expanded pages hold at most 200 entries; use the ledger endpoints and cursors for subsequent pages. Workflow raise errors preserve the full type URI, status, title and detail; only internal platform exceptions are runtime errors.",
|
|
3756
3522
|
http: "GET",
|
|
3757
3523
|
path: "/automation/v1/runs/{id}",
|
|
3758
3524
|
streaming: "no",
|
|
@@ -3789,8 +3555,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3789
3555
|
{
|
|
3790
3556
|
resource: "automation.runs.artifacts",
|
|
3791
3557
|
method: "list",
|
|
3792
|
-
summary: "List run artifacts",
|
|
3793
|
-
description: "Read run artifacts and their file references. Entries follow ledger order and include content types, sizes and associated steps.",
|
|
3794
3558
|
http: "GET",
|
|
3795
3559
|
path: "/automation/v1/runs/{id}/artifacts",
|
|
3796
3560
|
streaming: "no",
|
|
@@ -3819,8 +3583,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3819
3583
|
{
|
|
3820
3584
|
resource: "automation.runs.calls",
|
|
3821
3585
|
method: "list",
|
|
3822
|
-
summary: "List run calls",
|
|
3823
|
-
description: "Page through the call ledger with execution results. Entries follow ledger order and include targets, argument/result previews, statuses and durations. Script runs read the call ledger; a workflow run records its action calls on its tasks, so this lists the action tasks (skipped ones excluded), matching counters.action_calls.",
|
|
3824
3586
|
http: "GET",
|
|
3825
3587
|
path: "/automation/v1/runs/{id}/calls",
|
|
3826
3588
|
streaming: "no",
|
|
@@ -3849,8 +3611,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3849
3611
|
{
|
|
3850
3612
|
resource: "automation.runs",
|
|
3851
3613
|
method: "cancel",
|
|
3852
|
-
summary: "Cancel a run",
|
|
3853
|
-
description: "Request run cancellation and return 202. Workflows terminate, while scripts receive an abort request followed by forced termination after a grace period. Terminal runs return 409 RUN_INVALID_STATE; cancellation propagates to attached children, not detached children. Optional reason contains 1–500 characters and is stored as Run.cancel_message; cancel_reason remains user.",
|
|
3854
3614
|
http: "POST",
|
|
3855
3615
|
path: "/automation/v1/runs/{id}/cancel",
|
|
3856
3616
|
streaming: "no",
|
|
@@ -3877,8 +3637,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3877
3637
|
{
|
|
3878
3638
|
resource: "automation.runs",
|
|
3879
3639
|
method: "events",
|
|
3880
|
-
summary: "Read run events",
|
|
3881
|
-
description: "Read the CloudEvents ledger or subscribe to live events. Return a CloudEvents ledger page by default; Accept: text/event-stream opens a live stream with ai.praxis.automation.run.status, ai.praxis.automation.run.progress, ai.praxis.automation.call.started, ai.praxis.automation.call.completed, ai.praxis.automation.task.started, ai.praxis.automation.task.completed and ai.praxis.automation.wait.created, ai.praxis.automation.wait.resolved event names. id is the resume cursor and Last-Event-ID takes precedence over cursor; : ping arrives every 20 seconds and event: end closes the stream after a terminal run.",
|
|
3882
3640
|
http: "GET",
|
|
3883
3641
|
path: "/automation/v1/runs/{id}/events",
|
|
3884
3642
|
streaming: "always",
|
|
@@ -3907,8 +3665,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3907
3665
|
{
|
|
3908
3666
|
resource: "automation.runs",
|
|
3909
3667
|
method: "logs",
|
|
3910
|
-
summary: "Read run logs",
|
|
3911
|
-
description: "Return a log page within the 30-day retention window by default. Accept: text/event-stream opens a live stream using event: log; id is the resume cursor and Last-Event-ID takes precedence over cursor. : ping arrives every 20 seconds and event: end closes the stream after a terminal run.",
|
|
3912
3668
|
http: "GET",
|
|
3913
3669
|
path: "/automation/v1/runs/{id}/logs",
|
|
3914
3670
|
streaming: "always",
|
|
@@ -3937,8 +3693,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3937
3693
|
{
|
|
3938
3694
|
resource: "automation.runs",
|
|
3939
3695
|
method: "rerun",
|
|
3940
|
-
summary: "Rerun a run",
|
|
3941
|
-
description: "Create a new root run from the original exact version or ad hoc source, retaining labels and setting rerun_of. Override input or omit it to reuse the original input; archived targets and run tokens are rejected.",
|
|
3942
3696
|
http: "POST",
|
|
3943
3697
|
path: "/automation/v1/runs/{id}/rerun",
|
|
3944
3698
|
streaming: "no",
|
|
@@ -3965,8 +3719,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3965
3719
|
{
|
|
3966
3720
|
resource: "automation.runs",
|
|
3967
3721
|
method: "resume",
|
|
3968
|
-
summary: "Resume a run",
|
|
3969
|
-
description: "Resume only a suspended workflow to its prior running or waiting state. It remains suspended if concurrency slots are unavailable; scripts do not support this operation.",
|
|
3970
3722
|
http: "POST",
|
|
3971
3723
|
path: "/automation/v1/runs/{id}/resume",
|
|
3972
3724
|
streaming: "no",
|
|
@@ -3986,8 +3738,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
3986
3738
|
{
|
|
3987
3739
|
resource: "automation.runs",
|
|
3988
3740
|
method: "retrieveSource",
|
|
3989
|
-
summary: "Get run source",
|
|
3990
|
-
description: "Read the source and digest used by the run. Results include the language and SHA-256 digest, for both ad hoc and published-definition runs.",
|
|
3991
3741
|
http: "GET",
|
|
3992
3742
|
path: "/automation/v1/runs/{id}/source",
|
|
3993
3743
|
streaming: "no",
|
|
@@ -4003,8 +3753,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4003
3753
|
{
|
|
4004
3754
|
resource: "automation.runs",
|
|
4005
3755
|
method: "suspend",
|
|
4006
|
-
summary: "Suspend a run",
|
|
4007
|
-
description: "Suspend only a running or waiting workflow. Scripts return OPERATION_NOT_SUPPORTED; other states return RUN_INVALID_STATE.",
|
|
4008
3756
|
http: "POST",
|
|
4009
3757
|
path: "/automation/v1/runs/{id}/suspend",
|
|
4010
3758
|
streaming: "no",
|
|
@@ -4024,8 +3772,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4024
3772
|
{
|
|
4025
3773
|
resource: "automation.runs.tasks",
|
|
4026
3774
|
method: "list",
|
|
4027
|
-
summary: "List run tasks",
|
|
4028
|
-
description: "Page through the task ledger. include=planned adds unexecuted top-level steps; group_by=reference aggregates count, status and duration by task reference.",
|
|
4029
3775
|
http: "GET",
|
|
4030
3776
|
path: "/automation/v1/runs/{id}/tasks",
|
|
4031
3777
|
streaming: "no",
|
|
@@ -4072,8 +3818,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4072
3818
|
{
|
|
4073
3819
|
resource: "automation.runs.waits",
|
|
4074
3820
|
method: "list",
|
|
4075
|
-
summary: "List run waits",
|
|
4076
|
-
description: "List current and historical waits in ledger order. Wait types include event, timer and child.",
|
|
4077
3821
|
http: "GET",
|
|
4078
3822
|
path: "/automation/v1/runs/{id}/waits",
|
|
4079
3823
|
streaming: "no",
|
|
@@ -4102,8 +3846,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4102
3846
|
{
|
|
4103
3847
|
resource: "automation.runs.waits",
|
|
4104
3848
|
method: "complete",
|
|
4105
|
-
summary: "Complete a run wait",
|
|
4106
|
-
description: "Complete only an event wait with a payload of at most 32 KiB satisfying its filter; timer and child waits cannot be completed manually. Reusing the same id and payload returns replayed=true; other repeats return WAIT_ALREADY_RESOLVED and expired waits return WAIT_EXPIRED.",
|
|
4107
3849
|
http: "POST",
|
|
4108
3850
|
path: "/automation/v1/runs/{id}/waits/{wait_id}/complete",
|
|
4109
3851
|
streaming: "no",
|
|
@@ -4140,8 +3882,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4140
3882
|
{
|
|
4141
3883
|
resource: "automation.scripts",
|
|
4142
3884
|
method: "list",
|
|
4143
|
-
summary: "List scripts",
|
|
4144
|
-
description: "List visible script summaries, latest versions, tags and seven-day statistics. Archived entries are excluded by default.",
|
|
4145
3885
|
http: "GET",
|
|
4146
3886
|
path: "/automation/v1/scripts",
|
|
4147
3887
|
streaming: "no",
|
|
@@ -4213,8 +3953,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4213
3953
|
{
|
|
4214
3954
|
resource: "automation.scripts",
|
|
4215
3955
|
method: "create",
|
|
4216
|
-
summary: "Create a script",
|
|
4217
|
-
description: 'Save a TypeScript script as an editable draft for later reuse; this does not publish or start a run. Choose your own namespace without registering it first; praxis is read-only. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. The draft is a source string with a default-exported function, for example `export default async (input: {name: string}) => ({greeting: "Hello, " + input.name});`. To test it, pass that source and language=ts to praxis.automation.runs.create without publishing. To publish later, use the returned draft.revision as expected_draft_revision.',
|
|
4218
3956
|
http: "POST",
|
|
4219
3957
|
path: "/automation/v1/scripts",
|
|
4220
3958
|
streaming: "no",
|
|
@@ -4260,8 +3998,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4260
3998
|
{
|
|
4261
3999
|
resource: "automation.scripts",
|
|
4262
4000
|
method: "retrieve",
|
|
4263
|
-
summary: "Get a script",
|
|
4264
|
-
description: "Read script details and draft source. The ETag is the draft revision to use in If-Match for updates.",
|
|
4265
4001
|
http: "GET",
|
|
4266
4002
|
path: "/automation/v1/scripts/{ns}/{name}",
|
|
4267
4003
|
streaming: "no",
|
|
@@ -4281,8 +4017,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4281
4017
|
{
|
|
4282
4018
|
resource: "automation.scripts",
|
|
4283
4019
|
method: "update",
|
|
4284
|
-
summary: "Update a script draft",
|
|
4285
|
-
description: "Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.",
|
|
4286
4020
|
http: "PATCH",
|
|
4287
4021
|
path: "/automation/v1/scripts/{ns}/{name}",
|
|
4288
4022
|
streaming: "no",
|
|
@@ -4325,8 +4059,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4325
4059
|
{
|
|
4326
4060
|
resource: "automation.scripts",
|
|
4327
4061
|
method: "archive",
|
|
4328
|
-
summary: "Archive a script",
|
|
4329
|
-
description: "Keep the name, versions and draft while archiving. The default list hides it and new target resolution and run requests reject the archived target.",
|
|
4330
4062
|
http: "POST",
|
|
4331
4063
|
path: "/automation/v1/scripts/{ns}/{name}/archive",
|
|
4332
4064
|
streaming: "no",
|
|
@@ -4350,8 +4082,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4350
4082
|
{
|
|
4351
4083
|
resource: "automation.scripts.distTags",
|
|
4352
4084
|
method: "list",
|
|
4353
|
-
summary: "List script tags",
|
|
4354
|
-
description: "Read the exact version for each distribution tag. Results include the update time and updater.",
|
|
4355
4085
|
http: "GET",
|
|
4356
4086
|
path: "/automation/v1/scripts/{ns}/{name}/dist-tags",
|
|
4357
4087
|
streaming: "no",
|
|
@@ -4371,8 +4101,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4371
4101
|
{
|
|
4372
4102
|
resource: "automation.scripts.distTags",
|
|
4373
4103
|
method: "delete",
|
|
4374
|
-
summary: "Delete a script tag",
|
|
4375
|
-
description: "Delete a distribution tag while retaining versions. latest cannot be deleted, versions and ranges are invalid tags, and deleting an absent valid tag is repeatable.",
|
|
4376
4104
|
http: "DELETE",
|
|
4377
4105
|
path: "/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}",
|
|
4378
4106
|
streaming: "no",
|
|
@@ -4396,8 +4124,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4396
4124
|
{
|
|
4397
4125
|
resource: "automation.scripts.distTags",
|
|
4398
4126
|
method: "set",
|
|
4399
|
-
summary: "Set a script tag",
|
|
4400
|
-
description: "Point a distribution tag at an existing exact version; tags cannot be versions or version ranges. Moving latest can roll back a release and synchronizes workflow schedules.",
|
|
4401
4127
|
http: "PUT",
|
|
4402
4128
|
path: "/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}",
|
|
4403
4129
|
streaming: "no",
|
|
@@ -4432,8 +4158,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4432
4158
|
{
|
|
4433
4159
|
resource: "automation.scripts",
|
|
4434
4160
|
method: "restore",
|
|
4435
|
-
summary: "Restore a script",
|
|
4436
|
-
description: "Restore an archived definition with its versions and tags. The name is retained.",
|
|
4437
4161
|
http: "POST",
|
|
4438
4162
|
path: "/automation/v1/scripts/{ns}/{name}/restore",
|
|
4439
4163
|
streaming: "no",
|
|
@@ -4457,8 +4181,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4457
4181
|
{
|
|
4458
4182
|
resource: "automation.scripts.versions",
|
|
4459
4183
|
method: "list",
|
|
4460
|
-
summary: "List script versions",
|
|
4461
|
-
description: "Page through immutable schemas and locked dependencies in descending semantic-version order. Lists omit source by default; only expand=source includes full source, and other values return 400. Detail endpoints retain full source.",
|
|
4462
4184
|
http: "GET",
|
|
4463
4185
|
path: "/automation/v1/scripts/{ns}/{name}/versions",
|
|
4464
4186
|
streaming: "no",
|
|
@@ -4503,8 +4225,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4503
4225
|
aliases: [
|
|
4504
4226
|
"publish"
|
|
4505
4227
|
],
|
|
4506
|
-
summary: "Publish a script version",
|
|
4507
|
-
description: "Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. Publishing removes +build metadata from the version number.",
|
|
4508
4228
|
http: "POST",
|
|
4509
4229
|
path: "/automation/v1/scripts/{ns}/{name}/versions",
|
|
4510
4230
|
streaming: "no",
|
|
@@ -4528,8 +4248,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4528
4248
|
{
|
|
4529
4249
|
resource: "automation.scripts.versions",
|
|
4530
4250
|
method: "retrieve",
|
|
4531
|
-
summary: "Get a script version",
|
|
4532
|
-
description: "Read source, input/output schemas and deprecation details for an exact version. Missing versions return VERSION_NOT_FOUND. Details always return full source. version accepts an exact version or dist-tag; a range returns 400 with a hint to use /resolve.",
|
|
4533
4251
|
http: "GET",
|
|
4534
4252
|
path: "/automation/v1/scripts/{ns}/{name}/versions/{version}",
|
|
4535
4253
|
streaming: "no",
|
|
@@ -4553,8 +4271,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4553
4271
|
{
|
|
4554
4272
|
resource: "automation.scripts.versions",
|
|
4555
4273
|
method: "deprecate",
|
|
4556
|
-
summary: "Deprecate a script version",
|
|
4557
|
-
description: "Record a deprecation message; an empty message removes deprecation without changing the version source.",
|
|
4558
4274
|
http: "POST",
|
|
4559
4275
|
path: "/automation/v1/scripts/{ns}/{name}/versions/{version}/deprecate",
|
|
4560
4276
|
streaming: "no",
|
|
@@ -4589,8 +4305,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4589
4305
|
{
|
|
4590
4306
|
resource: "automation.targets",
|
|
4591
4307
|
method: "list",
|
|
4592
|
-
summary: "Search automation definitions",
|
|
4593
|
-
description: "Search visible targets and page in ascending name order. Archived targets are excluded by default; optionally select published scripts and workflows.",
|
|
4594
4308
|
http: "GET",
|
|
4595
4309
|
path: "/automation/v1/targets",
|
|
4596
4310
|
streaming: "no",
|
|
@@ -4662,8 +4376,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4662
4376
|
{
|
|
4663
4377
|
resource: "automation.triggers",
|
|
4664
4378
|
method: "list",
|
|
4665
|
-
summary: "List triggers",
|
|
4666
|
-
description: "Page through tenant triggers by target, kind and state. ns/name matches all tags or versions of that target; ns/name@spec matches exactly.",
|
|
4667
4379
|
http: "GET",
|
|
4668
4380
|
path: "/automation/v1/triggers",
|
|
4669
4381
|
streaming: "no",
|
|
@@ -4735,8 +4447,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4735
4447
|
{
|
|
4736
4448
|
resource: "automation.triggers",
|
|
4737
4449
|
method: "create",
|
|
4738
|
-
summary: "Create a trigger",
|
|
4739
|
-
description: "Schedule recurring or one-time runs, or start runs from a webhook, for a published script or workflow. For one immediate run without a persistent trigger, use praxis.automation.runs.create. There may be at most 100 enabled triggers per tenant. Targets accept only exact versions or tags; webhook_url is returned only when creating a webhook or rotating its URL, so save it securely.",
|
|
4740
4450
|
http: "POST",
|
|
4741
4451
|
path: "/automation/v1/triggers",
|
|
4742
4452
|
streaming: "no",
|
|
@@ -4838,8 +4548,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4838
4548
|
{
|
|
4839
4549
|
resource: "automation.triggers",
|
|
4840
4550
|
method: "preview",
|
|
4841
|
-
summary: "Preview a trigger schedule",
|
|
4842
|
-
description: "Validate a schedule and preview up to five future firing times. The timezone is validated and a readable description is returned, without creating a trigger or run.",
|
|
4843
4551
|
http: "POST",
|
|
4844
4552
|
path: "/automation/v1/triggers/preview",
|
|
4845
4553
|
streaming: "no",
|
|
@@ -4867,8 +4575,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4867
4575
|
{
|
|
4868
4576
|
resource: "automation.triggers",
|
|
4869
4577
|
method: "delete",
|
|
4870
|
-
summary: "Delete a trigger",
|
|
4871
|
-
description: "Delete the trigger and its firing history, returning 204. Runs already started are unaffected. Definition-managed triggers return 409 TRIGGER_MANAGED; remove schedule from the workflow and publish it again.",
|
|
4872
4578
|
http: "DELETE",
|
|
4873
4579
|
path: "/automation/v1/triggers/{id}",
|
|
4874
4580
|
streaming: "no",
|
|
@@ -4884,8 +4590,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4884
4590
|
{
|
|
4885
4591
|
resource: "automation.triggers",
|
|
4886
4592
|
method: "retrieve",
|
|
4887
|
-
summary: "Get a trigger",
|
|
4888
|
-
description: "Read schedule, state, upcoming times and latest firing. Use the ETag to update; the full webhook URL is not returned again.",
|
|
4889
4593
|
http: "GET",
|
|
4890
4594
|
path: "/automation/v1/triggers/{id}",
|
|
4891
4595
|
streaming: "no",
|
|
@@ -4901,8 +4605,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
4901
4605
|
{
|
|
4902
4606
|
resource: "automation.triggers",
|
|
4903
4607
|
method: "update",
|
|
4904
|
-
summary: "Update a trigger",
|
|
4905
|
-
description: "Update configuration with If-Match matching the current ETag, revalidating target input and schedule. kind is immutable and definition-managed triggers reject updates with TRIGGER_MANAGED.",
|
|
4906
4608
|
http: "PATCH",
|
|
4907
4609
|
path: "/automation/v1/triggers/{id}",
|
|
4908
4610
|
streaming: "no",
|
|
@@ -5009,8 +4711,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5009
4711
|
{
|
|
5010
4712
|
resource: "automation.triggers",
|
|
5011
4713
|
method: "fire",
|
|
5012
|
-
summary: "Fire a trigger now",
|
|
5013
|
-
description: "Fire once now and return a Firing, subject to current state, catchup window and overlap rules. Run-launch failures are recorded in the firing error.",
|
|
5014
4714
|
http: "POST",
|
|
5015
4715
|
path: "/automation/v1/triggers/{id}/fire",
|
|
5016
4716
|
streaming: "no",
|
|
@@ -5026,8 +4726,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5026
4726
|
{
|
|
5027
4727
|
resource: "automation.triggers.firings",
|
|
5028
4728
|
method: "list",
|
|
5029
|
-
summary: "List trigger firings",
|
|
5030
|
-
description: "Read the last 30 days of firings newest first. Results include resolved versions, run IDs and failure details.",
|
|
5031
4729
|
http: "GET",
|
|
5032
4730
|
path: "/automation/v1/triggers/{id}/firings",
|
|
5033
4731
|
streaming: "no",
|
|
@@ -5077,8 +4775,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5077
4775
|
{
|
|
5078
4776
|
resource: "automation.triggers",
|
|
5079
4777
|
method: "pause",
|
|
5080
|
-
summary: "Pause a trigger",
|
|
5081
|
-
description: "Pause new firings without terminating existing runs. Definition-managed triggers can also be paused.",
|
|
5082
4778
|
http: "POST",
|
|
5083
4779
|
path: "/automation/v1/triggers/{id}/pause",
|
|
5084
4780
|
streaming: "no",
|
|
@@ -5094,8 +4790,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5094
4790
|
{
|
|
5095
4791
|
resource: "automation.triggers",
|
|
5096
4792
|
method: "resume",
|
|
5097
|
-
summary: "Resume a trigger",
|
|
5098
|
-
description: "Resume firings and reset consecutive failures. Triggers past their end time or finished one-time schedules remain expired; a full enabled-trigger quota returns TRIGGER_LIMIT.",
|
|
5099
4793
|
http: "POST",
|
|
5100
4794
|
path: "/automation/v1/triggers/{id}/resume",
|
|
5101
4795
|
streaming: "no",
|
|
@@ -5111,8 +4805,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5111
4805
|
{
|
|
5112
4806
|
resource: "automation.triggers",
|
|
5113
4807
|
method: "rotateWebhook",
|
|
5114
|
-
summary: "Rotate a webhook URL",
|
|
5115
|
-
description: "For webhook triggers only: invalidate the old token immediately and return a new full webhook_url. Later detail reads do not reveal the full URL.",
|
|
5116
4808
|
http: "POST",
|
|
5117
4809
|
path: "/automation/v1/triggers/{id}/rotate-webhook",
|
|
5118
4810
|
streaming: "no",
|
|
@@ -5128,8 +4820,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5128
4820
|
{
|
|
5129
4821
|
resource: "automation.validate",
|
|
5130
4822
|
method: "create",
|
|
5131
|
-
summary: "Validate a definition",
|
|
5132
|
-
description: "Check source without executing it when you need diagnostics, inferred schemas or references. This is optional before praxis.automation.runs.create, which also validates source before execution. Actions, scripts and workflows are supported; results include validity without saving. Invalid source is reported with valid=false. Script/action output schemas are inferred from return types: Promise unwrapping, Record, intersections and Date. Unknown types yield an empty schema and a warning in warnings. Source diagnostics use /source or /implementation/source with 1-based line/column. For kind=action the same admission checks as action creation apply (no external imports, platform operations only as direct call(praxis/<api>.<op>, input) calls, no agent or automation calls), so source that validates is not rejected at creation.",
|
|
5133
4823
|
http: "POST",
|
|
5134
4824
|
path: "/automation/v1/validate",
|
|
5135
4825
|
streaming: "no",
|
|
@@ -5162,8 +4852,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5162
4852
|
{
|
|
5163
4853
|
resource: "automation.workflows",
|
|
5164
4854
|
method: "list",
|
|
5165
|
-
summary: "List workflows",
|
|
5166
|
-
description: "List visible workflow summaries, latest versions, tags and seven-day statistics. Archived entries are excluded by default.",
|
|
5167
4855
|
http: "GET",
|
|
5168
4856
|
path: "/automation/v1/workflows",
|
|
5169
4857
|
streaming: "no",
|
|
@@ -5235,8 +4923,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5235
4923
|
{
|
|
5236
4924
|
resource: "automation.workflows",
|
|
5237
4925
|
method: "create",
|
|
5238
|
-
summary: "Create a workflow",
|
|
5239
|
-
description: "Save a YAML workflow as an editable draft without publishing or starting a run. Choose your own namespace without registering it first; praxis is read-only. To test the draft, send its source and language=yaml to praxis.automation.runs.create. Scripts and workflows share names within the tenant; a duplicate returns NAME_TAKEN. run.workflow accepts ns/name@range or {namespace, name, version, input}; run.script uses the same reference shape as a platform extension. Object namespace, name and version are required; version accepts an exact version, dist-tag or range, locked at publication. Object input defaults to {} and supports expressions; string references retain task-level with. run.await defaults to true and returns the child output. With false, the child uses detach and the task immediately returns {run_id}; parent cancellation does not cascade. Inline script.code returns DEFINITION_INVALID with a detail asking you to save a script and reference it first. raise.error retains its type URI, status, title and detail in the run error.",
|
|
5240
4926
|
http: "POST",
|
|
5241
4927
|
path: "/automation/v1/workflows",
|
|
5242
4928
|
streaming: "no",
|
|
@@ -5282,8 +4968,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5282
4968
|
{
|
|
5283
4969
|
resource: "automation.workflows",
|
|
5284
4970
|
method: "retrieve",
|
|
5285
|
-
summary: "Get a workflow",
|
|
5286
|
-
description: "Read workflow details and draft source. The ETag is the draft revision to use in If-Match for updates.",
|
|
5287
4971
|
http: "GET",
|
|
5288
4972
|
path: "/automation/v1/workflows/{ns}/{name}",
|
|
5289
4973
|
streaming: "no",
|
|
@@ -5303,8 +4987,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5303
4987
|
{
|
|
5304
4988
|
resource: "automation.workflows",
|
|
5305
4989
|
method: "update",
|
|
5306
|
-
summary: "Update a workflow draft",
|
|
5307
|
-
description: "Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.",
|
|
5308
4990
|
http: "PATCH",
|
|
5309
4991
|
path: "/automation/v1/workflows/{ns}/{name}",
|
|
5310
4992
|
streaming: "no",
|
|
@@ -5347,8 +5029,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5347
5029
|
{
|
|
5348
5030
|
resource: "automation.workflows",
|
|
5349
5031
|
method: "archive",
|
|
5350
|
-
summary: "Archive a workflow",
|
|
5351
|
-
description: "Keep the name, versions and draft while archiving. The default list hides it and new target resolution and run requests reject the archived target.",
|
|
5352
5032
|
http: "POST",
|
|
5353
5033
|
path: "/automation/v1/workflows/{ns}/{name}/archive",
|
|
5354
5034
|
streaming: "no",
|
|
@@ -5372,8 +5052,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5372
5052
|
{
|
|
5373
5053
|
resource: "automation.workflows.distTags",
|
|
5374
5054
|
method: "list",
|
|
5375
|
-
summary: "List workflow tags",
|
|
5376
|
-
description: "Read the exact version for each distribution tag. Results include the update time and updater.",
|
|
5377
5055
|
http: "GET",
|
|
5378
5056
|
path: "/automation/v1/workflows/{ns}/{name}/dist-tags",
|
|
5379
5057
|
streaming: "no",
|
|
@@ -5393,8 +5071,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5393
5071
|
{
|
|
5394
5072
|
resource: "automation.workflows.distTags",
|
|
5395
5073
|
method: "delete",
|
|
5396
|
-
summary: "Delete a workflow tag",
|
|
5397
|
-
description: "Delete a distribution tag while retaining versions. latest cannot be deleted, versions and ranges are invalid tags, and deleting an absent valid tag is repeatable.",
|
|
5398
5074
|
http: "DELETE",
|
|
5399
5075
|
path: "/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}",
|
|
5400
5076
|
streaming: "no",
|
|
@@ -5418,8 +5094,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5418
5094
|
{
|
|
5419
5095
|
resource: "automation.workflows.distTags",
|
|
5420
5096
|
method: "set",
|
|
5421
|
-
summary: "Set a workflow tag",
|
|
5422
|
-
description: "Point a distribution tag at an existing exact version; tags cannot be versions or version ranges. Moving latest can roll back a release and synchronizes workflow schedules.",
|
|
5423
5097
|
http: "PUT",
|
|
5424
5098
|
path: "/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}",
|
|
5425
5099
|
streaming: "no",
|
|
@@ -5454,8 +5128,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5454
5128
|
{
|
|
5455
5129
|
resource: "automation.workflows",
|
|
5456
5130
|
method: "restore",
|
|
5457
|
-
summary: "Restore a workflow",
|
|
5458
|
-
description: "Restore an archived definition with its versions and tags. The name is retained.",
|
|
5459
5131
|
http: "POST",
|
|
5460
5132
|
path: "/automation/v1/workflows/{ns}/{name}/restore",
|
|
5461
5133
|
streaming: "no",
|
|
@@ -5479,8 +5151,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5479
5151
|
{
|
|
5480
5152
|
resource: "automation.workflows.versions",
|
|
5481
5153
|
method: "list",
|
|
5482
|
-
summary: "List workflow versions",
|
|
5483
|
-
description: "Page through immutable schemas and locked dependencies in descending semantic-version order. Lists omit source by default; only expand=source includes full source, and other values return 400. Detail endpoints retain full source.",
|
|
5484
5154
|
http: "GET",
|
|
5485
5155
|
path: "/automation/v1/workflows/{ns}/{name}/versions",
|
|
5486
5156
|
streaming: "no",
|
|
@@ -5525,8 +5195,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5525
5195
|
aliases: [
|
|
5526
5196
|
"publish"
|
|
5527
5197
|
],
|
|
5528
|
-
summary: "Publish a workflow version",
|
|
5529
|
-
description: "Publish a saved definition from its draft or an ad hoc run as a reusable version for named runs or triggers, validating the definition and locking dependencies. To test unpublished code, use praxis.automation.runs.create with source and language instead. Use draft.revision from create or retrieve as expected_draft_revision. The draft must match expected_draft_revision; an ad hoc run requires from_run and expected_source_sha256. The same version and contents return the existing version; different contents return VERSION_EXISTS, prereleases require an explicit tag (not latest, URL-safe characters only, not a version or range; violations return TAG_REQUIRED or TAG_INVALID with the complete rules in hint), and invalid definitions return DEFINITION_INVALID. Stable releases automatically advance latest only above the highest existing stable version; workflows becoming latest synchronize their declared schedule. String and object run.workflow/run.script references share version resolution and dependency locking. Publishing removes +build metadata from the version number.",
|
|
5530
5198
|
http: "POST",
|
|
5531
5199
|
path: "/automation/v1/workflows/{ns}/{name}/versions",
|
|
5532
5200
|
streaming: "no",
|
|
@@ -5550,8 +5218,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5550
5218
|
{
|
|
5551
5219
|
resource: "automation.workflows.versions",
|
|
5552
5220
|
method: "retrieve",
|
|
5553
|
-
summary: "Get a workflow version",
|
|
5554
|
-
description: "Read source, input/output schemas and deprecation details for an exact version. Missing versions return VERSION_NOT_FOUND. Details always return full source. version accepts an exact version or dist-tag; a range returns 400 with a hint to use /resolve.",
|
|
5555
5221
|
http: "GET",
|
|
5556
5222
|
path: "/automation/v1/workflows/{ns}/{name}/versions/{version}",
|
|
5557
5223
|
streaming: "no",
|
|
@@ -5575,8 +5241,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5575
5241
|
{
|
|
5576
5242
|
resource: "automation.workflows.versions",
|
|
5577
5243
|
method: "deprecate",
|
|
5578
|
-
summary: "Deprecate a workflow version",
|
|
5579
|
-
description: "Record a deprecation message; an empty message removes deprecation without changing the version source.",
|
|
5580
5244
|
http: "POST",
|
|
5581
5245
|
path: "/automation/v1/workflows/{ns}/{name}/versions/{version}/deprecate",
|
|
5582
5246
|
streaming: "no",
|
|
@@ -5611,8 +5275,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5611
5275
|
{
|
|
5612
5276
|
resource: "browser.connect",
|
|
5613
5277
|
method: "retrieve",
|
|
5614
|
-
summary: "连接云端浏览器",
|
|
5615
|
-
description: "CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl。",
|
|
5616
5278
|
http: "GET",
|
|
5617
5279
|
path: "/browser/v1/connect",
|
|
5618
5280
|
streaming: "no",
|
|
@@ -5678,8 +5340,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5678
5340
|
{
|
|
5679
5341
|
resource: "browser.contexts",
|
|
5680
5342
|
method: "list",
|
|
5681
|
-
summary: "列出浏览器上下文",
|
|
5682
|
-
description: "分页列出当前账户保存的登录态,按登录态 ID 升序排列。每项返回名称、标签及保存内容的统计信息;将 nextCursor 原样传入读取下一页,直到其为 null。",
|
|
5683
5343
|
http: "GET",
|
|
5684
5344
|
path: "/browser/v1/contexts",
|
|
5685
5345
|
streaming: "no",
|
|
@@ -5703,8 +5363,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5703
5363
|
{
|
|
5704
5364
|
resource: "browser.contexts",
|
|
5705
5365
|
method: "create",
|
|
5706
|
-
summary: "创建浏览器上下文",
|
|
5707
|
-
description: "创建空的浏览器登录态,用于在会话之间保存 cookie 和 localStorage。将返回的 id 传入 browserSettings.context.id,并设置 persist=true 才会保存会话中的更新。",
|
|
5708
5366
|
http: "POST",
|
|
5709
5367
|
path: "/browser/v1/contexts",
|
|
5710
5368
|
streaming: "no",
|
|
@@ -5738,8 +5396,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5738
5396
|
{
|
|
5739
5397
|
resource: "browser.contexts",
|
|
5740
5398
|
method: "delete",
|
|
5741
|
-
summary: "删除浏览器上下文",
|
|
5742
|
-
description: "删除当前账户的指定登录态及其保存内容,成功返回 deleted=true。登录态存在有效写入租约时返回 409 CONTEXT_LOCKED,应在写入会话结束并释放租约后重试。",
|
|
5743
5399
|
http: "DELETE",
|
|
5744
5400
|
path: "/browser/v1/contexts/{contextId}",
|
|
5745
5401
|
streaming: "no",
|
|
@@ -5755,8 +5411,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5755
5411
|
{
|
|
5756
5412
|
resource: "browser.contexts",
|
|
5757
5413
|
method: "retrieve",
|
|
5758
|
-
summary: "读取浏览器上下文",
|
|
5759
|
-
description: "读取当前账户的指定登录态元数据、保存内容统计及写入租约持有者,不返回 cookie 或 localStorage 内容。contextId 使用创建或列表返回的 id;不存在或不属于当前账户时返回 404。",
|
|
5760
5414
|
http: "GET",
|
|
5761
5415
|
path: "/browser/v1/contexts/{contextId}",
|
|
5762
5416
|
streaming: "no",
|
|
@@ -5772,8 +5426,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5772
5426
|
{
|
|
5773
5427
|
resource: "browser.contexts",
|
|
5774
5428
|
method: "update",
|
|
5775
|
-
summary: "更新浏览器上下文",
|
|
5776
|
-
description: "更新登录态的名称和标签并返回更新后的对象,不修改已保存的 cookie 或 localStorage。省略字段保留原值;空名称清除名称,传入 labels 会整体替换标签,空对象清除标签。",
|
|
5777
5429
|
http: "PUT",
|
|
5778
5430
|
path: "/browser/v1/contexts/{contextId}",
|
|
5779
5431
|
streaming: "no",
|
|
@@ -5806,8 +5458,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5806
5458
|
{
|
|
5807
5459
|
resource: "browser.live",
|
|
5808
5460
|
method: "retrieve",
|
|
5809
|
-
summary: "打开实时浏览器画面",
|
|
5810
|
-
description: "使用 debug 返回的完整实时观看地址打开浏览器画面,成功后跳转到对应会话或标签页。必须保留地址中的 t 凭证,无需额外 API Key;链接失效时重新调用 debug 获取地址。",
|
|
5811
5461
|
http: "GET",
|
|
5812
5462
|
path: "/browser/v1/live/{sessionId}/{pageId}",
|
|
5813
5463
|
streaming: "no",
|
|
@@ -5834,8 +5484,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5834
5484
|
{
|
|
5835
5485
|
resource: "browser.seleniumUnsupported",
|
|
5836
5486
|
method: "retrieve",
|
|
5837
|
-
summary: "读取 Selenium 不支持提示",
|
|
5838
|
-
description: "seleniumRemoteUrl 指向此地址;不支持 Selenium,请使用 Playwright 或 Puppeteer。",
|
|
5839
5487
|
http: "GET",
|
|
5840
5488
|
path: "/browser/v1/selenium-unsupported",
|
|
5841
5489
|
streaming: "no",
|
|
@@ -5846,8 +5494,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5846
5494
|
{
|
|
5847
5495
|
resource: "browser.sessions",
|
|
5848
5496
|
method: "list",
|
|
5849
|
-
summary: "列出浏览器会话",
|
|
5850
|
-
description: "分页列出当前账户的浏览器会话,按创建时刻及 ID 降序排列。可组合状态、名称、标签和用户元数据筛选;将返回的 nextCursor 原样传入以继续读取。",
|
|
5851
5497
|
http: "GET",
|
|
5852
5498
|
path: "/browser/v1/sessions",
|
|
5853
5499
|
streaming: "no",
|
|
@@ -5902,8 +5548,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5902
5548
|
{
|
|
5903
5549
|
resource: "browser.sessions",
|
|
5904
5550
|
method: "create",
|
|
5905
|
-
summary: "创建浏览器会话",
|
|
5906
|
-
description: "创建云端 Chrome,返回自带凭证的 connectUrl。API 会话默认断开后结束;最长 6 小时。",
|
|
5907
5551
|
http: "POST",
|
|
5908
5552
|
path: "/browser/v1/sessions",
|
|
5909
5553
|
streaming: "no",
|
|
@@ -5979,8 +5623,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
5979
5623
|
{
|
|
5980
5624
|
resource: "browser.sessions",
|
|
5981
5625
|
method: "retrieve",
|
|
5982
|
-
summary: "读取浏览器会话",
|
|
5983
|
-
description: "读取当前账户的指定会话及其最新状态,sessionId 使用创建或列表返回的 id。expand=debug,events 可同时取得实时观看地址和事件首页;不存在或不属于当前账户时返回 404。",
|
|
5984
5626
|
http: "GET",
|
|
5985
5627
|
path: "/browser/v1/sessions/{sessionId}",
|
|
5986
5628
|
streaming: "no",
|
|
@@ -6003,8 +5645,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6003
5645
|
{
|
|
6004
5646
|
resource: "browser.sessions",
|
|
6005
5647
|
method: "update",
|
|
6006
|
-
summary: "关闭浏览器会话",
|
|
6007
|
-
description: '关闭指定浏览器会话,返回关闭后的会话对象。请求体为 {"status":"REQUEST_RELEASE"};若返回 409 SESSION_INVALID_STATE,可再次读取会话确认状态;已结束的会话可重复请求关闭。',
|
|
6008
5648
|
http: "POST",
|
|
6009
5649
|
path: "/browser/v1/sessions/{sessionId}",
|
|
6010
5650
|
streaming: "no",
|
|
@@ -6034,8 +5674,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6034
5674
|
{
|
|
6035
5675
|
resource: "browser.sessions",
|
|
6036
5676
|
method: "retrieveDebug",
|
|
6037
|
-
summary: "读取调试地址",
|
|
6038
|
-
description: "读取当前会话及各标签页的实时观看地址和 CDP 连接地址。直接使用返回的完整链接,保留查询凭证;会话不在运行状态时 pages 为空,返回地址不代表会话仍可连接。",
|
|
6039
5677
|
http: "GET",
|
|
6040
5678
|
path: "/browser/v1/sessions/{sessionId}/debug",
|
|
6041
5679
|
streaming: "no",
|
|
@@ -6051,8 +5689,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6051
5689
|
{
|
|
6052
5690
|
resource: "browser.sessions.events",
|
|
6053
5691
|
method: "list",
|
|
6054
|
-
summary: "列出会话事件",
|
|
6055
|
-
description: "按事件序号升序读取指定会话的事件账本,包含生命周期和接管等事件,不包含页面点击或输入内容。可按 types 筛选,并将 nextCursor 原样传入读取后续页。",
|
|
6056
5692
|
http: "GET",
|
|
6057
5693
|
path: "/browser/v1/sessions/{sessionId}/events",
|
|
6058
5694
|
streaming: "no",
|
|
@@ -6087,8 +5723,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6087
5723
|
{
|
|
6088
5724
|
resource: "browser.sessions.handoff",
|
|
6089
5725
|
method: "create",
|
|
6090
|
-
summary: "请求人工接管",
|
|
6091
|
-
description: "为运行中的会话发起人工接管请求,返回接管请求事件。请求尚未过期或完成时,CDP 客户端的 Input.* 指令会被拒绝;再次请求会替换已有的接管说明和到期时刻。",
|
|
6092
5726
|
http: "POST",
|
|
6093
5727
|
path: "/browser/v1/sessions/{sessionId}/handoff",
|
|
6094
5728
|
streaming: "no",
|
|
@@ -6121,8 +5755,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6121
5755
|
{
|
|
6122
5756
|
resource: "browser.sessions.handoff",
|
|
6123
5757
|
method: "complete",
|
|
6124
|
-
summary: "完成人工接管",
|
|
6125
|
-
description: "完成运行中会话的待处理人工接管,清除接管请求并返回完成事件,客户端可恢复发送 Input.* 指令。没有请求或请求已过期时返回 409 HANDOFF_NOT_PENDING。",
|
|
6126
5758
|
http: "POST",
|
|
6127
5759
|
path: "/browser/v1/sessions/{sessionId}/handoff/complete",
|
|
6128
5760
|
streaming: "no",
|
|
@@ -6138,8 +5770,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6138
5770
|
{
|
|
6139
5771
|
resource: "browser.sessions",
|
|
6140
5772
|
method: "stream",
|
|
6141
|
-
summary: "订阅会话动态",
|
|
6142
|
-
description: "SSE:event 为 snapshot、session、pages、action、event 或 end,data 为对应 JSON。先发送 snapshot 快照,再推送实时变化和 ping 注释;end 后关闭。不支持按 Last-Event-ID 历史重放。",
|
|
6143
5773
|
http: "GET",
|
|
6144
5774
|
path: "/browser/v1/sessions/{sessionId}/stream",
|
|
6145
5775
|
streaming: "always",
|
|
@@ -6155,8 +5785,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6155
5785
|
{
|
|
6156
5786
|
resource: "browser.sessions.viewer",
|
|
6157
5787
|
method: "create",
|
|
6158
|
-
summary: "更新查看者心跳",
|
|
6159
|
-
description: "登记运行中会话的观看者仍在线,以免无人连接时因空闲被释放。观看页面可见期间为同一观看者重复发送相同 viewerId;停止观看后停止发送,过期心跳不再计为在线。",
|
|
6160
5788
|
http: "POST",
|
|
6161
5789
|
path: "/browser/v1/sessions/{sessionId}/viewer",
|
|
6162
5790
|
streaming: "no",
|
|
@@ -6183,8 +5811,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6183
5811
|
{
|
|
6184
5812
|
resource: "database.databases",
|
|
6185
5813
|
method: "list",
|
|
6186
|
-
summary: "List databases",
|
|
6187
|
-
description: "Find databases owned by your tenant and obtain their ids for schema or row operations. Excludes deleting by default. status=active or status=deleting selects that state; invalid values return 400 INVALID_PARAMS.",
|
|
6188
5814
|
http: "GET",
|
|
6189
5815
|
path: "/database/v1/databases",
|
|
6190
5816
|
streaming: "no",
|
|
@@ -6224,8 +5850,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6224
5850
|
{
|
|
6225
5851
|
resource: "database.databases",
|
|
6226
5852
|
method: "create",
|
|
6227
|
-
summary: "Create database",
|
|
6228
|
-
description: "Creates an empty database for the caller and returns it with status active (HTTP 201); add tables next with praxis.database.databases.tables.create. name is required and is 1–64 visible characters after trimming. labels are optional string tags (at most 64; each key starts with a lowercase letter and uses up to 63 characters of a-z 0-9 _ -; each value is up to 63 characters of a-z 0-9 _ -) that databaseListDatabases can filter on. If initialization fails the call returns 503 CAPACITY and the half-created database is left with status failed; retry by calling create again, which makes a new database. Unlike Supabase, this creates a SQLite-backed database without a PostgreSQL connection or SQL execution endpoint. Use a Praxis credential; access is scoped to its tenant, not to Supabase Auth users or RLS policies.",
|
|
6229
5853
|
http: "POST",
|
|
6230
5854
|
path: "/database/v1/databases",
|
|
6231
5855
|
streaming: "no",
|
|
@@ -6253,8 +5877,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6253
5877
|
{
|
|
6254
5878
|
resource: "database.databases",
|
|
6255
5879
|
method: "delete",
|
|
6256
|
-
summary: "Delete database",
|
|
6257
|
-
description: "Soft-delete a database when it should stop accepting schema and row operations. Idempotently enters deleting with a seven-day purge_at. GET remains available; child operations return 409 until restored.",
|
|
6258
5880
|
http: "DELETE",
|
|
6259
5881
|
path: "/database/v1/databases/{database_id}",
|
|
6260
5882
|
streaming: "no",
|
|
@@ -6270,8 +5892,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6270
5892
|
{
|
|
6271
5893
|
resource: "database.databases",
|
|
6272
5894
|
method: "retrieve",
|
|
6273
|
-
summary: "Get database",
|
|
6274
|
-
description: "Returns one database by id, including a database in the deleting state (purge_at then shows when it will be permanently removed). Call it before table or row operations to confirm status is active: schema and row calls on a deleting database return 409 DATABASE_INVALID_STATE. size_bytes is refreshed from live storage at most once every five seconds. A purged or unknown id returns 404 DATABASE_NOT_FOUND.",
|
|
6275
5895
|
http: "GET",
|
|
6276
5896
|
path: "/database/v1/databases/{database_id}",
|
|
6277
5897
|
streaming: "no",
|
|
@@ -6287,8 +5907,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6287
5907
|
{
|
|
6288
5908
|
resource: "database.databases",
|
|
6289
5909
|
method: "update",
|
|
6290
|
-
summary: "Update database",
|
|
6291
|
-
description: "Renames an active database and/or replaces its labels; send only the keys you want to change. labels is replaced as a whole, not merged, so include every label you want to keep. A body without name or labels, or with values equal to the current ones, changes nothing and leaves updated_at as is. A database in the deleting state returns 409 DATABASE_INVALID_STATE; restore it first with databaseRestoreDatabase.",
|
|
6292
5910
|
http: "PATCH",
|
|
6293
5911
|
path: "/database/v1/databases/{database_id}",
|
|
6294
5912
|
streaming: "no",
|
|
@@ -6321,8 +5939,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6321
5939
|
{
|
|
6322
5940
|
resource: "database.databases.events",
|
|
6323
5941
|
method: "list",
|
|
6324
|
-
summary: "List events",
|
|
6325
|
-
description: "Read lifecycle and schema events, including while the database is deleting. next_cursor is an opaque string cursor (do not do arithmetic on it): pass it as after_seq for asc or before_seq for desc. Supplying both cursors returns 400 INVALID_PARAMS. Unlike Supabase Realtime, this is paged lifecycle and schema history, not a subscription or a row-change feed; row inserts, updates and deletes do not appear here.",
|
|
6326
5942
|
http: "GET",
|
|
6327
5943
|
path: "/database/v1/databases/{database_id}/events",
|
|
6328
5944
|
streaming: "no",
|
|
@@ -6367,8 +5983,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6367
5983
|
{
|
|
6368
5984
|
resource: "database.databases.purge",
|
|
6369
5985
|
method: "create",
|
|
6370
|
-
summary: "Permanently purge database",
|
|
6371
|
-
description: "Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.",
|
|
6372
5986
|
http: "POST",
|
|
6373
5987
|
path: "/database/v1/databases/{database_id}/purge",
|
|
6374
5988
|
streaming: "no",
|
|
@@ -6384,8 +5998,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6384
5998
|
{
|
|
6385
5999
|
resource: "database.databases.rest",
|
|
6386
6000
|
method: "delete",
|
|
6387
|
-
summary: "Delete rows",
|
|
6388
|
-
description: "Deletes the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. Deletion is immediate and cannot be undone. A row that a link field of another table still references makes the whole call fail with 409 REFERENCE_RESTRICT and nothing is deleted. The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the deleted rows.",
|
|
6389
6001
|
http: "DELETE",
|
|
6390
6002
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6391
6003
|
streaming: "no",
|
|
@@ -6472,8 +6084,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6472
6084
|
{
|
|
6473
6085
|
resource: "database.databases.rest",
|
|
6474
6086
|
method: "retrieve",
|
|
6475
|
-
summary: "Select rows",
|
|
6476
|
-
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. Praxis SDK/codemode methods return the body only; a page length is not a total unless you know all matches fit in that page.",
|
|
6477
6087
|
http: "GET",
|
|
6478
6088
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6479
6089
|
streaming: "no",
|
|
@@ -6560,8 +6170,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6560
6170
|
{
|
|
6561
6171
|
resource: "database.databases.rest",
|
|
6562
6172
|
method: "head",
|
|
6563
|
-
summary: "Count rows",
|
|
6564
|
-
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. Praxis SDK/codemode methods return only the empty body, not the Content-Range response header; use an HTTP client when you need that header.",
|
|
6565
6173
|
http: "HEAD",
|
|
6566
6174
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6567
6175
|
streaming: "no",
|
|
@@ -6648,8 +6256,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6648
6256
|
{
|
|
6649
6257
|
resource: "database.databases.rest",
|
|
6650
6258
|
method: "update",
|
|
6651
|
-
summary: "Update rows",
|
|
6652
|
-
description: "Updates the rows matched by the filter query parameters (the same filters as databaseSelect); with no filter every row of the table matches. The JSON object body lists only the fields to change, other fields keep their values, and id cannot be changed. Values are validated against the field types and the required and unique settings (400 VALIDATION_FAILED, 409 UNIQUE_VIOLATION). The default response is 204 with no body; send Prefer: return=representation to get HTTP 200 with the updated rows. Each changed row's _version increases by one.",
|
|
6653
6259
|
http: "PATCH",
|
|
6654
6260
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6655
6261
|
streaming: "no",
|
|
@@ -6740,10 +6346,6 @@ Available only on /agent/v1. Use the message_id field from own-face events, not
|
|
|
6740
6346
|
{
|
|
6741
6347
|
resource: "database.databases.rest",
|
|
6742
6348
|
method: "create",
|
|
6743
|
-
summary: "Insert rows",
|
|
6744
|
-
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.
|
|
6745
|
-
Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
6746
|
-
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.`,
|
|
6747
6349
|
http: "POST",
|
|
6748
6350
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6749
6351
|
streaming: "no",
|
|
@@ -6834,8 +6436,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6834
6436
|
{
|
|
6835
6437
|
resource: "database.databases",
|
|
6836
6438
|
method: "restore",
|
|
6837
|
-
summary: "Restore database",
|
|
6838
|
-
description: "Recover a soft-deleted database within its seven-day recovery window. Restore before purge_at. An empty body is accepted. Active databases return 409; purged databases return 404.",
|
|
6839
6439
|
http: "POST",
|
|
6840
6440
|
path: "/database/v1/databases/{database_id}/restore",
|
|
6841
6441
|
streaming: "no",
|
|
@@ -6851,8 +6451,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6851
6451
|
{
|
|
6852
6452
|
resource: "database.databases.tables",
|
|
6853
6453
|
method: "list",
|
|
6854
|
-
summary: "List tables",
|
|
6855
|
-
description: "Lists every table of an active database with its field definitions. A database holds at most 50 tables, so the single page contains all of them and next_cursor is always null. Use databaseGetTable instead when you also need row_count for one table.",
|
|
6856
6454
|
http: "GET",
|
|
6857
6455
|
path: "/database/v1/databases/{database_id}/tables",
|
|
6858
6456
|
streaming: "no",
|
|
@@ -6868,8 +6466,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6868
6466
|
{
|
|
6869
6467
|
resource: "database.databases.tables",
|
|
6870
6468
|
method: "create",
|
|
6871
|
-
summary: "Create table",
|
|
6872
|
-
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. 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.",
|
|
6873
6469
|
http: "POST",
|
|
6874
6470
|
path: "/database/v1/databases/{database_id}/tables",
|
|
6875
6471
|
streaming: "no",
|
|
@@ -6909,8 +6505,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6909
6505
|
{
|
|
6910
6506
|
resource: "database.databases.tables",
|
|
6911
6507
|
method: "delete",
|
|
6912
|
-
summary: "Delete table",
|
|
6913
|
-
description: "Permanently drops a table with all of its rows; the deletion is immediate and has no recovery window or undo. Refused with 409 REFERENCE_RESTRICT while a link field of another table points at this table, so delete or change those fields first. Returns {deleted: true}. A table name can be reused afterwards.",
|
|
6914
6508
|
http: "DELETE",
|
|
6915
6509
|
path: "/database/v1/databases/{database_id}/tables/{table}",
|
|
6916
6510
|
streaming: "no",
|
|
@@ -6930,8 +6524,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6930
6524
|
{
|
|
6931
6525
|
resource: "database.databases.tables",
|
|
6932
6526
|
method: "retrieve",
|
|
6933
|
-
summary: "Get table",
|
|
6934
|
-
description: "Returns one table by id or name with its field definitions, schema_revision and row_count. row_count is only returned by this operation, not by list or create. Use field ids from this response for stable references because field names can be renamed; an unknown table returns 404 TABLE_NOT_FOUND.",
|
|
6935
6527
|
http: "GET",
|
|
6936
6528
|
path: "/database/v1/databases/{database_id}/tables/{table}",
|
|
6937
6529
|
streaming: "no",
|
|
@@ -6951,8 +6543,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6951
6543
|
{
|
|
6952
6544
|
resource: "database.databases.tables",
|
|
6953
6545
|
method: "update",
|
|
6954
|
-
summary: "Update table",
|
|
6955
|
-
description: "Renames a table and/or changes its description; send only the keys to change, and send description null to clear it. The new name must follow ^[a-z_][a-z0-9_]{0,62}$ and be unused (409 UNIQUE_VIOLATION); ids are stable, so renaming never rewrites row data. A body with no changes or values equal to the current ones does not bump schema_revision. Fields cannot be changed here; use databaseAddField, databaseUpdateField and databaseDeleteField.",
|
|
6956
6546
|
http: "PATCH",
|
|
6957
6547
|
path: "/database/v1/databases/{database_id}/tables/{table}",
|
|
6958
6548
|
streaming: "no",
|
|
@@ -6989,8 +6579,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
6989
6579
|
{
|
|
6990
6580
|
resource: "database.databases.tables.fields",
|
|
6991
6581
|
method: "create",
|
|
6992
|
-
summary: "Add field",
|
|
6993
|
-
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. Scalar fields are indexed by default, while 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.",
|
|
6994
6582
|
http: "POST",
|
|
6995
6583
|
path: "/database/v1/databases/{database_id}/tables/{table}/fields",
|
|
6996
6584
|
streaming: "no",
|
|
@@ -7014,8 +6602,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7014
6602
|
{
|
|
7015
6603
|
resource: "database.databases.tables.fields",
|
|
7016
6604
|
method: "delete",
|
|
7017
|
-
summary: "Delete field",
|
|
7018
|
-
description: "Deletes one field definition from a table and returns the updated table; the deletion is immediate and has no recovery window. Look the field up by id or name. The field's index, if any, is dropped with it, and the name can be reused afterwards. Unknown fields return 400 FIELD_NOT_FOUND.",
|
|
7019
6605
|
http: "DELETE",
|
|
7020
6606
|
path: "/database/v1/databases/{database_id}/tables/{table}/fields/{field}",
|
|
7021
6607
|
streaming: "no",
|
|
@@ -7039,8 +6625,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7039
6625
|
{
|
|
7040
6626
|
resource: "database.databases.tables.fields",
|
|
7041
6627
|
method: "update",
|
|
7042
|
-
summary: "Update field",
|
|
7043
|
-
description: "Changes a field's name, description, required flag, indexed flag, default or json options.schema and returns the updated table. The field type, a link field's linked_table_id and the unique flag cannot be changed (400 FIELD_TYPE_IMMUTABLE or INVALID_PARAMS). Setting required to true fails with 400 VALIDATION_FAILED while existing rows hold null for the field. A new json schema constrains only later writes; existing rows are not revalidated. Renaming never rewrites row data, and a request that changes nothing does not bump schema_revision. Unlike Supabase, field types and uniqueness cannot be altered through SQL migrations; use the supported field settings described here.",
|
|
7044
6628
|
http: "PATCH",
|
|
7045
6629
|
path: "/database/v1/databases/{database_id}/tables/{table}/fields/{field}",
|
|
7046
6630
|
streaming: "no",
|
|
@@ -7105,8 +6689,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7105
6689
|
{
|
|
7106
6690
|
resource: "file.files",
|
|
7107
6691
|
method: "list",
|
|
7108
|
-
summary: "List files",
|
|
7109
|
-
description: "List live files owned by your tenant, optionally filtered by purpose or session scope_id. Results default to descending creation order with a limit of 10000. Page using after or before with a file ID from the list; these cursors are mutually exclusive. Deleted and expired files are excluded.",
|
|
7110
6692
|
http: "GET",
|
|
7111
6693
|
path: "/file/v1/files",
|
|
7112
6694
|
streaming: "no",
|
|
@@ -7159,8 +6741,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7159
6741
|
{
|
|
7160
6742
|
resource: "file.files",
|
|
7161
6743
|
method: "create",
|
|
7162
|
-
summary: "Upload file",
|
|
7163
|
-
description: 'Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 104857600 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. OpenAI Uploads chunking is not supported. 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.',
|
|
7164
6744
|
http: "POST",
|
|
7165
6745
|
path: "/file/v1/files",
|
|
7166
6746
|
streaming: "no",
|
|
@@ -7206,8 +6786,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7206
6786
|
{
|
|
7207
6787
|
resource: "file.files",
|
|
7208
6788
|
method: "delete",
|
|
7209
|
-
summary: "Delete file",
|
|
7210
|
-
description: "Delete a tenant-owned file. New metadata/content reads return not found. Already-authorized downloads may finish.",
|
|
7211
6789
|
http: "DELETE",
|
|
7212
6790
|
path: "/file/v1/files/{file_id}",
|
|
7213
6791
|
streaming: "no",
|
|
@@ -7223,8 +6801,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7223
6801
|
{
|
|
7224
6802
|
resource: "file.files",
|
|
7225
6803
|
method: "retrieve",
|
|
7226
|
-
summary: "Retrieve file",
|
|
7227
|
-
description: "Retrieve metadata for a live file owned by your tenant. Use its file_dp_ ID from upload or list. Missing, deleted, expired and other-tenant files return 404; use the content endpoint to download the bytes.",
|
|
7228
6804
|
http: "GET",
|
|
7229
6805
|
path: "/file/v1/files/{file_id}",
|
|
7230
6806
|
streaming: "no",
|
|
@@ -7240,8 +6816,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7240
6816
|
{
|
|
7241
6817
|
resource: "file.files",
|
|
7242
6818
|
method: "retrieveContent",
|
|
7243
|
-
summary: "Retrieve file content",
|
|
7244
|
-
description: "Download the original bytes of a live file owned by your tenant. Supply its file_dp_ 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.",
|
|
7245
6819
|
http: "GET",
|
|
7246
6820
|
path: "/file/v1/files/{file_id}/content",
|
|
7247
6821
|
streaming: "no",
|
|
@@ -7257,8 +6831,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7257
6831
|
{
|
|
7258
6832
|
resource: "knowledge.vectorStores",
|
|
7259
6833
|
method: "list",
|
|
7260
|
-
summary: "List knowledge bases",
|
|
7261
|
-
description: "Lists knowledge bases visible to the caller, newest first by default. Use last_id as after to read the next page; for example, ?limit=20.",
|
|
7262
6834
|
http: "GET",
|
|
7263
6835
|
path: "/knowledge/v1/vector_stores",
|
|
7264
6836
|
streaming: "no",
|
|
@@ -7308,8 +6880,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7308
6880
|
{
|
|
7309
6881
|
resource: "knowledge.vectorStores",
|
|
7310
6882
|
method: "create",
|
|
7311
|
-
summary: "Create knowledge base",
|
|
7312
|
-
description: 'Create a knowledge base, optionally starting ingestion of uploaded file_ids in the same call; no separate attachment or batch is needed for those files. Use the returned id with vectorStores.files.retrieve to poll each attachment until completed, failed or cancelled; store status=completed alone does not mean every file succeeded. Unlike OpenAI vector stores, each file is limited to 100000000 bytes and each account to 100 active/nondeleted stores. Minimal body: {"name":"Refund policies"}.',
|
|
7313
6883
|
http: "POST",
|
|
7314
6884
|
path: "/knowledge/v1/vector_stores",
|
|
7315
6885
|
streaming: "no",
|
|
@@ -7368,8 +6938,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7368
6938
|
{
|
|
7369
6939
|
resource: "knowledge.vectorStores",
|
|
7370
6940
|
method: "delete",
|
|
7371
|
-
summary: "Delete knowledge base",
|
|
7372
|
-
description: "Remove a knowledge base from active use while keeping a recovery window. Unlike OpenAI vector stores, native DELETE returns the store with status=deleting and ISO purge_at, retains it for 7 days and is idempotent on repeat. Retrieve remains 200; object operations return 409. Use restore before purge_at to recover it, or purge to remove it irreversibly.",
|
|
7373
6941
|
http: "DELETE",
|
|
7374
6942
|
path: "/knowledge/v1/vector_stores/{vector_store_id}",
|
|
7375
6943
|
streaming: "no",
|
|
@@ -7385,8 +6953,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7385
6953
|
{
|
|
7386
6954
|
resource: "knowledge.vectorStores",
|
|
7387
6955
|
method: "retrieve",
|
|
7388
|
-
summary: "Retrieve knowledge base",
|
|
7389
|
-
description: "Retrieves a knowledge base using an id returned by create or list. Add ?expand=files to include the first page of attached files. Soft-deleted stores remain readable with status=deleting until purged.",
|
|
7390
6956
|
http: "GET",
|
|
7391
6957
|
path: "/knowledge/v1/vector_stores/{vector_store_id}",
|
|
7392
6958
|
streaming: "no",
|
|
@@ -7423,8 +6989,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7423
6989
|
{
|
|
7424
6990
|
resource: "knowledge.vectorStores",
|
|
7425
6991
|
method: "update",
|
|
7426
|
-
summary: "Update knowledge base",
|
|
7427
|
-
description: 'Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.',
|
|
7428
6992
|
http: "POST",
|
|
7429
6993
|
path: "/knowledge/v1/vector_stores/{vector_store_id}",
|
|
7430
6994
|
streaming: "no",
|
|
@@ -7469,8 +7033,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7469
7033
|
{
|
|
7470
7034
|
resource: "knowledge.vectorStores.events",
|
|
7471
7035
|
method: "list",
|
|
7472
|
-
summary: "List events",
|
|
7473
|
-
description: "Reads events for this knowledge base in increasing sequence order, including while soft-deleted. Pass next_seq as after_seq to continue; null next_seq marks the current end. Example: ?after_seq=0&limit=20.",
|
|
7474
7036
|
http: "GET",
|
|
7475
7037
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/events",
|
|
7476
7038
|
streaming: "no",
|
|
@@ -7499,8 +7061,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7499
7061
|
{
|
|
7500
7062
|
resource: "knowledge.vectorStores.fileBatches",
|
|
7501
7063
|
method: "create",
|
|
7502
|
-
summary: "Create file batch",
|
|
7503
|
-
description: "Attaches existing Files as a batch for asynchronous ingestion. Supply exactly one of file_ids or files; files allows per-file settings. Existing attachments are reused. Read the returned batch id to monitor status.",
|
|
7504
7064
|
http: "POST",
|
|
7505
7065
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/file_batches",
|
|
7506
7066
|
streaming: "no",
|
|
@@ -7520,8 +7080,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7520
7080
|
{
|
|
7521
7081
|
resource: "knowledge.vectorStores.fileBatches",
|
|
7522
7082
|
method: "retrieve",
|
|
7523
|
-
summary: "Retrieve file batch",
|
|
7524
|
-
description: "Retrieves a batch created in this knowledge base, including current status and file counts. Use the batch id returned by batch creation to monitor ingestion.",
|
|
7525
7083
|
http: "GET",
|
|
7526
7084
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}",
|
|
7527
7085
|
streaming: "no",
|
|
@@ -7541,8 +7099,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7541
7099
|
{
|
|
7542
7100
|
resource: "knowledge.vectorStores.fileBatches",
|
|
7543
7101
|
method: "cancel",
|
|
7544
|
-
summary: "Cancel file batch",
|
|
7545
|
-
description: "Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).",
|
|
7546
7102
|
http: "POST",
|
|
7547
7103
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
|
|
7548
7104
|
streaming: "no",
|
|
@@ -7562,8 +7118,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7562
7118
|
{
|
|
7563
7119
|
resource: "knowledge.vectorStores.fileBatches.files",
|
|
7564
7120
|
method: "list",
|
|
7565
|
-
summary: "List batch files",
|
|
7566
|
-
description: "Lists files still attached from the identified batch, newest attachment first by default. Use the batch creation id and ?filter=failed to inspect failures; last_id is the next after cursor.",
|
|
7567
7121
|
http: "GET",
|
|
7568
7122
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files",
|
|
7569
7123
|
streaming: "no",
|
|
@@ -7624,8 +7178,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7624
7178
|
{
|
|
7625
7179
|
resource: "knowledge.vectorStores.files",
|
|
7626
7180
|
method: "list",
|
|
7627
|
-
summary: "List files",
|
|
7628
|
-
description: "Lists attached files and their ingestion status, newest attachment first by default. Use last_id as after to continue; ?filter=failed selects files that can be retried.",
|
|
7629
7181
|
http: "GET",
|
|
7630
7182
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files",
|
|
7631
7183
|
streaming: "no",
|
|
@@ -7682,8 +7234,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7682
7234
|
{
|
|
7683
7235
|
resource: "knowledge.vectorStores.files",
|
|
7684
7236
|
method: "create",
|
|
7685
|
-
summary: "Add file",
|
|
7686
|
-
description: "Attach an uploaded File for asynchronous ingestion, then poll this attachment until status is completed, failed or cancelled before searching. Unlike OpenAI vector stores, the file limit is 100000000 bytes; chunk sizes use estimated tokens rather than a model tokenizer. Text, Markdown, CSV, JSON, HTML, PDF, DOCX, PPTX, XLSX and PNG/JPEG/GIF/WebP images can be extracted; audio and video uploads are not knowledge documents. Images may yield generated descriptions rather than verbatim OCR. auto chunking resolves to static 800/400; explicit sizes are 100–4096 with overlap at most half the size. Each store holds at most 10000 attached files. Reattaching the same file returns its existing record without applying new attributes or chunking; inspect last_error after failure.",
|
|
7687
7237
|
http: "POST",
|
|
7688
7238
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files",
|
|
7689
7239
|
streaming: "no",
|
|
@@ -7722,8 +7272,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7722
7272
|
{
|
|
7723
7273
|
resource: "knowledge.vectorStores.files",
|
|
7724
7274
|
method: "delete",
|
|
7725
|
-
summary: "Remove file",
|
|
7726
|
-
description: "Removes the file from search immediately; does not delete the original File.",
|
|
7727
7275
|
http: "DELETE",
|
|
7728
7276
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
7729
7277
|
streaming: "no",
|
|
@@ -7743,8 +7291,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7743
7291
|
{
|
|
7744
7292
|
resource: "knowledge.vectorStores.files",
|
|
7745
7293
|
method: "retrieve",
|
|
7746
|
-
summary: "Retrieve file",
|
|
7747
|
-
description: "Retrieves an attached file using the id returned by attachment or file listing. Poll this operation until status leaves in_progress to observe the ingestion outcome.",
|
|
7748
7294
|
http: "GET",
|
|
7749
7295
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
7750
7296
|
streaming: "no",
|
|
@@ -7764,8 +7310,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7764
7310
|
{
|
|
7765
7311
|
resource: "knowledge.vectorStores.files",
|
|
7766
7312
|
method: "update",
|
|
7767
|
-
summary: "Update file attributes",
|
|
7768
|
-
description: 'Replaces search-filter attributes of an existing attachment without reingesting its content. Use an attached file id. Example body: {"attributes":{"category":"refund"}}; null clears the attributes.',
|
|
7769
7313
|
http: "POST",
|
|
7770
7314
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
7771
7315
|
streaming: "no",
|
|
@@ -7796,8 +7340,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7796
7340
|
{
|
|
7797
7341
|
resource: "knowledge.vectorStores.files",
|
|
7798
7342
|
method: "retrieveContent",
|
|
7799
|
-
summary: "Read extracted content",
|
|
7800
|
-
description: "Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.",
|
|
7801
7343
|
http: "GET",
|
|
7802
7344
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content",
|
|
7803
7345
|
streaming: "no",
|
|
@@ -7817,8 +7359,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7817
7359
|
{
|
|
7818
7360
|
resource: "knowledge.vectorStores.files.retry",
|
|
7819
7361
|
method: "create",
|
|
7820
|
-
summary: "Retry failed file",
|
|
7821
|
-
description: "Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.",
|
|
7822
7362
|
http: "POST",
|
|
7823
7363
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry",
|
|
7824
7364
|
streaming: "no",
|
|
@@ -7838,8 +7378,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7838
7378
|
{
|
|
7839
7379
|
resource: "knowledge.vectorStores.files.segments",
|
|
7840
7380
|
method: "list",
|
|
7841
|
-
summary: "List file segments",
|
|
7842
|
-
description: "Lists the stored chunks of an attached file, ordered by increasing segment index by default. Use the attachment id and last_id as after to continue; returned chunk ids can be retrieved individually.",
|
|
7843
7381
|
http: "GET",
|
|
7844
7382
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments",
|
|
7845
7383
|
streaming: "no",
|
|
@@ -7888,8 +7426,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7888
7426
|
{
|
|
7889
7427
|
resource: "knowledge.vectorStores.purge",
|
|
7890
7428
|
method: "create",
|
|
7891
|
-
summary: "Permanently purge knowledge base",
|
|
7892
|
-
description: "Immediately and irreversibly clears a deleting store using the retention cleanup path. Active stores return 409; absent stores return 404. Empty body is allowed.",
|
|
7893
7429
|
http: "POST",
|
|
7894
7430
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/purge",
|
|
7895
7431
|
streaming: "no",
|
|
@@ -7905,8 +7441,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7905
7441
|
{
|
|
7906
7442
|
resource: "knowledge.vectorStores",
|
|
7907
7443
|
method: "restore",
|
|
7908
|
-
summary: "Restore knowledge base",
|
|
7909
|
-
description: "Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.",
|
|
7910
7444
|
http: "POST",
|
|
7911
7445
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/restore",
|
|
7912
7446
|
streaming: "no",
|
|
@@ -7922,8 +7456,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7922
7456
|
{
|
|
7923
7457
|
resource: "knowledge.vectorStores.search",
|
|
7924
7458
|
method: "create",
|
|
7925
|
-
summary: "Search knowledge base",
|
|
7926
|
-
description: 'Search ingested text to answer a question or find supporting passages. Native results contain one chunk each, so file_id can repeat; max_num_results counts chunks (1–50, default 10), while the compatible URL groups results by file. Unlike OpenAI vector stores, next_page is always null even when has_more is true. Only completed attachments are searchable. For keyword-only retrieval set ranking_options.hybrid_search to {"embedding_weight":0,"text_weight":1}; omit rewrite_query or set it to false to avoid query rewriting. Unlike OpenAI, ranker auto does not rerank; only default-2024-11-15 requests reranking. Set praxis.explain=true to inspect scores and use returned content[].chunk_id to retrieve a segment.',
|
|
7927
7459
|
http: "POST",
|
|
7928
7460
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/search",
|
|
7929
7461
|
streaming: "no",
|
|
@@ -7986,8 +7518,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
7986
7518
|
{
|
|
7987
7519
|
resource: "knowledge.vectorStores.segments",
|
|
7988
7520
|
method: "retrieve",
|
|
7989
|
-
summary: "Retrieve segment",
|
|
7990
|
-
description: "Retrieves one chunk and its term statistics. Take chunk_id from segment listing or native search content; the chunk must belong to this knowledge base.",
|
|
7991
7521
|
http: "GET",
|
|
7992
7522
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}",
|
|
7993
7523
|
streaming: "no",
|
|
@@ -8007,8 +7537,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8007
7537
|
{
|
|
8008
7538
|
resource: "media.libraries",
|
|
8009
7539
|
method: "list",
|
|
8010
|
-
summary: "List libraries",
|
|
8011
|
-
description: "List libraries owned by the caller, newest first. By default, deleting and deleted libraries are excluded; use status=deleting to find libraries awaiting purge. All supplied label pairs must match.",
|
|
8012
7540
|
http: "GET",
|
|
8013
7541
|
path: "/media/v1/libraries",
|
|
8014
7542
|
streaming: "no",
|
|
@@ -8048,8 +7576,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8048
7576
|
{
|
|
8049
7577
|
resource: "media.libraries",
|
|
8050
7578
|
method: "create",
|
|
8051
|
-
summary: "Create library",
|
|
8052
|
-
description: "Create a library owned by the caller with a name, optional labels and understanding settings. Understanding is enabled by default; the returned id is used for subsequent asset operations.",
|
|
8053
7579
|
http: "POST",
|
|
8054
7580
|
path: "/media/v1/libraries",
|
|
8055
7581
|
streaming: "no",
|
|
@@ -8089,8 +7615,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8089
7615
|
{
|
|
8090
7616
|
resource: "media.libraries",
|
|
8091
7617
|
method: "delete",
|
|
8092
|
-
summary: "Delete library",
|
|
8093
|
-
description: "Soft-delete an active library, returning its deleting status and purge_at deadline. Asset operations and delivery become unavailable; the library can be restored before purge_at. Repeated deletion while deleting returns the current library.",
|
|
8094
7618
|
http: "DELETE",
|
|
8095
7619
|
path: "/media/v1/libraries/{library_id}",
|
|
8096
7620
|
streaming: "no",
|
|
@@ -8106,8 +7630,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8106
7630
|
{
|
|
8107
7631
|
resource: "media.libraries",
|
|
8108
7632
|
method: "retrieve",
|
|
8109
|
-
summary: "Get library",
|
|
8110
|
-
description: "Read a caller-owned library’s current settings, usage and lifecycle status. A deleting library remains readable; missing, foreign or purged libraries return LIBRARY_NOT_FOUND.",
|
|
8111
7633
|
http: "GET",
|
|
8112
7634
|
path: "/media/v1/libraries/{library_id}",
|
|
8113
7635
|
streaming: "no",
|
|
@@ -8123,8 +7645,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8123
7645
|
{
|
|
8124
7646
|
resource: "media.libraries",
|
|
8125
7647
|
method: "update",
|
|
8126
|
-
summary: "Update library",
|
|
8127
|
-
description: "Update an active library’s supplied settings. Labels replace the complete map; understanding settings and model roles merge with current values. Changing the embedding model is rejected while assets exist.",
|
|
8128
7648
|
http: "PATCH",
|
|
8129
7649
|
path: "/media/v1/libraries/{library_id}",
|
|
8130
7650
|
streaming: "no",
|
|
@@ -8169,8 +7689,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8169
7689
|
{
|
|
8170
7690
|
resource: "media.libraries.assets",
|
|
8171
7691
|
method: "list",
|
|
8172
|
-
summary: "List assets",
|
|
8173
|
-
description: "List assets in an active library, newest first, optionally filtering by exact folder and stored resource type. Continue using next_cursor; video includes audio-only assets.",
|
|
8174
7692
|
http: "GET",
|
|
8175
7693
|
path: "/media/v1/libraries/{library_id}/assets",
|
|
8176
7694
|
streaming: "no",
|
|
@@ -8216,8 +7734,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8216
7734
|
{
|
|
8217
7735
|
resource: "media.libraries.assets",
|
|
8218
7736
|
method: "create",
|
|
8219
|
-
summary: "Upload asset",
|
|
8220
|
-
description: "Upload content into an active library and return a Cloudinary-compatible resource. Use file for a multipart file, data URI, public HTTPS URL or same-owner file identifier. Reusing public_id overwrites by default; overwrite=false returns the existing resource. Chunk uploads require both chunk headers.",
|
|
8221
7737
|
http: "POST",
|
|
8222
7738
|
path: "/media/v1/libraries/{library_id}/assets",
|
|
8223
7739
|
streaming: "no",
|
|
@@ -8329,8 +7845,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8329
7845
|
{
|
|
8330
7846
|
resource: "media.libraries.assets.import",
|
|
8331
7847
|
method: "create",
|
|
8332
|
-
summary: "Import file",
|
|
8333
|
-
description: "Copy source content into an active library using upload options and return the full native Asset. The imported asset is independent of the source after copying. Reusing public_id follows overwrite semantics.",
|
|
8334
7848
|
http: "POST",
|
|
8335
7849
|
path: "/media/v1/libraries/{library_id}/assets/import",
|
|
8336
7850
|
streaming: "no",
|
|
@@ -8440,8 +7954,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8440
7954
|
{
|
|
8441
7955
|
resource: "media.libraries.assets",
|
|
8442
7956
|
method: "delete",
|
|
8443
|
-
summary: "Delete asset",
|
|
8444
|
-
description: "Delete an asset from the library so it is no longer readable, searchable or deliverable. This removes the asset rather than placing it in the library’s restoration window; a missing asset returns ASSET_NOT_FOUND.",
|
|
8445
7957
|
http: "DELETE",
|
|
8446
7958
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
|
|
8447
7959
|
streaming: "no",
|
|
@@ -8461,8 +7973,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8461
7973
|
{
|
|
8462
7974
|
resource: "media.libraries.assets",
|
|
8463
7975
|
method: "retrieve",
|
|
8464
|
-
summary: "Get asset",
|
|
8465
|
-
description: "Read a non-deleted asset by its asset_id in an active library, including content hashes, processing progress and available previews. Missing or deleted assets return ASSET_NOT_FOUND.",
|
|
8466
7976
|
http: "GET",
|
|
8467
7977
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
|
|
8468
7978
|
streaming: "no",
|
|
@@ -8482,8 +7992,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8482
7992
|
{
|
|
8483
7993
|
resource: "media.libraries.assets",
|
|
8484
7994
|
method: "update",
|
|
8485
|
-
summary: "Update asset",
|
|
8486
|
-
description: "Update an asset’s supplied metadata fields. Tags and context replace their current collections; an empty collection clears them. Moving asset_folder or changing display_name preserves public_id and delivery URLs.",
|
|
8487
7995
|
http: "PATCH",
|
|
8488
7996
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
|
|
8489
7997
|
streaming: "no",
|
|
@@ -8533,8 +8041,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8533
8041
|
{
|
|
8534
8042
|
resource: "media.libraries.assets.reprocess",
|
|
8535
8043
|
method: "create",
|
|
8536
|
-
summary: "Reprocess asset",
|
|
8537
|
-
description: "Queue reprocessing of the asset’s current version and return its updated state immediately. Omit kinds to retry failed tasks; explicit kinds rerun applicable completed tasks. Replaced understandings become superseded, and processing finishes asynchronously.",
|
|
8538
8044
|
http: "POST",
|
|
8539
8045
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
|
|
8540
8046
|
streaming: "no",
|
|
@@ -8572,8 +8078,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8572
8078
|
{
|
|
8573
8079
|
resource: "media.libraries.assets.understandings",
|
|
8574
8080
|
method: "list",
|
|
8575
|
-
summary: "List understandings",
|
|
8576
|
-
description: "List an asset’s understanding results in creation order. By default only current, non-superseded results are returned; use include_superseded=true for history or kind to select an output type.",
|
|
8577
8081
|
http: "GET",
|
|
8578
8082
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/understandings",
|
|
8579
8083
|
streaming: "no",
|
|
@@ -8625,8 +8129,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8625
8129
|
{
|
|
8626
8130
|
resource: "media.libraries.assets",
|
|
8627
8131
|
method: "batch",
|
|
8628
|
-
summary: "Batch assets alias",
|
|
8629
|
-
description: "Alias of batch creation. Apply one metadata or deletion action to ids or a frozen expression selection asynchronously; poll the returned job id to inspect completion and item failures.",
|
|
8630
8132
|
http: "POST",
|
|
8631
8133
|
path: "/media/v1/libraries/{library_id}/assets:batch",
|
|
8632
8134
|
streaming: "no",
|
|
@@ -8653,8 +8155,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8653
8155
|
{
|
|
8654
8156
|
resource: "media.libraries.batches",
|
|
8655
8157
|
method: "create",
|
|
8656
|
-
summary: "Create batch",
|
|
8657
|
-
description: "Create an asynchronous batch for tagging, untagging, replacing context, moving or deleting assets. Select ids or an expression; selection is frozen at creation. Poll the returned job id for completion and per-item failures.",
|
|
8658
8158
|
http: "POST",
|
|
8659
8159
|
path: "/media/v1/libraries/{library_id}/batches",
|
|
8660
8160
|
streaming: "no",
|
|
@@ -8681,8 +8181,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8681
8181
|
{
|
|
8682
8182
|
resource: "media.libraries.batches",
|
|
8683
8183
|
method: "retrieve",
|
|
8684
|
-
summary: "Get batch",
|
|
8685
|
-
description: "Read a batch job’s status, successful and failed item counts, and a bounded list of failed items. Use the id returned by batch creation; a job outside this library is not found.",
|
|
8686
8184
|
http: "GET",
|
|
8687
8185
|
path: "/media/v1/libraries/{library_id}/batches/{job_id}",
|
|
8688
8186
|
streaming: "no",
|
|
@@ -8702,8 +8200,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8702
8200
|
{
|
|
8703
8201
|
resource: "media.libraries.events",
|
|
8704
8202
|
method: "list",
|
|
8705
|
-
summary: "List events",
|
|
8706
|
-
description: "Read library events in sequence order, including while the library is deleting. Page forward with asc and after_seq, or backward with desc and before_seq; never combine the two sequence cursors.",
|
|
8707
8203
|
http: "GET",
|
|
8708
8204
|
path: "/media/v1/libraries/{library_id}/events",
|
|
8709
8205
|
streaming: "no",
|
|
@@ -8748,8 +8244,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8748
8244
|
{
|
|
8749
8245
|
resource: "media.libraries.folders",
|
|
8750
8246
|
method: "list",
|
|
8751
|
-
summary: "List folders",
|
|
8752
|
-
description: "List all immediate child folders under parent, or under the root when parent is omitted. Counts include descendant assets. The result is unpaginated; limit and cursor are rejected.",
|
|
8753
8247
|
http: "GET",
|
|
8754
8248
|
path: "/media/v1/libraries/{library_id}/folders",
|
|
8755
8249
|
streaming: "no",
|
|
@@ -8772,8 +8266,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8772
8266
|
{
|
|
8773
8267
|
resource: "media.libraries.jobs",
|
|
8774
8268
|
method: "retrieve",
|
|
8775
|
-
summary: "Get job alias",
|
|
8776
|
-
description: "Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.",
|
|
8777
8269
|
http: "GET",
|
|
8778
8270
|
path: "/media/v1/libraries/{library_id}/jobs/{job_id}",
|
|
8779
8271
|
streaming: "no",
|
|
@@ -8793,8 +8285,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8793
8285
|
{
|
|
8794
8286
|
resource: "media.libraries.purge",
|
|
8795
8287
|
method: "create",
|
|
8796
|
-
summary: "Purge library",
|
|
8797
|
-
description: "Permanently remove a library that is already deleting, without waiting for purge_at. Its assets and related resources are removed and cannot be restored; first soft-delete an active library.",
|
|
8798
8288
|
http: "POST",
|
|
8799
8289
|
path: "/media/v1/libraries/{library_id}/purge",
|
|
8800
8290
|
streaming: "no",
|
|
@@ -8810,8 +8300,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8810
8300
|
{
|
|
8811
8301
|
resource: "media.libraries",
|
|
8812
8302
|
method: "restore",
|
|
8813
|
-
summary: "Restore library",
|
|
8814
|
-
description: "Restore a deleting library before its purge_at deadline. The library becomes active again and deleted_at and purge_at are cleared; expired or non-deleting libraries cannot be restored.",
|
|
8815
8303
|
http: "POST",
|
|
8816
8304
|
path: "/media/v1/libraries/{library_id}/restore",
|
|
8817
8305
|
streaming: "no",
|
|
@@ -8827,8 +8315,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8827
8315
|
{
|
|
8828
8316
|
resource: "media.libraries.search",
|
|
8829
8317
|
method: "create",
|
|
8830
|
-
summary: "Semantic search alias",
|
|
8831
|
-
description: "Alias of semantic search. Search assets with a nonblank text query, optional expression filter and top_k; hybrid combines semantic and keyword matches, while semantic uses vector similarity only.",
|
|
8832
8318
|
http: "POST",
|
|
8833
8319
|
path: "/media/v1/libraries/{library_id}/search",
|
|
8834
8320
|
streaming: "no",
|
|
@@ -8877,8 +8363,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8877
8363
|
{
|
|
8878
8364
|
resource: "media.libraries.search.expression",
|
|
8879
8365
|
method: "create",
|
|
8880
|
-
summary: "Expression search",
|
|
8881
|
-
description: "Search active assets using the supported filter-expression syntax, sorting and cursor pagination. Empty expression matches all assets. Tags and context require with_field; inspect the exactness flags before treating counts as complete.",
|
|
8882
8366
|
http: "POST",
|
|
8883
8367
|
path: "/media/v1/libraries/{library_id}/search/expression",
|
|
8884
8368
|
streaming: "no",
|
|
@@ -8948,8 +8432,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8948
8432
|
{
|
|
8949
8433
|
resource: "media.libraries.search.semantic",
|
|
8950
8434
|
method: "create",
|
|
8951
|
-
summary: "Semantic search",
|
|
8952
|
-
description: "Search assets with a nonblank text query and optional expression filter. Hybrid mode combines semantic and keyword matches; semantic mode uses vector similarity only. Results are ranked and limited by top_k.",
|
|
8953
8435
|
http: "POST",
|
|
8954
8436
|
path: "/media/v1/libraries/{library_id}/search/semantic",
|
|
8955
8437
|
streaming: "no",
|
|
@@ -8998,8 +8480,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
8998
8480
|
{
|
|
8999
8481
|
resource: "media.libraries.search.visual",
|
|
9000
8482
|
method: "create",
|
|
9001
|
-
summary: "Visual search",
|
|
9002
|
-
description: "Find visually similar assets using exactly one of asset_id or an inline base64 image. The library must support image search; an asset query needs a current image embedding and excludes that source asset from results.",
|
|
9003
8483
|
http: "POST",
|
|
9004
8484
|
path: "/media/v1/libraries/{library_id}/search/visual",
|
|
9005
8485
|
streaming: "no",
|
|
@@ -9044,12 +8524,6 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
9044
8524
|
{
|
|
9045
8525
|
resource: "meta.health",
|
|
9046
8526
|
method: "retrieve",
|
|
9047
|
-
summary: "Health Check",
|
|
9048
|
-
description: `Liveness probe for the public API edge. Public, no authentication, not billed, not rate limited.
|
|
9049
|
-
Returns the plain text \`ok\` with HTTP 200 while the API worker can serve requests; any other
|
|
9050
|
-
status or a timeout means the edge itself is unavailable. It does not check individual
|
|
9051
|
-
services (model, agent, automation…); call the operation you need and read its error instead.
|
|
9052
|
-
`,
|
|
9053
8527
|
http: "GET",
|
|
9054
8528
|
path: "/meta/v1/health",
|
|
9055
8529
|
streaming: "no",
|
|
@@ -9060,8 +8534,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9060
8534
|
{
|
|
9061
8535
|
resource: "meta.methods",
|
|
9062
8536
|
method: "list",
|
|
9063
|
-
summary: "Search platform methods",
|
|
9064
|
-
description: "Find the SDK / codemode method that does what you need. Public, no authentication, not billed.\nCall this before writing code against an unfamiliar capability, then call\n`GET /meta/v1/methods/{name}` for the full TypeScript declaration of the method you pick.\nMatching ignores word order and case: `list agents` and `agents list` both rank\n`praxis.agent.agents.list` first. Results are ranked by relevance over the method name,\nsummary and description. Without `q`, methods are sorted by name; use `after_id` from `last_id` to retrieve the next page.\nThe catalog covers platform methods (`praxis.*`) only; MCP tools of a session are not included.\n",
|
|
9065
8537
|
http: "GET",
|
|
9066
8538
|
path: "/meta/v1/methods",
|
|
9067
8539
|
streaming: "no",
|
|
@@ -9091,8 +8563,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9091
8563
|
{
|
|
9092
8564
|
resource: "meta.methods",
|
|
9093
8565
|
method: "retrieve",
|
|
9094
|
-
summary: "Retrieve a platform method",
|
|
9095
|
-
description: "Full description of one platform method: what it does, how to call it, and the complete\nTypeScript declaration of its arguments and result. Public, no authentication, not billed.\nThe declaration is never truncated; copy field names and enum values from it instead of\nguessing. Take `name` from `GET /meta/v1/methods?q=<words>`. An unknown name returns 404\nMETHOD_NOT_FOUND whose `hint` lists up to three similar names.\n",
|
|
9096
8566
|
http: "GET",
|
|
9097
8567
|
path: "/meta/v1/methods/{name}",
|
|
9098
8568
|
streaming: "no",
|
|
@@ -9108,8 +8578,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9108
8578
|
{
|
|
9109
8579
|
resource: "model.audio.speech",
|
|
9110
8580
|
method: "create",
|
|
9111
|
-
summary: "Generate speech",
|
|
9112
|
-
description: 'Synthesize speech from text and return the complete audio as the response body. Use it for text-to-speech; to turn audio into text use createAudioTranscription. model is a speech model such as melotts or aura-2-en (list them with listModels?type=speech). MeloTTS supports response_format wav only and takes lang (en default, fr, es, zh; ja and ko currently error) and no voice; Aura takes a native speaker name in voice (default luna) and supports mp3, opus, flac, wav and pcm (pcm is raw signed 16-bit little-endian audio at 24 kHz). Unlike OpenAI, voice names such as alloy are not aliases for Aura speakers. Non-default speed, instructions and stream_format sse are not representable and return 400 input_not_representable. No transcoding is done: when response_format is omitted the format the upstream produced is returned. Minimal request: {"model":"melotts","input":"Hello","lang":"en","response_format":"wav"}.',
|
|
9113
8581
|
http: "POST",
|
|
9114
8582
|
path: "/model/v1/audio/speech",
|
|
9115
8583
|
streaming: "no",
|
|
@@ -9247,8 +8715,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9247
8715
|
{
|
|
9248
8716
|
resource: "model.audio.transcriptions",
|
|
9249
8717
|
method: "create",
|
|
9250
|
-
summary: "Transcribe audio",
|
|
9251
|
-
description: "Transcribe an uploaded audio file into text. Use it for speech-to-text; to synthesize speech use createAudioSpeech. Send multipart/form-data with model (for example whisper-large-v3-turbo or qwen3-asr-flash; list them with listModels?type=transcription) and file. response_format json (default) and text work on both models; verbose_json with segment timestamps works on whisper-large-v3-turbo only; srt and vtt return 400. Parameters a model cannot represent, such as temperature, return 400 input_not_representable, and when no model route is available the call answers 503. The response is JSON with text (plus language, duration and segments for verbose_json) or plain text for response_format text.",
|
|
9252
8718
|
http: "POST",
|
|
9253
8719
|
path: "/model/v1/audio/transcriptions",
|
|
9254
8720
|
streaming: "no",
|
|
@@ -9316,8 +8782,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9316
8782
|
{
|
|
9317
8783
|
resource: "model.chat.completions",
|
|
9318
8784
|
method: "create",
|
|
9319
|
-
summary: "Create Chat Completion",
|
|
9320
|
-
description: "OpenAI-compatible chat completions on the model domain's own face. providerOptions.praxis carries model-level fallback (models), request-level BYOK credentials (byok, falling back to platform credentials on failure), and credential-gated provider selection (order/only). Responses report providerMetadata.praxis {generationId, cost, credential, model}.",
|
|
9321
8785
|
http: "POST",
|
|
9322
8786
|
path: "/model/v1/chat/completions",
|
|
9323
8787
|
streaming: "optional",
|
|
@@ -9718,8 +9182,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9718
9182
|
{
|
|
9719
9183
|
resource: "model.conversations",
|
|
9720
9184
|
method: "create",
|
|
9721
|
-
summary: "Create Conversation",
|
|
9722
|
-
description: "Create a stored conversation, optionally with initial items and metadata, to reuse context across Responses calls. Pass its returned id as conversation when creating a response.",
|
|
9723
9185
|
http: "POST",
|
|
9724
9186
|
path: "/model/v1/conversations",
|
|
9725
9187
|
streaming: "no",
|
|
@@ -9748,8 +9210,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9748
9210
|
{
|
|
9749
9211
|
resource: "model.conversations",
|
|
9750
9212
|
method: "delete",
|
|
9751
|
-
summary: "Delete Conversation",
|
|
9752
|
-
description: "Delete a conversation on the model domain's own face.",
|
|
9753
9213
|
http: "DELETE",
|
|
9754
9214
|
path: "/model/v1/conversations/{conversation_id}",
|
|
9755
9215
|
streaming: "no",
|
|
@@ -9765,8 +9225,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9765
9225
|
{
|
|
9766
9226
|
resource: "model.conversations",
|
|
9767
9227
|
method: "retrieve",
|
|
9768
|
-
summary: "Retrieve Conversation",
|
|
9769
|
-
description: "Retrieve a conversation by id on the model domain's own face.",
|
|
9770
9228
|
http: "GET",
|
|
9771
9229
|
path: "/model/v1/conversations/{conversation_id}",
|
|
9772
9230
|
streaming: "no",
|
|
@@ -9782,8 +9240,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9782
9240
|
{
|
|
9783
9241
|
resource: "model.conversations",
|
|
9784
9242
|
method: "update",
|
|
9785
|
-
summary: "Update Conversation",
|
|
9786
|
-
description: "Replace a conversation's metadata on the model domain's own face.",
|
|
9787
9243
|
http: "POST",
|
|
9788
9244
|
path: "/model/v1/conversations/{conversation_id}",
|
|
9789
9245
|
streaming: "no",
|
|
@@ -9810,8 +9266,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9810
9266
|
{
|
|
9811
9267
|
resource: "model.conversations.items",
|
|
9812
9268
|
method: "list",
|
|
9813
|
-
summary: "List Conversation Items",
|
|
9814
|
-
description: "List a conversation's items on the model domain's own face.",
|
|
9815
9269
|
http: "GET",
|
|
9816
9270
|
path: "/model/v1/conversations/{conversation_id}/items",
|
|
9817
9271
|
streaming: "no",
|
|
@@ -9827,8 +9281,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9827
9281
|
{
|
|
9828
9282
|
resource: "model.conversations.items",
|
|
9829
9283
|
method: "create",
|
|
9830
|
-
summary: "Create Conversation Items",
|
|
9831
|
-
description: "Add items to a conversation on the model domain's own face.",
|
|
9832
9284
|
http: "POST",
|
|
9833
9285
|
path: "/model/v1/conversations/{conversation_id}/items",
|
|
9834
9286
|
streaming: "no",
|
|
@@ -9856,8 +9308,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9856
9308
|
{
|
|
9857
9309
|
resource: "model.conversations.items",
|
|
9858
9310
|
method: "delete",
|
|
9859
|
-
summary: "Delete Conversation Item",
|
|
9860
|
-
description: "Delete a single conversation item on the model domain's own face.",
|
|
9861
9311
|
http: "DELETE",
|
|
9862
9312
|
path: "/model/v1/conversations/{conversation_id}/items/{item_id}",
|
|
9863
9313
|
streaming: "no",
|
|
@@ -9877,8 +9327,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9877
9327
|
{
|
|
9878
9328
|
resource: "model.conversations.items",
|
|
9879
9329
|
method: "retrieve",
|
|
9880
|
-
summary: "Retrieve Conversation Item",
|
|
9881
|
-
description: "Retrieve a single conversation item on the model domain's own face.",
|
|
9882
9330
|
http: "GET",
|
|
9883
9331
|
path: "/model/v1/conversations/{conversation_id}/items/{item_id}",
|
|
9884
9332
|
streaming: "no",
|
|
@@ -9898,8 +9346,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9898
9346
|
{
|
|
9899
9347
|
resource: "model.embeddings",
|
|
9900
9348
|
method: "create",
|
|
9901
|
-
summary: "Create Embedding",
|
|
9902
|
-
description: "OpenAI-compatible embeddings on the model domain's own face. providerOptions.praxis is currently supported on POST /chat/completions only; sending it here answers 400.",
|
|
9903
9349
|
http: "POST",
|
|
9904
9350
|
path: "/model/v1/embeddings",
|
|
9905
9351
|
streaming: "no",
|
|
@@ -9973,8 +9419,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9973
9419
|
{
|
|
9974
9420
|
resource: "model.generation",
|
|
9975
9421
|
method: "retrieve",
|
|
9976
|
-
summary: "Get Generation",
|
|
9977
|
-
description: "Verify the settled customer charge in USD, usage and latency for one model call. Pass the X-Praxis-Generation-Id response header or chat providerMetadata.praxis.generationId as id to praxis.model.generation.retrieve; a completion id is not a generation id. The record may take a few seconds to appear: retry a recent call's 404 shortly, without repeating the paid inference. An unknown id and another account's id also return 404; a null cost is not proof of a free call.",
|
|
9978
9422
|
http: "GET",
|
|
9979
9423
|
path: "/model/v1/generation",
|
|
9980
9424
|
streaming: "no",
|
|
@@ -9992,8 +9436,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
9992
9436
|
{
|
|
9993
9437
|
resource: "model.images.edits",
|
|
9994
9438
|
method: "create",
|
|
9995
|
-
summary: "Edit Image",
|
|
9996
|
-
description: "Edit one or more images from a text prompt, using multipart files or JSON data-URL images. Unlike OpenAI, mask is currently unavailable and returns 400; omit it and use a model supporting the requested size and image count. providerOptions.praxis is currently supported on POST /chat/completions only; sending it here answers 400.",
|
|
9997
9439
|
http: "POST",
|
|
9998
9440
|
path: "/model/v1/images/edits",
|
|
9999
9441
|
streaming: "no",
|
|
@@ -10047,8 +9489,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
10047
9489
|
{
|
|
10048
9490
|
resource: "model.images.generations",
|
|
10049
9491
|
method: "create",
|
|
10050
|
-
summary: "Create Image",
|
|
10051
|
-
description: "Generate images from a text prompt using a catalog image model. Unlike OpenAI, response_format accepts b64_json only; url returns 400. Read the selected model's support notes for sizes, quality and output format before requesting them. providerOptions.praxis is currently supported on POST /chat/completions only; sending it here answers 400.",
|
|
10052
9492
|
http: "POST",
|
|
10053
9493
|
path: "/model/v1/images/generations",
|
|
10054
9494
|
streaming: "no",
|
|
@@ -10127,8 +9567,6 @@ services (model, agent, automation…); call the operation you need and read its
|
|
|
10127
9567
|
{
|
|
10128
9568
|
resource: "model.messages",
|
|
10129
9569
|
method: "create",
|
|
10130
|
-
summary: "Create Message",
|
|
10131
|
-
description: "Anthropic Messages API on the model domain's own face (Anthropic SDK base URL …/model; x-api-key or Bearer). providerOptions.praxis is currently supported on POST /chat/completions only; sending it here answers 400.",
|
|
10132
9570
|
http: "POST",
|
|
10133
9571
|
path: "/model/v1/messages",
|
|
10134
9572
|
streaming: "optional",
|
|
@@ -10417,8 +9855,6 @@ for more details.`
|
|
|
10417
9855
|
{
|
|
10418
9856
|
resource: "model.messages",
|
|
10419
9857
|
method: "countTokens",
|
|
10420
|
-
summary: "Count Tokens",
|
|
10421
|
-
description: "Anthropic token counting on the model domain's own face. Qualified native counts are marked x-praxis-token-count=exact; bundled OpenAI text tokenization and family-calibrated request estimates are marked estimated (partial; accuracy varies by family and input type).",
|
|
10422
9858
|
http: "POST",
|
|
10423
9859
|
path: "/model/v1/messages/count_tokens",
|
|
10424
9860
|
streaming: "no",
|
|
@@ -10577,8 +10013,6 @@ for more details.`
|
|
|
10577
10013
|
{
|
|
10578
10014
|
resource: "model.models",
|
|
10579
10015
|
method: "list",
|
|
10580
|
-
summary: "List Models",
|
|
10581
|
-
description: "Choose a model before making an inference call: list published ids, capabilities, supported_apis and prices without credentials. Unlike OpenAI, the catalog spans multiple protocols and includes per-unit USD prices; pricing.input and pricing.output are per token, not per million tokens, and a missing price is not zero. Filter with type=language for dialogue or type=embedding for vectors, and supported_api for the required protocol. Use each returned id unchanged, including any creator prefix; inspect tags for tools and field support for model-specific tool_choice or response_format limits. The response is the full matching catalog, not a paginated page.",
|
|
10582
10016
|
http: "GET",
|
|
10583
10017
|
path: "/model/v1/models",
|
|
10584
10018
|
streaming: "no",
|
|
@@ -10647,8 +10081,6 @@ for more details.`
|
|
|
10647
10081
|
{
|
|
10648
10082
|
resource: "model.models",
|
|
10649
10083
|
method: "retrieve",
|
|
10650
|
-
summary: "Retrieve Model",
|
|
10651
|
-
description: "Read capabilities, supported_apis and per-unit prices for one model before using it. Pass an exact id returned by praxis.model.models.list, including any creator prefix such as deepseek/deepseek-v4-pro. The object is identical to its catalog entry and requires no credentials; an unknown id returns 404.",
|
|
10652
10084
|
http: "GET",
|
|
10653
10085
|
path: "/model/v1/models/{model}",
|
|
10654
10086
|
streaming: "no",
|
|
@@ -10664,8 +10096,6 @@ for more details.`
|
|
|
10664
10096
|
{
|
|
10665
10097
|
resource: "model.ocr",
|
|
10666
10098
|
method: "create",
|
|
10667
|
-
summary: "Extract document text",
|
|
10668
|
-
description: "Mistral-shaped OCR on the model domain's own face. Accepts HTTPS or base64 data URLs for documents and images. Optional features depend on the selected model; unsupported options return 400. providerOptions.praxis is currently supported on POST /chat/completions only; sending it here answers 400.",
|
|
10669
10099
|
http: "POST",
|
|
10670
10100
|
path: "/model/v1/ocr",
|
|
10671
10101
|
streaming: "no",
|
|
@@ -10774,8 +10204,6 @@ for more details.`
|
|
|
10774
10204
|
{
|
|
10775
10205
|
resource: "model.rerank",
|
|
10776
10206
|
method: "create",
|
|
10777
|
-
summary: "Rerank documents",
|
|
10778
|
-
description: "Rank a list of documents by relevance to a query and return the best matches with scores. Use it to reorder retrieval results before you pass them to a language model; it does not generate text. Send model (a reranking model; list them with listModels?type=reranking), query and documents as an array of plain strings (object documents return 400). top_n limits how many results come back (at least 1; omit it to rank every document). Each result carries index, the zero-based position of the document in your documents array, and relevance_score from 0 to 1; results are sorted best first. Any field other than model, query, documents and top_n returns 400 input_not_representable, and 503 means no model route is available.",
|
|
10779
10207
|
http: "POST",
|
|
10780
10208
|
path: "/model/v1/rerank",
|
|
10781
10209
|
streaming: "no",
|
|
@@ -10847,8 +10275,6 @@ for more details.`
|
|
|
10847
10275
|
{
|
|
10848
10276
|
resource: "model.responses",
|
|
10849
10277
|
method: "create",
|
|
10850
|
-
summary: "Create Response",
|
|
10851
|
-
description: "OpenAI Responses API on the model domain's own face (OpenAI SDK base URL …/model/v1). providerOptions.praxis is currently supported on POST /chat/completions only; sending it here answers 400.",
|
|
10852
10278
|
http: "POST",
|
|
10853
10279
|
path: "/model/v1/responses",
|
|
10854
10280
|
streaming: "optional",
|
|
@@ -11074,8 +10500,6 @@ for more details.`
|
|
|
11074
10500
|
{
|
|
11075
10501
|
resource: "model.responses",
|
|
11076
10502
|
method: "compact",
|
|
11077
|
-
summary: "Compact Response",
|
|
11078
|
-
description: "Request context compaction for a response. Unlike OpenAI, this operation is unavailable and returns 501; do not use it to prepare a subsequent inference call.",
|
|
11079
10503
|
http: "POST",
|
|
11080
10504
|
path: "/model/v1/responses/compact",
|
|
11081
10505
|
streaming: "no",
|
|
@@ -11090,8 +10514,6 @@ for more details.`
|
|
|
11090
10514
|
{
|
|
11091
10515
|
resource: "model.responses.inputTokens",
|
|
11092
10516
|
method: "create",
|
|
11093
|
-
summary: "Count Response Input Tokens",
|
|
11094
|
-
description: "Request an input-token count for Responses input. Unlike OpenAI, this operation is unavailable and returns 501; use the documented Messages token-count operation only when its input shape and estimation limits fit your task.",
|
|
11095
10517
|
http: "POST",
|
|
11096
10518
|
path: "/model/v1/responses/input_tokens",
|
|
11097
10519
|
streaming: "no",
|
|
@@ -11106,8 +10528,6 @@ for more details.`
|
|
|
11106
10528
|
{
|
|
11107
10529
|
resource: "model.responses",
|
|
11108
10530
|
method: "delete",
|
|
11109
|
-
summary: "Delete Response",
|
|
11110
|
-
description: "Delete a stored response by its id when you no longer need to retrieve it. The response will no longer be available for later retrieval.",
|
|
11111
10531
|
http: "DELETE",
|
|
11112
10532
|
path: "/model/v1/responses/{response_id}",
|
|
11113
10533
|
streaming: "no",
|
|
@@ -11123,8 +10543,6 @@ for more details.`
|
|
|
11123
10543
|
{
|
|
11124
10544
|
resource: "model.responses",
|
|
11125
10545
|
method: "retrieve",
|
|
11126
|
-
summary: "Retrieve Response",
|
|
11127
|
-
description: "Read a stored response by its id from creation. A response created with store=false, an expired response, an unknown id or another account's response returns 404.",
|
|
11128
10546
|
http: "GET",
|
|
11129
10547
|
path: "/model/v1/responses/{response_id}",
|
|
11130
10548
|
streaming: "no",
|
|
@@ -11140,8 +10558,6 @@ for more details.`
|
|
|
11140
10558
|
{
|
|
11141
10559
|
resource: "model.responses",
|
|
11142
10560
|
method: "cancel",
|
|
11143
|
-
summary: "Cancel Response",
|
|
11144
|
-
description: "Cancel an in-progress background response using its id from creation. Unlike OpenAI, cancellation cannot guarantee that upstream compute stops; usage is settled for the output received. Repeating cancellation returns the terminal response; a synchronous response can return 400 native_responses_operation_unsupported or 404 if absent.",
|
|
11145
10561
|
http: "POST",
|
|
11146
10562
|
path: "/model/v1/responses/{response_id}/cancel",
|
|
11147
10563
|
streaming: "no",
|
|
@@ -11157,8 +10573,6 @@ for more details.`
|
|
|
11157
10573
|
{
|
|
11158
10574
|
resource: "model.responses.inputItems",
|
|
11159
10575
|
method: "list",
|
|
11160
|
-
summary: "List Response Input Items",
|
|
11161
|
-
description: "Read the input items of a stored response using its id from creation. Use the returned items to inspect the input that produced that response.",
|
|
11162
10576
|
http: "GET",
|
|
11163
10577
|
path: "/model/v1/responses/{response_id}/input_items",
|
|
11164
10578
|
streaming: "no",
|
|
@@ -11174,8 +10588,6 @@ for more details.`
|
|
|
11174
10588
|
{
|
|
11175
10589
|
resource: "model.videos",
|
|
11176
10590
|
method: "list",
|
|
11177
|
-
summary: "List videos",
|
|
11178
|
-
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
11179
10591
|
http: "GET",
|
|
11180
10592
|
path: "/model/v1/videos",
|
|
11181
10593
|
streaming: "no",
|
|
@@ -11209,8 +10621,6 @@ for more details.`
|
|
|
11209
10621
|
{
|
|
11210
10622
|
resource: "model.videos",
|
|
11211
10623
|
method: "create",
|
|
11212
|
-
summary: "Create video",
|
|
11213
|
-
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
11214
10624
|
http: "POST",
|
|
11215
10625
|
path: "/model/v1/videos",
|
|
11216
10626
|
streaming: "no",
|
|
@@ -11313,8 +10723,6 @@ for more details.`
|
|
|
11313
10723
|
{
|
|
11314
10724
|
resource: "model.videos",
|
|
11315
10725
|
method: "delete",
|
|
11316
|
-
summary: "Delete video",
|
|
11317
|
-
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
11318
10726
|
http: "DELETE",
|
|
11319
10727
|
path: "/model/v1/videos/{video_id}",
|
|
11320
10728
|
streaming: "no",
|
|
@@ -11330,8 +10738,6 @@ for more details.`
|
|
|
11330
10738
|
{
|
|
11331
10739
|
resource: "model.videos",
|
|
11332
10740
|
method: "retrieve",
|
|
11333
|
-
summary: "Retrieve video",
|
|
11334
|
-
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
11335
10741
|
http: "GET",
|
|
11336
10742
|
path: "/model/v1/videos/{video_id}",
|
|
11337
10743
|
streaming: "no",
|
|
@@ -11347,8 +10753,6 @@ for more details.`
|
|
|
11347
10753
|
{
|
|
11348
10754
|
resource: "model.videos",
|
|
11349
10755
|
method: "retrieveContent",
|
|
11350
|
-
summary: "Download video",
|
|
11351
|
-
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
11352
10756
|
http: "GET",
|
|
11353
10757
|
path: "/model/v1/videos/{video_id}/content",
|
|
11354
10758
|
streaming: "no",
|
|
@@ -11382,8 +10786,6 @@ for more details.`
|
|
|
11382
10786
|
{
|
|
11383
10787
|
resource: "model.videos",
|
|
11384
10788
|
method: "remix",
|
|
11385
|
-
summary: "Remix video",
|
|
11386
|
-
description: "Not supported in this release; always returns 400.",
|
|
11387
10789
|
http: "POST",
|
|
11388
10790
|
path: "/model/v1/videos/{video_id}/remix",
|
|
11389
10791
|
streaming: "no",
|
|
@@ -11399,9 +10801,6 @@ for more details.`
|
|
|
11399
10801
|
{
|
|
11400
10802
|
resource: "organization.charges",
|
|
11401
10803
|
method: "list",
|
|
11402
|
-
summary: "Export Organization Charges",
|
|
11403
|
-
description: `FOCUS 1.3 subset export, one JSON record per line (application/x-ndjson), one record per usage event, paginating the window day by day server-side. The sum of BilledCost over all lines equals the costs endpoint's total for the same window.
|
|
11404
|
-
`,
|
|
11405
10804
|
http: "GET",
|
|
11406
10805
|
path: "/organization/v1/charges",
|
|
11407
10806
|
streaming: "no",
|
|
@@ -11425,9 +10824,6 @@ for more details.`
|
|
|
11425
10824
|
{
|
|
11426
10825
|
resource: "organization.costs",
|
|
11427
10826
|
method: "list",
|
|
11428
|
-
summary: "List Organization Costs",
|
|
11429
|
-
description: `Billed cost per time bucket per group (AWS GetCostAndUsage shape). Buckets are whole UTC hour/day periods; a window is answered over the aligned envelope covering it. Amounts are exact decimal strings in the currency the organization was charged in (BillingCurrency, CNY or USD); a group charged in two currencies is two results. estimated is always false: charges are final when they are recorded. Windows span at most 93 days; longer ranges belong to the charges export.
|
|
11430
|
-
`,
|
|
11431
10827
|
http: "GET",
|
|
11432
10828
|
path: "/organization/v1/costs",
|
|
11433
10829
|
streaming: "no",
|
|
@@ -11488,9 +10884,6 @@ for more details.`
|
|
|
11488
10884
|
{
|
|
11489
10885
|
resource: "organization.events",
|
|
11490
10886
|
method: "list",
|
|
11491
|
-
summary: "List Organization Usage Events",
|
|
11492
|
-
description: `Usage events newest first, one opaque cursor page at a time; a page never duplicates or skips an event. Every item carries its metering lines (meter, display name, consumed quantity and unit, mapped from the billing measurements); the per-line price split (list unit price, pricing unit, billed cost) rides only the single event — fetch /organization/v1/events/{id} for it.
|
|
11493
|
-
`,
|
|
11494
10887
|
http: "GET",
|
|
11495
10888
|
path: "/organization/v1/events",
|
|
11496
10889
|
streaming: "no",
|
|
@@ -11526,9 +10919,6 @@ for more details.`
|
|
|
11526
10919
|
{
|
|
11527
10920
|
resource: "organization.events",
|
|
11528
10921
|
method: "retrieve",
|
|
11529
|
-
summary: "Get One Organization Usage Event",
|
|
11530
|
-
description: `One event with its usage line (meter display name, consumed quantity and unit, billed cost; ListUnitPrice and PricingUnit are null because billing prices an event as a whole), its settlement status and x_Charges, the transactions that paid it (promotional balance is taken before cash). A nonexistent id and another organization's id are indistinguishable: both answer the same 404 problem body except X-Request-Id.
|
|
11531
|
-
`,
|
|
11532
10922
|
http: "GET",
|
|
11533
10923
|
path: "/organization/v1/events/{id}",
|
|
11534
10924
|
streaming: "no",
|
|
@@ -11544,8 +10934,6 @@ for more details.`
|
|
|
11544
10934
|
{
|
|
11545
10935
|
resource: "organization.feedback",
|
|
11546
10936
|
method: "create",
|
|
11547
|
-
summary: "Report a problem with the Praxis platform",
|
|
11548
|
-
description: `Report a problem with the Praxis platform when an API fails, documentation is unclear, or a capability is missing. AI callers in codemode should include the original error text in message, the X-Request-Id or error event ID in associated_event_id, and relevant session, agent, model, or request IDs in contexts. Continue the user's task after reporting. Each successful call stores feedback and returns its id; repeated calls create separate reports. The authenticated principal determines the reporter; any reporter supplied in the body is ignored. Machine tokens force source to codemode. Requires a valid API key, Console session, or machine token. Minimal body: {"message":"The API documentation does not explain this error."}.`,
|
|
11549
10937
|
http: "POST",
|
|
11550
10938
|
path: "/organization/v1/feedback",
|
|
11551
10939
|
streaming: "no",
|
|
@@ -11620,9 +11008,6 @@ for more details.`
|
|
|
11620
11008
|
{
|
|
11621
11009
|
resource: "organization.usage",
|
|
11622
11010
|
method: "list",
|
|
11623
|
-
summary: "List Organization Usage",
|
|
11624
|
-
description: `Consumed quantity per time bucket per group. Buckets are whole UTC hour/day periods covering the requested window. Each result carries exactly one ConsumedQuantity + ConsumedUnit — quantities of different units are never added together.
|
|
11625
|
-
`,
|
|
11626
11011
|
http: "GET",
|
|
11627
11012
|
path: "/organization/v1/usage",
|
|
11628
11013
|
streaming: "no",
|
|
@@ -11683,8 +11068,6 @@ for more details.`
|
|
|
11683
11068
|
{
|
|
11684
11069
|
resource: "sandbox.sandboxes",
|
|
11685
11070
|
method: "list",
|
|
11686
|
-
summary: "List sandboxes (v2)",
|
|
11687
|
-
description: "List your running and paused sandboxes with paging and filters. Use it to find a sandboxID before connecting to, pausing or killing a sandbox. Filter by state, template (id or alias), name, metadata (key=value pairs joined with &) and startedAfter; order sorts by start time (default newest first); limit is 1 to 100 (default 100). When more results exist the response carries an x-next-token header; send it back as nextToken for the next page. To read one sandbox use getSandbox.",
|
|
11688
11071
|
http: "GET",
|
|
11689
11072
|
path: "/sandbox/v1/sandboxes",
|
|
11690
11073
|
streaming: "no",
|
|
@@ -11753,8 +11136,6 @@ for more details.`
|
|
|
11753
11136
|
{
|
|
11754
11137
|
resource: "sandbox.sandboxes",
|
|
11755
11138
|
method: "create",
|
|
11756
|
-
summary: "Create sandbox (v2)",
|
|
11757
|
-
description: "Start an isolated environment using a templateID from templates.list, then retain sandboxID for lifecycle calls. Unlike E2B, templateID resolves to your ready Environment or a public Base; omit it to use the default base template (`base`), as the E2B SDK does. timeout is seconds from creation and defaults to 300. envVars supplies environment variables and metadata stores your string labels. All system communication is secured; use the returned envdAccessToken for files and commands through the envd data plane, not the management methods. Never print that token.",
|
|
11758
11139
|
http: "POST",
|
|
11759
11140
|
path: "/sandbox/v1/sandboxes",
|
|
11760
11141
|
streaming: "no",
|
|
@@ -11843,8 +11224,6 @@ for more details.`
|
|
|
11843
11224
|
{
|
|
11844
11225
|
resource: "sandbox.sandboxes",
|
|
11845
11226
|
method: "delete",
|
|
11846
|
-
summary: "Kill sandbox",
|
|
11847
|
-
description: "Kill a sandbox: stop it and release its resources for good. Use it when you are done with the sandbox; to keep its state for later use pause it instead with pauseSandbox. Success answers 204 with no body, and a killed sandbox answers 404 afterwards.",
|
|
11848
11227
|
http: "DELETE",
|
|
11849
11228
|
path: "/sandbox/v1/sandboxes/{sandboxID}",
|
|
11850
11229
|
streaming: "no",
|
|
@@ -11860,8 +11239,6 @@ for more details.`
|
|
|
11860
11239
|
{
|
|
11861
11240
|
resource: "sandbox.sandboxes",
|
|
11862
11241
|
method: "retrieve",
|
|
11863
|
-
summary: "Sandbox",
|
|
11864
|
-
description: "Read one sandbox: its state (running or paused), template, resources, start time and expiry (endAt), plus the access token for its data plane when it is running. Use it to poll the state or the remaining lifetime of a sandbox; to find sandboxes use listSandboxes. An unknown id or another team's sandbox answers 404.",
|
|
11865
11242
|
http: "GET",
|
|
11866
11243
|
path: "/sandbox/v1/sandboxes/{sandboxID}",
|
|
11867
11244
|
streaming: "no",
|
|
@@ -11877,8 +11254,6 @@ for more details.`
|
|
|
11877
11254
|
{
|
|
11878
11255
|
resource: "sandbox.sandboxes",
|
|
11879
11256
|
method: "update",
|
|
11880
|
-
summary: "Rename a sandbox",
|
|
11881
|
-
description: "Rename your sandbox. Names are trimmed, must contain 1–64 characters after trimming, and must be unique within your team. Only name may be changed. Returns the updated sandbox detail, as GET does. Killed or unavailable sandboxes return 404.",
|
|
11882
11257
|
http: "PATCH",
|
|
11883
11258
|
path: "/sandbox/v1/sandboxes/{sandboxID}",
|
|
11884
11259
|
streaming: "no",
|
|
@@ -11905,8 +11280,6 @@ for more details.`
|
|
|
11905
11280
|
{
|
|
11906
11281
|
resource: "sandbox.sandboxes",
|
|
11907
11282
|
method: "connect",
|
|
11908
|
-
summary: "Connect sandbox (v2)",
|
|
11909
|
-
description: "Reconnect to an existing sandbox and resume it if paused. The optional timeout is seconds from now and defaults to 300; a later existing deadline is preserved. A running sandbox returns 200 and a resumed sandbox returns 201. Read sandboxID, domain and envdAccessToken from the response for subsequent data-plane access; never treat connecting as executing a command.",
|
|
11910
11283
|
http: "POST",
|
|
11911
11284
|
path: "/sandbox/v1/sandboxes/{sandboxID}/connect",
|
|
11912
11285
|
streaming: "no",
|
|
@@ -11939,8 +11312,6 @@ for more details.`
|
|
|
11939
11312
|
{
|
|
11940
11313
|
resource: "sandbox.sandboxes",
|
|
11941
11314
|
method: "extend",
|
|
11942
|
-
summary: "Extend a running sandbox without shortening its deadline",
|
|
11943
|
-
description: "Extend a running sandbox only when it needs a later expiry; this never resumes a paused sandbox. Timeout is seconds from now, not added to the prior deadline, and must be 900, 1800 or 3600. Returns 409 for paused, expired, or non-extending requests.",
|
|
11944
11315
|
http: "POST",
|
|
11945
11316
|
path: "/sandbox/v1/sandboxes/{sandboxID}/extend",
|
|
11946
11317
|
streaming: "no",
|
|
@@ -11972,8 +11343,6 @@ for more details.`
|
|
|
11972
11343
|
{
|
|
11973
11344
|
resource: "sandbox.sandboxes",
|
|
11974
11345
|
method: "fork",
|
|
11975
|
-
summary: "Fork sandbox",
|
|
11976
|
-
description: "Fork the sandbox: checkpoint the running sandbox in place (it is briefly paused, snapshotted with its full memory state, and resumed on its node, keeping its ID and expiration untouched) and create count new sandboxes from that snapshot. Returns one result per requested fork, each carrying either the created sandbox or the error that prevented it from starting. A non-201 status means the request failed before any fork was attempted.",
|
|
11977
11346
|
http: "POST",
|
|
11978
11347
|
path: "/sandbox/v1/sandboxes/{sandboxID}/fork",
|
|
11979
11348
|
streaming: "no",
|
|
@@ -12006,8 +11375,6 @@ for more details.`
|
|
|
12006
11375
|
{
|
|
12007
11376
|
resource: "sandbox.sandboxes.logs",
|
|
12008
11377
|
method: "list",
|
|
12009
|
-
summary: "Sandbox logs (v2)",
|
|
12010
|
-
description: "Read the log lines of a sandbox. Use it to debug what ran inside a sandbox. cursor is a start timestamp in milliseconds, direction chooses forward or backward from it, level sets the lowest level to return, search is a case-sensitive substring filter (at most 256 characters) and limit caps the count (at most 1000, default 1000). To continue, pass the timestamp of the last entry as the next cursor.",
|
|
12011
11378
|
http: "GET",
|
|
12012
11379
|
path: "/sandbox/v1/sandboxes/{sandboxID}/logs",
|
|
12013
11380
|
streaming: "no",
|
|
@@ -12064,8 +11431,6 @@ for more details.`
|
|
|
12064
11431
|
{
|
|
12065
11432
|
resource: "sandbox.sandboxes.metrics",
|
|
12066
11433
|
method: "list",
|
|
12067
|
-
summary: "Sandbox metrics",
|
|
12068
|
-
description: "Read CPU, memory and disk usage over the requested interval; start and end are Unix seconds. Unlike E2B, light sandboxes do not provide metrics; check the returned capabilities before requesting them.",
|
|
12069
11434
|
http: "GET",
|
|
12070
11435
|
path: "/sandbox/v1/sandboxes/{sandboxID}/metrics",
|
|
12071
11436
|
streaming: "no",
|
|
@@ -12094,8 +11459,6 @@ for more details.`
|
|
|
12094
11459
|
{
|
|
12095
11460
|
resource: "sandbox.sandboxes",
|
|
12096
11461
|
method: "updateNetwork",
|
|
12097
|
-
summary: "Update sandbox network",
|
|
12098
|
-
description: "Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.",
|
|
12099
11462
|
http: "PUT",
|
|
12100
11463
|
path: "/sandbox/v1/sandboxes/{sandboxID}/network",
|
|
12101
11464
|
streaming: "no",
|
|
@@ -12149,8 +11512,6 @@ for more details.`
|
|
|
12149
11512
|
{
|
|
12150
11513
|
resource: "sandbox.sandboxes",
|
|
12151
11514
|
method: "pause",
|
|
12152
|
-
summary: "Pause sandbox",
|
|
12153
|
-
description: "Suspend a running sandbox for later connection; use delete to discard it instead. Unlike E2B, light sandboxes preserve disk rather than memory, and persistent sandboxes can resume on data-plane traffic even when autoResume is false. Inspect paused state with the management retrieve operation to avoid waking the sandbox. Explicitly ephemeral sandboxes cannot pause. memory defaults to true, but only a memory-capable sandbox preserves running processes; memory=false saves disk state and resumes with a cold boot. Success returns 204; connect resumes the saved sandbox.",
|
|
12154
11515
|
http: "POST",
|
|
12155
11516
|
path: "/sandbox/v1/sandboxes/{sandboxID}/pause",
|
|
12156
11517
|
streaming: "no",
|
|
@@ -12177,8 +11538,6 @@ for more details.`
|
|
|
12177
11538
|
{
|
|
12178
11539
|
resource: "sandbox.sandboxes.processes",
|
|
12179
11540
|
method: "list",
|
|
12180
|
-
summary: "List live processes and retained observations",
|
|
12181
|
-
description: "Inspect live processes and retained observations; this does not start a command. Praxis observation, not complete provider history. Only a witnessed exit event establishes exitCode; disconnects and restarts leave gaps and unknown state. Output retains at most 1 MiB/1024 chunks per process and 4 MiB/4096 chunks per instance across 256 observations. Truncation is explicit. Output data is base64; timestamps are Unix milliseconds. Reading never resumes a paused sandbox.",
|
|
12182
11541
|
http: "GET",
|
|
12183
11542
|
path: "/sandbox/v1/sandboxes/{sandboxID}/processes",
|
|
12184
11543
|
streaming: "no",
|
|
@@ -12206,8 +11565,6 @@ for more details.`
|
|
|
12206
11565
|
{
|
|
12207
11566
|
resource: "sandbox.sandboxes.processes",
|
|
12208
11567
|
method: "retrieveOutput",
|
|
12209
|
-
summary: "Read bounded observed process output",
|
|
12210
|
-
description: "Read retained stdout and stderr chunks for a processID returned by processes.list. Praxis observation, not complete provider history. Only a witnessed exit event establishes exitCode; disconnects and restarts leave gaps and unknown state. Output retains at most 1 MiB/1024 chunks per process and 4 MiB/4096 chunks per instance across 256 observations. Truncation is explicit. Output data is base64; timestamps are Unix milliseconds. Reading never resumes a paused sandbox.",
|
|
12211
11568
|
http: "GET",
|
|
12212
11569
|
path: "/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output",
|
|
12213
11570
|
streaming: "no",
|
|
@@ -12227,8 +11584,6 @@ for more details.`
|
|
|
12227
11584
|
{
|
|
12228
11585
|
resource: "sandbox.sandboxes.snapshots",
|
|
12229
11586
|
method: "create",
|
|
12230
|
-
summary: "Create snapshot",
|
|
12231
|
-
description: "Create a persistent snapshot from the sandbox's current state. Snapshots can be used to create new sandboxes and persist beyond the original sandbox's lifetime.",
|
|
12232
11587
|
http: "POST",
|
|
12233
11588
|
path: "/sandbox/v1/sandboxes/{sandboxID}/snapshots",
|
|
12234
11589
|
streaming: "no",
|
|
@@ -12255,8 +11610,6 @@ for more details.`
|
|
|
12255
11610
|
{
|
|
12256
11611
|
resource: "sandbox.sandboxes",
|
|
12257
11612
|
method: "timeout",
|
|
12258
|
-
summary: "Set sandbox timeout",
|
|
12259
|
-
description: "Set the timeout for the sandbox. The sandbox will expire x seconds from the time of the request. Calling this method multiple times overwrites the TTL, each time using the current timestamp as the starting point to measure the timeout duration.",
|
|
12260
11613
|
http: "POST",
|
|
12261
11614
|
path: "/sandbox/v1/sandboxes/{sandboxID}/timeout",
|
|
12262
11615
|
streaming: "no",
|
|
@@ -12283,8 +11636,6 @@ for more details.`
|
|
|
12283
11636
|
{
|
|
12284
11637
|
resource: "sandbox.sandboxes.upgrade",
|
|
12285
11638
|
method: "create",
|
|
12286
|
-
summary: "Upgrade to a full sandbox",
|
|
12287
|
-
description: "Move a light sandbox to a full environment when its capabilities are insufficient. Stops active processes and terminals, migrates files, and preserves the sandbox ID and name. Reconnect with the new envdAccessToken. A failed migration preserves source files but does not restart terminated processes.",
|
|
12288
11639
|
http: "POST",
|
|
12289
11640
|
path: "/sandbox/v1/sandboxes/{sandboxID}/upgrade",
|
|
12290
11641
|
streaming: "no",
|
|
@@ -12311,8 +11662,6 @@ for more details.`
|
|
|
12311
11662
|
{
|
|
12312
11663
|
resource: "sandbox.sandboxes.commands",
|
|
12313
11664
|
method: "run",
|
|
12314
|
-
summary: "Run a command in the sandbox",
|
|
12315
|
-
description: 'Execute a shell command and wait for stdout, stderr and exitCode. Supply cmd, optional cwd and envs, and timeoutMs (1–60000 milliseconds, default 60000). Unlike E2B, this endpoint is synchronous only: no background mode, callbacks or unlimited timeout; output is bounded to 1 MiB including stream framing. Nonzero exit codes return 200 with the result. A timeout returns COMMAND_TIMEOUT (504); transport timeout does not confirm process termination, so do not blindly retry commands with side effects. Example body: {"cmd":"echo hi"}.',
|
|
12316
11665
|
http: "POST",
|
|
12317
11666
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/commands",
|
|
12318
11667
|
streaming: "no",
|
|
@@ -12357,8 +11706,6 @@ for more details.`
|
|
|
12357
11706
|
{
|
|
12358
11707
|
resource: "sandbox.sandboxes.files",
|
|
12359
11708
|
method: "remove",
|
|
12360
|
-
summary: "Remove a file or directory in the sandbox",
|
|
12361
|
-
description: "Remove an unneeded file or recursively remove a directory and its contents. This permanently deletes the selected path; read any needed content first. Returns 204 after removal.",
|
|
12362
11709
|
http: "DELETE",
|
|
12363
11710
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files",
|
|
12364
11711
|
streaming: "no",
|
|
@@ -12381,8 +11728,6 @@ for more details.`
|
|
|
12381
11728
|
{
|
|
12382
11729
|
resource: "sandbox.sandboxes.files",
|
|
12383
11730
|
method: "read",
|
|
12384
|
-
summary: "Read a file in the sandbox",
|
|
12385
|
-
description: "Read UTF-8 file content when a command needs input or produced a text artifact. Returns a JSON string. Unlike E2B, this endpoint supports text only and rejects output above 1 MiB; binary and streaming reads are unavailable.",
|
|
12386
11731
|
http: "GET",
|
|
12387
11732
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files",
|
|
12388
11733
|
streaming: "no",
|
|
@@ -12405,8 +11750,6 @@ for more details.`
|
|
|
12405
11750
|
{
|
|
12406
11751
|
resource: "sandbox.sandboxes.files",
|
|
12407
11752
|
method: "write",
|
|
12408
|
-
summary: "Write a file in the sandbox",
|
|
12409
|
-
description: 'Write a file in the sandbox before running a command. Replaces the target content and creates missing parent directories. Unlike E2B, this endpoint accepts one UTF-8 text file per request, at most 1 MiB; binary and batch writes are unavailable. Example body: {"path":"/tmp/hello.txt","data":"hello"}.',
|
|
12410
11753
|
http: "PUT",
|
|
12411
11754
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files",
|
|
12412
11755
|
streaming: "no",
|
|
@@ -12439,8 +11782,6 @@ for more details.`
|
|
|
12439
11782
|
{
|
|
12440
11783
|
resource: "sandbox.sandboxes.files",
|
|
12441
11784
|
method: "list",
|
|
12442
|
-
summary: "List files in a sandbox directory",
|
|
12443
|
-
description: "Inspect a directory to find paths to read or remove. Returns immediate children with name, path, type and size. Unlike E2B, recursive depth is unavailable and responses are limited to 1 MiB.",
|
|
12444
11785
|
http: "GET",
|
|
12445
11786
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files:list",
|
|
12446
11787
|
streaming: "no",
|
|
@@ -12463,8 +11804,6 @@ for more details.`
|
|
|
12463
11804
|
{
|
|
12464
11805
|
resource: "sandbox.sandboxes.files",
|
|
12465
11806
|
method: "makeDir",
|
|
12466
|
-
summary: "Create a directory in the sandbox",
|
|
12467
|
-
description: "Create a directory and missing parent directories before writing files. Returns true when created or false when the path already exists. Supply the path as a query parameter.",
|
|
12468
11807
|
http: "POST",
|
|
12469
11808
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files:makeDir",
|
|
12470
11809
|
streaming: "no",
|
|
@@ -12487,8 +11826,6 @@ for more details.`
|
|
|
12487
11826
|
{
|
|
12488
11827
|
resource: "sandbox.snapshots",
|
|
12489
11828
|
method: "list",
|
|
12490
|
-
summary: "List snapshots",
|
|
12491
|
-
description: "List the snapshots you created, one cursor page at a time. Use it to find a snapshot id before you create a sandbox from it or delete it. Filter by sandboxID (the source sandbox) or by name or snapshot id, optionally tag-qualified; limit is 1 to 100 (default 100). When more results exist send the cursor from the response back as nextToken.",
|
|
12492
11829
|
http: "GET",
|
|
12493
11830
|
path: "/sandbox/v1/snapshots",
|
|
12494
11831
|
streaming: "no",
|
|
@@ -12524,8 +11861,6 @@ for more details.`
|
|
|
12524
11861
|
{
|
|
12525
11862
|
resource: "sandbox.snapshots",
|
|
12526
11863
|
method: "delete",
|
|
12527
|
-
summary: "Delete template",
|
|
12528
|
-
description: "Delete one of your snapshots. Sandboxes already created from it keep running; no new sandbox can be created from it afterwards. Success answers 204. A snapshot that does not exist or belongs to someone else answers 404.",
|
|
12529
11864
|
http: "DELETE",
|
|
12530
11865
|
path: "/sandbox/v1/snapshots/{snapshotID}",
|
|
12531
11866
|
streaming: "no",
|
|
@@ -12541,8 +11876,6 @@ for more details.`
|
|
|
12541
11876
|
{
|
|
12542
11877
|
resource: "sandbox.templates",
|
|
12543
11878
|
method: "list",
|
|
12544
|
-
summary: "List templates (v2)",
|
|
12545
|
-
description: "Choose a templateID before creating a sandbox. Unlike E2B, this catalog lists your ready Environments and public Bases; use a returned ID or alias; `base` is the default template that create uses when templateID is omitted. Page through results using nextToken.",
|
|
12546
11879
|
http: "GET",
|
|
12547
11880
|
path: "/sandbox/v1/templates",
|
|
12548
11881
|
streaming: "no",
|
|
@@ -12572,8 +11905,6 @@ for more details.`
|
|
|
12572
11905
|
{
|
|
12573
11906
|
resource: "sandbox.volumes",
|
|
12574
11907
|
method: "list",
|
|
12575
|
-
summary: "List team volumes",
|
|
12576
|
-
description: "List the volumes of your team. Use it to find a volumeID before reading or deleting a volume, or to attach a volume to a sandbox by name when you create it.",
|
|
12577
11908
|
http: "GET",
|
|
12578
11909
|
path: "/sandbox/v1/volumes",
|
|
12579
11910
|
streaming: "no",
|
|
@@ -12584,8 +11915,6 @@ for more details.`
|
|
|
12584
11915
|
{
|
|
12585
11916
|
resource: "sandbox.volumes",
|
|
12586
11917
|
method: "create",
|
|
12587
|
-
summary: "Create team volume",
|
|
12588
|
-
description: "Create a team volume: persistent storage that can be mounted into sandboxes and outlives them. Send the volume name; the response returns the volume id and name. Use getVolume to read it back and deleteVolume to remove it.",
|
|
12589
11918
|
http: "POST",
|
|
12590
11919
|
path: "/sandbox/v1/volumes",
|
|
12591
11920
|
streaming: "no",
|
|
@@ -12607,8 +11936,6 @@ for more details.`
|
|
|
12607
11936
|
{
|
|
12608
11937
|
resource: "sandbox.volumes",
|
|
12609
11938
|
method: "delete",
|
|
12610
|
-
summary: "Delete team volume",
|
|
12611
|
-
description: "Delete a team volume and its data permanently. Use it only when no sandbox needs the volume any more; the data cannot be recovered. Success answers 204; an unknown id answers 404.",
|
|
12612
11939
|
http: "DELETE",
|
|
12613
11940
|
path: "/sandbox/v1/volumes/{volumeID}",
|
|
12614
11941
|
streaming: "no",
|
|
@@ -12624,8 +11951,6 @@ for more details.`
|
|
|
12624
11951
|
{
|
|
12625
11952
|
resource: "sandbox.volumes",
|
|
12626
11953
|
method: "retrieve",
|
|
12627
|
-
summary: "Team volume",
|
|
12628
|
-
description: "Read one team volume by id. Use it to confirm a volume exists and to read its name before mounting it in a sandbox. An unknown id answers 404.",
|
|
12629
11954
|
http: "GET",
|
|
12630
11955
|
path: "/sandbox/v1/volumes/{volumeID}",
|
|
12631
11956
|
streaming: "no",
|
|
@@ -12641,8 +11966,6 @@ for more details.`
|
|
|
12641
11966
|
{
|
|
12642
11967
|
resource: "search.crawl",
|
|
12643
11968
|
method: "create",
|
|
12644
|
-
summary: "Initiate a web crawl from a base URL",
|
|
12645
|
-
description: "Tavily Crawl is a graph-based website traversal tool that can explore hundreds of paths in parallel with built-in extraction and intelligent discovery.",
|
|
12646
11969
|
http: "POST",
|
|
12647
11970
|
path: "/search/v1/crawl",
|
|
12648
11971
|
streaming: "no",
|
|
@@ -12772,8 +12095,6 @@ for more details.`
|
|
|
12772
12095
|
{
|
|
12773
12096
|
resource: "search.extract",
|
|
12774
12097
|
method: "create",
|
|
12775
|
-
summary: "Retrieve raw web content from specified URLs",
|
|
12776
|
-
description: "Extract content from one URL or batch up to 20 URLs in one request. Successful URLs appear in results; per-URL failures appear in failed_results. Check both arrays even when the response is HTTP 200. Request options apply to every URL in the batch.",
|
|
12777
12098
|
http: "POST",
|
|
12778
12099
|
path: "/search/v1/extract",
|
|
12779
12100
|
streaming: "no",
|
|
@@ -12851,8 +12172,6 @@ for more details.`
|
|
|
12851
12172
|
{
|
|
12852
12173
|
resource: "search.map",
|
|
12853
12174
|
method: "create",
|
|
12854
|
-
summary: "Initiate a web mapping from a base URL",
|
|
12855
|
-
description: "Tavily Map traverses websites like a graph and can explore hundreds of paths in parallel with intelligent discovery to generate comprehensive site maps.",
|
|
12856
12175
|
http: "POST",
|
|
12857
12176
|
path: "/search/v1/map",
|
|
12858
12177
|
streaming: "no",
|
|
@@ -12944,8 +12263,6 @@ for more details.`
|
|
|
12944
12263
|
{
|
|
12945
12264
|
resource: "search.search",
|
|
12946
12265
|
method: "create",
|
|
12947
|
-
summary: "Search for data based on a query",
|
|
12948
|
-
description: "Search the web and return ranked results with extracted content. Use it to answer questions with current information; to read the full text of known URLs use searchExtract, to walk a site use searchCrawl and to list a site's URLs use searchMap. query is required. topic chooses general, news or finance; time_range limits results to the last day, week, month or year; country boosts results from one country (topic general only). Each result carries title, url, content and a relevance score, and the response can include a generated answer, images and follow-up questions when requested.",
|
|
12949
12266
|
http: "POST",
|
|
12950
12267
|
path: "/search/v1/search",
|
|
12951
12268
|
streaming: "no",
|
|
@@ -13306,8 +12623,6 @@ for more details.`
|
|
|
13306
12623
|
{
|
|
13307
12624
|
resource: "vault.authorizations",
|
|
13308
12625
|
method: "create",
|
|
13309
|
-
summary: "Create authorization",
|
|
13310
|
-
description: "Connect an OAuth service to an active vault using either an OAuth template or a resource URL. Unlike Anthropic mcp_oauth credential creation, this flow obtains tokens through user consent rather than accepting an auth token bundle; compatible mcp_oauth creation and updates return 501. Open connect_url, then poll praxis.vault.authorizations.retrieve until completed, failed or expired; only completed supplies the resulting secret_id. This stores a credential but does not enable vault-backed MCP authentication in Agent sessions.",
|
|
13311
12626
|
http: "POST",
|
|
13312
12627
|
path: "/vault/v1/authorizations",
|
|
13313
12628
|
streaming: "no",
|
|
@@ -13351,8 +12666,6 @@ for more details.`
|
|
|
13351
12666
|
{
|
|
13352
12667
|
resource: "vault.authorizations",
|
|
13353
12668
|
method: "retrieveCallback",
|
|
13354
|
-
summary: "Authorization callback",
|
|
13355
|
-
description: "Receive the authorization server's OAuth callback with single-use state and an authorization code or error. Completion creates or updates an OAuth secret; the browser is redirected to return_url when provided, otherwise shown a result page.",
|
|
13356
12669
|
http: "GET",
|
|
13357
12670
|
path: "/vault/v1/authorizations/callback",
|
|
13358
12671
|
streaming: "no",
|
|
@@ -13363,8 +12676,6 @@ for more details.`
|
|
|
13363
12676
|
{
|
|
13364
12677
|
resource: "vault.authorizations",
|
|
13365
12678
|
method: "retrieve",
|
|
13366
|
-
summary: "Get authorization",
|
|
13367
|
-
description: "Retrieve an authorization belonging to your account, including its current status and resulting secret_id. An unfinished authorization past expires_at is reported as expired.",
|
|
13368
12679
|
http: "GET",
|
|
13369
12680
|
path: "/vault/v1/authorizations/{authorization_id}",
|
|
13370
12681
|
streaming: "no",
|
|
@@ -13380,8 +12691,6 @@ for more details.`
|
|
|
13380
12691
|
{
|
|
13381
12692
|
resource: "vault.connect",
|
|
13382
12693
|
method: "retrieve",
|
|
13383
|
-
summary: "Connect page",
|
|
13384
|
-
description: "Display the user consent page for a connect_url token without requiring an API key. The page shows the requester, resource host and requested scopes before the user continues or denies.",
|
|
13385
12694
|
http: "GET",
|
|
13386
12695
|
path: "/vault/v1/connect/{token}",
|
|
13387
12696
|
streaming: "no",
|
|
@@ -13397,8 +12706,6 @@ for more details.`
|
|
|
13397
12706
|
{
|
|
13398
12707
|
resource: "vault.connect.continue",
|
|
13399
12708
|
method: "create",
|
|
13400
|
-
summary: "Continue authorization",
|
|
13401
|
-
description: "Consume a pending authorization's one-time connect token and redirect the browser to the authorization server. Expired or already used links cannot start another authorization flow.",
|
|
13402
12709
|
http: "POST",
|
|
13403
12710
|
path: "/vault/v1/connect/{token}/continue",
|
|
13404
12711
|
streaming: "no",
|
|
@@ -13414,8 +12721,6 @@ for more details.`
|
|
|
13414
12721
|
{
|
|
13415
12722
|
resource: "vault.connect.deny",
|
|
13416
12723
|
method: "create",
|
|
13417
|
-
summary: "Deny authorization",
|
|
13418
|
-
description: "Consume a pending authorization's one-time connect token and mark it failed with access_denied. Redirect to the configured return URL, or display a result page when none was supplied.",
|
|
13419
12724
|
http: "POST",
|
|
13420
12725
|
path: "/vault/v1/connect/{token}/deny",
|
|
13421
12726
|
streaming: "no",
|
|
@@ -13431,8 +12736,6 @@ for more details.`
|
|
|
13431
12736
|
{
|
|
13432
12737
|
resource: "vault.oauth",
|
|
13433
12738
|
method: "retrieveClientMetadata",
|
|
13434
|
-
summary: "OAuth client metadata",
|
|
13435
|
-
description: "Return the public OAuth client metadata used by authorization servers that support CIMD. The document declares the Praxis client identity and callback URL; no API key is required.",
|
|
13436
12739
|
http: "GET",
|
|
13437
12740
|
path: "/vault/v1/oauth/client.json",
|
|
13438
12741
|
streaming: "no",
|
|
@@ -13443,8 +12746,6 @@ for more details.`
|
|
|
13443
12746
|
{
|
|
13444
12747
|
resource: "vault.settings.returnUrls",
|
|
13445
12748
|
method: "list",
|
|
13446
|
-
summary: "Get return URLs",
|
|
13447
|
-
description: "Read your account's allowlist of OAuth return URLs. The list is empty until configured, and authorization return_url values must match an entry exactly.",
|
|
13448
12749
|
http: "GET",
|
|
13449
12750
|
path: "/vault/v1/settings/return_urls",
|
|
13450
12751
|
streaming: "no",
|
|
@@ -13455,8 +12756,6 @@ for more details.`
|
|
|
13455
12756
|
{
|
|
13456
12757
|
resource: "vault.settings.returnUrls",
|
|
13457
12758
|
method: "update",
|
|
13458
|
-
summary: "Set return URLs",
|
|
13459
|
-
description: "Replace your account's complete allowlist of OAuth return URLs. Entries are deduplicated after validation; an empty array clears the allowlist.",
|
|
13460
12759
|
http: "PUT",
|
|
13461
12760
|
path: "/vault/v1/settings/return_urls",
|
|
13462
12761
|
streaming: "no",
|
|
@@ -13479,8 +12778,6 @@ for more details.`
|
|
|
13479
12778
|
{
|
|
13480
12779
|
resource: "vault.templates",
|
|
13481
12780
|
method: "list",
|
|
13482
|
-
summary: "List templates",
|
|
13483
|
-
description: "List templates for manually supplied static secrets and OAuth authorizations. Templates provide suggested names and allowed hosts; they are not stored secrets.",
|
|
13484
12781
|
http: "GET",
|
|
13485
12782
|
path: "/vault/v1/templates",
|
|
13486
12783
|
streaming: "no",
|
|
@@ -13491,8 +12788,6 @@ for more details.`
|
|
|
13491
12788
|
{
|
|
13492
12789
|
resource: "vault.vaults",
|
|
13493
12790
|
method: "list",
|
|
13494
|
-
summary: "List vaults",
|
|
13495
|
-
description: "List vaults belonging to your account, newest first. Archived vaults are excluded unless include_archived is true; use next_cursor to request another page.",
|
|
13496
12791
|
http: "GET",
|
|
13497
12792
|
path: "/vault/v1/vaults",
|
|
13498
12793
|
streaming: "no",
|
|
@@ -13522,8 +12817,6 @@ for more details.`
|
|
|
13522
12817
|
{
|
|
13523
12818
|
resource: "vault.vaults",
|
|
13524
12819
|
method: "create",
|
|
13525
|
-
summary: "Create vault",
|
|
13526
|
-
description: "Create an empty, active vault to hold credentials for your account, with a display name and optional metadata. Use its returned id as vault_id when creating secrets or OAuth authorizations. Unlike Anthropic, Agent sessions do not accept nonempty vault_ids; storing a credential or adding its ID to metadata does not enable vault-backed MCP authentication. Application vault references are also unavailable; praxis_vault_ref version bindings and secret writes with a vault source return 501, so creating a vault does not yet enable either consumer.",
|
|
13527
12820
|
http: "POST",
|
|
13528
12821
|
path: "/vault/v1/vaults",
|
|
13529
12822
|
streaming: "no",
|
|
@@ -13551,8 +12844,6 @@ for more details.`
|
|
|
13551
12844
|
{
|
|
13552
12845
|
resource: "vault.vaults",
|
|
13553
12846
|
method: "delete",
|
|
13554
|
-
summary: "Delete vault",
|
|
13555
|
-
description: "Permanently delete a vault, its secrets, authorizations and previous audit events. Only a vault deletion event remains; the deleted vault can no longer be retrieved.",
|
|
13556
12847
|
http: "DELETE",
|
|
13557
12848
|
path: "/vault/v1/vaults/{vault_id}",
|
|
13558
12849
|
streaming: "no",
|
|
@@ -13568,8 +12859,6 @@ for more details.`
|
|
|
13568
12859
|
{
|
|
13569
12860
|
resource: "vault.vaults",
|
|
13570
12861
|
method: "retrieve",
|
|
13571
|
-
summary: "Get vault",
|
|
13572
|
-
description: "Retrieve a vault belonging to your account, including archived vaults and secret counts. Missing or other accounts' vaults return VAULT_NOT_FOUND.",
|
|
13573
12862
|
http: "GET",
|
|
13574
12863
|
path: "/vault/v1/vaults/{vault_id}",
|
|
13575
12864
|
streaming: "no",
|
|
@@ -13585,8 +12874,6 @@ for more details.`
|
|
|
13585
12874
|
{
|
|
13586
12875
|
resource: "vault.vaults",
|
|
13587
12876
|
method: "update",
|
|
13588
|
-
summary: "Update vault",
|
|
13589
|
-
description: "Update an active vault's display name or patch its metadata. Omitted fields are preserved; archived vaults cannot be updated.",
|
|
13590
12877
|
http: "POST",
|
|
13591
12878
|
path: "/vault/v1/vaults/{vault_id}",
|
|
13592
12879
|
streaming: "no",
|
|
@@ -13619,8 +12906,6 @@ for more details.`
|
|
|
13619
12906
|
{
|
|
13620
12907
|
resource: "vault.vaults",
|
|
13621
12908
|
method: "archive",
|
|
13622
|
-
summary: "Archive vault",
|
|
13623
|
-
description: "Archive a vault and all its remaining secrets, erasing their values while retaining metadata and audit history. An already archived vault is returned unchanged.",
|
|
13624
12909
|
http: "POST",
|
|
13625
12910
|
path: "/vault/v1/vaults/{vault_id}/archive",
|
|
13626
12911
|
streaming: "no",
|
|
@@ -13636,8 +12921,6 @@ for more details.`
|
|
|
13636
12921
|
{
|
|
13637
12922
|
resource: "vault.vaults.events",
|
|
13638
12923
|
method: "list",
|
|
13639
|
-
summary: "List events",
|
|
13640
|
-
description: "List a vault's audit events, newest first, without secret values. Filter by secret ID or name; a name includes archived and deleted secrets that carried it. An unknown secret returns an empty page.",
|
|
13641
12924
|
http: "GET",
|
|
13642
12925
|
path: "/vault/v1/vaults/{vault_id}/events",
|
|
13643
12926
|
streaming: "no",
|
|
@@ -13672,8 +12955,6 @@ for more details.`
|
|
|
13672
12955
|
{
|
|
13673
12956
|
resource: "vault.vaults.secrets",
|
|
13674
12957
|
method: "list",
|
|
13675
|
-
summary: "List secrets",
|
|
13676
|
-
description: "List secret metadata in a vault, newest first, without returning values. Archived secrets are excluded unless include_archived is true.",
|
|
13677
12958
|
http: "GET",
|
|
13678
12959
|
path: "/vault/v1/vaults/{vault_id}/secrets",
|
|
13679
12960
|
streaming: "no",
|
|
@@ -13708,8 +12989,6 @@ for more details.`
|
|
|
13708
12989
|
{
|
|
13709
12990
|
resource: "vault.vaults.secrets",
|
|
13710
12991
|
method: "create",
|
|
13711
|
-
summary: "Create secret",
|
|
13712
|
-
description: "Store a manually supplied token in an active vault for use on requests to its allowed_hosts. Unlike Anthropic credentials, this native operation takes name, value and allowed_hosts directly and creates only static secrets; use praxis.vault.authorizations.create for OAuth. Its name must be unused by any non-archived secret in that vault; the response contains metadata but never the supplied value. Application praxis_vault_ref bindings declare vault_id and secret (the secret name), but currently return 501; do not copy the value into a plain-text binding or metadata as a substitute.",
|
|
13713
12992
|
http: "POST",
|
|
13714
12993
|
path: "/vault/v1/vaults/{vault_id}/secrets",
|
|
13715
12994
|
streaming: "no",
|
|
@@ -13782,8 +13061,6 @@ for more details.`
|
|
|
13782
13061
|
{
|
|
13783
13062
|
resource: "vault.vaults.secrets",
|
|
13784
13063
|
method: "delete",
|
|
13785
|
-
summary: "Delete secret",
|
|
13786
|
-
description: "Permanently delete a secret and its previous audit events. A deletion event retaining the secret ID and name remains, and other secrets are unchanged.",
|
|
13787
13064
|
http: "DELETE",
|
|
13788
13065
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}",
|
|
13789
13066
|
streaming: "no",
|
|
@@ -13803,8 +13080,6 @@ for more details.`
|
|
|
13803
13080
|
{
|
|
13804
13081
|
resource: "vault.vaults.secrets",
|
|
13805
13082
|
method: "retrieve",
|
|
13806
|
-
summary: "Get secret",
|
|
13807
|
-
description: "Inspect a secret's kind, allowed_hosts, status and version without reading its value. Unlike Anthropic credential lookup by ID, this native operation accepts either the name or the vsec_ ID returned by secret creation or listing. A name selects a non-archived secret; use the secret ID to retrieve an archived secret.",
|
|
13808
13083
|
http: "GET",
|
|
13809
13084
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}",
|
|
13810
13085
|
streaming: "no",
|
|
@@ -13824,8 +13099,6 @@ for more details.`
|
|
|
13824
13099
|
{
|
|
13825
13100
|
resource: "vault.vaults.secrets",
|
|
13826
13101
|
method: "update",
|
|
13827
|
-
summary: "Update secret",
|
|
13828
|
-
description: "Rotate a non-archived secret in an active vault by supplying value, or patch its hosts, description or metadata. Unlike Anthropic credential updates, this native operation accepts the replacement value directly, without an auth object. Each supplied value increments version, even if unchanged, and can recover an OAuth secret from refresh_failed; the secret ID, name and kind stay unchanged. Omit value for a metadata-only edit; existing references do not need a new secret ID or name.",
|
|
13829
13102
|
http: "POST",
|
|
13830
13103
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}",
|
|
13831
13104
|
streaming: "no",
|
|
@@ -13875,8 +13148,6 @@ for more details.`
|
|
|
13875
13148
|
{
|
|
13876
13149
|
resource: "vault.vaults.secrets",
|
|
13877
13150
|
method: "archive",
|
|
13878
|
-
summary: "Archive secret",
|
|
13879
|
-
description: "Archive a secret, erase its value and release its name for reuse. Metadata and audit history remain; use its ID for subsequent reads or repeated archive requests.",
|
|
13880
13151
|
http: "POST",
|
|
13881
13152
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}/archive",
|
|
13882
13153
|
streaming: "no",
|
|
@@ -13896,8 +13167,6 @@ for more details.`
|
|
|
13896
13167
|
{
|
|
13897
13168
|
resource: "vault.vaults.secrets.refresh",
|
|
13898
13169
|
method: "create",
|
|
13899
|
-
summary: "Refresh secret",
|
|
13900
|
-
description: "Request an OAuth secret refresh and return its current metadata without token values. Refresh may be skipped if already in progress, unavailable or in refresh_failed; inspect the returned status and oauth fields.",
|
|
13901
13170
|
http: "POST",
|
|
13902
13171
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}/refresh",
|
|
13903
13172
|
streaming: "no",
|
|
@@ -13931,8 +13200,6 @@ for more details.`
|
|
|
13931
13200
|
{
|
|
13932
13201
|
resource: "vault.vaults.secrets.validate",
|
|
13933
13202
|
method: "create",
|
|
13934
|
-
summary: "Validate secret",
|
|
13935
|
-
description: "Probe an OAuth secret's resource with its access token, attempting refresh first if the token has expired. Return the validation verdict and sanitized HTTP summaries; static secrets are unsupported.",
|
|
13936
13203
|
http: "POST",
|
|
13937
13204
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}/validate",
|
|
13938
13205
|
streaming: "no",
|
|
@@ -13952,8 +13219,6 @@ for more details.`
|
|
|
13952
13219
|
{
|
|
13953
13220
|
resource: "vault.vaults.secrets",
|
|
13954
13221
|
method: "import",
|
|
13955
|
-
summary: "Import secrets",
|
|
13956
|
-
description: "Import lines or dotenv text into an active vault, reporting success or failure for each entry. Existing names have their values replaced; their hosts change only when that line supplies allowed_hosts. Shared hosts apply only to newly created secrets.",
|
|
13957
13222
|
http: "POST",
|
|
13958
13223
|
path: "/vault/v1/vaults/{vault_id}/secrets:import",
|
|
13959
13224
|
streaming: "no",
|
|
@@ -13994,8 +13259,6 @@ for more details.`
|
|
|
13994
13259
|
{
|
|
13995
13260
|
resource: "vault.vaults",
|
|
13996
13261
|
method: "check",
|
|
13997
|
-
summary: "Check vaults",
|
|
13998
|
-
description: "Check the availability of each supplied vault ID in request order. Missing, malformed and other accounts' IDs all return not_found; duplicate IDs are preserved.",
|
|
13999
13262
|
http: "POST",
|
|
14000
13263
|
path: "/vault/v1/vaults:check",
|
|
14001
13264
|
streaming: "no",
|
|
@@ -20912,7 +20175,7 @@ function commandTree(operations2) {
|
|
|
20912
20175
|
const key = words.join(" ");
|
|
20913
20176
|
if (seen.has(key))
|
|
20914
20177
|
throw new Error(`Command collision: ${key}; add a reasoned command-overrides.ts entry`);
|
|
20915
|
-
if (["login", "logout", "whoami", "org", "api"
|
|
20178
|
+
if (["login", "logout", "whoami", "org", "api"].includes(words[0]))
|
|
20916
20179
|
throw new Error(`Reserved command: ${key}`);
|
|
20917
20180
|
seen.add(key);
|
|
20918
20181
|
commands.push({ words, op, ...method !== op.method ? { alias: method } : {} });
|
|
@@ -21074,12 +20337,7 @@ function convert(value, spec) {
|
|
|
21074
20337
|
return result;
|
|
21075
20338
|
}
|
|
21076
20339
|
function globalsOf(parsed) {
|
|
21077
|
-
|
|
21078
|
-
if (flags.all && flags.limit !== undefined)
|
|
21079
|
-
throw new UsageError("--all and --limit cannot be used together");
|
|
21080
|
-
if (typeof flags.limit === "number" && flags.limit < 0)
|
|
21081
|
-
throw new UsageError("--limit must be non-negative");
|
|
21082
|
-
return flags;
|
|
20340
|
+
return Object.fromEntries(globalOptions.filter((s) => parsed.flags[s.name]).map((s) => [s.name, convert(parsed.flags[s.name][0], s)]));
|
|
21083
20341
|
}
|
|
21084
20342
|
async function readData(value, ports) {
|
|
21085
20343
|
if (value === undefined)
|
|
@@ -21133,9 +20391,7 @@ function bindArgs(parsed, op, data) {
|
|
|
21133
20391
|
(opts[spec.location] ??= {})[spec.sdkName] = value;
|
|
21134
20392
|
}
|
|
21135
20393
|
for (const name of ["limit", "cursor"]) {
|
|
21136
|
-
|
|
21137
|
-
continue;
|
|
21138
|
-
const field = op.query.find((f) => name === "limit" ? /^(limit|page_size|pageSize)$/.test(f.name) : f.name === name);
|
|
20394
|
+
const field = op.query.find((f) => f.name === name);
|
|
21139
20395
|
if (globals[name] !== undefined && field) {
|
|
21140
20396
|
const key = field.sdkName ?? field.name;
|
|
21141
20397
|
(opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
|
|
@@ -21207,7 +20463,7 @@ function help(commands, prefix, command) {
|
|
|
21207
20463
|
const matching = commands.filter((c) => prefix.every((w, i) => c.words[i] === w));
|
|
21208
20464
|
const children = [...new Set(matching.map((c) => c.words[prefix.length]).filter(Boolean))].sort();
|
|
21209
20465
|
if (!prefix.length)
|
|
21210
|
-
children.unshift("login", "logout", "whoami", "org", "api"
|
|
20466
|
+
children.unshift("login", "logout", "whoami", "org", "api");
|
|
21211
20467
|
return [
|
|
21212
20468
|
`praxis${prefix.length ? " " + prefix.join(" ") : ""} <command> [options]`,
|
|
21213
20469
|
"",
|
|
@@ -21248,79 +20504,6 @@ function environment(vars = process.env) {
|
|
|
21248
20504
|
import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
21249
20505
|
import { homedir } from "node:os";
|
|
21250
20506
|
import { join } from "node:path";
|
|
21251
|
-
|
|
21252
|
-
// src/auth/secret-store.ts
|
|
21253
|
-
import { spawn } from "node:child_process";
|
|
21254
|
-
var runSecretCommand = (file, args, input) => new Promise((resolve) => {
|
|
21255
|
-
const child = spawn(file, [...args], { stdio: ["pipe", "pipe", "pipe"], timeout: 1e4 });
|
|
21256
|
-
const chunks = [];
|
|
21257
|
-
child.stdout.on("data", (chunk) => chunks.push(Buffer.from(chunk)));
|
|
21258
|
-
child.stderr.resume();
|
|
21259
|
-
child.stdin.on("error", () => {});
|
|
21260
|
-
child.once("error", (error) => resolve({ code: null, stdout: "", missing: error.code === "ENOENT" }));
|
|
21261
|
-
child.once("close", (code) => resolve({ code, stdout: Buffer.concat(chunks).toString("utf8") }));
|
|
21262
|
-
child.stdin.end(input);
|
|
21263
|
-
});
|
|
21264
|
-
var unavailable = () => new Error("System keychain unavailable");
|
|
21265
|
-
var unavailableSecretStore = {
|
|
21266
|
-
async get() {
|
|
21267
|
-
throw unavailable();
|
|
21268
|
-
},
|
|
21269
|
-
async set() {
|
|
21270
|
-
throw unavailable();
|
|
21271
|
-
},
|
|
21272
|
-
async delete() {
|
|
21273
|
-
return false;
|
|
21274
|
-
}
|
|
21275
|
-
};
|
|
21276
|
-
function systemSecretStore(options = {}) {
|
|
21277
|
-
const platform = options.platform ?? process.platform;
|
|
21278
|
-
const run = options.run ?? runSecretCommand;
|
|
21279
|
-
const service = options.service ?? "praxis-cli";
|
|
21280
|
-
if (!["darwin", "linux"].includes(platform))
|
|
21281
|
-
return unavailableSecretStore;
|
|
21282
|
-
const validate = (key) => {
|
|
21283
|
-
if (!/^[a-zA-Z0-9_-]+$/.test(service) || !/^[a-zA-Z0-9_-]+$/.test(key))
|
|
21284
|
-
throw unavailable();
|
|
21285
|
-
};
|
|
21286
|
-
return {
|
|
21287
|
-
async get(key) {
|
|
21288
|
-
validate(key);
|
|
21289
|
-
const result = platform === "darwin" ? await run("security", ["find-generic-password", "-s", service, "-a", key, "-w"]) : await run("secret-tool", ["lookup", "service", service, "account", key]);
|
|
21290
|
-
if (result.code === 0)
|
|
21291
|
-
return result.stdout.replace(/\r?\n$/, "");
|
|
21292
|
-
if (result.code === (platform === "darwin" ? 44 : 1))
|
|
21293
|
-
return null;
|
|
21294
|
-
throw unavailable();
|
|
21295
|
-
},
|
|
21296
|
-
async set(key, value) {
|
|
21297
|
-
validate(key);
|
|
21298
|
-
let result;
|
|
21299
|
-
if (platform === "darwin") {
|
|
21300
|
-
const input = `add-generic-password -U -s ${service} -a ${key} -X ${Buffer.from(value, "utf8").toString("hex")}
|
|
21301
|
-
`;
|
|
21302
|
-
if (Buffer.byteLength(input) >= 4096)
|
|
21303
|
-
throw unavailable();
|
|
21304
|
-
result = await run("security", ["-i"], input);
|
|
21305
|
-
} else {
|
|
21306
|
-
result = await run("secret-tool", ["store", `--label=${service}`, "service", service, "account", key], value);
|
|
21307
|
-
}
|
|
21308
|
-
if (result.code !== 0)
|
|
21309
|
-
throw unavailable();
|
|
21310
|
-
},
|
|
21311
|
-
async delete(key) {
|
|
21312
|
-
validate(key);
|
|
21313
|
-
const result = platform === "darwin" ? await run("security", ["delete-generic-password", "-s", service, "-a", key]) : await run("secret-tool", ["clear", "service", service, "account", key]);
|
|
21314
|
-
if (result.code === 0)
|
|
21315
|
-
return true;
|
|
21316
|
-
if (result.missing || result.code === (platform === "darwin" ? 44 : 1))
|
|
21317
|
-
return false;
|
|
21318
|
-
throw unavailable();
|
|
21319
|
-
}
|
|
21320
|
-
};
|
|
21321
|
-
}
|
|
21322
|
-
|
|
21323
|
-
// src/auth/token-store.ts
|
|
21324
20507
|
var CLIENT_ID = "praxis-cli";
|
|
21325
20508
|
var SCOPE = "openid profile email offline_access";
|
|
21326
20509
|
function tokenPath(env, home = homedir()) {
|
|
@@ -21348,59 +20531,6 @@ function deleteTokens(path) {
|
|
|
21348
20531
|
rmSync(path);
|
|
21349
20532
|
return true;
|
|
21350
20533
|
}
|
|
21351
|
-
function createTokenStore(env, path = tokenPath(env), secret = systemSecretStore()) {
|
|
21352
|
-
let location;
|
|
21353
|
-
const session = {
|
|
21354
|
-
location: () => location,
|
|
21355
|
-
async load() {
|
|
21356
|
-
const file = loadTokens(path);
|
|
21357
|
-
if (file) {
|
|
21358
|
-
await session.save(file);
|
|
21359
|
-
return file;
|
|
21360
|
-
}
|
|
21361
|
-
try {
|
|
21362
|
-
const raw = await secret.get(env);
|
|
21363
|
-
if (!raw)
|
|
21364
|
-
return null;
|
|
21365
|
-
const value = JSON.parse(raw);
|
|
21366
|
-
if (typeof value.access_token !== "string" || typeof value.expires_at !== "number")
|
|
21367
|
-
return null;
|
|
21368
|
-
location = "keychain";
|
|
21369
|
-
return value;
|
|
21370
|
-
} catch {
|
|
21371
|
-
return null;
|
|
21372
|
-
}
|
|
21373
|
-
},
|
|
21374
|
-
async save(tokens) {
|
|
21375
|
-
try {
|
|
21376
|
-
await secret.set(env, JSON.stringify(tokens));
|
|
21377
|
-
} catch {
|
|
21378
|
-
saveTokens(path, tokens);
|
|
21379
|
-
return location = `file ${path}`;
|
|
21380
|
-
}
|
|
21381
|
-
deleteTokens(path);
|
|
21382
|
-
return location = "keychain";
|
|
21383
|
-
},
|
|
21384
|
-
async delete() {
|
|
21385
|
-
let removed = false;
|
|
21386
|
-
try {
|
|
21387
|
-
removed = await secret.delete(env);
|
|
21388
|
-
} finally {
|
|
21389
|
-
removed = deleteTokens(path) || removed;
|
|
21390
|
-
location = undefined;
|
|
21391
|
-
}
|
|
21392
|
-
return removed;
|
|
21393
|
-
}
|
|
21394
|
-
};
|
|
21395
|
-
const transaction = (run) => withLock(`${path}.lock`, () => run(session));
|
|
21396
|
-
return {
|
|
21397
|
-
location: session.location,
|
|
21398
|
-
transaction,
|
|
21399
|
-
load: () => transaction((s) => s.load()),
|
|
21400
|
-
save: (tokens) => transaction((s) => s.save(tokens)),
|
|
21401
|
-
delete: () => transaction((s) => s.delete())
|
|
21402
|
-
};
|
|
21403
|
-
}
|
|
21404
20534
|
function toStored(tokens, now, previous) {
|
|
21405
20535
|
const refresh = tokens.refresh_token ?? previous?.refresh_token;
|
|
21406
20536
|
return { ...previous?.organization_id ? { organization_id: previous.organization_id } : {}, access_token: tokens.access_token, ...refresh ? { refresh_token: refresh } : {}, expires_at: now + (tokens.expires_in ?? 900) * 1000 };
|
|
@@ -21423,9 +20553,13 @@ async function currentAccessToken(options) {
|
|
|
21423
20553
|
const now = options.now ?? Date.now;
|
|
21424
20554
|
const path = options.path ?? tokenPath(options.env);
|
|
21425
20555
|
const fresh = (t) => t !== null && t.expires_at - REFRESH_SKEW_MS > now();
|
|
21426
|
-
const
|
|
21427
|
-
|
|
21428
|
-
|
|
20556
|
+
const stored = loadTokens(path);
|
|
20557
|
+
if (!stored)
|
|
20558
|
+
return null;
|
|
20559
|
+
if (fresh(stored))
|
|
20560
|
+
return stored.access_token;
|
|
20561
|
+
return withLock(`${path}.lock`, async () => {
|
|
20562
|
+
const current = loadTokens(path);
|
|
21429
20563
|
if (!current)
|
|
21430
20564
|
return null;
|
|
21431
20565
|
if (fresh(current))
|
|
@@ -21433,7 +20567,7 @@ async function currentAccessToken(options) {
|
|
|
21433
20567
|
const refreshed = await refreshTokens(current, options.accountUrl, options.fetch, now());
|
|
21434
20568
|
if (!refreshed)
|
|
21435
20569
|
return null;
|
|
21436
|
-
|
|
20570
|
+
saveTokens(path, refreshed);
|
|
21437
20571
|
return refreshed.access_token;
|
|
21438
20572
|
});
|
|
21439
20573
|
}
|
|
@@ -21495,7 +20629,6 @@ function jwtFetch(fetchImpl, token) {
|
|
|
21495
20629
|
}
|
|
21496
20630
|
function credentials(config, vars, ports) {
|
|
21497
20631
|
const path = ports.path ?? tokenPath(config.env);
|
|
21498
|
-
const store = ports.store ?? createTokenStore(config.env, path, ports.secretStore);
|
|
21499
20632
|
const apiKey = vars.PRAXIS_API_KEY;
|
|
21500
20633
|
const remember = ports.remember ?? (() => {});
|
|
21501
20634
|
if (apiKey)
|
|
@@ -21508,13 +20641,13 @@ function credentials(config, vars, ports) {
|
|
|
21508
20641
|
throw new UsageError("The API Key determines the organization; listing or switching login organizations is unavailable.", "Unset PRAXIS_API_KEY and run `praxis login`, then retry the org command.");
|
|
21509
20642
|
};
|
|
21510
20643
|
async function exchange(organizationId) {
|
|
21511
|
-
const stored =
|
|
20644
|
+
const stored = loadTokens(path);
|
|
21512
20645
|
if (stored) {
|
|
21513
20646
|
remember(stored.access_token);
|
|
21514
20647
|
if (stored.refresh_token)
|
|
21515
20648
|
remember(stored.refresh_token);
|
|
21516
20649
|
}
|
|
21517
|
-
const opaque = await currentAccessToken({ env: config.env, accountUrl: config.accountUrl, path,
|
|
20650
|
+
const opaque = await currentAccessToken({ env: config.env, accountUrl: config.accountUrl, path, now: ports.now, fetch: (url, init) => ports.fetch(url, { ...init, signal: AbortSignal.timeout(1e4), redirect: "error" }) });
|
|
21518
20651
|
if (!opaque)
|
|
21519
20652
|
throw new PraxisError({ code: "NOT_LOGGED_IN", message: "Not logged in or login has expired." });
|
|
21520
20653
|
remember(opaque);
|
|
@@ -21522,7 +20655,7 @@ function credentials(config, vars, ports) {
|
|
|
21522
20655
|
if (!result.access_token || !Number.isFinite(result.claims?.exp) || result.claims.exp * 1000 <= ports.now())
|
|
21523
20656
|
throw new PraxisError({ code: "INVALID_RESPONSE", message: "Invalid OAuth exchange response" });
|
|
21524
20657
|
remember(result.access_token);
|
|
21525
|
-
return { source: "login",
|
|
20658
|
+
return { source: "login", token: result.access_token, expiresAt: result.claims.exp * 1000, organizationId: result.claims.org ?? organizationId };
|
|
21526
20659
|
}
|
|
21527
20660
|
async function get(org) {
|
|
21528
20661
|
if (apiKey) {
|
|
@@ -21530,7 +20663,7 @@ function credentials(config, vars, ports) {
|
|
|
21530
20663
|
throw new UsageError("--org cannot override an API Key organization", "Remove --org or unset PRAXIS_API_KEY and run `praxis login`.");
|
|
21531
20664
|
return { source: "api-key", token: apiKey };
|
|
21532
20665
|
}
|
|
21533
|
-
const stored =
|
|
20666
|
+
const stored = loadTokens(path);
|
|
21534
20667
|
const selected = org ?? stored?.organization_id;
|
|
21535
20668
|
const opaqueFresh = stored !== null && stored.expires_at - 30000 > ports.now();
|
|
21536
20669
|
if (opaqueFresh && cached && cachedOrg === selected && cached.expiresAt - 30000 > ports.now())
|
|
@@ -21562,11 +20695,11 @@ function credentials(config, vars, ports) {
|
|
|
21562
20695
|
async switchOrganization(organizationId) {
|
|
21563
20696
|
requireLogin();
|
|
21564
20697
|
const credential = await exchange(organizationId);
|
|
21565
|
-
await
|
|
21566
|
-
const stored =
|
|
20698
|
+
await withLock(`${path}.lock`, async () => {
|
|
20699
|
+
const stored = loadTokens(path);
|
|
21567
20700
|
if (!stored)
|
|
21568
20701
|
throw new PraxisError({ code: "NOT_LOGGED_IN", message: "Logged out." });
|
|
21569
|
-
|
|
20702
|
+
saveTokens(path, { ...stored, organization_id: organizationId });
|
|
21570
20703
|
});
|
|
21571
20704
|
cached = credential;
|
|
21572
20705
|
cachedOrg = organizationId;
|
|
@@ -21575,97 +20708,6 @@ function credentials(config, vars, ports) {
|
|
|
21575
20708
|
};
|
|
21576
20709
|
}
|
|
21577
20710
|
|
|
21578
|
-
// src/commands/skill.ts
|
|
21579
|
-
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
21580
|
-
import { join as join2 } from "node:path";
|
|
21581
|
-
function commandSummary(command) {
|
|
21582
|
-
if (command.op.summary?.trim())
|
|
21583
|
-
return command.op.summary.replace(/[\r\n]+/g, " ");
|
|
21584
|
-
const description = (command.op.description ?? "").trim().replace(/!?\[([^\]]*)\]\([^)]*\)/g, "$1").replace(/\[([^\]]+)\]\[[^\]]*\]/g, "$1").replace(/<[^>]*>/g, "").replace(/^\s*(?:#{1,6}\s+|>\s*|[-+*]\s+|\d+\.\s+)/gm, "").replace(/(\*\*|__|~~)(.*?)\1/g, "$2").replace(/(?<!\w)([*_])([^\n]+?)\1(?!\w)/g, "$2").replace(/`+/g, "").split(/[.。\r\n]/, 1)[0].trim();
|
|
21585
|
-
if (description) {
|
|
21586
|
-
const chars = [...description];
|
|
21587
|
-
return chars.length > 120 ? chars.slice(0, 119).join("") + "…" : description;
|
|
21588
|
-
}
|
|
21589
|
-
const words = [...command.words];
|
|
21590
|
-
const verb = (words.pop() ?? "use").replace(/-/g, " ");
|
|
21591
|
-
if (verb === "list" && words.length && !words.at(-1).endsWith("s"))
|
|
21592
|
-
words[words.length - 1] += "s";
|
|
21593
|
-
return `${verb[0].toUpperCase()}${verb.slice(1)} ${words.join(" ")}`.trim();
|
|
21594
|
-
}
|
|
21595
|
-
function skillDocument(commands) {
|
|
21596
|
-
const lines = [
|
|
21597
|
-
"---",
|
|
21598
|
-
"name: praxis-cli",
|
|
21599
|
-
"description: Use the Praxis CLI to discover and call Deepraxis API operations, manage login, and inspect resources from an AI agent.",
|
|
21600
|
-
"---",
|
|
21601
|
-
"",
|
|
21602
|
-
"# Praxis CLI",
|
|
21603
|
-
"",
|
|
21604
|
-
"## General rules",
|
|
21605
|
-
"",
|
|
21606
|
-
"- Select the environment only with `PRAXIS_ENV`; there is no `--env` option. The dev package defaults to develop.",
|
|
21607
|
-
"- Authenticate with `PRAXIS_API_KEY` or `praxis login`. API keys determine the organization; login sessions can use `--org <organization_id>`.",
|
|
21608
|
-
"- AI mode is enabled automatically in supported agent environments. Use `--format agent` to select it explicitly.",
|
|
21609
|
-
"- Use `--json` for the complete JSON response without presentation truncation. Successful JSON output goes to stdout; errors go to stderr.",
|
|
21610
|
-
"- Supply bodies with `--data JSON`, `--data @file.json`, or `--data -` for stdin. Scalar field options override matching JSON fields. Structured fields require `--data`.",
|
|
21611
|
-
"- Deletion requires `--yes` in AI mode. Confirm the intended resource before using it.",
|
|
21612
|
-
"- Use `--limit N` to limit a server page for SDK-paginated commands. Other lists apply it only to displayed rows; `--param-limit` still sends the API parameter when available. `--all` follows supported pagination and cannot be combined with `--limit`.",
|
|
21613
|
-
"- Error JSON has an `error` object: `code` identifies the failure, `message` describes it, `hint` suggests recovery, `env` identifies the environment, `command` identifies the command, `status` is the HTTP status, and `request_id` correlates diagnostics. Unavailable fields are null. Exit codes: 0 success, 1 runtime/API error, 2 usage error.",
|
|
21614
|
-
"- Append `--help` to a command for its optional parameters. Required scalar body options below can also be supplied as fields in `--data`.",
|
|
21615
|
-
"",
|
|
21616
|
-
"## Account and CLI",
|
|
21617
|
-
"",
|
|
21618
|
-
"praxis login — Sign in with a browser device code.",
|
|
21619
|
-
"praxis logout — Remove the saved login from the keychain and fallback file.",
|
|
21620
|
-
"praxis whoami — Show the signed-in identity and credential storage location.",
|
|
21621
|
-
"praxis org list — List organizations available to the login.",
|
|
21622
|
-
"praxis org switch <organization_id> — Switch the login organization.",
|
|
21623
|
-
"praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)",
|
|
21624
|
-
"praxis skill — Print this skill; use --install <dir> to write <dir>/praxis-cli/SKILL.md."
|
|
21625
|
-
];
|
|
21626
|
-
let domain;
|
|
21627
|
-
for (const command of commands) {
|
|
21628
|
-
if (command.words[0] !== domain) {
|
|
21629
|
-
domain = command.words[0];
|
|
21630
|
-
lines.push("", `## ${domain}`, "");
|
|
21631
|
-
}
|
|
21632
|
-
const target = targetParam(command.op);
|
|
21633
|
-
const options = operationOptions(command.op);
|
|
21634
|
-
const required = options.filter((option) => option.required).map((option) => `--${option.name} <${option.type}>`);
|
|
21635
|
-
const structured = command.op.body?.fields.filter((field) => field.required && !options.some((option) => option.location === "body" && option.field === field)) ?? [];
|
|
21636
|
-
if (structured.length)
|
|
21637
|
-
required.push(`--data <JSON with ${structured.map((field) => field.sdkName ?? field.name).join(", ")}>`);
|
|
21638
|
-
else if (command.op.body?.required && !options.some((option) => option.location === "body" && option.required))
|
|
21639
|
-
required.push("--data <JSON>");
|
|
21640
|
-
lines.push(`praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} — ${commandSummary(command)}${required.length ? ` (${required.join(" ")})` : ""}`);
|
|
21641
|
-
}
|
|
21642
|
-
return lines.join(`
|
|
21643
|
-
`) + `
|
|
21644
|
-
`;
|
|
21645
|
-
}
|
|
21646
|
-
async function installSkill(dir, document) {
|
|
21647
|
-
const path = join2(dir, "praxis-cli", "SKILL.md");
|
|
21648
|
-
let overwritten = false;
|
|
21649
|
-
try {
|
|
21650
|
-
await readFile(path);
|
|
21651
|
-
overwritten = true;
|
|
21652
|
-
} catch (error) {
|
|
21653
|
-
if (error.code !== "ENOENT")
|
|
21654
|
-
throw error;
|
|
21655
|
-
}
|
|
21656
|
-
await mkdir(join2(dir, "praxis-cli"), { recursive: true });
|
|
21657
|
-
await writeFile(path, document, "utf8");
|
|
21658
|
-
return { path, overwritten };
|
|
21659
|
-
}
|
|
21660
|
-
|
|
21661
|
-
// src/output/limit.ts
|
|
21662
|
-
function clientList(items, op, limit, mode) {
|
|
21663
|
-
if (mode !== "json" && !op.pagination && limit !== undefined && items.length > limit) {
|
|
21664
|
-
return { items: items.slice(0, limit), total: items.length };
|
|
21665
|
-
}
|
|
21666
|
-
return { items };
|
|
21667
|
-
}
|
|
21668
|
-
|
|
21669
20711
|
// src/auth/device-flow.ts
|
|
21670
20712
|
var MIN_INTERVAL_MS = 1000;
|
|
21671
20713
|
var SLOW_DOWN_STEP_MS = 5000;
|
|
@@ -21742,9 +20784,7 @@ Enter code: ${code.user_code}` });
|
|
|
21742
20784
|
ports.remember(flow.tokens.access_token);
|
|
21743
20785
|
if (flow.tokens.refresh_token)
|
|
21744
20786
|
ports.remember(flow.tokens.refresh_token);
|
|
21745
|
-
|
|
21746
|
-
if (location !== "keychain")
|
|
21747
|
-
ports.emit({ kind: "message", channel: "stderr", text: "stored in a file (no system keychain available)" });
|
|
20787
|
+
saveTokens(path, toStored(flow.tokens, ports.now()));
|
|
21748
20788
|
ports.emit({ kind: "message", text: `Logged in (${config.env}).` });
|
|
21749
20789
|
}
|
|
21750
20790
|
async function whoami(auth, env, org) {
|
|
@@ -21755,7 +20795,6 @@ async function whoami(auth, env, org) {
|
|
|
21755
20795
|
organization: me.active_organization_id ?? credential.organizationId ?? null,
|
|
21756
20796
|
env,
|
|
21757
20797
|
source: credential.source,
|
|
21758
|
-
...credential.storedIn ? { "stored in": credential.storedIn } : {},
|
|
21759
20798
|
expires_at: credential.expiresAt ? new Date(credential.expiresAt).toISOString() : null,
|
|
21760
20799
|
...credential.source === "api-key" ? { note: "The API key determines the organization." } : {}
|
|
21761
20800
|
};
|
|
@@ -22091,7 +21130,7 @@ function renderHuman(result, ctx) {
|
|
|
22091
21130
|
return {
|
|
22092
21131
|
stdout: result.items.length ? table(result.items, ctx, out) : out.dim(`No ${plain(resource)}${/(s|x|ch|sh)$/.test(resource) ? "es" : "s"}.`) + `
|
|
22093
21132
|
`,
|
|
22094
|
-
stderr: err.dim(`${
|
|
21133
|
+
stderr: err.dim(`${count(result.items.length, "item")}${result.nextCursor ? ` · next: ${ctx.nextCommand ?? "praxis --help"}` : ""}`) + `
|
|
22095
21134
|
`
|
|
22096
21135
|
};
|
|
22097
21136
|
case "object": {
|
|
@@ -22163,7 +21202,7 @@ ${usage ? `usage: ${JSON.stringify(usage)}
|
|
|
22163
21202
|
case "list": {
|
|
22164
21203
|
const columns = columnsFor(result.items);
|
|
22165
21204
|
const lines = columns.length ? ["|" + columns.map(cell).join("|") + "|", "|" + columns.map(() => "---").join("|") + "|", ...result.items.map((item) => "|" + columns.map((key) => cell(timestamp(key, record(item)[key]) ?? scalar(record(item)[key]))).join("|") + "|")] : [];
|
|
22166
|
-
lines.push(
|
|
21205
|
+
lines.push(`${result.items.length} rows; ${result.nextCursor ? `more: \`${ctx.nextCommand ?? "praxis --help"}\`` : "end"}`);
|
|
22167
21206
|
return { stdout: lines.join(`
|
|
22168
21207
|
`) + `
|
|
22169
21208
|
` };
|
|
@@ -22191,7 +21230,7 @@ function render(result, ctx) {
|
|
|
22191
21230
|
else if (result.kind === "stream-event" && result.done)
|
|
22192
21231
|
output = {};
|
|
22193
21232
|
else {
|
|
22194
|
-
const data = result.kind === "object" ? result.data : result.kind === "stream-event" ? result.event :
|
|
21233
|
+
const data = result.kind === "object" ? result.data : result.kind === "stream-event" ? result.event : { data: result.items, ...result.nextCursor !== undefined ? { next_cursor: result.nextCursor } : {} };
|
|
22195
21234
|
output = { stdout: JSON.stringify(data ?? null) + `
|
|
22196
21235
|
` };
|
|
22197
21236
|
}
|
|
@@ -22212,18 +21251,6 @@ function quote(value) {
|
|
|
22212
21251
|
function commandLine(words) {
|
|
22213
21252
|
return ["praxis", ...words.map(quote)].join(" ");
|
|
22214
21253
|
}
|
|
22215
|
-
function unlimitedCommand(words, parsed) {
|
|
22216
|
-
const args = [...words];
|
|
22217
|
-
for (const [key, values] of Object.entries(parsed.flags)) {
|
|
22218
|
-
if (key === "limit")
|
|
22219
|
-
continue;
|
|
22220
|
-
for (const value of values)
|
|
22221
|
-
args.push(`--${key}=${value}`);
|
|
22222
|
-
}
|
|
22223
|
-
if (parsed.positional.length)
|
|
22224
|
-
args.push("--", ...parsed.positional);
|
|
22225
|
-
return commandLine(args);
|
|
22226
|
-
}
|
|
22227
21254
|
function nextPageCommand(command, parsed, cursor) {
|
|
22228
21255
|
const query = operationOptions(command.op).find((s) => s.location === "query" && /^(cursor|nextToken|nextCursor|pageToken|page_token|after)$/.test(s.field?.name ?? ""));
|
|
22229
21256
|
const flag = query?.name ?? "cursor";
|
|
@@ -22371,9 +21398,9 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
22371
21398
|
}
|
|
22372
21399
|
|
|
22373
21400
|
// src/main.ts
|
|
22374
|
-
var version = "0.1.0-dev.
|
|
21401
|
+
var version = "0.1.0-dev.e57ae6a";
|
|
22375
21402
|
var commands = commandTree(operations);
|
|
22376
|
-
var manual = [["login"], ["logout"], ["whoami"], ["org", "list"], ["org", "switch"], ["api"]
|
|
21403
|
+
var manual = [["login"], ["logout"], ["whoami"], ["org", "list"], ["org", "switch"], ["api"]];
|
|
22377
21404
|
function route(argv) {
|
|
22378
21405
|
const words = [], args = [];
|
|
22379
21406
|
for (let i = 0;i < argv.length; i++) {
|
|
@@ -22403,7 +21430,7 @@ var defaults = {
|
|
|
22403
21430
|
stdoutIsTTY: Boolean(process.stdout.isTTY),
|
|
22404
21431
|
stderrIsTTY: Boolean(process.stderr.isTTY),
|
|
22405
21432
|
columns: process.stdout.columns ?? 100,
|
|
22406
|
-
readFile: (path) =>
|
|
21433
|
+
readFile: (path) => readFile(path, "utf8"),
|
|
22407
21434
|
async readStdin() {
|
|
22408
21435
|
const chunks = [];
|
|
22409
21436
|
for await (const chunk of process.stdin)
|
|
@@ -22425,7 +21452,7 @@ var defaults = {
|
|
|
22425
21452
|
return;
|
|
22426
21453
|
const cmd = process.platform === "darwin" ? ["open", url] : process.platform === "win32" ? ["rundll32", "url.dll,FileProtocolHandler", url] : ["xdg-open", url];
|
|
22427
21454
|
await new Promise((resolve, reject) => {
|
|
22428
|
-
const child =
|
|
21455
|
+
const child = spawn(cmd[0], cmd.slice(1), { stdio: "ignore" });
|
|
22429
21456
|
child.once("error", reject);
|
|
22430
21457
|
child.once("close", () => resolve());
|
|
22431
21458
|
});
|
|
@@ -22462,7 +21489,7 @@ async function main(argv, injected = {}) {
|
|
|
22462
21489
|
const selected = route(argv);
|
|
22463
21490
|
ctx.command = commandLine(selected.words);
|
|
22464
21491
|
ctx.resource = selected.words.at(-2) ?? selected.words[0];
|
|
22465
|
-
const specs = [...globalOptions, ...selected.command ? [...operationOptions(selected.command.op), ...selected.command.op.body ? [dataOption] : []] : selected.words[0] === "api" ? [dataOption] :
|
|
21492
|
+
const specs = [...globalOptions, ...selected.command ? [...operationOptions(selected.command.op), ...selected.command.op.body ? [dataOption] : []] : selected.words[0] === "api" ? [dataOption] : []];
|
|
22466
21493
|
const outputFlags = globalsOf(parseArgs(outputModeArgs(selected.args, specs), globalOptions));
|
|
22467
21494
|
ctx.json = Boolean(outputFlags.json);
|
|
22468
21495
|
Object.assign(ctx, decideOutputMode({ format: outputFlags.format, json: ctx.json, stdoutIsTTY: ports.stdoutIsTTY, env: ports.env }));
|
|
@@ -22487,11 +21514,6 @@ Examples:
|
|
|
22487
21514
|
praxis org list` : help(commands, selected.words) });
|
|
22488
21515
|
return 0;
|
|
22489
21516
|
}
|
|
22490
|
-
if (flags.help && selected.words[0] === "skill") {
|
|
22491
|
-
emit({ kind: "message", channel: "stdout", text: `praxis skill [--install <dir>]
|
|
22492
|
-
Print the AI skill or write <dir>/praxis-cli/SKILL.md.` });
|
|
22493
|
-
return 0;
|
|
22494
|
-
}
|
|
22495
21517
|
if (flags.help) {
|
|
22496
21518
|
emit({ kind: "message", channel: "stdout", text: selected.command ? help(commands, selected.words, selected.command) : `praxis ${selected.words.join(" ")}${selected.words[0] === "api" ? " <METHOD> <path> [--data JSON|@file|-]" : selected.words[1] === "switch" ? " <organization_id>" : ""}
|
|
22497
21519
|
${globalOptions.map((s) => "--" + s.name).join(" ")}
|
|
@@ -22500,22 +21522,7 @@ Examples:
|
|
|
22500
21522
|
praxis ${selected.words.join(" ")}${selected.words[0] === "api" ? " GET /model/v1/models" : selected.words[1] === "switch" ? " <organization_id>" : ""}` });
|
|
22501
21523
|
return 0;
|
|
22502
21524
|
}
|
|
22503
|
-
if (selected.words[0] === "skill") {
|
|
22504
|
-
if (parsed.positional.length)
|
|
22505
|
-
throw new UsageError("skill expects no positional arguments");
|
|
22506
|
-
const document = skillDocument(commands);
|
|
22507
|
-
const dir = parsed.flags.install?.[0];
|
|
22508
|
-
if (typeof dir === "string") {
|
|
22509
|
-
if (!dir.trim())
|
|
22510
|
-
throw new UsageError("--install requires a directory");
|
|
22511
|
-
const result = await installSkill(dir, document);
|
|
22512
|
-
emit({ kind: "message", text: `${result.overwritten ? "Overwrote" : "Installed"} ${result.path}` });
|
|
22513
|
-
} else
|
|
22514
|
-
emit({ kind: "message", channel: "stdout", text: document.trimEnd() });
|
|
22515
|
-
return 0;
|
|
22516
|
-
}
|
|
22517
21525
|
const path = ports.tokenPath ?? tokenPath(config.env);
|
|
22518
|
-
const store = createTokenStore(config.env, path, ports.secretStore);
|
|
22519
21526
|
const wireFetch = async (input, init) => {
|
|
22520
21527
|
const request = new Request(input, init);
|
|
22521
21528
|
request.headers.set("User-Agent", `praxis-cli/${version}${ctx.mode === "agent" ? ` agent/${ctx.agentName ?? "unknown"}` : ""}`);
|
|
@@ -22525,7 +21532,7 @@ Examples:
|
|
|
22525
21532
|
}
|
|
22526
21533
|
return ports.fetch(request);
|
|
22527
21534
|
};
|
|
22528
|
-
const auth = credentials(config, ports.env, { fetch: wireFetch, now: ports.now, path,
|
|
21535
|
+
const auth = credentials(config, ports.env, { fetch: wireFetch, now: ports.now, path, remember: (s) => {
|
|
22529
21536
|
secrets.push(s);
|
|
22530
21537
|
} });
|
|
22531
21538
|
const org = flags.org;
|
|
@@ -22551,12 +21558,6 @@ Examples:
|
|
|
22551
21558
|
owner = owner[part];
|
|
22552
21559
|
const result = await owner[op.method](opts);
|
|
22553
21560
|
const name2 = `${op.resource}.${op.method}`;
|
|
22554
|
-
const list = (items) => {
|
|
22555
|
-
const view = clientList(items, op, flags.limit, ctx.mode);
|
|
22556
|
-
if ("total" in view)
|
|
22557
|
-
ctx.moreCommand = unlimitedCommand(selected.words, parsed);
|
|
22558
|
-
return view;
|
|
22559
|
-
};
|
|
22560
21561
|
const id = record(result).id ?? record(result).sandboxID ?? ctx.targetId;
|
|
22561
21562
|
if (typeof id === "string")
|
|
22562
21563
|
ctx.nextCommands = nextCommands(commands, selected.command, opts, id, org);
|
|
@@ -22570,16 +21571,16 @@ Examples:
|
|
|
22570
21571
|
items.push(item);
|
|
22571
21572
|
emit({ kind: "list", items, nextCursor: null, op: name2 });
|
|
22572
21573
|
} else
|
|
22573
|
-
emit({ kind: "list",
|
|
21574
|
+
emit({ kind: "list", items: result.data, nextCursor: result.next_cursor, op: name2 });
|
|
22574
21575
|
} else if (result && Symbol.asyncIterator in Object(result)) {
|
|
22575
21576
|
for await (const event of result)
|
|
22576
21577
|
emit({ kind: "stream-event", event, op: name2 });
|
|
22577
21578
|
if (ctx.mode !== "json" && modelStream(name2))
|
|
22578
21579
|
emit({ kind: "stream-event", event: null, done: true, op: name2 });
|
|
22579
21580
|
} else if (result && Array.isArray(result.data))
|
|
22580
|
-
emit({ kind: "list",
|
|
21581
|
+
emit({ kind: "list", items: result.data, nextCursor: result.next_cursor ?? result.nextToken, op: name2 });
|
|
22581
21582
|
else if (Array.isArray(result) && ctx.mode !== "json")
|
|
22582
|
-
emit({ kind: "list",
|
|
21583
|
+
emit({ kind: "list", items: result, op: name2 });
|
|
22583
21584
|
else
|
|
22584
21585
|
emit({ kind: "object", data: result, op: name2 });
|
|
22585
21586
|
return 0;
|
|
@@ -22594,10 +21595,10 @@ Examples:
|
|
|
22594
21595
|
case "login":
|
|
22595
21596
|
if (flags["no-input"] || quiet)
|
|
22596
21597
|
throw new UsageError("login requires displaying a device code", "Remove --no-input / --quiet or set PRAXIS_API_KEY for scripts.");
|
|
22597
|
-
await login(config, path, { ...ports,
|
|
21598
|
+
await login(config, path, { ...ports, fetch: wireFetch, emit, remember: (s) => secrets.push(s) });
|
|
22598
21599
|
break;
|
|
22599
21600
|
case "logout":
|
|
22600
|
-
emit({ kind: "message", text:
|
|
21601
|
+
emit({ kind: "message", text: deleteTokens(path) ? "Logged out." : "Not logged in." });
|
|
22601
21602
|
break;
|
|
22602
21603
|
case "whoami":
|
|
22603
21604
|
emit({ kind: "object", data: await whoami(auth, config.env, org) });
|