@sixb/cli 0.2.1 → 0.2.3
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 +25 -22
- package/dist/commands/access-token-utils.d.ts.map +1 -1
- package/dist/commands/agent.d.ts +4 -1
- package/dist/commands/agent.d.ts.map +1 -1
- package/dist/commands/api.d.ts.map +1 -1
- package/dist/commands/check.d.ts.map +1 -1
- package/dist/commands/connect.d.ts +13 -0
- package/dist/commands/connect.d.ts.map +1 -0
- package/dist/commands/db-migrate.d.ts.map +1 -1
- package/dist/commands/db-prepare.d.ts.map +1 -1
- package/dist/commands/deploy.d.ts.map +1 -1
- package/dist/commands/desktop.d.ts.map +1 -1
- package/dist/commands/dev-runner.d.ts.map +1 -1
- package/dist/commands/env.d.ts +6 -1
- package/dist/commands/env.d.ts.map +1 -1
- package/dist/commands/lake-cleanup.d.ts +2 -12
- package/dist/commands/lake-cleanup.d.ts.map +1 -1
- package/dist/commands/lake-rejected.d.ts +10 -0
- package/dist/commands/lake-rejected.d.ts.map +1 -0
- package/dist/commands/orchestrator.d.ts.map +1 -1
- package/dist/commands/scheduler.d.ts +2 -5
- package/dist/commands/scheduler.d.ts.map +1 -1
- package/dist/commands/worker-group.d.ts.map +1 -1
- package/dist/lib/command-line.d.ts +22 -7
- package/dist/lib/command-line.d.ts.map +1 -1
- package/dist/{tui → lib}/connection.d.ts +11 -1
- package/dist/{tui → lib}/connection.d.ts.map +1 -1
- package/dist/lib/deploy-release.d.ts +7 -1
- package/dist/lib/deploy-release.d.ts.map +1 -1
- package/dist/lib/desktop.d.ts +4 -0
- package/dist/lib/desktop.d.ts.map +1 -1
- package/dist/lib/dev-supervisor.d.ts.map +1 -1
- package/dist/lib/duration.d.ts +3 -0
- package/dist/lib/duration.d.ts.map +1 -0
- package/dist/lib/loadSixb.d.ts.map +1 -1
- package/dist/lib/production-roles.d.ts +0 -4
- package/dist/lib/production-roles.d.ts.map +1 -1
- package/dist/lib/profiles.d.ts +5 -0
- package/dist/lib/profiles.d.ts.map +1 -1
- package/dist/lib/runtime.d.ts +7 -9
- package/dist/lib/runtime.d.ts.map +1 -1
- package/dist/lib/worker-concurrency.d.ts.map +1 -1
- package/dist/lib/worker-registry.d.ts +4 -1
- package/dist/lib/worker-registry.d.ts.map +1 -1
- package/dist/runner/allowed-folders.d.ts +17 -0
- package/dist/runner/allowed-folders.d.ts.map +1 -0
- package/dist/runner/computer-connection.d.ts +70 -0
- package/dist/runner/computer-connection.d.ts.map +1 -0
- package/dist/runner/computer.d.ts.map +1 -0
- package/dist/runner/desktop-runner-main.d.ts +2 -0
- package/dist/runner/desktop-runner-main.d.ts.map +1 -0
- package/dist/runner/desktop-runner.d.ts +43 -0
- package/dist/runner/desktop-runner.d.ts.map +1 -0
- package/dist/runner/keep-awake.d.ts +11 -0
- package/dist/runner/keep-awake.d.ts.map +1 -0
- package/dist/runner/local-runner.d.ts +131 -0
- package/dist/runner/local-runner.d.ts.map +1 -0
- package/dist/tui/app.d.ts +2 -2
- package/dist/tui/app.d.ts.map +1 -1
- package/dist/tui/format.d.ts +29 -0
- package/dist/tui/format.d.ts.map +1 -1
- package/dist/tui/index.d.ts.map +1 -1
- package/dist/tui/settings.d.ts +5 -8
- package/dist/tui/settings.d.ts.map +1 -1
- package/dist/ui/deploy-screens.d.ts +4 -2
- package/dist/ui/deploy-screens.d.ts.map +1 -1
- package/dist/ui/env-screens.d.ts +14 -1
- package/dist/ui/env-screens.d.ts.map +1 -1
- package/dist/ui/screens.d.ts +5 -11
- package/dist/ui/screens.d.ts.map +1 -1
- package/package.json +21 -17
- package/src/commands/access-token-utils.ts +2 -20
- package/src/commands/agent.ts +122 -39
- package/src/commands/api.ts +7 -0
- package/src/commands/check.ts +75 -1
- package/src/commands/connect.ts +197 -0
- package/src/commands/db-migrate.ts +1 -0
- package/src/commands/db-prepare.ts +1 -0
- package/src/commands/deploy.ts +15 -3
- package/src/commands/desktop.ts +2 -1
- package/src/commands/dev-runner.ts +5 -0
- package/src/commands/env.ts +99 -20
- package/src/commands/lake-cleanup.ts +25 -48
- package/src/commands/lake-rejected.ts +36 -0
- package/src/commands/orchestrator.ts +2 -7
- package/src/commands/scheduler.ts +11 -61
- package/src/commands/worker-group.ts +6 -3
- package/src/index.tsx +23 -4
- package/src/lib/command-line.ts +47 -15
- package/src/{tui → lib}/connection.ts +64 -17
- package/src/lib/deploy-release.ts +42 -2
- package/src/lib/desktop.ts +8 -1
- package/src/lib/dev-supervisor.ts +7 -2
- package/src/lib/duration.ts +11 -0
- package/src/lib/loadSixb.ts +3 -4
- package/src/lib/production-roles.ts +0 -1
- package/src/lib/profiles.ts +15 -1
- package/src/lib/runtime.ts +63 -43
- package/src/lib/shareable-providers.ts +2 -2
- package/src/lib/storage-migration.ts +1 -0
- package/src/lib/worker-concurrency.ts +1 -0
- package/src/lib/worker-registry.ts +36 -1
- package/src/runner/allowed-folders.ts +126 -0
- package/src/runner/computer-connection.ts +184 -0
- package/src/runner/desktop-runner-main.ts +9 -0
- package/src/runner/desktop-runner.ts +217 -0
- package/src/runner/keep-awake.ts +50 -0
- package/src/runner/local-runner.ts +427 -0
- package/src/tui/app.tsx +168 -12
- package/src/tui/format.ts +213 -7
- package/src/tui/index.tsx +14 -13
- package/src/tui/settings.ts +12 -44
- package/src/ui/deploy-screens.ts +8 -1
- package/src/ui/env-screens.ts +39 -5
- package/src/ui/screens.ts +21 -20
- package/dist/tui/computer.d.ts.map +0 -1
- package/dist/tui/runner.d.ts +0 -75
- package/dist/tui/runner.d.ts.map +0 -1
- package/src/tui/runner.ts +0 -256
- /package/dist/{tui → runner}/computer.d.ts +0 -0
- /package/src/{tui → runner}/computer.ts +0 -0
package/dist/lib/runtime.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { AgentWorker } from "@sixb/agent-worker";
|
|
2
2
|
import type { Worker } from "@sixb/core/internal/workers";
|
|
3
|
+
import { LakeWorker } from "@sixb/lake-worker";
|
|
3
4
|
import { OrchestratorWorker } from "@sixb/orchestrator";
|
|
4
5
|
import { PipelineWorker } from "@sixb/pipeline-worker";
|
|
5
6
|
import { ProjectionWorker } from "@sixb/projection-worker";
|
|
@@ -12,6 +13,7 @@ export declare function waitForWorkerFailure(worker: Worker | null | undefined):
|
|
|
12
13
|
export interface RunningSixbRuntime {
|
|
13
14
|
readonly rulesWorker: RulesWorker | null;
|
|
14
15
|
readonly syncWorker: SyncWorker | null;
|
|
16
|
+
readonly lakeWorker: LakeWorker | null;
|
|
15
17
|
readonly agentWorker: AgentWorker | null;
|
|
16
18
|
readonly projectionWorker: ProjectionWorker | null;
|
|
17
19
|
readonly pipelineWorker: PipelineWorker | null;
|
|
@@ -42,9 +44,6 @@ export interface RunningRulesRuntime {
|
|
|
42
44
|
readonly rulesWorker: RulesWorker | null;
|
|
43
45
|
stop(): Promise<void>;
|
|
44
46
|
}
|
|
45
|
-
export interface RunningSchedulerRuntime {
|
|
46
|
-
stop(): Promise<void>;
|
|
47
|
-
}
|
|
48
47
|
export interface RunningOrchestratorRuntime {
|
|
49
48
|
readonly orchestratorWorker: OrchestratorWorker | null;
|
|
50
49
|
readonly warnings: readonly string[];
|
|
@@ -68,7 +67,6 @@ export declare function checkRuntimePipelineMarkings(sixb: LoadedSixbHost): Prom
|
|
|
68
67
|
export declare function readAppliedMarkingNotices(sixb: LoadedSixbHost): Promise<readonly string[]>;
|
|
69
68
|
export declare function stopSixbProviders(sixb: LoadedSixbHost): Promise<void>;
|
|
70
69
|
export declare function startRulesRuntime(sixb: LoadedSixbHost): Promise<RunningRulesRuntime>;
|
|
71
|
-
export declare function startSchedulerRuntime(sixb: LoadedSixbHost): Promise<RunningSchedulerRuntime>;
|
|
72
70
|
export declare function startOrchestratorRuntime(sixb: LoadedSixbHost): Promise<RunningOrchestratorRuntime>;
|
|
73
71
|
/**
|
|
74
72
|
* Starts the background runtimes owned by the CLI host.
|
|
@@ -79,22 +77,22 @@ export declare function startOrchestratorRuntime(sixb: LoadedSixbHost): Promise<
|
|
|
79
77
|
* 3. PipelineWorker (claims from queues)
|
|
80
78
|
* 4. WorkflowWorker (claims from queues)
|
|
81
79
|
* 5. SyncWorker (claims from queues)
|
|
82
|
-
* 6.
|
|
83
|
-
* 7.
|
|
80
|
+
* 6. LakeWorker (claims from queues)
|
|
81
|
+
* 7. Orchestrator (subscribes to events, enqueues jobs, runs cron and the maintenance loop)
|
|
84
82
|
* 8. API server, when this process serves it
|
|
85
83
|
* 9. AgentWorker (claims from queues; its turns call the API)
|
|
86
84
|
*
|
|
87
85
|
* Shutdown order (producers before consumers):
|
|
88
86
|
* 1. AgentWorker (ends its turns while the API still answers them)
|
|
89
87
|
* 2. API server
|
|
90
|
-
* 3.
|
|
91
|
-
* 4.
|
|
88
|
+
* 3. Orchestrator (stops cron, drains pending dispatches)
|
|
89
|
+
* 4. LakeWorker
|
|
92
90
|
* 5. SyncWorker
|
|
93
91
|
* 6. WorkflowWorker
|
|
94
92
|
* 7. PipelineWorker
|
|
95
93
|
* 8. ProjectionWorker
|
|
96
94
|
* 9. RulesWorker (drains pending evaluations)
|
|
97
|
-
*
|
|
95
|
+
* 10. Runtime providers (connectors, broker)
|
|
98
96
|
*/
|
|
99
97
|
export declare function startSixbRuntime(sixb: LoadedSixbHost, options?: StartSixbRuntimeOptions): Promise<RunningSixbRuntime>;
|
|
100
98
|
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/lib/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAYhD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAGzD,OAAO,
|
|
1
|
+
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/lib/runtime.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAYhD,OA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AAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAEtF;AAED;;;;GAIG;AACH,wBAAsB,yBAAyB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAGhG;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB3E;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAAC,mBAAmB,CAAC,CAc1F;AAED,wBAAsB,wBAAwB,CAC5C,IAAI,EAAE,cAAc,GACnB,OAAO,CAAC,0BAA0B,CAAC,CA6DrC;AAYD;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AACH,wBAAsB,gBAAgB,CACpC,IAAI,EAAE,cAAc,EACpB,OAAO,GAAE,uBAA4B,GACpC,OAAO,CAAC,kBAAkB,CAAC,CAwH7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-concurrency.d.ts","sourceRoot":"","sources":["../../src/lib/worker-concurrency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"worker-concurrency.d.ts","sourceRoot":"","sources":["../../src/lib/worker-concurrency.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,iBAAiB,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAYzF,uEAAuE;AACvE,wBAAgB,8BAA8B,CAC5C,UAAU,EAAE,UAAU,EACtB,KAAK,EAAE,MAAM,GAAG,SAAS,GACxB,iBAAiB,CAMnB;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,MAAM,GAAE,SAAS,MAAM,EAAO,GAAG,iBAAiB,CAoB1F;AAED;;;GAGG;AACH,wBAAgB,wBAAwB,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAKtF;AAED;;;GAGG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE;IAChD,QAAQ,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAAA;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAA;CACpC,GAAG;IAAE,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAA;CAAE,CAsBzF"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Worker } from "@sixb/core/internal/workers";
|
|
2
2
|
import type { LoadedSixbHost } from "./loadSixb";
|
|
3
|
-
export declare const WORKER_TYPES: readonly ["sync", "agent", "pipeline", "projection", "workflow"];
|
|
3
|
+
export declare const WORKER_TYPES: readonly ["sync", "agent", "pipeline", "projection", "workflow", "lake"];
|
|
4
4
|
export type WorkerType = (typeof WORKER_TYPES)[number];
|
|
5
5
|
export type WorkerConcurrency = Readonly<Partial<Record<WorkerType, number>>>;
|
|
6
6
|
export type QueueWorkerProcess = Worker & {
|
|
@@ -38,6 +38,9 @@ export interface WorkerGroupInputs {
|
|
|
38
38
|
*/
|
|
39
39
|
export declare function assertWorkerInputs(input: WorkerGroupInputs): void;
|
|
40
40
|
export declare function resolveRegisteredWorkerTypes(sixb: LoadedSixbHost): readonly WorkerType[];
|
|
41
|
+
export declare function lakeWorkerRequired(sixb: LoadedSixbHost): boolean;
|
|
42
|
+
/** Requests stay queued while no worker claims them, which looks like an idle system. */
|
|
43
|
+
export declare function omittedWorkerWarnings(sixb: LoadedSixbHost, workerTypes: readonly string[]): readonly string[];
|
|
41
44
|
/** Explicit model calls can enqueue accounting recovery without a model catalog. */
|
|
42
45
|
export declare function agentWorkerRequired(sixb: LoadedSixbHost): boolean;
|
|
43
46
|
/** Only agent execution needs a sandbox and an API origin; accounting recovery does not. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"worker-registry.d.ts","sourceRoot":"","sources":["../../src/lib/worker-registry.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"worker-registry.d.ts","sourceRoot":"","sources":["../../src/lib/worker-registry.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAA;AAOzD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,YAAY,CAAA;AAGhD,eAAO,MAAM,YAAY,0EAA2E,CAAA;AAEpG,MAAM,MAAM,UAAU,GAAG,CAAC,OAAO,YAAY,CAAC,CAAC,MAAM,CAAC,CAAA;AAEtD,MAAM,MAAM,iBAAiB,GAAG,QAAQ,CAAC,OAAO,CAAC,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAC,CAAC,CAAA;AAC7E,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG;IAAE,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAAA;AAE1E,MAAM,WAAW,qBAAqB;IACpC,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAA;IACjC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,iBAAiB,CAAA;IAC9C,QAAQ,CAAC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IACnC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IACrC,QAAQ,CAAC,yBAAyB,CAAC,EAAE,MAAM,CAAA;CAC5C;AA2DD,wBAAgB,mBAAmB,CACjC,IAAI,EAAE,cAAc,EACpB,UAAU,EAAE,MAAM,EAClB,OAAO,GAAE,qBAA0B,GAClC,kBAAkB,CAOpB;AAED,wBAAgB,wBAAwB,CAAC,eAAe,CAAC,EAAE,MAAM,GAAG,UAAU,CAa7E;AAUD;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,UAAU,EAAE,MAAM,EAClB,OAAO,EAAE,qBAAqB,EAC9B,gBAAgB,EAAE,OAAO,GACxB,MAAM,GAAG,IAAI,CAIf;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAA;IAClC,QAAQ,CAAC,WAAW,EAAE,SAAS,MAAM,EAAE,CAAA;IACvC,QAAQ,CAAC,OAAO,EAAE,qBAAqB,CAAA;IACvC;;;OAGG;IACH,QAAQ,CAAC,YAAY,EAAE,OAAO,CAAA;CAC/B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,IAAI,CA6BjE;AAED,wBAAgB,4BAA4B,CAAC,IAAI,EAAE,cAAc,GAAG,SAAS,UAAU,EAAE,CA4BxF;AAsBD,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAEhE;AAED,yFAAyF;AACzF,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,cAAc,EACpB,WAAW,EAAE,SAAS,MAAM,EAAE,GAC7B,SAAS,MAAM,EAAE,CAenB;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,cAAc,GAAG,OAAO,CAIjE;AAED,4FAA4F;AAC5F,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,cAAc,CAAC,aAAa,CAAC,GAAG,OAAO,CAOxF"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Connection } from "../lib/connection";
|
|
2
|
+
/** The project a list is for: `connect` names it. */
|
|
3
|
+
export type AllowedFor = Pick<Connection, "apiUrl" | "project">;
|
|
4
|
+
/** The folders chosen on this computer for `project`. Throws when the list can't be read. */
|
|
5
|
+
export declare function readAllowedFolders(project: AllowedFor): Promise<readonly string[]>;
|
|
6
|
+
/** Whether `folder` was chosen here for `project`. A list that can't be read allows nothing. */
|
|
7
|
+
export declare function isFolderAllowed(project: AllowedFor, folder: string): Promise<boolean>;
|
|
8
|
+
/** Allow or forget folders for `project`. A folder forgotten stays forgotten. */
|
|
9
|
+
export declare function setFoldersAllowed(project: AllowedFor, changed: readonly string[], allowed: boolean): Promise<void>;
|
|
10
|
+
/**
|
|
11
|
+
* Forget `folder` for every project at `apiUrl`. Needs no sign-in, as a list on this computer doesn't:
|
|
12
|
+
* someone signed out can still take a folder back, and it stays taken back.
|
|
13
|
+
*/
|
|
14
|
+
export declare function forgetFolderAt(apiUrl: string, folder: string): Promise<void>;
|
|
15
|
+
/** Call `changed` whenever the list may have changed. Returns the way to stop. */
|
|
16
|
+
export declare function watchAllowedFolders(changed: () => void): Promise<() => void>;
|
|
17
|
+
//# sourceMappingURL=allowed-folders.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"allowed-folders.d.ts","sourceRoot":"","sources":["../../src/runner/allowed-folders.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAUnD,qDAAqD;AACrD,MAAM,MAAM,UAAU,GAAG,IAAI,CAAC,UAAU,EAAE,QAAQ,GAAG,SAAS,CAAC,CAAA;AA4B/D,6FAA6F;AAC7F,wBAAsB,kBAAkB,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,SAAS,MAAM,EAAE,CAAC,CAExF;AAED,gGAAgG;AAChG,wBAAsB,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAK3F;AAWD,iFAAiF;AACjF,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,SAAS,MAAM,EAAE,EAC1B,OAAO,EAAE,OAAO,GACf,OAAO,CAAC,IAAI,CAAC,CAEf;AAyBD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAa5E;AAED,kFAAkF;AAClF,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,IAAI,CAAC,CAQlF"}
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
import type { Connection } from "../lib/connection";
|
|
2
|
+
/** Exit status when the person's sign-in ended: whatever restarts this should know. */
|
|
3
|
+
export declare const EXIT_SIGNED_OUT = 3;
|
|
4
|
+
/** What a connected computer reports, one line each with `sixb connect --json`. */
|
|
5
|
+
export type ComputerEvent = {
|
|
6
|
+
readonly type: "folders";
|
|
7
|
+
readonly folders: readonly string[];
|
|
8
|
+
} | {
|
|
9
|
+
readonly type: "turn.started";
|
|
10
|
+
readonly folder: string;
|
|
11
|
+
readonly threadId: string;
|
|
12
|
+
readonly runId: string;
|
|
13
|
+
} | {
|
|
14
|
+
readonly type: "turn.ended";
|
|
15
|
+
readonly folder: string;
|
|
16
|
+
readonly threadId: string;
|
|
17
|
+
readonly runId: string;
|
|
18
|
+
/** False when it could not be claimed or failed before it ended on its own. */
|
|
19
|
+
readonly ran: boolean;
|
|
20
|
+
} | {
|
|
21
|
+
readonly type: "session.lost";
|
|
22
|
+
readonly folder: string;
|
|
23
|
+
readonly message: string;
|
|
24
|
+
} | {
|
|
25
|
+
readonly type: "session.back";
|
|
26
|
+
readonly folder: string;
|
|
27
|
+
} | {
|
|
28
|
+
readonly type: "signed-out";
|
|
29
|
+
} | {
|
|
30
|
+
readonly type: "error";
|
|
31
|
+
readonly message: string;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* This computer, connected to a project: one session per folder allowed for it, and the turns sent
|
|
35
|
+
* to their conversations run in their folders. The list of folders is read again whenever it changes, so
|
|
36
|
+
* choosing one needs no restart.
|
|
37
|
+
*/
|
|
38
|
+
export declare class ComputerConnection {
|
|
39
|
+
private readonly connection;
|
|
40
|
+
private readonly onEvent;
|
|
41
|
+
private readonly keepsAwake;
|
|
42
|
+
/** What the agent's commands also never read, beyond what `sixb` keeps from them. */
|
|
43
|
+
private readonly alsoDenied;
|
|
44
|
+
private readonly runners;
|
|
45
|
+
private socket;
|
|
46
|
+
private unwatch;
|
|
47
|
+
private recheck;
|
|
48
|
+
private reconciled;
|
|
49
|
+
private shown;
|
|
50
|
+
private stopped;
|
|
51
|
+
private signedOut;
|
|
52
|
+
constructor(connection: Connection, onEvent: (event: ComputerEvent) => void, keepsAwake: boolean,
|
|
53
|
+
/** What the agent's commands also never read, beyond what `sixb` keeps from them. */
|
|
54
|
+
alsoDenied?: readonly string[]);
|
|
55
|
+
start(): Promise<void>;
|
|
56
|
+
/** Stop every turn running here, each ending interrupted, and close every session. */
|
|
57
|
+
stop(): Promise<void>;
|
|
58
|
+
/** One at a time, so two quick changes can't leave the older read in charge. */
|
|
59
|
+
private reconcile;
|
|
60
|
+
private applyAllowedFolders;
|
|
61
|
+
/** A list that can't be read allows nothing, and says so. */
|
|
62
|
+
private readAllowed;
|
|
63
|
+
/** A folder that's gone reads as offline, rather than as one whose turns all fail. */
|
|
64
|
+
private existing;
|
|
65
|
+
private runnerFor;
|
|
66
|
+
private onSessionChange;
|
|
67
|
+
/** Each folder's runner would read the thread to learn it isn't theirs: read it once. */
|
|
68
|
+
private route;
|
|
69
|
+
}
|
|
70
|
+
//# sourceMappingURL=computer-connection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computer-connection.d.ts","sourceRoot":"","sources":["../../src/runner/computer-connection.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAOnD,uFAAuF;AACvF,eAAO,MAAM,eAAe,IAAI,CAAA;AAEhC,mFAAmF;AACnF,MAAM,MAAM,aAAa,GACrB;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;CAAE,GACjE;IACE,QAAQ,CAAC,IAAI,EAAE,cAAc,CAAA;IAC7B,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;IACzB,QAAQ,CAAC,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C,UAAU,EAAE,OAAO;IACpC,qFAAqF;IACpE,UAAU,GAAE,SAAS,MAAM,EAAO;IAG/C,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IAsB5B,sFAAsF;IAChF,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;IAS3B,gFAAgF;IAChF,OAAO,CAAC,SAAS;YAKH,mBAAmB;IAoBjC,6DAA6D;YAC/C,WAAW;IASzB,sFAAsF;YACxE,QAAQ;IAYtB,OAAO,CAAC,SAAS;IAuBjB,OAAO,CAAC,eAAe;IAavB,yFAAyF;YAC3E,KAAK;CAQpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"computer.d.ts","sourceRoot":"","sources":["../../src/runner/computer.ts"],"names":[],"mappings":"AAeA,iFAAiF;AACjF,wBAAgB,cAAc,IAAI,OAAO,CAAC,MAAM,CAAC,CAUhD;AAED,gGAAgG;AAChG,wBAAsB,YAAY,IAAI,OAAO,CAAC;IAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAG5F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desktop-runner-main.d.ts","sourceRoot":"","sources":["../../src/runner/desktop-runner-main.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import { type ComputerEvent } from "./computer-connection";
|
|
2
|
+
/** What this prints, one line of JSON each. The desktop app reads them. */
|
|
3
|
+
export type DesktopRunnerEvent = ComputerEvent | {
|
|
4
|
+
readonly type: "computer";
|
|
5
|
+
readonly id: string;
|
|
6
|
+
readonly name: string;
|
|
7
|
+
} | {
|
|
8
|
+
readonly type: "connected";
|
|
9
|
+
} | {
|
|
10
|
+
readonly type: "signed-out-waiting";
|
|
11
|
+
} | {
|
|
12
|
+
readonly type: "sign-in";
|
|
13
|
+
readonly url: string;
|
|
14
|
+
readonly userCode: string;
|
|
15
|
+
} | {
|
|
16
|
+
readonly type: "sign-in-failed";
|
|
17
|
+
readonly message: string;
|
|
18
|
+
} | {
|
|
19
|
+
readonly type: "unreachable";
|
|
20
|
+
readonly message: string;
|
|
21
|
+
};
|
|
22
|
+
/** What this reads, one line of JSON each. Only the desktop app holds the other end. */
|
|
23
|
+
export type DesktopRunnerCommand = {
|
|
24
|
+
readonly type: "allow";
|
|
25
|
+
readonly folder: string;
|
|
26
|
+
} | {
|
|
27
|
+
readonly type: "forget";
|
|
28
|
+
readonly folder: string;
|
|
29
|
+
};
|
|
30
|
+
/**
|
|
31
|
+
* This computer, connected for a desktop app: `sixb connect` with no person at a terminal to ask.
|
|
32
|
+
* Holding the sign-in here keeps it from the app's main process, and from the page beyond that: it
|
|
33
|
+
* goes beside the CLI's, where the agent's commands can't read it, and a sign-in from `sixb login`
|
|
34
|
+
* counts. It ends with its stdin, so it can't outlive the app that started it.
|
|
35
|
+
*/
|
|
36
|
+
export declare function runDesktopRunner(options: {
|
|
37
|
+
readonly apiUrl: string;
|
|
38
|
+
/** Who the person is asked to approve, in the browser. */
|
|
39
|
+
readonly clientName: string;
|
|
40
|
+
/** Where the app keeps its window's sign-in, as cookies a command could otherwise read. */
|
|
41
|
+
readonly windowData?: string;
|
|
42
|
+
}): Promise<void>;
|
|
43
|
+
//# sourceMappingURL=desktop-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"desktop-runner.d.ts","sourceRoot":"","sources":["../../src/runner/desktop-runner.ts"],"names":[],"mappings":"AAaA,OAAO,EAAsB,KAAK,aAAa,EAAmB,MAAM,uBAAuB,CAAA;AAM/F,2EAA2E;AAC3E,MAAM,MAAM,kBAAkB,GAC1B,aAAa,GACb;IAAE,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GACzE;IAAE,QAAQ,CAAC,IAAI,EAAE,WAAW,CAAA;CAAE,GAC9B;IAAE,QAAQ,CAAC,IAAI,EAAE,oBAAoB,CAAA;CAAE,GACvC;IAAE,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IAAC,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAA;CAAE,GAC7E;IAAE,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GAC7D;IAAE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;IAAC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;CAAE,CAAA;AAE9D,wFAAwF;AACxF,MAAM,MAAM,oBAAoB,GAC5B;IAAE,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,GACnD;IAAE,QAAQ,CAAC,IAAI,EAAE,QAAQ,CAAC;IAAC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAA;AAcxD;;;;;GAKG;AACH,wBAAsB,gBAAgB,CAAC,OAAO,EAAE;IAC9C,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,2FAA2F;IAC3F,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAA;CAC7B,GAAG,OAAO,CAAC,IAAI,CAAC,CA8JhB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/** A hold on the computer's staying awake: ending it twice is ending it once. */
|
|
2
|
+
export type ReleaseAwake = () => void;
|
|
3
|
+
/** Keeps the computer awake while any hold is held, however many turns run. */
|
|
4
|
+
export declare function createKeepAwake(start: () => (() => void) | null): {
|
|
5
|
+
hold(): ReleaseAwake;
|
|
6
|
+
};
|
|
7
|
+
/** One per process, as every folder's turns share one computer. */
|
|
8
|
+
export declare const keepAwake: {
|
|
9
|
+
hold(): ReleaseAwake;
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=keep-awake.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"keep-awake.d.ts","sourceRoot":"","sources":["../../src/runner/keep-awake.ts"],"names":[],"mappings":"AAEA,iFAAiF;AACjF,MAAM,MAAM,YAAY,GAAG,MAAM,IAAI,CAAA;AAErC,+EAA+E;AAC/E,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI;YAKpD,YAAY;EAcvB;AAuBD,mEAAmE;AACnE,eAAO,MAAM,SAAS;YAtCV,YAAY;CAsCiC,CAAA"}
|
|
@@ -0,0 +1,131 @@
|
|
|
1
|
+
import { type ComputerBackgroundCommand, type ComputerBackgroundCommandRef } from "@sixb/agent";
|
|
2
|
+
import { type GetAgentThreadResponses } from "@sixb/client";
|
|
3
|
+
import type { ConversationAgentRunRecord } from "@sixb/core/storage";
|
|
4
|
+
import type { Connection } from "../lib/connection";
|
|
5
|
+
import { type ReleaseAwake } from "./keep-awake";
|
|
6
|
+
/**
|
|
7
|
+
* What the agent's commands never read on this computer, whatever the folder: the CLI's own
|
|
8
|
+
* sign-in, and the credentials SSH and AWS keep.
|
|
9
|
+
*/
|
|
10
|
+
export declare function deniedPaths(): readonly string[];
|
|
11
|
+
export interface LocalRunnerOptions {
|
|
12
|
+
/**
|
|
13
|
+
* The session stopped renewing, or started again, or fails differently now: called when that
|
|
14
|
+
* changes, not at each renewal. A refusal from the project is a `SixbApiError`.
|
|
15
|
+
*/
|
|
16
|
+
readonly onSessionChange?: (failure: unknown | null) => void;
|
|
17
|
+
/** How a running turn keeps the computer awake. By default, `keepAwake`. */
|
|
18
|
+
readonly holdAwake?: () => ReleaseAwake;
|
|
19
|
+
/** What the agent's commands also never read, beyond `deniedPaths`. */
|
|
20
|
+
readonly alsoDenied?: readonly string[];
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* This computer as a runner: it claims its owner's turns from the project and runs them in one
|
|
24
|
+
* folder, each until it ends or is stopped. While its session is open, the project knows `sixb` is
|
|
25
|
+
* open here, and the turns sent from elsewhere to the conversations of this folder run here too, one
|
|
26
|
+
* at a time: nobody may be watching, and two turns would edit the same files.
|
|
27
|
+
*/
|
|
28
|
+
export declare class LocalRunner {
|
|
29
|
+
private readonly connection;
|
|
30
|
+
/** The folder `sixb` was opened in: its real path, as the project keeps it. */
|
|
31
|
+
readonly folder: string;
|
|
32
|
+
private readonly onFailure;
|
|
33
|
+
private readonly options;
|
|
34
|
+
private readonly runner;
|
|
35
|
+
private readonly running;
|
|
36
|
+
private readonly elsewhereListeners;
|
|
37
|
+
private readonly backgroundListeners;
|
|
38
|
+
private session;
|
|
39
|
+
/** Why the session last failed, null while it renews. A change in why is news: see noteSession. */
|
|
40
|
+
private sessionFailure;
|
|
41
|
+
/** Whether a running turn keeps the computer awake: the person's setting. */
|
|
42
|
+
keepsAwake: boolean;
|
|
43
|
+
/** The session's last call: its release follows a renewal, which would open it again. */
|
|
44
|
+
private lastCall;
|
|
45
|
+
constructor(connection: Connection,
|
|
46
|
+
/** The folder `sixb` was opened in: its real path, as the project keeps it. */
|
|
47
|
+
folder: string, onFailure: (error: unknown) => void, options?: LocalRunnerOptions);
|
|
48
|
+
/** Hear each turn sent from elsewhere as it starts to run here. Returns the unsubscribe. */
|
|
49
|
+
onElsewhere(listener: (run: ConversationAgentRunRecord, ended: Promise<boolean>) => void): () => void;
|
|
50
|
+
/** Whether this computer runs `runId` now. */
|
|
51
|
+
runs(runId: string): boolean;
|
|
52
|
+
/**
|
|
53
|
+
* Claim a queued turn and run it, unless this computer runs it already. Resolves once the turn
|
|
54
|
+
* ended here: false when it was not this computer's to run, or could not be claimed.
|
|
55
|
+
*/
|
|
56
|
+
claim(runId: string, onClaimed?: (run: ConversationAgentRunRecord) => void): Promise<boolean>;
|
|
57
|
+
/**
|
|
58
|
+
* Hold this `sixb`'s session while it is open: the conversations of this folder read as online,
|
|
59
|
+
* and the turns waiting for them are claimed. Idempotent.
|
|
60
|
+
*/
|
|
61
|
+
openSession(): void;
|
|
62
|
+
/**
|
|
63
|
+
* Renew the session now rather than at its next renewal, when the project says something
|
|
64
|
+
* changed for this folder: a stop asked for from the web is in the answer.
|
|
65
|
+
*/
|
|
66
|
+
renewSession(): void;
|
|
67
|
+
/** This folder's background commands, by thread: the running ones, then the latest to end. */
|
|
68
|
+
backgroundCommands(threadId?: string): readonly ComputerBackgroundCommand[];
|
|
69
|
+
/** Hear each background command start and end. Returns the unsubscribe. */
|
|
70
|
+
onBackground(listener: () => void): () => void;
|
|
71
|
+
/**
|
|
72
|
+
* Stop a background command, and everything it started, as the agent's `bash_stop` does. False
|
|
73
|
+
* when it ended already, or is not this `sixb`'s.
|
|
74
|
+
*/
|
|
75
|
+
stopBackground(ref: ComputerBackgroundCommandRef): Promise<boolean>;
|
|
76
|
+
/** Close the session: the conversations of this folder read as offline at once. */
|
|
77
|
+
closeSession(): Promise<void>;
|
|
78
|
+
/**
|
|
79
|
+
* Claim a turn sent from elsewhere when this computer runs its conversation: its owner's, on this
|
|
80
|
+
* computer and in this folder, and still queued, while the session is open. A running turn is
|
|
81
|
+
* another sixb's, or one whose sixb closed, which the API ends interrupted: claiming it again
|
|
82
|
+
* would run its commands twice.
|
|
83
|
+
*/
|
|
84
|
+
claimIfHere(threadId: string, runId?: string): Promise<void>;
|
|
85
|
+
/** As `claimIfHere`, for a caller that has read the thread already. */
|
|
86
|
+
offer(thread: GetAgentThreadResponses[200], runId?: string): Promise<void>;
|
|
87
|
+
/** Whether this `sixb` runs `thread`'s turns: its owner's, on this computer, in this folder. */
|
|
88
|
+
runsHere(thread: GetAgentThreadResponses[200], computerId: string): boolean;
|
|
89
|
+
/** After a stop was asked for: the turn hears it now, not at its next lease renewal. */
|
|
90
|
+
hearStop(runId: string): void;
|
|
91
|
+
/** Whether a turn runs here now. */
|
|
92
|
+
get busy(): boolean;
|
|
93
|
+
/** Whether a background command a turn started here runs now. */
|
|
94
|
+
get runsBackgroundCommands(): boolean;
|
|
95
|
+
/**
|
|
96
|
+
* Stop every turn this computer runs, each ending interrupted with its end recorded, and the
|
|
97
|
+
* background commands they left running, and close the session.
|
|
98
|
+
*/
|
|
99
|
+
stop(): Promise<void>;
|
|
100
|
+
/**
|
|
101
|
+
* Claim a turn sent from elsewhere, and say so. Left waiting while a turn runs here: it runs once
|
|
102
|
+
* that one ends, or at a later renewal.
|
|
103
|
+
*/
|
|
104
|
+
claimElsewhere(runId: string): Promise<boolean>;
|
|
105
|
+
/**
|
|
106
|
+
* The first that can be claimed, so one that keeps failing can't hold up those behind it. Until
|
|
107
|
+
* `sessionId` closes, with the setting or by quitting: what waits keeps waiting. Trying one can
|
|
108
|
+
* take as long as a turn, so that's asked before each.
|
|
109
|
+
*/
|
|
110
|
+
private claimFirst;
|
|
111
|
+
/** A renewal that lands after its session closed says nothing about the one now, if any. */
|
|
112
|
+
private noteSession;
|
|
113
|
+
}
|
|
114
|
+
/** Whether the person signed in owns `thread`: with sign-in off, the system owns what it starts. */
|
|
115
|
+
export declare function owns(connection: Pick<Connection, "user">, thread: Pick<GetAgentThreadResponses[200], "ownerPrincipal">): boolean;
|
|
116
|
+
/** Stop, for as long as a person or a service manager should wait for that. */
|
|
117
|
+
export declare function stopInTime(running: Pick<LocalRunner, "stop"> | null): Promise<void>;
|
|
118
|
+
/**
|
|
119
|
+
* Quitting `sixb`: the turns running here end interrupted, their end recorded, the background
|
|
120
|
+
* commands they left stop, and the session closes, within `waitMs`, whether a turn runs or not.
|
|
121
|
+
* `note` says what it waits for.
|
|
122
|
+
*/
|
|
123
|
+
export declare function stopOnQuit(runner: Pick<LocalRunner, "busy" | "runsBackgroundCommands" | "stop">, waitMs: number, note: (text: string) => void): Promise<void>;
|
|
124
|
+
/**
|
|
125
|
+
* A closed terminal, or a kill, ends sixb as quitting does: the turns running here stop, each
|
|
126
|
+
* ending interrupted with its end recorded, instead of renewing their lease from a process nobody
|
|
127
|
+
* sees, and the session closes. Then `exit`, after a bounded wait. Returns the removal of the
|
|
128
|
+
* handlers.
|
|
129
|
+
*/
|
|
130
|
+
export declare function stopOnHangUp(runner: () => Pick<LocalRunner, "stop"> | null, exit: (signal: "SIGHUP" | "SIGTERM") => void): () => void;
|
|
131
|
+
//# sourceMappingURL=local-runner.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-runner.d.ts","sourceRoot":"","sources":["../../src/runner/local-runner.ts"],"names":[],"mappings":"AAGA,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,4BAA4B,EAElC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,KAAK,uBAAuB,EAM7B,MAAM,cAAc,CAAA;AACrB,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,oBAAoB,CAAA;AAEpE,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD,OAAO,EAAa,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AAO3D;;;GAGG;AACH,wBAAgB,WAAW,IAAI,SAAS,MAAM,EAAE,CAE/C;AAED,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,KAAK,IAAI,CAAA;IAC5D,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,YAAY,CAAA;IACvC,uEAAuE;IACvE,QAAQ,CAAC,UAAU,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;CACxC;AAED;;;;;GAKG;AACH,qBAAa,WAAW;IAuBpB,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,+EAA+E;IAC/E,QAAQ,CAAC,MAAM,EAAE,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,SAAS;IAC1B,OAAO,CAAC,QAAQ,CAAC,OA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AAE,MAAM,KAAK,IAAI,GAC3B,OAAO,CAAC,IAAI,CAAC,CAYf;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,MAAM,EAAE,MAAM,IAAI,CAAC,WAAW,EAAE,MAAM,CAAC,GAAG,IAAI,EAC9C,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,GAAG,SAAS,KAAK,IAAI,GAC3C,MAAM,IAAI,CAaZ"}
|
package/dist/tui/app.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { SyntaxStyle } from "@opentui/core";
|
|
2
|
-
import type { Connection } from "
|
|
3
|
-
import { type LocalRunner } from "
|
|
2
|
+
import type { Connection } from "../lib/connection";
|
|
3
|
+
import { type LocalRunner } from "../runner/local-runner";
|
|
4
4
|
import { type Settings } from "./settings";
|
|
5
5
|
import type { TuiColors } from "./theme";
|
|
6
6
|
import { type Run } from "./transcript";
|
package/dist/tui/app.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/tui/app.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiC,WAAW,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"app.d.ts","sourceRoot":"","sources":["../../src/tui/app.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAiC,WAAW,EAAE,MAAM,eAAe,CAAA;AA0B/E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD,OAAO,EAAE,KAAK,WAAW,EAAQ,MAAM,wBAAwB,CAAA;AAgB/D,OAAO,EASL,KAAK,QAAQ,EAEd,MAAM,YAAY,CAAA;AAEnB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAA;AACxC,OAAO,EAAmC,KAAK,GAAG,EAAuB,MAAM,cAAc,CAAA;AAgB7F,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,UAAU,EAAE,UAAU,CAAA;IAC/B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,mFAAmF;IACnF,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;IAC3B,QAAQ,CAAC,MAAM,EAAE,SAAS,CAAA;IAC1B,QAAQ,CAAC,MAAM,EAAE,WAAW,CAAA;IAC5B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,eAAe,EAAE,QAAQ,CAAA;IAClC,QAAQ,CAAC,MAAM,EAAE,MAAM,IAAI,CAAA;CAC5B;AAED,+FAA+F;AAC/F,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,6BAqZ9C;AAkvBD,wBAAgB,aAAa,CAC3B,IAAI,EAAE,SAAS,GAAG,EAAE,EACpB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,KAAK,EAAE;IACL,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAA;IAC5B,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAA;IACtB,QAAQ,CAAC,eAAe,EAAE,OAAO,CAAA;IACjC,QAAQ,CAAC,WAAW,EAAE,OAAO,CAAA;CAC9B,GACA,MAAM,CAcR"}
|
package/dist/tui/format.d.ts
CHANGED
|
@@ -105,6 +105,35 @@ export declare function contextBreakdown(context: ContextUse, columns: {
|
|
|
105
105
|
} | undefined;
|
|
106
106
|
/** `1m 04s`, `12.4s`, `820ms`. */
|
|
107
107
|
export declare function duration(ms: number): string;
|
|
108
|
+
/** A clock that ticks by the second: `8s`, `2m 14s`, `1h 03m`. */
|
|
109
|
+
export declare function elapsed(ms: number): string;
|
|
110
|
+
/** A background command as `sixb` reports it. */
|
|
111
|
+
export interface BackgroundCommand {
|
|
112
|
+
readonly id: string;
|
|
113
|
+
readonly command: string;
|
|
114
|
+
readonly status: "running" | "exited" | "stopped";
|
|
115
|
+
readonly exitCode?: number;
|
|
116
|
+
readonly startedAt: string;
|
|
117
|
+
readonly endedAt?: string;
|
|
118
|
+
}
|
|
119
|
+
/** A command's first line, cut to `max` characters. */
|
|
120
|
+
export declare function commandLabel(command: string, max?: number): string;
|
|
121
|
+
/**
|
|
122
|
+
* The running background commands as the line over the composer lists them, `● bun run dev 2m
|
|
123
|
+
* 14s`, as many as fit in `room` columns, oldest first; `more` counts the rest.
|
|
124
|
+
*/
|
|
125
|
+
export declare function backgroundStrip(commands: readonly BackgroundCommand[], now: number, room: number): {
|
|
126
|
+
readonly shown: readonly {
|
|
127
|
+
readonly label: string;
|
|
128
|
+
readonly time: string;
|
|
129
|
+
}[];
|
|
130
|
+
readonly more: number;
|
|
131
|
+
};
|
|
132
|
+
/** What the screen says as a background command ends: its notice, and whether it failed. */
|
|
133
|
+
export declare function backgroundEnded(command: BackgroundCommand): {
|
|
134
|
+
readonly text: string;
|
|
135
|
+
readonly failed: boolean;
|
|
136
|
+
};
|
|
108
137
|
/** A path with the home directory as `~`, and its middle elided past `max` characters. */
|
|
109
138
|
export declare function shortPath(path: string, home: string, max?: number): string;
|
|
110
139
|
/** `1 more line`, `3 more lines`. */
|
package/dist/tui/format.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../../src/tui/format.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAEpD,KAAK,QAAQ,GAAG,OAAO,CAAC,IAAI,EAAE;IAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;CAAE,CAAC,CAAA;AAExD,mEAAmE;AACnE,MAAM,WAAW,QAAQ;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAA;IACvB,gFAAgF;IAChF,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAA;IACpC,4DAA4D;IAC5D,QAAQ,CAAC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AAgB,eAAe,CAAC,OAAO,EAAE,iBAAiB,GAAG;IAC3D,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;IACrB,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAA;CACzB,CAQA;AAED,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,SAAK,GAAG,MAAM,CAStE;AAED,qCAAqC;AACrC,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE1D;AAED;;;GAGG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAUlE"}
|
package/dist/tui/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tui/index.tsx"],"names":[],"mappings":"AA8BA,6FAA6F;AAC7F,eAAO,MAAM,OAAO,QAAiC,CAAA;AAErD;;;GAGG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/tui/index.tsx"],"names":[],"mappings":"AA8BA,6FAA6F;AAC7F,eAAO,MAAM,OAAO,QAAiC,CAAA;AAErD;;;GAGG;AACH,wBAAsB,MAAM,CAAC,OAAO,EAAE;IACpC,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAC1B,GAAG,OAAO,CAAC,IAAI,CAAC,CAkFhB"}
|
package/dist/tui/settings.d.ts
CHANGED
|
@@ -18,9 +18,12 @@ export interface Settings {
|
|
|
18
18
|
/**
|
|
19
19
|
* Whether your messages from the web, or another device, run in this folder: while it is on,
|
|
20
20
|
* `sixb` tells the project it is open here, and runs the turns sent to its conversations here.
|
|
21
|
-
* Kept per folder, apart from the settings every `sixb` rewrites
|
|
21
|
+
* Kept per folder and project, apart from the settings every `sixb` rewrites, and read once
|
|
22
|
+
* connected, so it is off until then: `runner/allowed-folders.ts`.
|
|
22
23
|
*/
|
|
23
24
|
readonly continueFromWeb: boolean;
|
|
25
|
+
/** Whether a turn running on this computer keeps it from going to sleep. */
|
|
26
|
+
readonly keepAwake: boolean;
|
|
24
27
|
}
|
|
25
28
|
export declare const DEFAULT_SETTINGS: Settings;
|
|
26
29
|
export declare const APPROVAL_MODES: readonly {
|
|
@@ -32,13 +35,7 @@ export declare function approvalLabel(mode: ApprovalMode): string;
|
|
|
32
35
|
/** What this computer is called where the person picks where a conversation runs. */
|
|
33
36
|
export declare function computerName(): string;
|
|
34
37
|
export declare function placeLabel(place: Place): string;
|
|
35
|
-
|
|
36
|
-
* Keep the choice for this folder alone. Reads the file first, as another `sixb` may have written
|
|
37
|
-
* it, and refuses one it can't read rather than lose the other folders' choices. Written whole, so
|
|
38
|
-
* no reader ever finds half of it.
|
|
39
|
-
*/
|
|
40
|
-
export declare function rememberWebMessages(folder: string, on: boolean): Promise<void>;
|
|
41
|
-
export declare function loadSettings(folder: string): Promise<Settings>;
|
|
38
|
+
export declare function loadSettings(): Promise<Settings>;
|
|
42
39
|
export declare function saveSettings(settings: Settings): Promise<void>;
|
|
43
40
|
/** The model the next message runs on, as the composer names it. */
|
|
44
41
|
export declare function modelLabel(models: readonly LanguageModel[], settings: Settings): {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"settings.d.ts","sourceRoot":"","sources":["../../src/tui/settings.ts"],"names":[],"mappings":"AAGA,OAAO,K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C,QAAQ,EAAE,QAAQ,GACjB;IAAE,QAAQ,CAAC,KAAK,CAAC,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC;IAAC,QAAQ,CAAC,SAAS,CAAC,EAAE,cAAc,CAAA;CAAE,CAiBjG"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
1
|
import type { DeployAccessKey, DeployCheck, DeployRelease, DeployStatus } from "@sixb/core/deploy";
|
|
2
|
-
export declare function deployReleaseView({ release, configPath, }: {
|
|
2
|
+
export declare function deployReleaseView({ release, configPath, warnings, }: {
|
|
3
3
|
release: DeployRelease;
|
|
4
4
|
configPath: string;
|
|
5
|
+
warnings?: readonly string[];
|
|
5
6
|
}): string;
|
|
6
7
|
/** The plain line a finished step prints where there is no live view, and in CI logs. */
|
|
7
8
|
export declare function deployStepLine(label: string, seconds: string): string;
|
|
8
9
|
/** How a deploy ended. What was deployed, and where, opened the deploy's output already. */
|
|
9
|
-
export declare function deployCompleteView({ release, seconds, keptEnv, }: {
|
|
10
|
+
export declare function deployCompleteView({ release, seconds, keptEnv, warnings, }: {
|
|
10
11
|
release: DeployRelease;
|
|
11
12
|
seconds?: number;
|
|
12
13
|
/** The deploy couldn't update the server's `.env`, so this release runs on its current values. */
|
|
13
14
|
keptEnv?: boolean;
|
|
15
|
+
warnings?: readonly string[];
|
|
14
16
|
}): string;
|
|
15
17
|
export declare function deployStatusView({ name, location, status, }: {
|
|
16
18
|
name: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deploy-screens.d.ts","sourceRoot":"","sources":["../../src/ui/deploy-screens.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,WAAW,EAEX,aAAa,EACb,YAAY,EACb,MAAM,mBAAmB,CAAA;
|
|
1
|
+
{"version":3,"file":"deploy-screens.d.ts","sourceRoot":"","sources":["../../src/ui/deploy-screens.ts"],"names":[],"mappings":"AAAA,OAAO,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,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,OAAO,EAAE,SAAS,eAAe,EAAE,CAAA;IACnC,QAAQ,EAAE;QAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QAAC,QAAQ,CAAC,KAAK,EAAE,SAAS,GAAG,WAAW,GAAG,MAAM,CAAA;KAAE,CAAA;IACrF,KAAK,EAAE;QACL,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;QACrB,QAAQ,CAAC,UAAU,EAAE,SAAS;YAC5B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;YACrB,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAA;YACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAA;SAC7B,EAAE,CAAA;KACJ,GAAG,IAAI,CAAA;CACT,GAAG,MAAM,CA8CT;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,KAAK,EACL,IAAI,GACL,EAAE;IACD,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,SAAS,eAAe,EAAE,CAAA;CACjC,GAAG,MAAM,CAcT"}
|
package/dist/ui/env-screens.d.ts
CHANGED
|
@@ -15,12 +15,25 @@ export declare function envSetView(input: {
|
|
|
15
15
|
readonly env: EnvName;
|
|
16
16
|
readonly declared: boolean;
|
|
17
17
|
}): string;
|
|
18
|
+
/** What `init` did with `sixb.env.ts`: wrote names into it, left it to the author, or had none to add. */
|
|
19
|
+
export type EnvInitConfig = {
|
|
20
|
+
readonly kind: "written";
|
|
21
|
+
readonly names: number;
|
|
22
|
+
} | {
|
|
23
|
+
readonly kind: "paste";
|
|
24
|
+
readonly names: number;
|
|
25
|
+
readonly lines: readonly string[];
|
|
26
|
+
} | {
|
|
27
|
+
readonly kind: "unchanged";
|
|
28
|
+
};
|
|
18
29
|
export declare function envInitView(input: {
|
|
30
|
+
/** Per environment: how many values were sent, and how many it had already. */
|
|
19
31
|
readonly uploaded: readonly {
|
|
20
32
|
readonly env: EnvName;
|
|
21
33
|
readonly count: number;
|
|
34
|
+
readonly already: number;
|
|
22
35
|
}[];
|
|
23
|
-
readonly
|
|
36
|
+
readonly config: EnvInitConfig;
|
|
24
37
|
}): string;
|
|
25
38
|
export interface EnvStatusRow {
|
|
26
39
|
readonly name: string;
|