@maiaos/cli 0.1.0-canary.65 → 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/dist/bin/maia.cdx.json +24 -24
- package/dist/bin/maia.mjs +1 -1
- package/dist/session/commands.js +14 -3
- package/dist/session/tree/tree.js +1 -1
- package/package.json +4 -4
package/dist/session/commands.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { EXECUTOR_IDS, MAX_SESSION_INBOX_CHECK_LIMIT, MAX_SESSION_MESSAGE_BODY_BYTES, MAX_SESSION_OBSERVE_IDS, MAX_SESSION_SETTLED_IDLE_SECONDS, MAX_SESSION_STALL_AFTER_SECONDS, MIN_SESSION_STALL_AFTER_SECONDS, SESSION_EFFORT_LEVELS, sessionBaseRefSchema, sessionBranchNameSchema, sessionCreateParametersSchema, sessionEffortLevels, sessionExecutorKindSchema, } from "@maiaos/sdk";
|
|
1
|
+
import { connectionModelIdSchema, EXECUTOR_IDS, MAX_SESSION_INBOX_CHECK_LIMIT, MAX_SESSION_MESSAGE_BODY_BYTES, MAX_SESSION_OBSERVE_IDS, MAX_SESSION_SETTLED_IDLE_SECONDS, MAX_SESSION_STALL_AFTER_SECONDS, MIN_SESSION_STALL_AFTER_SECONDS, SESSION_EFFORT_LEVELS, sessionAcceptsModel, sessionBaseRefSchema, sessionBranchNameSchema, sessionCreateParametersSchema, sessionEffortLevels, sessionExecutorKindSchema, } from "@maiaos/sdk";
|
|
2
2
|
import { Clock, Effect } from "effect";
|
|
3
3
|
import { everyNode, everyNodeName, formatMerged, listEach, writeMerged, } from "../address-space/index.js";
|
|
4
4
|
import { cell, CliArgumentError, exitCodeOf, formatRows, LABEL_OPTION, LOCAL_NODE, parseOptions, parseOptionsWith, readCursor, readDuration, readExpectedRevision, readLabels, readOptionalRevision, readPageSize, readPermission, readSessionRole, readSessionTitle, readWaitTimeoutSeconds, requireOneLabelPerOption, requirePositionals, writeNodeResult, writeSuccess, } from "../command-line/index.js";
|
|
@@ -88,10 +88,21 @@ const requireOneSelection = (input) => {
|
|
|
88
88
|
if (input.definitionRef !== undefined &&
|
|
89
89
|
(input.connectionId !== undefined || input.executor !== undefined))
|
|
90
90
|
throw new CliArgumentError("Use one of '--connection', '--harness' or '--agent-definition'.");
|
|
91
|
-
|
|
92
|
-
throw new CliArgumentError("Option '--model' needs '--connection' with a gateway connection.");
|
|
91
|
+
requireModelSelection(input);
|
|
93
92
|
requireSupportedEffort(input);
|
|
94
93
|
};
|
|
94
|
+
const requireModelSelection = ({ connectionId, executor, model, }) => {
|
|
95
|
+
if (model === undefined)
|
|
96
|
+
return;
|
|
97
|
+
if (!connectionModelIdSchema.safeParse(model).success)
|
|
98
|
+
throw new CliArgumentError("Option '--model' must be a model id of up to 256 letters, digits and '._:/@-', starting with a letter or digit.");
|
|
99
|
+
if (connectionId !== undefined)
|
|
100
|
+
return;
|
|
101
|
+
if (executor === undefined)
|
|
102
|
+
throw new CliArgumentError("Option '--model' needs '--connection' or '--harness'.");
|
|
103
|
+
if (!sessionAcceptsModel(executor))
|
|
104
|
+
throw new CliArgumentError(`The ${executor} executor takes no model.`);
|
|
105
|
+
};
|
|
95
106
|
const requireSupportedEffort = ({ connectionId, effort, executor, }) => {
|
|
96
107
|
if (effort === undefined)
|
|
97
108
|
return;
|
|
@@ -34,7 +34,7 @@ export const SESSION_TREE = {
|
|
|
34
34
|
],
|
|
35
35
|
leaves: [
|
|
36
36
|
[
|
|
37
|
-
"session create (--workspace <workspace-id> | --project <project-id>) [--command-id <id>] [--role <worker|orchestrator>] [--connection <connection-id> [--harness <executor-id>]
|
|
37
|
+
"session create (--workspace <workspace-id> | --project <project-id>) [--command-id <id>] [--role <worker|orchestrator>] [--connection <connection-id> [--harness <executor-id>] | --harness <executor-id> | --agent <agent-id> | --agent-definition <key> --agent-definition-version <version> --agent-definition-digest <sha256>] [--model <id>] [--effort <low|medium|high|xhigh|max|ultra>] [--base <branch-tag-or-commit> [--branch <maia/name>] | --host-authority [--permission <mode>]] [--cwd <path>] [--title <text> | --name <text>] [--label <key=value>...] [--text <text> | --prompt-stdin | --from-file <path>]",
|
|
38
38
|
0,
|
|
39
39
|
"session.create",
|
|
40
40
|
"Create a Session, optionally starting it with a first message.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maiaos/cli",
|
|
3
|
-
"version": "0.1.0-canary.
|
|
3
|
+
"version": "0.1.0-canary.66",
|
|
4
4
|
"description": "The maia CLI and MCP server: start, drive, observe and stop swarms of Claude Code and Codex agents from a terminal, a script or another agent.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"maia",
|
|
@@ -65,9 +65,9 @@
|
|
|
65
65
|
"dependencies": {
|
|
66
66
|
"@earendil-works/pi-tui": "1.0.0",
|
|
67
67
|
"@effect/platform-node-shared": "4.0.0",
|
|
68
|
-
"@maiaos/agent": "0.1.0-canary.
|
|
69
|
-
"@maiaos/client-core": "0.1.0-canary.
|
|
70
|
-
"@maiaos/sdk": "0.1.0-canary.
|
|
68
|
+
"@maiaos/agent": "0.1.0-canary.66",
|
|
69
|
+
"@maiaos/client-core": "0.1.0-canary.66",
|
|
70
|
+
"@maiaos/sdk": "0.1.0-canary.66",
|
|
71
71
|
"effect": "4.0.0"
|
|
72
72
|
},
|
|
73
73
|
"scripts": {
|