@maiaos/cli 0.1.0-canary.8 → 0.1.0-canary.9
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 +19 -19
- package/dist/bin/maia.mjs +1 -1
- package/dist/local-node/client.d.ts +1 -0
- package/dist/local-node/client.js +1 -0
- package/dist/local-node/index.d.ts +1 -1
- package/dist/local-node/index.js +1 -1
- package/dist/mcp/calls.js +2 -1
- package/dist/session/approval/commands.js +7 -3
- package/package.json +4 -4
|
@@ -22,6 +22,7 @@ export declare const newCliIdentifier: (prefix: "command" | "request") => Effect
|
|
|
22
22
|
export declare const commandIdentifier: (commandId: string | undefined) => Effect.Effect<string, never, Crypto.Crypto>;
|
|
23
23
|
export declare const fillCommandIdentifier: (input: unknown) => Effect.Effect<unknown, never, Crypto.Crypto>;
|
|
24
24
|
export declare const connectLocalNode: CliNodeConnector;
|
|
25
|
+
export declare const holdsSessionCredential: Effect.Effect<boolean>;
|
|
25
26
|
export declare const outcomeCanBeAmbiguous: (error: unknown) => boolean;
|
|
26
27
|
export declare const invalidNodeInput: <TValue>(schemaError?: unknown) => Effect.Effect<CliNodeResult<TValue>>;
|
|
27
28
|
export type ParameterSchema<TParameters> = {
|
|
@@ -70,6 +70,7 @@ const sessionAttachmentDenied = () => new CliLocalNodeError({
|
|
|
70
70
|
retryable: false,
|
|
71
71
|
},
|
|
72
72
|
});
|
|
73
|
+
export const holdsSessionCredential = Effect.map(Config.option(Config.String(SESSION_CREDENTIAL_VARIABLE)), Option.isSome).pipe(Effect.orElseSucceed(() => false));
|
|
73
74
|
const sessionLaunch = Effect.gen(function* () {
|
|
74
75
|
const credential = yield* Config.option(Config.String(SESSION_CREDENTIAL_VARIABLE));
|
|
75
76
|
const origin = yield* Config.option(Config.String(SESSION_NODE_ORIGIN_VARIABLE));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { type CliNodeCall, makeCallClient } from "./call.js";
|
|
2
|
-
export { type CliMutationRecovery, type CliNodeBinding, type CliNodeConnection, type CliNodeConnector, type CliNodeEffect, type CliNodeOperations, type CliNodeOperationsOptions, type CliNodeResult, commandIdentifier, connectLocalNode, discoveryOptionsFor, fillCommandIdentifier, invalidNodeInput, makeCliNodeOperations, newCliIdentifier, outcomeCanBeAmbiguous, type ParameterSchema, retryBriefSaturation, runLazyNodeDependency, } from "./client.js";
|
|
2
|
+
export { type CliMutationRecovery, type CliNodeBinding, type CliNodeConnection, type CliNodeConnector, type CliNodeEffect, type CliNodeOperations, type CliNodeOperationsOptions, type CliNodeResult, commandIdentifier, connectLocalNode, discoveryOptionsFor, fillCommandIdentifier, holdsSessionCredential, invalidNodeInput, makeCliNodeOperations, newCliIdentifier, outcomeCanBeAmbiguous, type ParameterSchema, retryBriefSaturation, runLazyNodeDependency, } from "./client.js";
|
|
3
3
|
export { repeatBoundedWait } from "./wait.js";
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/local-node/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export { makeCallClient } from "./call.js";
|
|
2
|
-
export { commandIdentifier, connectLocalNode, discoveryOptionsFor, fillCommandIdentifier, invalidNodeInput, makeCliNodeOperations, newCliIdentifier, outcomeCanBeAmbiguous, retryBriefSaturation, runLazyNodeDependency, } from "./client.js";
|
|
2
|
+
export { commandIdentifier, connectLocalNode, discoveryOptionsFor, fillCommandIdentifier, holdsSessionCredential, invalidNodeInput, makeCliNodeOperations, newCliIdentifier, outcomeCanBeAmbiguous, retryBriefSaturation, runLazyNodeDependency, } from "./client.js";
|
|
3
3
|
export { repeatBoundedWait } from "./wait.js";
|
|
4
4
|
//# sourceMappingURL=index.js.map
|
package/dist/mcp/calls.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { agentsListParametersSchema, agentsShowParametersSchema, approvalListParametersSchema, approvalShowParametersSchema, connectionDetectParametersSchema, connectionListParametersSchema, connectionModelsListParametersSchema, connectionShowParametersSchema, connectionUsageShowParametersSchema, containerIndexListParametersSchema, COORDINATOR_TOOL_OPERATIONS, discoverySessionsListParametersSchema, invocationContextShowParametersSchema, LOCAL_NODE_CALL_METHODS, localNodeRequestPayloadSchema, portLeaseAcquireParametersSchema, portLeaseListParametersSchema, portLeaseReleaseParametersSchema, portLeaseRenewParametersSchema, projectGuardShowParametersSchema, projectListParametersSchema, projectShowParametersSchema, receiptGetParametersSchema, routineListParametersSchema, routineShowParametersSchema, runLedgerCreateParametersSchema, runLedgerListParametersSchema, runLedgerTaskDispatchParametersSchema, runLedgerTaskListParametersSchema, runLedgerTaskSettleParametersSchema, runLedgerTaskShowParametersSchema, sessionArchiveParametersSchema, sessionCreateParametersSchema, sessionDiffParametersSchema, sessionEventsListParametersSchema, sessionHistoryReadParametersSchema, sessionInboxAckParametersSchema, sessionInboxCheckParametersSchema, sessionListParametersSchema, sessionMessageSendParametersSchema, sessionObserveParametersSchema, sessionResumeParametersSchema, sessionShowParametersSchema, sessionStartParametersSchema, sessionStopParametersSchema, turnCancelParametersSchema, turnInterruptParametersSchema, turnQueueListParametersSchema, turnSendParametersSchema, turnShowParametersSchema, turnWaitParametersSchema, workerToolDefinitions, workspaceListParametersSchema, workspaceShowParametersSchema, } from "@maiaos/sdk";
|
|
1
|
+
import { agentsListParametersSchema, agentsShowParametersSchema, approvalListParametersSchema, approvalRespondParametersSchema, approvalShowParametersSchema, connectionDetectParametersSchema, connectionListParametersSchema, connectionModelsListParametersSchema, connectionShowParametersSchema, connectionUsageShowParametersSchema, containerIndexListParametersSchema, COORDINATOR_TOOL_OPERATIONS, discoverySessionsListParametersSchema, invocationContextShowParametersSchema, LOCAL_NODE_CALL_METHODS, localNodeRequestPayloadSchema, portLeaseAcquireParametersSchema, portLeaseListParametersSchema, portLeaseReleaseParametersSchema, portLeaseRenewParametersSchema, projectGuardShowParametersSchema, projectListParametersSchema, projectShowParametersSchema, receiptGetParametersSchema, routineListParametersSchema, routineShowParametersSchema, runLedgerCreateParametersSchema, runLedgerListParametersSchema, runLedgerTaskDispatchParametersSchema, runLedgerTaskListParametersSchema, runLedgerTaskSettleParametersSchema, runLedgerTaskShowParametersSchema, sessionArchiveParametersSchema, sessionCreateParametersSchema, sessionDiffParametersSchema, sessionEventsListParametersSchema, sessionHistoryReadParametersSchema, sessionInboxAckParametersSchema, sessionInboxCheckParametersSchema, sessionListParametersSchema, sessionMessageSendParametersSchema, sessionObserveParametersSchema, sessionResumeParametersSchema, sessionShowParametersSchema, sessionStartParametersSchema, sessionStopParametersSchema, turnCancelParametersSchema, turnInterruptParametersSchema, turnQueueListParametersSchema, turnSendParametersSchema, turnShowParametersSchema, turnWaitParametersSchema, workerToolDefinitions, workspaceListParametersSchema, workspaceShowParametersSchema, } from "@maiaos/sdk";
|
|
2
2
|
import { Effect, Predicate } from "effect";
|
|
3
3
|
import { invalidNodeInput, } from "../local-node/index.js";
|
|
4
4
|
const recoveryOf = (input) => Predicate.hasProperty(input, "commandId") &&
|
|
@@ -222,6 +222,7 @@ export const callCoordinator = (node) => (operation, input) => {
|
|
|
222
222
|
export const WORKER_CALLS = (() => {
|
|
223
223
|
const available = new Map(COORDINATOR_CALLS);
|
|
224
224
|
available.set("context.show", validated(invocationContextShowParametersSchema, (client, parameters, options) => client.showCurrentContext(parameters, options)));
|
|
225
|
+
available.set("approval.respond", validated(approvalRespondParametersSchema, (client, parameters, options) => client.respondToApproval(parameters, options)));
|
|
225
226
|
available.set("session.inbox.ack", validated(sessionInboxAckParametersSchema, (client, parameters, options) => client.acknowledgeSessionDelivery(parameters, options)));
|
|
226
227
|
available.set("session.inbox.check", validated(sessionInboxCheckParametersSchema, (client, parameters, options) => client.checkSessionInbox(parameters, options)));
|
|
227
228
|
available.set("session.message.send", validated(sessionMessageSendParametersSchema, (client, parameters, options) => client.sendSessionMessage(parameters, options)));
|
|
@@ -2,7 +2,7 @@ import * as Effect from "effect/Effect";
|
|
|
2
2
|
import { listEach, writeMerged } from "../../address-space/index.js";
|
|
3
3
|
import { CliArgumentError, parseOptions, reportError, requirePositionals, writeNodeResult, } from "../../command-line/index.js";
|
|
4
4
|
import { mergeLists } from "../../fleet/index.js";
|
|
5
|
-
import { commandIdentifier, } from "../../local-node/index.js";
|
|
5
|
+
import { commandIdentifier, holdsSessionCredential, } from "../../local-node/index.js";
|
|
6
6
|
import { describeApproval, formatApprovalResult, formatMergedApprovals, } from "./output/index.js";
|
|
7
7
|
const missing = (name) => Effect.die(new Error(`Missing approval client: ${name}.`));
|
|
8
8
|
const write = (context) => (result) => writeNodeResult(result, context, {
|
|
@@ -124,8 +124,12 @@ const decide = (context, input) => {
|
|
|
124
124
|
}));
|
|
125
125
|
});
|
|
126
126
|
};
|
|
127
|
-
const runDecision = (verb, tokens, context) => {
|
|
128
|
-
|
|
127
|
+
const runDecision = (verb, tokens, context) => Effect.gen(function* () {
|
|
128
|
+
if (verb !== "answer" || !(yield* holdsSessionCredential))
|
|
129
|
+
requirePerson(context, verb);
|
|
130
|
+
return yield* parseDecision(verb, tokens, context);
|
|
131
|
+
});
|
|
132
|
+
const parseDecision = (verb, tokens, context) => {
|
|
129
133
|
const parsed = parseOptions(tokens, OPTIONS[verb], verb === "approve" ? new Set(["--for-session"]) : new Set());
|
|
130
134
|
requirePositionals(parsed.positionals, 1);
|
|
131
135
|
const commandId = parsed.options.get("--command-id");
|
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.9",
|
|
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",
|
|
@@ -64,9 +64,9 @@
|
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@earendil-works/pi-tui": "1.0.0",
|
|
66
66
|
"@effect/platform-node-shared": "4.0.0",
|
|
67
|
-
"@maiaos/agent": "0.1.0-canary.
|
|
68
|
-
"@maiaos/client-core": "0.1.0-canary.
|
|
69
|
-
"@maiaos/sdk": "0.1.0-canary.
|
|
67
|
+
"@maiaos/agent": "0.1.0-canary.9",
|
|
68
|
+
"@maiaos/client-core": "0.1.0-canary.9",
|
|
69
|
+
"@maiaos/sdk": "0.1.0-canary.9",
|
|
70
70
|
"effect": "4.0.0"
|
|
71
71
|
},
|
|
72
72
|
"scripts": {
|