Skip to content

V1.3-CORE 3.9.1#58

Merged
deepagent-ai merged 4 commits into
mainfrom
dev
Jul 10, 2026
Merged

V1.3-CORE 3.9.1#58
deepagent-ai merged 4 commits into
mainfrom
dev

Conversation

@deepagent-ai

Copy link
Copy Markdown
Contributor

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Please provide a description of the issue, the changes you made to fix it, and why they work. It is expected that you understand why your changes work and if you do not understand why at least say as much so a maintainer knows how much to value the PR.

If you paste a large clearly AI generated description here your PR may be IGNORED or CLOSED!

How did you verify your code works?

Screenshots / recordings

If this is a UI change, please include a screenshot or recording.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

If you do not follow this template your PR will be automatically rejected.

deepagent-ai and others added 4 commits July 10, 2026 15:26
#52)

…, prod-wiring

Close the three remaining V3.9 user-reachability tails surfaced by the
commit-vs-design audit. Capability bodies were all implemented+tested;
these wire them to users.

Wiki (§B):
- 4 HTTP routes (/deepagent/wiki/{pages,page,search,edit}), all
fail-closed on experimentalWiki; capabilities.features += wiki for
independent UI gating
- openWikiSearchIndex factory (FTS5, runtime-split sqlite, rebuildable
projection)
- buildWikiEditGate: editKnowledge now goes through the REAL
promotion.validate evidence-gate (dedupe + evidence check), not the
trivial default floor
- DialogWiki + wiki.api.ts: sidebar entry → dialog with grouped list,
full-text search, Markdown detail, docs↔code cross-links, in-place
Knowledge/Memory edit (dialog over route: the only wired full-view
mechanism in the app today)

Goal (§D):
- GoalStartButton: "run plan as goal" trigger next to GoalStatusBar;
startGoal with no objective makes the server adopt the existing session
plan (no backend change). Gated on capabilities.goalLoop + presence of a
plan + no active goal.

Runtime-portable sqlite (the crash fix):
- WikiSearchIndex previously hardcoded `bun:sqlite`. Statically
importing it pulls a `bun:` builtin into the Node/Electron server module
graph (prompt.ts → session-archive → search-index), crashing the desktop
app at module-eval. Split into #wiki-fts-db (bun:sqlite / node:sqlite
variants) via package.json imports conditions — the same convention as
core #sqlite/#db. + a regression guard test.

Cosmetic:
- agent-executor.ts JSDoc: no longer claims it avoids
UnifiedContextGraph
- arbiter.ts: critical-dissent comment "Rule 3" → "Rule 5" (matches code
order)

Tests: +8 (edit-gate, search-index construction, runtime-portability
guard). All 3 packages typecheck exit0; wiki/panel/goal/agent suites +
i18n parity green.

### Issue for this PR

Closes #

### Type of change

- [ ] Bug fix
- [ ] New feature
- [ ] Refactor / code improvement
- [ ] Documentation

### What does this PR do?

Please provide a description of the issue, the changes you made to fix
it, and why they work. It is expected that you understand why your
changes work and if you do not understand why at least say as much so a
maintainer knows how much to value the PR.

**If you paste a large clearly AI generated description here your PR may
be IGNORED or CLOSED!**

### How did you verify your code works?

### Screenshots / recordings

_If this is a UI change, please include a screenshot or recording._

### Checklist

- [ ] I have tested my changes locally
- [ ] I have not included unrelated changes in this PR

_If you do not follow this template your PR will be automatically
rejected._

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
…o nix hashes (#53)

## Problem

`nix/hashes.json` contains pre-computed SHA256 hashes for the
`node_modules` fixed-output derivation. These become stale whenever
`bun.lock` changes, causing Nix users to hit hash mismatch errors.

The upstream `nix-hashes.yml` CI auto-updates these, but if any of its 4
native runners fail, hashes go stale silently. Fork users and local
developers have no easy way to fix hashes.

## Solution

Add a local hash auto-extraction tool:

### `nix run .#update-hashes`
One-command fix for all platforms:

```bash
nix run .#update-hashes              # update current platform
nix run .#update-hashes -- --check   # CI: verify hashes are current
```

### How it works
1. Builds `node_modules_updater` with `lib.fakeHash`
2. Extracts the correct hash from the build error (`got: sha256-...`)
3. Updates `nix/hashes.json` for the current platform

## Changes

| File | Change |
|------|--------|
| `nix/scripts/update-hashes.py` | New: hash extraction script |
| `flake.nix` | Added `apps.update-hashes` |
| `nix/node_modules.nix` | Documentation comment |
| `nix/hashes.json` | Updated `x86_64-linux` hash |

## Testing

- [x] `nix build .#deepagent-code` — clean build
- [x] `nix run .#update-hashes` — correct hash extraction
- [x] `nix run .#update-hashes -- --check` — CI mode passes
### Issue for this PR

Closes #

### Type of change

- [ ] Bug fix
- [ ] New feature
- [ ] Refactor / code improvement
- [ ] Documentation

### What does this PR do?

Please provide a description of the issue, the changes you made to fix
it, and why they work. It is expected that you understand why your
changes work and if you do not understand why at least say as much so a
maintainer knows how much to value the PR.

**If you paste a large clearly AI generated description here your PR may
be IGNORED or CLOSED!**

### How did you verify your code works?

### Screenshots / recordings

_If this is a UI change, please include a screenshot or recording._

### Checklist

- [ ] I have tested my changes locally
- [ ] I have not included unrelated changes in this PR

_If you do not follow this template your PR will be automatically
rejected._

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
## Summary

Fixes the "[object Object] 失败" toast when clicking **转为 Goal** (start
goal loop). This fix was authored after #56 was squash-merged, so it did
not make it into that PR — re-submitting it cleanly on top of the latest
`dev`.

Two root causes:

1. **Backend crash (HTTP 500).** `goal-manager` start/resume did
`provider.defaultModel().pipe(Effect.orDie)`. When the workspace has no
*config-default* model — even though the user has a model selected for
the session (e.g. GLM-5.2) — this threw `ProviderNoProvidersError`, and
`.orDie` turned it into a defect → 500 `UnknownError`. Fix:
`resolveGoalModel()` prefers the **session's** selected model
(`session.model`), falls back to the config default, and if neither
resolves returns a clean `InvalidGoalError` (400, readable reason)
instead of dying. `resume()` degrades to "not resumed" rather than
crashing. This also makes the goal run on the session's model, like
normal turns.

2. **Frontend rendering ("[object Object]").** The raw SDK client throws
the parsed error *body* (a plain object, not an `Error`) on non-2xx, so
`String(err)` produced "[object Object]". `GoalStartButton` now extracts
the message via an `errorMessage()` helper (`{message}` for 400,
`{data:{message}}` for 500).

## Verification
- deepagent-code + app typecheck exit 0; goal + agent suites pass.
- Live: `goal/start` with no model now returns a clean 400 `"no model is
configured…"` instead of a 500 `[object Object]`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: deepagent-ai <jamessmithm539@gmail.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
@deepagent-ai
deepagent-ai merged commit 94a5fc1 into main Jul 10, 2026
8 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants