@aj-archipelago/cortex 1.4.30 → 1.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/RELEASE_NOTES_20251231_103631.md +15 -0
- package/RELEASE_NOTES_20251231_110946.md +5 -0
- package/lib/fileUtils.js +194 -187
- package/package.json +1 -1
- package/pathways/system/entity/files/sys_read_file_collection.js +3 -3
- package/pathways/system/entity/tools/sys_tool_analyzefile.js +48 -19
- package/pathways/system/entity/tools/sys_tool_editfile.js +4 -4
- package/pathways/system/entity/tools/sys_tool_file_collection.js +24 -17
- package/pathways/system/entity/tools/sys_tool_view_image.js +3 -3
- package/tests/integration/features/tools/fileCollection.test.js +697 -64
- package/tests/integration/features/tools/writefile.test.js +4 -4
- package/tests/integration/graphql/async/stream/file_operations_agent.test.js +839 -0
- package/tests/unit/core/fileCollection.test.js +1 -1
|
@@ -73,7 +73,7 @@ test('WriteFile: Write and upload text file', async t => {
|
|
|
73
73
|
t.true(parsed.message.includes('written') && parsed.message.includes('uploaded'));
|
|
74
74
|
|
|
75
75
|
// Verify it was added to file collection
|
|
76
|
-
const collection = await loadFileCollection(contextId,
|
|
76
|
+
const collection = await loadFileCollection(contextId, { useCache: false });
|
|
77
77
|
t.is(collection.length, 1);
|
|
78
78
|
// Use displayFilename (user-friendly name) with fallback to filename (CFH-managed)
|
|
79
79
|
t.is(collection[0].displayFilename || collection[0].filename, filename);
|
|
@@ -118,7 +118,7 @@ test('WriteFile: Write JSON file with tags and notes', async t => {
|
|
|
118
118
|
t.is(parsed.size, Buffer.byteLength(content, 'utf8'));
|
|
119
119
|
|
|
120
120
|
// Verify it was added to file collection with metadata
|
|
121
|
-
const collection = await loadFileCollection(contextId,
|
|
121
|
+
const collection = await loadFileCollection(contextId, { useCache: false });
|
|
122
122
|
t.is(collection.length, 1);
|
|
123
123
|
// Use displayFilename (user-friendly name) with fallback to filename (CFH-managed)
|
|
124
124
|
t.is(collection[0].displayFilename || collection[0].filename, filename);
|
|
@@ -231,7 +231,7 @@ test('WriteFile: Different file types and MIME types', async t => {
|
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
// Verify all files were added
|
|
234
|
-
const collection = await loadFileCollection(contextId,
|
|
234
|
+
const collection = await loadFileCollection(contextId, { useCache: false });
|
|
235
235
|
t.is(collection.length, successCount);
|
|
236
236
|
} finally {
|
|
237
237
|
await cleanup(contextId);
|
|
@@ -315,7 +315,7 @@ test('WriteFile: Duplicate content (same hash)', async t => {
|
|
|
315
315
|
|
|
316
316
|
// Both files with same hash should result in one entry (same content, CFH will find it)
|
|
317
317
|
// The second file will update the existing entry with the new displayFilename
|
|
318
|
-
const collection = await loadFileCollection(contextId,
|
|
318
|
+
const collection = await loadFileCollection(contextId, { useCache: false });
|
|
319
319
|
t.is(collection.length, 1); // Same hash = one entry
|
|
320
320
|
t.is(collection[0].hash, firstHash); // Same hash
|
|
321
321
|
// The displayFilename should be from the most recent write
|