You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The runtime already separates capability/config ownership from execution construction, but terminology still causes confusion because capability-side and execution-side contracts both read as runtime concerns. This change aligns names to intent.
4
+
5
+
## Goals / Non-Goals
6
+
7
+
**Goals:**
8
+
- Name capability-side contract `SystemDriver`.
9
+
- Name execution-side contract `RuntimeDriver` and its factory/options accordingly.
10
+
- Keep runtime behavior and security semantics unchanged.
11
+
- Apply names consistently across code, tests, docs, and examples.
12
+
13
+
**Non-Goals:**
14
+
- Changing execution semantics or permission behavior.
15
+
- Reworking module loading internals.
16
+
17
+
## Decisions
18
+
19
+
1. Rename top-level contracts instead of alias-only layering.
20
+
- Rationale: clear API surface and avoids perpetuating old ambiguity.
21
+
22
+
2. Rename constructor fields to match pair semantics.
The current driver naming still conflates capability-side and execution-side ownership, making APIs harder to read and discuss. We want the names to map directly to responsibilities: `SystemDriver` for OS/capability simulation and `RuntimeDriver` for runtime execution management.
4
+
5
+
## What Changes
6
+
7
+
- Rename capability-side driver type from `RuntimeDriver` to `SystemDriver`.
8
+
- Rename execution-side contracts from `RuntimeExecutionDriver*` to `RuntimeDriver*`.
9
+
- Update Node runtime constructor and factory naming to reflect the new pair (`systemDriver` + `runtimeDriverFactory`).
10
+
- Keep behavior unchanged: deny-by-default, runtime config injection, and execution semantics remain the same.
11
+
- Update docs/examples/tests to use the new names.
12
+
13
+
## Capabilities
14
+
15
+
### New Capabilities
16
+
- None.
17
+
18
+
### Modified Capabilities
19
+
-`node-runtime`: API contract terminology for driver composition is renamed to `SystemDriver` (capability side) and `RuntimeDriver` (execution side) without runtime behavior changes.
Runtime capabilities SHALL be composed through host-provided system drivers so filesystem, network, and child-process behavior are controlled by configured adapters rather than hardcoded runtime behavior. `NodeRuntime` construction SHALL require both a capability-side `SystemDriver` and an execution-side `RuntimeDriverFactory`.
-**WHEN**`NodeRuntime` is created with a `SystemDriver` that defines filesystem, network, and command-execution adapters and with a `RuntimeDriverFactory`
8
+
-**THEN** sandboxed operations MUST route through those adapters for capability access and execution MUST be created through the provided runtime driver factory
9
+
10
+
#### Scenario: Missing permissions deny capability access by default
11
+
-**WHEN** a system driver is configured without explicit permission allowance for a capability domain
12
+
-**THEN** operations in that capability domain MUST be denied by default
Runtime capabilities SHALL be composed through host-provided drivers so filesystem, network, and child-process behavior are controlled by configured adapters rather than hardcoded runtime behavior. `NodeRuntime` construction SHALL require both a capability driver and an execution factory.
34
+
Runtime capabilities SHALL be composed through host-provided system drivers so filesystem, network, and child-process behavior are controlled by configured adapters rather than hardcoded runtime behavior. `NodeRuntime` construction SHALL require both a capability-side `SystemDriver` and an execution-side `RuntimeDriverFactory`.
-**WHEN**`NodeRuntime` is created with a `SystemDriver` that defines filesystem, network, and command-execution adapters and with a `RuntimeDriverFactory`
38
+
-**THEN** sandboxed operations MUST route through those adapters for capability access and execution MUST be created through the provided runtime driver factory
39
39
40
40
#### Scenario: Missing permissions deny capability access by default
41
-
-**WHEN** a driver is configured without explicit permission allowance for a capability domain
41
+
-**WHEN** a system driver is configured without explicit permission allowance for a capability domain
42
42
-**THEN** operations in that capability domain MUST be denied by default
0 commit comments