@nodetool-ai/automation-nodes 0.8.3 → 0.8.4-a24.1
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/.nodetool-build-stamp +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +13 -0
- package/dist/index.js.map +1 -1
- package/dist/lib/file-watch-match.d.ts +1 -58
- package/dist/lib/file-watch-match.d.ts.map +1 -1
- package/dist/lib/file-watch-match.js +1 -98
- package/dist/lib/file-watch-match.js.map +1 -1
- package/package.json +7 -8
|
@@ -1 +1 @@
|
|
|
1
|
-
2026-10-
|
|
1
|
+
2026-10-16T07:29:27.546Z
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
|
+
import type { NodeClass, NodeRegistry } from "@nodetool-ai/node-sdk";
|
|
1
2
|
export * from "./nodes/lib-browser.js";
|
|
2
3
|
export * from "./nodes/triggers.js";
|
|
3
4
|
export * from "./nodes/lib-sqlite.js";
|
|
4
5
|
export * from "./lib/file-watch-match.js";
|
|
6
|
+
export declare const ALL_AUTOMATION_NODES: readonly NodeClass[];
|
|
7
|
+
export declare function registerAutomationNodes(registry: NodeRegistry): void;
|
|
5
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAKtC,cAAc,2BAA2B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAKrE,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAKtC,cAAc,2BAA2B,CAAC;AAE1C,eAAO,MAAM,oBAAoB,EAAE,SAAS,SAAS,EAIpD,CAAC;AAEF,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI,CAIpE"}
|
package/dist/index.js
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { TRIGGER_NODES } from "./nodes/triggers.js";
|
|
2
|
+
import { LIB_SQLITE_NODES } from "./nodes/lib-sqlite.js";
|
|
3
|
+
import { LIB_BROWSER_NODES } from "./nodes/lib-browser.js";
|
|
1
4
|
export * from "./nodes/lib-browser.js";
|
|
2
5
|
export * from "./nodes/triggers.js";
|
|
3
6
|
export * from "./nodes/lib-sqlite.js";
|
|
@@ -5,4 +8,14 @@ export * from "./nodes/lib-sqlite.js";
|
|
|
5
8
|
// (packages/websocket/src/triggers/file-watch.ts) so both call sites stay in
|
|
6
9
|
// sync instead of duplicating pattern/debounce behavior.
|
|
7
10
|
export * from "./lib/file-watch-match.js";
|
|
11
|
+
export const ALL_AUTOMATION_NODES = [
|
|
12
|
+
...TRIGGER_NODES,
|
|
13
|
+
...LIB_SQLITE_NODES,
|
|
14
|
+
...LIB_BROWSER_NODES,
|
|
15
|
+
];
|
|
16
|
+
export function registerAutomationNodes(registry) {
|
|
17
|
+
for (const nodeClass of ALL_AUTOMATION_NODES) {
|
|
18
|
+
registry.register(nodeClass);
|
|
19
|
+
}
|
|
20
|
+
}
|
|
8
21
|
//# sourceMappingURL=index.js.map
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAC;AACpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AACzD,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAE3D,cAAc,wBAAwB,CAAC;AACvC,cAAc,qBAAqB,CAAC;AACpC,cAAc,uBAAuB,CAAC;AAEtC,6EAA6E;AAC7E,6EAA6E;AAC7E,yDAAyD;AACzD,cAAc,2BAA2B,CAAC;AAE1C,MAAM,CAAC,MAAM,oBAAoB,GAAyB;IACxD,GAAG,aAAa;IAChB,GAAG,gBAAgB;IACnB,GAAG,iBAAiB;CACrB,CAAC;AAEF,MAAM,UAAU,uBAAuB,CAAC,QAAsB;IAC5D,KAAK,MAAM,SAAS,IAAI,oBAAoB,EAAE,CAAC;QAC7C,QAAQ,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC/B,CAAC;AACH,CAAC"}
|
|
@@ -1,59 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Shared file-watch matching/debounce logic.
|
|
3
|
-
*
|
|
4
|
-
* Used by both `FileWatchTriggerNode` (`../nodes/triggers.ts`, the in-editor
|
|
5
|
-
* live-test path that runs inside a job) and the host file-watch adapter
|
|
6
|
-
* (`packages/websocket/src/triggers/file-watch.ts`, the production ingestion
|
|
7
|
-
* path that runs in the backend server process). One implementation means a
|
|
8
|
-
* pattern or debounce fix lands in both call sites at once instead of
|
|
9
|
-
* drifting apart.
|
|
10
|
-
*/
|
|
11
|
-
/** The filter a watcher applies before turning a raw fs event into an event. */
|
|
12
|
-
export interface FileWatchFilter {
|
|
13
|
-
/** Glob-ish include patterns (e.g. "*.txt"); "*" matches everything. */
|
|
14
|
-
patterns: string[];
|
|
15
|
-
/** Glob-ish patterns to exclude, checked before include patterns. */
|
|
16
|
-
ignorePatterns: string[];
|
|
17
|
-
/** Event types to react to ("created" | "modified" | "deleted" | "moved" | ...). */
|
|
18
|
-
events: string[];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Minimal glob match against a filename: `*` matches any run of characters,
|
|
22
|
-
* `?` matches any single character, everything else is literal. `pattern ===
|
|
23
|
-
* "*"` is short-circuited since it is the common "match everything" case.
|
|
24
|
-
*/
|
|
25
|
-
export declare function matchesFileWatchPattern(filename: string, pattern: string): boolean;
|
|
26
|
-
/**
|
|
27
|
-
* True when a changed file's basename passes the ignore/include pattern
|
|
28
|
-
* filter: ignore patterns are checked first (an ignored file is never
|
|
29
|
-
* processed even if an include pattern also matches it), then include
|
|
30
|
-
* patterns — no include pattern match means the file is skipped.
|
|
31
|
-
*/
|
|
32
|
-
export declare function shouldProcessFileWatchPath(filePath: string, filter: Pick<FileWatchFilter, "patterns" | "ignorePatterns">): boolean;
|
|
33
|
-
/** True when an event type is one the watcher cares about. */
|
|
34
|
-
export declare function isWatchedFileEvent(eventType: string, events: string[]): boolean;
|
|
35
|
-
/**
|
|
36
|
-
* Per-path debounce: tracks the last time each path fired and suppresses a
|
|
37
|
-
* repeat for the same path within `debounceMs`. One instance per watcher (a
|
|
38
|
-
* node run, or one per registration in the host adapter) — state is scoped to
|
|
39
|
-
* that watcher, not shared across paths or watchers.
|
|
40
|
-
*/
|
|
41
|
-
export declare class FileWatchDebouncer {
|
|
42
|
-
private readonly debounceMs;
|
|
43
|
-
private readonly now;
|
|
44
|
-
private readonly lastFiredAt;
|
|
45
|
-
constructor(debounceMs: number, now?: () => number);
|
|
46
|
-
/** Returns true when the event for `filePath` should be suppressed. A path
|
|
47
|
-
* that has never fired is never suppressed — `now` is injectable, so 0 is a
|
|
48
|
-
* time a clock can genuinely read, not a stand-in for "no entry". */
|
|
49
|
-
shouldSuppress(filePath: string): boolean;
|
|
50
|
-
}
|
|
51
|
-
/**
|
|
52
|
-
* Combines the event-type, include/ignore-pattern, and debounce checks in the
|
|
53
|
-
* same order `FileWatchTriggerNode.genProcess()`'s `emitEvent` always applied
|
|
54
|
-
* them: event type first (cheapest), then patterns, then debounce (which has
|
|
55
|
-
* a side effect — it records the fire time — so it must run last and only
|
|
56
|
-
* once the event is otherwise known to matter).
|
|
57
|
-
*/
|
|
58
|
-
export declare function shouldEmitFileWatchEvent(eventType: string, filePath: string, filter: FileWatchFilter, debouncer: FileWatchDebouncer): boolean;
|
|
1
|
+
export { matchesFileWatchPattern, shouldProcessFileWatchPath, isWatchedFileEvent, FileWatchDebouncer, shouldEmitFileWatchEvent, type FileWatchFilter } from "@nodetool-ai/nodes-utils";
|
|
59
2
|
//# sourceMappingURL=file-watch-match.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-watch-match.d.ts","sourceRoot":"","sources":["../../src/lib/file-watch-match.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"file-watch-match.d.ts","sourceRoot":"","sources":["../../src/lib/file-watch-match.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,eAAe,EACrB,MAAM,0BAA0B,CAAC"}
|
|
@@ -1,99 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Shared file-watch matching/debounce logic.
|
|
3
|
-
*
|
|
4
|
-
* Used by both `FileWatchTriggerNode` (`../nodes/triggers.ts`, the in-editor
|
|
5
|
-
* live-test path that runs inside a job) and the host file-watch adapter
|
|
6
|
-
* (`packages/websocket/src/triggers/file-watch.ts`, the production ingestion
|
|
7
|
-
* path that runs in the backend server process). One implementation means a
|
|
8
|
-
* pattern or debounce fix lands in both call sites at once instead of
|
|
9
|
-
* drifting apart.
|
|
10
|
-
*/
|
|
11
|
-
import * as path from "path";
|
|
12
|
-
/**
|
|
13
|
-
* Minimal glob match against a filename: `*` matches any run of characters,
|
|
14
|
-
* `?` matches any single character, everything else is literal. `pattern ===
|
|
15
|
-
* "*"` is short-circuited since it is the common "match everything" case.
|
|
16
|
-
*/
|
|
17
|
-
export function matchesFileWatchPattern(filename, pattern) {
|
|
18
|
-
if (pattern === "*")
|
|
19
|
-
return true;
|
|
20
|
-
// Escape every regex metacharacter first, then reinstate the two glob
|
|
21
|
-
// wildcards from their escaped forms. Escaping only "." would leave the
|
|
22
|
-
// rest live: "\d" would match any digit instead of a literal backslash,
|
|
23
|
-
// and an unbalanced "(" would throw at watch time rather than simply
|
|
24
|
-
// failing to match.
|
|
25
|
-
const source = pattern
|
|
26
|
-
.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&")
|
|
27
|
-
.replace(/\\\*/g, ".*")
|
|
28
|
-
.replace(/\\\?/g, ".");
|
|
29
|
-
// "s" because a bare "." skips the four JS line terminators, all of which
|
|
30
|
-
// are legal in a POSIX filename; "u" because it otherwise counts one UTF-16
|
|
31
|
-
// unit, so "?" ate half an emoji. Neither flag can make the compile throw:
|
|
32
|
-
// the escape above already covers every character "u" is strict about.
|
|
33
|
-
return new RegExp(`^${source}$`, "us").test(filename);
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* True when a changed file's basename passes the ignore/include pattern
|
|
37
|
-
* filter: ignore patterns are checked first (an ignored file is never
|
|
38
|
-
* processed even if an include pattern also matches it), then include
|
|
39
|
-
* patterns — no include pattern match means the file is skipped.
|
|
40
|
-
*/
|
|
41
|
-
export function shouldProcessFileWatchPath(filePath, filter) {
|
|
42
|
-
const filename = path.basename(filePath);
|
|
43
|
-
for (const pattern of filter.ignorePatterns) {
|
|
44
|
-
if (matchesFileWatchPattern(filename, pattern))
|
|
45
|
-
return false;
|
|
46
|
-
}
|
|
47
|
-
for (const pattern of filter.patterns) {
|
|
48
|
-
if (matchesFileWatchPattern(filename, pattern))
|
|
49
|
-
return true;
|
|
50
|
-
}
|
|
51
|
-
return false;
|
|
52
|
-
}
|
|
53
|
-
/** True when an event type is one the watcher cares about. */
|
|
54
|
-
export function isWatchedFileEvent(eventType, events) {
|
|
55
|
-
return events.includes(eventType);
|
|
56
|
-
}
|
|
57
|
-
/**
|
|
58
|
-
* Per-path debounce: tracks the last time each path fired and suppresses a
|
|
59
|
-
* repeat for the same path within `debounceMs`. One instance per watcher (a
|
|
60
|
-
* node run, or one per registration in the host adapter) — state is scoped to
|
|
61
|
-
* that watcher, not shared across paths or watchers.
|
|
62
|
-
*/
|
|
63
|
-
export class FileWatchDebouncer {
|
|
64
|
-
debounceMs;
|
|
65
|
-
now;
|
|
66
|
-
lastFiredAt = new Map();
|
|
67
|
-
constructor(debounceMs, now = Date.now) {
|
|
68
|
-
this.debounceMs = debounceMs;
|
|
69
|
-
this.now = now;
|
|
70
|
-
}
|
|
71
|
-
/** Returns true when the event for `filePath` should be suppressed. A path
|
|
72
|
-
* that has never fired is never suppressed — `now` is injectable, so 0 is a
|
|
73
|
-
* time a clock can genuinely read, not a stand-in for "no entry". */
|
|
74
|
-
shouldSuppress(filePath) {
|
|
75
|
-
const now = this.now();
|
|
76
|
-
const last = this.lastFiredAt.get(filePath);
|
|
77
|
-
if (last !== undefined && now - last < this.debounceMs)
|
|
78
|
-
return true;
|
|
79
|
-
this.lastFiredAt.set(filePath, now);
|
|
80
|
-
return false;
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/**
|
|
84
|
-
* Combines the event-type, include/ignore-pattern, and debounce checks in the
|
|
85
|
-
* same order `FileWatchTriggerNode.genProcess()`'s `emitEvent` always applied
|
|
86
|
-
* them: event type first (cheapest), then patterns, then debounce (which has
|
|
87
|
-
* a side effect — it records the fire time — so it must run last and only
|
|
88
|
-
* once the event is otherwise known to matter).
|
|
89
|
-
*/
|
|
90
|
-
export function shouldEmitFileWatchEvent(eventType, filePath, filter, debouncer) {
|
|
91
|
-
if (!isWatchedFileEvent(eventType, filter.events))
|
|
92
|
-
return false;
|
|
93
|
-
if (!shouldProcessFileWatchPath(filePath, filter))
|
|
94
|
-
return false;
|
|
95
|
-
if (debouncer.shouldSuppress(filePath))
|
|
96
|
-
return false;
|
|
97
|
-
return true;
|
|
98
|
-
}
|
|
1
|
+
export { matchesFileWatchPattern, shouldProcessFileWatchPath, isWatchedFileEvent, FileWatchDebouncer, shouldEmitFileWatchEvent } from "@nodetool-ai/nodes-utils";
|
|
99
2
|
//# sourceMappingURL=file-watch-match.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"file-watch-match.js","sourceRoot":"","sources":["../../src/lib/file-watch-match.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"file-watch-match.js","sourceRoot":"","sources":["../../src/lib/file-watch-match.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,uBAAuB,EACvB,0BAA0B,EAC1B,kBAAkB,EAClB,kBAAkB,EAClB,wBAAwB,EAEzB,MAAM,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nodetool-ai/automation-nodes",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.4-a24.1",
|
|
4
4
|
"description": "NodeTool automation/system nodes — browser control, OS, workspace FS, triggers",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"engines": {
|
|
@@ -15,13 +15,12 @@
|
|
|
15
15
|
"lint": "node ../../scripts/run-tsc.mjs --noEmit"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@nodetool-ai/browser": "0.8.
|
|
19
|
-
"@nodetool-ai/config": "0.8.
|
|
20
|
-
"@nodetool-ai/node-sdk": "0.8.
|
|
21
|
-
"@nodetool-ai/nodes-utils": "0.8.
|
|
22
|
-
"@nodetool-ai/protocol": "0.8.
|
|
23
|
-
"@nodetool-ai/runtime": "0.8.
|
|
24
|
-
"@openclaw/fs-safe": "^0.5.6"
|
|
18
|
+
"@nodetool-ai/browser": "0.8.4-a24.1",
|
|
19
|
+
"@nodetool-ai/config": "0.8.4-a24.1",
|
|
20
|
+
"@nodetool-ai/node-sdk": "0.8.4-a24.1",
|
|
21
|
+
"@nodetool-ai/nodes-utils": "0.8.4-a24.1",
|
|
22
|
+
"@nodetool-ai/protocol": "0.8.4-a24.1",
|
|
23
|
+
"@nodetool-ai/runtime": "0.8.4-a24.1"
|
|
25
24
|
},
|
|
26
25
|
"devDependencies": {
|
|
27
26
|
"@types/node": "^22.0.0",
|