@deepraxis/cli 0.1.0-dev.e57ae6a → 0.1.0-dev.ea77ce8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMMANDS.md +370 -0
- package/LICENSE +202 -67
- package/README.md +207 -15
- package/dist/praxis.js +1230 -37
- package/package.json +22 -13
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 } from "node:fs/promises";
|
|
5
|
-
import { spawn } from "node:child_process";
|
|
4
|
+
import { readFile as readFile2 } from "node:fs/promises";
|
|
5
|
+
import { spawn as spawn2 } from "node:child_process";
|
|
6
6
|
import { createInterface } from "node:readline";
|
|
7
7
|
|
|
8
8
|
// ../../packages/sdk/typescript/src/operations.generated.ts
|
|
@@ -10,6 +10,8 @@ var operations = [
|
|
|
10
10
|
{
|
|
11
11
|
resource: "agent.agents",
|
|
12
12
|
method: "list",
|
|
13
|
+
summary: "List agents",
|
|
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.",
|
|
13
15
|
http: "GET",
|
|
14
16
|
path: "/agent/v1/agents",
|
|
15
17
|
streaming: "no",
|
|
@@ -65,6 +67,8 @@ var operations = [
|
|
|
65
67
|
{
|
|
66
68
|
resource: "agent.agents",
|
|
67
69
|
method: "create",
|
|
70
|
+
summary: "Create agent",
|
|
71
|
+
description: 'Create a reusable agent definition, then pass its returned id to sessions.create to start a conversation. The definition includes model, system prompt, tools, MCP servers and an optional multiagent roster. It is saved as version 1; real updates create new versions. Unlike Anthropic Managed Agents, nonempty skills attachments 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"}]}.',
|
|
68
72
|
http: "POST",
|
|
69
73
|
path: "/agent/v1/agents",
|
|
70
74
|
streaming: "no",
|
|
@@ -186,6 +190,8 @@ across all toolsets allowed.`
|
|
|
186
190
|
{
|
|
187
191
|
resource: "agent.agents",
|
|
188
192
|
method: "retrieve",
|
|
193
|
+
summary: "Get agent",
|
|
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.",
|
|
189
195
|
http: "GET",
|
|
190
196
|
path: "/agent/v1/agents/{agent_id}",
|
|
191
197
|
streaming: "no",
|
|
@@ -208,6 +214,8 @@ across all toolsets allowed.`
|
|
|
208
214
|
{
|
|
209
215
|
resource: "agent.agents",
|
|
210
216
|
method: "update",
|
|
217
|
+
summary: "Update agent",
|
|
218
|
+
description: "Update an agent. Send the current version in the body for optimistic concurrency: a stale version returns 409, and an update that changes nothing keeps the version number. Any real change saves a new version; existing sessions keep the version they were created with. Omitted fields keep their value. multiagent takes null or a coordinator roster; subagent_model keeps its value when omitted and is cleared by null. Archived agents cannot be updated. Unlike Anthropic Managed Agents, nonempty skills attachments and custom tools return 400; use the native skill tool for available runtime skills.",
|
|
211
219
|
http: "POST",
|
|
212
220
|
path: "/agent/v1/agents/{agent_id}",
|
|
213
221
|
streaming: "no",
|
|
@@ -347,6 +355,8 @@ current version; omit to apply the update unconditionally.`
|
|
|
347
355
|
{
|
|
348
356
|
resource: "agent.agents",
|
|
349
357
|
method: "archive",
|
|
358
|
+
summary: "Archive agent",
|
|
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.",
|
|
350
360
|
http: "POST",
|
|
351
361
|
path: "/agent/v1/agents/{agent_id}/archive",
|
|
352
362
|
streaming: "no",
|
|
@@ -362,6 +372,8 @@ current version; omit to apply the update unconditionally.`
|
|
|
362
372
|
{
|
|
363
373
|
resource: "agent.agents.versions",
|
|
364
374
|
method: "list",
|
|
375
|
+
summary: "List agent versions",
|
|
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.",
|
|
365
377
|
http: "GET",
|
|
366
378
|
path: "/agent/v1/agents/{agent_id}/versions",
|
|
367
379
|
streaming: "no",
|
|
@@ -390,6 +402,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
390
402
|
{
|
|
391
403
|
resource: "agent.computers",
|
|
392
404
|
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.`,
|
|
393
409
|
http: "GET",
|
|
394
410
|
path: "/agent/v1/computers",
|
|
395
411
|
streaming: "no",
|
|
@@ -413,6 +429,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
413
429
|
{
|
|
414
430
|
resource: "agent.computers",
|
|
415
431
|
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.`,
|
|
416
436
|
http: "POST",
|
|
417
437
|
path: "/agent/v1/computers",
|
|
418
438
|
streaming: "no",
|
|
@@ -440,6 +460,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
440
460
|
{
|
|
441
461
|
resource: "agent.computers",
|
|
442
462
|
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.`,
|
|
443
467
|
http: "DELETE",
|
|
444
468
|
path: "/agent/v1/computers/{computer_id}",
|
|
445
469
|
streaming: "no",
|
|
@@ -455,6 +479,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
455
479
|
{
|
|
456
480
|
resource: "agent.computers",
|
|
457
481
|
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.`,
|
|
458
486
|
http: "GET",
|
|
459
487
|
path: "/agent/v1/computers/{computer_id}",
|
|
460
488
|
streaming: "no",
|
|
@@ -470,6 +498,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
470
498
|
{
|
|
471
499
|
resource: "agent.computers",
|
|
472
500
|
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.`,
|
|
473
505
|
http: "POST",
|
|
474
506
|
path: "/agent/v1/computers/{computer_id}",
|
|
475
507
|
streaming: "no",
|
|
@@ -496,6 +528,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
496
528
|
{
|
|
497
529
|
resource: "agent.computers",
|
|
498
530
|
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.`,
|
|
499
535
|
http: "POST",
|
|
500
536
|
path: "/agent/v1/computers/{computer_id}/archive",
|
|
501
537
|
streaming: "no",
|
|
@@ -511,6 +547,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
511
547
|
{
|
|
512
548
|
resource: "agent.computers.attachments",
|
|
513
549
|
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.`,
|
|
514
554
|
http: "POST",
|
|
515
555
|
path: "/agent/v1/computers/{computer_id}/attachments",
|
|
516
556
|
streaming: "no",
|
|
@@ -537,6 +577,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
537
577
|
{
|
|
538
578
|
resource: "agent.computers",
|
|
539
579
|
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.`,
|
|
540
584
|
http: "POST",
|
|
541
585
|
path: "/agent/v1/computers/{computer_id}/connect",
|
|
542
586
|
streaming: "no",
|
|
@@ -552,6 +596,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
552
596
|
{
|
|
553
597
|
resource: "agent.computers.files",
|
|
554
598
|
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.`,
|
|
555
603
|
http: "GET",
|
|
556
604
|
path: "/agent/v1/computers/{computer_id}/files",
|
|
557
605
|
streaming: "no",
|
|
@@ -574,6 +622,10 @@ current version; omit to apply the update unconditionally.`
|
|
|
574
622
|
{
|
|
575
623
|
resource: "agent.computers.files",
|
|
576
624
|
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.`,
|
|
577
629
|
http: "GET",
|
|
578
630
|
path: "/agent/v1/computers/{computer_id}/files/content",
|
|
579
631
|
streaming: "no",
|
|
@@ -596,6 +648,8 @@ current version; omit to apply the update unconditionally.`
|
|
|
596
648
|
{
|
|
597
649
|
resource: "agent.deploymentRuns",
|
|
598
650
|
method: "list",
|
|
651
|
+
summary: "List deployment runs",
|
|
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.",
|
|
599
653
|
http: "GET",
|
|
600
654
|
path: "/agent/v1/deployment_runs",
|
|
601
655
|
streaming: "no",
|
|
@@ -669,6 +723,8 @@ current version; omit to apply the update unconditionally.`
|
|
|
669
723
|
{
|
|
670
724
|
resource: "agent.deploymentRuns",
|
|
671
725
|
method: "retrieve",
|
|
726
|
+
summary: "Get deployment run",
|
|
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.",
|
|
672
728
|
http: "GET",
|
|
673
729
|
path: "/agent/v1/deployment_runs/{deployment_run_id}",
|
|
674
730
|
streaming: "no",
|
|
@@ -684,6 +740,8 @@ current version; omit to apply the update unconditionally.`
|
|
|
684
740
|
{
|
|
685
741
|
resource: "agent.deployments",
|
|
686
742
|
method: "list",
|
|
743
|
+
summary: "List deployments",
|
|
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.",
|
|
687
745
|
http: "GET",
|
|
688
746
|
path: "/agent/v1/deployments",
|
|
689
747
|
streaming: "no",
|
|
@@ -746,6 +804,8 @@ archived).`
|
|
|
746
804
|
{
|
|
747
805
|
resource: "agent.deployments",
|
|
748
806
|
method: "create",
|
|
807
|
+
summary: "Create deployment",
|
|
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 are accepted. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Active schedules run every minute when due; session creation errors pause the deployment. Unsupported tools, mcp_servers, system and skills overrides return 400.",
|
|
749
809
|
http: "POST",
|
|
750
810
|
path: "/agent/v1/deployments",
|
|
751
811
|
streaming: "no",
|
|
@@ -834,6 +894,8 @@ created from this deployment. Maximum 50.`
|
|
|
834
894
|
{
|
|
835
895
|
resource: "agent.deployments",
|
|
836
896
|
method: "retrieve",
|
|
897
|
+
summary: "Get deployment",
|
|
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.",
|
|
837
899
|
http: "GET",
|
|
838
900
|
path: "/agent/v1/deployments/{deployment_id}",
|
|
839
901
|
streaming: "no",
|
|
@@ -849,6 +911,8 @@ created from this deployment. Maximum 50.`
|
|
|
849
911
|
{
|
|
850
912
|
resource: "agent.deployments",
|
|
851
913
|
method: "update",
|
|
914
|
+
summary: "Update deployment",
|
|
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.",
|
|
852
916
|
http: "POST",
|
|
853
917
|
path: "/agent/v1/deployments/{deployment_id}",
|
|
854
918
|
streaming: "no",
|
|
@@ -945,6 +1009,8 @@ null to clear. Maximum 50.`
|
|
|
945
1009
|
{
|
|
946
1010
|
resource: "agent.deployments",
|
|
947
1011
|
method: "archive",
|
|
1012
|
+
summary: "Archive deployment",
|
|
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.",
|
|
948
1014
|
http: "POST",
|
|
949
1015
|
path: "/agent/v1/deployments/{deployment_id}/archive",
|
|
950
1016
|
streaming: "no",
|
|
@@ -960,6 +1026,8 @@ null to clear. Maximum 50.`
|
|
|
960
1026
|
{
|
|
961
1027
|
resource: "agent.deployments",
|
|
962
1028
|
method: "pause",
|
|
1029
|
+
summary: "Pause deployment",
|
|
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.",
|
|
963
1031
|
http: "POST",
|
|
964
1032
|
path: "/agent/v1/deployments/{deployment_id}/pause",
|
|
965
1033
|
streaming: "no",
|
|
@@ -975,6 +1043,8 @@ null to clear. Maximum 50.`
|
|
|
975
1043
|
{
|
|
976
1044
|
resource: "agent.deployments.run",
|
|
977
1045
|
method: "create",
|
|
1046
|
+
summary: "Run deployment",
|
|
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.",
|
|
978
1048
|
http: "POST",
|
|
979
1049
|
path: "/agent/v1/deployments/{deployment_id}/run",
|
|
980
1050
|
streaming: "no",
|
|
@@ -990,6 +1060,8 @@ null to clear. Maximum 50.`
|
|
|
990
1060
|
{
|
|
991
1061
|
resource: "agent.deployments.unpause",
|
|
992
1062
|
method: "create",
|
|
1063
|
+
summary: "Unpause deployment",
|
|
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.",
|
|
993
1065
|
http: "POST",
|
|
994
1066
|
path: "/agent/v1/deployments/{deployment_id}/unpause",
|
|
995
1067
|
streaming: "no",
|
|
@@ -1002,9 +1074,52 @@ null to clear. Maximum 50.`
|
|
|
1002
1074
|
],
|
|
1003
1075
|
query: []
|
|
1004
1076
|
},
|
|
1077
|
+
{
|
|
1078
|
+
resource: "agent.embedTokens",
|
|
1079
|
+
method: "list",
|
|
1080
|
+
summary: "List Embed Tokens",
|
|
1081
|
+
description: `List embed token issuance records in your organization.
|
|
1082
|
+
|
|
1083
|
+
Includes expired and revoked grants; returns neither token nor token_id. Sorts by created_at, then grant id, both descending. agent_id accepts agent_ or agt_; external_user_id matches exactly. limit is 1–100 (default 20). Reuse next_page as page with the same filters and organization; a mismatch returns 400. End-user credentials return 404.`,
|
|
1084
|
+
http: "GET",
|
|
1085
|
+
path: "/agent/v1/embed_tokens",
|
|
1086
|
+
streaming: "no",
|
|
1087
|
+
pagination: false,
|
|
1088
|
+
pathParams: [],
|
|
1089
|
+
query: [
|
|
1090
|
+
{
|
|
1091
|
+
name: "agent_id",
|
|
1092
|
+
type: "string",
|
|
1093
|
+
required: false,
|
|
1094
|
+
description: "Filter by service agent identifier (agent_ or agt_ prefix)."
|
|
1095
|
+
},
|
|
1096
|
+
{
|
|
1097
|
+
name: "external_user_id",
|
|
1098
|
+
type: "string",
|
|
1099
|
+
required: false,
|
|
1100
|
+
description: "Exact host user identifier supplied at issuance."
|
|
1101
|
+
},
|
|
1102
|
+
{
|
|
1103
|
+
name: "limit",
|
|
1104
|
+
type: "integer",
|
|
1105
|
+
required: false,
|
|
1106
|
+
description: "Maximum records per page; defaults to 20."
|
|
1107
|
+
},
|
|
1108
|
+
{
|
|
1109
|
+
name: "page",
|
|
1110
|
+
type: "string",
|
|
1111
|
+
required: false,
|
|
1112
|
+
description: "next_page from a previous response with the same filters."
|
|
1113
|
+
}
|
|
1114
|
+
]
|
|
1115
|
+
},
|
|
1005
1116
|
{
|
|
1006
1117
|
resource: "agent.embedTokens",
|
|
1007
1118
|
method: "create",
|
|
1119
|
+
summary: "Create Embed Token",
|
|
1120
|
+
description: `Issue a short-lived credential on your backend for an end user of a service agent.
|
|
1121
|
+
|
|
1122
|
+
Requires an active service agent in your organization with an embed policy. Pins the requested version or the latest version and snapshots the policy environment, vaults and resources; metadata comes from the request. Blocked users cannot receive tokens. Keep your API key on the backend and pass only the returned token to the frontend. Every call creates a new grant; issuance is not idempotent. The hosted field is not supported.`,
|
|
1008
1123
|
http: "POST",
|
|
1009
1124
|
path: "/agent/v1/embed_tokens",
|
|
1010
1125
|
streaming: "no",
|
|
@@ -1073,9 +1188,30 @@ null to clear. Maximum 50.`
|
|
|
1073
1188
|
]
|
|
1074
1189
|
}
|
|
1075
1190
|
},
|
|
1191
|
+
{
|
|
1192
|
+
resource: "agent.embedTokens.revoke",
|
|
1193
|
+
method: "create",
|
|
1194
|
+
summary: "Revoke Embed Token",
|
|
1195
|
+
description: `Revoke an embed token and close its open event streams.
|
|
1196
|
+
|
|
1197
|
+
Use an id from issuance or listing. Revokes the credential before setting revoked_at; upstream failure leaves it unset. Streams receive session.error (EMBED_TOKEN_REVOKED), then close immediately; other credentials are unaffected. Idempotent; repeats return the original revoked record without another revocation or audit. Missing or foreign grants and end-user credentials return 404.`,
|
|
1198
|
+
http: "POST",
|
|
1199
|
+
path: "/agent/v1/embed_tokens/{id}/revoke",
|
|
1200
|
+
streaming: "no",
|
|
1201
|
+
pagination: false,
|
|
1202
|
+
pathParams: [
|
|
1203
|
+
{
|
|
1204
|
+
name: "id",
|
|
1205
|
+
sdkName: "id"
|
|
1206
|
+
}
|
|
1207
|
+
],
|
|
1208
|
+
query: []
|
|
1209
|
+
},
|
|
1076
1210
|
{
|
|
1077
1211
|
resource: "agent.environments",
|
|
1078
1212
|
method: "list",
|
|
1213
|
+
summary: "List environments",
|
|
1214
|
+
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.",
|
|
1079
1215
|
http: "GET",
|
|
1080
1216
|
path: "/agent/v1/environments",
|
|
1081
1217
|
streaming: "no",
|
|
@@ -1109,6 +1245,8 @@ null to clear. Maximum 50.`
|
|
|
1109
1245
|
{
|
|
1110
1246
|
resource: "agent.environments",
|
|
1111
1247
|
method: "create",
|
|
1248
|
+
summary: "Create environment",
|
|
1249
|
+
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.",
|
|
1112
1250
|
http: "POST",
|
|
1113
1251
|
path: "/agent/v1/environments",
|
|
1114
1252
|
streaming: "no",
|
|
@@ -1161,6 +1299,8 @@ rejected. If not specified, defaults based on organization type.`
|
|
|
1161
1299
|
{
|
|
1162
1300
|
resource: "agent.environments",
|
|
1163
1301
|
method: "retrieve",
|
|
1302
|
+
summary: "Get environment",
|
|
1303
|
+
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.",
|
|
1164
1304
|
http: "GET",
|
|
1165
1305
|
path: "/agent/v1/environments/{environment_id}",
|
|
1166
1306
|
streaming: "no",
|
|
@@ -1176,6 +1316,8 @@ rejected. If not specified, defaults based on organization type.`
|
|
|
1176
1316
|
{
|
|
1177
1317
|
resource: "agent.environments",
|
|
1178
1318
|
method: "update",
|
|
1319
|
+
summary: "Update environment",
|
|
1320
|
+
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.",
|
|
1179
1321
|
http: "POST",
|
|
1180
1322
|
path: "/agent/v1/environments/{environment_id}",
|
|
1181
1323
|
streaming: "no",
|
|
@@ -1233,6 +1375,8 @@ owning account only.`
|
|
|
1233
1375
|
{
|
|
1234
1376
|
resource: "agent.environments",
|
|
1235
1377
|
method: "archive",
|
|
1378
|
+
summary: "Archive environment",
|
|
1379
|
+
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.",
|
|
1236
1380
|
http: "POST",
|
|
1237
1381
|
path: "/agent/v1/environments/{environment_id}/archive",
|
|
1238
1382
|
streaming: "no",
|
|
@@ -1248,6 +1392,8 @@ owning account only.`
|
|
|
1248
1392
|
{
|
|
1249
1393
|
resource: "agent.sessions",
|
|
1250
1394
|
method: "list",
|
|
1395
|
+
summary: "List sessions",
|
|
1396
|
+
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.",
|
|
1251
1397
|
http: "GET",
|
|
1252
1398
|
path: "/agent/v1/sessions",
|
|
1253
1399
|
streaming: "no",
|
|
@@ -1352,6 +1498,8 @@ owning account only.`
|
|
|
1352
1498
|
{
|
|
1353
1499
|
resource: "agent.sessions",
|
|
1354
1500
|
method: "create",
|
|
1501
|
+
summary: "Create session",
|
|
1502
|
+
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 are not supported. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. Omitted budget defaults to USD 20; null removes the limit, and a limit object uses a positive integer string of USD cents. Up to 500 file resources can be attached. Use initial_events to send a first user.message in this request, or send messages afterwards with sessions.events.send. The returned status can still be idle before initial events run; read agent.message and the subsequent session.status_idle event to confirm completion.`,
|
|
1355
1503
|
http: "POST",
|
|
1356
1504
|
path: "/agent/v1/sessions",
|
|
1357
1505
|
streaming: "no",
|
|
@@ -1454,6 +1602,8 @@ offsets ("+08:00") and unknown names return 400. Never stored in
|
|
|
1454
1602
|
{
|
|
1455
1603
|
resource: "agent.sessions",
|
|
1456
1604
|
method: "retrieve",
|
|
1605
|
+
summary: "Get session",
|
|
1606
|
+
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.",
|
|
1457
1607
|
http: "GET",
|
|
1458
1608
|
path: "/agent/v1/sessions/{session_id}",
|
|
1459
1609
|
streaming: "no",
|
|
@@ -1469,6 +1619,8 @@ offsets ("+08:00") and unknown names return 400. Never stored in
|
|
|
1469
1619
|
{
|
|
1470
1620
|
resource: "agent.sessions",
|
|
1471
1621
|
method: "update",
|
|
1622
|
+
summary: "Update session",
|
|
1623
|
+
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 are not supported (400 naming the field). Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. A budget limit must exceed consumed cost; null removes it permanently for this session. Updating an archived session returns 409.",
|
|
1472
1624
|
http: "POST",
|
|
1473
1625
|
path: "/agent/v1/sessions/{session_id}",
|
|
1474
1626
|
streaming: "no",
|
|
@@ -1533,6 +1685,8 @@ delete it. Omit the field to preserve.`
|
|
|
1533
1685
|
{
|
|
1534
1686
|
resource: "agent.sessions",
|
|
1535
1687
|
method: "archive",
|
|
1688
|
+
summary: "Archive session",
|
|
1689
|
+
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.",
|
|
1536
1690
|
http: "POST",
|
|
1537
1691
|
path: "/agent/v1/sessions/{session_id}/archive",
|
|
1538
1692
|
streaming: "no",
|
|
@@ -1548,6 +1702,10 @@ delete it. Omit the field to preserve.`
|
|
|
1548
1702
|
{
|
|
1549
1703
|
resource: "agent.sessions.backgroundTasks",
|
|
1550
1704
|
method: "list",
|
|
1705
|
+
summary: "List Session Background Tasks (Extension)",
|
|
1706
|
+
description: `List running and ended background tasks for a session.
|
|
1707
|
+
|
|
1708
|
+
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.`,
|
|
1551
1709
|
http: "GET",
|
|
1552
1710
|
path: "/agent/v1/sessions/{session_id}/background_tasks",
|
|
1553
1711
|
streaming: "no",
|
|
@@ -1563,6 +1721,10 @@ delete it. Omit the field to preserve.`
|
|
|
1563
1721
|
{
|
|
1564
1722
|
resource: "agent.sessions.backgroundTasks",
|
|
1565
1723
|
method: "retrieveOutput",
|
|
1724
|
+
summary: "Get Background Task Output (Extension)",
|
|
1725
|
+
description: `Read a byte page of task output without waking the sandbox.
|
|
1726
|
+
|
|
1727
|
+
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.`,
|
|
1566
1728
|
http: "GET",
|
|
1567
1729
|
path: "/agent/v1/sessions/{session_id}/background_tasks/{task_id}/output",
|
|
1568
1730
|
streaming: "no",
|
|
@@ -1595,6 +1757,10 @@ delete it. Omit the field to preserve.`
|
|
|
1595
1757
|
{
|
|
1596
1758
|
resource: "agent.sessions.backgroundTasks",
|
|
1597
1759
|
method: "stop",
|
|
1760
|
+
summary: "Stop Background Task (Extension)",
|
|
1761
|
+
description: `Request termination of a running task and return its current state.
|
|
1762
|
+
|
|
1763
|
+
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.`,
|
|
1598
1764
|
http: "POST",
|
|
1599
1765
|
path: "/agent/v1/sessions/{session_id}/background_tasks/{task_id}/stop",
|
|
1600
1766
|
streaming: "no",
|
|
@@ -1614,6 +1780,10 @@ delete it. Omit the field to preserve.`
|
|
|
1614
1780
|
{
|
|
1615
1781
|
resource: "agent.sessions",
|
|
1616
1782
|
method: "compact",
|
|
1783
|
+
summary: "Compact Session (Extension)",
|
|
1784
|
+
description: `Request session context compaction and retrieve an operation receipt.
|
|
1785
|
+
|
|
1786
|
+
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.`,
|
|
1617
1787
|
http: "POST",
|
|
1618
1788
|
path: "/agent/v1/sessions/{session_id}/compact",
|
|
1619
1789
|
streaming: "no",
|
|
@@ -1640,6 +1810,10 @@ delete it. Omit the field to preserve.`
|
|
|
1640
1810
|
{
|
|
1641
1811
|
resource: "agent.sessions",
|
|
1642
1812
|
method: "retrieveCompact",
|
|
1813
|
+
summary: "Get Session Compaction (Extension)",
|
|
1814
|
+
description: `Read session compaction status by operation ID.
|
|
1815
|
+
|
|
1816
|
+
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.`,
|
|
1643
1817
|
http: "GET",
|
|
1644
1818
|
path: "/agent/v1/sessions/{session_id}/compact/{operation_id}",
|
|
1645
1819
|
streaming: "no",
|
|
@@ -1659,6 +1833,10 @@ delete it. Omit the field to preserve.`
|
|
|
1659
1833
|
{
|
|
1660
1834
|
resource: "agent.sessions.compactions",
|
|
1661
1835
|
method: "list",
|
|
1836
|
+
summary: "List Session Compactions (Extension)",
|
|
1837
|
+
description: `Read session compaction history and summaries.
|
|
1838
|
+
|
|
1839
|
+
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.`,
|
|
1662
1840
|
http: "GET",
|
|
1663
1841
|
path: "/agent/v1/sessions/{session_id}/compactions",
|
|
1664
1842
|
streaming: "no",
|
|
@@ -1674,6 +1852,10 @@ delete it. Omit the field to preserve.`
|
|
|
1674
1852
|
{
|
|
1675
1853
|
resource: "agent.sessions",
|
|
1676
1854
|
method: "retrieveContext",
|
|
1855
|
+
summary: "Get Session Context (Extension)",
|
|
1856
|
+
description: `Read the latest context measurement and the currently selected model’s window and compaction thresholds.
|
|
1857
|
+
|
|
1858
|
+
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.`,
|
|
1677
1859
|
http: "GET",
|
|
1678
1860
|
path: "/agent/v1/sessions/{session_id}/context",
|
|
1679
1861
|
streaming: "no",
|
|
@@ -1689,6 +1871,8 @@ delete it. Omit the field to preserve.`
|
|
|
1689
1871
|
{
|
|
1690
1872
|
resource: "agent.sessions.events",
|
|
1691
1873
|
method: "list",
|
|
1874
|
+
summary: "List session events",
|
|
1875
|
+
description: "Read the event history of a session as a page of events, oldest first by default (order=desc for newest first). Use it after sending a message to collect the reply, to find tool calls that wait for approval (session.status_idle with stop_reason requires_action lists their event_ids), or to audit a run; to follow a running session live use sessions.events.stream instead. Filter by types and by a created_at range on processed_at; pages hold at most 100 events (default 20) and next_page continues. A failed run emits session.error before session.status_terminated. Native history also includes user.steer, user.withdraw, system.notification, session.forked, session.goal_changed and session.goal_verification; these are not accepted by the /anthropic/v1 event-type filter.",
|
|
1692
1876
|
http: "GET",
|
|
1693
1877
|
path: "/agent/v1/sessions/{session_id}/events",
|
|
1694
1878
|
streaming: "no",
|
|
@@ -1758,6 +1942,8 @@ delete it. Omit the field to preserve.`
|
|
|
1758
1942
|
{
|
|
1759
1943
|
resource: "agent.sessions.events",
|
|
1760
1944
|
method: "send",
|
|
1945
|
+
summary: "Send session events",
|
|
1946
|
+
description: 'Send events to a session: user.message (exactly one nonempty text block), user.interrupt, user.tool_confirmation to allow or deny a pending tool call, user.steer to inject a queued user.message into a turn that is still running, and user.withdraw to retract a queued message. The response only acknowledges the inputs; read replies with sessions.events.list or sessions.events.stream. A message sent while the session waits for tool approval is queued (processed_at null) and runs in order after the approval is resolved. Archived sessions reject new messages. To approve, read a pending agent.tool_use or agent.mcp_tool_use event and send {type: "user.tool_confirmation", tool_use_id: <that event id>, result: "allow"} (or deny); include session_thread_id for a child approval. Native confirmations also accept updated_permissions, answers and annotations, which /anthropic/v1 rejects.',
|
|
1761
1947
|
http: "POST",
|
|
1762
1948
|
path: "/agent/v1/sessions/{session_id}/events",
|
|
1763
1949
|
streaming: "no",
|
|
@@ -1785,6 +1971,8 @@ delete it. Omit the field to preserve.`
|
|
|
1785
1971
|
{
|
|
1786
1972
|
resource: "agent.sessions.events",
|
|
1787
1973
|
method: "stream",
|
|
1974
|
+
summary: "Stream session events",
|
|
1975
|
+
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.",
|
|
1788
1976
|
http: "GET",
|
|
1789
1977
|
path: "/agent/v1/sessions/{session_id}/events/stream",
|
|
1790
1978
|
streaming: "always",
|
|
@@ -1812,6 +2000,10 @@ delete it. Omit the field to preserve.`
|
|
|
1812
2000
|
{
|
|
1813
2001
|
resource: "agent.sessions",
|
|
1814
2002
|
method: "fork",
|
|
2003
|
+
summary: "Fork Session (Extension)",
|
|
2004
|
+
description: `Create an independent session at the last assistant message of a successfully completed turn.
|
|
2005
|
+
|
|
2006
|
+
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.`,
|
|
1815
2007
|
http: "POST",
|
|
1816
2008
|
path: "/agent/v1/sessions/{session_id}/fork",
|
|
1817
2009
|
streaming: "no",
|
|
@@ -1838,6 +2030,8 @@ delete it. Omit the field to preserve.`
|
|
|
1838
2030
|
{
|
|
1839
2031
|
resource: "agent.sessions.resources",
|
|
1840
2032
|
method: "list",
|
|
2033
|
+
summary: "List session resources",
|
|
2034
|
+
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.",
|
|
1841
2035
|
http: "GET",
|
|
1842
2036
|
path: "/agent/v1/sessions/{session_id}/resources",
|
|
1843
2037
|
streaming: "no",
|
|
@@ -1866,6 +2060,8 @@ delete it. Omit the field to preserve.`
|
|
|
1866
2060
|
{
|
|
1867
2061
|
resource: "agent.sessions.resources",
|
|
1868
2062
|
method: "create",
|
|
2063
|
+
summary: "Add session resource",
|
|
2064
|
+
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.",
|
|
1869
2065
|
http: "POST",
|
|
1870
2066
|
path: "/agent/v1/sessions/{session_id}/resources",
|
|
1871
2067
|
streaming: "no",
|
|
@@ -1908,6 +2104,8 @@ delete it. Omit the field to preserve.`
|
|
|
1908
2104
|
{
|
|
1909
2105
|
resource: "agent.sessions.resources",
|
|
1910
2106
|
method: "delete",
|
|
2107
|
+
summary: "Delete session resource",
|
|
2108
|
+
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.",
|
|
1911
2109
|
http: "DELETE",
|
|
1912
2110
|
path: "/agent/v1/sessions/{session_id}/resources/{resource_id}",
|
|
1913
2111
|
streaming: "no",
|
|
@@ -1935,6 +2133,8 @@ delete it. Omit the field to preserve.`
|
|
|
1935
2133
|
{
|
|
1936
2134
|
resource: "agent.sessions.resources",
|
|
1937
2135
|
method: "retrieve",
|
|
2136
|
+
summary: "Get session resource",
|
|
2137
|
+
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.",
|
|
1938
2138
|
http: "GET",
|
|
1939
2139
|
path: "/agent/v1/sessions/{session_id}/resources/{resource_id}",
|
|
1940
2140
|
streaming: "no",
|
|
@@ -1959,9 +2159,78 @@ delete it. Omit the field to preserve.`
|
|
|
1959
2159
|
}
|
|
1960
2160
|
]
|
|
1961
2161
|
},
|
|
2162
|
+
{
|
|
2163
|
+
resource: "agent.sessions.runs",
|
|
2164
|
+
method: "deleteFeedback",
|
|
2165
|
+
summary: "Delete Run Feedback",
|
|
2166
|
+
description: `Remove the rating and comment for a run.
|
|
2167
|
+
|
|
2168
|
+
Own-face extension. Use the session id from session creation or listing and the run_id from its events. Requires a readable session and a run belonging to it. Idempotent; returns 204 even when no feedback exists. End users can delete feedback only for their own sessions. Does not delete the run or messages, enter model context, or start another run.`,
|
|
2169
|
+
http: "DELETE",
|
|
2170
|
+
path: "/agent/v1/sessions/{session_id}/runs/{run_id}/feedback",
|
|
2171
|
+
streaming: "no",
|
|
2172
|
+
pagination: false,
|
|
2173
|
+
pathParams: [
|
|
2174
|
+
{
|
|
2175
|
+
name: "session_id",
|
|
2176
|
+
sdkName: "session_id"
|
|
2177
|
+
},
|
|
2178
|
+
{
|
|
2179
|
+
name: "run_id",
|
|
2180
|
+
sdkName: "run_id"
|
|
2181
|
+
}
|
|
2182
|
+
],
|
|
2183
|
+
query: []
|
|
2184
|
+
},
|
|
2185
|
+
{
|
|
2186
|
+
resource: "agent.sessions.runs.feedback",
|
|
2187
|
+
method: "create",
|
|
2188
|
+
summary: "Set Run Feedback",
|
|
2189
|
+
description: `Submit thumbs up or thumbs down for a run, with an optional comment.
|
|
2190
|
+
|
|
2191
|
+
Own-face extension. Use a readable session and a run_id from its events. Each submission replaces the previous rating and comment; omitted or null comment clears it, while created_at is preserved. Comments allow at most 2000 Unicode characters. End users can submit only for their own sessions. Feedback never enters model context or starts a run. For example, submit {"rating":"positive","comment":"Helpful"}. POST follows Managed Agents resource update conventions; the resource remains unique per session and run.`,
|
|
2192
|
+
http: "POST",
|
|
2193
|
+
path: "/agent/v1/sessions/{session_id}/runs/{run_id}/feedback",
|
|
2194
|
+
streaming: "no",
|
|
2195
|
+
pagination: false,
|
|
2196
|
+
pathParams: [
|
|
2197
|
+
{
|
|
2198
|
+
name: "session_id",
|
|
2199
|
+
sdkName: "session_id"
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
name: "run_id",
|
|
2203
|
+
sdkName: "run_id"
|
|
2204
|
+
}
|
|
2205
|
+
],
|
|
2206
|
+
query: [],
|
|
2207
|
+
body: {
|
|
2208
|
+
required: true,
|
|
2209
|
+
fields: [
|
|
2210
|
+
{
|
|
2211
|
+
name: "rating",
|
|
2212
|
+
type: "string",
|
|
2213
|
+
enum: [
|
|
2214
|
+
"positive",
|
|
2215
|
+
"negative"
|
|
2216
|
+
],
|
|
2217
|
+
required: true,
|
|
2218
|
+
description: "positive means thumbs up; negative means thumbs down for this run."
|
|
2219
|
+
},
|
|
2220
|
+
{
|
|
2221
|
+
name: "comment",
|
|
2222
|
+
type: "string",
|
|
2223
|
+
required: false,
|
|
2224
|
+
description: "Optional comment, at most 2000 Unicode characters. Omit or send null to clear the previous comment."
|
|
2225
|
+
}
|
|
2226
|
+
]
|
|
2227
|
+
}
|
|
2228
|
+
},
|
|
1962
2229
|
{
|
|
1963
2230
|
resource: "agent.sessions.threads",
|
|
1964
2231
|
method: "list",
|
|
2232
|
+
summary: "List session threads",
|
|
2233
|
+
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.",
|
|
1965
2234
|
http: "GET",
|
|
1966
2235
|
path: "/agent/v1/sessions/{session_id}/threads",
|
|
1967
2236
|
streaming: "no",
|
|
@@ -1990,6 +2259,8 @@ delete it. Omit the field to preserve.`
|
|
|
1990
2259
|
{
|
|
1991
2260
|
resource: "agent.sessions.threads",
|
|
1992
2261
|
method: "retrieve",
|
|
2262
|
+
summary: "Get session thread",
|
|
2263
|
+
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.",
|
|
1993
2264
|
http: "GET",
|
|
1994
2265
|
path: "/agent/v1/sessions/{session_id}/threads/{thread_id}",
|
|
1995
2266
|
streaming: "no",
|
|
@@ -2017,6 +2288,8 @@ delete it. Omit the field to preserve.`
|
|
|
2017
2288
|
{
|
|
2018
2289
|
resource: "agent.sessions.threads",
|
|
2019
2290
|
method: "archive",
|
|
2291
|
+
summary: "Archive session thread",
|
|
2292
|
+
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.",
|
|
2020
2293
|
http: "POST",
|
|
2021
2294
|
path: "/agent/v1/sessions/{session_id}/threads/{thread_id}/archive",
|
|
2022
2295
|
streaming: "no",
|
|
@@ -2044,6 +2317,8 @@ delete it. Omit the field to preserve.`
|
|
|
2044
2317
|
{
|
|
2045
2318
|
resource: "agent.sessions.threads.events",
|
|
2046
2319
|
method: "list",
|
|
2320
|
+
summary: "List session thread events",
|
|
2321
|
+
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.",
|
|
2047
2322
|
http: "GET",
|
|
2048
2323
|
path: "/agent/v1/sessions/{session_id}/threads/{thread_id}/events",
|
|
2049
2324
|
streaming: "no",
|
|
@@ -2083,6 +2358,8 @@ delete it. Omit the field to preserve.`
|
|
|
2083
2358
|
{
|
|
2084
2359
|
resource: "agent.sessions.threads",
|
|
2085
2360
|
method: "stream",
|
|
2361
|
+
summary: "Stream session thread events",
|
|
2362
|
+
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.",
|
|
2086
2363
|
http: "GET",
|
|
2087
2364
|
path: "/agent/v1/sessions/{session_id}/threads/{thread_id}/stream",
|
|
2088
2365
|
streaming: "always",
|
|
@@ -2121,6 +2398,8 @@ delete it. Omit the field to preserve.`
|
|
|
2121
2398
|
{
|
|
2122
2399
|
resource: "agent.toolsets",
|
|
2123
2400
|
method: "list",
|
|
2401
|
+
summary: "List Toolsets",
|
|
2402
|
+
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.",
|
|
2124
2403
|
http: "GET",
|
|
2125
2404
|
path: "/agent/v1/toolsets",
|
|
2126
2405
|
streaming: "no",
|
|
@@ -2131,6 +2410,8 @@ delete it. Omit the field to preserve.`
|
|
|
2131
2410
|
{
|
|
2132
2411
|
resource: "application.assets.upload",
|
|
2133
2412
|
method: "create",
|
|
2413
|
+
summary: "Upload assets",
|
|
2414
|
+
description: "Upload one batch: files maps hash to base64 content. The last batch returns the completion token.",
|
|
2134
2415
|
http: "POST",
|
|
2135
2416
|
path: "/application/v1/assets/upload",
|
|
2136
2417
|
streaming: "no",
|
|
@@ -2158,6 +2439,8 @@ delete it. Omit the field to preserve.`
|
|
|
2158
2439
|
{
|
|
2159
2440
|
resource: "application.subdomain",
|
|
2160
2441
|
method: "retrieve",
|
|
2442
|
+
summary: "Get account subdomain",
|
|
2443
|
+
description: "Return the account subdomain used in every Worker URL. A default is created on first use.",
|
|
2161
2444
|
http: "GET",
|
|
2162
2445
|
path: "/application/v1/subdomain",
|
|
2163
2446
|
streaming: "no",
|
|
@@ -2168,6 +2451,8 @@ delete it. Omit the field to preserve.`
|
|
|
2168
2451
|
{
|
|
2169
2452
|
resource: "application.subdomain",
|
|
2170
2453
|
method: "update",
|
|
2454
|
+
summary: "Change account subdomain",
|
|
2455
|
+
description: "Change the account subdomain. Every Worker moves to the new address at once; old addresses stop resolving.",
|
|
2171
2456
|
http: "PUT",
|
|
2172
2457
|
path: "/application/v1/subdomain",
|
|
2173
2458
|
streaming: "no",
|
|
@@ -2189,6 +2474,8 @@ delete it. Omit the field to preserve.`
|
|
|
2189
2474
|
{
|
|
2190
2475
|
resource: "application.workers",
|
|
2191
2476
|
method: "list",
|
|
2477
|
+
summary: "List Workers",
|
|
2478
|
+
description: "List Workers in your account. Filter by status or by label with label.<key>=<value>.",
|
|
2192
2479
|
http: "GET",
|
|
2193
2480
|
path: "/application/v1/workers",
|
|
2194
2481
|
streaming: "no",
|
|
@@ -2218,6 +2505,8 @@ delete it. Omit the field to preserve.`
|
|
|
2218
2505
|
{
|
|
2219
2506
|
resource: "application.workers",
|
|
2220
2507
|
method: "create",
|
|
2508
|
+
summary: "Create Worker",
|
|
2509
|
+
description: "Create a Worker. It serves nothing until a version is deployed.",
|
|
2221
2510
|
http: "POST",
|
|
2222
2511
|
path: "/application/v1/workers",
|
|
2223
2512
|
streaming: "no",
|
|
@@ -2264,6 +2553,8 @@ delete it. Omit the field to preserve.`
|
|
|
2264
2553
|
{
|
|
2265
2554
|
resource: "application.workers",
|
|
2266
2555
|
method: "delete",
|
|
2556
|
+
summary: "Delete Worker",
|
|
2557
|
+
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.",
|
|
2267
2558
|
http: "DELETE",
|
|
2268
2559
|
path: "/application/v1/workers/{worker_id}",
|
|
2269
2560
|
streaming: "no",
|
|
@@ -2279,6 +2570,8 @@ delete it. Omit the field to preserve.`
|
|
|
2279
2570
|
{
|
|
2280
2571
|
resource: "application.workers",
|
|
2281
2572
|
method: "retrieve",
|
|
2573
|
+
summary: "Get Worker",
|
|
2574
|
+
description: "Get a Worker. expand returns related objects in the same response.",
|
|
2282
2575
|
http: "GET",
|
|
2283
2576
|
path: "/application/v1/workers/{worker_id}",
|
|
2284
2577
|
streaming: "no",
|
|
@@ -2301,6 +2594,8 @@ delete it. Omit the field to preserve.`
|
|
|
2301
2594
|
{
|
|
2302
2595
|
resource: "application.workers",
|
|
2303
2596
|
method: "update",
|
|
2597
|
+
summary: "Update Worker",
|
|
2598
|
+
description: "Change name, tags, observability, subdomain or labels. Omitted fields stay unchanged.",
|
|
2304
2599
|
http: "PATCH",
|
|
2305
2600
|
path: "/application/v1/workers/{worker_id}",
|
|
2306
2601
|
streaming: "no",
|
|
@@ -2352,6 +2647,8 @@ delete it. Omit the field to preserve.`
|
|
|
2352
2647
|
{
|
|
2353
2648
|
resource: "application.workers.assetsUploadSession",
|
|
2354
2649
|
method: "create",
|
|
2650
|
+
summary: "Create asset upload session",
|
|
2651
|
+
description: "Declare the static file manifest. The answer lists the hashes still missing, grouped into upload batches, and an upload token.",
|
|
2355
2652
|
http: "POST",
|
|
2356
2653
|
path: "/application/v1/workers/{worker_id}/assets-upload-session",
|
|
2357
2654
|
streaming: "no",
|
|
@@ -2378,6 +2675,8 @@ delete it. Omit the field to preserve.`
|
|
|
2378
2675
|
{
|
|
2379
2676
|
resource: "application.workers.components",
|
|
2380
2677
|
method: "list",
|
|
2678
|
+
summary: "List components",
|
|
2679
|
+
description: "List the databases, namespaces and buckets this Worker owns.",
|
|
2381
2680
|
http: "GET",
|
|
2382
2681
|
path: "/application/v1/workers/{worker_id}/components",
|
|
2383
2682
|
streaming: "no",
|
|
@@ -2393,6 +2692,8 @@ delete it. Omit the field to preserve.`
|
|
|
2393
2692
|
{
|
|
2394
2693
|
resource: "application.workers.deployments",
|
|
2395
2694
|
method: "list",
|
|
2695
|
+
summary: "List deployments",
|
|
2696
|
+
description: "List the deployments of a Worker, newest first; the first active one is serving. Page with next_cursor.",
|
|
2396
2697
|
http: "GET",
|
|
2397
2698
|
path: "/application/v1/workers/{worker_id}/deployments",
|
|
2398
2699
|
streaming: "no",
|
|
@@ -2421,6 +2722,8 @@ delete it. Omit the field to preserve.`
|
|
|
2421
2722
|
{
|
|
2422
2723
|
resource: "application.workers.deployments",
|
|
2423
2724
|
method: "create",
|
|
2725
|
+
summary: "Create deployment",
|
|
2726
|
+
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.",
|
|
2424
2727
|
http: "POST",
|
|
2425
2728
|
path: "/application/v1/workers/{worker_id}/deployments",
|
|
2426
2729
|
streaming: "no",
|
|
@@ -2469,6 +2772,8 @@ delete it. Omit the field to preserve.`
|
|
|
2469
2772
|
{
|
|
2470
2773
|
resource: "application.workers.deployments",
|
|
2471
2774
|
method: "retrieve",
|
|
2775
|
+
summary: "Get deployment",
|
|
2776
|
+
description: "Get one deployment with its status and upload progress; poll this after CreateDeployment until praxis.status is active or failed.",
|
|
2472
2777
|
http: "GET",
|
|
2473
2778
|
path: "/application/v1/workers/{worker_id}/deployments/{deployment_id}",
|
|
2474
2779
|
streaming: "no",
|
|
@@ -2488,6 +2793,8 @@ delete it. Omit the field to preserve.`
|
|
|
2488
2793
|
{
|
|
2489
2794
|
resource: "application.workers.events",
|
|
2490
2795
|
method: "list",
|
|
2796
|
+
summary: "List events",
|
|
2797
|
+
description: "List lifecycle events of a Worker in sequence order.",
|
|
2491
2798
|
http: "GET",
|
|
2492
2799
|
path: "/application/v1/workers/{worker_id}/events",
|
|
2493
2800
|
streaming: "no",
|
|
@@ -2516,6 +2823,8 @@ delete it. Omit the field to preserve.`
|
|
|
2516
2823
|
{
|
|
2517
2824
|
resource: "application.workers.grants",
|
|
2518
2825
|
method: "list",
|
|
2826
|
+
summary: "List grants",
|
|
2827
|
+
description: "List resources this Worker's platform token may access.",
|
|
2519
2828
|
http: "GET",
|
|
2520
2829
|
path: "/application/v1/workers/{worker_id}/grants",
|
|
2521
2830
|
streaming: "no",
|
|
@@ -2531,6 +2840,8 @@ delete it. Omit the field to preserve.`
|
|
|
2531
2840
|
{
|
|
2532
2841
|
resource: "application.workers.grants",
|
|
2533
2842
|
method: "create",
|
|
2843
|
+
summary: "Create grant",
|
|
2844
|
+
description: "Let this Worker's platform token access one of your databases, folders or knowledge bases.",
|
|
2534
2845
|
http: "POST",
|
|
2535
2846
|
path: "/application/v1/workers/{worker_id}/grants",
|
|
2536
2847
|
streaming: "no",
|
|
@@ -2567,6 +2878,8 @@ delete it. Omit the field to preserve.`
|
|
|
2567
2878
|
{
|
|
2568
2879
|
resource: "application.workers.grants",
|
|
2569
2880
|
method: "delete",
|
|
2881
|
+
summary: "Delete grant",
|
|
2882
|
+
description: "Revoke a grant so this Worker's platform token can no longer access the granted resource. Takes effect for new requests at once.",
|
|
2570
2883
|
http: "DELETE",
|
|
2571
2884
|
path: "/application/v1/workers/{worker_id}/grants/{grant_id}",
|
|
2572
2885
|
streaming: "no",
|
|
@@ -2586,6 +2899,8 @@ delete it. Omit the field to preserve.`
|
|
|
2586
2899
|
{
|
|
2587
2900
|
resource: "application.workers",
|
|
2588
2901
|
method: "restore",
|
|
2902
|
+
summary: "Restore Worker",
|
|
2903
|
+
description: "Bring back a soft-deleted Worker within 7 days of deletion, with its versions and deployments. Cloudflare has no equivalent.",
|
|
2589
2904
|
http: "POST",
|
|
2590
2905
|
path: "/application/v1/workers/{worker_id}/restore",
|
|
2591
2906
|
streaming: "no",
|
|
@@ -2601,6 +2916,8 @@ delete it. Omit the field to preserve.`
|
|
|
2601
2916
|
{
|
|
2602
2917
|
resource: "application.workers.secrets",
|
|
2603
2918
|
method: "list",
|
|
2919
|
+
summary: "List secrets",
|
|
2920
|
+
description: "List secret names and sources. Values are never returned.",
|
|
2604
2921
|
http: "GET",
|
|
2605
2922
|
path: "/application/v1/workers/{worker_id}/secrets",
|
|
2606
2923
|
streaming: "no",
|
|
@@ -2616,6 +2933,8 @@ delete it. Omit the field to preserve.`
|
|
|
2616
2933
|
{
|
|
2617
2934
|
resource: "application.workers.secrets",
|
|
2618
2935
|
method: "delete",
|
|
2936
|
+
summary: "Delete secret",
|
|
2937
|
+
description: "Delete a secret. Unlike Cloudflare, this derives a new version without it and deploys that version.",
|
|
2619
2938
|
http: "DELETE",
|
|
2620
2939
|
path: "/application/v1/workers/{worker_id}/secrets/{name}",
|
|
2621
2940
|
streaming: "no",
|
|
@@ -2635,6 +2954,8 @@ delete it. Omit the field to preserve.`
|
|
|
2635
2954
|
{
|
|
2636
2955
|
resource: "application.workers.secrets",
|
|
2637
2956
|
method: "update",
|
|
2957
|
+
summary: "Put secret",
|
|
2958
|
+
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.",
|
|
2638
2959
|
http: "PUT",
|
|
2639
2960
|
path: "/application/v1/workers/{worker_id}/secrets/{name}",
|
|
2640
2961
|
streaming: "no",
|
|
@@ -2665,6 +2986,8 @@ delete it. Omit the field to preserve.`
|
|
|
2665
2986
|
{
|
|
2666
2987
|
resource: "application.workers.versions",
|
|
2667
2988
|
method: "list",
|
|
2989
|
+
summary: "List versions",
|
|
2990
|
+
description: "List the versions of a Worker, newest first, to pick one to deploy or inspect. Page with next_cursor.",
|
|
2668
2991
|
http: "GET",
|
|
2669
2992
|
path: "/application/v1/workers/{worker_id}/versions",
|
|
2670
2993
|
streaming: "no",
|
|
@@ -2693,6 +3016,8 @@ delete it. Omit the field to preserve.`
|
|
|
2693
3016
|
{
|
|
2694
3017
|
resource: "application.workers.versions",
|
|
2695
3018
|
method: "create",
|
|
3019
|
+
summary: "Create version",
|
|
3020
|
+
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.",
|
|
2696
3021
|
http: "POST",
|
|
2697
3022
|
path: "/application/v1/workers/{worker_id}/versions",
|
|
2698
3023
|
streaming: "no",
|
|
@@ -2770,6 +3095,8 @@ delete it. Omit the field to preserve.`
|
|
|
2770
3095
|
{
|
|
2771
3096
|
resource: "application.workers.versions",
|
|
2772
3097
|
method: "retrieve",
|
|
3098
|
+
summary: "Get version",
|
|
3099
|
+
description: "Get one version of a Worker with its modules, bindings and asset settings; secret values are never returned.",
|
|
2773
3100
|
http: "GET",
|
|
2774
3101
|
path: "/application/v1/workers/{worker_id}/versions/{version_id}",
|
|
2775
3102
|
streaming: "no",
|
|
@@ -2789,6 +3116,8 @@ delete it. Omit the field to preserve.`
|
|
|
2789
3116
|
{
|
|
2790
3117
|
resource: "automation.actions",
|
|
2791
3118
|
method: "list",
|
|
3119
|
+
summary: "List actions",
|
|
3120
|
+
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.",
|
|
2792
3121
|
http: "GET",
|
|
2793
3122
|
path: "/automation/v1/actions",
|
|
2794
3123
|
streaming: "no",
|
|
@@ -2872,6 +3201,8 @@ delete it. Omit the field to preserve.`
|
|
|
2872
3201
|
{
|
|
2873
3202
|
resource: "automation.actions",
|
|
2874
3203
|
method: "create",
|
|
3204
|
+
summary: "Create an action",
|
|
3205
|
+
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.",
|
|
2875
3206
|
http: "POST",
|
|
2876
3207
|
path: "/automation/v1/actions",
|
|
2877
3208
|
streaming: "no",
|
|
@@ -2954,6 +3285,8 @@ delete it. Omit the field to preserve.`
|
|
|
2954
3285
|
{
|
|
2955
3286
|
resource: "automation.actions",
|
|
2956
3287
|
method: "retrieve",
|
|
3288
|
+
summary: "Get an action",
|
|
3289
|
+
description: "Read the action and its full current implementation. The response ETag is the current revision ID for conditional updates.",
|
|
2957
3290
|
http: "GET",
|
|
2958
3291
|
path: "/automation/v1/actions/{ns}/{name}",
|
|
2959
3292
|
streaming: "no",
|
|
@@ -2973,6 +3306,8 @@ delete it. Omit the field to preserve.`
|
|
|
2973
3306
|
{
|
|
2974
3307
|
resource: "automation.actions",
|
|
2975
3308
|
method: "update",
|
|
3309
|
+
summary: "Update an action",
|
|
3310
|
+
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.",
|
|
2976
3311
|
http: "PUT",
|
|
2977
3312
|
path: "/automation/v1/actions/{ns}/{name}",
|
|
2978
3313
|
streaming: "no",
|
|
@@ -3059,6 +3394,8 @@ delete it. Omit the field to preserve.`
|
|
|
3059
3394
|
{
|
|
3060
3395
|
resource: "automation.actions",
|
|
3061
3396
|
method: "archive",
|
|
3397
|
+
summary: "Archive an action",
|
|
3398
|
+
description: "Archive the action while retaining its name and history, hiding it from the default list. The response includes dependents_count.",
|
|
3062
3399
|
http: "POST",
|
|
3063
3400
|
path: "/automation/v1/actions/{ns}/{name}/archive",
|
|
3064
3401
|
streaming: "no",
|
|
@@ -3082,6 +3419,8 @@ delete it. Omit the field to preserve.`
|
|
|
3082
3419
|
{
|
|
3083
3420
|
resource: "automation.actions.dependents",
|
|
3084
3421
|
method: "list",
|
|
3422
|
+
summary: "List action dependents",
|
|
3423
|
+
description: "List orchestrations referencing this action. The search covers scripts and workflows in their drafts or latest versions.",
|
|
3085
3424
|
http: "GET",
|
|
3086
3425
|
path: "/automation/v1/actions/{ns}/{name}/dependents",
|
|
3087
3426
|
streaming: "no",
|
|
@@ -3114,6 +3453,8 @@ delete it. Omit the field to preserve.`
|
|
|
3114
3453
|
{
|
|
3115
3454
|
resource: "automation.actions.invocations",
|
|
3116
3455
|
method: "list",
|
|
3456
|
+
summary: "List action invocations",
|
|
3457
|
+
description: "List this action’s invocations, filtering by status, revision, calling definition and time. Results identify the run and call site.",
|
|
3117
3458
|
http: "GET",
|
|
3118
3459
|
path: "/automation/v1/actions/{ns}/{name}/invocations",
|
|
3119
3460
|
streaming: "no",
|
|
@@ -3187,6 +3528,8 @@ delete it. Omit the field to preserve.`
|
|
|
3187
3528
|
{
|
|
3188
3529
|
resource: "automation.actions",
|
|
3189
3530
|
method: "restore",
|
|
3531
|
+
summary: "Restore an action",
|
|
3532
|
+
description: "Restore an archived action to the default list. Its current revision is preserved.",
|
|
3190
3533
|
http: "POST",
|
|
3191
3534
|
path: "/automation/v1/actions/{ns}/{name}/restore",
|
|
3192
3535
|
streaming: "no",
|
|
@@ -3210,6 +3553,8 @@ delete it. Omit the field to preserve.`
|
|
|
3210
3553
|
{
|
|
3211
3554
|
resource: "automation.actions.revisions",
|
|
3212
3555
|
method: "list",
|
|
3556
|
+
summary: "List action revisions",
|
|
3557
|
+
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.",
|
|
3213
3558
|
http: "GET",
|
|
3214
3559
|
path: "/automation/v1/actions/{ns}/{name}/revisions",
|
|
3215
3560
|
streaming: "no",
|
|
@@ -3251,6 +3596,8 @@ delete it. Omit the field to preserve.`
|
|
|
3251
3596
|
{
|
|
3252
3597
|
resource: "automation.actions.revisions",
|
|
3253
3598
|
method: "retrieve",
|
|
3599
|
+
summary: "Get an action revision",
|
|
3600
|
+
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.",
|
|
3254
3601
|
http: "GET",
|
|
3255
3602
|
path: "/automation/v1/actions/{ns}/{name}/revisions/{revision}",
|
|
3256
3603
|
streaming: "no",
|
|
@@ -3274,6 +3621,8 @@ delete it. Omit the field to preserve.`
|
|
|
3274
3621
|
{
|
|
3275
3622
|
resource: "automation.actions",
|
|
3276
3623
|
method: "rollback",
|
|
3624
|
+
summary: "Roll back an action",
|
|
3625
|
+
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.",
|
|
3277
3626
|
http: "POST",
|
|
3278
3627
|
path: "/automation/v1/actions/{ns}/{name}/rollback",
|
|
3279
3628
|
streaming: "no",
|
|
@@ -3310,6 +3659,8 @@ delete it. Omit the field to preserve.`
|
|
|
3310
3659
|
{
|
|
3311
3660
|
resource: "automation.hooks",
|
|
3312
3661
|
method: "send",
|
|
3662
|
+
summary: "Receive a webhook",
|
|
3663
|
+
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.",
|
|
3313
3664
|
http: "POST",
|
|
3314
3665
|
path: "/automation/v1/hooks/{trigger_id}/{token}",
|
|
3315
3666
|
streaming: "no",
|
|
@@ -3333,6 +3684,8 @@ delete it. Omit the field to preserve.`
|
|
|
3333
3684
|
{
|
|
3334
3685
|
resource: "automation.resolve",
|
|
3335
3686
|
method: "retrieve",
|
|
3687
|
+
summary: "Resolve a run target",
|
|
3688
|
+
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.",
|
|
3336
3689
|
http: "GET",
|
|
3337
3690
|
path: "/automation/v1/resolve",
|
|
3338
3691
|
streaming: "no",
|
|
@@ -3350,6 +3703,8 @@ delete it. Omit the field to preserve.`
|
|
|
3350
3703
|
{
|
|
3351
3704
|
resource: "automation.runs",
|
|
3352
3705
|
method: "list",
|
|
3706
|
+
summary: "List runs",
|
|
3707
|
+
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.",
|
|
3353
3708
|
http: "GET",
|
|
3354
3709
|
path: "/automation/v1/runs",
|
|
3355
3710
|
streaming: "no",
|
|
@@ -3505,6 +3860,8 @@ delete it. Omit the field to preserve.`
|
|
|
3505
3860
|
{
|
|
3506
3861
|
resource: "automation.runs",
|
|
3507
3862
|
method: "create",
|
|
3863
|
+
summary: "Create a run",
|
|
3864
|
+
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}.",
|
|
3508
3865
|
http: "POST",
|
|
3509
3866
|
path: "/automation/v1/runs",
|
|
3510
3867
|
streaming: "no",
|
|
@@ -3519,6 +3876,8 @@ delete it. Omit the field to preserve.`
|
|
|
3519
3876
|
{
|
|
3520
3877
|
resource: "automation.runs",
|
|
3521
3878
|
method: "retrieve",
|
|
3879
|
+
summary: "Get a run",
|
|
3880
|
+
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.",
|
|
3522
3881
|
http: "GET",
|
|
3523
3882
|
path: "/automation/v1/runs/{id}",
|
|
3524
3883
|
streaming: "no",
|
|
@@ -3555,6 +3914,8 @@ delete it. Omit the field to preserve.`
|
|
|
3555
3914
|
{
|
|
3556
3915
|
resource: "automation.runs.artifacts",
|
|
3557
3916
|
method: "list",
|
|
3917
|
+
summary: "List run artifacts",
|
|
3918
|
+
description: "Read run artifacts and their file references. Entries follow ledger order and include content types, sizes and associated steps.",
|
|
3558
3919
|
http: "GET",
|
|
3559
3920
|
path: "/automation/v1/runs/{id}/artifacts",
|
|
3560
3921
|
streaming: "no",
|
|
@@ -3583,6 +3944,8 @@ delete it. Omit the field to preserve.`
|
|
|
3583
3944
|
{
|
|
3584
3945
|
resource: "automation.runs.calls",
|
|
3585
3946
|
method: "list",
|
|
3947
|
+
summary: "List run calls",
|
|
3948
|
+
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.",
|
|
3586
3949
|
http: "GET",
|
|
3587
3950
|
path: "/automation/v1/runs/{id}/calls",
|
|
3588
3951
|
streaming: "no",
|
|
@@ -3611,6 +3974,8 @@ delete it. Omit the field to preserve.`
|
|
|
3611
3974
|
{
|
|
3612
3975
|
resource: "automation.runs",
|
|
3613
3976
|
method: "cancel",
|
|
3977
|
+
summary: "Cancel a run",
|
|
3978
|
+
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.",
|
|
3614
3979
|
http: "POST",
|
|
3615
3980
|
path: "/automation/v1/runs/{id}/cancel",
|
|
3616
3981
|
streaming: "no",
|
|
@@ -3637,6 +4002,8 @@ delete it. Omit the field to preserve.`
|
|
|
3637
4002
|
{
|
|
3638
4003
|
resource: "automation.runs",
|
|
3639
4004
|
method: "events",
|
|
4005
|
+
summary: "Read run events",
|
|
4006
|
+
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.",
|
|
3640
4007
|
http: "GET",
|
|
3641
4008
|
path: "/automation/v1/runs/{id}/events",
|
|
3642
4009
|
streaming: "always",
|
|
@@ -3665,6 +4032,8 @@ delete it. Omit the field to preserve.`
|
|
|
3665
4032
|
{
|
|
3666
4033
|
resource: "automation.runs",
|
|
3667
4034
|
method: "logs",
|
|
4035
|
+
summary: "Read run logs",
|
|
4036
|
+
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.",
|
|
3668
4037
|
http: "GET",
|
|
3669
4038
|
path: "/automation/v1/runs/{id}/logs",
|
|
3670
4039
|
streaming: "always",
|
|
@@ -3693,6 +4062,8 @@ delete it. Omit the field to preserve.`
|
|
|
3693
4062
|
{
|
|
3694
4063
|
resource: "automation.runs",
|
|
3695
4064
|
method: "rerun",
|
|
4065
|
+
summary: "Rerun a run",
|
|
4066
|
+
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.",
|
|
3696
4067
|
http: "POST",
|
|
3697
4068
|
path: "/automation/v1/runs/{id}/rerun",
|
|
3698
4069
|
streaming: "no",
|
|
@@ -3719,6 +4090,8 @@ delete it. Omit the field to preserve.`
|
|
|
3719
4090
|
{
|
|
3720
4091
|
resource: "automation.runs",
|
|
3721
4092
|
method: "resume",
|
|
4093
|
+
summary: "Resume a run",
|
|
4094
|
+
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.",
|
|
3722
4095
|
http: "POST",
|
|
3723
4096
|
path: "/automation/v1/runs/{id}/resume",
|
|
3724
4097
|
streaming: "no",
|
|
@@ -3738,6 +4111,8 @@ delete it. Omit the field to preserve.`
|
|
|
3738
4111
|
{
|
|
3739
4112
|
resource: "automation.runs",
|
|
3740
4113
|
method: "retrieveSource",
|
|
4114
|
+
summary: "Get run source",
|
|
4115
|
+
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.",
|
|
3741
4116
|
http: "GET",
|
|
3742
4117
|
path: "/automation/v1/runs/{id}/source",
|
|
3743
4118
|
streaming: "no",
|
|
@@ -3753,6 +4128,8 @@ delete it. Omit the field to preserve.`
|
|
|
3753
4128
|
{
|
|
3754
4129
|
resource: "automation.runs",
|
|
3755
4130
|
method: "suspend",
|
|
4131
|
+
summary: "Suspend a run",
|
|
4132
|
+
description: "Suspend only a running or waiting workflow. Scripts return OPERATION_NOT_SUPPORTED; other states return RUN_INVALID_STATE.",
|
|
3756
4133
|
http: "POST",
|
|
3757
4134
|
path: "/automation/v1/runs/{id}/suspend",
|
|
3758
4135
|
streaming: "no",
|
|
@@ -3772,6 +4149,8 @@ delete it. Omit the field to preserve.`
|
|
|
3772
4149
|
{
|
|
3773
4150
|
resource: "automation.runs.tasks",
|
|
3774
4151
|
method: "list",
|
|
4152
|
+
summary: "List run tasks",
|
|
4153
|
+
description: "Page through the task ledger. include=planned adds unexecuted top-level steps; group_by=reference aggregates count, status and duration by task reference.",
|
|
3775
4154
|
http: "GET",
|
|
3776
4155
|
path: "/automation/v1/runs/{id}/tasks",
|
|
3777
4156
|
streaming: "no",
|
|
@@ -3818,6 +4197,8 @@ delete it. Omit the field to preserve.`
|
|
|
3818
4197
|
{
|
|
3819
4198
|
resource: "automation.runs.waits",
|
|
3820
4199
|
method: "list",
|
|
4200
|
+
summary: "List run waits",
|
|
4201
|
+
description: "List current and historical waits in ledger order. Wait types include event, timer and child.",
|
|
3821
4202
|
http: "GET",
|
|
3822
4203
|
path: "/automation/v1/runs/{id}/waits",
|
|
3823
4204
|
streaming: "no",
|
|
@@ -3846,6 +4227,8 @@ delete it. Omit the field to preserve.`
|
|
|
3846
4227
|
{
|
|
3847
4228
|
resource: "automation.runs.waits",
|
|
3848
4229
|
method: "complete",
|
|
4230
|
+
summary: "Complete a run wait",
|
|
4231
|
+
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.",
|
|
3849
4232
|
http: "POST",
|
|
3850
4233
|
path: "/automation/v1/runs/{id}/waits/{wait_id}/complete",
|
|
3851
4234
|
streaming: "no",
|
|
@@ -3882,6 +4265,8 @@ delete it. Omit the field to preserve.`
|
|
|
3882
4265
|
{
|
|
3883
4266
|
resource: "automation.scripts",
|
|
3884
4267
|
method: "list",
|
|
4268
|
+
summary: "List scripts",
|
|
4269
|
+
description: "List visible script summaries, latest versions, tags and seven-day statistics. Archived entries are excluded by default.",
|
|
3885
4270
|
http: "GET",
|
|
3886
4271
|
path: "/automation/v1/scripts",
|
|
3887
4272
|
streaming: "no",
|
|
@@ -3953,6 +4338,8 @@ delete it. Omit the field to preserve.`
|
|
|
3953
4338
|
{
|
|
3954
4339
|
resource: "automation.scripts",
|
|
3955
4340
|
method: "create",
|
|
4341
|
+
summary: "Create a script",
|
|
4342
|
+
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.',
|
|
3956
4343
|
http: "POST",
|
|
3957
4344
|
path: "/automation/v1/scripts",
|
|
3958
4345
|
streaming: "no",
|
|
@@ -3998,6 +4385,8 @@ delete it. Omit the field to preserve.`
|
|
|
3998
4385
|
{
|
|
3999
4386
|
resource: "automation.scripts",
|
|
4000
4387
|
method: "retrieve",
|
|
4388
|
+
summary: "Get a script",
|
|
4389
|
+
description: "Read script details and draft source. The ETag is the draft revision to use in If-Match for updates.",
|
|
4001
4390
|
http: "GET",
|
|
4002
4391
|
path: "/automation/v1/scripts/{ns}/{name}",
|
|
4003
4392
|
streaming: "no",
|
|
@@ -4017,6 +4406,8 @@ delete it. Omit the field to preserve.`
|
|
|
4017
4406
|
{
|
|
4018
4407
|
resource: "automation.scripts",
|
|
4019
4408
|
method: "update",
|
|
4409
|
+
summary: "Update a script draft",
|
|
4410
|
+
description: "Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.",
|
|
4020
4411
|
http: "PATCH",
|
|
4021
4412
|
path: "/automation/v1/scripts/{ns}/{name}",
|
|
4022
4413
|
streaming: "no",
|
|
@@ -4059,6 +4450,8 @@ delete it. Omit the field to preserve.`
|
|
|
4059
4450
|
{
|
|
4060
4451
|
resource: "automation.scripts",
|
|
4061
4452
|
method: "archive",
|
|
4453
|
+
summary: "Archive a script",
|
|
4454
|
+
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.",
|
|
4062
4455
|
http: "POST",
|
|
4063
4456
|
path: "/automation/v1/scripts/{ns}/{name}/archive",
|
|
4064
4457
|
streaming: "no",
|
|
@@ -4082,6 +4475,8 @@ delete it. Omit the field to preserve.`
|
|
|
4082
4475
|
{
|
|
4083
4476
|
resource: "automation.scripts.distTags",
|
|
4084
4477
|
method: "list",
|
|
4478
|
+
summary: "List script tags",
|
|
4479
|
+
description: "Read the exact version for each distribution tag. Results include the update time and updater.",
|
|
4085
4480
|
http: "GET",
|
|
4086
4481
|
path: "/automation/v1/scripts/{ns}/{name}/dist-tags",
|
|
4087
4482
|
streaming: "no",
|
|
@@ -4101,6 +4496,8 @@ delete it. Omit the field to preserve.`
|
|
|
4101
4496
|
{
|
|
4102
4497
|
resource: "automation.scripts.distTags",
|
|
4103
4498
|
method: "delete",
|
|
4499
|
+
summary: "Delete a script tag",
|
|
4500
|
+
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.",
|
|
4104
4501
|
http: "DELETE",
|
|
4105
4502
|
path: "/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}",
|
|
4106
4503
|
streaming: "no",
|
|
@@ -4124,6 +4521,8 @@ delete it. Omit the field to preserve.`
|
|
|
4124
4521
|
{
|
|
4125
4522
|
resource: "automation.scripts.distTags",
|
|
4126
4523
|
method: "set",
|
|
4524
|
+
summary: "Set a script tag",
|
|
4525
|
+
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.",
|
|
4127
4526
|
http: "PUT",
|
|
4128
4527
|
path: "/automation/v1/scripts/{ns}/{name}/dist-tags/{tag}",
|
|
4129
4528
|
streaming: "no",
|
|
@@ -4158,6 +4557,8 @@ delete it. Omit the field to preserve.`
|
|
|
4158
4557
|
{
|
|
4159
4558
|
resource: "automation.scripts",
|
|
4160
4559
|
method: "restore",
|
|
4560
|
+
summary: "Restore a script",
|
|
4561
|
+
description: "Restore an archived definition with its versions and tags. The name is retained.",
|
|
4161
4562
|
http: "POST",
|
|
4162
4563
|
path: "/automation/v1/scripts/{ns}/{name}/restore",
|
|
4163
4564
|
streaming: "no",
|
|
@@ -4181,6 +4582,8 @@ delete it. Omit the field to preserve.`
|
|
|
4181
4582
|
{
|
|
4182
4583
|
resource: "automation.scripts.versions",
|
|
4183
4584
|
method: "list",
|
|
4585
|
+
summary: "List script versions",
|
|
4586
|
+
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.",
|
|
4184
4587
|
http: "GET",
|
|
4185
4588
|
path: "/automation/v1/scripts/{ns}/{name}/versions",
|
|
4186
4589
|
streaming: "no",
|
|
@@ -4225,6 +4628,8 @@ delete it. Omit the field to preserve.`
|
|
|
4225
4628
|
aliases: [
|
|
4226
4629
|
"publish"
|
|
4227
4630
|
],
|
|
4631
|
+
summary: "Publish a script version",
|
|
4632
|
+
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.",
|
|
4228
4633
|
http: "POST",
|
|
4229
4634
|
path: "/automation/v1/scripts/{ns}/{name}/versions",
|
|
4230
4635
|
streaming: "no",
|
|
@@ -4248,6 +4653,8 @@ delete it. Omit the field to preserve.`
|
|
|
4248
4653
|
{
|
|
4249
4654
|
resource: "automation.scripts.versions",
|
|
4250
4655
|
method: "retrieve",
|
|
4656
|
+
summary: "Get a script version",
|
|
4657
|
+
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.",
|
|
4251
4658
|
http: "GET",
|
|
4252
4659
|
path: "/automation/v1/scripts/{ns}/{name}/versions/{version}",
|
|
4253
4660
|
streaming: "no",
|
|
@@ -4271,6 +4678,8 @@ delete it. Omit the field to preserve.`
|
|
|
4271
4678
|
{
|
|
4272
4679
|
resource: "automation.scripts.versions",
|
|
4273
4680
|
method: "deprecate",
|
|
4681
|
+
summary: "Deprecate a script version",
|
|
4682
|
+
description: "Record a deprecation message; an empty message removes deprecation without changing the version source.",
|
|
4274
4683
|
http: "POST",
|
|
4275
4684
|
path: "/automation/v1/scripts/{ns}/{name}/versions/{version}/deprecate",
|
|
4276
4685
|
streaming: "no",
|
|
@@ -4305,6 +4714,8 @@ delete it. Omit the field to preserve.`
|
|
|
4305
4714
|
{
|
|
4306
4715
|
resource: "automation.targets",
|
|
4307
4716
|
method: "list",
|
|
4717
|
+
summary: "Search automation definitions",
|
|
4718
|
+
description: "Search visible targets and page in ascending name order. Archived targets are excluded by default; optionally select published scripts and workflows.",
|
|
4308
4719
|
http: "GET",
|
|
4309
4720
|
path: "/automation/v1/targets",
|
|
4310
4721
|
streaming: "no",
|
|
@@ -4376,6 +4787,8 @@ delete it. Omit the field to preserve.`
|
|
|
4376
4787
|
{
|
|
4377
4788
|
resource: "automation.triggers",
|
|
4378
4789
|
method: "list",
|
|
4790
|
+
summary: "List triggers",
|
|
4791
|
+
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.",
|
|
4379
4792
|
http: "GET",
|
|
4380
4793
|
path: "/automation/v1/triggers",
|
|
4381
4794
|
streaming: "no",
|
|
@@ -4447,6 +4860,8 @@ delete it. Omit the field to preserve.`
|
|
|
4447
4860
|
{
|
|
4448
4861
|
resource: "automation.triggers",
|
|
4449
4862
|
method: "create",
|
|
4863
|
+
summary: "Create a trigger",
|
|
4864
|
+
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.",
|
|
4450
4865
|
http: "POST",
|
|
4451
4866
|
path: "/automation/v1/triggers",
|
|
4452
4867
|
streaming: "no",
|
|
@@ -4548,6 +4963,8 @@ delete it. Omit the field to preserve.`
|
|
|
4548
4963
|
{
|
|
4549
4964
|
resource: "automation.triggers",
|
|
4550
4965
|
method: "preview",
|
|
4966
|
+
summary: "Preview a trigger schedule",
|
|
4967
|
+
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.",
|
|
4551
4968
|
http: "POST",
|
|
4552
4969
|
path: "/automation/v1/triggers/preview",
|
|
4553
4970
|
streaming: "no",
|
|
@@ -4575,6 +4992,8 @@ delete it. Omit the field to preserve.`
|
|
|
4575
4992
|
{
|
|
4576
4993
|
resource: "automation.triggers",
|
|
4577
4994
|
method: "delete",
|
|
4995
|
+
summary: "Delete a trigger",
|
|
4996
|
+
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.",
|
|
4578
4997
|
http: "DELETE",
|
|
4579
4998
|
path: "/automation/v1/triggers/{id}",
|
|
4580
4999
|
streaming: "no",
|
|
@@ -4590,6 +5009,8 @@ delete it. Omit the field to preserve.`
|
|
|
4590
5009
|
{
|
|
4591
5010
|
resource: "automation.triggers",
|
|
4592
5011
|
method: "retrieve",
|
|
5012
|
+
summary: "Get a trigger",
|
|
5013
|
+
description: "Read schedule, state, upcoming times and latest firing. Use the ETag to update; the full webhook URL is not returned again.",
|
|
4593
5014
|
http: "GET",
|
|
4594
5015
|
path: "/automation/v1/triggers/{id}",
|
|
4595
5016
|
streaming: "no",
|
|
@@ -4605,6 +5026,8 @@ delete it. Omit the field to preserve.`
|
|
|
4605
5026
|
{
|
|
4606
5027
|
resource: "automation.triggers",
|
|
4607
5028
|
method: "update",
|
|
5029
|
+
summary: "Update a trigger",
|
|
5030
|
+
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.",
|
|
4608
5031
|
http: "PATCH",
|
|
4609
5032
|
path: "/automation/v1/triggers/{id}",
|
|
4610
5033
|
streaming: "no",
|
|
@@ -4711,6 +5134,8 @@ delete it. Omit the field to preserve.`
|
|
|
4711
5134
|
{
|
|
4712
5135
|
resource: "automation.triggers",
|
|
4713
5136
|
method: "fire",
|
|
5137
|
+
summary: "Fire a trigger now",
|
|
5138
|
+
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.",
|
|
4714
5139
|
http: "POST",
|
|
4715
5140
|
path: "/automation/v1/triggers/{id}/fire",
|
|
4716
5141
|
streaming: "no",
|
|
@@ -4726,6 +5151,8 @@ delete it. Omit the field to preserve.`
|
|
|
4726
5151
|
{
|
|
4727
5152
|
resource: "automation.triggers.firings",
|
|
4728
5153
|
method: "list",
|
|
5154
|
+
summary: "List trigger firings",
|
|
5155
|
+
description: "Read the last 30 days of firings newest first. Results include resolved versions, run IDs and failure details.",
|
|
4729
5156
|
http: "GET",
|
|
4730
5157
|
path: "/automation/v1/triggers/{id}/firings",
|
|
4731
5158
|
streaming: "no",
|
|
@@ -4775,6 +5202,8 @@ delete it. Omit the field to preserve.`
|
|
|
4775
5202
|
{
|
|
4776
5203
|
resource: "automation.triggers",
|
|
4777
5204
|
method: "pause",
|
|
5205
|
+
summary: "Pause a trigger",
|
|
5206
|
+
description: "Pause new firings without terminating existing runs. Definition-managed triggers can also be paused.",
|
|
4778
5207
|
http: "POST",
|
|
4779
5208
|
path: "/automation/v1/triggers/{id}/pause",
|
|
4780
5209
|
streaming: "no",
|
|
@@ -4790,6 +5219,8 @@ delete it. Omit the field to preserve.`
|
|
|
4790
5219
|
{
|
|
4791
5220
|
resource: "automation.triggers",
|
|
4792
5221
|
method: "resume",
|
|
5222
|
+
summary: "Resume a trigger",
|
|
5223
|
+
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.",
|
|
4793
5224
|
http: "POST",
|
|
4794
5225
|
path: "/automation/v1/triggers/{id}/resume",
|
|
4795
5226
|
streaming: "no",
|
|
@@ -4805,6 +5236,8 @@ delete it. Omit the field to preserve.`
|
|
|
4805
5236
|
{
|
|
4806
5237
|
resource: "automation.triggers",
|
|
4807
5238
|
method: "rotateWebhook",
|
|
5239
|
+
summary: "Rotate a webhook URL",
|
|
5240
|
+
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.",
|
|
4808
5241
|
http: "POST",
|
|
4809
5242
|
path: "/automation/v1/triggers/{id}/rotate-webhook",
|
|
4810
5243
|
streaming: "no",
|
|
@@ -4820,6 +5253,8 @@ delete it. Omit the field to preserve.`
|
|
|
4820
5253
|
{
|
|
4821
5254
|
resource: "automation.validate",
|
|
4822
5255
|
method: "create",
|
|
5256
|
+
summary: "Validate a definition",
|
|
5257
|
+
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.",
|
|
4823
5258
|
http: "POST",
|
|
4824
5259
|
path: "/automation/v1/validate",
|
|
4825
5260
|
streaming: "no",
|
|
@@ -4852,6 +5287,8 @@ delete it. Omit the field to preserve.`
|
|
|
4852
5287
|
{
|
|
4853
5288
|
resource: "automation.workflows",
|
|
4854
5289
|
method: "list",
|
|
5290
|
+
summary: "List workflows",
|
|
5291
|
+
description: "List visible workflow summaries, latest versions, tags and seven-day statistics. Archived entries are excluded by default.",
|
|
4855
5292
|
http: "GET",
|
|
4856
5293
|
path: "/automation/v1/workflows",
|
|
4857
5294
|
streaming: "no",
|
|
@@ -4923,6 +5360,8 @@ delete it. Omit the field to preserve.`
|
|
|
4923
5360
|
{
|
|
4924
5361
|
resource: "automation.workflows",
|
|
4925
5362
|
method: "create",
|
|
5363
|
+
summary: "Create a workflow",
|
|
5364
|
+
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.",
|
|
4926
5365
|
http: "POST",
|
|
4927
5366
|
path: "/automation/v1/workflows",
|
|
4928
5367
|
streaming: "no",
|
|
@@ -4968,6 +5407,8 @@ delete it. Omit the field to preserve.`
|
|
|
4968
5407
|
{
|
|
4969
5408
|
resource: "automation.workflows",
|
|
4970
5409
|
method: "retrieve",
|
|
5410
|
+
summary: "Get a workflow",
|
|
5411
|
+
description: "Read workflow details and draft source. The ETag is the draft revision to use in If-Match for updates.",
|
|
4971
5412
|
http: "GET",
|
|
4972
5413
|
path: "/automation/v1/workflows/{ns}/{name}",
|
|
4973
5414
|
streaming: "no",
|
|
@@ -4987,6 +5428,8 @@ delete it. Omit the field to preserve.`
|
|
|
4987
5428
|
{
|
|
4988
5429
|
resource: "automation.workflows",
|
|
4989
5430
|
method: "update",
|
|
5431
|
+
summary: "Update a workflow draft",
|
|
5432
|
+
description: "Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.",
|
|
4990
5433
|
http: "PATCH",
|
|
4991
5434
|
path: "/automation/v1/workflows/{ns}/{name}",
|
|
4992
5435
|
streaming: "no",
|
|
@@ -5029,6 +5472,8 @@ delete it. Omit the field to preserve.`
|
|
|
5029
5472
|
{
|
|
5030
5473
|
resource: "automation.workflows",
|
|
5031
5474
|
method: "archive",
|
|
5475
|
+
summary: "Archive a workflow",
|
|
5476
|
+
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.",
|
|
5032
5477
|
http: "POST",
|
|
5033
5478
|
path: "/automation/v1/workflows/{ns}/{name}/archive",
|
|
5034
5479
|
streaming: "no",
|
|
@@ -5052,6 +5497,8 @@ delete it. Omit the field to preserve.`
|
|
|
5052
5497
|
{
|
|
5053
5498
|
resource: "automation.workflows.distTags",
|
|
5054
5499
|
method: "list",
|
|
5500
|
+
summary: "List workflow tags",
|
|
5501
|
+
description: "Read the exact version for each distribution tag. Results include the update time and updater.",
|
|
5055
5502
|
http: "GET",
|
|
5056
5503
|
path: "/automation/v1/workflows/{ns}/{name}/dist-tags",
|
|
5057
5504
|
streaming: "no",
|
|
@@ -5071,6 +5518,8 @@ delete it. Omit the field to preserve.`
|
|
|
5071
5518
|
{
|
|
5072
5519
|
resource: "automation.workflows.distTags",
|
|
5073
5520
|
method: "delete",
|
|
5521
|
+
summary: "Delete a workflow tag",
|
|
5522
|
+
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.",
|
|
5074
5523
|
http: "DELETE",
|
|
5075
5524
|
path: "/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}",
|
|
5076
5525
|
streaming: "no",
|
|
@@ -5094,6 +5543,8 @@ delete it. Omit the field to preserve.`
|
|
|
5094
5543
|
{
|
|
5095
5544
|
resource: "automation.workflows.distTags",
|
|
5096
5545
|
method: "set",
|
|
5546
|
+
summary: "Set a workflow tag",
|
|
5547
|
+
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.",
|
|
5097
5548
|
http: "PUT",
|
|
5098
5549
|
path: "/automation/v1/workflows/{ns}/{name}/dist-tags/{tag}",
|
|
5099
5550
|
streaming: "no",
|
|
@@ -5128,6 +5579,8 @@ delete it. Omit the field to preserve.`
|
|
|
5128
5579
|
{
|
|
5129
5580
|
resource: "automation.workflows",
|
|
5130
5581
|
method: "restore",
|
|
5582
|
+
summary: "Restore a workflow",
|
|
5583
|
+
description: "Restore an archived definition with its versions and tags. The name is retained.",
|
|
5131
5584
|
http: "POST",
|
|
5132
5585
|
path: "/automation/v1/workflows/{ns}/{name}/restore",
|
|
5133
5586
|
streaming: "no",
|
|
@@ -5151,6 +5604,8 @@ delete it. Omit the field to preserve.`
|
|
|
5151
5604
|
{
|
|
5152
5605
|
resource: "automation.workflows.versions",
|
|
5153
5606
|
method: "list",
|
|
5607
|
+
summary: "List workflow versions",
|
|
5608
|
+
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.",
|
|
5154
5609
|
http: "GET",
|
|
5155
5610
|
path: "/automation/v1/workflows/{ns}/{name}/versions",
|
|
5156
5611
|
streaming: "no",
|
|
@@ -5195,6 +5650,8 @@ delete it. Omit the field to preserve.`
|
|
|
5195
5650
|
aliases: [
|
|
5196
5651
|
"publish"
|
|
5197
5652
|
],
|
|
5653
|
+
summary: "Publish a workflow version",
|
|
5654
|
+
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.",
|
|
5198
5655
|
http: "POST",
|
|
5199
5656
|
path: "/automation/v1/workflows/{ns}/{name}/versions",
|
|
5200
5657
|
streaming: "no",
|
|
@@ -5218,6 +5675,8 @@ delete it. Omit the field to preserve.`
|
|
|
5218
5675
|
{
|
|
5219
5676
|
resource: "automation.workflows.versions",
|
|
5220
5677
|
method: "retrieve",
|
|
5678
|
+
summary: "Get a workflow version",
|
|
5679
|
+
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.",
|
|
5221
5680
|
http: "GET",
|
|
5222
5681
|
path: "/automation/v1/workflows/{ns}/{name}/versions/{version}",
|
|
5223
5682
|
streaming: "no",
|
|
@@ -5241,6 +5700,8 @@ delete it. Omit the field to preserve.`
|
|
|
5241
5700
|
{
|
|
5242
5701
|
resource: "automation.workflows.versions",
|
|
5243
5702
|
method: "deprecate",
|
|
5703
|
+
summary: "Deprecate a workflow version",
|
|
5704
|
+
description: "Record a deprecation message; an empty message removes deprecation without changing the version source.",
|
|
5244
5705
|
http: "POST",
|
|
5245
5706
|
path: "/automation/v1/workflows/{ns}/{name}/versions/{version}/deprecate",
|
|
5246
5707
|
streaming: "no",
|
|
@@ -5275,6 +5736,8 @@ delete it. Omit the field to preserve.`
|
|
|
5275
5736
|
{
|
|
5276
5737
|
resource: "browser.connect",
|
|
5277
5738
|
method: "retrieve",
|
|
5739
|
+
summary: "连接云端浏览器",
|
|
5740
|
+
description: "CDP WebSocket:不填 session 或 name 时新开;session 连接已有会话;name 有就连接、没有就新开。session 与 name 不可同时提供。新建参数在连接已有会话时忽略。使用 Authorization: Bearer API_KEY,或直接使用创建会话返回的带 signingKey 的 connectUrl。连上后发送 CDP 命令 Praxis.getSession,获取 sessionId、liveViewUrl、consoleUrl。",
|
|
5278
5741
|
http: "GET",
|
|
5279
5742
|
path: "/browser/v1/connect",
|
|
5280
5743
|
streaming: "no",
|
|
@@ -5340,6 +5803,8 @@ delete it. Omit the field to preserve.`
|
|
|
5340
5803
|
{
|
|
5341
5804
|
resource: "browser.contexts",
|
|
5342
5805
|
method: "list",
|
|
5806
|
+
summary: "列出浏览器上下文",
|
|
5807
|
+
description: "分页列出当前账户保存的登录态,按登录态 ID 升序排列。每项返回名称、标签及保存内容的统计信息;将 nextCursor 原样传入读取下一页,直到其为 null。",
|
|
5343
5808
|
http: "GET",
|
|
5344
5809
|
path: "/browser/v1/contexts",
|
|
5345
5810
|
streaming: "no",
|
|
@@ -5363,6 +5828,8 @@ delete it. Omit the field to preserve.`
|
|
|
5363
5828
|
{
|
|
5364
5829
|
resource: "browser.contexts",
|
|
5365
5830
|
method: "create",
|
|
5831
|
+
summary: "创建浏览器上下文",
|
|
5832
|
+
description: "创建空的浏览器登录态,用于在会话之间保存 cookie 和 localStorage。将返回的 id 传入 browserSettings.context.id,并设置 persist=true 才会保存会话中的更新。",
|
|
5366
5833
|
http: "POST",
|
|
5367
5834
|
path: "/browser/v1/contexts",
|
|
5368
5835
|
streaming: "no",
|
|
@@ -5396,6 +5863,8 @@ delete it. Omit the field to preserve.`
|
|
|
5396
5863
|
{
|
|
5397
5864
|
resource: "browser.contexts",
|
|
5398
5865
|
method: "delete",
|
|
5866
|
+
summary: "删除浏览器上下文",
|
|
5867
|
+
description: "删除当前账户的指定登录态及其保存内容,成功返回 deleted=true。登录态存在有效写入租约时返回 409 CONTEXT_LOCKED,应在写入会话结束并释放租约后重试。",
|
|
5399
5868
|
http: "DELETE",
|
|
5400
5869
|
path: "/browser/v1/contexts/{contextId}",
|
|
5401
5870
|
streaming: "no",
|
|
@@ -5411,6 +5880,8 @@ delete it. Omit the field to preserve.`
|
|
|
5411
5880
|
{
|
|
5412
5881
|
resource: "browser.contexts",
|
|
5413
5882
|
method: "retrieve",
|
|
5883
|
+
summary: "读取浏览器上下文",
|
|
5884
|
+
description: "读取当前账户的指定登录态元数据、保存内容统计及写入租约持有者,不返回 cookie 或 localStorage 内容。contextId 使用创建或列表返回的 id;不存在或不属于当前账户时返回 404。",
|
|
5414
5885
|
http: "GET",
|
|
5415
5886
|
path: "/browser/v1/contexts/{contextId}",
|
|
5416
5887
|
streaming: "no",
|
|
@@ -5426,6 +5897,8 @@ delete it. Omit the field to preserve.`
|
|
|
5426
5897
|
{
|
|
5427
5898
|
resource: "browser.contexts",
|
|
5428
5899
|
method: "update",
|
|
5900
|
+
summary: "更新浏览器上下文",
|
|
5901
|
+
description: "更新登录态的名称和标签并返回更新后的对象,不修改已保存的 cookie 或 localStorage。省略字段保留原值;空名称清除名称,传入 labels 会整体替换标签,空对象清除标签。",
|
|
5429
5902
|
http: "PUT",
|
|
5430
5903
|
path: "/browser/v1/contexts/{contextId}",
|
|
5431
5904
|
streaming: "no",
|
|
@@ -5458,6 +5931,8 @@ delete it. Omit the field to preserve.`
|
|
|
5458
5931
|
{
|
|
5459
5932
|
resource: "browser.live",
|
|
5460
5933
|
method: "retrieve",
|
|
5934
|
+
summary: "打开实时浏览器画面",
|
|
5935
|
+
description: "使用 debug 返回的完整实时观看地址打开浏览器画面,成功后跳转到对应会话或标签页。必须保留地址中的 t 凭证,无需额外 API Key;链接失效时重新调用 debug 获取地址。",
|
|
5461
5936
|
http: "GET",
|
|
5462
5937
|
path: "/browser/v1/live/{sessionId}/{pageId}",
|
|
5463
5938
|
streaming: "no",
|
|
@@ -5484,6 +5959,8 @@ delete it. Omit the field to preserve.`
|
|
|
5484
5959
|
{
|
|
5485
5960
|
resource: "browser.seleniumUnsupported",
|
|
5486
5961
|
method: "retrieve",
|
|
5962
|
+
summary: "读取 Selenium 不支持提示",
|
|
5963
|
+
description: "seleniumRemoteUrl 指向此地址;不支持 Selenium,请使用 Playwright 或 Puppeteer。",
|
|
5487
5964
|
http: "GET",
|
|
5488
5965
|
path: "/browser/v1/selenium-unsupported",
|
|
5489
5966
|
streaming: "no",
|
|
@@ -5494,6 +5971,8 @@ delete it. Omit the field to preserve.`
|
|
|
5494
5971
|
{
|
|
5495
5972
|
resource: "browser.sessions",
|
|
5496
5973
|
method: "list",
|
|
5974
|
+
summary: "列出浏览器会话",
|
|
5975
|
+
description: "分页列出当前账户的浏览器会话,按创建时刻及 ID 降序排列。可组合状态、名称、标签和用户元数据筛选;将返回的 nextCursor 原样传入以继续读取。",
|
|
5497
5976
|
http: "GET",
|
|
5498
5977
|
path: "/browser/v1/sessions",
|
|
5499
5978
|
streaming: "no",
|
|
@@ -5548,6 +6027,8 @@ delete it. Omit the field to preserve.`
|
|
|
5548
6027
|
{
|
|
5549
6028
|
resource: "browser.sessions",
|
|
5550
6029
|
method: "create",
|
|
6030
|
+
summary: "创建浏览器会话",
|
|
6031
|
+
description: "创建云端 Chrome,返回自带凭证的 connectUrl。API 会话默认断开后结束;最长 6 小时。",
|
|
5551
6032
|
http: "POST",
|
|
5552
6033
|
path: "/browser/v1/sessions",
|
|
5553
6034
|
streaming: "no",
|
|
@@ -5623,6 +6104,8 @@ delete it. Omit the field to preserve.`
|
|
|
5623
6104
|
{
|
|
5624
6105
|
resource: "browser.sessions",
|
|
5625
6106
|
method: "retrieve",
|
|
6107
|
+
summary: "读取浏览器会话",
|
|
6108
|
+
description: "读取当前账户的指定会话及其最新状态,sessionId 使用创建或列表返回的 id。expand=debug,events 可同时取得实时观看地址和事件首页;不存在或不属于当前账户时返回 404。",
|
|
5626
6109
|
http: "GET",
|
|
5627
6110
|
path: "/browser/v1/sessions/{sessionId}",
|
|
5628
6111
|
streaming: "no",
|
|
@@ -5645,6 +6128,8 @@ delete it. Omit the field to preserve.`
|
|
|
5645
6128
|
{
|
|
5646
6129
|
resource: "browser.sessions",
|
|
5647
6130
|
method: "update",
|
|
6131
|
+
summary: "关闭浏览器会话",
|
|
6132
|
+
description: '关闭指定浏览器会话,返回关闭后的会话对象。请求体为 {"status":"REQUEST_RELEASE"};若返回 409 SESSION_INVALID_STATE,可再次读取会话确认状态;已结束的会话可重复请求关闭。',
|
|
5648
6133
|
http: "POST",
|
|
5649
6134
|
path: "/browser/v1/sessions/{sessionId}",
|
|
5650
6135
|
streaming: "no",
|
|
@@ -5674,6 +6159,8 @@ delete it. Omit the field to preserve.`
|
|
|
5674
6159
|
{
|
|
5675
6160
|
resource: "browser.sessions",
|
|
5676
6161
|
method: "retrieveDebug",
|
|
6162
|
+
summary: "读取调试地址",
|
|
6163
|
+
description: "读取当前会话及各标签页的实时观看地址和 CDP 连接地址。直接使用返回的完整链接,保留查询凭证;会话不在运行状态时 pages 为空,返回地址不代表会话仍可连接。",
|
|
5677
6164
|
http: "GET",
|
|
5678
6165
|
path: "/browser/v1/sessions/{sessionId}/debug",
|
|
5679
6166
|
streaming: "no",
|
|
@@ -5689,6 +6176,8 @@ delete it. Omit the field to preserve.`
|
|
|
5689
6176
|
{
|
|
5690
6177
|
resource: "browser.sessions.events",
|
|
5691
6178
|
method: "list",
|
|
6179
|
+
summary: "列出会话事件",
|
|
6180
|
+
description: "按事件序号升序读取指定会话的事件账本,包含生命周期和接管等事件,不包含页面点击或输入内容。可按 types 筛选,并将 nextCursor 原样传入读取后续页。",
|
|
5692
6181
|
http: "GET",
|
|
5693
6182
|
path: "/browser/v1/sessions/{sessionId}/events",
|
|
5694
6183
|
streaming: "no",
|
|
@@ -5723,6 +6212,8 @@ delete it. Omit the field to preserve.`
|
|
|
5723
6212
|
{
|
|
5724
6213
|
resource: "browser.sessions.handoff",
|
|
5725
6214
|
method: "create",
|
|
6215
|
+
summary: "请求人工接管",
|
|
6216
|
+
description: "为运行中的会话发起人工接管请求,返回接管请求事件。请求尚未过期或完成时,CDP 客户端的 Input.* 指令会被拒绝;再次请求会替换已有的接管说明和到期时刻。",
|
|
5726
6217
|
http: "POST",
|
|
5727
6218
|
path: "/browser/v1/sessions/{sessionId}/handoff",
|
|
5728
6219
|
streaming: "no",
|
|
@@ -5755,6 +6246,8 @@ delete it. Omit the field to preserve.`
|
|
|
5755
6246
|
{
|
|
5756
6247
|
resource: "browser.sessions.handoff",
|
|
5757
6248
|
method: "complete",
|
|
6249
|
+
summary: "完成人工接管",
|
|
6250
|
+
description: "完成运行中会话的待处理人工接管,清除接管请求并返回完成事件,客户端可恢复发送 Input.* 指令。没有请求或请求已过期时返回 409 HANDOFF_NOT_PENDING。",
|
|
5758
6251
|
http: "POST",
|
|
5759
6252
|
path: "/browser/v1/sessions/{sessionId}/handoff/complete",
|
|
5760
6253
|
streaming: "no",
|
|
@@ -5770,6 +6263,8 @@ delete it. Omit the field to preserve.`
|
|
|
5770
6263
|
{
|
|
5771
6264
|
resource: "browser.sessions",
|
|
5772
6265
|
method: "stream",
|
|
6266
|
+
summary: "订阅会话动态",
|
|
6267
|
+
description: "SSE:event 为 snapshot、session、pages、action、event 或 end,data 为对应 JSON。先发送 snapshot 快照,再推送实时变化和 ping 注释;end 后关闭。不支持按 Last-Event-ID 历史重放。",
|
|
5773
6268
|
http: "GET",
|
|
5774
6269
|
path: "/browser/v1/sessions/{sessionId}/stream",
|
|
5775
6270
|
streaming: "always",
|
|
@@ -5785,6 +6280,8 @@ delete it. Omit the field to preserve.`
|
|
|
5785
6280
|
{
|
|
5786
6281
|
resource: "browser.sessions.viewer",
|
|
5787
6282
|
method: "create",
|
|
6283
|
+
summary: "更新查看者心跳",
|
|
6284
|
+
description: "登记运行中会话的观看者仍在线,以免无人连接时因空闲被释放。观看页面可见期间为同一观看者重复发送相同 viewerId;停止观看后停止发送,过期心跳不再计为在线。",
|
|
5788
6285
|
http: "POST",
|
|
5789
6286
|
path: "/browser/v1/sessions/{sessionId}/viewer",
|
|
5790
6287
|
streaming: "no",
|
|
@@ -5811,6 +6308,8 @@ delete it. Omit the field to preserve.`
|
|
|
5811
6308
|
{
|
|
5812
6309
|
resource: "database.databases",
|
|
5813
6310
|
method: "list",
|
|
6311
|
+
summary: "List databases",
|
|
6312
|
+
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.",
|
|
5814
6313
|
http: "GET",
|
|
5815
6314
|
path: "/database/v1/databases",
|
|
5816
6315
|
streaming: "no",
|
|
@@ -5850,6 +6349,8 @@ delete it. Omit the field to preserve.`
|
|
|
5850
6349
|
{
|
|
5851
6350
|
resource: "database.databases",
|
|
5852
6351
|
method: "create",
|
|
6352
|
+
summary: "Create database",
|
|
6353
|
+
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.",
|
|
5853
6354
|
http: "POST",
|
|
5854
6355
|
path: "/database/v1/databases",
|
|
5855
6356
|
streaming: "no",
|
|
@@ -5877,6 +6378,8 @@ delete it. Omit the field to preserve.`
|
|
|
5877
6378
|
{
|
|
5878
6379
|
resource: "database.databases",
|
|
5879
6380
|
method: "delete",
|
|
6381
|
+
summary: "Delete database",
|
|
6382
|
+
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.",
|
|
5880
6383
|
http: "DELETE",
|
|
5881
6384
|
path: "/database/v1/databases/{database_id}",
|
|
5882
6385
|
streaming: "no",
|
|
@@ -5892,6 +6395,8 @@ delete it. Omit the field to preserve.`
|
|
|
5892
6395
|
{
|
|
5893
6396
|
resource: "database.databases",
|
|
5894
6397
|
method: "retrieve",
|
|
6398
|
+
summary: "Get database",
|
|
6399
|
+
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.",
|
|
5895
6400
|
http: "GET",
|
|
5896
6401
|
path: "/database/v1/databases/{database_id}",
|
|
5897
6402
|
streaming: "no",
|
|
@@ -5907,6 +6412,8 @@ delete it. Omit the field to preserve.`
|
|
|
5907
6412
|
{
|
|
5908
6413
|
resource: "database.databases",
|
|
5909
6414
|
method: "update",
|
|
6415
|
+
summary: "Update database",
|
|
6416
|
+
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.",
|
|
5910
6417
|
http: "PATCH",
|
|
5911
6418
|
path: "/database/v1/databases/{database_id}",
|
|
5912
6419
|
streaming: "no",
|
|
@@ -5939,6 +6446,8 @@ delete it. Omit the field to preserve.`
|
|
|
5939
6446
|
{
|
|
5940
6447
|
resource: "database.databases.events",
|
|
5941
6448
|
method: "list",
|
|
6449
|
+
summary: "List events",
|
|
6450
|
+
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.",
|
|
5942
6451
|
http: "GET",
|
|
5943
6452
|
path: "/database/v1/databases/{database_id}/events",
|
|
5944
6453
|
streaming: "no",
|
|
@@ -5983,6 +6492,8 @@ delete it. Omit the field to preserve.`
|
|
|
5983
6492
|
{
|
|
5984
6493
|
resource: "database.databases.purge",
|
|
5985
6494
|
method: "create",
|
|
6495
|
+
summary: "Permanently purge database",
|
|
6496
|
+
description: "Immediately and irreversibly purges a deleting database. Active databases return 409; absent or already purged databases return 404.",
|
|
5986
6497
|
http: "POST",
|
|
5987
6498
|
path: "/database/v1/databases/{database_id}/purge",
|
|
5988
6499
|
streaming: "no",
|
|
@@ -5998,6 +6509,8 @@ delete it. Omit the field to preserve.`
|
|
|
5998
6509
|
{
|
|
5999
6510
|
resource: "database.databases.rest",
|
|
6000
6511
|
method: "delete",
|
|
6512
|
+
summary: "Delete rows",
|
|
6513
|
+
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.",
|
|
6001
6514
|
http: "DELETE",
|
|
6002
6515
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6003
6516
|
streaming: "no",
|
|
@@ -6084,6 +6597,8 @@ delete it. Omit the field to preserve.`
|
|
|
6084
6597
|
{
|
|
6085
6598
|
resource: "database.databases.rest",
|
|
6086
6599
|
method: "retrieve",
|
|
6600
|
+
summary: "Select rows",
|
|
6601
|
+
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.",
|
|
6087
6602
|
http: "GET",
|
|
6088
6603
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6089
6604
|
streaming: "no",
|
|
@@ -6170,6 +6685,8 @@ delete it. Omit the field to preserve.`
|
|
|
6170
6685
|
{
|
|
6171
6686
|
resource: "database.databases.rest",
|
|
6172
6687
|
method: "head",
|
|
6688
|
+
summary: "Count rows",
|
|
6689
|
+
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.",
|
|
6173
6690
|
http: "HEAD",
|
|
6174
6691
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6175
6692
|
streaming: "no",
|
|
@@ -6256,6 +6773,8 @@ delete it. Omit the field to preserve.`
|
|
|
6256
6773
|
{
|
|
6257
6774
|
resource: "database.databases.rest",
|
|
6258
6775
|
method: "update",
|
|
6776
|
+
summary: "Update rows",
|
|
6777
|
+
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.",
|
|
6259
6778
|
http: "PATCH",
|
|
6260
6779
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6261
6780
|
streaming: "no",
|
|
@@ -6346,6 +6865,10 @@ delete it. Omit the field to preserve.`
|
|
|
6346
6865
|
{
|
|
6347
6866
|
resource: "database.databases.rest",
|
|
6348
6867
|
method: "create",
|
|
6868
|
+
summary: "Insert rows",
|
|
6869
|
+
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.
|
|
6870
|
+
Rows are filled to the union of their keys with null; send Prefer: missing=default to use field defaults for missing keys.
|
|
6871
|
+
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.`,
|
|
6349
6872
|
http: "POST",
|
|
6350
6873
|
path: "/database/v1/databases/{database_id}/rest/{table}",
|
|
6351
6874
|
streaming: "no",
|
|
@@ -6436,6 +6959,8 @@ delete it. Omit the field to preserve.`
|
|
|
6436
6959
|
{
|
|
6437
6960
|
resource: "database.databases",
|
|
6438
6961
|
method: "restore",
|
|
6962
|
+
summary: "Restore database",
|
|
6963
|
+
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.",
|
|
6439
6964
|
http: "POST",
|
|
6440
6965
|
path: "/database/v1/databases/{database_id}/restore",
|
|
6441
6966
|
streaming: "no",
|
|
@@ -6451,6 +6976,8 @@ delete it. Omit the field to preserve.`
|
|
|
6451
6976
|
{
|
|
6452
6977
|
resource: "database.databases.tables",
|
|
6453
6978
|
method: "list",
|
|
6979
|
+
summary: "List tables",
|
|
6980
|
+
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.",
|
|
6454
6981
|
http: "GET",
|
|
6455
6982
|
path: "/database/v1/databases/{database_id}/tables",
|
|
6456
6983
|
streaming: "no",
|
|
@@ -6466,6 +6993,8 @@ delete it. Omit the field to preserve.`
|
|
|
6466
6993
|
{
|
|
6467
6994
|
resource: "database.databases.tables",
|
|
6468
6995
|
method: "create",
|
|
6996
|
+
summary: "Create table",
|
|
6997
|
+
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.",
|
|
6469
6998
|
http: "POST",
|
|
6470
6999
|
path: "/database/v1/databases/{database_id}/tables",
|
|
6471
7000
|
streaming: "no",
|
|
@@ -6505,6 +7034,8 @@ delete it. Omit the field to preserve.`
|
|
|
6505
7034
|
{
|
|
6506
7035
|
resource: "database.databases.tables",
|
|
6507
7036
|
method: "delete",
|
|
7037
|
+
summary: "Delete table",
|
|
7038
|
+
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.",
|
|
6508
7039
|
http: "DELETE",
|
|
6509
7040
|
path: "/database/v1/databases/{database_id}/tables/{table}",
|
|
6510
7041
|
streaming: "no",
|
|
@@ -6524,6 +7055,8 @@ delete it. Omit the field to preserve.`
|
|
|
6524
7055
|
{
|
|
6525
7056
|
resource: "database.databases.tables",
|
|
6526
7057
|
method: "retrieve",
|
|
7058
|
+
summary: "Get table",
|
|
7059
|
+
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.",
|
|
6527
7060
|
http: "GET",
|
|
6528
7061
|
path: "/database/v1/databases/{database_id}/tables/{table}",
|
|
6529
7062
|
streaming: "no",
|
|
@@ -6543,6 +7076,8 @@ delete it. Omit the field to preserve.`
|
|
|
6543
7076
|
{
|
|
6544
7077
|
resource: "database.databases.tables",
|
|
6545
7078
|
method: "update",
|
|
7079
|
+
summary: "Update table",
|
|
7080
|
+
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.",
|
|
6546
7081
|
http: "PATCH",
|
|
6547
7082
|
path: "/database/v1/databases/{database_id}/tables/{table}",
|
|
6548
7083
|
streaming: "no",
|
|
@@ -6579,6 +7114,8 @@ delete it. Omit the field to preserve.`
|
|
|
6579
7114
|
{
|
|
6580
7115
|
resource: "database.databases.tables.fields",
|
|
6581
7116
|
method: "create",
|
|
7117
|
+
summary: "Add field",
|
|
7118
|
+
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.",
|
|
6582
7119
|
http: "POST",
|
|
6583
7120
|
path: "/database/v1/databases/{database_id}/tables/{table}/fields",
|
|
6584
7121
|
streaming: "no",
|
|
@@ -6602,6 +7139,8 @@ delete it. Omit the field to preserve.`
|
|
|
6602
7139
|
{
|
|
6603
7140
|
resource: "database.databases.tables.fields",
|
|
6604
7141
|
method: "delete",
|
|
7142
|
+
summary: "Delete field",
|
|
7143
|
+
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.",
|
|
6605
7144
|
http: "DELETE",
|
|
6606
7145
|
path: "/database/v1/databases/{database_id}/tables/{table}/fields/{field}",
|
|
6607
7146
|
streaming: "no",
|
|
@@ -6625,6 +7164,8 @@ delete it. Omit the field to preserve.`
|
|
|
6625
7164
|
{
|
|
6626
7165
|
resource: "database.databases.tables.fields",
|
|
6627
7166
|
method: "update",
|
|
7167
|
+
summary: "Update field",
|
|
7168
|
+
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.",
|
|
6628
7169
|
http: "PATCH",
|
|
6629
7170
|
path: "/database/v1/databases/{database_id}/tables/{table}/fields/{field}",
|
|
6630
7171
|
streaming: "no",
|
|
@@ -6689,6 +7230,8 @@ delete it. Omit the field to preserve.`
|
|
|
6689
7230
|
{
|
|
6690
7231
|
resource: "file.files",
|
|
6691
7232
|
method: "list",
|
|
7233
|
+
summary: "List files",
|
|
7234
|
+
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.",
|
|
6692
7235
|
http: "GET",
|
|
6693
7236
|
path: "/file/v1/files",
|
|
6694
7237
|
streaming: "no",
|
|
@@ -6741,6 +7284,8 @@ delete it. Omit the field to preserve.`
|
|
|
6741
7284
|
{
|
|
6742
7285
|
resource: "file.files",
|
|
6743
7286
|
method: "create",
|
|
7287
|
+
summary: "Upload file",
|
|
7288
|
+
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.',
|
|
6744
7289
|
http: "POST",
|
|
6745
7290
|
path: "/file/v1/files",
|
|
6746
7291
|
streaming: "no",
|
|
@@ -6786,6 +7331,8 @@ delete it. Omit the field to preserve.`
|
|
|
6786
7331
|
{
|
|
6787
7332
|
resource: "file.files",
|
|
6788
7333
|
method: "delete",
|
|
7334
|
+
summary: "Delete file",
|
|
7335
|
+
description: "Delete a tenant-owned file. New metadata/content reads return not found. Already-authorized downloads may finish.",
|
|
6789
7336
|
http: "DELETE",
|
|
6790
7337
|
path: "/file/v1/files/{file_id}",
|
|
6791
7338
|
streaming: "no",
|
|
@@ -6801,6 +7348,8 @@ delete it. Omit the field to preserve.`
|
|
|
6801
7348
|
{
|
|
6802
7349
|
resource: "file.files",
|
|
6803
7350
|
method: "retrieve",
|
|
7351
|
+
summary: "Retrieve file",
|
|
7352
|
+
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.",
|
|
6804
7353
|
http: "GET",
|
|
6805
7354
|
path: "/file/v1/files/{file_id}",
|
|
6806
7355
|
streaming: "no",
|
|
@@ -6816,6 +7365,8 @@ delete it. Omit the field to preserve.`
|
|
|
6816
7365
|
{
|
|
6817
7366
|
resource: "file.files",
|
|
6818
7367
|
method: "retrieveContent",
|
|
7368
|
+
summary: "Retrieve file content",
|
|
7369
|
+
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.",
|
|
6819
7370
|
http: "GET",
|
|
6820
7371
|
path: "/file/v1/files/{file_id}/content",
|
|
6821
7372
|
streaming: "no",
|
|
@@ -6831,6 +7382,8 @@ delete it. Omit the field to preserve.`
|
|
|
6831
7382
|
{
|
|
6832
7383
|
resource: "knowledge.vectorStores",
|
|
6833
7384
|
method: "list",
|
|
7385
|
+
summary: "List knowledge bases",
|
|
7386
|
+
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.",
|
|
6834
7387
|
http: "GET",
|
|
6835
7388
|
path: "/knowledge/v1/vector_stores",
|
|
6836
7389
|
streaming: "no",
|
|
@@ -6880,6 +7433,8 @@ delete it. Omit the field to preserve.`
|
|
|
6880
7433
|
{
|
|
6881
7434
|
resource: "knowledge.vectorStores",
|
|
6882
7435
|
method: "create",
|
|
7436
|
+
summary: "Create knowledge base",
|
|
7437
|
+
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"}.',
|
|
6883
7438
|
http: "POST",
|
|
6884
7439
|
path: "/knowledge/v1/vector_stores",
|
|
6885
7440
|
streaming: "no",
|
|
@@ -6938,6 +7493,8 @@ delete it. Omit the field to preserve.`
|
|
|
6938
7493
|
{
|
|
6939
7494
|
resource: "knowledge.vectorStores",
|
|
6940
7495
|
method: "delete",
|
|
7496
|
+
summary: "Delete knowledge base",
|
|
7497
|
+
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.",
|
|
6941
7498
|
http: "DELETE",
|
|
6942
7499
|
path: "/knowledge/v1/vector_stores/{vector_store_id}",
|
|
6943
7500
|
streaming: "no",
|
|
@@ -6953,6 +7510,8 @@ delete it. Omit the field to preserve.`
|
|
|
6953
7510
|
{
|
|
6954
7511
|
resource: "knowledge.vectorStores",
|
|
6955
7512
|
method: "retrieve",
|
|
7513
|
+
summary: "Retrieve knowledge base",
|
|
7514
|
+
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.",
|
|
6956
7515
|
http: "GET",
|
|
6957
7516
|
path: "/knowledge/v1/vector_stores/{vector_store_id}",
|
|
6958
7517
|
streaming: "no",
|
|
@@ -6989,6 +7548,8 @@ delete it. Omit the field to preserve.`
|
|
|
6989
7548
|
{
|
|
6990
7549
|
resource: "knowledge.vectorStores",
|
|
6991
7550
|
method: "update",
|
|
7551
|
+
summary: "Update knowledge base",
|
|
7552
|
+
description: 'Updates an active knowledge base using its returned id. Omitted fields stay unchanged; metadata replaces the whole map. Example body: {"name":"Refund policies"}.',
|
|
6992
7553
|
http: "POST",
|
|
6993
7554
|
path: "/knowledge/v1/vector_stores/{vector_store_id}",
|
|
6994
7555
|
streaming: "no",
|
|
@@ -7033,6 +7594,8 @@ delete it. Omit the field to preserve.`
|
|
|
7033
7594
|
{
|
|
7034
7595
|
resource: "knowledge.vectorStores.events",
|
|
7035
7596
|
method: "list",
|
|
7597
|
+
summary: "List events",
|
|
7598
|
+
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.",
|
|
7036
7599
|
http: "GET",
|
|
7037
7600
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/events",
|
|
7038
7601
|
streaming: "no",
|
|
@@ -7061,6 +7624,8 @@ delete it. Omit the field to preserve.`
|
|
|
7061
7624
|
{
|
|
7062
7625
|
resource: "knowledge.vectorStores.fileBatches",
|
|
7063
7626
|
method: "create",
|
|
7627
|
+
summary: "Create file batch",
|
|
7628
|
+
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.",
|
|
7064
7629
|
http: "POST",
|
|
7065
7630
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/file_batches",
|
|
7066
7631
|
streaming: "no",
|
|
@@ -7080,6 +7645,8 @@ delete it. Omit the field to preserve.`
|
|
|
7080
7645
|
{
|
|
7081
7646
|
resource: "knowledge.vectorStores.fileBatches",
|
|
7082
7647
|
method: "retrieve",
|
|
7648
|
+
summary: "Retrieve file batch",
|
|
7649
|
+
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.",
|
|
7083
7650
|
http: "GET",
|
|
7084
7651
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}",
|
|
7085
7652
|
streaming: "no",
|
|
@@ -7099,6 +7666,8 @@ delete it. Omit the field to preserve.`
|
|
|
7099
7666
|
{
|
|
7100
7667
|
resource: "knowledge.vectorStores.fileBatches",
|
|
7101
7668
|
method: "cancel",
|
|
7669
|
+
summary: "Cancel file batch",
|
|
7670
|
+
description: "Cancels only in-progress batches and pending files. Completed, failed and cancelled batches return unchanged (200, idempotent).",
|
|
7102
7671
|
http: "POST",
|
|
7103
7672
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/cancel",
|
|
7104
7673
|
streaming: "no",
|
|
@@ -7118,6 +7687,8 @@ delete it. Omit the field to preserve.`
|
|
|
7118
7687
|
{
|
|
7119
7688
|
resource: "knowledge.vectorStores.fileBatches.files",
|
|
7120
7689
|
method: "list",
|
|
7690
|
+
summary: "List batch files",
|
|
7691
|
+
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.",
|
|
7121
7692
|
http: "GET",
|
|
7122
7693
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/file_batches/{batch_id}/files",
|
|
7123
7694
|
streaming: "no",
|
|
@@ -7178,6 +7749,8 @@ delete it. Omit the field to preserve.`
|
|
|
7178
7749
|
{
|
|
7179
7750
|
resource: "knowledge.vectorStores.files",
|
|
7180
7751
|
method: "list",
|
|
7752
|
+
summary: "List files",
|
|
7753
|
+
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.",
|
|
7181
7754
|
http: "GET",
|
|
7182
7755
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files",
|
|
7183
7756
|
streaming: "no",
|
|
@@ -7234,6 +7807,8 @@ delete it. Omit the field to preserve.`
|
|
|
7234
7807
|
{
|
|
7235
7808
|
resource: "knowledge.vectorStores.files",
|
|
7236
7809
|
method: "create",
|
|
7810
|
+
summary: "Add file",
|
|
7811
|
+
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.",
|
|
7237
7812
|
http: "POST",
|
|
7238
7813
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files",
|
|
7239
7814
|
streaming: "no",
|
|
@@ -7272,6 +7847,8 @@ delete it. Omit the field to preserve.`
|
|
|
7272
7847
|
{
|
|
7273
7848
|
resource: "knowledge.vectorStores.files",
|
|
7274
7849
|
method: "delete",
|
|
7850
|
+
summary: "Remove file",
|
|
7851
|
+
description: "Removes the file from search immediately; does not delete the original File.",
|
|
7275
7852
|
http: "DELETE",
|
|
7276
7853
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
7277
7854
|
streaming: "no",
|
|
@@ -7291,6 +7868,8 @@ delete it. Omit the field to preserve.`
|
|
|
7291
7868
|
{
|
|
7292
7869
|
resource: "knowledge.vectorStores.files",
|
|
7293
7870
|
method: "retrieve",
|
|
7871
|
+
summary: "Retrieve file",
|
|
7872
|
+
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.",
|
|
7294
7873
|
http: "GET",
|
|
7295
7874
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
7296
7875
|
streaming: "no",
|
|
@@ -7310,6 +7889,8 @@ delete it. Omit the field to preserve.`
|
|
|
7310
7889
|
{
|
|
7311
7890
|
resource: "knowledge.vectorStores.files",
|
|
7312
7891
|
method: "update",
|
|
7892
|
+
summary: "Update file attributes",
|
|
7893
|
+
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.',
|
|
7313
7894
|
http: "POST",
|
|
7314
7895
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}",
|
|
7315
7896
|
streaming: "no",
|
|
@@ -7340,6 +7921,8 @@ delete it. Omit the field to preserve.`
|
|
|
7340
7921
|
{
|
|
7341
7922
|
resource: "knowledge.vectorStores.files",
|
|
7342
7923
|
method: "retrieveContent",
|
|
7924
|
+
summary: "Read extracted content",
|
|
7925
|
+
description: "Extracted text chunks may overlap. Image content can be a generated description rather than verbatim OCR.",
|
|
7343
7926
|
http: "GET",
|
|
7344
7927
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/content",
|
|
7345
7928
|
streaming: "no",
|
|
@@ -7359,6 +7942,8 @@ delete it. Omit the field to preserve.`
|
|
|
7359
7942
|
{
|
|
7360
7943
|
resource: "knowledge.vectorStores.files.retry",
|
|
7361
7944
|
method: "create",
|
|
7945
|
+
summary: "Retry failed file",
|
|
7946
|
+
description: "Retries only failed files; other states return 409 FILE_INVALID_STATE. Retry after failure has not yet been observed in the documented run.",
|
|
7362
7947
|
http: "POST",
|
|
7363
7948
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/retry",
|
|
7364
7949
|
streaming: "no",
|
|
@@ -7378,6 +7963,8 @@ delete it. Omit the field to preserve.`
|
|
|
7378
7963
|
{
|
|
7379
7964
|
resource: "knowledge.vectorStores.files.segments",
|
|
7380
7965
|
method: "list",
|
|
7966
|
+
summary: "List file segments",
|
|
7967
|
+
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.",
|
|
7381
7968
|
http: "GET",
|
|
7382
7969
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/files/{file_id}/segments",
|
|
7383
7970
|
streaming: "no",
|
|
@@ -7426,6 +8013,8 @@ delete it. Omit the field to preserve.`
|
|
|
7426
8013
|
{
|
|
7427
8014
|
resource: "knowledge.vectorStores.purge",
|
|
7428
8015
|
method: "create",
|
|
8016
|
+
summary: "Permanently purge knowledge base",
|
|
8017
|
+
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.",
|
|
7429
8018
|
http: "POST",
|
|
7430
8019
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/purge",
|
|
7431
8020
|
streaming: "no",
|
|
@@ -7441,6 +8030,8 @@ delete it. Omit the field to preserve.`
|
|
|
7441
8030
|
{
|
|
7442
8031
|
resource: "knowledge.vectorStores",
|
|
7443
8032
|
method: "restore",
|
|
8033
|
+
summary: "Restore knowledge base",
|
|
8034
|
+
description: "Restores a deleting store within 7 days. Active stores return 409 VECTOR_STORE_INVALID_STATE; absent stores return 404. Empty body is allowed.",
|
|
7444
8035
|
http: "POST",
|
|
7445
8036
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/restore",
|
|
7446
8037
|
streaming: "no",
|
|
@@ -7456,6 +8047,8 @@ delete it. Omit the field to preserve.`
|
|
|
7456
8047
|
{
|
|
7457
8048
|
resource: "knowledge.vectorStores.search",
|
|
7458
8049
|
method: "create",
|
|
8050
|
+
summary: "Search knowledge base",
|
|
8051
|
+
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.',
|
|
7459
8052
|
http: "POST",
|
|
7460
8053
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/search",
|
|
7461
8054
|
streaming: "no",
|
|
@@ -7518,6 +8111,8 @@ delete it. Omit the field to preserve.`
|
|
|
7518
8111
|
{
|
|
7519
8112
|
resource: "knowledge.vectorStores.segments",
|
|
7520
8113
|
method: "retrieve",
|
|
8114
|
+
summary: "Retrieve segment",
|
|
8115
|
+
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.",
|
|
7521
8116
|
http: "GET",
|
|
7522
8117
|
path: "/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}",
|
|
7523
8118
|
streaming: "no",
|
|
@@ -7537,6 +8132,8 @@ delete it. Omit the field to preserve.`
|
|
|
7537
8132
|
{
|
|
7538
8133
|
resource: "media.libraries",
|
|
7539
8134
|
method: "list",
|
|
8135
|
+
summary: "List libraries",
|
|
8136
|
+
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.",
|
|
7540
8137
|
http: "GET",
|
|
7541
8138
|
path: "/media/v1/libraries",
|
|
7542
8139
|
streaming: "no",
|
|
@@ -7576,6 +8173,8 @@ delete it. Omit the field to preserve.`
|
|
|
7576
8173
|
{
|
|
7577
8174
|
resource: "media.libraries",
|
|
7578
8175
|
method: "create",
|
|
8176
|
+
summary: "Create library",
|
|
8177
|
+
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.",
|
|
7579
8178
|
http: "POST",
|
|
7580
8179
|
path: "/media/v1/libraries",
|
|
7581
8180
|
streaming: "no",
|
|
@@ -7615,6 +8214,8 @@ delete it. Omit the field to preserve.`
|
|
|
7615
8214
|
{
|
|
7616
8215
|
resource: "media.libraries",
|
|
7617
8216
|
method: "delete",
|
|
8217
|
+
summary: "Delete library",
|
|
8218
|
+
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.",
|
|
7618
8219
|
http: "DELETE",
|
|
7619
8220
|
path: "/media/v1/libraries/{library_id}",
|
|
7620
8221
|
streaming: "no",
|
|
@@ -7630,6 +8231,8 @@ delete it. Omit the field to preserve.`
|
|
|
7630
8231
|
{
|
|
7631
8232
|
resource: "media.libraries",
|
|
7632
8233
|
method: "retrieve",
|
|
8234
|
+
summary: "Get library",
|
|
8235
|
+
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.",
|
|
7633
8236
|
http: "GET",
|
|
7634
8237
|
path: "/media/v1/libraries/{library_id}",
|
|
7635
8238
|
streaming: "no",
|
|
@@ -7645,6 +8248,8 @@ delete it. Omit the field to preserve.`
|
|
|
7645
8248
|
{
|
|
7646
8249
|
resource: "media.libraries",
|
|
7647
8250
|
method: "update",
|
|
8251
|
+
summary: "Update library",
|
|
8252
|
+
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.",
|
|
7648
8253
|
http: "PATCH",
|
|
7649
8254
|
path: "/media/v1/libraries/{library_id}",
|
|
7650
8255
|
streaming: "no",
|
|
@@ -7689,6 +8294,8 @@ delete it. Omit the field to preserve.`
|
|
|
7689
8294
|
{
|
|
7690
8295
|
resource: "media.libraries.assets",
|
|
7691
8296
|
method: "list",
|
|
8297
|
+
summary: "List assets",
|
|
8298
|
+
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.",
|
|
7692
8299
|
http: "GET",
|
|
7693
8300
|
path: "/media/v1/libraries/{library_id}/assets",
|
|
7694
8301
|
streaming: "no",
|
|
@@ -7734,6 +8341,8 @@ delete it. Omit the field to preserve.`
|
|
|
7734
8341
|
{
|
|
7735
8342
|
resource: "media.libraries.assets",
|
|
7736
8343
|
method: "create",
|
|
8344
|
+
summary: "Upload asset",
|
|
8345
|
+
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.",
|
|
7737
8346
|
http: "POST",
|
|
7738
8347
|
path: "/media/v1/libraries/{library_id}/assets",
|
|
7739
8348
|
streaming: "no",
|
|
@@ -7845,6 +8454,8 @@ delete it. Omit the field to preserve.`
|
|
|
7845
8454
|
{
|
|
7846
8455
|
resource: "media.libraries.assets.import",
|
|
7847
8456
|
method: "create",
|
|
8457
|
+
summary: "Import file",
|
|
8458
|
+
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.",
|
|
7848
8459
|
http: "POST",
|
|
7849
8460
|
path: "/media/v1/libraries/{library_id}/assets/import",
|
|
7850
8461
|
streaming: "no",
|
|
@@ -7954,6 +8565,8 @@ delete it. Omit the field to preserve.`
|
|
|
7954
8565
|
{
|
|
7955
8566
|
resource: "media.libraries.assets",
|
|
7956
8567
|
method: "delete",
|
|
8568
|
+
summary: "Delete asset",
|
|
8569
|
+
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.",
|
|
7957
8570
|
http: "DELETE",
|
|
7958
8571
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
|
|
7959
8572
|
streaming: "no",
|
|
@@ -7973,6 +8586,8 @@ delete it. Omit the field to preserve.`
|
|
|
7973
8586
|
{
|
|
7974
8587
|
resource: "media.libraries.assets",
|
|
7975
8588
|
method: "retrieve",
|
|
8589
|
+
summary: "Get asset",
|
|
8590
|
+
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.",
|
|
7976
8591
|
http: "GET",
|
|
7977
8592
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
|
|
7978
8593
|
streaming: "no",
|
|
@@ -7992,6 +8607,8 @@ delete it. Omit the field to preserve.`
|
|
|
7992
8607
|
{
|
|
7993
8608
|
resource: "media.libraries.assets",
|
|
7994
8609
|
method: "update",
|
|
8610
|
+
summary: "Update asset",
|
|
8611
|
+
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.",
|
|
7995
8612
|
http: "PATCH",
|
|
7996
8613
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}",
|
|
7997
8614
|
streaming: "no",
|
|
@@ -8041,6 +8658,8 @@ delete it. Omit the field to preserve.`
|
|
|
8041
8658
|
{
|
|
8042
8659
|
resource: "media.libraries.assets.reprocess",
|
|
8043
8660
|
method: "create",
|
|
8661
|
+
summary: "Reprocess asset",
|
|
8662
|
+
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.",
|
|
8044
8663
|
http: "POST",
|
|
8045
8664
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/reprocess",
|
|
8046
8665
|
streaming: "no",
|
|
@@ -8078,6 +8697,8 @@ delete it. Omit the field to preserve.`
|
|
|
8078
8697
|
{
|
|
8079
8698
|
resource: "media.libraries.assets.understandings",
|
|
8080
8699
|
method: "list",
|
|
8700
|
+
summary: "List understandings",
|
|
8701
|
+
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.",
|
|
8081
8702
|
http: "GET",
|
|
8082
8703
|
path: "/media/v1/libraries/{library_id}/assets/{asset_id}/understandings",
|
|
8083
8704
|
streaming: "no",
|
|
@@ -8129,6 +8750,8 @@ delete it. Omit the field to preserve.`
|
|
|
8129
8750
|
{
|
|
8130
8751
|
resource: "media.libraries.assets",
|
|
8131
8752
|
method: "batch",
|
|
8753
|
+
summary: "Batch assets alias",
|
|
8754
|
+
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.",
|
|
8132
8755
|
http: "POST",
|
|
8133
8756
|
path: "/media/v1/libraries/{library_id}/assets:batch",
|
|
8134
8757
|
streaming: "no",
|
|
@@ -8155,6 +8778,8 @@ delete it. Omit the field to preserve.`
|
|
|
8155
8778
|
{
|
|
8156
8779
|
resource: "media.libraries.batches",
|
|
8157
8780
|
method: "create",
|
|
8781
|
+
summary: "Create batch",
|
|
8782
|
+
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.",
|
|
8158
8783
|
http: "POST",
|
|
8159
8784
|
path: "/media/v1/libraries/{library_id}/batches",
|
|
8160
8785
|
streaming: "no",
|
|
@@ -8181,6 +8806,8 @@ delete it. Omit the field to preserve.`
|
|
|
8181
8806
|
{
|
|
8182
8807
|
resource: "media.libraries.batches",
|
|
8183
8808
|
method: "retrieve",
|
|
8809
|
+
summary: "Get batch",
|
|
8810
|
+
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.",
|
|
8184
8811
|
http: "GET",
|
|
8185
8812
|
path: "/media/v1/libraries/{library_id}/batches/{job_id}",
|
|
8186
8813
|
streaming: "no",
|
|
@@ -8200,6 +8827,8 @@ delete it. Omit the field to preserve.`
|
|
|
8200
8827
|
{
|
|
8201
8828
|
resource: "media.libraries.events",
|
|
8202
8829
|
method: "list",
|
|
8830
|
+
summary: "List events",
|
|
8831
|
+
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.",
|
|
8203
8832
|
http: "GET",
|
|
8204
8833
|
path: "/media/v1/libraries/{library_id}/events",
|
|
8205
8834
|
streaming: "no",
|
|
@@ -8244,6 +8873,8 @@ delete it. Omit the field to preserve.`
|
|
|
8244
8873
|
{
|
|
8245
8874
|
resource: "media.libraries.folders",
|
|
8246
8875
|
method: "list",
|
|
8876
|
+
summary: "List folders",
|
|
8877
|
+
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.",
|
|
8247
8878
|
http: "GET",
|
|
8248
8879
|
path: "/media/v1/libraries/{library_id}/folders",
|
|
8249
8880
|
streaming: "no",
|
|
@@ -8266,6 +8897,8 @@ delete it. Omit the field to preserve.`
|
|
|
8266
8897
|
{
|
|
8267
8898
|
resource: "media.libraries.jobs",
|
|
8268
8899
|
method: "retrieve",
|
|
8900
|
+
summary: "Get job alias",
|
|
8901
|
+
description: "Alias of batch retrieval. Read the job returned by a batch request, including terminal status, successful and failed counts, and individual failure codes.",
|
|
8269
8902
|
http: "GET",
|
|
8270
8903
|
path: "/media/v1/libraries/{library_id}/jobs/{job_id}",
|
|
8271
8904
|
streaming: "no",
|
|
@@ -8285,6 +8918,8 @@ delete it. Omit the field to preserve.`
|
|
|
8285
8918
|
{
|
|
8286
8919
|
resource: "media.libraries.purge",
|
|
8287
8920
|
method: "create",
|
|
8921
|
+
summary: "Purge library",
|
|
8922
|
+
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.",
|
|
8288
8923
|
http: "POST",
|
|
8289
8924
|
path: "/media/v1/libraries/{library_id}/purge",
|
|
8290
8925
|
streaming: "no",
|
|
@@ -8300,6 +8935,8 @@ delete it. Omit the field to preserve.`
|
|
|
8300
8935
|
{
|
|
8301
8936
|
resource: "media.libraries",
|
|
8302
8937
|
method: "restore",
|
|
8938
|
+
summary: "Restore library",
|
|
8939
|
+
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.",
|
|
8303
8940
|
http: "POST",
|
|
8304
8941
|
path: "/media/v1/libraries/{library_id}/restore",
|
|
8305
8942
|
streaming: "no",
|
|
@@ -8315,6 +8952,8 @@ delete it. Omit the field to preserve.`
|
|
|
8315
8952
|
{
|
|
8316
8953
|
resource: "media.libraries.search",
|
|
8317
8954
|
method: "create",
|
|
8955
|
+
summary: "Semantic search alias",
|
|
8956
|
+
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.",
|
|
8318
8957
|
http: "POST",
|
|
8319
8958
|
path: "/media/v1/libraries/{library_id}/search",
|
|
8320
8959
|
streaming: "no",
|
|
@@ -8363,6 +9002,8 @@ delete it. Omit the field to preserve.`
|
|
|
8363
9002
|
{
|
|
8364
9003
|
resource: "media.libraries.search.expression",
|
|
8365
9004
|
method: "create",
|
|
9005
|
+
summary: "Expression search",
|
|
9006
|
+
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.",
|
|
8366
9007
|
http: "POST",
|
|
8367
9008
|
path: "/media/v1/libraries/{library_id}/search/expression",
|
|
8368
9009
|
streaming: "no",
|
|
@@ -8432,6 +9073,8 @@ delete it. Omit the field to preserve.`
|
|
|
8432
9073
|
{
|
|
8433
9074
|
resource: "media.libraries.search.semantic",
|
|
8434
9075
|
method: "create",
|
|
9076
|
+
summary: "Semantic search",
|
|
9077
|
+
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.",
|
|
8435
9078
|
http: "POST",
|
|
8436
9079
|
path: "/media/v1/libraries/{library_id}/search/semantic",
|
|
8437
9080
|
streaming: "no",
|
|
@@ -8480,6 +9123,8 @@ delete it. Omit the field to preserve.`
|
|
|
8480
9123
|
{
|
|
8481
9124
|
resource: "media.libraries.search.visual",
|
|
8482
9125
|
method: "create",
|
|
9126
|
+
summary: "Visual search",
|
|
9127
|
+
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.",
|
|
8483
9128
|
http: "POST",
|
|
8484
9129
|
path: "/media/v1/libraries/{library_id}/search/visual",
|
|
8485
9130
|
streaming: "no",
|
|
@@ -8524,6 +9169,12 @@ delete it. Omit the field to preserve.`
|
|
|
8524
9169
|
{
|
|
8525
9170
|
resource: "meta.health",
|
|
8526
9171
|
method: "retrieve",
|
|
9172
|
+
summary: "Health Check",
|
|
9173
|
+
description: `Liveness probe for the public API edge. Public, no authentication, not billed, not rate limited.
|
|
9174
|
+
Returns the plain text \`ok\` with HTTP 200 while the API worker can serve requests; any other
|
|
9175
|
+
status or a timeout means the edge itself is unavailable. It does not check individual
|
|
9176
|
+
services (model, agent, automation…); call the operation you need and read its error instead.
|
|
9177
|
+
`,
|
|
8527
9178
|
http: "GET",
|
|
8528
9179
|
path: "/meta/v1/health",
|
|
8529
9180
|
streaming: "no",
|
|
@@ -8534,6 +9185,8 @@ delete it. Omit the field to preserve.`
|
|
|
8534
9185
|
{
|
|
8535
9186
|
resource: "meta.methods",
|
|
8536
9187
|
method: "list",
|
|
9188
|
+
summary: "Search platform methods",
|
|
9189
|
+
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",
|
|
8537
9190
|
http: "GET",
|
|
8538
9191
|
path: "/meta/v1/methods",
|
|
8539
9192
|
streaming: "no",
|
|
@@ -8563,6 +9216,8 @@ delete it. Omit the field to preserve.`
|
|
|
8563
9216
|
{
|
|
8564
9217
|
resource: "meta.methods",
|
|
8565
9218
|
method: "retrieve",
|
|
9219
|
+
summary: "Retrieve a platform method",
|
|
9220
|
+
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",
|
|
8566
9221
|
http: "GET",
|
|
8567
9222
|
path: "/meta/v1/methods/{name}",
|
|
8568
9223
|
streaming: "no",
|
|
@@ -8578,6 +9233,8 @@ delete it. Omit the field to preserve.`
|
|
|
8578
9233
|
{
|
|
8579
9234
|
resource: "model.audio.speech",
|
|
8580
9235
|
method: "create",
|
|
9236
|
+
summary: "Generate speech",
|
|
9237
|
+
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"}.',
|
|
8581
9238
|
http: "POST",
|
|
8582
9239
|
path: "/model/v1/audio/speech",
|
|
8583
9240
|
streaming: "no",
|
|
@@ -8715,6 +9372,8 @@ delete it. Omit the field to preserve.`
|
|
|
8715
9372
|
{
|
|
8716
9373
|
resource: "model.audio.transcriptions",
|
|
8717
9374
|
method: "create",
|
|
9375
|
+
summary: "Transcribe audio",
|
|
9376
|
+
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.",
|
|
8718
9377
|
http: "POST",
|
|
8719
9378
|
path: "/model/v1/audio/transcriptions",
|
|
8720
9379
|
streaming: "no",
|
|
@@ -8782,6 +9441,8 @@ delete it. Omit the field to preserve.`
|
|
|
8782
9441
|
{
|
|
8783
9442
|
resource: "model.chat.completions",
|
|
8784
9443
|
method: "create",
|
|
9444
|
+
summary: "Create Chat Completion",
|
|
9445
|
+
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}.",
|
|
8785
9446
|
http: "POST",
|
|
8786
9447
|
path: "/model/v1/chat/completions",
|
|
8787
9448
|
streaming: "optional",
|
|
@@ -9182,6 +9843,8 @@ delete it. Omit the field to preserve.`
|
|
|
9182
9843
|
{
|
|
9183
9844
|
resource: "model.conversations",
|
|
9184
9845
|
method: "create",
|
|
9846
|
+
summary: "Create Conversation",
|
|
9847
|
+
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.",
|
|
9185
9848
|
http: "POST",
|
|
9186
9849
|
path: "/model/v1/conversations",
|
|
9187
9850
|
streaming: "no",
|
|
@@ -9210,6 +9873,8 @@ delete it. Omit the field to preserve.`
|
|
|
9210
9873
|
{
|
|
9211
9874
|
resource: "model.conversations",
|
|
9212
9875
|
method: "delete",
|
|
9876
|
+
summary: "Delete Conversation",
|
|
9877
|
+
description: "Delete a conversation on the model domain's own face.",
|
|
9213
9878
|
http: "DELETE",
|
|
9214
9879
|
path: "/model/v1/conversations/{conversation_id}",
|
|
9215
9880
|
streaming: "no",
|
|
@@ -9225,6 +9890,8 @@ delete it. Omit the field to preserve.`
|
|
|
9225
9890
|
{
|
|
9226
9891
|
resource: "model.conversations",
|
|
9227
9892
|
method: "retrieve",
|
|
9893
|
+
summary: "Retrieve Conversation",
|
|
9894
|
+
description: "Retrieve a conversation by id on the model domain's own face.",
|
|
9228
9895
|
http: "GET",
|
|
9229
9896
|
path: "/model/v1/conversations/{conversation_id}",
|
|
9230
9897
|
streaming: "no",
|
|
@@ -9240,6 +9907,8 @@ delete it. Omit the field to preserve.`
|
|
|
9240
9907
|
{
|
|
9241
9908
|
resource: "model.conversations",
|
|
9242
9909
|
method: "update",
|
|
9910
|
+
summary: "Update Conversation",
|
|
9911
|
+
description: "Replace a conversation's metadata on the model domain's own face.",
|
|
9243
9912
|
http: "POST",
|
|
9244
9913
|
path: "/model/v1/conversations/{conversation_id}",
|
|
9245
9914
|
streaming: "no",
|
|
@@ -9266,6 +9935,8 @@ delete it. Omit the field to preserve.`
|
|
|
9266
9935
|
{
|
|
9267
9936
|
resource: "model.conversations.items",
|
|
9268
9937
|
method: "list",
|
|
9938
|
+
summary: "List Conversation Items",
|
|
9939
|
+
description: "List a conversation's items on the model domain's own face.",
|
|
9269
9940
|
http: "GET",
|
|
9270
9941
|
path: "/model/v1/conversations/{conversation_id}/items",
|
|
9271
9942
|
streaming: "no",
|
|
@@ -9281,6 +9952,8 @@ delete it. Omit the field to preserve.`
|
|
|
9281
9952
|
{
|
|
9282
9953
|
resource: "model.conversations.items",
|
|
9283
9954
|
method: "create",
|
|
9955
|
+
summary: "Create Conversation Items",
|
|
9956
|
+
description: "Add items to a conversation on the model domain's own face.",
|
|
9284
9957
|
http: "POST",
|
|
9285
9958
|
path: "/model/v1/conversations/{conversation_id}/items",
|
|
9286
9959
|
streaming: "no",
|
|
@@ -9308,6 +9981,8 @@ delete it. Omit the field to preserve.`
|
|
|
9308
9981
|
{
|
|
9309
9982
|
resource: "model.conversations.items",
|
|
9310
9983
|
method: "delete",
|
|
9984
|
+
summary: "Delete Conversation Item",
|
|
9985
|
+
description: "Delete a single conversation item on the model domain's own face.",
|
|
9311
9986
|
http: "DELETE",
|
|
9312
9987
|
path: "/model/v1/conversations/{conversation_id}/items/{item_id}",
|
|
9313
9988
|
streaming: "no",
|
|
@@ -9327,6 +10002,8 @@ delete it. Omit the field to preserve.`
|
|
|
9327
10002
|
{
|
|
9328
10003
|
resource: "model.conversations.items",
|
|
9329
10004
|
method: "retrieve",
|
|
10005
|
+
summary: "Retrieve Conversation Item",
|
|
10006
|
+
description: "Retrieve a single conversation item on the model domain's own face.",
|
|
9330
10007
|
http: "GET",
|
|
9331
10008
|
path: "/model/v1/conversations/{conversation_id}/items/{item_id}",
|
|
9332
10009
|
streaming: "no",
|
|
@@ -9346,6 +10023,8 @@ delete it. Omit the field to preserve.`
|
|
|
9346
10023
|
{
|
|
9347
10024
|
resource: "model.embeddings",
|
|
9348
10025
|
method: "create",
|
|
10026
|
+
summary: "Create Embedding",
|
|
10027
|
+
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.",
|
|
9349
10028
|
http: "POST",
|
|
9350
10029
|
path: "/model/v1/embeddings",
|
|
9351
10030
|
streaming: "no",
|
|
@@ -9419,6 +10098,8 @@ delete it. Omit the field to preserve.`
|
|
|
9419
10098
|
{
|
|
9420
10099
|
resource: "model.generation",
|
|
9421
10100
|
method: "retrieve",
|
|
10101
|
+
summary: "Get Generation",
|
|
10102
|
+
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.",
|
|
9422
10103
|
http: "GET",
|
|
9423
10104
|
path: "/model/v1/generation",
|
|
9424
10105
|
streaming: "no",
|
|
@@ -9436,6 +10117,8 @@ delete it. Omit the field to preserve.`
|
|
|
9436
10117
|
{
|
|
9437
10118
|
resource: "model.images.edits",
|
|
9438
10119
|
method: "create",
|
|
10120
|
+
summary: "Edit Image",
|
|
10121
|
+
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.",
|
|
9439
10122
|
http: "POST",
|
|
9440
10123
|
path: "/model/v1/images/edits",
|
|
9441
10124
|
streaming: "no",
|
|
@@ -9489,6 +10172,8 @@ delete it. Omit the field to preserve.`
|
|
|
9489
10172
|
{
|
|
9490
10173
|
resource: "model.images.generations",
|
|
9491
10174
|
method: "create",
|
|
10175
|
+
summary: "Create Image",
|
|
10176
|
+
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.",
|
|
9492
10177
|
http: "POST",
|
|
9493
10178
|
path: "/model/v1/images/generations",
|
|
9494
10179
|
streaming: "no",
|
|
@@ -9567,6 +10252,8 @@ delete it. Omit the field to preserve.`
|
|
|
9567
10252
|
{
|
|
9568
10253
|
resource: "model.messages",
|
|
9569
10254
|
method: "create",
|
|
10255
|
+
summary: "Create Message",
|
|
10256
|
+
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.",
|
|
9570
10257
|
http: "POST",
|
|
9571
10258
|
path: "/model/v1/messages",
|
|
9572
10259
|
streaming: "optional",
|
|
@@ -9855,6 +10542,8 @@ for more details.`
|
|
|
9855
10542
|
{
|
|
9856
10543
|
resource: "model.messages",
|
|
9857
10544
|
method: "countTokens",
|
|
10545
|
+
summary: "Count Tokens",
|
|
10546
|
+
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).",
|
|
9858
10547
|
http: "POST",
|
|
9859
10548
|
path: "/model/v1/messages/count_tokens",
|
|
9860
10549
|
streaming: "no",
|
|
@@ -10013,6 +10702,8 @@ for more details.`
|
|
|
10013
10702
|
{
|
|
10014
10703
|
resource: "model.models",
|
|
10015
10704
|
method: "list",
|
|
10705
|
+
summary: "List Models",
|
|
10706
|
+
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.",
|
|
10016
10707
|
http: "GET",
|
|
10017
10708
|
path: "/model/v1/models",
|
|
10018
10709
|
streaming: "no",
|
|
@@ -10081,6 +10772,8 @@ for more details.`
|
|
|
10081
10772
|
{
|
|
10082
10773
|
resource: "model.models",
|
|
10083
10774
|
method: "retrieve",
|
|
10775
|
+
summary: "Retrieve Model",
|
|
10776
|
+
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.",
|
|
10084
10777
|
http: "GET",
|
|
10085
10778
|
path: "/model/v1/models/{model}",
|
|
10086
10779
|
streaming: "no",
|
|
@@ -10096,6 +10789,8 @@ for more details.`
|
|
|
10096
10789
|
{
|
|
10097
10790
|
resource: "model.ocr",
|
|
10098
10791
|
method: "create",
|
|
10792
|
+
summary: "Extract document text",
|
|
10793
|
+
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.",
|
|
10099
10794
|
http: "POST",
|
|
10100
10795
|
path: "/model/v1/ocr",
|
|
10101
10796
|
streaming: "no",
|
|
@@ -10204,6 +10899,8 @@ for more details.`
|
|
|
10204
10899
|
{
|
|
10205
10900
|
resource: "model.rerank",
|
|
10206
10901
|
method: "create",
|
|
10902
|
+
summary: "Rerank documents",
|
|
10903
|
+
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.",
|
|
10207
10904
|
http: "POST",
|
|
10208
10905
|
path: "/model/v1/rerank",
|
|
10209
10906
|
streaming: "no",
|
|
@@ -10275,6 +10972,8 @@ for more details.`
|
|
|
10275
10972
|
{
|
|
10276
10973
|
resource: "model.responses",
|
|
10277
10974
|
method: "create",
|
|
10975
|
+
summary: "Create Response",
|
|
10976
|
+
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.",
|
|
10278
10977
|
http: "POST",
|
|
10279
10978
|
path: "/model/v1/responses",
|
|
10280
10979
|
streaming: "optional",
|
|
@@ -10500,6 +11199,8 @@ for more details.`
|
|
|
10500
11199
|
{
|
|
10501
11200
|
resource: "model.responses",
|
|
10502
11201
|
method: "compact",
|
|
11202
|
+
summary: "Compact Response",
|
|
11203
|
+
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.",
|
|
10503
11204
|
http: "POST",
|
|
10504
11205
|
path: "/model/v1/responses/compact",
|
|
10505
11206
|
streaming: "no",
|
|
@@ -10514,6 +11215,8 @@ for more details.`
|
|
|
10514
11215
|
{
|
|
10515
11216
|
resource: "model.responses.inputTokens",
|
|
10516
11217
|
method: "create",
|
|
11218
|
+
summary: "Count Response Input Tokens",
|
|
11219
|
+
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.",
|
|
10517
11220
|
http: "POST",
|
|
10518
11221
|
path: "/model/v1/responses/input_tokens",
|
|
10519
11222
|
streaming: "no",
|
|
@@ -10528,6 +11231,8 @@ for more details.`
|
|
|
10528
11231
|
{
|
|
10529
11232
|
resource: "model.responses",
|
|
10530
11233
|
method: "delete",
|
|
11234
|
+
summary: "Delete Response",
|
|
11235
|
+
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.",
|
|
10531
11236
|
http: "DELETE",
|
|
10532
11237
|
path: "/model/v1/responses/{response_id}",
|
|
10533
11238
|
streaming: "no",
|
|
@@ -10543,6 +11248,8 @@ for more details.`
|
|
|
10543
11248
|
{
|
|
10544
11249
|
resource: "model.responses",
|
|
10545
11250
|
method: "retrieve",
|
|
11251
|
+
summary: "Retrieve Response",
|
|
11252
|
+
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.",
|
|
10546
11253
|
http: "GET",
|
|
10547
11254
|
path: "/model/v1/responses/{response_id}",
|
|
10548
11255
|
streaming: "no",
|
|
@@ -10558,6 +11265,8 @@ for more details.`
|
|
|
10558
11265
|
{
|
|
10559
11266
|
resource: "model.responses",
|
|
10560
11267
|
method: "cancel",
|
|
11268
|
+
summary: "Cancel Response",
|
|
11269
|
+
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.",
|
|
10561
11270
|
http: "POST",
|
|
10562
11271
|
path: "/model/v1/responses/{response_id}/cancel",
|
|
10563
11272
|
streaming: "no",
|
|
@@ -10573,6 +11282,8 @@ for more details.`
|
|
|
10573
11282
|
{
|
|
10574
11283
|
resource: "model.responses.inputItems",
|
|
10575
11284
|
method: "list",
|
|
11285
|
+
summary: "List Response Input Items",
|
|
11286
|
+
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.",
|
|
10576
11287
|
http: "GET",
|
|
10577
11288
|
path: "/model/v1/responses/{response_id}/input_items",
|
|
10578
11289
|
streaming: "no",
|
|
@@ -10588,6 +11299,8 @@ for more details.`
|
|
|
10588
11299
|
{
|
|
10589
11300
|
resource: "model.videos",
|
|
10590
11301
|
method: "list",
|
|
11302
|
+
summary: "List videos",
|
|
11303
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
10591
11304
|
http: "GET",
|
|
10592
11305
|
path: "/model/v1/videos",
|
|
10593
11306
|
streaming: "no",
|
|
@@ -10621,6 +11334,8 @@ for more details.`
|
|
|
10621
11334
|
{
|
|
10622
11335
|
resource: "model.videos",
|
|
10623
11336
|
method: "create",
|
|
11337
|
+
summary: "Create video",
|
|
11338
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
10624
11339
|
http: "POST",
|
|
10625
11340
|
path: "/model/v1/videos",
|
|
10626
11341
|
streaming: "no",
|
|
@@ -10723,6 +11438,8 @@ for more details.`
|
|
|
10723
11438
|
{
|
|
10724
11439
|
resource: "model.videos",
|
|
10725
11440
|
method: "delete",
|
|
11441
|
+
summary: "Delete video",
|
|
11442
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
10726
11443
|
http: "DELETE",
|
|
10727
11444
|
path: "/model/v1/videos/{video_id}",
|
|
10728
11445
|
streaming: "no",
|
|
@@ -10738,6 +11455,8 @@ for more details.`
|
|
|
10738
11455
|
{
|
|
10739
11456
|
resource: "model.videos",
|
|
10740
11457
|
method: "retrieve",
|
|
11458
|
+
summary: "Retrieve video",
|
|
11459
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
10741
11460
|
http: "GET",
|
|
10742
11461
|
path: "/model/v1/videos/{video_id}",
|
|
10743
11462
|
streaming: "no",
|
|
@@ -10753,6 +11472,8 @@ for more details.`
|
|
|
10753
11472
|
{
|
|
10754
11473
|
resource: "model.videos",
|
|
10755
11474
|
method: "retrieveContent",
|
|
11475
|
+
summary: "Download video",
|
|
11476
|
+
description: "OpenAI video API with OpenRouter request and response extensions.",
|
|
10756
11477
|
http: "GET",
|
|
10757
11478
|
path: "/model/v1/videos/{video_id}/content",
|
|
10758
11479
|
streaming: "no",
|
|
@@ -10786,6 +11507,8 @@ for more details.`
|
|
|
10786
11507
|
{
|
|
10787
11508
|
resource: "model.videos",
|
|
10788
11509
|
method: "remix",
|
|
11510
|
+
summary: "Remix video",
|
|
11511
|
+
description: "Not supported in this release; always returns 400.",
|
|
10789
11512
|
http: "POST",
|
|
10790
11513
|
path: "/model/v1/videos/{video_id}/remix",
|
|
10791
11514
|
streaming: "no",
|
|
@@ -10801,6 +11524,9 @@ for more details.`
|
|
|
10801
11524
|
{
|
|
10802
11525
|
resource: "organization.charges",
|
|
10803
11526
|
method: "list",
|
|
11527
|
+
summary: "Export Organization Charges",
|
|
11528
|
+
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.
|
|
11529
|
+
`,
|
|
10804
11530
|
http: "GET",
|
|
10805
11531
|
path: "/organization/v1/charges",
|
|
10806
11532
|
streaming: "no",
|
|
@@ -10824,6 +11550,9 @@ for more details.`
|
|
|
10824
11550
|
{
|
|
10825
11551
|
resource: "organization.costs",
|
|
10826
11552
|
method: "list",
|
|
11553
|
+
summary: "List Organization Costs",
|
|
11554
|
+
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.
|
|
11555
|
+
`,
|
|
10827
11556
|
http: "GET",
|
|
10828
11557
|
path: "/organization/v1/costs",
|
|
10829
11558
|
streaming: "no",
|
|
@@ -10884,6 +11613,9 @@ for more details.`
|
|
|
10884
11613
|
{
|
|
10885
11614
|
resource: "organization.events",
|
|
10886
11615
|
method: "list",
|
|
11616
|
+
summary: "List Organization Usage Events",
|
|
11617
|
+
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.
|
|
11618
|
+
`,
|
|
10887
11619
|
http: "GET",
|
|
10888
11620
|
path: "/organization/v1/events",
|
|
10889
11621
|
streaming: "no",
|
|
@@ -10919,6 +11651,9 @@ for more details.`
|
|
|
10919
11651
|
{
|
|
10920
11652
|
resource: "organization.events",
|
|
10921
11653
|
method: "retrieve",
|
|
11654
|
+
summary: "Get One Organization Usage Event",
|
|
11655
|
+
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.
|
|
11656
|
+
`,
|
|
10922
11657
|
http: "GET",
|
|
10923
11658
|
path: "/organization/v1/events/{id}",
|
|
10924
11659
|
streaming: "no",
|
|
@@ -10934,6 +11669,8 @@ for more details.`
|
|
|
10934
11669
|
{
|
|
10935
11670
|
resource: "organization.feedback",
|
|
10936
11671
|
method: "create",
|
|
11672
|
+
summary: "Report a problem with the Praxis platform",
|
|
11673
|
+
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."}.`,
|
|
10937
11674
|
http: "POST",
|
|
10938
11675
|
path: "/organization/v1/feedback",
|
|
10939
11676
|
streaming: "no",
|
|
@@ -11008,6 +11745,9 @@ for more details.`
|
|
|
11008
11745
|
{
|
|
11009
11746
|
resource: "organization.usage",
|
|
11010
11747
|
method: "list",
|
|
11748
|
+
summary: "List Organization Usage",
|
|
11749
|
+
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.
|
|
11750
|
+
`,
|
|
11011
11751
|
http: "GET",
|
|
11012
11752
|
path: "/organization/v1/usage",
|
|
11013
11753
|
streaming: "no",
|
|
@@ -11068,6 +11808,8 @@ for more details.`
|
|
|
11068
11808
|
{
|
|
11069
11809
|
resource: "sandbox.sandboxes",
|
|
11070
11810
|
method: "list",
|
|
11811
|
+
summary: "List sandboxes (v2)",
|
|
11812
|
+
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.",
|
|
11071
11813
|
http: "GET",
|
|
11072
11814
|
path: "/sandbox/v1/sandboxes",
|
|
11073
11815
|
streaming: "no",
|
|
@@ -11136,6 +11878,8 @@ for more details.`
|
|
|
11136
11878
|
{
|
|
11137
11879
|
resource: "sandbox.sandboxes",
|
|
11138
11880
|
method: "create",
|
|
11881
|
+
summary: "Create sandbox (v2)",
|
|
11882
|
+
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.",
|
|
11139
11883
|
http: "POST",
|
|
11140
11884
|
path: "/sandbox/v1/sandboxes",
|
|
11141
11885
|
streaming: "no",
|
|
@@ -11224,6 +11968,8 @@ for more details.`
|
|
|
11224
11968
|
{
|
|
11225
11969
|
resource: "sandbox.sandboxes",
|
|
11226
11970
|
method: "delete",
|
|
11971
|
+
summary: "Kill sandbox",
|
|
11972
|
+
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.",
|
|
11227
11973
|
http: "DELETE",
|
|
11228
11974
|
path: "/sandbox/v1/sandboxes/{sandboxID}",
|
|
11229
11975
|
streaming: "no",
|
|
@@ -11239,6 +11985,8 @@ for more details.`
|
|
|
11239
11985
|
{
|
|
11240
11986
|
resource: "sandbox.sandboxes",
|
|
11241
11987
|
method: "retrieve",
|
|
11988
|
+
summary: "Sandbox",
|
|
11989
|
+
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.",
|
|
11242
11990
|
http: "GET",
|
|
11243
11991
|
path: "/sandbox/v1/sandboxes/{sandboxID}",
|
|
11244
11992
|
streaming: "no",
|
|
@@ -11254,6 +12002,8 @@ for more details.`
|
|
|
11254
12002
|
{
|
|
11255
12003
|
resource: "sandbox.sandboxes",
|
|
11256
12004
|
method: "update",
|
|
12005
|
+
summary: "Rename a sandbox",
|
|
12006
|
+
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.",
|
|
11257
12007
|
http: "PATCH",
|
|
11258
12008
|
path: "/sandbox/v1/sandboxes/{sandboxID}",
|
|
11259
12009
|
streaming: "no",
|
|
@@ -11280,6 +12030,8 @@ for more details.`
|
|
|
11280
12030
|
{
|
|
11281
12031
|
resource: "sandbox.sandboxes",
|
|
11282
12032
|
method: "connect",
|
|
12033
|
+
summary: "Connect sandbox (v2)",
|
|
12034
|
+
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.",
|
|
11283
12035
|
http: "POST",
|
|
11284
12036
|
path: "/sandbox/v1/sandboxes/{sandboxID}/connect",
|
|
11285
12037
|
streaming: "no",
|
|
@@ -11312,6 +12064,8 @@ for more details.`
|
|
|
11312
12064
|
{
|
|
11313
12065
|
resource: "sandbox.sandboxes",
|
|
11314
12066
|
method: "extend",
|
|
12067
|
+
summary: "Extend a running sandbox without shortening its deadline",
|
|
12068
|
+
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.",
|
|
11315
12069
|
http: "POST",
|
|
11316
12070
|
path: "/sandbox/v1/sandboxes/{sandboxID}/extend",
|
|
11317
12071
|
streaming: "no",
|
|
@@ -11343,6 +12097,8 @@ for more details.`
|
|
|
11343
12097
|
{
|
|
11344
12098
|
resource: "sandbox.sandboxes",
|
|
11345
12099
|
method: "fork",
|
|
12100
|
+
summary: "Fork sandbox",
|
|
12101
|
+
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.",
|
|
11346
12102
|
http: "POST",
|
|
11347
12103
|
path: "/sandbox/v1/sandboxes/{sandboxID}/fork",
|
|
11348
12104
|
streaming: "no",
|
|
@@ -11375,6 +12131,8 @@ for more details.`
|
|
|
11375
12131
|
{
|
|
11376
12132
|
resource: "sandbox.sandboxes.logs",
|
|
11377
12133
|
method: "list",
|
|
12134
|
+
summary: "Sandbox logs (v2)",
|
|
12135
|
+
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.",
|
|
11378
12136
|
http: "GET",
|
|
11379
12137
|
path: "/sandbox/v1/sandboxes/{sandboxID}/logs",
|
|
11380
12138
|
streaming: "no",
|
|
@@ -11431,6 +12189,8 @@ for more details.`
|
|
|
11431
12189
|
{
|
|
11432
12190
|
resource: "sandbox.sandboxes.metrics",
|
|
11433
12191
|
method: "list",
|
|
12192
|
+
summary: "Sandbox metrics",
|
|
12193
|
+
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.",
|
|
11434
12194
|
http: "GET",
|
|
11435
12195
|
path: "/sandbox/v1/sandboxes/{sandboxID}/metrics",
|
|
11436
12196
|
streaming: "no",
|
|
@@ -11459,6 +12219,8 @@ for more details.`
|
|
|
11459
12219
|
{
|
|
11460
12220
|
resource: "sandbox.sandboxes",
|
|
11461
12221
|
method: "updateNetwork",
|
|
12222
|
+
summary: "Update sandbox network",
|
|
12223
|
+
description: "Update the network configuration for a running sandbox. Replaces the current egress rules with the provided configuration. Omitting field clears it.",
|
|
11462
12224
|
http: "PUT",
|
|
11463
12225
|
path: "/sandbox/v1/sandboxes/{sandboxID}/network",
|
|
11464
12226
|
streaming: "no",
|
|
@@ -11512,6 +12274,8 @@ for more details.`
|
|
|
11512
12274
|
{
|
|
11513
12275
|
resource: "sandbox.sandboxes",
|
|
11514
12276
|
method: "pause",
|
|
12277
|
+
summary: "Pause sandbox",
|
|
12278
|
+
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.",
|
|
11515
12279
|
http: "POST",
|
|
11516
12280
|
path: "/sandbox/v1/sandboxes/{sandboxID}/pause",
|
|
11517
12281
|
streaming: "no",
|
|
@@ -11538,6 +12302,8 @@ for more details.`
|
|
|
11538
12302
|
{
|
|
11539
12303
|
resource: "sandbox.sandboxes.processes",
|
|
11540
12304
|
method: "list",
|
|
12305
|
+
summary: "List live processes and retained observations",
|
|
12306
|
+
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.",
|
|
11541
12307
|
http: "GET",
|
|
11542
12308
|
path: "/sandbox/v1/sandboxes/{sandboxID}/processes",
|
|
11543
12309
|
streaming: "no",
|
|
@@ -11565,6 +12331,8 @@ for more details.`
|
|
|
11565
12331
|
{
|
|
11566
12332
|
resource: "sandbox.sandboxes.processes",
|
|
11567
12333
|
method: "retrieveOutput",
|
|
12334
|
+
summary: "Read bounded observed process output",
|
|
12335
|
+
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.",
|
|
11568
12336
|
http: "GET",
|
|
11569
12337
|
path: "/sandbox/v1/sandboxes/{sandboxID}/processes/{processID}/output",
|
|
11570
12338
|
streaming: "no",
|
|
@@ -11584,6 +12352,8 @@ for more details.`
|
|
|
11584
12352
|
{
|
|
11585
12353
|
resource: "sandbox.sandboxes.snapshots",
|
|
11586
12354
|
method: "create",
|
|
12355
|
+
summary: "Create snapshot",
|
|
12356
|
+
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.",
|
|
11587
12357
|
http: "POST",
|
|
11588
12358
|
path: "/sandbox/v1/sandboxes/{sandboxID}/snapshots",
|
|
11589
12359
|
streaming: "no",
|
|
@@ -11610,6 +12380,8 @@ for more details.`
|
|
|
11610
12380
|
{
|
|
11611
12381
|
resource: "sandbox.sandboxes",
|
|
11612
12382
|
method: "timeout",
|
|
12383
|
+
summary: "Set sandbox timeout",
|
|
12384
|
+
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.",
|
|
11613
12385
|
http: "POST",
|
|
11614
12386
|
path: "/sandbox/v1/sandboxes/{sandboxID}/timeout",
|
|
11615
12387
|
streaming: "no",
|
|
@@ -11636,6 +12408,8 @@ for more details.`
|
|
|
11636
12408
|
{
|
|
11637
12409
|
resource: "sandbox.sandboxes.upgrade",
|
|
11638
12410
|
method: "create",
|
|
12411
|
+
summary: "Upgrade to a full sandbox",
|
|
12412
|
+
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.",
|
|
11639
12413
|
http: "POST",
|
|
11640
12414
|
path: "/sandbox/v1/sandboxes/{sandboxID}/upgrade",
|
|
11641
12415
|
streaming: "no",
|
|
@@ -11662,6 +12436,8 @@ for more details.`
|
|
|
11662
12436
|
{
|
|
11663
12437
|
resource: "sandbox.sandboxes.commands",
|
|
11664
12438
|
method: "run",
|
|
12439
|
+
summary: "Run a command in the sandbox",
|
|
12440
|
+
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"}.',
|
|
11665
12441
|
http: "POST",
|
|
11666
12442
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/commands",
|
|
11667
12443
|
streaming: "no",
|
|
@@ -11706,6 +12482,8 @@ for more details.`
|
|
|
11706
12482
|
{
|
|
11707
12483
|
resource: "sandbox.sandboxes.files",
|
|
11708
12484
|
method: "remove",
|
|
12485
|
+
summary: "Remove a file or directory in the sandbox",
|
|
12486
|
+
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.",
|
|
11709
12487
|
http: "DELETE",
|
|
11710
12488
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files",
|
|
11711
12489
|
streaming: "no",
|
|
@@ -11728,6 +12506,8 @@ for more details.`
|
|
|
11728
12506
|
{
|
|
11729
12507
|
resource: "sandbox.sandboxes.files",
|
|
11730
12508
|
method: "read",
|
|
12509
|
+
summary: "Read a file in the sandbox",
|
|
12510
|
+
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.",
|
|
11731
12511
|
http: "GET",
|
|
11732
12512
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files",
|
|
11733
12513
|
streaming: "no",
|
|
@@ -11750,6 +12530,8 @@ for more details.`
|
|
|
11750
12530
|
{
|
|
11751
12531
|
resource: "sandbox.sandboxes.files",
|
|
11752
12532
|
method: "write",
|
|
12533
|
+
summary: "Write a file in the sandbox",
|
|
12534
|
+
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"}.',
|
|
11753
12535
|
http: "PUT",
|
|
11754
12536
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files",
|
|
11755
12537
|
streaming: "no",
|
|
@@ -11782,6 +12564,8 @@ for more details.`
|
|
|
11782
12564
|
{
|
|
11783
12565
|
resource: "sandbox.sandboxes.files",
|
|
11784
12566
|
method: "list",
|
|
12567
|
+
summary: "List files in a sandbox directory",
|
|
12568
|
+
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.",
|
|
11785
12569
|
http: "GET",
|
|
11786
12570
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files:list",
|
|
11787
12571
|
streaming: "no",
|
|
@@ -11804,6 +12588,8 @@ for more details.`
|
|
|
11804
12588
|
{
|
|
11805
12589
|
resource: "sandbox.sandboxes.files",
|
|
11806
12590
|
method: "makeDir",
|
|
12591
|
+
summary: "Create a directory in the sandbox",
|
|
12592
|
+
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.",
|
|
11807
12593
|
http: "POST",
|
|
11808
12594
|
path: "/sandbox/v1/sandboxes/{sandbox_id}/files:makeDir",
|
|
11809
12595
|
streaming: "no",
|
|
@@ -11826,6 +12612,8 @@ for more details.`
|
|
|
11826
12612
|
{
|
|
11827
12613
|
resource: "sandbox.snapshots",
|
|
11828
12614
|
method: "list",
|
|
12615
|
+
summary: "List snapshots",
|
|
12616
|
+
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.",
|
|
11829
12617
|
http: "GET",
|
|
11830
12618
|
path: "/sandbox/v1/snapshots",
|
|
11831
12619
|
streaming: "no",
|
|
@@ -11861,6 +12649,8 @@ for more details.`
|
|
|
11861
12649
|
{
|
|
11862
12650
|
resource: "sandbox.snapshots",
|
|
11863
12651
|
method: "delete",
|
|
12652
|
+
summary: "Delete template",
|
|
12653
|
+
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.",
|
|
11864
12654
|
http: "DELETE",
|
|
11865
12655
|
path: "/sandbox/v1/snapshots/{snapshotID}",
|
|
11866
12656
|
streaming: "no",
|
|
@@ -11876,6 +12666,8 @@ for more details.`
|
|
|
11876
12666
|
{
|
|
11877
12667
|
resource: "sandbox.templates",
|
|
11878
12668
|
method: "list",
|
|
12669
|
+
summary: "List templates (v2)",
|
|
12670
|
+
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.",
|
|
11879
12671
|
http: "GET",
|
|
11880
12672
|
path: "/sandbox/v1/templates",
|
|
11881
12673
|
streaming: "no",
|
|
@@ -11905,6 +12697,8 @@ for more details.`
|
|
|
11905
12697
|
{
|
|
11906
12698
|
resource: "sandbox.volumes",
|
|
11907
12699
|
method: "list",
|
|
12700
|
+
summary: "List team volumes",
|
|
12701
|
+
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.",
|
|
11908
12702
|
http: "GET",
|
|
11909
12703
|
path: "/sandbox/v1/volumes",
|
|
11910
12704
|
streaming: "no",
|
|
@@ -11915,6 +12709,8 @@ for more details.`
|
|
|
11915
12709
|
{
|
|
11916
12710
|
resource: "sandbox.volumes",
|
|
11917
12711
|
method: "create",
|
|
12712
|
+
summary: "Create team volume",
|
|
12713
|
+
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.",
|
|
11918
12714
|
http: "POST",
|
|
11919
12715
|
path: "/sandbox/v1/volumes",
|
|
11920
12716
|
streaming: "no",
|
|
@@ -11936,6 +12732,8 @@ for more details.`
|
|
|
11936
12732
|
{
|
|
11937
12733
|
resource: "sandbox.volumes",
|
|
11938
12734
|
method: "delete",
|
|
12735
|
+
summary: "Delete team volume",
|
|
12736
|
+
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.",
|
|
11939
12737
|
http: "DELETE",
|
|
11940
12738
|
path: "/sandbox/v1/volumes/{volumeID}",
|
|
11941
12739
|
streaming: "no",
|
|
@@ -11951,6 +12749,8 @@ for more details.`
|
|
|
11951
12749
|
{
|
|
11952
12750
|
resource: "sandbox.volumes",
|
|
11953
12751
|
method: "retrieve",
|
|
12752
|
+
summary: "Team volume",
|
|
12753
|
+
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.",
|
|
11954
12754
|
http: "GET",
|
|
11955
12755
|
path: "/sandbox/v1/volumes/{volumeID}",
|
|
11956
12756
|
streaming: "no",
|
|
@@ -11966,6 +12766,8 @@ for more details.`
|
|
|
11966
12766
|
{
|
|
11967
12767
|
resource: "search.crawl",
|
|
11968
12768
|
method: "create",
|
|
12769
|
+
summary: "Initiate a web crawl from a base URL",
|
|
12770
|
+
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.",
|
|
11969
12771
|
http: "POST",
|
|
11970
12772
|
path: "/search/v1/crawl",
|
|
11971
12773
|
streaming: "no",
|
|
@@ -12095,6 +12897,8 @@ for more details.`
|
|
|
12095
12897
|
{
|
|
12096
12898
|
resource: "search.extract",
|
|
12097
12899
|
method: "create",
|
|
12900
|
+
summary: "Retrieve raw web content from specified URLs",
|
|
12901
|
+
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.",
|
|
12098
12902
|
http: "POST",
|
|
12099
12903
|
path: "/search/v1/extract",
|
|
12100
12904
|
streaming: "no",
|
|
@@ -12172,6 +12976,8 @@ for more details.`
|
|
|
12172
12976
|
{
|
|
12173
12977
|
resource: "search.map",
|
|
12174
12978
|
method: "create",
|
|
12979
|
+
summary: "Initiate a web mapping from a base URL",
|
|
12980
|
+
description: "Tavily Map traverses websites like a graph and can explore hundreds of paths in parallel with intelligent discovery to generate comprehensive site maps.",
|
|
12175
12981
|
http: "POST",
|
|
12176
12982
|
path: "/search/v1/map",
|
|
12177
12983
|
streaming: "no",
|
|
@@ -12263,6 +13069,8 @@ for more details.`
|
|
|
12263
13069
|
{
|
|
12264
13070
|
resource: "search.search",
|
|
12265
13071
|
method: "create",
|
|
13072
|
+
summary: "Search for data based on a query",
|
|
13073
|
+
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.",
|
|
12266
13074
|
http: "POST",
|
|
12267
13075
|
path: "/search/v1/search",
|
|
12268
13076
|
streaming: "no",
|
|
@@ -12623,6 +13431,8 @@ for more details.`
|
|
|
12623
13431
|
{
|
|
12624
13432
|
resource: "vault.authorizations",
|
|
12625
13433
|
method: "create",
|
|
13434
|
+
summary: "Create authorization",
|
|
13435
|
+
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.",
|
|
12626
13436
|
http: "POST",
|
|
12627
13437
|
path: "/vault/v1/authorizations",
|
|
12628
13438
|
streaming: "no",
|
|
@@ -12666,6 +13476,8 @@ for more details.`
|
|
|
12666
13476
|
{
|
|
12667
13477
|
resource: "vault.authorizations",
|
|
12668
13478
|
method: "retrieveCallback",
|
|
13479
|
+
summary: "Authorization callback",
|
|
13480
|
+
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.",
|
|
12669
13481
|
http: "GET",
|
|
12670
13482
|
path: "/vault/v1/authorizations/callback",
|
|
12671
13483
|
streaming: "no",
|
|
@@ -12676,6 +13488,8 @@ for more details.`
|
|
|
12676
13488
|
{
|
|
12677
13489
|
resource: "vault.authorizations",
|
|
12678
13490
|
method: "retrieve",
|
|
13491
|
+
summary: "Get authorization",
|
|
13492
|
+
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.",
|
|
12679
13493
|
http: "GET",
|
|
12680
13494
|
path: "/vault/v1/authorizations/{authorization_id}",
|
|
12681
13495
|
streaming: "no",
|
|
@@ -12691,6 +13505,8 @@ for more details.`
|
|
|
12691
13505
|
{
|
|
12692
13506
|
resource: "vault.connect",
|
|
12693
13507
|
method: "retrieve",
|
|
13508
|
+
summary: "Connect page",
|
|
13509
|
+
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.",
|
|
12694
13510
|
http: "GET",
|
|
12695
13511
|
path: "/vault/v1/connect/{token}",
|
|
12696
13512
|
streaming: "no",
|
|
@@ -12706,6 +13522,8 @@ for more details.`
|
|
|
12706
13522
|
{
|
|
12707
13523
|
resource: "vault.connect.continue",
|
|
12708
13524
|
method: "create",
|
|
13525
|
+
summary: "Continue authorization",
|
|
13526
|
+
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.",
|
|
12709
13527
|
http: "POST",
|
|
12710
13528
|
path: "/vault/v1/connect/{token}/continue",
|
|
12711
13529
|
streaming: "no",
|
|
@@ -12721,6 +13539,8 @@ for more details.`
|
|
|
12721
13539
|
{
|
|
12722
13540
|
resource: "vault.connect.deny",
|
|
12723
13541
|
method: "create",
|
|
13542
|
+
summary: "Deny authorization",
|
|
13543
|
+
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.",
|
|
12724
13544
|
http: "POST",
|
|
12725
13545
|
path: "/vault/v1/connect/{token}/deny",
|
|
12726
13546
|
streaming: "no",
|
|
@@ -12736,6 +13556,8 @@ for more details.`
|
|
|
12736
13556
|
{
|
|
12737
13557
|
resource: "vault.oauth",
|
|
12738
13558
|
method: "retrieveClientMetadata",
|
|
13559
|
+
summary: "OAuth client metadata",
|
|
13560
|
+
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.",
|
|
12739
13561
|
http: "GET",
|
|
12740
13562
|
path: "/vault/v1/oauth/client.json",
|
|
12741
13563
|
streaming: "no",
|
|
@@ -12746,6 +13568,8 @@ for more details.`
|
|
|
12746
13568
|
{
|
|
12747
13569
|
resource: "vault.settings.returnUrls",
|
|
12748
13570
|
method: "list",
|
|
13571
|
+
summary: "Get return URLs",
|
|
13572
|
+
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.",
|
|
12749
13573
|
http: "GET",
|
|
12750
13574
|
path: "/vault/v1/settings/return_urls",
|
|
12751
13575
|
streaming: "no",
|
|
@@ -12756,6 +13580,8 @@ for more details.`
|
|
|
12756
13580
|
{
|
|
12757
13581
|
resource: "vault.settings.returnUrls",
|
|
12758
13582
|
method: "update",
|
|
13583
|
+
summary: "Set return URLs",
|
|
13584
|
+
description: "Replace your account's complete allowlist of OAuth return URLs. Entries are deduplicated after validation; an empty array clears the allowlist.",
|
|
12759
13585
|
http: "PUT",
|
|
12760
13586
|
path: "/vault/v1/settings/return_urls",
|
|
12761
13587
|
streaming: "no",
|
|
@@ -12778,6 +13604,8 @@ for more details.`
|
|
|
12778
13604
|
{
|
|
12779
13605
|
resource: "vault.templates",
|
|
12780
13606
|
method: "list",
|
|
13607
|
+
summary: "List templates",
|
|
13608
|
+
description: "List templates for manually supplied static secrets and OAuth authorizations. Templates provide suggested names and allowed hosts; they are not stored secrets.",
|
|
12781
13609
|
http: "GET",
|
|
12782
13610
|
path: "/vault/v1/templates",
|
|
12783
13611
|
streaming: "no",
|
|
@@ -12788,6 +13616,8 @@ for more details.`
|
|
|
12788
13616
|
{
|
|
12789
13617
|
resource: "vault.vaults",
|
|
12790
13618
|
method: "list",
|
|
13619
|
+
summary: "List vaults",
|
|
13620
|
+
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.",
|
|
12791
13621
|
http: "GET",
|
|
12792
13622
|
path: "/vault/v1/vaults",
|
|
12793
13623
|
streaming: "no",
|
|
@@ -12817,6 +13647,8 @@ for more details.`
|
|
|
12817
13647
|
{
|
|
12818
13648
|
resource: "vault.vaults",
|
|
12819
13649
|
method: "create",
|
|
13650
|
+
summary: "Create vault",
|
|
13651
|
+
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.",
|
|
12820
13652
|
http: "POST",
|
|
12821
13653
|
path: "/vault/v1/vaults",
|
|
12822
13654
|
streaming: "no",
|
|
@@ -12844,6 +13676,8 @@ for more details.`
|
|
|
12844
13676
|
{
|
|
12845
13677
|
resource: "vault.vaults",
|
|
12846
13678
|
method: "delete",
|
|
13679
|
+
summary: "Delete vault",
|
|
13680
|
+
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.",
|
|
12847
13681
|
http: "DELETE",
|
|
12848
13682
|
path: "/vault/v1/vaults/{vault_id}",
|
|
12849
13683
|
streaming: "no",
|
|
@@ -12859,6 +13693,8 @@ for more details.`
|
|
|
12859
13693
|
{
|
|
12860
13694
|
resource: "vault.vaults",
|
|
12861
13695
|
method: "retrieve",
|
|
13696
|
+
summary: "Get vault",
|
|
13697
|
+
description: "Retrieve a vault belonging to your account, including archived vaults and secret counts. Missing or other accounts' vaults return VAULT_NOT_FOUND.",
|
|
12862
13698
|
http: "GET",
|
|
12863
13699
|
path: "/vault/v1/vaults/{vault_id}",
|
|
12864
13700
|
streaming: "no",
|
|
@@ -12874,6 +13710,8 @@ for more details.`
|
|
|
12874
13710
|
{
|
|
12875
13711
|
resource: "vault.vaults",
|
|
12876
13712
|
method: "update",
|
|
13713
|
+
summary: "Update vault",
|
|
13714
|
+
description: "Update an active vault's display name or patch its metadata. Omitted fields are preserved; archived vaults cannot be updated.",
|
|
12877
13715
|
http: "POST",
|
|
12878
13716
|
path: "/vault/v1/vaults/{vault_id}",
|
|
12879
13717
|
streaming: "no",
|
|
@@ -12906,6 +13744,8 @@ for more details.`
|
|
|
12906
13744
|
{
|
|
12907
13745
|
resource: "vault.vaults",
|
|
12908
13746
|
method: "archive",
|
|
13747
|
+
summary: "Archive vault",
|
|
13748
|
+
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.",
|
|
12909
13749
|
http: "POST",
|
|
12910
13750
|
path: "/vault/v1/vaults/{vault_id}/archive",
|
|
12911
13751
|
streaming: "no",
|
|
@@ -12921,6 +13761,8 @@ for more details.`
|
|
|
12921
13761
|
{
|
|
12922
13762
|
resource: "vault.vaults.events",
|
|
12923
13763
|
method: "list",
|
|
13764
|
+
summary: "List events",
|
|
13765
|
+
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.",
|
|
12924
13766
|
http: "GET",
|
|
12925
13767
|
path: "/vault/v1/vaults/{vault_id}/events",
|
|
12926
13768
|
streaming: "no",
|
|
@@ -12955,6 +13797,8 @@ for more details.`
|
|
|
12955
13797
|
{
|
|
12956
13798
|
resource: "vault.vaults.secrets",
|
|
12957
13799
|
method: "list",
|
|
13800
|
+
summary: "List secrets",
|
|
13801
|
+
description: "List secret metadata in a vault, newest first, without returning values. Archived secrets are excluded unless include_archived is true.",
|
|
12958
13802
|
http: "GET",
|
|
12959
13803
|
path: "/vault/v1/vaults/{vault_id}/secrets",
|
|
12960
13804
|
streaming: "no",
|
|
@@ -12989,6 +13833,8 @@ for more details.`
|
|
|
12989
13833
|
{
|
|
12990
13834
|
resource: "vault.vaults.secrets",
|
|
12991
13835
|
method: "create",
|
|
13836
|
+
summary: "Create secret",
|
|
13837
|
+
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.",
|
|
12992
13838
|
http: "POST",
|
|
12993
13839
|
path: "/vault/v1/vaults/{vault_id}/secrets",
|
|
12994
13840
|
streaming: "no",
|
|
@@ -13061,6 +13907,8 @@ for more details.`
|
|
|
13061
13907
|
{
|
|
13062
13908
|
resource: "vault.vaults.secrets",
|
|
13063
13909
|
method: "delete",
|
|
13910
|
+
summary: "Delete secret",
|
|
13911
|
+
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.",
|
|
13064
13912
|
http: "DELETE",
|
|
13065
13913
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}",
|
|
13066
13914
|
streaming: "no",
|
|
@@ -13080,6 +13928,8 @@ for more details.`
|
|
|
13080
13928
|
{
|
|
13081
13929
|
resource: "vault.vaults.secrets",
|
|
13082
13930
|
method: "retrieve",
|
|
13931
|
+
summary: "Get secret",
|
|
13932
|
+
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.",
|
|
13083
13933
|
http: "GET",
|
|
13084
13934
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}",
|
|
13085
13935
|
streaming: "no",
|
|
@@ -13099,6 +13949,8 @@ for more details.`
|
|
|
13099
13949
|
{
|
|
13100
13950
|
resource: "vault.vaults.secrets",
|
|
13101
13951
|
method: "update",
|
|
13952
|
+
summary: "Update secret",
|
|
13953
|
+
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.",
|
|
13102
13954
|
http: "POST",
|
|
13103
13955
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}",
|
|
13104
13956
|
streaming: "no",
|
|
@@ -13148,6 +14000,8 @@ for more details.`
|
|
|
13148
14000
|
{
|
|
13149
14001
|
resource: "vault.vaults.secrets",
|
|
13150
14002
|
method: "archive",
|
|
14003
|
+
summary: "Archive secret",
|
|
14004
|
+
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.",
|
|
13151
14005
|
http: "POST",
|
|
13152
14006
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}/archive",
|
|
13153
14007
|
streaming: "no",
|
|
@@ -13167,6 +14021,8 @@ for more details.`
|
|
|
13167
14021
|
{
|
|
13168
14022
|
resource: "vault.vaults.secrets.refresh",
|
|
13169
14023
|
method: "create",
|
|
14024
|
+
summary: "Refresh secret",
|
|
14025
|
+
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.",
|
|
13170
14026
|
http: "POST",
|
|
13171
14027
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}/refresh",
|
|
13172
14028
|
streaming: "no",
|
|
@@ -13200,6 +14056,8 @@ for more details.`
|
|
|
13200
14056
|
{
|
|
13201
14057
|
resource: "vault.vaults.secrets.validate",
|
|
13202
14058
|
method: "create",
|
|
14059
|
+
summary: "Validate secret",
|
|
14060
|
+
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.",
|
|
13203
14061
|
http: "POST",
|
|
13204
14062
|
path: "/vault/v1/vaults/{vault_id}/secrets/{secret}/validate",
|
|
13205
14063
|
streaming: "no",
|
|
@@ -13219,6 +14077,8 @@ for more details.`
|
|
|
13219
14077
|
{
|
|
13220
14078
|
resource: "vault.vaults.secrets",
|
|
13221
14079
|
method: "import",
|
|
14080
|
+
summary: "Import secrets",
|
|
14081
|
+
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.",
|
|
13222
14082
|
http: "POST",
|
|
13223
14083
|
path: "/vault/v1/vaults/{vault_id}/secrets:import",
|
|
13224
14084
|
streaming: "no",
|
|
@@ -13259,6 +14119,8 @@ for more details.`
|
|
|
13259
14119
|
{
|
|
13260
14120
|
resource: "vault.vaults",
|
|
13261
14121
|
method: "check",
|
|
14122
|
+
summary: "Check vaults",
|
|
14123
|
+
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.",
|
|
13262
14124
|
http: "POST",
|
|
13263
14125
|
path: "/vault/v1/vaults:check",
|
|
13264
14126
|
streaming: "no",
|
|
@@ -14102,6 +14964,49 @@ var createClient = (config = {}) => {
|
|
|
14102
14964
|
var client = createClient(createConfig({ baseUrl: "https://api.deepraxis.com" }));
|
|
14103
14965
|
|
|
14104
14966
|
// ../../packages/sdk/typescript/src/generated/sdk.gen.ts
|
|
14967
|
+
var deleteRunFeedback = (options) => (options.client ?? client).delete({
|
|
14968
|
+
security: [{
|
|
14969
|
+
key: "BearerAuth",
|
|
14970
|
+
scheme: "bearer",
|
|
14971
|
+
type: "http"
|
|
14972
|
+
}, {
|
|
14973
|
+
key: "ApiKeyAuth",
|
|
14974
|
+
name: "X-API-Key",
|
|
14975
|
+
type: "apiKey"
|
|
14976
|
+
}],
|
|
14977
|
+
url: "/agent/v1/sessions/{session_id}/runs/{run_id}/feedback",
|
|
14978
|
+
...options
|
|
14979
|
+
});
|
|
14980
|
+
var setRunFeedback = (options) => (options.client ?? client).post({
|
|
14981
|
+
security: [{
|
|
14982
|
+
key: "BearerAuth",
|
|
14983
|
+
scheme: "bearer",
|
|
14984
|
+
type: "http"
|
|
14985
|
+
}, {
|
|
14986
|
+
key: "ApiKeyAuth",
|
|
14987
|
+
name: "X-API-Key",
|
|
14988
|
+
type: "apiKey"
|
|
14989
|
+
}],
|
|
14990
|
+
url: "/agent/v1/sessions/{session_id}/runs/{run_id}/feedback",
|
|
14991
|
+
...options,
|
|
14992
|
+
headers: {
|
|
14993
|
+
"Content-Type": "application/json",
|
|
14994
|
+
...options.headers
|
|
14995
|
+
}
|
|
14996
|
+
});
|
|
14997
|
+
var listEmbedTokens = (options) => (options?.client ?? client).get({
|
|
14998
|
+
security: [{
|
|
14999
|
+
key: "BearerAuth",
|
|
15000
|
+
scheme: "bearer",
|
|
15001
|
+
type: "http"
|
|
15002
|
+
}, {
|
|
15003
|
+
key: "ApiKeyAuth",
|
|
15004
|
+
name: "X-API-Key",
|
|
15005
|
+
type: "apiKey"
|
|
15006
|
+
}],
|
|
15007
|
+
url: "/agent/v1/embed_tokens",
|
|
15008
|
+
...options
|
|
15009
|
+
});
|
|
14105
15010
|
var createEmbedToken = (options) => (options.client ?? client).post({
|
|
14106
15011
|
security: [{
|
|
14107
15012
|
key: "BearerAuth",
|
|
@@ -14119,6 +15024,19 @@ var createEmbedToken = (options) => (options.client ?? client).post({
|
|
|
14119
15024
|
...options.headers
|
|
14120
15025
|
}
|
|
14121
15026
|
});
|
|
15027
|
+
var revokeEmbedToken = (options) => (options.client ?? client).post({
|
|
15028
|
+
security: [{
|
|
15029
|
+
key: "BearerAuth",
|
|
15030
|
+
scheme: "bearer",
|
|
15031
|
+
type: "http"
|
|
15032
|
+
}, {
|
|
15033
|
+
key: "ApiKeyAuth",
|
|
15034
|
+
name: "X-API-Key",
|
|
15035
|
+
type: "apiKey"
|
|
15036
|
+
}],
|
|
15037
|
+
url: "/agent/v1/embed_tokens/{id}/revoke",
|
|
15038
|
+
...options
|
|
15039
|
+
});
|
|
14122
15040
|
var computersList = (options) => (options?.client ?? client).get({
|
|
14123
15041
|
security: [{
|
|
14124
15042
|
key: "BearerAuth",
|
|
@@ -18936,7 +19854,11 @@ function createAgent(transport) {
|
|
|
18936
19854
|
update: bind(transport, deploymentsUpdate)
|
|
18937
19855
|
},
|
|
18938
19856
|
embedTokens: {
|
|
18939
|
-
create: bind(transport, createEmbedToken)
|
|
19857
|
+
create: bind(transport, createEmbedToken),
|
|
19858
|
+
list: bind(transport, listEmbedTokens),
|
|
19859
|
+
revoke: {
|
|
19860
|
+
create: bind(transport, revokeEmbedToken)
|
|
19861
|
+
}
|
|
18940
19862
|
},
|
|
18941
19863
|
environments: {
|
|
18942
19864
|
archive: bind(transport, environmentsArchive),
|
|
@@ -18973,6 +19895,12 @@ function createAgent(transport) {
|
|
|
18973
19895
|
retrieve: bind(transport, sessionsRetrieve),
|
|
18974
19896
|
retrieveCompact: bind(transport, getSessionCompaction),
|
|
18975
19897
|
retrieveContext: bind(transport, getSessionContext),
|
|
19898
|
+
runs: {
|
|
19899
|
+
deleteFeedback: bind(transport, deleteRunFeedback),
|
|
19900
|
+
feedback: {
|
|
19901
|
+
create: bind(transport, setRunFeedback)
|
|
19902
|
+
}
|
|
19903
|
+
},
|
|
18976
19904
|
threads: {
|
|
18977
19905
|
archive: bind(transport, aliasOperation(sessionsThreadsArchive, { query: { session_id: "query_session_id" } })),
|
|
18978
19906
|
events: {
|
|
@@ -20175,7 +21103,7 @@ function commandTree(operations2) {
|
|
|
20175
21103
|
const key = words.join(" ");
|
|
20176
21104
|
if (seen.has(key))
|
|
20177
21105
|
throw new Error(`Command collision: ${key}; add a reasoned command-overrides.ts entry`);
|
|
20178
|
-
if (["login", "logout", "whoami", "org", "api"].includes(words[0]))
|
|
21106
|
+
if (["login", "logout", "whoami", "org", "api", "skill"].includes(words[0]))
|
|
20179
21107
|
throw new Error(`Reserved command: ${key}`);
|
|
20180
21108
|
seen.add(key);
|
|
20181
21109
|
commands.push({ words, op, ...method !== op.method ? { alias: method } : {} });
|
|
@@ -20337,7 +21265,12 @@ function convert(value, spec) {
|
|
|
20337
21265
|
return result;
|
|
20338
21266
|
}
|
|
20339
21267
|
function globalsOf(parsed) {
|
|
20340
|
-
|
|
21268
|
+
const flags = Object.fromEntries(globalOptions.filter((s) => parsed.flags[s.name]).map((s) => [s.name, convert(parsed.flags[s.name][0], s)]));
|
|
21269
|
+
if (flags.all && flags.limit !== undefined)
|
|
21270
|
+
throw new UsageError("--all and --limit cannot be used together");
|
|
21271
|
+
if (typeof flags.limit === "number" && flags.limit < 0)
|
|
21272
|
+
throw new UsageError("--limit must be non-negative");
|
|
21273
|
+
return flags;
|
|
20341
21274
|
}
|
|
20342
21275
|
async function readData(value, ports) {
|
|
20343
21276
|
if (value === undefined)
|
|
@@ -20391,7 +21324,9 @@ function bindArgs(parsed, op, data) {
|
|
|
20391
21324
|
(opts[spec.location] ??= {})[spec.sdkName] = value;
|
|
20392
21325
|
}
|
|
20393
21326
|
for (const name of ["limit", "cursor"]) {
|
|
20394
|
-
|
|
21327
|
+
if (name === "limit" && !op.pagination)
|
|
21328
|
+
continue;
|
|
21329
|
+
const field = op.query.find((f) => name === "limit" ? /^(limit|page_size|pageSize)$/.test(f.name) : f.name === name);
|
|
20395
21330
|
if (globals[name] !== undefined && field) {
|
|
20396
21331
|
const key = field.sdkName ?? field.name;
|
|
20397
21332
|
(opts.query ??= {})[key] ??= convert(String(globals[name]), { name, type: field.type, enum: field.enum });
|
|
@@ -20463,7 +21398,7 @@ function help(commands, prefix, command) {
|
|
|
20463
21398
|
const matching = commands.filter((c) => prefix.every((w, i) => c.words[i] === w));
|
|
20464
21399
|
const children = [...new Set(matching.map((c) => c.words[prefix.length]).filter(Boolean))].sort();
|
|
20465
21400
|
if (!prefix.length)
|
|
20466
|
-
children.unshift("login", "logout", "whoami", "org", "api");
|
|
21401
|
+
children.unshift("login", "logout", "whoami", "org", "api", "skill");
|
|
20467
21402
|
return [
|
|
20468
21403
|
`praxis${prefix.length ? " " + prefix.join(" ") : ""} <command> [options]`,
|
|
20469
21404
|
"",
|
|
@@ -20504,6 +21439,82 @@ function environment(vars = process.env) {
|
|
|
20504
21439
|
import { chmodSync, closeSync, existsSync, mkdirSync, openSync, readFileSync, rmSync, statSync, writeFileSync } from "node:fs";
|
|
20505
21440
|
import { homedir } from "node:os";
|
|
20506
21441
|
import { join } from "node:path";
|
|
21442
|
+
|
|
21443
|
+
// src/auth/secret-store.ts
|
|
21444
|
+
import { spawn } from "node:child_process";
|
|
21445
|
+
var runSecretCommand = (file, args, input) => new Promise((resolve) => {
|
|
21446
|
+
const child = spawn(file, [...args], { stdio: ["pipe", "pipe", "pipe"], timeout: 1e4 });
|
|
21447
|
+
const chunks = [];
|
|
21448
|
+
child.stdout.on("data", (chunk) => chunks.push(Buffer.from(chunk)));
|
|
21449
|
+
child.stderr.resume();
|
|
21450
|
+
child.stdin.on("error", () => {});
|
|
21451
|
+
child.once("error", (error) => resolve({ code: null, stdout: "", missing: error.code === "ENOENT" }));
|
|
21452
|
+
child.once("close", (code) => resolve({ code, stdout: Buffer.concat(chunks).toString("utf8") }));
|
|
21453
|
+
child.stdin.end(input);
|
|
21454
|
+
});
|
|
21455
|
+
var unavailable = () => new Error("System keychain unavailable");
|
|
21456
|
+
var unavailableSecretStore = {
|
|
21457
|
+
async get() {
|
|
21458
|
+
throw unavailable();
|
|
21459
|
+
},
|
|
21460
|
+
async set() {
|
|
21461
|
+
throw unavailable();
|
|
21462
|
+
},
|
|
21463
|
+
async delete() {
|
|
21464
|
+
return false;
|
|
21465
|
+
}
|
|
21466
|
+
};
|
|
21467
|
+
function selectSecretStore(env, injected) {
|
|
21468
|
+
return injected ?? (env.PRAXIS_CREDENTIAL_STORE === "file" ? unavailableSecretStore : undefined);
|
|
21469
|
+
}
|
|
21470
|
+
function systemSecretStore(options = {}) {
|
|
21471
|
+
const platform = options.platform ?? process.platform;
|
|
21472
|
+
const run = options.run ?? runSecretCommand;
|
|
21473
|
+
const service = options.service ?? "praxis-cli";
|
|
21474
|
+
if (!["darwin", "linux"].includes(platform))
|
|
21475
|
+
return unavailableSecretStore;
|
|
21476
|
+
const validate = (key) => {
|
|
21477
|
+
if (!/^[a-zA-Z0-9_-]+$/.test(service) || !/^[a-zA-Z0-9_-]+$/.test(key))
|
|
21478
|
+
throw unavailable();
|
|
21479
|
+
};
|
|
21480
|
+
return {
|
|
21481
|
+
async get(key) {
|
|
21482
|
+
validate(key);
|
|
21483
|
+
const result = platform === "darwin" ? await run("security", ["find-generic-password", "-s", service, "-a", key, "-w"]) : await run("secret-tool", ["lookup", "service", service, "account", key]);
|
|
21484
|
+
if (result.code === 0)
|
|
21485
|
+
return result.stdout.replace(/\r?\n$/, "");
|
|
21486
|
+
if (result.code === (platform === "darwin" ? 44 : 1))
|
|
21487
|
+
return null;
|
|
21488
|
+
throw unavailable();
|
|
21489
|
+
},
|
|
21490
|
+
async set(key, value) {
|
|
21491
|
+
validate(key);
|
|
21492
|
+
let result;
|
|
21493
|
+
if (platform === "darwin") {
|
|
21494
|
+
const input = `add-generic-password -U -s ${service} -a ${key} -X ${Buffer.from(value, "utf8").toString("hex")}
|
|
21495
|
+
`;
|
|
21496
|
+
if (Buffer.byteLength(input) >= 4096)
|
|
21497
|
+
throw unavailable();
|
|
21498
|
+
result = await run("security", ["-i"], input);
|
|
21499
|
+
} else {
|
|
21500
|
+
result = await run("secret-tool", ["store", `--label=${service}`, "service", service, "account", key], value);
|
|
21501
|
+
}
|
|
21502
|
+
if (result.code !== 0)
|
|
21503
|
+
throw unavailable();
|
|
21504
|
+
},
|
|
21505
|
+
async delete(key) {
|
|
21506
|
+
validate(key);
|
|
21507
|
+
const result = platform === "darwin" ? await run("security", ["delete-generic-password", "-s", service, "-a", key]) : await run("secret-tool", ["clear", "service", service, "account", key]);
|
|
21508
|
+
if (result.code === 0)
|
|
21509
|
+
return true;
|
|
21510
|
+
if (result.missing || result.code === (platform === "darwin" ? 44 : 1))
|
|
21511
|
+
return false;
|
|
21512
|
+
throw unavailable();
|
|
21513
|
+
}
|
|
21514
|
+
};
|
|
21515
|
+
}
|
|
21516
|
+
|
|
21517
|
+
// src/auth/token-store.ts
|
|
20507
21518
|
var CLIENT_ID = "praxis-cli";
|
|
20508
21519
|
var SCOPE = "openid profile email offline_access";
|
|
20509
21520
|
function tokenPath(env, home = homedir()) {
|
|
@@ -20531,6 +21542,59 @@ function deleteTokens(path) {
|
|
|
20531
21542
|
rmSync(path);
|
|
20532
21543
|
return true;
|
|
20533
21544
|
}
|
|
21545
|
+
function createTokenStore(env, path = tokenPath(env), secret = systemSecretStore()) {
|
|
21546
|
+
let location;
|
|
21547
|
+
const session = {
|
|
21548
|
+
location: () => location,
|
|
21549
|
+
async load() {
|
|
21550
|
+
const file = loadTokens(path);
|
|
21551
|
+
if (file) {
|
|
21552
|
+
await session.save(file);
|
|
21553
|
+
return file;
|
|
21554
|
+
}
|
|
21555
|
+
try {
|
|
21556
|
+
const raw = await secret.get(env);
|
|
21557
|
+
if (!raw)
|
|
21558
|
+
return null;
|
|
21559
|
+
const value = JSON.parse(raw);
|
|
21560
|
+
if (typeof value.access_token !== "string" || typeof value.expires_at !== "number")
|
|
21561
|
+
return null;
|
|
21562
|
+
location = "keychain";
|
|
21563
|
+
return value;
|
|
21564
|
+
} catch {
|
|
21565
|
+
return null;
|
|
21566
|
+
}
|
|
21567
|
+
},
|
|
21568
|
+
async save(tokens) {
|
|
21569
|
+
try {
|
|
21570
|
+
await secret.set(env, JSON.stringify(tokens));
|
|
21571
|
+
} catch {
|
|
21572
|
+
saveTokens(path, tokens);
|
|
21573
|
+
return location = `file ${path}`;
|
|
21574
|
+
}
|
|
21575
|
+
deleteTokens(path);
|
|
21576
|
+
return location = "keychain";
|
|
21577
|
+
},
|
|
21578
|
+
async delete() {
|
|
21579
|
+
let removed = false;
|
|
21580
|
+
try {
|
|
21581
|
+
removed = await secret.delete(env);
|
|
21582
|
+
} finally {
|
|
21583
|
+
removed = deleteTokens(path) || removed;
|
|
21584
|
+
location = undefined;
|
|
21585
|
+
}
|
|
21586
|
+
return removed;
|
|
21587
|
+
}
|
|
21588
|
+
};
|
|
21589
|
+
const transaction = (run) => withLock(`${path}.lock`, () => run(session));
|
|
21590
|
+
return {
|
|
21591
|
+
location: session.location,
|
|
21592
|
+
transaction,
|
|
21593
|
+
load: () => transaction((s) => s.load()),
|
|
21594
|
+
save: (tokens) => transaction((s) => s.save(tokens)),
|
|
21595
|
+
delete: () => transaction((s) => s.delete())
|
|
21596
|
+
};
|
|
21597
|
+
}
|
|
20534
21598
|
function toStored(tokens, now, previous) {
|
|
20535
21599
|
const refresh = tokens.refresh_token ?? previous?.refresh_token;
|
|
20536
21600
|
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 };
|
|
@@ -20553,13 +21617,9 @@ async function currentAccessToken(options) {
|
|
|
20553
21617
|
const now = options.now ?? Date.now;
|
|
20554
21618
|
const path = options.path ?? tokenPath(options.env);
|
|
20555
21619
|
const fresh = (t) => t !== null && t.expires_at - REFRESH_SKEW_MS > now();
|
|
20556
|
-
const
|
|
20557
|
-
|
|
20558
|
-
|
|
20559
|
-
if (fresh(stored))
|
|
20560
|
-
return stored.access_token;
|
|
20561
|
-
return withLock(`${path}.lock`, async () => {
|
|
20562
|
-
const current = loadTokens(path);
|
|
21620
|
+
const store = options.store ?? createTokenStore(options.env, path, options.secretStore);
|
|
21621
|
+
return store.transaction(async (session) => {
|
|
21622
|
+
const current = await session.load();
|
|
20563
21623
|
if (!current)
|
|
20564
21624
|
return null;
|
|
20565
21625
|
if (fresh(current))
|
|
@@ -20567,7 +21627,7 @@ async function currentAccessToken(options) {
|
|
|
20567
21627
|
const refreshed = await refreshTokens(current, options.accountUrl, options.fetch, now());
|
|
20568
21628
|
if (!refreshed)
|
|
20569
21629
|
return null;
|
|
20570
|
-
|
|
21630
|
+
await session.save(refreshed);
|
|
20571
21631
|
return refreshed.access_token;
|
|
20572
21632
|
});
|
|
20573
21633
|
}
|
|
@@ -20629,6 +21689,7 @@ function jwtFetch(fetchImpl, token) {
|
|
|
20629
21689
|
}
|
|
20630
21690
|
function credentials(config, vars, ports) {
|
|
20631
21691
|
const path = ports.path ?? tokenPath(config.env);
|
|
21692
|
+
const store = ports.store ?? createTokenStore(config.env, path, ports.secretStore);
|
|
20632
21693
|
const apiKey = vars.PRAXIS_API_KEY;
|
|
20633
21694
|
const remember = ports.remember ?? (() => {});
|
|
20634
21695
|
if (apiKey)
|
|
@@ -20641,13 +21702,13 @@ function credentials(config, vars, ports) {
|
|
|
20641
21702
|
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.");
|
|
20642
21703
|
};
|
|
20643
21704
|
async function exchange(organizationId) {
|
|
20644
|
-
const stored =
|
|
21705
|
+
const stored = await store.load();
|
|
20645
21706
|
if (stored) {
|
|
20646
21707
|
remember(stored.access_token);
|
|
20647
21708
|
if (stored.refresh_token)
|
|
20648
21709
|
remember(stored.refresh_token);
|
|
20649
21710
|
}
|
|
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" }) });
|
|
21711
|
+
const opaque = await currentAccessToken({ env: config.env, accountUrl: config.accountUrl, path, store, now: ports.now, fetch: (url, init) => ports.fetch(url, { ...init, signal: AbortSignal.timeout(1e4), redirect: "error" }) });
|
|
20651
21712
|
if (!opaque)
|
|
20652
21713
|
throw new PraxisError({ code: "NOT_LOGGED_IN", message: "Not logged in or login has expired." });
|
|
20653
21714
|
remember(opaque);
|
|
@@ -20655,7 +21716,7 @@ function credentials(config, vars, ports) {
|
|
|
20655
21716
|
if (!result.access_token || !Number.isFinite(result.claims?.exp) || result.claims.exp * 1000 <= ports.now())
|
|
20656
21717
|
throw new PraxisError({ code: "INVALID_RESPONSE", message: "Invalid OAuth exchange response" });
|
|
20657
21718
|
remember(result.access_token);
|
|
20658
|
-
return { source: "login", token: result.access_token, expiresAt: result.claims.exp * 1000, organizationId: result.claims.org ?? organizationId };
|
|
21719
|
+
return { source: "login", storedIn: store.location(), token: result.access_token, expiresAt: result.claims.exp * 1000, organizationId: result.claims.org ?? organizationId };
|
|
20659
21720
|
}
|
|
20660
21721
|
async function get(org) {
|
|
20661
21722
|
if (apiKey) {
|
|
@@ -20663,7 +21724,7 @@ function credentials(config, vars, ports) {
|
|
|
20663
21724
|
throw new UsageError("--org cannot override an API Key organization", "Remove --org or unset PRAXIS_API_KEY and run `praxis login`.");
|
|
20664
21725
|
return { source: "api-key", token: apiKey };
|
|
20665
21726
|
}
|
|
20666
|
-
const stored =
|
|
21727
|
+
const stored = await store.load();
|
|
20667
21728
|
const selected = org ?? stored?.organization_id;
|
|
20668
21729
|
const opaqueFresh = stored !== null && stored.expires_at - 30000 > ports.now();
|
|
20669
21730
|
if (opaqueFresh && cached && cachedOrg === selected && cached.expiresAt - 30000 > ports.now())
|
|
@@ -20695,11 +21756,11 @@ function credentials(config, vars, ports) {
|
|
|
20695
21756
|
async switchOrganization(organizationId) {
|
|
20696
21757
|
requireLogin();
|
|
20697
21758
|
const credential = await exchange(organizationId);
|
|
20698
|
-
await
|
|
20699
|
-
const stored =
|
|
21759
|
+
await store.transaction(async (session) => {
|
|
21760
|
+
const stored = await session.load();
|
|
20700
21761
|
if (!stored)
|
|
20701
21762
|
throw new PraxisError({ code: "NOT_LOGGED_IN", message: "Logged out." });
|
|
20702
|
-
|
|
21763
|
+
await session.save({ ...stored, organization_id: organizationId });
|
|
20703
21764
|
});
|
|
20704
21765
|
cached = credential;
|
|
20705
21766
|
cachedOrg = organizationId;
|
|
@@ -20708,6 +21769,97 @@ function credentials(config, vars, ports) {
|
|
|
20708
21769
|
};
|
|
20709
21770
|
}
|
|
20710
21771
|
|
|
21772
|
+
// src/commands/skill.ts
|
|
21773
|
+
import { mkdir, readFile, writeFile } from "node:fs/promises";
|
|
21774
|
+
import { join as join2 } from "node:path";
|
|
21775
|
+
function commandSummary(command) {
|
|
21776
|
+
if (command.op.summary?.trim())
|
|
21777
|
+
return command.op.summary.replace(/[\r\n]+/g, " ");
|
|
21778
|
+
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();
|
|
21779
|
+
if (description) {
|
|
21780
|
+
const chars = [...description];
|
|
21781
|
+
return chars.length > 120 ? chars.slice(0, 119).join("") + "…" : description;
|
|
21782
|
+
}
|
|
21783
|
+
const words = [...command.words];
|
|
21784
|
+
const verb = (words.pop() ?? "use").replace(/-/g, " ");
|
|
21785
|
+
if (verb === "list" && words.length && !words.at(-1).endsWith("s"))
|
|
21786
|
+
words[words.length - 1] += "s";
|
|
21787
|
+
return `${verb[0].toUpperCase()}${verb.slice(1)} ${words.join(" ")}`.trim();
|
|
21788
|
+
}
|
|
21789
|
+
function skillDocument(commands) {
|
|
21790
|
+
const lines = [
|
|
21791
|
+
"---",
|
|
21792
|
+
"name: praxis-cli",
|
|
21793
|
+
"description: Use the Praxis CLI to discover and call Deepraxis API operations, manage login, and inspect resources from an AI agent.",
|
|
21794
|
+
"---",
|
|
21795
|
+
"",
|
|
21796
|
+
"# Praxis CLI",
|
|
21797
|
+
"",
|
|
21798
|
+
"## General rules",
|
|
21799
|
+
"",
|
|
21800
|
+
"- Select the environment only with `PRAXIS_ENV`; there is no `--env` option. The dev package defaults to develop.",
|
|
21801
|
+
"- Authenticate with `PRAXIS_API_KEY` or `praxis login`. API keys determine the organization; login sessions can use `--org <organization_id>`.",
|
|
21802
|
+
"- AI mode is enabled automatically in supported agent environments. Use `--format agent` to select it explicitly.",
|
|
21803
|
+
"- Use `--json` for the complete JSON response without presentation truncation. Successful JSON output goes to stdout; errors go to stderr.",
|
|
21804
|
+
"- Supply bodies with `--data JSON`, `--data @file.json`, or `--data -` for stdin. Scalar field options override matching JSON fields. Structured fields require `--data`.",
|
|
21805
|
+
"- Deletion requires `--yes` in AI mode. Confirm the intended resource before using it.",
|
|
21806
|
+
"- 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`.",
|
|
21807
|
+
"- 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.",
|
|
21808
|
+
"- Append `--help` to a command for its optional parameters. Required scalar body options below can also be supplied as fields in `--data`.",
|
|
21809
|
+
"",
|
|
21810
|
+
"## Account and CLI",
|
|
21811
|
+
"",
|
|
21812
|
+
"praxis login — Sign in with a browser device code.",
|
|
21813
|
+
"praxis logout — Remove the saved login from the keychain and fallback file.",
|
|
21814
|
+
"praxis whoami — Show the signed-in identity and credential storage location.",
|
|
21815
|
+
"praxis org list — List organizations available to the login.",
|
|
21816
|
+
"praxis org switch <organization_id> — Switch the login organization.",
|
|
21817
|
+
"praxis api <METHOD> <path> — Call an API path directly. (--data for a request body)",
|
|
21818
|
+
"praxis skill — Print this skill; use --install <dir> to write <dir>/praxis-cli/SKILL.md."
|
|
21819
|
+
];
|
|
21820
|
+
let domain;
|
|
21821
|
+
for (const command of commands) {
|
|
21822
|
+
if (command.words[0] !== domain) {
|
|
21823
|
+
domain = command.words[0];
|
|
21824
|
+
lines.push("", `## ${domain}`, "");
|
|
21825
|
+
}
|
|
21826
|
+
const target = targetParam(command.op);
|
|
21827
|
+
const options = operationOptions(command.op);
|
|
21828
|
+
const required = options.filter((option) => option.required).map((option) => `--${option.name} <${option.type}>`);
|
|
21829
|
+
const structured = command.op.body?.fields.filter((field) => field.required && !options.some((option) => option.location === "body" && option.field === field)) ?? [];
|
|
21830
|
+
if (structured.length)
|
|
21831
|
+
required.push(`--data <JSON with ${structured.map((field) => field.sdkName ?? field.name).join(", ")}>`);
|
|
21832
|
+
else if (command.op.body?.required && !options.some((option) => option.location === "body" && option.required))
|
|
21833
|
+
required.push("--data <JSON>");
|
|
21834
|
+
lines.push(`praxis ${command.words.join(" ")}${target ? ` <${target.sdkName}>` : ""} — ${commandSummary(command)}${required.length ? ` (${required.join(" ")})` : ""}`);
|
|
21835
|
+
}
|
|
21836
|
+
return lines.join(`
|
|
21837
|
+
`) + `
|
|
21838
|
+
`;
|
|
21839
|
+
}
|
|
21840
|
+
async function installSkill(dir, document) {
|
|
21841
|
+
const path = join2(dir, "praxis-cli", "SKILL.md");
|
|
21842
|
+
let overwritten = false;
|
|
21843
|
+
try {
|
|
21844
|
+
await readFile(path);
|
|
21845
|
+
overwritten = true;
|
|
21846
|
+
} catch (error) {
|
|
21847
|
+
if (error.code !== "ENOENT")
|
|
21848
|
+
throw error;
|
|
21849
|
+
}
|
|
21850
|
+
await mkdir(join2(dir, "praxis-cli"), { recursive: true });
|
|
21851
|
+
await writeFile(path, document, "utf8");
|
|
21852
|
+
return { path, overwritten };
|
|
21853
|
+
}
|
|
21854
|
+
|
|
21855
|
+
// src/output/limit.ts
|
|
21856
|
+
function clientList(items, op, limit, mode) {
|
|
21857
|
+
if (mode !== "json" && !op.pagination && limit !== undefined && items.length > limit) {
|
|
21858
|
+
return { items: items.slice(0, limit), total: items.length };
|
|
21859
|
+
}
|
|
21860
|
+
return { items };
|
|
21861
|
+
}
|
|
21862
|
+
|
|
20711
21863
|
// src/auth/device-flow.ts
|
|
20712
21864
|
var MIN_INTERVAL_MS = 1000;
|
|
20713
21865
|
var SLOW_DOWN_STEP_MS = 5000;
|
|
@@ -20784,7 +21936,9 @@ Enter code: ${code.user_code}` });
|
|
|
20784
21936
|
ports.remember(flow.tokens.access_token);
|
|
20785
21937
|
if (flow.tokens.refresh_token)
|
|
20786
21938
|
ports.remember(flow.tokens.refresh_token);
|
|
20787
|
-
|
|
21939
|
+
const location = await (ports.store ?? createTokenStore(config.env, path)).save(toStored(flow.tokens, ports.now()));
|
|
21940
|
+
if (location !== "keychain")
|
|
21941
|
+
ports.emit({ kind: "message", channel: "stderr", text: "stored in a file (no system keychain available)" });
|
|
20788
21942
|
ports.emit({ kind: "message", text: `Logged in (${config.env}).` });
|
|
20789
21943
|
}
|
|
20790
21944
|
async function whoami(auth, env, org) {
|
|
@@ -20795,6 +21949,7 @@ async function whoami(auth, env, org) {
|
|
|
20795
21949
|
organization: me.active_organization_id ?? credential.organizationId ?? null,
|
|
20796
21950
|
env,
|
|
20797
21951
|
source: credential.source,
|
|
21952
|
+
...credential.storedIn ? { "stored in": credential.storedIn } : {},
|
|
20798
21953
|
expires_at: credential.expiresAt ? new Date(credential.expiresAt).toISOString() : null,
|
|
20799
21954
|
...credential.source === "api-key" ? { note: "The API key determines the organization." } : {}
|
|
20800
21955
|
};
|
|
@@ -21130,7 +22285,7 @@ function renderHuman(result, ctx) {
|
|
|
21130
22285
|
return {
|
|
21131
22286
|
stdout: result.items.length ? table(result.items, ctx, out) : out.dim(`No ${plain(resource)}${/(s|x|ch|sh)$/.test(resource) ? "es" : "s"}.`) + `
|
|
21132
22287
|
`,
|
|
21133
|
-
stderr: err.dim(`${count(result.items.length, "item")}${result.nextCursor ? ` · next: ${ctx.nextCommand ?? "praxis --help"}` : ""}`) + `
|
|
22288
|
+
stderr: err.dim(`${result.total !== undefined ? `${result.items.length} of ${result.total} items` : count(result.items.length, "item")}${result.nextCursor ? ` · next: ${ctx.nextCommand ?? "praxis --help"}` : ""}`) + `
|
|
21134
22289
|
`
|
|
21135
22290
|
};
|
|
21136
22291
|
case "object": {
|
|
@@ -21202,7 +22357,7 @@ ${usage ? `usage: ${JSON.stringify(usage)}
|
|
|
21202
22357
|
case "list": {
|
|
21203
22358
|
const columns = columnsFor(result.items);
|
|
21204
22359
|
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("|") + "|")] : [];
|
|
21205
|
-
lines.push(`${result.items.length} rows; ${result.nextCursor ? `more: \`${ctx.nextCommand ?? "praxis --help"}\`` : "end"}`);
|
|
22360
|
+
lines.push(result.total !== undefined ? `${result.items.length} of ${result.total} rows; more: \`${ctx.moreCommand ?? "praxis --help"}\`` : `${result.items.length} rows; ${result.nextCursor ? `more: \`${ctx.nextCommand ?? "praxis --help"}\`` : "end"}`);
|
|
21206
22361
|
return { stdout: lines.join(`
|
|
21207
22362
|
`) + `
|
|
21208
22363
|
` };
|
|
@@ -21230,7 +22385,7 @@ function render(result, ctx) {
|
|
|
21230
22385
|
else if (result.kind === "stream-event" && result.done)
|
|
21231
22386
|
output = {};
|
|
21232
22387
|
else {
|
|
21233
|
-
const data = result.kind === "object" ? result.data : result.kind === "stream-event" ? result.event : { data: result.items, ...result.nextCursor !== undefined ? { next_cursor: result.nextCursor } : {} };
|
|
22388
|
+
const data = result.kind === "object" ? result.data : result.kind === "stream-event" ? result.event : result.raw ?? { data: result.items, ...result.nextCursor !== undefined ? { next_cursor: result.nextCursor } : {} };
|
|
21234
22389
|
output = { stdout: JSON.stringify(data ?? null) + `
|
|
21235
22390
|
` };
|
|
21236
22391
|
}
|
|
@@ -21251,6 +22406,18 @@ function quote(value) {
|
|
|
21251
22406
|
function commandLine(words) {
|
|
21252
22407
|
return ["praxis", ...words.map(quote)].join(" ");
|
|
21253
22408
|
}
|
|
22409
|
+
function unlimitedCommand(words, parsed) {
|
|
22410
|
+
const args = [...words];
|
|
22411
|
+
for (const [key, values] of Object.entries(parsed.flags)) {
|
|
22412
|
+
if (key === "limit")
|
|
22413
|
+
continue;
|
|
22414
|
+
for (const value of values)
|
|
22415
|
+
args.push(`--${key}=${value}`);
|
|
22416
|
+
}
|
|
22417
|
+
if (parsed.positional.length)
|
|
22418
|
+
args.push("--", ...parsed.positional);
|
|
22419
|
+
return commandLine(args);
|
|
22420
|
+
}
|
|
21254
22421
|
function nextPageCommand(command, parsed, cursor) {
|
|
21255
22422
|
const query = operationOptions(command.op).find((s) => s.location === "query" && /^(cursor|nextToken|nextCursor|pageToken|page_token|after)$/.test(s.field?.name ?? ""));
|
|
21256
22423
|
const flag = query?.name ?? "cursor";
|
|
@@ -21398,9 +22565,9 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
21398
22565
|
}
|
|
21399
22566
|
|
|
21400
22567
|
// src/main.ts
|
|
21401
|
-
var version = "0.1.0-dev.
|
|
22568
|
+
var version = "0.1.0-dev.ea77ce8";
|
|
21402
22569
|
var commands = commandTree(operations);
|
|
21403
|
-
var manual = [["login"], ["logout"], ["whoami"], ["org", "list"], ["org", "switch"], ["api"]];
|
|
22570
|
+
var manual = [["login"], ["logout"], ["whoami"], ["org", "list"], ["org", "switch"], ["api"], ["skill"]];
|
|
21404
22571
|
function route(argv) {
|
|
21405
22572
|
const words = [], args = [];
|
|
21406
22573
|
for (let i = 0;i < argv.length; i++) {
|
|
@@ -21430,7 +22597,7 @@ var defaults = {
|
|
|
21430
22597
|
stdoutIsTTY: Boolean(process.stdout.isTTY),
|
|
21431
22598
|
stderrIsTTY: Boolean(process.stderr.isTTY),
|
|
21432
22599
|
columns: process.stdout.columns ?? 100,
|
|
21433
|
-
readFile: (path) =>
|
|
22600
|
+
readFile: (path) => readFile2(path, "utf8"),
|
|
21434
22601
|
async readStdin() {
|
|
21435
22602
|
const chunks = [];
|
|
21436
22603
|
for await (const chunk of process.stdin)
|
|
@@ -21452,7 +22619,7 @@ var defaults = {
|
|
|
21452
22619
|
return;
|
|
21453
22620
|
const cmd = process.platform === "darwin" ? ["open", url] : process.platform === "win32" ? ["rundll32", "url.dll,FileProtocolHandler", url] : ["xdg-open", url];
|
|
21454
22621
|
await new Promise((resolve, reject) => {
|
|
21455
|
-
const child =
|
|
22622
|
+
const child = spawn2(cmd[0], cmd.slice(1), { stdio: "ignore" });
|
|
21456
22623
|
child.once("error", reject);
|
|
21457
22624
|
child.once("close", () => resolve());
|
|
21458
22625
|
});
|
|
@@ -21489,7 +22656,7 @@ async function main(argv, injected = {}) {
|
|
|
21489
22656
|
const selected = route(argv);
|
|
21490
22657
|
ctx.command = commandLine(selected.words);
|
|
21491
22658
|
ctx.resource = selected.words.at(-2) ?? selected.words[0];
|
|
21492
|
-
const specs = [...globalOptions, ...selected.command ? [...operationOptions(selected.command.op), ...selected.command.op.body ? [dataOption] : []] : selected.words[0] === "api" ? [dataOption] : []];
|
|
22659
|
+
const specs = [...globalOptions, ...selected.command ? [...operationOptions(selected.command.op), ...selected.command.op.body ? [dataOption] : []] : selected.words[0] === "api" ? [dataOption] : selected.words[0] === "skill" ? [{ name: "install", type: "string" }] : []];
|
|
21493
22660
|
const outputFlags = globalsOf(parseArgs(outputModeArgs(selected.args, specs), globalOptions));
|
|
21494
22661
|
ctx.json = Boolean(outputFlags.json);
|
|
21495
22662
|
Object.assign(ctx, decideOutputMode({ format: outputFlags.format, json: ctx.json, stdoutIsTTY: ports.stdoutIsTTY, env: ports.env }));
|
|
@@ -21514,6 +22681,11 @@ Examples:
|
|
|
21514
22681
|
praxis org list` : help(commands, selected.words) });
|
|
21515
22682
|
return 0;
|
|
21516
22683
|
}
|
|
22684
|
+
if (flags.help && selected.words[0] === "skill") {
|
|
22685
|
+
emit({ kind: "message", channel: "stdout", text: `praxis skill [--install <dir>]
|
|
22686
|
+
Print the AI skill or write <dir>/praxis-cli/SKILL.md.` });
|
|
22687
|
+
return 0;
|
|
22688
|
+
}
|
|
21517
22689
|
if (flags.help) {
|
|
21518
22690
|
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>" : ""}
|
|
21519
22691
|
${globalOptions.map((s) => "--" + s.name).join(" ")}
|
|
@@ -21522,7 +22694,22 @@ Examples:
|
|
|
21522
22694
|
praxis ${selected.words.join(" ")}${selected.words[0] === "api" ? " GET /model/v1/models" : selected.words[1] === "switch" ? " <organization_id>" : ""}` });
|
|
21523
22695
|
return 0;
|
|
21524
22696
|
}
|
|
22697
|
+
if (selected.words[0] === "skill") {
|
|
22698
|
+
if (parsed.positional.length)
|
|
22699
|
+
throw new UsageError("skill expects no positional arguments");
|
|
22700
|
+
const document = skillDocument(commands);
|
|
22701
|
+
const dir = parsed.flags.install?.[0];
|
|
22702
|
+
if (typeof dir === "string") {
|
|
22703
|
+
if (!dir.trim())
|
|
22704
|
+
throw new UsageError("--install requires a directory");
|
|
22705
|
+
const result = await installSkill(dir, document);
|
|
22706
|
+
emit({ kind: "message", text: `${result.overwritten ? "Overwrote" : "Installed"} ${result.path}` });
|
|
22707
|
+
} else
|
|
22708
|
+
emit({ kind: "message", channel: "stdout", text: document.trimEnd() });
|
|
22709
|
+
return 0;
|
|
22710
|
+
}
|
|
21525
22711
|
const path = ports.tokenPath ?? tokenPath(config.env);
|
|
22712
|
+
const store = createTokenStore(config.env, path, selectSecretStore(ports.env, ports.secretStore));
|
|
21526
22713
|
const wireFetch = async (input, init) => {
|
|
21527
22714
|
const request = new Request(input, init);
|
|
21528
22715
|
request.headers.set("User-Agent", `praxis-cli/${version}${ctx.mode === "agent" ? ` agent/${ctx.agentName ?? "unknown"}` : ""}`);
|
|
@@ -21532,7 +22719,7 @@ Examples:
|
|
|
21532
22719
|
}
|
|
21533
22720
|
return ports.fetch(request);
|
|
21534
22721
|
};
|
|
21535
|
-
const auth = credentials(config, ports.env, { fetch: wireFetch, now: ports.now, path, remember: (s) => {
|
|
22722
|
+
const auth = credentials(config, ports.env, { fetch: wireFetch, now: ports.now, path, store, remember: (s) => {
|
|
21536
22723
|
secrets.push(s);
|
|
21537
22724
|
} });
|
|
21538
22725
|
const org = flags.org;
|
|
@@ -21558,6 +22745,12 @@ Examples:
|
|
|
21558
22745
|
owner = owner[part];
|
|
21559
22746
|
const result = await owner[op.method](opts);
|
|
21560
22747
|
const name2 = `${op.resource}.${op.method}`;
|
|
22748
|
+
const list = (items) => {
|
|
22749
|
+
const view = clientList(items, op, flags.limit, ctx.mode);
|
|
22750
|
+
if ("total" in view)
|
|
22751
|
+
ctx.moreCommand = unlimitedCommand(selected.words, parsed);
|
|
22752
|
+
return view;
|
|
22753
|
+
};
|
|
21561
22754
|
const id = record(result).id ?? record(result).sandboxID ?? ctx.targetId;
|
|
21562
22755
|
if (typeof id === "string")
|
|
21563
22756
|
ctx.nextCommands = nextCommands(commands, selected.command, opts, id, org);
|
|
@@ -21571,16 +22764,16 @@ Examples:
|
|
|
21571
22764
|
items.push(item);
|
|
21572
22765
|
emit({ kind: "list", items, nextCursor: null, op: name2 });
|
|
21573
22766
|
} else
|
|
21574
|
-
emit({ kind: "list",
|
|
22767
|
+
emit({ kind: "list", ...list(result.data), nextCursor: result.next_cursor, op: name2 });
|
|
21575
22768
|
} else if (result && Symbol.asyncIterator in Object(result)) {
|
|
21576
22769
|
for await (const event of result)
|
|
21577
22770
|
emit({ kind: "stream-event", event, op: name2 });
|
|
21578
22771
|
if (ctx.mode !== "json" && modelStream(name2))
|
|
21579
22772
|
emit({ kind: "stream-event", event: null, done: true, op: name2 });
|
|
21580
22773
|
} else if (result && Array.isArray(result.data))
|
|
21581
|
-
emit({ kind: "list",
|
|
22774
|
+
emit({ kind: "list", ...list(result.data), ...ctx.mode === "json" ? { raw: result } : {}, nextCursor: result.next_cursor ?? result.nextToken, op: name2 });
|
|
21582
22775
|
else if (Array.isArray(result) && ctx.mode !== "json")
|
|
21583
|
-
emit({ kind: "list",
|
|
22776
|
+
emit({ kind: "list", ...list(result), op: name2 });
|
|
21584
22777
|
else
|
|
21585
22778
|
emit({ kind: "object", data: result, op: name2 });
|
|
21586
22779
|
return 0;
|
|
@@ -21595,10 +22788,10 @@ Examples:
|
|
|
21595
22788
|
case "login":
|
|
21596
22789
|
if (flags["no-input"] || quiet)
|
|
21597
22790
|
throw new UsageError("login requires displaying a device code", "Remove --no-input / --quiet or set PRAXIS_API_KEY for scripts.");
|
|
21598
|
-
await login(config, path, { ...ports, fetch: wireFetch, emit, remember: (s) => secrets.push(s) });
|
|
22791
|
+
await login(config, path, { ...ports, store, fetch: wireFetch, emit, remember: (s) => secrets.push(s) });
|
|
21599
22792
|
break;
|
|
21600
22793
|
case "logout":
|
|
21601
|
-
emit({ kind: "message", text:
|
|
22794
|
+
emit({ kind: "message", text: await store.delete() ? "Logged out." : "Not logged in." });
|
|
21602
22795
|
break;
|
|
21603
22796
|
case "whoami":
|
|
21604
22797
|
emit({ kind: "object", data: await whoami(auth, config.env, org) });
|