@zenera/neo 1.1.56 → 1.1.57
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/project/config.js +9 -1
- package/dist/tools/identity.d.ts +12 -0
- package/dist/tools/identity.js +14 -0
- package/package.json +2 -2
package/dist/project/config.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { parse as parseYaml } from 'yaml';
|
|
2
2
|
import { z } from 'zod';
|
|
3
|
-
import { IDENTITY_ENV_PREFIX } from "../tools/identity.js";
|
|
3
|
+
import { IDENTITY_ENV_PREFIX, isHostOnlyEnv } from "../tools/identity.js";
|
|
4
4
|
// ---------------------------------------------------------------------------
|
|
5
5
|
// agents.yaml
|
|
6
6
|
// ---------------------------------------------------------------------------
|
|
@@ -327,6 +327,14 @@ const sandbox = z
|
|
|
327
327
|
`a project cannot forward its own ${IDENTITY_ENV_PREFIX}* variables`,
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
+
else if (isHostOnlyEnv(name)) {
|
|
331
|
+
ctx.addIssue({
|
|
332
|
+
code: 'custom',
|
|
333
|
+
path: ['env', i],
|
|
334
|
+
message: `${name} configures the host — which plugins it loads and which ` +
|
|
335
|
+
'sandbox service it uses — and is never forwarded into a sandbox',
|
|
336
|
+
});
|
|
337
|
+
}
|
|
330
338
|
}
|
|
331
339
|
});
|
|
332
340
|
const agent = z
|
package/dist/tools/identity.d.ts
CHANGED
|
@@ -28,6 +28,18 @@ export declare const IDENTITY_ENV: {
|
|
|
28
28
|
/** Every name under it is the host's to set; a project may not. */
|
|
29
29
|
export declare const IDENTITY_ENV_PREFIX = "ZEN_USER_";
|
|
30
30
|
export declare function isIdentityEnv(name: string): boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Where a sandbox service is and the credential that reaches it — read by the
|
|
33
|
+
* plugin that provides the sandbox, from the machine's environment only.
|
|
34
|
+
*/
|
|
35
|
+
export declare const SANDBOX_SERVICE_ENV_PREFIX = "ZEN_SANDBOX_";
|
|
36
|
+
/**
|
|
37
|
+
* Variables that are the host's alone: who a run acts for, which plugins load
|
|
38
|
+
* into the engine, and which sandbox service it uses. A project that could set
|
|
39
|
+
* one in a committed file — or forward one into the sandbox it runs code in —
|
|
40
|
+
* could be anyone, run anything, or send its users' work anywhere.
|
|
41
|
+
*/
|
|
42
|
+
export declare function isHostOnlyEnv(name: string): boolean;
|
|
31
43
|
/** The identity as the variables a command sees; nothing at all when there is none. */
|
|
32
44
|
export declare function identityEnv(identity: RunIdentity | undefined): Record<string, string>;
|
|
33
45
|
/**
|
package/dist/tools/identity.js
CHANGED
|
@@ -27,6 +27,20 @@ export const IDENTITY_ENV_PREFIX = 'ZEN_USER_';
|
|
|
27
27
|
export function isIdentityEnv(name) {
|
|
28
28
|
return name.startsWith(IDENTITY_ENV_PREFIX);
|
|
29
29
|
}
|
|
30
|
+
/**
|
|
31
|
+
* Where a sandbox service is and the credential that reaches it — read by the
|
|
32
|
+
* plugin that provides the sandbox, from the machine's environment only.
|
|
33
|
+
*/
|
|
34
|
+
export const SANDBOX_SERVICE_ENV_PREFIX = 'ZEN_SANDBOX_';
|
|
35
|
+
/**
|
|
36
|
+
* Variables that are the host's alone: who a run acts for, which plugins load
|
|
37
|
+
* into the engine, and which sandbox service it uses. A project that could set
|
|
38
|
+
* one in a committed file — or forward one into the sandbox it runs code in —
|
|
39
|
+
* could be anyone, run anything, or send its users' work anywhere.
|
|
40
|
+
*/
|
|
41
|
+
export function isHostOnlyEnv(name) {
|
|
42
|
+
return (isIdentityEnv(name) || name === 'ZEN_PLUGINS' || name.startsWith(SANDBOX_SERVICE_ENV_PREFIX));
|
|
43
|
+
}
|
|
30
44
|
/** The identity as the variables a command sees; nothing at all when there is none. */
|
|
31
45
|
export function identityEnv(identity) {
|
|
32
46
|
if (!identity) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zenera/neo",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.57",
|
|
4
4
|
"description": "A multi-agent runtime for Node.js: agents, models, tools, skills, memory and an append-only trajectory.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agents",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"prepack": "tsc -b"
|
|
63
63
|
},
|
|
64
64
|
"dependencies": {
|
|
65
|
-
"@zenera/sandbox": "^1.1.
|
|
65
|
+
"@zenera/sandbox": "^1.1.57",
|
|
66
66
|
"graphology": "^0.26.0",
|
|
67
67
|
"yaml": "^2.9.1",
|
|
68
68
|
"zod": "^4.6.7"
|