@claude-flow/plugin-gastown-bridge 0.1.3 → 0.1.4

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.
Files changed (60) hide show
  1. package/dist/bd-bridge-C9wTbkhi.d.cts +318 -0
  2. package/dist/bd-bridge-C9wTbkhi.d.ts +318 -0
  3. package/dist/bridges.cjs +1 -1
  4. package/dist/bridges.d.cts +13 -612
  5. package/dist/bridges.d.ts +13 -612
  6. package/dist/bridges.js +1 -1
  7. package/dist/chunk-2KNTWGUX.js +12 -0
  8. package/dist/chunk-2KNTWGUX.js.map +1 -0
  9. package/dist/chunk-46PJFOMY.cjs +11 -0
  10. package/dist/chunk-46PJFOMY.cjs.map +1 -0
  11. package/dist/chunk-7UPWLRZX.js +11 -0
  12. package/dist/chunk-7UPWLRZX.js.map +1 -0
  13. package/dist/chunk-7VD5N6NG.cjs +11 -0
  14. package/dist/chunk-7VD5N6NG.cjs.map +1 -0
  15. package/dist/chunk-EBOVUTYL.js +12 -0
  16. package/dist/chunk-EBOVUTYL.js.map +1 -0
  17. package/dist/chunk-I2TLUPMJ.cjs +12 -0
  18. package/dist/chunk-I2TLUPMJ.cjs.map +1 -0
  19. package/dist/chunk-Q7MLH722.cjs +11 -0
  20. package/dist/chunk-Q7MLH722.cjs.map +1 -0
  21. package/dist/chunk-QFMFM7NE.cjs +13 -0
  22. package/dist/chunk-QFMFM7NE.cjs.map +1 -0
  23. package/dist/chunk-SUKPSMVK.cjs +12 -0
  24. package/dist/chunk-SUKPSMVK.cjs.map +1 -0
  25. package/dist/chunk-TGFYZY3C.js +11 -0
  26. package/dist/chunk-TGFYZY3C.js.map +1 -0
  27. package/dist/chunk-U74VYTRV.js +11 -0
  28. package/dist/chunk-U74VYTRV.js.map +1 -0
  29. package/dist/chunk-UJ56JMNG.js +13 -0
  30. package/dist/chunk-UJ56JMNG.js.map +1 -0
  31. package/dist/convoy.cjs +2 -0
  32. package/dist/convoy.cjs.map +1 -0
  33. package/dist/convoy.d.cts +6 -0
  34. package/dist/convoy.d.ts +6 -0
  35. package/dist/convoy.js +2 -0
  36. package/dist/convoy.js.map +1 -0
  37. package/dist/formula.cjs +2 -0
  38. package/dist/formula.cjs.map +1 -0
  39. package/dist/formula.d.cts +317 -0
  40. package/dist/formula.d.ts +317 -0
  41. package/dist/formula.js +2 -0
  42. package/dist/formula.js.map +1 -0
  43. package/dist/gt-bridge-B7hZz5vC.d.cts +291 -0
  44. package/dist/gt-bridge-B7hZz5vC.d.ts +291 -0
  45. package/dist/index-BzkAx4ho.d.ts +785 -0
  46. package/dist/index-CGJs8eMa.d.cts +785 -0
  47. package/dist/index.cjs +8 -9
  48. package/dist/index.cjs.map +1 -1
  49. package/dist/index.d.cts +17 -2241
  50. package/dist/index.d.ts +17 -2241
  51. package/dist/index.js +8 -9
  52. package/dist/index.js.map +1 -1
  53. package/dist/types-CMoOZXrm.d.cts +1146 -0
  54. package/dist/types-CMoOZXrm.d.ts +1146 -0
  55. package/dist/wasm-loader.js +1 -1
  56. package/package.json +16 -18
  57. package/dist/chunk-IBKUMYUL.js +0 -14
  58. package/dist/chunk-IBKUMYUL.js.map +0 -1
  59. package/dist/chunk-JF2GA7QE.cjs +0 -14
  60. package/dist/chunk-JF2GA7QE.cjs.map +0 -1
package/dist/index.d.ts CHANGED
@@ -1,1687 +1,19 @@
1
1
  import { EventEmitter } from 'events';
2
+ import { B as Bead, a as BeadStatus, S as Step, F as Formula, b as FormulaType, C as Convoy, c as ConvoyStatus, I as IGasTownBridge$1, d as IBeadsSyncService, e as IFormulaWasm, f as IDependencyWasm, T as TopoSortResult, g as CriticalPathResult, G as GasTownConfig, h as CreateBeadOptions, i as SlingOptions, j as SyncResult, k as BeadGraph } from './types-CMoOZXrm.js';
3
+ export { A as AgentRole, l as Aspect, m as AspectSchema, n as BeadDependency, o as BeadSchema, p as BeadStatusSchema, q as ConvoyAction, r as ConvoyOptimization, s as ConvoyProgress, t as ConvoyProgressSchema, u as ConvoySchema, v as ConvoyStatusSchema, w as ConvoyStrategy, x as CookedFormula, y as CreateBeadOptionsSchema, z as CreateConvoyOptions, D as CreateConvoyOptionsSchema, E as DEFAULT_CONFIG, H as DepAction, J as DependencyAction, K as DependencyResolution, L as FormulaAST, M as FormulaSchema, N as FormulaTypeSchema, O as GasTownAgent, P as GasTownAgentRole, Q as GasTownAgentRoleSchema, R as GasTownConfigSchema, U as GasTownErrorCode, V as GasTownErrorCodes, W as GasTownMail, X as Leg, Y as LegSchema, Z as MailAction, _ as PatternMatch, $ as SlingOptionsSchema, a0 as SlingTarget, a1 as SlingTargetSchema, a2 as StepSchema, a3 as SyncDirection, a4 as SyncDirectionSchema, a5 as Synthesis, a6 as SynthesisSchema, a7 as TargetAgent, a8 as Template, a9 as TemplateSchema, aa as Var, ab as VarSchema, ac as validateBead, ad as validateConfig, ae as validateConvoy, af as validateCreateBeadOptions, ag as validateCreateConvoyOptions, ah as validateFormula, ai as validateSlingOptions } from './types-CMoOZXrm.js';
4
+ import { G as GtBridge } from './gt-bridge-B7hZz5vC.js';
5
+ export { A as AddressSchema, a as GasEstimate, b as GasLimitSchema, c as GasPriceSchema, d as GtArgumentSchema, e as GtBridgeConfig, f as GtBridgeError, g as GtErrorCode, I as GtIdentifierSchema, h as GtLogger, i as GtResult, S as GtSafeStringSchema, N as NetworkSchema, j as NetworkStatus, T as TxHashSchema, k as TxStatus, l as createGtBridge } from './gt-bridge-B7hZz5vC.js';
6
+ import { B as BdBridge } from './bd-bridge-C9wTbkhi.js';
7
+ export { a as BdArgumentSchema, b as BdBridgeConfig, c as BdBridgeError, d as BdErrorCode, e as BdLogger, f as BdResult, g as BdStreamResult, h as BeadIdSchema, i as BeadQuery, j as CliBead, k as CliBeadSchema, l as CliBeadType, m as CliBeadTypeSchema, C as CreateBeadParams, n as createBdBridge } from './bd-bridge-C9wTbkhi.js';
8
+ import { SyncBridge } from './bridges.js';
9
+ export { AgentDBEntry, AgentDBEntrySchema, CliSyncDirection, CliSyncDirectionSchema, CliSyncResult, ConflictStrategy, ConflictStrategySchema, IAgentDBService, SyncBridgeConfig, SyncBridgeError, SyncConflict, SyncErrorCode, SyncLogger, SyncState, SyncStatus, SyncStatusSchema, createSyncBridge } from './bridges.js';
10
+ import { Molecule, FormulaExecutor } from './formula.js';
11
+ export { ExecuteOptions, ExecutionProgress, ExecutorEvents, IWasmLoader, StepContext, StepResult, createFormulaExecutor } from './formula.js';
12
+ import { L as LazyStats, C as ConvoyTracker, a as ConvoyObserver } from './index-BzkAx4ho.js';
13
+ export { B as BlockerInfo, b as CompletionCallback, c as CompletionCheckResult, d as ConvoyEvent, e as ConvoyEventType, f as ConvoyLogger, g as ConvoyObserverConfig, h as ConvoyTrackerConfig, i as Lazy, j as LazyBridge, k as LazyModule, l as LazyObserver, m as LazyOptions, n as LazyState, o as LazyWasm, O as ObserverLogger, R as ReadyIssueInfo, W as WasmGraphModule, p as WatchHandle, q as createConvoyObserver, r as createConvoyTracker, s as createLazyConvoyObserver, t as createLazyProperty, u as disposeAllLazySingletons, v as disposeLazySingleton, w as getLazyObserverStats, x as getLazySingleton } from './index-BzkAx4ho.js';
2
14
  import { z } from 'zod';
3
- import { GtBridge, BdBridge, SyncBridge } from './bridges.js';
4
- export { AddressSchema, AgentDBEntry, AgentDBEntrySchema, BdArgumentSchema, BdBridgeConfig, BdBridgeError, BdErrorCode, BdLogger, BdResult, BdStreamResult, BeadIdSchema, BeadQuery, CliBead, CliBeadSchema, CliBeadType, CliBeadTypeSchema, CliSyncDirection, CliSyncDirectionSchema, CliSyncResult, ConflictStrategy, ConflictStrategySchema, CreateBeadParams, GasEstimate, GasLimitSchema, GasPriceSchema, GtArgumentSchema, GtBridgeConfig, GtBridgeError, GtErrorCode, GtIdentifierSchema, GtLogger, GtResult, GtSafeStringSchema, IAgentDBService, NetworkSchema, NetworkStatus, SyncBridgeConfig, SyncBridgeError, SyncConflict, SyncErrorCode, SyncLogger, SyncState, SyncStatus, SyncStatusSchema, TxHashSchema, TxStatus, createBdBridge, createGtBridge, createSyncBridge } from './bridges.js';
5
15
  import 'child_process';
6
16
 
7
- /**
8
- * Gas Town Bridge Plugin - Type Definitions
9
- *
10
- * Core types for Gas Town integration including:
11
- * - Beads: Git-backed issue tracking with graph semantics
12
- * - Formulas: TOML-defined workflows (convoy, workflow, expansion, aspect)
13
- * - Convoys: Work-order tracking for slung work
14
- * - Steps/Legs: Workflow components
15
- * - Variables: Template substitution
16
- *
17
- * @module gastown-bridge/types
18
- * @version 0.1.0
19
- */
20
-
21
- /**
22
- * Bead status enumeration
23
- */
24
- type BeadStatus = 'open' | 'in_progress' | 'closed';
25
- /**
26
- * Bead - Git-backed issue with graph semantics
27
- */
28
- interface Bead {
29
- /** Unique identifier (e.g., "gt-abc12") */
30
- readonly id: string;
31
- /** Issue title */
32
- readonly title: string;
33
- /** Issue description */
34
- readonly description: string;
35
- /** Current status */
36
- readonly status: BeadStatus;
37
- /** Priority (0 = highest) */
38
- readonly priority: number;
39
- /** Issue labels */
40
- readonly labels: string[];
41
- /** Parent bead ID (for epics) */
42
- readonly parentId?: string;
43
- /** Creation timestamp */
44
- readonly createdAt: Date;
45
- /** Last update timestamp */
46
- readonly updatedAt: Date;
47
- /** Assigned agent/user */
48
- readonly assignee?: string;
49
- /** Gas Town rig name */
50
- readonly rig?: string;
51
- /** Blocking beads (dependencies) */
52
- readonly blockedBy?: string[];
53
- /** Beads this blocks */
54
- readonly blocks?: string[];
55
- }
56
- /**
57
- * Options for creating a new bead
58
- */
59
- interface CreateBeadOptions {
60
- readonly title: string;
61
- readonly description?: string;
62
- readonly priority?: number;
63
- readonly labels?: string[];
64
- readonly parent?: string;
65
- readonly rig?: string;
66
- readonly assignee?: string;
67
- }
68
- /**
69
- * Bead dependency relationship
70
- */
71
- interface BeadDependency {
72
- readonly child: string;
73
- readonly parent: string;
74
- readonly type: 'blocks' | 'relates' | 'duplicates';
75
- }
76
- /**
77
- * Formula type enumeration
78
- */
79
- type FormulaType = 'convoy' | 'workflow' | 'expansion' | 'aspect';
80
- /**
81
- * Workflow step definition
82
- */
83
- interface Step {
84
- /** Step identifier */
85
- readonly id: string;
86
- /** Step title */
87
- readonly title: string;
88
- /** Step description */
89
- readonly description: string;
90
- /** Dependencies - step IDs that must complete first */
91
- readonly needs?: string[];
92
- /** Estimated duration in minutes */
93
- readonly duration?: number;
94
- /** Required capabilities */
95
- readonly requires?: string[];
96
- /** Step metadata */
97
- readonly metadata?: Record<string, unknown>;
98
- }
99
- /**
100
- * Convoy leg definition
101
- */
102
- interface Leg {
103
- /** Leg identifier */
104
- readonly id: string;
105
- /** Leg title */
106
- readonly title: string;
107
- /** Focus area */
108
- readonly focus: string;
109
- /** Leg description */
110
- readonly description: string;
111
- /** Assigned agent type */
112
- readonly agent?: string;
113
- /** Leg sequence order */
114
- readonly order?: number;
115
- }
116
- /**
117
- * Formula variable definition
118
- */
119
- interface Var {
120
- /** Variable name */
121
- readonly name: string;
122
- /** Variable description */
123
- readonly description?: string;
124
- /** Default value */
125
- readonly default?: string;
126
- /** Whether the variable is required */
127
- readonly required?: boolean;
128
- /** Validation pattern (regex) */
129
- readonly pattern?: string;
130
- /** Allowed values */
131
- readonly enum?: string[];
132
- }
133
- /**
134
- * Synthesis definition (convoy result combination)
135
- */
136
- interface Synthesis {
137
- /** Synthesis strategy */
138
- readonly strategy: 'merge' | 'sequential' | 'parallel';
139
- /** Output format */
140
- readonly format?: string;
141
- /** Synthesis description */
142
- readonly description?: string;
143
- }
144
- /**
145
- * Template for expansion formulas
146
- */
147
- interface Template {
148
- /** Template name */
149
- readonly name: string;
150
- /** Template content with variable placeholders */
151
- readonly content: string;
152
- /** Output path pattern */
153
- readonly outputPath?: string;
154
- }
155
- /**
156
- * Aspect definition for cross-cutting concerns
157
- */
158
- interface Aspect {
159
- /** Aspect name */
160
- readonly name: string;
161
- /** Pointcut expression */
162
- readonly pointcut: string;
163
- /** Advice to apply */
164
- readonly advice: string;
165
- /** Aspect type */
166
- readonly type: 'before' | 'after' | 'around';
167
- }
168
- /**
169
- * Formula - TOML-defined workflow specification
170
- */
171
- interface Formula {
172
- /** Formula name */
173
- readonly name: string;
174
- /** Formula description */
175
- readonly description: string;
176
- /** Formula type */
177
- readonly type: FormulaType;
178
- /** Formula version */
179
- readonly version: number;
180
- /** Convoy legs */
181
- readonly legs?: Leg[];
182
- /** Synthesis configuration */
183
- readonly synthesis?: Synthesis;
184
- /** Workflow steps */
185
- readonly steps?: Step[];
186
- /** Variable definitions */
187
- readonly vars?: Record<string, Var>;
188
- /** Expansion templates */
189
- readonly templates?: Template[];
190
- /** Cross-cutting aspects */
191
- readonly aspects?: Aspect[];
192
- /** Formula metadata */
193
- readonly metadata?: Record<string, unknown>;
194
- }
195
- /**
196
- * Cooked formula with variables substituted
197
- */
198
- interface CookedFormula extends Formula {
199
- /** When the formula was cooked */
200
- readonly cookedAt: Date;
201
- /** Variables used for cooking */
202
- readonly cookedVars: Record<string, string>;
203
- /** Original (uncooked) formula name */
204
- readonly originalName: string;
205
- }
206
- /**
207
- * Convoy status enumeration
208
- */
209
- type ConvoyStatus = 'active' | 'landed' | 'failed' | 'paused';
210
- /**
211
- * Convoy progress tracking
212
- */
213
- interface ConvoyProgress {
214
- /** Total issues tracked */
215
- readonly total: number;
216
- /** Closed issues */
217
- readonly closed: number;
218
- /** In-progress issues */
219
- readonly inProgress: number;
220
- /** Blocked issues */
221
- readonly blocked: number;
222
- }
223
- /**
224
- * Convoy - Work order tracking for slung work
225
- */
226
- interface Convoy {
227
- /** Convoy identifier */
228
- readonly id: string;
229
- /** Convoy name */
230
- readonly name: string;
231
- /** Tracked issue IDs */
232
- readonly trackedIssues: string[];
233
- /** Convoy status */
234
- readonly status: ConvoyStatus;
235
- /** Start timestamp */
236
- readonly startedAt: Date;
237
- /** Completion timestamp */
238
- readonly completedAt?: Date;
239
- /** Progress tracking */
240
- readonly progress: ConvoyProgress;
241
- /** Formula used to create convoy */
242
- readonly formula?: string;
243
- /** Description */
244
- readonly description?: string;
245
- }
246
- /**
247
- * Options for creating a convoy
248
- */
249
- interface CreateConvoyOptions {
250
- readonly name: string;
251
- readonly issues: string[];
252
- readonly description?: string;
253
- readonly formula?: string;
254
- }
255
- /**
256
- * Gas Town agent role
257
- */
258
- type GasTownAgentRole = 'mayor' | 'polecat' | 'refinery' | 'witness' | 'deacon' | 'dog' | 'crew';
259
- /**
260
- * Gas Town agent
261
- */
262
- interface GasTownAgent {
263
- /** Agent name */
264
- readonly name: string;
265
- /** Agent role */
266
- readonly role: GasTownAgentRole;
267
- /** Rig assignment */
268
- readonly rig?: string;
269
- /** Current status */
270
- readonly status: 'active' | 'idle' | 'busy';
271
- /** Agent capabilities */
272
- readonly capabilities?: string[];
273
- }
274
- /**
275
- * Sling target type
276
- */
277
- type SlingTarget = 'polecat' | 'crew' | 'mayor';
278
- /**
279
- * Sling operation options
280
- */
281
- interface SlingOptions {
282
- readonly beadId: string;
283
- readonly target: SlingTarget;
284
- readonly formula?: string;
285
- readonly priority?: number;
286
- }
287
- /**
288
- * Gas Town mail message
289
- */
290
- interface GasTownMail {
291
- readonly id: string;
292
- readonly from: string;
293
- readonly to: string;
294
- readonly subject: string;
295
- readonly body: string;
296
- readonly sentAt: Date;
297
- readonly read: boolean;
298
- }
299
- /**
300
- * Sync direction
301
- */
302
- type SyncDirection = 'pull' | 'push' | 'both';
303
- /**
304
- * Sync result
305
- */
306
- interface SyncResult {
307
- readonly direction: SyncDirection;
308
- readonly pulled: number;
309
- readonly pushed: number;
310
- readonly errors: string[];
311
- readonly timestamp: Date;
312
- }
313
- /**
314
- * Dependency graph for beads
315
- */
316
- interface BeadGraph {
317
- readonly nodes: string[];
318
- readonly edges: Array<[string, string]>;
319
- }
320
- /**
321
- * Topological sort result
322
- */
323
- interface TopoSortResult {
324
- readonly sorted: string[];
325
- readonly hasCycle: boolean;
326
- readonly cycleNodes?: string[];
327
- }
328
- /**
329
- * Critical path result
330
- */
331
- interface CriticalPathResult {
332
- readonly path: string[];
333
- readonly totalDuration: number;
334
- readonly slack: Map<string, number>;
335
- }
336
- /**
337
- * Gas Town Bridge plugin configuration
338
- */
339
- interface GasTownConfig {
340
- /** Path to Gas Town installation */
341
- readonly townRoot: string;
342
- /** Enable Beads sync with AgentDB */
343
- readonly enableBeadsSync: boolean;
344
- /** Sync interval in milliseconds */
345
- readonly syncInterval: number;
346
- /** Enable native formula parsing (WASM) */
347
- readonly nativeFormulas: boolean;
348
- /** Enable convoy tracking */
349
- readonly enableConvoys: boolean;
350
- /** Auto-create beads from Claude Flow tasks */
351
- readonly autoCreateBeads: boolean;
352
- /** Enable GUPP integration */
353
- readonly enableGUPP: boolean;
354
- /** GUPP check interval in milliseconds */
355
- readonly guppCheckInterval: number;
356
- /** CLI timeout in milliseconds */
357
- readonly cliTimeout: number;
358
- }
359
- /**
360
- * Default configuration values
361
- */
362
- declare const DEFAULT_CONFIG: GasTownConfig;
363
- /**
364
- * Gas Town Bridge error codes
365
- */
366
- declare const GasTownErrorCodes: {
367
- readonly CLI_NOT_FOUND: "GT_CLI_NOT_FOUND";
368
- readonly CLI_TIMEOUT: "GT_CLI_TIMEOUT";
369
- readonly CLI_ERROR: "GT_CLI_ERROR";
370
- readonly BEAD_NOT_FOUND: "GT_BEAD_NOT_FOUND";
371
- readonly CONVOY_NOT_FOUND: "GT_CONVOY_NOT_FOUND";
372
- readonly FORMULA_NOT_FOUND: "GT_FORMULA_NOT_FOUND";
373
- readonly FORMULA_PARSE_ERROR: "GT_FORMULA_PARSE_ERROR";
374
- readonly WASM_NOT_INITIALIZED: "GT_WASM_NOT_INITIALIZED";
375
- readonly SYNC_ERROR: "GT_SYNC_ERROR";
376
- readonly DEPENDENCY_CYCLE: "GT_DEPENDENCY_CYCLE";
377
- readonly INVALID_SLING_TARGET: "GT_INVALID_SLING_TARGET";
378
- };
379
- type GasTownErrorCode$1 = (typeof GasTownErrorCodes)[keyof typeof GasTownErrorCodes];
380
- /**
381
- * Bead status schema
382
- */
383
- declare const BeadStatusSchema: z.ZodEnum<["open", "in_progress", "closed"]>;
384
- /**
385
- * Bead schema
386
- */
387
- declare const BeadSchema: z.ZodObject<{
388
- id: z.ZodString;
389
- title: z.ZodString;
390
- description: z.ZodString;
391
- status: z.ZodEnum<["open", "in_progress", "closed"]>;
392
- priority: z.ZodNumber;
393
- labels: z.ZodArray<z.ZodString, "many">;
394
- parentId: z.ZodOptional<z.ZodString>;
395
- createdAt: z.ZodDate;
396
- updatedAt: z.ZodDate;
397
- assignee: z.ZodOptional<z.ZodString>;
398
- rig: z.ZodOptional<z.ZodString>;
399
- blockedBy: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
400
- blocks: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
401
- }, "strip", z.ZodTypeAny, {
402
- description: string;
403
- id: string;
404
- status: "open" | "in_progress" | "closed";
405
- createdAt: Date;
406
- updatedAt: Date;
407
- priority: number;
408
- title: string;
409
- labels: string[];
410
- parentId?: string | undefined;
411
- assignee?: string | undefined;
412
- rig?: string | undefined;
413
- blockedBy?: string[] | undefined;
414
- blocks?: string[] | undefined;
415
- }, {
416
- description: string;
417
- id: string;
418
- status: "open" | "in_progress" | "closed";
419
- createdAt: Date;
420
- updatedAt: Date;
421
- priority: number;
422
- title: string;
423
- labels: string[];
424
- parentId?: string | undefined;
425
- assignee?: string | undefined;
426
- rig?: string | undefined;
427
- blockedBy?: string[] | undefined;
428
- blocks?: string[] | undefined;
429
- }>;
430
- /**
431
- * Create bead options schema
432
- */
433
- declare const CreateBeadOptionsSchema$1: z.ZodObject<{
434
- title: z.ZodString;
435
- description: z.ZodOptional<z.ZodString>;
436
- priority: z.ZodOptional<z.ZodNumber>;
437
- labels: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
438
- parent: z.ZodOptional<z.ZodString>;
439
- rig: z.ZodOptional<z.ZodString>;
440
- assignee: z.ZodOptional<z.ZodString>;
441
- }, "strip", z.ZodTypeAny, {
442
- title: string;
443
- description?: string | undefined;
444
- priority?: number | undefined;
445
- assignee?: string | undefined;
446
- labels?: string[] | undefined;
447
- rig?: string | undefined;
448
- parent?: string | undefined;
449
- }, {
450
- title: string;
451
- description?: string | undefined;
452
- priority?: number | undefined;
453
- assignee?: string | undefined;
454
- labels?: string[] | undefined;
455
- rig?: string | undefined;
456
- parent?: string | undefined;
457
- }>;
458
- /**
459
- * Formula type schema
460
- */
461
- declare const FormulaTypeSchema: z.ZodEnum<["convoy", "workflow", "expansion", "aspect"]>;
462
- /**
463
- * Step schema
464
- */
465
- declare const StepSchema: z.ZodObject<{
466
- id: z.ZodString;
467
- title: z.ZodString;
468
- description: z.ZodString;
469
- needs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
470
- duration: z.ZodOptional<z.ZodNumber>;
471
- requires: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
472
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
473
- }, "strip", z.ZodTypeAny, {
474
- description: string;
475
- id: string;
476
- title: string;
477
- metadata?: Record<string, unknown> | undefined;
478
- needs?: string[] | undefined;
479
- duration?: number | undefined;
480
- requires?: string[] | undefined;
481
- }, {
482
- description: string;
483
- id: string;
484
- title: string;
485
- metadata?: Record<string, unknown> | undefined;
486
- needs?: string[] | undefined;
487
- duration?: number | undefined;
488
- requires?: string[] | undefined;
489
- }>;
490
- /**
491
- * Leg schema
492
- */
493
- declare const LegSchema: z.ZodObject<{
494
- id: z.ZodString;
495
- title: z.ZodString;
496
- focus: z.ZodString;
497
- description: z.ZodString;
498
- agent: z.ZodOptional<z.ZodString>;
499
- order: z.ZodOptional<z.ZodNumber>;
500
- }, "strip", z.ZodTypeAny, {
501
- description: string;
502
- id: string;
503
- title: string;
504
- focus: string;
505
- agent?: string | undefined;
506
- order?: number | undefined;
507
- }, {
508
- description: string;
509
- id: string;
510
- title: string;
511
- focus: string;
512
- agent?: string | undefined;
513
- order?: number | undefined;
514
- }>;
515
- /**
516
- * Variable schema
517
- */
518
- declare const VarSchema: z.ZodObject<{
519
- name: z.ZodString;
520
- description: z.ZodOptional<z.ZodString>;
521
- default: z.ZodOptional<z.ZodString>;
522
- required: z.ZodOptional<z.ZodBoolean>;
523
- pattern: z.ZodOptional<z.ZodString>;
524
- enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
525
- }, "strip", z.ZodTypeAny, {
526
- name: string;
527
- description?: string | undefined;
528
- default?: string | undefined;
529
- required?: boolean | undefined;
530
- pattern?: string | undefined;
531
- enum?: string[] | undefined;
532
- }, {
533
- name: string;
534
- description?: string | undefined;
535
- default?: string | undefined;
536
- required?: boolean | undefined;
537
- pattern?: string | undefined;
538
- enum?: string[] | undefined;
539
- }>;
540
- /**
541
- * Synthesis schema
542
- */
543
- declare const SynthesisSchema: z.ZodObject<{
544
- strategy: z.ZodEnum<["merge", "sequential", "parallel"]>;
545
- format: z.ZodOptional<z.ZodString>;
546
- description: z.ZodOptional<z.ZodString>;
547
- }, "strip", z.ZodTypeAny, {
548
- strategy: "parallel" | "merge" | "sequential";
549
- description?: string | undefined;
550
- format?: string | undefined;
551
- }, {
552
- strategy: "parallel" | "merge" | "sequential";
553
- description?: string | undefined;
554
- format?: string | undefined;
555
- }>;
556
- /**
557
- * Template schema
558
- */
559
- declare const TemplateSchema: z.ZodObject<{
560
- name: z.ZodString;
561
- content: z.ZodString;
562
- outputPath: z.ZodOptional<z.ZodString>;
563
- }, "strip", z.ZodTypeAny, {
564
- name: string;
565
- content: string;
566
- outputPath?: string | undefined;
567
- }, {
568
- name: string;
569
- content: string;
570
- outputPath?: string | undefined;
571
- }>;
572
- /**
573
- * Aspect schema
574
- */
575
- declare const AspectSchema: z.ZodObject<{
576
- name: z.ZodString;
577
- pointcut: z.ZodString;
578
- advice: z.ZodString;
579
- type: z.ZodEnum<["before", "after", "around"]>;
580
- }, "strip", z.ZodTypeAny, {
581
- name: string;
582
- type: "before" | "after" | "around";
583
- pointcut: string;
584
- advice: string;
585
- }, {
586
- name: string;
587
- type: "before" | "after" | "around";
588
- pointcut: string;
589
- advice: string;
590
- }>;
591
- /**
592
- * Formula schema
593
- */
594
- declare const FormulaSchema: z.ZodObject<{
595
- name: z.ZodString;
596
- description: z.ZodString;
597
- type: z.ZodEnum<["convoy", "workflow", "expansion", "aspect"]>;
598
- version: z.ZodNumber;
599
- legs: z.ZodOptional<z.ZodArray<z.ZodObject<{
600
- id: z.ZodString;
601
- title: z.ZodString;
602
- focus: z.ZodString;
603
- description: z.ZodString;
604
- agent: z.ZodOptional<z.ZodString>;
605
- order: z.ZodOptional<z.ZodNumber>;
606
- }, "strip", z.ZodTypeAny, {
607
- description: string;
608
- id: string;
609
- title: string;
610
- focus: string;
611
- agent?: string | undefined;
612
- order?: number | undefined;
613
- }, {
614
- description: string;
615
- id: string;
616
- title: string;
617
- focus: string;
618
- agent?: string | undefined;
619
- order?: number | undefined;
620
- }>, "many">>;
621
- synthesis: z.ZodOptional<z.ZodObject<{
622
- strategy: z.ZodEnum<["merge", "sequential", "parallel"]>;
623
- format: z.ZodOptional<z.ZodString>;
624
- description: z.ZodOptional<z.ZodString>;
625
- }, "strip", z.ZodTypeAny, {
626
- strategy: "parallel" | "merge" | "sequential";
627
- description?: string | undefined;
628
- format?: string | undefined;
629
- }, {
630
- strategy: "parallel" | "merge" | "sequential";
631
- description?: string | undefined;
632
- format?: string | undefined;
633
- }>>;
634
- steps: z.ZodOptional<z.ZodArray<z.ZodObject<{
635
- id: z.ZodString;
636
- title: z.ZodString;
637
- description: z.ZodString;
638
- needs: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
639
- duration: z.ZodOptional<z.ZodNumber>;
640
- requires: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
641
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
642
- }, "strip", z.ZodTypeAny, {
643
- description: string;
644
- id: string;
645
- title: string;
646
- metadata?: Record<string, unknown> | undefined;
647
- needs?: string[] | undefined;
648
- duration?: number | undefined;
649
- requires?: string[] | undefined;
650
- }, {
651
- description: string;
652
- id: string;
653
- title: string;
654
- metadata?: Record<string, unknown> | undefined;
655
- needs?: string[] | undefined;
656
- duration?: number | undefined;
657
- requires?: string[] | undefined;
658
- }>, "many">>;
659
- vars: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
660
- name: z.ZodString;
661
- description: z.ZodOptional<z.ZodString>;
662
- default: z.ZodOptional<z.ZodString>;
663
- required: z.ZodOptional<z.ZodBoolean>;
664
- pattern: z.ZodOptional<z.ZodString>;
665
- enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
666
- }, "strip", z.ZodTypeAny, {
667
- name: string;
668
- description?: string | undefined;
669
- default?: string | undefined;
670
- required?: boolean | undefined;
671
- pattern?: string | undefined;
672
- enum?: string[] | undefined;
673
- }, {
674
- name: string;
675
- description?: string | undefined;
676
- default?: string | undefined;
677
- required?: boolean | undefined;
678
- pattern?: string | undefined;
679
- enum?: string[] | undefined;
680
- }>>>;
681
- templates: z.ZodOptional<z.ZodArray<z.ZodObject<{
682
- name: z.ZodString;
683
- content: z.ZodString;
684
- outputPath: z.ZodOptional<z.ZodString>;
685
- }, "strip", z.ZodTypeAny, {
686
- name: string;
687
- content: string;
688
- outputPath?: string | undefined;
689
- }, {
690
- name: string;
691
- content: string;
692
- outputPath?: string | undefined;
693
- }>, "many">>;
694
- aspects: z.ZodOptional<z.ZodArray<z.ZodObject<{
695
- name: z.ZodString;
696
- pointcut: z.ZodString;
697
- advice: z.ZodString;
698
- type: z.ZodEnum<["before", "after", "around"]>;
699
- }, "strip", z.ZodTypeAny, {
700
- name: string;
701
- type: "before" | "after" | "around";
702
- pointcut: string;
703
- advice: string;
704
- }, {
705
- name: string;
706
- type: "before" | "after" | "around";
707
- pointcut: string;
708
- advice: string;
709
- }>, "many">>;
710
- metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
711
- }, "strip", z.ZodTypeAny, {
712
- name: string;
713
- description: string;
714
- type: "convoy" | "workflow" | "expansion" | "aspect";
715
- version: number;
716
- steps?: {
717
- description: string;
718
- id: string;
719
- title: string;
720
- metadata?: Record<string, unknown> | undefined;
721
- needs?: string[] | undefined;
722
- duration?: number | undefined;
723
- requires?: string[] | undefined;
724
- }[] | undefined;
725
- legs?: {
726
- description: string;
727
- id: string;
728
- title: string;
729
- focus: string;
730
- agent?: string | undefined;
731
- order?: number | undefined;
732
- }[] | undefined;
733
- vars?: Record<string, {
734
- name: string;
735
- description?: string | undefined;
736
- default?: string | undefined;
737
- required?: boolean | undefined;
738
- pattern?: string | undefined;
739
- enum?: string[] | undefined;
740
- }> | undefined;
741
- metadata?: Record<string, unknown> | undefined;
742
- synthesis?: {
743
- strategy: "parallel" | "merge" | "sequential";
744
- description?: string | undefined;
745
- format?: string | undefined;
746
- } | undefined;
747
- templates?: {
748
- name: string;
749
- content: string;
750
- outputPath?: string | undefined;
751
- }[] | undefined;
752
- aspects?: {
753
- name: string;
754
- type: "before" | "after" | "around";
755
- pointcut: string;
756
- advice: string;
757
- }[] | undefined;
758
- }, {
759
- name: string;
760
- description: string;
761
- type: "convoy" | "workflow" | "expansion" | "aspect";
762
- version: number;
763
- steps?: {
764
- description: string;
765
- id: string;
766
- title: string;
767
- metadata?: Record<string, unknown> | undefined;
768
- needs?: string[] | undefined;
769
- duration?: number | undefined;
770
- requires?: string[] | undefined;
771
- }[] | undefined;
772
- legs?: {
773
- description: string;
774
- id: string;
775
- title: string;
776
- focus: string;
777
- agent?: string | undefined;
778
- order?: number | undefined;
779
- }[] | undefined;
780
- vars?: Record<string, {
781
- name: string;
782
- description?: string | undefined;
783
- default?: string | undefined;
784
- required?: boolean | undefined;
785
- pattern?: string | undefined;
786
- enum?: string[] | undefined;
787
- }> | undefined;
788
- metadata?: Record<string, unknown> | undefined;
789
- synthesis?: {
790
- strategy: "parallel" | "merge" | "sequential";
791
- description?: string | undefined;
792
- format?: string | undefined;
793
- } | undefined;
794
- templates?: {
795
- name: string;
796
- content: string;
797
- outputPath?: string | undefined;
798
- }[] | undefined;
799
- aspects?: {
800
- name: string;
801
- type: "before" | "after" | "around";
802
- pointcut: string;
803
- advice: string;
804
- }[] | undefined;
805
- }>;
806
- /**
807
- * Convoy status schema
808
- */
809
- declare const ConvoyStatusSchema: z.ZodEnum<["active", "landed", "failed", "paused"]>;
810
- /**
811
- * Convoy progress schema
812
- */
813
- declare const ConvoyProgressSchema: z.ZodObject<{
814
- total: z.ZodNumber;
815
- closed: z.ZodNumber;
816
- inProgress: z.ZodNumber;
817
- blocked: z.ZodNumber;
818
- }, "strip", z.ZodTypeAny, {
819
- closed: number;
820
- total: number;
821
- inProgress: number;
822
- blocked: number;
823
- }, {
824
- closed: number;
825
- total: number;
826
- inProgress: number;
827
- blocked: number;
828
- }>;
829
- /**
830
- * Convoy schema
831
- */
832
- declare const ConvoySchema: z.ZodObject<{
833
- id: z.ZodString;
834
- name: z.ZodString;
835
- trackedIssues: z.ZodArray<z.ZodString, "many">;
836
- status: z.ZodEnum<["active", "landed", "failed", "paused"]>;
837
- startedAt: z.ZodDate;
838
- completedAt: z.ZodOptional<z.ZodDate>;
839
- progress: z.ZodObject<{
840
- total: z.ZodNumber;
841
- closed: z.ZodNumber;
842
- inProgress: z.ZodNumber;
843
- blocked: z.ZodNumber;
844
- }, "strip", z.ZodTypeAny, {
845
- closed: number;
846
- total: number;
847
- inProgress: number;
848
- blocked: number;
849
- }, {
850
- closed: number;
851
- total: number;
852
- inProgress: number;
853
- blocked: number;
854
- }>;
855
- formula: z.ZodOptional<z.ZodString>;
856
- description: z.ZodOptional<z.ZodString>;
857
- }, "strip", z.ZodTypeAny, {
858
- name: string;
859
- id: string;
860
- status: "active" | "landed" | "failed" | "paused";
861
- trackedIssues: string[];
862
- startedAt: Date;
863
- progress: {
864
- closed: number;
865
- total: number;
866
- inProgress: number;
867
- blocked: number;
868
- };
869
- description?: string | undefined;
870
- completedAt?: Date | undefined;
871
- formula?: string | undefined;
872
- }, {
873
- name: string;
874
- id: string;
875
- status: "active" | "landed" | "failed" | "paused";
876
- trackedIssues: string[];
877
- startedAt: Date;
878
- progress: {
879
- closed: number;
880
- total: number;
881
- inProgress: number;
882
- blocked: number;
883
- };
884
- description?: string | undefined;
885
- completedAt?: Date | undefined;
886
- formula?: string | undefined;
887
- }>;
888
- /**
889
- * Create convoy options schema
890
- */
891
- declare const CreateConvoyOptionsSchema$1: z.ZodObject<{
892
- name: z.ZodString;
893
- issues: z.ZodArray<z.ZodString, "many">;
894
- description: z.ZodOptional<z.ZodString>;
895
- formula: z.ZodOptional<z.ZodString>;
896
- }, "strip", z.ZodTypeAny, {
897
- name: string;
898
- issues: string[];
899
- description?: string | undefined;
900
- formula?: string | undefined;
901
- }, {
902
- name: string;
903
- issues: string[];
904
- description?: string | undefined;
905
- formula?: string | undefined;
906
- }>;
907
- /**
908
- * Gas Town agent role schema
909
- */
910
- declare const GasTownAgentRoleSchema: z.ZodEnum<["mayor", "polecat", "refinery", "witness", "deacon", "dog", "crew"]>;
911
- /**
912
- * Sling target schema
913
- */
914
- declare const SlingTargetSchema: z.ZodEnum<["polecat", "crew", "mayor"]>;
915
- /**
916
- * Sling options schema
917
- */
918
- declare const SlingOptionsSchema$1: z.ZodObject<{
919
- beadId: z.ZodString;
920
- target: z.ZodEnum<["polecat", "crew", "mayor"]>;
921
- formula: z.ZodOptional<z.ZodString>;
922
- priority: z.ZodOptional<z.ZodNumber>;
923
- }, "strip", z.ZodTypeAny, {
924
- beadId: string;
925
- target: "mayor" | "polecat" | "crew";
926
- priority?: number | undefined;
927
- formula?: string | undefined;
928
- }, {
929
- beadId: string;
930
- target: "mayor" | "polecat" | "crew";
931
- priority?: number | undefined;
932
- formula?: string | undefined;
933
- }>;
934
- /**
935
- * Sync direction schema
936
- */
937
- declare const SyncDirectionSchema: z.ZodEnum<["pull", "push", "both"]>;
938
- /**
939
- * Configuration schema
940
- */
941
- declare const GasTownConfigSchema: z.ZodObject<{
942
- townRoot: z.ZodDefault<z.ZodString>;
943
- enableBeadsSync: z.ZodDefault<z.ZodBoolean>;
944
- syncInterval: z.ZodDefault<z.ZodNumber>;
945
- nativeFormulas: z.ZodDefault<z.ZodBoolean>;
946
- enableConvoys: z.ZodDefault<z.ZodBoolean>;
947
- autoCreateBeads: z.ZodDefault<z.ZodBoolean>;
948
- enableGUPP: z.ZodDefault<z.ZodBoolean>;
949
- guppCheckInterval: z.ZodDefault<z.ZodNumber>;
950
- cliTimeout: z.ZodDefault<z.ZodNumber>;
951
- }, "strip", z.ZodTypeAny, {
952
- syncInterval: number;
953
- townRoot: string;
954
- enableBeadsSync: boolean;
955
- nativeFormulas: boolean;
956
- enableConvoys: boolean;
957
- autoCreateBeads: boolean;
958
- enableGUPP: boolean;
959
- guppCheckInterval: number;
960
- cliTimeout: number;
961
- }, {
962
- syncInterval?: number | undefined;
963
- townRoot?: string | undefined;
964
- enableBeadsSync?: boolean | undefined;
965
- nativeFormulas?: boolean | undefined;
966
- enableConvoys?: boolean | undefined;
967
- autoCreateBeads?: boolean | undefined;
968
- enableGUPP?: boolean | undefined;
969
- guppCheckInterval?: number | undefined;
970
- cliTimeout?: number | undefined;
971
- }>;
972
- /**
973
- * Validate bead
974
- */
975
- declare function validateBead(input: unknown): Bead;
976
- /**
977
- * Validate create bead options
978
- */
979
- declare function validateCreateBeadOptions$1(input: unknown): CreateBeadOptions;
980
- /**
981
- * Validate formula
982
- */
983
- declare function validateFormula(input: unknown): Formula;
984
- /**
985
- * Validate convoy
986
- */
987
- declare function validateConvoy(input: unknown): Convoy;
988
- /**
989
- * Validate create convoy options
990
- */
991
- declare function validateCreateConvoyOptions$1(input: unknown): CreateConvoyOptions;
992
- /**
993
- * Validate sling options
994
- */
995
- declare function validateSlingOptions$1(input: unknown): SlingOptions;
996
- /**
997
- * Validate configuration
998
- */
999
- declare function validateConfig(input: unknown): GasTownConfig;
1000
- /**
1001
- * Dependency action type
1002
- */
1003
- type DepAction = 'add' | 'remove';
1004
- /**
1005
- * Convoy action type
1006
- */
1007
- type ConvoyAction = 'create' | 'track' | 'land' | 'pause' | 'resume';
1008
- /**
1009
- * Mail action type
1010
- */
1011
- type MailAction = 'send' | 'read' | 'list';
1012
- /**
1013
- * Agent role type (alias for GasTownAgentRole)
1014
- */
1015
- type AgentRole = GasTownAgentRole;
1016
- /**
1017
- * Target agent type (alias for SlingTarget)
1018
- */
1019
- type TargetAgent = SlingTarget;
1020
- /**
1021
- * Convoy strategy type
1022
- */
1023
- type ConvoyStrategy = 'parallel' | 'serial' | 'hybrid' | 'fastest' | 'balanced' | 'throughput' | 'minimal_context_switches';
1024
- /**
1025
- * Dependency action type (for graph operations)
1026
- */
1027
- type DependencyAction = 'topo_sort' | 'cycle_detect' | 'critical_path';
1028
- /**
1029
- * Formula AST (Abstract Syntax Tree) - alias for Formula
1030
- */
1031
- type FormulaAST = Formula;
1032
- /**
1033
- * Dependency resolution result
1034
- */
1035
- interface DependencyResolution {
1036
- readonly action: DependencyAction;
1037
- readonly sorted?: string[];
1038
- readonly hasCycle?: boolean;
1039
- readonly cycleNodes?: string[];
1040
- readonly criticalPath?: string[];
1041
- readonly totalDuration?: number;
1042
- }
1043
- /**
1044
- * Pattern match result
1045
- */
1046
- interface PatternMatch {
1047
- readonly index: number;
1048
- readonly candidate: string;
1049
- readonly similarity: number;
1050
- }
1051
- /**
1052
- * Convoy optimization result
1053
- */
1054
- interface ConvoyOptimization {
1055
- readonly convoyId: string;
1056
- readonly strategy: string;
1057
- readonly executionOrder: string[];
1058
- readonly parallelGroups: string[][];
1059
- readonly estimatedDuration: number;
1060
- }
1061
- /**
1062
- * Gas Town Bridge interface
1063
- */
1064
- interface IGasTownBridge$1 {
1065
- createBead(opts: CreateBeadOptions): Promise<Bead>;
1066
- getReady(limit?: number, rig?: string, labels?: string[]): Promise<Bead[]>;
1067
- showBead(beadId: string): Promise<{
1068
- bead: Bead;
1069
- dependencies: string[];
1070
- dependents: string[];
1071
- }>;
1072
- manageDependency(action: DepAction, child: string, parent: string): Promise<void>;
1073
- createConvoy(opts: CreateConvoyOptions): Promise<Convoy>;
1074
- getConvoyStatus(convoyId?: string, detailed?: boolean): Promise<Convoy[]>;
1075
- trackConvoy(convoyId: string, action: 'add' | 'remove', issues: string[]): Promise<void>;
1076
- listFormulas(type?: FormulaType, includeBuiltin?: boolean): Promise<Array<{
1077
- name: string;
1078
- type: FormulaType;
1079
- description: string;
1080
- builtin: boolean;
1081
- }>>;
1082
- cookFormula(formula: Formula | string, vars: Record<string, string>): Promise<CookedFormula>;
1083
- executeFormula(formula: Formula | string, vars: Record<string, string>, targetAgent?: string, dryRun?: boolean): Promise<{
1084
- beads_created: string[];
1085
- }>;
1086
- createFormula(opts: {
1087
- name: string;
1088
- type: FormulaType;
1089
- steps?: Step[];
1090
- vars?: Record<string, unknown>;
1091
- description?: string;
1092
- }): Promise<{
1093
- path: string;
1094
- }>;
1095
- sling(beadId: string, target: SlingTarget, formula?: string, priority?: number): Promise<void>;
1096
- listAgents(rig?: string, role?: AgentRole, includeInactive?: boolean): Promise<GasTownAgent[]>;
1097
- sendMail(to: string, subject: string, body: string): Promise<string>;
1098
- readMail(mailId: string): Promise<GasTownMail>;
1099
- listMail(limit?: number): Promise<GasTownMail[]>;
1100
- }
1101
- /**
1102
- * Beads sync service interface
1103
- */
1104
- interface IBeadsSyncService {
1105
- pullBeads(rig?: string, namespace?: string): Promise<{
1106
- synced: number;
1107
- conflicts: number;
1108
- }>;
1109
- pushTasks(namespace?: string): Promise<{
1110
- pushed: number;
1111
- conflicts: number;
1112
- }>;
1113
- }
1114
- /**
1115
- * Formula WASM interface
1116
- */
1117
- interface IFormulaWasm {
1118
- isInitialized(): boolean;
1119
- initialize(): Promise<void>;
1120
- parseFormula(content: string, validate?: boolean): Promise<Formula>;
1121
- cookFormula(formula: Formula | string, vars: Record<string, string>, isContent?: boolean): Promise<CookedFormula>;
1122
- cookBatch(formulas: Array<{
1123
- name: string;
1124
- content: string;
1125
- }>, vars: Record<string, string>[], continueOnError?: boolean): Promise<{
1126
- cooked: CookedFormula[];
1127
- errors: Array<{
1128
- index: number;
1129
- error: string;
1130
- }>;
1131
- }>;
1132
- }
1133
- /**
1134
- * Dependency WASM interface
1135
- */
1136
- interface IDependencyWasm {
1137
- isInitialized(): boolean;
1138
- initialize(): Promise<void>;
1139
- resolveDependencies(beads: Array<{
1140
- id: string;
1141
- dependencies?: string[];
1142
- }>, action: DependencyAction): Promise<DependencyResolution>;
1143
- matchPatterns(query: string, candidates: string[], k: number, threshold: number): Promise<PatternMatch[]>;
1144
- optimizeConvoy(convoy: {
1145
- id: string;
1146
- trackedIssues: string[];
1147
- }, strategy: ConvoyStrategy, constraints?: unknown): Promise<ConvoyOptimization>;
1148
- }
1149
-
1150
- /**
1151
- * Gas Town Formula Executor - Hybrid WASM/CLI Implementation
1152
- *
1153
- * Provides formula execution with:
1154
- * - WASM acceleration for parsing and cooking (352x faster)
1155
- * - CLI bridge fallback for I/O operations
1156
- * - Progress tracking with event emission
1157
- * - Step dependency resolution
1158
- * - Molecule generation from cooked formulas
1159
- * - Cancellation support
1160
- *
1161
- * @module v3/plugins/gastown-bridge/formula/executor
1162
- */
1163
-
1164
- /**
1165
- * WASM loader interface for formula operations
1166
- */
1167
- interface IWasmLoader {
1168
- /** Check if WASM is initialized */
1169
- isInitialized(): boolean;
1170
- /** Parse TOML formula content to AST */
1171
- parseFormula(content: string): Formula;
1172
- /** Cook formula with variable substitution */
1173
- cookFormula(formula: Formula, vars: Record<string, string>): CookedFormula;
1174
- /** Batch cook multiple formulas */
1175
- batchCook(formulas: Formula[], varsArray: Record<string, string>[]): CookedFormula[];
1176
- /** Resolve step dependencies (topological sort) */
1177
- resolveStepDependencies(steps: Step[]): Step[];
1178
- /** Detect cycles in step dependencies */
1179
- detectCycle(steps: Step[]): {
1180
- hasCycle: boolean;
1181
- cycleSteps?: string[];
1182
- };
1183
- }
1184
- /**
1185
- * Execution options
1186
- */
1187
- interface ExecuteOptions {
1188
- /** Target agent for execution */
1189
- targetAgent?: string;
1190
- /** Whether to run in dry-run mode (no actual execution) */
1191
- dryRun?: boolean;
1192
- /** Timeout per step in milliseconds */
1193
- stepTimeout?: number;
1194
- /** Maximum parallel steps */
1195
- maxParallel?: number;
1196
- /** Abort signal for cancellation */
1197
- signal?: AbortSignal;
1198
- /** Custom step handler */
1199
- stepHandler?: (step: Step, context: StepContext) => Promise<StepResult>;
1200
- }
1201
- /**
1202
- * Step execution context
1203
- */
1204
- interface StepContext {
1205
- /** Execution ID */
1206
- executionId: string;
1207
- /** Formula being executed */
1208
- formula: CookedFormula;
1209
- /** Current step index */
1210
- stepIndex: number;
1211
- /** Total steps */
1212
- totalSteps: number;
1213
- /** Variables available to the step */
1214
- variables: Record<string, string>;
1215
- /** Results from previous steps */
1216
- previousResults: Map<string, StepResult>;
1217
- /** Abort signal */
1218
- signal?: AbortSignal;
1219
- /** Execution start time */
1220
- startTime: Date;
1221
- }
1222
- /**
1223
- * Step execution result
1224
- */
1225
- interface StepResult {
1226
- /** Step ID */
1227
- stepId: string;
1228
- /** Whether step succeeded */
1229
- success: boolean;
1230
- /** Step output data */
1231
- output?: unknown;
1232
- /** Error message if failed */
1233
- error?: string;
1234
- /** Duration in milliseconds */
1235
- durationMs: number;
1236
- /** Step metadata */
1237
- metadata?: Record<string, unknown>;
1238
- }
1239
- /**
1240
- * Molecule - Generated work unit from cooked formula
1241
- */
1242
- interface Molecule {
1243
- /** Unique molecule ID */
1244
- id: string;
1245
- /** Parent formula name */
1246
- formulaName: string;
1247
- /** Molecule title */
1248
- title: string;
1249
- /** Molecule description */
1250
- description: string;
1251
- /** Molecule type (from formula type) */
1252
- type: FormulaType;
1253
- /** Associated step or leg */
1254
- sourceId: string;
1255
- /** Assigned agent */
1256
- agent?: string;
1257
- /** Dependencies (other molecule IDs) */
1258
- dependencies: string[];
1259
- /** Execution order */
1260
- order: number;
1261
- /** Molecule metadata */
1262
- metadata: Record<string, unknown>;
1263
- /** Creation timestamp */
1264
- createdAt: Date;
1265
- }
1266
- /**
1267
- * Execution progress
1268
- */
1269
- interface ExecutionProgress {
1270
- /** Execution ID */
1271
- executionId: string;
1272
- /** Formula name */
1273
- formulaName: string;
1274
- /** Current status */
1275
- status: 'pending' | 'running' | 'completed' | 'failed' | 'cancelled';
1276
- /** Total steps/legs */
1277
- totalSteps: number;
1278
- /** Completed steps */
1279
- completedSteps: number;
1280
- /** Failed steps */
1281
- failedSteps: number;
1282
- /** Current step being executed */
1283
- currentStep?: string;
1284
- /** Start time */
1285
- startTime: Date;
1286
- /** End time (if completed) */
1287
- endTime?: Date;
1288
- /** Step results */
1289
- stepResults: StepResult[];
1290
- /** Error message (if failed) */
1291
- error?: string;
1292
- /** Progress percentage (0-100) */
1293
- percentage: number;
1294
- }
1295
- /**
1296
- * Executor events
1297
- */
1298
- interface ExecutorEvents {
1299
- 'execution:start': (executionId: string, formula: CookedFormula) => void;
1300
- 'execution:progress': (progress: ExecutionProgress) => void;
1301
- 'execution:complete': (executionId: string, results: StepResult[]) => void;
1302
- 'execution:error': (executionId: string, error: Error) => void;
1303
- 'execution:cancelled': (executionId: string) => void;
1304
- 'step:start': (executionId: string, step: Step) => void;
1305
- 'step:complete': (executionId: string, result: StepResult) => void;
1306
- 'step:error': (executionId: string, stepId: string, error: Error) => void;
1307
- 'molecule:created': (molecule: Molecule) => void;
1308
- }
1309
- /**
1310
- * Logger interface
1311
- */
1312
- interface ExecutorLogger {
1313
- debug: (msg: string, meta?: Record<string, unknown>) => void;
1314
- info: (msg: string, meta?: Record<string, unknown>) => void;
1315
- warn: (msg: string, meta?: Record<string, unknown>) => void;
1316
- error: (msg: string, meta?: Record<string, unknown>) => void;
1317
- }
1318
- /**
1319
- * Hybrid Formula Executor
1320
- *
1321
- * Uses WASM for fast parsing and cooking operations,
1322
- * falls back to CLI bridge for I/O operations.
1323
- *
1324
- * @example
1325
- * ```typescript
1326
- * const executor = new FormulaExecutor(gtBridge, wasmLoader);
1327
- *
1328
- * // Full execution
1329
- * const results = await executor.execute('my-formula', { feature: 'auth' });
1330
- *
1331
- * // Just cook (WASM-accelerated)
1332
- * const cooked = await executor.cook('my-formula', { feature: 'auth' });
1333
- *
1334
- * // Generate molecules
1335
- * const molecules = await executor.generateMolecules(cooked);
1336
- * ```
1337
- */
1338
- declare class FormulaExecutor extends EventEmitter {
1339
- private readonly gtBridge;
1340
- private readonly wasmLoader;
1341
- private readonly logger;
1342
- private readonly jsFallback;
1343
- /** Active executions for progress tracking */
1344
- private readonly executions;
1345
- /** Cancellation controllers */
1346
- private readonly cancellations;
1347
- /** Debounced progress emitters per execution */
1348
- private readonly progressEmitters;
1349
- /** Default max parallel workers */
1350
- private readonly defaultMaxParallel;
1351
- constructor(gtBridge: GtBridge, wasmLoader?: IWasmLoader, logger?: ExecutorLogger);
1352
- /**
1353
- * Execute a formula with full lifecycle
1354
- *
1355
- * @param formulaName - Name of the formula to execute
1356
- * @param vars - Variables for substitution
1357
- * @param options - Execution options
1358
- * @returns Array of step results
1359
- */
1360
- execute(formulaName: string, vars: Record<string, string>, options?: ExecuteOptions): Promise<StepResult[]>;
1361
- /**
1362
- * Cook a formula with variable substitution (WASM-accelerated)
1363
- *
1364
- * @param formulaName - Name of the formula or TOML content
1365
- * @param vars - Variables for substitution
1366
- * @returns Cooked formula with substituted variables
1367
- */
1368
- cook(formulaName: string, vars: Record<string, string>): Promise<CookedFormula>;
1369
- /**
1370
- * Generate molecules from a cooked formula
1371
- *
1372
- * Molecules are executable work units derived from formula steps/legs.
1373
- * Uses object pooling for reduced allocations.
1374
- *
1375
- * @param cookedFormula - The cooked formula to generate molecules from
1376
- * @returns Array of molecules
1377
- */
1378
- generateMolecules(cookedFormula: CookedFormula): Promise<Molecule[]>;
1379
- /**
1380
- * Run a single step
1381
- *
1382
- * @param step - Step to execute
1383
- * @param context - Execution context
1384
- * @param options - Execution options
1385
- * @returns Step result
1386
- */
1387
- runStep(step: Step, context: StepContext, options?: ExecuteOptions): Promise<StepResult>;
1388
- /**
1389
- * Get execution progress
1390
- *
1391
- * @param executionId - Execution ID to get progress for
1392
- * @returns Execution progress or undefined
1393
- */
1394
- getProgress(executionId: string): ExecutionProgress | undefined;
1395
- /**
1396
- * Cancel an execution
1397
- *
1398
- * @param executionId - Execution ID to cancel
1399
- * @returns Whether cancellation was initiated
1400
- */
1401
- cancel(executionId: string): boolean;
1402
- /**
1403
- * List all active executions
1404
- */
1405
- getActiveExecutions(): ExecutionProgress[];
1406
- /**
1407
- * Check if WASM is available for acceleration
1408
- */
1409
- isWasmAvailable(): boolean;
1410
- /**
1411
- * Get cache statistics for performance monitoring
1412
- */
1413
- getCacheStats(): {
1414
- stepResultCache: {
1415
- entries: number;
1416
- sizeBytes: number;
1417
- };
1418
- cookCache: {
1419
- entries: number;
1420
- sizeBytes: number;
1421
- };
1422
- };
1423
- /**
1424
- * Clear all executor caches
1425
- */
1426
- clearCaches(): void;
1427
- /**
1428
- * Parse formula content using WASM or JS fallback
1429
- */
1430
- private parseFormula;
1431
- /**
1432
- * Fetch formula from CLI
1433
- */
1434
- private fetchFormula;
1435
- /**
1436
- * Validate required variables are provided
1437
- */
1438
- private validateVariables;
1439
- /**
1440
- * Resolve step dependencies using WASM or JS fallback
1441
- */
1442
- private resolveStepDependencies;
1443
- /**
1444
- * Get ordered execution units (steps or legs) from formula
1445
- */
1446
- private getOrderedExecutionUnits;
1447
- /**
1448
- * Execute step via CLI bridge
1449
- */
1450
- private executeStepViaCli;
1451
- /**
1452
- * Merge multiple abort signals
1453
- */
1454
- private mergeSignals;
1455
- }
1456
- /**
1457
- * Create a new FormulaExecutor instance
1458
- */
1459
- declare function createFormulaExecutor(gtBridge: GtBridge, wasmLoader?: IWasmLoader, logger?: ExecutorLogger): FormulaExecutor;
1460
-
1461
- /**
1462
- * Convoy Tracker
1463
- *
1464
- * Manages convoy lifecycle including creation, modification, progress
1465
- * tracking, and completion. Convoys are work-order groups that track
1466
- * related beads (issues) through their lifecycle.
1467
- *
1468
- * Features:
1469
- * - Create and manage convoy groups
1470
- * - Add/remove beads to convoys
1471
- * - Track progress and status changes
1472
- * - Event emission for status transitions
1473
- * - Integration with bd-bridge for bead operations
1474
- *
1475
- * @module gastown-bridge/convoy/tracker
1476
- */
1477
-
1478
- /**
1479
- * Convoy event types
1480
- */
1481
- type ConvoyEventType = 'convoy:created' | 'convoy:started' | 'convoy:progressed' | 'convoy:completed' | 'convoy:cancelled' | 'convoy:paused' | 'convoy:resumed' | 'convoy:issue:added' | 'convoy:issue:removed' | 'convoy:issue:updated';
1482
- /**
1483
- * Convoy event payload
1484
- */
1485
- interface ConvoyEvent {
1486
- /** Event type */
1487
- type: ConvoyEventType;
1488
- /** Convoy ID */
1489
- convoyId: string;
1490
- /** Convoy name */
1491
- convoyName: string;
1492
- /** Event timestamp */
1493
- timestamp: Date;
1494
- /** Previous status (for status change events) */
1495
- previousStatus?: ConvoyStatus;
1496
- /** Current status */
1497
- status: ConvoyStatus;
1498
- /** Progress at time of event */
1499
- progress: ConvoyProgress;
1500
- /** Issue IDs affected (for issue events) */
1501
- issues?: string[];
1502
- /** Cancellation reason (for cancelled events) */
1503
- reason?: string;
1504
- /** Additional metadata */
1505
- metadata?: Record<string, unknown>;
1506
- }
1507
- /**
1508
- * Convoy tracker configuration
1509
- */
1510
- interface ConvoyTrackerConfig {
1511
- /** BD bridge instance for bead operations */
1512
- bdBridge: BdBridge;
1513
- /** Auto-update progress on issue changes */
1514
- autoUpdateProgress?: boolean;
1515
- /** Progress update interval in milliseconds */
1516
- progressUpdateInterval?: number;
1517
- /** Enable persistent storage */
1518
- persistConvoys?: boolean;
1519
- /** Storage path for convoy data */
1520
- storagePath?: string;
1521
- }
1522
- /**
1523
- * Logger interface
1524
- */
1525
- interface ConvoyLogger {
1526
- debug: (msg: string, meta?: Record<string, unknown>) => void;
1527
- info: (msg: string, meta?: Record<string, unknown>) => void;
1528
- warn: (msg: string, meta?: Record<string, unknown>) => void;
1529
- error: (msg: string, meta?: Record<string, unknown>) => void;
1530
- }
1531
- /**
1532
- * Convoy Tracker
1533
- *
1534
- * Manages convoy lifecycle and tracks progress of grouped work.
1535
- *
1536
- * @example
1537
- * ```typescript
1538
- * const tracker = new ConvoyTracker({
1539
- * bdBridge: await createBdBridge().initialize(),
1540
- * });
1541
- *
1542
- * // Create a convoy
1543
- * const convoy = await tracker.create(
1544
- * 'Sprint 1',
1545
- * ['gt-abc12', 'gt-def34', 'gt-ghi56'],
1546
- * 'First sprint tasks'
1547
- * );
1548
- *
1549
- * // Monitor progress
1550
- * tracker.on('convoy:progressed', (event) => {
1551
- * console.log(`Progress: ${event.progress.closed}/${event.progress.total}`);
1552
- * });
1553
- *
1554
- * // Check status
1555
- * const status = await tracker.getStatus(convoy.id);
1556
- * ```
1557
- */
1558
- declare class ConvoyTracker extends EventEmitter {
1559
- private bdBridge;
1560
- private convoys;
1561
- private logger;
1562
- private config;
1563
- private progressTimers;
1564
- constructor(config: ConvoyTrackerConfig, logger?: ConvoyLogger);
1565
- /**
1566
- * Create a new convoy
1567
- *
1568
- * @param name - Convoy name
1569
- * @param issues - Issue IDs to include
1570
- * @param description - Optional description
1571
- * @returns Created convoy
1572
- */
1573
- create(name: string, issues: string[], description?: string): Promise<Convoy>;
1574
- /**
1575
- * Add issues to an existing convoy
1576
- *
1577
- * @param convoyId - Convoy ID
1578
- * @param issues - Issue IDs to add
1579
- * @returns Updated convoy
1580
- */
1581
- addIssues(convoyId: string, issues: string[]): Promise<Convoy>;
1582
- /**
1583
- * Remove issues from a convoy
1584
- *
1585
- * @param convoyId - Convoy ID
1586
- * @param issues - Issue IDs to remove
1587
- * @returns Updated convoy
1588
- */
1589
- removeIssues(convoyId: string, issues: string[]): Promise<Convoy>;
1590
- /**
1591
- * Get convoy status
1592
- *
1593
- * @param convoyId - Convoy ID
1594
- * @returns Convoy with updated progress
1595
- */
1596
- getStatus(convoyId: string): Promise<Convoy>;
1597
- /**
1598
- * Mark convoy as complete
1599
- *
1600
- * @param convoyId - Convoy ID
1601
- * @returns Completed convoy
1602
- */
1603
- complete(convoyId: string): Promise<Convoy>;
1604
- /**
1605
- * Cancel a convoy
1606
- *
1607
- * @param convoyId - Convoy ID
1608
- * @param reason - Cancellation reason
1609
- * @returns Cancelled convoy
1610
- */
1611
- cancel(convoyId: string, reason?: string): Promise<Convoy>;
1612
- /**
1613
- * Pause a convoy
1614
- *
1615
- * @param convoyId - Convoy ID
1616
- * @returns Paused convoy
1617
- */
1618
- pause(convoyId: string): Promise<Convoy>;
1619
- /**
1620
- * Resume a paused convoy
1621
- *
1622
- * @param convoyId - Convoy ID
1623
- * @returns Resumed convoy
1624
- */
1625
- resume(convoyId: string): Promise<Convoy>;
1626
- /**
1627
- * List all convoys
1628
- *
1629
- * @param status - Optional status filter
1630
- * @returns Array of convoys
1631
- */
1632
- listConvoys(status?: ConvoyStatus): Convoy[];
1633
- /**
1634
- * Get convoy by ID
1635
- *
1636
- * @param convoyId - Convoy ID
1637
- * @returns Convoy or undefined
1638
- */
1639
- getConvoy(convoyId: string): Convoy | undefined;
1640
- /**
1641
- * Delete a convoy
1642
- *
1643
- * @param convoyId - Convoy ID
1644
- * @returns True if deleted
1645
- */
1646
- deleteConvoy(convoyId: string): boolean;
1647
- /**
1648
- * Calculate progress for a set of issues
1649
- */
1650
- private calculateProgress;
1651
- /**
1652
- * Verify issues exist
1653
- */
1654
- private verifyIssues;
1655
- /**
1656
- * Fetch beads by IDs
1657
- */
1658
- private fetchBeads;
1659
- /**
1660
- * Map CLI bead type to Gas Town status
1661
- */
1662
- private mapBeadStatus;
1663
- /**
1664
- * Start progress tracking timer
1665
- */
1666
- private startProgressTracking;
1667
- /**
1668
- * Stop progress tracking timer
1669
- */
1670
- private stopProgressTracking;
1671
- /**
1672
- * Emit convoy event
1673
- */
1674
- private emitConvoyEvent;
1675
- /**
1676
- * Clean up resources
1677
- */
1678
- dispose(): void;
1679
- }
1680
- /**
1681
- * Create a new convoy tracker instance
1682
- */
1683
- declare function createConvoyTracker(config: ConvoyTrackerConfig, logger?: ConvoyLogger): ConvoyTracker;
1684
-
1685
17
  /**
1686
18
  * Object Pooling for Gas Town Bridge Plugin
1687
19
  *
@@ -2426,243 +758,6 @@ declare class MemoryBudgetManager {
2426
758
  */
2427
759
  declare const memoryBudget: MemoryBudgetManager;
2428
760
 
2429
- /**
2430
- * Lazy Loading Utilities for Gas Town Bridge Plugin
2431
- *
2432
- * Provides lazy initialization patterns to defer resource loading
2433
- * until first use, reducing initial memory footprint and startup time.
2434
- *
2435
- * Features:
2436
- * - Lazy WASM module loading
2437
- * - Deferred convoy observer initialization
2438
- * - Lazy bridge initialization
2439
- * - Resource cleanup on idle
2440
- *
2441
- * @module gastown-bridge/memory/lazy
2442
- */
2443
- /**
2444
- * Lazy value state
2445
- */
2446
- type LazyState = 'uninitialized' | 'initializing' | 'initialized' | 'error' | 'disposed';
2447
- /**
2448
- * Lazy initialization options
2449
- */
2450
- interface LazyOptions<T> {
2451
- /** Factory function to create the value */
2452
- factory: () => T | Promise<T>;
2453
- /** Optional cleanup function */
2454
- cleanup?: (value: T) => void | Promise<void>;
2455
- /** Auto-dispose after idle time (ms, 0 = never) */
2456
- idleTimeout?: number;
2457
- /** Error handler */
2458
- onError?: (error: Error) => void;
2459
- /** Name for debugging */
2460
- name?: string;
2461
- }
2462
- /**
2463
- * Lazy loader statistics
2464
- */
2465
- interface LazyStats {
2466
- name: string;
2467
- state: LazyState;
2468
- initCount: number;
2469
- disposeCount: number;
2470
- errorCount: number;
2471
- lastInitTime?: Date;
2472
- lastAccessTime?: Date;
2473
- initDurationMs?: number;
2474
- }
2475
- /**
2476
- * Lazy value wrapper with automatic initialization
2477
- *
2478
- * @example
2479
- * ```typescript
2480
- * const lazyWasm = new Lazy({
2481
- * name: 'wasm-module',
2482
- * factory: async () => await loadWasmModule(),
2483
- * cleanup: (wasm) => wasm.dispose(),
2484
- * idleTimeout: 60000, // Auto-dispose after 1 minute of inactivity
2485
- * });
2486
- *
2487
- * // First access triggers initialization
2488
- * const wasm = await lazyWasm.get();
2489
- *
2490
- * // Check if initialized without triggering
2491
- * if (lazyWasm.isInitialized()) { ... }
2492
- *
2493
- * // Manual disposal
2494
- * await lazyWasm.dispose();
2495
- * ```
2496
- */
2497
- declare class Lazy<T> {
2498
- private value?;
2499
- private state;
2500
- private initPromise?;
2501
- private idleTimer?;
2502
- private options;
2503
- private stats;
2504
- constructor(options: LazyOptions<T>);
2505
- /**
2506
- * Get the lazy value, initializing if necessary
2507
- */
2508
- get(): Promise<T>;
2509
- /**
2510
- * Get synchronously (throws if not initialized)
2511
- */
2512
- getSync(): T;
2513
- /**
2514
- * Check if initialized
2515
- */
2516
- isInitialized(): boolean;
2517
- /**
2518
- * Get current state
2519
- */
2520
- getState(): LazyState;
2521
- /**
2522
- * Initialize without returning value
2523
- */
2524
- initialize(): Promise<T>;
2525
- /**
2526
- * Dispose the lazy value
2527
- */
2528
- dispose(): Promise<void>;
2529
- /**
2530
- * Get statistics
2531
- */
2532
- getStats(): Readonly<LazyStats>;
2533
- private resetIdleTimer;
2534
- private clearIdleTimer;
2535
- }
2536
- /**
2537
- * Get or create a lazy singleton
2538
- */
2539
- declare function getLazySingleton<T>(key: string, options: LazyOptions<T>): Lazy<T>;
2540
- /**
2541
- * Dispose a lazy singleton
2542
- */
2543
- declare function disposeLazySingleton(key: string): Promise<void>;
2544
- /**
2545
- * Dispose all lazy singletons
2546
- */
2547
- declare function disposeAllLazySingletons(): Promise<void>;
2548
- /**
2549
- * Lazy module loader for dynamic imports
2550
- *
2551
- * @example
2552
- * ```typescript
2553
- * const wasmLoader = new LazyModule(() => import('./wasm-loader.js'));
2554
- * const { parseFormula } = await wasmLoader.get();
2555
- * ```
2556
- */
2557
- declare class LazyModule<T> {
2558
- private lazy;
2559
- constructor(importer: () => Promise<T>, options?: Omit<LazyOptions<T>, 'factory'>);
2560
- /**
2561
- * Get the module
2562
- */
2563
- get(): Promise<T>;
2564
- /**
2565
- * Check if loaded
2566
- */
2567
- isLoaded(): boolean;
2568
- /**
2569
- * Dispose module
2570
- */
2571
- dispose(): Promise<void>;
2572
- }
2573
- /**
2574
- * Lazy bridge wrapper for Gas Town bridges
2575
- *
2576
- * Defers bridge initialization until first use.
2577
- */
2578
- declare class LazyBridge<T extends {
2579
- initialize?: () => Promise<void>;
2580
- }> {
2581
- private lazy;
2582
- constructor(factory: () => T | Promise<T>, options?: Omit<LazyOptions<T>, 'factory'>);
2583
- /**
2584
- * Get the bridge
2585
- */
2586
- get(): Promise<T>;
2587
- /**
2588
- * Check if initialized
2589
- */
2590
- isInitialized(): boolean;
2591
- /**
2592
- * Dispose bridge
2593
- */
2594
- dispose(): Promise<void>;
2595
- /**
2596
- * Get stats
2597
- */
2598
- getStats(): LazyStats;
2599
- }
2600
- /**
2601
- * Lazy WASM module loader with caching
2602
- */
2603
- declare class LazyWasm<T> {
2604
- private lazy;
2605
- private cached;
2606
- constructor(loader: () => Promise<T>, options?: {
2607
- name?: string;
2608
- idleTimeout?: number;
2609
- onError?: (error: Error) => void;
2610
- });
2611
- /**
2612
- * Get the WASM module
2613
- */
2614
- get(): Promise<T>;
2615
- /**
2616
- * Check if loaded
2617
- */
2618
- isLoaded(): boolean;
2619
- /**
2620
- * Clear cache (module will be reloaded on next access)
2621
- */
2622
- clearCache(): void;
2623
- /**
2624
- * Get stats
2625
- */
2626
- getStats(): LazyStats;
2627
- }
2628
- /**
2629
- * Lazy observer pattern for convoy watching
2630
- *
2631
- * Defers observer creation until first watch request.
2632
- */
2633
- declare class LazyObserver<T> {
2634
- private lazy;
2635
- private watchCount;
2636
- constructor(factory: () => T | Promise<T>, options?: Omit<LazyOptions<T>, 'factory'>);
2637
- /**
2638
- * Start watching (initializes observer if needed)
2639
- */
2640
- watch(): Promise<T>;
2641
- /**
2642
- * Stop watching (disposes observer if no more watchers)
2643
- */
2644
- unwatch(): Promise<void>;
2645
- /**
2646
- * Get current watch count
2647
- */
2648
- getWatchCount(): number;
2649
- /**
2650
- * Check if active
2651
- */
2652
- isActive(): boolean;
2653
- /**
2654
- * Force dispose
2655
- */
2656
- dispose(): Promise<void>;
2657
- }
2658
- /**
2659
- * Create a lazy property getter
2660
- */
2661
- declare function createLazyProperty<T>(factory: () => T | Promise<T>, options?: Omit<LazyOptions<T>, 'factory'>): {
2662
- get: () => Promise<T>;
2663
- isInitialized: () => boolean;
2664
- };
2665
-
2666
761
  /**
2667
762
  * Memory Management Module for Gas Town Bridge Plugin
2668
763
  *
@@ -2789,325 +884,6 @@ declare function acquireMolecule(): PooledMolecule;
2789
884
  */
2790
885
  declare function releaseMolecule(molecule: PooledMolecule): void;
2791
886
 
2792
- /**
2793
- * Convoy Observer
2794
- *
2795
- * Monitors convoy completion by observing issue state changes
2796
- * and detecting when all tracked issues are complete. Uses
2797
- * WASM-accelerated graph analysis for dependency resolution.
2798
- *
2799
- * Features:
2800
- * - Watch convoys for completion
2801
- * - Detect blocking issues
2802
- * - Identify ready-to-work issues
2803
- * - WASM-accelerated dependency graph analysis
2804
- * - Configurable polling intervals
2805
- *
2806
- * @module gastown-bridge/convoy/observer
2807
- */
2808
-
2809
- /**
2810
- * WASM graph module interface
2811
- */
2812
- interface WasmGraphModule {
2813
- /** Check if dependency graph has cycles */
2814
- has_cycle(beadsJson: string): boolean;
2815
- /** Find nodes participating in cycles */
2816
- find_cycle_nodes(beadsJson: string): string;
2817
- /** Get beads with no unresolved dependencies */
2818
- get_ready_beads(beadsJson: string): string;
2819
- /** Compute execution levels for parallel processing */
2820
- compute_levels(beadsJson: string): string;
2821
- /** Topological sort of beads */
2822
- topo_sort(beadsJson: string): string;
2823
- /** Critical path analysis */
2824
- critical_path(beadsJson: string): string;
2825
- }
2826
- /**
2827
- * Completion callback signature
2828
- */
2829
- type CompletionCallback = (convoy: Convoy, allComplete: boolean) => void;
2830
- /**
2831
- * Observer watch handle
2832
- */
2833
- interface WatchHandle {
2834
- /** Convoy ID being watched */
2835
- convoyId: string;
2836
- /** Stop watching */
2837
- stop(): void;
2838
- /** Check if still watching */
2839
- isActive(): boolean;
2840
- }
2841
- /**
2842
- * Observer configuration
2843
- */
2844
- interface ConvoyObserverConfig {
2845
- /** BD bridge instance */
2846
- bdBridge: BdBridge;
2847
- /** Convoy tracker instance */
2848
- tracker: ConvoyTracker;
2849
- /** Optional WASM graph module */
2850
- wasmModule?: WasmGraphModule;
2851
- /** Initial polling interval in milliseconds */
2852
- pollInterval?: number;
2853
- /** Maximum poll attempts before giving up */
2854
- maxPollAttempts?: number;
2855
- /** Enable WASM acceleration (falls back to JS if unavailable) */
2856
- useWasm?: boolean;
2857
- /** Enable exponential backoff for polling */
2858
- useExponentialBackoff?: boolean;
2859
- /** Maximum backoff interval in milliseconds */
2860
- maxBackoffInterval?: number;
2861
- /** Backoff multiplier (default: 1.5) */
2862
- backoffMultiplier?: number;
2863
- /** Enable delta-based updates (only emit on changes) */
2864
- deltaUpdatesOnly?: boolean;
2865
- /** Debounce interval for progress updates in milliseconds */
2866
- progressDebounceMs?: number;
2867
- }
2868
- /**
2869
- * Blocker information
2870
- */
2871
- interface BlockerInfo {
2872
- /** Issue ID that is blocked */
2873
- blockedIssue: string;
2874
- /** Issue IDs that are blocking */
2875
- blockers: string[];
2876
- /** True if blockers are from within the convoy */
2877
- internalBlockers: boolean;
2878
- }
2879
- /**
2880
- * Ready issue information
2881
- */
2882
- interface ReadyIssueInfo {
2883
- /** Issue ID */
2884
- id: string;
2885
- /** Issue title */
2886
- title: string;
2887
- /** Priority */
2888
- priority: number;
2889
- /** Execution level (for parallel processing) */
2890
- level: number;
2891
- }
2892
- /**
2893
- * Completion check result
2894
- */
2895
- interface CompletionCheckResult {
2896
- /** True if all issues are complete */
2897
- allComplete: boolean;
2898
- /** Progress statistics */
2899
- progress: ConvoyProgress;
2900
- /** Issues that are still open */
2901
- openIssues: string[];
2902
- /** Issues that are in progress */
2903
- inProgressIssues: string[];
2904
- /** Issues that are blocked */
2905
- blockedIssues: BlockerInfo[];
2906
- /** Issues ready to work on */
2907
- readyIssues: ReadyIssueInfo[];
2908
- /** True if there are dependency cycles */
2909
- hasCycles: boolean;
2910
- /** Issues involved in cycles */
2911
- cycleIssues: string[];
2912
- }
2913
- /**
2914
- * Logger interface
2915
- */
2916
- interface ObserverLogger {
2917
- debug: (msg: string, meta?: Record<string, unknown>) => void;
2918
- info: (msg: string, meta?: Record<string, unknown>) => void;
2919
- warn: (msg: string, meta?: Record<string, unknown>) => void;
2920
- error: (msg: string, meta?: Record<string, unknown>) => void;
2921
- }
2922
- /**
2923
- * Convoy Observer
2924
- *
2925
- * Monitors convoys for completion and provides dependency analysis.
2926
- *
2927
- * @example
2928
- * ```typescript
2929
- * const observer = new ConvoyObserver({
2930
- * bdBridge,
2931
- * tracker,
2932
- * pollInterval: 5000,
2933
- * useWasm: true,
2934
- * });
2935
- *
2936
- * // Watch for completion
2937
- * const handle = observer.watch(convoyId, (convoy, complete) => {
2938
- * if (complete) {
2939
- * console.log('Convoy complete!');
2940
- * }
2941
- * });
2942
- *
2943
- * // Check blockers
2944
- * const blockers = await observer.getBlockers(convoyId);
2945
- *
2946
- * // Get ready issues
2947
- * const ready = await observer.getReadyIssues(convoyId);
2948
- *
2949
- * // Stop watching
2950
- * handle.stop();
2951
- * ```
2952
- */
2953
- declare class ConvoyObserver extends EventEmitter {
2954
- private bdBridge;
2955
- private tracker;
2956
- private wasmModule?;
2957
- private logger;
2958
- private config;
2959
- private watchers;
2960
- private readonly beadCache;
2961
- private readonly completionCache;
2962
- private readonly fetchDedup;
2963
- private readonly progressEmitters;
2964
- private pendingSubscriptions;
2965
- private subscriptionFlushTimer;
2966
- constructor(config: ConvoyObserverConfig, logger?: ObserverLogger);
2967
- /**
2968
- * Watch a convoy for completion
2969
- *
2970
- * @param convoyId - Convoy ID to watch
2971
- * @param callback - Called on each check with completion status
2972
- * @returns Watch handle to stop watching
2973
- */
2974
- watch(convoyId: string, callback: CompletionCallback): WatchHandle;
2975
- /**
2976
- * Batch subscribe to multiple convoys
2977
- * Subscriptions are batched and flushed together for efficiency
2978
- *
2979
- * @param convoyId - Convoy ID to watch
2980
- * @param callback - Callback for completion status
2981
- */
2982
- batchSubscribe(convoyId: string, callback: CompletionCallback): void;
2983
- /**
2984
- * Flush pending subscriptions
2985
- */
2986
- private flushSubscriptions;
2987
- /**
2988
- * Check if all issues in a convoy are complete
2989
- *
2990
- * @param convoyId - Convoy ID
2991
- * @returns Completion check result with detailed status
2992
- */
2993
- checkCompletion(convoyId: string): Promise<CompletionCheckResult>;
2994
- /**
2995
- * Get blockers for all issues in a convoy
2996
- *
2997
- * @param convoyId - Convoy ID
2998
- * @returns Array of blocker information
2999
- */
3000
- getBlockers(convoyId: string): Promise<BlockerInfo[]>;
3001
- /**
3002
- * Get issues ready to work on (no unresolved dependencies)
3003
- *
3004
- * @param convoyId - Convoy ID
3005
- * @returns Array of ready issue information
3006
- */
3007
- getReadyIssues(convoyId: string): Promise<ReadyIssueInfo[]>;
3008
- /**
3009
- * Get execution order for convoy issues
3010
- *
3011
- * @param convoyId - Convoy ID
3012
- * @returns Ordered array of issue IDs
3013
- */
3014
- getExecutionOrder(convoyId: string): Promise<string[]>;
3015
- /**
3016
- * Stop watching a convoy
3017
- */
3018
- stopWatching(convoyId: string): void;
3019
- /**
3020
- * Stop all watchers
3021
- */
3022
- stopAll(): void;
3023
- /**
3024
- * Set WASM module
3025
- */
3026
- setWasmModule(module: WasmGraphModule): void;
3027
- /**
3028
- * Check if WASM is available
3029
- */
3030
- isWasmAvailable(): boolean;
3031
- /**
3032
- * Poll convoy for completion with exponential backoff
3033
- */
3034
- private pollConvoyWithBackoff;
3035
- /**
3036
- * Legacy poll convoy method (without backoff)
3037
- * @deprecated Use pollConvoyWithBackoff instead
3038
- */
3039
- private pollConvoy;
3040
- /**
3041
- * Fetch beads by IDs with caching, batch deduplication, and object pooling.
3042
- * Uses PooledBead from memory module for reduced allocations.
3043
- */
3044
- private fetchBeads;
3045
- /**
3046
- * Map CLI bead type to Gas Town status
3047
- */
3048
- private mapBeadStatus;
3049
- /**
3050
- * Convert beads to WASM node format
3051
- */
3052
- private beadsToWasmNodes;
3053
- /**
3054
- * Analyze dependencies with WASM
3055
- */
3056
- private analyzeWithWasm;
3057
- /**
3058
- * Analyze dependencies with JavaScript (fallback)
3059
- */
3060
- private analyzeWithJS;
3061
- /**
3062
- * Detect cycles using DFS (JavaScript)
3063
- */
3064
- private detectCyclesJS;
3065
- /**
3066
- * Find nodes in cycles (JavaScript)
3067
- */
3068
- private findCycleNodesJS;
3069
- /**
3070
- * Topological sort using Kahn's algorithm (JavaScript)
3071
- */
3072
- private topoSortJS;
3073
- /**
3074
- * Clean up resources
3075
- */
3076
- dispose(): void;
3077
- }
3078
- /**
3079
- * Create a new convoy observer instance
3080
- */
3081
- declare function createConvoyObserver(config: ConvoyObserverConfig, logger?: ObserverLogger): ConvoyObserver;
3082
- /**
3083
- * Create a lazy-initialized convoy observer.
3084
- * The observer is only created when first accessed (via watch() or checkCompletion()).
3085
- * Useful for deferring initialization until convoy monitoring is actually needed.
3086
- *
3087
- * @example
3088
- * ```typescript
3089
- * const lazyObserver = createLazyConvoyObserver(config);
3090
- *
3091
- * // Observer is NOT created yet
3092
- * console.log(lazyObserver.getWatchCount()); // 0
3093
- *
3094
- * // First watch triggers observer creation
3095
- * const observer = await lazyObserver.watch();
3096
- * const handle = observer.watch(convoyId, callback);
3097
- *
3098
- * // When done, unwatch to potentially dispose
3099
- * await lazyObserver.unwatch();
3100
- * ```
3101
- */
3102
- declare function createLazyConvoyObserver(config: ConvoyObserverConfig, logger?: ObserverLogger): LazyObserver<ConvoyObserver>;
3103
- /**
3104
- * Get lazy observer statistics
3105
- */
3106
- declare function getLazyObserverStats(lazyObserver: LazyObserver<ConvoyObserver>): {
3107
- isActive: boolean;
3108
- watchCount: number;
3109
- };
3110
-
3111
887
  /**
3112
888
  * Gas Town Bridge Plugin - MCP Tools
3113
889
  *
@@ -4100,8 +1876,8 @@ declare const CreateBeadOptionsSchema: z.ZodObject<{
4100
1876
  rig: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>>;
4101
1877
  assignee: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
4102
1878
  }, "strip", z.ZodTypeAny, {
4103
- priority: number;
4104
1879
  title: string;
1880
+ priority: number;
4105
1881
  labels: string[];
4106
1882
  description?: string | undefined;
4107
1883
  assignee?: string | undefined;
@@ -4111,8 +1887,8 @@ declare const CreateBeadOptionsSchema: z.ZodObject<{
4111
1887
  title: string;
4112
1888
  description?: string | undefined;
4113
1889
  priority?: number | undefined;
4114
- assignee?: string | undefined;
4115
1890
  labels?: string[] | undefined;
1891
+ assignee?: string | undefined;
4116
1892
  rig?: string | undefined;
4117
1893
  parent?: string | undefined;
4118
1894
  }>;
@@ -4125,13 +1901,13 @@ declare const CreateConvoyOptionsSchema: z.ZodObject<{
4125
1901
  description: z.ZodOptional<z.ZodString>;
4126
1902
  formula: z.ZodOptional<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodEffects<z.ZodString, string, string>, string, string>, string, string>, string, string>>;
4127
1903
  }, "strip", z.ZodTypeAny, {
4128
- name: string;
4129
1904
  issues: string[];
1905
+ name: string;
4130
1906
  description?: string | undefined;
4131
1907
  formula?: string | undefined;
4132
1908
  }, {
4133
- name: string;
4134
1909
  issues: string[];
1910
+ name: string;
4135
1911
  description?: string | undefined;
4136
1912
  formula?: string | undefined;
4137
1913
  }>;
@@ -4685,4 +2461,4 @@ declare class GasTownBridgePlugin extends EventEmitter implements IPlugin {
4685
2461
  */
4686
2462
  declare function createGasTownBridgePlugin(config?: Partial<GasTownBridgeConfig>): GasTownBridgePlugin;
4687
2463
 
4688
- export { type AgentRole, type AllocatableType, Arena, type ArenaConfig, ArenaManager, type ArenaStats, type Aspect, AspectSchema, BEAD_ID_PATTERN, BdBridge, type Bead, type BeadDependency, type BeadGraph, BeadIdSchema as BeadIdValidationSchema, BeadSchema, type BeadStatus, BeadStatusSchema, BeadsError, type BlockerInfo, CLIExecutionError, CONVOY_HASH_PATTERN, type CompletionCallback, type CompletionCheckResult, type Convoy, type ConvoyAction, ConvoyError, type ConvoyEvent, type ConvoyEventType, ConvoyIdSchema, type ConvoyLogger, ConvoyObserver, type ConvoyObserverConfig, type ConvoyOptimization, type ConvoyProgress, ConvoyProgressSchema, ConvoySchema, type ConvoyStatus, ConvoyStatusSchema, type ConvoyStrategy, ConvoyTracker, type ConvoyTrackerConfig, type CookedFormula, type CreateBeadOptions, CreateBeadOptionsSchema$1 as CreateBeadOptionsSchema, type CreateConvoyOptions, CreateConvoyOptionsSchema$1 as CreateConvoyOptionsSchema, type CriticalPathResult, type CycleDetectionResult, DEFAULT_CONFIG, type DepAction, type DependencyAction, type DependencyResolution, GasTownErrorCode as ErrorCodes, type ExecuteOptions, type ExecutionProgress, type ExecutorEvents, FORMULA_NAME_PATTERN, type Formula, type FormulaAST, FormulaError, FormulaExecutor, FormulaNameSchema, FormulaSchema, type FormulaType, FormulaTypeSchema, type GasTownAgent, type GasTownAgentRole, GasTownAgentRoleSchema, type GasTownBridgeConfig, GasTownBridgePlugin, type GasTownConfig, GasTownConfigSchema, GasTownError, type GasTownErrorCode$1 as GasTownErrorCode, type GasTownErrorCodeType, GasTownErrorCodes, type GasTownMail, type GraphEdge, GtArgsSchema, GtBridge, type HookPriority, type IBeadsSyncService, type IDependencyWasm, type IFormulaEngine, type IFormulaWasm, type IGasTownBridge, type IGuppAdapter, type IPlugin, type ISyncService, type IWasmBridge, type IWasmLoader, LabelsSchema, Lazy, LazyBridge, LazyModule, LazyObserver, type LazyOptions, type LazyState, type LazyStats, LazyWasm, type Leg, LegSchema, MAX_LENGTHS, MAX_OUTPUT_SIZE, type MCPTool, type MCPToolResult, type MailAction, type MemoryBudget, MemoryBudgetManager, MemoryMonitor, type MemoryMonitorConfig, type MemoryMonitorEvents, type MemoryPressureCallback, type MemoryPressureLevel, type MemoryStats, type MemorySystemConfig, type MemorySystemState, type Molecule, type NodeWeight, ObjectPool, type ObserverLogger, PATH_TRAVERSAL_PATTERNS, type PatternMatch, type PerformanceTiming, type PluginContext, type PluginHook, type PluginMCPTool, type PoolConfig, type PoolStats, type PoolType, type Poolable, PooledBead, PooledConvoy, PooledFormula, PooledMolecule, PooledStep, PrioritySchema, REDACTED_FIELDS, type ReadyIssueInfo, RigNameSchema, SENSITIVE_FIELD_PATTERNS, SHELL_METACHARACTERS, type SlingOptions, SlingOptionsSchema$1 as SlingOptionsSchema, type SlingTarget, SlingTargetSchema, type Step, type StepContext, type StepResult, StepSchema, SyncBridge, type SyncDirection, SyncDirectionSchema, type SyncResult, type Synthesis, SynthesisSchema, type TargetAgent, type Template, TemplateSchema, type ToolContext, type TopoSortResult, type TypeMap, UUID_PATTERN, type ValidationConstraint, ValidationError, SafeStringSchema as ValidatorSafeStringSchema, type Var, VarSchema, type WasmGraphModule, _default as WasmLoader, type WatchHandle, acquireBead, acquireConvoy, acquireFormula, acquireMolecule, acquireStep, arenaManager, beadPool, clearAllPools, clearPerformanceLog, containsPathTraversal, containsShellMetacharacters, convoyPool, cookBatch, cookFormula, createConvoyObserver, createConvoyTracker, createFormulaExecutor, createGasTownBridgePlugin, createLazyConvoyObserver, createLazyProperty, criticalPath, GasTownBridgePlugin as default, detectCycles, disposeAllLazySingletons, disposeDefaultMonitor, disposeLazySingleton, formulaPool, gasTownBridgeTools, getAllPoolStats, getDefaultMonitor, getErrorMessage, getLazyObserverStats, getLazySingleton, getMemoryMonitor, getMemoryReport, getMemoryUsage, getPerformanceLog, getPoolEfficiencySummary, getSystemMemoryStats, getTool, getToolsByLayer, getTotalMemorySaved, getWasmVersions, initializeMemorySystem, isBeadsError, isCLIExecutionError, isGasTownError, isMemorySystemInitialized, isSafeArgument, isValidBeadId, isValidConvoyId, isValidFormulaName, isValidationError, isWasmAvailable, loadFormulaWasm, loadGnnWasm, memoryBudget, moleculePool, onMemoryPressure, parseDate, parseFormula, preWarmAllPools, preloadWasmModules, redactSensitiveFields, releaseBead, releaseConvoy, releaseFormula, releaseMolecule, releaseStep, resetWasmCache, sanitizeBeadOutput, sanitizeBeadsListOutput, sanitizeConvoyOutput, sanitizeFormulaOutput, sanitizeMetadata, sanitizePath, sanitizeString, scopedArena, setMemoryLimit, shutdownMemorySystem, stepPool, toolCategories, toolHandlers, topoSort, triggerMemoryCleanup, validateBead, validateBeadId, validateCreateBeadOptions as validateBeadOptions, validateConfig, validateConvoy, validateConvoyId, validateCreateConvoyOptions as validateConvoyOptions, validateCreateBeadOptions$1 as validateCreateBeadOptions, validateCreateConvoyOptions$1 as validateCreateConvoyOptions, validateFormula, validateFormulaName, validateGtArgs, validateSlingOptions as validateSling, validateSlingOptions$1 as validateSlingOptions, withArena, withArenaSync, wrapError };
2464
+ export { type AllocatableType, Arena, type ArenaConfig, ArenaManager, type ArenaStats, BEAD_ID_PATTERN, BdBridge, Bead, BeadGraph, BeadIdSchema as BeadIdValidationSchema, BeadStatus, BeadsError, CLIExecutionError, CONVOY_HASH_PATTERN, Convoy, ConvoyError, ConvoyIdSchema, ConvoyObserver, ConvoyStatus, ConvoyTracker, CreateBeadOptions, CriticalPathResult, type CycleDetectionResult, GasTownErrorCode as ErrorCodes, FORMULA_NAME_PATTERN, Formula, FormulaError, FormulaExecutor, FormulaNameSchema, FormulaType, type GasTownBridgeConfig, GasTownBridgePlugin, GasTownConfig, GasTownError, type GasTownErrorCodeType, type GraphEdge, GtArgsSchema, GtBridge, type HookPriority, IBeadsSyncService, IDependencyWasm, type IFormulaEngine, IFormulaWasm, type IGasTownBridge, type IGuppAdapter, type IPlugin, type ISyncService, type IWasmBridge, LabelsSchema, LazyStats, MAX_LENGTHS, MAX_OUTPUT_SIZE, type MCPTool, type MCPToolResult, type MemoryBudget, MemoryBudgetManager, MemoryMonitor, type MemoryMonitorConfig, type MemoryMonitorEvents, type MemoryPressureCallback, type MemoryPressureLevel, type MemoryStats, type MemorySystemConfig, type MemorySystemState, Molecule, type NodeWeight, ObjectPool, PATH_TRAVERSAL_PATTERNS, type PerformanceTiming, type PluginContext, type PluginHook, type PluginMCPTool, type PoolConfig, type PoolStats, type PoolType, type Poolable, PooledBead, PooledConvoy, PooledFormula, PooledMolecule, PooledStep, PrioritySchema, REDACTED_FIELDS, RigNameSchema, SENSITIVE_FIELD_PATTERNS, SHELL_METACHARACTERS, SlingOptions, Step, SyncBridge, SyncResult, type ToolContext, TopoSortResult, type TypeMap, UUID_PATTERN, type ValidationConstraint, ValidationError, SafeStringSchema as ValidatorSafeStringSchema, _default as WasmLoader, acquireBead, acquireConvoy, acquireFormula, acquireMolecule, acquireStep, arenaManager, beadPool, clearAllPools, clearPerformanceLog, containsPathTraversal, containsShellMetacharacters, convoyPool, cookBatch, cookFormula, createGasTownBridgePlugin, criticalPath, GasTownBridgePlugin as default, detectCycles, disposeDefaultMonitor, formulaPool, gasTownBridgeTools, getAllPoolStats, getDefaultMonitor, getErrorMessage, getMemoryMonitor, getMemoryReport, getMemoryUsage, getPerformanceLog, getPoolEfficiencySummary, getSystemMemoryStats, getTool, getToolsByLayer, getTotalMemorySaved, getWasmVersions, initializeMemorySystem, isBeadsError, isCLIExecutionError, isGasTownError, isMemorySystemInitialized, isSafeArgument, isValidBeadId, isValidConvoyId, isValidFormulaName, isValidationError, isWasmAvailable, loadFormulaWasm, loadGnnWasm, memoryBudget, moleculePool, onMemoryPressure, parseDate, parseFormula, preWarmAllPools, preloadWasmModules, redactSensitiveFields, releaseBead, releaseConvoy, releaseFormula, releaseMolecule, releaseStep, resetWasmCache, sanitizeBeadOutput, sanitizeBeadsListOutput, sanitizeConvoyOutput, sanitizeFormulaOutput, sanitizeMetadata, sanitizePath, sanitizeString, scopedArena, setMemoryLimit, shutdownMemorySystem, stepPool, toolCategories, toolHandlers, topoSort, triggerMemoryCleanup, validateBeadId, validateCreateBeadOptions as validateBeadOptions, validateConvoyId, validateCreateConvoyOptions as validateConvoyOptions, validateFormulaName, validateGtArgs, validateSlingOptions as validateSling, withArena, withArenaSync, wrapError };