@maiaos/cli 0.1.0-canary.6 → 0.1.0-canary.61
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 +8 -7
- package/dist/agents/client.d.ts +47 -27
- package/dist/agents/client.js +10 -3
- package/dist/agents/commands.d.ts +1 -0
- package/dist/agents/commands.js +24 -2
- package/dist/agents/index.d.ts +1 -1
- package/dist/agents/index.js +1 -1
- package/dist/agents/input.js +6 -0
- package/dist/agents/output/format.js +11 -0
- package/dist/agents/tree/tree.js +13 -1
- package/dist/bin/maia.cdx.json +19 -19
- package/dist/bin/maia.mjs +1 -1
- package/dist/cli/cli.d.ts +8 -2
- package/dist/cli/cli.js +29 -6
- package/dist/cli/index.d.ts +1 -1
- package/dist/cli/index.js +1 -1
- package/dist/command-line/context.d.ts +4 -2
- package/dist/command-line/emit/index.d.ts +4 -0
- package/dist/command-line/emit/index.js +4 -0
- package/dist/command-line/{output.d.ts → emit/output.d.ts} +2 -2
- package/dist/command-line/{rows.d.ts → emit/rows.d.ts} +2 -0
- package/dist/command-line/{rows.js → emit/rows.js} +8 -0
- package/dist/command-line/index.d.ts +5 -5
- package/dist/command-line/index.js +5 -5
- package/dist/command-line/input/arguments.d.ts +10 -0
- package/dist/command-line/input/arguments.js +30 -10
- package/dist/command-line/input/index.d.ts +2 -1
- package/dist/command-line/input/index.js +2 -1
- package/dist/command-line/input/manager-options.d.ts +10 -0
- package/dist/command-line/input/manager-options.js +38 -0
- package/dist/command-line/two-phase/index.d.ts +2 -0
- package/dist/command-line/two-phase/index.js +2 -0
- package/dist/command-line/{two-phase.d.ts → two-phase/two-phase.d.ts} +12 -12
- package/dist/command-line/{two-phase.js → two-phase/two-phase.js} +2 -2
- package/dist/command-receipt/command.js +1 -1
- package/dist/command-tree/tree.d.ts +1 -1
- package/dist/command-tree/tree.js +6 -1
- package/dist/connection/input.js +2 -2
- package/dist/connection/system.js +3 -2
- package/dist/connection/tree/tree.js +5 -5
- package/dist/events/commands.js +65 -0
- package/dist/events/index.js +2 -0
- package/dist/events/tree/index.js +2 -0
- package/dist/events/tree/tree.js +17 -0
- package/dist/import/batch.js +196 -0
- package/dist/import/client.d.ts +3 -3
- package/dist/import/client.js +1 -1
- package/dist/import/commands.d.ts +1 -0
- package/dist/import/commands.js +82 -8
- package/dist/import/index.d.ts +1 -1
- package/dist/import/index.js +1 -1
- package/dist/import/input.js +38 -3
- package/dist/import/manifest.js +107 -0
- package/dist/import/output.js +46 -2
- package/dist/local-node/client.d.ts +1 -0
- package/dist/local-node/client.js +1 -0
- package/dist/local-node/index.d.ts +2 -1
- package/dist/local-node/index.js +2 -1
- package/dist/local-node/wait.d.ts +10 -0
- package/dist/local-node/wait.js +17 -0
- package/dist/login/gateway.js +2 -2
- package/dist/login/vendor-input.js +2 -2
- package/dist/mcp/calls.js +6 -1
- package/dist/mcp/routing.js +1 -0
- package/dist/project-guard/client.d.ts +12 -0
- package/dist/project-guard/input.js +15 -1
- package/dist/project-guard/output/format.js +5 -0
- package/dist/project-workspace/tree/tree.js +1 -1
- package/dist/reference/resolve.js +9 -2
- package/dist/remote-node/connector.js +8 -1
- package/dist/run-ledger/client.d.ts +2 -0
- package/dist/session/agent-permission.d.ts +2 -2
- package/dist/session/approval/client.d.ts +5 -2
- package/dist/session/approval/client.js +2 -2
- package/dist/session/approval/commands.d.ts +1 -0
- package/dist/session/approval/commands.js +97 -17
- package/dist/session/approval/index.d.ts +1 -1
- package/dist/session/approval/index.js +1 -1
- package/dist/session/client.d.ts +14 -3
- package/dist/session/client.js +17 -2
- package/dist/session/coding-client.d.ts +2 -0
- package/dist/session/coding-client.js +1 -2
- package/dist/session/coding-commands.js +24 -7
- package/dist/session/commands.d.ts +1 -0
- package/dist/session/commands.js +131 -18
- package/dist/session/create-tasks.js +10 -2
- package/dist/session/index.d.ts +1 -1
- package/dist/session/index.js +1 -1
- package/dist/session/output/human.js +32 -5
- package/dist/session/output/index.js +1 -1
- package/dist/session/output/tasks.js +51 -7
- package/dist/session/tree/tree.js +52 -19
- package/dist/session/turn/client.js +7 -9
- package/dist/session/turn/commands.js +67 -20
- package/dist/session/turn/output.d.ts +6 -0
- package/dist/session/turn/output.js +12 -2
- package/dist/status/client.d.ts +14 -3
- package/dist/status/command.js +3 -1
- package/dist/status/doctor.d.ts +5 -1
- package/dist/status/doctor.js +10 -4
- package/dist/status/output/compact.d.ts +3 -0
- package/dist/status/output/compact.js +17 -7
- package/dist/status/output/human.js +15 -0
- package/dist/terminal/control-commands.js +26 -9
- package/dist/terminal/keys.js +62 -0
- package/dist/terminal/output/compact-list.js +3 -0
- package/dist/terminal/output/human.js +2 -2
- package/dist/terminal/tree/tree.js +1 -1
- package/dist/webhooks/client.d.ts +156 -0
- package/dist/webhooks/client.js +8 -0
- package/dist/webhooks/commands.d.ts +17 -0
- package/dist/webhooks/commands.js +76 -0
- package/dist/webhooks/index.d.ts +3 -0
- package/dist/webhooks/index.js +3 -0
- package/dist/webhooks/input.js +125 -0
- package/dist/webhooks/output/format.js +75 -0
- package/dist/webhooks/output/index.js +2 -0
- package/dist/webhooks/tree/index.js +2 -0
- package/dist/webhooks/tree/tree.js +49 -0
- package/guidance/maia-cli/SKILL.md +1 -1
- package/guidance/maia-node/SKILL.md +54 -0
- package/guidance/maia-orchestration/SKILL.md +1 -2
- package/guidance/maia-sessions/SKILL.md +69 -0
- package/package.json +5 -5
- package/dist/address-space/address-space.d.ts +0 -38
- package/dist/address-space/index.d.ts +0 -2
- package/dist/agents/input.d.ts +0 -130
- package/dist/agents/output/format.d.ts +0 -8
- package/dist/agents/output/index.d.ts +0 -2
- package/dist/agents/tree/index.d.ts +0 -2
- package/dist/agents/tree/tree.d.ts +0 -3
- package/dist/bootstrap/exit.d.ts +0 -14
- package/dist/bootstrap/exit.js +0 -42
- package/dist/bootstrap/index.d.ts +0 -3
- package/dist/bootstrap/index.js +0 -3
- package/dist/bootstrap/process.d.ts +0 -5
- package/dist/bootstrap/process.js +0 -23
- package/dist/bootstrap/run.d.ts +0 -25
- package/dist/bootstrap/run.js +0 -95
- package/dist/bootstrap/stdio.d.ts +0 -4
- package/dist/bootstrap/stdio.js +0 -9
- package/dist/cli/environment.d.ts +0 -8
- package/dist/cli/services.d.ts +0 -4
- package/dist/command-line/input/stdin-stream.d.ts +0 -4
- package/dist/command-line/json-decoder.d.ts +0 -3
- package/dist/command-receipt/command.d.ts +0 -4
- package/dist/command-receipt/compact-list.d.ts +0 -20
- package/dist/command-receipt/index.d.ts +0 -3
- package/dist/command-tree/completion.d.ts +0 -6
- package/dist/command-tree/local.d.ts +0 -3
- package/dist/command-tree/row.js +0 -2
- package/dist/connection/access/format.d.ts +0 -8
- package/dist/connection/access/input.d.ts +0 -53
- package/dist/connection/input.d.ts +0 -50
- package/dist/connection/signin.d.ts +0 -4
- package/dist/connection/tree/index.d.ts +0 -2
- package/dist/connection/tree/tree.d.ts +0 -3
- package/dist/container/output/format.d.ts +0 -11
- package/dist/container/output/index.d.ts +0 -2
- package/dist/context/client.d.ts +0 -7
- package/dist/context/commands.d.ts +0 -3
- package/dist/context/index.d.ts +0 -3
- package/dist/dashboard/cockpit-client.d.ts +0 -6
- package/dist/dashboard/cockpit-client.js +0 -27
- package/dist/dashboard/cockpits.d.ts +0 -29
- package/dist/dashboard/cockpits.js +0 -65
- package/dist/dashboard/dashboard.d.ts +0 -7
- package/dist/dashboard/draw.d.ts +0 -15
- package/dist/dashboard/frame.d.ts +0 -4
- package/dist/dashboard/index.d.ts +0 -2
- package/dist/dashboard/modes.d.ts +0 -5
- package/dist/dashboard/node-connection.d.ts +0 -15
- package/dist/dashboard/node-connection.js +0 -51
- package/dist/dashboard/pi-tui.d.ts +0 -6
- package/dist/dashboard/status-bar.d.ts +0 -4
- package/dist/dashboard/terminal.d.ts +0 -53
- package/dist/dashboard/tree-model.d.ts +0 -28
- package/dist/dashboard/tree.d.ts +0 -10
- package/dist/development/cli.d.ts +0 -3
- package/dist/development/cli.js +0 -44
- package/dist/execution/tree/index.d.ts +0 -2
- package/dist/execution/tree/tree.d.ts +0 -3
- package/dist/hold/output/format.d.ts +0 -11
- package/dist/hold/output/index.d.ts +0 -2
- package/dist/hold/tree/index.d.ts +0 -2
- package/dist/hold/tree/tree.d.ts +0 -3
- package/dist/import/input.d.ts +0 -16
- package/dist/import/output.d.ts +0 -6
- package/dist/integration/output.d.ts +0 -22
- package/dist/login/failure.d.ts +0 -3
- package/dist/login/gateway.d.ts +0 -12
- package/dist/login/menu.d.ts +0 -4
- package/dist/login/output/format.d.ts +0 -16
- package/dist/login/output/index.d.ts +0 -2
- package/dist/login/vendor-account.d.ts +0 -95
- package/dist/login/vendor-input.d.ts +0 -14
- package/dist/mcp/calls.d.ts +0 -8
- package/dist/orchestration/output/compact-aggregate.d.ts +0 -121
- package/dist/orchestration/output/compact-run-list.d.ts +0 -20
- package/dist/orchestration/output/human.d.ts +0 -80
- package/dist/orchestration/output/index.d.ts +0 -4
- package/dist/orchestration/tree/index.d.ts +0 -2
- package/dist/orchestration/tree/tree.d.ts +0 -3
- package/dist/port-lease/input.d.ts +0 -65
- package/dist/port-lease/output/format.d.ts +0 -11
- package/dist/port-lease/output/index.d.ts +0 -2
- package/dist/presentation/output/format.d.ts +0 -11
- package/dist/presentation/output/index.d.ts +0 -3
- package/dist/project-guard/input.d.ts +0 -18
- package/dist/project-guard/output/format.d.ts +0 -11
- package/dist/project-guard/output/index.d.ts +0 -2
- package/dist/project-workspace/output/human.d.ts +0 -139
- package/dist/project-workspace/output/index.d.ts +0 -3
- package/dist/project-workspace/output/metadata.d.ts +0 -11
- package/dist/project-workspace/tree/index.d.ts +0 -2
- package/dist/project-workspace/tree/tree.d.ts +0 -3
- package/dist/provider/client.d.ts +0 -6
- package/dist/provider/commands.d.ts +0 -3
- package/dist/provider/index.d.ts +0 -3
- package/dist/reference/commands.d.ts +0 -3
- package/dist/reference/index.d.ts +0 -3
- package/dist/reference/resolve.d.ts +0 -31
- package/dist/reference/tree/index.d.ts +0 -2
- package/dist/reference/tree/tree.d.ts +0 -3
- package/dist/remote-node/reachability.d.ts +0 -64
- package/dist/remote-node/text.d.ts +0 -10
- package/dist/remote-node/tree/index.d.ts +0 -2
- package/dist/remote-node/tree/tree.d.ts +0 -3
- package/dist/routine/input.d.ts +0 -28
- package/dist/routine/output/format.d.ts +0 -23
- package/dist/routine/output/index.d.ts +0 -2
- package/dist/routine/tree/index.d.ts +0 -2
- package/dist/routine/tree/tree.d.ts +0 -3
- package/dist/run-ledger/input.d.ts +0 -42
- package/dist/run-ledger/output/format.d.ts +0 -11
- package/dist/run-ledger/output/index.d.ts +0 -2
- package/dist/session/approval/output/format.d.ts +0 -23
- package/dist/session/approval/output/index.d.ts +0 -2
- package/dist/session/attach-render.d.ts +0 -16
- package/dist/session/create-tasks.d.ts +0 -20
- package/dist/session/interaction/input.d.ts +0 -15
- package/dist/session/interaction/output/format.d.ts +0 -11
- package/dist/session/interaction/output/index.d.ts +0 -2
- package/dist/session/output/diff.d.ts +0 -3
- package/dist/session/output/failure.d.ts +0 -11
- package/dist/session/output/human.d.ts +0 -112
- package/dist/session/output/index.d.ts +0 -6
- package/dist/session/output/observe.d.ts +0 -4
- package/dist/session/output/tasks.d.ts +0 -34
- package/dist/session/task-file.d.ts +0 -5
- package/dist/session/tree/index.d.ts +0 -2
- package/dist/session/tree/tree.d.ts +0 -3
- package/dist/team-workspace/ceremony.d.ts +0 -19
- package/dist/team-workspace/confirmation.d.ts +0 -4
- package/dist/team-workspace/dependencies.js +0 -2
- package/dist/team-workspace/output.d.ts +0 -15
- package/dist/terminal/arguments.d.ts +0 -13
- package/dist/terminal/output/compact-list.d.ts +0 -148
- package/dist/terminal/output/human.d.ts +0 -42
- package/dist/terminal/output/index.d.ts +0 -3
- package/dist/terminal/tree/index.d.ts +0 -2
- package/dist/terminal/tree/tree.d.ts +0 -3
- /package/dist/command-line/{json-decoder.js → emit/json-decoder.js} +0 -0
- /package/dist/command-line/{json.d.ts → emit/json.d.ts} +0 -0
- /package/dist/command-line/{json.js → emit/json.js} +0 -0
- /package/dist/command-line/{output.js → emit/output.js} +0 -0
package/dist/bootstrap/stdio.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as NodeStdio from "@effect/platform-node-shared/NodeStdio";
|
|
2
|
-
import * as Effect from "effect/Effect";
|
|
3
|
-
import * as Stdio from "effect/Stdio";
|
|
4
|
-
import { readBoundedStdin, } from "../command-line/input/index.js";
|
|
5
|
-
export const readStdin = (request) => Effect.gen(function* () {
|
|
6
|
-
const stdio = yield* Stdio.Stdio;
|
|
7
|
-
return yield* readBoundedStdin(stdio.stdin, request);
|
|
8
|
-
}).pipe(Effect.provide(NodeStdio.layer));
|
|
9
|
-
//# sourceMappingURL=stdio.js.map
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
export type EnvironmentOptions = {
|
|
3
|
-
readonly node?: string;
|
|
4
|
-
readonly noInput?: string;
|
|
5
|
-
readonly profile?: string;
|
|
6
|
-
};
|
|
7
|
-
export declare const environmentOptions: Effect.Effect<EnvironmentOptions>;
|
|
8
|
-
//# sourceMappingURL=environment.d.ts.map
|
package/dist/cli/services.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import type { CliServices } from "../command-line/index.js";
|
|
3
|
-
export declare const provideCliServices: <TValue, TError>(command: Effect.Effect<TValue, TError, CliServices>) => Effect.Effect<TValue, TError>;
|
|
4
|
-
//# sourceMappingURL=services.d.ts.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type * as Effect from "effect/Effect";
|
|
2
|
-
import * as Stream from "effect/Stream";
|
|
3
|
-
export declare const foldStream: <TChunk, TState, TError>(input: Stream.Stream<TChunk, unknown>, initial: () => TState, step: (state: TState, chunk: TChunk) => Effect.Effect<TState, TError>) => Effect.Effect<TState, TError>;
|
|
4
|
-
//# sourceMappingURL=stdin-stream.d.ts.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { type CommandContext, type CommandEffect } from "../command-line/index.js";
|
|
2
|
-
export declare const runReceiptList: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
3
|
-
export declare const runReceiptShow: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
4
|
-
//# sourceMappingURL=command.d.ts.map
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import type { ReceiptListResult } from "@maiaos/sdk";
|
|
2
|
-
type CliReceiptListItem = {
|
|
3
|
-
readonly commandId: ReceiptListResult["items"][number]["commandId"];
|
|
4
|
-
readonly createdAt: ReceiptListResult["items"][number]["createdAt"];
|
|
5
|
-
readonly method: ReceiptListResult["items"][number]["method"];
|
|
6
|
-
readonly receiptId: ReceiptListResult["items"][number]["receiptId"];
|
|
7
|
-
readonly state: ReceiptListResult["items"][number]["state"];
|
|
8
|
-
readonly target: ReceiptListResult["items"][number]["target"];
|
|
9
|
-
};
|
|
10
|
-
export type CliReceiptListResult = {
|
|
11
|
-
readonly command: "receipt.list";
|
|
12
|
-
readonly count: number;
|
|
13
|
-
readonly items: readonly CliReceiptListItem[];
|
|
14
|
-
readonly nextCursor?: ReceiptListResult["nextCursor"];
|
|
15
|
-
};
|
|
16
|
-
export declare const projectReceiptListItem: (item: ReceiptListResult["items"][number]) => CliReceiptListItem;
|
|
17
|
-
export declare const projectReceiptListResult: (value: ReceiptListResult) => CliReceiptListResult;
|
|
18
|
-
export declare const formatReceiptList: (result: CliReceiptListResult) => string;
|
|
19
|
-
export {};
|
|
20
|
-
//# sourceMappingURL=compact-list.d.ts.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
declare const SHELLS: readonly ["bash", "zsh", "fish"];
|
|
2
|
-
export type CompletionShell = (typeof SHELLS)[number];
|
|
3
|
-
export declare const isCompletionShell: (value: string | undefined) => value is CompletionShell;
|
|
4
|
-
export declare const completionScript: (shell: CompletionShell) => string;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=completion.d.ts.map
|
package/dist/command-tree/row.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { ConnectionGrantListResult, ConnectionGrantSetConfirmResult, ConnectionGrantSetPreviewResult, ConnectionPoolListResult, ConnectionPoolSetConfirmResult, ConnectionPoolSetPreviewResult } from "@maiaos/sdk";
|
|
2
|
-
export type ConnectionAccessResult = ConnectionGrantListResult | ConnectionGrantSetConfirmResult | ConnectionGrantSetPreviewResult | ConnectionPoolListResult | ConnectionPoolSetConfirmResult | ConnectionPoolSetPreviewResult;
|
|
3
|
-
export type CliConnectionAccessResult = {
|
|
4
|
-
readonly command: ConnectionAccessResult["method"];
|
|
5
|
-
readonly result: ConnectionAccessResult;
|
|
6
|
-
};
|
|
7
|
-
export declare const formatConnectionAccessResult: ({ result, }: CliConnectionAccessResult) => string;
|
|
8
|
-
//# sourceMappingURL=format.d.ts.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { type ParsedOptions } from "../../command-line/index.js";
|
|
3
|
-
type PoolMode = "off" | "rotate" | "single";
|
|
4
|
-
export declare const readGrantList: (tokens: readonly string[]) => {
|
|
5
|
-
afterCursor?: string | undefined;
|
|
6
|
-
limit: number;
|
|
7
|
-
scope?: undefined;
|
|
8
|
-
connectionId?: string | undefined;
|
|
9
|
-
state?: "active" | "revoked" | undefined;
|
|
10
|
-
} | {
|
|
11
|
-
afterCursor?: string | undefined;
|
|
12
|
-
limit: number;
|
|
13
|
-
scope: {
|
|
14
|
-
readonly id: string;
|
|
15
|
-
readonly kind: "project" | "workspace";
|
|
16
|
-
};
|
|
17
|
-
connectionId?: string | undefined;
|
|
18
|
-
state?: "active" | "revoked" | undefined;
|
|
19
|
-
};
|
|
20
|
-
export declare const readPoolList: (tokens: readonly string[]) => {
|
|
21
|
-
afterCursor?: string | undefined;
|
|
22
|
-
limit: number;
|
|
23
|
-
scope?: undefined;
|
|
24
|
-
} | {
|
|
25
|
-
afterCursor?: string | undefined;
|
|
26
|
-
limit: number;
|
|
27
|
-
scope: {
|
|
28
|
-
readonly id: string;
|
|
29
|
-
readonly kind: "project" | "workspace";
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
export declare const GRANT_SET_OPTIONS: ReadonlySet<string>;
|
|
33
|
-
export declare const readGrantPreview: (parsed: ParsedOptions) => Effect.Effect<{
|
|
34
|
-
commandId: string;
|
|
35
|
-
connectionId: string;
|
|
36
|
-
granted: boolean;
|
|
37
|
-
scope: {
|
|
38
|
-
readonly id: string;
|
|
39
|
-
readonly kind: "project" | "workspace";
|
|
40
|
-
};
|
|
41
|
-
}, never, import("effect/Crypto").Crypto>;
|
|
42
|
-
export declare const POOL_SET_OPTIONS: ReadonlySet<string>;
|
|
43
|
-
export declare const readPoolPreview: (parsed: ParsedOptions) => Effect.Effect<{
|
|
44
|
-
commandId: string;
|
|
45
|
-
members: readonly string[];
|
|
46
|
-
mode: PoolMode;
|
|
47
|
-
scope: {
|
|
48
|
-
readonly id: string;
|
|
49
|
-
readonly kind: "project" | "workspace";
|
|
50
|
-
};
|
|
51
|
-
}, never, import("effect/Crypto").Crypto>;
|
|
52
|
-
export {};
|
|
53
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
export declare const readConnectionCreate: (tokens: readonly string[]) => {
|
|
2
|
-
maxConcurrentSessions?: undefined;
|
|
3
|
-
commandId: string | undefined;
|
|
4
|
-
configRootKind: string;
|
|
5
|
-
executor: string;
|
|
6
|
-
name: string;
|
|
7
|
-
} | {
|
|
8
|
-
maxConcurrentSessions: number;
|
|
9
|
-
commandId: string | undefined;
|
|
10
|
-
configRootKind: string;
|
|
11
|
-
executor: string;
|
|
12
|
-
name: string;
|
|
13
|
-
};
|
|
14
|
-
export declare const readConnectionList: (tokens: readonly string[]) => {
|
|
15
|
-
limit: number;
|
|
16
|
-
afterCursor?: string | undefined;
|
|
17
|
-
};
|
|
18
|
-
export declare const readConnectionTarget: (tokens: readonly string[]) => {
|
|
19
|
-
connectionId: string | undefined;
|
|
20
|
-
};
|
|
21
|
-
export declare const readConnectionCapacity: (tokens: readonly string[]) => {
|
|
22
|
-
maxConcurrentSessions?: undefined;
|
|
23
|
-
commandId: string | undefined;
|
|
24
|
-
connectionId: string | undefined;
|
|
25
|
-
expectedRevision: string;
|
|
26
|
-
} | {
|
|
27
|
-
maxConcurrentSessions: number;
|
|
28
|
-
commandId: string | undefined;
|
|
29
|
-
connectionId: string | undefined;
|
|
30
|
-
expectedRevision: string;
|
|
31
|
-
};
|
|
32
|
-
export declare const readConnectionUsage: (tokens: readonly string[]) => {
|
|
33
|
-
connection: string;
|
|
34
|
-
refresh: boolean;
|
|
35
|
-
};
|
|
36
|
-
export declare const readConnectionSignin: (tokens: readonly string[]) => {
|
|
37
|
-
commandId: string | undefined;
|
|
38
|
-
connection: string;
|
|
39
|
-
flow: "browser" | "device-code";
|
|
40
|
-
};
|
|
41
|
-
export declare const readConnectionState: (tokens: readonly string[], state: "disabled" | "enabled") => {
|
|
42
|
-
commandId: string | undefined;
|
|
43
|
-
connectionId: string | undefined;
|
|
44
|
-
expectedRevision: string;
|
|
45
|
-
state: "disabled" | "enabled";
|
|
46
|
-
};
|
|
47
|
-
export declare const readConnectionModels: (tokens: readonly string[]) => {
|
|
48
|
-
connectionId: string;
|
|
49
|
-
};
|
|
50
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { Effect } from "effect";
|
|
2
|
-
import { CliArgumentError, type CommandContext } from "../command-line/index.js";
|
|
3
|
-
export declare const signInThroughNode: (tokens: readonly string[], context: CommandContext) => Effect.Effect<number, CliArgumentError | Error, import("effect/Crypto").Crypto>;
|
|
4
|
-
//# sourceMappingURL=signin.d.ts.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import type { ContainerCreateConfirmResult, ContainerCreatePreviewResult, ContainerIndexListResult, ContainerListResult, ContainerRenameConfirmResult, ContainerRenamePreviewResult, ContainerShowResult } from "@maiaos/sdk";
|
|
2
|
-
export type ContainerResult = ContainerCreateConfirmResult | ContainerCreatePreviewResult | ContainerIndexListResult | ContainerListResult | ContainerRenameConfirmResult | ContainerRenamePreviewResult | ContainerShowResult;
|
|
3
|
-
export type CliContainerResult = {
|
|
4
|
-
readonly command: ContainerResult["method"];
|
|
5
|
-
readonly result: ContainerResult;
|
|
6
|
-
};
|
|
7
|
-
export declare const isContainerResult: (result: {
|
|
8
|
-
readonly command: string;
|
|
9
|
-
}) => result is CliContainerResult;
|
|
10
|
-
export declare const formatContainerResult: ({ result, }: CliContainerResult) => string;
|
|
11
|
-
//# sourceMappingURL=format.d.ts.map
|
package/dist/context/client.d.ts
DELETED
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { InvocationContextShowResult } from "@maiaos/sdk";
|
|
2
|
-
import type { CliNodeEffect, CliNodeOperations } from "../local-node/index.js";
|
|
3
|
-
export declare const makeContextClient: (node: CliNodeOperations) => {
|
|
4
|
-
showAttachedCurrentContext: () => CliNodeEffect<InvocationContextShowResult>;
|
|
5
|
-
showCurrentContext: () => CliNodeEffect<InvocationContextShowResult>;
|
|
6
|
-
};
|
|
7
|
-
//# sourceMappingURL=client.d.ts.map
|
package/dist/context/index.d.ts
DELETED
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { type CockpitClient } from "@maiaos/client-core/cockpit";
|
|
2
|
-
import type * as Context from "effect/Context";
|
|
3
|
-
import type * as Crypto from "effect/Crypto";
|
|
4
|
-
import { type HeldConnection } from "./node-connection.js";
|
|
5
|
-
export declare const makeCockpitClient: (held: HeldConnection, context: Context.Context<Crypto.Crypto>) => CockpitClient;
|
|
6
|
-
//# sourceMappingURL=cockpit-client.d.ts.map
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { COCKPIT_CLIENT_METHODS, } from "@maiaos/client-core/cockpit";
|
|
2
|
-
import { classifyClientError } from "@maiaos/sdk";
|
|
3
|
-
import * as Effect from "effect/Effect";
|
|
4
|
-
import * as Exit from "effect/Exit";
|
|
5
|
-
import { newCliIdentifier, retryBriefSaturation, } from "../local-node/index.js";
|
|
6
|
-
import { noConnection } from "./node-connection.js";
|
|
7
|
-
const rejectsCredential = (error) => {
|
|
8
|
-
const { code } = classifyClientError(error, { mutation: false });
|
|
9
|
-
return code === "authentication_failed" || code === "credential_invalid";
|
|
10
|
-
};
|
|
11
|
-
const connectionLost = (error) => {
|
|
12
|
-
const { code, kind } = classifyClientError(error, { mutation: false });
|
|
13
|
-
return ((kind === "offline" && code !== "saturated") ||
|
|
14
|
-
kind === "outcome_unknown" ||
|
|
15
|
-
code === "node_unavailable" ||
|
|
16
|
-
rejectsCredential(error));
|
|
17
|
-
};
|
|
18
|
-
const failedOn = (held, connection) => (error) => Effect.andThen(connectionLost(error) ? held.lose(connection) : Effect.void, Effect.fail(rejectsCredential(error) ? noConnection("node_connecting") : error));
|
|
19
|
-
const operationOf = (client, name) => Reflect.get(client, name);
|
|
20
|
-
export const makeCockpitClient = (held, context) => Object.fromEntries(COCKPIT_CLIENT_METHODS.map((name) => [
|
|
21
|
-
name,
|
|
22
|
-
(parameters, options) => Effect.runPromiseWith(context)(Effect.flatMap(held.current, (connection) => retryBriefSaturation(Effect.flatMap(newCliIdentifier("request"), (messageId) => operationOf(connection.client, name)(parameters, {
|
|
23
|
-
...options,
|
|
24
|
-
messageId,
|
|
25
|
-
})), options?.deadlineAt).pipe(Effect.onExit((exit) => held.heard(connection, !Exit.hasInterrupts(exit))), Effect.catch(failedOn(held, connection)))), options?.signal === undefined ? {} : { signal: options.signal }),
|
|
26
|
-
]));
|
|
27
|
-
//# sourceMappingURL=cockpit-client.js.map
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type Cockpit, type CockpitClient, type CockpitState, type NodeCockpitState, type ReadAdmissionService } from "@maiaos/client-core/cockpit";
|
|
2
|
-
import { type NodeEntry, type NodeRegistry, type NodeView } from "@maiaos/client-core/node-registry";
|
|
3
|
-
import type { NodeApiEffectDiscoveryOptions } from "@maiaos/sdk/node/effect";
|
|
4
|
-
import type * as Crypto from "effect/Crypto";
|
|
5
|
-
import * as Effect from "effect/Effect";
|
|
6
|
-
import type * as Scope from "effect/Scope";
|
|
7
|
-
import * as Stream from "effect/Stream";
|
|
8
|
-
import type { CliNodeConnector } from "../local-node/index.js";
|
|
9
|
-
import { type OpenConnection } from "./node-connection.js";
|
|
10
|
-
export declare const READS_IN_FLIGHT = 3;
|
|
11
|
-
export type NodeCockpit = {
|
|
12
|
-
readonly admit: ReadAdmissionService;
|
|
13
|
-
readonly client: CockpitClient;
|
|
14
|
-
readonly cockpit: Cockpit;
|
|
15
|
-
readonly node: NodeEntry;
|
|
16
|
-
};
|
|
17
|
-
export declare const openNodeCockpit: (registry: NodeRegistry, node: NodeEntry, open: OpenConnection) => Effect.Effect<NodeCockpit, never, Crypto.Crypto | Scope.Scope>;
|
|
18
|
-
export type DashboardNodes = {
|
|
19
|
-
readonly local: CliNodeConnector;
|
|
20
|
-
readonly options: NodeApiEffectDiscoveryOptions;
|
|
21
|
-
readonly remote: (name: string, scope: Scope.Scope) => CliNodeConnector;
|
|
22
|
-
};
|
|
23
|
-
export type DashboardCockpits = {
|
|
24
|
-
readonly combined: Stream.Stream<CockpitState>;
|
|
25
|
-
readonly nodes: Stream.Stream<readonly NodeView[]>;
|
|
26
|
-
readonly states: Stream.Stream<readonly NodeCockpitState[]>;
|
|
27
|
-
};
|
|
28
|
-
export declare const dashboardCockpits: (nodes: DashboardNodes) => Effect.Effect<DashboardCockpits, never, Crypto.Crypto | Scope.Scope>;
|
|
29
|
-
//# sourceMappingURL=cockpits.d.ts.map
|
|
@@ -1,65 +0,0 @@
|
|
|
1
|
-
import { CockpitError, combineCockpits, makeCockpit, ReadAdmission, readRemoteNodes, } from "@maiaos/client-core/cockpit";
|
|
2
|
-
import { LOCAL_NODE, makeNodeRegistry, remoteNodeEntry, } from "@maiaos/client-core/node-registry";
|
|
3
|
-
import { pollingNodeChangesLayer } from "@maiaos/client-core/presentation";
|
|
4
|
-
import * as Effect from "effect/Effect";
|
|
5
|
-
import * as Option from "effect/Option";
|
|
6
|
-
import * as Schedule from "effect/Schedule";
|
|
7
|
-
import * as Semaphore from "effect/Semaphore";
|
|
8
|
-
import * as Stream from "effect/Stream";
|
|
9
|
-
import * as SubscriptionRef from "effect/SubscriptionRef";
|
|
10
|
-
import { makeCockpitClient } from "./cockpit-client.js";
|
|
11
|
-
import { holdConnection, } from "./node-connection.js";
|
|
12
|
-
export const READS_IN_FLIGHT = 3;
|
|
13
|
-
const RELOAD_EVERY = "15 seconds";
|
|
14
|
-
const REMOTE_LIST_EVERY = "60 seconds";
|
|
15
|
-
const instanceOf = (held) => held.current.pipe(Effect.map(({ status }) => status.instanceId), Effect.mapError(() => new CockpitError({
|
|
16
|
-
message: "The Node has no live connection.",
|
|
17
|
-
operation: "node.status",
|
|
18
|
-
reason: "offline",
|
|
19
|
-
})));
|
|
20
|
-
export const openNodeCockpit = (registry, node, open) => Effect.gen(function* () {
|
|
21
|
-
const held = yield* holdConnection(open);
|
|
22
|
-
const client = makeCockpitClient(held, yield* Effect.context());
|
|
23
|
-
const admit = (yield* Semaphore.make(READS_IN_FLIGHT)).withPermits(1);
|
|
24
|
-
const cockpit = yield* makeCockpit({
|
|
25
|
-
client,
|
|
26
|
-
instance: instanceOf(held),
|
|
27
|
-
nodeId: node.nodeId,
|
|
28
|
-
registry,
|
|
29
|
-
}).pipe(Effect.provide(pollingNodeChangesLayer(RELOAD_EVERY)), Effect.provideService(ReadAdmission, admit));
|
|
30
|
-
const reload = Effect.provideService(cockpit.reload, ReadAdmission, admit);
|
|
31
|
-
return { admit, client, cockpit: { ...cockpit, reload }, node };
|
|
32
|
-
});
|
|
33
|
-
const mirror = (states, { cockpit, node }) => Effect.forkScoped(Stream.runForEach(cockpit.changes, (state) => SubscriptionRef.update(states, (previous) => new Map(previous).set(node.nodeId, { node, state }))));
|
|
34
|
-
const startRemote = ({ nodes, registry, states }, remote) => {
|
|
35
|
-
const node = remoteNodeEntry(remote);
|
|
36
|
-
const open = (scope) => nodes.remote(remote.name, scope)(nodes.options);
|
|
37
|
-
return remote.state === "ready"
|
|
38
|
-
? Effect.flatMap(openNodeCockpit(registry, node, open), (opened) => mirror(states, opened))
|
|
39
|
-
: Effect.ignore(registry.recordFailure(node.nodeId, `It is ${remote.state}, not ready.`));
|
|
40
|
-
};
|
|
41
|
-
const runRemotes = (dashboard, remotes) => Effect.scoped(Effect.gen(function* () {
|
|
42
|
-
yield* SubscriptionRef.update(dashboard.states, (previous) => new Map([...previous].filter(([id]) => id === LOCAL_NODE.nodeId)));
|
|
43
|
-
yield* dashboard.registry.setEntries([
|
|
44
|
-
LOCAL_NODE,
|
|
45
|
-
...remotes.map(remoteNodeEntry),
|
|
46
|
-
]);
|
|
47
|
-
yield* Effect.forEach(remotes, (remote) => startRemote(dashboard, remote), { concurrency: "unbounded", discard: true });
|
|
48
|
-
return yield* Effect.never;
|
|
49
|
-
}));
|
|
50
|
-
const sameRemotes = (left, right) => JSON.stringify(left) === JSON.stringify(right);
|
|
51
|
-
const followRemotes = (dashboard, local) => Stream.fromEffect(Effect.option(Effect.provideService(readRemoteNodes(local.client), ReadAdmission, local.admit))).pipe(Stream.repeat(Schedule.spaced(REMOTE_LIST_EVERY)), Stream.filter(Option.isSome), Stream.map(({ value }) => value), Stream.changesWith(sameRemotes), Stream.switchMap((remotes) => Stream.fromEffect(runRemotes(dashboard, remotes))), Stream.runDrain);
|
|
52
|
-
export const dashboardCockpits = (nodes) => Effect.gen(function* () {
|
|
53
|
-
const registry = yield* makeNodeRegistry([LOCAL_NODE]);
|
|
54
|
-
const states = yield* SubscriptionRef.make(new Map());
|
|
55
|
-
const local = yield* openNodeCockpit(registry, LOCAL_NODE, () => nodes.local(nodes.options));
|
|
56
|
-
yield* mirror(states, local);
|
|
57
|
-
yield* Effect.forkScoped(followRemotes({ nodes, registry, states }, local));
|
|
58
|
-
const parts = SubscriptionRef.changes(states).pipe(Stream.map((held) => [...held.values()]));
|
|
59
|
-
return {
|
|
60
|
-
combined: parts.pipe(Stream.map(combineCockpits)),
|
|
61
|
-
nodes: registry.watch,
|
|
62
|
-
states: parts,
|
|
63
|
-
};
|
|
64
|
-
});
|
|
65
|
-
//# sourceMappingURL=cockpits.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import * as Effect from "effect/Effect";
|
|
2
|
-
import { CliArgumentError, type CommandContext, type CommandEffect } from "../command-line/index.js";
|
|
3
|
-
import { DashboardTerminal, type Screen } from "./terminal.js";
|
|
4
|
-
export declare const showScreen: (screen: Screen, context: CommandContext) => Effect.Effect<number, CliArgumentError, DashboardTerminal>;
|
|
5
|
-
export declare const showDashboard: (tokens: readonly string[], context: CommandContext) => Effect.Effect<number, CliArgumentError, DashboardTerminal>;
|
|
6
|
-
export declare const runDashboard: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
7
|
-
//# sourceMappingURL=dashboard.d.ts.map
|
package/dist/dashboard/draw.d.ts
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export type Width = (text: string) => number;
|
|
2
|
-
export type Span = readonly [text: string, style?: string];
|
|
3
|
-
export type Draw = {
|
|
4
|
-
readonly clip: (text: string, size: number) => string;
|
|
5
|
-
readonly column: (text: string, size: number) => string;
|
|
6
|
-
readonly columns: number;
|
|
7
|
-
readonly line: (spans: readonly Span[]) => string;
|
|
8
|
-
readonly width: Width;
|
|
9
|
-
};
|
|
10
|
-
export declare const makeDraw: (options: {
|
|
11
|
-
readonly color: boolean;
|
|
12
|
-
readonly columns: number;
|
|
13
|
-
readonly width: Width;
|
|
14
|
-
}) => Draw;
|
|
15
|
-
//# sourceMappingURL=draw.d.ts.map
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export type ModeLedger = readonly string[];
|
|
2
|
-
export declare const NO_MODES: ModeLedger;
|
|
3
|
-
export declare const observe: (ledger: ModeLedger, chunk: string) => ModeLedger;
|
|
4
|
-
export declare const resetBytes: (ledger: ModeLedger) => string;
|
|
5
|
-
//# sourceMappingURL=modes.d.ts.map
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { MaiaClientError } from "@maiaos/sdk";
|
|
2
|
-
import type * as Crypto from "effect/Crypto";
|
|
3
|
-
import * as Effect from "effect/Effect";
|
|
4
|
-
import type * as Scope from "effect/Scope";
|
|
5
|
-
import type { CliNodeConnection } from "../local-node/index.js";
|
|
6
|
-
export declare const UNANSWERED_BEFORE_LOST = 3;
|
|
7
|
-
export type OpenConnection = (scope: Scope.Scope) => Effect.Effect<CliNodeConnection, unknown, Crypto.Crypto>;
|
|
8
|
-
export declare const noConnection: (reason: "node_connecting" | "node_unreachable", detail?: string) => MaiaClientError;
|
|
9
|
-
export type HeldConnection = {
|
|
10
|
-
readonly current: Effect.Effect<CliNodeConnection, MaiaClientError>;
|
|
11
|
-
readonly heard: (connection: CliNodeConnection, answered: boolean) => Effect.Effect<void>;
|
|
12
|
-
readonly lose: (connection: CliNodeConnection) => Effect.Effect<void>;
|
|
13
|
-
};
|
|
14
|
-
export declare const holdConnection: (open: OpenConnection) => Effect.Effect<HeldConnection, never, Crypto.Crypto | Scope.Scope>;
|
|
15
|
-
//# sourceMappingURL=node-connection.d.ts.map
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import { MaiaClientError } from "@maiaos/sdk";
|
|
2
|
-
import * as Duration from "effect/Duration";
|
|
3
|
-
import * as Effect from "effect/Effect";
|
|
4
|
-
import * as Latch from "effect/Latch";
|
|
5
|
-
import * as Ref from "effect/Ref";
|
|
6
|
-
import * as Schedule from "effect/Schedule";
|
|
7
|
-
const RECONNECT_BACKOFF = Schedule.min([
|
|
8
|
-
Schedule.exponential(Duration.seconds(2)),
|
|
9
|
-
Schedule.spaced(Duration.seconds(30)),
|
|
10
|
-
]);
|
|
11
|
-
export const UNANSWERED_BEFORE_LOST = 3;
|
|
12
|
-
export const noConnection = (reason, detail) => new MaiaClientError("transport_failure", "The Node has no live connection; nothing was sent.", { cause: { reason, ...(detail === undefined ? {} : { detail }) } });
|
|
13
|
-
const ifHeld = (state) => (connection, change) => Effect.asVoid(Effect.flatten(Ref.modify(state, (held) => "connection" in held && held.connection === connection
|
|
14
|
-
? change(held)
|
|
15
|
-
: [Effect.void, held])));
|
|
16
|
-
const view = (state) => {
|
|
17
|
-
const onHeld = ifHeld(state);
|
|
18
|
-
return {
|
|
19
|
-
current: Effect.flatMap(Ref.get(state), (held) => "connection" in held
|
|
20
|
-
? Effect.succeed(held.connection)
|
|
21
|
-
: Effect.fail(held.failure)),
|
|
22
|
-
heard: (connection, answered) => onHeld(connection, (live) => {
|
|
23
|
-
const unanswered = answered ? 0 : live.unanswered + 1;
|
|
24
|
-
return [
|
|
25
|
-
unanswered >= UNANSWERED_BEFORE_LOST ? live.lost.open : Effect.void,
|
|
26
|
-
{ ...live, unanswered },
|
|
27
|
-
];
|
|
28
|
-
}),
|
|
29
|
-
lose: (connection) => onHeld(connection, (live) => [live.lost.open, live]),
|
|
30
|
-
};
|
|
31
|
-
};
|
|
32
|
-
const generation = (open, state, attempted) => Effect.scoped(Effect.gen(function* () {
|
|
33
|
-
const connection = yield* Effect.flatMap(Effect.scope, open).pipe(Effect.tapError((error) => Ref.set(state, {
|
|
34
|
-
failure: noConnection("node_unreachable", error instanceof MaiaClientError ? error.message : undefined),
|
|
35
|
-
}).pipe(Effect.andThen(attempted.open))));
|
|
36
|
-
const lost = yield* Latch.make();
|
|
37
|
-
yield* Ref.set(state, { connection, lost, unanswered: 0 });
|
|
38
|
-
yield* attempted.open;
|
|
39
|
-
yield* lost.await;
|
|
40
|
-
yield* Ref.set(state, { failure: noConnection("node_connecting") });
|
|
41
|
-
}));
|
|
42
|
-
export const holdConnection = (open) => Effect.gen(function* () {
|
|
43
|
-
const state = yield* Ref.make({
|
|
44
|
-
failure: noConnection("node_connecting"),
|
|
45
|
-
});
|
|
46
|
-
const attempted = yield* Latch.make();
|
|
47
|
-
yield* Effect.forkScoped(Effect.forever(generation(open, state, attempted).pipe(Effect.retry(RECONNECT_BACKOFF))));
|
|
48
|
-
yield* attempted.await;
|
|
49
|
-
return view(state);
|
|
50
|
-
});
|
|
51
|
-
//# sourceMappingURL=node-connection.js.map
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type * as PiTui from "@earendil-works/pi-tui";
|
|
2
|
-
import { type LoadSurface } from "./terminal.js";
|
|
3
|
-
type Library = Pick<typeof PiTui, "isKeyRelease" | "isKeyRepeat" | "matchesKey" | "ProcessTerminal" | "TuiAltScreen">;
|
|
4
|
-
export declare const loadPiTui: (importLibrary?: () => Promise<Library>) => LoadSurface;
|
|
5
|
-
export {};
|
|
6
|
-
//# sourceMappingURL=pi-tui.d.ts.map
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import type { KeyId } from "@earendil-works/pi-tui";
|
|
2
|
-
import * as Context from "effect/Context";
|
|
3
|
-
import * as Effect from "effect/Effect";
|
|
4
|
-
import * as Layer from "effect/Layer";
|
|
5
|
-
export type ScreenSize = {
|
|
6
|
-
readonly columns: number;
|
|
7
|
-
readonly rows: number;
|
|
8
|
-
};
|
|
9
|
-
export type Screen = {
|
|
10
|
-
readonly quitKeys: readonly KeyId[];
|
|
11
|
-
readonly render: (size: ScreenSize) => readonly string[];
|
|
12
|
-
};
|
|
13
|
-
export type Surface = {
|
|
14
|
-
readonly drain: () => Promise<void>;
|
|
15
|
-
readonly matches: (input: string, key: KeyId) => boolean;
|
|
16
|
-
readonly show: (paint: () => string[], onInput: (input: string) => void) => void;
|
|
17
|
-
readonly size: () => ScreenSize;
|
|
18
|
-
readonly start: () => void;
|
|
19
|
-
readonly stop: () => void;
|
|
20
|
-
};
|
|
21
|
-
type Write = (chunk: string, callback?: () => void) => unknown;
|
|
22
|
-
export type TerminalHost = {
|
|
23
|
-
readonly env: Readonly<NodeJS.ProcessEnv>;
|
|
24
|
-
readonly kill: (pid: number, signal: "SIGTSTP") => unknown;
|
|
25
|
-
readonly off: (event: string, listener: () => void) => unknown;
|
|
26
|
-
readonly on: (event: string, listener: () => void) => unknown;
|
|
27
|
-
readonly platform: NodeJS.Platform;
|
|
28
|
-
readonly stdin: {
|
|
29
|
-
readonly isTTY?: boolean;
|
|
30
|
-
readonly setRawMode?: (mode: boolean) => unknown;
|
|
31
|
-
};
|
|
32
|
-
readonly stdout: {
|
|
33
|
-
readonly isTTY?: boolean;
|
|
34
|
-
write: Write;
|
|
35
|
-
};
|
|
36
|
-
};
|
|
37
|
-
declare const TerminalFailure_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
38
|
-
readonly _tag: "TerminalFailure";
|
|
39
|
-
} & Readonly<A>;
|
|
40
|
-
export declare class TerminalFailure extends TerminalFailure_base<{
|
|
41
|
-
readonly cause?: unknown;
|
|
42
|
-
readonly reason: "callback" | "missing" | "no-terminal";
|
|
43
|
-
}> {
|
|
44
|
-
}
|
|
45
|
-
declare const DashboardTerminal_base: Context.ServiceClass<DashboardTerminal, "maia/cli/DashboardTerminal", {
|
|
46
|
-
readonly run: (screen: Screen) => Effect.Effect<number, TerminalFailure>;
|
|
47
|
-
}>;
|
|
48
|
-
export declare class DashboardTerminal extends DashboardTerminal_base {
|
|
49
|
-
}
|
|
50
|
-
export type LoadSurface = Effect.Effect<Surface, TerminalFailure>;
|
|
51
|
-
export declare const terminalLayer: (host: TerminalHost, load: LoadSurface) => Layer.Layer<DashboardTerminal, never, never>;
|
|
52
|
-
export {};
|
|
53
|
-
//# sourceMappingURL=terminal.d.ts.map
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { type AttentionReason, type CockpitState } from "@maiaos/client-core/cockpit";
|
|
2
|
-
import type { NodeView } from "@maiaos/client-core/node-registry";
|
|
3
|
-
import type { Routine } from "@maiaos/sdk";
|
|
4
|
-
export type TreeNode = NodeView & Pick<CockpitState, "partial" | "stale">;
|
|
5
|
-
export type TreeInput = {
|
|
6
|
-
readonly accounts?: ReadonlyMap<string, string>;
|
|
7
|
-
readonly nodes: readonly TreeNode[];
|
|
8
|
-
readonly now: number;
|
|
9
|
-
readonly profile: string;
|
|
10
|
-
readonly routines?: readonly Routine[];
|
|
11
|
-
readonly state: CockpitState;
|
|
12
|
-
};
|
|
13
|
-
export type Row = {
|
|
14
|
-
readonly at: string;
|
|
15
|
-
readonly cells: readonly string[];
|
|
16
|
-
readonly children: readonly Row[];
|
|
17
|
-
readonly code: string;
|
|
18
|
-
readonly depth: number;
|
|
19
|
-
readonly id: string;
|
|
20
|
-
readonly marker: boolean;
|
|
21
|
-
readonly name: string;
|
|
22
|
-
};
|
|
23
|
-
export declare const ALARM = "1;31";
|
|
24
|
-
export declare const WARNING = "33";
|
|
25
|
-
export declare const codeStyle: (code: string) => string | undefined;
|
|
26
|
-
export declare const attentionStyle: (reason: AttentionReason) => string | undefined;
|
|
27
|
-
export declare const treeRows: (input: TreeInput) => readonly Row[];
|
|
28
|
-
//# sourceMappingURL=tree-model.d.ts.map
|
package/dist/dashboard/tree.d.ts
DELETED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type Width } from "./draw.js";
|
|
2
|
-
import type { ScreenSize } from "./terminal.js";
|
|
3
|
-
import { type TreeInput } from "./tree-model.js";
|
|
4
|
-
export type TreeOptions = {
|
|
5
|
-
readonly color: boolean;
|
|
6
|
-
readonly width: Width;
|
|
7
|
-
};
|
|
8
|
-
export declare const tooSmall: ({ columns, rows }: ScreenSize) => string | undefined;
|
|
9
|
-
export declare const renderTree: (input: TreeInput, size: ScreenSize, { color, width }: TreeOptions) => readonly string[];
|
|
10
|
-
//# sourceMappingURL=tree.d.ts.map
|