@maiaos/cli 0.1.0-canary.31 → 0.1.0-canary.33
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/dist/agents/client.d.ts +12 -0
- package/dist/agents/commands.js +18 -2
- package/dist/agents/output/format.js +5 -2
- package/dist/agents/tree/tree.js +1 -1
- package/dist/bin/maia.cdx.json +19 -19
- package/dist/bin/maia.mjs +1 -1
- package/package.json +4 -4
package/dist/agents/client.d.ts
CHANGED
|
@@ -117,11 +117,23 @@ export declare const makeAgentsClient: (node: CliNodeOperations) => {
|
|
|
117
117
|
}>;
|
|
118
118
|
detectAgents: (input: AgentsDetectParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
119
119
|
readonly harnesses: readonly {
|
|
120
|
+
readonly folders: readonly {
|
|
121
|
+
readonly path: string;
|
|
122
|
+
readonly scope: "user";
|
|
123
|
+
}[];
|
|
120
124
|
readonly found: boolean;
|
|
121
125
|
readonly id: "claude-code" | "codex-cli";
|
|
122
126
|
readonly version?: string | undefined;
|
|
123
127
|
}[];
|
|
124
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
|
+
};
|
|
125
137
|
}>;
|
|
126
138
|
listAgents: (input: AgentsListParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
127
139
|
readonly items: readonly {
|
package/dist/agents/commands.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
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";
|
|
3
|
+
import { CliArgumentError, confirmParameters, parseOptions, readTwoPhaseMode, requirePositionals, runTwoPhase, TWO_PHASE_FLAGS, writeNodeResult, writeSuccess, } from "../command-line/index.js";
|
|
4
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, {
|
|
@@ -13,11 +13,27 @@ 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
|
+
};
|
|
16
32
|
export const runAgentsDetect = (tokens, context) => Effect.gen(function* () {
|
|
17
33
|
const detect = context.dependencies.detectAgents;
|
|
18
34
|
if (detect === undefined)
|
|
19
35
|
return yield* Effect.die(new Error("Missing Agents client."));
|
|
20
|
-
return
|
|
36
|
+
return writeDetect(context)(yield* detect(readAgentsDetect(tokens)));
|
|
21
37
|
});
|
|
22
38
|
export const runAgentsShow = (tokens, context) => Effect.gen(function* () {
|
|
23
39
|
const show = context.dependencies.showAgent;
|
|
@@ -29,12 +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 }) => `${harnesses
|
|
32
|
+
const detectLines = ({ harnesses, scopes }) => `${harnesses
|
|
33
33
|
.map((harness) => tab([
|
|
34
34
|
harness.id,
|
|
35
35
|
harness.found ? (harness.version ?? "version unknown") : "not found",
|
|
36
|
+
...harness.folders.map((folder) => `${folder.scope}:${folder.path}`),
|
|
36
37
|
]))
|
|
37
|
-
.join("\n")}\n
|
|
38
|
+
.join("\n")}\n${scopes.user.status === "unavailable"
|
|
39
|
+
? tab(["user", "unavailable", scopes.user.reason])
|
|
40
|
+
: tab(["user", "ok"])}\n`;
|
|
38
41
|
export const formatAgentsResult = ({ result }) => {
|
|
39
42
|
switch (result.method) {
|
|
40
43
|
case "agents.list":
|
package/dist/agents/tree/tree.js
CHANGED
|
@@ -19,7 +19,7 @@ export const AGENTS_TREE = {
|
|
|
19
19
|
"agents detect",
|
|
20
20
|
1,
|
|
21
21
|
"agents.detect",
|
|
22
|
-
"Detect installed Claude Code and Codex with their
|
|
22
|
+
"Detect installed Claude Code and Codex with their user Skills folders.",
|
|
23
23
|
{ run: [agents, "runAgentsDetect"] },
|
|
24
24
|
],
|
|
25
25
|
[
|
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.33",
|
|
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.33",
|
|
44
44
|
"scope": "required",
|
|
45
45
|
"type": "library",
|
|
46
|
-
"version": "0.1.0-canary.
|
|
46
|
+
"version": "0.1.0-canary.33"
|
|
47
47
|
},
|
|
48
48
|
{
|
|
49
|
-
"bom-ref": "@maiaos/protocol@0.1.0-canary.
|
|
49
|
+
"bom-ref": "@maiaos/protocol@0.1.0-canary.33",
|
|
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.33",
|
|
62
62
|
"scope": "required",
|
|
63
63
|
"type": "library",
|
|
64
|
-
"version": "0.1.0-canary.
|
|
64
|
+
"version": "0.1.0-canary.33"
|
|
65
65
|
},
|
|
66
66
|
{
|
|
67
|
-
"bom-ref": "@maiaos/sdk@0.1.0-canary.
|
|
67
|
+
"bom-ref": "@maiaos/sdk@0.1.0-canary.33",
|
|
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.33",
|
|
80
80
|
"scope": "required",
|
|
81
81
|
"type": "library",
|
|
82
|
-
"version": "0.1.0-canary.
|
|
82
|
+
"version": "0.1.0-canary.33"
|
|
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.33",
|
|
115
|
+
"@maiaos/protocol@0.1.0-canary.33",
|
|
116
|
+
"@maiaos/sdk@0.1.0-canary.33",
|
|
117
117
|
"effect@4.0.0"
|
|
118
118
|
],
|
|
119
|
-
"ref": "@maiaos/cli@0.1.0-canary.
|
|
119
|
+
"ref": "@maiaos/cli@0.1.0-canary.33"
|
|
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.33"
|
|
128
128
|
},
|
|
129
129
|
{
|
|
130
130
|
"dependsOn": [],
|
|
131
|
-
"ref": "@maiaos/protocol@0.1.0-canary.
|
|
131
|
+
"ref": "@maiaos/protocol@0.1.0-canary.33"
|
|
132
132
|
},
|
|
133
133
|
{
|
|
134
134
|
"dependsOn": [],
|
|
135
|
-
"ref": "@maiaos/sdk@0.1.0-canary.
|
|
135
|
+
"ref": "@maiaos/sdk@0.1.0-canary.33"
|
|
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.33",
|
|
145
145
|
"hashes": [
|
|
146
146
|
{
|
|
147
147
|
"alg": "SHA-256",
|
|
148
|
-
"content": "
|
|
148
|
+
"content": "b24f4f4f156d03396bef78c043446adf5cf52ac47ec5921f3b9790e027333682"
|
|
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.33"
|
|
154
154
|
},
|
|
155
155
|
"properties": [
|
|
156
156
|
{
|