Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
447c87f
feat: Cycle 0057 pt2 base: the node-server contract — its codes and r…
ryota-murakami Oct 27, 2026
723f797
feat: Cycle 0057 pt2 U: server readiness, listener ownership, request…
ryota-murakami Oct 27, 2026
bd1b0eb
merge: Cycle 0057 pt2 part U (server readiness, listener ownership, r…
ryota-murakami Oct 27, 2026
e4779b0
feat: Cycle 0057 pt2 S: node-server admission, requests, continuation…
ryota-murakami Oct 27, 2026
4b05aa6
feat: Cycle 0057 pt2 R: the node-server run, its debugger seams and h…
ryota-murakami Oct 27, 2026
20075d3
merge: Cycle 0057 pt2 part R (the node-server run and its debugger se…
ryota-murakami Oct 27, 2026
7eac62d
test: Cycle 0057 pt2: the node-server real-process loop runs with the…
ryota-murakami Oct 27, 2026
c241956
feat: Cycle 0057 pt2 S: node-server status and preflight, help, MCP e…
ryota-murakami Oct 27, 2026
b8eac46
merge: Cycle 0057 pt2 part S (node-server through the service, MCP, h…
ryota-murakami Oct 27, 2026
9416b37
feat: Cycle 0057 pt2: the editor runs node-server through the real ru…
ryota-murakami Oct 27, 2026
bf11b95
docs: Cycle 0057 pt2: the packaged README explains the node-server pr…
ryota-murakami Oct 27, 2026
bf6b7c4
docs: AGENTS.md: VS Code trials use GPT-6.1 Terra now that the picker…
ryota-murakami Oct 27, 2026
65f95d8
fix: Cycle 0057 pt2 U: abort reason in the readiness pause, safer orp…
ryota-murakami Oct 27, 2026
0cdf933
merge: Cycle 0057 pt2 part U fixes (OCR batch C, CodeRabbit r1) into …
ryota-murakami Oct 27, 2026
dbd16c4
fix: Cycle 0057 pt2 S: node-server events and response carry no priva…
ryota-murakami Oct 27, 2026
57adf27
fix: Cycle 0057 pt2 R: review findings of the node-server run (D14 ou…
ryota-murakami Oct 27, 2026
6049d5f
merge: Cycle 0057 pt2 part S fixes (OCR batch B, CodeRabbit r1) into …
ryota-murakami Oct 27, 2026
f6c851b
merge: Cycle 0057 pt2 part R fixes (OCR batch A, readConnectionServer…
ryota-murakami Oct 27, 2026
6c49e64
refactor: Cycle 0057 pt2: the loopback readiness check is named accep…
ryota-murakami Oct 27, 2026
6c5b25f
test: Cycle 0057 pt2: start keys, a parameter and a stop number avoid…
ryota-murakami Oct 27, 2026
59e17e3
fix: Cycle 0057 pt2: README says your own pause has the same 300 s ho…
ryota-murakami Oct 27, 2026
cdc2736
test: Cycle 0057 pt2: the node-server run is tested against the pinne…
ryota-murakami Oct 27, 2026
8257e53
fix: Cycle 0057 pt2: a Stop sends no request still being checked and …
ryota-murakami Oct 27, 2026
0f00841
fix: Cycle 0057 pt2: a Stop during the request kills the server first…
ryota-murakami Oct 27, 2026
b40af1e
test: Cycle 0057 pt2: pure units of the node-server profile get the c…
ryota-murakami Oct 27, 2026
39c16c8
docs: Cycle 0057 pt2: the packaged README says what the node-server p…
ryota-murakami Oct 27, 2026
c664182
chore: bump version and changelog (v0.2.51.0)
ryota-murakami Oct 27, 2026
3f1473f
test: Cycle 0057 pt2: the node-server port refusal names the occupant…
ryota-murakami Oct 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ Standing rules, stated as rules (no decision log); delivery chain and ship limit
- Never an easier repository, never a tenth acceptance target. Recheck its revision, settings, dirty state; tell the owner before occupying the desktop; record unsupported behavior and missing setup. Docs-only work needs no native launch.
- Development results earn no nine-project credit, fill no final row. Final acceptance freezes its own targets and candidate; Stage 1 starts only when its prerequisites hold.
- Use real opened repositories; isolated inputs verify mechanisms only, never as bundled demos or practical trials. Retired local trial resources are removed; old records in Git are no current proof.
- Development chats: VS Code = Copilot Chat, model **GPT6 Luna** (owner, 2026-10-21: the cheaper model; 2026-10-27: switch to GPT-6.1 Terra or GPT-6.1 Luna once the picker lists one; search the picker for `terra` and `6.1` before each VS Code trial, absent on 2026-10-27); Cursor = Agent, model **Grok 4.6 high**, Fast on allowed (owner, 2026-10-24 JST: 「これからGrok4.6Hiのファストオンで大丈夫ですよ。」); after observed credit exhaustion (either host) = the installed **Codex Extension** (Claude Code extension fallback retired).
- Development chats: VS Code = Copilot Chat, model **GPT-6.1 Terra** (owner, 2026-10-27: switch from GPT6 Luna to GPT-6.1 Terra or GPT-6.1 Luna once the picker lists one; GPT-6.1 Terra listed in the Space's VS Code 1.142.0 on 2026-10-28 JST, GPT-6.1 Luna not; before each VS Code trial search the picker for `6.1` and `luna`, and switch to GPT-6.1 Luna, the cheaper one, if it appears); Cursor = Agent, model **Grok 4.6 high**, Fast on allowed (owner, 2026-10-24 JST: 「これからGrok4.6Hiのファストオンで大丈夫ですよ。」); after observed credit exhaustion (either host) = the installed **Codex Extension** (Claude Code extension fallback retired).
- Model missing from the picker → that host's trial is NOT RUN, picker list recorded.
- Record the actual chat and fallback reason; buy no credits; never label fallback evidence Copilot.
- Final acceptance has its own standard-chat rules. Historical Claude extension observations keep their identities.
Expand Down
19 changes: 19 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
# Changelog

## [0.2.51.0] - 2026-10-28 (development candidate)

Cycle 0057 ([Issue #139](https://github.com/laststance/codebook/issues/139)), a feature cycle, second of its three pull requests: the chat can now explain how a repository's own Node HTTP server handles a request, with the server running. The new `node-server` profile starts the server under the editor's debugger, sends one declared request, stops in the route handler's actual source and reports the response it observed. The bundled skill routes server questions to it in the third pull request; until then the chat finds it through `codebook_status` and `codebook://help/node-server`. Tests cover this part, real-process tests among them (the product's launcher and request sender against a real child process, with the test's own debugger client standing in for the editor's, and local runs against pinned clones of `laststance/switch-time` and `laststance/nsx` with their databases). In chat-driven smokes in VS Code 1.142.0 (Copilot Chat, GPT-6.1 Terra) on macOS 26 (a virtual machine), on a pinned clone of `laststance/switch-time` and this part's development candidates, the chat declared the run itself, paused in the handler's TypeScript source, explained with the captured values, continued to the observed `200` and stopped the server; Cursor and the database-backed paths come with the third pull request's native trial.

**Explain a Node HTTP server.**

- The chat declares the server's entry file, its package folder, the port the server's own code listens on, one request (method, path, and a body with its content type for POST, PUT or PATCH) and the stops. Codebook starts exactly `node [--import <the repository's tsx>] <entry>` in the package folder, never a script, a command line or watch mode, and never sets the port.
- **The server keeps its own environment**: it reads its own `.env` as it normally does; Codebook passes only `PATH`, `HOME`, `TMPDIR`, `SHELL`, `LANG`, `LC_ALL`, `PNPM_HOME`, `USER`, `LOGNAME` and the certificate variables, and leaves `NODE_ENV` unset so the server's own default applies. **`codebook.nodeExecutable`** selects a newer Node when the repository needs one.
- **You confirm a request that changes data**: before a POST, PUT, PATCH or DELETE, the editor asks you in a dialog naming the method, the path, the run and that the server uses the repository's own configured database. Only **Send** sends it, and the chat cannot answer the dialog; **Cancel** sends nothing. Each run, and each declared body, asks in its own dialog, so a dialog an earlier run left on screen never sends this run's request.
- **The request reaches only the server Codebook started**: before the first byte is written, the connected socket's server process must be the started one; a port another process holds, a `fork` or cluster child that listens, or a listener that changed after start-up ends the start or the request with `LISTENER_NOT_OWNED`, with nothing sent and, at the request, the run still ready.
- **Stops pause in the handler's source**: at each declared stop the chat explains with the captured values, and your Variables, Watch and Call Stack views show the live ones. Your own pause (a breakpoint, `debugger;`, an exception, the Pause button) is never resumed by Codebook; the chat waits for you within the same 300 s hold.
- **The response is reported as observed**, HTTP 4xx and 5xx included; a redirect is not followed. A failed connection or a server that does not answer within 30 s of running time ends the request with `REQUEST_FAILED` or `REQUEST_TIMEOUT`, and the chat never sends it again on its own. A pause held longer than 300 s ends the run without resuming the paused code (`PAUSE_HOLD_EXPIRED`).
- **Stopping ends only the server the run started**, within 10 s. A stop before the request's first byte sends nothing. While the request is under way, or while the server is paused at a declared stop, the server is ended at once (SIGKILL), so no code after the stop runs; otherwise the debugger lets go first and the server gets SIGTERM, so a server that handles it can shut down. A server left running by a closed window is ended at the extension's next start in that folder, with an entry in **Output › Codebook**; a record that no longer matches its process is dropped without a signal.
- **The status bar shows the run**: `Server starting`, `Listening on :<port>`, `Paused at stop <n> of <m>`, `Paused by you in the debugger`, `Responded <status>`, `Failed: <code>`, `Stopping` or `Stopped`, beside `Learning replay is not available for server runs yet`. A server run is not saved as a learning replay in this version.
- **`codebook_status` lists `node-server`** with what it needs here (Node, `lsof` or `ss`, `ps`, a supported platform), naming each missing item; native Windows reads it as not available. **`codebook://help/node-server`** has the walkthrough, three samples, the supported shape, the limits and every error code, and **`codebook://help/errors`** gains the profile's 13 new codes with their recovery.
- **Limits**: one client at a time; the server's inspector listens on 127.0.0.1 during the run; Codebook's readiness probes can appear in the server's logs; a server bound to `0.0.0.0` or `::` is accepted and still gets its request on loopback; the run ends at Codebook's run deadline, 10 minutes after its start.

**Compatibility.** The MCP API stays 1.8: the `node-server` profile, the `http-request` action and the new codes are additions. The bundled skill stays 1.0.50 until the third pull request. Stored learner data, saved studies and replays, the Wiki's published format and the marker format do not change.

## [0.2.50.0] - 2026-10-27 (development candidate)

Cycle 0057 ([Issue #139](https://github.com/laststance/codebook/issues/139)), a feature cycle, first of its three pull requests: one redaction contract masks credentials in what browser and test runs capture, before any of it reaches the chat, a saved history or Output › Codebook. The parts of the coming Node server profile (its declaration, launch and listener check) arrive here unexposed: no profile, tool or help offers them yet. Tests cover this part; no native editor trial ran on it.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ Codebook contributes `debug.focusEditorOnBreak: false` as the native debugger de

## Implementation status

This is a preview, not a Marketplace or Open VSX release. The delivered version is **0.2.49.0** once the third pull request of [Cycle 0056](https://github.com/laststance/codebook/issues/135) is merged; until then 0.2.48.0 ([PR #137](https://github.com/laststance/codebook/pull/137), the cycle's second pull request) is the delivered one, and the active cycle Issue says where the delivery stands. Cycle 0056 is a bug-fix cycle that closes the defects Cycle 0055 carried, in three pull requests: the first makes an LLM Wiki start say what happens when it joins a start under way, is stopped or passes its bound, and release or write back what it claimed; the second the LLM Wiki view and the reader; the third a saved test replay that Cursor refused to open, with the native trial. [Cycle 0055](https://github.com/laststance/codebook/issues/132) is a feature cycle: **Codebook: Generate LLM Wiki** writes a project's first LLM Wiki through the editor's agent from Codebook's own entry (its first pull request), and an **LLM Wiki** view in the Activity Bar shows, opens and updates it (its second). Cycle 0053 was a feature cycle: a test inside a workspace package runs with that package's Vitest and config, as the package's own `vitest` would, while a test the repository root's config already selects keeps running from the root. Cycle 0054 is a bug-fix cycle that closes the three defects Cycle 0053 carried: a test that ends before a later declared stop says so, a package test's launch asks the repository root again whether its config now selects the test, and the native-trial bootstrap keeps a listing it could not release. Cycle 0051 opened a test replay in the learning-replay composition a browser replay has: the Learning summary in the chat's place, one transport for both replay families, and a Learning summary button that shows a hidden summary again. Cycle 0052 was a bug-fix cycle that closed every defect Cycle 0051 carried, in three pull requests: the first makes replays leave, open and reload without stale frames and makes their entries and exits behave as the learner chose; the second fixes a test replay's moves and its summary page; the third the live runtime's unreadable facts, a browser run's refusals and the tests' hygiene. The MCP API is 1.8. What each earlier cycle delivered, with its tests, trials and limits, is in the [change history](CHANGELOG.md) and in that cycle's record, kept under the tag [`docs-archive-2026-10-20`](https://github.com/laststance/codebook/tree/docs-archive-2026-10-20/docs/cycles); from Cycle 0048 on, the cycle's Issue holds its tasks and state, and its pull requests the results.
This is a preview, not a Marketplace or Open VSX release. The delivered version is **0.2.51.0** once the second pull request of [Cycle 0057](https://github.com/laststance/codebook/issues/139) is merged; until then 0.2.50.0 ([PR #140](https://github.com/laststance/codebook/pull/140), the cycle's first pull request) is the delivered one, and the active cycle Issue says where the delivery stands. Cycle 0057 is a feature cycle that explains a repository's own Node HTTP server live, in three pull requests: the first masks credentials in what every run captures and lays the server profile's launch parts; the second offers the `node-server` profile through MCP, which starts the server under the debugger, sends one declared request (confirmed by you when it changes data) and stops in the route handler's source; the third routes the bundled skill to it, with the native trial. Cycle 0056 was a bug-fix cycle that closed the defects Cycle 0055 carried, in three pull requests: the first makes an LLM Wiki start say what happens when it joins a start under way, is stopped or passes its bound, and release or write back what it claimed; the second the LLM Wiki view and the reader; the third a saved test replay that Cursor refused to open, with the native trial. [Cycle 0055](https://github.com/laststance/codebook/issues/132) is a feature cycle: **Codebook: Generate LLM Wiki** writes a project's first LLM Wiki through the editor's agent from Codebook's own entry (its first pull request), and an **LLM Wiki** view in the Activity Bar shows, opens and updates it (its second). Cycle 0053 was a feature cycle: a test inside a workspace package runs with that package's Vitest and config, as the package's own `vitest` would, while a test the repository root's config already selects keeps running from the root. Cycle 0054 is a bug-fix cycle that closes the three defects Cycle 0053 carried: a test that ends before a later declared stop says so, a package test's launch asks the repository root again whether its config now selects the test, and the native-trial bootstrap keeps a listing it could not release. Cycle 0051 opened a test replay in the learning-replay composition a browser replay has: the Learning summary in the chat's place, one transport for both replay families, and a Learning summary button that shows a hidden summary again. Cycle 0052 was a bug-fix cycle that closed every defect Cycle 0051 carried, in three pull requests: the first makes replays leave, open and reload without stale frames and makes their entries and exits behave as the learner chose; the second fixes a test replay's moves and its summary page; the third the live runtime's unreadable facts, a browser run's refusals and the tests' hygiene. The MCP API is 1.8. What each earlier cycle delivered, with its tests, trials and limits, is in the [change history](CHANGELOG.md) and in that cycle's record, kept under the tag [`docs-archive-2026-10-20`](https://github.com/laststance/codebook/tree/docs-archive-2026-10-20/docs/cycles); from Cycle 0048 on, the cycle's Issue holds its tasks and state, and its pull requests the results.

The specification is [goal version 10](PRODUCT_GOAL.md), and the implementation targets external repositories. Historical fixture or coupled-Wiki success is not proof of that destination.

Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.2.50.0
0.2.51.0
Loading