@multiclawcli/core 0.12.0 → 0.13.0
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/config/permissionMode.d.ts +17 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.js +2094 -2268
- package/dist/providers/catalog.d.ts +0 -2
- package/dist/types/agent.d.ts +10 -2
- package/dist/types/config.d.ts +4 -2
- package/dist/types/runtime.d.ts +3 -5
- package/package.json +1 -1
- package/dist/config/toolsPolicy.d.ts +0 -10
|
@@ -33,8 +33,6 @@ export interface ProviderSpec {
|
|
|
33
33
|
* then falls back to a prompt prefix.
|
|
34
34
|
*/
|
|
35
35
|
meta?: (task: AgentTask) => Record<string, unknown> | undefined;
|
|
36
|
-
/** Whether this provider honours a tool allowlist at all. */
|
|
37
|
-
tools: boolean;
|
|
38
36
|
/** How model selection is communicated to the agent. */
|
|
39
37
|
modelSelection: ModelSelectionMode;
|
|
40
38
|
/** Models offered by this provider. */
|
package/dist/types/agent.d.ts
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
import type { AgentOutput } from "./runtime";
|
|
2
|
-
|
|
2
|
+
/**
|
|
3
|
+
* How a runtime answers a provider's tool-permission request.
|
|
4
|
+
*
|
|
5
|
+
* `auto` approves every request, `ask` hands it to a human (and refuses when
|
|
6
|
+
* nobody is listening), `deny` refuses every request.
|
|
7
|
+
*/
|
|
8
|
+
export type PermissionMode = "auto" | "ask" | "deny";
|
|
3
9
|
export interface AgentDefinition {
|
|
4
10
|
id: string;
|
|
5
11
|
name: string;
|
|
@@ -50,7 +56,9 @@ export interface AgentDefinition {
|
|
|
50
56
|
taskTitle?: string;
|
|
51
57
|
agentScope?: string;
|
|
52
58
|
agentPlan?: string;
|
|
53
|
-
|
|
59
|
+
permissions?: {
|
|
60
|
+
mode: PermissionMode;
|
|
61
|
+
};
|
|
54
62
|
dependsOn?: string[];
|
|
55
63
|
timeout?: number;
|
|
56
64
|
retries?: number;
|
package/dist/types/config.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { AgentDefinition,
|
|
1
|
+
import type { AgentDefinition, PermissionMode } from "./agent";
|
|
2
2
|
import type { LeaderMessage } from "./leader";
|
|
3
3
|
import type { RuntimePermissionHandler, RuntimeQuestionHandler } from "./runtime";
|
|
4
4
|
/**
|
|
@@ -146,7 +146,9 @@ export interface MultiClawConfig {
|
|
|
146
146
|
provider?: string;
|
|
147
147
|
model?: string;
|
|
148
148
|
command?: string;
|
|
149
|
-
|
|
149
|
+
permissions?: {
|
|
150
|
+
mode: PermissionMode;
|
|
151
|
+
};
|
|
150
152
|
};
|
|
151
153
|
}
|
|
152
154
|
export interface OrchestrationPreview {
|
package/dist/types/runtime.d.ts
CHANGED
|
@@ -82,7 +82,6 @@ export interface RuntimeCapabilities {
|
|
|
82
82
|
sessions: boolean;
|
|
83
83
|
resume: boolean;
|
|
84
84
|
permissions: boolean;
|
|
85
|
-
tools: boolean;
|
|
86
85
|
models: boolean;
|
|
87
86
|
images: boolean;
|
|
88
87
|
usage: boolean;
|
|
@@ -109,14 +108,14 @@ export interface RuntimePermissionRequest extends RuntimeEventBase {
|
|
|
109
108
|
toolName?: string;
|
|
110
109
|
kind?: string;
|
|
111
110
|
input?: unknown;
|
|
112
|
-
/**
|
|
111
|
+
/** The provider's offered choices, in the order it presented them. */
|
|
113
112
|
options: Array<{
|
|
114
113
|
optionId: string;
|
|
115
114
|
name: string;
|
|
116
115
|
kind: "allow_once" | "allow_always" | "reject_once" | "reject_always";
|
|
117
116
|
}>;
|
|
118
117
|
}
|
|
119
|
-
/** Return an offered option id, or undefined to cancel/deny.
|
|
118
|
+
/** Return an offered option id, or undefined to cancel/deny. */
|
|
120
119
|
export type RuntimePermissionHandler = (request: RuntimePermissionRequest, signal: AbortSignal) => Promise<string | undefined>;
|
|
121
120
|
export interface RuntimeQuestionRequest extends RuntimeEventBase {
|
|
122
121
|
requestId: string;
|
|
@@ -137,12 +136,11 @@ export interface AgentTask {
|
|
|
137
136
|
agentId: string;
|
|
138
137
|
systemPrompt: string;
|
|
139
138
|
prompt: string;
|
|
140
|
-
tools: string[];
|
|
141
139
|
workDir: string;
|
|
142
140
|
timeout: number;
|
|
143
141
|
signal?: AbortSignal;
|
|
144
142
|
onEvent?: (event: RuntimeEvent) => void;
|
|
145
|
-
/**
|
|
143
|
+
/** Approval mode for tool calls; the runtime defaults to `"auto"` when unset. */
|
|
146
144
|
permissionMode?: "auto" | "ask" | "deny";
|
|
147
145
|
onPermission?: RuntimePermissionHandler;
|
|
148
146
|
onQuestion?: RuntimeQuestionHandler;
|
package/package.json
CHANGED
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { AgentDefinition } from "../types/agent";
|
|
2
|
-
import type { MultiClawConfig } from "../types/config";
|
|
3
|
-
/** Record factory defaults without altering the tools array passed to the runtime. */
|
|
4
|
-
export declare function markPresetTools(agent: AgentDefinition, overrides?: Partial<AgentDefinition>): AgentDefinition;
|
|
5
|
-
/** Spreads retain provenance; equal replacement arrays and in-place edits are explicit. */
|
|
6
|
-
export declare function hasExplicitTools(agent: AgentDefinition): boolean;
|
|
7
|
-
/** Validate the entire configured team before routing, execution, or workspace cleanup. */
|
|
8
|
-
export declare function validateToolsPolicy(config: MultiClawConfig, options?: {
|
|
9
|
-
signal?: AbortSignal;
|
|
10
|
-
}): Promise<void>;
|