Skip to content

Commit 66258ac

Browse files
alexmercerpogithub-actions[bot]davidantoonclaude
authored
fix: sync lockfile to match bumped package.json (#68)
* Cherry-pick: feat: add additional entry points for worker script in project configuration (#64) Cherry-picked from #63 (merged to release/2.14.x) Original commit: 898a1b5 Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: alexmercerpo <251740932+alexmercerpo@users.noreply.github.com> * fix: sync lockfile to match bumped package.json versions in release workflows * fix: update publish-release.yml for mutable dependency installation and sync package versions in yarn.lock * fix: resolve core lint error and prettier formatting - Declare @types/estree in libs/core dependencies (matches libs/ast). The interpreter/interpreter-adapter import `estree` types, which the @nx/dependency-checks rule requires to be declared — this was the only lint error (the remaining 11 are non-blocking warnings). - Run prettier --write on the 6 files flagged by `prettier --check`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> --------- Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: alexmercerpo <251740932+alexmercerpo@users.noreply.github.com> Co-authored-by: David Antoon <davidmantoon@gmail.com> Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 19720be commit 66258ac

9 files changed

Lines changed: 39 additions & 96 deletions

File tree

.github/workflows/publish-release.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,16 @@ jobs:
7676
with:
7777
node-version-file: ".nvmrc"
7878
registry-url: "https://registry.npmjs.org/"
79+
# Do NOT run an immutable install here: this is a long-lived,
80+
# auto-incrementing release branch. Its committed yarn.lock may lag the
81+
# bumped package.json versions, and this job rewrites the lock anyway.
82+
# An immutable install would fail before the version-bump/sync steps run.
83+
install: "false"
84+
85+
- name: Install dependencies
86+
# Mutable install: installs deps for nx/build AND self-heals any lockfile
87+
# drift left by a previous release before this run bumps the version.
88+
run: yarn install --no-immutable
7989

8090
- name: Update npm CLI for trusted publishing
8191
run: npm install -g npm@latest

SECURITY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,18 +56,20 @@ Key points:
5656
3. Response timeline commitments - sets expectations
5757
4. Safe harbor - encourages researchers to report without fear of legal action
5858

59-
6059
## Scope
6160

6261
### In scope (authorized testing targets)
62+
6363
- https://enclave.agentfront.dev (public demo / security testing sandbox)
6464

6565
### Out of scope
66+
6667
- Any other Frontegg/AgentFront environments, domains, APIs, or customer tenants not explicitly listed above
6768
- Attempts to access other users’ data, accounts, or tenants
6869
- Denial of Service (DoS), stress testing, or automated scanning that degrades availability
6970

7071
### Rules of engagement
72+
7173
- Use only test accounts/data you own or that we provide
7274
- Avoid privacy violations and data destruction
7375
- No persistence (no backdoors, no long-lived shells, no planting credentials)

libs/core/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,7 @@
4848
"@babel/standalone": "^7.29.0",
4949
"@enclave-vm/ast": "2.14.0",
5050
"@enclave-vm/types": "2.14.0",
51+
"@types/estree": "1.0.8",
5152
"acorn": "8.15.0",
5253
"acorn-walk": "8.3.4",
5354
"astring": "1.9.0",

libs/core/src/__tests__/interpreter-transform-integration.spec.ts

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,10 @@ import type { ExecutionContext, ToolHandler } from '../types';
2121
/** The transform config required for the interpreter target. */
2222
const INTERPRETER_TRANSFORM = { transformLoops: false } as const;
2323

24-
function makeContext(toolHandler?: ToolHandler, overrides: { maxToolCalls?: number; timeout?: number } = {}): ExecutionContext {
24+
function makeContext(
25+
toolHandler?: ToolHandler,
26+
overrides: { maxToolCalls?: number; timeout?: number } = {},
27+
): ExecutionContext {
2528
return {
2629
config: { maxToolCalls: overrides.maxToolCalls ?? 20, timeout: overrides.timeout ?? 8000 },
2730
stats: { duration: 0, toolCallCount: 0, iterationCount: 0, startTime: 0 },
@@ -74,7 +77,10 @@ describe('AgentScript transform + Interpreter (worker codecall path)', () => {
7477
});
7578

7679
it('blocks prototype-escape regardless of transform (secure by construction)', async () => {
77-
const transformed = transformAgentScript("return ({}).constructor.constructor('return 1')();", INTERPRETER_TRANSFORM);
80+
const transformed = transformAgentScript(
81+
"return ({}).constructor.constructor('return 1')();",
82+
INTERPRETER_TRANSFORM,
83+
);
7884
const res = await new InterpreterAdapter().execute(transformed, makeContext(handler));
7985
expect(res.success).toBe(false);
8086
expect(res.error?.message).toMatch(/constructor/i);

libs/core/src/adapters/__tests__/interpreter-adapter.spec.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@ import { InterpreterAdapter } from '../interpreter-adapter';
22
import type { ExecutionContext, ToolHandler } from '../../types';
33

44
/** Minimal ExecutionContext for the fields the adapter reads. */
5-
function makeContext(overrides: { maxToolCalls?: number; timeout?: number; toolHandler?: ToolHandler } = {}): ExecutionContext {
5+
function makeContext(
6+
overrides: { maxToolCalls?: number; timeout?: number; toolHandler?: ToolHandler } = {},
7+
): ExecutionContext {
68
return {
79
config: {
810
maxToolCalls: overrides.maxToolCalls ?? 50,

libs/core/src/adapters/interpreter-adapter.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ export class InterpreterAdapter implements SandboxAdapter {
6767

6868
// Wall-clock timeout drives the AbortSignal the interpreter checks per step.
6969
const timeout = context.config.timeout;
70-
const timer =
71-
timeout && timeout > 0 ? setTimeout(() => context.abortController.abort(), timeout) : undefined;
70+
const timer = timeout && timeout > 0 ? setTimeout(() => context.abortController.abort(), timeout) : undefined;
7271

7372
const interpreter = new Interpreter({
7473
globals,

libs/core/src/interpreter/interpreter.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,10 @@ export class Interpreter {
283283
}
284284

285285
// ── Expressions ──────────────────────────────────────────────────────────--
286-
private async evalExpr(node: ESTree.Expression | ESTree.Pattern | ESTree.PrivateIdentifier, scope: Scope): Promise<unknown> {
286+
private async evalExpr(
287+
node: ESTree.Expression | ESTree.Pattern | ESTree.PrivateIdentifier,
288+
scope: Scope,
289+
): Promise<unknown> {
287290
this.tick();
288291
switch (node.type) {
289292
case 'Literal':
@@ -467,7 +470,8 @@ export class Interpreter {
467470
// Cap string-amplifying ops whose allocation the step budget can't see.
468471
if (typeof m.object === 'string' && (m.key === 'repeat' || m.key === 'padStart' || m.key === 'padEnd')) {
469472
const n = Number(args[0]);
470-
const produced = m.key === 'repeat' ? m.object.length * (n > 0 ? n : 0) : Math.max(m.object.length, n > 0 ? n : 0);
473+
const produced =
474+
m.key === 'repeat' ? m.object.length * (n > 0 ? n : 0) : Math.max(m.object.length, n > 0 ? n : 0);
471475
if (produced > MAX_STRING_OP_LENGTH) {
472476
throw new InterpreterError(
473477
`String '${m.key}' would produce ${produced} chars, exceeding the ${MAX_STRING_OP_LENGTH} limit`,

libs/core/src/worker.ts

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,4 @@ export { InterpreterAdapter } from './adapters/interpreter-adapter';
1818
export type { InterpreterAdapterOptions } from './adapters/interpreter-adapter';
1919
export { Interpreter, InterpreterError, StepLimitError } from './interpreter/interpreter';
2020
export type { InterpreterOptions } from './interpreter/interpreter';
21-
export type {
22-
ExecutionContext,
23-
ExecutionResult,
24-
ExecutionError,
25-
ExecutionStats,
26-
ToolHandler,
27-
} from './types';
21+
export type { ExecutionContext, ExecutionResult, ExecutionError, ExecutionStats, ToolHandler } from './types';

yarn.lock

Lines changed: 6 additions & 81 deletions
Original file line numberDiff line numberDiff line change
@@ -1707,18 +1707,6 @@ __metadata:
17071707
languageName: node
17081708
linkType: hard
17091709

1710-
"@enclave-vm/ast@npm:2.13.0":
1711-
version: 2.13.0
1712-
resolution: "@enclave-vm/ast@npm:2.13.0"
1713-
dependencies:
1714-
"@types/estree": "npm:1.0.8"
1715-
acorn: "npm:8.15.0"
1716-
acorn-walk: "npm:8.3.4"
1717-
astring: "npm:1.9.0"
1718-
checksum: 10c0/bcdc0d2cb85ad857c1087f4f1f4356150e4c9dc7ba553e132f1ac8bafb0f74522f8f55bd5aa43cbb265dd03905c19238c5b698c2abe9f70f4b4a8c9036dc297f
1719-
languageName: node
1720-
linkType: hard
1721-
17221710
"@enclave-vm/ast@npm:2.14.0, @enclave-vm/ast@workspace:libs/ast":
17231711
version: 0.0.0-use.local
17241712
resolution: "@enclave-vm/ast@workspace:libs/ast"
@@ -1731,20 +1719,7 @@ __metadata:
17311719
languageName: unknown
17321720
linkType: soft
17331721

1734-
"@enclave-vm/broker@npm:2.13.0":
1735-
version: 2.13.0
1736-
resolution: "@enclave-vm/broker@npm:2.13.0"
1737-
dependencies:
1738-
"@enclave-vm/core": "npm:2.13.0"
1739-
"@enclave-vm/stream": "npm:2.13.0"
1740-
"@enclave-vm/types": "npm:2.13.0"
1741-
minimatch: "npm:^10.2.5"
1742-
zod: "npm:^4.3.6"
1743-
checksum: 10c0/1d27358a996ff7ea58df4b5f7eb5dc818eeebbeb583b1e2348fc2a531dc88550be993cde72e6a9072557bec243b59ecadf866fdbba1203d0bf44dfb52dd0940e
1744-
languageName: node
1745-
linkType: hard
1746-
1747-
"@enclave-vm/broker@workspace:libs/broker":
1722+
"@enclave-vm/broker@npm:2.14.0, @enclave-vm/broker@workspace:libs/broker":
17481723
version: 0.0.0-use.local
17491724
resolution: "@enclave-vm/broker@workspace:libs/broker"
17501725
dependencies:
@@ -1767,16 +1742,6 @@ __metadata:
17671742
languageName: unknown
17681743
linkType: soft
17691744

1770-
"@enclave-vm/client@npm:2.13.0":
1771-
version: 2.13.0
1772-
resolution: "@enclave-vm/client@npm:2.13.0"
1773-
dependencies:
1774-
"@enclave-vm/stream": "npm:2.13.0"
1775-
"@enclave-vm/types": "npm:2.13.0"
1776-
checksum: 10c0/82345a9963f5065bb0f48857284ec1a211ace1c9aeaa908cd42bafd1a65ce659f94b1b723693549cc935599dc26e2fb53533dd7607b89c1ba0a3cf0db5e5e4f0
1777-
languageName: node
1778-
linkType: hard
1779-
17801745
"@enclave-vm/client@npm:2.14.0, @enclave-vm/client@workspace:libs/client":
17811746
version: 0.0.0-use.local
17821747
resolution: "@enclave-vm/client@workspace:libs/client"
@@ -1786,36 +1751,14 @@ __metadata:
17861751
languageName: unknown
17871752
linkType: soft
17881753

1789-
"@enclave-vm/core@npm:2.13.0":
1790-
version: 2.13.0
1791-
resolution: "@enclave-vm/core@npm:2.13.0"
1792-
dependencies:
1793-
"@babel/standalone": "npm:^7.29.0"
1794-
"@enclave-vm/ast": "npm:2.13.0"
1795-
"@enclave-vm/types": "npm:2.13.0"
1796-
acorn: "npm:8.15.0"
1797-
acorn-walk: "npm:8.3.4"
1798-
astring: "npm:1.9.0"
1799-
zod: "npm:^4.3.6"
1800-
peerDependencies:
1801-
"@huggingface/transformers": ^3.2.2
1802-
vectoriadb: ^2.1.3
1803-
peerDependenciesMeta:
1804-
"@huggingface/transformers":
1805-
optional: true
1806-
vectoriadb:
1807-
optional: true
1808-
checksum: 10c0/22b6c19c089e69a31baed9684c2e71d9393895866c0c7e9723c0489f6dcf77135d33c9ae9fdb408bea28b9a4b18c6d8d97ea62c4e9a88db57967e68848904986
1809-
languageName: node
1810-
linkType: hard
1811-
18121754
"@enclave-vm/core@npm:2.14.0, @enclave-vm/core@workspace:libs/core":
18131755
version: 0.0.0-use.local
18141756
resolution: "@enclave-vm/core@workspace:libs/core"
18151757
dependencies:
18161758
"@babel/standalone": "npm:^7.29.0"
18171759
"@enclave-vm/ast": "npm:2.14.0"
18181760
"@enclave-vm/types": "npm:2.14.0"
1761+
"@types/estree": "npm:1.0.8"
18191762
acorn: "npm:8.15.0"
18201763
acorn-walk: "npm:8.3.4"
18211764
astring: "npm:1.9.0"
@@ -1905,15 +1848,6 @@ __metadata:
19051848
languageName: unknown
19061849
linkType: soft
19071850

1908-
"@enclave-vm/stream@npm:2.13.0":
1909-
version: 2.13.0
1910-
resolution: "@enclave-vm/stream@npm:2.13.0"
1911-
dependencies:
1912-
"@enclave-vm/types": "npm:2.13.0"
1913-
checksum: 10c0/51e69c539c74bd082aeb58ecfda5eaeefe953337f0802042819ef5574bd2ed457e9873c48651f2a2f42bf2f8e1329c537684ce68feaaf51ac0c4e62f128ff5c2
1914-
languageName: node
1915-
linkType: hard
1916-
19171851
"@enclave-vm/stream@npm:2.14.0, @enclave-vm/stream@workspace:libs/stream":
19181852
version: 0.0.0-use.local
19191853
resolution: "@enclave-vm/stream@workspace:libs/stream"
@@ -1922,15 +1856,6 @@ __metadata:
19221856
languageName: unknown
19231857
linkType: soft
19241858

1925-
"@enclave-vm/types@npm:2.13.0":
1926-
version: 2.13.0
1927-
resolution: "@enclave-vm/types@npm:2.13.0"
1928-
dependencies:
1929-
zod: "npm:^4.3.6"
1930-
checksum: 10c0/607822462b192e682712a847f9569501e1e833e33240306c77f83d0cc44b5e3d9bfabe7aa82337c798025d9fc4846943d3808252b096ce1de5fb1fed1560b666
1931-
languageName: node
1932-
linkType: hard
1933-
19341859
"@enclave-vm/types@npm:2.14.0, @enclave-vm/types@workspace:libs/types":
19351860
version: 0.0.0-use.local
19361861
resolution: "@enclave-vm/types@workspace:libs/types"
@@ -12817,10 +12742,10 @@ __metadata:
1281712742
version: 0.0.0-use.local
1281812743
resolution: "streaming-demo@workspace:apps/streaming-demo"
1281912744
dependencies:
12820-
"@enclave-vm/broker": "npm:2.13.0"
12821-
"@enclave-vm/client": "npm:2.13.0"
12822-
"@enclave-vm/core": "npm:2.13.0"
12823-
"@enclave-vm/types": "npm:2.13.0"
12745+
"@enclave-vm/broker": "npm:2.14.0"
12746+
"@enclave-vm/client": "npm:2.14.0"
12747+
"@enclave-vm/core": "npm:2.14.0"
12748+
"@enclave-vm/types": "npm:2.14.0"
1282412749
"@types/express": "npm:^4.17.21"
1282512750
"@types/node": "npm:^22.0.0"
1282612751
express: "npm:^4.21.0"

0 commit comments

Comments
 (0)