File tree Expand file tree Collapse file tree
openspec/changes/harden-opencode-runtime-integration/specs/cli-contract Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Delta for CLI Contract
2+
3+ ## MODIFIED Requirements
4+
5+ ### Requirement: Typed CLI options match upstream option arity
6+
7+ The SDK MUST model each typed OpenCode CLI option using the same value arity and semantic type as the supported upstream OpenCode version.
8+
9+ #### Scenario: Share session
10+
11+ - GIVEN a caller enables session sharing
12+ - WHEN ` OpenCodeRunOptions ` is converted to CLI arguments
13+ - THEN the arguments MUST contain ` --share `
14+ - AND MUST NOT append an arbitrary value after ` --share `
15+
16+ #### Scenario: Auto approval remains opt-in
17+
18+ - GIVEN a caller does not explicitly enable automatic approval
19+ - WHEN run arguments are generated
20+ - THEN ` --auto ` MUST NOT be emitted
21+
22+ #### Scenario: Auto approval enabled
23+
24+ - GIVEN a caller explicitly enables automatic approval
25+ - WHEN run arguments are generated
26+ - THEN ` --auto ` MUST be emitted exactly once
27+
28+ ### Requirement: Typed wrappers remain extensible
29+
30+ The SDK MUST retain a raw argument escape hatch for upstream commands or flags that have not yet received a typed wrapper.
31+
32+ #### Scenario: Unknown future option
33+
34+ - GIVEN a future OpenCode flag is not modeled by the current SDK
35+ - WHEN the caller uses the raw CLI entry point
36+ - THEN the SDK MUST pass the provided argument vector without shell interpolation
You can’t perform that action at this time.
0 commit comments