@vertesia/common 1.0.0-dev.20260128.144200 → 1.0.0-dev.20260225.024852Z

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 (126) hide show
  1. package/lib/cjs/apikey.js +1 -0
  2. package/lib/cjs/apikey.js.map +1 -1
  3. package/lib/cjs/apps.js.map +1 -1
  4. package/lib/cjs/audit-trail.js +3 -0
  5. package/lib/cjs/audit-trail.js.map +1 -0
  6. package/lib/cjs/index.js +1 -0
  7. package/lib/cjs/index.js.map +1 -1
  8. package/lib/cjs/integrations.js +2 -0
  9. package/lib/cjs/integrations.js.map +1 -1
  10. package/lib/cjs/interaction.js.map +1 -1
  11. package/lib/cjs/project.js +37 -1
  12. package/lib/cjs/project.js.map +1 -1
  13. package/lib/cjs/prompt.js.map +1 -1
  14. package/lib/cjs/store/dsl-workflow.js.map +1 -1
  15. package/lib/cjs/store/hive-memory.js +3 -0
  16. package/lib/cjs/store/hive-memory.js.map +1 -0
  17. package/lib/cjs/store/index.js +2 -0
  18. package/lib/cjs/store/index.js.map +1 -1
  19. package/lib/cjs/store/rendering.js +22 -0
  20. package/lib/cjs/store/rendering.js.map +1 -0
  21. package/lib/cjs/store/schedule.js.map +1 -1
  22. package/lib/cjs/store/store.js +15 -2
  23. package/lib/cjs/store/store.js.map +1 -1
  24. package/lib/cjs/store/workflow.js +44 -1
  25. package/lib/cjs/store/workflow.js.map +1 -1
  26. package/lib/cjs/user.js.map +1 -1
  27. package/lib/cjs/utils/schemas.js +26 -2
  28. package/lib/cjs/utils/schemas.js.map +1 -1
  29. package/lib/cjs/versions.js +1 -0
  30. package/lib/cjs/versions.js.map +1 -1
  31. package/lib/esm/apikey.js +1 -0
  32. package/lib/esm/apikey.js.map +1 -1
  33. package/lib/esm/apps.js.map +1 -1
  34. package/lib/esm/audit-trail.js +2 -0
  35. package/lib/esm/audit-trail.js.map +1 -0
  36. package/lib/esm/index.js +1 -0
  37. package/lib/esm/index.js.map +1 -1
  38. package/lib/esm/integrations.js +2 -0
  39. package/lib/esm/integrations.js.map +1 -1
  40. package/lib/esm/interaction.js.map +1 -1
  41. package/lib/esm/project.js +36 -0
  42. package/lib/esm/project.js.map +1 -1
  43. package/lib/esm/prompt.js.map +1 -1
  44. package/lib/esm/store/dsl-workflow.js.map +1 -1
  45. package/lib/esm/store/hive-memory.js +2 -0
  46. package/lib/esm/store/hive-memory.js.map +1 -0
  47. package/lib/esm/store/index.js +2 -0
  48. package/lib/esm/store/index.js.map +1 -1
  49. package/lib/esm/store/rendering.js +18 -0
  50. package/lib/esm/store/rendering.js.map +1 -0
  51. package/lib/esm/store/schedule.js.map +1 -1
  52. package/lib/esm/store/store.js +13 -2
  53. package/lib/esm/store/store.js.map +1 -1
  54. package/lib/esm/store/workflow.js +39 -1
  55. package/lib/esm/store/workflow.js.map +1 -1
  56. package/lib/esm/user.js.map +1 -1
  57. package/lib/esm/utils/schemas.js +24 -2
  58. package/lib/esm/utils/schemas.js.map +1 -1
  59. package/lib/esm/versions.js +1 -0
  60. package/lib/esm/versions.js.map +1 -1
  61. package/lib/tsconfig.tsbuildinfo +1 -1
  62. package/lib/types/apikey.d.ts +2 -1
  63. package/lib/types/apikey.d.ts.map +1 -1
  64. package/lib/types/apps.d.ts +220 -1
  65. package/lib/types/apps.d.ts.map +1 -1
  66. package/lib/types/audit-trail.d.ts +49 -0
  67. package/lib/types/audit-trail.d.ts.map +1 -0
  68. package/lib/types/index.d.ts +1 -0
  69. package/lib/types/index.d.ts.map +1 -1
  70. package/lib/types/integrations.d.ts +8 -0
  71. package/lib/types/integrations.d.ts.map +1 -1
  72. package/lib/types/interaction.d.ts +10 -11
  73. package/lib/types/interaction.d.ts.map +1 -1
  74. package/lib/types/project.d.ts +256 -1
  75. package/lib/types/project.d.ts.map +1 -1
  76. package/lib/types/prompt.d.ts +3 -4
  77. package/lib/types/prompt.d.ts.map +1 -1
  78. package/lib/types/skill.d.ts.map +1 -1
  79. package/lib/types/store/conversation-state.d.ts +7 -0
  80. package/lib/types/store/conversation-state.d.ts.map +1 -1
  81. package/lib/types/store/doc-analyzer.d.ts +1 -1
  82. package/lib/types/store/doc-analyzer.d.ts.map +1 -1
  83. package/lib/types/store/dsl-workflow.d.ts +28 -0
  84. package/lib/types/store/dsl-workflow.d.ts.map +1 -1
  85. package/lib/types/store/hive-memory.d.ts +116 -0
  86. package/lib/types/store/hive-memory.d.ts.map +1 -0
  87. package/lib/types/store/index.d.ts +2 -0
  88. package/lib/types/store/index.d.ts.map +1 -1
  89. package/lib/types/store/rendering.d.ts +193 -0
  90. package/lib/types/store/rendering.d.ts.map +1 -0
  91. package/lib/types/store/schedule.d.ts +2 -0
  92. package/lib/types/store/schedule.d.ts.map +1 -1
  93. package/lib/types/store/store.d.ts +31 -2
  94. package/lib/types/store/store.d.ts.map +1 -1
  95. package/lib/types/store/workflow.d.ts +145 -7
  96. package/lib/types/store/workflow.d.ts.map +1 -1
  97. package/lib/types/user.d.ts +9 -0
  98. package/lib/types/user.d.ts.map +1 -1
  99. package/lib/types/utils/schemas.d.ts +13 -4
  100. package/lib/types/utils/schemas.d.ts.map +1 -1
  101. package/lib/types/versions.d.ts +2 -1
  102. package/lib/types/versions.d.ts.map +1 -1
  103. package/lib/vertesia-common.js +1 -1
  104. package/lib/vertesia-common.js.map +1 -1
  105. package/package.json +2 -4
  106. package/src/apikey.ts +1 -0
  107. package/src/apps.ts +249 -1
  108. package/src/audit-trail.ts +61 -0
  109. package/src/index.ts +1 -0
  110. package/src/integrations.ts +10 -0
  111. package/src/interaction.ts +11 -12
  112. package/src/project.ts +309 -1
  113. package/src/prompt.ts +3 -4
  114. package/src/skill.ts +1 -0
  115. package/src/store/conversation-state.ts +9 -0
  116. package/src/store/doc-analyzer.ts +1 -1
  117. package/src/store/dsl-workflow.ts +26 -0
  118. package/src/store/hive-memory.ts +167 -0
  119. package/src/store/index.ts +2 -0
  120. package/src/store/rendering.ts +233 -0
  121. package/src/store/schedule.ts +3 -0
  122. package/src/store/store.ts +40 -4
  123. package/src/store/workflow.ts +191 -7
  124. package/src/user.ts +11 -0
  125. package/src/utils/schemas.ts +33 -11
  126. package/src/versions.ts +1 -0
package/src/project.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  import { SupportedIntegrations } from "./integrations.js";
2
+ import { ContentObjectTypeRef } from "./store/store.js";
2
3
  import { AccountRef } from "./user.js";
3
4
 
4
5
  export interface ICreateProjectPayload {
@@ -183,6 +184,29 @@ export interface ProjectConfiguration {
183
184
  */
184
185
  agent_streaming_enabled?: boolean;
185
186
 
187
+ /**
188
+ * Indexing configuration for this project.
189
+ * Controls whether indexing and querying are enabled at the project level.
190
+ */
191
+ indexing?: {
192
+ /**
193
+ * Enable indexing for content objects in this project.
194
+ * When enabled, content changes trigger indexing workflows.
195
+ * Defaults to true - indexing is always on when ES infrastructure is available.
196
+ */
197
+ enabled?: boolean;
198
+ };
199
+
200
+ /**
201
+ * Primary language for full-text search analysis.
202
+ * ISO 639-1 code (e.g., 'en', 'fr', 'ja', 'de').
203
+ * Determines which Elasticsearch analyzer is used for the text field.
204
+ * Defaults to 'en' (English/standard analyzer).
205
+ *
206
+ * Changing this value requires a full reindex to take effect.
207
+ */
208
+ main_language?: string;
209
+
186
210
  }
187
211
 
188
212
  // export interface ProjectConfigurationEmbeddings {
@@ -246,7 +270,6 @@ export const ProjectRefPopulate = "id name account";
246
270
  export interface EmbeddingsStatusResponse {
247
271
  status: string;
248
272
  embeddingRunsInProgress?: number;
249
- totalRunsInProgress?: number;
250
273
  totalIndexableObjects?: number;
251
274
  embeddingsModels?: string[];
252
275
  objectsWithEmbeddings?: number;
@@ -257,6 +280,291 @@ export interface EmbeddingsStatusResponse {
257
280
  }
258
281
  }
259
282
 
283
+ /**
284
+ * Response from indexing status endpoint
285
+ */
286
+ export interface IndexingStatusResponse {
287
+ /** Whether indexing infrastructure is available globally */
288
+ infrastructureEnabled: boolean;
289
+ /** Whether indexing is enabled for this project */
290
+ indexingEnabled: boolean;
291
+ /** @deprecated Now derived from indexingEnabled - queries automatically route to index when indexing is enabled */
292
+ query_enabled: boolean;
293
+ /** Index status */
294
+ index: {
295
+ /** Whether the index exists */
296
+ exists: boolean;
297
+ /** Alias name (used for queries) */
298
+ aliasName: string;
299
+ /** Actual index name (versioned) */
300
+ indexName: string;
301
+ /** Index version (timestamp when created) */
302
+ version: number;
303
+ /** When the current index was created */
304
+ createdAt: string | null;
305
+ /** Number of documents in the index */
306
+ documentCount: number;
307
+ /** Index size in bytes */
308
+ sizeBytes: number;
309
+ };
310
+ /** MongoDB document count for comparison */
311
+ mongoDocumentCount: number;
312
+ /** Whether a reindex is currently in progress */
313
+ reindexInProgress: boolean;
314
+ /** Reindex progress (if reindex is in progress) */
315
+ reindexProgress?: {
316
+ /** Total documents to reindex */
317
+ total: number;
318
+ /** Documents processed so far */
319
+ processed: number;
320
+ /** Successfully indexed documents */
321
+ successful: number;
322
+ /** Failed documents */
323
+ failed: number;
324
+ /** Current status (e.g., "indexing", "complete") */
325
+ status: string;
326
+ /** Current batch number */
327
+ currentBatch: number;
328
+ /** Total number of batches */
329
+ totalBatches: number;
330
+ /** Percentage complete (0-100) */
331
+ percentComplete: number;
332
+ /** Batches processed per second */
333
+ batchesPerSecond: number;
334
+ /** Documents processed per second */
335
+ docsPerSecond: number;
336
+ /** Elapsed time in seconds */
337
+ elapsedSeconds: number;
338
+ /** Estimated seconds remaining (null if unknown) */
339
+ estimatedSecondsRemaining: number | null;
340
+ };
341
+ }
342
+
343
+ // ============================================================================
344
+ // Internal indexing types (used by Temporal workflows)
345
+ // ============================================================================
346
+
347
+ /**
348
+ * Document data structure for Elasticsearch indexing
349
+ */
350
+ export interface ElasticsearchDocumentData {
351
+ name?: string;
352
+ text?: string;
353
+ properties?: Record<string, unknown>;
354
+ status?: string;
355
+ type?: ContentObjectTypeRef;
356
+ security?: {
357
+ 'content:read'?: string[];
358
+ 'content:write'?: string[];
359
+ 'content:delete'?: string[];
360
+ };
361
+ revision?: {
362
+ head?: boolean;
363
+ root?: string;
364
+ };
365
+ embeddings_text?: number[];
366
+ embeddings_image?: number[];
367
+ embeddings_properties?: number[];
368
+ created_at?: Date | string;
369
+ updated_at?: Date | string;
370
+ }
371
+
372
+ /**
373
+ * Result from bulk indexing
374
+ */
375
+ export interface BulkIndexResult {
376
+ successful: number;
377
+ failed: number;
378
+ }
379
+
380
+ /**
381
+ * Result from creating a reindex target
382
+ */
383
+ export interface CreateReindexTargetResult {
384
+ created: boolean;
385
+ indexName: string;
386
+ aliasName: string;
387
+ version: number;
388
+ }
389
+
390
+ /**
391
+ * Result from getting reindex range
392
+ */
393
+ export interface ReindexRangeResult {
394
+ first: string | null;
395
+ last: string | null;
396
+ count: number;
397
+ }
398
+
399
+ /**
400
+ * Result from fetching a batch
401
+ */
402
+ export interface FetchBatchResult {
403
+ documents: Array<{
404
+ id: string;
405
+ document: ElasticsearchDocumentData;
406
+ }>;
407
+ nextCursor: string | null;
408
+ done: boolean;
409
+ }
410
+
411
+ /**
412
+ * Result from indexing a batch
413
+ */
414
+ export interface IndexBatchResult {
415
+ successful: number;
416
+ failed: number;
417
+ processed: number;
418
+ nextCursor: string | null;
419
+ done: boolean;
420
+ }
421
+
422
+ /**
423
+ * Result from triggering a reindex
424
+ */
425
+ export interface TriggerReindexResult {
426
+ status: string;
427
+ workflow?: string;
428
+ workflowId?: string;
429
+ runId?: string;
430
+ objectCount?: number;
431
+ reason?: string;
432
+ enabled?: boolean;
433
+ }
434
+
435
+ /**
436
+ * Elasticsearch index statistics
437
+ */
438
+ export interface ElasticsearchIndexStats {
439
+ enabled: boolean;
440
+ exists?: boolean;
441
+ documentCount?: number;
442
+ sizeInBytes?: number;
443
+ indexName?: string;
444
+ aliasName?: string;
445
+ }
446
+
447
+ /**
448
+ * Embedding configuration for a single type
449
+ */
450
+ export interface EmbeddingTypeConfig {
451
+ environment?: string;
452
+ dimensions?: number;
453
+ model?: string;
454
+ provider?: string;
455
+ enabled?: boolean;
456
+ }
457
+
458
+ /**
459
+ * Detailed index configuration
460
+ */
461
+ export interface IndexConfiguration {
462
+ enabled: boolean;
463
+ exists?: boolean;
464
+ indexName?: string;
465
+ aliasName?: string;
466
+ version?: number;
467
+ documentCount?: number;
468
+ sizeInBytes?: number;
469
+ embeddingDimensions?: {
470
+ text?: number;
471
+ image?: number;
472
+ properties?: number;
473
+ };
474
+ /** ISO 639-1 language code for text analysis */
475
+ language?: string;
476
+ fieldMappings?: Record<string, unknown>;
477
+ projectEmbeddingsConfig?: {
478
+ text?: EmbeddingTypeConfig;
479
+ image?: EmbeddingTypeConfig;
480
+ properties?: EmbeddingTypeConfig;
481
+ };
482
+ createdAt?: Date | null;
483
+ }
484
+
485
+ /**
486
+ * Supported languages for full-text search with their display names.
487
+ * Maps ISO 639-1 codes to human-readable language names.
488
+ */
489
+ export const SUPPORTED_SEARCH_LANGUAGES: Record<string, string> = {
490
+ en: 'English',
491
+ zh: 'Chinese',
492
+ es: 'Spanish',
493
+ hi: 'Hindi',
494
+ ar: 'Arabic',
495
+ pt: 'Portuguese',
496
+ bn: 'Bengali',
497
+ ru: 'Russian',
498
+ ja: 'Japanese',
499
+ de: 'German',
500
+ fr: 'French',
501
+ ko: 'Korean',
502
+ it: 'Italian',
503
+ tr: 'Turkish',
504
+ vi: 'Vietnamese',
505
+ pl: 'Polish',
506
+ uk: 'Ukrainian',
507
+ nl: 'Dutch',
508
+ th: 'Thai',
509
+ el: 'Greek',
510
+ cs: 'Czech',
511
+ sv: 'Swedish',
512
+ ro: 'Romanian',
513
+ hu: 'Hungarian',
514
+ da: 'Danish',
515
+ fi: 'Finnish',
516
+ no: 'Norwegian',
517
+ he: 'Hebrew',
518
+ id: 'Indonesian',
519
+ fa: 'Persian',
520
+ };
521
+
522
+ /**
523
+ * Result from fetching documents by IDs
524
+ */
525
+ export interface FetchDocumentsByIdsResult {
526
+ documents: Array<{
527
+ id: string;
528
+ document: ElasticsearchDocumentData;
529
+ }>;
530
+ notFound: string[];
531
+ }
532
+
533
+ /**
534
+ * Result from bulk delete
535
+ */
536
+ export interface BulkDeleteResult {
537
+ successful: number;
538
+ failed: number;
539
+ }
540
+
541
+ /**
542
+ * Result from ensure index operation
543
+ */
544
+ export interface EnsureIndexResult {
545
+ created: boolean;
546
+ recreated?: boolean;
547
+ existed?: boolean;
548
+ enabled?: boolean;
549
+ status?: string;
550
+ dimensions?: {
551
+ text?: number;
552
+ image?: number;
553
+ properties?: number;
554
+ };
555
+ language?: string;
556
+ }
557
+
558
+ /**
559
+ * Result from swap alias operation
560
+ */
561
+ export interface SwapAliasResult {
562
+ swapped: boolean;
563
+ aliasName?: string;
564
+ newIndexName?: string;
565
+ reason?: string;
566
+ }
567
+
260
568
  export interface ProjectIntegrationListEntry {
261
569
  id: SupportedIntegrations;
262
570
  enabled: boolean;
package/src/prompt.ts CHANGED
@@ -1,6 +1,5 @@
1
- import type { JSONObject } from "@llumiverse/common";
1
+ import type { JSONObject, JSONSchema } from "@llumiverse/common";
2
2
  import { PromptRole } from "@llumiverse/common";
3
- import type { JSONSchema4 } from "json-schema";
4
3
  import { ProjectRef } from "./project.js";
5
4
 
6
5
  export interface ChatPromptSchema {
@@ -49,7 +48,7 @@ export interface PromptTemplateRef {
49
48
  }
50
49
 
51
50
  export interface PromptTemplateRefWithSchema extends PromptTemplateRef {
52
- inputSchema?: JSONSchema4;
51
+ inputSchema?: JSONSchema;
53
52
  }
54
53
 
55
54
  export enum TemplateType {
@@ -61,7 +60,7 @@ export interface ExecutablePromptTemplate {
61
60
  role: PromptRole;
62
61
  content: string;
63
62
  content_type: TemplateType;
64
- inputSchema?: JSONSchema4;
63
+ inputSchema?: JSONSchema;
65
64
  }
66
65
  export interface PromptTemplate extends ExecutablePromptTemplate {
67
66
  id: string;
package/src/skill.ts CHANGED
@@ -10,6 +10,7 @@
10
10
  * These are automatically synced to the sandbox when the skill is used.
11
11
  */
12
12
 
13
+
13
14
  /**
14
15
  * Context provided when searching for relevant skills
15
16
  */
@@ -127,6 +127,15 @@ export interface ConversationState {
127
127
  * When a skill is called, its related tools are added to unlocked_tools.
128
128
  */
129
129
  skill_tool_map?: Record<string, string[]>;
130
+
131
+ /**
132
+ * Current activity group ID for internal tool-execution progress messages.
133
+ * All updates emitted during one tool-execution cycle should share this ID.
134
+ */
135
+ active_activity_group_id?: string;
136
+
137
+ /** LLM stop reason from the latest call (e.g., "stop", "length", "tool_use") */
138
+ finish_reason?: string;
130
139
  }
131
140
 
132
141
  /** Skill metadata collected at workflow start for upfront sandbox hydration */
@@ -1,7 +1,7 @@
1
1
  import { WorkflowExecutionPayload, WorkflowRunStatus } from "./workflow.js";
2
2
 
3
3
  export interface PdfToRichtextOptions {
4
- features: string[];
4
+ features?: string[];
5
5
  debug?: boolean;
6
6
  [key: string]: any;
7
7
  }
@@ -3,6 +3,26 @@ import { BaseObject } from "./common.js";
3
3
  import { WorkflowExecutionPayload } from "./index.js";
4
4
  import { ParentClosePolicyType } from "./temporalio.js";
5
5
 
6
+ /**
7
+ * Discriminator for workflow input type - either object IDs or GCS file URIs
8
+ */
9
+ export type WorkflowInputType = 'objectIds' | 'files';
10
+
11
+ /**
12
+ * File reference with URL and mimetype
13
+ */
14
+ export interface WorkflowInputFile {
15
+ url: string;
16
+ mimetype: string;
17
+ }
18
+
19
+ /**
20
+ * Discriminated union for workflow inputs.
21
+ * Workflows can accept either a list of object IDs (existing behavior) OR a list of file references (new).
22
+ */
23
+ export type WorkflowInput =
24
+ | { inputType: 'objectIds', objectIds: string[] }
25
+ | { inputType: 'files', files: WorkflowInputFile[] };
6
26
 
7
27
  /**
8
28
  * The payload sent when starting a workflow from the temporal client to the workflow instance.
@@ -190,6 +210,12 @@ export interface DSLChildWorkflowStep extends DSLWorkflowStepBase {
190
210
  * since it may contain references to workflow execution vars.
191
211
  */
192
212
  output?: string;
213
+ /**
214
+ * A JSON expression which evaluates to true or false similar to mongo matches.
215
+ * The child workflow will only execute if the condition is satisfied.
216
+ * Example: {$eq: {wfVarName: value}}
217
+ */
218
+ condition?: Record<string, any>;
193
219
  /**
194
220
  * In case the dslWorkflow is used as a child workflow the spec is used to define the child workflow.
195
221
  * If spec is defined then the name must be "dslWorkflow"
@@ -0,0 +1,167 @@
1
+ import { BaseObject } from "./common.js";
2
+
3
+ /**
4
+ * Tool recommendation within a hive memory unit
5
+ */
6
+ export interface HiveMemoryToolRecommendation {
7
+ tool_name: string;
8
+ guidance: string;
9
+ }
10
+
11
+ /**
12
+ * Memory unit scope - project-scoped by default, can be elevated to account
13
+ */
14
+ export type HiveMemoryScope = 'project' | 'account';
15
+
16
+ /**
17
+ * Base interface for hive memory items (list/summary view)
18
+ */
19
+ export interface HiveMemoryItem extends BaseObject {
20
+ // Classification
21
+ task_category: string; // "document-analysis", "data-extraction", etc.
22
+ domain?: string; // "financial", "legal", etc.
23
+
24
+ // Summary
25
+ summary: string;
26
+
27
+ // Tools involved in the learnings
28
+ tools_involved: string[];
29
+
30
+ // Quality metrics
31
+ confidence_score: number; // 0-1
32
+ usage_count: number;
33
+ success_correlation: number; // correlation with successful runs
34
+ contribution_count: number; // number of runs that contributed
35
+
36
+ // Scoping
37
+ scope: HiveMemoryScope;
38
+ }
39
+
40
+ /**
41
+ * Full hive memory unit with all learnings and patterns
42
+ */
43
+ export interface HiveMemory extends HiveMemoryItem {
44
+ // Objective patterns this memory applies to
45
+ objective_patterns: string[];
46
+
47
+ // Learnings
48
+ general_learnings: string[];
49
+ best_practices: string[];
50
+ pitfalls_to_avoid: string[];
51
+ tool_recommendations: HiveMemoryToolRecommendation[];
52
+
53
+ // Vector search
54
+ embedding?: number[];
55
+
56
+ // Security field for granular permissions
57
+ security?: Record<string, string[]>;
58
+ }
59
+
60
+ /**
61
+ * Payload for creating a new hive memory unit
62
+ */
63
+ export interface CreateHiveMemoryPayload {
64
+ // Classification
65
+ task_category: string;
66
+ domain?: string;
67
+
68
+ // Content
69
+ summary: string;
70
+ objective_patterns: string[];
71
+
72
+ // Learnings
73
+ general_learnings: string[];
74
+ best_practices?: string[];
75
+ pitfalls_to_avoid?: string[];
76
+ tool_recommendations?: HiveMemoryToolRecommendation[];
77
+
78
+ // Metadata
79
+ tools_involved?: string[];
80
+
81
+ // Quality (optional, defaults applied)
82
+ confidence_score?: number;
83
+
84
+ // Scoping
85
+ scope?: HiveMemoryScope;
86
+
87
+ // Standard fields
88
+ name?: string;
89
+ description?: string;
90
+ tags?: string[];
91
+ }
92
+
93
+ /**
94
+ * Payload for updating an existing hive memory unit
95
+ */
96
+ export interface UpdateHiveMemoryPayload {
97
+ // Classification updates
98
+ task_category?: string;
99
+ domain?: string;
100
+
101
+ // Content updates
102
+ summary?: string;
103
+
104
+ // Array additions (merged with existing)
105
+ add_objective_patterns?: string[];
106
+ add_general_learnings?: string[];
107
+ add_best_practices?: string[];
108
+ add_pitfalls_to_avoid?: string[];
109
+ add_tool_recommendations?: HiveMemoryToolRecommendation[];
110
+ add_tools_involved?: string[];
111
+
112
+ // Quality updates
113
+ confidence_score?: number;
114
+ increment_usage_count?: boolean;
115
+ increment_contribution_count?: boolean;
116
+ success_correlation?: number;
117
+
118
+ // Scoping
119
+ scope?: HiveMemoryScope;
120
+
121
+ // Standard fields
122
+ name?: string;
123
+ description?: string;
124
+ tags?: string[];
125
+ }
126
+
127
+ /**
128
+ * Search parameters for finding relevant memories
129
+ */
130
+ export interface HiveMemorySearchParams {
131
+ // Semantic search
132
+ query?: string; // Natural language query
133
+ embedding?: number[]; // Pre-computed embedding for vector search
134
+
135
+ // Filters
136
+ task_category?: string;
137
+ domain?: string;
138
+ tools_involved?: string[];
139
+ scope?: HiveMemoryScope;
140
+ min_confidence?: number; // Minimum confidence score (0-1)
141
+
142
+ // Pagination
143
+ limit?: number; // Default: 5
144
+ offset?: number;
145
+ }
146
+
147
+ /**
148
+ * Response from memory search
149
+ */
150
+ export interface HiveMemorySearchResult {
151
+ memories: HiveMemory[];
152
+ total: number;
153
+ }
154
+
155
+ /**
156
+ * Formatted memory for agent consumption
157
+ */
158
+ export interface FormattedMemoryForAgent {
159
+ category: string;
160
+ domain?: string;
161
+ summary: string;
162
+ learnings: string[];
163
+ best_practices: string[];
164
+ pitfalls_to_avoid: string[];
165
+ tool_guidance: { tool: string; guidance: string }[];
166
+ confidence: number;
167
+ }
@@ -4,10 +4,12 @@ export * from "./common.js";
4
4
  export * from "./conversation-state.js";
5
5
  export * from "./doc-analyzer.js";
6
6
  export * from "./dsl-workflow.js";
7
+ export * from "./hive-memory.js";
7
8
  export * from "./object-types.js";
8
9
  export * from "./schedule.js";
9
10
  export * from "./signals.js";
10
11
  export * from "./store.js";
12
+ export * from "./rendering.js";
11
13
  export * from "./temporalio.js";
12
14
  export * from "./worker.js";
13
15
  export * from "./workflow.js";