@maiaos/cli 0.1.0-canary.64 → 0.1.0-canary.65
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 +260 -55
- 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,40 +1,56 @@
|
|
|
1
1
|
const session = () => import("../index.js");
|
|
2
|
+
const move = () => import("../move/index.js");
|
|
3
|
+
const fork = () => import("../fork/index.js");
|
|
4
|
+
const setup = () => import("../setup/index.js");
|
|
5
|
+
const switchSession = () => import("../switch/index.js");
|
|
6
|
+
const spawn = () => import("../spawn/index.js");
|
|
2
7
|
const turn = () => import("../turn/index.js");
|
|
3
8
|
const approval = () => import("../approval/index.js");
|
|
4
9
|
const interaction = () => import("../interaction/index.js");
|
|
5
10
|
const discovery = () => import("../../import/index.js");
|
|
11
|
+
const attach = () => session().then(({ sessionAttachRunner }) => ({
|
|
12
|
+
runSessionAttach: sessionAttachRunner(() => discovery().then(({ runAttachNative }) => runAttachNative)),
|
|
13
|
+
}));
|
|
14
|
+
const command = () => import("../command/index.js");
|
|
15
|
+
const goal = () => import("../../goal/index.js");
|
|
6
16
|
export const SESSION_TREE = {
|
|
7
17
|
groups: [
|
|
8
18
|
["session", "Sessions: workers that run in a Workspace."],
|
|
9
19
|
["session events", "A Session's events."],
|
|
20
|
+
["session git", "A coding Session's Git state."],
|
|
10
21
|
["session history", "Session transcripts."],
|
|
22
|
+
["session placement", "Where a Session can run."],
|
|
11
23
|
["session inbox", "This Session's inbox."],
|
|
12
24
|
["session message", "Messages between Sessions."],
|
|
13
25
|
["session agent-permission", "Agent permission grants."],
|
|
26
|
+
["session setup", "Project setup scripts of Session worktrees."],
|
|
27
|
+
["session spawn-caps", "Child spawn caps."],
|
|
14
28
|
["session turn", "Turns sent to a Session."],
|
|
29
|
+
["session command", "Native slash commands."],
|
|
15
30
|
["session approval", "What a worker waits on a person for."],
|
|
31
|
+
["inbox", "What waits for you: approvals, questions and results."],
|
|
16
32
|
["session interaction", "Record-only questions to a person."],
|
|
17
33
|
["import", "Find sessions to adopt."],
|
|
18
34
|
],
|
|
19
35
|
leaves: [
|
|
20
36
|
[
|
|
21
|
-
"session create (--workspace <workspace-id> | --project <project-id>) [--command-id <id>] [--role <worker|orchestrator>] [--connection <connection-id> [--
|
|
37
|
+
"session create (--workspace <workspace-id> | --project <project-id>) [--command-id <id>] [--role <worker|orchestrator>] [--connection <connection-id> [--harness <executor-id>] [--model <id>] | --harness <executor-id> | --agent <agent-id> | --agent-definition <key> --agent-definition-version <version> --agent-definition-digest <sha256>] [--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>]",
|
|
22
38
|
0,
|
|
23
39
|
"session.create",
|
|
24
40
|
"Create a Session, optionally starting it with a first message.",
|
|
25
41
|
{
|
|
26
|
-
example: "maia --json session create --
|
|
42
|
+
example: "maia --json session create --harness codex-cli --text 'Fix the build' --command-id create-1",
|
|
27
43
|
route: ["--project", "--workspace"],
|
|
28
44
|
run: [session, "runSessionCreate"],
|
|
29
45
|
},
|
|
30
46
|
],
|
|
31
47
|
[
|
|
32
|
-
"session list (--project <project-id> | --all) [--state <state>[,<state>...]] [--label <key=value>...] [--attention] [--settled [--idle-for <duration>]] [--limit <1..100>] [--after <cursor>]",
|
|
48
|
+
"session list (--project <project-id> | --all | --all-nodes) [--state <state>[,<state>...]] [--label <key=value>...] [--parent <session-id>] [--attention] [--settled [--idle-for <duration>]] [--limit <1..100>] [--after <cursor>]",
|
|
33
49
|
0,
|
|
34
50
|
"session.list",
|
|
35
51
|
"List Sessions of a Project, or all of them.",
|
|
36
52
|
{
|
|
37
|
-
example: "maia --json session list --all --attention",
|
|
53
|
+
example: "maia --json session list --all-nodes --attention",
|
|
38
54
|
route: "--project",
|
|
39
55
|
run: [session, "runSessionList"],
|
|
40
56
|
},
|
|
@@ -61,6 +77,131 @@ export const SESSION_TREE = {
|
|
|
61
77
|
run: [session, "runSessionWait"],
|
|
62
78
|
},
|
|
63
79
|
],
|
|
80
|
+
[
|
|
81
|
+
"session fork (<session-id> [--turn <turn-id>] [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
82
|
+
1,
|
|
83
|
+
["session.fork.preview", "session.fork.confirm"],
|
|
84
|
+
"Fork a Session at a turn into a new Session after a preview.",
|
|
85
|
+
{
|
|
86
|
+
example: "maia --json session fork session_1 --dry-run",
|
|
87
|
+
kind: "two-phase",
|
|
88
|
+
route: "<session-id>",
|
|
89
|
+
run: [fork, "runSessionFork"],
|
|
90
|
+
},
|
|
91
|
+
],
|
|
92
|
+
[
|
|
93
|
+
"session setup apply (<session-id> [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
94
|
+
1,
|
|
95
|
+
["session.setup.preview", "session.setup.confirm"],
|
|
96
|
+
"Approve the Project's setup script for a Session's worktree.",
|
|
97
|
+
{
|
|
98
|
+
example: "maia --json session setup apply session_1 --dry-run",
|
|
99
|
+
kind: "two-phase",
|
|
100
|
+
route: "<session-id>",
|
|
101
|
+
run: [setup, "runSessionSetupApply"],
|
|
102
|
+
},
|
|
103
|
+
],
|
|
104
|
+
[
|
|
105
|
+
"session command list --session <session-id>",
|
|
106
|
+
1,
|
|
107
|
+
"session.command.list",
|
|
108
|
+
"List the native commands a Session's executor declares, by class.",
|
|
109
|
+
{
|
|
110
|
+
example: "maia --json session command list --session session_1",
|
|
111
|
+
route: "--session",
|
|
112
|
+
run: [command, "runSessionCommandList"],
|
|
113
|
+
},
|
|
114
|
+
],
|
|
115
|
+
[
|
|
116
|
+
"session command send (<session-id> <command> [--expected-revision <revision>] [--arguments <text>] [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
117
|
+
1,
|
|
118
|
+
["session.command.preview", "session.command.confirm"],
|
|
119
|
+
"Send a declared native command to a Session after a preview.",
|
|
120
|
+
{
|
|
121
|
+
example: "maia --json session command send session_1 compact --dry-run",
|
|
122
|
+
kind: "two-phase",
|
|
123
|
+
route: "<session-id>",
|
|
124
|
+
run: [command, "runSessionCommandSend"],
|
|
125
|
+
},
|
|
126
|
+
],
|
|
127
|
+
[
|
|
128
|
+
"session placement show --harness <executor-id>",
|
|
129
|
+
1,
|
|
130
|
+
"session.placement.show",
|
|
131
|
+
"Show each Node's placement for an executor; you pick the Node.",
|
|
132
|
+
{
|
|
133
|
+
example: "maia --json session placement show --harness codex-cli",
|
|
134
|
+
run: [session, "runSessionPlacementShow"],
|
|
135
|
+
},
|
|
136
|
+
],
|
|
137
|
+
[
|
|
138
|
+
"session switch (<session-id> [--harness <executor-id>] [--connection <connection-id>] [--model <id>] [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
139
|
+
1,
|
|
140
|
+
["session.switch.preview", "session.switch.confirm"],
|
|
141
|
+
"Switch a Session to another executor, account or model after a preview.",
|
|
142
|
+
{
|
|
143
|
+
example: "maia --json session switch session_1 --connection connection_2 --dry-run",
|
|
144
|
+
kind: "two-phase",
|
|
145
|
+
route: "<session-id>",
|
|
146
|
+
run: [switchSession, "runSessionSwitch"],
|
|
147
|
+
},
|
|
148
|
+
],
|
|
149
|
+
[
|
|
150
|
+
"session spawn (<session-id> --harness <executor-id> --workspace <workspace-id> [--to-node <name>] [--host-authority [--permission <mode>]] [--command-id <id>] [--dry-run | --yes] | --confirm-stdin [--to-node <name>])",
|
|
151
|
+
1,
|
|
152
|
+
["session.spawn.preview", "session.spawn.confirm"],
|
|
153
|
+
"Spawn a child Session on any Node and executor after a preview.",
|
|
154
|
+
{
|
|
155
|
+
example: "maia --json session spawn session_1 --harness codex-cli --workspace workspace_2 --to-node worker-2 --dry-run",
|
|
156
|
+
kind: "two-phase",
|
|
157
|
+
route: "<session-id>",
|
|
158
|
+
run: [session, "runSessionSpawn"],
|
|
159
|
+
},
|
|
160
|
+
],
|
|
161
|
+
[
|
|
162
|
+
"session reconcile <session-id>",
|
|
163
|
+
1,
|
|
164
|
+
"session.spawn.record",
|
|
165
|
+
"Stop what still runs below an ended Session and reconcile its orphans.",
|
|
166
|
+
{
|
|
167
|
+
example: "maia --json session reconcile session_1",
|
|
168
|
+
route: "<session-id>",
|
|
169
|
+
run: [session, "runSessionReconcile"],
|
|
170
|
+
},
|
|
171
|
+
],
|
|
172
|
+
[
|
|
173
|
+
"session spawn-caps show",
|
|
174
|
+
1,
|
|
175
|
+
"session.spawn-caps.show",
|
|
176
|
+
"Show the depth, fan-out and concurrency caps of spawned children.",
|
|
177
|
+
{
|
|
178
|
+
example: "maia --json session spawn-caps show --node worker-2",
|
|
179
|
+
run: [spawn, "runSessionSpawnCapsShow"],
|
|
180
|
+
},
|
|
181
|
+
],
|
|
182
|
+
[
|
|
183
|
+
"session spawn-caps set (--max-depth <1..8> --max-fan-out <1..64> --max-concurrency <1..64> --expected-revision <revision> [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
184
|
+
1,
|
|
185
|
+
["session.spawn-caps.preview", "session.spawn-caps.confirm"],
|
|
186
|
+
"Change the spawn caps of a Node after a preview.",
|
|
187
|
+
{
|
|
188
|
+
example: "maia --json session spawn-caps set --max-depth 4 --max-fan-out 8 --max-concurrency 4 --expected-revision 0 --dry-run",
|
|
189
|
+
kind: "two-phase",
|
|
190
|
+
run: [spawn, "runSessionSpawnCapsSet"],
|
|
191
|
+
},
|
|
192
|
+
],
|
|
193
|
+
[
|
|
194
|
+
"session pause (<session-id> [--expected-revision <revision>] [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
195
|
+
1,
|
|
196
|
+
["session.pause.preview", "session.pause.confirm"],
|
|
197
|
+
"Pause a Session's goal and its agents after a preview.",
|
|
198
|
+
{
|
|
199
|
+
example: "maia --json session pause session_1 --dry-run",
|
|
200
|
+
kind: "two-phase",
|
|
201
|
+
route: "<session-id>",
|
|
202
|
+
run: [goal, "runSessionPause"],
|
|
203
|
+
},
|
|
204
|
+
],
|
|
64
205
|
[
|
|
65
206
|
"session rename <session-id> --title <text> --expected-revision <revision> [--command-id <id>]",
|
|
66
207
|
1,
|
|
@@ -73,21 +214,21 @@ export const SESSION_TREE = {
|
|
|
73
214
|
},
|
|
74
215
|
],
|
|
75
216
|
[
|
|
76
|
-
"session start <session-id> --expected-revision <revision> [--command-id <id>] [--wait [--timeout <duration>]]",
|
|
217
|
+
"session start <session-id> [--expected-revision <revision>] [--command-id <id>] [--wait [--timeout <duration>]]",
|
|
77
218
|
1,
|
|
78
219
|
"session.start",
|
|
79
220
|
"Start a Session; --wait returns once it runs.",
|
|
80
221
|
{
|
|
81
|
-
example: "maia --json session start session_1 --
|
|
222
|
+
example: "maia --json session start session_1 --wait",
|
|
82
223
|
route: "<session-id>",
|
|
83
224
|
run: [session, "runSessionStart"],
|
|
84
225
|
},
|
|
85
226
|
],
|
|
86
227
|
[
|
|
87
|
-
"session stop <session-id> --expected-revision <revision> [--command-id <id>]",
|
|
228
|
+
"session stop <session-id> --expected-revision <revision> [--command-id <id>] [--children]",
|
|
88
229
|
1,
|
|
89
230
|
"session.stop",
|
|
90
|
-
"Stop a Session.",
|
|
231
|
+
"Stop a Session; --children also stops every Session below it.",
|
|
91
232
|
{
|
|
92
233
|
example: "maia --json session stop session_1 --expected-revision 2 --command-id stop-1",
|
|
93
234
|
route: "<session-id>",
|
|
@@ -112,6 +253,18 @@ export const SESSION_TREE = {
|
|
|
112
253
|
run: [session, "runSessionArchive"],
|
|
113
254
|
},
|
|
114
255
|
],
|
|
256
|
+
[
|
|
257
|
+
"session move <session-id> --to-node <name> [--project <id> | --workspace <id>] [--expected-revision <revision>] [--summary <text> | --summary-stdin] [--no-start] [--command-id <id>] [--dry-run | --confirm-stdin | --yes]",
|
|
258
|
+
1,
|
|
259
|
+
"session.archive",
|
|
260
|
+
"Start a Session on another Node from a summary, not history or code.",
|
|
261
|
+
{
|
|
262
|
+
example: "maia session move session_1 --to-node worker-2 --project project_2 --dry-run",
|
|
263
|
+
kind: "composite",
|
|
264
|
+
route: "<session-id>",
|
|
265
|
+
run: [move, "runSessionMove"],
|
|
266
|
+
},
|
|
267
|
+
],
|
|
115
268
|
[
|
|
116
269
|
"session diff <session-id> [--stat]",
|
|
117
270
|
1,
|
|
@@ -123,6 +276,17 @@ export const SESSION_TREE = {
|
|
|
123
276
|
run: [session, "runSessionDiff"],
|
|
124
277
|
},
|
|
125
278
|
],
|
|
279
|
+
[
|
|
280
|
+
"session git status <session-id>",
|
|
281
|
+
1,
|
|
282
|
+
"session.git.status",
|
|
283
|
+
"Show a coding Session's branch, changes and commits ahead and behind.",
|
|
284
|
+
{
|
|
285
|
+
example: "maia --json session git status session_1",
|
|
286
|
+
route: "<session-id>",
|
|
287
|
+
run: [session, "runSessionGitStatus"],
|
|
288
|
+
},
|
|
289
|
+
],
|
|
126
290
|
[
|
|
127
291
|
"session observe [<session-id>...] [--stall-after <duration>]",
|
|
128
292
|
0,
|
|
@@ -134,14 +298,27 @@ export const SESSION_TREE = {
|
|
|
134
298
|
},
|
|
135
299
|
],
|
|
136
300
|
[
|
|
137
|
-
"session attach <session-id> [--after <epoch>:<sequence>] [--no-follow]",
|
|
301
|
+
"session attach (<session-id> [--after <epoch>:<sequence>] [--no-follow] | --runtime <executor-id> --external-id <id> [--cwd <dir>] [--workspace <workspace-id>] [--attest-ended] [--host-authority [--permission <mode>]] [--role <worker|orchestrator>] [--label <key=value>...] [--title <title>] [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
138
302
|
1,
|
|
139
|
-
"session.attach",
|
|
140
|
-
"Follow
|
|
303
|
+
["session.attach", "session.adopt.preview", "session.adopt.confirm"],
|
|
304
|
+
"Follow a Session's items, or attach a native session in place.",
|
|
141
305
|
{
|
|
142
306
|
example: "maia session attach session_1",
|
|
307
|
+
kind: "composite",
|
|
143
308
|
route: "<session-id>",
|
|
144
|
-
run: [
|
|
309
|
+
run: [attach, "runSessionAttach"],
|
|
310
|
+
},
|
|
311
|
+
],
|
|
312
|
+
[
|
|
313
|
+
"session detach (<session-id> [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
314
|
+
1,
|
|
315
|
+
["session.detach.preview", "session.detach.confirm"],
|
|
316
|
+
"Release a Session's claim on its native session after a preview.",
|
|
317
|
+
{
|
|
318
|
+
example: "maia --json session detach session_1 --dry-run",
|
|
319
|
+
kind: "two-phase",
|
|
320
|
+
route: "<session-id>",
|
|
321
|
+
run: [discovery, "runSessionDetach"],
|
|
145
322
|
},
|
|
146
323
|
],
|
|
147
324
|
[
|
|
@@ -162,7 +339,7 @@ export const SESSION_TREE = {
|
|
|
162
339
|
},
|
|
163
340
|
],
|
|
164
341
|
[
|
|
165
|
-
"session adopt (<claude|codex>:<native-id> --workspace <workspace-id> [--attest-ended] [--host-authority [--permission <mode>]] [--role <worker|orchestrator>] [--label <key=value>...] [--title <title>] [--command-id <id>] [--dry-run] | --confirm-stdin)",
|
|
342
|
+
"session adopt (<claude|codex>:<native-id> --workspace <workspace-id> [--attest-ended] [--host-authority [--permission <mode>]] [--role <worker|orchestrator>] [--label <key=value>...] [--title <title>] [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
166
343
|
1,
|
|
167
344
|
["session.adopt.preview", "session.adopt.confirm"],
|
|
168
345
|
"Adopt a Claude or Codex session after a preview.",
|
|
@@ -173,7 +350,7 @@ export const SESSION_TREE = {
|
|
|
173
350
|
},
|
|
174
351
|
],
|
|
175
352
|
[
|
|
176
|
-
"session import (--from <file> [--dry-run] | --confirm-stdin)",
|
|
353
|
+
"session import (--from <file> [--dry-run | --yes] | --confirm-stdin)",
|
|
177
354
|
1,
|
|
178
355
|
["session.adopt.preview", "session.adopt.confirm"],
|
|
179
356
|
"Adopt the sessions a file lists after one preview.",
|
|
@@ -184,7 +361,7 @@ export const SESSION_TREE = {
|
|
|
184
361
|
},
|
|
185
362
|
],
|
|
186
363
|
[
|
|
187
|
-
"session agent-permission set (--input-stdin --dry-run | --confirm-stdin)",
|
|
364
|
+
"session agent-permission set (--input-stdin (--dry-run | --yes) | --confirm-stdin)",
|
|
188
365
|
1,
|
|
189
366
|
["session.agent-permission.preview", "session.agent-permission.confirm"],
|
|
190
367
|
"Grant or change an agent permission after a preview.",
|
|
@@ -212,16 +389,27 @@ export const SESSION_TREE = {
|
|
|
212
389
|
{ run: [session, "runSessionInboxAck"] },
|
|
213
390
|
],
|
|
214
391
|
[
|
|
215
|
-
"session turn send --session <session-id> --prompt-stdin --expected-revision <revision> [--wait] [--command-id <id>]",
|
|
392
|
+
"session turn send --session <session-id> --prompt-stdin [--expected-revision <revision>] [--attach <path>...] [--wait] [--command-id <id>]",
|
|
216
393
|
1,
|
|
217
394
|
"turn.send",
|
|
218
|
-
"Send a turn from stdin; it queues. --
|
|
395
|
+
"Send a turn from stdin; it queues. --attach adds images. --wait waits.",
|
|
219
396
|
{
|
|
220
|
-
example: "printf %s 'Explain
|
|
397
|
+
example: "printf %s 'Explain this chart' | maia --json session turn send --session session_1 --prompt-stdin --attach chart.png",
|
|
221
398
|
route: "--session",
|
|
222
399
|
run: [turn, "runTurnSend"],
|
|
223
400
|
},
|
|
224
401
|
],
|
|
402
|
+
[
|
|
403
|
+
"session turn check <session-id>",
|
|
404
|
+
1,
|
|
405
|
+
"turn.attachment.policy",
|
|
406
|
+
"Check what a send may attach: executor support, size cap and types.",
|
|
407
|
+
{
|
|
408
|
+
example: "maia --json session turn check session_1",
|
|
409
|
+
route: "<session-id>",
|
|
410
|
+
run: [turn, "runTurnAttachments"],
|
|
411
|
+
},
|
|
412
|
+
],
|
|
225
413
|
[
|
|
226
414
|
"session turn queue <session-id>",
|
|
227
415
|
1,
|
|
@@ -277,6 +465,18 @@ export const SESSION_TREE = {
|
|
|
277
465
|
run: [turn, "runTurnInterrupt"],
|
|
278
466
|
},
|
|
279
467
|
],
|
|
468
|
+
[
|
|
469
|
+
"session turn steer (<turn-id> --expected-session-revision <revision> --prompt-stdin [--command-id <id>] [--dry-run | --yes] | --confirm-stdin)",
|
|
470
|
+
1,
|
|
471
|
+
["turn.steer.preview", "turn.steer.confirm"],
|
|
472
|
+
"Replace a running turn with the stdin prompt after a preview.",
|
|
473
|
+
{
|
|
474
|
+
example: "printf %s 'Use the other API' | maia --json session turn steer turn_1 --expected-session-revision 4 --prompt-stdin --dry-run",
|
|
475
|
+
kind: "two-phase",
|
|
476
|
+
route: "<turn-id>",
|
|
477
|
+
run: [turn, "runTurnSteer"],
|
|
478
|
+
},
|
|
479
|
+
],
|
|
280
480
|
[
|
|
281
481
|
"session approval list [--session <session-id>] [--all] [--limit <1..50>]",
|
|
282
482
|
1,
|
|
@@ -329,6 +529,68 @@ export const SESSION_TREE = {
|
|
|
329
529
|
run: [approval, "runApprovalAnswer"],
|
|
330
530
|
},
|
|
331
531
|
],
|
|
532
|
+
[
|
|
533
|
+
"inbox list [--state <open|snoozed|settled>] [--limit <1..50>]",
|
|
534
|
+
1,
|
|
535
|
+
"inbox.list",
|
|
536
|
+
"List what waits for you on every Node.",
|
|
537
|
+
{ example: "maia --json inbox list", run: [approval, "runInboxList"] },
|
|
538
|
+
],
|
|
539
|
+
[
|
|
540
|
+
"inbox show <inbox-id>",
|
|
541
|
+
1,
|
|
542
|
+
"inbox.show",
|
|
543
|
+
"Show one inbox item and the request it holds.",
|
|
544
|
+
{ route: "<inbox-id>", run: [approval, "runInboxShow"] },
|
|
545
|
+
],
|
|
546
|
+
[
|
|
547
|
+
"inbox approve <inbox-id> [--for-session] [--command-id <id>]",
|
|
548
|
+
1,
|
|
549
|
+
"inbox.respond",
|
|
550
|
+
"Approve the request an inbox item holds.",
|
|
551
|
+
{
|
|
552
|
+
example: "maia inbox approve inbox_1 --command-id approve-1",
|
|
553
|
+
kind: "discriminant",
|
|
554
|
+
route: "<inbox-id>",
|
|
555
|
+
run: [approval, "runInboxApprove"],
|
|
556
|
+
},
|
|
557
|
+
],
|
|
558
|
+
[
|
|
559
|
+
"inbox deny <inbox-id> [--reason <text>] [--command-id <id>]",
|
|
560
|
+
1,
|
|
561
|
+
"inbox.respond",
|
|
562
|
+
"Deny the request an inbox item holds.",
|
|
563
|
+
{
|
|
564
|
+
kind: "discriminant",
|
|
565
|
+
route: "<inbox-id>",
|
|
566
|
+
run: [approval, "runInboxDeny"],
|
|
567
|
+
},
|
|
568
|
+
],
|
|
569
|
+
[
|
|
570
|
+
"inbox answer <inbox-id> (--text <answer> | --option <option-id>) [--command-id <id>]",
|
|
571
|
+
1,
|
|
572
|
+
"inbox.respond",
|
|
573
|
+
"Answer the question an inbox item holds.",
|
|
574
|
+
{
|
|
575
|
+
kind: "discriminant",
|
|
576
|
+
route: "<inbox-id>",
|
|
577
|
+
run: [approval, "runInboxAnswer"],
|
|
578
|
+
},
|
|
579
|
+
],
|
|
580
|
+
[
|
|
581
|
+
"inbox settle <inbox-id> [--expected-revision <revision>] [--command-id <id>]",
|
|
582
|
+
1,
|
|
583
|
+
"inbox.settle",
|
|
584
|
+
"Settle a result you have read; it leaves the open list.",
|
|
585
|
+
{ route: "<inbox-id>", run: [approval, "runInboxSettle"] },
|
|
586
|
+
],
|
|
587
|
+
[
|
|
588
|
+
"inbox snooze <inbox-id> --until <timestamp> [--expected-revision <revision>] [--command-id <id>]",
|
|
589
|
+
1,
|
|
590
|
+
"inbox.snooze",
|
|
591
|
+
"Hide an item until a time; it reads open again then.",
|
|
592
|
+
{ route: "<inbox-id>", run: [approval, "runInboxSnooze"] },
|
|
593
|
+
],
|
|
332
594
|
[
|
|
333
595
|
"session answer <session-id> <answer> --prompt <approval-id> [--as-coordinator] [--command-id <id>]",
|
|
334
596
|
1,
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { basename } from "node:path";
|
|
2
|
+
import * as NodeFileSystem from "@effect/platform-node-shared/NodeFileSystem";
|
|
3
|
+
import { detectTurnAttachmentMediaType, MAX_TURN_ATTACHMENTS, turnAttachmentRefusal, turnAttachmentSizeRefusal, } from "@maiaos/sdk";
|
|
4
|
+
import * as Effect from "effect/Effect";
|
|
5
|
+
import * as FileSystem from "effect/FileSystem";
|
|
6
|
+
const unreadable = (path) => `Attachment "${basename(path)}" must name a readable file.`;
|
|
7
|
+
const sizeOf = (fs, path) => fs.stat(path).pipe(Effect.filterOrFail((info) => info.type === "File", () => unreadable(path)), Effect.map((info) => Number(info.size)), Effect.mapError(() => unreadable(path)));
|
|
8
|
+
const readFile = (fs, path) => fs.readFile(path).pipe(Effect.map((bytes) => ({
|
|
9
|
+
bytes,
|
|
10
|
+
mediaType: detectTurnAttachmentMediaType(bytes) ?? "application/octet-stream",
|
|
11
|
+
name: basename(path),
|
|
12
|
+
})), Effect.mapError(() => unreadable(path)));
|
|
13
|
+
const unadmitted = (paths, policy) => {
|
|
14
|
+
if (!policy.accepted)
|
|
15
|
+
return "This Session's executor takes no attachments.";
|
|
16
|
+
return paths.length > MAX_TURN_ATTACHMENTS
|
|
17
|
+
? `A turn takes at most ${String(MAX_TURN_ATTACHMENTS)} attachments; ${String(paths.length)} were named.`
|
|
18
|
+
: undefined;
|
|
19
|
+
};
|
|
20
|
+
const load = (paths, policy) => Effect.gen(function* () {
|
|
21
|
+
const early = unadmitted(paths, policy);
|
|
22
|
+
if (early !== undefined)
|
|
23
|
+
return yield* Effect.fail(early);
|
|
24
|
+
const fs = yield* FileSystem.FileSystem;
|
|
25
|
+
const sizes = yield* Effect.forEach(paths, (path) => sizeOf(fs, path));
|
|
26
|
+
const oversize = turnAttachmentSizeRefusal(policy, sizes.map((byteLength) => ({ byteLength })));
|
|
27
|
+
if (oversize !== undefined)
|
|
28
|
+
return yield* Effect.fail(oversize);
|
|
29
|
+
const files = yield* Effect.forEach(paths, (path) => readFile(fs, path));
|
|
30
|
+
const refusal = turnAttachmentRefusal(policy, files.map(({ bytes, mediaType, name }) => ({
|
|
31
|
+
byteLength: bytes.byteLength,
|
|
32
|
+
mediaType,
|
|
33
|
+
name,
|
|
34
|
+
})));
|
|
35
|
+
if (refusal !== undefined)
|
|
36
|
+
return yield* Effect.fail(refusal);
|
|
37
|
+
return files.map(({ bytes, mediaType, name }) => ({
|
|
38
|
+
data: Buffer.from(bytes).toString("base64"),
|
|
39
|
+
mediaType,
|
|
40
|
+
name,
|
|
41
|
+
}));
|
|
42
|
+
});
|
|
43
|
+
export const readTurnAttachments = (paths, policy) => load(paths, policy).pipe(Effect.map((value) => ({
|
|
44
|
+
ok: true,
|
|
45
|
+
value,
|
|
46
|
+
})), Effect.catch((error) => Effect.succeed({
|
|
47
|
+
error: {
|
|
48
|
+
code: "turn_attachment_refused",
|
|
49
|
+
message: error,
|
|
50
|
+
retryable: false,
|
|
51
|
+
},
|
|
52
|
+
ok: false,
|
|
53
|
+
})), Effect.provide(NodeFileSystem.layer));
|
|
54
|
+
//# sourceMappingURL=attachments.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { TurnCancelResult, TurnInterruptResult, TurnQueueListResult, TurnSendResult, TurnShowResult, TurnWaitParameters, TurnWaitResult } from "@maiaos/sdk";
|
|
1
|
+
import type { TurnAttachmentPolicyResult, TurnAttachmentUpload, TurnCancelResult, TurnInterruptResult, TurnQueueListResult, TurnSendResult, TurnShowResult, TurnWaitParameters, TurnWaitResult } from "@maiaos/sdk";
|
|
2
2
|
import { type CliNodeEffect, type CliNodeOperations } from "../../local-node/index.js";
|
|
3
3
|
export type InterruptTurnInput = {
|
|
4
4
|
readonly commandId?: string;
|
|
@@ -7,6 +7,7 @@ export type InterruptTurnInput = {
|
|
|
7
7
|
};
|
|
8
8
|
export type CancelTurnInput = InterruptTurnInput;
|
|
9
9
|
export type SendTurnInput = {
|
|
10
|
+
readonly attachments?: readonly TurnAttachmentUpload[];
|
|
10
11
|
readonly commandId?: string;
|
|
11
12
|
readonly expectedRevision: string;
|
|
12
13
|
readonly prompt: string;
|
|
@@ -23,6 +24,7 @@ export declare const makeTurnClient: (node: CliNodeOperations) => {
|
|
|
23
24
|
listTurnQueue: (sessionId: string) => CliNodeEffect<TurnQueueListResult>;
|
|
24
25
|
sendTurn: (input: SendTurnInput) => CliNodeEffect<TurnSendResult>;
|
|
25
26
|
showTurn: (turnId: string) => CliNodeEffect<TurnShowResult>;
|
|
27
|
+
showTurnAttachmentPolicy: (sessionId: string) => CliNodeEffect<TurnAttachmentPolicyResult>;
|
|
26
28
|
waitTurns: (input: WaitTurnsInput) => CliNodeEffect<TurnWaitResult>;
|
|
27
29
|
};
|
|
28
30
|
//# sourceMappingURL=client.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { MAX_TURN_WAIT_MILLISECONDS, turnCancelParametersSchema, turnInterruptParametersSchema, turnQueueListParametersSchema, turnSendParametersSchema, turnShowParametersSchema, turnWaitParametersSchema, } from "@maiaos/sdk";
|
|
1
|
+
import { MAX_TURN_WAIT_MILLISECONDS, turnAttachmentPolicyParametersSchema, turnCancelParametersSchema, turnInterruptParametersSchema, turnQueueListParametersSchema, turnSendParametersSchema, turnShowParametersSchema, turnWaitParametersSchema, } from "@maiaos/sdk";
|
|
2
2
|
import { Effect } from "effect";
|
|
3
3
|
import { commandIdentifier, repeatBoundedWait, } from "../../local-node/index.js";
|
|
4
4
|
export const makeTurnClient = (node) => {
|
|
@@ -24,9 +24,13 @@ export const makeTurnClient = (node) => {
|
|
|
24
24
|
expectedRevision: input.expectedRevision,
|
|
25
25
|
input: { text: input.prompt, type: "text" },
|
|
26
26
|
sessionId: input.sessionId,
|
|
27
|
+
...(input.attachments === undefined
|
|
28
|
+
? {}
|
|
29
|
+
: { attachments: input.attachments }),
|
|
27
30
|
}, turnSendParametersSchema, (client, parameters, options) => client.sendTurn(parameters, options), { commandId });
|
|
28
31
|
});
|
|
29
32
|
};
|
|
33
|
+
const showTurnAttachmentPolicy = (sessionId) => node.runValidatedNodeOperation({ sessionId }, turnAttachmentPolicyParametersSchema, (client, parameters, options) => client.showTurnAttachmentPolicy(parameters, options));
|
|
30
34
|
const showTurn = (turnId) => node.runValidatedNodeOperation({ turnId }, turnShowParametersSchema, (client, parameters, options) => client.showTurn(parameters, options));
|
|
31
35
|
const waitTurnsOnce = (parameters) => node.runValidatedNodeOperation(parameters, turnWaitParametersSchema, (client, validated, options) => client.waitTurns(validated, options));
|
|
32
36
|
const waitWithin = (input) => repeatBoundedWait({
|
|
@@ -45,6 +49,7 @@ export const makeTurnClient = (node) => {
|
|
|
45
49
|
listTurnQueue,
|
|
46
50
|
sendTurn,
|
|
47
51
|
showTurn,
|
|
52
|
+
showTurnAttachmentPolicy,
|
|
48
53
|
waitTurns: waitWithin,
|
|
49
54
|
};
|
|
50
55
|
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
import
|
|
1
|
+
import * as Effect from "effect/Effect";
|
|
2
|
+
import { CliArgumentError, type CommandContext, type CommandEffect } from "../../command-line/index.js";
|
|
3
|
+
export declare const readTurnPrompt: (context: CommandContext) => Effect.Effect<string, CliArgumentError, never>;
|
|
2
4
|
export declare const runTurnSend: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
3
5
|
export declare const runTurnInterrupt: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
4
6
|
export declare const runTurnCancel: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
5
7
|
export declare const runTurnQueue: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
8
|
+
export declare const runTurnAttachments: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
6
9
|
export declare const runTurnShow: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
7
10
|
export declare const runTurnWait: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
11
|
+
export declare const runTurnSteer: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
8
12
|
//# sourceMappingURL=commands.d.ts.map
|