@vibeframe/cli 0.110.0 → 0.111.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.
@@ -17,10 +17,20 @@ export interface McpInputSchema {
17
17
  required: string[];
18
18
  description?: string;
19
19
  }
20
+ /** MCP spec ToolAnnotations — safety hints surfaced to hosts. */
21
+ export interface McpToolAnnotations {
22
+ readOnlyHint: boolean;
23
+ destructiveHint?: boolean;
24
+ idempotentHint?: boolean;
25
+ openWorldHint: boolean;
26
+ }
20
27
  export interface McpTool {
21
28
  name: string;
29
+ /** Human-readable display name (MCP BaseMetadata.title). */
30
+ title: string;
22
31
  description: string;
23
32
  inputSchema: McpInputSchema;
33
+ annotations: McpToolAnnotations;
24
34
  }
25
35
  /**
26
36
  * Structural mirror of the MCP elicitation form request/result (the CLI
@@ -211,16 +211,29 @@ function manifestToMcpTools(manifest) {
211
211
  const inputSchema = zodToJsonSchema(t.schema);
212
212
  return {
213
213
  name: t.name,
214
+ title: t.title,
214
215
  description: t.description,
215
216
  inputSchema: {
216
217
  type: "object",
217
218
  properties: inputSchema.properties ?? {},
218
219
  required: inputSchema.required ?? [],
219
220
  ...inputSchema.description ? { description: inputSchema.description } : {}
220
- }
221
+ },
222
+ annotations: toMcpAnnotations(t.annotations)
221
223
  };
222
224
  });
223
225
  }
226
+ function toMcpAnnotations(a) {
227
+ if (a.readOnly) {
228
+ return { readOnlyHint: true, openWorldHint: a.openWorld };
229
+ }
230
+ return {
231
+ readOnlyHint: false,
232
+ destructiveHint: a.destructive ?? true,
233
+ ...a.idempotent !== void 0 ? { idempotentHint: a.idempotent } : {},
234
+ openWorldHint: a.openWorld
235
+ };
236
+ }
224
237
  function buildMcpDispatcher(manifest) {
225
238
  const byName = /* @__PURE__ */ new Map();
226
239
  for (const t of manifest) {
@@ -88,6 +88,32 @@ export interface ToolDefinition<S extends ZodTypeAny = ZodTypeAny> {
88
88
  replacement?: string;
89
89
  /** Short explanation for product-surface routing. */
90
90
  note?: string;
91
+ /**
92
+ * Human-readable display name shown by MCP hosts, e.g. "Add Clip to
93
+ * Timeline". Required by the Anthropic extension directory.
94
+ */
95
+ title: string;
96
+ /**
97
+ * MCP safety annotations (directory requirement: every tool declares
98
+ * readOnlyHint or destructiveHint).
99
+ * - `readOnly: true` — the tool never modifies files or project state.
100
+ * - `readOnly: false` — the tool writes; `destructive` defaults to true
101
+ * (may overwrite/modify existing data), set false for purely additive
102
+ * tools; `idempotent: true` when re-running with identical args has no
103
+ * additional effect.
104
+ * - `openWorld` — true when the tool calls external provider APIs; false
105
+ * for purely local work (ffmpeg, filesystem). Always stated explicitly
106
+ * because the MCP spec default is true.
107
+ */
108
+ annotations: {
109
+ readOnly: true;
110
+ openWorld: boolean;
111
+ } | {
112
+ readOnly: false;
113
+ destructive?: boolean;
114
+ idempotent?: boolean;
115
+ openWorld: boolean;
116
+ };
91
117
  /** Identical for MCP description and Agent description. One paragraph. */
92
118
  description: string;
93
119
  /** Single source of truth for argument shape. Must be a `z.object({...})`. */