lumiverse-spindle-types 0.1.9 → 0.2.1

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.1.9",
3
+ "version": "0.2.1",
4
4
  "types": "./src/index.ts",
5
5
  "keywords": [
6
6
  "lumiverse",
package/src/api.ts CHANGED
@@ -25,11 +25,30 @@ export interface ToolRegistrationDTO {
25
25
  council_eligible?: boolean;
26
26
  }
27
27
 
28
+ /** Tool/function schema passed to LLM for inline function calling. */
29
+ export interface ToolSchemaDTO {
30
+ name: string;
31
+ description: string;
32
+ parameters: Record<string, unknown>; // JSON Schema
33
+ }
34
+
35
+ /** A single function call made by the LLM. */
36
+ export interface ToolCallDTO {
37
+ /** Tool name (as given in the schema). */
38
+ name: string;
39
+ /** Parsed JSON arguments as returned by the LLM. */
40
+ args: Record<string, unknown>;
41
+ /** Provider call ID (e.g. Anthropic `id`, OpenAI `id`). Synthetic UUID for providers that don't supply one (e.g. Google). */
42
+ call_id: string;
43
+ }
44
+
28
45
  export interface GenerationRequestDTO {
29
46
  type: "raw" | "quiet" | "batch";
30
47
  messages?: LlmMessageDTO[];
31
48
  parameters?: Record<string, unknown>;
32
49
  connection_id?: string;
50
+ /** Optional tool/function definitions for inline function calling (raw/quiet only). */
51
+ tools?: ToolSchemaDTO[];
33
52
  /**
34
53
  * For operator-scoped extensions: the user ID whose connection profiles
35
54
  * and generation context should be used. For user-scoped extensions this
package/src/index.ts CHANGED
@@ -16,6 +16,8 @@ export type {
16
16
  LlmMessageDTO,
17
17
  MacroDefinitionDTO,
18
18
  ToolRegistrationDTO,
19
+ ToolSchemaDTO,
20
+ ToolCallDTO,
19
21
  GenerationRequestDTO,
20
22
  RequestInitDTO,
21
23
  ConnectionProfileDTO,
@@ -64,7 +64,7 @@ export interface SpindleAPI {
64
64
  quiet(input: GenerationRequestDTO): Promise<unknown>;
65
65
  batch(input: GenerationRequestDTO): Promise<unknown>;
66
66
  /** Run a dry-run prompt assembly without calling the LLM. */
67
- dryRun(input: DryRunRequestDTO): Promise<DryRunResultDTO>;
67
+ dryRun(input: DryRunRequestDTO, userId?: string): Promise<DryRunResultDTO>;
68
68
  };
69
69
 
70
70
  /** Scoped storage (per-extension virtual disk) */