@workglow/ai 0.0.111 → 0.0.113

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.
@@ -8,19 +8,19 @@ import { DataPortSchema, FromSchema } from "@workglow/util";
8
8
  declare const inputSchema: {
9
9
  readonly type: "object";
10
10
  readonly properties: {
11
- readonly documents: {
12
- readonly title: "Document Dataset";
13
- readonly description: "Dataset ID or instance for document data storage";
11
+ readonly knowledgeBase: {
12
+ readonly title: "Knowledge Base";
13
+ readonly description: "Knowledge base ID or instance";
14
14
  } & {
15
15
  title: string;
16
16
  description: string;
17
17
  } & {
18
- readonly format: "dataset:document";
18
+ readonly format: "dataset:knowledge-base";
19
19
  readonly anyOf: readonly [{
20
20
  readonly type: "string";
21
- readonly title: "Dataset ID";
21
+ readonly title: "Knowledge Base ID";
22
22
  }, {
23
- readonly title: "Dataset Instance";
23
+ readonly title: "Knowledge Base Instance";
24
24
  readonly additionalProperties: true;
25
25
  }];
26
26
  };
@@ -45,25 +45,15 @@ declare const inputSchema: {
45
45
  readonly items: {
46
46
  readonly type: "object";
47
47
  readonly properties: {
48
- readonly doc_id: {
49
- readonly type: "string";
50
- readonly title: "Document ID";
51
- readonly description: "ID of the parent document";
52
- };
53
48
  readonly chunkId: {
54
49
  readonly type: "string";
55
50
  readonly title: "Chunk ID";
56
51
  readonly description: "Unique identifier for this chunk";
57
52
  };
58
- readonly leafNodeId: {
53
+ readonly doc_id: {
59
54
  readonly type: "string";
60
- readonly title: "Leaf Node ID";
61
- readonly description: "ID of the leaf node this chunk belongs to";
62
- };
63
- readonly depth: {
64
- readonly type: "integer";
65
- readonly title: "Depth";
66
- readonly description: "Depth in the document tree";
55
+ readonly title: "Document ID";
56
+ readonly description: "ID of the parent document";
67
57
  };
68
58
  readonly text: {
69
59
  readonly type: "string";
@@ -78,6 +68,16 @@ declare const inputSchema: {
78
68
  readonly title: "Node Path";
79
69
  readonly description: "Node IDs from root to leaf";
80
70
  };
71
+ readonly depth: {
72
+ readonly type: "integer";
73
+ readonly title: "Depth";
74
+ readonly description: "Depth in the document tree";
75
+ };
76
+ readonly leafNodeId: {
77
+ readonly type: "string";
78
+ readonly title: "Leaf Node ID";
79
+ readonly description: "ID of the leaf node this chunk belongs to";
80
+ };
81
81
  readonly summary: {
82
82
  readonly type: "string";
83
83
  readonly title: "Summary";
@@ -110,12 +110,33 @@ declare const inputSchema: {
110
110
  readonly title: "Entities";
111
111
  readonly description: "Named entities extracted from the chunk";
112
112
  };
113
+ readonly parentSummaries: {
114
+ readonly type: "array";
115
+ readonly items: {
116
+ readonly type: "string";
117
+ };
118
+ readonly title: "Parent Summaries";
119
+ readonly description: "Summaries from ancestor nodes";
120
+ };
121
+ readonly sectionTitles: {
122
+ readonly type: "array";
123
+ readonly items: {
124
+ readonly type: "string";
125
+ };
126
+ readonly title: "Section Titles";
127
+ readonly description: "Titles of ancestor section nodes";
128
+ };
129
+ readonly doc_title: {
130
+ readonly type: "string";
131
+ readonly title: "Document Title";
132
+ readonly description: "Title of the parent document";
133
+ };
113
134
  };
114
- readonly required: readonly ["doc_id", "chunkId", "leafNodeId", "depth", "text", "nodePath"];
135
+ readonly required: readonly ["chunkId", "doc_id", "text", "nodePath", "depth"];
115
136
  readonly additionalProperties: true;
116
137
  };
117
- readonly title: "Chunk Metadata";
118
- readonly description: "Metadata for each chunk";
138
+ readonly title: "Chunk Records";
139
+ readonly description: "Array of chunk records";
119
140
  };
120
141
  readonly scores: {
121
142
  readonly type: "array";
@@ -138,7 +159,7 @@ declare const inputSchema: {
138
159
  readonly default: true;
139
160
  };
140
161
  };
141
- readonly required: readonly ["documents", "chunks", "chunk_ids", "metadata", "scores"];
162
+ readonly required: readonly ["knowledgeBase", "chunks", "chunk_ids", "metadata", "scores"];
142
163
  readonly additionalProperties: false;
143
164
  };
144
165
  declare const outputSchema: {
@@ -165,25 +186,15 @@ declare const outputSchema: {
165
186
  readonly items: {
166
187
  readonly type: "object";
167
188
  readonly properties: {
168
- readonly doc_id: {
169
- readonly type: "string";
170
- readonly title: "Document ID";
171
- readonly description: "ID of the parent document";
172
- };
173
189
  readonly chunkId: {
174
190
  readonly type: "string";
175
191
  readonly title: "Chunk ID";
176
192
  readonly description: "Unique identifier for this chunk";
177
193
  };
178
- readonly leafNodeId: {
194
+ readonly doc_id: {
179
195
  readonly type: "string";
180
- readonly title: "Leaf Node ID";
181
- readonly description: "ID of the leaf node this chunk belongs to";
182
- };
183
- readonly depth: {
184
- readonly type: "integer";
185
- readonly title: "Depth";
186
- readonly description: "Depth in the document tree";
196
+ readonly title: "Document ID";
197
+ readonly description: "ID of the parent document";
187
198
  };
188
199
  readonly text: {
189
200
  readonly type: "string";
@@ -198,6 +209,16 @@ declare const outputSchema: {
198
209
  readonly title: "Node Path";
199
210
  readonly description: "Node IDs from root to leaf";
200
211
  };
212
+ readonly depth: {
213
+ readonly type: "integer";
214
+ readonly title: "Depth";
215
+ readonly description: "Depth in the document tree";
216
+ };
217
+ readonly leafNodeId: {
218
+ readonly type: "string";
219
+ readonly title: "Leaf Node ID";
220
+ readonly description: "ID of the leaf node this chunk belongs to";
221
+ };
201
222
  readonly summary: {
202
223
  readonly type: "string";
203
224
  readonly title: "Summary";
@@ -228,7 +249,7 @@ declare const outputSchema: {
228
249
  readonly additionalProperties: false;
229
250
  };
230
251
  readonly title: "Entities";
231
- readonly description: "Named entities (rolled up from hierarchy)";
252
+ readonly description: "Named entities extracted from the chunk";
232
253
  };
233
254
  readonly parentSummaries: {
234
255
  readonly type: "array";
@@ -246,12 +267,17 @@ declare const outputSchema: {
246
267
  readonly title: "Section Titles";
247
268
  readonly description: "Titles of ancestor section nodes";
248
269
  };
270
+ readonly doc_title: {
271
+ readonly type: "string";
272
+ readonly title: "Document Title";
273
+ readonly description: "Title of the parent document";
274
+ };
249
275
  };
250
- readonly required: readonly ["doc_id", "chunkId", "leafNodeId", "depth", "text", "nodePath"];
276
+ readonly required: readonly ["chunkId", "doc_id", "text", "nodePath", "depth"];
251
277
  readonly additionalProperties: true;
252
278
  };
253
- readonly title: "Enriched Metadata";
254
- readonly description: "Metadata enriched with hierarchy information";
279
+ readonly title: "Chunk Records";
280
+ readonly description: "Array of chunk records";
255
281
  };
256
282
  readonly scores: {
257
283
  readonly type: "array";
@@ -274,7 +300,7 @@ export type HierarchyJoinTaskInput = FromSchema<typeof inputSchema>;
274
300
  export type HierarchyJoinTaskOutput = FromSchema<typeof outputSchema>;
275
301
  /**
276
302
  * Task for enriching search results with hierarchy information
277
- * Joins chunk IDs back to document repository to get parent summaries and entities
303
+ * Joins chunk IDs back to knowledge base to get parent summaries and entities
278
304
  */
279
305
  export declare class HierarchyJoinTask extends Task<HierarchyJoinTaskInput, HierarchyJoinTaskOutput, JobQueueTaskConfig> {
280
306
  static type: string;
@@ -289,6 +315,8 @@ export declare class HierarchyJoinTask extends Task<HierarchyJoinTaskInput, Hier
289
315
  export declare const hierarchyJoin: (input: HierarchyJoinTaskInput, config?: JobQueueTaskConfig) => Promise<{
290
316
  metadata: {
291
317
  [x: string]: unknown;
318
+ doc_title?: string | undefined;
319
+ leafNodeId?: string | undefined;
292
320
  summary?: string | undefined;
293
321
  entities?: {
294
322
  type: string;
@@ -302,7 +330,6 @@ export declare const hierarchyJoin: (input: HierarchyJoinTaskInput, config?: Job
302
330
  text: string;
303
331
  nodePath: string[];
304
332
  depth: number;
305
- leafNodeId: string;
306
333
  }[];
307
334
  chunks: string[];
308
335
  count: number;
@@ -1 +1 @@
1
- {"version":3,"file":"HierarchyJoinTask.d.ts","sourceRoot":"","sources":["../../src/task/HierarchyJoinTask.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AASH,OAAO,EACL,cAAc,EACd,eAAe,EACf,kBAAkB,EAClB,IAAI,EAEL,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EAAE,cAAc,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAE5D,QAAA,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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C3B,sBAAsB,EACtB,uBAAuB,EACvB,kBAAkB,CACnB,CAAC;KACH;CACF"}
@@ -47,7 +47,7 @@ declare const inputSchema: {
47
47
  declare const outputSchema: {
48
48
  readonly type: "object";
49
49
  readonly properties: {
50
- readonly queries: {
50
+ readonly query: {
51
51
  readonly type: "array";
52
52
  readonly items: {
53
53
  readonly type: "string";
@@ -71,7 +71,7 @@ declare const outputSchema: {
71
71
  readonly description: "Number of queries generated";
72
72
  };
73
73
  };
74
- readonly required: readonly ["queries", "originalQuery", "method", "count"];
74
+ readonly required: readonly ["query", "originalQuery", "method", "count"];
75
75
  readonly additionalProperties: false;
76
76
  };
77
77
  export type QueryExpanderTaskInput = FromSchema<typeof inputSchema>;
@@ -116,8 +116,8 @@ export declare class QueryExpanderTask extends Task<QueryExpanderTaskInput, Quer
116
116
  }
117
117
  export declare const queryExpander: (input: QueryExpanderTaskInput, config?: JobQueueTaskConfig) => Promise<{
118
118
  count: number;
119
+ query: string[];
119
120
  method: string;
120
- queries: string[];
121
121
  originalQuery: string;
122
122
  }>;
123
123
  declare module "@workglow/task-graph" {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@workglow/ai",
3
3
  "type": "module",
4
- "version": "0.0.111",
4
+ "version": "0.0.113",
5
5
  "description": "Core AI functionality for Workglow, including task execution, model management, and AI pipeline orchestration.",
6
6
  "scripts": {
7
7
  "watch": "concurrently -c 'auto' 'bun:watch-*'",
@@ -37,11 +37,11 @@
37
37
  "access": "public"
38
38
  },
39
39
  "peerDependencies": {
40
- "@workglow/dataset": "0.0.110",
41
- "@workglow/job-queue": "0.0.110",
42
- "@workglow/storage": "0.0.110",
43
- "@workglow/task-graph": "0.0.111",
44
- "@workglow/util": "0.0.111"
40
+ "@workglow/dataset": "0.0.113",
41
+ "@workglow/job-queue": "0.0.113",
42
+ "@workglow/storage": "0.0.113",
43
+ "@workglow/task-graph": "0.0.113",
44
+ "@workglow/util": "0.0.113"
45
45
  },
46
46
  "peerDependenciesMeta": {
47
47
  "@workglow/dataset": {
@@ -61,10 +61,10 @@
61
61
  }
62
62
  },
63
63
  "devDependencies": {
64
- "@workglow/dataset": "0.0.110",
65
- "@workglow/job-queue": "0.0.110",
66
- "@workglow/storage": "0.0.110",
67
- "@workglow/task-graph": "0.0.111",
68
- "@workglow/util": "0.0.111"
64
+ "@workglow/dataset": "0.0.113",
65
+ "@workglow/job-queue": "0.0.113",
66
+ "@workglow/storage": "0.0.113",
67
+ "@workglow/task-graph": "0.0.113",
68
+ "@workglow/util": "0.0.113"
69
69
  }
70
70
  }