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 +1 -1
- package/src/api.ts +19 -0
- package/src/index.ts +2 -0
- package/src/spindle-api.ts +1 -1
package/package.json
CHANGED
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
package/src/spindle-api.ts
CHANGED
|
@@ -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) */
|