@maiaos/cli 0.1.0-canary.64 → 0.1.0-canary.66
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/LICENSE +21 -0
- package/README.md +15 -9
- package/dist/address-space/address-space.js +21 -2
- package/dist/address-space/index.js +1 -1
- package/dist/agents/client.d.ts +1 -0
- package/dist/agents/tree/tree.js +3 -3
- package/dist/bin/maia.NOTICES.txt +1 -1
- package/dist/bin/maia.cdx.json +70 -19
- package/dist/bin/maia.mjs +1 -1
- package/dist/board/client.d.ts +27 -0
- package/dist/board/client.js +40 -0
- package/dist/board/commands.d.ts +28 -0
- package/dist/board/commands.js +52 -0
- package/dist/board/index.d.ts +3 -0
- package/dist/board/index.js +3 -0
- package/dist/board/input.js +339 -0
- package/dist/board/output/format.js +175 -0
- package/dist/board/output/index.js +2 -0
- package/dist/board/plan.js +47 -0
- package/dist/board/tree/index.js +2 -0
- package/dist/board/tree/tree.js +161 -0
- package/dist/cli/cli.d.ts +3 -1
- package/dist/cli/cli.js +175 -6
- package/dist/cli/log-level.d.ts +11 -0
- package/dist/cli/log-level.js +14 -0
- package/dist/command-line/context.d.ts +18 -5
- package/dist/command-line/emit/output.d.ts +5 -1
- package/dist/command-line/emit/output.js +13 -5
- package/dist/command-line/index.d.ts +2 -2
- package/dist/command-line/index.js +1 -2
- package/dist/command-line/input/arguments.d.ts +3 -0
- package/dist/command-line/input/arguments.js +12 -0
- package/dist/command-line/input/index.d.ts +2 -2
- package/dist/command-line/input/index.js +2 -2
- package/dist/command-line/input/prompt.d.ts +1 -0
- package/dist/command-line/input/prompt.js +1 -0
- package/dist/command-line/two-phase/two-phase.d.ts +4 -4
- package/dist/command-line/two-phase/two-phase.js +9 -9
- package/dist/command-tree/commands.js +0 -4
- package/dist/command-tree/deprecated.d.ts +2 -0
- package/dist/command-tree/deprecated.js +29 -0
- package/dist/command-tree/grammar.js +2 -0
- package/dist/command-tree/help.d.ts +2 -2
- package/dist/command-tree/help.js +13 -15
- package/dist/command-tree/index.d.ts +1 -0
- package/dist/command-tree/index.js +1 -0
- package/dist/command-tree/local.js +10 -5
- package/dist/command-tree/placeholder.js +1 -1
- package/dist/command-tree/row.d.ts +1 -0
- package/dist/command-tree/tree.d.ts +2 -1
- package/dist/command-tree/tree.js +30 -4
- package/dist/connection/client.d.ts +36 -18
- package/dist/connection/client.js +1 -0
- package/dist/connection/executors/executors.d.ts +18 -0
- package/dist/connection/executors/executors.js +95 -0
- package/dist/connection/executors/index.d.ts +2 -0
- package/dist/connection/executors/index.js +2 -0
- package/dist/connection/executors/reading.js +22 -0
- package/dist/connection/index.d.ts +1 -0
- package/dist/connection/index.js +1 -0
- package/dist/connection/input.js +2 -2
- package/dist/connection/login.d.ts +1 -1
- package/dist/connection/login.js +4 -3
- package/dist/connection/output/format.js +2 -2
- package/dist/connection/output/index.d.ts +1 -1
- package/dist/connection/output/index.js +1 -1
- package/dist/connection/resolve.d.ts +1 -0
- package/dist/connection/setup-file.js +161 -0
- package/dist/connection/system.js +90 -45
- package/dist/connection/tree/tree.js +120 -7
- package/dist/container/client.d.ts +2 -0
- package/dist/fleet/fleet.d.ts +7 -8
- package/dist/fleet/fleet.js +18 -6
- package/dist/fleet/index.d.ts +1 -1
- package/dist/fleet/index.js +1 -1
- package/dist/github/client.d.ts +189 -0
- package/dist/github/client.js +16 -0
- package/dist/github/commands.d.ts +17 -0
- package/dist/github/commands.js +81 -0
- package/dist/github/index.d.ts +3 -0
- package/dist/github/index.js +3 -0
- package/dist/github/input.js +114 -0
- package/dist/github/output/format.js +78 -0
- package/dist/github/output/index.js +2 -0
- package/dist/github/tree/index.js +2 -0
- package/dist/github/tree/tree.js +28 -0
- package/dist/goal/client.d.ts +246 -0
- package/dist/goal/client.js +13 -0
- package/dist/goal/commands.d.ts +22 -0
- package/dist/goal/commands.js +110 -0
- package/dist/goal/index.d.ts +4 -0
- package/dist/goal/index.js +4 -0
- package/dist/goal/input.js +118 -0
- package/dist/goal/output/format.js +29 -0
- package/dist/goal/output/index.js +2 -0
- package/dist/goal/pause.d.ts +16 -0
- package/dist/goal/pause.js +91 -0
- package/dist/goal/tree/index.js +2 -0
- package/dist/goal/tree/tree.js +49 -0
- package/dist/hold/client.d.ts +2 -0
- package/dist/hold/tree/tree.js +2 -2
- package/dist/import/{batch.js → batch/batch.js} +5 -5
- package/dist/import/batch/index.js +3 -0
- package/dist/import/{manifest.js → batch/manifest.js} +7 -6
- package/dist/import/commands.d.ts +1 -0
- package/dist/import/commands.js +27 -15
- package/dist/import/detach.d.ts +12 -0
- package/dist/import/detach.js +70 -0
- package/dist/import/index.d.ts +2 -1
- package/dist/import/index.js +2 -1
- package/dist/import/input.js +32 -10
- package/dist/import/output.js +13 -8
- package/dist/inbox/client.d.ts +310 -0
- package/dist/inbox/client.js +15 -0
- package/dist/inbox/index.d.ts +2 -0
- package/dist/inbox/index.js +2 -0
- package/dist/integration/client.d.ts +307 -1
- package/dist/integration/client.js +21 -1
- package/dist/integration/commands.d.ts +8 -0
- package/dist/integration/commands.js +53 -10
- package/dist/integration/index.d.ts +1 -1
- package/dist/integration/index.js +1 -1
- package/dist/local-node/client.d.ts +11 -1
- package/dist/local-node/client.js +185 -235
- package/dist/local-node/index.d.ts +1 -1
- package/dist/local-node/index.js +1 -1
- package/dist/login/commands.js +7 -1
- package/dist/login/gateway.js +34 -11
- package/dist/login/menu.js +2 -1
- package/dist/login/vendor-account.js +3 -2
- package/dist/login/vendor-input.js +3 -2
- package/dist/mcp/calls.js +47 -226
- package/dist/mcp/routing.d.ts +3 -2
- package/dist/mcp/routing.js +37 -8
- package/dist/mcp/server.d.ts +10 -1
- package/dist/mcp/server.js +16 -6
- package/dist/migrate/classes.js +158 -0
- package/dist/migrate/commands.js +46 -0
- package/dist/migrate/format.js +199 -0
- package/dist/migrate/index.js +2 -0
- package/dist/migrate/item.js +59 -0
- package/dist/migrate/plan.js +79 -0
- package/dist/migrate/tree/index.js +2 -0
- package/dist/migrate/tree/tree.js +23 -0
- package/dist/node-update/client.d.ts +17 -0
- package/dist/node-update/client.js +27 -0
- package/dist/node-update/commands.d.ts +20 -0
- package/dist/node-update/commands.js +150 -0
- package/dist/node-update/index.d.ts +4 -0
- package/dist/node-update/index.js +4 -0
- package/dist/node-update/output.d.ts +12 -0
- package/dist/node-update/output.js +165 -0
- package/dist/node-update/tree/index.js +2 -0
- package/dist/node-update/tree/tree.js +73 -0
- package/dist/pairing/client.d.ts +13 -0
- package/dist/pairing/client.js +36 -0
- package/dist/pairing/commands.d.ts +15 -0
- package/dist/pairing/commands.js +131 -0
- package/dist/pairing/index.d.ts +4 -0
- package/dist/pairing/index.js +4 -0
- package/dist/pairing/output.d.ts +12 -0
- package/dist/pairing/output.js +53 -0
- package/dist/pairing/tree/index.js +2 -0
- package/dist/pairing/tree/tree.js +35 -0
- package/dist/panel/client.d.ts +9 -0
- package/dist/panel/client.js +24 -0
- package/dist/panel/commands.d.ts +19 -0
- package/dist/panel/commands.js +112 -0
- package/dist/panel/index.d.ts +3 -0
- package/dist/panel/index.js +3 -0
- package/dist/panel/tree/index.js +2 -0
- package/dist/panel/tree/tree.js +14 -0
- package/dist/port-lease/client.d.ts +3 -0
- package/dist/principal/client.d.ts +9 -0
- package/dist/principal/client.js +7 -0
- package/dist/principal/commands.d.ts +14 -0
- package/dist/principal/commands.js +84 -0
- package/dist/principal/index.d.ts +4 -0
- package/dist/principal/index.js +4 -0
- package/dist/principal/output.d.ts +8 -0
- package/dist/principal/output.js +43 -0
- package/dist/principal/tree/index.js +2 -0
- package/dist/principal/tree/tree.js +31 -0
- package/dist/project-guard/client.d.ts +1 -0
- package/dist/project-instructions/client.d.ts +56 -0
- package/dist/project-instructions/client.js +7 -0
- package/dist/project-instructions/commands.d.ts +13 -0
- package/dist/project-instructions/commands.js +89 -0
- package/dist/project-instructions/index.d.ts +3 -0
- package/dist/project-instructions/index.js +3 -0
- package/dist/project-instructions/input.js +33 -0
- package/dist/project-instructions/output/format.js +22 -0
- package/dist/project-instructions/output/index.js +2 -0
- package/dist/project-knowledge/change.js +22 -0
- package/dist/project-knowledge/client.d.ts +127 -0
- package/dist/project-knowledge/client.js +17 -0
- package/dist/project-knowledge/commands.d.ts +14 -0
- package/dist/project-knowledge/commands.js +100 -0
- package/dist/project-knowledge/index.d.ts +3 -0
- package/dist/project-knowledge/index.js +3 -0
- package/dist/project-knowledge/input.js +32 -0
- package/dist/project-knowledge/output/format.js +64 -0
- package/dist/project-knowledge/output/index.js +2 -0
- package/dist/project-knowledge/sources.js +108 -0
- package/dist/project-knowledge/upload.js +27 -0
- package/dist/project-workspace/git-reads.d.ts +12 -0
- package/dist/project-workspace/git-reads.js +71 -0
- package/dist/project-workspace/index.d.ts +1 -0
- package/dist/project-workspace/index.js +1 -0
- package/dist/project-workspace/metadata-client.d.ts +2 -0
- package/dist/project-workspace/output/human.js +1 -1
- package/dist/project-workspace/tree/tree.js +95 -5
- package/dist/reach/client.d.ts +9 -0
- package/dist/reach/client.js +7 -0
- package/dist/reach/commands.d.ts +14 -0
- package/dist/reach/commands.js +72 -0
- package/dist/reach/index.d.ts +3 -0
- package/dist/reach/index.js +3 -0
- package/dist/reach/output.js +41 -0
- package/dist/reach/tree/index.js +2 -0
- package/dist/reach/tree/tree.js +28 -0
- package/dist/remote-node/client.d.ts +85 -0
- package/dist/remote-node/commands.js +32 -17
- package/dist/remote-node/connector.d.ts +16 -0
- package/dist/remote-node/connector.js +2 -2
- package/dist/remote-node/reachability.js +31 -18
- package/dist/remote-node/reading.js +31 -0
- package/dist/remote-node/text.js +68 -5
- package/dist/remote-node/tree/tree.js +14 -3
- package/dist/routine/client.d.ts +547 -13
- package/dist/routine/client.js +19 -1
- package/dist/routine/commands.d.ts +5 -0
- package/dist/routine/commands.js +73 -15
- package/dist/routine/index.d.ts +2 -1
- package/dist/routine/index.js +2 -1
- package/dist/routine/input.js +66 -3
- package/dist/routine/output/format.js +80 -19
- package/dist/routine/output/index.js +1 -1
- package/dist/routine/portable/import-files.js +74 -0
- package/dist/routine/portable/import-output.js +21 -0
- package/dist/routine/portable/import.js +274 -0
- package/dist/routine/portable/index.js +3 -0
- package/dist/routine/portable/portable.js +185 -0
- package/dist/routine/tree/tree.js +80 -8
- package/dist/routine/trigger/commands.d.ts +20 -0
- package/dist/routine/trigger/commands.js +74 -0
- package/dist/routine/trigger/format.js +42 -0
- package/dist/routine/trigger/index.d.ts +2 -0
- package/dist/routine/trigger/index.js +2 -0
- package/dist/routine/trigger/input.js +81 -0
- package/dist/run-ledger/client.d.ts +45 -0
- package/dist/secret/client.d.ts +39 -0
- package/dist/secret/client.js +6 -0
- package/dist/secret/commands.d.ts +12 -0
- package/dist/secret/commands.js +91 -0
- package/dist/secret/index.d.ts +3 -0
- package/dist/secret/index.js +3 -0
- package/dist/secret/input.js +22 -0
- package/dist/secret/output/format.js +10 -0
- package/dist/secret/output/index.js +2 -0
- package/dist/secret/tree/index.js +2 -0
- package/dist/secret/tree/tree.js +16 -0
- package/dist/session/agent-permission.d.ts +3 -2
- package/dist/session/approval/client.d.ts +4 -3
- package/dist/session/approval/commands.d.ts +7 -0
- package/dist/session/approval/commands.js +176 -6
- package/dist/session/approval/index.d.ts +1 -1
- package/dist/session/approval/index.js +1 -1
- package/dist/session/approval/output/format.js +53 -1
- package/dist/session/approval/output/index.js +1 -1
- package/dist/session/attach.d.ts +1 -1
- package/dist/session/attach.js +7 -2
- package/dist/session/client.d.ts +12 -12
- package/dist/session/client.js +8 -17
- package/dist/session/command/commands.js +109 -0
- package/dist/session/command/index.js +2 -0
- package/dist/session/commands.d.ts +5 -1
- package/dist/session/commands.js +273 -57
- package/dist/session/create-tasks.js +3 -48
- package/dist/session/creation/creation.js +51 -0
- package/dist/session/creation/index.js +2 -0
- package/dist/session/fork/fork.js +135 -0
- package/dist/session/fork/index.js +2 -0
- package/dist/session/git-status.d.ts +11 -0
- package/dist/session/git-status.js +30 -0
- package/dist/session/index.d.ts +4 -3
- package/dist/session/index.js +3 -2
- package/dist/session/interaction/client.d.ts +3 -0
- package/dist/session/move/index.js +2 -0
- package/dist/session/move/move.js +439 -0
- package/dist/session/output/held.js +28 -0
- package/dist/session/output/human.js +34 -7
- package/dist/session/output/tasks.js +23 -6
- package/dist/session/setup/index.js +2 -0
- package/dist/session/setup/setup.js +69 -0
- package/dist/session/spawn/caps.js +128 -0
- package/dist/session/spawn/index.js +5 -0
- package/dist/session/spawn/spawn.js +203 -0
- package/dist/session/spawn/standing.js +62 -0
- package/dist/session/spawn/supervision.js +62 -0
- package/dist/session/switch/index.js +2 -0
- package/dist/session/switch/switch.js +103 -0
- package/dist/session/tree/tree.js +280 -18
- package/dist/session/turn/attachments.js +54 -0
- package/dist/session/turn/client.d.ts +3 -1
- package/dist/session/turn/client.js +6 -1
- package/dist/session/turn/commands.d.ts +5 -1
- package/dist/session/turn/commands.js +148 -27
- package/dist/session/turn/index.d.ts +2 -2
- package/dist/session/turn/index.js +1 -1
- package/dist/session/turn/output.d.ts +25 -1
- package/dist/session/turn/output.js +33 -0
- package/dist/skills-sync/client.d.ts +9 -0
- package/dist/skills-sync/client.js +7 -0
- package/dist/skills-sync/commands.d.ts +15 -0
- package/dist/skills-sync/commands.js +241 -0
- package/dist/skills-sync/index.d.ts +3 -0
- package/dist/skills-sync/index.js +3 -0
- package/dist/skills-sync/output.js +168 -0
- package/dist/skills-sync/set-file.js +23 -0
- package/dist/skills-sync/tree/index.js +2 -0
- package/dist/skills-sync/tree/tree.js +38 -0
- package/dist/status/client.d.ts +7 -0
- package/dist/status/command.js +3 -2
- package/dist/status/doctor.js +4 -3
- package/dist/team-workspace/client.d.ts +1 -0
- package/dist/text-input/index.js +2 -0
- package/dist/text-input/text-input.js +35 -0
- package/dist/webhooks/client.d.ts +10 -9
- package/dist/webhooks/input.js +2 -2
- package/dist/webhooks/tree/tree.js +4 -4
- package/guidance/maia-sessions/SKILL.md +37 -3
- package/package.json +6 -5
- package/dist/command-line/context.js +0 -2
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type ConnectionCapacitySetParameters, type ConnectionCreateParameters, type ConnectionDetectParameters, type ConnectionGatewayCreateParameters, type ConnectionListParameters, type ConnectionLoginStartParameters, type ConnectionModelsListParameters, type ConnectionShowParameters, type ConnectionStateSetParameters, type ConnectionSystemConfirmParameters, type ConnectionSystemPreviewParameters, type ConnectionUpkeepConfirmParameters, type ConnectionUpkeepPreviewParameters, type ConnectionUpkeepRefreshParameters, type ConnectionUsageShowParameters } from "@maiaos/sdk";
|
|
2
|
-
import type { CliNodeOperations } from "../local-node/index.js";
|
|
1
|
+
import { type ConnectionCapacitySetParameters, type ConnectionCreateParameters, type ConnectionDetectParameters, type ConnectionGatewayCreateParameters, type ConnectionListParameters, type ConnectionLoginStartParameters, type ConnectionModelsListParameters, type ConnectionShowParameters, type ConnectionStateSetParameters, type ConnectionSystemConfirmParameters, type ConnectionSystemPreviewParameters, type ConnectionUpkeepConfirmParameters, type ConnectionUpkeepPreviewParameters, type ConnectionUpkeepRefreshParameters, type ConnectionUsageShowParameters, type InstalledHarnessListResult } from "@maiaos/sdk";
|
|
2
|
+
import type { CliNodeEffect, CliNodeOperations } from "../local-node/index.js";
|
|
3
3
|
export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
4
4
|
confirmConnectionGrant: import("./access/client.js").Operation<import("@maiaos/sdk").ConnectionGrantSetConfirmParameters, import("@maiaos/sdk").ConnectionGrantSetConfirmResult>;
|
|
5
5
|
confirmConnectionPool: import("./access/client.js").Operation<import("@maiaos/sdk").ConnectionPoolSetConfirmParameters, import("@maiaos/sdk").ConnectionPoolSetConfirmResult>;
|
|
@@ -7,7 +7,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
7
7
|
listConnectionPools: import("./access/client.js").Operation<import("@maiaos/sdk").ConnectionPoolListParameters, import("@maiaos/sdk").ConnectionPoolListResult>;
|
|
8
8
|
previewConnectionGrant: import("./access/client.js").Operation<import("@maiaos/sdk").ConnectionGrantSetPreviewParameters, import("@maiaos/sdk").ConnectionGrantSetPreviewResult>;
|
|
9
9
|
previewConnectionPool: import("./access/client.js").Operation<import("@maiaos/sdk").ConnectionPoolSetPreviewParameters, import("@maiaos/sdk").ConnectionPoolSetPreviewResult>;
|
|
10
|
-
listConnectionModels: (input: ConnectionModelsListParameters) =>
|
|
10
|
+
listConnectionModels: (input: ConnectionModelsListParameters) => CliNodeEffect<{
|
|
11
11
|
readonly connectionId: string;
|
|
12
12
|
readonly format: "anthropic" | "openai";
|
|
13
13
|
readonly method: "connection.models.list";
|
|
@@ -18,7 +18,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
18
18
|
readonly omitted: number;
|
|
19
19
|
readonly truncated: boolean;
|
|
20
20
|
}>;
|
|
21
|
-
listConnections: (input: ConnectionListParameters) =>
|
|
21
|
+
listConnections: (input: ConnectionListParameters) => CliNodeEffect<{
|
|
22
22
|
readonly items: readonly {
|
|
23
23
|
readonly configRoot: {
|
|
24
24
|
readonly kind: "maia-managed";
|
|
@@ -31,6 +31,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
31
31
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
32
32
|
readonly gateway?: {
|
|
33
33
|
readonly baseUrl: string;
|
|
34
|
+
readonly keyEnv?: string | undefined;
|
|
34
35
|
} | undefined;
|
|
35
36
|
readonly limitedUntil: string | null;
|
|
36
37
|
readonly maxConcurrentSessions: number;
|
|
@@ -66,7 +67,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
66
67
|
readonly method: "connection.list";
|
|
67
68
|
readonly nextCursor?: string | undefined;
|
|
68
69
|
}>;
|
|
69
|
-
showConnection: (input: ConnectionShowParameters) =>
|
|
70
|
+
showConnection: (input: ConnectionShowParameters) => CliNodeEffect<{
|
|
70
71
|
readonly connection: {
|
|
71
72
|
readonly configRoot: {
|
|
72
73
|
readonly kind: "maia-managed";
|
|
@@ -79,6 +80,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
79
80
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
80
81
|
readonly gateway?: {
|
|
81
82
|
readonly baseUrl: string;
|
|
83
|
+
readonly keyEnv?: string | undefined;
|
|
82
84
|
} | undefined;
|
|
83
85
|
readonly limitedUntil: string | null;
|
|
84
86
|
readonly maxConcurrentSessions: number;
|
|
@@ -113,7 +115,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
113
115
|
};
|
|
114
116
|
readonly method: "connection.show";
|
|
115
117
|
}>;
|
|
116
|
-
showConnectionUsage: (input: ConnectionUsageShowParameters) =>
|
|
118
|
+
showConnectionUsage: (input: ConnectionUsageShowParameters) => CliNodeEffect<{
|
|
117
119
|
readonly connection: {
|
|
118
120
|
readonly configRoot: {
|
|
119
121
|
readonly kind: "maia-managed";
|
|
@@ -126,6 +128,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
126
128
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
127
129
|
readonly gateway?: {
|
|
128
130
|
readonly baseUrl: string;
|
|
131
|
+
readonly keyEnv?: string | undefined;
|
|
129
132
|
} | undefined;
|
|
130
133
|
readonly limitedUntil: string | null;
|
|
131
134
|
readonly maxConcurrentSessions: number;
|
|
@@ -160,7 +163,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
160
163
|
};
|
|
161
164
|
readonly method: "connection.usage.show";
|
|
162
165
|
}>;
|
|
163
|
-
createConnection: (input: ConnectionCreateParameters) =>
|
|
166
|
+
createConnection: (input: ConnectionCreateParameters) => CliNodeEffect<{
|
|
164
167
|
readonly commandId: string;
|
|
165
168
|
readonly connection: {
|
|
166
169
|
readonly configRoot: {
|
|
@@ -174,6 +177,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
174
177
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
175
178
|
readonly gateway?: {
|
|
176
179
|
readonly baseUrl: string;
|
|
180
|
+
readonly keyEnv?: string | undefined;
|
|
177
181
|
} | undefined;
|
|
178
182
|
readonly limitedUntil: string | null;
|
|
179
183
|
readonly maxConcurrentSessions: number;
|
|
@@ -214,6 +218,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
214
218
|
readonly createdAt: string;
|
|
215
219
|
readonly eventCursor: string;
|
|
216
220
|
readonly method: string;
|
|
221
|
+
readonly proposedBy?: string | undefined;
|
|
217
222
|
readonly receiptId: string;
|
|
218
223
|
readonly schemaVersion: 1;
|
|
219
224
|
readonly state: "succeeded";
|
|
@@ -225,7 +230,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
225
230
|
};
|
|
226
231
|
readonly method: "connection.create";
|
|
227
232
|
}>;
|
|
228
|
-
setConnectionCapacity: (input: ConnectionCapacitySetParameters) =>
|
|
233
|
+
setConnectionCapacity: (input: ConnectionCapacitySetParameters) => CliNodeEffect<{
|
|
229
234
|
readonly commandId: string;
|
|
230
235
|
readonly connection: {
|
|
231
236
|
readonly configRoot: {
|
|
@@ -239,6 +244,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
239
244
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
240
245
|
readonly gateway?: {
|
|
241
246
|
readonly baseUrl: string;
|
|
247
|
+
readonly keyEnv?: string | undefined;
|
|
242
248
|
} | undefined;
|
|
243
249
|
readonly limitedUntil: string | null;
|
|
244
250
|
readonly maxConcurrentSessions: number;
|
|
@@ -279,6 +285,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
279
285
|
readonly createdAt: string;
|
|
280
286
|
readonly eventCursor: string;
|
|
281
287
|
readonly method: string;
|
|
288
|
+
readonly proposedBy?: string | undefined;
|
|
282
289
|
readonly receiptId: string;
|
|
283
290
|
readonly schemaVersion: 1;
|
|
284
291
|
readonly state: "succeeded";
|
|
@@ -291,7 +298,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
291
298
|
readonly expectedRevision: string;
|
|
292
299
|
readonly method: "connection.capacity.set";
|
|
293
300
|
}>;
|
|
294
|
-
setConnectionState: (input: ConnectionStateSetParameters) =>
|
|
301
|
+
setConnectionState: (input: ConnectionStateSetParameters) => CliNodeEffect<{
|
|
295
302
|
readonly commandId: string;
|
|
296
303
|
readonly connection: {
|
|
297
304
|
readonly configRoot: {
|
|
@@ -305,6 +312,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
305
312
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
306
313
|
readonly gateway?: {
|
|
307
314
|
readonly baseUrl: string;
|
|
315
|
+
readonly keyEnv?: string | undefined;
|
|
308
316
|
} | undefined;
|
|
309
317
|
readonly limitedUntil: string | null;
|
|
310
318
|
readonly maxConcurrentSessions: number;
|
|
@@ -345,6 +353,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
345
353
|
readonly createdAt: string;
|
|
346
354
|
readonly eventCursor: string;
|
|
347
355
|
readonly method: string;
|
|
356
|
+
readonly proposedBy?: string | undefined;
|
|
348
357
|
readonly receiptId: string;
|
|
349
358
|
readonly schemaVersion: 1;
|
|
350
359
|
readonly state: "succeeded";
|
|
@@ -357,7 +366,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
357
366
|
readonly expectedRevision: string;
|
|
358
367
|
readonly method: "connection.state.set";
|
|
359
368
|
}>;
|
|
360
|
-
createGatewayConnection: (input: ConnectionGatewayCreateParameters) =>
|
|
369
|
+
createGatewayConnection: (input: ConnectionGatewayCreateParameters) => CliNodeEffect<{
|
|
361
370
|
readonly commandId: string;
|
|
362
371
|
readonly connection: {
|
|
363
372
|
readonly configRoot: {
|
|
@@ -371,6 +380,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
371
380
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
372
381
|
readonly gateway?: {
|
|
373
382
|
readonly baseUrl: string;
|
|
383
|
+
readonly keyEnv?: string | undefined;
|
|
374
384
|
} | undefined;
|
|
375
385
|
readonly limitedUntil: string | null;
|
|
376
386
|
readonly maxConcurrentSessions: number;
|
|
@@ -411,6 +421,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
411
421
|
readonly createdAt: string;
|
|
412
422
|
readonly eventCursor: string;
|
|
413
423
|
readonly method: string;
|
|
424
|
+
readonly proposedBy?: string | undefined;
|
|
414
425
|
readonly receiptId: string;
|
|
415
426
|
readonly schemaVersion: 1;
|
|
416
427
|
readonly state: "succeeded";
|
|
@@ -420,10 +431,10 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
420
431
|
};
|
|
421
432
|
readonly updatedAt: string;
|
|
422
433
|
};
|
|
423
|
-
readonly keyCustody: "kept" | "stored";
|
|
434
|
+
readonly keyCustody: "kept" | "referenced" | "stored";
|
|
424
435
|
readonly method: "connection.gateway.create";
|
|
425
436
|
}>;
|
|
426
|
-
startConnectionLogin: (input: ConnectionLoginStartParameters) =>
|
|
437
|
+
startConnectionLogin: (input: ConnectionLoginStartParameters) => CliNodeEffect<{
|
|
427
438
|
readonly commandId: string;
|
|
428
439
|
readonly connection: {
|
|
429
440
|
readonly configRoot: {
|
|
@@ -437,6 +448,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
437
448
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
438
449
|
readonly gateway?: {
|
|
439
450
|
readonly baseUrl: string;
|
|
451
|
+
readonly keyEnv?: string | undefined;
|
|
440
452
|
} | undefined;
|
|
441
453
|
readonly limitedUntil: string | null;
|
|
442
454
|
readonly maxConcurrentSessions: number;
|
|
@@ -477,6 +489,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
477
489
|
readonly createdAt: string;
|
|
478
490
|
readonly eventCursor: string;
|
|
479
491
|
readonly method: string;
|
|
492
|
+
readonly proposedBy?: string | undefined;
|
|
480
493
|
readonly receiptId: string;
|
|
481
494
|
readonly schemaVersion: 1;
|
|
482
495
|
readonly state: "succeeded";
|
|
@@ -496,7 +509,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
496
509
|
};
|
|
497
510
|
readonly method: "connection.login.start";
|
|
498
511
|
}>;
|
|
499
|
-
confirmSystemConnections: (input: ConnectionSystemConfirmParameters) =>
|
|
512
|
+
confirmSystemConnections: (input: ConnectionSystemConfirmParameters) => CliNodeEffect<{
|
|
500
513
|
readonly actorId: string;
|
|
501
514
|
readonly commandId: string;
|
|
502
515
|
readonly delivery: "duplicate" | "new";
|
|
@@ -509,6 +522,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
509
522
|
readonly createdAt: string;
|
|
510
523
|
readonly eventCursor: string;
|
|
511
524
|
readonly method: string;
|
|
525
|
+
readonly proposedBy?: string | undefined;
|
|
512
526
|
readonly receiptId: string;
|
|
513
527
|
readonly schemaVersion: 1;
|
|
514
528
|
readonly state: "succeeded";
|
|
@@ -530,6 +544,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
530
544
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
531
545
|
readonly gateway?: {
|
|
532
546
|
readonly baseUrl: string;
|
|
547
|
+
readonly keyEnv?: string | undefined;
|
|
533
548
|
} | undefined;
|
|
534
549
|
readonly limitedUntil: string | null;
|
|
535
550
|
readonly maxConcurrentSessions: number;
|
|
@@ -569,6 +584,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
569
584
|
readonly createdAt: string;
|
|
570
585
|
readonly eventCursor: string;
|
|
571
586
|
readonly method: string;
|
|
587
|
+
readonly proposedBy?: string | undefined;
|
|
572
588
|
readonly receiptId: string;
|
|
573
589
|
readonly schemaVersion: 1;
|
|
574
590
|
readonly state: "succeeded";
|
|
@@ -582,7 +598,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
582
598
|
}[];
|
|
583
599
|
readonly method: "connection.system.confirm";
|
|
584
600
|
}>;
|
|
585
|
-
detectConnections: (input: ConnectionDetectParameters) =>
|
|
601
|
+
detectConnections: (input: ConnectionDetectParameters) => CliNodeEffect<{
|
|
586
602
|
readonly executors: readonly [{
|
|
587
603
|
readonly accountKind?: string | undefined;
|
|
588
604
|
readonly auth: "custom-endpoint" | "none" | "unknown" | "vendor-login";
|
|
@@ -666,7 +682,8 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
666
682
|
}];
|
|
667
683
|
readonly method: "connection.detect";
|
|
668
684
|
}>;
|
|
669
|
-
|
|
685
|
+
listInstalledHarnesses: () => CliNodeEffect<InstalledHarnessListResult>;
|
|
686
|
+
previewSystemConnections: (input: ConnectionSystemPreviewParameters) => CliNodeEffect<{
|
|
670
687
|
readonly actorId: string;
|
|
671
688
|
readonly commandId: string;
|
|
672
689
|
readonly expiresAt: string;
|
|
@@ -725,7 +742,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
725
742
|
readonly method: "connection.system.preview";
|
|
726
743
|
readonly proof: string;
|
|
727
744
|
}>;
|
|
728
|
-
confirmConnectionUpkeep: (input: ConnectionUpkeepConfirmParameters) =>
|
|
745
|
+
confirmConnectionUpkeep: (input: ConnectionUpkeepConfirmParameters) => CliNodeEffect<{
|
|
729
746
|
readonly actorId: string;
|
|
730
747
|
readonly commandId: string;
|
|
731
748
|
readonly delivery: "duplicate" | "new";
|
|
@@ -741,6 +758,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
741
758
|
readonly createdAt: string;
|
|
742
759
|
readonly eventCursor: string;
|
|
743
760
|
readonly method: string;
|
|
761
|
+
readonly proposedBy?: string | undefined;
|
|
744
762
|
readonly receiptId: string;
|
|
745
763
|
readonly schemaVersion: 1;
|
|
746
764
|
readonly state: "succeeded";
|
|
@@ -751,7 +769,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
751
769
|
readonly updatedAt: string;
|
|
752
770
|
};
|
|
753
771
|
}>;
|
|
754
|
-
previewConnectionUpkeep: (input: ConnectionUpkeepPreviewParameters) =>
|
|
772
|
+
previewConnectionUpkeep: (input: ConnectionUpkeepPreviewParameters) => CliNodeEffect<{
|
|
755
773
|
readonly actorId: string;
|
|
756
774
|
readonly authorizationRevision: number;
|
|
757
775
|
readonly commandId: string;
|
|
@@ -765,7 +783,7 @@ export declare const makeConnectionClient: (node: CliNodeOperations) => {
|
|
|
765
783
|
readonly policyRevision: number;
|
|
766
784
|
readonly proof: string;
|
|
767
785
|
}>;
|
|
768
|
-
refreshConnectionUpkeep: (input: ConnectionUpkeepRefreshParameters) =>
|
|
786
|
+
refreshConnectionUpkeep: (input: ConnectionUpkeepRefreshParameters) => CliNodeEffect<{
|
|
769
787
|
readonly executors: readonly [{
|
|
770
788
|
readonly available?: {
|
|
771
789
|
readonly checkedAt: string;
|
|
@@ -18,6 +18,7 @@ const signInClient = (node) => ({
|
|
|
18
18
|
const systemClient = (node) => ({
|
|
19
19
|
confirmSystemConnections: (input) => node.runValidatedNodeOperation(input, connectionSystemConfirmParametersSchema, (client, parameters, options) => client.confirmSystemConnections(parameters, options), { commandId: input.commandId }),
|
|
20
20
|
detectConnections: (input) => node.runValidatedNodeOperation(input, connectionDetectParametersSchema, (client, parameters, options) => client.detectConnections(parameters, options)),
|
|
21
|
+
listInstalledHarnesses: () => node.runNodeClientOperation((client, options) => client.listInstalledHarnesses({}, options)),
|
|
21
22
|
previewSystemConnections: (input) => node.runValidatedNodeOperation(input, connectionSystemPreviewParametersSchema, (client, parameters, options) => client.previewSystemConnections(parameters, options)),
|
|
22
23
|
});
|
|
23
24
|
const upkeepClient = (node) => ({
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { InstalledHarnessListResult } from "@maiaos/sdk";
|
|
2
|
+
import type * as Crypto from "effect/Crypto";
|
|
3
|
+
import * as Effect from "effect/Effect";
|
|
4
|
+
import { type OutputContext } from "../../command-line/emit/index.js";
|
|
5
|
+
import { type CliArgumentError } from "../../command-line/input/index.js";
|
|
6
|
+
import type { CliNodeCall, CliNodeEffect } from "../../local-node/index.js";
|
|
7
|
+
type ExecutorsContext = OutputContext & {
|
|
8
|
+
readonly dependencies: {
|
|
9
|
+
readonly call?: CliNodeCall;
|
|
10
|
+
readonly listInstalledHarnesses?: () => CliNodeEffect<InstalledHarnessListResult>;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
type ExecutorsEffect = Effect.Effect<number, CliArgumentError, Crypto.Crypto>;
|
|
14
|
+
export declare const runExecutorsList: (tokens: readonly string[], context: ExecutorsContext) => ExecutorsEffect;
|
|
15
|
+
export declare const runExecutorsShow: (tokens: readonly string[], context: ExecutorsContext) => ExecutorsEffect;
|
|
16
|
+
export declare const runExecutorsDetect: (tokens: readonly string[], context: ExecutorsContext) => ExecutorsEffect;
|
|
17
|
+
export {};
|
|
18
|
+
//# sourceMappingURL=executors.d.ts.map
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import * as Clock from "effect/Clock";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { cell, fields, formatRows, tab, writeNodeResult, } from "../../command-line/emit/index.js";
|
|
4
|
+
import { parseOptions, requirePositionals, } from "../../command-line/input/index.js";
|
|
5
|
+
import { redactConnection } from "../output/index.js";
|
|
6
|
+
import { describeReading, usageStateOf } from "./reading.js";
|
|
7
|
+
const redactEntry = ({ connections, ...entry }, now) => ({
|
|
8
|
+
...entry,
|
|
9
|
+
connections: connections.map(({ connection, ...rest }) => ({
|
|
10
|
+
...rest,
|
|
11
|
+
connection: redactConnection(connection),
|
|
12
|
+
usageState: usageStateOf(connection.usage, now),
|
|
13
|
+
})),
|
|
14
|
+
});
|
|
15
|
+
const redactResult = (result, now) => result.method === "connection.executors.list"
|
|
16
|
+
? {
|
|
17
|
+
...result,
|
|
18
|
+
executors: result.executors.map((entry) => redactEntry(entry, now)),
|
|
19
|
+
}
|
|
20
|
+
: { ...result, executor: redactEntry(result.executor, now) };
|
|
21
|
+
const NO_ACCOUNT = ["-", "-", "-", "-", "-", "-"];
|
|
22
|
+
const accountLines = ({ connections, executor }) => connections.length === 0
|
|
23
|
+
? [tab([executor, ...NO_ACCOUNT])]
|
|
24
|
+
: connections.map(({ connection, login, models, usageState }) => tab([
|
|
25
|
+
executor,
|
|
26
|
+
connection.connectionId,
|
|
27
|
+
cell(connection.name),
|
|
28
|
+
connection.state,
|
|
29
|
+
login,
|
|
30
|
+
cell(describeReading(connection.usage, usageState)),
|
|
31
|
+
models.length === 0 ? "-" : cell(models.join(", ")),
|
|
32
|
+
]));
|
|
33
|
+
const accountTable = (entries) => formatRows(entries.flatMap(accountLines), (line) => line, {
|
|
34
|
+
empty: "No executors.",
|
|
35
|
+
headers: [
|
|
36
|
+
"EXECUTOR",
|
|
37
|
+
"CONNECTION",
|
|
38
|
+
"NAME",
|
|
39
|
+
"STATE",
|
|
40
|
+
"LOGIN",
|
|
41
|
+
"USAGE",
|
|
42
|
+
"MODELS",
|
|
43
|
+
],
|
|
44
|
+
});
|
|
45
|
+
const showText = (entry) => `${fields([
|
|
46
|
+
["Executor", entry.executor],
|
|
47
|
+
[
|
|
48
|
+
"Capabilities",
|
|
49
|
+
entry.capabilities.length === 0 ? "none" : entry.capabilities.join(", "),
|
|
50
|
+
],
|
|
51
|
+
...(entry.unavailable === undefined
|
|
52
|
+
? []
|
|
53
|
+
: [["Unavailable", cell(entry.unavailable.reason)]]),
|
|
54
|
+
])}\n${accountTable([entry])}`;
|
|
55
|
+
const presenterAt = (now) => ({
|
|
56
|
+
toResult: (value) => ({
|
|
57
|
+
command: value.method,
|
|
58
|
+
result: redactResult(value, now),
|
|
59
|
+
}),
|
|
60
|
+
toText: ({ result }) => result.method === "connection.executors.list"
|
|
61
|
+
? accountTable(result.executors)
|
|
62
|
+
: showText(result.executor),
|
|
63
|
+
});
|
|
64
|
+
const unavailable = () => Effect.die(new Error("Missing the typed Node call."));
|
|
65
|
+
const REFRESH = "--refresh";
|
|
66
|
+
const refreshOf = (flags) => flags.has(REFRESH) ? { refresh: true } : {};
|
|
67
|
+
const present = (context) => (result) => Effect.map(Clock.currentTimeMillis, (now) => writeNodeResult(result, context, presenterAt(now)));
|
|
68
|
+
export const runExecutorsList = (tokens, context) => {
|
|
69
|
+
const { flags, positionals } = parseOptions(tokens, new Set(), new Set([REFRESH]));
|
|
70
|
+
requirePositionals(positionals, 0);
|
|
71
|
+
const { call } = context.dependencies;
|
|
72
|
+
if (call === undefined)
|
|
73
|
+
return unavailable();
|
|
74
|
+
return Effect.flatMap(call("connection.executors.list", refreshOf(flags)), present(context));
|
|
75
|
+
};
|
|
76
|
+
export const runExecutorsShow = (tokens, context) => {
|
|
77
|
+
const { flags, positionals } = parseOptions(tokens, new Set(), new Set([REFRESH]));
|
|
78
|
+
requirePositionals(positionals, 1);
|
|
79
|
+
const { call } = context.dependencies;
|
|
80
|
+
if (call === undefined)
|
|
81
|
+
return unavailable();
|
|
82
|
+
return Effect.flatMap(call("connection.executors.show", {
|
|
83
|
+
executor: positionals[0] ?? "",
|
|
84
|
+
...refreshOf(flags),
|
|
85
|
+
}), present(context));
|
|
86
|
+
};
|
|
87
|
+
const INSTALLED = {
|
|
88
|
+
toResult: (value) => ({ command: value.method, result: value }),
|
|
89
|
+
toText: ({ result }) => formatRows(result.items, (item) => tab([item.harnessId, item.status, item.detected ? "-" : item.reason]), { empty: "", headers: ["HARNESS", "STATUS", "REASON"] }),
|
|
90
|
+
};
|
|
91
|
+
export const runExecutorsDetect = (tokens, context) => {
|
|
92
|
+
requirePositionals(parseOptions(tokens, new Set()).positionals, 0);
|
|
93
|
+
return Effect.map(context.dependencies.listInstalledHarnesses?.() ?? unavailable(), (result) => writeNodeResult(result, context, INSTALLED));
|
|
94
|
+
};
|
|
95
|
+
//# sourceMappingURL=executors.js.map
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import * as Duration from "effect/Duration";
|
|
2
|
+
import { describeUsage } from "../output/index.js";
|
|
3
|
+
const READING_DEADLINE = Duration.seconds(12);
|
|
4
|
+
export const usageStateOf = (usage, now) => {
|
|
5
|
+
if (usage === undefined || usage.unavailable !== undefined)
|
|
6
|
+
return "unknown";
|
|
7
|
+
return now - Date.parse(usage.checkedAt) <=
|
|
8
|
+
Duration.toMillis(READING_DEADLINE)
|
|
9
|
+
? "live"
|
|
10
|
+
: "stale";
|
|
11
|
+
};
|
|
12
|
+
export const describeReading = (usage, state) => {
|
|
13
|
+
if (usage === undefined)
|
|
14
|
+
return "unknown";
|
|
15
|
+
if (usage.unavailable !== undefined)
|
|
16
|
+
return `unknown: ${usage.unavailable.message ?? usage.unavailable.reason}`;
|
|
17
|
+
const text = describeUsage(usage);
|
|
18
|
+
return state === "stale"
|
|
19
|
+
? `${text} (stale, read ${usage.checkedAt.slice(0, 16)}Z)`
|
|
20
|
+
: text;
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=reading.js.map
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { runConnectionGrantList, runConnectionGrantSet, runConnectionPoolList, runConnectionPoolSet, } from "./access/index.js";
|
|
2
2
|
export { type ConnectionCliDependencies, makeConnectionClient, } from "./client.js";
|
|
3
3
|
export { runConnectionCapacitySet, runConnectionCreate, runConnectionDisable, runConnectionEnable, runConnectionList, runConnectionLoginStart, runConnectionModelsList, runConnectionShow, runConnectionUsageShow, type VendorLogin, } from "./commands.js";
|
|
4
|
+
export { runExecutorsDetect, runExecutorsList, runExecutorsShow, } from "./executors/index.js";
|
|
4
5
|
export { runVendorLogin } from "./login.js";
|
|
5
6
|
export { describeConnection, formatConnectionResult, redactConnection, redactConnectionResult, } from "./output/index.js";
|
|
6
7
|
export { callNode, ConnectionNodeError, findConnectionByName, } from "./resolve.js";
|
package/dist/connection/index.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
export { runConnectionGrantList, runConnectionGrantSet, runConnectionPoolList, runConnectionPoolSet, } from "./access/index.js";
|
|
2
2
|
export { makeConnectionClient, } from "./client.js";
|
|
3
3
|
export { runConnectionCapacitySet, runConnectionCreate, runConnectionDisable, runConnectionEnable, runConnectionList, runConnectionLoginStart, runConnectionModelsList, runConnectionShow, runConnectionUsageShow, } from "./commands.js";
|
|
4
|
+
export { runExecutorsDetect, runExecutorsList, runExecutorsShow, } from "./executors/index.js";
|
|
4
5
|
export { runVendorLogin } from "./login.js";
|
|
5
6
|
export { describeConnection, formatConnectionResult, redactConnection, redactConnectionResult, } from "./output/index.js";
|
|
6
7
|
export { callNode, ConnectionNodeError, findConnectionByName, } from "./resolve.js";
|
package/dist/connection/input.js
CHANGED
|
@@ -15,7 +15,7 @@ const requireOption = (options, name) => {
|
|
|
15
15
|
export const readConnectionCreate = (tokens) => {
|
|
16
16
|
const parsed = parseOptions(tokens, new Set([
|
|
17
17
|
"--command-id",
|
|
18
|
-
"--
|
|
18
|
+
"--harness",
|
|
19
19
|
"--max-sessions",
|
|
20
20
|
"--name",
|
|
21
21
|
"--root",
|
|
@@ -24,7 +24,7 @@ export const readConnectionCreate = (tokens) => {
|
|
|
24
24
|
return {
|
|
25
25
|
commandId: parsed.options.get("--command-id"),
|
|
26
26
|
configRootKind: requireOption(parsed.options, "--root"),
|
|
27
|
-
executor: requireOption(parsed.options, "--
|
|
27
|
+
executor: requireOption(parsed.options, "--harness"),
|
|
28
28
|
name: requireOption(parsed.options, "--name"),
|
|
29
29
|
...readSessionLimit(parsed.options.get("--max-sessions")),
|
|
30
30
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type Connection } from "@maiaos/sdk";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
export declare const vendorEnvironmentChanges: (connection: Connection) => Readonly<Record<string, string | undefined>>;
|
|
4
4
|
export type VendorLoginOptions = {
|
package/dist/connection/login.js
CHANGED
|
@@ -2,13 +2,14 @@ import process from "node:process";
|
|
|
2
2
|
import * as NodeChildProcessSpawner from "@effect/platform-node-shared/NodeChildProcessSpawner";
|
|
3
3
|
import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem";
|
|
4
4
|
import * as NodePath from "@effect/platform-node-shared/NodePath";
|
|
5
|
+
import { EXECUTOR_IDS } from "@maiaos/sdk";
|
|
5
6
|
import * as Config from "effect/Config";
|
|
6
7
|
import * as ConfigProvider from "effect/ConfigProvider";
|
|
7
8
|
import * as Effect from "effect/Effect";
|
|
8
9
|
import * as Layer from "effect/Layer";
|
|
9
10
|
import * as Option from "effect/Option";
|
|
10
11
|
import * as ChildProcess from "effect/process/ChildProcess";
|
|
11
|
-
const vendorFor = (executor) => executor ===
|
|
12
|
+
const vendorFor = (executor) => executor === EXECUTOR_IDS.codex
|
|
12
13
|
? { command: "codex", loginArguments: ["login"], variable: "CODEX_HOME" }
|
|
13
14
|
: {
|
|
14
15
|
command: "claude",
|
|
@@ -22,7 +23,7 @@ export const vendorEnvironmentChanges = (connection) => ({
|
|
|
22
23
|
});
|
|
23
24
|
export const vendorLoginArguments = (connection, options) => {
|
|
24
25
|
const vendor = vendorFor(connection.executor);
|
|
25
|
-
return connection.executor ===
|
|
26
|
+
return connection.executor === EXECUTOR_IDS.codex && options.deviceCode
|
|
26
27
|
? [...vendor.loginArguments, "--device-auth"]
|
|
27
28
|
: vendor.loginArguments;
|
|
28
29
|
};
|
|
@@ -47,7 +48,7 @@ export const localBrowserAvailable = Effect.forEach(BROWSER_VARIABLES, (name) =>
|
|
|
47
48
|
export const effectiveLoginOptions = (options, localBrowser) => ({
|
|
48
49
|
deviceCode: options.deviceCode || !localBrowser,
|
|
49
50
|
});
|
|
50
|
-
export const headlessLoginHint = (executor) => executor ===
|
|
51
|
+
export const headlessLoginHint = (executor) => executor === EXECUTOR_IDS.codex
|
|
51
52
|
? "No browser on this machine: open the link below on any device and enter the code."
|
|
52
53
|
: "No browser on this machine: open the link Claude prints on any device, sign in, then paste the code here.";
|
|
53
54
|
const spawner = NodeChildProcessSpawner.layer.pipe(Layer.provide(Layer.merge(NodeFileSystem.layer, NodePath.layer)));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { formatRows, withNextPage } from "../../command-line/index.js";
|
|
1
|
+
import { formatRows, withNextPage } from "../../command-line/emit/index.js";
|
|
2
2
|
export const redactConnection = (connection) => ({
|
|
3
3
|
...connection,
|
|
4
4
|
configRoot: { kind: connection.configRoot.kind },
|
|
@@ -45,7 +45,7 @@ export const describeConnection = (connection) => {
|
|
|
45
45
|
: `\n ${describeUsage(connection.usage)}`;
|
|
46
46
|
const gateway = connection.gateway === undefined
|
|
47
47
|
? ""
|
|
48
|
-
: ` gateway=${connection.gateway.baseUrl}`;
|
|
48
|
+
: ` gateway=${connection.gateway.baseUrl}${connection.gateway.keyEnv === undefined ? "" : ` key=env:${connection.gateway.keyEnv}`}`;
|
|
49
49
|
return `${connection.connectionId} ${connection.name} ${connection.executor} ${connection.state} sessions<=${String(connection.maxConcurrentSessions)} revision=${connection.revision} root=${connection.configRoot.kind}${gateway}${limited}${usage}`;
|
|
50
50
|
};
|
|
51
51
|
const describeLogin = (login) => login.authUrl === undefined
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type CliConnectionResult, type ConnectionResult, describeConnection, formatConnectionResult, isConnectionResult, redactConnection, redactConnectionResult, type RedactedConnection, } from "./format.js";
|
|
1
|
+
export { type CliConnectionResult, type ConnectionResult, describeConnection, describeUsage, formatConnectionResult, isConnectionResult, redactConnection, redactConnectionResult, type RedactedConnection, } from "./format.js";
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { describeConnection, formatConnectionResult, isConnectionResult, redactConnection, redactConnectionResult, } from "./format.js";
|
|
1
|
+
export { describeConnection, describeUsage, formatConnectionResult, isConnectionResult, redactConnection, redactConnectionResult, } from "./format.js";
|
|
2
2
|
//# sourceMappingURL=index.js.map
|
|
@@ -24,6 +24,7 @@ export declare const findConnectionByName: (context: CommandContext, name: strin
|
|
|
24
24
|
readonly executor: "claude-code" | "codex-cli" | "gateway";
|
|
25
25
|
readonly gateway?: {
|
|
26
26
|
readonly baseUrl: string;
|
|
27
|
+
readonly keyEnv?: string | undefined;
|
|
27
28
|
} | undefined;
|
|
28
29
|
readonly limitedUntil: string | null;
|
|
29
30
|
readonly maxConcurrentSessions: number;
|