Skip to content

Fix/0.6.1 os aware scripts - #14

Merged
jaymar921 merged 3 commits into
mainfrom
fix/0.6.1-os-aware-scripts
Aug 14, 2026
Merged

Fix/0.6.1 os aware scripts#14
jaymar921 merged 3 commits into
mainfrom
fix/0.6.1-os-aware-scripts

Conversation

@jaymar921

Copy link
Copy Markdown
Owner

This pull request introduces several important improvements and fixes to HirayaCoder, focusing on better platform awareness, improved handling of project scaffolding commands, and more accurate step completion tracking. The changes enhance agent reliability, especially when running commands that scaffold new projects, and ensure that the extension correctly records and reports work done by commands, not just file writes.

Platform awareness and prompt improvements:

  • The agent now detects and records the machine's OS, release, architecture, and Node version at session start using core/environmentProfile, and includes this information in the system prompt and session records. This helps the model avoid guessing the platform or shell environment and provides accurate context for tool-using routes. (app/agent/agentSession.js, CHANGELOG.md, README.md) (F52e7a49R476, F52e7a49R548, F52e7a49R1002, F5e9ba66R5, F6f9cc61R4, F6f9cc61R133)

Project scaffolding command handling:

  • Commands that create new projects (e.g., npm create, yarn create, pnpm create, and their equivalents) are now exempt from the package manifest existence check in scriptPreflight. This prevents false refusals when scaffolding a new project, fixing a major source of failure in previous runs. (app/agent/scriptPreflight.js) (Fa33e1deR35, Fa33e1deR186)

Step completion and audit improvements:

  • The agent now records commands with a revision number in ChangeSet, and the step guard (stepGuard.verify) recognizes successful commands as evidence that work was done, even if no files were written directly. This ensures that steps like project scaffolding are properly credited and not incorrectly marked as "nothing was written." (app/agent/agentSession.js, app/agent/stepGuard.js) (F52e7a49R71, F52e7a49R119, F52e7a49R887, F761fe82R46, F761fe82R148)

User experience and documentation:

  • .hirayacoder/ is now automatically added to .gitignore on session start, preventing users from accidentally committing session logs and transcripts. (CHANGELOG.md) (F5e9ba66R5)
  • New marketing images and documentation updates highlight the offline agent and its capabilities. (README.md, .vscodeignore) (F6f9cc61R4, F6f9cc61R133, F7bc3fc3R67)

These changes collectively make HirayaCoder more robust, transparent, and user-friendly, especially when handling cross-platform scenarios and new project scaffolding workflows.

…p did

A macOS run of the React TODO spec on 0.6.0, ornith:9b, step sessions on. Eight
steps, four refused, stopped at item one of six reporting "nothing was written" —
for a step whose two commands had both exited 0 with the project on disk. Four
faults, none of them the model being small.

The agent is told what machine it is on. Three of the four refusals were the model
reaching for shell syntax it had no way to know was unavailable: `mkdir -p`, then
`cd x && npm install`. It was guessing at the platform and at the execution model,
and the extension knew the first before the first token was generated.
core/environmentProfile detects the OS, release, arch, and Node version and states
them in the system prompt, along with the sentence that matters more — there is no
shell on any platform, cwd is how you run elsewhere, and create_folder/list_files/
read_file/write_file replace the shell utilities. Tool-using routes only; a Plan
prompt gets the facts without the tool names it structurally does not have.

.hirayacoder/ is added to the workspace .gitignore at startup. It holds transcripts,
memory, and the audit log, and has never been ignored anywhere. An existing file is
appended to, never rewritten, and left alone if any line already covers it —
including a !.hirayacoder negation.

npm create/init/exec is no longer refused for the absence of the project it creates.
NO_PACKAGE_JSON is right about `npm install`, which climbs out of the workspace, and
exactly wrong about the scaffolders, where the missing manifest is the point. This
was the first failure of the run and everything after it was the model trying to
satisfy a precondition that was never real.

`cd folder && command` is rewritten into the two arguments run_script already takes.
0.6.0 added cwd, documented it, and made the refusal name it; the model sent the
chained form anyway, was told, and sent it again. Exactly one shape is accepted and
nothing is relaxed — the rewrite goes through pre-flight, the gate, the allow-list,
and pathGuard, and the model is told what actually ran.

A step whose work was a command is no longer scored as having done nothing.
ChangeSet.recordCommand appends to commands, ChangeSet.since reads files, and the
two never met, so a scaffold step could not pass. Commands are now revision-stamped,
commandsSince is the counterpart to since, and stepGuard accepts a command that
succeeded as evidence — still judged from what the extension recorded, never from
the model's account.
Rendered from self-contained HTML in docs/images/src — no fonts, scripts, or images
are fetched and the app icon is inlined, so any Chromium produces the same output.
The HTML is the source of truth; regenerating on a version bump is a one-line edit
rather than a redesign, and the how and the what-to-update are in the sources' own
README.

Excluded from the .vsix. The listing pulls them by absolute raw.githubusercontent
URL exactly as it already does the icon, so there is no reason for a megabyte of PNG
to ride along in every install.
npm audit --omit=dev is clean — the extension ships no runtime dependencies. The
three findings are an allow-listed npx that reaches the registry without ever asking
(pre-existing, and the one that matters), two new filesystem writes that skip
pathGuard's symlink check, and dev-only advisories in the mocha tree. Nothing blocks
0.6.1. The eslint security warnings were each checked rather than waved through; the
new unchainCd regex was measured at 1ms on 50,000 characters of adversarial input.
@jaymar921 jaymar921 self-assigned this Aug 14, 2026
@jaymar921 jaymar921 added enhancement New feature or request fix Bug fixes labels Aug 14, 2026
@jaymar921
jaymar921 merged commit 6fcfef7 into main Aug 14, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request fix Bug fixes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant