@useconvoy/cli 0.91.0 → 0.108.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 +68 -0
- package/dist/src/agent/app/chunk-flush-buffer.d.ts +2 -0
- package/dist/src/agent/app/chunk-flush-buffer.js +63 -16
- package/dist/src/agent/app/chunk-flush-buffer.js.map +1 -1
- package/dist/src/agent/app/runner.d.ts +8 -1
- package/dist/src/agent/app/runner.js +12 -3
- package/dist/src/agent/app/runner.js.map +1 -1
- package/dist/src/agent/app/thread-processor.js +1 -0
- package/dist/src/agent/app/thread-processor.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/detect.d.ts +3 -3
- package/dist/src/agent/runtimes/claudeCode/detect.js +5 -6
- package/dist/src/agent/runtimes/claudeCode/detect.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/runner.d.ts +3 -0
- package/dist/src/agent/runtimes/claudeCode/runner.js +9 -3
- package/dist/src/agent/runtimes/claudeCode/runner.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/runtime.js +1 -0
- package/dist/src/agent/runtimes/claudeCode/runtime.js.map +1 -1
- package/dist/src/agent/runtimes/claudeCode/streaming.js +30 -14
- package/dist/src/agent/runtimes/claudeCode/streaming.js.map +1 -1
- package/dist/src/agent/runtimes/codex/app-server-runner.d.ts +2 -0
- package/dist/src/agent/runtimes/codex/app-server-runner.js +48 -20
- package/dist/src/agent/runtimes/codex/app-server-runner.js.map +1 -1
- package/dist/src/agent/runtimes/codex/auth.d.ts +20 -2
- package/dist/src/agent/runtimes/codex/auth.js +79 -32
- package/dist/src/agent/runtimes/codex/auth.js.map +1 -1
- package/dist/src/agent/runtimes/codex/detect.d.ts +3 -2
- package/dist/src/agent/runtimes/codex/detect.js +4 -2
- package/dist/src/agent/runtimes/codex/detect.js.map +1 -1
- package/dist/src/agent/runtimes/codex/errors.d.ts +4 -3
- package/dist/src/agent/runtimes/codex/errors.js +24 -7
- package/dist/src/agent/runtimes/codex/errors.js.map +1 -1
- package/dist/src/agent/runtimes/codex/models.d.ts +2 -0
- package/dist/src/agent/runtimes/codex/models.js +4 -0
- package/dist/src/agent/runtimes/codex/models.js.map +1 -1
- package/dist/src/agent/runtimes/codex/runner.js +3 -1
- 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/streaming.js +24 -0
- package/dist/src/agent/runtimes/codex/streaming.js.map +1 -1
- package/dist/src/agent/runtimes/contracts.d.ts +19 -2
- package/dist/src/agent/runtimes/contracts.js.map +1 -1
- package/dist/src/agent/runtimes/cursor/streaming.js +17 -0
- package/dist/src/agent/runtimes/cursor/streaming.js.map +1 -1
- package/dist/src/agent/runtimes/opencode/runtime.js +1 -1
- package/dist/src/agent/runtimes/opencode/runtime.js.map +1 -1
- package/dist/src/agent/runtimes/opencode/streaming.js +7 -0
- package/dist/src/agent/runtimes/opencode/streaming.js.map +1 -1
- package/dist/src/agent/runtimes/registry.d.ts +2 -2
- package/dist/src/agent/runtimes/registry.js +2 -2
- package/dist/src/agent/runtimes/registry.js.map +1 -1
- package/dist/src/cli.js +5 -0
- package/dist/src/cli.js.map +1 -1
- package/dist/src/commands/connect/workflow.d.ts +6 -1
- package/dist/src/commands/connect/workflow.js +28 -7
- package/dist/src/commands/connect/workflow.js.map +1 -1
- package/dist/src/commands/environment/command.d.ts +4 -1
- package/dist/src/commands/environment/command.js +13 -9
- package/dist/src/commands/environment/command.js.map +1 -1
- package/dist/src/commands/environment/docker.d.ts +2 -0
- package/dist/src/commands/environment/docker.js +3 -3
- package/dist/src/commands/environment/docker.js.map +1 -1
- package/dist/src/commands/environment/index.d.ts +20 -2
- package/dist/src/commands/environment/index.js +19 -5
- package/dist/src/commands/environment/index.js.map +1 -1
- package/dist/src/commands/environment/paths.d.ts +2 -2
- package/dist/src/commands/environment/paths.js +7 -4
- package/dist/src/commands/environment/paths.js.map +1 -1
- package/dist/src/commands/environment/projects.d.ts +10 -0
- package/dist/src/commands/environment/projects.js +37 -1
- package/dist/src/commands/environment/projects.js.map +1 -1
- package/dist/src/commands/environment/resolution.d.ts +3 -0
- package/dist/src/commands/environment/resolution.js +29 -0
- package/dist/src/commands/environment/resolution.js.map +1 -1
- package/dist/src/commands/environment/setup-entrypoint.js +5 -2
- package/dist/src/commands/environment/setup-entrypoint.js.map +1 -1
- package/dist/src/commands/environment/validators.d.ts +36 -0
- package/dist/src/commands/environment/validators.js +4 -0
- package/dist/src/commands/environment/validators.js.map +1 -1
- package/dist/src/commands/environment/workflow.d.ts +21 -2
- package/dist/src/commands/environment/workflow.js +155 -10
- package/dist/src/commands/environment/workflow.js.map +1 -1
- package/dist/src/commands/keys/command.js +102 -43
- package/dist/src/commands/keys/command.js.map +1 -1
- package/dist/src/commands/keys/workflow.d.ts +16 -1
- package/dist/src/commands/keys/workflow.js +30 -12
- package/dist/src/commands/keys/workflow.js.map +1 -1
- package/dist/src/commands/project/command.js +5 -2
- package/dist/src/commands/project/command.js.map +1 -1
- package/dist/src/commands/project/launcher.d.ts +12 -1
- package/dist/src/commands/project/launcher.js +63 -8
- package/dist/src/commands/project/launcher.js.map +1 -1
- package/dist/src/commands/project/validators.d.ts +67 -1
- package/dist/src/commands/project/validators.js +32 -3
- package/dist/src/commands/project/validators.js.map +1 -1
- package/dist/src/commands/project/worker.js +8 -1
- package/dist/src/commands/project/worker.js.map +1 -1
- package/dist/src/commands/project/workflow.d.ts +4 -1
- package/dist/src/commands/project/workflow.js +50 -18
- package/dist/src/commands/project/workflow.js.map +1 -1
- package/dist/src/commands/remote/command.d.ts +4 -0
- package/dist/src/commands/remote/command.js +90 -0
- package/dist/src/commands/remote/command.js.map +1 -0
- package/dist/src/commands/remote/index.d.ts +3 -0
- package/dist/src/commands/remote/index.js +4 -0
- package/dist/src/commands/remote/index.js.map +1 -0
- package/dist/src/commands/remote/paths.d.ts +5 -0
- package/dist/src/commands/remote/paths.js +32 -0
- package/dist/src/commands/remote/paths.js.map +1 -0
- package/dist/src/commands/remote/ssh.d.ts +12 -0
- package/dist/src/commands/remote/ssh.js +94 -0
- package/dist/src/commands/remote/ssh.js.map +1 -0
- package/dist/src/commands/remote/validators.d.ts +18 -0
- package/dist/src/commands/remote/validators.js +11 -0
- package/dist/src/commands/remote/validators.js.map +1 -0
- package/dist/src/commands/service/attach.js +7 -2
- package/dist/src/commands/service/attach.js.map +1 -1
- package/dist/src/commands/service/bridge.js +2 -1
- package/dist/src/commands/service/bridge.js.map +1 -1
- package/dist/src/commands/service/client.d.ts +2 -1
- package/dist/src/commands/service/client.js +14 -7
- package/dist/src/commands/service/client.js.map +1 -1
- package/dist/src/commands/service/command.d.ts +1 -1
- package/dist/src/commands/service/command.js +3 -2
- package/dist/src/commands/service/command.js.map +1 -1
- package/dist/src/commands/service/errors.d.ts +9 -0
- package/dist/src/commands/service/errors.js +9 -0
- package/dist/src/commands/service/errors.js.map +1 -1
- package/dist/src/commands/service/resolution.js +6 -3
- package/dist/src/commands/service/resolution.js.map +1 -1
- package/dist/src/commands/service/runs.js +1 -1
- package/dist/src/commands/service/runs.js.map +1 -1
- package/dist/src/commands/service/server.js +1 -1
- package/dist/src/commands/service/server.js.map +1 -1
- package/dist/src/commands/service/service-entrypoint.js +1 -1
- package/dist/src/commands/service/service-entrypoint.js.map +1 -1
- package/dist/src/commands/service/validators.d.ts +75 -1
- package/dist/src/commands/service/validators.js +21 -1
- package/dist/src/commands/service/validators.js.map +1 -1
- package/dist/src/commands/service/workflow.js +11 -4
- package/dist/src/commands/service/workflow.js.map +1 -1
- package/dist/src/commands/setup/prompts.d.ts +8 -0
- package/dist/src/commands/setup/prompts.js +1 -1
- package/dist/src/commands/setup/prompts.js.map +1 -1
- package/dist/src/commands/setup/resolution.d.ts +5 -1
- package/dist/src/commands/setup/resolution.js +6 -4
- package/dist/src/commands/setup/resolution.js.map +1 -1
- package/dist/src/commands/tui/actions/app.d.ts +19 -0
- package/dist/src/commands/tui/actions/app.js +132 -0
- package/dist/src/commands/tui/actions/app.js.map +1 -0
- package/dist/src/commands/tui/actions/formatters.d.ts +2 -0
- package/dist/src/commands/tui/actions/formatters.js +48 -0
- package/dist/src/commands/tui/actions/formatters.js.map +1 -0
- package/dist/src/commands/tui/actions/index.d.ts +2 -0
- package/dist/src/commands/tui/actions/index.js +3 -0
- package/dist/src/commands/tui/actions/index.js.map +1 -0
- package/dist/src/commands/tui/actions/validators.d.ts +15 -0
- package/dist/src/commands/tui/actions/validators.js +2 -0
- package/dist/src/commands/tui/actions/validators.js.map +1 -0
- package/dist/src/commands/tui/actions/workflow.d.ts +33 -0
- package/dist/src/commands/tui/actions/workflow.js +211 -0
- package/dist/src/commands/tui/actions/workflow.js.map +1 -0
- package/dist/src/commands/tui/app.d.ts +7 -0
- package/dist/src/commands/tui/app.js +268 -0
- package/dist/src/commands/tui/app.js.map +1 -0
- package/dist/src/commands/tui/command.d.ts +2 -0
- package/dist/src/commands/tui/command.js +18 -0
- package/dist/src/commands/tui/command.js.map +1 -0
- package/dist/src/commands/tui/credentials/app.d.ts +10 -0
- package/dist/src/commands/tui/credentials/app.js +417 -0
- package/dist/src/commands/tui/credentials/app.js.map +1 -0
- package/dist/src/commands/tui/credentials/formatters.d.ts +11 -0
- package/dist/src/commands/tui/credentials/formatters.js +41 -0
- package/dist/src/commands/tui/credentials/formatters.js.map +1 -0
- package/dist/src/commands/tui/credentials/index.d.ts +1 -0
- package/dist/src/commands/tui/credentials/index.js +2 -0
- package/dist/src/commands/tui/credentials/index.js.map +1 -0
- package/dist/src/commands/tui/credentials/validators.d.ts +13 -0
- package/dist/src/commands/tui/credentials/validators.js +2 -0
- package/dist/src/commands/tui/credentials/validators.js.map +1 -0
- package/dist/src/commands/tui/credentials/workflow.d.ts +42 -0
- package/dist/src/commands/tui/credentials/workflow.js +40 -0
- package/dist/src/commands/tui/credentials/workflow.js.map +1 -0
- package/dist/src/commands/tui/dialog/app.d.ts +15 -0
- package/dist/src/commands/tui/dialog/app.js +59 -0
- package/dist/src/commands/tui/dialog/app.js.map +1 -0
- package/dist/src/commands/tui/dialog/index.d.ts +1 -0
- package/dist/src/commands/tui/dialog/index.js +2 -0
- package/dist/src/commands/tui/dialog/index.js.map +1 -0
- package/dist/src/commands/tui/environments/app.d.ts +6 -0
- package/dist/src/commands/tui/environments/app.js +176 -0
- package/dist/src/commands/tui/environments/app.js.map +1 -0
- package/dist/src/commands/tui/environments/index.d.ts +1 -0
- package/dist/src/commands/tui/environments/index.js +2 -0
- package/dist/src/commands/tui/environments/index.js.map +1 -0
- package/dist/src/commands/tui/formatters.d.ts +27 -0
- package/dist/src/commands/tui/formatters.js +94 -0
- package/dist/src/commands/tui/formatters.js.map +1 -0
- package/dist/src/commands/tui/index.d.ts +1 -0
- package/dist/src/commands/tui/index.js +2 -0
- package/dist/src/commands/tui/index.js.map +1 -0
- package/dist/src/commands/tui/logs/app.d.ts +9 -0
- package/dist/src/commands/tui/logs/app.js +181 -0
- package/dist/src/commands/tui/logs/app.js.map +1 -0
- package/dist/src/commands/tui/logs/export.d.ts +4 -0
- package/dist/src/commands/tui/logs/export.js +72 -0
- package/dist/src/commands/tui/logs/export.js.map +1 -0
- package/dist/src/commands/tui/logs/formatters.d.ts +3 -0
- package/dist/src/commands/tui/logs/formatters.js +19 -0
- package/dist/src/commands/tui/logs/formatters.js.map +1 -0
- package/dist/src/commands/tui/logs/index.d.ts +1 -0
- package/dist/src/commands/tui/logs/index.js +2 -0
- package/dist/src/commands/tui/logs/index.js.map +1 -0
- package/dist/src/commands/tui/logs/validators.d.ts +44 -0
- package/dist/src/commands/tui/logs/validators.js +14 -0
- package/dist/src/commands/tui/logs/validators.js.map +1 -0
- package/dist/src/commands/tui/logs/workflow.d.ts +25 -0
- package/dist/src/commands/tui/logs/workflow.js +133 -0
- package/dist/src/commands/tui/logs/workflow.js.map +1 -0
- package/dist/src/commands/tui/onboarding/app.d.ts +8 -0
- package/dist/src/commands/tui/onboarding/app.js +351 -0
- package/dist/src/commands/tui/onboarding/app.js.map +1 -0
- package/dist/src/commands/tui/onboarding/formatters.d.ts +2 -0
- package/dist/src/commands/tui/onboarding/formatters.js +24 -0
- package/dist/src/commands/tui/onboarding/formatters.js.map +1 -0
- package/dist/src/commands/tui/onboarding/index.d.ts +1 -0
- package/dist/src/commands/tui/onboarding/index.js +2 -0
- package/dist/src/commands/tui/onboarding/index.js.map +1 -0
- package/dist/src/commands/tui/onboarding/workflow.d.ts +18 -0
- package/dist/src/commands/tui/onboarding/workflow.js +55 -0
- package/dist/src/commands/tui/onboarding/workflow.js.map +1 -0
- package/dist/src/commands/tui/render.d.ts +2 -0
- package/dist/src/commands/tui/render.js +60 -0
- package/dist/src/commands/tui/render.js.map +1 -0
- package/dist/src/commands/tui/resolution.d.ts +37 -0
- package/dist/src/commands/tui/resolution.js +149 -0
- package/dist/src/commands/tui/resolution.js.map +1 -0
- package/dist/src/commands/tui/validators.d.ts +98 -0
- package/dist/src/commands/tui/validators.js +14 -0
- package/dist/src/commands/tui/validators.js.map +1 -0
- package/dist/src/commands/tui/workflow.d.ts +128 -0
- package/dist/src/commands/tui/workflow.js +462 -0
- package/dist/src/commands/tui/workflow.js.map +1 -0
- package/dist/src/convex/_generated/api.d.ts +10 -0
- package/dist/src/lib/config/convex-client.d.ts +10 -1
- package/dist/src/lib/config/convex-client.js +26 -4
- package/dist/src/lib/config/convex-client.js.map +1 -1
- package/dist/src/lib/config/credentials/resolution.d.ts +9 -4
- package/dist/src/lib/config/credentials/resolution.js +51 -17
- package/dist/src/lib/config/credentials/resolution.js.map +1 -1
- package/dist/src/lib/config/credentials/validators.d.ts +87 -0
- package/dist/src/lib/config/credentials/validators.js +21 -5
- package/dist/src/lib/config/credentials/validators.js.map +1 -1
- package/dist/src/lib/config/provider-keys.d.ts +10 -5
- package/dist/src/lib/config/provider-keys.js +36 -8
- package/dist/src/lib/config/provider-keys.js.map +1 -1
- package/dist/src/lib/config/toml.d.ts +8 -4
- package/dist/src/lib/config/toml.js +30 -11
- package/dist/src/lib/config/toml.js.map +1 -1
- package/dist/src/lib/config/types.d.ts +23 -2
- package/dist/src/lib/config/types.js +24 -0
- package/dist/src/lib/config/types.js.map +1 -1
- package/dist/templates/devcontainer/README.md +1 -1
- package/dist/templates/devcontainer/init-firewall.sh +1 -0
- package/dist/templates/project-isolation/README.md +5 -1
- package/dist/templates/project-isolation/__pycache__/environment.cpython-311.pyc +0 -0
- package/dist/templates/project-isolation/devcontainer.json +1 -1
- package/dist/templates/project-isolation/environment.py +19 -4
- package/dist/templates/project-isolation/environment.test.py +67 -2
- package/dist/templates/project-isolation/launcher.py +21 -9
- package/dist/templates/project-isolation/launcher.test.py +23 -0
- package/package.json +2 -1
|
@@ -0,0 +1,462 @@
|
|
|
1
|
+
import { ActionWorkflow } from "./actions/index.js";
|
|
2
|
+
import { ServiceCompatibilityError, ServiceRejectedError, ServiceUnavailableError } from "../service/errors.js";
|
|
3
|
+
import { codexAwsHost } from "../../agent/runtimes/codex/auth.js";
|
|
4
|
+
import { getCliVersion } from "../../lib/version.js";
|
|
5
|
+
import { prepareEnvironment, createConnection, connections } from "./resolution.js";
|
|
6
|
+
import { serviceInspectionSchema } from "../service/validators.js";
|
|
7
|
+
import { runPageSchema, threadPageSchema } from "./validators.js";
|
|
8
|
+
/** A client owns one subscription and one visible page. Spec: docs/specs/cli-tui.md. */
|
|
9
|
+
export class Browser {
|
|
10
|
+
targets;
|
|
11
|
+
environmentBusy = false;
|
|
12
|
+
state;
|
|
13
|
+
actions;
|
|
14
|
+
listeners = new Set();
|
|
15
|
+
abort;
|
|
16
|
+
client;
|
|
17
|
+
retry;
|
|
18
|
+
refresh;
|
|
19
|
+
generation = 0;
|
|
20
|
+
revision = 0;
|
|
21
|
+
reading = false;
|
|
22
|
+
position;
|
|
23
|
+
previous = [];
|
|
24
|
+
disposed = false;
|
|
25
|
+
constructor(targets, selected = 0, shell = async () => { throw new Error("Interactive shell handoff is unavailable."); }) {
|
|
26
|
+
this.targets = targets;
|
|
27
|
+
this.state = { scope: { connection: selected, details: true },
|
|
28
|
+
observations: targets.map(() => ({ health: "unknown", profiles: [] })),
|
|
29
|
+
rows: [], loading: false, stale: false, pageNumber: 1 };
|
|
30
|
+
this.actions = new ActionWorkflow({ targets, state: () => this.state, client: () => this.client,
|
|
31
|
+
generation: () => this.generation, revision: () => this.revision, disposed: () => this.disposed,
|
|
32
|
+
set: patch => this.set(patch), event: event => this.event(event), connect: () => this.connect(), reconcileSelection: () => this.reconcileSelection(), shell });
|
|
33
|
+
}
|
|
34
|
+
getSnapshot = () => this.state;
|
|
35
|
+
subscribe = (listener) => { this.listeners.add(listener); return () => { this.listeners.delete(listener); }; };
|
|
36
|
+
set(patch) {
|
|
37
|
+
if (this.disposed)
|
|
38
|
+
return;
|
|
39
|
+
this.state = { ...this.state, ...patch };
|
|
40
|
+
for (const listener of this.listeners)
|
|
41
|
+
listener();
|
|
42
|
+
}
|
|
43
|
+
reconcileSelection() {
|
|
44
|
+
const { scope, observations, action } = this.state;
|
|
45
|
+
if (scope.profile && observations[scope.connection].health === "connected" &&
|
|
46
|
+
!observations[scope.connection].profiles.some(p => p.profile === scope.profile) && !action?.pending && !action?.busy && !this.state.onboarding) {
|
|
47
|
+
this.revision++;
|
|
48
|
+
this.position = undefined;
|
|
49
|
+
this.previous = [];
|
|
50
|
+
this.set({ scope: { connection: scope.connection, details: false }, credentials: undefined,
|
|
51
|
+
rows: [], history: undefined, detail: undefined, next: undefined, pageNumber: 1 });
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
observe(patch) {
|
|
55
|
+
this.set({ observations: this.state.observations.map((value, i) => i === this.state.scope.connection ? { ...value, ...patch } : value) });
|
|
56
|
+
}
|
|
57
|
+
start() { void this.connect(); }
|
|
58
|
+
select(scope) {
|
|
59
|
+
if (this.locked)
|
|
60
|
+
return;
|
|
61
|
+
const changed = scope.connection !== this.state.scope.connection;
|
|
62
|
+
if (changed)
|
|
63
|
+
this.observe({ health: "unknown" });
|
|
64
|
+
this.revision++;
|
|
65
|
+
this.previous = [];
|
|
66
|
+
this.position = undefined;
|
|
67
|
+
this.set({ scope, actions: this.state.actions && (scope.details || Boolean(scope.profile)), credentials: scope.details && !scope.addProject ? this.state.credentials : undefined, action: undefined, rows: [], history: undefined, detail: undefined, next: undefined, error: undefined, stale: false, pageNumber: 1, updatedAt: undefined });
|
|
68
|
+
if (changed)
|
|
69
|
+
void this.connect();
|
|
70
|
+
else
|
|
71
|
+
this.schedule(0);
|
|
72
|
+
}
|
|
73
|
+
history(row) {
|
|
74
|
+
if (this.locked)
|
|
75
|
+
return;
|
|
76
|
+
this.revision++;
|
|
77
|
+
this.previous = [];
|
|
78
|
+
this.position = undefined;
|
|
79
|
+
this.set({ history: row, rows: [], next: undefined, pageNumber: 1, updatedAt: undefined });
|
|
80
|
+
this.schedule(0);
|
|
81
|
+
}
|
|
82
|
+
logs(row) {
|
|
83
|
+
if (this.locked)
|
|
84
|
+
return;
|
|
85
|
+
this.revision++;
|
|
86
|
+
this.set({ detail: row, loading: false });
|
|
87
|
+
clearTimeout(this.refresh);
|
|
88
|
+
if (!row)
|
|
89
|
+
this.schedule(0);
|
|
90
|
+
}
|
|
91
|
+
get locked() { return Boolean(this.state.environment) || Boolean(this.state.onboarding) || this.state.credentials === "editing" || this.actions.locked; }
|
|
92
|
+
openEnvironment(mode) {
|
|
93
|
+
if (this.state.environment || this.actions.locked || (this.state.onboarding && mode !== "update" && mode !== "start"))
|
|
94
|
+
return;
|
|
95
|
+
if (mode !== "create" && !this.targets[this.state.scope.connection].maintenance) {
|
|
96
|
+
this.set({ error: "Environment maintenance unavailable on this transport. Use its service controls." });
|
|
97
|
+
return;
|
|
98
|
+
}
|
|
99
|
+
this.revision++;
|
|
100
|
+
clearTimeout(this.refresh);
|
|
101
|
+
this.set({ environment: mode, action: undefined, loading: false });
|
|
102
|
+
}
|
|
103
|
+
async inspectEnvironment() {
|
|
104
|
+
const target = this.targets[this.state.scope.connection];
|
|
105
|
+
if (this.locked || this.state.observations[this.state.scope.connection].checkingEnvironment)
|
|
106
|
+
return;
|
|
107
|
+
const index = this.state.scope.connection;
|
|
108
|
+
this.observe({ checkingEnvironment: true, environmentError: undefined });
|
|
109
|
+
try {
|
|
110
|
+
if (!target.maintenance) {
|
|
111
|
+
const client = this.client;
|
|
112
|
+
if (!client)
|
|
113
|
+
throw new Error("Service disconnected. Retry connection first.");
|
|
114
|
+
const response = await client.request({ op: "status" });
|
|
115
|
+
if (this.state.scope.connection === index && client === this.client)
|
|
116
|
+
this.event(response);
|
|
117
|
+
if (!this.disposed)
|
|
118
|
+
this.set({ observations: this.state.observations.map((value, i) => i === index ? { ...value, checkingEnvironment: false } : value) });
|
|
119
|
+
return;
|
|
120
|
+
}
|
|
121
|
+
const environmentStatus = await target.maintenance.status();
|
|
122
|
+
if (!this.disposed)
|
|
123
|
+
this.set({ observations: this.state.observations.map((value, i) => i === index ? { ...value, environmentStatus, checkingEnvironment: false } : value) });
|
|
124
|
+
}
|
|
125
|
+
catch (error) {
|
|
126
|
+
if (!this.disposed)
|
|
127
|
+
this.set({ observations: this.state.observations.map((value, i) => i === index ? { ...value, checkingEnvironment: false, environmentStatus: undefined, environmentError: error instanceof Error ? error.message : "Cannot inspect environment." } : value) });
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
closeEnvironment() { this.set({ environment: undefined }); this.schedule(0); }
|
|
131
|
+
prepareEnvironment = prepareEnvironment;
|
|
132
|
+
async createEnvironment(form, progress, proposal) {
|
|
133
|
+
let target;
|
|
134
|
+
try {
|
|
135
|
+
target = await createConnection(form, progress, proposal);
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
if (!this.disposed) {
|
|
139
|
+
const retained = connections().targets.find(value => value.transport === "docker" && value.id === form.name);
|
|
140
|
+
if (retained && !this.targets.some(value => value.id === retained.id && value.transport === retained.transport)) {
|
|
141
|
+
this.targets.push(retained);
|
|
142
|
+
this.set({ observations: [...this.state.observations, { health: "unknown", profiles: [] }] });
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
throw error;
|
|
146
|
+
}
|
|
147
|
+
if (this.disposed)
|
|
148
|
+
return;
|
|
149
|
+
let index = this.targets.findIndex(value => value.id === target.id && value.transport === target.transport);
|
|
150
|
+
if (index < 0) {
|
|
151
|
+
index = this.targets.length;
|
|
152
|
+
this.targets.push(target);
|
|
153
|
+
this.set({ observations: [...this.state.observations, { health: "unknown", profiles: [] }] });
|
|
154
|
+
}
|
|
155
|
+
if (index !== this.state.scope.connection)
|
|
156
|
+
this.observe({ health: "unknown" });
|
|
157
|
+
this.set({ actions: false, scope: { connection: index, details: true }, rows: [], history: undefined, detail: undefined });
|
|
158
|
+
await this.connect();
|
|
159
|
+
}
|
|
160
|
+
async refreshEnvironment(result) {
|
|
161
|
+
if (this.disposed)
|
|
162
|
+
return;
|
|
163
|
+
if (result.deleted === true) {
|
|
164
|
+
const index = this.state.scope.connection;
|
|
165
|
+
this.targets.splice(index, 1);
|
|
166
|
+
this.set({ scope: { connection: 0, details: true }, actions: false, rows: [], history: undefined, detail: undefined,
|
|
167
|
+
observations: this.state.observations.filter((_, i) => i !== index) });
|
|
168
|
+
await this.connect();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
if (result.stopped === true) {
|
|
172
|
+
this.observe({ environmentStatus: { ...result, state: result.state ?? "stopped", serviceRunning: false }, environmentError: undefined });
|
|
173
|
+
return;
|
|
174
|
+
}
|
|
175
|
+
this.observe({ environmentStatus: result, environmentError: undefined, version: typeof result.serviceVersion === "string" ? result.serviceVersion : undefined });
|
|
176
|
+
await this.connect();
|
|
177
|
+
}
|
|
178
|
+
openOnboarding() {
|
|
179
|
+
if (this.locked)
|
|
180
|
+
return;
|
|
181
|
+
this.revision++;
|
|
182
|
+
clearTimeout(this.refresh);
|
|
183
|
+
this.set({ onboarding: true, action: undefined, loading: false });
|
|
184
|
+
}
|
|
185
|
+
closeOnboarding(profile, pending = false) {
|
|
186
|
+
this.set({ onboarding: false });
|
|
187
|
+
if (pending) {
|
|
188
|
+
this.select({ connection: this.state.scope.connection, details: true });
|
|
189
|
+
this.showActions(true);
|
|
190
|
+
}
|
|
191
|
+
else if (profile) {
|
|
192
|
+
this.set({ actions: false });
|
|
193
|
+
this.select({ connection: this.state.scope.connection, profile, details: false });
|
|
194
|
+
void this.connect();
|
|
195
|
+
}
|
|
196
|
+
else
|
|
197
|
+
this.schedule(0);
|
|
198
|
+
}
|
|
199
|
+
showActions(value) {
|
|
200
|
+
if (this.locked || (value && !this.state.scope.details && !this.state.scope.profile))
|
|
201
|
+
return;
|
|
202
|
+
this.revision++;
|
|
203
|
+
this.set({ actions: value, credentials: undefined, action: undefined, loading: false });
|
|
204
|
+
if (value)
|
|
205
|
+
clearTimeout(this.refresh);
|
|
206
|
+
else
|
|
207
|
+
this.schedule(0);
|
|
208
|
+
}
|
|
209
|
+
/** Environment tab, or a project's assignment editor opened from its Actions. */
|
|
210
|
+
showCredentials(value) {
|
|
211
|
+
const { scope } = this.state;
|
|
212
|
+
if (value && (this.locked || scope.addProject || (!scope.details && !scope.profile)))
|
|
213
|
+
return;
|
|
214
|
+
this.revision++;
|
|
215
|
+
this.set({ credentials: value ? scope.details ? "view" : "editing" : undefined, actions: scope.details ? false : this.state.actions, action: undefined });
|
|
216
|
+
if (!value)
|
|
217
|
+
this.schedule(0);
|
|
218
|
+
}
|
|
219
|
+
editCredentials(editing) {
|
|
220
|
+
if (this.state.credentials && this.state.scope.details)
|
|
221
|
+
this.set({ credentials: editing ? "editing" : "view" });
|
|
222
|
+
}
|
|
223
|
+
/** Sends one managed credential change through this connection's service; Docker AWS keys first open their endpoint. */
|
|
224
|
+
async mutateCredentials(request) {
|
|
225
|
+
const client = this.client;
|
|
226
|
+
if (!client || client.isClosed)
|
|
227
|
+
throw new Error("Service disconnected. Retry once the environment shows connected.");
|
|
228
|
+
if (!client.hello?.capabilities?.includes("credentials-v1"))
|
|
229
|
+
throw new Error("This service cannot change managed credentials. Update its CLI from environment Actions.");
|
|
230
|
+
if (request.action === "add" && request.aws)
|
|
231
|
+
await this.targets[this.state.scope.connection].credentials?.allowDomain?.(codexAwsHost(request.aws));
|
|
232
|
+
try {
|
|
233
|
+
return (await client.request({ op: "credentials.mutate", credentials: request })).applied === true;
|
|
234
|
+
}
|
|
235
|
+
catch (error) {
|
|
236
|
+
if (error instanceof ServiceRejectedError)
|
|
237
|
+
throw error;
|
|
238
|
+
throw new Error(`Outcome unknown. Press f to refresh before retrying. ${error instanceof Error ? error.message : ""}`);
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
unavailable = (kind, row) => this.actions.unavailable(kind, row);
|
|
242
|
+
beginAction = (kind, row) => this.actions.beginAction(kind, row);
|
|
243
|
+
dismissAction = () => this.actions.dismissAction();
|
|
244
|
+
confirmAction = () => this.actions.confirmAction();
|
|
245
|
+
moreOperationalLogs = () => this.actions.moreOperationalLogs();
|
|
246
|
+
readLogs(row, args) {
|
|
247
|
+
if (!this.client || this.client.isClosed)
|
|
248
|
+
return Promise.reject(new ServiceUnavailableError("Service disconnected"));
|
|
249
|
+
if (!this.client.hello?.capabilities?.includes("raw-logs-v1"))
|
|
250
|
+
return Promise.reject(new ServiceCompatibilityError("Update service for raw logs"));
|
|
251
|
+
const client = this.client;
|
|
252
|
+
return client.request({ op: "runs.logs", profile: row.profile, threadId: row.thread.threadId,
|
|
253
|
+
messageId: row.run?.messageId, rawLogs: true, ...args }).catch(error => {
|
|
254
|
+
if (client.isClosed)
|
|
255
|
+
throw new ServiceUnavailableError("Service disconnected");
|
|
256
|
+
throw error;
|
|
257
|
+
});
|
|
258
|
+
}
|
|
259
|
+
next() {
|
|
260
|
+
if (!this.state.next || this.state.loading || !this.position)
|
|
261
|
+
return;
|
|
262
|
+
// Bound navigation metadata as well as the rendered rows.
|
|
263
|
+
this.previous.push(this.position);
|
|
264
|
+
if (this.previous.length > 100)
|
|
265
|
+
this.previous.shift();
|
|
266
|
+
this.position = this.state.next;
|
|
267
|
+
this.revision++;
|
|
268
|
+
this.set({ rows: [], next: undefined, pageNumber: this.state.pageNumber + 1 });
|
|
269
|
+
this.schedule(0);
|
|
270
|
+
}
|
|
271
|
+
back() {
|
|
272
|
+
const previous = this.previous.pop();
|
|
273
|
+
if (!previous)
|
|
274
|
+
return;
|
|
275
|
+
this.position = previous;
|
|
276
|
+
this.revision++;
|
|
277
|
+
this.set({ rows: [], next: undefined, pageNumber: this.state.pageNumber - 1 });
|
|
278
|
+
this.schedule(0);
|
|
279
|
+
}
|
|
280
|
+
first() {
|
|
281
|
+
this.position = undefined;
|
|
282
|
+
this.previous = [];
|
|
283
|
+
this.revision++;
|
|
284
|
+
this.set({ rows: [], next: undefined, pageNumber: 1 });
|
|
285
|
+
this.schedule(0);
|
|
286
|
+
}
|
|
287
|
+
retryNow() { if (!this.client)
|
|
288
|
+
void this.connect();
|
|
289
|
+
else
|
|
290
|
+
this.schedule(0); }
|
|
291
|
+
dispose() {
|
|
292
|
+
this.disposed = true;
|
|
293
|
+
this.generation++;
|
|
294
|
+
this.revision++;
|
|
295
|
+
clearTimeout(this.retry);
|
|
296
|
+
clearTimeout(this.refresh);
|
|
297
|
+
this.abort?.abort();
|
|
298
|
+
this.client?.close();
|
|
299
|
+
this.client = undefined;
|
|
300
|
+
this.actions.dispose();
|
|
301
|
+
this.state = { ...this.state, action: undefined, rows: [], detail: undefined, history: undefined };
|
|
302
|
+
this.listeners.clear();
|
|
303
|
+
}
|
|
304
|
+
async connect() {
|
|
305
|
+
const generation = ++this.generation;
|
|
306
|
+
clearTimeout(this.retry);
|
|
307
|
+
clearTimeout(this.refresh);
|
|
308
|
+
this.abort?.abort();
|
|
309
|
+
this.client?.close();
|
|
310
|
+
this.client = undefined;
|
|
311
|
+
const abort = this.abort = new AbortController();
|
|
312
|
+
this.observe({ health: this.state.observations[this.state.scope.connection].snapshot ? "reconnecting" : "connecting" });
|
|
313
|
+
this.set({ stale: true, loading: true, error: undefined });
|
|
314
|
+
try {
|
|
315
|
+
const client = await this.targets[this.state.scope.connection].open(abort.signal);
|
|
316
|
+
if (this.disposed || generation !== this.generation) {
|
|
317
|
+
client.close();
|
|
318
|
+
return;
|
|
319
|
+
}
|
|
320
|
+
this.client = client;
|
|
321
|
+
if (!client.hello?.capabilities?.includes("runs-v1"))
|
|
322
|
+
throw new ServiceCompatibilityError("Service lacks run browsing support.");
|
|
323
|
+
void client.closed.then(() => {
|
|
324
|
+
if (this.disposed || generation !== this.generation || this.client !== client)
|
|
325
|
+
return;
|
|
326
|
+
this.client = undefined;
|
|
327
|
+
this.observe({ health: "reconnecting" });
|
|
328
|
+
this.set({ stale: true, loading: false, error: "Service disconnected. Reconnecting…" });
|
|
329
|
+
clearTimeout(this.refresh);
|
|
330
|
+
clearTimeout(this.retry);
|
|
331
|
+
this.retry = setTimeout(() => void this.connect(), 3000);
|
|
332
|
+
});
|
|
333
|
+
this.observe({ version: client.hello?.version, inspection: undefined, guidance: undefined });
|
|
334
|
+
await client.subscribe({}, event => {
|
|
335
|
+
if (generation !== this.generation || this.disposed)
|
|
336
|
+
return;
|
|
337
|
+
this.event(event);
|
|
338
|
+
});
|
|
339
|
+
if (client.hello?.capabilities?.includes("inspect-v1")) {
|
|
340
|
+
try {
|
|
341
|
+
const response = await client.request({ op: "inspect" });
|
|
342
|
+
if (generation === this.generation && !this.disposed)
|
|
343
|
+
this.observe({ inspection: serviceInspectionSchema.parse(response.result) });
|
|
344
|
+
}
|
|
345
|
+
catch {
|
|
346
|
+
// Optional metadata may fail without losing the browsing connection.
|
|
347
|
+
if (client.isClosed || this.client !== client)
|
|
348
|
+
return;
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
if (generation !== this.generation || this.disposed)
|
|
352
|
+
return;
|
|
353
|
+
this.observe({ health: "connected" });
|
|
354
|
+
this.reconcileSelection();
|
|
355
|
+
this.set({ loading: false, stale: !this.state.scope.details, error: undefined });
|
|
356
|
+
this.schedule(0);
|
|
357
|
+
}
|
|
358
|
+
catch (error) {
|
|
359
|
+
if (this.disposed || generation !== this.generation)
|
|
360
|
+
return;
|
|
361
|
+
const client = this.client;
|
|
362
|
+
this.client = undefined;
|
|
363
|
+
client?.close();
|
|
364
|
+
if (error instanceof ServiceCompatibilityError) {
|
|
365
|
+
const target = this.targets[this.state.scope.connection];
|
|
366
|
+
const guidance = target.maintenance ? [
|
|
367
|
+
"Open Actions [a], then Update CLI [u].",
|
|
368
|
+
"The host verifies a published release before confirmation.",
|
|
369
|
+
] : target.transport === "docker" ? [
|
|
370
|
+
`convoy environment update --environment ${target.id} --version ${getCliVersion()} --interrupt`,
|
|
371
|
+
] : [
|
|
372
|
+
"Stop the service using its previous CLI.",
|
|
373
|
+
`npm install -g @useconvoy/cli@${getCliVersion()}`,
|
|
374
|
+
"convoy service start -b",
|
|
375
|
+
];
|
|
376
|
+
this.observe({ health: "incompatible", guidance: ["Service update needed for browsing.", ...guidance,
|
|
377
|
+
"Updating stops connections and active work.", "Then press f to reconnect."] });
|
|
378
|
+
this.set({ loading: false, stale: true, error: "Service update needed. Press d for instructions." });
|
|
379
|
+
return;
|
|
380
|
+
}
|
|
381
|
+
this.observe({ health: "reconnecting" });
|
|
382
|
+
this.set({ loading: false, stale: true, error: `Cannot attach: ${error instanceof Error ? error.message : "Connection failed"}. Retrying…` });
|
|
383
|
+
clearTimeout(this.retry);
|
|
384
|
+
this.retry = setTimeout(() => void this.connect(), 3000);
|
|
385
|
+
}
|
|
386
|
+
}
|
|
387
|
+
event(event) {
|
|
388
|
+
if (event.event === "heartbeat")
|
|
389
|
+
return;
|
|
390
|
+
if (event.profiles) {
|
|
391
|
+
this.observe({ profiles: event.profiles, snapshot: event });
|
|
392
|
+
this.reconcileSelection();
|
|
393
|
+
}
|
|
394
|
+
// Polling below also discovers queued work, which has no worker event yet.
|
|
395
|
+
}
|
|
396
|
+
schedule(delay = 5000) {
|
|
397
|
+
clearTimeout(this.refresh);
|
|
398
|
+
if (!this.disposed && this.client)
|
|
399
|
+
this.refresh = setTimeout(() => void this.read(), delay);
|
|
400
|
+
}
|
|
401
|
+
async read() {
|
|
402
|
+
if (this.reading) {
|
|
403
|
+
this.schedule(100);
|
|
404
|
+
return;
|
|
405
|
+
}
|
|
406
|
+
const client = this.client;
|
|
407
|
+
if (!client || this.disposed)
|
|
408
|
+
return;
|
|
409
|
+
const revision = this.revision, generation = this.generation;
|
|
410
|
+
const current = () => !this.disposed && revision === this.revision && generation === this.generation;
|
|
411
|
+
if (this.state.environment || this.state.onboarding || this.state.actions || this.state.credentials || this.state.detail || this.state.scope.details) {
|
|
412
|
+
this.set({ loading: false });
|
|
413
|
+
return;
|
|
414
|
+
}
|
|
415
|
+
const profiles = this.state.observations[this.state.scope.connection].profiles.map(p => p.profile);
|
|
416
|
+
const selected = this.state.history?.profile ?? this.state.scope.profile;
|
|
417
|
+
const profile = this.position?.profile ?? selected ?? profiles[0];
|
|
418
|
+
if (!profile || !profiles.includes(profile)) {
|
|
419
|
+
this.position = undefined;
|
|
420
|
+
this.set({ rows: [], loading: false, stale: false, next: undefined, error: profile ? "Project is no longer registered. Select another project." : undefined });
|
|
421
|
+
this.schedule();
|
|
422
|
+
return;
|
|
423
|
+
}
|
|
424
|
+
this.position ??= { profile };
|
|
425
|
+
this.reading = true;
|
|
426
|
+
this.set({ loading: true });
|
|
427
|
+
try {
|
|
428
|
+
const history = this.state.history;
|
|
429
|
+
const response = await client.request({ op: history ? "runs.history" : "runs.list", profile,
|
|
430
|
+
threadId: history?.thread.threadId, pageCursor: this.position.cursor, limit: 20 });
|
|
431
|
+
if (!current())
|
|
432
|
+
return;
|
|
433
|
+
let rows, isDone, cursor;
|
|
434
|
+
if (history) {
|
|
435
|
+
const page = runPageSchema.parse(response.result);
|
|
436
|
+
rows = page.page.map(run => ({ profile, thread: history.thread, run }));
|
|
437
|
+
isDone = page.isDone;
|
|
438
|
+
cursor = page.continueCursor;
|
|
439
|
+
}
|
|
440
|
+
else {
|
|
441
|
+
const page = threadPageSchema.parse(response.result);
|
|
442
|
+
rows = page.page.map(thread => ({ profile, thread }));
|
|
443
|
+
isDone = page.isDone;
|
|
444
|
+
cursor = page.continueCursor;
|
|
445
|
+
}
|
|
446
|
+
const nextProfile = !selected ? profiles[profiles.indexOf(profile) + 1] : undefined;
|
|
447
|
+
const next = !isDone ? { profile, cursor } : nextProfile ? { profile: nextProfile } : undefined;
|
|
448
|
+
this.set({ rows, next, stale: false, error: undefined, updatedAt: Date.now() });
|
|
449
|
+
}
|
|
450
|
+
catch {
|
|
451
|
+
if (current())
|
|
452
|
+
this.set({ stale: true, error: "Run page unavailable. Check backend access; press Home to restart paging or f to retry." });
|
|
453
|
+
}
|
|
454
|
+
finally {
|
|
455
|
+
this.reading = false;
|
|
456
|
+
if (current())
|
|
457
|
+
this.set({ loading: false });
|
|
458
|
+
this.schedule(current() ? 5000 : 0);
|
|
459
|
+
}
|
|
460
|
+
}
|
|
461
|
+
}
|
|
462
|
+
//# sourceMappingURL=workflow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow.js","sourceRoot":"","sources":["../../../../src/commands/tui/workflow.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAEpD,OAAO,EAAE,yBAAyB,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAChH,OAAO,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAC;AAElE,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AACrD,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,WAAW,EAAmB,MAAM,iBAAiB,CAAC;AACrG,OAAO,EAAE,uBAAuB,EAAE,MAAM,0BAA0B,CAAC;AAGnE,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAA6D,MAAM,iBAAiB,CAAC;AAE7H,wFAAwF;AACxF,MAAM,OAAO,OAAO;IAeG;IAdrB,eAAe,G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AAW,EAAE,CAAC,CAAC,CAAC,SAAS,CAAC;YAChG,IAAI,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QAClF,CAAC;QAAC,MAAM,CAAC;YACP,IAAI,OAAO,EAAE;gBAAE,IAAI,CAAC,GAAG,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,yFAAyF,EAAE,CAAC,CAAC;QAC7I,CAAC;gBAAS,CAAC;YACT,IAAI,CAAC,OAAO,GAAG,KAAK,CAAC;YACrB,IAAI,OAAO,EAAE;gBAAE,IAAI,CAAC,GAAG,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC,CAAC;YAC5C,IAAI,CAAC,QAAQ,CAAC,OAAO,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC;CACF"}
|
|
@@ -25,6 +25,8 @@ import type * as cli_errors from "../cli/errors.js";
|
|
|
25
25
|
import type * as cli_facts from "../cli/facts.js";
|
|
26
26
|
import type * as cli_interactionRequests from "../cli/interactionRequests.js";
|
|
27
27
|
import type * as cli_lib_chunks_chunkOrder from "../cli/lib/chunks/chunkOrder.js";
|
|
28
|
+
import type * as cli_lib_chunks_formatters from "../cli/lib/chunks/formatters.js";
|
|
29
|
+
import type * as cli_lib_chunks_invariants from "../cli/lib/chunks/invariants.js";
|
|
28
30
|
import type * as cli_lib_chunks_lifecycle from "../cli/lib/chunks/lifecycle.js";
|
|
29
31
|
import type * as cli_lib_chunks_normalizedEvents from "../cli/lib/chunks/normalizedEvents.js";
|
|
30
32
|
import type * as cli_lib_claims from "../cli/lib/claims.js";
|
|
@@ -73,6 +75,7 @@ import type * as cli_lib_runtimes_codex_models from "../cli/lib/runtimes/codex/m
|
|
|
73
75
|
import type * as cli_lib_runtimes_codex_normalizeChunk from "../cli/lib/runtimes/codex/normalizeChunk.js";
|
|
74
76
|
import type * as cli_lib_runtimes_codex_runtime from "../cli/lib/runtimes/codex/runtime.js";
|
|
75
77
|
import type * as cli_lib_runtimes_codex_slashCommands from "../cli/lib/runtimes/codex/slashCommands.js";
|
|
78
|
+
import type * as cli_lib_runtimes_codex_validators from "../cli/lib/runtimes/codex/validators.js";
|
|
76
79
|
import type * as cli_lib_runtimes_contracts from "../cli/lib/runtimes/contracts.js";
|
|
77
80
|
import type * as cli_lib_runtimes_cursor_effort from "../cli/lib/runtimes/cursor/effort.js";
|
|
78
81
|
import type * as cli_lib_runtimes_cursor_models from "../cli/lib/runtimes/cursor/models.js";
|
|
@@ -297,12 +300,14 @@ import type * as tasks_lib_taskCommentsRepo from "../tasks/lib/taskCommentsRepo.
|
|
|
297
300
|
import type * as tasks_lib_taskLabelsRepo from "../tasks/lib/taskLabelsRepo.js";
|
|
298
301
|
import type * as tasks_lib_taskListsRepo from "../tasks/lib/taskListsRepo.js";
|
|
299
302
|
import type * as tasks_lib_taskRefCountersRepo from "../tasks/lib/taskRefCountersRepo.js";
|
|
303
|
+
import type * as tasks_lib_taskSectionsRepo from "../tasks/lib/taskSectionsRepo.js";
|
|
300
304
|
import type * as tasks_lib_tasksRepo from "../tasks/lib/tasksRepo.js";
|
|
301
305
|
import type * as tasks_lib_timeline_merge from "../tasks/lib/timeline/merge.js";
|
|
302
306
|
import type * as tasks_lib_timeline_validators from "../tasks/lib/timeline/validators.js";
|
|
303
307
|
import type * as tasks_lib_tree from "../tasks/lib/tree.js";
|
|
304
308
|
import type * as tasks_lib_validators from "../tasks/lib/validators.js";
|
|
305
309
|
import type * as tasks_lists from "../tasks/lists.js";
|
|
310
|
+
import type * as tasks_sections from "../tasks/sections.js";
|
|
306
311
|
import type * as tasks_timeline from "../tasks/timeline.js";
|
|
307
312
|
import type * as users_core from "../users/core.js";
|
|
308
313
|
import type * as users_errors from "../users/errors.js";
|
|
@@ -351,6 +356,8 @@ declare const fullApi: ApiFromModules<{
|
|
|
351
356
|
"cli/facts": typeof cli_facts;
|
|
352
357
|
"cli/interactionRequests": typeof cli_interactionRequests;
|
|
353
358
|
"cli/lib/chunks/chunkOrder": typeof cli_lib_chunks_chunkOrder;
|
|
359
|
+
"cli/lib/chunks/formatters": typeof cli_lib_chunks_formatters;
|
|
360
|
+
"cli/lib/chunks/invariants": typeof cli_lib_chunks_invariants;
|
|
354
361
|
"cli/lib/chunks/lifecycle": typeof cli_lib_chunks_lifecycle;
|
|
355
362
|
"cli/lib/chunks/normalizedEvents": typeof cli_lib_chunks_normalizedEvents;
|
|
356
363
|
"cli/lib/claims": typeof cli_lib_claims;
|
|
@@ -399,6 +406,7 @@ declare const fullApi: ApiFromModules<{
|
|
|
399
406
|
"cli/lib/runtimes/codex/normalizeChunk": typeof cli_lib_runtimes_codex_normalizeChunk;
|
|
400
407
|
"cli/lib/runtimes/codex/runtime": typeof cli_lib_runtimes_codex_runtime;
|
|
401
408
|
"cli/lib/runtimes/codex/slashCommands": typeof cli_lib_runtimes_codex_slashCommands;
|
|
409
|
+
"cli/lib/runtimes/codex/validators": typeof cli_lib_runtimes_codex_validators;
|
|
402
410
|
"cli/lib/runtimes/contracts": typeof cli_lib_runtimes_contracts;
|
|
403
411
|
"cli/lib/runtimes/cursor/effort": typeof cli_lib_runtimes_cursor_effort;
|
|
404
412
|
"cli/lib/runtimes/cursor/models": typeof cli_lib_runtimes_cursor_models;
|
|
@@ -623,12 +631,14 @@ declare const fullApi: ApiFromModules<{
|
|
|
623
631
|
"tasks/lib/taskLabelsRepo": typeof tasks_lib_taskLabelsRepo;
|
|
624
632
|
"tasks/lib/taskListsRepo": typeof tasks_lib_taskListsRepo;
|
|
625
633
|
"tasks/lib/taskRefCountersRepo": typeof tasks_lib_taskRefCountersRepo;
|
|
634
|
+
"tasks/lib/taskSectionsRepo": typeof tasks_lib_taskSectionsRepo;
|
|
626
635
|
"tasks/lib/tasksRepo": typeof tasks_lib_tasksRepo;
|
|
627
636
|
"tasks/lib/timeline/merge": typeof tasks_lib_timeline_merge;
|
|
628
637
|
"tasks/lib/timeline/validators": typeof tasks_lib_timeline_validators;
|
|
629
638
|
"tasks/lib/tree": typeof tasks_lib_tree;
|
|
630
639
|
"tasks/lib/validators": typeof tasks_lib_validators;
|
|
631
640
|
"tasks/lists": typeof tasks_lists;
|
|
641
|
+
"tasks/sections": typeof tasks_sections;
|
|
632
642
|
"tasks/timeline": typeof tasks_timeline;
|
|
633
643
|
"users/core": typeof users_core;
|
|
634
644
|
"users/errors": typeof users_errors;
|
|
@@ -3,7 +3,14 @@ import type { FunctionReference, FunctionArgs, FunctionReturnType } from "convex
|
|
|
3
3
|
export interface ConvexClientOptions {
|
|
4
4
|
url: string;
|
|
5
5
|
apiKey: string;
|
|
6
|
+
/** Provider credentials replaced in every mutation arg; see cli-provider-keys spec. */
|
|
7
|
+
secrets?: Array<string | undefined>;
|
|
8
|
+
quiet?: boolean;
|
|
6
9
|
}
|
|
10
|
+
/** Replace `secret` and its JSON-escaped form, which chunk `data` strings carry. */
|
|
11
|
+
export declare function redactAuth(value: string, secret?: string): string;
|
|
12
|
+
/** Deep copy of `value` with each secret replaced in every string. */
|
|
13
|
+
export declare function redactSecrets<T>(value: T, secrets: readonly string[]): T;
|
|
7
14
|
/**
|
|
8
15
|
* Create a Convex client wrapper that injects API key into all calls
|
|
9
16
|
*/
|
|
@@ -12,6 +19,8 @@ export declare function createConvexClient(options: ConvexClientOptions): {
|
|
|
12
19
|
* The underlying Convex client
|
|
13
20
|
*/
|
|
14
21
|
client: ConvexClient;
|
|
22
|
+
/** Redacted from every mutation; the flush buffer holds back a delta that may end in one. */
|
|
23
|
+
secrets: string[];
|
|
15
24
|
/**
|
|
16
25
|
* Execute a query with API key authentication
|
|
17
26
|
*/
|
|
@@ -40,7 +49,7 @@ export declare function createConvexClient(options: ConvexClientOptions): {
|
|
|
40
49
|
};
|
|
41
50
|
export type ConvoyClient = ReturnType<typeof createConvexClient>;
|
|
42
51
|
/** Stateless HTTP transport with the same credential scrubbing as subscriptions. */
|
|
43
|
-
export declare function createConvexHttpClient(options: ConvexClientOptions): {
|
|
52
|
+
export declare function createConvexHttpClient(options: ConvexClientOptions, signal?: AbortSignal): {
|
|
44
53
|
query<Query extends FunctionReference<"query">>(query: Query, args: FunctionArgs<Query>): Promise<FunctionReturnType<Query>>;
|
|
45
54
|
mutation<Mutation extends FunctionReference<"mutation">>(mutation: Mutation, args: FunctionArgs<Mutation>): Promise<FunctionReturnType<Mutation>>;
|
|
46
55
|
};
|