Repository navigation
P5 O14 M1, the src/mawsd half: mawsd endpoint provision reads its code from a prompt or stdin and waits as the module does - #300
Merged
Conversation
…t or stdin, and waits as long as the module may (P5 O14 M1, the src/mawsd half)
O2's CLI read a secret and stretched the request deadline for `enroll` only.
That path is now a table of secret-reading commands, `enroll` and `provision`.
Each command has its own flags and its own wait when no `--wait` is given:
enroll does not wait, and provision waits 300 s, which is the module's default.
`mawsd endpoint provision` reaches `Endpoint.cli('provision', args, secret)`
with the code read from the hidden prompt ("Provisioning code: ") or from
stdin, never from argv. An argument it does not know (enroll's --replace
included) is refused unechoed. Before this change, `endpoint provision` passed
through with no secret, and its request gave up after 10 s.
Tests:
- cli.test.ts: provision's code from a pipe and from the prompt, its flags,
and the refusals.
- cli-prompt.test.ts, under a real pty: the hidden prompt and the pipe, the
module's answer held past the 10 s default deadline under `--wait 30` and
under no `--wait`.
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 28, 2026
…e; O8 M2's landing (#295), the remote rows, residue 11 to 17 Sminos-Session: GUI AI agent workspace charter#37052769 (MAWS on macbook)
SSFSKIM
added a commit
that referenced
this pull request
Oct 28, 2026
…e by the caller's path; the no-module branches go Through #300's secret-command table: revoke and grant are its source commands, '-' read from stdin to its end and sent as daemon.endpoint's secret, a relative file made absolute against the caller's cwd (the daemon's is its own). cli.ts's 'none (arrives with P5 O10)' and keys's no-module fallback, dead since M10 binds the module, are removed with the tests that pinned them: a daemon with no module answers keys like any command. The process scene drives revoke from a relative path, revoke - and grant - through the built daemon. Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
P5 O14 M1, the
src/mawsdhalf (docs/doperpowers/plans/2026-10-27-p5-o14-cutover.md, M1, the parts marked [needs O2]). M1's endpoint andorg-protocolhalf landed as #254 (fc117d1, P5 Decision Log 83). This is the half that carries the secret, written now that O2'smawsdis on master (7a5893b, P5 Decision Log 107).enrollonly. That path is now a table of secret-reading commands,enrollandprovision. Each one names:Enrollment code:orProvisioning code:at the prompt, and the same name in its refusals;--waitis given.enrolldoes not wait, so its request keeps the 10 s default.provisionwaits 300 s, the endpoint module's own default.mawsd endpoint provision [--name <name>] [--wait [<seconds>]] [--json]reachesEndpoint.cli('provision', args, secret). The code comes from the hidden prompt or from stdin, never from argv, and an argument the command does not know (enroll's--replaceincluded) is refused without being echoed. Before this change,endpoint provisionpassed through with no secret, and its request gave up after 10 s.enrolland the top-levelmawsd enroll; every other endpoint command;src/endpoint/;src/mawsd/endpoint-seam.ts.mawsd.jsbundle but runs none of it, so the change adds nothing to the daemon's idle resident set, and no daemon-idle reading on the mini is owed against acceptance 14's bound.Validation Evidence
electron-vite build:vitest run src/mawsd/cli.test.ts: 33 passed. The 3 new tests fail on the oldcli.ts.vitest run src/mawsd/cli-prompt.test.ts, under a real pty: 4 passed. The 2 new tests fail on the oldcli.ts. They cover the hidden prompt and a pipe, with the module's answer held past the 10 s default deadline both under--wait 30and with no--wait.src/mawsd/cli-prompt.test.tsran its 4 tests (24 s) andsrc/mawsd/cli.test.tsits 33.scripts/ci-gate.sh <wt> --gates static,unit,probes --class1a pool, run 40717846770: GREEN.src/mawsd. They were its standing notes: the daemon-idle groups and three others skipped as "unreadable package script", and dashboard skipped for a "nonliteral selection".src/endpointis untouched, so the hosted e2e:desk-web-hub run is not required (Decision Log 94).p5-o14-m1-mawsd-head).Residue
Sminos-Session: p5-desk-track-owner#b4948247 (doperpowers on macbook)