@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.
@@ -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. */
@@ -1,5 +1,11 @@
1
1
  import type { AgentOutput } from "./runtime";
2
- export type ToolName = "Read" | "Write" | "Edit" | "MultiEdit" | "Bash" | "Glob" | "Grep" | "WebFetch";
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
- tools?: ToolName[];
59
+ permissions?: {
60
+ mode: PermissionMode;
61
+ };
54
62
  dependsOn?: string[];
55
63
  timeout?: number;
56
64
  retries?: number;
@@ -1,4 +1,4 @@
1
- import type { AgentDefinition, ToolName } from "./agent";
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
- tools?: ToolName[];
149
+ permissions?: {
150
+ mode: PermissionMode;
151
+ };
150
152
  };
151
153
  }
152
154
  export interface OrchestrationPreview {
@@ -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
- /** Only choices permitted by the configured tools policy are offered. */
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. Never grant outside the tools policy. */
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
- /** Automatic tools policy by default; ask without a handler denies. */
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,6 +1,6 @@
1
1
  {
2
2
  "name": "@multiclawcli/core",
3
- "version": "0.12.0",
3
+ "version": "0.13.0",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -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>;