donobu 5.25.2 → 5.25.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.
package/dist/esm/main.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export { type TargetRuntimeParams, type TargetRuntimePlugin, TargetRuntimePlugin
|
|
|
62
62
|
export * from './tools/ReplayableInteraction';
|
|
63
63
|
export * from './tools/Tool';
|
|
64
64
|
export * from './utils/createTool';
|
|
65
|
+
export * from './utils/FlowLogBuffer';
|
|
65
66
|
export * from './utils/JsonSchemaUtils';
|
|
66
67
|
export * from './utils/JsonUtils';
|
|
67
68
|
export * from './utils/Logger';
|
package/dist/esm/main.js
CHANGED
|
@@ -92,6 +92,7 @@ Object.defineProperty(exports, "TargetRuntimePluginRegistry", { enumerable: true
|
|
|
92
92
|
__exportStar(require("./tools/ReplayableInteraction"), exports);
|
|
93
93
|
__exportStar(require("./tools/Tool"), exports);
|
|
94
94
|
__exportStar(require("./utils/createTool"), exports);
|
|
95
|
+
__exportStar(require("./utils/FlowLogBuffer"), exports);
|
|
95
96
|
__exportStar(require("./utils/JsonSchemaUtils"), exports);
|
|
96
97
|
__exportStar(require("./utils/JsonUtils"), exports);
|
|
97
98
|
__exportStar(require("./utils/Logger"), exports);
|
|
@@ -200,7 +200,12 @@ class FlowsPersistenceSqlite {
|
|
|
200
200
|
// Generate a unique filename.
|
|
201
201
|
const fileId = `${epochMillis}.${hash}.${imageType}`;
|
|
202
202
|
const binaryId = `${flowId}-${fileId}`;
|
|
203
|
-
|
|
203
|
+
// `fileId` embeds a content hash, so a (flow_id, file_id) collision
|
|
204
|
+
// implies the same bytes are already persisted. `INSERT OR IGNORE`
|
|
205
|
+
// makes the save idempotent — important when two screenshots taken in
|
|
206
|
+
// the same millisecond happen to be byte-identical (e.g. a clean and
|
|
207
|
+
// "annotated" screenshot where annotation was a no-op).
|
|
208
|
+
const stmt = this.db.prepare('INSERT OR IGNORE INTO binary_files (id, flow_id, file_id, mime_type, content) VALUES (?, ?, ?, ?, ?)');
|
|
204
209
|
stmt.run(binaryId, flowId, fileId, mimeType, bytes);
|
|
205
210
|
return fileId;
|
|
206
211
|
}
|
package/dist/main.d.ts
CHANGED
|
@@ -62,6 +62,7 @@ export { type TargetRuntimeParams, type TargetRuntimePlugin, TargetRuntimePlugin
|
|
|
62
62
|
export * from './tools/ReplayableInteraction';
|
|
63
63
|
export * from './tools/Tool';
|
|
64
64
|
export * from './utils/createTool';
|
|
65
|
+
export * from './utils/FlowLogBuffer';
|
|
65
66
|
export * from './utils/JsonSchemaUtils';
|
|
66
67
|
export * from './utils/JsonUtils';
|
|
67
68
|
export * from './utils/Logger';
|
package/dist/main.js
CHANGED
|
@@ -92,6 +92,7 @@ Object.defineProperty(exports, "TargetRuntimePluginRegistry", { enumerable: true
|
|
|
92
92
|
__exportStar(require("./tools/ReplayableInteraction"), exports);
|
|
93
93
|
__exportStar(require("./tools/Tool"), exports);
|
|
94
94
|
__exportStar(require("./utils/createTool"), exports);
|
|
95
|
+
__exportStar(require("./utils/FlowLogBuffer"), exports);
|
|
95
96
|
__exportStar(require("./utils/JsonSchemaUtils"), exports);
|
|
96
97
|
__exportStar(require("./utils/JsonUtils"), exports);
|
|
97
98
|
__exportStar(require("./utils/Logger"), exports);
|
|
@@ -200,7 +200,12 @@ class FlowsPersistenceSqlite {
|
|
|
200
200
|
// Generate a unique filename.
|
|
201
201
|
const fileId = `${epochMillis}.${hash}.${imageType}`;
|
|
202
202
|
const binaryId = `${flowId}-${fileId}`;
|
|
203
|
-
|
|
203
|
+
// `fileId` embeds a content hash, so a (flow_id, file_id) collision
|
|
204
|
+
// implies the same bytes are already persisted. `INSERT OR IGNORE`
|
|
205
|
+
// makes the save idempotent — important when two screenshots taken in
|
|
206
|
+
// the same millisecond happen to be byte-identical (e.g. a clean and
|
|
207
|
+
// "annotated" screenshot where annotation was a no-op).
|
|
208
|
+
const stmt = this.db.prepare('INSERT OR IGNORE INTO binary_files (id, flow_id, file_id, mime_type, content) VALUES (?, ?, ?, ?, ?)');
|
|
204
209
|
stmt.run(binaryId, flowId, fileId, mimeType, bytes);
|
|
205
210
|
return fileId;
|
|
206
211
|
}
|