netzilo 4.3.14 → 4.3.17
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/index.d.ts +13 -0
- package/dist/index.js +16 -0
- package/dist/loader.d.ts +1 -0
- package/dist/loader.js +12 -2
- package/package.json +6 -6
package/dist/index.d.ts
CHANGED
|
@@ -60,6 +60,19 @@ export declare function flush(): void;
|
|
|
60
60
|
* only uploaded hourly and at shutdown. No-op on older bundled libraries.
|
|
61
61
|
*/
|
|
62
62
|
export declare function snapshot(): void;
|
|
63
|
+
/**
|
|
64
|
+
* Register another process's PID as "the agent" for AIDR attribution.
|
|
65
|
+
*
|
|
66
|
+
* Only needed when start() runs in a supervisor/sidecar process that is NOT
|
|
67
|
+
* the process doing the actual agent work - e.g. a container entrypoint that
|
|
68
|
+
* arms netzilo, then forks/execs the real workload as a separate PID.
|
|
69
|
+
* Without this, only the PID that called start() is named with the
|
|
70
|
+
* configured agentName in the AIDR graph; every other process, including the
|
|
71
|
+
* intended one, falls back to a generic executable-basename label instead of
|
|
72
|
+
* appearing as the graph root. No-op on older bundled libraries, and if
|
|
73
|
+
* pid <= 0.
|
|
74
|
+
*/
|
|
75
|
+
export declare function setAgentPid(pid: number): void;
|
|
63
76
|
/** Whether the embedded client is currently running. */
|
|
64
77
|
export declare function isRunning(): boolean;
|
|
65
78
|
/**
|
package/dist/index.js
CHANGED
|
@@ -40,6 +40,7 @@ exports.socks5Port = socks5Port;
|
|
|
40
40
|
exports.stop = stop;
|
|
41
41
|
exports.flush = flush;
|
|
42
42
|
exports.snapshot = snapshot;
|
|
43
|
+
exports.setAgentPid = setAgentPid;
|
|
43
44
|
exports.isRunning = isRunning;
|
|
44
45
|
exports.integrityLevel = integrityLevel;
|
|
45
46
|
exports.evaluate = evaluate;
|
|
@@ -262,6 +263,21 @@ function flush() {
|
|
|
262
263
|
function snapshot() {
|
|
263
264
|
(0, loader_1.load)().FlushSnapshot();
|
|
264
265
|
}
|
|
266
|
+
/**
|
|
267
|
+
* Register another process's PID as "the agent" for AIDR attribution.
|
|
268
|
+
*
|
|
269
|
+
* Only needed when start() runs in a supervisor/sidecar process that is NOT
|
|
270
|
+
* the process doing the actual agent work - e.g. a container entrypoint that
|
|
271
|
+
* arms netzilo, then forks/execs the real workload as a separate PID.
|
|
272
|
+
* Without this, only the PID that called start() is named with the
|
|
273
|
+
* configured agentName in the AIDR graph; every other process, including the
|
|
274
|
+
* intended one, falls back to a generic executable-basename label instead of
|
|
275
|
+
* appearing as the graph root. No-op on older bundled libraries, and if
|
|
276
|
+
* pid <= 0.
|
|
277
|
+
*/
|
|
278
|
+
function setAgentPid(pid) {
|
|
279
|
+
(0, loader_1.load)().SetAgentPID(pid);
|
|
280
|
+
}
|
|
265
281
|
/** Whether the embedded client is currently running. */
|
|
266
282
|
function isRunning() {
|
|
267
283
|
return (0, loader_1.load)().IsRunning() !== 0;
|
package/dist/loader.d.ts
CHANGED
|
@@ -14,6 +14,7 @@ export interface NetziloLib {
|
|
|
14
14
|
FlushEvents(): void;
|
|
15
15
|
FlushSnapshot(): void;
|
|
16
16
|
GetIntegrityLevel(): number;
|
|
17
|
+
SetAgentPID(pid: number): void;
|
|
17
18
|
}
|
|
18
19
|
export declare function load(): NetziloLib;
|
|
19
20
|
/** Test-only: forget the cached binding so a fresh NETZILO_LIB_PATH can be picked up. */
|
package/dist/loader.js
CHANGED
|
@@ -110,11 +110,12 @@ function load() {
|
|
|
110
110
|
// references it by the registered NAME, not by that return value.
|
|
111
111
|
koffi.disposable("NetziloHeapStr", "str", freeString);
|
|
112
112
|
const evaluate = lib.func("NetziloHeapStr Evaluate(str reqJSON)");
|
|
113
|
-
// FlushEvents/FlushSnapshot/GetIntegrityLevel may be absent in
|
|
114
|
-
// bundled libraries; bind defensively.
|
|
113
|
+
// FlushEvents/FlushSnapshot/GetIntegrityLevel/SetAgentPID may be absent in
|
|
114
|
+
// older bundled libraries; bind defensively.
|
|
115
115
|
let flushEvents = noop;
|
|
116
116
|
let flushSnapshot = noop;
|
|
117
117
|
let getIntegrityLevel = () => 2; // medium — the documented default
|
|
118
|
+
let setAgentPID = noop;
|
|
118
119
|
try {
|
|
119
120
|
flushEvents = lib.func("void FlushEvents()");
|
|
120
121
|
}
|
|
@@ -133,6 +134,12 @@ function load() {
|
|
|
133
134
|
catch {
|
|
134
135
|
// absent in this build — keep the medium-default fallback
|
|
135
136
|
}
|
|
137
|
+
try {
|
|
138
|
+
setAgentPID = lib.func("void SetAgentPID(int pid)");
|
|
139
|
+
}
|
|
140
|
+
catch {
|
|
141
|
+
// absent in this build — keep the no-op
|
|
142
|
+
}
|
|
136
143
|
cached = {
|
|
137
144
|
Start: (configJSON) => start(configJSON),
|
|
138
145
|
Stop: () => stop(),
|
|
@@ -145,6 +152,9 @@ function load() {
|
|
|
145
152
|
flushSnapshot();
|
|
146
153
|
},
|
|
147
154
|
GetIntegrityLevel: () => getIntegrityLevel(),
|
|
155
|
+
SetAgentPID: (pid) => {
|
|
156
|
+
setAgentPID(pid);
|
|
157
|
+
},
|
|
148
158
|
};
|
|
149
159
|
return cached;
|
|
150
160
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "netzilo",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.17",
|
|
4
4
|
"description": "Netzilo AI Detection & Response (AIDR) — governance for Node.js/TypeScript AI agents.",
|
|
5
5
|
"license": "Commercial",
|
|
6
6
|
"author": "Netzilo",
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"koffi": "^2.9.0"
|
|
36
36
|
},
|
|
37
37
|
"optionalDependencies": {
|
|
38
|
-
"netzilo-darwin-arm64": "4.3.
|
|
39
|
-
"netzilo-darwin-x64": "4.3.
|
|
40
|
-
"netzilo-linux-arm64": "4.3.
|
|
41
|
-
"netzilo-linux-x64": "4.3.
|
|
42
|
-
"netzilo-windows-x64": "4.3.
|
|
38
|
+
"netzilo-darwin-arm64": "4.3.17",
|
|
39
|
+
"netzilo-darwin-x64": "4.3.17",
|
|
40
|
+
"netzilo-linux-arm64": "4.3.17",
|
|
41
|
+
"netzilo-linux-x64": "4.3.17",
|
|
42
|
+
"netzilo-windows-x64": "4.3.17"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"undici": "^8.5.0"
|