@liquidmetal-ai/raindrop-code 0.0.10 → 0.0.12

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/bin/raindrop-code CHANGED
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@liquidmetal-ai/raindrop-code",
3
- "version": "0.0.10",
3
+ "version": "0.0.12",
4
4
  "description": "AI-powered terminal coding assistant with deep code understanding, file operations, and extensible tools",
5
5
  "keywords": [
6
6
  "ai",
@@ -38,43 +38,73 @@
38
38
  "types": "types/index.d.ts",
39
39
  "exports": {
40
40
  ".": {
41
- "types": "./types/index.d.ts"
41
+ "types": "./types/index.d.ts",
42
+ "import": "./stubs/index.js",
43
+ "default": "./stubs/index.js"
42
44
  },
43
45
  "./control": {
44
- "types": "./types/control.d.ts"
46
+ "types": "./types/control.d.ts",
47
+ "import": "./stubs/control.js",
48
+ "default": "./stubs/control.js"
45
49
  },
46
50
  "./files": {
47
- "types": "./types/files.d.ts"
51
+ "types": "./types/files.d.ts",
52
+ "import": "./stubs/files.js",
53
+ "default": "./stubs/files.js"
48
54
  },
49
55
  "./log": {
50
- "types": "./types/log.d.ts"
56
+ "types": "./types/log.d.ts",
57
+ "import": "./stubs/log.js",
58
+ "default": "./stubs/log.js"
51
59
  },
52
60
  "./resumable": {
53
- "types": "./types/resumable.d.ts"
61
+ "types": "./types/resumable.d.ts",
62
+ "import": "./stubs/resumable.js",
63
+ "default": "./stubs/resumable.js"
54
64
  },
55
65
  "./runtime": {
56
- "types": "./types/runtime.d.ts"
66
+ "types": "./types/runtime.d.ts",
67
+ "import": "./stubs/runtime.js",
68
+ "default": "./stubs/runtime.js"
57
69
  },
58
70
  "./state": {
59
- "types": "./types/state.d.ts"
71
+ "types": "./types/state.d.ts",
72
+ "import": "./stubs/state.js",
73
+ "default": "./stubs/state.js"
60
74
  },
61
75
  "./ui": {
62
- "types": "./types/ui.d.ts"
76
+ "types": "./types/ui.d.ts",
77
+ "import": "./stubs/ui.js",
78
+ "default": "./stubs/ui.js"
63
79
  },
64
80
  "./bash": {
65
- "types": "./types/bash.d.ts"
81
+ "types": "./types/bash.d.ts",
82
+ "import": "./stubs/bash.js",
83
+ "default": "./stubs/bash.js"
84
+ },
85
+ "./resources": {
86
+ "types": "./types/resources.d.ts",
87
+ "import": "./stubs/resources.js",
88
+ "default": "./stubs/resources.js"
66
89
  }
67
90
  },
68
91
  "files": [
69
92
  "install.js",
70
93
  "README.md",
71
94
  "bin/",
72
- "types/"
95
+ "types/",
96
+ "stubs/"
73
97
  ],
98
+ "peerDependencies": {
99
+ "zod": "^3.25.0"
100
+ },
101
+ "devDependencies": {
102
+ "zod": "^3.25.0"
103
+ },
74
104
  "optionalDependencies": {
75
- "@liquidmetal-ai/raindrop-code-darwin-universal": "0.0.10",
76
- "@liquidmetal-ai/raindrop-code-linux-x64": "0.0.10",
77
- "@liquidmetal-ai/raindrop-code-linux-arm64": "0.0.10",
78
- "@liquidmetal-ai/raindrop-code-win32-x64": "0.0.10"
105
+ "@liquidmetal-ai/raindrop-code-darwin-universal": "0.0.12",
106
+ "@liquidmetal-ai/raindrop-code-linux-arm64": "0.0.12",
107
+ "@liquidmetal-ai/raindrop-code-linux-x64": "0.0.12",
108
+ "@liquidmetal-ai/raindrop-code-win32-x64": "0.0.12"
79
109
  }
80
110
  }
package/stubs/bash.js ADDED
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/bash
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/bash is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const bash = runtimeError;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/control
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/control is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const passToAI = runtimeError;
16
+ export const passToUser = runtimeError;
17
+ export const passToCoordinator = runtimeError;
package/stubs/files.js ADDED
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/files
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/files is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const readFile = runtimeError;
16
+ export const writeFile = runtimeError;
17
+ export const editFile = runtimeError;
18
+ export const listFiles = runtimeError;
19
+ export const fileExists = runtimeError;
package/stubs/index.js ADDED
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ // Re-export all modules
9
+ export * from './control.js';
10
+ export * from './files.js';
11
+ export * from './bash.js';
12
+ export * from './ui.js';
13
+ export * from './log.js';
14
+ export * from './state.js';
15
+ export * from './runtime.js';
16
+ export * from './resources.js';
17
+ export * from './resumable.js';
package/stubs/log.js ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/log
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/log is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const info = runtimeError;
16
+ export const warn = runtimeError;
17
+ export const error = runtimeError;
18
+ export const debug = runtimeError;
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/resources
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/resources is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const listAgents = runtimeError;
16
+ export const listCommands = runtimeError;
17
+ export const listSkills = runtimeError;
18
+ export const listCoordinators = runtimeError;
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/resumable
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/resumable is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const createResumable = runtimeError;
@@ -0,0 +1,17 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/runtime
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/runtime is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const getCwd = runtimeError;
16
+ export const getVersion = runtimeError;
17
+ export const getSessionId = runtimeError;
package/stubs/state.js ADDED
@@ -0,0 +1,18 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/state
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/state is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const getState = runtimeError;
16
+ export const setState = runtimeError;
17
+ export const deleteState = runtimeError;
18
+ export const clearState = runtimeError;
package/stubs/ui.js ADDED
@@ -0,0 +1,20 @@
1
+ /**
2
+ * Runtime stub for @liquidmetal-ai/raindrop-code/ui
3
+ *
4
+ * These functions are injected by the Raindrop Code runtime when executing
5
+ * coordinators. This stub is provided for type checking and development only.
6
+ */
7
+
8
+ const runtimeError = () => {
9
+ throw new Error(
10
+ '@liquidmetal-ai/raindrop-code/ui is only available when running inside the Raindrop Code coordinator runtime. ' +
11
+ 'These functions are injected at runtime by the Go executor.'
12
+ );
13
+ };
14
+
15
+ export const showStatus = runtimeError;
16
+ export const showProgress = runtimeError;
17
+ export const showSuccess = runtimeError;
18
+ export const showError = runtimeError;
19
+ export const showWarning = runtimeError;
20
+ export const showInfo = runtimeError;
@@ -1,186 +1,198 @@
1
1
  declare module '@liquidmetal-ai/raindrop-code/control' {
2
- /**
3
- * Schema definition for AI response validation.
4
- * Must be a Zod schema object (use z.object()).
5
- */
6
- export interface ResponseSchema {
7
- /** Parse and validate data against the schema (required) */
8
- parse: (data: any) => any;
9
- /** Get the schema shape for field extraction (required) */
10
- shape: () => Record<string, SchemaField>;
11
- /** Internal definition metadata */
12
- _def?: {
13
- shape?: () => Record<string, SchemaField>;
14
- };
15
- }
2
+ // Import Zod types for proper type inference
3
+ import type { z } from 'zod';
16
4
 
17
- /**
18
- * Schema field definition
19
- */
20
- export interface SchemaField {
21
- /** Field type information */
22
- _def?: {
23
- typeName?: string;
24
- description?: string;
25
- innerType?: SchemaField;
26
- };
27
- /** Check if field is optional */
28
- isOptional?: () => boolean;
29
- }
5
+ /**
6
+ * Schema definition for AI response validation.
7
+ * Must be a Zod schema object (use z.object()).
8
+ */
9
+ export interface ResponseSchema {
10
+ /** Parse and validate data against the schema (required) */
11
+ parse: (data: any) => any;
12
+ /** Shape property containing field schemas (Zod 3 structure) */
13
+ shape: Record<string, SchemaField>;
14
+ }
30
15
 
31
- /**
32
- * Options for passing control to AI
33
- */
34
- export interface PassToAIOptions {
35
- /** The prompt to send to the AI */
36
- prompt: string;
37
- /**
38
- * REQUIRED: Zod schema defining the expected response structure.
39
- * Use z.object() with .describe() on fields for better AI instructions.
40
- *
41
- * Automatically:
42
- * - Generates unique signal name
43
- * - Appends instructions with example to prompt
44
- * - Validates AI response against schema
45
- * - Returns typed data
46
- *
47
- * @example
48
- * z.object({
49
- * result: z.string().describe('The result of the operation'),
50
- * success: z.boolean().describe('Whether it succeeded')
51
- * })
52
- */
53
- responseSchema: ResponseSchema;
54
- /**
55
- * REQUIRED: Example object showing realistic response values.
56
- * Must contain at least one field. Used to generate clear instructions.
57
- *
58
- * @example
59
- * {
60
- * result: 'Successfully completed the task',
61
- * success: true
62
- * }
63
- */
64
- example: Record<string, any>;
65
- /** Timeout in seconds (default: 3600) */
66
- timeout?: number;
67
- /** Optional: Specific tools to enable for this AI session */
68
- tools?: string[];
69
- /** Optional: Specific skills to enable for this AI session */
70
- skills?: string[];
71
- }
16
+ /**
17
+ * Schema field definition matching Zod 3 structure
18
+ */
19
+ export interface SchemaField {
20
+ /** Internal Zod definition with type metadata */
21
+ _def: {
22
+ /** Zod type name (e.g., 'ZodString', 'ZodNumber', 'ZodArray') */
23
+ typeName: string;
24
+ /** Optional description set via .describe() */
25
+ description?: string;
26
+ /** Validation checks */
27
+ checks?: any[];
28
+ /** Whether coercion is enabled */
29
+ coerce?: boolean;
30
+ /** For ZodArray: inner type */
31
+ innerType?: SchemaField;
32
+ };
33
+ /** Check if field is optional */
34
+ isOptional?: () => boolean;
35
+ }
72
36
 
73
- /**
74
- * Data returned from AI via session_control signal
75
- */
76
- export type SignalData = Record<string, any>;
37
+ /**
38
+ * Options for passing control to AI
39
+ */
40
+ export interface PassToAIOptions<TSchema extends z.ZodObject<any>> {
41
+ /** The prompt to send to the AI */
42
+ prompt: string;
43
+ /**
44
+ * REQUIRED: Zod object schema defining the expected response structure.
45
+ * Must use z.object() - primitive schemas are not supported.
46
+ * Use .describe() on fields for better AI instructions.
47
+ *
48
+ * For primitive values, wrap them in an object:
49
+ * - Instead of: z.string()
50
+ * - Use: z.object({ result: z.string() })
51
+ *
52
+ * Automatically:
53
+ * - Generates unique signal name
54
+ * - Appends instructions with example to prompt
55
+ * - Validates AI response against schema
56
+ * - Returns typed data
57
+ *
58
+ * @example
59
+ * z.object({
60
+ * result: z.string().describe('The result of the operation'),
61
+ * success: z.boolean().describe('Whether it succeeded')
62
+ * })
63
+ */
64
+ responseSchema: TSchema;
65
+ /**
66
+ * REQUIRED: Example object showing realistic response values.
67
+ * Must be an object matching the schema's output type.
68
+ * Used to generate clear instructions for the AI.
69
+ *
70
+ * @example
71
+ * {
72
+ * result: 'Successfully completed the task',
73
+ * success: true
74
+ * }
75
+ */
76
+ example: z.infer<TSchema>;
77
+ /** Timeout in seconds (default: 3600) */
78
+ timeout?: number;
79
+ /** Optional: Specific tools to enable for this AI session */
80
+ tools?: string[];
81
+ /** Optional: Specific skills to enable for this AI session */
82
+ skills?: string[];
83
+ }
77
84
 
78
- /**
79
- * Options for passing control to user
80
- */
81
- export interface PassToUserOptions {
82
- /** Message to display to the user */
83
- message: string;
84
- /** Type of user input: "choice" (default) or "text" */
85
- type?: 'choice' | 'text';
86
- /** Available actions for the user to choose from (for type="choice") */
87
- actions?: string[];
88
- /** Placeholder text for text input (for type="text") */
89
- placeholder?: string;
90
- }
85
+ /**
86
+ * Data returned from AI via session_control signal
87
+ */
88
+ export type SignalData = Record<string, any>;
91
89
 
92
- /**
93
- * Options for passing control to another coordinator
94
- */
95
- export interface PassToCoordinatorOptions {
96
- /** Name of the coordinator to execute */
97
- coordinator: string;
98
- /** Input data to pass to the coordinator */
99
- input: Record<string, any>;
100
- }
90
+ /**
91
+ * Options for passing control to user
92
+ */
93
+ export interface PassToUserOptions {
94
+ /** Message to display to the user */
95
+ message: string;
96
+ /** Type of user input: "choice" (default) or "text" */
97
+ type?: 'choice' | 'text';
98
+ /** Available actions for the user to choose from (for type="choice") */
99
+ actions?: string[];
100
+ /** Placeholder text for text input (for type="text") */
101
+ placeholder?: string;
102
+ }
101
103
 
102
- /**
103
- * Pass control to AI by sending a prompt and waiting for a signal.
104
- *
105
- * Uses Zod schema to automatically generate instructions and validate responses.
106
- * The AI receives clear examples and the response is type-checked.
107
- *
108
- * @param opts - Options for the AI session
109
- * @returns Promise resolving to the validated signal data
110
- *
111
- * @example
112
- * ```typescript
113
- * import { z } from 'zod';
114
- *
115
- * const result = await passToAI({
116
- * prompt: 'Analyze this code and find potential bugs',
117
- * responseSchema: z.object({
118
- * bugs: z.array(z.string()).describe('List of bugs found'),
119
- * severity: z.enum(['low', 'medium', 'high']).describe('Overall severity'),
120
- * summary: z.string().describe('Brief analysis summary')
121
- * }),
122
- * example: {
123
- * bugs: ['Memory leak in loop', 'Unhandled error case'],
124
- * severity: 'high',
125
- * summary: 'Found 2 critical issues'
126
- * },
127
- * timeout: 300
128
- * });
129
- *
130
- * console.log(result.bugs); // string[] - typed and validated!
131
- * console.log(result.severity); // 'low' | 'medium' | 'high'
132
- * ```
133
- */
134
- export function passToAI(opts: PassToAIOptions): Promise<SignalData>;
104
+ /**
105
+ * Options for passing control to another coordinator
106
+ */
107
+ export interface PassToCoordinatorOptions {
108
+ /** Name of the coordinator to execute */
109
+ coordinator: string;
110
+ /** Input data to pass to the coordinator */
111
+ input: Record<string, any>;
112
+ }
135
113
 
136
- /**
137
- * Pass control to the user for manual input/decision.
138
- *
139
- * @param opts - Options for user interaction
140
- * @returns Promise resolving to the user's selected action or entered text
141
- *
142
- * @example
143
- * ```typescript
144
- * // Choice selection (default)
145
- * const choice = await passToUser({
146
- * message: 'How should we proceed?',
147
- * type: 'choice',
148
- * actions: ['Continue', 'Skip', 'Abort']
149
- * });
150
- * if (choice === 'Abort') {
151
- * return { success: false };
152
- * }
153
- *
154
- * // Freeform text input
155
- * const name = await passToUser({
156
- * message: 'What is your project name?',
157
- * type: 'text',
158
- * placeholder: 'my-project'
159
- * });
160
- * ```
161
- */
162
- export function passToUser(opts: PassToUserOptions): Promise<string>;
114
+ /**
115
+ * Pass control to AI by sending a prompt and waiting for a signal.
116
+ *
117
+ * Uses Zod schema to automatically generate instructions and validate responses.
118
+ * The AI receives clear examples and the response is type-checked.
119
+ *
120
+ * @param opts - Options for the AI session
121
+ * @returns Promise resolving to the validated signal data
122
+ *
123
+ * @example
124
+ * ```typescript
125
+ * import { z } from 'zod';
126
+ *
127
+ * const result = await passToAI({
128
+ * prompt: 'Analyze this code and find potential bugs',
129
+ * responseSchema: z.object({
130
+ * bugs: z.array(z.string()).describe('List of bugs found'),
131
+ * severity: z.enum(['low', 'medium', 'high']).describe('Overall severity'),
132
+ * summary: z.string().describe('Brief analysis summary')
133
+ * }),
134
+ * example: {
135
+ * bugs: ['Memory leak in loop', 'Unhandled error case'],
136
+ * severity: 'high',
137
+ * summary: 'Found 2 critical issues'
138
+ * },
139
+ * timeout: 300
140
+ * });
141
+ *
142
+ * console.log(result.bugs); // string[] - typed and validated!
143
+ * console.log(result.severity); // 'low' | 'medium' | 'high'
144
+ * ```
145
+ */
146
+ export function passToAI<T extends z.ZodObject<any>>(opts: PassToAIOptions<T>): Promise<z.infer<T>>;
163
147
 
164
- /**
165
- * Pass control to another coordinator.
166
- *
167
- * @param opts - Options for coordinator execution
168
- * @returns Promise resolving to the coordinator's result
169
- *
170
- * @example
171
- * ```typescript
172
- * const result = await passToCoordinator({
173
- * coordinator: 'helper-coordinator',
174
- * input: { task: 'process data' }
175
- * });
176
- * ```
177
- */
178
- export function passToCoordinator(opts: PassToCoordinatorOptions): Promise<Record<string, any>>;
148
+ /**
149
+ * Pass control to the user for manual input/decision.
150
+ *
151
+ * @param opts - Options for user interaction
152
+ * @returns Promise resolving to the user's selected action or entered text
153
+ *
154
+ * @example
155
+ * ```typescript
156
+ * // Choice selection (default)
157
+ * const choice = await passToUser({
158
+ * message: 'How should we proceed?',
159
+ * type: 'choice',
160
+ * actions: ['Continue', 'Skip', 'Abort']
161
+ * });
162
+ * if (choice === 'Abort') {
163
+ * return { success: false };
164
+ * }
165
+ *
166
+ * // Freeform text input
167
+ * const name = await passToUser({
168
+ * message: 'What is your project name?',
169
+ * type: 'text',
170
+ * placeholder: 'my-project'
171
+ * });
172
+ * ```
173
+ */
174
+ export function passToUser(opts: PassToUserOptions): Promise<string>;
179
175
 
180
- /**
181
- * Get the current control state.
182
- *
183
- * @returns The current state ('coordinator', 'ai', or 'user')
184
- */
185
- export function current(): string;
176
+ /**
177
+ * Pass control to another coordinator.
178
+ *
179
+ * @param opts - Options for coordinator execution
180
+ * @returns Promise resolving to the coordinator's result
181
+ *
182
+ * @example
183
+ * ```typescript
184
+ * const result = await passToCoordinator({
185
+ * coordinator: 'helper-coordinator',
186
+ * input: { task: 'process data' }
187
+ * });
188
+ * ```
189
+ */
190
+ export function passToCoordinator(opts: PassToCoordinatorOptions): Promise<Record<string, any>>;
191
+
192
+ /**
193
+ * Get the current control state.
194
+ *
195
+ * @returns The current state ('coordinator', 'ai', or 'user')
196
+ */
197
+ export function current(): string;
186
198
  }
package/types/index.d.ts CHANGED
@@ -16,4 +16,5 @@ export * from '@liquidmetal-ai/raindrop-code/ui';
16
16
  export * from '@liquidmetal-ai/raindrop-code/log';
17
17
  export * from '@liquidmetal-ai/raindrop-code/state';
18
18
  export * from '@liquidmetal-ai/raindrop-code/runtime';
19
+ export * from '@liquidmetal-ai/raindrop-code/resources';
19
20
  export * from '@liquidmetal-ai/raindrop-code/resumable';
@@ -0,0 +1,164 @@
1
+ declare module '@liquidmetal-ai/raindrop-code/resources' {
2
+ /**
3
+ * Information about an agent
4
+ */
5
+ export interface AgentInfo {
6
+ /** Agent name */
7
+ name: string;
8
+ /** Description of when and why to use this agent */
9
+ description: string;
10
+ /** Allowed tool names (empty array = all tools allowed) */
11
+ tools: string[];
12
+ /** Model to use (empty = inherit from parent) */
13
+ model: string;
14
+ /** Temperature setting (0.0-1.0, undefined = default) */
15
+ temperature?: number;
16
+ /** Expected context - keys are context names, values are descriptions */
17
+ contextNeeds: Record<string, string>;
18
+ }
19
+
20
+ /**
21
+ * Information about a command
22
+ */
23
+ export interface CommandInfo {
24
+ /** Command name */
25
+ name: string;
26
+ /** Description for help text */
27
+ description: string;
28
+ /** Whether this command starts an excursion */
29
+ isExcursion: boolean;
30
+ /** Title for the excursion box */
31
+ excursionTitle: string;
32
+ }
33
+
34
+ /**
35
+ * Information about a skill
36
+ */
37
+ export interface SkillInfo {
38
+ /** Skill name */
39
+ name: string;
40
+ /** Description of what the skill does */
41
+ description: string;
42
+ /** Path to skill directory */
43
+ path: string;
44
+ /** Path to SKILL.md file */
45
+ mdPath: string;
46
+ /** License name or reference */
47
+ license: string;
48
+ /** Environment requirements */
49
+ compatibility: string;
50
+ /** True if references/ directory exists */
51
+ hasReferences: boolean;
52
+ /** True if scripts/ directory exists */
53
+ hasScripts: boolean;
54
+ /** True if assets/ directory exists */
55
+ hasAssets: boolean;
56
+ }
57
+
58
+ /**
59
+ * Information about a coordinator
60
+ */
61
+ export interface CoordinatorInfo {
62
+ /** Coordinator name */
63
+ name: string;
64
+ /** Description of what the coordinator does */
65
+ description: string;
66
+ /** Estimated execution time */
67
+ estimatedTime: string;
68
+ /** Whether the coordinator requires user approval */
69
+ requiresApproval: boolean;
70
+ /** Path to the coordinator source file */
71
+ sourcePath: string;
72
+ /** Type of source (e.g., "typescript", "javascript") */
73
+ sourceType: string;
74
+ }
75
+
76
+ /**
77
+ * List all available agents with detailed metadata.
78
+ * Agents are specialized AI sessions with custom prompts and tool configurations.
79
+ *
80
+ * @returns Promise resolving to a map of agent name to agent information
81
+ *
82
+ * @example
83
+ * ```typescript
84
+ * const agents = await listAgents();
85
+ *
86
+ * // Direct access by name
87
+ * const reviewAgent = agents['code-reviewer'];
88
+ * console.log(`${reviewAgent.name}: ${reviewAgent.description}`);
89
+ * console.log(`Tools: ${reviewAgent.tools.join(', ')}`);
90
+ *
91
+ * // Iterate over all agents
92
+ * for (const [name, agent] of Object.entries(agents)) {
93
+ * console.log(`${name}: ${agent.description}`);
94
+ * }
95
+ * ```
96
+ */
97
+ export function listAgents(): Promise<Record<string, AgentInfo>>;
98
+
99
+ /**
100
+ * List all available commands with detailed metadata.
101
+ * Commands are reusable tools that can be invoked by AI or coordinators.
102
+ *
103
+ * @returns Promise resolving to a map of command name to command information
104
+ *
105
+ * @example
106
+ * ```typescript
107
+ * const commands = await listCommands();
108
+ *
109
+ * // Direct access by name
110
+ * const prCmd = commands['create-pr'];
111
+ * console.log(`${prCmd.name}: ${prCmd.description}`);
112
+ * if (prCmd.isExcursion) {
113
+ * console.log(`Excursion: ${prCmd.excursionTitle}`);
114
+ * }
115
+ *
116
+ * // Iterate over all commands
117
+ * for (const [name, cmd] of Object.entries(commands)) {
118
+ * console.log(`${name}: ${cmd.description}`);
119
+ * }
120
+ * ```
121
+ */
122
+ export function listCommands(): Promise<Record<string, CommandInfo>>;
123
+
124
+ /**
125
+ * List all available skills with detailed metadata including location.
126
+ * Skills are structured workflows that guide AI through complex tasks.
127
+ *
128
+ * @returns Promise resolving to a map of skill name to skill information
129
+ *
130
+ * @example
131
+ * ```typescript
132
+ * const skills = await listSkills();
133
+ *
134
+ * // Direct access by name
135
+ * const prdSkill = skills['prd-writer'];
136
+ * console.log(`${prdSkill.name}: ${prdSkill.description}`);
137
+ * console.log(`Location: ${prdSkill.path}`);
138
+ *
139
+ * // Iterate over all skills
140
+ * for (const [name, skill] of Object.entries(skills)) {
141
+ * console.log(`${name}: ${skill.description}`);
142
+ * }
143
+ * ```
144
+ */
145
+ export function listSkills(): Promise<Record<string, SkillInfo>>;
146
+
147
+ /**
148
+ * List all available coordinators with detailed metadata.
149
+ * Coordinators are multi-session orchestration scripts that can be composed.
150
+ *
151
+ * @returns Promise resolving to an array of coordinator information
152
+ *
153
+ * @example
154
+ * ```typescript
155
+ * const coordinators = await listCoordinators();
156
+ * console.log('Available coordinators:');
157
+ * for (const coord of coordinators) {
158
+ * console.log(` ${coord.name}: ${coord.description}`);
159
+ * console.log(` Estimated time: ${coord.estimatedTime}`);
160
+ * }
161
+ * ```
162
+ */
163
+ export function listCoordinators(): Promise<CoordinatorInfo[]>;
164
+ }