@maiaos/cli 0.1.0-canary.6 → 0.1.0-canary.60
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/README.md
CHANGED
|
@@ -4,9 +4,10 @@ The `maia` command-line tool and MCP server for Maia OS: start, drive, observe
|
|
|
4
4
|
and stop swarms of AI coding agents (Claude Code and Codex workers) from a
|
|
5
5
|
terminal, a script or another agent.
|
|
6
6
|
|
|
7
|
-
> **Pre-release.**
|
|
8
|
-
>
|
|
9
|
-
>
|
|
7
|
+
> **Pre-release.** Maia publishes `canary` builds to npm only, and `latest` follows the newest
|
|
8
|
+
> one (earlier nightly builds are historical). They are not release-qualified,
|
|
9
|
+
> and Maia has no stable release
|
|
10
|
+
> ([D-202](https://maia-os.vllnt.com/en/docs/decisions#d-202)).
|
|
10
11
|
|
|
11
12
|
## Requirements
|
|
12
13
|
|
|
@@ -17,7 +18,7 @@ terminal, a script or another agent.
|
|
|
17
18
|
## Install
|
|
18
19
|
|
|
19
20
|
```sh
|
|
20
|
-
pnpm add -g @maiaos/cli@
|
|
21
|
+
pnpm add -g @maiaos/cli@canary
|
|
21
22
|
```
|
|
22
23
|
|
|
23
24
|
From a source checkout, `pnpm dev:cli` installs `maia` for that checkout and
|
|
@@ -49,12 +50,12 @@ runs Maia's own coding agent.
|
|
|
49
50
|
and many command families are release-disabled; `maia help --json` reports
|
|
50
51
|
each command's availability. The first-owner bootstrap of a Node
|
|
51
52
|
(`maia node bootstrap`) is a source candidate and release-disabled; see
|
|
52
|
-
[team Workspaces and Control Nodes](https://
|
|
53
|
+
[team Workspaces and Control Nodes](https://maia-os.vllnt.com/en/docs/team-workspaces-and-control-nodes).
|
|
53
54
|
|
|
54
55
|
## Links
|
|
55
56
|
|
|
56
|
-
- [CLI reference](https://
|
|
57
|
+
- [CLI reference](https://maia-os.vllnt.com/en/docs/reference/cli):
|
|
57
58
|
grammar, JSON output and exit codes
|
|
58
|
-
- [Normative contracts](https://
|
|
59
|
+
- [Normative contracts](https://maia-os.vllnt.com/en/docs/reference/contracts)
|
|
59
60
|
- [Security policy](https://github.com/vllnt/maia/blob/main/SECURITY.md)
|
|
60
61
|
- [Repository](https://github.com/vllnt/maia)
|
package/dist/agents/client.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { type AgentsChangeConfirmParameters, type AgentsChangePreviewParameters, type AgentsListParameters, type AgentsShowParameters } from "@maiaos/sdk";
|
|
1
|
+
import { type AgentsChangeConfirmParameters, type AgentsChangePreviewParameters, type AgentsDetectParameters, type AgentsListParameters, type AgentsShowParameters } from "@maiaos/sdk";
|
|
2
2
|
import type { CliNodeOperations } from "../local-node/index.js";
|
|
3
3
|
export declare const makeAgentsClient: (node: CliNodeOperations) => {
|
|
4
4
|
confirmAgentChange: (input: AgentsChangeConfirmParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
@@ -47,32 +47,6 @@ export declare const makeAgentsClient: (node: CliNodeOperations) => {
|
|
|
47
47
|
readonly updatedAt: string;
|
|
48
48
|
};
|
|
49
49
|
}>;
|
|
50
|
-
listAgents: (input: AgentsListParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
51
|
-
readonly items: readonly {
|
|
52
|
-
readonly contentDigest: string;
|
|
53
|
-
readonly createdAt: string;
|
|
54
|
-
readonly id: string;
|
|
55
|
-
readonly projectId: string;
|
|
56
|
-
readonly revision: string;
|
|
57
|
-
readonly schemaVersion: "maia.agent/v1";
|
|
58
|
-
readonly spec: {
|
|
59
|
-
readonly accountableActorId: string;
|
|
60
|
-
readonly connectionId?: string | undefined;
|
|
61
|
-
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
62
|
-
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
63
|
-
readonly homeSessionId?: string | undefined;
|
|
64
|
-
readonly instruction: string;
|
|
65
|
-
readonly managerAgentId?: string | undefined;
|
|
66
|
-
readonly model?: string | undefined;
|
|
67
|
-
readonly name: string;
|
|
68
|
-
readonly placement: "local";
|
|
69
|
-
};
|
|
70
|
-
readonly state: "active" | "disabled";
|
|
71
|
-
readonly updatedAt: string;
|
|
72
|
-
}[];
|
|
73
|
-
readonly method: "agents.list";
|
|
74
|
-
readonly nextCursor?: string | undefined;
|
|
75
|
-
}>;
|
|
76
50
|
previewAgentChange: (input: AgentsChangePreviewParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
77
51
|
readonly change: {
|
|
78
52
|
readonly kind: "create";
|
|
@@ -141,6 +115,52 @@ export declare const makeAgentsClient: (node: CliNodeOperations) => {
|
|
|
141
115
|
readonly issuedAt: string;
|
|
142
116
|
readonly method: "agents.change.preview";
|
|
143
117
|
}>;
|
|
118
|
+
detectAgents: (input: AgentsDetectParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
119
|
+
readonly harnesses: readonly {
|
|
120
|
+
readonly folders: readonly {
|
|
121
|
+
readonly path: string;
|
|
122
|
+
readonly scope: "user";
|
|
123
|
+
}[];
|
|
124
|
+
readonly found: boolean;
|
|
125
|
+
readonly id: "claude-code" | "codex-cli";
|
|
126
|
+
readonly version?: string | undefined;
|
|
127
|
+
}[];
|
|
128
|
+
readonly method: "agents.detect";
|
|
129
|
+
readonly scopes: {
|
|
130
|
+
readonly user: {
|
|
131
|
+
readonly status: "ok";
|
|
132
|
+
} | {
|
|
133
|
+
readonly reason: "failed" | "invalid_output" | "output_too_large" | "timeout" | "unsupported";
|
|
134
|
+
readonly status: "unavailable";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
}>;
|
|
138
|
+
listAgents: (input: AgentsListParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
139
|
+
readonly items: readonly {
|
|
140
|
+
readonly contentDigest: string;
|
|
141
|
+
readonly createdAt: string;
|
|
142
|
+
readonly id: string;
|
|
143
|
+
readonly projectId: string;
|
|
144
|
+
readonly revision: string;
|
|
145
|
+
readonly schemaVersion: "maia.agent/v1";
|
|
146
|
+
readonly spec: {
|
|
147
|
+
readonly accountableActorId: string;
|
|
148
|
+
readonly connectionId?: string | undefined;
|
|
149
|
+
readonly effort?: "high" | "low" | "max" | "medium" | "ultra" | "xhigh" | undefined;
|
|
150
|
+
readonly harness: "claude-code" | "codex-cli" | "maia-agent" | "pi";
|
|
151
|
+
readonly homeSessionId?: string | undefined;
|
|
152
|
+
readonly instruction: string;
|
|
153
|
+
readonly managerAgentId?: string | undefined;
|
|
154
|
+
readonly model?: string | undefined;
|
|
155
|
+
readonly name: string;
|
|
156
|
+
readonly placement: "local";
|
|
157
|
+
};
|
|
158
|
+
readonly state: "active" | "disabled";
|
|
159
|
+
readonly updatedAt: string;
|
|
160
|
+
}[];
|
|
161
|
+
readonly method: "agents.list";
|
|
162
|
+
readonly nextCursor?: string | undefined;
|
|
163
|
+
}>;
|
|
144
164
|
showAgent: (input: AgentsShowParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
145
165
|
readonly agent: {
|
|
146
166
|
readonly contentDigest: string;
|
package/dist/agents/client.js
CHANGED
|
@@ -1,8 +1,15 @@
|
|
|
1
|
-
import { agentsChangeConfirmParametersSchema, agentsChangePreviewParametersSchema, agentsListParametersSchema, agentsShowParametersSchema, } from "@maiaos/sdk";
|
|
2
|
-
|
|
1
|
+
import { agentsChangeConfirmParametersSchema, agentsChangePreviewParametersSchema, agentsDetectParametersSchema, agentsListParametersSchema, agentsShowParametersSchema, } from "@maiaos/sdk";
|
|
2
|
+
const makeAgentsChangeClient = (node) => ({
|
|
3
3
|
confirmAgentChange: (input) => node.runValidatedNodeOperation(input, agentsChangeConfirmParametersSchema, (client, parameters, options) => client.confirmAgentChange(parameters, options), { commandId: input.commandId }),
|
|
4
|
-
listAgents: (input) => node.runValidatedNodeOperation(input, agentsListParametersSchema, (client, parameters, options) => client.listAgents(parameters, options)),
|
|
5
4
|
previewAgentChange: (input) => node.runValidatedNodeOperation(input, agentsChangePreviewParametersSchema, (client, parameters, options) => client.previewAgentChange(parameters, options)),
|
|
5
|
+
});
|
|
6
|
+
const makeAgentsReadClient = (node) => ({
|
|
7
|
+
detectAgents: (input) => node.runValidatedNodeOperation(input, agentsDetectParametersSchema, (client, parameters, options) => client.detectAgents(parameters, options)),
|
|
8
|
+
listAgents: (input) => node.runValidatedNodeOperation(input, agentsListParametersSchema, (client, parameters, options) => client.listAgents(parameters, options)),
|
|
6
9
|
showAgent: (input) => node.runValidatedNodeOperation(input, agentsShowParametersSchema, (client, parameters, options) => client.showAgent(parameters, options)),
|
|
7
10
|
});
|
|
11
|
+
export const makeAgentsClient = (node) => ({
|
|
12
|
+
...makeAgentsChangeClient(node),
|
|
13
|
+
...makeAgentsReadClient(node),
|
|
14
|
+
});
|
|
8
15
|
//# sourceMappingURL=client.js.map
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type CommandContext, type CommandEffect } from "../command-line/index.js";
|
|
2
2
|
export declare const runAgentsList: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
3
|
+
export declare const runAgentsDetect: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
3
4
|
export declare const runAgentsShow: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
4
5
|
export declare const runAgentsCreate: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
5
6
|
export declare const runAgentsRevise: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
package/dist/agents/commands.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { agentsChangeConfirmParametersSchema, } from "@maiaos/sdk";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
|
-
import { CliArgumentError, confirmParameters, parseOptions, readTwoPhaseMode, requirePositionals, runTwoPhase, TWO_PHASE_FLAGS, writeNodeResult, } from "../command-line/index.js";
|
|
4
|
-
import { AGENT_OPTIONS, readAgentsList, readAgentsShow, readCreateChange, readDisableChange, readReviseChange, } from "./input.js";
|
|
3
|
+
import { CliArgumentError, confirmParameters, parseOptions, readTwoPhaseMode, requirePositionals, runTwoPhase, TWO_PHASE_FLAGS, writeNodeResult, writeSuccess, } from "../command-line/index.js";
|
|
4
|
+
import { AGENT_OPTIONS, readAgentsDetect, readAgentsList, readAgentsShow, readCreateChange, readDisableChange, readReviseChange, } from "./input.js";
|
|
5
5
|
import { formatAgentsResult } from "./output/index.js";
|
|
6
6
|
const write = (context) => (result) => writeNodeResult(result, context, {
|
|
7
7
|
toResult: (value) => ({ command: value.method, result: value }),
|
|
@@ -13,6 +13,28 @@ export const runAgentsList = (tokens, context) => Effect.gen(function* () {
|
|
|
13
13
|
return yield* Effect.die(new Error("Missing Agents client."));
|
|
14
14
|
return write(context)(yield* list(readAgentsList(tokens)));
|
|
15
15
|
});
|
|
16
|
+
const EXIT_PARTIAL = 70;
|
|
17
|
+
const writeDetect = (context) => (result) => {
|
|
18
|
+
const scope = result.ok ? result.value.scopes.user : undefined;
|
|
19
|
+
if (!result.ok || scope?.status !== "unavailable")
|
|
20
|
+
return write(context)(result);
|
|
21
|
+
writeSuccess({ command: result.value.method, result: result.value }, {
|
|
22
|
+
...context,
|
|
23
|
+
error: {
|
|
24
|
+
code: scope.reason,
|
|
25
|
+
message: `The user Skills folders are unavailable: ${scope.reason}.`,
|
|
26
|
+
retryable: scope.reason === "timeout",
|
|
27
|
+
},
|
|
28
|
+
ok: false,
|
|
29
|
+
}, formatAgentsResult);
|
|
30
|
+
return EXIT_PARTIAL;
|
|
31
|
+
};
|
|
32
|
+
export const runAgentsDetect = (tokens, context) => Effect.gen(function* () {
|
|
33
|
+
const detect = context.dependencies.detectAgents;
|
|
34
|
+
if (detect === undefined)
|
|
35
|
+
return yield* Effect.die(new Error("Missing Agents client."));
|
|
36
|
+
return writeDetect(context)(yield* detect(readAgentsDetect(tokens)));
|
|
37
|
+
});
|
|
16
38
|
export const runAgentsShow = (tokens, context) => Effect.gen(function* () {
|
|
17
39
|
const show = context.dependencies.showAgent;
|
|
18
40
|
if (show === undefined)
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { type AgentsCliDependencies, makeAgentsClient } from "./client.js";
|
|
2
|
-
export { runAgentsCreate, runAgentsDisable, runAgentsList, runAgentsRevise, runAgentsShow, } from "./commands.js";
|
|
2
|
+
export { runAgentsCreate, runAgentsDetect, runAgentsDisable, runAgentsList, runAgentsRevise, runAgentsShow, } from "./commands.js";
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/agents/index.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
export { makeAgentsClient } from "./client.js";
|
|
2
|
-
export { runAgentsCreate, runAgentsDisable, runAgentsList, runAgentsRevise, runAgentsShow, } from "./commands.js";
|
|
2
|
+
export { runAgentsCreate, runAgentsDetect, runAgentsDisable, runAgentsList, runAgentsRevise, runAgentsShow, } from "./commands.js";
|
|
3
3
|
//# sourceMappingURL=index.js.map
|
package/dist/agents/input.js
CHANGED
|
@@ -15,6 +15,7 @@ const SPEC_OPTIONS = [
|
|
|
15
15
|
];
|
|
16
16
|
export const AGENT_OPTIONS = {
|
|
17
17
|
create: new Set(["--command-id", "--project", ...SPEC_OPTIONS]),
|
|
18
|
+
detect: new Set(),
|
|
18
19
|
disable: new Set(["--command-id", "--expected-revision"]),
|
|
19
20
|
list: new Set(["--after", "--limit", "--project", "--state"]),
|
|
20
21
|
revise: new Set(["--command-id", "--expected-revision", ...SPEC_OPTIONS]),
|
|
@@ -59,6 +60,11 @@ export const readAgentsList = (tokens) => {
|
|
|
59
60
|
...(state === undefined ? {} : { state }),
|
|
60
61
|
};
|
|
61
62
|
};
|
|
63
|
+
export const readAgentsDetect = (tokens) => {
|
|
64
|
+
const { positionals } = parseOptions(tokens, AGENT_OPTIONS.detect);
|
|
65
|
+
requirePositionals(positionals, 0);
|
|
66
|
+
return {};
|
|
67
|
+
};
|
|
62
68
|
export const readAgentsShow = (tokens) => {
|
|
63
69
|
const { options, positionals } = parseOptions(tokens, AGENT_OPTIONS.show);
|
|
64
70
|
requirePositionals(positionals, 1);
|
|
@@ -29,6 +29,15 @@ const proposedLines = (result) => {
|
|
|
29
29
|
return `${tab([`project=${project ?? ""}`, `name=${cell(name)}`, `harness=${harness}`])}\n${specLines(change.spec)}`;
|
|
30
30
|
};
|
|
31
31
|
const previewLines = (result) => `${tab([result.change.kind, result.agentId, `command=${result.commandId}`, `expires=${result.expiresAt}`])}\n${proposedLines(result)}${result.current === undefined ? "" : `current\t${headline(result.current)}\n`}`;
|
|
32
|
+
const detectLines = ({ harnesses, scopes }) => `${harnesses
|
|
33
|
+
.map((harness) => tab([
|
|
34
|
+
harness.id,
|
|
35
|
+
harness.found ? (harness.version ?? "version unknown") : "not found",
|
|
36
|
+
...harness.folders.map((folder) => `${folder.scope}:${folder.path}`),
|
|
37
|
+
]))
|
|
38
|
+
.join("\n")}\n${scopes.user.status === "unavailable"
|
|
39
|
+
? tab(["user", "unavailable", scopes.user.reason])
|
|
40
|
+
: tab(["user", "ok"])}\n`;
|
|
32
41
|
export const formatAgentsResult = ({ result }) => {
|
|
33
42
|
switch (result.method) {
|
|
34
43
|
case "agents.list":
|
|
@@ -36,6 +45,8 @@ export const formatAgentsResult = ({ result }) => {
|
|
|
36
45
|
empty: "No Agents.",
|
|
37
46
|
headers: ["AGENT", "STATE", "REVISION", "HARNESS", "NAME"],
|
|
38
47
|
}), result.nextCursor);
|
|
48
|
+
case "agents.detect":
|
|
49
|
+
return detectLines(result);
|
|
39
50
|
case "agents.show":
|
|
40
51
|
return showLines(result.agent);
|
|
41
52
|
case "agents.change.preview":
|
package/dist/agents/tree/tree.js
CHANGED
|
@@ -1,7 +1,12 @@
|
|
|
1
1
|
const agents = () => import("../index.js");
|
|
2
2
|
const SPEC = "--name <text> --harness <claude-code|codex-cli|maia-agent|pi> --accountable <actor-id> --instruction <text> [--connection <connection-id>] [--model <id>] [--effort <low|medium|high|xhigh|max|ultra>] [--manager <agent-id>] [--home-session <session-id>]";
|
|
3
3
|
export const AGENTS_TREE = {
|
|
4
|
-
groups: [
|
|
4
|
+
groups: [
|
|
5
|
+
[
|
|
6
|
+
"agents",
|
|
7
|
+
"Agent definitions of a Project, and the harnesses a machine has.",
|
|
8
|
+
],
|
|
9
|
+
],
|
|
5
10
|
leaves: [
|
|
6
11
|
[
|
|
7
12
|
"agents list --project <project-id> [--state <active|disabled>] [--limit <1..100>] [--after <agent-id>]",
|
|
@@ -10,6 +15,13 @@ export const AGENTS_TREE = {
|
|
|
10
15
|
"List a Project's Agent definitions.",
|
|
11
16
|
{ run: [agents, "runAgentsList"] },
|
|
12
17
|
],
|
|
18
|
+
[
|
|
19
|
+
"agents detect",
|
|
20
|
+
1,
|
|
21
|
+
"agents.detect",
|
|
22
|
+
"Detect installed Claude Code and Codex with their user Skills folders.",
|
|
23
|
+
{ run: [agents, "runAgentsDetect"] },
|
|
24
|
+
],
|
|
13
25
|
[
|
|
14
26
|
"agents show <agent-id> [--revision <revision>]",
|
|
15
27
|
1,
|
package/dist/bin/maia.cdx.json
CHANGED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
"version": "4.0.0"
|
|
29
29
|
},
|
|
30
30
|
{
|
|
31
|
-
"bom-ref": "@maiaos/client-core@0.1.0-canary.
|
|
31
|
+
"bom-ref": "@maiaos/client-core@0.1.0-canary.60",
|
|
32
32
|
"name": "@maiaos/client-core",
|
|
33
33
|
"properties": [
|
|
34
34
|
{
|
|
@@ -40,13 +40,13 @@
|
|
|
40
40
|
"value": "packages/client-core"
|
|
41
41
|
}
|
|
42
42
|
],
|
|
43
|
-
"purl": "pkg:npm/%40maiaos/client-core@0.1.0-canary.
|
|
43
|
+
"purl": "pkg:npm/%40maiaos/client-core@0.1.0-canary.60",
|
|
44
44
|
"scope": "required",
|
|
45
45
|
"type": "library",
|
|
46
|
-
"version": "0.1.0-canary.
|
|
46
|
+
"version": "0.1.0-canary.60"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
"bom-ref": "@maiaos/protocol@0.1.0-canary.
|
|
49
|
+
"bom-ref": "@maiaos/protocol@0.1.0-canary.60",
|
|
50
50
|
"name": "@maiaos/protocol",
|
|
51
51
|
"properties": [
|
|
52
52
|
{
|
|
@@ -58,13 +58,13 @@
|
|
|
58
58
|
"value": "packages/protocol"
|
|
59
59
|
}
|
|
60
60
|
],
|
|
61
|
-
"purl": "pkg:npm/%40maiaos/protocol@0.1.0-canary.
|
|
61
|
+
"purl": "pkg:npm/%40maiaos/protocol@0.1.0-canary.60",
|
|
62
62
|
"scope": "required",
|
|
63
63
|
"type": "library",
|
|
64
|
-
"version": "0.1.0-canary.
|
|
64
|
+
"version": "0.1.0-canary.60"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
"bom-ref": "@maiaos/sdk@0.1.0-canary.
|
|
67
|
+
"bom-ref": "@maiaos/sdk@0.1.0-canary.60",
|
|
68
68
|
"name": "@maiaos/sdk",
|
|
69
69
|
"properties": [
|
|
70
70
|
{
|
|
@@ -76,10 +76,10 @@
|
|
|
76
76
|
"value": "packages/sdk"
|
|
77
77
|
}
|
|
78
78
|
],
|
|
79
|
-
"purl": "pkg:npm/%40maiaos/sdk@0.1.0-canary.
|
|
79
|
+
"purl": "pkg:npm/%40maiaos/sdk@0.1.0-canary.60",
|
|
80
80
|
"scope": "required",
|
|
81
81
|
"type": "library",
|
|
82
|
-
"version": "0.1.0-canary.
|
|
82
|
+
"version": "0.1.0-canary.60"
|
|
83
83
|
},
|
|
84
84
|
{
|
|
85
85
|
"bom-ref": "effect@4.0.0",
|
|
@@ -111,12 +111,12 @@
|
|
|
111
111
|
{
|
|
112
112
|
"dependsOn": [
|
|
113
113
|
"@effect/platform-node-shared@4.0.0",
|
|
114
|
-
"@maiaos/client-core@0.1.0-canary.
|
|
115
|
-
"@maiaos/protocol@0.1.0-canary.
|
|
116
|
-
"@maiaos/sdk@0.1.0-canary.
|
|
114
|
+
"@maiaos/client-core@0.1.0-canary.60",
|
|
115
|
+
"@maiaos/protocol@0.1.0-canary.60",
|
|
116
|
+
"@maiaos/sdk@0.1.0-canary.60",
|
|
117
117
|
"effect@4.0.0"
|
|
118
118
|
],
|
|
119
|
-
"ref": "@maiaos/cli@0.1.0-canary.
|
|
119
|
+
"ref": "@maiaos/cli@0.1.0-canary.60"
|
|
120
120
|
},
|
|
121
121
|
{
|
|
122
122
|
"dependsOn": [],
|
|
@@ -124,15 +124,15 @@
|
|
|
124
124
|
},
|
|
125
125
|
{
|
|
126
126
|
"dependsOn": [],
|
|
127
|
-
"ref": "@maiaos/client-core@0.1.0-canary.
|
|
127
|
+
"ref": "@maiaos/client-core@0.1.0-canary.60"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"dependsOn": [],
|
|
131
|
-
"ref": "@maiaos/protocol@0.1.0-canary.
|
|
131
|
+
"ref": "@maiaos/protocol@0.1.0-canary.60"
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"dependsOn": [],
|
|
135
|
-
"ref": "@maiaos/sdk@0.1.0-canary.
|
|
135
|
+
"ref": "@maiaos/sdk@0.1.0-canary.60"
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
138
|
"dependsOn": [],
|
|
@@ -141,16 +141,16 @@
|
|
|
141
141
|
],
|
|
142
142
|
"metadata": {
|
|
143
143
|
"component": {
|
|
144
|
-
"bom-ref": "@maiaos/cli@0.1.0-canary.
|
|
144
|
+
"bom-ref": "@maiaos/cli@0.1.0-canary.60",
|
|
145
145
|
"hashes": [
|
|
146
146
|
{
|
|
147
147
|
"alg": "SHA-256",
|
|
148
|
-
"content": "
|
|
148
|
+
"content": "dfc602691a32e3f50b63d697f6a4a2c1f9ae217d86768246ecb1b50f69a1211d"
|
|
149
149
|
}
|
|
150
150
|
],
|
|
151
151
|
"name": "@maiaos/cli",
|
|
152
152
|
"type": "application",
|
|
153
|
-
"version": "0.1.0-canary.
|
|
153
|
+
"version": "0.1.0-canary.60"
|
|
154
154
|
},
|
|
155
155
|
"properties": [
|
|
156
156
|
{
|