@useconvoy/cli 0.63.0 → 0.89.0
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 +98 -0
- package/dist/bin/convoy.js +13 -1
- package/dist/bin/convoy.js.map +1 -1
- package/dist/src/agent/app/chunk-scrub.js +12 -0
- package/dist/src/agent/app/chunk-scrub.js.map +1 -1
- package/dist/src/agent/app/runner.d.ts +2 -0
- package/dist/src/agent/app/runner.js +2 -1
- package/dist/src/agent/app/runner.js.map +1 -1
- package/dist/src/agent/app/thread-processor.d.ts +1 -1
- package/dist/src/agent/app/thread-processor.js +46 -14
- package/dist/src/agent/app/thread-processor.js.map +1 -1
- package/dist/src/agent/app/worktree-op-processor.js +50 -5
- package/dist/src/agent/app/worktree-op-processor.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/interactions.d.ts +6 -2
- package/dist/src/agent/runtimes/claudeCode/interactions.js +36 -0
- package/dist/src/agent/runtimes/claudeCode/interactions.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/models.d.ts +1 -1
- package/dist/src/agent/runtimes/claudeCode/models.js +2 -0
- package/dist/src/agent/runtimes/claudeCode/models.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/runner.js +132 -57
- package/dist/src/agent/runtimes/claudeCode/runner.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/runtime.js +7 -0
- package/dist/src/agent/runtimes/claudeCode/runtime.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/usage/errors.d.ts +3 -0
- package/dist/src/agent/runtimes/claudeCode/usage/errors.js +4 -0
- package/dist/src/agent/runtimes/claudeCode/usage/errors.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/usage/index.d.ts +4 -0
- package/dist/src/agent/runtimes/claudeCode/usage/index.js +44 -0
- package/dist/src/agent/runtimes/claudeCode/usage/index.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/usage/parsers.d.ts +7 -0
- package/dist/src/agent/runtimes/claudeCode/usage/parsers.js +84 -0
- package/dist/src/agent/runtimes/claudeCode/usage/parsers.js.map +1 -0
- package/dist/src/agent/runtimes/claudeCode/usage/validators.d.ts +25 -0
- package/dist/src/agent/runtimes/claudeCode/usage/validators.js +2 -0
- package/dist/src/agent/runtimes/claudeCode/usage/validators.js.map +1 -0
- package/dist/src/agent/runtimes/codex/app-server-runner.d.ts +4 -0
- package/dist/src/agent/runtimes/codex/app-server-runner.js +115 -57
- package/dist/src/agent/runtimes/codex/app-server-runner.js.map +1 -1
- package/dist/src/agent/runtimes/codex/auth.d.ts +9 -0
- package/dist/src/agent/runtimes/codex/auth.js +90 -0
- package/dist/src/agent/runtimes/codex/auth.js.map +1 -0
- package/dist/src/agent/runtimes/codex/commands.d.ts +1 -1
- package/dist/src/agent/runtimes/codex/commands.js +1 -1
- package/dist/src/agent/runtimes/codex/commands.js.map +1 -1
- package/dist/src/agent/runtimes/codex/errors.d.ts +7 -0
- package/dist/src/agent/runtimes/codex/errors.js +60 -0
- package/dist/src/agent/runtimes/codex/errors.js.map +1 -0
- package/dist/src/agent/runtimes/codex/interactions.js +2 -52
- package/dist/src/agent/runtimes/codex/interactions.js.map +1 -1
- package/dist/src/agent/runtimes/codex/lifecycle.d.ts +12 -1
- package/dist/src/agent/runtimes/codex/lifecycle.js +97 -6
- package/dist/src/agent/runtimes/codex/lifecycle.js.map +1 -1
- package/dist/src/agent/runtimes/codex/runner.js +6 -0
- package/dist/src/agent/runtimes/codex/runner.js.map +1 -1
- package/dist/src/agent/runtimes/codex/runtime.js +2 -1
- package/dist/src/agent/runtimes/codex/runtime.js.map +1 -1
- package/dist/src/agent/runtimes/codex/usage/index.d.ts +7 -0
- package/dist/src/agent/runtimes/codex/usage/index.js +63 -0
- package/dist/src/agent/runtimes/codex/usage/index.js.map +1 -0
- package/dist/src/agent/runtimes/codex/usage/parsers.d.ts +6 -0
- package/dist/src/agent/runtimes/codex/usage/parsers.js +58 -0
- package/dist/src/agent/runtimes/codex/usage/parsers.js.map +1 -0
- package/dist/src/agent/runtimes/codex/usage/validators.d.ts +16 -0
- package/dist/src/agent/runtimes/codex/usage/validators.js +2 -0
- package/dist/src/agent/runtimes/codex/usage/validators.js.map +1 -0
- package/dist/src/agent/runtimes/contracts.d.ts +10 -0
- package/dist/src/agent/runtimes/contracts.js +2 -0
- package/dist/src/agent/runtimes/contracts.js.map +1 -1
- package/dist/src/agent/runtimes/cursor/models.js +2 -0
- package/dist/src/agent/runtimes/cursor/models.js.map +1 -1
- package/dist/src/agent/runtimes/message-format.js +3 -1
- package/dist/src/agent/runtimes/message-format.js.map +1 -1
- package/dist/src/agent/runtimes/registry.js +17 -1
- package/dist/src/agent/runtimes/registry.js.map +1 -1
- package/dist/src/agent/runtimes/validators.d.ts +4 -0
- package/dist/src/agent/runtimes/validators.js +101 -0
- package/dist/src/agent/runtimes/validators.js.map +1 -0
- package/dist/src/cli.js +10 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/browser/command.d.ts +2 -0
- package/dist/src/commands/browser/command.js +42 -0
- package/dist/src/commands/browser/command.js.map +1 -0
- package/dist/src/commands/browser/smoke.d.ts +10 -0
- package/dist/src/commands/browser/smoke.js +67 -0
- package/dist/src/commands/browser/smoke.js.map +1 -0
- package/dist/src/commands/browser/validators.d.ts +18 -0
- package/dist/src/commands/browser/validators.js +2 -0
- package/dist/src/commands/browser/validators.js.map +1 -0
- package/dist/src/commands/browser/workflow.d.ts +4 -0
- package/dist/src/commands/browser/workflow.js +86 -0
- package/dist/src/commands/browser/workflow.js.map +1 -0
- package/dist/src/commands/connect/command.js +1 -0
- package/dist/src/commands/connect/command.js.map +1 -1
- package/dist/src/commands/connect/workflow.d.ts +7 -0
- package/dist/src/commands/connect/workflow.js +68 -4
- package/dist/src/commands/connect/workflow.js.map +1 -1
- package/dist/src/commands/devcontainer/command.js +3 -1
- package/dist/src/commands/devcontainer/command.js.map +1 -1
- package/dist/src/commands/devcontainer/install.d.ts +1 -0
- package/dist/src/commands/devcontainer/install.js +17 -7
- package/dist/src/commands/devcontainer/install.js.map +1 -1
- package/dist/src/commands/environment/command.d.ts +5 -0
- package/dist/src/commands/environment/command.js +123 -0
- package/dist/src/commands/environment/command.js.map +1 -0
- package/dist/src/commands/environment/docker.d.ts +13 -0
- package/dist/src/commands/environment/docker.js +65 -0
- package/dist/src/commands/environment/docker.js.map +1 -0
- package/dist/src/commands/environment/index.d.ts +60 -0
- package/dist/src/commands/environment/index.js +36 -0
- package/dist/src/commands/environment/index.js.map +1 -0
- package/dist/src/commands/environment/paths.d.ts +6 -0
- package/dist/src/commands/environment/paths.js +58 -0
- package/dist/src/commands/environment/paths.js.map +1 -0
- package/dist/src/commands/environment/projects.d.ts +3 -0
- package/dist/src/commands/environment/projects.js +46 -0
- package/dist/src/commands/environment/projects.js.map +1 -0
- package/dist/src/commands/environment/resolution.d.ts +11 -0
- package/dist/src/commands/environment/resolution.js +4 -0
- package/dist/src/commands/environment/resolution.js.map +1 -0
- package/dist/src/commands/environment/setup-entrypoint.d.ts +1 -0
- package/dist/src/commands/environment/setup-entrypoint.js +17 -0
- package/dist/src/commands/environment/setup-entrypoint.js.map +1 -0
- package/dist/src/commands/environment/validators.d.ts +65 -0
- package/dist/src/commands/environment/validators.js +36 -0
- package/dist/src/commands/environment/validators.js.map +1 -0
- package/dist/src/commands/environment/workflow.d.ts +48 -0
- package/dist/src/commands/environment/workflow.js +172 -0
- package/dist/src/commands/environment/workflow.js.map +1 -0
- package/dist/src/commands/keys/command.js +99 -13
- package/dist/src/commands/keys/command.js.map +1 -1
- package/dist/src/commands/keys/workflow.d.ts +68 -0
- package/dist/src/commands/keys/workflow.js +147 -0
- package/dist/src/commands/keys/workflow.js.map +1 -0
- package/dist/src/commands/project/command.d.ts +2 -0
- package/dist/src/commands/project/command.js +53 -0
- package/dist/src/commands/project/command.js.map +1 -0
- package/dist/src/commands/project/launcher.d.ts +44 -0
- package/dist/src/commands/project/launcher.js +100 -0
- package/dist/src/commands/project/launcher.js.map +1 -0
- package/dist/src/commands/project/validators.d.ts +87 -0
- package/dist/src/commands/project/validators.js +53 -0
- package/dist/src/commands/project/validators.js.map +1 -0
- package/dist/src/commands/project/worker.d.ts +2 -0
- package/dist/src/commands/project/worker.js +90 -0
- package/dist/src/commands/project/worker.js.map +1 -0
- package/dist/src/commands/project/workflow.d.ts +47 -0
- package/dist/src/commands/project/workflow.js +238 -0
- package/dist/src/commands/project/workflow.js.map +1 -0
- package/dist/src/commands/service/attach.d.ts +3 -0
- package/dist/src/commands/service/attach.js +155 -0
- package/dist/src/commands/service/attach.js.map +1 -0
- package/dist/src/commands/service/bridge.d.ts +3 -0
- package/dist/src/commands/service/bridge.js +105 -0
- package/dist/src/commands/service/bridge.js.map +1 -0
- package/dist/src/commands/service/client.d.ts +26 -0
- package/dist/src/commands/service/client.js +154 -0
- package/dist/src/commands/service/client.js.map +1 -0
- package/dist/src/commands/service/command.d.ts +3 -0
- package/dist/src/commands/service/command.js +186 -0
- package/dist/src/commands/service/command.js.map +1 -0
- package/dist/src/commands/service/errors.d.ts +9 -0
- package/dist/src/commands/service/errors.js +13 -0
- package/dist/src/commands/service/errors.js.map +1 -0
- package/dist/src/commands/service/formatters.d.ts +5 -0
- package/dist/src/commands/service/formatters.js +58 -0
- package/dist/src/commands/service/formatters.js.map +1 -0
- package/dist/src/commands/service/logs.d.ts +19 -0
- package/dist/src/commands/service/logs.js +64 -0
- package/dist/src/commands/service/logs.js.map +1 -0
- package/dist/src/commands/service/output.d.ts +18 -0
- package/dist/src/commands/service/output.js +60 -0
- package/dist/src/commands/service/output.js.map +1 -0
- package/dist/src/commands/service/parsers.d.ts +4 -0
- package/dist/src/commands/service/parsers.js +41 -0
- package/dist/src/commands/service/parsers.js.map +1 -0
- package/dist/src/commands/service/paths.d.ts +7 -0
- package/dist/src/commands/service/paths.js +44 -0
- package/dist/src/commands/service/paths.js.map +1 -0
- package/dist/src/commands/service/resolution.d.ts +5 -0
- package/dist/src/commands/service/resolution.js +36 -0
- package/dist/src/commands/service/resolution.js.map +1 -0
- package/dist/src/commands/service/runs.d.ts +3 -0
- package/dist/src/commands/service/runs.js +58 -0
- package/dist/src/commands/service/runs.js.map +1 -0
- package/dist/src/commands/service/server.d.ts +7 -0
- package/dist/src/commands/service/server.js +206 -0
- package/dist/src/commands/service/server.js.map +1 -0
- package/dist/src/commands/service/service-entrypoint.d.ts +1 -0
- package/dist/src/commands/service/service-entrypoint.js +32 -0
- package/dist/src/commands/service/service-entrypoint.js.map +1 -0
- package/dist/src/commands/service/validators.d.ts +257 -0
- package/dist/src/commands/service/validators.js +48 -0
- package/dist/src/commands/service/validators.js.map +1 -0
- package/dist/src/commands/service/workflow.d.ts +12 -0
- package/dist/src/commands/service/workflow.js +355 -0
- package/dist/src/commands/service/workflow.js.map +1 -0
- package/dist/src/commands/setup/command.js +5 -0
- package/dist/src/commands/setup/command.js.map +1 -1
- package/dist/src/commands/setup/prompts.d.ts +1 -1
- package/dist/src/commands/setup/prompts.js +3 -1
- package/dist/src/commands/setup/prompts.js.map +1 -1
- package/dist/src/commands/setup/resolution.d.ts +14 -0
- package/dist/src/commands/setup/resolution.js +87 -0
- package/dist/src/commands/setup/resolution.js.map +1 -0
- package/dist/src/commands/setup/validators.d.ts +15 -0
- package/dist/src/commands/setup/validators.js +15 -0
- package/dist/src/commands/setup/validators.js.map +1 -0
- package/dist/src/commands/setup/workflow.d.ts +3 -1
- package/dist/src/commands/setup/workflow.js +56 -47
- package/dist/src/commands/setup/workflow.js.map +1 -1
- package/dist/src/commands/tasks/attachments/transfer.js +5 -20
- package/dist/src/commands/tasks/attachments/transfer.js.map +1 -1
- package/dist/src/commands/threads/done.d.ts +2 -0
- package/dist/src/commands/threads/done.js +20 -0
- package/dist/src/commands/threads/done.js.map +1 -0
- package/dist/src/commands/threads/index.js +3 -1
- package/dist/src/commands/threads/index.js.map +1 -1
- package/dist/src/convex/_generated/api.d.ts +2 -0
- package/dist/src/lib/config/convex-client.d.ts +5 -0
- package/dist/src/lib/config/convex-client.js +27 -1
- package/dist/src/lib/config/convex-client.js.map +1 -1
- package/dist/src/lib/config/credentials/resolution.d.ts +11 -0
- package/dist/src/lib/config/credentials/resolution.js +101 -0
- package/dist/src/lib/config/credentials/resolution.js.map +1 -0
- package/dist/src/lib/config/credentials/store.d.ts +9 -0
- package/dist/src/lib/config/credentials/store.js +147 -0
- package/dist/src/lib/config/credentials/store.js.map +1 -0
- package/dist/src/lib/config/credentials/validators.d.ts +152 -0
- package/dist/src/lib/config/credentials/validators.js +87 -0
- package/dist/src/lib/config/credentials/validators.js.map +1 -0
- package/dist/src/lib/config/index.d.ts +1 -1
- package/dist/src/lib/config/index.js +1 -1
- package/dist/src/lib/config/index.js.map +1 -1
- package/dist/src/lib/config/toml.d.ts +4 -4
- package/dist/src/lib/config/toml.js +149 -83
- package/dist/src/lib/config/toml.js.map +1 -1
- package/dist/src/lib/config/types.d.ts +8 -0
- package/dist/src/lib/config/types.js +5 -0
- package/dist/src/lib/config/types.js.map +1 -1
- package/dist/src/lib/connect-events.d.ts +5 -0
- package/dist/src/lib/connect-events.js.map +1 -1
- package/dist/src/lib/git/checkpoint.d.ts +19 -3
- package/dist/src/lib/git/checkpoint.js +58 -25
- package/dist/src/lib/git/checkpoint.js.map +1 -1
- package/dist/src/lib/git/exec.js +6 -0
- package/dist/src/lib/git/exec.js.map +1 -1
- package/dist/src/lib/git/index.d.ts +1 -0
- package/dist/src/lib/git/index.js +1 -0
- package/dist/src/lib/git/index.js.map +1 -1
- package/dist/src/lib/git/working-tree.d.ts +21 -0
- package/dist/src/lib/git/working-tree.js +90 -0
- package/dist/src/lib/git/working-tree.js.map +1 -0
- package/dist/src/lib/git/worktrees.d.ts +1 -1
- package/dist/src/lib/git/worktrees.js +4 -2
- package/dist/src/lib/git/worktrees.js.map +1 -1
- package/dist/src/lib/storage-upload.d.ts +10 -0
- package/dist/src/lib/storage-upload.js +21 -0
- package/dist/src/lib/storage-upload.js.map +1 -0
- package/dist/src/lib/thread-attachments.js +6 -27
- package/dist/src/lib/thread-attachments.js.map +1 -1
- package/dist/templates/devcontainer/Dockerfile +7 -0
- package/dist/templates/devcontainer/README.md +17 -0
- package/dist/templates/project-isolation/Dockerfile +28 -0
- package/dist/templates/project-isolation/README.md +206 -0
- package/dist/templates/project-isolation/devcontainer.json +20 -0
- package/dist/templates/project-isolation/environment.py +257 -0
- package/dist/templates/project-isolation/environment.test.py +156 -0
- package/dist/templates/project-isolation/install.py +69 -0
- package/dist/templates/project-isolation/launcher.py +401 -0
- package/dist/templates/project-isolation/launcher.test.py +265 -0
- package/dist/templates/project-isolation/seccomp-source.md +20 -0
- package/dist/templates/project-isolation/seccomp.LICENSE +202 -0
- package/dist/templates/project-isolation/seccomp.json +1173 -0
- package/dist/templates/project-isolation/start.sh +8 -0
- package/package.json +5 -3
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
import { type WorkerLaunchConfig } from "../project/validators.js";
|
|
2
|
+
import { type AuthDescriptor, type CredentialMutation } from "../../lib/config/credentials/validators.js";
|
|
3
|
+
import { z } from "zod";
|
|
4
|
+
export declare const requestSchema: z.ZodObject<{
|
|
5
|
+
v: z.ZodLiteral<1>;
|
|
6
|
+
id: z.ZodString;
|
|
7
|
+
op: z.ZodEnum<{
|
|
8
|
+
status: "status";
|
|
9
|
+
logs: "logs";
|
|
10
|
+
stop: "stop";
|
|
11
|
+
reconcile: "reconcile";
|
|
12
|
+
"project.remove": "project.remove";
|
|
13
|
+
"project.add": "project.add";
|
|
14
|
+
"credentials.mutate": "credentials.mutate";
|
|
15
|
+
hello: "hello";
|
|
16
|
+
subscribe: "subscribe";
|
|
17
|
+
outcome: "outcome";
|
|
18
|
+
"runs.list": "runs.list";
|
|
19
|
+
"runs.get": "runs.get";
|
|
20
|
+
"runs.history": "runs.history";
|
|
21
|
+
"runs.logs": "runs.logs";
|
|
22
|
+
"runs.cancel": "runs.cancel";
|
|
23
|
+
}>;
|
|
24
|
+
epoch: z.ZodOptional<z.ZodString>;
|
|
25
|
+
requestId: z.ZodOptional<z.ZodString>;
|
|
26
|
+
threadId: z.ZodOptional<z.ZodString>;
|
|
27
|
+
runId: z.ZodOptional<z.ZodString>;
|
|
28
|
+
messageId: z.ZodOptional<z.ZodString>;
|
|
29
|
+
pageCursor: z.ZodOptional<z.ZodString>;
|
|
30
|
+
limit: z.ZodOptional<z.ZodNumber>;
|
|
31
|
+
chunkAfter: z.ZodOptional<z.ZodNumber>;
|
|
32
|
+
credentials: z.ZodOptional<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
33
|
+
action: z.ZodLiteral<"add">;
|
|
34
|
+
name: z.ZodString;
|
|
35
|
+
secret: z.ZodString;
|
|
36
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
37
|
+
action: z.ZodLiteral<"rotate">;
|
|
38
|
+
name: z.ZodString;
|
|
39
|
+
secret: z.ZodString;
|
|
40
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
41
|
+
action: z.ZodLiteral<"rollback">;
|
|
42
|
+
name: z.ZodString;
|
|
43
|
+
revision: z.ZodNumber;
|
|
44
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
45
|
+
action: z.ZodLiteral<"disable">;
|
|
46
|
+
name: z.ZodString;
|
|
47
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
48
|
+
action: z.ZodLiteral<"remove">;
|
|
49
|
+
name: z.ZodString;
|
|
50
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
51
|
+
action: z.ZodLiteral<"bind">;
|
|
52
|
+
profile: z.ZodString;
|
|
53
|
+
binding: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
54
|
+
mode: z.ZodLiteral<"managed">;
|
|
55
|
+
name: z.ZodString;
|
|
56
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
57
|
+
mode: z.ZodLiteral<"disabled">;
|
|
58
|
+
}, z.core.$strict>, z.ZodObject<{
|
|
59
|
+
mode: z.ZodLiteral<"native">;
|
|
60
|
+
}, z.core.$strict>], "mode">;
|
|
61
|
+
}, z.core.$strict>], "action">>;
|
|
62
|
+
interrupt: z.ZodOptional<z.ZodBoolean>;
|
|
63
|
+
pause: z.ZodOptional<z.ZodBoolean>;
|
|
64
|
+
registration: z.ZodOptional<z.ZodObject<{
|
|
65
|
+
key: z.ZodString;
|
|
66
|
+
profile: z.ZodObject<{
|
|
67
|
+
name: z.ZodString;
|
|
68
|
+
url: z.ZodString;
|
|
69
|
+
api_key: z.ZodString;
|
|
70
|
+
project_id: z.ZodString;
|
|
71
|
+
paths: z.ZodArray<z.ZodString>;
|
|
72
|
+
streaming: z.ZodOptional<z.ZodBoolean>;
|
|
73
|
+
isolated: z.ZodOptional<z.ZodBoolean>;
|
|
74
|
+
concurrency: z.ZodOptional<z.ZodNumber>;
|
|
75
|
+
provider_key: z.ZodOptional<z.ZodString>;
|
|
76
|
+
project_isolation: z.ZodOptional<z.ZodObject<{
|
|
77
|
+
identity: z.ZodString;
|
|
78
|
+
organization_id: z.ZodString;
|
|
79
|
+
}, z.core.$strip>>;
|
|
80
|
+
}, z.core.$strip>;
|
|
81
|
+
}, z.core.$strip>>;
|
|
82
|
+
after: z.ZodOptional<z.ZodNumber>;
|
|
83
|
+
profile: z.ZodOptional<z.ZodString>;
|
|
84
|
+
}, z.core.$strict>;
|
|
85
|
+
export type ServiceRequest = z.infer<typeof requestSchema>;
|
|
86
|
+
export declare const statusSchema: z.ZodEnum<{
|
|
87
|
+
stopped: "stopped";
|
|
88
|
+
connecting: "connecting";
|
|
89
|
+
online: "online";
|
|
90
|
+
retrying: "retrying";
|
|
91
|
+
blocked: "blocked";
|
|
92
|
+
failed: "failed";
|
|
93
|
+
}>;
|
|
94
|
+
export type WorkerStatus = z.infer<typeof statusSchema>;
|
|
95
|
+
export declare const logSchema: z.ZodObject<{
|
|
96
|
+
seq: z.ZodNumber;
|
|
97
|
+
ts: z.ZodNumber;
|
|
98
|
+
profile: z.ZodString;
|
|
99
|
+
message: z.ZodString;
|
|
100
|
+
}, z.core.$strip>;
|
|
101
|
+
export type LogEntry = z.infer<typeof logSchema>;
|
|
102
|
+
export declare const workerStateSchema: z.ZodObject<{
|
|
103
|
+
authResult: z.ZodOptional<z.ZodObject<{
|
|
104
|
+
result: z.ZodEnum<{
|
|
105
|
+
configured: "configured";
|
|
106
|
+
"setup-failed": "setup-failed";
|
|
107
|
+
"request-succeeded": "request-succeeded";
|
|
108
|
+
"authentication-failed": "authentication-failed";
|
|
109
|
+
"quota-or-rate-limit": "quota-or-rate-limit";
|
|
110
|
+
"network-failed": "network-failed";
|
|
111
|
+
"request-failed": "request-failed";
|
|
112
|
+
}>;
|
|
113
|
+
at: z.ZodNumber;
|
|
114
|
+
}, z.core.$strict>>;
|
|
115
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
116
|
+
mode: z.ZodEnum<{
|
|
117
|
+
managed: "managed";
|
|
118
|
+
disabled: "disabled";
|
|
119
|
+
native: "native";
|
|
120
|
+
}>;
|
|
121
|
+
name: z.ZodOptional<z.ZodString>;
|
|
122
|
+
entryId: z.ZodOptional<z.ZodString>;
|
|
123
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
124
|
+
}, z.core.$strict>>;
|
|
125
|
+
desiredAuth: z.ZodOptional<z.ZodObject<{
|
|
126
|
+
mode: z.ZodEnum<{
|
|
127
|
+
managed: "managed";
|
|
128
|
+
disabled: "disabled";
|
|
129
|
+
native: "native";
|
|
130
|
+
}>;
|
|
131
|
+
name: z.ZodOptional<z.ZodString>;
|
|
132
|
+
entryId: z.ZodOptional<z.ZodString>;
|
|
133
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
134
|
+
}, z.core.$strict>>;
|
|
135
|
+
profile: z.ZodString;
|
|
136
|
+
status: z.ZodEnum<{
|
|
137
|
+
stopped: "stopped";
|
|
138
|
+
connecting: "connecting";
|
|
139
|
+
online: "online";
|
|
140
|
+
retrying: "retrying";
|
|
141
|
+
blocked: "blocked";
|
|
142
|
+
failed: "failed";
|
|
143
|
+
}>;
|
|
144
|
+
attempts: z.ZodNumber;
|
|
145
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
146
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
147
|
+
activeRuns: z.ZodOptional<z.ZodNumber>;
|
|
148
|
+
pending: z.ZodOptional<z.ZodBoolean>;
|
|
149
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
150
|
+
}, z.core.$strip>;
|
|
151
|
+
export type WorkerState = z.infer<typeof workerStateSchema>;
|
|
152
|
+
export declare const responseSchema: z.ZodObject<{
|
|
153
|
+
v: z.ZodLiteral<1>;
|
|
154
|
+
id: z.ZodString;
|
|
155
|
+
ok: z.ZodBoolean;
|
|
156
|
+
error: z.ZodOptional<z.ZodString>;
|
|
157
|
+
code: z.ZodOptional<z.ZodString>;
|
|
158
|
+
epoch: z.ZodOptional<z.ZodString>;
|
|
159
|
+
event: z.ZodOptional<z.ZodEnum<{
|
|
160
|
+
snapshot: "snapshot";
|
|
161
|
+
change: "change";
|
|
162
|
+
heartbeat: "heartbeat";
|
|
163
|
+
}>>;
|
|
164
|
+
result: z.ZodOptional<z.ZodUnknown>;
|
|
165
|
+
outcome: z.ZodOptional<z.ZodEnum<{
|
|
166
|
+
unknown: "unknown";
|
|
167
|
+
pending: "pending";
|
|
168
|
+
complete: "complete";
|
|
169
|
+
}>>;
|
|
170
|
+
capabilities: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
171
|
+
version: z.ZodOptional<z.ZodString>;
|
|
172
|
+
registered: z.ZodOptional<z.ZodBoolean>;
|
|
173
|
+
applied: z.ZodOptional<z.ZodBoolean>;
|
|
174
|
+
configurationError: z.ZodOptional<z.ZodBoolean>;
|
|
175
|
+
pid: z.ZodOptional<z.ZodNumber>;
|
|
176
|
+
stopping: z.ZodOptional<z.ZodBoolean>;
|
|
177
|
+
profiles: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
178
|
+
authResult: z.ZodOptional<z.ZodObject<{
|
|
179
|
+
result: z.ZodEnum<{
|
|
180
|
+
configured: "configured";
|
|
181
|
+
"setup-failed": "setup-failed";
|
|
182
|
+
"request-succeeded": "request-succeeded";
|
|
183
|
+
"authentication-failed": "authentication-failed";
|
|
184
|
+
"quota-or-rate-limit": "quota-or-rate-limit";
|
|
185
|
+
"network-failed": "network-failed";
|
|
186
|
+
"request-failed": "request-failed";
|
|
187
|
+
}>;
|
|
188
|
+
at: z.ZodNumber;
|
|
189
|
+
}, z.core.$strict>>;
|
|
190
|
+
auth: z.ZodOptional<z.ZodObject<{
|
|
191
|
+
mode: z.ZodEnum<{
|
|
192
|
+
managed: "managed";
|
|
193
|
+
disabled: "disabled";
|
|
194
|
+
native: "native";
|
|
195
|
+
}>;
|
|
196
|
+
name: z.ZodOptional<z.ZodString>;
|
|
197
|
+
entryId: z.ZodOptional<z.ZodString>;
|
|
198
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
199
|
+
}, z.core.$strict>>;
|
|
200
|
+
desiredAuth: z.ZodOptional<z.ZodObject<{
|
|
201
|
+
mode: z.ZodEnum<{
|
|
202
|
+
managed: "managed";
|
|
203
|
+
disabled: "disabled";
|
|
204
|
+
native: "native";
|
|
205
|
+
}>;
|
|
206
|
+
name: z.ZodOptional<z.ZodString>;
|
|
207
|
+
entryId: z.ZodOptional<z.ZodString>;
|
|
208
|
+
revision: z.ZodOptional<z.ZodNumber>;
|
|
209
|
+
}, z.core.$strict>>;
|
|
210
|
+
profile: z.ZodString;
|
|
211
|
+
status: z.ZodEnum<{
|
|
212
|
+
stopped: "stopped";
|
|
213
|
+
connecting: "connecting";
|
|
214
|
+
online: "online";
|
|
215
|
+
retrying: "retrying";
|
|
216
|
+
blocked: "blocked";
|
|
217
|
+
failed: "failed";
|
|
218
|
+
}>;
|
|
219
|
+
attempts: z.ZodNumber;
|
|
220
|
+
exitCode: z.ZodOptional<z.ZodNumber>;
|
|
221
|
+
identity: z.ZodOptional<z.ZodString>;
|
|
222
|
+
activeRuns: z.ZodOptional<z.ZodNumber>;
|
|
223
|
+
pending: z.ZodOptional<z.ZodBoolean>;
|
|
224
|
+
paused: z.ZodOptional<z.ZodBoolean>;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
226
|
+
entries: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
227
|
+
seq: z.ZodNumber;
|
|
228
|
+
ts: z.ZodNumber;
|
|
229
|
+
profile: z.ZodString;
|
|
230
|
+
message: z.ZodString;
|
|
231
|
+
}, z.core.$strip>>>;
|
|
232
|
+
cursor: z.ZodOptional<z.ZodNumber>;
|
|
233
|
+
gap: z.ZodOptional<z.ZodBoolean>;
|
|
234
|
+
}, z.core.$strip>;
|
|
235
|
+
export type ServiceResponse = z.infer<typeof responseSchema>;
|
|
236
|
+
export declare const startupFailureSchema: z.ZodObject<{
|
|
237
|
+
error: z.ZodString;
|
|
238
|
+
}, z.core.$strict>;
|
|
239
|
+
export declare const FRAME_LIMIT = 65536;
|
|
240
|
+
export declare const RESPONSE_LIMIT = 262144;
|
|
241
|
+
export interface ServiceProfile {
|
|
242
|
+
key: string;
|
|
243
|
+
identity: string;
|
|
244
|
+
config: WorkerLaunchConfig;
|
|
245
|
+
auth?: AuthDescriptor;
|
|
246
|
+
}
|
|
247
|
+
export type ProjectRegistration = NonNullable<ServiceRequest["registration"]>;
|
|
248
|
+
export interface ServiceManagement {
|
|
249
|
+
credentials?(request: CredentialMutation): void | Promise<void>;
|
|
250
|
+
snapshot(): ServiceProfile[] | Promise<ServiceProfile[]>;
|
|
251
|
+
register?(registration: ProjectRegistration): void | Promise<void>;
|
|
252
|
+
removal?(profile: string): {
|
|
253
|
+
identity: string;
|
|
254
|
+
last: boolean;
|
|
255
|
+
};
|
|
256
|
+
remove?(profile: string, identity: string): void;
|
|
257
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { profileKeySchema } from "../project/validators.js";
|
|
2
|
+
import { ProfileSchema } from "../../lib/config/types.js";
|
|
3
|
+
import { authResultSchema, authDescriptorSchema, credentialMutationSchema } from "../../lib/config/credentials/validators.js";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
export const requestSchema = z.object({
|
|
6
|
+
v: z.literal(1), id: z.string().min(1).max(80),
|
|
7
|
+
op: z.enum(["status", "logs", "stop", "reconcile", "project.remove", "project.add", "credentials.mutate", "hello", "subscribe", "outcome", "runs.list", "runs.get", "runs.history", "runs.logs", "runs.cancel"]),
|
|
8
|
+
epoch: z.string().uuid().optional(),
|
|
9
|
+
requestId: z.string().min(1).max(80).optional(),
|
|
10
|
+
threadId: z.string().min(1).max(256).optional(), runId: z.string().min(1).max(256).optional(),
|
|
11
|
+
messageId: z.string().min(1).max(256).optional(),
|
|
12
|
+
pageCursor: z.string().max(8192).optional(), limit: z.number().int().min(1).max(50).optional(),
|
|
13
|
+
chunkAfter: z.number().int().min(-1).optional(),
|
|
14
|
+
credentials: credentialMutationSchema.optional(),
|
|
15
|
+
interrupt: z.boolean().optional(), pause: z.boolean().optional(),
|
|
16
|
+
registration: z.object({ key: profileKeySchema, profile: ProfileSchema }).optional(),
|
|
17
|
+
after: z.number().int().nonnegative().optional(),
|
|
18
|
+
profile: profileKeySchema.optional(),
|
|
19
|
+
}).strict();
|
|
20
|
+
export const statusSchema = z.enum(["connecting", "online", "retrying", "blocked", "failed", "stopped"]);
|
|
21
|
+
export const logSchema = z.object({
|
|
22
|
+
seq: z.number().int().positive(), ts: z.number(), profile: z.string().max(80), message: z.string().max(256),
|
|
23
|
+
});
|
|
24
|
+
export const workerStateSchema = z.object({
|
|
25
|
+
authResult: authResultSchema.optional(),
|
|
26
|
+
auth: authDescriptorSchema.optional(), desiredAuth: authDescriptorSchema.optional(),
|
|
27
|
+
profile: profileKeySchema, status: statusSchema, attempts: z.number().int().nonnegative(),
|
|
28
|
+
exitCode: z.number().int().optional(),
|
|
29
|
+
identity: z.string().optional(), activeRuns: z.number().int().nonnegative().optional(),
|
|
30
|
+
pending: z.boolean().optional(), paused: z.boolean().optional(),
|
|
31
|
+
});
|
|
32
|
+
export const responseSchema = z.object({
|
|
33
|
+
v: z.literal(1), id: z.string().min(1).max(80), ok: z.boolean(), error: z.string().max(512).optional(),
|
|
34
|
+
code: z.string().max(80).optional(), epoch: z.string().uuid().optional(),
|
|
35
|
+
event: z.enum(["snapshot", "change", "heartbeat"]).optional(),
|
|
36
|
+
result: z.unknown().optional(),
|
|
37
|
+
outcome: z.enum(["pending", "complete", "unknown"]).optional(),
|
|
38
|
+
capabilities: z.array(z.string()).optional(), version: z.string().max(80).optional(),
|
|
39
|
+
registered: z.boolean().optional(), applied: z.boolean().optional(),
|
|
40
|
+
configurationError: z.boolean().optional(),
|
|
41
|
+
pid: z.number().int().positive().optional(), stopping: z.boolean().optional(),
|
|
42
|
+
profiles: z.array(workerStateSchema).max(128).optional(),
|
|
43
|
+
entries: z.array(logSchema).max(100).optional(), cursor: z.number().int().nonnegative().optional(), gap: z.boolean().optional(),
|
|
44
|
+
});
|
|
45
|
+
export const startupFailureSchema = z.object({ error: z.string().min(1).max(512) }).strict();
|
|
46
|
+
export const FRAME_LIMIT = 65536;
|
|
47
|
+
export const RESPONSE_LIMIT = 262144;
|
|
48
|
+
//# sourceMappingURL=validators.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"validators.js","sourceRoot":"","sources":["../../../../src/commands/service/validators.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAA2B,MAAM,0BAA0B,CAAC;AACrF,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,wBAAwB,EAAgD,MAAM,4CAA4C,CAAC;AAC5K,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,EAAE,CAAC,CAAC,MAAM,EAAE,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}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ChildProcess } from "node:child_process";
|
|
2
|
+
import { type ServiceProfile, type ServiceManagement } from "./validators.js";
|
|
3
|
+
type Snapshot = ServiceProfile[];
|
|
4
|
+
export declare function runService(paths: {
|
|
5
|
+
directory: string;
|
|
6
|
+
socket: string;
|
|
7
|
+
}, snapshot: Snapshot, launch?: (entry: Snapshot[number]) => ChildProcess, retryMs?: number, shutdownMs?: number, management?: ServiceManagement): Promise<{
|
|
8
|
+
done: Promise<void>;
|
|
9
|
+
stop: () => Promise<void>;
|
|
10
|
+
close: () => Promise<void>;
|
|
11
|
+
}>;
|
|
12
|
+
export {};
|