@maiaos/cli 0.1.0-canary.56 → 0.1.0-canary.58
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/cli/cli.js +10 -0
- package/dist/command-line/context.d.ts +2 -1
- package/dist/command-line/index.d.ts +2 -2
- package/dist/command-line/index.js +1 -1
- package/dist/command-line/input/index.d.ts +1 -1
- 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-tree/tree.d.ts +1 -1
- package/dist/command-tree/tree.js +3 -0
- package/dist/session/agent-permission.d.ts +2 -2
- package/dist/session/client.d.ts +2 -2
- 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/package.json +4 -4
package/dist/cli/cli.js
CHANGED
|
@@ -223,6 +223,7 @@ const loadRemoteNode = () => import("../remote-node/index.js");
|
|
|
223
223
|
const loadRunLedger = () => import("../run-ledger/index.js");
|
|
224
224
|
const loadProjectGuard = () => import("../project-guard/index.js");
|
|
225
225
|
const loadAgents = () => import("../agents/index.js");
|
|
226
|
+
const loadWebhooks = () => import("../webhooks/index.js");
|
|
226
227
|
const loadLocalNode = () => import("../local-node/index.js");
|
|
227
228
|
const loadBootstrap = () => import("../team-workspace/index.js");
|
|
228
229
|
const lazyDependencies = (load, makeClient, binding) => Object.fromEntries(binding.names.map((name) => [
|
|
@@ -502,6 +503,15 @@ const makeDefaultCliDependencies = (binding) => ({
|
|
|
502
503
|
"showAgent",
|
|
503
504
|
],
|
|
504
505
|
}),
|
|
506
|
+
...lazyDependencies(loadWebhooks, (module, node) => module.makeWebhooksClient(node), {
|
|
507
|
+
...binding,
|
|
508
|
+
names: [
|
|
509
|
+
"confirmWebhookChange",
|
|
510
|
+
"listWebhookDeliveries",
|
|
511
|
+
"listWebhooks",
|
|
512
|
+
"previewWebhookChange",
|
|
513
|
+
],
|
|
514
|
+
}),
|
|
505
515
|
...lazyDependencies(loadRemoteNode, (module, node) => module.makeRemoteNodeClient(node), {
|
|
506
516
|
...binding,
|
|
507
517
|
names: [
|
|
@@ -25,12 +25,13 @@ import type { InteractionCliDependencies } from "../session/interaction/index.js
|
|
|
25
25
|
import type { CancelTurnInput, InterruptTurnInput, SendTurnInput, WaitTurnsInput } from "../session/turn/index.js";
|
|
26
26
|
import type { BootstrapCliDependencies } from "../team-workspace/index.js";
|
|
27
27
|
import type { CreateTerminalInput, makeTerminalClient } from "../terminal/index.js";
|
|
28
|
+
import type { WebhooksCliDependencies } from "../webhooks/index.js";
|
|
28
29
|
import type { CliIo, CliResolution } from "./emit/index.js";
|
|
29
30
|
import type { CliArgumentError } from "./input/index.js";
|
|
30
31
|
type OrchestrationClient = ReturnType<typeof makeOrchestrationClient>;
|
|
31
32
|
type SessionClient = ReturnType<typeof makeSessionClient>;
|
|
32
33
|
type TerminalClient = ReturnType<typeof makeTerminalClient>;
|
|
33
|
-
export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDependencies & BootstrapCliDependencies & ConnectionCliDependencies & ContainerCliDependencies & HoldCliDependencies & DiscoveryCliDependencies & IntegrationCliDependencies & PresentationCliDependencies & McpCliDependencies & InteractionCliDependencies & PortLeaseCliDependencies & ProjectGuardCliDependencies & ProjectMetadataCliDependencies & RemoteNodeCliDependencies & RoutineCliDependencies & RunLedgerCliDependencies> & {
|
|
34
|
+
export type CliDependencies = Partial<AgentsCliDependencies & ApprovalCliDependencies & BootstrapCliDependencies & ConnectionCliDependencies & ContainerCliDependencies & HoldCliDependencies & DiscoveryCliDependencies & IntegrationCliDependencies & PresentationCliDependencies & McpCliDependencies & InteractionCliDependencies & PortLeaseCliDependencies & ProjectGuardCliDependencies & ProjectMetadataCliDependencies & RemoteNodeCliDependencies & RoutineCliDependencies & RunLedgerCliDependencies & WebhooksCliDependencies> & {
|
|
34
35
|
readonly acknowledgeAttachedSessionDelivery?: (input: Parameters<SessionClient["acknowledgeAttachedSessionDelivery"]>[0]) => CliNodeEffect<SessionInboxAckResult>;
|
|
35
36
|
readonly acknowledgeRunDelivery: (input: Parameters<OrchestrationClient["acknowledgeRunDelivery"]>[0]) => CliNodeEffect<OrchestrationInboxAckResult>;
|
|
36
37
|
readonly acquireTerminalController: (input: Parameters<TerminalClient["acquireTerminalController"]>[0]) => CliNodeEffect<LiveTerminalControllerAcquireResult>;
|
|
@@ -2,6 +2,6 @@ export { type CliDependencies, type CliServices, type CommandContext, type Comma
|
|
|
2
2
|
export { decodeJsonText, jsonLine } from "./emit/index.js";
|
|
3
3
|
export { type CliCommandOutput, type CliErrorOutput, type CliIo, type CliResolution, type CliSuccessOutput, type CliSuccessResult, exitCodeOf, type NodeResultPresenter, reportError, writeNodeResult, writeSuccess, } from "./emit/index.js";
|
|
4
4
|
export { block, cell, type CliTable, fields, formatRows, labelCells, tab, withNextPage, withPrunedHistory, } from "./emit/index.js";
|
|
5
|
-
export { argumentsAreBounded, type ArgumentToken, CliArgumentError, LABEL_OPTION, missingArgument, parseArguments, type ParsedArguments, type ParsedOptions, parseOptions, parseOptionsWith, readBoundedStdin, readCursor, readDuration, readExpectedRevision, readGlobalValue, readLabels, readPageSize, readPermission, readRevisionOption, readSessionRole, readSessionTitle, readWaitTimeoutSeconds, recoverStdin, requireNoArguments, requireOneLabelPerOption, requirePositionals, tokenizeArguments, unknownCommand, } from "./input/index.js";
|
|
6
|
-
export { askToConfirm, canPrompt, confirmationOf, confirmParameters, EXIT_CANCELLED, peekStdin, promptOrRefuse, readInputMode, readPipedPreview, readTwoPhaseMode, requestedTwoPhaseMode, runInputTwoPhase, runTwoPhase, TWO_PHASE_FLAGS, type TwoPhaseMode, } from "./two-phase.js";
|
|
5
|
+
export { argumentsAreBounded, type ArgumentToken, CliArgumentError, LABEL_OPTION, missingArgument, type OptionSpec, parseArguments, type ParsedArguments, type ParsedOptions, parseOptions, parseOptionsWith, readBoundedStdin, readCursor, readDuration, readExpectedRevision, readGlobalValue, readLabels, readPageSize, readPermission, readRevisionOption, readSessionRole, readSessionTitle, readWaitTimeoutSeconds, recoverStdin, requireNoArguments, requireOneLabelPerOption, requirePositionals, tokenizeArguments, unknownCommand, } from "./input/index.js";
|
|
6
|
+
export { askToConfirm, canPrompt, confirmationOf, confirmParameters, EXIT_CANCELLED, peekStdin, promptOrRefuse, readInputMode, readPipedPreview, readTwoPhaseMode, requestedTwoPhaseMode, runInputTwoPhase, runTwoPhase, TWO_PHASE_FLAGS, type TwoPhaseMode, } from "./two-phase/index.js";
|
|
7
7
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -3,5 +3,5 @@ export { decodeJsonText, jsonLine } from "./emit/index.js";
|
|
|
3
3
|
export { exitCodeOf, reportError, writeNodeResult, writeSuccess, } from "./emit/index.js";
|
|
4
4
|
export { block, cell, fields, formatRows, labelCells, tab, withNextPage, withPrunedHistory, } from "./emit/index.js";
|
|
5
5
|
export { argumentsAreBounded, CliArgumentError, LABEL_OPTION, missingArgument, parseArguments, parseOptions, parseOptionsWith, readBoundedStdin, readCursor, readDuration, readExpectedRevision, readGlobalValue, readLabels, readPageSize, readPermission, readRevisionOption, readSessionRole, readSessionTitle, readWaitTimeoutSeconds, recoverStdin, requireNoArguments, requireOneLabelPerOption, requirePositionals, tokenizeArguments, unknownCommand, } from "./input/index.js";
|
|
6
|
-
export { askToConfirm, canPrompt, confirmationOf, confirmParameters, EXIT_CANCELLED, peekStdin, promptOrRefuse, readInputMode, readPipedPreview, readTwoPhaseMode, requestedTwoPhaseMode, runInputTwoPhase, runTwoPhase, TWO_PHASE_FLAGS, } from "./two-phase.js";
|
|
6
|
+
export { askToConfirm, canPrompt, confirmationOf, confirmParameters, EXIT_CANCELLED, peekStdin, promptOrRefuse, readInputMode, readPipedPreview, readTwoPhaseMode, requestedTwoPhaseMode, runInputTwoPhase, runTwoPhase, TWO_PHASE_FLAGS, } from "./two-phase/index.js";
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { argumentsAreBounded, type ArgumentToken, CliArgumentError, missingArgument, parseArguments, type ParsedArguments, type ParsedOptions, parseOptions, parseOptionsWith, readCursor, readDuration, readExpectedRevision, readGlobalValue, readPageSize, readPermission, readRevisionOption, readWaitTimeoutSeconds, requireNoArguments, requirePositionals, tokenizeArguments, unknownCommand, } from "./arguments.js";
|
|
1
|
+
export { argumentsAreBounded, type ArgumentToken, CliArgumentError, missingArgument, type OptionSpec, parseArguments, type ParsedArguments, type ParsedOptions, parseOptions, parseOptionsWith, readCursor, readDuration, readExpectedRevision, readGlobalValue, readPageSize, readPermission, readRevisionOption, readWaitTimeoutSeconds, requireNoArguments, requirePositionals, tokenizeArguments, unknownCommand, } from "./arguments.js";
|
|
2
2
|
export { LABEL_OPTION, readLabels, readSessionRole, readSessionTitle, requireOneLabelPerOption, } from "./manager-options.js";
|
|
3
3
|
export { promptLine, type PromptOptions, terminalIsInteractive, } from "./prompt.js";
|
|
4
4
|
export { type BoundedStdinRequest, readBoundedStdin, recoverStdin, replayStdin, } from "./stdin.js";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { askToConfirm, canPrompt, confirmationOf, confirmParameters, EXIT_CANCELLED, peekStdin, promptOrRefuse, readInputMode, readPipedPreview, readTwoPhaseMode, requestedTwoPhaseMode, runInputTwoPhase, runTwoPhase, TWO_PHASE_FLAGS, type TwoPhaseMode, } from "./two-phase.js";
|
|
2
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
export { askToConfirm, canPrompt, confirmationOf, confirmParameters, EXIT_CANCELLED, peekStdin, promptOrRefuse, readInputMode, readPipedPreview, readTwoPhaseMode, requestedTwoPhaseMode, runInputTwoPhase, runTwoPhase, TWO_PHASE_FLAGS, } from "./two-phase.js";
|
|
2
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
|
-
import type { CliNodeResult } from "
|
|
3
|
-
import type
|
|
4
|
-
import { CliArgumentError } from "
|
|
2
|
+
import type { CliNodeResult } from "../../local-node/index.js";
|
|
3
|
+
import { type OutputContext } from "../emit/index.js";
|
|
4
|
+
import { CliArgumentError } from "../input/index.js";
|
|
5
5
|
export type TwoPhaseMode = "confirm-stdin" | "dry-run" | "prompt" | "yes";
|
|
6
6
|
export declare const TWO_PHASE_FLAGS: readonly string[];
|
|
7
|
-
export declare const canPrompt: (context:
|
|
7
|
+
export declare const canPrompt: (context: OutputContext) => boolean;
|
|
8
8
|
export declare const requestedTwoPhaseMode: (flags: ReadonlySet<string>, offersYes?: boolean) => Exclude<TwoPhaseMode, "prompt"> | undefined;
|
|
9
|
-
export declare const promptOrRefuse: (context:
|
|
10
|
-
export declare const readTwoPhaseMode: (flags: ReadonlySet<string>, context:
|
|
11
|
-
export declare const readPipedPreview: (context:
|
|
12
|
-
export declare const peekStdin: (context:
|
|
13
|
-
readonly context:
|
|
9
|
+
export declare const promptOrRefuse: (context: OutputContext, offersYes?: boolean) => "prompt";
|
|
10
|
+
export declare const readTwoPhaseMode: (flags: ReadonlySet<string>, context: OutputContext, offersYes?: boolean) => TwoPhaseMode;
|
|
11
|
+
export declare const readPipedPreview: (context: OutputContext) => Effect.Effect<object, CliArgumentError>;
|
|
12
|
+
export declare const peekStdin: <TContext extends OutputContext>(context: TContext) => Effect.Effect<{
|
|
13
|
+
readonly context: TContext;
|
|
14
14
|
readonly input: unknown;
|
|
15
15
|
}>;
|
|
16
16
|
export declare const confirmParameters: <TParameters>(schema: {
|
|
@@ -22,11 +22,11 @@ export declare const confirmParameters: <TParameters>(schema: {
|
|
|
22
22
|
};
|
|
23
23
|
}, preview: object, previewOnly?: readonly string[]) => Effect.Effect<TParameters, CliArgumentError>;
|
|
24
24
|
export declare const confirmationOf: (preview: object, previewOnly?: readonly string[]) => Record<string, unknown>;
|
|
25
|
-
export declare const askToConfirm: (context:
|
|
25
|
+
export declare const askToConfirm: (context: OutputContext, question: string) => Effect.Effect<boolean>;
|
|
26
26
|
export declare const EXIT_CANCELLED = 1;
|
|
27
27
|
export type TwoPhaseSpec<TPreview extends object, TConfirm, TRequirements> = {
|
|
28
28
|
readonly confirm: (preview: object) => Effect.Effect<CliNodeResult<TConfirm>, CliArgumentError, TRequirements>;
|
|
29
|
-
readonly context:
|
|
29
|
+
readonly context: OutputContext;
|
|
30
30
|
readonly mode: TwoPhaseMode;
|
|
31
31
|
readonly preview: () => Effect.Effect<CliNodeResult<TPreview>, CliArgumentError, TRequirements>;
|
|
32
32
|
readonly prompt?: {
|
|
@@ -48,7 +48,7 @@ type SafeParser<TValue> = {
|
|
|
48
48
|
export type InputTwoPhaseSpec<TPreviewParameters, TPreview extends object, TConfirmParameters, TConfirm, TRequirements> = {
|
|
49
49
|
readonly confirm?: (parameters: TConfirmParameters) => Effect.Effect<CliNodeResult<TConfirm>, never, TRequirements>;
|
|
50
50
|
readonly confirmSchema: SafeParser<TConfirmParameters>;
|
|
51
|
-
readonly context:
|
|
51
|
+
readonly context: OutputContext;
|
|
52
52
|
readonly label: string;
|
|
53
53
|
readonly preview?: (parameters: TPreviewParameters) => Effect.Effect<CliNodeResult<TPreview>, never, TRequirements>;
|
|
54
54
|
readonly previewOnly?: readonly string[];
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import * as Cause from "effect/Cause";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Exit from "effect/Exit";
|
|
4
|
-
import { decodeJsonText } from "
|
|
5
|
-
import { CliArgumentError, parseOptions, recoverStdin, replayStdin, requirePositionals, } from "
|
|
4
|
+
import { decodeJsonText } from "../emit/index.js";
|
|
5
|
+
import { CliArgumentError, parseOptions, recoverStdin, replayStdin, requirePositionals, } from "../input/index.js";
|
|
6
6
|
export const TWO_PHASE_FLAGS = [
|
|
7
7
|
"--confirm-stdin",
|
|
8
8
|
"--dry-run",
|
|
@@ -20,7 +20,7 @@ export type TreeNode = {
|
|
|
20
20
|
readonly summary: string;
|
|
21
21
|
};
|
|
22
22
|
export declare const TREE_FRAGMENTS: readonly TreeFragment[];
|
|
23
|
-
export declare const TREE_SECTIONS: readonly [readonly ["Start and sign in", readonly ["setup", "login", "status"]], readonly ["Work", readonly ["session", "run", "routine", "import"]], readonly ["Resources", readonly ["project", "workspace", "container", "terminal", "execution", "port", "reference", "agents"]], readonly ["Accounts and Nodes", readonly ["connection", "integration", "provider", "node"]], readonly ["Safety and audit", readonly ["hold", "receipt", "events", "context"]], readonly ["Clients and local", readonly ["presentation", "mcp", "dashboard", "agent", "help", "version", "doctor", "completion"]]];
|
|
23
|
+
export declare const TREE_SECTIONS: readonly [readonly ["Start and sign in", readonly ["setup", "login", "status"]], readonly ["Work", readonly ["session", "run", "routine", "import"]], readonly ["Resources", readonly ["project", "workspace", "container", "terminal", "execution", "port", "reference", "agents", "webhooks"]], readonly ["Accounts and Nodes", readonly ["connection", "integration", "provider", "node"]], readonly ["Safety and audit", readonly ["hold", "receipt", "events", "context"]], readonly ["Clients and local", readonly ["presentation", "mcp", "dashboard", "agent", "help", "version", "doctor", "completion"]]];
|
|
24
24
|
export declare const usagePath: (usage: string) => readonly string[];
|
|
25
25
|
export declare const COMMAND_TREE: TreeNode;
|
|
26
26
|
export declare const commandTree: () => TreeNode;
|
|
@@ -11,6 +11,7 @@ import { NODE_TREE } from "../remote-node/tree/index.js";
|
|
|
11
11
|
import { ROUTINE_TREE } from "../routine/tree/index.js";
|
|
12
12
|
import { SESSION_TREE } from "../session/tree/index.js";
|
|
13
13
|
import { TERMINAL_TREE } from "../terminal/tree/index.js";
|
|
14
|
+
import { WEBHOOKS_TREE } from "../webhooks/tree/index.js";
|
|
14
15
|
import { LOCAL_TREE } from "./local.js";
|
|
15
16
|
export const TREE_FRAGMENTS = [
|
|
16
17
|
NODE_TREE,
|
|
@@ -25,6 +26,7 @@ export const TREE_FRAGMENTS = [
|
|
|
25
26
|
EXECUTION_TREE,
|
|
26
27
|
SAFETY_TREE,
|
|
27
28
|
AGENTS_TREE,
|
|
29
|
+
WEBHOOKS_TREE,
|
|
28
30
|
LOCAL_TREE,
|
|
29
31
|
];
|
|
30
32
|
export const TREE_SECTIONS = [
|
|
@@ -41,6 +43,7 @@ export const TREE_SECTIONS = [
|
|
|
41
43
|
"port",
|
|
42
44
|
"reference",
|
|
43
45
|
"agents",
|
|
46
|
+
"webhooks",
|
|
44
47
|
],
|
|
45
48
|
],
|
|
46
49
|
["Accounts and Nodes", ["connection", "integration", "provider", "node"]],
|
|
@@ -18,7 +18,7 @@ export declare const makeAgentPermissionCliClient: (node: CliNodeOperations) =>
|
|
|
18
18
|
readonly commandId: string;
|
|
19
19
|
readonly grantedAt: string;
|
|
20
20
|
readonly inputDigest: string;
|
|
21
|
-
readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
|
|
21
|
+
readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "webhooks.change.confirm" | "webhooks.change.preview" | "webhooks.deliveries" | "webhooks.list" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
|
|
22
22
|
readonly revision: "1";
|
|
23
23
|
};
|
|
24
24
|
readonly method: "session.agent-permission.confirm";
|
|
@@ -55,7 +55,7 @@ export declare const makeAgentPermissionCliClient: (node: CliNodeOperations) =>
|
|
|
55
55
|
readonly inputDigest: string;
|
|
56
56
|
readonly issuedAt: string;
|
|
57
57
|
readonly method: "session.agent-permission.preview";
|
|
58
|
-
readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
|
|
58
|
+
readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "webhooks.change.confirm" | "webhooks.change.preview" | "webhooks.deliveries" | "webhooks.list" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
|
|
59
59
|
readonly proof: string;
|
|
60
60
|
}>;
|
|
61
61
|
};
|
package/dist/session/client.d.ts
CHANGED
|
@@ -69,7 +69,7 @@ export declare const makeSessionClient: (node: CliNodeOperations) => {
|
|
|
69
69
|
readonly commandId: string;
|
|
70
70
|
readonly grantedAt: string;
|
|
71
71
|
readonly inputDigest: string;
|
|
72
|
-
readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
|
|
72
|
+
readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "webhooks.change.confirm" | "webhooks.change.preview" | "webhooks.deliveries" | "webhooks.list" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
|
|
73
73
|
readonly revision: "1";
|
|
74
74
|
};
|
|
75
75
|
readonly method: "session.agent-permission.confirm";
|
|
@@ -106,7 +106,7 @@ export declare const makeSessionClient: (node: CliNodeOperations) => {
|
|
|
106
106
|
readonly inputDigest: string;
|
|
107
107
|
readonly issuedAt: string;
|
|
108
108
|
readonly method: "session.agent-permission.preview";
|
|
109
|
-
readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
|
|
109
|
+
readonly operationIds: readonly ("agents.change.confirm" | "agents.change.preview" | "agents.detect" | "agents.list" | "agents.show" | "approval.list" | "approval.respond" | "approval.show" | "connection.capacity.set" | "connection.create" | "connection.detect" | "connection.gateway.create" | "connection.grant.list" | "connection.grant.set.confirm" | "connection.grant.set.preview" | "connection.list" | "connection.login.start" | "connection.models.list" | "connection.pool.list" | "connection.pool.set.confirm" | "connection.pool.set.preview" | "connection.show" | "connection.state.set" | "connection.system.confirm" | "connection.system.preview" | "connection.upkeep.confirm" | "connection.upkeep.preview" | "connection.upkeep.refresh" | "connection.usage.show" | "container.create.confirm" | "container.create.preview" | "container.index.list" | "container.list" | "container.rename.confirm" | "container.rename.preview" | "container.show" | "context.show" | "discovery.sessions.list" | "events.read" | "execution.catalog.get" | "execution.checkpoint.create" | "execution.checkpoint.show" | "execution.command.run" | "execution.file.read" | "execution.placement.create" | "execution.placement.show" | "execution.relocation.apply" | "execution.relocation.plan" | "execution.relocation.reconcile" | "execution.relocation.show" | "execution.worktree.create" | "execution.worktree.import" | "execution.worktree.reconcile" | "execution.worktree.remove.apply" | "execution.worktree.remove.plan" | "execution.worktree.status" | "harness.installed.list" | "hold.list" | "hold.place.confirm" | "hold.place.preview" | "hold.release.confirm" | "hold.release.preview" | "integration.apply.claude-code" | "integration.apply.codex" | "integration.apply.pi-rpc" | "integration.plan.claude-code" | "integration.plan.codex" | "integration.plan.pi-rpc" | "integration.remove.claude-code" | "integration.remove.codex" | "integration.remove.pi-rpc" | "integration.status.claude-code" | "integration.status.codex" | "integration.status.pi-rpc" | "interaction.cancel" | "interaction.create" | "interaction.list" | "interaction.respond" | "interaction.show" | "monitor.bootstrap.create" | "node.remote.install.confirm" | "node.remote.install.preview" | "node.remote.list" | "node.remote.register.confirm" | "node.remote.register.preview" | "node.remote.remove.confirm" | "node.remote.remove.preview" | "node.shutdown" | "node.status" | "port.lease.acquire" | "port.lease.list" | "port.lease.release" | "port.lease.renew" | "presentation.catalog.show" | "presentation.project-list.show" | "presentation.session-list.show" | "presentation.workspace-directory.show" | "project.context.list" | "project.context.record" | "project.context.show" | "project.create.confirm" | "project.create.preview" | "project.guard.confirm" | "project.guard.preview" | "project.guard.show" | "project.list" | "project.register" | "project.rename.confirm" | "project.rename.preview" | "project.show" | "provider.pool.list" | "receipt.get" | "receipt.list" | "reference.resolve" | "routine.create.confirm" | "routine.create.preview" | "routine.disable.confirm" | "routine.disable.preview" | "routine.list" | "routine.pause" | "routine.resume" | "routine.run.confirm" | "routine.run.preview" | "routine.show" | "run.create" | "run.dispatch.settle-terminal" | "run.dispatch.show" | "run.inbox.ack" | "run.inbox.check" | "run.ledger.create" | "run.ledger.list" | "run.ledger.task.dispatch" | "run.ledger.task.list" | "run.ledger.task.settle" | "run.ledger.task.show" | "run.list" | "run.question.cancel" | "run.question.open" | "run.question.reply" | "run.show" | "run.task.list" | "run.task.show" | "runtime.probe" | "session.adopt.confirm" | "session.adopt.preview" | "session.agent-permission.confirm" | "session.agent-permission.preview" | "session.archive" | "session.create" | "session.diff" | "session.events.list" | "session.history.read" | "session.inbox.ack" | "session.inbox.check" | "session.list" | "session.message.send" | "session.observe" | "session.rename" | "session.resume" | "session.show" | "session.spawn" | "session.start" | "session.stop" | "session.wait" | "team-workspace.bootstrap.apply" | "team-workspace.bootstrap.preview" | "terminal.controller.acquire" | "terminal.controller.release" | "terminal.controller.renew" | "terminal.controller.request" | "terminal.controller.request.show" | "terminal.create" | "terminal.events.list" | "terminal.input.write" | "terminal.list" | "terminal.mutation.reconcile" | "terminal.observer.attach" | "terminal.observer.check" | "terminal.observer.detach" | "terminal.observer.resync" | "terminal.read" | "terminal.session.close" | "terminal.session.delete" | "terminal.session.resize" | "terminal.session.restart" | "terminal.session.signal" | "terminal.show" | "turn.cancel" | "turn.interrupt" | "turn.queue.list" | "turn.send" | "turn.show" | "turn.wait" | "voice.managed-turn.confirm" | "voice.managed-turn.preview" | "voice.orchestrator.context.show" | "voice.orchestrator.tool.call" | "voice.pi.relay" | "voice.pi.relay.preview" | "voice.pi.relay.reconcile" | "webhooks.change.confirm" | "webhooks.change.preview" | "webhooks.deliveries" | "webhooks.list" | "workspace.context.show" | "workspace.execution.configure" | "workspace.execution.show" | "workspace.list" | "workspace.membership.attach" | "workspace.repository.attach" | "workspace.select" | "workspace.show")[];
|
|
110
110
|
readonly proof: string;
|
|
111
111
|
}>;
|
|
112
112
|
attachSession: (input: import("./attach-client.js").AttachSessionInput) => CliNodeEffect<import("./attach-client.js").SessionAttachStream>;
|
|
@@ -0,0 +1,156 @@
|
|
|
1
|
+
import { type WebhooksChangeConfirmParameters, type WebhooksChangePreviewParameters, type WebhooksDeliveriesParameters, type WebhooksListParameters } from "@maiaos/sdk";
|
|
2
|
+
import type { CliNodeOperations } from "../local-node/index.js";
|
|
3
|
+
export declare const makeWebhooksClient: (node: CliNodeOperations) => {
|
|
4
|
+
confirmWebhookChange: (input: WebhooksChangeConfirmParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
5
|
+
readonly actorId: string;
|
|
6
|
+
readonly commandId: string;
|
|
7
|
+
readonly delivery: "duplicate" | "new";
|
|
8
|
+
readonly deliveryId?: string | undefined;
|
|
9
|
+
readonly inputDigest: string;
|
|
10
|
+
readonly kind: "add" | "redeliver" | "remove" | "test";
|
|
11
|
+
readonly method: "webhooks.change.confirm";
|
|
12
|
+
readonly receipt: {
|
|
13
|
+
readonly actorId: string;
|
|
14
|
+
readonly aggregateRevision: string;
|
|
15
|
+
readonly commandId: string;
|
|
16
|
+
readonly createdAt: string;
|
|
17
|
+
readonly eventCursor: string;
|
|
18
|
+
readonly method: string;
|
|
19
|
+
readonly receiptId: string;
|
|
20
|
+
readonly schemaVersion: 1;
|
|
21
|
+
readonly state: "succeeded";
|
|
22
|
+
readonly target: {
|
|
23
|
+
readonly id: string;
|
|
24
|
+
readonly type: string;
|
|
25
|
+
};
|
|
26
|
+
readonly updatedAt: string;
|
|
27
|
+
};
|
|
28
|
+
readonly webhook: {
|
|
29
|
+
readonly actorId: string;
|
|
30
|
+
readonly createdAt: string;
|
|
31
|
+
readonly droppedParked: number;
|
|
32
|
+
readonly gapOldest?: string | undefined;
|
|
33
|
+
readonly gapResets: number;
|
|
34
|
+
readonly id: string;
|
|
35
|
+
readonly lastErrorClass?: string | undefined;
|
|
36
|
+
readonly revision: string;
|
|
37
|
+
readonly schemaVersion: "maia.webhook/v1";
|
|
38
|
+
readonly spec: {
|
|
39
|
+
readonly allowPrivate: boolean;
|
|
40
|
+
readonly events: readonly ("admission.refused" | "node.started" | "node.stopping" | "session.adopted" | "session.blocked" | "session.ended" | "session.idle" | "session.runtime.failed" | "session.started" | "session.turn.completed" | "session.turn.failed" | "session.working" | "update.done" | "webhook.test")[];
|
|
41
|
+
readonly filters: readonly {
|
|
42
|
+
readonly key: string;
|
|
43
|
+
readonly value: string;
|
|
44
|
+
}[];
|
|
45
|
+
readonly secretEnv: string;
|
|
46
|
+
readonly url: string;
|
|
47
|
+
};
|
|
48
|
+
readonly state: "active" | "removed";
|
|
49
|
+
readonly updatedAt: string;
|
|
50
|
+
};
|
|
51
|
+
}>;
|
|
52
|
+
listWebhookDeliveries: (input: WebhooksDeliveriesParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
53
|
+
readonly items: readonly {
|
|
54
|
+
readonly attempts: number;
|
|
55
|
+
readonly createdAt: string;
|
|
56
|
+
readonly errorClass?: string | undefined;
|
|
57
|
+
readonly eventId: string;
|
|
58
|
+
readonly id: string;
|
|
59
|
+
readonly kind: "admission.refused" | "node.started" | "node.stopping" | "session.adopted" | "session.blocked" | "session.ended" | "session.idle" | "session.runtime.failed" | "session.started" | "session.turn.completed" | "session.turn.failed" | "session.working" | "update.done" | "webhook.test";
|
|
60
|
+
readonly nextAttemptAt?: string | undefined;
|
|
61
|
+
readonly state: "dead" | "delivered" | "denied" | "expired" | "in_flight" | "pending" | "retry";
|
|
62
|
+
readonly updatedAt: string;
|
|
63
|
+
readonly webhookId: string;
|
|
64
|
+
}[];
|
|
65
|
+
readonly method: "webhooks.deliveries";
|
|
66
|
+
readonly nextCursor?: string | undefined;
|
|
67
|
+
}>;
|
|
68
|
+
listWebhooks: (input: WebhooksListParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
69
|
+
readonly items: readonly {
|
|
70
|
+
readonly actorId: string;
|
|
71
|
+
readonly createdAt: string;
|
|
72
|
+
readonly droppedParked: number;
|
|
73
|
+
readonly gapOldest?: string | undefined;
|
|
74
|
+
readonly gapResets: number;
|
|
75
|
+
readonly id: string;
|
|
76
|
+
readonly lastErrorClass?: string | undefined;
|
|
77
|
+
readonly revision: string;
|
|
78
|
+
readonly schemaVersion: "maia.webhook/v1";
|
|
79
|
+
readonly spec: {
|
|
80
|
+
readonly allowPrivate: boolean;
|
|
81
|
+
readonly events: readonly ("admission.refused" | "node.started" | "node.stopping" | "session.adopted" | "session.blocked" | "session.ended" | "session.idle" | "session.runtime.failed" | "session.started" | "session.turn.completed" | "session.turn.failed" | "session.working" | "update.done" | "webhook.test")[];
|
|
82
|
+
readonly filters: readonly {
|
|
83
|
+
readonly key: string;
|
|
84
|
+
readonly value: string;
|
|
85
|
+
}[];
|
|
86
|
+
readonly secretEnv: string;
|
|
87
|
+
readonly url: string;
|
|
88
|
+
};
|
|
89
|
+
readonly state: "active" | "removed";
|
|
90
|
+
readonly updatedAt: string;
|
|
91
|
+
}[];
|
|
92
|
+
readonly method: "webhooks.list";
|
|
93
|
+
readonly nextCursor?: string | undefined;
|
|
94
|
+
}>;
|
|
95
|
+
previewWebhookChange: (input: WebhooksChangePreviewParameters) => import("../local-node/client.js").CliNodeEffect<{
|
|
96
|
+
readonly change: {
|
|
97
|
+
readonly kind: "add";
|
|
98
|
+
readonly spec: {
|
|
99
|
+
readonly allowPrivate: boolean;
|
|
100
|
+
readonly events: readonly ("admission.refused" | "node.started" | "node.stopping" | "session.adopted" | "session.blocked" | "session.ended" | "session.idle" | "session.runtime.failed" | "session.started" | "session.turn.completed" | "session.turn.failed" | "session.working" | "update.done" | "webhook.test")[];
|
|
101
|
+
readonly filters: readonly {
|
|
102
|
+
readonly key: string;
|
|
103
|
+
readonly value: string;
|
|
104
|
+
}[];
|
|
105
|
+
readonly secretEnv: string;
|
|
106
|
+
readonly url: string;
|
|
107
|
+
};
|
|
108
|
+
} | {
|
|
109
|
+
readonly expectedRevision: string;
|
|
110
|
+
readonly webhookId: string;
|
|
111
|
+
readonly kind: "remove";
|
|
112
|
+
} | {
|
|
113
|
+
readonly expectedRevision: string;
|
|
114
|
+
readonly webhookId: string;
|
|
115
|
+
readonly kind: "test";
|
|
116
|
+
} | {
|
|
117
|
+
readonly deliveryId: string;
|
|
118
|
+
readonly expectedRevision: string;
|
|
119
|
+
readonly kind: "redeliver";
|
|
120
|
+
};
|
|
121
|
+
readonly commandId: string;
|
|
122
|
+
readonly inputDigest: string;
|
|
123
|
+
readonly proof: string;
|
|
124
|
+
readonly actorId: string;
|
|
125
|
+
readonly current?: {
|
|
126
|
+
readonly actorId: string;
|
|
127
|
+
readonly createdAt: string;
|
|
128
|
+
readonly droppedParked: number;
|
|
129
|
+
readonly gapOldest?: string | undefined;
|
|
130
|
+
readonly gapResets: number;
|
|
131
|
+
readonly id: string;
|
|
132
|
+
readonly lastErrorClass?: string | undefined;
|
|
133
|
+
readonly revision: string;
|
|
134
|
+
readonly schemaVersion: "maia.webhook/v1";
|
|
135
|
+
readonly spec: {
|
|
136
|
+
readonly allowPrivate: boolean;
|
|
137
|
+
readonly events: readonly ("admission.refused" | "node.started" | "node.stopping" | "session.adopted" | "session.blocked" | "session.ended" | "session.idle" | "session.runtime.failed" | "session.started" | "session.turn.completed" | "session.turn.failed" | "session.working" | "update.done" | "webhook.test")[];
|
|
138
|
+
readonly filters: readonly {
|
|
139
|
+
readonly key: string;
|
|
140
|
+
readonly value: string;
|
|
141
|
+
}[];
|
|
142
|
+
readonly secretEnv: string;
|
|
143
|
+
readonly url: string;
|
|
144
|
+
};
|
|
145
|
+
readonly state: "active" | "removed";
|
|
146
|
+
readonly updatedAt: string;
|
|
147
|
+
} | undefined;
|
|
148
|
+
readonly deletesDeliveries?: number | undefined;
|
|
149
|
+
readonly expiresAt: string;
|
|
150
|
+
readonly issuedAt: string;
|
|
151
|
+
readonly method: "webhooks.change.preview";
|
|
152
|
+
readonly webhookId: string;
|
|
153
|
+
}>;
|
|
154
|
+
};
|
|
155
|
+
export type WebhooksCliDependencies = ReturnType<typeof makeWebhooksClient>;
|
|
156
|
+
//# sourceMappingURL=client.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { webhooksChangeConfirmParametersSchema, webhooksChangePreviewParametersSchema, webhooksDeliveriesParametersSchema, webhooksListParametersSchema, } from "@maiaos/sdk";
|
|
2
|
+
export const makeWebhooksClient = (node) => ({
|
|
3
|
+
confirmWebhookChange: (input) => node.runValidatedNodeOperation(input, webhooksChangeConfirmParametersSchema, (client, parameters, options) => client.confirmWebhookChange(parameters, options), { commandId: input.commandId }),
|
|
4
|
+
listWebhookDeliveries: (input) => node.runValidatedNodeOperation(input, webhooksDeliveriesParametersSchema, (client, parameters, options) => client.listWebhookDeliveries(parameters, options)),
|
|
5
|
+
listWebhooks: (input) => node.runValidatedNodeOperation(input, webhooksListParametersSchema, (client, parameters, options) => client.listWebhooks(parameters, options)),
|
|
6
|
+
previewWebhookChange: (input) => node.runValidatedNodeOperation(input, webhooksChangePreviewParametersSchema, (client, parameters, options) => client.previewWebhookChange(parameters, options)),
|
|
7
|
+
});
|
|
8
|
+
//# sourceMappingURL=client.js.map
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type * as Crypto from "effect/Crypto";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { type OutputContext } from "../command-line/emit/index.js";
|
|
4
|
+
import { CliArgumentError } from "../command-line/input/index.js";
|
|
5
|
+
import type { WebhooksCliDependencies } from "./client.js";
|
|
6
|
+
type CommandContext = OutputContext & {
|
|
7
|
+
readonly dependencies: WebhooksCliDependencies;
|
|
8
|
+
};
|
|
9
|
+
type CommandEffect = Effect.Effect<number, CliArgumentError, Crypto.Crypto>;
|
|
10
|
+
export declare const runWebhooksList: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
11
|
+
export declare const runWebhooksDeliveries: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
12
|
+
export declare const runWebhooksAdd: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
13
|
+
export declare const runWebhooksRemove: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
14
|
+
export declare const runWebhooksTest: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
15
|
+
export declare const runWebhooksRedeliver: (tokens: readonly string[], context: CommandContext) => CommandEffect;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=commands.d.ts.map
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
import { webhooksChangeConfirmParametersSchema, } from "@maiaos/sdk";
|
|
2
|
+
import * as Effect from "effect/Effect";
|
|
3
|
+
import { writeNodeResult, } from "../command-line/emit/index.js";
|
|
4
|
+
import { CliArgumentError, parseOptionsWith, requirePositionals, } from "../command-line/input/index.js";
|
|
5
|
+
import { confirmParameters, readTwoPhaseMode, runTwoPhase, } from "../command-line/two-phase/index.js";
|
|
6
|
+
import { readAddChange, readRedeliverChange, readRemoveChange, readTestChange, readWebhooksDeliveries, readWebhooksList, WEBHOOK_OPTIONS, } from "./input.js";
|
|
7
|
+
import { formatWebhooksResult } from "./output/index.js";
|
|
8
|
+
const write = (context) => (result) => writeNodeResult(result, context, {
|
|
9
|
+
toResult: (value) => ({ command: value.method, result: value }),
|
|
10
|
+
toText: formatWebhooksResult,
|
|
11
|
+
});
|
|
12
|
+
const unavailable = () => Effect.die(new Error("Missing webhooks client."));
|
|
13
|
+
export const runWebhooksList = (tokens, context) => Effect.gen(function* () {
|
|
14
|
+
const list = context.dependencies.listWebhooks;
|
|
15
|
+
if (list === undefined)
|
|
16
|
+
return yield* unavailable();
|
|
17
|
+
return write(context)(yield* list(readWebhooksList(tokens)));
|
|
18
|
+
});
|
|
19
|
+
export const runWebhooksDeliveries = (tokens, context) => Effect.gen(function* () {
|
|
20
|
+
const list = context.dependencies.listWebhookDeliveries;
|
|
21
|
+
if (list === undefined)
|
|
22
|
+
return yield* unavailable();
|
|
23
|
+
return write(context)(yield* list(readWebhooksDeliveries(tokens)));
|
|
24
|
+
});
|
|
25
|
+
const describe = (preview) => formatWebhooksResult({ command: preview.method, result: preview });
|
|
26
|
+
const confirmOwnKind = (kind, confirm) => (preview) => Effect.flatMap(confirmParameters(webhooksChangeConfirmParametersSchema, preview, [
|
|
27
|
+
"current",
|
|
28
|
+
"deletesDeliveries",
|
|
29
|
+
"webhookId",
|
|
30
|
+
]), (parameters) => parameters.change.kind === kind
|
|
31
|
+
? confirm(parameters)
|
|
32
|
+
: Effect.fail(new CliArgumentError(`The piped preview is a ${parameters.change.kind} change; confirm it with 'maia webhooks ${parameters.change.kind} --confirm-stdin'.`)));
|
|
33
|
+
const runChange = (tokens, context, spec) => Effect.gen(function* () {
|
|
34
|
+
const parsed = parseOptionsWith(tokens, spec.options);
|
|
35
|
+
const mode = readTwoPhaseMode(parsed.flags, context);
|
|
36
|
+
if (mode === "confirm-stdin")
|
|
37
|
+
requirePositionals(parsed.positionals, 0);
|
|
38
|
+
const { confirmWebhookChange, previewWebhookChange } = context.dependencies;
|
|
39
|
+
if (confirmWebhookChange === undefined ||
|
|
40
|
+
previewWebhookChange === undefined)
|
|
41
|
+
return yield* new CliArgumentError("Webhook changes are unavailable.");
|
|
42
|
+
return yield* runTwoPhase({
|
|
43
|
+
confirm: confirmOwnKind(spec.kind, confirmWebhookChange),
|
|
44
|
+
context,
|
|
45
|
+
mode,
|
|
46
|
+
preview: () => Effect.flatMap(spec.read(parsed), previewWebhookChange),
|
|
47
|
+
prompt: { describe, question: spec.question },
|
|
48
|
+
writeConfirm: write(context),
|
|
49
|
+
writePreview: write(context),
|
|
50
|
+
});
|
|
51
|
+
});
|
|
52
|
+
export const runWebhooksAdd = (tokens, context) => runChange(tokens, context, {
|
|
53
|
+
kind: "add",
|
|
54
|
+
options: WEBHOOK_OPTIONS.add,
|
|
55
|
+
question: "Add this webhook?",
|
|
56
|
+
read: readAddChange,
|
|
57
|
+
});
|
|
58
|
+
export const runWebhooksRemove = (tokens, context) => runChange(tokens, context, {
|
|
59
|
+
kind: "remove",
|
|
60
|
+
options: WEBHOOK_OPTIONS.remove,
|
|
61
|
+
question: "Remove this webhook and its deliveries?",
|
|
62
|
+
read: readRemoveChange,
|
|
63
|
+
});
|
|
64
|
+
export const runWebhooksTest = (tokens, context) => runChange(tokens, context, {
|
|
65
|
+
kind: "test",
|
|
66
|
+
options: WEBHOOK_OPTIONS.test,
|
|
67
|
+
question: "Send a test event to this webhook?",
|
|
68
|
+
read: readTestChange,
|
|
69
|
+
});
|
|
70
|
+
export const runWebhooksRedeliver = (tokens, context) => runChange(tokens, context, {
|
|
71
|
+
kind: "redeliver",
|
|
72
|
+
options: WEBHOOK_OPTIONS.redeliver,
|
|
73
|
+
question: "Send this delivery again?",
|
|
74
|
+
read: readRedeliverChange,
|
|
75
|
+
});
|
|
76
|
+
//# sourceMappingURL=commands.js.map
|