@deepraxis/sdk 0.1.1-dev.f0ef747 → 0.1.1-dev.f8aa5de
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/METHODS.md +11 -1
- package/dist/automation.d.ts +7 -0
- package/dist/generated/index.d.ts +2 -2
- package/dist/generated/index.js +1 -1
- package/dist/generated/sdk.gen.d.ts +42 -12
- package/dist/generated/sdk.gen.js +114 -11
- package/dist/generated/types.gen.d.ts +1329 -138
- package/dist/helpers/application-build.d.ts +10 -0
- package/dist/helpers/application-build.js +98 -0
- package/dist/helpers/application-publish.d.ts +8 -0
- package/dist/helpers/application-publish.js +26 -9
- package/dist/helpers/browser-decisions.d.ts +2 -0
- package/dist/helpers/browser-decisions.js +14 -1
- package/dist/helpers/file-upload.d.ts +2 -2
- package/dist/index.d.ts +2 -0
- package/dist/index.js +1 -0
- package/dist/operations.generated.d.ts +157 -25
- package/dist/operations.generated.js +191 -27
- package/dist/resources.generated.d.ts +57 -3
- package/dist/resources.generated.js +7 -0
- package/package.json +1 -1
|
@@ -1898,7 +1898,7 @@ export const operations = [
|
|
|
1898
1898
|
"resource": "agent.sessions",
|
|
1899
1899
|
"method": "create",
|
|
1900
1900
|
"summary": "Create session",
|
|
1901
|
-
"description": "Create a session: one conversation with an agent. Pass agent as an agent id or {type:\"agent\", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (light for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:\"agent_with_overrides\", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:\"limit\", max_list_cost:{amount, currency:\"USD\"}} where amount is a positive
|
|
1901
|
+
"description": "Create a session: one conversation with an agent. Pass agent as an agent id or {type:\"agent\", id, version?}; an id alone, or an object without version, pins the agent's active_version (the version chosen with agents.versions.apply, not necessarily the newest saved one). Unlike Anthropic Managed Agents, omit environment_id to use the default environment saved in the agent version (light for a new agent), unless computer_id (explicit, or the agent's default) selects a Computer; pass an environment id for a sandbox recipe. For service agents, explicit null allocates no machine, so codemode, bash and other machine tools are unavailable. Optional model must be one of the agent's allowed models; optional thinking is {effort: low|medium|high|xhigh|max|none} or null, where null inherits the agent default and then the model default (none requires the model to allow disabling thinking). Selections are saved before initial_events run; invalid ones return 400 invalid_request_error. Unlike Anthropic Managed Agents, the only inline agent override is system ({type:\"agent_with_overrides\", id, system}); to change the model, tools, MCP servers or skills, save a version instead. Supports vault_ids, up to 50, owned by the current organization and not archived; credential injection is deferred to a later version. budget is {type:\"limit\", max_list_cost:{amount, currency:\"USD\"}} where amount is a positive decimal string of US dollars with at most 2 decimal places (\"20.00\" is USD 20.00); omitted budget defaults to \"20.00\" and null removes the limit. 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.",
|
|
1902
1902
|
"http": "POST",
|
|
1903
1903
|
"path": "/agent/v1/sessions",
|
|
1904
1904
|
"streaming": "no",
|
|
@@ -2451,9 +2451,9 @@ export const operations = [
|
|
|
2451
2451
|
"query": [
|
|
2452
2452
|
{
|
|
2453
2453
|
"name": "limit",
|
|
2454
|
-
"type": "
|
|
2454
|
+
"type": "integer",
|
|
2455
2455
|
"required": false,
|
|
2456
|
-
"description": "Number of
|
|
2456
|
+
"description": "Number of resources per page, from 1 to 100; defaults to 100."
|
|
2457
2457
|
},
|
|
2458
2458
|
{
|
|
2459
2459
|
"name": "page",
|
|
@@ -3813,7 +3813,7 @@ export const operations = [
|
|
|
3813
3813
|
"resource": "automation.actions",
|
|
3814
3814
|
"method": "list",
|
|
3815
3815
|
"summary": "List actions",
|
|
3816
|
-
"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.",
|
|
3816
|
+
"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. List items carry no input contract: get the action and read current_revision.input_schema. Call it with call(\"ns/name\", input) in a script or call: ns/name with with: in a workflow.",
|
|
3817
3817
|
"http": "GET",
|
|
3818
3818
|
"path": "/automation/v1/actions",
|
|
3819
3819
|
"streaming": "no",
|
|
@@ -3982,7 +3982,7 @@ export const operations = [
|
|
|
3982
3982
|
"resource": "automation.actions",
|
|
3983
3983
|
"method": "retrieve",
|
|
3984
3984
|
"summary": "Get an Action with its current input and output JSON Schemas",
|
|
3985
|
-
"description": "Read the Action and its full current implementation, with input and output JSON Schemas at current_revision.input_schema and current_revision.output_schema. To read a built-in Action, use ns=praxis and name=<bare name>, for example name=ocr; invoke it in a script with call(\"ocr\", input). The response ETag is the current revision ID for conditional updates.",
|
|
3985
|
+
"description": "Read the Action and its full current implementation, with input and output JSON Schemas at current_revision.input_schema and current_revision.output_schema. To read a built-in Action, use ns=praxis and name=<bare name>, for example name=ocr; invoke it in a script with call(\"ocr\", input) or in a workflow step with call: ocr and with:. Input that breaks the contract returns INPUT_INVALID, with the fields in errors[]. The response ETag is the current revision ID for conditional updates.",
|
|
3986
3986
|
"http": "GET",
|
|
3987
3987
|
"path": "/automation/v1/actions/{ns}/{name}",
|
|
3988
3988
|
"streaming": "no",
|
|
@@ -4398,6 +4398,177 @@ export const operations = [
|
|
|
4398
4398
|
"fields": []
|
|
4399
4399
|
}
|
|
4400
4400
|
},
|
|
4401
|
+
{
|
|
4402
|
+
"resource": "automation.humanTasks",
|
|
4403
|
+
"method": "list",
|
|
4404
|
+
"summary": "List human tasks",
|
|
4405
|
+
"description": "List the human tasks that praxis/approval workflow steps opened, newest first. By default it returns only open tasks assigned to the caller: their approval inbox. scope=all lists every task of the organization, and status and run_id narrow the list. Use a returned id with retrieve for details and respond to decide. Read-only: listing never changes a task.",
|
|
4406
|
+
"http": "GET",
|
|
4407
|
+
"path": "/automation/v1/human-tasks",
|
|
4408
|
+
"streaming": "no",
|
|
4409
|
+
"pagination": true,
|
|
4410
|
+
"pathParams": [],
|
|
4411
|
+
"query": [
|
|
4412
|
+
{
|
|
4413
|
+
"name": "limit",
|
|
4414
|
+
"type": "integer",
|
|
4415
|
+
"required": false,
|
|
4416
|
+
"description": "Page size, 1–100, default 50."
|
|
4417
|
+
},
|
|
4418
|
+
{
|
|
4419
|
+
"name": "cursor",
|
|
4420
|
+
"type": "string",
|
|
4421
|
+
"required": false,
|
|
4422
|
+
"description": "The next_cursor of the previous page; omit for the first page."
|
|
4423
|
+
},
|
|
4424
|
+
{
|
|
4425
|
+
"name": "status",
|
|
4426
|
+
"type": "array",
|
|
4427
|
+
"itemType": "string",
|
|
4428
|
+
"enum": [
|
|
4429
|
+
"open",
|
|
4430
|
+
"completed",
|
|
4431
|
+
"expired",
|
|
4432
|
+
"cancelled"
|
|
4433
|
+
],
|
|
4434
|
+
"required": false,
|
|
4435
|
+
"description": "Filter by status, comma-separated: open, completed, expired, cancelled. Defaults to open."
|
|
4436
|
+
},
|
|
4437
|
+
{
|
|
4438
|
+
"name": "run_id",
|
|
4439
|
+
"type": "string",
|
|
4440
|
+
"required": false,
|
|
4441
|
+
"description": "Only tasks opened by this run (run_)."
|
|
4442
|
+
},
|
|
4443
|
+
{
|
|
4444
|
+
"name": "scope",
|
|
4445
|
+
"type": "string",
|
|
4446
|
+
"enum": [
|
|
4447
|
+
"assigned",
|
|
4448
|
+
"all"
|
|
4449
|
+
],
|
|
4450
|
+
"required": false,
|
|
4451
|
+
"description": "assigned (default) lists only tasks assigned to the caller; all lists every task of the organization."
|
|
4452
|
+
}
|
|
4453
|
+
]
|
|
4454
|
+
},
|
|
4455
|
+
{
|
|
4456
|
+
"resource": "automation.humanTasks",
|
|
4457
|
+
"method": "retrieve",
|
|
4458
|
+
"summary": "Retrieve a human task",
|
|
4459
|
+
"description": "Read one human task - title, Markdown body, context, actions, form, assignees, mode, due time, responses and outcome - so an assignee can choose an action and fill the form. Read-only; the Console approval page /automation/tasks/{id} reads the same resource.",
|
|
4460
|
+
"http": "GET",
|
|
4461
|
+
"path": "/automation/v1/human-tasks/{id}",
|
|
4462
|
+
"streaming": "no",
|
|
4463
|
+
"pagination": false,
|
|
4464
|
+
"pathParams": [
|
|
4465
|
+
{
|
|
4466
|
+
"name": "id",
|
|
4467
|
+
"sdkName": "id",
|
|
4468
|
+
"description": "Human task ID (htask_), from the list or the run's waits."
|
|
4469
|
+
}
|
|
4470
|
+
],
|
|
4471
|
+
"query": []
|
|
4472
|
+
},
|
|
4473
|
+
{
|
|
4474
|
+
"resource": "automation.humanTasks",
|
|
4475
|
+
"method": "cancel",
|
|
4476
|
+
"summary": "Cancel a human task",
|
|
4477
|
+
"description": "Cancel an open human task; only the person who started the run or an organization API key may cancel. The task becomes cancelled and the waiting workflow step raises a runtime error with code HUMAN_TASK_CANCELLED, which try/catch can catch. Open tasks are cancelled automatically when their run ends, so this call is not needed then.",
|
|
4478
|
+
"http": "POST",
|
|
4479
|
+
"path": "/automation/v1/human-tasks/{id}/cancel",
|
|
4480
|
+
"streaming": "no",
|
|
4481
|
+
"pagination": false,
|
|
4482
|
+
"pathParams": [
|
|
4483
|
+
{
|
|
4484
|
+
"name": "id",
|
|
4485
|
+
"sdkName": "id",
|
|
4486
|
+
"description": "Human task ID (htask_)."
|
|
4487
|
+
}
|
|
4488
|
+
],
|
|
4489
|
+
"query": [],
|
|
4490
|
+
"body": {
|
|
4491
|
+
"required": false,
|
|
4492
|
+
"fields": [
|
|
4493
|
+
{
|
|
4494
|
+
"name": "reason",
|
|
4495
|
+
"type": "string",
|
|
4496
|
+
"required": false,
|
|
4497
|
+
"description": "Optional cancellation reason, at most 500 characters."
|
|
4498
|
+
}
|
|
4499
|
+
]
|
|
4500
|
+
}
|
|
4501
|
+
},
|
|
4502
|
+
{
|
|
4503
|
+
"resource": "automation.humanTasks",
|
|
4504
|
+
"method": "delegate",
|
|
4505
|
+
"summary": "Delegate a human task",
|
|
4506
|
+
"description": "An assignee who has not responded hands their place to another user (to_user), replacing their entry in assignees.users in place, so sequential order is kept. The new user cannot already be an assignee, nor the initiator unless self-approval is allowed. The task must still be open.",
|
|
4507
|
+
"http": "POST",
|
|
4508
|
+
"path": "/automation/v1/human-tasks/{id}/delegate",
|
|
4509
|
+
"streaming": "no",
|
|
4510
|
+
"pagination": false,
|
|
4511
|
+
"pathParams": [
|
|
4512
|
+
{
|
|
4513
|
+
"name": "id",
|
|
4514
|
+
"sdkName": "id",
|
|
4515
|
+
"description": "Human task ID (htask_)."
|
|
4516
|
+
}
|
|
4517
|
+
],
|
|
4518
|
+
"query": [],
|
|
4519
|
+
"body": {
|
|
4520
|
+
"required": true,
|
|
4521
|
+
"fields": [
|
|
4522
|
+
{
|
|
4523
|
+
"name": "to_user",
|
|
4524
|
+
"type": "string",
|
|
4525
|
+
"required": true,
|
|
4526
|
+
"description": "User ID taking over; cannot already be an assignee, nor the initiator unless self-approval is allowed."
|
|
4527
|
+
}
|
|
4528
|
+
]
|
|
4529
|
+
}
|
|
4530
|
+
},
|
|
4531
|
+
{
|
|
4532
|
+
"resource": "automation.humanTasks",
|
|
4533
|
+
"method": "respond",
|
|
4534
|
+
"summary": "Respond to a human task",
|
|
4535
|
+
"description": "Submit an action (action_id), form values (values) and a comment as the calling user. Depending on the task's mode the response either decides it (status becomes completed, outcome is set, and the waiting workflow resumes with outcome as the step output) or is recorded while other assignees are awaited. When two assignees respond at once, exactly one decides and the other gets TASK_CLOSED. An agent may respond only if the workflow set allow_agent_decision. Send an Idempotency-Key to retry safely.",
|
|
4536
|
+
"http": "POST",
|
|
4537
|
+
"path": "/automation/v1/human-tasks/{id}/respond",
|
|
4538
|
+
"streaming": "no",
|
|
4539
|
+
"pagination": false,
|
|
4540
|
+
"pathParams": [
|
|
4541
|
+
{
|
|
4542
|
+
"name": "id",
|
|
4543
|
+
"sdkName": "id",
|
|
4544
|
+
"description": "Human task ID (htask_)."
|
|
4545
|
+
}
|
|
4546
|
+
],
|
|
4547
|
+
"query": [],
|
|
4548
|
+
"body": {
|
|
4549
|
+
"required": true,
|
|
4550
|
+
"fields": [
|
|
4551
|
+
{
|
|
4552
|
+
"name": "action_id",
|
|
4553
|
+
"type": "string",
|
|
4554
|
+
"required": true,
|
|
4555
|
+
"description": "The chosen action ID from the task's actions, for example approve."
|
|
4556
|
+
},
|
|
4557
|
+
{
|
|
4558
|
+
"name": "values",
|
|
4559
|
+
"type": "object",
|
|
4560
|
+
"required": false,
|
|
4561
|
+
"description": "Any JSON object whose keys are strings and whose values are any JSON value."
|
|
4562
|
+
},
|
|
4563
|
+
{
|
|
4564
|
+
"name": "comment",
|
|
4565
|
+
"type": "string",
|
|
4566
|
+
"required": false,
|
|
4567
|
+
"description": "Comment of at most 4000 characters; required when the action has require_comment true."
|
|
4568
|
+
}
|
|
4569
|
+
]
|
|
4570
|
+
}
|
|
4571
|
+
},
|
|
4401
4572
|
{
|
|
4402
4573
|
"resource": "automation.resolve",
|
|
4403
4574
|
"method": "retrieve",
|
|
@@ -4578,7 +4749,7 @@ export const operations = [
|
|
|
4578
4749
|
"resource": "automation.runs",
|
|
4579
4750
|
"method": "create",
|
|
4580
4751
|
"summary": "Run a published target or execute draft source",
|
|
4581
|
-
"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. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call(\"ocr\", { document: { type: \"file\", file_id } }); return result; }`; send it as source with language=\"ts\", input={\"file_id\":\"<uploaded file ID>\"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: \"glm-ocr\", document: { type: \"file\", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke(\"namespace/name\", input) starts a child run. 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. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 30 s (run-sandbox after 10 min); scripts have a 5 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to
|
|
4752
|
+
"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. Minimal script: `export default async ({ file_id }: { file_id: string }) => { const result = await call(\"ocr\", { document: { type: \"file\", file_id } }); return result; }`; send it as source with language=\"ts\", input={\"file_id\":\"<uploaded file ID>\"} and wait=0, using a PDF or image already uploaded to your account. To call a platform API directly in the same script, use the praxis SDK object, for example `praxis.model.ocr.create({ body: { model: \"glm-ocr\", document: { type: \"file\", file_id } } })`; Action IDs are strings passed to call(), not SDK methods such as praxis.ocr(...). praxis, call, invoke, console and codemode are module-scope bindings, not on globalThis, and need no import; invoke(\"namespace/name\", input) starts a child run. 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. For long-running, background or batch work, use wait: 0 and poll the run, or split work into child runs or a workflow; wait only controls the response wait and does not extend execution limits. Actions time out after 30 s (run-sandbox after 10 min); scripts have a 5 min wall-clock limit and a 30 s CPU limit; workflows default to 24 h and allow up to 30 days. Each run can start at most 100 child runs, with at most 20 active at once; nesting depth is limited to 10. 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. With language=yaml, source is a workflow YAML: the run input is . in the first step, and the shape is described in create workflow. Error details are in errors[] (pointer, detail, hint). New non-deterministic run IDs contain 78 characters, compared with 46 for legacy random IDs; treat IDs as opaque strings. Historical and deterministic IDs remain valid; same-millisecond order is not guaranteed.",
|
|
4582
4753
|
"http": "POST",
|
|
4583
4754
|
"path": "/automation/v1/runs",
|
|
4584
4755
|
"streaming": "no",
|
|
@@ -5070,7 +5241,7 @@ export const operations = [
|
|
|
5070
5241
|
"resource": "automation.scripts",
|
|
5071
5242
|
"method": "create",
|
|
5072
5243
|
"summary": "Create a script",
|
|
5073
|
-
"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 reserved for built-in Actions. 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});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call(\"ocr\", input) calls a built-in Action, and invoke(\"namespace/name\", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. 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.",
|
|
5244
|
+
"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 reserved for built-in Actions. 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});`. Scripts provide praxis, call, invoke, console and codemode as module-scope bindings, not on globalThis, with no import needed: praxis.<domain>.<resource>.<method>(...) calls a platform API, call(\"ocr\", input) calls a built-in Action, and invoke(\"namespace/name\", input) starts a child run. Action IDs are strings (bare names for built-ins, namespace/name for your own Actions); praxis.ocr(...) does not exist. The return value is limited to 1 MiB: write large results to a file with call(\"write-file\", ...) and return the file ID. A call error carries errors[] (pointer, detail, hint); String(e) is only the summary. 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.",
|
|
5074
5245
|
"http": "POST",
|
|
5075
5246
|
"path": "/automation/v1/scripts",
|
|
5076
5247
|
"streaming": "no",
|
|
@@ -6019,7 +6190,7 @@ export const operations = [
|
|
|
6019
6190
|
"resource": "automation.validate",
|
|
6020
6191
|
"method": "create",
|
|
6021
6192
|
"summary": "Validate a definition",
|
|
6022
|
-
"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.",
|
|
6193
|
+
"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. For kind=workflow the YAML needs document (dsl, namespace, name, version) and do; each problem is one entry in errors[] (pointer, detail, hint), so read the first one. A listen outside the supported subset (to.all, inside a fork) and emit are not reported here and fail with DEFINITION_INVALID only when a run is created.",
|
|
6023
6194
|
"http": "POST",
|
|
6024
6195
|
"path": "/automation/v1/validate",
|
|
6025
6196
|
"streaming": "no",
|
|
@@ -6126,7 +6297,7 @@ export const operations = [
|
|
|
6126
6297
|
"resource": "automation.workflows",
|
|
6127
6298
|
"method": "create",
|
|
6128
6299
|
"summary": "Create a workflow",
|
|
6129
|
-
"description": "Save a YAML workflow as an editable draft
|
|
6300
|
+
"description": "Save a YAML workflow as an editable draft; this does not validate, publish or run it, so check it with validate (kind=workflow) first. Minimal draft: document with dsl (\"1.0.3\"), namespace, name and version, plus a do list of steps, for example document: {dsl: \"1.0.3\", namespace: demo, name: add, version: \"1.0.0\"} and do: [{first: {call: demo/add-one, with: {n: \"${ .n }\"}}}]. call: <ns/name> calls an Action directly (bare name for built-ins such as ocr) and with is the Action input; the input contract is at current_revision.input_schema in the get-action response. run: starts a saved script or child workflow. The run input is . in the first step, and expressions are jq written as a whole ${ ... } string. Limits: Action 30 s (run-sandbox 10 min), workflow 24 h by default and 30 days at most, payload 1 MiB. Test the draft by sending its source and language=yaml to praxis.automation.runs.create. Guide: /docs/developers/automation/guides/write-workflow. Error details are in the errors[] of the response (pointer, detail, hint). Choose your own namespace without registering it first; praxis is reserved for built-in Actions. 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.",
|
|
6130
6301
|
"http": "POST",
|
|
6131
6302
|
"path": "/automation/v1/workflows",
|
|
6132
6303
|
"streaming": "no",
|
|
@@ -6196,7 +6367,7 @@ export const operations = [
|
|
|
6196
6367
|
"resource": "automation.workflows",
|
|
6197
6368
|
"method": "update",
|
|
6198
6369
|
"summary": "Update a workflow draft",
|
|
6199
|
-
"description": "Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.",
|
|
6370
|
+
"description": "Update description, labels or draft with the current draft revision in If-Match, taken from draft.revision in the get-workflow response. Even metadata-only updates create a new draft revision. A mismatch returns 412 PRECONDITION_FAILED; read the draft again, merge and retry. The draft is not validated here, so check it with validate (kind=workflow) before publishing. Error details are in errors[].",
|
|
6200
6371
|
"http": "PATCH",
|
|
6201
6372
|
"path": "/automation/v1/workflows/{ns}/{name}",
|
|
6202
6373
|
"streaming": "no",
|
|
@@ -6434,7 +6605,7 @@ export const operations = [
|
|
|
6434
6605
|
"publish"
|
|
6435
6606
|
],
|
|
6436
6607
|
"summary": "Publish a workflow version",
|
|
6437
|
-
"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.",
|
|
6608
|
+
"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. For a workflow, document namespace, name and version must equal the publish target, otherwise DEFINITION_IDENTITY_MISMATCH; where a DEFINITION_INVALID failure sits is listed in errors[] (pointer, detail, hint).",
|
|
6438
6609
|
"http": "POST",
|
|
6439
6610
|
"path": "/automation/v1/workflows/{ns}/{name}/versions",
|
|
6440
6611
|
"streaming": "no",
|
|
@@ -8118,7 +8289,7 @@ export const operations = [
|
|
|
8118
8289
|
"resource": "file.files",
|
|
8119
8290
|
"method": "create",
|
|
8120
8291
|
"summary": "Upload file",
|
|
8121
|
-
"description": "Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data
|
|
8292
|
+
"description": "Upload a file to reuse in conversations or attach to a knowledge base. Unlike OpenAI Files, uploads must be nonempty and at most 100000000 bytes, and only user_data and vision purposes are accepted. Send file bytes as a multipart file part, not a filename or file ID; in the SDK use a File or Blob, for example new File([\"Return within 23 days.\"], \"policy.txt\", { type: \"text/plain\" }). Content determines the MIME type. Supported uploads include PDF, DOCX/XLSX/PPTX, PNG/JPEG/GIF/WebP, MP3/WAV/FLAC/OGG/M4A, MP4/WebM, and UTF-8 JSON/NDJSON/CSV/Markdown/plain text; empty, unsupported, oversized files and unsupported purposes return 400. Use Uploads for larger files. The purpose vision accepts only PNG, JPEG, GIF and WebP, while conversation images require user_data. The returned ID belongs to your tenant; upload alone does not ingest the file into Knowledge. Knowledge attachment has a lower limit of 100000000 bytes. Optionally set expires_after[anchor]=created_at with expires_after[seconds] (3600–7776000). Without expiry, the file persists until deleted.",
|
|
8122
8293
|
"http": "POST",
|
|
8123
8294
|
"path": "/file/v1/files",
|
|
8124
8295
|
"streaming": "no",
|
|
@@ -8140,23 +8311,16 @@ export const operations = [
|
|
|
8140
8311
|
"type": "string",
|
|
8141
8312
|
"enum": [
|
|
8142
8313
|
"user_data",
|
|
8143
|
-
"assistants",
|
|
8144
8314
|
"vision"
|
|
8145
8315
|
],
|
|
8146
8316
|
"required": true,
|
|
8147
|
-
"description": "Purpose label stored with the file: user_data
|
|
8317
|
+
"description": "Purpose label stored with the file: user_data or vision. The vision purpose accepts only PNG, JPEG, GIF and WebP images. Conversation image references require user_data."
|
|
8148
8318
|
},
|
|
8149
8319
|
{
|
|
8150
8320
|
"name": "expires_after",
|
|
8151
8321
|
"type": "object",
|
|
8152
8322
|
"required": false,
|
|
8153
8323
|
"description": "Optional expiry relative to created_at. Files without an expiry persist until deleted."
|
|
8154
|
-
},
|
|
8155
|
-
{
|
|
8156
|
-
"name": "praxis",
|
|
8157
|
-
"type": "object",
|
|
8158
|
-
"required": false,
|
|
8159
|
-
"description": "Own-face extensions. Use at most one expiry setting."
|
|
8160
8324
|
}
|
|
8161
8325
|
]
|
|
8162
8326
|
}
|
|
@@ -8219,7 +8383,7 @@ export const operations = [
|
|
|
8219
8383
|
"resource": "file.uploads",
|
|
8220
8384
|
"method": "create",
|
|
8221
8385
|
"summary": "Create an upload",
|
|
8222
|
-
"description": "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data
|
|
8386
|
+
"description": "Start a multipart upload for a file larger than the 100000000-byte direct-upload limit. Supply the exact byte length, filename, MIME type and purpose. Unlike OpenAI, uploads accept at most 2 GiB (2147483648 bytes) and only user_data and vision purposes. Add parts of at most 64000000 bytes and complete within one hour. Optional part_size enables fixed-size, retryable parts. expires_after applies to the resulting file (3600–7776000 seconds on this own face); without it the file persists until deleted.",
|
|
8223
8387
|
"http": "POST",
|
|
8224
8388
|
"path": "/file/v1/uploads",
|
|
8225
8389
|
"streaming": "no",
|
|
@@ -8252,11 +8416,10 @@ export const operations = [
|
|
|
8252
8416
|
"type": "string",
|
|
8253
8417
|
"enum": [
|
|
8254
8418
|
"user_data",
|
|
8255
|
-
"assistants",
|
|
8256
8419
|
"vision"
|
|
8257
8420
|
],
|
|
8258
8421
|
"required": true,
|
|
8259
|
-
"description": "Use user_data for conversation attachments,
|
|
8422
|
+
"description": "Use user_data for conversation attachments, or vision for PNG, JPEG, GIF and WebP images."
|
|
8260
8423
|
},
|
|
8261
8424
|
{
|
|
8262
8425
|
"name": "expires_after",
|
|
@@ -9436,7 +9599,7 @@ export const operations = [
|
|
|
9436
9599
|
"name": "overwrite",
|
|
9437
9600
|
"type": "boolean",
|
|
9438
9601
|
"required": false,
|
|
9439
|
-
"description": "Allow replacing an existing public_id, preserving its asset_id and increasing its version. False returns the existing resource without replacing it; defaults to true."
|
|
9602
|
+
"description": "Allow replacing an existing public_id, preserving its asset_id and increasing its version. Only the latest version is deliverable; old version URLs return 404. Create a new public_id to retain old deliveries. False returns the existing resource without replacing it; defaults to true."
|
|
9440
9603
|
},
|
|
9441
9604
|
{
|
|
9442
9605
|
"name": "tags",
|
|
@@ -9494,7 +9657,8 @@ export const operations = [
|
|
|
9494
9657
|
{
|
|
9495
9658
|
"name": "file_id",
|
|
9496
9659
|
"type": "string",
|
|
9497
|
-
"required": true
|
|
9660
|
+
"required": true,
|
|
9661
|
+
"description": "File ID to copy into this library; passed as the upload source instead of file bytes. This creates an independent public copy readable without authentication. Deleting the source File does not delete this asset; do not import confidential content."
|
|
9498
9662
|
},
|
|
9499
9663
|
{
|
|
9500
9664
|
"name": "public_id",
|
|
@@ -9548,7 +9712,7 @@ export const operations = [
|
|
|
9548
9712
|
"name": "overwrite",
|
|
9549
9713
|
"type": "boolean",
|
|
9550
9714
|
"required": false,
|
|
9551
|
-
"description": "Allow replacing an existing public_id, preserving its asset_id and increasing its version. False returns the existing resource without replacing it; defaults to true."
|
|
9715
|
+
"description": "Allow replacing an existing public_id, preserving its asset_id and increasing its version. Only the latest version is deliverable; old version URLs return 404. Create a new public_id to retain old deliveries. False returns the existing resource without replacing it; defaults to true."
|
|
9552
9716
|
},
|
|
9553
9717
|
{
|
|
9554
9718
|
"name": "tags",
|
|
@@ -10065,7 +10229,7 @@ export const operations = [
|
|
|
10065
10229
|
"name": "expression",
|
|
10066
10230
|
"type": "string",
|
|
10067
10231
|
"required": false,
|
|
10068
|
-
"description": "Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets."
|
|
10232
|
+
"description": "Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets. For business metadata use context.sku=KETTLE-RED AND context.revision=2; request with_field: [\"context\"] to include context."
|
|
10069
10233
|
},
|
|
10070
10234
|
{
|
|
10071
10235
|
"name": "sort_by",
|
|
@@ -1056,6 +1056,7 @@ export declare function createAgent(transport: Transport): {
|
|
|
1056
1056
|
type: "agent";
|
|
1057
1057
|
updated_at: string;
|
|
1058
1058
|
version: number;
|
|
1059
|
+
latest_version?: number;
|
|
1059
1060
|
active_version: number;
|
|
1060
1061
|
created_by: {
|
|
1061
1062
|
type: "user";
|
|
@@ -2308,6 +2309,7 @@ export declare function createAgent(transport: Transport): {
|
|
|
2308
2309
|
run_id: string | null;
|
|
2309
2310
|
message_id?: string;
|
|
2310
2311
|
} | {
|
|
2312
|
+
full_access_available?: boolean;
|
|
2311
2313
|
id: string;
|
|
2312
2314
|
input: Types.AgentManaged197;
|
|
2313
2315
|
mcp_server_name: string;
|
|
@@ -2332,6 +2334,15 @@ export declare function createAgent(transport: Transport): {
|
|
|
2332
2334
|
parent_tool_use_id?: string;
|
|
2333
2335
|
user_once?: true;
|
|
2334
2336
|
guarded_rule?: string;
|
|
2337
|
+
permission_suggestions?: Array<{
|
|
2338
|
+
type: "add_rules";
|
|
2339
|
+
behavior: "allow";
|
|
2340
|
+
destination: "agent" | "session";
|
|
2341
|
+
rules: Array<{
|
|
2342
|
+
tool_name: string;
|
|
2343
|
+
rule_content: string;
|
|
2344
|
+
}>;
|
|
2345
|
+
}>;
|
|
2335
2346
|
title?: string;
|
|
2336
2347
|
input_titles?: {
|
|
2337
2348
|
[key: string]: string;
|
|
@@ -2350,6 +2361,7 @@ export declare function createAgent(transport: Transport): {
|
|
|
2350
2361
|
};
|
|
2351
2362
|
source?: "app" | "codemode";
|
|
2352
2363
|
} | {
|
|
2364
|
+
full_access_available?: boolean;
|
|
2353
2365
|
id: string;
|
|
2354
2366
|
input: Types.AgentManaged206;
|
|
2355
2367
|
name: string;
|
|
@@ -2361,6 +2373,15 @@ export declare function createAgent(transport: Transport): {
|
|
|
2361
2373
|
run_id: string | null;
|
|
2362
2374
|
user_once?: true;
|
|
2363
2375
|
guarded_rule?: string;
|
|
2376
|
+
permission_suggestions?: Array<{
|
|
2377
|
+
type: "add_rules";
|
|
2378
|
+
behavior: "allow";
|
|
2379
|
+
destination: "agent" | "session";
|
|
2380
|
+
rules: Array<{
|
|
2381
|
+
tool_name: string;
|
|
2382
|
+
rule_content: string;
|
|
2383
|
+
}>;
|
|
2384
|
+
}>;
|
|
2364
2385
|
} | {
|
|
2365
2386
|
id: string;
|
|
2366
2387
|
processed_at: string;
|
|
@@ -2381,6 +2402,9 @@ export declare function createAgent(transport: Transport): {
|
|
|
2381
2402
|
type: "session.status_idle";
|
|
2382
2403
|
run_id: string | null;
|
|
2383
2404
|
} | Types.AgentManaged230 | Types.AgentManaged231 | Types.AgentManaged232 | Types.AgentManaged233 | Types.AgentManaged235 | Types.AgentManaged236 | Types.AgentManaged237 | Types.AgentManaged238 | Types.AgentManaged239 | Types.AgentManaged240 | Types.AgentManaged241 | Types.AgentManaged242 | Types.AgentManaged243 | Types.AgentManaged244 | {
|
|
2405
|
+
permission_mode_version?: number;
|
|
2406
|
+
previous_permission_mode?: string | null;
|
|
2407
|
+
permission_mode?: "build" | "edit" | "plan" | "yolo" | "guarded" | null;
|
|
2384
2408
|
id: string;
|
|
2385
2409
|
processed_at: string;
|
|
2386
2410
|
type: "session.updated";
|
|
@@ -3002,10 +3026,10 @@ export declare function createAgent(transport: Transport): {
|
|
|
3002
3026
|
web_fetch_requests?: number;
|
|
3003
3027
|
web_search_requests?: number;
|
|
3004
3028
|
};
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
currency: "USD";
|
|
3029
|
+
cost_by_product?: {
|
|
3030
|
+
[key: string]: string;
|
|
3008
3031
|
};
|
|
3032
|
+
subagent_cost_micro_usd?: number;
|
|
3009
3033
|
};
|
|
3010
3034
|
vault_ids: Array<string>;
|
|
3011
3035
|
deployment_id?: null | string;
|
|
@@ -3292,6 +3316,7 @@ export declare function createAgent(transport: Transport): {
|
|
|
3292
3316
|
run_id: string | null;
|
|
3293
3317
|
message_id?: string;
|
|
3294
3318
|
} | {
|
|
3319
|
+
full_access_available?: boolean;
|
|
3295
3320
|
id: string;
|
|
3296
3321
|
input: Types.AgentManaged197;
|
|
3297
3322
|
mcp_server_name: string;
|
|
@@ -3316,6 +3341,15 @@ export declare function createAgent(transport: Transport): {
|
|
|
3316
3341
|
source?: "app" | "codemode";
|
|
3317
3342
|
user_once?: true;
|
|
3318
3343
|
guarded_rule?: string;
|
|
3344
|
+
permission_suggestions?: Array<{
|
|
3345
|
+
type: "add_rules";
|
|
3346
|
+
behavior: "allow";
|
|
3347
|
+
destination: "agent" | "session";
|
|
3348
|
+
rules: Array<{
|
|
3349
|
+
tool_name: string;
|
|
3350
|
+
rule_content: string;
|
|
3351
|
+
}>;
|
|
3352
|
+
}>;
|
|
3319
3353
|
title?: string;
|
|
3320
3354
|
input_titles?: {
|
|
3321
3355
|
[key: string]: string;
|
|
@@ -3334,6 +3368,7 @@ export declare function createAgent(transport: Transport): {
|
|
|
3334
3368
|
};
|
|
3335
3369
|
source?: "app" | "codemode";
|
|
3336
3370
|
} | {
|
|
3371
|
+
full_access_available?: boolean;
|
|
3337
3372
|
id: string;
|
|
3338
3373
|
input: Types.AgentManaged206;
|
|
3339
3374
|
name: string;
|
|
@@ -3345,6 +3380,15 @@ export declare function createAgent(transport: Transport): {
|
|
|
3345
3380
|
run_id: string | null;
|
|
3346
3381
|
user_once?: true;
|
|
3347
3382
|
guarded_rule?: string;
|
|
3383
|
+
permission_suggestions?: Array<{
|
|
3384
|
+
type: "add_rules";
|
|
3385
|
+
behavior: "allow";
|
|
3386
|
+
destination: "agent" | "session";
|
|
3387
|
+
rules: Array<{
|
|
3388
|
+
tool_name: string;
|
|
3389
|
+
rule_content: string;
|
|
3390
|
+
}>;
|
|
3391
|
+
}>;
|
|
3348
3392
|
} | {
|
|
3349
3393
|
id: string;
|
|
3350
3394
|
processed_at: string;
|
|
@@ -3365,6 +3409,9 @@ export declare function createAgent(transport: Transport): {
|
|
|
3365
3409
|
type: "session.status_idle";
|
|
3366
3410
|
run_id: string | null;
|
|
3367
3411
|
} | Types.AgentManaged230 | Types.AgentManaged231 | Types.AgentManaged232 | Types.AgentManaged233 | Types.AgentManaged235 | Types.AgentManaged236 | Types.AgentManaged237 | Types.AgentManaged238 | Types.AgentManaged239 | Types.AgentManaged240 | Types.AgentManaged241 | Types.AgentManaged242 | Types.AgentManaged243 | Types.AgentManaged244 | {
|
|
3412
|
+
permission_mode_version?: number;
|
|
3413
|
+
previous_permission_mode?: string | null;
|
|
3414
|
+
permission_mode?: "build" | "edit" | "plan" | "yolo" | "guarded" | null;
|
|
3368
3415
|
id: string;
|
|
3369
3416
|
processed_at: string;
|
|
3370
3417
|
type: "session.updated";
|
|
@@ -3633,6 +3680,13 @@ export declare function createAutomation(transport: Transport): {
|
|
|
3633
3680
|
hooks: {
|
|
3634
3681
|
send: (options: import("./core/transport.js").CallOptions<Types.AutomationHooksReceiveData>) => Promise<Types.AutomationFiring>;
|
|
3635
3682
|
};
|
|
3683
|
+
humanTasks: {
|
|
3684
|
+
cancel: (options: import("./core/transport.js").CallOptions<Types.AutomationHumanTasksCancelData>) => Promise<Types.AutomationHumanTask>;
|
|
3685
|
+
delegate: (options: import("./core/transport.js").CallOptions<Types.AutomationHumanTasksDelegateData>) => Promise<Types.AutomationHumanTask>;
|
|
3686
|
+
list: (options?: import("./core/transport.js").CallOptions<Types.AutomationHumanTasksListData> | undefined) => Promise<import("./automation.js").Page<Types.AutomationHumanTask>>;
|
|
3687
|
+
respond: (options: import("./core/transport.js").CallOptions<Types.AutomationHumanTasksRespondData>) => Promise<Types.AutomationHumanTask>;
|
|
3688
|
+
retrieve: (options: import("./core/transport.js").CallOptions<Types.AutomationHumanTasksGetData>) => Promise<Types.AutomationHumanTask>;
|
|
3689
|
+
};
|
|
3636
3690
|
resolve: {
|
|
3637
3691
|
retrieve: (options: import("./core/transport.js").CallOptions<Types.AutomationResolveResolveData>) => Promise<Types.AutomationResolveResult>;
|
|
3638
3692
|
};
|
|
@@ -236,6 +236,13 @@ export function createAutomation(transport) {
|
|
|
236
236
|
hooks: {
|
|
237
237
|
send: bind(transport, sdk.automationHooksReceive),
|
|
238
238
|
},
|
|
239
|
+
humanTasks: {
|
|
240
|
+
cancel: bind(transport, sdk.automationHumanTasksCancel),
|
|
241
|
+
delegate: bind(transport, sdk.automationHumanTasksDelegate),
|
|
242
|
+
list: bindPage(transport, sdk.automationHumanTasksList),
|
|
243
|
+
respond: bind(transport, sdk.automationHumanTasksRespond),
|
|
244
|
+
retrieve: bind(transport, sdk.automationHumanTasksGet),
|
|
245
|
+
},
|
|
239
246
|
resolve: {
|
|
240
247
|
retrieve: bind(transport, sdk.automationResolveResolve),
|
|
241
248
|
},
|