Skip to content

feat(scriptit): add native server and session integration patches - #14

Closed
noamzbr wants to merge 6 commits into
noam/v2-stop-basefrom
noam/v2-product-patches
Closed

noamzbr wants to merge 6 commits into
noam/v2-stop-basefrom
noam/v2-product-patches

Conversation

@noamzbr

@noamzbr noamzbr commented Sep 17, 2026

Copy link
Copy Markdown
Owner

What

Six Script.it integration patches, one commit each, above OpenCode v2 + the carried upstream Stop PR.

Base: noam/v2-stop-base = v2 eb052f70 + dd5f3d12, the port of anomalyco/opencode#46721. This PR contains only the product changes above that base.

  1. Managed server entrypoint: scriptit-serve uses explicit configuration, loopback authentication, stdin-owned lifetime and an in-process route to the upstream v1 converter.
  2. Interactive turn completion: honor metadata.endTurn before requesting another model round, including incomplete-stream retries.
  3. Shell identity/environment: derive user-shell message identity before creation, expose caller metadata to shell hooks and pass request-only environment without persisting it.
  4. Tool refusals: map rejected Promise execute.before hooks to typed tool errors.
  5. Settled Stop: wait for the shell's job before acknowledging Stop, so immediate session interruption cannot delete its result/capture.
  6. Bounded shell history: persist a 16 KiB head + 48 KiB tail excerpt instead of the first 1 MiB.

Validation

  • The six commits reconstruct all 32 files of the tested product patch exactly; no behavior change from splitting the commits.
  • Generated protocol, OpenAPI and client output regenerated and matched the captured source.
  • bun run check passes (lint and all 35 typecheck tasks).
  • Bun 1.4.2: CLI wrapper test passes; server HTTP suite passes (12 tests).
  • Core runner/step/session-shell/session-owned/plugin-failure/tool-shell suites: 339 pass, 19 skip, 6 fail. All six shell-approval failures also reproduce on noam/v2-stop-base; they are not introduced by these product patches. They assert Effect Exit object's internal shape in conditional/compound-shell approval cases.

Generated OpenCode client/API/OpenAPI output and the lockfile are excluded from the guided review and handwritten line counts.

@github-actions

Copy link
Copy Markdown

This PR doesn't fully meet our contributing guidelines and PR template.

What needs to be fixed:

  • PR description is missing required template sections. Please use the PR template.

Please edit this PR description to address the above within 2 hours, or it will be automatically closed.

If you believe this was flagged incorrectly, please let a maintainer know.

@github-actions

Copy link
Copy Markdown

This pull request has been automatically closed because it was not updated to meet our contributing guidelines within the 2-hour window.

Feel free to open a new pull request that follows our guidelines.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants