@almadar/agent 1.2.2 → 1.3.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.
@@ -0,0 +1,2320 @@
1
+ import { S as SubagentEventCallback$1, O as OrbitalCompleteCallback, a as DomainOrbitalEventCallback, D as DomainOrbitalCompleteCallback } from './orbital-subagent-CCo-ONJY.js';
2
+ import * as _langchain_core_tools from '@langchain/core/tools';
3
+ import * as zod from 'zod';
4
+ import { z } from 'zod';
5
+ import { Trait, OrbitalDefinition, FullOrbitalUnit } from '@almadar/core/types';
6
+ import { S as SSEEventType } from './api-types-DVdGNr2M.js';
7
+ import { LLMProvider } from '@almadar/llm';
8
+
9
+ type TraitEventCallback = (traitName: string, traitIndex: number, totalTraits: number, event: {
10
+ type: Exclude<SSEEventType, 'subagent_event'>;
11
+ data: Record<string, unknown>;
12
+ timestamp: number;
13
+ }) => void;
14
+ type TraitCompleteCallback = (trait: Trait, traitName: string, traitIndex: number, totalTraits: number) => void | Promise<void>;
15
+ interface TraitSubagentToolOptions {
16
+ onTraitEvent?: TraitEventCallback;
17
+ onTraitComplete?: TraitCompleteCallback;
18
+ }
19
+ interface TraitSpec {
20
+ name: string;
21
+ description: string;
22
+ category?: string;
23
+ states?: string[];
24
+ events?: string[];
25
+ requiredFields?: Array<{
26
+ name: string;
27
+ type: string;
28
+ description?: string;
29
+ }>;
30
+ needsTicks?: boolean;
31
+ needsEmit?: boolean;
32
+ needsListens?: boolean;
33
+ }
34
+ /**
35
+ * Create a tool for generating custom traits.
36
+ * Uses @almadar/llm LLMClient directly.
37
+ */
38
+ declare function createTraitSubagentTool(options?: TraitSubagentToolOptions): {
39
+ tool: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
40
+ traitSpec: z.ZodObject<{
41
+ name: z.ZodString;
42
+ description: z.ZodString;
43
+ category: z.ZodOptional<z.ZodString>;
44
+ states: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
45
+ events: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
46
+ requiredFields: z.ZodOptional<z.ZodArray<z.ZodObject<{
47
+ name: z.ZodString;
48
+ type: z.ZodString;
49
+ description: z.ZodOptional<z.ZodString>;
50
+ }, "strip", z.ZodTypeAny, {
51
+ type: string;
52
+ name: string;
53
+ description?: string | undefined;
54
+ }, {
55
+ type: string;
56
+ name: string;
57
+ description?: string | undefined;
58
+ }>, "many">>;
59
+ needsTicks: z.ZodOptional<z.ZodBoolean>;
60
+ needsEmit: z.ZodOptional<z.ZodBoolean>;
61
+ needsListens: z.ZodOptional<z.ZodBoolean>;
62
+ }, "strip", z.ZodTypeAny, {
63
+ name: string;
64
+ description: string;
65
+ states?: string[] | undefined;
66
+ events?: string[] | undefined;
67
+ category?: string | undefined;
68
+ requiredFields?: {
69
+ type: string;
70
+ name: string;
71
+ description?: string | undefined;
72
+ }[] | undefined;
73
+ needsTicks?: boolean | undefined;
74
+ needsEmit?: boolean | undefined;
75
+ needsListens?: boolean | undefined;
76
+ }, {
77
+ name: string;
78
+ description: string;
79
+ states?: string[] | undefined;
80
+ events?: string[] | undefined;
81
+ category?: string | undefined;
82
+ requiredFields?: {
83
+ type: string;
84
+ name: string;
85
+ description?: string | undefined;
86
+ }[] | undefined;
87
+ needsTicks?: boolean | undefined;
88
+ needsEmit?: boolean | undefined;
89
+ needsListens?: boolean | undefined;
90
+ }>;
91
+ traitIndex: z.ZodOptional<z.ZodNumber>;
92
+ totalTraits: z.ZodOptional<z.ZodNumber>;
93
+ }, "strip", z.ZodTypeAny, {
94
+ traitSpec: {
95
+ name: string;
96
+ description: string;
97
+ states?: string[] | undefined;
98
+ events?: string[] | undefined;
99
+ category?: string | undefined;
100
+ requiredFields?: {
101
+ type: string;
102
+ name: string;
103
+ description?: string | undefined;
104
+ }[] | undefined;
105
+ needsTicks?: boolean | undefined;
106
+ needsEmit?: boolean | undefined;
107
+ needsListens?: boolean | undefined;
108
+ };
109
+ traitIndex?: number | undefined;
110
+ totalTraits?: number | undefined;
111
+ }, {
112
+ traitSpec: {
113
+ name: string;
114
+ description: string;
115
+ states?: string[] | undefined;
116
+ events?: string[] | undefined;
117
+ category?: string | undefined;
118
+ requiredFields?: {
119
+ type: string;
120
+ name: string;
121
+ description?: string | undefined;
122
+ }[] | undefined;
123
+ needsTicks?: boolean | undefined;
124
+ needsEmit?: boolean | undefined;
125
+ needsListens?: boolean | undefined;
126
+ };
127
+ traitIndex?: number | undefined;
128
+ totalTraits?: number | undefined;
129
+ }>, {
130
+ traitSpec: {
131
+ name: string;
132
+ description: string;
133
+ states?: string[] | undefined;
134
+ events?: string[] | undefined;
135
+ category?: string | undefined;
136
+ requiredFields?: {
137
+ type: string;
138
+ name: string;
139
+ description?: string | undefined;
140
+ }[] | undefined;
141
+ needsTicks?: boolean | undefined;
142
+ needsEmit?: boolean | undefined;
143
+ needsListens?: boolean | undefined;
144
+ };
145
+ traitIndex?: number | undefined;
146
+ totalTraits?: number | undefined;
147
+ }, {
148
+ traitSpec: {
149
+ name: string;
150
+ description: string;
151
+ states?: string[] | undefined;
152
+ events?: string[] | undefined;
153
+ category?: string | undefined;
154
+ requiredFields?: {
155
+ type: string;
156
+ name: string;
157
+ description?: string | undefined;
158
+ }[] | undefined;
159
+ needsTicks?: boolean | undefined;
160
+ needsEmit?: boolean | undefined;
161
+ needsListens?: boolean | undefined;
162
+ };
163
+ traitIndex?: number | undefined;
164
+ totalTraits?: number | undefined;
165
+ }, string, "generate_custom_trait">;
166
+ setEventCallback: (callback: TraitEventCallback) => void;
167
+ setTraitCompleteCallback: (callback: TraitCompleteCallback) => void;
168
+ };
169
+ /**
170
+ * Create a helper to wrap trait events into SSE format.
171
+ */
172
+ declare function createTraitEventWrapper(writeEvent: (event: {
173
+ type: string;
174
+ timestamp: number;
175
+ data: unknown;
176
+ }) => void): TraitEventCallback;
177
+
178
+ /**
179
+ * Check if a command contains paths outside the workspace.
180
+ * Returns an error message if unsafe, null if safe.
181
+ */
182
+ declare function validateCommandPaths(command: string, workDir: string): string | null;
183
+ /**
184
+ * Create an execute tool that runs shell commands in the workspace directory.
185
+ */
186
+ declare function createExecuteTool(workDir: string): _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
187
+ command: z.ZodString;
188
+ timeout: z.ZodOptional<z.ZodNumber>;
189
+ }, "strip", z.ZodTypeAny, {
190
+ command: string;
191
+ timeout?: number | undefined;
192
+ }, {
193
+ command: string;
194
+ timeout?: number | undefined;
195
+ }>, {
196
+ command: string;
197
+ timeout?: number | undefined;
198
+ }, {
199
+ command: string;
200
+ timeout?: number | undefined;
201
+ }, string, "execute">;
202
+
203
+ /**
204
+ * Create a validate_schema tool that validates schema.json in the workspace.
205
+ *
206
+ * Uses `npx @almadar/cli validate --json` for comprehensive Rust-based validation.
207
+ *
208
+ * Has a built-in cap of MAX_VALIDATION_ATTEMPTS to prevent
209
+ * infinite validation-fix loops.
210
+ */
211
+ declare function createValidateSchemaTool(workDir: string): _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{}, "strip", z.ZodTypeAny, {}, {}>, {}, {}, string, "validate_schema">;
212
+
213
+ /**
214
+ * Create a tool that generates KFlow schemas using structured output.
215
+ */
216
+ declare function createGenerateSchemaTool(): _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
217
+ userRequest: z.ZodString;
218
+ suggestedTraits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
219
+ suggestedEntities: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
220
+ suggestedPages: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
221
+ suggestedPatterns: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
222
+ additionalInstructions: z.ZodOptional<z.ZodString>;
223
+ existingSchema: z.ZodOptional<z.ZodString>;
224
+ }, "strip", z.ZodTypeAny, {
225
+ userRequest: string;
226
+ suggestedTraits?: string[] | undefined;
227
+ suggestedEntities?: string[] | undefined;
228
+ suggestedPages?: string[] | undefined;
229
+ suggestedPatterns?: string[] | undefined;
230
+ additionalInstructions?: string | undefined;
231
+ existingSchema?: string | undefined;
232
+ }, {
233
+ userRequest: string;
234
+ suggestedTraits?: string[] | undefined;
235
+ suggestedEntities?: string[] | undefined;
236
+ suggestedPages?: string[] | undefined;
237
+ suggestedPatterns?: string[] | undefined;
238
+ additionalInstructions?: string | undefined;
239
+ existingSchema?: string | undefined;
240
+ }>, {
241
+ userRequest: string;
242
+ suggestedTraits?: string[] | undefined;
243
+ suggestedEntities?: string[] | undefined;
244
+ suggestedPages?: string[] | undefined;
245
+ suggestedPatterns?: string[] | undefined;
246
+ additionalInstructions?: string | undefined;
247
+ existingSchema?: string | undefined;
248
+ }, {
249
+ userRequest: string;
250
+ suggestedTraits?: string[] | undefined;
251
+ suggestedEntities?: string[] | undefined;
252
+ suggestedPages?: string[] | undefined;
253
+ suggestedPatterns?: string[] | undefined;
254
+ additionalInstructions?: string | undefined;
255
+ existingSchema?: string | undefined;
256
+ }, string, "generate_schema">;
257
+
258
+ /**
259
+ * Create a finish_task tool that signals the agent has completed the workflow.
260
+ *
261
+ * Automatically combines orbitals from:
262
+ * 1. .orbitals/ directory (for kflow-orbitals skill)
263
+ * 2. domain.txt (for lean skills) - converted to schema via convertDomainToSchema
264
+ */
265
+ declare function createFinishTaskTool(workDir: string | undefined): _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
266
+ summary: z.ZodString;
267
+ schemaPath: z.ZodOptional<z.ZodString>;
268
+ }, "strip", z.ZodTypeAny, {
269
+ summary: string;
270
+ schemaPath?: string | undefined;
271
+ }, {
272
+ summary: string;
273
+ schemaPath?: string | undefined;
274
+ }>, {
275
+ summary: string;
276
+ schemaPath?: string | undefined;
277
+ }, {
278
+ summary: string;
279
+ schemaPath?: string | undefined;
280
+ }, {
281
+ success: boolean;
282
+ status: string;
283
+ message: string;
284
+ summary: string;
285
+ autoCombined: boolean;
286
+ source: "domain" | "orbitals" | undefined;
287
+ stats: {
288
+ totalOrbitals: number;
289
+ totalEntities: number;
290
+ totalPages: number;
291
+ totalTraits: number;
292
+ } | undefined;
293
+ validation: {
294
+ valid: boolean;
295
+ errorCount: number;
296
+ warningCount: number;
297
+ } | undefined;
298
+ designQuality: {
299
+ propCorrections: number;
300
+ compositionWarnings: string[];
301
+ };
302
+ schemaPath: string | undefined;
303
+ nextAction: string;
304
+ }, "finish_task">;
305
+
306
+ /**
307
+ * Shared Types for Orbital Generation
308
+ *
309
+ * Common type definitions used by both sequential and batch generation.
310
+ *
311
+ * @packageDocumentation
312
+ */
313
+
314
+ /** OrbitalUnit in generation context is always a full OrbitalDefinition */
315
+ type OrbitalUnit = OrbitalDefinition;
316
+ /**
317
+ * A structured log entry from the generation process.
318
+ * Used for debugging and observability of subagent reasoning.
319
+ */
320
+ interface GenerationLog {
321
+ /** Timestamp of the log entry */
322
+ timestamp: number;
323
+ /** Log level */
324
+ level: 'info' | 'warn' | 'error' | 'debug';
325
+ /** Log message */
326
+ message: string;
327
+ /** Optional structured data */
328
+ data?: Record<string, unknown>;
329
+ }
330
+ /**
331
+ * Extracted requirements from the analysis phase.
332
+ * Matches ExtractedRequirements from agents/orchestrator/shared/requirements.ts
333
+ */
334
+ interface ExtractedRequirements {
335
+ /** Entity names to create */
336
+ entities?: string[];
337
+ /** State names that should exist */
338
+ states?: string[];
339
+ /** Event/action names */
340
+ events?: string[];
341
+ /** Business rules (become guards) */
342
+ guards?: string[];
343
+ /** Page types needed */
344
+ pages?: string[];
345
+ /** Notifications/side-effects */
346
+ effects?: string[];
347
+ /** Raw requirement statements */
348
+ rawRequirements?: string[];
349
+ }
350
+ /**
351
+ * Common options for all generation modes.
352
+ */
353
+ interface BaseGenerationOptions {
354
+ /** Maximum tokens for generation */
355
+ maxTokens?: number;
356
+ /** Enable validation after generation */
357
+ validate?: boolean;
358
+ /** Callback for real-time log streaming */
359
+ onLog?: (log: GenerationLog, orbitalName?: string) => void;
360
+ /** Optional requirements relevant to this orbital */
361
+ requirements?: Partial<ExtractedRequirements>;
362
+ }
363
+ /**
364
+ * Options for single orbital generation.
365
+ */
366
+ interface OrbitalGenerationOptions extends BaseGenerationOptions {
367
+ }
368
+ /**
369
+ * Token usage statistics.
370
+ */
371
+ interface TokenUsage {
372
+ promptTokens: number;
373
+ completionTokens: number;
374
+ totalTokens: number;
375
+ }
376
+ /**
377
+ * Validation result for generated orbital.
378
+ */
379
+ interface ValidationResult {
380
+ valid: boolean;
381
+ errorCount: number;
382
+ warningCount: number;
383
+ }
384
+ /**
385
+ * Result of generating a single orbital.
386
+ */
387
+ interface OrbitalGenerationResult {
388
+ /** Generated full orbital unit */
389
+ orbital: FullOrbitalUnit;
390
+ /** Fingerprint used for caching */
391
+ fingerprint: string;
392
+ /** Whether template guidance was used */
393
+ usedTemplate: boolean;
394
+ /** Token usage */
395
+ usage?: TokenUsage;
396
+ /** Validation result */
397
+ validation?: ValidationResult;
398
+ /** Structured logs from generation */
399
+ logs: GenerationLog[];
400
+ }
401
+
402
+ type SubagentEventCallback = (orbitalName: string, orbitalIndex: number, totalOrbitals: number, event: {
403
+ type: Exclude<SSEEventType, 'subagent_event'>;
404
+ data: Record<string, unknown>;
405
+ timestamp: number;
406
+ }) => void;
407
+ type BatchCompleteCallback = (orbitals: OrbitalDefinition[], batchIndex: number, totalBatches: number) => Promise<void> | void;
408
+ interface OrbitalBatchSubagentToolOptions {
409
+ onSubagentEvent?: SubagentEventCallback;
410
+ onBatchComplete?: BatchCompleteCallback;
411
+ requirements?: Partial<ExtractedRequirements>;
412
+ provider?: LLMProvider;
413
+ model?: string;
414
+ workDir?: string;
415
+ }
416
+ /**
417
+ * Create a tool for batch orbital generation with event streaming.
418
+ */
419
+ declare function createOrbitalBatchSubagentTool(options?: OrbitalBatchSubagentToolOptions): {
420
+ tool: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
421
+ orbitals: z.ZodArray<z.ZodAny, "many">;
422
+ options: z.ZodOptional<z.ZodObject<{
423
+ mode: z.ZodDefault<z.ZodOptional<z.ZodEnum<["single-call", "parallel-individual", "adaptive"]>>>;
424
+ batchSize: z.ZodOptional<z.ZodNumber>;
425
+ maxConcurrency: z.ZodOptional<z.ZodNumber>;
426
+ preserveRelationships: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
427
+ }, "strip", z.ZodTypeAny, {
428
+ mode: "single-call" | "parallel-individual" | "adaptive";
429
+ preserveRelationships: boolean;
430
+ batchSize?: number | undefined;
431
+ maxConcurrency?: number | undefined;
432
+ }, {
433
+ batchSize?: number | undefined;
434
+ mode?: "single-call" | "parallel-individual" | "adaptive" | undefined;
435
+ preserveRelationships?: boolean | undefined;
436
+ maxConcurrency?: number | undefined;
437
+ }>>;
438
+ }, "strip", z.ZodTypeAny, {
439
+ orbitals: any[];
440
+ options?: {
441
+ mode: "single-call" | "parallel-individual" | "adaptive";
442
+ preserveRelationships: boolean;
443
+ batchSize?: number | undefined;
444
+ maxConcurrency?: number | undefined;
445
+ } | undefined;
446
+ }, {
447
+ orbitals: any[];
448
+ options?: {
449
+ batchSize?: number | undefined;
450
+ mode?: "single-call" | "parallel-individual" | "adaptive" | undefined;
451
+ preserveRelationships?: boolean | undefined;
452
+ maxConcurrency?: number | undefined;
453
+ } | undefined;
454
+ }>, {
455
+ orbitals: any[];
456
+ options?: {
457
+ mode: "single-call" | "parallel-individual" | "adaptive";
458
+ preserveRelationships: boolean;
459
+ batchSize?: number | undefined;
460
+ maxConcurrency?: number | undefined;
461
+ } | undefined;
462
+ }, {
463
+ orbitals: any[];
464
+ options?: {
465
+ batchSize?: number | undefined;
466
+ mode?: "single-call" | "parallel-individual" | "adaptive" | undefined;
467
+ preserveRelationships?: boolean | undefined;
468
+ maxConcurrency?: number | undefined;
469
+ } | undefined;
470
+ }, string, "generate_orbitals_batch">;
471
+ setEventCallback: (callback: SubagentEventCallback) => void;
472
+ setBatchCompleteCallback: (callback: BatchCompleteCallback) => void;
473
+ };
474
+
475
+ /**
476
+ * Create the construct_combined_schema tool.
477
+ */
478
+ declare function createCombineSchemasTool(workDir?: string): _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
479
+ orbitals: z.ZodOptional<z.ZodArray<z.ZodObject<{
480
+ name: z.ZodString;
481
+ description: z.ZodOptional<z.ZodString>;
482
+ entity: z.ZodObject<{
483
+ name: z.ZodString;
484
+ collection: z.ZodOptional<z.ZodString>;
485
+ fields: z.ZodArray<z.ZodAny, "many">;
486
+ timestamps: z.ZodOptional<z.ZodBoolean>;
487
+ }, "strip", z.ZodTypeAny, {
488
+ name: string;
489
+ fields: any[];
490
+ collection?: string | undefined;
491
+ timestamps?: boolean | undefined;
492
+ }, {
493
+ name: string;
494
+ fields: any[];
495
+ collection?: string | undefined;
496
+ timestamps?: boolean | undefined;
497
+ }>;
498
+ traits: z.ZodArray<z.ZodAny, "many">;
499
+ pages: z.ZodArray<z.ZodAny, "many">;
500
+ emits: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
501
+ listens: z.ZodOptional<z.ZodArray<z.ZodAny, "many">>;
502
+ }, "strip", z.ZodTypeAny, {
503
+ pages: any[];
504
+ traits: any[];
505
+ name: string;
506
+ entity: {
507
+ name: string;
508
+ fields: any[];
509
+ collection?: string | undefined;
510
+ timestamps?: boolean | undefined;
511
+ };
512
+ description?: string | undefined;
513
+ emits?: string[] | undefined;
514
+ listens?: any[] | undefined;
515
+ }, {
516
+ pages: any[];
517
+ traits: any[];
518
+ name: string;
519
+ entity: {
520
+ name: string;
521
+ fields: any[];
522
+ collection?: string | undefined;
523
+ timestamps?: boolean | undefined;
524
+ };
525
+ description?: string | undefined;
526
+ emits?: string[] | undefined;
527
+ listens?: any[] | undefined;
528
+ }>, "many">>;
529
+ name: z.ZodOptional<z.ZodString>;
530
+ description: z.ZodOptional<z.ZodString>;
531
+ version: z.ZodOptional<z.ZodString>;
532
+ theme: z.ZodOptional<z.ZodString>;
533
+ defaultRoute: z.ZodOptional<z.ZodString>;
534
+ validate: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
535
+ }, "strip", z.ZodTypeAny, {
536
+ validate: boolean;
537
+ version?: string | undefined;
538
+ name?: string | undefined;
539
+ description?: string | undefined;
540
+ theme?: string | undefined;
541
+ orbitals?: {
542
+ pages: any[];
543
+ traits: any[];
544
+ name: string;
545
+ entity: {
546
+ name: string;
547
+ fields: any[];
548
+ collection?: string | undefined;
549
+ timestamps?: boolean | undefined;
550
+ };
551
+ description?: string | undefined;
552
+ emits?: string[] | undefined;
553
+ listens?: any[] | undefined;
554
+ }[] | undefined;
555
+ defaultRoute?: string | undefined;
556
+ }, {
557
+ version?: string | undefined;
558
+ name?: string | undefined;
559
+ description?: string | undefined;
560
+ validate?: boolean | undefined;
561
+ theme?: string | undefined;
562
+ orbitals?: {
563
+ pages: any[];
564
+ traits: any[];
565
+ name: string;
566
+ entity: {
567
+ name: string;
568
+ fields: any[];
569
+ collection?: string | undefined;
570
+ timestamps?: boolean | undefined;
571
+ };
572
+ description?: string | undefined;
573
+ emits?: string[] | undefined;
574
+ listens?: any[] | undefined;
575
+ }[] | undefined;
576
+ defaultRoute?: string | undefined;
577
+ }>, {
578
+ validate: boolean;
579
+ version?: string | undefined;
580
+ name?: string | undefined;
581
+ description?: string | undefined;
582
+ theme?: string | undefined;
583
+ orbitals?: {
584
+ pages: any[];
585
+ traits: any[];
586
+ name: string;
587
+ entity: {
588
+ name: string;
589
+ fields: any[];
590
+ collection?: string | undefined;
591
+ timestamps?: boolean | undefined;
592
+ };
593
+ description?: string | undefined;
594
+ emits?: string[] | undefined;
595
+ listens?: any[] | undefined;
596
+ }[] | undefined;
597
+ defaultRoute?: string | undefined;
598
+ }, {
599
+ version?: string | undefined;
600
+ name?: string | undefined;
601
+ description?: string | undefined;
602
+ validate?: boolean | undefined;
603
+ theme?: string | undefined;
604
+ orbitals?: {
605
+ pages: any[];
606
+ traits: any[];
607
+ name: string;
608
+ entity: {
609
+ name: string;
610
+ fields: any[];
611
+ collection?: string | undefined;
612
+ timestamps?: boolean | undefined;
613
+ };
614
+ description?: string | undefined;
615
+ emits?: string[] | undefined;
616
+ listens?: any[] | undefined;
617
+ }[] | undefined;
618
+ defaultRoute?: string | undefined;
619
+ }, string, "construct_combined_schema">;
620
+
621
+ declare function createQuerySchemaStructureTool(workDir: string): _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
622
+ file: z.ZodString;
623
+ }, "strip", z.ZodTypeAny, {
624
+ file: string;
625
+ }, {
626
+ file: string;
627
+ }>, {
628
+ file: string;
629
+ }, {
630
+ file: string;
631
+ }, string, "query_schema_structure">;
632
+ declare function createExtractChunkTool(workDir: string): _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
633
+ file: z.ZodString;
634
+ type: z.ZodEnum<["orbital", "trait", "inline-trait"]>;
635
+ name: z.ZodString;
636
+ parentOrbital: z.ZodOptional<z.ZodString>;
637
+ includeTraits: z.ZodDefault<z.ZodBoolean>;
638
+ }, "strip", z.ZodTypeAny, {
639
+ type: "orbital" | "trait" | "inline-trait";
640
+ name: string;
641
+ file: string;
642
+ includeTraits: boolean;
643
+ parentOrbital?: string | undefined;
644
+ }, {
645
+ type: "orbital" | "trait" | "inline-trait";
646
+ name: string;
647
+ file: string;
648
+ parentOrbital?: string | undefined;
649
+ includeTraits?: boolean | undefined;
650
+ }>, {
651
+ type: "orbital" | "trait" | "inline-trait";
652
+ name: string;
653
+ file: string;
654
+ includeTraits: boolean;
655
+ parentOrbital?: string | undefined;
656
+ }, {
657
+ type: "orbital" | "trait" | "inline-trait";
658
+ name: string;
659
+ file: string;
660
+ parentOrbital?: string | undefined;
661
+ includeTraits?: boolean | undefined;
662
+ }, string, "extract_chunk">;
663
+ declare function createApplyChunkTool(workDir: string): _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
664
+ chunkId: z.ZodString;
665
+ }, "strip", z.ZodTypeAny, {
666
+ chunkId: string;
667
+ }, {
668
+ chunkId: string;
669
+ }>, {
670
+ chunkId: string;
671
+ }, {
672
+ chunkId: string;
673
+ }, string, "apply_chunk">;
674
+ declare function createSchemaChunkingTools(workDir: string): {
675
+ querySchemaStructure: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
676
+ file: z.ZodString;
677
+ }, "strip", z.ZodTypeAny, {
678
+ file: string;
679
+ }, {
680
+ file: string;
681
+ }>, {
682
+ file: string;
683
+ }, {
684
+ file: string;
685
+ }, string, "query_schema_structure">;
686
+ extractChunk: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
687
+ file: z.ZodString;
688
+ type: z.ZodEnum<["orbital", "trait", "inline-trait"]>;
689
+ name: z.ZodString;
690
+ parentOrbital: z.ZodOptional<z.ZodString>;
691
+ includeTraits: z.ZodDefault<z.ZodBoolean>;
692
+ }, "strip", z.ZodTypeAny, {
693
+ type: "orbital" | "trait" | "inline-trait";
694
+ name: string;
695
+ file: string;
696
+ includeTraits: boolean;
697
+ parentOrbital?: string | undefined;
698
+ }, {
699
+ type: "orbital" | "trait" | "inline-trait";
700
+ name: string;
701
+ file: string;
702
+ parentOrbital?: string | undefined;
703
+ includeTraits?: boolean | undefined;
704
+ }>, {
705
+ type: "orbital" | "trait" | "inline-trait";
706
+ name: string;
707
+ file: string;
708
+ includeTraits: boolean;
709
+ parentOrbital?: string | undefined;
710
+ }, {
711
+ type: "orbital" | "trait" | "inline-trait";
712
+ name: string;
713
+ file: string;
714
+ parentOrbital?: string | undefined;
715
+ includeTraits?: boolean | undefined;
716
+ }, string, "extract_chunk">;
717
+ applyChunk: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
718
+ chunkId: z.ZodString;
719
+ }, "strip", z.ZodTypeAny, {
720
+ chunkId: string;
721
+ }, {
722
+ chunkId: string;
723
+ }>, {
724
+ chunkId: string;
725
+ }, {
726
+ chunkId: string;
727
+ }, string, "apply_chunk">;
728
+ };
729
+
730
+ /**
731
+ * GitHub tools configuration
732
+ */
733
+ interface GitHubToolsConfig {
734
+ /** GitHub personal access token */
735
+ token: string;
736
+ /** Repository owner (e.g., 'octocat') */
737
+ owner?: string;
738
+ /** Repository name (e.g., 'hello-world') */
739
+ repo?: string;
740
+ /** Working directory for git operations */
741
+ workDir: string;
742
+ }
743
+ /**
744
+ * Create GitHub tools for the agent
745
+ */
746
+ declare function createGitHubTools(config: GitHubToolsConfig): {
747
+ github_clone: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
748
+ repoUrl: z.ZodString;
749
+ branch: z.ZodOptional<z.ZodString>;
750
+ depth: z.ZodOptional<z.ZodNumber>;
751
+ }, "strip", z.ZodTypeAny, {
752
+ repoUrl: string;
753
+ branch?: string | undefined;
754
+ depth?: number | undefined;
755
+ }, {
756
+ repoUrl: string;
757
+ branch?: string | undefined;
758
+ depth?: number | undefined;
759
+ }>, {
760
+ repoUrl: string;
761
+ branch?: string | undefined;
762
+ depth?: number | undefined;
763
+ }, {
764
+ repoUrl: string;
765
+ branch?: string | undefined;
766
+ depth?: number | undefined;
767
+ }, string, "github_clone">;
768
+ github_create_branch: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
769
+ branchName: z.ZodString;
770
+ baseBranch: z.ZodOptional<z.ZodString>;
771
+ }, "strip", z.ZodTypeAny, {
772
+ branchName: string;
773
+ baseBranch?: string | undefined;
774
+ }, {
775
+ branchName: string;
776
+ baseBranch?: string | undefined;
777
+ }>, {
778
+ branchName: string;
779
+ baseBranch?: string | undefined;
780
+ }, {
781
+ branchName: string;
782
+ baseBranch?: string | undefined;
783
+ }, string, "github_create_branch">;
784
+ github_commit: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
785
+ message: z.ZodString;
786
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
787
+ }, "strip", z.ZodTypeAny, {
788
+ message: string;
789
+ files?: string[] | undefined;
790
+ }, {
791
+ message: string;
792
+ files?: string[] | undefined;
793
+ }>, {
794
+ message: string;
795
+ files?: string[] | undefined;
796
+ }, {
797
+ message: string;
798
+ files?: string[] | undefined;
799
+ }, string, "github_commit">;
800
+ github_push: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
801
+ branchName: z.ZodString;
802
+ }, "strip", z.ZodTypeAny, {
803
+ branchName: string;
804
+ }, {
805
+ branchName: string;
806
+ }>, {
807
+ branchName: string;
808
+ }, {
809
+ branchName: string;
810
+ }, string, "github_push">;
811
+ github_create_pr: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
812
+ title: z.ZodString;
813
+ body: z.ZodString;
814
+ baseBranch: z.ZodString;
815
+ headBranch: z.ZodString;
816
+ draft: z.ZodOptional<z.ZodBoolean>;
817
+ }, "strip", z.ZodTypeAny, {
818
+ baseBranch: string;
819
+ title: string;
820
+ body: string;
821
+ headBranch: string;
822
+ draft?: boolean | undefined;
823
+ }, {
824
+ baseBranch: string;
825
+ title: string;
826
+ body: string;
827
+ headBranch: string;
828
+ draft?: boolean | undefined;
829
+ }>, {
830
+ baseBranch: string;
831
+ title: string;
832
+ body: string;
833
+ headBranch: string;
834
+ draft?: boolean | undefined;
835
+ }, {
836
+ baseBranch: string;
837
+ title: string;
838
+ body: string;
839
+ headBranch: string;
840
+ draft?: boolean | undefined;
841
+ }, string, "github_create_pr">;
842
+ github_list_issues: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
843
+ state: z.ZodOptional<z.ZodEnum<["open", "closed", "all"]>>;
844
+ labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
845
+ limit: z.ZodOptional<z.ZodNumber>;
846
+ }, "strip", z.ZodTypeAny, {
847
+ state?: "open" | "closed" | "all" | undefined;
848
+ labels?: string[] | undefined;
849
+ limit?: number | undefined;
850
+ }, {
851
+ state?: "open" | "closed" | "all" | undefined;
852
+ labels?: string[] | undefined;
853
+ limit?: number | undefined;
854
+ }>, {
855
+ state?: "open" | "closed" | "all" | undefined;
856
+ labels?: string[] | undefined;
857
+ limit?: number | undefined;
858
+ }, {
859
+ state?: "open" | "closed" | "all" | undefined;
860
+ labels?: string[] | undefined;
861
+ limit?: number | undefined;
862
+ }, string, "github_list_issues">;
863
+ github_get_issue: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
864
+ issueNumber: z.ZodNumber;
865
+ }, "strip", z.ZodTypeAny, {
866
+ issueNumber: number;
867
+ }, {
868
+ issueNumber: number;
869
+ }>, {
870
+ issueNumber: number;
871
+ }, {
872
+ issueNumber: number;
873
+ }, string, "github_get_issue">;
874
+ github_get_pr_comments: _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
875
+ prNumber: z.ZodNumber;
876
+ }, "strip", z.ZodTypeAny, {
877
+ prNumber: number;
878
+ }, {
879
+ prNumber: number;
880
+ }>, {
881
+ prNumber: number;
882
+ }, {
883
+ prNumber: number;
884
+ }, string, "github_get_pr_comments">;
885
+ };
886
+ /**
887
+ * Create GitHub tools as array (for easy spreading into agent tools)
888
+ */
889
+ declare function createGitHubToolsArray(config: GitHubToolsConfig): (_langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
890
+ repoUrl: z.ZodString;
891
+ branch: z.ZodOptional<z.ZodString>;
892
+ depth: z.ZodOptional<z.ZodNumber>;
893
+ }, "strip", z.ZodTypeAny, {
894
+ repoUrl: string;
895
+ branch?: string | undefined;
896
+ depth?: number | undefined;
897
+ }, {
898
+ repoUrl: string;
899
+ branch?: string | undefined;
900
+ depth?: number | undefined;
901
+ }>, {
902
+ repoUrl: string;
903
+ branch?: string | undefined;
904
+ depth?: number | undefined;
905
+ }, {
906
+ repoUrl: string;
907
+ branch?: string | undefined;
908
+ depth?: number | undefined;
909
+ }, string, "github_clone"> | _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
910
+ branchName: z.ZodString;
911
+ baseBranch: z.ZodOptional<z.ZodString>;
912
+ }, "strip", z.ZodTypeAny, {
913
+ branchName: string;
914
+ baseBranch?: string | undefined;
915
+ }, {
916
+ branchName: string;
917
+ baseBranch?: string | undefined;
918
+ }>, {
919
+ branchName: string;
920
+ baseBranch?: string | undefined;
921
+ }, {
922
+ branchName: string;
923
+ baseBranch?: string | undefined;
924
+ }, string, "github_create_branch"> | _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
925
+ message: z.ZodString;
926
+ files: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
927
+ }, "strip", z.ZodTypeAny, {
928
+ message: string;
929
+ files?: string[] | undefined;
930
+ }, {
931
+ message: string;
932
+ files?: string[] | undefined;
933
+ }>, {
934
+ message: string;
935
+ files?: string[] | undefined;
936
+ }, {
937
+ message: string;
938
+ files?: string[] | undefined;
939
+ }, string, "github_commit"> | _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
940
+ branchName: z.ZodString;
941
+ }, "strip", z.ZodTypeAny, {
942
+ branchName: string;
943
+ }, {
944
+ branchName: string;
945
+ }>, {
946
+ branchName: string;
947
+ }, {
948
+ branchName: string;
949
+ }, string, "github_push"> | _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
950
+ title: z.ZodString;
951
+ body: z.ZodString;
952
+ baseBranch: z.ZodString;
953
+ headBranch: z.ZodString;
954
+ draft: z.ZodOptional<z.ZodBoolean>;
955
+ }, "strip", z.ZodTypeAny, {
956
+ baseBranch: string;
957
+ title: string;
958
+ body: string;
959
+ headBranch: string;
960
+ draft?: boolean | undefined;
961
+ }, {
962
+ baseBranch: string;
963
+ title: string;
964
+ body: string;
965
+ headBranch: string;
966
+ draft?: boolean | undefined;
967
+ }>, {
968
+ baseBranch: string;
969
+ title: string;
970
+ body: string;
971
+ headBranch: string;
972
+ draft?: boolean | undefined;
973
+ }, {
974
+ baseBranch: string;
975
+ title: string;
976
+ body: string;
977
+ headBranch: string;
978
+ draft?: boolean | undefined;
979
+ }, string, "github_create_pr"> | _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
980
+ state: z.ZodOptional<z.ZodEnum<["open", "closed", "all"]>>;
981
+ labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
982
+ limit: z.ZodOptional<z.ZodNumber>;
983
+ }, "strip", z.ZodTypeAny, {
984
+ state?: "open" | "closed" | "all" | undefined;
985
+ labels?: string[] | undefined;
986
+ limit?: number | undefined;
987
+ }, {
988
+ state?: "open" | "closed" | "all" | undefined;
989
+ labels?: string[] | undefined;
990
+ limit?: number | undefined;
991
+ }>, {
992
+ state?: "open" | "closed" | "all" | undefined;
993
+ labels?: string[] | undefined;
994
+ limit?: number | undefined;
995
+ }, {
996
+ state?: "open" | "closed" | "all" | undefined;
997
+ labels?: string[] | undefined;
998
+ limit?: number | undefined;
999
+ }, string, "github_list_issues"> | _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
1000
+ issueNumber: z.ZodNumber;
1001
+ }, "strip", z.ZodTypeAny, {
1002
+ issueNumber: number;
1003
+ }, {
1004
+ issueNumber: number;
1005
+ }>, {
1006
+ issueNumber: number;
1007
+ }, {
1008
+ issueNumber: number;
1009
+ }, string, "github_get_issue"> | _langchain_core_tools.DynamicStructuredTool<z.ZodObject<{
1010
+ prNumber: z.ZodNumber;
1011
+ }, "strip", z.ZodTypeAny, {
1012
+ prNumber: number;
1013
+ }, {
1014
+ prNumber: number;
1015
+ }>, {
1016
+ prNumber: number;
1017
+ }, {
1018
+ prNumber: number;
1019
+ }, string, "github_get_pr_comments">)[];
1020
+
1021
+ /**
1022
+ * Create all agent tools for a workspace.
1023
+ *
1024
+ * All dependencies are now internal to @almadar/agent - no dependency injection needed.
1025
+ *
1026
+ * @param workDir - Workspace directory
1027
+ * @returns All tools ready for use
1028
+ */
1029
+ declare function createAgentTools(workDir: string): {
1030
+ execute: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
1031
+ command: zod.ZodString;
1032
+ timeout: zod.ZodOptional<zod.ZodNumber>;
1033
+ }, "strip", zod.ZodTypeAny, {
1034
+ command: string;
1035
+ timeout?: number | undefined;
1036
+ }, {
1037
+ command: string;
1038
+ timeout?: number | undefined;
1039
+ }>, {
1040
+ command: string;
1041
+ timeout?: number | undefined;
1042
+ }, {
1043
+ command: string;
1044
+ timeout?: number | undefined;
1045
+ }, string, "execute">;
1046
+ validateSchema: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{}, "strip", zod.ZodTypeAny, {}, {}>, {}, {}, string, "validate_schema">;
1047
+ generateSchema: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
1048
+ userRequest: zod.ZodString;
1049
+ suggestedTraits: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1050
+ suggestedEntities: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1051
+ suggestedPages: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1052
+ suggestedPatterns: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1053
+ additionalInstructions: zod.ZodOptional<zod.ZodString>;
1054
+ existingSchema: zod.ZodOptional<zod.ZodString>;
1055
+ }, "strip", zod.ZodTypeAny, {
1056
+ userRequest: string;
1057
+ suggestedTraits?: string[] | undefined;
1058
+ suggestedEntities?: string[] | undefined;
1059
+ suggestedPages?: string[] | undefined;
1060
+ suggestedPatterns?: string[] | undefined;
1061
+ additionalInstructions?: string | undefined;
1062
+ existingSchema?: string | undefined;
1063
+ }, {
1064
+ userRequest: string;
1065
+ suggestedTraits?: string[] | undefined;
1066
+ suggestedEntities?: string[] | undefined;
1067
+ suggestedPages?: string[] | undefined;
1068
+ suggestedPatterns?: string[] | undefined;
1069
+ additionalInstructions?: string | undefined;
1070
+ existingSchema?: string | undefined;
1071
+ }>, {
1072
+ userRequest: string;
1073
+ suggestedTraits?: string[] | undefined;
1074
+ suggestedEntities?: string[] | undefined;
1075
+ suggestedPages?: string[] | undefined;
1076
+ suggestedPatterns?: string[] | undefined;
1077
+ additionalInstructions?: string | undefined;
1078
+ existingSchema?: string | undefined;
1079
+ }, {
1080
+ userRequest: string;
1081
+ suggestedTraits?: string[] | undefined;
1082
+ suggestedEntities?: string[] | undefined;
1083
+ suggestedPages?: string[] | undefined;
1084
+ suggestedPatterns?: string[] | undefined;
1085
+ additionalInstructions?: string | undefined;
1086
+ existingSchema?: string | undefined;
1087
+ }, string, "generate_schema">;
1088
+ finishTask: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
1089
+ summary: zod.ZodString;
1090
+ schemaPath: zod.ZodOptional<zod.ZodString>;
1091
+ }, "strip", zod.ZodTypeAny, {
1092
+ summary: string;
1093
+ schemaPath?: string | undefined;
1094
+ }, {
1095
+ summary: string;
1096
+ schemaPath?: string | undefined;
1097
+ }>, {
1098
+ summary: string;
1099
+ schemaPath?: string | undefined;
1100
+ }, {
1101
+ summary: string;
1102
+ schemaPath?: string | undefined;
1103
+ }, {
1104
+ success: boolean;
1105
+ status: string;
1106
+ message: string;
1107
+ summary: string;
1108
+ autoCombined: boolean;
1109
+ source: "domain" | "orbitals" | undefined;
1110
+ stats: {
1111
+ totalOrbitals: number;
1112
+ totalEntities: number;
1113
+ totalPages: number;
1114
+ totalTraits: number;
1115
+ } | undefined;
1116
+ validation: {
1117
+ valid: boolean;
1118
+ errorCount: number;
1119
+ warningCount: number;
1120
+ } | undefined;
1121
+ designQuality: {
1122
+ propCorrections: number;
1123
+ compositionWarnings: string[];
1124
+ };
1125
+ schemaPath: string | undefined;
1126
+ nextAction: string;
1127
+ }, "finish_task">;
1128
+ combineSchemas: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
1129
+ orbitals: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1130
+ name: zod.ZodString;
1131
+ description: zod.ZodOptional<zod.ZodString>;
1132
+ entity: zod.ZodObject<{
1133
+ name: zod.ZodString;
1134
+ collection: zod.ZodOptional<zod.ZodString>;
1135
+ fields: zod.ZodArray<zod.ZodAny, "many">;
1136
+ timestamps: zod.ZodOptional<zod.ZodBoolean>;
1137
+ }, "strip", zod.ZodTypeAny, {
1138
+ name: string;
1139
+ fields: any[];
1140
+ collection?: string | undefined;
1141
+ timestamps?: boolean | undefined;
1142
+ }, {
1143
+ name: string;
1144
+ fields: any[];
1145
+ collection?: string | undefined;
1146
+ timestamps?: boolean | undefined;
1147
+ }>;
1148
+ traits: zod.ZodArray<zod.ZodAny, "many">;
1149
+ pages: zod.ZodArray<zod.ZodAny, "many">;
1150
+ emits: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1151
+ listens: zod.ZodOptional<zod.ZodArray<zod.ZodAny, "many">>;
1152
+ }, "strip", zod.ZodTypeAny, {
1153
+ pages: any[];
1154
+ traits: any[];
1155
+ name: string;
1156
+ entity: {
1157
+ name: string;
1158
+ fields: any[];
1159
+ collection?: string | undefined;
1160
+ timestamps?: boolean | undefined;
1161
+ };
1162
+ description?: string | undefined;
1163
+ emits?: string[] | undefined;
1164
+ listens?: any[] | undefined;
1165
+ }, {
1166
+ pages: any[];
1167
+ traits: any[];
1168
+ name: string;
1169
+ entity: {
1170
+ name: string;
1171
+ fields: any[];
1172
+ collection?: string | undefined;
1173
+ timestamps?: boolean | undefined;
1174
+ };
1175
+ description?: string | undefined;
1176
+ emits?: string[] | undefined;
1177
+ listens?: any[] | undefined;
1178
+ }>, "many">>;
1179
+ name: zod.ZodOptional<zod.ZodString>;
1180
+ description: zod.ZodOptional<zod.ZodString>;
1181
+ version: zod.ZodOptional<zod.ZodString>;
1182
+ theme: zod.ZodOptional<zod.ZodString>;
1183
+ defaultRoute: zod.ZodOptional<zod.ZodString>;
1184
+ validate: zod.ZodDefault<zod.ZodOptional<zod.ZodBoolean>>;
1185
+ }, "strip", zod.ZodTypeAny, {
1186
+ validate: boolean;
1187
+ version?: string | undefined;
1188
+ name?: string | undefined;
1189
+ description?: string | undefined;
1190
+ theme?: string | undefined;
1191
+ orbitals?: {
1192
+ pages: any[];
1193
+ traits: any[];
1194
+ name: string;
1195
+ entity: {
1196
+ name: string;
1197
+ fields: any[];
1198
+ collection?: string | undefined;
1199
+ timestamps?: boolean | undefined;
1200
+ };
1201
+ description?: string | undefined;
1202
+ emits?: string[] | undefined;
1203
+ listens?: any[] | undefined;
1204
+ }[] | undefined;
1205
+ defaultRoute?: string | undefined;
1206
+ }, {
1207
+ version?: string | undefined;
1208
+ name?: string | undefined;
1209
+ description?: string | undefined;
1210
+ validate?: boolean | undefined;
1211
+ theme?: string | undefined;
1212
+ orbitals?: {
1213
+ pages: any[];
1214
+ traits: any[];
1215
+ name: string;
1216
+ entity: {
1217
+ name: string;
1218
+ fields: any[];
1219
+ collection?: string | undefined;
1220
+ timestamps?: boolean | undefined;
1221
+ };
1222
+ description?: string | undefined;
1223
+ emits?: string[] | undefined;
1224
+ listens?: any[] | undefined;
1225
+ }[] | undefined;
1226
+ defaultRoute?: string | undefined;
1227
+ }>, {
1228
+ validate: boolean;
1229
+ version?: string | undefined;
1230
+ name?: string | undefined;
1231
+ description?: string | undefined;
1232
+ theme?: string | undefined;
1233
+ orbitals?: {
1234
+ pages: any[];
1235
+ traits: any[];
1236
+ name: string;
1237
+ entity: {
1238
+ name: string;
1239
+ fields: any[];
1240
+ collection?: string | undefined;
1241
+ timestamps?: boolean | undefined;
1242
+ };
1243
+ description?: string | undefined;
1244
+ emits?: string[] | undefined;
1245
+ listens?: any[] | undefined;
1246
+ }[] | undefined;
1247
+ defaultRoute?: string | undefined;
1248
+ }, {
1249
+ version?: string | undefined;
1250
+ name?: string | undefined;
1251
+ description?: string | undefined;
1252
+ validate?: boolean | undefined;
1253
+ theme?: string | undefined;
1254
+ orbitals?: {
1255
+ pages: any[];
1256
+ traits: any[];
1257
+ name: string;
1258
+ entity: {
1259
+ name: string;
1260
+ fields: any[];
1261
+ collection?: string | undefined;
1262
+ timestamps?: boolean | undefined;
1263
+ };
1264
+ description?: string | undefined;
1265
+ emits?: string[] | undefined;
1266
+ listens?: any[] | undefined;
1267
+ }[] | undefined;
1268
+ defaultRoute?: string | undefined;
1269
+ }, string, "construct_combined_schema">;
1270
+ orbitalSubagent: {
1271
+ tool: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
1272
+ orbital: zod.ZodObject<{
1273
+ name: zod.ZodString;
1274
+ entity: zod.ZodObject<{
1275
+ name: zod.ZodString;
1276
+ persistence: zod.ZodEnum<["persistent", "runtime", "singleton", "instance"]>;
1277
+ fields: zod.ZodArray<zod.ZodObject<{
1278
+ name: zod.ZodString;
1279
+ type: zod.ZodString;
1280
+ required: zod.ZodOptional<zod.ZodBoolean>;
1281
+ }, "strip", zod.ZodTypeAny, {
1282
+ type: string;
1283
+ name: string;
1284
+ required?: boolean | undefined;
1285
+ }, {
1286
+ type: string;
1287
+ name: string;
1288
+ required?: boolean | undefined;
1289
+ }>, "many">;
1290
+ }, "strip", zod.ZodTypeAny, {
1291
+ name: string;
1292
+ fields: {
1293
+ type: string;
1294
+ name: string;
1295
+ required?: boolean | undefined;
1296
+ }[];
1297
+ persistence: "persistent" | "runtime" | "singleton" | "instance";
1298
+ }, {
1299
+ name: string;
1300
+ fields: {
1301
+ type: string;
1302
+ name: string;
1303
+ required?: boolean | undefined;
1304
+ }[];
1305
+ persistence: "persistent" | "runtime" | "singleton" | "instance";
1306
+ }>;
1307
+ traits: zod.ZodArray<zod.ZodString, "many">;
1308
+ patterns: zod.ZodArray<zod.ZodString, "many">;
1309
+ pages: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1310
+ name: zod.ZodString;
1311
+ path: zod.ZodString;
1312
+ viewType: zod.ZodString;
1313
+ }, "strip", zod.ZodTypeAny, {
1314
+ path: string;
1315
+ name: string;
1316
+ viewType: string;
1317
+ }, {
1318
+ path: string;
1319
+ name: string;
1320
+ viewType: string;
1321
+ }>, "many">>;
1322
+ domainContext: zod.ZodOptional<zod.ZodObject<{
1323
+ request: zod.ZodString;
1324
+ requestFragment: zod.ZodOptional<zod.ZodString>;
1325
+ category: zod.ZodEnum<["game", "business", "dashboard", "form", "content", "social", "ecommerce", "workflow"]>;
1326
+ vocabulary: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
1327
+ }, "strip", zod.ZodTypeAny, {
1328
+ request: string;
1329
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1330
+ requestFragment?: string | undefined;
1331
+ vocabulary?: Record<string, string> | undefined;
1332
+ }, {
1333
+ request: string;
1334
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1335
+ requestFragment?: string | undefined;
1336
+ vocabulary?: Record<string, string> | undefined;
1337
+ }>>;
1338
+ design: zod.ZodOptional<zod.ZodObject<{
1339
+ style: zod.ZodOptional<zod.ZodEnum<["minimal", "modern", "playful", "data-driven", "immersive"]>>;
1340
+ uxHints: zod.ZodOptional<zod.ZodObject<{
1341
+ flowPattern: zod.ZodOptional<zod.ZodString>;
1342
+ listPattern: zod.ZodOptional<zod.ZodString>;
1343
+ formPattern: zod.ZodOptional<zod.ZodString>;
1344
+ detailPattern: zod.ZodOptional<zod.ZodString>;
1345
+ }, "strip", zod.ZodTypeAny, {
1346
+ flowPattern?: string | undefined;
1347
+ listPattern?: string | undefined;
1348
+ formPattern?: string | undefined;
1349
+ detailPattern?: string | undefined;
1350
+ }, {
1351
+ flowPattern?: string | undefined;
1352
+ listPattern?: string | undefined;
1353
+ formPattern?: string | undefined;
1354
+ detailPattern?: string | undefined;
1355
+ }>>;
1356
+ }, "strip", zod.ZodTypeAny, {
1357
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1358
+ uxHints?: {
1359
+ flowPattern?: string | undefined;
1360
+ listPattern?: string | undefined;
1361
+ formPattern?: string | undefined;
1362
+ detailPattern?: string | undefined;
1363
+ } | undefined;
1364
+ }, {
1365
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1366
+ uxHints?: {
1367
+ flowPattern?: string | undefined;
1368
+ listPattern?: string | undefined;
1369
+ formPattern?: string | undefined;
1370
+ detailPattern?: string | undefined;
1371
+ } | undefined;
1372
+ }>>;
1373
+ emits: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1374
+ listens: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1375
+ event: zod.ZodString;
1376
+ triggers: zod.ZodString;
1377
+ }, "strip", zod.ZodTypeAny, {
1378
+ event: string;
1379
+ triggers: string;
1380
+ }, {
1381
+ event: string;
1382
+ triggers: string;
1383
+ }>, "many">>;
1384
+ relations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1385
+ entity: zod.ZodString;
1386
+ alias: zod.ZodOptional<zod.ZodString>;
1387
+ cardinality: zod.ZodEnum<["one", "many"]>;
1388
+ }, "strip", zod.ZodTypeAny, {
1389
+ entity: string;
1390
+ cardinality: "many" | "one";
1391
+ alias?: string | undefined;
1392
+ }, {
1393
+ entity: string;
1394
+ cardinality: "many" | "one";
1395
+ alias?: string | undefined;
1396
+ }>, "many">>;
1397
+ }, "strip", zod.ZodTypeAny, {
1398
+ traits: string[];
1399
+ name: string;
1400
+ entity: {
1401
+ name: string;
1402
+ fields: {
1403
+ type: string;
1404
+ name: string;
1405
+ required?: boolean | undefined;
1406
+ }[];
1407
+ persistence: "persistent" | "runtime" | "singleton" | "instance";
1408
+ };
1409
+ patterns: string[];
1410
+ pages?: {
1411
+ path: string;
1412
+ name: string;
1413
+ viewType: string;
1414
+ }[] | undefined;
1415
+ relations?: {
1416
+ entity: string;
1417
+ cardinality: "many" | "one";
1418
+ alias?: string | undefined;
1419
+ }[] | undefined;
1420
+ domainContext?: {
1421
+ request: string;
1422
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1423
+ requestFragment?: string | undefined;
1424
+ vocabulary?: Record<string, string> | undefined;
1425
+ } | undefined;
1426
+ design?: {
1427
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1428
+ uxHints?: {
1429
+ flowPattern?: string | undefined;
1430
+ listPattern?: string | undefined;
1431
+ formPattern?: string | undefined;
1432
+ detailPattern?: string | undefined;
1433
+ } | undefined;
1434
+ } | undefined;
1435
+ emits?: string[] | undefined;
1436
+ listens?: {
1437
+ event: string;
1438
+ triggers: string;
1439
+ }[] | undefined;
1440
+ }, {
1441
+ traits: string[];
1442
+ name: string;
1443
+ entity: {
1444
+ name: string;
1445
+ fields: {
1446
+ type: string;
1447
+ name: string;
1448
+ required?: boolean | undefined;
1449
+ }[];
1450
+ persistence: "persistent" | "runtime" | "singleton" | "instance";
1451
+ };
1452
+ patterns: string[];
1453
+ pages?: {
1454
+ path: string;
1455
+ name: string;
1456
+ viewType: string;
1457
+ }[] | undefined;
1458
+ relations?: {
1459
+ entity: string;
1460
+ cardinality: "many" | "one";
1461
+ alias?: string | undefined;
1462
+ }[] | undefined;
1463
+ domainContext?: {
1464
+ request: string;
1465
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1466
+ requestFragment?: string | undefined;
1467
+ vocabulary?: Record<string, string> | undefined;
1468
+ } | undefined;
1469
+ design?: {
1470
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1471
+ uxHints?: {
1472
+ flowPattern?: string | undefined;
1473
+ listPattern?: string | undefined;
1474
+ formPattern?: string | undefined;
1475
+ detailPattern?: string | undefined;
1476
+ } | undefined;
1477
+ } | undefined;
1478
+ emits?: string[] | undefined;
1479
+ listens?: {
1480
+ event: string;
1481
+ triggers: string;
1482
+ }[] | undefined;
1483
+ }>;
1484
+ orbitalIndex: zod.ZodOptional<zod.ZodNumber>;
1485
+ totalOrbitals: zod.ZodOptional<zod.ZodNumber>;
1486
+ }, "strip", zod.ZodTypeAny, {
1487
+ orbital: {
1488
+ traits: string[];
1489
+ name: string;
1490
+ entity: {
1491
+ name: string;
1492
+ fields: {
1493
+ type: string;
1494
+ name: string;
1495
+ required?: boolean | undefined;
1496
+ }[];
1497
+ persistence: "persistent" | "runtime" | "singleton" | "instance";
1498
+ };
1499
+ patterns: string[];
1500
+ pages?: {
1501
+ path: string;
1502
+ name: string;
1503
+ viewType: string;
1504
+ }[] | undefined;
1505
+ relations?: {
1506
+ entity: string;
1507
+ cardinality: "many" | "one";
1508
+ alias?: string | undefined;
1509
+ }[] | undefined;
1510
+ domainContext?: {
1511
+ request: string;
1512
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1513
+ requestFragment?: string | undefined;
1514
+ vocabulary?: Record<string, string> | undefined;
1515
+ } | undefined;
1516
+ design?: {
1517
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1518
+ uxHints?: {
1519
+ flowPattern?: string | undefined;
1520
+ listPattern?: string | undefined;
1521
+ formPattern?: string | undefined;
1522
+ detailPattern?: string | undefined;
1523
+ } | undefined;
1524
+ } | undefined;
1525
+ emits?: string[] | undefined;
1526
+ listens?: {
1527
+ event: string;
1528
+ triggers: string;
1529
+ }[] | undefined;
1530
+ };
1531
+ orbitalIndex?: number | undefined;
1532
+ totalOrbitals?: number | undefined;
1533
+ }, {
1534
+ orbital: {
1535
+ traits: string[];
1536
+ name: string;
1537
+ entity: {
1538
+ name: string;
1539
+ fields: {
1540
+ type: string;
1541
+ name: string;
1542
+ required?: boolean | undefined;
1543
+ }[];
1544
+ persistence: "persistent" | "runtime" | "singleton" | "instance";
1545
+ };
1546
+ patterns: string[];
1547
+ pages?: {
1548
+ path: string;
1549
+ name: string;
1550
+ viewType: string;
1551
+ }[] | undefined;
1552
+ relations?: {
1553
+ entity: string;
1554
+ cardinality: "many" | "one";
1555
+ alias?: string | undefined;
1556
+ }[] | undefined;
1557
+ domainContext?: {
1558
+ request: string;
1559
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1560
+ requestFragment?: string | undefined;
1561
+ vocabulary?: Record<string, string> | undefined;
1562
+ } | undefined;
1563
+ design?: {
1564
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1565
+ uxHints?: {
1566
+ flowPattern?: string | undefined;
1567
+ listPattern?: string | undefined;
1568
+ formPattern?: string | undefined;
1569
+ detailPattern?: string | undefined;
1570
+ } | undefined;
1571
+ } | undefined;
1572
+ emits?: string[] | undefined;
1573
+ listens?: {
1574
+ event: string;
1575
+ triggers: string;
1576
+ }[] | undefined;
1577
+ };
1578
+ orbitalIndex?: number | undefined;
1579
+ totalOrbitals?: number | undefined;
1580
+ }>, {
1581
+ orbital: {
1582
+ traits: string[];
1583
+ name: string;
1584
+ entity: {
1585
+ name: string;
1586
+ fields: {
1587
+ type: string;
1588
+ name: string;
1589
+ required?: boolean | undefined;
1590
+ }[];
1591
+ persistence: "persistent" | "runtime" | "singleton" | "instance";
1592
+ };
1593
+ patterns: string[];
1594
+ pages?: {
1595
+ path: string;
1596
+ name: string;
1597
+ viewType: string;
1598
+ }[] | undefined;
1599
+ relations?: {
1600
+ entity: string;
1601
+ cardinality: "many" | "one";
1602
+ alias?: string | undefined;
1603
+ }[] | undefined;
1604
+ domainContext?: {
1605
+ request: string;
1606
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1607
+ requestFragment?: string | undefined;
1608
+ vocabulary?: Record<string, string> | undefined;
1609
+ } | undefined;
1610
+ design?: {
1611
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1612
+ uxHints?: {
1613
+ flowPattern?: string | undefined;
1614
+ listPattern?: string | undefined;
1615
+ formPattern?: string | undefined;
1616
+ detailPattern?: string | undefined;
1617
+ } | undefined;
1618
+ } | undefined;
1619
+ emits?: string[] | undefined;
1620
+ listens?: {
1621
+ event: string;
1622
+ triggers: string;
1623
+ }[] | undefined;
1624
+ };
1625
+ orbitalIndex?: number | undefined;
1626
+ totalOrbitals?: number | undefined;
1627
+ }, {
1628
+ orbital: {
1629
+ traits: string[];
1630
+ name: string;
1631
+ entity: {
1632
+ name: string;
1633
+ fields: {
1634
+ type: string;
1635
+ name: string;
1636
+ required?: boolean | undefined;
1637
+ }[];
1638
+ persistence: "persistent" | "runtime" | "singleton" | "instance";
1639
+ };
1640
+ patterns: string[];
1641
+ pages?: {
1642
+ path: string;
1643
+ name: string;
1644
+ viewType: string;
1645
+ }[] | undefined;
1646
+ relations?: {
1647
+ entity: string;
1648
+ cardinality: "many" | "one";
1649
+ alias?: string | undefined;
1650
+ }[] | undefined;
1651
+ domainContext?: {
1652
+ request: string;
1653
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1654
+ requestFragment?: string | undefined;
1655
+ vocabulary?: Record<string, string> | undefined;
1656
+ } | undefined;
1657
+ design?: {
1658
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1659
+ uxHints?: {
1660
+ flowPattern?: string | undefined;
1661
+ listPattern?: string | undefined;
1662
+ formPattern?: string | undefined;
1663
+ detailPattern?: string | undefined;
1664
+ } | undefined;
1665
+ } | undefined;
1666
+ emits?: string[] | undefined;
1667
+ listens?: {
1668
+ event: string;
1669
+ triggers: string;
1670
+ }[] | undefined;
1671
+ };
1672
+ orbitalIndex?: number | undefined;
1673
+ totalOrbitals?: number | undefined;
1674
+ }, string, "generate_orbital">;
1675
+ setEventCallback: (callback: SubagentEventCallback$1) => void;
1676
+ setOrbitalCompleteCallback: (callback: OrbitalCompleteCallback) => void;
1677
+ };
1678
+ traitSubagent: {
1679
+ tool: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
1680
+ traitSpec: zod.ZodObject<{
1681
+ name: zod.ZodString;
1682
+ description: zod.ZodString;
1683
+ category: zod.ZodOptional<zod.ZodString>;
1684
+ states: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1685
+ events: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1686
+ requiredFields: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1687
+ name: zod.ZodString;
1688
+ type: zod.ZodString;
1689
+ description: zod.ZodOptional<zod.ZodString>;
1690
+ }, "strip", zod.ZodTypeAny, {
1691
+ type: string;
1692
+ name: string;
1693
+ description?: string | undefined;
1694
+ }, {
1695
+ type: string;
1696
+ name: string;
1697
+ description?: string | undefined;
1698
+ }>, "many">>;
1699
+ needsTicks: zod.ZodOptional<zod.ZodBoolean>;
1700
+ needsEmit: zod.ZodOptional<zod.ZodBoolean>;
1701
+ needsListens: zod.ZodOptional<zod.ZodBoolean>;
1702
+ }, "strip", zod.ZodTypeAny, {
1703
+ name: string;
1704
+ description: string;
1705
+ states?: string[] | undefined;
1706
+ events?: string[] | undefined;
1707
+ category?: string | undefined;
1708
+ requiredFields?: {
1709
+ type: string;
1710
+ name: string;
1711
+ description?: string | undefined;
1712
+ }[] | undefined;
1713
+ needsTicks?: boolean | undefined;
1714
+ needsEmit?: boolean | undefined;
1715
+ needsListens?: boolean | undefined;
1716
+ }, {
1717
+ name: string;
1718
+ description: string;
1719
+ states?: string[] | undefined;
1720
+ events?: string[] | undefined;
1721
+ category?: string | undefined;
1722
+ requiredFields?: {
1723
+ type: string;
1724
+ name: string;
1725
+ description?: string | undefined;
1726
+ }[] | undefined;
1727
+ needsTicks?: boolean | undefined;
1728
+ needsEmit?: boolean | undefined;
1729
+ needsListens?: boolean | undefined;
1730
+ }>;
1731
+ traitIndex: zod.ZodOptional<zod.ZodNumber>;
1732
+ totalTraits: zod.ZodOptional<zod.ZodNumber>;
1733
+ }, "strip", zod.ZodTypeAny, {
1734
+ traitSpec: {
1735
+ name: string;
1736
+ description: string;
1737
+ states?: string[] | undefined;
1738
+ events?: string[] | undefined;
1739
+ category?: string | undefined;
1740
+ requiredFields?: {
1741
+ type: string;
1742
+ name: string;
1743
+ description?: string | undefined;
1744
+ }[] | undefined;
1745
+ needsTicks?: boolean | undefined;
1746
+ needsEmit?: boolean | undefined;
1747
+ needsListens?: boolean | undefined;
1748
+ };
1749
+ traitIndex?: number | undefined;
1750
+ totalTraits?: number | undefined;
1751
+ }, {
1752
+ traitSpec: {
1753
+ name: string;
1754
+ description: string;
1755
+ states?: string[] | undefined;
1756
+ events?: string[] | undefined;
1757
+ category?: string | undefined;
1758
+ requiredFields?: {
1759
+ type: string;
1760
+ name: string;
1761
+ description?: string | undefined;
1762
+ }[] | undefined;
1763
+ needsTicks?: boolean | undefined;
1764
+ needsEmit?: boolean | undefined;
1765
+ needsListens?: boolean | undefined;
1766
+ };
1767
+ traitIndex?: number | undefined;
1768
+ totalTraits?: number | undefined;
1769
+ }>, {
1770
+ traitSpec: {
1771
+ name: string;
1772
+ description: string;
1773
+ states?: string[] | undefined;
1774
+ events?: string[] | undefined;
1775
+ category?: string | undefined;
1776
+ requiredFields?: {
1777
+ type: string;
1778
+ name: string;
1779
+ description?: string | undefined;
1780
+ }[] | undefined;
1781
+ needsTicks?: boolean | undefined;
1782
+ needsEmit?: boolean | undefined;
1783
+ needsListens?: boolean | undefined;
1784
+ };
1785
+ traitIndex?: number | undefined;
1786
+ totalTraits?: number | undefined;
1787
+ }, {
1788
+ traitSpec: {
1789
+ name: string;
1790
+ description: string;
1791
+ states?: string[] | undefined;
1792
+ events?: string[] | undefined;
1793
+ category?: string | undefined;
1794
+ requiredFields?: {
1795
+ type: string;
1796
+ name: string;
1797
+ description?: string | undefined;
1798
+ }[] | undefined;
1799
+ needsTicks?: boolean | undefined;
1800
+ needsEmit?: boolean | undefined;
1801
+ needsListens?: boolean | undefined;
1802
+ };
1803
+ traitIndex?: number | undefined;
1804
+ totalTraits?: number | undefined;
1805
+ }, string, "generate_custom_trait">;
1806
+ setEventCallback: (callback: TraitEventCallback) => void;
1807
+ setTraitCompleteCallback: (callback: TraitCompleteCallback) => void;
1808
+ };
1809
+ domainOrbitalTools: {
1810
+ generateOrbitalDomain: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
1811
+ sessionId: zod.ZodString;
1812
+ orbital: zod.ZodObject<{
1813
+ name: zod.ZodString;
1814
+ entity: zod.ZodObject<{
1815
+ name: zod.ZodString;
1816
+ persistence: zod.ZodEnum<["persistent", "runtime", "singleton"]>;
1817
+ fields: zod.ZodArray<zod.ZodObject<{
1818
+ name: zod.ZodString;
1819
+ type: zod.ZodString;
1820
+ required: zod.ZodOptional<zod.ZodBoolean>;
1821
+ default: zod.ZodOptional<zod.ZodAny>;
1822
+ }, "strip", zod.ZodTypeAny, {
1823
+ type: string;
1824
+ name: string;
1825
+ default?: any;
1826
+ required?: boolean | undefined;
1827
+ }, {
1828
+ type: string;
1829
+ name: string;
1830
+ default?: any;
1831
+ required?: boolean | undefined;
1832
+ }>, "many">;
1833
+ relations: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1834
+ entity: zod.ZodString;
1835
+ alias: zod.ZodOptional<zod.ZodString>;
1836
+ type: zod.ZodEnum<["belongs_to", "has_many"]>;
1837
+ }, "strip", zod.ZodTypeAny, {
1838
+ type: "belongs_to" | "has_many";
1839
+ entity: string;
1840
+ alias?: string | undefined;
1841
+ }, {
1842
+ type: "belongs_to" | "has_many";
1843
+ entity: string;
1844
+ alias?: string | undefined;
1845
+ }>, "many">>;
1846
+ }, "strip", zod.ZodTypeAny, {
1847
+ name: string;
1848
+ fields: {
1849
+ type: string;
1850
+ name: string;
1851
+ default?: any;
1852
+ required?: boolean | undefined;
1853
+ }[];
1854
+ persistence: "persistent" | "runtime" | "singleton";
1855
+ relations?: {
1856
+ type: "belongs_to" | "has_many";
1857
+ entity: string;
1858
+ alias?: string | undefined;
1859
+ }[] | undefined;
1860
+ }, {
1861
+ name: string;
1862
+ fields: {
1863
+ type: string;
1864
+ name: string;
1865
+ default?: any;
1866
+ required?: boolean | undefined;
1867
+ }[];
1868
+ persistence: "persistent" | "runtime" | "singleton";
1869
+ relations?: {
1870
+ type: "belongs_to" | "has_many";
1871
+ entity: string;
1872
+ alias?: string | undefined;
1873
+ }[] | undefined;
1874
+ }>;
1875
+ pages: zod.ZodArray<zod.ZodObject<{
1876
+ name: zod.ZodString;
1877
+ path: zod.ZodString;
1878
+ viewType: zod.ZodString;
1879
+ isInitial: zod.ZodOptional<zod.ZodBoolean>;
1880
+ }, "strip", zod.ZodTypeAny, {
1881
+ path: string;
1882
+ name: string;
1883
+ viewType: string;
1884
+ isInitial?: boolean | undefined;
1885
+ }, {
1886
+ path: string;
1887
+ name: string;
1888
+ viewType: string;
1889
+ isInitial?: boolean | undefined;
1890
+ }>, "many">;
1891
+ traits: zod.ZodArray<zod.ZodString, "many">;
1892
+ patterns: zod.ZodArray<zod.ZodString, "many">;
1893
+ domainContext: zod.ZodOptional<zod.ZodObject<{
1894
+ request: zod.ZodString;
1895
+ requestFragment: zod.ZodOptional<zod.ZodString>;
1896
+ category: zod.ZodEnum<["game", "business", "dashboard", "form", "content", "social", "ecommerce", "workflow"]>;
1897
+ vocabulary: zod.ZodOptional<zod.ZodRecord<zod.ZodString, zod.ZodString>>;
1898
+ }, "strip", zod.ZodTypeAny, {
1899
+ request: string;
1900
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1901
+ requestFragment?: string | undefined;
1902
+ vocabulary?: Record<string, string> | undefined;
1903
+ }, {
1904
+ request: string;
1905
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1906
+ requestFragment?: string | undefined;
1907
+ vocabulary?: Record<string, string> | undefined;
1908
+ }>>;
1909
+ design: zod.ZodOptional<zod.ZodObject<{
1910
+ style: zod.ZodOptional<zod.ZodEnum<["minimal", "modern", "playful", "data-driven", "immersive"]>>;
1911
+ uxHints: zod.ZodOptional<zod.ZodObject<{
1912
+ flowPattern: zod.ZodOptional<zod.ZodEnum<["hub-spoke", "master-detail", "crud-cycle", "linear", "role-based"]>>;
1913
+ listPattern: zod.ZodOptional<zod.ZodEnum<["entity-table", "entity-cards", "entity-list"]>>;
1914
+ formPattern: zod.ZodOptional<zod.ZodEnum<["modal", "drawer", "page"]>>;
1915
+ detailPattern: zod.ZodOptional<zod.ZodEnum<["drawer", "page", "split"]>>;
1916
+ }, "strip", zod.ZodTypeAny, {
1917
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
1918
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
1919
+ formPattern?: "modal" | "drawer" | "page" | undefined;
1920
+ detailPattern?: "split" | "drawer" | "page" | undefined;
1921
+ }, {
1922
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
1923
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
1924
+ formPattern?: "modal" | "drawer" | "page" | undefined;
1925
+ detailPattern?: "split" | "drawer" | "page" | undefined;
1926
+ }>>;
1927
+ }, "strip", zod.ZodTypeAny, {
1928
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1929
+ uxHints?: {
1930
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
1931
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
1932
+ formPattern?: "modal" | "drawer" | "page" | undefined;
1933
+ detailPattern?: "split" | "drawer" | "page" | undefined;
1934
+ } | undefined;
1935
+ }, {
1936
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1937
+ uxHints?: {
1938
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
1939
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
1940
+ formPattern?: "modal" | "drawer" | "page" | undefined;
1941
+ detailPattern?: "split" | "drawer" | "page" | undefined;
1942
+ } | undefined;
1943
+ }>>;
1944
+ emits: zod.ZodOptional<zod.ZodArray<zod.ZodString, "many">>;
1945
+ listens: zod.ZodOptional<zod.ZodArray<zod.ZodObject<{
1946
+ event: zod.ZodString;
1947
+ triggers: zod.ZodString;
1948
+ }, "strip", zod.ZodTypeAny, {
1949
+ event: string;
1950
+ triggers: string;
1951
+ }, {
1952
+ event: string;
1953
+ triggers: string;
1954
+ }>, "many">>;
1955
+ }, "strip", zod.ZodTypeAny, {
1956
+ pages: {
1957
+ path: string;
1958
+ name: string;
1959
+ viewType: string;
1960
+ isInitial?: boolean | undefined;
1961
+ }[];
1962
+ traits: string[];
1963
+ name: string;
1964
+ entity: {
1965
+ name: string;
1966
+ fields: {
1967
+ type: string;
1968
+ name: string;
1969
+ default?: any;
1970
+ required?: boolean | undefined;
1971
+ }[];
1972
+ persistence: "persistent" | "runtime" | "singleton";
1973
+ relations?: {
1974
+ type: "belongs_to" | "has_many";
1975
+ entity: string;
1976
+ alias?: string | undefined;
1977
+ }[] | undefined;
1978
+ };
1979
+ patterns: string[];
1980
+ domainContext?: {
1981
+ request: string;
1982
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
1983
+ requestFragment?: string | undefined;
1984
+ vocabulary?: Record<string, string> | undefined;
1985
+ } | undefined;
1986
+ design?: {
1987
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
1988
+ uxHints?: {
1989
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
1990
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
1991
+ formPattern?: "modal" | "drawer" | "page" | undefined;
1992
+ detailPattern?: "split" | "drawer" | "page" | undefined;
1993
+ } | undefined;
1994
+ } | undefined;
1995
+ emits?: string[] | undefined;
1996
+ listens?: {
1997
+ event: string;
1998
+ triggers: string;
1999
+ }[] | undefined;
2000
+ }, {
2001
+ pages: {
2002
+ path: string;
2003
+ name: string;
2004
+ viewType: string;
2005
+ isInitial?: boolean | undefined;
2006
+ }[];
2007
+ traits: string[];
2008
+ name: string;
2009
+ entity: {
2010
+ name: string;
2011
+ fields: {
2012
+ type: string;
2013
+ name: string;
2014
+ default?: any;
2015
+ required?: boolean | undefined;
2016
+ }[];
2017
+ persistence: "persistent" | "runtime" | "singleton";
2018
+ relations?: {
2019
+ type: "belongs_to" | "has_many";
2020
+ entity: string;
2021
+ alias?: string | undefined;
2022
+ }[] | undefined;
2023
+ };
2024
+ patterns: string[];
2025
+ domainContext?: {
2026
+ request: string;
2027
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
2028
+ requestFragment?: string | undefined;
2029
+ vocabulary?: Record<string, string> | undefined;
2030
+ } | undefined;
2031
+ design?: {
2032
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
2033
+ uxHints?: {
2034
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
2035
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
2036
+ formPattern?: "modal" | "drawer" | "page" | undefined;
2037
+ detailPattern?: "split" | "drawer" | "page" | undefined;
2038
+ } | undefined;
2039
+ } | undefined;
2040
+ emits?: string[] | undefined;
2041
+ listens?: {
2042
+ event: string;
2043
+ triggers: string;
2044
+ }[] | undefined;
2045
+ }>;
2046
+ orbitalIndex: zod.ZodNumber;
2047
+ totalOrbitals: zod.ZodNumber;
2048
+ }, "strip", zod.ZodTypeAny, {
2049
+ sessionId: string;
2050
+ orbital: {
2051
+ pages: {
2052
+ path: string;
2053
+ name: string;
2054
+ viewType: string;
2055
+ isInitial?: boolean | undefined;
2056
+ }[];
2057
+ traits: string[];
2058
+ name: string;
2059
+ entity: {
2060
+ name: string;
2061
+ fields: {
2062
+ type: string;
2063
+ name: string;
2064
+ default?: any;
2065
+ required?: boolean | undefined;
2066
+ }[];
2067
+ persistence: "persistent" | "runtime" | "singleton";
2068
+ relations?: {
2069
+ type: "belongs_to" | "has_many";
2070
+ entity: string;
2071
+ alias?: string | undefined;
2072
+ }[] | undefined;
2073
+ };
2074
+ patterns: string[];
2075
+ domainContext?: {
2076
+ request: string;
2077
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
2078
+ requestFragment?: string | undefined;
2079
+ vocabulary?: Record<string, string> | undefined;
2080
+ } | undefined;
2081
+ design?: {
2082
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
2083
+ uxHints?: {
2084
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
2085
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
2086
+ formPattern?: "modal" | "drawer" | "page" | undefined;
2087
+ detailPattern?: "split" | "drawer" | "page" | undefined;
2088
+ } | undefined;
2089
+ } | undefined;
2090
+ emits?: string[] | undefined;
2091
+ listens?: {
2092
+ event: string;
2093
+ triggers: string;
2094
+ }[] | undefined;
2095
+ };
2096
+ orbitalIndex: number;
2097
+ totalOrbitals: number;
2098
+ }, {
2099
+ sessionId: string;
2100
+ orbital: {
2101
+ pages: {
2102
+ path: string;
2103
+ name: string;
2104
+ viewType: string;
2105
+ isInitial?: boolean | undefined;
2106
+ }[];
2107
+ traits: string[];
2108
+ name: string;
2109
+ entity: {
2110
+ name: string;
2111
+ fields: {
2112
+ type: string;
2113
+ name: string;
2114
+ default?: any;
2115
+ required?: boolean | undefined;
2116
+ }[];
2117
+ persistence: "persistent" | "runtime" | "singleton";
2118
+ relations?: {
2119
+ type: "belongs_to" | "has_many";
2120
+ entity: string;
2121
+ alias?: string | undefined;
2122
+ }[] | undefined;
2123
+ };
2124
+ patterns: string[];
2125
+ domainContext?: {
2126
+ request: string;
2127
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
2128
+ requestFragment?: string | undefined;
2129
+ vocabulary?: Record<string, string> | undefined;
2130
+ } | undefined;
2131
+ design?: {
2132
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
2133
+ uxHints?: {
2134
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
2135
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
2136
+ formPattern?: "modal" | "drawer" | "page" | undefined;
2137
+ detailPattern?: "split" | "drawer" | "page" | undefined;
2138
+ } | undefined;
2139
+ } | undefined;
2140
+ emits?: string[] | undefined;
2141
+ listens?: {
2142
+ event: string;
2143
+ triggers: string;
2144
+ }[] | undefined;
2145
+ };
2146
+ orbitalIndex: number;
2147
+ totalOrbitals: number;
2148
+ }>, {
2149
+ sessionId: string;
2150
+ orbital: {
2151
+ pages: {
2152
+ path: string;
2153
+ name: string;
2154
+ viewType: string;
2155
+ isInitial?: boolean | undefined;
2156
+ }[];
2157
+ traits: string[];
2158
+ name: string;
2159
+ entity: {
2160
+ name: string;
2161
+ fields: {
2162
+ type: string;
2163
+ name: string;
2164
+ default?: any;
2165
+ required?: boolean | undefined;
2166
+ }[];
2167
+ persistence: "persistent" | "runtime" | "singleton";
2168
+ relations?: {
2169
+ type: "belongs_to" | "has_many";
2170
+ entity: string;
2171
+ alias?: string | undefined;
2172
+ }[] | undefined;
2173
+ };
2174
+ patterns: string[];
2175
+ domainContext?: {
2176
+ request: string;
2177
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
2178
+ requestFragment?: string | undefined;
2179
+ vocabulary?: Record<string, string> | undefined;
2180
+ } | undefined;
2181
+ design?: {
2182
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
2183
+ uxHints?: {
2184
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
2185
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
2186
+ formPattern?: "modal" | "drawer" | "page" | undefined;
2187
+ detailPattern?: "split" | "drawer" | "page" | undefined;
2188
+ } | undefined;
2189
+ } | undefined;
2190
+ emits?: string[] | undefined;
2191
+ listens?: {
2192
+ event: string;
2193
+ triggers: string;
2194
+ }[] | undefined;
2195
+ };
2196
+ orbitalIndex: number;
2197
+ totalOrbitals: number;
2198
+ }, {
2199
+ sessionId: string;
2200
+ orbital: {
2201
+ pages: {
2202
+ path: string;
2203
+ name: string;
2204
+ viewType: string;
2205
+ isInitial?: boolean | undefined;
2206
+ }[];
2207
+ traits: string[];
2208
+ name: string;
2209
+ entity: {
2210
+ name: string;
2211
+ fields: {
2212
+ type: string;
2213
+ name: string;
2214
+ default?: any;
2215
+ required?: boolean | undefined;
2216
+ }[];
2217
+ persistence: "persistent" | "runtime" | "singleton";
2218
+ relations?: {
2219
+ type: "belongs_to" | "has_many";
2220
+ entity: string;
2221
+ alias?: string | undefined;
2222
+ }[] | undefined;
2223
+ };
2224
+ patterns: string[];
2225
+ domainContext?: {
2226
+ request: string;
2227
+ category: "game" | "business" | "dashboard" | "form" | "content" | "social" | "ecommerce" | "workflow";
2228
+ requestFragment?: string | undefined;
2229
+ vocabulary?: Record<string, string> | undefined;
2230
+ } | undefined;
2231
+ design?: {
2232
+ style?: "minimal" | "modern" | "playful" | "data-driven" | "immersive" | undefined;
2233
+ uxHints?: {
2234
+ flowPattern?: "hub-spoke" | "master-detail" | "crud-cycle" | "linear" | "role-based" | undefined;
2235
+ listPattern?: "entity-table" | "entity-cards" | "entity-list" | undefined;
2236
+ formPattern?: "modal" | "drawer" | "page" | undefined;
2237
+ detailPattern?: "split" | "drawer" | "page" | undefined;
2238
+ } | undefined;
2239
+ } | undefined;
2240
+ emits?: string[] | undefined;
2241
+ listens?: {
2242
+ event: string;
2243
+ triggers: string;
2244
+ }[] | undefined;
2245
+ };
2246
+ orbitalIndex: number;
2247
+ totalOrbitals: number;
2248
+ }, string, "generate_orbital_domain">;
2249
+ constructCombinedDomain: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
2250
+ appName: zod.ZodString;
2251
+ }, "strip", zod.ZodTypeAny, {
2252
+ appName: string;
2253
+ }, {
2254
+ appName: string;
2255
+ }>, {
2256
+ appName: string;
2257
+ }, {
2258
+ appName: string;
2259
+ }, string, "construct_combined_domain">;
2260
+ setEventCallback: (callback: DomainOrbitalEventCallback) => void;
2261
+ setCompleteCallback: (callback: DomainOrbitalCompleteCallback) => void;
2262
+ };
2263
+ schemaChunking: {
2264
+ querySchemaStructure: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
2265
+ file: zod.ZodString;
2266
+ }, "strip", zod.ZodTypeAny, {
2267
+ file: string;
2268
+ }, {
2269
+ file: string;
2270
+ }>, {
2271
+ file: string;
2272
+ }, {
2273
+ file: string;
2274
+ }, string, "query_schema_structure">;
2275
+ extractChunk: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
2276
+ file: zod.ZodString;
2277
+ type: zod.ZodEnum<["orbital", "trait", "inline-trait"]>;
2278
+ name: zod.ZodString;
2279
+ parentOrbital: zod.ZodOptional<zod.ZodString>;
2280
+ includeTraits: zod.ZodDefault<zod.ZodBoolean>;
2281
+ }, "strip", zod.ZodTypeAny, {
2282
+ type: "orbital" | "trait" | "inline-trait";
2283
+ name: string;
2284
+ file: string;
2285
+ includeTraits: boolean;
2286
+ parentOrbital?: string | undefined;
2287
+ }, {
2288
+ type: "orbital" | "trait" | "inline-trait";
2289
+ name: string;
2290
+ file: string;
2291
+ parentOrbital?: string | undefined;
2292
+ includeTraits?: boolean | undefined;
2293
+ }>, {
2294
+ type: "orbital" | "trait" | "inline-trait";
2295
+ name: string;
2296
+ file: string;
2297
+ includeTraits: boolean;
2298
+ parentOrbital?: string | undefined;
2299
+ }, {
2300
+ type: "orbital" | "trait" | "inline-trait";
2301
+ name: string;
2302
+ file: string;
2303
+ parentOrbital?: string | undefined;
2304
+ includeTraits?: boolean | undefined;
2305
+ }, string, "extract_chunk">;
2306
+ applyChunk: _langchain_core_tools.DynamicStructuredTool<zod.ZodObject<{
2307
+ chunkId: zod.ZodString;
2308
+ }, "strip", zod.ZodTypeAny, {
2309
+ chunkId: string;
2310
+ }, {
2311
+ chunkId: string;
2312
+ }>, {
2313
+ chunkId: string;
2314
+ }, {
2315
+ chunkId: string;
2316
+ }, string, "apply_chunk">;
2317
+ };
2318
+ };
2319
+
2320
+ export { type BatchCompleteCallback as B, type GitHubToolsConfig as G, type OrbitalUnit as O, type SubagentEventCallback as S, type TraitCompleteCallback as T, type OrbitalGenerationOptions as a, type OrbitalGenerationResult as b, type TraitEventCallback as c, type TraitSpec as d, type TraitSubagentToolOptions as e, createAgentTools as f, createApplyChunkTool as g, createCombineSchemasTool as h, createExecuteTool as i, createExtractChunkTool as j, createFinishTaskTool as k, createGenerateSchemaTool as l, createQuerySchemaStructureTool as m, createSchemaChunkingTools as n, createTraitEventWrapper as o, createTraitSubagentTool as p, createValidateSchemaTool as q, type OrbitalBatchSubagentToolOptions as r, createGitHubTools as s, createGitHubToolsArray as t, createOrbitalBatchSubagentTool as u, validateCommandPaths as v };