Repository navigation
Conversation
Aymericr
commented
Oct 20, 2026
Aymericr
left a comment
Contributor
Author
There was a problem hiding this comment.
Docs review (README vs code). Looks accurate overall; a few fixes:
- Statuses: write
in_progress(that's what--jsonreturns). Suggest: "…queued,in_progress(shown as "in progress"),completed…" --max-credits: suggest "Stop the run before it spends more thanncredits (positive integer); sent asmetadata.pascal_max_credits." Matches the help text and doesn't overpromise, since paid service tools are billed separately.- Add the missing errors:
architect_insufficient_credits(account lacks credits),architect_run_not_found(no run with that ID visible to this key),architect_stream_interrupted(connection dropped but the run continues; check withpascal architect status <id>). All exit1. ARCHITECT_HELPlinks to/docs/developers/mcp; point it tohttps://editor.pascal.app/docs/developers/cli, which will be live before release.- Nit: Ctrl+C before the run is confirmed also exits
130with no run ID.
I'll publish docs/developers/cli.mdx once this merges and ships to npm.
This branch has not been deployed
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.
What does this PR do?
Adds three commands to
@pascal-app/cli. Together they form a thin client over Pascal's hosted OpenAI-compatible Responses API (https://editor.pascal.app/api/v1/responses), authenticated with the agent'sPASCAL_API_KEY:pascal architect run "<brief>"creates a background run (background: true,store: true) and streams it over SSE while you stay attached. Text deltas go to stdout and progress goes to stderr. Ctrl+C detaches without cancelling (exit 130).--detachqueues the run and returns its ID straight away.--effort low|medium|high|proselects thearchitect-<effort>model. Without it, the run usesarchitect.--project <id>is sent asmetadata.project_id.--max-credits <n>is sent asmetadata.pascal_max_credits.--jsonprints a stable run object (schemaVersion: 1).pascal architect status <id>callsGET /responses/{id}.pascal architect cancel <id>callsPOST /responses/{id}/cancel.Errors. A
503withexecutor_unavailable, sent either as an HTTP error or as an SSEerrorevent, becomesarchitect_executor_unavailable, with a message saying no run was started. That error exits with75(EX_TEMPFAIL); so do 429 and other 503s, so scripts can tell when retrying will help.401and403point you topascal agent status. The CLI never echoes the key or the server's HTTP error bodies, and it strips control sequences from server text before printing it.Shared code.
agent-account.tsnow exportsrequireAgentApiKey, used by both the agent and architect commands.Docs. Only the CLI README changed, per the docs owner. It says the commands ship in the next
@pascal-app/clirelease and gives no credit estimates.How to test
cd packages/cli && bun test srcshould report 137 passing tests, including the newarchitect.test.tsand the CLI process tests incli.test.ts.bun run build, thennode dist/bin/pascal.js architect --helpshould print the architect usage.node dist/bin/pascal.js architect run "x" --effort maxshould fail withinvalid_optionand exit 2.PASCAL_API_KEY=sk_test_fake node dist/bin/pascal.js architect status resp_probe --jsonshould returnarchitect_unauthorized(HTTP 401) from the live endpoint.pascal architect run "A small cabin" --effort lowshould stream output; press Ctrl+C, thenpascal architect status <id>.Ran:
bun run check-typesandbun run buildinpackages/cli,bun test src(137 pass), and the repo-levelbun run check(passes with warnings only). Steps 3 and 4 were run by hand. Step 5 was not run, because no real agent key was available.Screenshots / screen recording
N/A — non-visual change
Checklist
bun devbun checkto verify)mainbranch