lumiverse-spindle-types 0.4.32 → 0.4.34

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "lumiverse-spindle-types",
3
- "version": "0.4.32",
3
+ "version": "0.4.34",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -1280,10 +1280,20 @@ export type WorkerToHost =
1280
1280
  | { type: "frontend_message"; payload: unknown; userId?: string }
1281
1281
  | { type: "user_storage_read"; requestId: string; path: string; userId?: string }
1282
1282
  | { type: "user_storage_write"; requestId: string; path: string; data: string; userId?: string }
1283
+ | { type: "user_storage_read_binary"; requestId: string; path: string; userId?: string }
1284
+ | {
1285
+ type: "user_storage_write_binary";
1286
+ requestId: string;
1287
+ path: string;
1288
+ data: Uint8Array;
1289
+ userId?: string;
1290
+ }
1283
1291
  | { type: "user_storage_delete"; requestId: string; path: string; userId?: string }
1284
1292
  | { type: "user_storage_list"; requestId: string; prefix?: string; userId?: string }
1285
1293
  | { type: "user_storage_exists"; requestId: string; path: string; userId?: string }
1286
1294
  | { type: "user_storage_mkdir"; requestId: string; path: string; userId?: string }
1295
+ | { type: "user_storage_move"; requestId: string; from: string; to: string; userId?: string }
1296
+ | { type: "user_storage_stat"; requestId: string; path: string; userId?: string }
1287
1297
  | { type: "enclave_put"; requestId: string; key: string; value: string; userId?: string }
1288
1298
  | { type: "enclave_get"; requestId: string; key: string; userId?: string }
1289
1299
  | { type: "enclave_delete"; requestId: string; key: string; userId?: string }
package/src/council.ts CHANGED
@@ -161,16 +161,32 @@ export type CouncilToolCategory =
161
161
  | "content"
162
162
  | "extension";
163
163
 
164
+ export type CouncilToolExecution =
165
+ | "llm"
166
+ | "host"
167
+ | "extension"
168
+ | "mcp";
169
+
164
170
  /** Canonical definition of a council tool (built-in or DLC). */
165
171
  export interface CouncilToolDefinition {
166
172
  name: string;
167
173
  displayName: string;
168
174
  description: string;
169
175
  category: CouncilToolCategory;
170
- /** The prompt sent to the sidecar LLM when invoking this tool. */
171
- prompt: string;
172
- /** JSON Schema describing the tool's expected output structure. */
173
- inputSchema: Record<string, unknown>;
176
+ /** Optional explicit runtime. When omitted, the host may infer one from the tool source. */
177
+ execution?: CouncilToolExecution;
178
+ /** The prompt sent to the sidecar LLM when invoking prompt-style LLM tools. */
179
+ prompt?: string;
180
+ /**
181
+ * JSON Schema describing the prompt-style tool's expected output structure.
182
+ *
183
+ * Historically this field was also used as the callable argument schema for
184
+ * extension / MCP tools. New host-callable tools should prefer `argsSchema`
185
+ * instead so invocation arguments and returned content are not conflated.
186
+ */
187
+ inputSchema?: Record<string, unknown>;
188
+ /** JSON Schema describing the callable arguments for host / extension / MCP tools. */
189
+ argsSchema?: Record<string, unknown>;
174
190
  /** If set, the tool's result is stored under this variable name for macro access. */
175
191
  resultVariable?: string;
176
192
  /** Whether this tool's output appears in the deliberation block (default true). */
package/src/index.ts CHANGED
@@ -132,6 +132,7 @@ export type {
132
132
  CouncilExecutionResult,
133
133
  CachedCouncilResult,
134
134
  CouncilToolCategory,
135
+ CouncilToolExecution,
135
136
  CouncilToolDefinition,
136
137
  } from "./council";
137
138
  export {
@@ -255,10 +255,20 @@ export interface SpindleAPI {
255
255
  userStorage: {
256
256
  read(path: string, userId?: string): Promise<string>;
257
257
  write(path: string, data: string, userId?: string): Promise<void>;
258
+ readBinary(path: string, userId?: string): Promise<Uint8Array>;
259
+ writeBinary(path: string, data: Uint8Array, userId?: string): Promise<void>;
258
260
  delete(path: string, userId?: string): Promise<void>;
259
261
  list(prefix?: string, userId?: string): Promise<string[]>;
260
262
  exists(path: string, userId?: string): Promise<boolean>;
261
263
  mkdir(path: string, userId?: string): Promise<void>;
264
+ move(from: string, to: string, userId?: string): Promise<void>;
265
+ stat(path: string, userId?: string): Promise<{
266
+ exists: boolean;
267
+ isFile: boolean;
268
+ isDirectory: boolean;
269
+ sizeBytes: number;
270
+ modifiedAt: string;
271
+ }>;
262
272
  getJson<T>(path: string, options?: { fallback?: T; userId?: string }): Promise<T>;
263
273
  setJson(path: string, value: unknown, options?: { indent?: number; userId?: string }): Promise<void>;
264
274
  };