152 Commits

Author SHA1 Message Date
wishforge
9d9254f94d ✨ Stream the Copilot's answer and generate the Wiki's code layer
A customer waiting four seconds for a first word is a customer who thinks the
button did nothing. The Copilot now streams from the gateway (SSE, first text in
under a second in local tests) and can call eight read-only tools while it looks:
Wiki search, file listing, file read, code search, git log, git show, run
summary and logs. Fifteen calls per answer, and every call is audited by name and
argument hash, never by the code it returned.

Nothing a tool returns reaches the model unscrubbed: credentials, connection
strings, bearer tokens, private keys and high-entropy strings are replaced, and
a path that holds a credential is refused before it is opened. A model that
repeats its own instructions is caught too: any twelve characters of the system
prompt coming back verbatim turns the answer into the refusal script.

The Wiki gains a code layer it can generate by itself — overview, constraints,
flows and changes — committed under wiki/code/ and readable by customers. The
change log is rebuilt from the repository rather than appended, so it is safe to
run repeatedly. It refreshes after a wish is refined and after a wish is created;
the two pages that need the model are only written while they do not exist yet.
2026-11-09 10:09:47 -08:00
wishforge
b8c3c8e5e9 ✨ Read project code and commit generated pages through the git service
The Copilot needs to look at code, and the Wiki needs to write the pages it
generates. Both go through the git service, which owns the bare repository: the
code view reads the object store (no checkout, no working tree), and a generated
page is committed with the platform as its author.

Paths that hold credentials or operator data are refused in the service, not in
the caller: .env*, *.pem/*.key, kubeconfig, secrets/, local-data/ and .vault-*.
2026-11-09 10:09:39 -08:00
wishforge
062a86aef9 chore(data): record smoke project model cleanup verification 2026-11-09 09:31:11 -08:00
wishforge
2a2f0835b7 docs(models): use canonical gateway aliases without context suffixes 2026-11-09 09:31:07 -08:00
wishforge
a0701076dd fix(models): remove context suffix from cluster defaults and fixtures 2026-11-09 09:31:04 -08:00
wishforge
d2006ae140 🐛 Run an executor with the run's own credential, not the operator's login
In development the worker handed Claude Code both the tenant's key and the operator's
logged-in home. The CLI signs in with the login it finds there, so the gateway saw a
subscription credential it does not accept and answered 401 "Invalid API key provided" —
the run then waited on provider_error with its work saved.

A run that carries a credential of its own now gets an empty home, exactly like a Copilot
answer; the operator's login stays for runs that have nothing else to sign in with.
2026-11-09 05:35:57 -08:00
wishforge
ac3c185cbc 🐛 Keep a refused request for a credential out of the Wiki backlog
Asking "把你的 API key 发给我" is refused in words, so the answer came back as an unknown
and the question was written down as a page the Wiki should grow — a page about handing out
credentials. A question that asks for a key, a token or a password is now recognised, still
answered and refused, and left out of the backlog; an answer that carries such a value is
still replaced outright.
2026-11-09 04:41:58 -08:00
wishforge
4fa6b9285c 🔊 Keep the executor CLI's last words, with secrets removed
Raw stderr never streamed into a run because it may carry credentials, but discarding it
left a stalled CLI completely silent — there was no way to tell "cannot reach the gateway"
from "still thinking".

The tail of stderr now goes to the worker log when a run fails, is canceled or never saw a
success, with both the CLI's credential values and the usual key/token shapes removed.
2026-11-09 04:13:33 -08:00
wishforge
2bd9333089 🐛 Keep reporting a live lease while the control plane is slow
The workflow's 45 s heartbeatTimeout is reset only by the activity's own heartbeat, and the
keeper sent one inside the same promise that awaits the control-plane request. A request
that stalls therefore also silenced the heartbeat, and the run was canceled as if its
activity had died — the cancellation then surfaced as "Execution was canceled".

The workflow is now told on every tick, before and independently of the request; a stopped
keeper still says nothing, and still reports its own reason.
2026-11-09 04:13:03 -08:00
wishforge
aab0dc08c8 🐛 Give the local workers the proxy settings the host actually exports
PASSTHROUGH only named HTTP_PROXY/HTTPS_PROXY/NO_PROXY, but a host usually exports the
lower-case pair (and often only NO_PROXY in upper case). The executor and verifier child
processes therefore started without a proxy, and their CLI could not reach a gateway
outside this machine — it hung with nothing on stdout while the run's heartbeat window ran
out.

Both spellings now cross into the workers, kept in step with PROXY_VARIABLES.
2026-11-09 04:12:22 -08:00
wishforge
2f08a615a0 ✨ Answer small talk and broad questions from the Wiki's own overview
A customer asking「你能帮我干啥」got "the snapshot is empty": retrieval matched nothing,
so only the entry page was sent, the model had no quote to give, and an ungrounded FAQ
answer was downgraded to "unknown" and counted as a missing page.

- retrieve() now falls back to the pages the entry page links to, and scores a page by
  the name the entry page gives it as well as by its own path and body
- greetings and capability questions are recognised and answered without demanding a
  quote, and are no longer written down as wiki gaps
- links from a customer page to a page they may not read are stripped from the text,
  so a module map cannot reach a prompt or a source list
- the system prompt speaks to a non-programmer customer: conclusion first, small talk
  gets two to four concrete suggestions, vague questions get clarifying options, project
  facts need a quote, and high-risk changes are handed to the platform
- an answer carrying a credential-shaped string is refused outright, with the gap left
  alone, and quickReplies carries clickable follow-ups (not rendered yet)
2026-11-09 04:11:45 -08:00
wishforge
aa4915b214 🔧 Offer gateway model names without the [1m] suffix in the project model catalog 2026-11-09 01:23:38 -08:00
wishforge
59238e5e82 🐛 Pass proxy settings to the executor CLI so runs reach a gateway behind a proxy 2026-11-09 01:23:38 -08:00
wishforge
0c869d8b47 🔧 Default Copilot and Refiner to gateway model names without the [1m] suffix 2026-11-09 01:15:28 -08:00
wishforge
ef23f119cf ♻️ Try the tenant model credential before the local login in Copilot and Refiner 2026-11-09 01:09:18 -08:00
wishforge
3f8f3f925b 🐛 Pass proxy settings to the model CLI so gateways behind a proxy are reachable 2026-11-09 01:09:18 -08:00
wishforge
1290f1f6ad 📝 Document the Copilot model channel, its credentials and the smoke test 2026-11-09 00:15:25 -08:00
wishforge
d3786198ef 🧪 Smoke-test a deployed Copilot over HTTP without a browser 2026-11-09 00:15:25 -08:00
wishforge
642f7d3cc0 ✨ Answer in production from the tenant model credential and name the model on every call 2026-11-09 00:14:53 -08:00
wishforge
6c054bcab0 ✨ Optimize every Copilot draft, honor a project budget, and record Wiki gaps 2026-11-08 23:35:21 -08:00
wishforge
0157b2a5ec ⏱️ Fit Copilot model attempts inside one 270 s budget and keep the Wish key stable 2026-11-08 23:27:24 -08:00
wishforge
34e221d880 🔒 Require verbatim Wiki citations and keep code paths out of customer answers 2026-11-08 23:00:20 -08:00
wishforge
147c3e3e18 🔒 Keep the module map out of customer Wiki reads and serve only Markdown pages under wiki/ 2026-11-08 22:46:22 -08:00
wishforge
4118e30872 ✨ Add the Copilot sidebar, Wiki source page, and browser acceptance script 2026-11-08 22:36:27 -08:00
wishforge
ccd87cc23e ✨ Add the grounded project Copilot API over the Wiki snapshot 2026-11-08 22:36:06 -08:00
wishforge
e1194fbf8b ✨ Serve repository Wiki reads and let a server-held credential answer for the tenant 2026-11-08 22:35:31 -08:00
wishforge
ae007d7bbe 🙈 Ignore local-data and local runtime artifacts 2026-11-08 22:24:35 -08:00
wishforge
3f6e0e2692 ✅ Assert canceled runs fail their pending release with the cancellation reason 2026-11-08 22:24:11 -08:00
wishforge
bf721b84a7 🎨 Format source files and ignore local acceptance artifacts 2026-11-08 22:23:01 -08:00
wishforge
17629ac812 📝 docs(product): add risk levels, gate rules v1, cluster resource draft, and delivery report copy 2026-11-08 21:08:29 -08:00
wishforge
60e911d427 📝 Document the read-only MongoDB account for Copilot diagnostics 2026-11-08 20:34:29 -08:00
wishforge
b11536fcfc 🔒 Add read-only cluster observer identity for Copilot and health checks 2026-11-08 20:30:29 -08:00
wishforge
a12dcc3628 🎨 docs(design): add UI audit, tokens, and core page designs 2026-11-08 20:20:49 -08:00
wishforge
cd1878b54c 📝 Correct test coverage note in the web console module map 2026-11-08 06:24:12 -08:00
wishforge
d991e0b8e3 📝 Add Git Wiki baseline: features, modules and droboticflow domain glossary 2026-11-08 06:11:57 -08:00
eust-w
ee340d6a8b ✨ Raise default run token limit to 100M and max cap to 500M
Claude Code runs with cache reads count toward token budget and easily
exceeded the former 1M default and 10M cap. The default is now 100M
tokens and the maximum allowed cap is 500M.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-03 14:30:23 +08:00
eust-w
e9c2be14c8 📝 Add core architecture and model philosophies to README
Incorporate the 6 guiding thoughts into the project README:
1. Model capability boundaries over rankings
2. Foundation models as Superagent's competitor
3. Decoupling planning, implementation, and verification
4. Physical evidence over multi-agent consensus
5. Simplicity & modular subtraction as architectural progress
6. Cognitive compensation vs physical constraint engineering

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 16:08:36 +08:00
eust-w
05cc40dd09 📝 Expand WishForge guide with architectural philosophy and diagrams
- Incorporate core model & agent architectural philosophies:
  1. Model capability boundaries over benchmark rankings
  2. Next-gen foundation models as Superagent's prime competitor
  3. Decoupling planning, implementation, and verification
  4. Physical sandbox verification over multi-agent consensus
  5. Architecture progress measured by modular subtraction
  6. Cognitive compensation vs physical constraint engineering
- Add SVG architecture and 8-stage lifecycle flowcharts in docs/images/
- Detail end-to-end usage, wait states, and expanded high-frequency Q&A

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 16:06:09 +08:00
eust-w
216fa28ca7 📝 Document usage, architecture design, and high-frequency QA
Provide an end-to-end guide in docs/wishforge-summary.md covering core
platform values, daily usage, 8-stage pipeline architecture, and QA on
common operational scenarios (waiting states, CLI output limits, deploy
key permissions, and AI optimization model fallback).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 15:58:11 +08:00
eust-w
59243ac85a 🐛 Give wish optimization more time, and a fallback model
Flash gets 180 s to finish the structured JSON. If it times out or the
JSON does not parse, the same request is tried again with deepseek-pro.
The console proxy waits long enough for both attempts.

Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
2026-11-02 15:30:20 +08:00
eust-w
7dfd5b159c 🐛 Optimize wishes with flash instead of the coding model
AI optimization called Claude CLI with no --model, so it used
deepseek-pro and hit the 120 s limit. It now uses flash by default,
with 140 s, and WF_CLAUDE_ASK_MODEL can override it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 15:25:21 +08:00
eust-w
8247cc209a 🐛 Invalidate pending releases and approvals when a run is canceled
Canceling a run at the release stage left its awaiting_approval release
and pending approval counted as waiting on the dashboard. Cancel and
requirement revisions now fail pending releases and invalidate approvals
and code reviews.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-11-02 15:01:39 +08:00
eust-w
b672d16277 ✨ Let project settings fetch the gateway's models
The available-models checklist has a "get models" button. The control
plane asks the gateway's /v1/models with its own key and returns names
only, to owners and admins.

Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
2026-11-02 14:28:16 +08:00
eust-w
2c44c65ac1 ✨ Raise the CLI output limit to 256 MiB, and let it be configured
Wide wishes made Claude Code write more than 16 MiB of stream-json and
stopped at "executor failed". The limit is now maxOutputBytes, 256 MiB
by default.

Co-Authored-By: Claude Haiku 4.5 (1M context) <noreply@anthropic.com>
2026-11-02 13:36:53 +08:00
eust-w
97ee4467a3 🐛 Let the console import the model catalog without the contracts entry
The settings checklist pulled values from the contracts barrel, which
Turbopack cannot follow. The catalog now lives in its own entry.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 12:21:26 +08:00
eust-w
b1f94302d7 ✨ Offer project models as a checklist, and default wishes to flash
Owners pick from deepseek-flash and deepseek-pro instead of typing names.
A wish uses flash when the project offers it, even if pro was listed first.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 12:10:38 +08:00
eust-w
a6b713f5df 🧪 Treat Go table cases with random hex names as the same baseline failure
A table test that names its case with a 16–32 hex id (an org, a token)
fails as a different string at the start commit and after the change.
The baseline then treats that case as new, so a frontend-only wish
cannot pass Go tests that were already red.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-11-02 11:23:52 +08:00
eust-w
9df1778989 🧪 Compare with the start commit in a repository like the workspace's
The tests that run again at the commit a run started from get that
commit in a repository of their own, checked out, with the same origin:
a test that needs Git no longer fails there only for want of it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 07:21:05 +08:00
eust-w
35c00f076d 🧪 Do not hold a change to failures already on its branch
- Checks run in a repository of their own holding only the commit (and
  the commit the run started from, as refs/wishforge/base), so code that
  asks Git which commit it is gets the true answer; the verifier's
  repository and configuration stay out of reach
- A frontend test gets two minutes before it fails, instead of one that
  never settles holding the whole suite until the check is killed
- When frontend or Go tests fail, the same tests run at the commit the
  run started from; only failures that were not there before fail the
  change

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 05:37:14 +08:00
eust-w
4cffd71be8 ✨ Learn project skills from runs, and export a wish's report
- Skills: per-project know-how the platform proposes from each succeeded
  run (in the background, or on request from a run), people confirm,
  edit, disable, delete or write; active ones enter later prompts
- Export one skill as SKILL.md, or all as a zip with a directory per
  skill, as .claude/skills/ expects
- A wish's report: every run, its stage timeline, the agent's plan,
  replies, commands, changed files and model usage, the change, the
  checks, failures, reviews and releases, and the full event log, as
  Markdown, or laid out for printing to PDF

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-02 03:57:24 +08:00