@kb-labs/mind-entry 2.14.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.
- package/README.md +218 -0
- package/dist/cli/commands/init.d.ts +24 -0
- package/dist/cli/commands/init.js +114 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/commands/rag-index.d.ts +20 -0
- package/dist/cli/commands/rag-index.js +363 -0
- package/dist/cli/commands/rag-index.js.map +1 -0
- package/dist/cli/commands/rag-query.d.ts +25 -0
- package/dist/cli/commands/rag-query.js +670 -0
- package/dist/cli/commands/rag-query.js.map +1 -0
- package/dist/cli/commands/verify.d.ts +15 -0
- package/dist/cli/commands/verify.js +92 -0
- package/dist/cli/commands/verify.js.map +1 -0
- package/dist/index.d.ts +592 -0
- package/dist/index.js +1499 -0
- package/dist/index.js.map +1 -0
- package/dist/manifest.v3.d.ts +52 -0
- package/dist/manifest.v3.js +180 -0
- package/dist/manifest.v3.js.map +1 -0
- package/package.json +61 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,592 @@
|
|
|
1
|
+
export { default as manifest } from './manifest.v3.js';
|
|
2
|
+
import { PlatformServices } from '@kb-labs/sdk';
|
|
3
|
+
import { MindConfigInput, MindConfig, MindSyncConfig } from '@kb-labs/mind-contracts';
|
|
4
|
+
import { MindIndexStats, MindIntent, MindQueryResult } from '@kb-labs/mind-types';
|
|
5
|
+
import { z } from 'zod';
|
|
6
|
+
export { default as runInitCommand } from './cli/commands/init.js';
|
|
7
|
+
export { default as runRagIndexCommand } from './cli/commands/rag-index.js';
|
|
8
|
+
export { default as runRagQueryCommand } from './cli/commands/rag-query.js';
|
|
9
|
+
export { default as runVerifyCommand } from './cli/commands/verify.js';
|
|
10
|
+
import '@kb-labs/perm-presets';
|
|
11
|
+
import '@kb-labs/shared-command-kit';
|
|
12
|
+
|
|
13
|
+
declare const MIND_PRODUCT_ID = "mind";
|
|
14
|
+
interface MindRuntimeService {
|
|
15
|
+
index(scopeId: string): Promise<MindIndexStats>;
|
|
16
|
+
query(options: {
|
|
17
|
+
productId?: string;
|
|
18
|
+
scopeId: string;
|
|
19
|
+
text: string;
|
|
20
|
+
intent?: MindIntent;
|
|
21
|
+
limit?: number;
|
|
22
|
+
profileId?: string;
|
|
23
|
+
metadata?: Record<string, unknown>;
|
|
24
|
+
}): Promise<MindQueryResult>;
|
|
25
|
+
}
|
|
26
|
+
interface MindRuntime {
|
|
27
|
+
service: MindRuntimeService;
|
|
28
|
+
config: MindConfigInput;
|
|
29
|
+
}
|
|
30
|
+
interface MindRuntimeOptions {
|
|
31
|
+
cwd: string;
|
|
32
|
+
config?: MindConfigInput | Record<string, unknown>;
|
|
33
|
+
runtime?: {
|
|
34
|
+
fetch?: typeof fetch;
|
|
35
|
+
fs?: unknown;
|
|
36
|
+
env?: (key: string) => string | undefined;
|
|
37
|
+
log?: (level: 'debug' | 'info' | 'warn' | 'error', msg: string, meta?: Record<string, unknown>) => void;
|
|
38
|
+
analytics?: {
|
|
39
|
+
track(event: string, properties?: Record<string, unknown>): void;
|
|
40
|
+
metric(name: string, value: number, tags?: Record<string, string>): void;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
platform?: PlatformServices;
|
|
44
|
+
onProgress?: (event: {
|
|
45
|
+
stage: string;
|
|
46
|
+
details?: string;
|
|
47
|
+
metadata?: Record<string, unknown>;
|
|
48
|
+
timestamp: number;
|
|
49
|
+
}) => void;
|
|
50
|
+
}
|
|
51
|
+
declare function createMindRuntime(options: MindRuntimeOptions): Promise<MindRuntime>;
|
|
52
|
+
|
|
53
|
+
type AgentQueryMode = 'instant' | 'auto' | 'thinking';
|
|
54
|
+
type AgentResponse = Record<string, unknown>;
|
|
55
|
+
type AgentErrorResponse = {
|
|
56
|
+
error: {
|
|
57
|
+
code: string;
|
|
58
|
+
message: string;
|
|
59
|
+
recoverable: boolean;
|
|
60
|
+
};
|
|
61
|
+
meta: Record<string, unknown>;
|
|
62
|
+
};
|
|
63
|
+
interface RagIndexOptions {
|
|
64
|
+
cwd: string;
|
|
65
|
+
scopeId?: string;
|
|
66
|
+
include?: string;
|
|
67
|
+
exclude?: string;
|
|
68
|
+
skipDeduplication?: boolean;
|
|
69
|
+
platform?: PlatformServices;
|
|
70
|
+
/**
|
|
71
|
+
* Mind configuration (from ctx.config)
|
|
72
|
+
* If provided, will be used instead of reading from file
|
|
73
|
+
*/
|
|
74
|
+
config?: any;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Information about which adapters were used during indexing
|
|
78
|
+
*/
|
|
79
|
+
interface AdapterInfo {
|
|
80
|
+
vectorStore: string;
|
|
81
|
+
embeddings: string;
|
|
82
|
+
storage: string;
|
|
83
|
+
llm: string;
|
|
84
|
+
cache: string;
|
|
85
|
+
}
|
|
86
|
+
interface RagIndexStats extends MindIndexStats {
|
|
87
|
+
deletedFiles?: number;
|
|
88
|
+
deletedChunks?: number;
|
|
89
|
+
invalidChunks?: number;
|
|
90
|
+
}
|
|
91
|
+
interface RagIndexResult {
|
|
92
|
+
scopeIds: string[];
|
|
93
|
+
adapters: AdapterInfo;
|
|
94
|
+
stats: RagIndexStats;
|
|
95
|
+
}
|
|
96
|
+
interface RagIndexOptionsWithRuntime extends RagIndexOptions {
|
|
97
|
+
runtime?: Parameters<typeof createMindRuntime>[0]['runtime'];
|
|
98
|
+
}
|
|
99
|
+
declare function runRagIndex(options: RagIndexOptions | RagIndexOptionsWithRuntime): Promise<RagIndexResult>;
|
|
100
|
+
interface RagQueryOptions {
|
|
101
|
+
cwd: string;
|
|
102
|
+
scopeId?: string;
|
|
103
|
+
text: string;
|
|
104
|
+
intent?: MindIntent;
|
|
105
|
+
limit?: number;
|
|
106
|
+
profileId?: string;
|
|
107
|
+
runtime?: Parameters<typeof createMindRuntime>[0]['runtime'];
|
|
108
|
+
onProgress?: (stage: string, details?: string) => void;
|
|
109
|
+
platform?: PlatformServices;
|
|
110
|
+
/**
|
|
111
|
+
* Mind configuration (from ctx.config)
|
|
112
|
+
* If provided, will be used instead of reading from file
|
|
113
|
+
*/
|
|
114
|
+
config?: any;
|
|
115
|
+
}
|
|
116
|
+
interface RagQueryResult {
|
|
117
|
+
scopeId: string;
|
|
118
|
+
result: MindQueryResult;
|
|
119
|
+
}
|
|
120
|
+
declare function runRagQuery(options: RagQueryOptions): Promise<RagQueryResult>;
|
|
121
|
+
interface AgentRagQueryOptions {
|
|
122
|
+
cwd: string;
|
|
123
|
+
scopeId?: string;
|
|
124
|
+
text: string;
|
|
125
|
+
mode?: AgentQueryMode;
|
|
126
|
+
indexRevision?: string;
|
|
127
|
+
engineConfigHash?: string;
|
|
128
|
+
sourcesDigest?: string;
|
|
129
|
+
debug?: boolean;
|
|
130
|
+
runtime?: Parameters<typeof createMindRuntime>[0]['runtime'];
|
|
131
|
+
broker?: any;
|
|
132
|
+
platform?: PlatformServices;
|
|
133
|
+
/**
|
|
134
|
+
* Mind configuration (from ctx.config)
|
|
135
|
+
* If provided, will be used instead of reading from file
|
|
136
|
+
*/
|
|
137
|
+
config?: any;
|
|
138
|
+
}
|
|
139
|
+
type AgentRagQueryResult = AgentResponse | AgentErrorResponse;
|
|
140
|
+
/**
|
|
141
|
+
* Run agent-optimized RAG query with orchestration.
|
|
142
|
+
*
|
|
143
|
+
* This function uses the orchestrator pipeline:
|
|
144
|
+
* 1. Detect query complexity
|
|
145
|
+
* 2. Decompose into sub-queries (auto/thinking modes)
|
|
146
|
+
* 3. Gather chunks from mind-engine
|
|
147
|
+
* 4. Check completeness (with retry in thinking mode)
|
|
148
|
+
* 5. Synthesize agent-friendly response
|
|
149
|
+
* 6. Compress if needed
|
|
150
|
+
*
|
|
151
|
+
* @returns AgentResponse | AgentErrorResponse - clean JSON for agents
|
|
152
|
+
*/
|
|
153
|
+
declare function runAgentRagQuery(options: AgentRagQueryOptions): Promise<AgentRagQueryResult>;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Extract Mind configuration from context
|
|
157
|
+
* Provides type-safe access to mind config with validation
|
|
158
|
+
*/
|
|
159
|
+
declare function useConfig(ctx: {
|
|
160
|
+
config?: any;
|
|
161
|
+
}): MindConfig;
|
|
162
|
+
/**
|
|
163
|
+
* Try to extract Mind configuration from context
|
|
164
|
+
* Returns null if config is not available or invalid
|
|
165
|
+
*/
|
|
166
|
+
declare function tryUseConfig(ctx: {
|
|
167
|
+
config?: any;
|
|
168
|
+
}): MindConfig | null;
|
|
169
|
+
/**
|
|
170
|
+
* Get sync configuration from mind config
|
|
171
|
+
* Returns defaults if sync config is not provided
|
|
172
|
+
*/
|
|
173
|
+
declare function useSyncConfig(ctx: {
|
|
174
|
+
config?: any;
|
|
175
|
+
}): MindSyncConfig;
|
|
176
|
+
|
|
177
|
+
/**
|
|
178
|
+
* Analytics event types for Mind CLI
|
|
179
|
+
* Centralized constants to prevent typos and enable type safety
|
|
180
|
+
*/
|
|
181
|
+
/**
|
|
182
|
+
* Event type prefixes by command
|
|
183
|
+
*/
|
|
184
|
+
declare const ANALYTICS_PREFIX: {
|
|
185
|
+
readonly QUERY: "mind.query";
|
|
186
|
+
readonly FEED: "mind.feed";
|
|
187
|
+
readonly UPDATE: "mind.update";
|
|
188
|
+
readonly INIT: "mind.init";
|
|
189
|
+
readonly PACK: "mind.pack";
|
|
190
|
+
readonly VERIFY: "mind.verify";
|
|
191
|
+
};
|
|
192
|
+
/**
|
|
193
|
+
* Event lifecycle suffixes
|
|
194
|
+
*/
|
|
195
|
+
declare const ANALYTICS_SUFFIX: {
|
|
196
|
+
readonly STARTED: "started";
|
|
197
|
+
readonly FINISHED: "finished";
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Mind analytics event types
|
|
201
|
+
*/
|
|
202
|
+
declare const ANALYTICS_EVENTS: {
|
|
203
|
+
readonly QUERY_STARTED: "mind.query.started";
|
|
204
|
+
readonly QUERY_FINISHED: "mind.query.finished";
|
|
205
|
+
readonly FEED_STARTED: "mind.feed.started";
|
|
206
|
+
readonly FEED_FINISHED: "mind.feed.finished";
|
|
207
|
+
readonly UPDATE_STARTED: "mind.update.started";
|
|
208
|
+
readonly UPDATE_FINISHED: "mind.update.finished";
|
|
209
|
+
readonly INIT_STARTED: "mind.init.started";
|
|
210
|
+
readonly INIT_FINISHED: "mind.init.finished";
|
|
211
|
+
readonly PACK_STARTED: "mind.pack.started";
|
|
212
|
+
readonly PACK_FINISHED: "mind.pack.finished";
|
|
213
|
+
readonly VERIFY_STARTED: "mind.verify.started";
|
|
214
|
+
readonly VERIFY_FINISHED: "mind.verify.finished";
|
|
215
|
+
};
|
|
216
|
+
/**
|
|
217
|
+
* Type helper for analytics event types
|
|
218
|
+
*/
|
|
219
|
+
type AnalyticsEventType = typeof ANALYTICS_EVENTS[keyof typeof ANALYTICS_EVENTS];
|
|
220
|
+
/**
|
|
221
|
+
* Actor configuration for Mind analytics
|
|
222
|
+
*/
|
|
223
|
+
declare const ANALYTICS_ACTOR: {
|
|
224
|
+
readonly type: "agent";
|
|
225
|
+
readonly id: "mind-cli";
|
|
226
|
+
};
|
|
227
|
+
|
|
228
|
+
/**
|
|
229
|
+
* @module @kb-labs/mind-cli/cli/schemas
|
|
230
|
+
* Input/Output schemas for CLI commands
|
|
231
|
+
*/
|
|
232
|
+
|
|
233
|
+
declare const InitInputSchema: z.ZodObject<{
|
|
234
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
235
|
+
force: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
236
|
+
json: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
237
|
+
verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
238
|
+
quiet: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
239
|
+
}, "strip", z.ZodTypeAny, {
|
|
240
|
+
force: boolean;
|
|
241
|
+
json: boolean;
|
|
242
|
+
verbose: boolean;
|
|
243
|
+
quiet: boolean;
|
|
244
|
+
cwd?: string | undefined;
|
|
245
|
+
}, {
|
|
246
|
+
cwd?: string | undefined;
|
|
247
|
+
force?: boolean | undefined;
|
|
248
|
+
json?: boolean | undefined;
|
|
249
|
+
verbose?: boolean | undefined;
|
|
250
|
+
quiet?: boolean | undefined;
|
|
251
|
+
}>;
|
|
252
|
+
type InitInput = z.infer<typeof InitInputSchema>;
|
|
253
|
+
declare const InitOutputSchema: z.ZodObject<{
|
|
254
|
+
ok: z.ZodBoolean;
|
|
255
|
+
mindDir: z.ZodString;
|
|
256
|
+
cwd: z.ZodString;
|
|
257
|
+
}, "strip", z.ZodTypeAny, {
|
|
258
|
+
cwd: string;
|
|
259
|
+
ok: boolean;
|
|
260
|
+
mindDir: string;
|
|
261
|
+
}, {
|
|
262
|
+
cwd: string;
|
|
263
|
+
ok: boolean;
|
|
264
|
+
mindDir: string;
|
|
265
|
+
}>;
|
|
266
|
+
type InitOutput = z.infer<typeof InitOutputSchema>;
|
|
267
|
+
declare const UpdateInputSchema: z.ZodObject<{
|
|
268
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
269
|
+
since: z.ZodOptional<z.ZodString>;
|
|
270
|
+
timeBudget: z.ZodOptional<z.ZodNumber>;
|
|
271
|
+
json: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
272
|
+
verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
273
|
+
quiet: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
274
|
+
}, "strip", z.ZodTypeAny, {
|
|
275
|
+
json: boolean;
|
|
276
|
+
verbose: boolean;
|
|
277
|
+
quiet: boolean;
|
|
278
|
+
cwd?: string | undefined;
|
|
279
|
+
since?: string | undefined;
|
|
280
|
+
timeBudget?: number | undefined;
|
|
281
|
+
}, {
|
|
282
|
+
cwd?: string | undefined;
|
|
283
|
+
json?: boolean | undefined;
|
|
284
|
+
verbose?: boolean | undefined;
|
|
285
|
+
quiet?: boolean | undefined;
|
|
286
|
+
since?: string | undefined;
|
|
287
|
+
timeBudget?: number | undefined;
|
|
288
|
+
}>;
|
|
289
|
+
type UpdateInput = z.infer<typeof UpdateInputSchema>;
|
|
290
|
+
declare const UpdateOutputSchema: z.ZodObject<{
|
|
291
|
+
ok: z.ZodBoolean;
|
|
292
|
+
updated: z.ZodNumber;
|
|
293
|
+
duration: z.ZodNumber;
|
|
294
|
+
}, "strip", z.ZodTypeAny, {
|
|
295
|
+
ok: boolean;
|
|
296
|
+
updated: number;
|
|
297
|
+
duration: number;
|
|
298
|
+
}, {
|
|
299
|
+
ok: boolean;
|
|
300
|
+
updated: number;
|
|
301
|
+
duration: number;
|
|
302
|
+
}>;
|
|
303
|
+
type UpdateOutput = z.infer<typeof UpdateOutputSchema>;
|
|
304
|
+
declare const PackInputSchema: z.ZodObject<{
|
|
305
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
306
|
+
intent: z.ZodString;
|
|
307
|
+
product: z.ZodOptional<z.ZodString>;
|
|
308
|
+
preset: z.ZodOptional<z.ZodString>;
|
|
309
|
+
budget: z.ZodOptional<z.ZodNumber>;
|
|
310
|
+
withBundle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
311
|
+
out: z.ZodOptional<z.ZodString>;
|
|
312
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
313
|
+
json: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
314
|
+
verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
315
|
+
quiet: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
316
|
+
}, "strip", z.ZodTypeAny, {
|
|
317
|
+
json: boolean;
|
|
318
|
+
verbose: boolean;
|
|
319
|
+
quiet: boolean;
|
|
320
|
+
intent: string;
|
|
321
|
+
withBundle: boolean;
|
|
322
|
+
cwd?: string | undefined;
|
|
323
|
+
product?: string | undefined;
|
|
324
|
+
preset?: string | undefined;
|
|
325
|
+
budget?: number | undefined;
|
|
326
|
+
out?: string | undefined;
|
|
327
|
+
seed?: number | undefined;
|
|
328
|
+
}, {
|
|
329
|
+
intent: string;
|
|
330
|
+
cwd?: string | undefined;
|
|
331
|
+
json?: boolean | undefined;
|
|
332
|
+
verbose?: boolean | undefined;
|
|
333
|
+
quiet?: boolean | undefined;
|
|
334
|
+
product?: string | undefined;
|
|
335
|
+
preset?: string | undefined;
|
|
336
|
+
budget?: number | undefined;
|
|
337
|
+
withBundle?: boolean | undefined;
|
|
338
|
+
out?: string | undefined;
|
|
339
|
+
seed?: number | undefined;
|
|
340
|
+
}>;
|
|
341
|
+
type PackInput = z.infer<typeof PackInputSchema>;
|
|
342
|
+
declare const PackOutputSchema: z.ZodObject<{
|
|
343
|
+
ok: z.ZodBoolean;
|
|
344
|
+
packPath: z.ZodString;
|
|
345
|
+
size: z.ZodNumber;
|
|
346
|
+
}, "strip", z.ZodTypeAny, {
|
|
347
|
+
ok: boolean;
|
|
348
|
+
packPath: string;
|
|
349
|
+
size: number;
|
|
350
|
+
}, {
|
|
351
|
+
ok: boolean;
|
|
352
|
+
packPath: string;
|
|
353
|
+
size: number;
|
|
354
|
+
}>;
|
|
355
|
+
type PackOutput = z.infer<typeof PackOutputSchema>;
|
|
356
|
+
declare const FeedInputSchema: z.ZodObject<{
|
|
357
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
358
|
+
intent: z.ZodOptional<z.ZodString>;
|
|
359
|
+
product: z.ZodOptional<z.ZodString>;
|
|
360
|
+
preset: z.ZodOptional<z.ZodString>;
|
|
361
|
+
budget: z.ZodOptional<z.ZodNumber>;
|
|
362
|
+
withBundle: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
363
|
+
since: z.ZodOptional<z.ZodString>;
|
|
364
|
+
timeBudget: z.ZodOptional<z.ZodNumber>;
|
|
365
|
+
noUpdate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
366
|
+
out: z.ZodOptional<z.ZodString>;
|
|
367
|
+
seed: z.ZodOptional<z.ZodNumber>;
|
|
368
|
+
json: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
369
|
+
verbose: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
370
|
+
quiet: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
371
|
+
}, "strip", z.ZodTypeAny, {
|
|
372
|
+
json: boolean;
|
|
373
|
+
verbose: boolean;
|
|
374
|
+
quiet: boolean;
|
|
375
|
+
withBundle: boolean;
|
|
376
|
+
noUpdate: boolean;
|
|
377
|
+
cwd?: string | undefined;
|
|
378
|
+
since?: string | undefined;
|
|
379
|
+
timeBudget?: number | undefined;
|
|
380
|
+
intent?: string | undefined;
|
|
381
|
+
product?: string | undefined;
|
|
382
|
+
preset?: string | undefined;
|
|
383
|
+
budget?: number | undefined;
|
|
384
|
+
out?: string | undefined;
|
|
385
|
+
seed?: number | undefined;
|
|
386
|
+
}, {
|
|
387
|
+
cwd?: string | undefined;
|
|
388
|
+
json?: boolean | undefined;
|
|
389
|
+
verbose?: boolean | undefined;
|
|
390
|
+
quiet?: boolean | undefined;
|
|
391
|
+
since?: string | undefined;
|
|
392
|
+
timeBudget?: number | undefined;
|
|
393
|
+
intent?: string | undefined;
|
|
394
|
+
product?: string | undefined;
|
|
395
|
+
preset?: string | undefined;
|
|
396
|
+
budget?: number | undefined;
|
|
397
|
+
withBundle?: boolean | undefined;
|
|
398
|
+
out?: string | undefined;
|
|
399
|
+
seed?: number | undefined;
|
|
400
|
+
noUpdate?: boolean | undefined;
|
|
401
|
+
}>;
|
|
402
|
+
type FeedInput = z.infer<typeof FeedInputSchema>;
|
|
403
|
+
declare const FeedOutputSchema: z.ZodObject<{
|
|
404
|
+
ok: z.ZodBoolean;
|
|
405
|
+
packPath: z.ZodString;
|
|
406
|
+
updated: z.ZodNumber;
|
|
407
|
+
duration: z.ZodNumber;
|
|
408
|
+
}, "strip", z.ZodTypeAny, {
|
|
409
|
+
ok: boolean;
|
|
410
|
+
updated: number;
|
|
411
|
+
duration: number;
|
|
412
|
+
packPath: string;
|
|
413
|
+
}, {
|
|
414
|
+
ok: boolean;
|
|
415
|
+
updated: number;
|
|
416
|
+
duration: number;
|
|
417
|
+
packPath: string;
|
|
418
|
+
}>;
|
|
419
|
+
type FeedOutput = z.infer<typeof FeedOutputSchema>;
|
|
420
|
+
declare const QueryInputSchema: z.ZodObject<{
|
|
421
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
422
|
+
query: z.ZodEnum<["impact", "scope", "exports", "externals", "chain", "meta", "docs"]>;
|
|
423
|
+
file: z.ZodOptional<z.ZodString>;
|
|
424
|
+
path: z.ZodOptional<z.ZodString>;
|
|
425
|
+
scope: z.ZodOptional<z.ZodString>;
|
|
426
|
+
product: z.ZodOptional<z.ZodString>;
|
|
427
|
+
tag: z.ZodOptional<z.ZodString>;
|
|
428
|
+
type: z.ZodOptional<z.ZodString>;
|
|
429
|
+
filter: z.ZodOptional<z.ZodString>;
|
|
430
|
+
limit: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
431
|
+
depth: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
432
|
+
cacheMode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["ci", "local"]>>>;
|
|
433
|
+
cacheTtl: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
|
|
434
|
+
noCache: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
435
|
+
paths: z.ZodDefault<z.ZodOptional<z.ZodEnum<["id", "absolute"]>>>;
|
|
436
|
+
aiMode: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
437
|
+
toon: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
438
|
+
toonSidecar: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
439
|
+
json: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
440
|
+
compact: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
441
|
+
quiet: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
442
|
+
}, "strip", z.ZodTypeAny, {
|
|
443
|
+
json: boolean;
|
|
444
|
+
quiet: boolean;
|
|
445
|
+
query: "scope" | "meta" | "impact" | "exports" | "externals" | "chain" | "docs";
|
|
446
|
+
limit: number;
|
|
447
|
+
depth: number;
|
|
448
|
+
cacheMode: "ci" | "local";
|
|
449
|
+
cacheTtl: number;
|
|
450
|
+
noCache: boolean;
|
|
451
|
+
paths: "id" | "absolute";
|
|
452
|
+
aiMode: boolean;
|
|
453
|
+
toon: boolean;
|
|
454
|
+
toonSidecar: boolean;
|
|
455
|
+
compact: boolean;
|
|
456
|
+
scope?: string | undefined;
|
|
457
|
+
cwd?: string | undefined;
|
|
458
|
+
path?: string | undefined;
|
|
459
|
+
type?: string | undefined;
|
|
460
|
+
filter?: string | undefined;
|
|
461
|
+
product?: string | undefined;
|
|
462
|
+
file?: string | undefined;
|
|
463
|
+
tag?: string | undefined;
|
|
464
|
+
}, {
|
|
465
|
+
query: "scope" | "meta" | "impact" | "exports" | "externals" | "chain" | "docs";
|
|
466
|
+
scope?: string | undefined;
|
|
467
|
+
cwd?: string | undefined;
|
|
468
|
+
json?: boolean | undefined;
|
|
469
|
+
quiet?: boolean | undefined;
|
|
470
|
+
path?: string | undefined;
|
|
471
|
+
type?: string | undefined;
|
|
472
|
+
filter?: string | undefined;
|
|
473
|
+
product?: string | undefined;
|
|
474
|
+
file?: string | undefined;
|
|
475
|
+
tag?: string | undefined;
|
|
476
|
+
limit?: number | undefined;
|
|
477
|
+
depth?: number | undefined;
|
|
478
|
+
cacheMode?: "ci" | "local" | undefined;
|
|
479
|
+
cacheTtl?: number | undefined;
|
|
480
|
+
noCache?: boolean | undefined;
|
|
481
|
+
paths?: "id" | "absolute" | undefined;
|
|
482
|
+
aiMode?: boolean | undefined;
|
|
483
|
+
toon?: boolean | undefined;
|
|
484
|
+
toonSidecar?: boolean | undefined;
|
|
485
|
+
compact?: boolean | undefined;
|
|
486
|
+
}>;
|
|
487
|
+
type QueryInput = z.infer<typeof QueryInputSchema>;
|
|
488
|
+
declare const QueryOutputSchema: z.ZodObject<{
|
|
489
|
+
ok: z.ZodBoolean;
|
|
490
|
+
query: z.ZodString;
|
|
491
|
+
result: z.ZodAny;
|
|
492
|
+
toonPath: z.ZodOptional<z.ZodString>;
|
|
493
|
+
}, "strip", z.ZodTypeAny, {
|
|
494
|
+
ok: boolean;
|
|
495
|
+
query: string;
|
|
496
|
+
result?: any;
|
|
497
|
+
toonPath?: string | undefined;
|
|
498
|
+
}, {
|
|
499
|
+
ok: boolean;
|
|
500
|
+
query: string;
|
|
501
|
+
result?: any;
|
|
502
|
+
toonPath?: string | undefined;
|
|
503
|
+
}>;
|
|
504
|
+
type QueryOutput = z.infer<typeof QueryOutputSchema>;
|
|
505
|
+
declare const VerifyInputSchema: z.ZodObject<{
|
|
506
|
+
cwd: z.ZodOptional<z.ZodString>;
|
|
507
|
+
json: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
508
|
+
quiet: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
509
|
+
}, "strip", z.ZodTypeAny, {
|
|
510
|
+
json: boolean;
|
|
511
|
+
quiet: boolean;
|
|
512
|
+
cwd?: string | undefined;
|
|
513
|
+
}, {
|
|
514
|
+
cwd?: string | undefined;
|
|
515
|
+
json?: boolean | undefined;
|
|
516
|
+
quiet?: boolean | undefined;
|
|
517
|
+
}>;
|
|
518
|
+
type VerifyInput = z.infer<typeof VerifyInputSchema>;
|
|
519
|
+
declare const VerifyOutputSchema: z.ZodObject<{
|
|
520
|
+
ok: z.ZodBoolean;
|
|
521
|
+
consistent: z.ZodBoolean;
|
|
522
|
+
errors: z.ZodArray<z.ZodObject<{
|
|
523
|
+
file: z.ZodString;
|
|
524
|
+
message: z.ZodString;
|
|
525
|
+
}, "strip", z.ZodTypeAny, {
|
|
526
|
+
message: string;
|
|
527
|
+
file: string;
|
|
528
|
+
}, {
|
|
529
|
+
message: string;
|
|
530
|
+
file: string;
|
|
531
|
+
}>, "many">;
|
|
532
|
+
}, "strip", z.ZodTypeAny, {
|
|
533
|
+
ok: boolean;
|
|
534
|
+
consistent: boolean;
|
|
535
|
+
errors: {
|
|
536
|
+
message: string;
|
|
537
|
+
file: string;
|
|
538
|
+
}[];
|
|
539
|
+
}, {
|
|
540
|
+
ok: boolean;
|
|
541
|
+
consistent: boolean;
|
|
542
|
+
errors: {
|
|
543
|
+
message: string;
|
|
544
|
+
file: string;
|
|
545
|
+
}[];
|
|
546
|
+
}>;
|
|
547
|
+
type VerifyOutput = z.infer<typeof VerifyOutputSchema>;
|
|
548
|
+
|
|
549
|
+
declare const colors: {
|
|
550
|
+
red: (text: string) => string;
|
|
551
|
+
green: (text: string) => string;
|
|
552
|
+
yellow: (text: string) => string;
|
|
553
|
+
blue: (text: string) => string;
|
|
554
|
+
cyan: (text: string) => string;
|
|
555
|
+
gray: (text: string) => string;
|
|
556
|
+
bold: (text: string) => string;
|
|
557
|
+
dim: (text: string) => string;
|
|
558
|
+
};
|
|
559
|
+
declare const safeColors: {
|
|
560
|
+
red: (text: string) => string;
|
|
561
|
+
green: (text: string) => string;
|
|
562
|
+
yellow: (text: string) => string;
|
|
563
|
+
blue: (text: string) => string;
|
|
564
|
+
cyan: (text: string) => string;
|
|
565
|
+
gray: (text: string) => string;
|
|
566
|
+
bold: (text: string) => string;
|
|
567
|
+
dim: (text: string) => string;
|
|
568
|
+
};
|
|
569
|
+
declare const safeSymbols: {
|
|
570
|
+
check: string;
|
|
571
|
+
cross: string;
|
|
572
|
+
arrow: string;
|
|
573
|
+
bullet: string;
|
|
574
|
+
info: string;
|
|
575
|
+
warning: string;
|
|
576
|
+
error: string;
|
|
577
|
+
};
|
|
578
|
+
declare class TimingTracker {
|
|
579
|
+
private startTime;
|
|
580
|
+
constructor();
|
|
581
|
+
getElapsed(): number;
|
|
582
|
+
getElapsedMs(): number;
|
|
583
|
+
}
|
|
584
|
+
declare function formatTiming(ms: number): string;
|
|
585
|
+
declare function box(textOrTitle: string, maybeLines?: string[] | string): string;
|
|
586
|
+
declare function keyValue(entries: Record<string, string | number>): string[];
|
|
587
|
+
declare function keyValue(key: string, value: string | number): string;
|
|
588
|
+
declare function createSpinner(text: string): {
|
|
589
|
+
stop: (finalText?: string) => void;
|
|
590
|
+
};
|
|
591
|
+
|
|
592
|
+
export { ANALYTICS_ACTOR, ANALYTICS_EVENTS, ANALYTICS_PREFIX, ANALYTICS_SUFFIX, type AdapterInfo, type AgentRagQueryOptions, type AgentRagQueryResult, type AnalyticsEventType, type FeedInput, FeedInputSchema, type FeedOutput, FeedOutputSchema, type InitInput, InitInputSchema, type InitOutput, InitOutputSchema, MIND_PRODUCT_ID, type MindRuntime, type MindRuntimeOptions, type MindRuntimeService, type PackInput, PackInputSchema, type PackOutput, PackOutputSchema, type QueryInput, QueryInputSchema, type QueryOutput, QueryOutputSchema, type RagIndexOptions, type RagIndexOptionsWithRuntime, type RagIndexResult, type RagIndexStats, type RagQueryOptions, type RagQueryResult, TimingTracker, type UpdateInput, UpdateInputSchema, type UpdateOutput, UpdateOutputSchema, type VerifyInput, VerifyInputSchema, type VerifyOutput, VerifyOutputSchema, box, colors, createMindRuntime, createSpinner, formatTiming, keyValue, runAgentRagQuery, runRagIndex, runRagQuery, safeColors, safeSymbols, tryUseConfig, useConfig, useSyncConfig };
|