Repository navigation
fix(dsh): match DSH 0.2.1 credentials behaviour; show run failure reason in prompt TUI - #57
Merged
Merged
Conversation
DSH 0.2.1 credentials-local reads `version: 1` + `refs:` (and DSH-owned `records:`), and auto-migrates the old flat KEY: "string" map. The 0.6.3 preflight still demanded the flat map, so every DSH loop whose store was written by `dsh web` aborted before WORKER. The structure-only scan now accepts both layouts and rejects only what DSH itself refuses: a version other than unquoted 1, non-POSIX or non-string refs, or a flat map DSH cannot migrate. Headless stderr collapse also matches DSH's new error strings. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
agent-loop-prompt sent run output to prompt-run.log, so a failed run only showed "run exited 1". The done screen (and --plain stderr) now shows the AGENT_LOOP_DONE reason, falling back to the last failed:/error line, plus the log path. Reads only this run's slice of the append-only log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
DSH 0.2.1 `--profile headless` mounts no credentials service, so a key in ~/.dsh/.credentials.yaml (what the web Models page writes) never reaches the worker. The preflight still printed "credentials ok worker=dsh" and the run died with MISSING_CREDENTIAL on iteration 1. agent-loop run / run-batch and agent-check dsh now abort up front unless DEEPSEEK_API_KEY is exported, with a note explaining why the file is not enough. Verified against dsh 0.2.1-rc.3: headless fails without the env var and succeeds with it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
- package.json 0.8.6. - Version labels kept in sync: README current line, CONSUMERS.md, docs/embed-api.md, llms.txt, site/ pages + site/llms.txt, and the site version test. - Site DSH guidance (site/llms.txt, harnesses page) no longer tells users to flatten ~/.dsh/.credentials.yaml; it says to export DEEPSEEK_API_KEY and that layout v1 is fine. Site test beats updated to match. - CHANGELOG: 0.8.6 — DSH 0.2.1 credentials compatibility; prompt TUI shows the failure reason. Verified: pnpm test (vitest 1285 + node suites), typecheck, build. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Why
A DSH-worker loop in a consumer repo could not get past iteration 1 with DSH 0.2.1-rc.3:
~/.dsh/.credentials.yamlas "not flat". DSH 0.2.1 reversed its format:credentials-localnow requires layout v1 (version: 1+refs:+ DSH-ownedrecords:) and auto-migrates the old flat map. Sincedsh webwrites layout v1, the harness was blocking the only valid store.MISSING_CREDENTIAL, even though the key was inrefs:. DSH's--profile headlessmounts no credentials service, so the worker only seesDEEPSEEK_API_KEYfrom the launching environment. The preflight still printedcredentials ok worker=dsh.agent-loop-promptsends run output toprompt-run.log, so its done screen only saidrun exited 1, with no reason.What changed
fix(dsh): accept credentials layout v1.dshCredentialsDocumentProblemaccepts layout v1 and the migratable flat map. It rejects only what DSH itself refuses: aversionother than unquoted1, non-POSIX or non-stringrefs, or a flat map DSH can't migrate. It still scans structure only and never echoes values.formatDshHeadlessFailurealso matches DSH's new error strings.DSH_CREDENTIALS_FLAT_HINTis renamed toDSH_CREDENTIALS_LAYOUT_HINT.fix(dsh): requireDEEPSEEK_API_KEYin env.requiredCredentialNeed('dsh')now needs the env var, with a note explaining that the credentials file isn't enough.agent-check dshexits 1 without it.feat(prompt): show why a run failed. The done screen (and--plainstderr) shows theAGENT_LOOP_DONEreason, falling back to the lastfailed:/error line, plus the log path. It reads only this run's slice of the append-only log, using an offset recorded at spawn, so stale reasons never appear. New helper:parseLoopCompletionSignalLine.docs: frontmatter tags (type/app,agentic_ai) on docs, plugin skills and templates. This is unrelated tagging, kept as its own commit.Reviewer notes
DEEPSEEK_API_KEYexported now abort up front. Before, they passed preflight and failed on iteration 1 anyway, so no working setup should break.dsh --profile headlessfails withMISSING_CREDENTIALwithout the env var and succeeds with it, using the same layout-v1 store.docs/dsh-runtime.mdsays "Before agent-looper 0.8.6", which assumes this ships in the next release. There's no version bump or CHANGELOG entry yet.src/agents/dsh*,src/loop/loopCredentialPreflight,src/cliandsrc/integrations(197 tests pass);pnpm typecheckis clean. I haven't run the full suite locally.🤖 Generated with Claude Code