Skip to content

Commit bfe637a

Browse files
authored
Merge pull request #27 from rivet-dev/ralph/kernel-consolidation
chore: reorg project
2 parents c66390b + 025dce8 commit bfe637a

848 files changed

Lines changed: 6801 additions & 4083 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agent/contracts/compatibility-governance.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -8,25 +8,25 @@ Changes that add, remove, or materially alter TypeScript compile/typecheck behav
88

99
#### Scenario: Core runtime TypeScript handling changes
1010
- **WHEN** the core runtime adds or removes implicit TypeScript preprocessing behavior
11-
- **THEN** `docs/quickstart.mdx`, `docs/api-reference.mdx`, `docs/runtimes/node.mdx`, `docs/node-compatability.mdx`, `docs-internal/arch/overview.md`, and `docs-internal/friction.md` MUST be updated in the same change
11+
- **THEN** `docs/quickstart.mdx`, `docs/api-reference.mdx`, `docs/runtimes/node.mdx`, `docs/nodejs-compatibility.mdx`, `docs-internal/arch/overview.md`, and `docs-internal/friction.md` MUST be updated in the same change
1212

1313
#### Scenario: Companion TypeScript tooling API changes
1414
- **WHEN** the public API of the companion TypeScript tooling package changes
1515
- **THEN** `docs/quickstart.mdx` and `docs/api-reference.mdx` MUST be updated in the same change so project/source helper semantics remain accurate
1616

1717
### Requirement: Maintain Node Stdlib Compatibility Matrix
18-
Changes affecting bridged or polyfilled Node APIs MUST keep `docs/node-compatability.mdx` synchronized with the actual runtime surface, including supported, limited, and unsupported modules/APIs. Every module entry in the matrix MUST include an explicit support-tier classification (Bridge, Polyfill, Stub, Deferred, or Unsupported) as defined by the `node-stdlib` spec. The page MUST include a top-of-page target Node version statement.
18+
Changes affecting bridged or polyfilled Node APIs MUST keep `docs/nodejs-compatibility.mdx` synchronized with the actual runtime surface, including supported, limited, and unsupported modules/APIs. Every module entry in the matrix MUST include an explicit support-tier classification (Bridge, Polyfill, Stub, Deferred, or Unsupported) as defined by the `node-stdlib` spec. The page MUST include a top-of-page target Node version statement.
1919

2020
#### Scenario: Bridge API surface changes
2121
- **WHEN** a change adds, removes, or materially alters bridged Node API behavior
22-
- **THEN** the compatibility matrix page at `docs/node-compatability.mdx` MUST be updated in the same change to reflect the new runtime contract
22+
- **THEN** the compatibility matrix page at `docs/nodejs-compatibility.mdx` MUST be updated in the same change to reflect the new runtime contract
2323

2424
#### Scenario: Legacy internal matrix path appears anywhere in repository docs/spec sources
2525
- **WHEN** a repository document or spec source references the legacy internal stdlib compatibility document
26-
- **THEN** the reference MUST be replaced with `docs/node-compatability.mdx` before the change is considered complete
26+
- **THEN** the reference MUST be replaced with `docs/nodejs-compatibility.mdx` before the change is considered complete
2727

2828
#### Scenario: Target Node version callout is missing
29-
- **WHEN** `docs/node-compatability.mdx` is updated
29+
- **WHEN** `docs/nodejs-compatibility.mdx` is updated
3030
- **THEN** the page MUST retain an explicit target Node version statement at the top
3131

3232
### Requirement: Node Compatibility Target Version Tracks Test Type Baseline
@@ -38,7 +38,7 @@ The runtime compatibility target MUST align with the `@types/node` package major
3838

3939
#### Scenario: `@types/node` target major is upgraded
4040
- **WHEN** the workspace intentionally upgrades `@types/node` to a new major version used by secure-exec validation
41-
- **THEN** the same change MUST update `docs/node-compatability.mdx` and related compatibility-governance references to the new target Node major line
41+
- **THEN** the same change MUST update `docs/nodejs-compatibility.mdx` and related compatibility-governance references to the new target Node major line
4242

4343
#### Scenario: Compatibility target is documented
4444
- **WHEN** compatibility requirements or docs declare a target Node version
@@ -67,10 +67,10 @@ Unexpected issues, workarounds, and integration friction encountered during secu
6767
- **THEN** its log entry MUST be updated to indicate resolution and summarize the fix
6868

6969
### Requirement: Run Bridge Type Conformance Tests After Bridge Changes
70-
Any change to files under `packages/secure-exec-core/src/bridge` MUST run bridge type conformance checks via `pnpm run check-types:test` in `packages/secure-exec` before completion.
70+
Any change to files under `packages/nodejs/src/bridge` MUST run bridge type conformance checks via `pnpm run check-types:test` in `packages/secure-exec` before completion.
7171

7272
#### Scenario: Bridge source file is modified
73-
- **WHEN** a commit modifies one or more files in `packages/secure-exec-core/src/bridge`
73+
- **WHEN** a commit modifies one or more files in `packages/nodejs/src/bridge`
7474
- **THEN** `pnpm run check-types:test` MUST be executed and failures MUST be addressed before the change is considered complete
7575

7676
### Requirement: Compatibility Project Matrix Uses Black-Box Node Fixtures
@@ -221,15 +221,15 @@ Changes to runtime or bridge filesystem metadata/rename behavior SHALL update co
221221
- **THEN** the compatibility project-matrix MUST include fixture coverage that exercises the changed behavior under host Node and secure-exec comparison
222222

223223
### Requirement: Governance References Use Canonical Secure-Exec Package Family Naming
224-
Governance artifacts that reference runtime package imports SHALL use the `@secure-exec/*` scoped package names (`@secure-exec/core`, `@secure-exec/node`, `@secure-exec/browser`, `@secure-exec/python`) or the `secure-exec` barrel. Source paths SHALL use the corresponding workspace directories (`packages/secure-exec-core`, `packages/secure-exec-node`, `packages/secure-exec-browser`, `packages/secure-exec-python`, `packages/secure-exec`).
224+
Governance artifacts that reference runtime package imports SHALL use the `@secure-exec/*` scoped package names (`@secure-exec/core`, `@secure-exec/nodejs`, `@secure-exec/browser`, `@secure-exec/python`) or the `secure-exec` barrel. Source paths SHALL use the corresponding workspace directories (`packages/core`, `packages/nodejs`, `packages/browser`, `packages/python`, `packages/secure-exec`).
225225

226226
#### Scenario: Governance guidance references runtime package imports
227227
- **WHEN** a governance document or spec requirement describes runtime package imports
228228
- **THEN** it MUST use the appropriate `@secure-exec/*` scoped package name or the `secure-exec` barrel
229229

230230
#### Scenario: Governance guidance references runtime source paths
231231
- **WHEN** a governance document or spec requirement describes runtime source directories
232-
- **THEN** it MUST use the appropriate `packages/secure-exec-*` workspace path for the component being referenced
232+
- **THEN** it MUST use the appropriate `packages/*` workspace path for the component being referenced
233233

234234
### Requirement: Module-Access Boundary Changes MUST Update Security and Friction Documentation
235235
Any change that introduces or modifies driver-managed host module projection or overlay boundaries MUST update compatibility/friction and security-model documentation in the same change.
@@ -251,7 +251,7 @@ Any change that introduces or modifies runtime log-capture defaults or hook-base
251251

252252
#### Scenario: Runtime introduces or changes log-stream hook behavior
253253
- **WHEN** runtime log-stream hook contract changes (event shape, ordering semantics, or failure behavior)
254-
- **THEN** `docs/security-model.mdx` MUST describe trust-boundary and resource-consumption implications and `docs/node-compatability.mdx` MUST reflect user-visible behavior changes where applicable
254+
- **THEN** `docs/security-model.mdx` MUST describe trust-boundary and resource-consumption implications and `docs/nodejs-compatibility.mdx` MUST reflect user-visible behavior changes where applicable
255255

256256
#### Scenario: Logging changes include exploit regression coverage
257257
- **WHEN** logging/output behavior is changed in runtime or bridge paths
@@ -261,7 +261,7 @@ Any change that introduces or modifies runtime log-capture defaults or hook-base
261261
Any change that modifies runtime-driver behavior or runtime orchestration contracts MUST run shared integration suites against both node and browser runtime-driver targets.
262262

263263
#### Scenario: Runtime/driver implementation changes trigger cross-target validation
264-
- **WHEN** a change modifies runtime contracts or driver behavior under `packages/secure-exec-core/src/`, `packages/secure-exec-node/src/`, or `packages/secure-exec-browser/src/`
264+
- **WHEN** a change modifies runtime contracts or driver behavior under `packages/core/src/`, `packages/nodejs/src/`, or `packages/browser/src/`
265265
- **THEN** the change MUST execute shared integration suites for both node and browser targets before completion
266266

267267
#### Scenario: Shared suites are reused between targets

.agent/contracts/documentation-site.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,11 @@ The documentation site SHALL expose a core navigation set that includes Quicksta
88

99
#### Scenario: Docs configuration defines required core pages
1010
- **WHEN** the docs configuration is loaded
11-
- **THEN** navigation MUST include `quickstart`, `security-model`, and `node-compatability` as available documentation pages
11+
- **THEN** navigation MUST include `quickstart`, `security-model`, and `nodejs-compatibility` as available documentation pages
1212

1313
#### Scenario: Node compatibility page path is resolvable
1414
- **WHEN** a user selects the Node Compatibility page from navigation
15-
- **THEN** the docs site MUST resolve and render `node-compatability.mdx` successfully
15+
- **THEN** the docs site MUST resolve and render `nodejs-compatibility.mdx` successfully
1616

1717
### Requirement: Quickstart Uses Steps With Runnable Example
1818
The Quickstart page SHALL present onboarding steps using Mintlify `<Steps>` and SHALL include at least one basic runnable example that verifies setup success using the current runtime logging contract.
@@ -30,17 +30,17 @@ The Quickstart page SHALL present onboarding steps using Mintlify `<Steps>` and
3030
- **THEN** it MUST use hook-based log streaming examples and MUST NOT instruct users to read `result.stdout` or `result.stderr`
3131

3232
### Requirement: Node Compatibility Page Declares Target Version and Matrix
33-
The docs site MUST provide `docs/node-compatability.mdx` with an explicit target Node version statement near the top of the page and a clean compatibility matrix table that summarizes module support tier and runtime notes.
33+
The docs site MUST provide `docs/nodejs-compatibility.mdx` with an explicit target Node version statement near the top of the page and a clean compatibility matrix table that summarizes module support tier and runtime notes.
3434

3535
#### Scenario: Target Node version is visible at top of page
36-
- **WHEN** `node-compatability.mdx` is rendered
36+
- **WHEN** `nodejs-compatibility.mdx` is rendered
3737
- **THEN** users MUST see the targeted Node version before the compatibility matrix content
3838

3939
#### Scenario: Compatibility matrix uses concise tabular format
40-
- **WHEN** `node-compatability.mdx` is rendered
40+
- **WHEN** `nodejs-compatibility.mdx` is rendered
4141
- **THEN** it MUST include a simple table with module/support-tier/status details migrated from the internal compatibility source
4242

4343
#### Scenario: Permission model scope stays at runtime and bridge contract
44-
- **WHEN** `node-compatability.mdx` documents permission behavior
44+
- **WHEN** `nodejs-compatibility.mdx` documents permission behavior
4545
- **THEN** it MUST describe core runtime/bridge permission enforcement and MUST NOT present driver-construction convenience defaults as the canonical security contract
4646

.agent/contracts/isolate-runtime-source-architecture.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@
44
TBD - created by archiving change harden-isolate-runtime-typing-and-layout. Update Purpose after archive.
55
## Requirements
66
### Requirement: Isolate Runtime Source Layout Separates Inject Entrypoints and Shared Modules
7-
The isolate-runtime source tree SHALL organize host-injected entry scripts under `packages/secure-exec-core/isolate-runtime/src/inject/` and shared reusable modules under `packages/secure-exec-core/isolate-runtime/src/common/`.
7+
The isolate-runtime source tree SHALL organize host-injected entry scripts under `packages/core/isolate-runtime/src/inject/` and shared reusable modules under `packages/core/isolate-runtime/src/common/`.
88

99
#### Scenario: Existing inject sources are migrated to canonical layout
1010
- **WHEN** isolate-runtime injection sources are maintained or refactored
11-
- **THEN** entry scripts evaluated by host runtime MUST live under `packages/secure-exec-core/isolate-runtime/src/inject/` and shared helpers/types MUST live under `packages/secure-exec-core/isolate-runtime/src/common/`
11+
- **THEN** entry scripts evaluated by host runtime MUST live under `packages/core/isolate-runtime/src/inject/` and shared helpers/types MUST live under `packages/core/isolate-runtime/src/common/`
1212

1313
#### Scenario: New isolate injection source is added
1414
- **WHEN** contributors introduce a new host-to-isolate injected script
15-
- **THEN** the source file MUST be added under `packages/secure-exec-core/isolate-runtime/src/inject/` and MUST NOT be placed in legacy flat isolate-runtime paths
15+
- **THEN** the source file MUST be added under `packages/core/isolate-runtime/src/inject/` and MUST NOT be placed in legacy flat isolate-runtime paths
1616

1717
### Requirement: Inject Entrypoints SHALL Compile as Standalone Runtime Artifacts
1818
Inject entrypoint files SHALL be compiled into standalone executable source payloads suitable for host runtime injection, including any shared code imported from `src/common`.

.agent/contracts/node-bridge.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ Bridge-exposed filesystem metadata calls (`exists`, `stat`, and typed directory
117117
- **THEN** bridge handling MUST return entry type information without a repeated `readDir` probe for each entry
118118

119119
### Requirement: Bridge Boundary Contracts SHALL Be Defined In A Canonical Shared Type Module
120-
Bridge global keys and host/isolate boundary type contracts SHALL be defined in one canonical shared type module under `packages/secure-exec-core/src/shared/` and reused across host runtime setup and bridge modules.
120+
Bridge global keys and host/isolate boundary type contracts SHALL be defined in canonical shared type modules — bridge-contract types in `packages/nodejs/src/bridge-contract.ts` and global-exposure helpers in `packages/core/src/shared/global-exposure.ts` and reused across host runtime setup and bridge modules.
121121

122122
#### Scenario: Host runtime injects bridge globals
123123
- **WHEN** host runtime code wires bridge globals into the isolate

0 commit comments

Comments
 (0)