@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
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { PublishInput } from './application-publish.js';
|
|
2
|
+
/** A vite/vinext build read into memory: paths are relative to dist/server and dist/client. */
|
|
3
|
+
export interface BuildOutput {
|
|
4
|
+
serverFiles: Record<string, Uint8Array>;
|
|
5
|
+
clientFiles: Record<string, Uint8Array>;
|
|
6
|
+
/** Parsed dist/server/wrangler.json. */
|
|
7
|
+
wranglerJson: unknown;
|
|
8
|
+
}
|
|
9
|
+
/** Pure mapping from a vite/vinext build (dist/server + dist/client + wrangler.json) to `praxis.application.publish` input. No fs, no network. */
|
|
10
|
+
export declare function publishInputFromBuild(build: BuildOutput, name: string): PublishInput;
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
import { PraxisError } from "../core/errors.js";
|
|
2
|
+
// wrangler.json keys that declare a binding the platform does not accept (it answers UNSUPPORTED).
|
|
3
|
+
const UNSUPPORTED_BINDING_KEYS = ['services', 'queues', 'durable_objects', 'ai', 'analytics_engine_datasets', 'vectorize', 'hyperdrive',
|
|
4
|
+
'browser', 'send_email', 'mtls_certificates', 'dispatch_namespaces', 'unsafe', 'version_metadata', 'images', 'workflows', 'pipelines',
|
|
5
|
+
'secrets_store_secrets', 'ratelimits', 'vpc_services', 'media', 'tail_consumers', 'worker_loaders'];
|
|
6
|
+
// A key declares something only if it holds a value somewhere inside: vite's generated wrangler.json writes
|
|
7
|
+
// empty containers such as `queues: { producers: [], consumers: [] }` and `durable_objects: { bindings: [] }`.
|
|
8
|
+
const isPresent = (value) => {
|
|
9
|
+
if (value === undefined || value === null)
|
|
10
|
+
return false;
|
|
11
|
+
if (Array.isArray(value))
|
|
12
|
+
return value.some(isPresent);
|
|
13
|
+
if (typeof value === 'object')
|
|
14
|
+
return Object.values(value).some(isPresent);
|
|
15
|
+
return true;
|
|
16
|
+
};
|
|
17
|
+
/** Compile one .assetsignore line (gitignore subset: names, `*`, `**`, leading /, trailing /) to a matcher over a relative path. */
|
|
18
|
+
function ignoreMatcher(line) {
|
|
19
|
+
let pattern = line.trim();
|
|
20
|
+
if (!pattern || pattern.startsWith('#') || pattern.startsWith('!'))
|
|
21
|
+
return null;
|
|
22
|
+
const anchored = pattern.startsWith('/') || pattern.slice(0, -1).includes('/');
|
|
23
|
+
pattern = pattern.replace(/^\//, '').replace(/\/$/, '');
|
|
24
|
+
const source = pattern.split('**').map(part => part.split('*').map(piece => piece.replace(/[.+?^${}()|[\]\\]/g, '\\$&')).join('[^/]*')).join('.*');
|
|
25
|
+
const regex = new RegExp(`^${source}$`);
|
|
26
|
+
return path => {
|
|
27
|
+
const segments = path.split('/');
|
|
28
|
+
// The path or any of its parent directories matches, as in gitignore.
|
|
29
|
+
for (let end = 1; end <= segments.length; end++) {
|
|
30
|
+
if (anchored ? regex.test(segments.slice(0, end).join('/')) : regex.test(segments[end - 1]))
|
|
31
|
+
return true;
|
|
32
|
+
}
|
|
33
|
+
return false;
|
|
34
|
+
};
|
|
35
|
+
}
|
|
36
|
+
function bindingsFrom(wrangler) {
|
|
37
|
+
const bindings = [];
|
|
38
|
+
const fromList = (key, type) => {
|
|
39
|
+
const list = wrangler[key];
|
|
40
|
+
if (!isPresent(list))
|
|
41
|
+
return;
|
|
42
|
+
if (!Array.isArray(list))
|
|
43
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: `wrangler.json ${key} must be an array` });
|
|
44
|
+
for (const entry of list) {
|
|
45
|
+
if (typeof entry?.binding !== 'string')
|
|
46
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: `wrangler.json ${key} entry has no binding name` });
|
|
47
|
+
bindings.push({ type, name: entry.binding });
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
fromList('d1_databases', 'd1');
|
|
51
|
+
fromList('kv_namespaces', 'kv_namespace');
|
|
52
|
+
fromList('r2_buckets', 'r2_bucket');
|
|
53
|
+
for (const [name, value] of Object.entries((wrangler.vars ?? {}))) {
|
|
54
|
+
bindings.push((typeof value === 'string' ? { type: 'plain_text', name, text: value } : { type: 'json', name, json: value }));
|
|
55
|
+
}
|
|
56
|
+
if (typeof wrangler.assets?.binding === 'string')
|
|
57
|
+
bindings.push({ type: 'assets', name: wrangler.assets.binding });
|
|
58
|
+
return bindings;
|
|
59
|
+
}
|
|
60
|
+
/** Pure mapping from a vite/vinext build (dist/server + dist/client + wrangler.json) to `praxis.application.publish` input. No fs, no network. */
|
|
61
|
+
export function publishInputFromBuild(build, name) {
|
|
62
|
+
const wrangler = build.wranglerJson;
|
|
63
|
+
if (!wrangler || typeof wrangler !== 'object' || Array.isArray(wrangler)) {
|
|
64
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: 'wranglerJson must be the parsed dist/server/wrangler.json object' });
|
|
65
|
+
}
|
|
66
|
+
const offending = UNSUPPORTED_BINDING_KEYS.filter(key => isPresent(wrangler[key]));
|
|
67
|
+
if (offending.length) {
|
|
68
|
+
throw new PraxisError({ code: 'UNSUPPORTED', message: `wrangler.json declares bindings the platform does not support: ${offending.join(', ')}` });
|
|
69
|
+
}
|
|
70
|
+
const modules = Object.entries(build.serverFiles)
|
|
71
|
+
.filter(([path]) => path.endsWith('.js'))
|
|
72
|
+
.map(([path, content]) => ({ name: path, content, content_type: 'application/javascript+module' }));
|
|
73
|
+
if (typeof wrangler.main !== 'string')
|
|
74
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: 'wrangler.json has no main entry' });
|
|
75
|
+
if (!modules.some(module => module.name === wrangler.main)) {
|
|
76
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: `wrangler.json main ${wrangler.main} is not a .js file under dist/server` });
|
|
77
|
+
}
|
|
78
|
+
const ignored = new TextDecoder().decode(build.clientFiles['.assetsignore'] ?? new Uint8Array()).split(/\r?\n/)
|
|
79
|
+
.map(ignoreMatcher).filter((matcher) => matcher !== null);
|
|
80
|
+
const files = {};
|
|
81
|
+
for (const [path, content] of Object.entries(build.clientFiles)) {
|
|
82
|
+
if (path === '.assetsignore' || ignored.some(matches => matches(path)))
|
|
83
|
+
continue;
|
|
84
|
+
files[`/${path}`] = content;
|
|
85
|
+
}
|
|
86
|
+
const { binding: _binding, directory: _directory, ...assetsConfig } = (wrangler.assets ?? {});
|
|
87
|
+
const bindings = bindingsFrom(wrangler);
|
|
88
|
+
return {
|
|
89
|
+
name,
|
|
90
|
+
files,
|
|
91
|
+
modules,
|
|
92
|
+
main_module: wrangler.main,
|
|
93
|
+
...(typeof wrangler.compatibility_date === 'string' ? { compatibility_date: wrangler.compatibility_date } : {}),
|
|
94
|
+
...(Array.isArray(wrangler.compatibility_flags) ? { compatibility_flags: wrangler.compatibility_flags } : {}),
|
|
95
|
+
...(bindings.length ? { bindings } : {}),
|
|
96
|
+
...(Object.keys(assetsConfig).length ? { assets_config: assetsConfig } : {}),
|
|
97
|
+
};
|
|
98
|
+
}
|
|
@@ -12,6 +12,14 @@ export interface PublishInput {
|
|
|
12
12
|
content: string;
|
|
13
13
|
content_type?: string;
|
|
14
14
|
};
|
|
15
|
+
/** Multi-module Worker (e.g. a vite/vinext build). Names pass through unchanged; relative paths with / are legal. Mutually exclusive with main. */
|
|
16
|
+
modules?: {
|
|
17
|
+
name: string;
|
|
18
|
+
content: string | Uint8Array;
|
|
19
|
+
content_type?: string;
|
|
20
|
+
}[];
|
|
21
|
+
/** Entry module name; defaults to the first module and must name one of modules. */
|
|
22
|
+
main_module?: string;
|
|
15
23
|
/** 运行时兼容日期,默认当天 UTC(YYYY-MM-DD)。 */
|
|
16
24
|
compatibility_date?: string;
|
|
17
25
|
/** 运行时兼容标志,原样传递;平台固定附加 global_fetch_strictly_public。 */
|
|
@@ -21,11 +21,30 @@ export async function publish(client, input) {
|
|
|
21
21
|
const timeout = input.timeout_ms ?? 120_000;
|
|
22
22
|
if (!Number.isFinite(timeout) || timeout < 0)
|
|
23
23
|
throw new RangeError('timeout_ms must be non-negative and finite');
|
|
24
|
-
const
|
|
25
|
-
'text/plain', 'application/wasm', 'application/octet-stream', 'application/x-python']
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
24
|
+
const moduleTypes = ['application/javascript+module', 'text/javascript', 'application/javascript', 'application/json',
|
|
25
|
+
'text/plain', 'application/wasm', 'application/octet-stream', 'application/x-python'];
|
|
26
|
+
const moduleType = (type) => {
|
|
27
|
+
const found = moduleTypes.find(candidate => candidate === (type ?? 'application/javascript+module'));
|
|
28
|
+
if (!found)
|
|
29
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: `Unsupported module content_type: ${type}` });
|
|
30
|
+
return found;
|
|
31
|
+
};
|
|
32
|
+
if (input.main && input.modules)
|
|
33
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: 'Pass either main or modules, not both' });
|
|
34
|
+
if (input.main_module !== undefined && !input.modules)
|
|
35
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: 'main_module requires modules; with main the entry is main.name' });
|
|
36
|
+
if (input.modules && input.modules.length === 0)
|
|
37
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: 'modules must not be empty' });
|
|
38
|
+
const entryModules = input.main
|
|
39
|
+
? [{ name: input.main.name, content_type: moduleType(input.main.content_type), content_base64: base64(new TextEncoder().encode(input.main.content)) }]
|
|
40
|
+
: input.modules?.map(module => ({ name: module.name, content_type: moduleType(module.content_type),
|
|
41
|
+
content_base64: base64(typeof module.content === 'string' ? new TextEncoder().encode(module.content) : module.content) }));
|
|
42
|
+
if (new Set(entryModules?.map(module => module.name)).size !== (entryModules?.length ?? 0))
|
|
43
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: 'Duplicate module name' });
|
|
44
|
+
const mainModule = input.main ? input.main.name : input.modules ? (input.main_module ?? input.modules[0].name) : undefined;
|
|
45
|
+
if (input.modules && !input.modules.some(module => module.name === mainModule)) {
|
|
46
|
+
throw new PraxisError({ code: 'INVALID_PARAMS', message: `main_module ${mainModule} is not among modules` });
|
|
47
|
+
}
|
|
29
48
|
const files = Object.entries(input.files);
|
|
30
49
|
if (files.length > 100_000)
|
|
31
50
|
throw new PraxisError({ code: 'LIMIT_EXCEEDED', message: 'At most 100000 asset paths can be published' });
|
|
@@ -80,7 +99,7 @@ export async function publish(client, input) {
|
|
|
80
99
|
const removed = Object.keys(previous).filter(key => !Object.hasOwn(manifest, key));
|
|
81
100
|
const digest = new Uint8Array(await crypto.subtle.digest('SHA-256', new TextEncoder().encode(JSON.stringify(manifest))));
|
|
82
101
|
const manifestHash = Array.from(digest, byte => byte.toString(16).padStart(2, '0')).join('');
|
|
83
|
-
const staticOnly = !['main', 'bindings', 'compatibility_date', 'compatibility_flags', 'assets_config'].some(key => Object.hasOwn(input, key));
|
|
102
|
+
const staticOnly = !['main', 'modules', 'main_module', 'bindings', 'compatibility_date', 'compatibility_flags', 'assets_config'].some(key => Object.hasOwn(input, key));
|
|
84
103
|
const unchanged = staticOnly && !!currentVersion && manifestHash === currentVersion.praxis.assets_manifest?.manifest_hash;
|
|
85
104
|
const hashes = new Set(Object.values(manifest).map(entry => entry.hash));
|
|
86
105
|
const currentResult = { url: worker.subdomain.url, worker_id: worker.id, version_id: currentVersion?.id ?? null,
|
|
@@ -127,9 +146,7 @@ export async function publish(client, input) {
|
|
|
127
146
|
assets: versionAssets,
|
|
128
147
|
...(input.compatibility_flags ? { compatibility_flags: input.compatibility_flags } : {}),
|
|
129
148
|
...(input.bindings ? { bindings: input.bindings } : {}),
|
|
130
|
-
...(
|
|
131
|
-
content_type: contentType,
|
|
132
|
-
content_base64: base64(new TextEncoder().encode(input.main.content)) }] } : {}),
|
|
149
|
+
...(entryModules ? { main_module: mainModule, modules: entryModules } : {}),
|
|
133
150
|
} });
|
|
134
151
|
let deployment = result.deployment;
|
|
135
152
|
if (!deployment)
|
|
@@ -40,3 +40,5 @@ export interface ContextLike {
|
|
|
40
40
|
export declare function pickAgentContext<T extends ContextLike>(contexts: readonly T[], agentId: string): T | undefined;
|
|
41
41
|
/** Context names accept ASCII letters, digits and . _ : - only. */
|
|
42
42
|
export declare const agentContextName: (agentId: string) => string;
|
|
43
|
+
/** Start pages are expendable only on Console hosts, never arbitrary sites' /start pages. */
|
|
44
|
+
export declare function isBlankTab(value: string): boolean;
|
|
@@ -48,7 +48,7 @@ export function decideTabReuse(targetUrl, tabs) {
|
|
|
48
48
|
if (best === undefined || rank < best.rank || rank === best.rank && (tab.active || !best.tab.active))
|
|
49
49
|
best = { tab, rank };
|
|
50
50
|
}
|
|
51
|
-
return best?.tab;
|
|
51
|
+
return best?.tab ?? tabs.find(tab => isBlankTab(tab.url));
|
|
52
52
|
}
|
|
53
53
|
/** The `/browser/v1/connect` WebSocket URL. The token travels in a header, never in this URL. */
|
|
54
54
|
export function buildConnectUrl(parts) {
|
|
@@ -69,3 +69,16 @@ export function pickAgentContext(contexts, agentId) {
|
|
|
69
69
|
}
|
|
70
70
|
/** Context names accept ASCII letters, digits and . _ : - only. */
|
|
71
71
|
export const agentContextName = (agentId) => `agent-${agentId}`.replace(/[^A-Za-z0-9._:-]/g, '-').slice(0, 128);
|
|
72
|
+
/** Start pages are expendable only on Console hosts, never arbitrary sites' /start pages. */
|
|
73
|
+
export function isBlankTab(value) {
|
|
74
|
+
if (value === "" || value === "about:blank")
|
|
75
|
+
return true;
|
|
76
|
+
try {
|
|
77
|
+
const url = new URL(value);
|
|
78
|
+
return (url.protocol === "https:" || url.protocol === "http:") && url.pathname === "/start" &&
|
|
79
|
+
(url.hostname.startsWith("console-") || url.hostname === "console.deepraxis.com");
|
|
80
|
+
}
|
|
81
|
+
catch {
|
|
82
|
+
return false;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import type { Praxis } from '../core/client.js';
|
|
2
2
|
import type { OwnFileOpenAiFile } from '../generated/types.gen.js';
|
|
3
3
|
export interface UploadFileOptions {
|
|
4
|
-
/** user_data for conversation attachments
|
|
5
|
-
purpose: 'user_data' | '
|
|
4
|
+
/** user_data for conversation attachments and documents; vision for PNG/JPEG/GIF/WebP. */
|
|
5
|
+
purpose: 'user_data' | 'vision';
|
|
6
6
|
/** Defaults to File.name, or upload for a Blob. */
|
|
7
7
|
filename?: string;
|
|
8
8
|
/** Fixed part size in bytes, 5 MiB–64 MB; defaults to 50 MiB. */
|
package/dist/index.d.ts
CHANGED
|
@@ -7,6 +7,8 @@ export { parseSSE } from './core/sse.js';
|
|
|
7
7
|
export type { SSEEvent, SSEOptions } from './core/sse.js';
|
|
8
8
|
export { publish } from './helpers/application-publish.js';
|
|
9
9
|
export type { PublishInput, PublishResult, AssetsConfig } from './helpers/application-publish.js';
|
|
10
|
+
export { publishInputFromBuild } from './helpers/application-build.js';
|
|
11
|
+
export type { BuildOutput } from './helpers/application-build.js';
|
|
10
12
|
export { count } from './helpers/database-count.js';
|
|
11
13
|
export type { CountInput, CountResult } from './helpers/database-count.js';
|
|
12
14
|
export { uploadFile } from './helpers/file-upload.js';
|
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@ export { PraxisError, PraxisConnectionError, PraxisTimeoutError } from "./core/e
|
|
|
3
3
|
export { Page } from "./core/pagination.js";
|
|
4
4
|
export { parseSSE } from "./core/sse.js";
|
|
5
5
|
export { publish } from "./helpers/application-publish.js";
|
|
6
|
+
export { publishInputFromBuild } from "./helpers/application-build.js";
|
|
6
7
|
export { count } from "./helpers/database-count.js";
|
|
7
8
|
export { uploadFile } from "./helpers/file-upload.js";
|
|
8
9
|
export { connectBrowser } from "./helpers/browser-connect.js";
|
|
@@ -1536,7 +1536,7 @@ export declare const operations: readonly [{
|
|
|
1536
1536
|
readonly resource: "agent.sessions";
|
|
1537
1537
|
readonly method: "create";
|
|
1538
1538
|
readonly summary: "Create session";
|
|
1539
|
-
readonly 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
|
|
1539
|
+
readonly 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.";
|
|
1540
1540
|
readonly http: "POST";
|
|
1541
1541
|
readonly path: "/agent/v1/sessions";
|
|
1542
1542
|
readonly streaming: "no";
|
|
@@ -1990,9 +1990,9 @@ export declare const operations: readonly [{
|
|
|
1990
1990
|
}];
|
|
1991
1991
|
readonly query: readonly [{
|
|
1992
1992
|
readonly name: "limit";
|
|
1993
|
-
readonly type: "
|
|
1993
|
+
readonly type: "integer";
|
|
1994
1994
|
readonly required: false;
|
|
1995
|
-
readonly description: "Number of
|
|
1995
|
+
readonly description: "Number of resources per page, from 1 to 100; defaults to 100.";
|
|
1996
1996
|
}, {
|
|
1997
1997
|
readonly name: "page";
|
|
1998
1998
|
readonly type: "string";
|
|
@@ -3108,7 +3108,7 @@ export declare const operations: readonly [{
|
|
|
3108
3108
|
readonly resource: "automation.actions";
|
|
3109
3109
|
readonly method: "list";
|
|
3110
3110
|
readonly summary: "List actions";
|
|
3111
|
-
readonly 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.";
|
|
3111
|
+
readonly 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.";
|
|
3112
3112
|
readonly http: "GET";
|
|
3113
3113
|
readonly path: "/automation/v1/actions";
|
|
3114
3114
|
readonly streaming: "no";
|
|
@@ -3245,7 +3245,7 @@ export declare const operations: readonly [{
|
|
|
3245
3245
|
readonly resource: "automation.actions";
|
|
3246
3246
|
readonly method: "retrieve";
|
|
3247
3247
|
readonly summary: "Get an Action with its current input and output JSON Schemas";
|
|
3248
|
-
readonly 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.";
|
|
3248
|
+
readonly 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.";
|
|
3249
3249
|
readonly http: "GET";
|
|
3250
3250
|
readonly path: "/automation/v1/actions/{ns}/{name}";
|
|
3251
3251
|
readonly streaming: "no";
|
|
@@ -3580,6 +3580,142 @@ export declare const operations: readonly [{
|
|
|
3580
3580
|
readonly required: false;
|
|
3581
3581
|
readonly fields: readonly [];
|
|
3582
3582
|
};
|
|
3583
|
+
}, {
|
|
3584
|
+
readonly resource: "automation.humanTasks";
|
|
3585
|
+
readonly method: "list";
|
|
3586
|
+
readonly summary: "List human tasks";
|
|
3587
|
+
readonly 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.";
|
|
3588
|
+
readonly http: "GET";
|
|
3589
|
+
readonly path: "/automation/v1/human-tasks";
|
|
3590
|
+
readonly streaming: "no";
|
|
3591
|
+
readonly pagination: true;
|
|
3592
|
+
readonly pathParams: readonly [];
|
|
3593
|
+
readonly query: readonly [{
|
|
3594
|
+
readonly name: "limit";
|
|
3595
|
+
readonly type: "integer";
|
|
3596
|
+
readonly required: false;
|
|
3597
|
+
readonly description: "Page size, 1–100, default 50.";
|
|
3598
|
+
}, {
|
|
3599
|
+
readonly name: "cursor";
|
|
3600
|
+
readonly type: "string";
|
|
3601
|
+
readonly required: false;
|
|
3602
|
+
readonly description: "The next_cursor of the previous page; omit for the first page.";
|
|
3603
|
+
}, {
|
|
3604
|
+
readonly name: "status";
|
|
3605
|
+
readonly type: "array";
|
|
3606
|
+
readonly itemType: "string";
|
|
3607
|
+
readonly enum: readonly ["open", "completed", "expired", "cancelled"];
|
|
3608
|
+
readonly required: false;
|
|
3609
|
+
readonly description: "Filter by status, comma-separated: open, completed, expired, cancelled. Defaults to open.";
|
|
3610
|
+
}, {
|
|
3611
|
+
readonly name: "run_id";
|
|
3612
|
+
readonly type: "string";
|
|
3613
|
+
readonly required: false;
|
|
3614
|
+
readonly description: "Only tasks opened by this run (run_).";
|
|
3615
|
+
}, {
|
|
3616
|
+
readonly name: "scope";
|
|
3617
|
+
readonly type: "string";
|
|
3618
|
+
readonly enum: readonly ["assigned", "all"];
|
|
3619
|
+
readonly required: false;
|
|
3620
|
+
readonly description: "assigned (default) lists only tasks assigned to the caller; all lists every task of the organization.";
|
|
3621
|
+
}];
|
|
3622
|
+
}, {
|
|
3623
|
+
readonly resource: "automation.humanTasks";
|
|
3624
|
+
readonly method: "retrieve";
|
|
3625
|
+
readonly summary: "Retrieve a human task";
|
|
3626
|
+
readonly 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.";
|
|
3627
|
+
readonly http: "GET";
|
|
3628
|
+
readonly path: "/automation/v1/human-tasks/{id}";
|
|
3629
|
+
readonly streaming: "no";
|
|
3630
|
+
readonly pagination: false;
|
|
3631
|
+
readonly pathParams: readonly [{
|
|
3632
|
+
readonly name: "id";
|
|
3633
|
+
readonly sdkName: "id";
|
|
3634
|
+
readonly description: "Human task ID (htask_), from the list or the run's waits.";
|
|
3635
|
+
}];
|
|
3636
|
+
readonly query: readonly [];
|
|
3637
|
+
}, {
|
|
3638
|
+
readonly resource: "automation.humanTasks";
|
|
3639
|
+
readonly method: "cancel";
|
|
3640
|
+
readonly summary: "Cancel a human task";
|
|
3641
|
+
readonly 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.";
|
|
3642
|
+
readonly http: "POST";
|
|
3643
|
+
readonly path: "/automation/v1/human-tasks/{id}/cancel";
|
|
3644
|
+
readonly streaming: "no";
|
|
3645
|
+
readonly pagination: false;
|
|
3646
|
+
readonly pathParams: readonly [{
|
|
3647
|
+
readonly name: "id";
|
|
3648
|
+
readonly sdkName: "id";
|
|
3649
|
+
readonly description: "Human task ID (htask_).";
|
|
3650
|
+
}];
|
|
3651
|
+
readonly query: readonly [];
|
|
3652
|
+
readonly body: {
|
|
3653
|
+
readonly required: false;
|
|
3654
|
+
readonly fields: readonly [{
|
|
3655
|
+
readonly name: "reason";
|
|
3656
|
+
readonly type: "string";
|
|
3657
|
+
readonly required: false;
|
|
3658
|
+
readonly description: "Optional cancellation reason, at most 500 characters.";
|
|
3659
|
+
}];
|
|
3660
|
+
};
|
|
3661
|
+
}, {
|
|
3662
|
+
readonly resource: "automation.humanTasks";
|
|
3663
|
+
readonly method: "delegate";
|
|
3664
|
+
readonly summary: "Delegate a human task";
|
|
3665
|
+
readonly 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.";
|
|
3666
|
+
readonly http: "POST";
|
|
3667
|
+
readonly path: "/automation/v1/human-tasks/{id}/delegate";
|
|
3668
|
+
readonly streaming: "no";
|
|
3669
|
+
readonly pagination: false;
|
|
3670
|
+
readonly pathParams: readonly [{
|
|
3671
|
+
readonly name: "id";
|
|
3672
|
+
readonly sdkName: "id";
|
|
3673
|
+
readonly description: "Human task ID (htask_).";
|
|
3674
|
+
}];
|
|
3675
|
+
readonly query: readonly [];
|
|
3676
|
+
readonly body: {
|
|
3677
|
+
readonly required: true;
|
|
3678
|
+
readonly fields: readonly [{
|
|
3679
|
+
readonly name: "to_user";
|
|
3680
|
+
readonly type: "string";
|
|
3681
|
+
readonly required: true;
|
|
3682
|
+
readonly description: "User ID taking over; cannot already be an assignee, nor the initiator unless self-approval is allowed.";
|
|
3683
|
+
}];
|
|
3684
|
+
};
|
|
3685
|
+
}, {
|
|
3686
|
+
readonly resource: "automation.humanTasks";
|
|
3687
|
+
readonly method: "respond";
|
|
3688
|
+
readonly summary: "Respond to a human task";
|
|
3689
|
+
readonly 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.";
|
|
3690
|
+
readonly http: "POST";
|
|
3691
|
+
readonly path: "/automation/v1/human-tasks/{id}/respond";
|
|
3692
|
+
readonly streaming: "no";
|
|
3693
|
+
readonly pagination: false;
|
|
3694
|
+
readonly pathParams: readonly [{
|
|
3695
|
+
readonly name: "id";
|
|
3696
|
+
readonly sdkName: "id";
|
|
3697
|
+
readonly description: "Human task ID (htask_).";
|
|
3698
|
+
}];
|
|
3699
|
+
readonly query: readonly [];
|
|
3700
|
+
readonly body: {
|
|
3701
|
+
readonly required: true;
|
|
3702
|
+
readonly fields: readonly [{
|
|
3703
|
+
readonly name: "action_id";
|
|
3704
|
+
readonly type: "string";
|
|
3705
|
+
readonly required: true;
|
|
3706
|
+
readonly description: "The chosen action ID from the task's actions, for example approve.";
|
|
3707
|
+
}, {
|
|
3708
|
+
readonly name: "values";
|
|
3709
|
+
readonly type: "object";
|
|
3710
|
+
readonly required: false;
|
|
3711
|
+
readonly description: "Any JSON object whose keys are strings and whose values are any JSON value.";
|
|
3712
|
+
}, {
|
|
3713
|
+
readonly name: "comment";
|
|
3714
|
+
readonly type: "string";
|
|
3715
|
+
readonly required: false;
|
|
3716
|
+
readonly description: "Comment of at most 4000 characters; required when the action has require_comment true.";
|
|
3717
|
+
}];
|
|
3718
|
+
};
|
|
3583
3719
|
}, {
|
|
3584
3720
|
readonly resource: "automation.resolve";
|
|
3585
3721
|
readonly method: "retrieve";
|
|
@@ -3711,7 +3847,7 @@ export declare const operations: readonly [{
|
|
|
3711
3847
|
readonly resource: "automation.runs";
|
|
3712
3848
|
readonly method: "create";
|
|
3713
3849
|
readonly summary: "Run a published target or execute draft source";
|
|
3714
|
-
readonly 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
|
|
3850
|
+
readonly 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.";
|
|
3715
3851
|
readonly http: "POST";
|
|
3716
3852
|
readonly path: "/automation/v1/runs";
|
|
3717
3853
|
readonly streaming: "no";
|
|
@@ -4108,7 +4244,7 @@ export declare const operations: readonly [{
|
|
|
4108
4244
|
readonly resource: "automation.scripts";
|
|
4109
4245
|
readonly method: "create";
|
|
4110
4246
|
readonly summary: "Create a script";
|
|
4111
|
-
readonly 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.";
|
|
4247
|
+
readonly 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.";
|
|
4112
4248
|
readonly http: "POST";
|
|
4113
4249
|
readonly path: "/automation/v1/scripts";
|
|
4114
4250
|
readonly streaming: "no";
|
|
@@ -4873,7 +5009,7 @@ export declare const operations: readonly [{
|
|
|
4873
5009
|
readonly resource: "automation.validate";
|
|
4874
5010
|
readonly method: "create";
|
|
4875
5011
|
readonly summary: "Validate a definition";
|
|
4876
|
-
readonly 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.";
|
|
5012
|
+
readonly 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.";
|
|
4877
5013
|
readonly http: "POST";
|
|
4878
5014
|
readonly path: "/automation/v1/validate";
|
|
4879
5015
|
readonly streaming: "no";
|
|
@@ -4958,7 +5094,7 @@ export declare const operations: readonly [{
|
|
|
4958
5094
|
readonly resource: "automation.workflows";
|
|
4959
5095
|
readonly method: "create";
|
|
4960
5096
|
readonly summary: "Create a workflow";
|
|
4961
|
-
readonly description: "Save a YAML workflow as an editable draft
|
|
5097
|
+
readonly 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.";
|
|
4962
5098
|
readonly http: "POST";
|
|
4963
5099
|
readonly path: "/automation/v1/workflows";
|
|
4964
5100
|
readonly streaming: "no";
|
|
@@ -5017,7 +5153,7 @@ export declare const operations: readonly [{
|
|
|
5017
5153
|
readonly resource: "automation.workflows";
|
|
5018
5154
|
readonly method: "update";
|
|
5019
5155
|
readonly summary: "Update a workflow draft";
|
|
5020
|
-
readonly description: "Update description, labels or draft with the current draft revision in If-Match. Even metadata-only updates create a new draft revision.";
|
|
5156
|
+
readonly 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[].";
|
|
5021
5157
|
readonly http: "PATCH";
|
|
5022
5158
|
readonly path: "/automation/v1/workflows/{ns}/{name}";
|
|
5023
5159
|
readonly streaming: "no";
|
|
@@ -5211,7 +5347,7 @@ export declare const operations: readonly [{
|
|
|
5211
5347
|
readonly method: "create";
|
|
5212
5348
|
readonly aliases: readonly ["publish"];
|
|
5213
5349
|
readonly summary: "Publish a workflow version";
|
|
5214
|
-
readonly 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.";
|
|
5350
|
+
readonly 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).";
|
|
5215
5351
|
readonly http: "POST";
|
|
5216
5352
|
readonly path: "/automation/v1/workflows/{ns}/{name}/versions";
|
|
5217
5353
|
readonly streaming: "no";
|
|
@@ -6596,7 +6732,7 @@ export declare const operations: readonly [{
|
|
|
6596
6732
|
readonly resource: "file.files";
|
|
6597
6733
|
readonly method: "create";
|
|
6598
6734
|
readonly summary: "Upload file";
|
|
6599
|
-
readonly 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
|
|
6735
|
+
readonly 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.";
|
|
6600
6736
|
readonly http: "POST";
|
|
6601
6737
|
readonly path: "/file/v1/files";
|
|
6602
6738
|
readonly streaming: "no";
|
|
@@ -6614,19 +6750,14 @@ export declare const operations: readonly [{
|
|
|
6614
6750
|
}, {
|
|
6615
6751
|
readonly name: "purpose";
|
|
6616
6752
|
readonly type: "string";
|
|
6617
|
-
readonly enum: readonly ["user_data", "
|
|
6753
|
+
readonly enum: readonly ["user_data", "vision"];
|
|
6618
6754
|
readonly required: true;
|
|
6619
|
-
readonly description: "Purpose label stored with the file: user_data
|
|
6755
|
+
readonly 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.";
|
|
6620
6756
|
}, {
|
|
6621
6757
|
readonly name: "expires_after";
|
|
6622
6758
|
readonly type: "object";
|
|
6623
6759
|
readonly required: false;
|
|
6624
6760
|
readonly description: "Optional expiry relative to created_at. Files without an expiry persist until deleted.";
|
|
6625
|
-
}, {
|
|
6626
|
-
readonly name: "praxis";
|
|
6627
|
-
readonly type: "object";
|
|
6628
|
-
readonly required: false;
|
|
6629
|
-
readonly description: "Own-face extensions. Use at most one expiry setting.";
|
|
6630
6761
|
}];
|
|
6631
6762
|
};
|
|
6632
6763
|
}, {
|
|
@@ -6678,7 +6809,7 @@ export declare const operations: readonly [{
|
|
|
6678
6809
|
readonly resource: "file.uploads";
|
|
6679
6810
|
readonly method: "create";
|
|
6680
6811
|
readonly summary: "Create an upload";
|
|
6681
|
-
readonly 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
|
|
6812
|
+
readonly 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.";
|
|
6682
6813
|
readonly http: "POST";
|
|
6683
6814
|
readonly path: "/file/v1/uploads";
|
|
6684
6815
|
readonly streaming: "no";
|
|
@@ -6705,9 +6836,9 @@ export declare const operations: readonly [{
|
|
|
6705
6836
|
}, {
|
|
6706
6837
|
readonly name: "purpose";
|
|
6707
6838
|
readonly type: "string";
|
|
6708
|
-
readonly enum: readonly ["user_data", "
|
|
6839
|
+
readonly enum: readonly ["user_data", "vision"];
|
|
6709
6840
|
readonly required: true;
|
|
6710
|
-
readonly description: "Use user_data for conversation attachments,
|
|
6841
|
+
readonly description: "Use user_data for conversation attachments, or vision for PNG, JPEG, GIF and WebP images.";
|
|
6711
6842
|
}, {
|
|
6712
6843
|
readonly name: "expires_after";
|
|
6713
6844
|
readonly type: "object";
|
|
@@ -7657,7 +7788,7 @@ export declare const operations: readonly [{
|
|
|
7657
7788
|
readonly name: "overwrite";
|
|
7658
7789
|
readonly type: "boolean";
|
|
7659
7790
|
readonly required: false;
|
|
7660
|
-
readonly 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.";
|
|
7791
|
+
readonly 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.";
|
|
7661
7792
|
}, {
|
|
7662
7793
|
readonly name: "tags";
|
|
7663
7794
|
readonly type: "object";
|
|
@@ -7702,6 +7833,7 @@ export declare const operations: readonly [{
|
|
|
7702
7833
|
readonly name: "file_id";
|
|
7703
7834
|
readonly type: "string";
|
|
7704
7835
|
readonly required: true;
|
|
7836
|
+
readonly 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.";
|
|
7705
7837
|
}, {
|
|
7706
7838
|
readonly name: "public_id";
|
|
7707
7839
|
readonly type: "string";
|
|
@@ -7746,7 +7878,7 @@ export declare const operations: readonly [{
|
|
|
7746
7878
|
readonly name: "overwrite";
|
|
7747
7879
|
readonly type: "boolean";
|
|
7748
7880
|
readonly required: false;
|
|
7749
|
-
readonly 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.";
|
|
7881
|
+
readonly 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.";
|
|
7750
7882
|
}, {
|
|
7751
7883
|
readonly name: "tags";
|
|
7752
7884
|
readonly type: "object";
|
|
@@ -8155,7 +8287,7 @@ export declare const operations: readonly [{
|
|
|
8155
8287
|
readonly name: "expression";
|
|
8156
8288
|
readonly type: "string";
|
|
8157
8289
|
readonly required: false;
|
|
8158
|
-
readonly description: "Asset filter expression supporting field comparisons, AND, OR, NOT, parentheses and suffix wildcards. An empty expression matches all assets.";
|
|
8290
|
+
readonly 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.";
|
|
8159
8291
|
}, {
|
|
8160
8292
|
readonly name: "sort_by";
|
|
8161
8293
|
readonly type: "array";
|