veryfront 0.1.75 → 0.1.77
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/esm/cli/commands/files/command.d.ts +3 -3
- package/esm/cli/commands/pull/command.js +2 -2
- package/esm/cli/commands/task/command.d.ts.map +1 -1
- package/esm/cli/commands/task/command.js +57 -51
- package/esm/cli/commands/workflow/command-help.d.ts +3 -0
- package/esm/cli/commands/workflow/command-help.d.ts.map +1 -0
- package/esm/cli/commands/workflow/command-help.js +19 -0
- package/esm/cli/commands/workflow/command.d.ts +5 -0
- package/esm/cli/commands/workflow/command.d.ts.map +1 -0
- package/esm/cli/commands/workflow/command.js +119 -0
- package/esm/cli/commands/workflow/handler.d.ts +28 -0
- package/esm/cli/commands/workflow/handler.d.ts.map +1 -0
- package/esm/cli/commands/workflow/handler.js +19 -0
- package/esm/cli/help/command-definitions.d.ts.map +1 -1
- package/esm/cli/help/command-definitions.js +2 -0
- package/esm/cli/router.d.ts.map +1 -1
- package/esm/cli/router.js +2 -0
- package/esm/cli/shared/project-source-context.d.ts +18 -0
- package/esm/cli/shared/project-source-context.d.ts.map +1 -0
- package/esm/cli/shared/project-source-context.js +52 -0
- package/esm/deno.d.ts +6 -0
- package/esm/deno.js +12 -6
- package/esm/src/data/server-data-fetcher.d.ts.map +1 -1
- package/esm/src/data/server-data-fetcher.js +17 -1
- package/esm/src/jobs/index.d.ts +34 -0
- package/esm/src/jobs/index.d.ts.map +1 -0
- package/esm/src/jobs/index.js +33 -0
- package/esm/src/jobs/jobs-client.d.ts +134 -0
- package/esm/src/jobs/jobs-client.d.ts.map +1 -0
- package/esm/src/jobs/jobs-client.js +218 -0
- package/esm/src/jobs/schemas.d.ts +1304 -0
- package/esm/src/jobs/schemas.d.ts.map +1 -0
- package/esm/src/jobs/schemas.js +159 -0
- package/esm/src/platform/adapters/veryfront-api-client/operations.d.ts +3 -3
- package/esm/src/platform/adapters/veryfront-api-client/operations.d.ts.map +1 -1
- package/esm/src/platform/adapters/veryfront-api-client/operations.js +12 -10
- package/esm/src/platform/adapters/veryfront-api-client/retry-handler.d.ts +4 -0
- package/esm/src/platform/adapters/veryfront-api-client/retry-handler.d.ts.map +1 -1
- package/esm/src/platform/adapters/veryfront-api-client/retry-handler.js +12 -6
- package/esm/src/platform/adapters/veryfront-api-client/schemas/api.schema.d.ts +4 -4
- package/esm/src/platform/adapters/veryfront-api-client/schemas/api.schema.js +4 -4
- package/esm/src/platform/index.d.ts +1 -0
- package/esm/src/platform/index.d.ts.map +1 -1
- package/esm/src/platform/index.js +1 -0
- package/esm/src/proxy/handler.d.ts.map +1 -1
- package/esm/src/proxy/handler.js +21 -21
- package/esm/src/routing/api/route-executor.d.ts.map +1 -1
- package/esm/src/routing/api/route-executor.js +30 -3
- package/esm/src/security/deno-permissions.d.ts +1 -1
- package/esm/src/security/deno-permissions.d.ts.map +1 -1
- package/esm/src/security/deno-permissions.js +2 -1
- package/esm/src/security/sandbox/project-worker.d.ts.map +1 -1
- package/esm/src/security/sandbox/project-worker.js +2 -2
- package/esm/src/security/sandbox/worker-permissions.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-permissions.js +23 -20
- package/esm/src/security/sandbox/worker-pool.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-pool.js +17 -14
- package/esm/src/security/sandbox/worker-types.d.ts +2 -0
- package/esm/src/security/sandbox/worker-types.d.ts.map +1 -1
- package/esm/src/security/sandbox/worker-types.js +2 -0
- package/esm/src/task/types.d.ts +6 -0
- package/esm/src/task/types.d.ts.map +1 -1
- package/package.json +5 -1
- package/src/cli/commands/pull/command.ts +3 -3
- package/src/cli/commands/task/command.ts +66 -57
- package/src/cli/commands/workflow/command-help.ts +21 -0
- package/src/cli/commands/workflow/command.ts +152 -0
- package/src/cli/commands/workflow/handler.ts +25 -0
- package/src/cli/help/command-definitions.ts +2 -0
- package/src/cli/router.ts +2 -0
- package/src/cli/shared/project-source-context.ts +96 -0
- package/src/deno.js +12 -6
- package/src/src/data/server-data-fetcher.ts +30 -2
- package/src/src/jobs/index.ts +85 -0
- package/src/src/jobs/jobs-client.ts +503 -0
- package/src/src/jobs/schemas.ts +202 -0
- package/src/src/platform/adapters/veryfront-api-client/operations.ts +14 -14
- package/src/src/platform/adapters/veryfront-api-client/retry-handler.ts +15 -6
- package/src/src/platform/adapters/veryfront-api-client/schemas/api.schema.ts +4 -4
- package/src/src/platform/index.ts +1 -0
- package/src/src/proxy/handler.ts +27 -19
- package/src/src/routing/api/route-executor.ts +43 -7
- package/src/src/security/deno-permissions.ts +2 -1
- package/src/src/security/sandbox/project-worker.ts +2 -2
- package/src/src/security/sandbox/worker-permissions.ts +22 -19
- package/src/src/security/sandbox/worker-pool.ts +21 -13
- package/src/src/security/sandbox/worker-types.ts +3 -0
- package/src/src/task/types.ts +6 -0
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
import { getConfig, type VeryfrontConfig } from "../../src/config/index.js";
|
|
2
|
+
import {
|
|
3
|
+
enhanceAdapterWithFS,
|
|
4
|
+
getEnv,
|
|
5
|
+
isExtendedFSAdapter,
|
|
6
|
+
runtime,
|
|
7
|
+
type RuntimeAdapter,
|
|
8
|
+
} from "../../src/platform/index.js";
|
|
9
|
+
|
|
10
|
+
interface ProxyProjectSourceContext {
|
|
11
|
+
projectSlug: string;
|
|
12
|
+
token: string;
|
|
13
|
+
projectId?: string;
|
|
14
|
+
branchRef?: string | null;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export interface ProjectSourceExecutionContext {
|
|
18
|
+
adapter: RuntimeAdapter;
|
|
19
|
+
config: VeryfrontConfig;
|
|
20
|
+
projectDir: string;
|
|
21
|
+
projectId?: string;
|
|
22
|
+
proxyContext?: ProxyProjectSourceContext;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function getProxyProjectSourceContext(): ProxyProjectSourceContext | null {
|
|
26
|
+
const projectSlug = getEnv("VERYFRONT_PROJECT_SLUG")?.trim();
|
|
27
|
+
const token = getEnv("VERYFRONT_API_TOKEN")?.trim();
|
|
28
|
+
|
|
29
|
+
if (!projectSlug || !token) {
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
const projectId = getEnv("VERYFRONT_PROJECT_ID")?.trim();
|
|
34
|
+
const branchRef = getEnv("VERYFRONT_BRANCH_REF")?.trim();
|
|
35
|
+
|
|
36
|
+
return {
|
|
37
|
+
projectSlug,
|
|
38
|
+
token,
|
|
39
|
+
projectId: projectId || undefined,
|
|
40
|
+
branchRef: branchRef || null,
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
async function loadProjectConfig(
|
|
45
|
+
projectDir: string,
|
|
46
|
+
adapter: RuntimeAdapter,
|
|
47
|
+
proxyContext?: ProxyProjectSourceContext,
|
|
48
|
+
): Promise<VeryfrontConfig> {
|
|
49
|
+
const cacheKey = proxyContext?.projectId ?? proxyContext?.projectSlug;
|
|
50
|
+
return await getConfig(projectDir, adapter, cacheKey ? { cacheKey } : undefined);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export async function withProjectSourceContext<T>(
|
|
54
|
+
projectDir: string,
|
|
55
|
+
run: (context: ProjectSourceExecutionContext) => Promise<T>,
|
|
56
|
+
): Promise<T> {
|
|
57
|
+
const baseAdapter = await runtime.get();
|
|
58
|
+
const initialConfig = await getConfig(projectDir, baseAdapter);
|
|
59
|
+
const adapter = await enhanceAdapterWithFS(baseAdapter, initialConfig, projectDir);
|
|
60
|
+
const proxyContext = getProxyProjectSourceContext();
|
|
61
|
+
|
|
62
|
+
if (
|
|
63
|
+
proxyContext &&
|
|
64
|
+
isExtendedFSAdapter(adapter.fs) &&
|
|
65
|
+
adapter.fs.isMultiProjectMode()
|
|
66
|
+
) {
|
|
67
|
+
return await adapter.fs.runWithContext(
|
|
68
|
+
proxyContext.projectSlug,
|
|
69
|
+
proxyContext.token,
|
|
70
|
+
async () => {
|
|
71
|
+
const config = await loadProjectConfig(projectDir, adapter, proxyContext);
|
|
72
|
+
return await run({
|
|
73
|
+
adapter,
|
|
74
|
+
config,
|
|
75
|
+
projectDir,
|
|
76
|
+
projectId: proxyContext.projectId,
|
|
77
|
+
proxyContext,
|
|
78
|
+
});
|
|
79
|
+
},
|
|
80
|
+
proxyContext.projectId,
|
|
81
|
+
{
|
|
82
|
+
productionMode: false,
|
|
83
|
+
branch: proxyContext.branchRef ?? null,
|
|
84
|
+
},
|
|
85
|
+
);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const config = await loadProjectConfig(projectDir, adapter);
|
|
89
|
+
return await run({
|
|
90
|
+
adapter,
|
|
91
|
+
config,
|
|
92
|
+
projectDir,
|
|
93
|
+
projectId: proxyContext?.projectId,
|
|
94
|
+
proxyContext: proxyContext ?? undefined,
|
|
95
|
+
});
|
|
96
|
+
}
|
package/src/deno.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export default {
|
|
2
2
|
"name": "veryfront",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.77",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"nodeModulesDir": "auto",
|
|
6
6
|
"exclude": [
|
|
@@ -32,6 +32,7 @@ export default {
|
|
|
32
32
|
"./workflow/discovery": "./src/workflow/discovery/index.ts",
|
|
33
33
|
"./prompt": "./src/prompt/index.ts",
|
|
34
34
|
"./resource": "./src/resource/index.ts",
|
|
35
|
+
"./jobs": "./src/jobs/index.ts",
|
|
35
36
|
"./mcp": "./src/mcp/index.ts",
|
|
36
37
|
"./middleware": "./src/middleware/index.ts",
|
|
37
38
|
"./utils": "./src/utils/index.ts",
|
|
@@ -61,6 +62,7 @@ export default {
|
|
|
61
62
|
"veryfront/components/ai": "./src/react/components/ai/index.ts",
|
|
62
63
|
"veryfront/sandbox": "./src/sandbox/index.ts",
|
|
63
64
|
"veryfront/embedding": "./src/embedding/index.ts",
|
|
65
|
+
"veryfront/jobs": "./src/jobs/index.ts",
|
|
64
66
|
"veryfront/agent/react": "./src/agent/react/index.ts",
|
|
65
67
|
"veryfront/agent/testing": "./src/agent/testing/index.ts",
|
|
66
68
|
"veryfront/agent/middleware": "./src/agent/middleware/index.ts",
|
|
@@ -112,6 +114,7 @@ export default {
|
|
|
112
114
|
"#cli/shared/types": "./cli/shared/types.ts",
|
|
113
115
|
"#cli/shared/constants": "./cli/shared/constants.ts",
|
|
114
116
|
"#cli/shared/config": "./cli/shared/config.ts",
|
|
117
|
+
"#cli/shared/project-source-context": "./cli/shared/project-source-context.ts",
|
|
115
118
|
"#cli/shared/slug": "./cli/shared/slug.ts",
|
|
116
119
|
"#cli/shared/reserve-slug": "./cli/shared/reserve-slug.ts",
|
|
117
120
|
"#cli/shared/server-startup": "./cli/shared/server-startup.ts",
|
|
@@ -134,6 +137,7 @@ export default {
|
|
|
134
137
|
"#veryfront/react": "./src/react/index.ts",
|
|
135
138
|
"#veryfront/rendering": "./src/rendering/index.ts",
|
|
136
139
|
"#veryfront/resource": "./src/resource/index.ts",
|
|
140
|
+
"#veryfront/jobs": "./src/jobs/index.ts",
|
|
137
141
|
"#veryfront/routing": "./src/routing/index.ts",
|
|
138
142
|
"#veryfront/security": "./src/security/index.ts",
|
|
139
143
|
"#veryfront/skill": "./src/skill/index.ts",
|
|
@@ -253,6 +257,7 @@ export default {
|
|
|
253
257
|
"tailwindcss/colors": "https://esm.sh/tailwindcss@4.1.8/colors",
|
|
254
258
|
"redis": "npm:redis@4.6.13",
|
|
255
259
|
"pg": "npm:pg",
|
|
260
|
+
"jose": "npm:jose@5.9.6",
|
|
256
261
|
"@opentelemetry/api": "npm:@opentelemetry/api@1",
|
|
257
262
|
"@opentelemetry/core": "npm:@opentelemetry/core@1",
|
|
258
263
|
"@opentelemetry/context-async-hooks": "npm:@opentelemetry/context-async-hooks@1",
|
|
@@ -290,11 +295,11 @@ export default {
|
|
|
290
295
|
"tasks": {
|
|
291
296
|
"setup": "deno run --allow-all scripts/setup.ts",
|
|
292
297
|
"generate": "deno run -A scripts/build/generate-templates-manifest.ts && deno run -A scripts/build/generate-dev-ui-manifest.ts && deno run -A scripts/build/prebundle-client-scripts.ts && deno run -A scripts/build/prebundle-bridge.ts",
|
|
293
|
-
"start": "deno task generate && deno run --allow-
|
|
294
|
-
"start:headless": "deno task generate && deno run --allow-
|
|
295
|
-
"proxy": "deno task generate && deno run --allow-
|
|
298
|
+
"start": "deno task generate && deno run --allow-read --allow-write --allow-net --allow-env --allow-run --allow-sys --unstable-worker-options --unstable-net cli/main.ts",
|
|
299
|
+
"start:headless": "deno task generate && deno run --allow-read --allow-write --allow-net --allow-env --allow-run --allow-sys --unstable-worker-options --unstable-net cli/main.ts --headless",
|
|
300
|
+
"proxy": "deno task generate && deno run --allow-read --allow-write --allow-net --allow-env --allow-run --allow-sys --unstable-worker-options --unstable-net cli/main.ts serve --mode=proxy",
|
|
296
301
|
"dev": "deno task generate && deno run --allow-all cli/main.ts dev",
|
|
297
|
-
"production": "deno task generate && deno run --allow-
|
|
302
|
+
"production": "deno task generate && deno run --allow-read --allow-write --allow-net --allow-env --allow-run --allow-sys --unstable-worker-options --unstable-net cli/main.ts serve --mode=production",
|
|
298
303
|
"build:prepare": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run -A scripts/build/prepare-framework-sources.ts",
|
|
299
304
|
"build": "deno task build:prepare && deno run -A scripts/build/compile-binary.ts --output ./bin/veryfront",
|
|
300
305
|
"build:npm": "deno run -A scripts/build/generate-integrations-module.ts && deno task generate && deno run -A scripts/build/build-npm-dnt.ts",
|
|
@@ -309,11 +314,12 @@ export default {
|
|
|
309
314
|
"test:coverage:integration": "rm -rf coverage && VF_DISABLE_LRU_INTERVAL=1 SSR_TRANSFORM_PER_PROJECT_LIMIT=0 REVALIDATION_PER_PROJECT_LIMIT=0 NODE_ENV=production LOG_FORMAT=text deno test --no-check --parallel --fail-fast --allow-all --coverage=coverage '--ignore=tests/e2e,tests/integration/compiled-binary-e2e.test.ts' tests --unstable-worker-options --unstable-net || exit 1",
|
|
310
315
|
"coverage:report": "deno coverage coverage --include=src/ --exclude=tests --exclude=src/**/*_test.ts --exclude=src/**/*_test.tsx --exclude=src/**/*.test.ts --exclude=src/**/*.test.tsx --lcov > coverage/lcov.info && deno run --allow-read scripts/lint/check-coverage.ts 80",
|
|
311
316
|
"coverage:html": "deno coverage coverage --include=src/ --exclude=tests --exclude=src/**/*_test.ts --exclude=src/**/*_test.tsx --exclude=src/**/*.test.ts --exclude=src/**/*.test.tsx --html",
|
|
317
|
+
"bench": "VF_DISABLE_LRU_INTERVAL=1 NODE_ENV=production LOG_FORMAT=text deno bench --no-check --allow-all --unstable-worker-options --unstable-net $(find src -name '*.bench.ts')",
|
|
312
318
|
"clean": "rm -rf .cache/",
|
|
313
319
|
"lint": "DENO_NO_PACKAGE_JSON=1 deno lint src/ cli/",
|
|
314
320
|
"fmt": "deno fmt src/ cli/",
|
|
315
321
|
"fmt:check": "deno fmt --check src/ cli/",
|
|
316
|
-
"typecheck": "deno task generate && deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/modules/index.ts src/proxy/main.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/mcp/index.ts src/provider/index.ts",
|
|
322
|
+
"typecheck": "deno task generate && deno check src/index.ts cli/main.ts src/server/index.ts src/routing/api/index.ts src/rendering/index.ts src/platform/index.ts src/platform/adapters/index.ts src/build/index.ts src/build/production-build/index.ts src/transforms/index.ts src/config/index.ts src/utils/index.ts src/data/index.ts src/security/index.ts src/middleware/index.ts src/server/handlers/dev/index.ts src/server/handlers/request/api/index.ts src/rendering/cache/index.ts src/rendering/cache/stores/index.ts src/rendering/rsc/actions/index.ts src/html/index.ts src/modules/index.ts src/proxy/main.ts src/chat/index.ts src/markdown/index.ts src/mdx/index.ts src/fs/index.ts src/oauth/index.ts src/agent/index.ts src/tool/index.ts src/workflow/index.ts src/prompt/index.ts src/resource/index.ts src/jobs/index.ts src/mcp/index.ts src/provider/index.ts",
|
|
317
323
|
"verify": "deno task generate && deno fmt --check src/ cli/ && DENO_NO_PACKAGE_JSON=1 deno lint src/ cli/ && deno task lint:style && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task docs:validate && deno task typecheck && deno task test && deno task test:e2e:binary",
|
|
318
324
|
"verify:quick": "deno task generate && deno fmt --check src/ cli/ && DENO_NO_PACKAGE_JSON=1 deno lint src/ cli/ && deno task lint:style && deno task lint:cli-boundary && deno task lint:wildcard-exports && deno task lint:barrel-jsdoc && deno task docs:validate && deno task typecheck",
|
|
319
325
|
"docs": "rm -rf docs/reference && deno run --allow-read --allow-write --allow-run scripts/docs/generate-api-reference.ts",
|
|
@@ -6,7 +6,10 @@ import { TimeoutError, withTimeoutThrow } from "../rendering/utils/stream-utils.
|
|
|
6
6
|
import { withSpan } from "../observability/tracing/otlp-setup.js";
|
|
7
7
|
import { CircuitBreakerOpen, getCircuitBreaker } from "../utils/circuit-breaker.js";
|
|
8
8
|
import { getWorkerPool, isDataIsolationEnabled } from "../security/sandbox/worker-pool.js";
|
|
9
|
-
import
|
|
9
|
+
import {
|
|
10
|
+
MAX_WORKER_BODY_BYTES,
|
|
11
|
+
type WorkerResponse,
|
|
12
|
+
} from "../security/sandbox/worker-types.js";
|
|
10
13
|
|
|
11
14
|
/**
|
|
12
15
|
* Options for isolated data fetching through Worker pool.
|
|
@@ -110,7 +113,32 @@ export class ServerDataFetcher {
|
|
|
110
113
|
context: DataContext,
|
|
111
114
|
): Promise<DataResult> {
|
|
112
115
|
const pool = getWorkerPool();
|
|
113
|
-
|
|
116
|
+
let body: Uint8Array | null = null;
|
|
117
|
+
if (context.request?.body) {
|
|
118
|
+
// Fast path: reject before buffering if Content-Length is known
|
|
119
|
+
const contentLength = context.request.headers?.get("content-length");
|
|
120
|
+
if (contentLength) {
|
|
121
|
+
const bytes = parseInt(contentLength, 10);
|
|
122
|
+
if (bytes > MAX_WORKER_BODY_BYTES) {
|
|
123
|
+
throw new Error(
|
|
124
|
+
`Request body too large for isolated data fetch (${
|
|
125
|
+
(bytes / 1024 / 1024).toFixed(1)
|
|
126
|
+
} MB, limit ${MAX_WORKER_BODY_BYTES / 1024 / 1024} MB)`,
|
|
127
|
+
);
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
body = new Uint8Array(await context.request.arrayBuffer());
|
|
132
|
+
|
|
133
|
+
// Fallback: check actual size for chunked/streaming bodies
|
|
134
|
+
if (body.byteLength > MAX_WORKER_BODY_BYTES) {
|
|
135
|
+
throw new Error(
|
|
136
|
+
`Request body too large for isolated data fetch (${
|
|
137
|
+
(body.byteLength / 1024 / 1024).toFixed(1)
|
|
138
|
+
} MB, limit ${MAX_WORKER_BODY_BYTES / 1024 / 1024} MB)`,
|
|
139
|
+
);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
114
142
|
|
|
115
143
|
const workerResponse: WorkerResponse = await pool.execute(
|
|
116
144
|
projectDir,
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Jobs module for durable project-scoped background execution.
|
|
3
|
+
*
|
|
4
|
+
* Provides a public SDK surface for one-off jobs, cron jobs, batch summaries,
|
|
5
|
+
* job target discovery, and the canonical split between user-visible `events`
|
|
6
|
+
* and raw debugging `logs`.
|
|
7
|
+
*
|
|
8
|
+
* @module
|
|
9
|
+
*
|
|
10
|
+
* @example
|
|
11
|
+
* ```ts
|
|
12
|
+
* import { VeryfrontJobsClient } from "veryfront/jobs";
|
|
13
|
+
*
|
|
14
|
+
* const jobs = new VeryfrontJobsClient({
|
|
15
|
+
* authToken: process.env.VERYFRONT_API_TOKEN,
|
|
16
|
+
* projectReference: "my-project",
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* const job = await jobs.create({
|
|
20
|
+
* name: "Ingest 1 file",
|
|
21
|
+
* target: "task:knowledge-ingest",
|
|
22
|
+
* config: {
|
|
23
|
+
* file_count: 1,
|
|
24
|
+
* upload_ids: ["00000000-0000-0000-0000-000000000000"],
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* const events = await jobs.events(job.id);
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
import "../../_dnt.polyfills.js";
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
export {
|
|
35
|
+
type CreateCronJobInput,
|
|
36
|
+
type CreateJobInput,
|
|
37
|
+
createJobsClient,
|
|
38
|
+
type ListBatchJobsOptions,
|
|
39
|
+
type ListCronJobsOptions,
|
|
40
|
+
type ListJobEventsOptions,
|
|
41
|
+
type ListJobsOptions,
|
|
42
|
+
type ProjectScopedOptions,
|
|
43
|
+
type UpdateCronJobInput,
|
|
44
|
+
VeryfrontJobsClient,
|
|
45
|
+
type VeryfrontJobsClientConfig,
|
|
46
|
+
} from "./jobs-client.js";
|
|
47
|
+
export {
|
|
48
|
+
type CronJob,
|
|
49
|
+
CronJobSchema,
|
|
50
|
+
type CronJobStatus,
|
|
51
|
+
CronJobStatusSchema,
|
|
52
|
+
type Job,
|
|
53
|
+
type JobBatch,
|
|
54
|
+
type JobBatchResult,
|
|
55
|
+
JobBatchResultSchema,
|
|
56
|
+
JobBatchSchema,
|
|
57
|
+
type JobBatchStatusCounts,
|
|
58
|
+
JobBatchStatusCountsSchema,
|
|
59
|
+
type JobEvent,
|
|
60
|
+
JobEventSchema,
|
|
61
|
+
type JobEventsResponse,
|
|
62
|
+
JobEventsResponseSchema,
|
|
63
|
+
type JobLogsResponse,
|
|
64
|
+
JobLogsResponseSchema,
|
|
65
|
+
type JobResult,
|
|
66
|
+
JobResultSchema,
|
|
67
|
+
JobSchema,
|
|
68
|
+
type JobStatus,
|
|
69
|
+
JobStatusSchema,
|
|
70
|
+
type JobTargetDefinition,
|
|
71
|
+
JobTargetDefinitionSchema,
|
|
72
|
+
type JobTargetDefinitionsResponse,
|
|
73
|
+
JobTargetDefinitionsResponseSchema,
|
|
74
|
+
type KnowledgeIngestBatchSource,
|
|
75
|
+
KnowledgeIngestBatchSourceSchema,
|
|
76
|
+
type KnowledgeIngestFileResult,
|
|
77
|
+
KnowledgeIngestFileResultSchema,
|
|
78
|
+
PageInfoSchema,
|
|
79
|
+
type PaginatedCronJobsResponse,
|
|
80
|
+
PaginatedCronJobsResponseSchema,
|
|
81
|
+
type PaginatedJobsResponse,
|
|
82
|
+
PaginatedJobsResponseSchema,
|
|
83
|
+
type ReservedJobTargetFamily,
|
|
84
|
+
ReservedJobTargetFamilySchema,
|
|
85
|
+
} from "./schemas.js";
|