Brings the branch up to the current base (executor settings, project
skills, Chinese run messages, cloud IDE removal, wish attachments) and
resolves the ten conflicted files, keeping both sides:
- wish-refiner: the tenant's executor settings pick the models first,
then the Copilot model setting; the tenant credential still goes
before the operator's login
- worker providers: executor settings apply, and a run with its own
credential still gets an empty home
- main.ts: Copilot screenshot uploads and wish attachments each keep
their own body limit
- contracts, http, web types: default budget and skill auto-activation,
Copilot and attachment entity kinds, ./text and ./attachments exports
- globals.css: Copilot styles and attachment styles, one after the other
- tests: the canceled-release reason is Chinese; the refiner's default
models have no [1m] suffix, as this branch names them
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Add the read-only Fanyu diagnostic client (cluster_overview, task_diagnosis, request_trace, egress) with private file-based key loading, mutual CA verification, a 40 req/min token bucket, short TTL caches, and strict separation between unavailable telemetry and healthy state.
Feed the last ten conversation turns into streaming answers, verify every reported fact against the server-side evidence ledger before persisting a diagnosis, withhold model thinking frames from the client stream, classify stream error codes, and cover secret isolation and diagnosis downgrades with dedicated unit tests.
Running the local console with WF_WEB_SERVE_MODE=production starts Next.js with NODE_ENV=production, which previously disabled development sign-in even when WF_DEPLOYMENT_MODE=development was explicitly set. Keep the deployment-mode gate explicit, forward the console's auth and API variables from scripts/dev.mjs, narrow the Temporal worker grace-time literal for TypeScript, and ignore local AGENTS.md instructions.
An answer travels in a submit_answer tool call, and the model writes its
line breaks there as the two characters \n. The console draws exactly what
it is given, so a customer read \n\n where a paragraph break belonged.
The layout escapes are now unfolded once, where model text enters: the
answer, the Wish draft, the quick replies and the excerpts all pass one
door. Answers stored before this change are unfolded as they are drawn, so
the history reads correctly without touching the database.
The panel was a form that submitted a question and printed an answer. It is now
a conversation: a bubble per message, a picture strip, a folded reasoning line,
a progress sentence in the customer's words, and cards that ask for confirmation
instead of repeating the answer.
The input box is the part that was missing. A paperclip opens the file picker,
the whole box accepts a dropped file, and a pasted screenshot becomes an
attachment too; each one shows as a thumbnail with a remove button, and the send
button waits until nothing is still uploading. Enter sends, Shift+Enter breaks
the line, and the box grows to five lines.
The panel also has a page of its own at /copilot, and the docked panel steps
aside there so the same conversation is never rendered twice.
Colour, spacing and radii follow one small set of tokens (teal #0f766e, 12px
cards and bubbles, 8px buttons) so the panel reads as part of the console.
A customer can now show the Copilot what went wrong instead of describing it.
The picture is uploaded before the question, kept in the artifact bucket under
the tenant, project and session that own it, and read back for that person only.
The type is decided by the bytes, never by the request: anything that is not a
PNG, JPEG or WebP is refused, as is anything over 4 MiB. Only the question's own
attachment ids are accepted, at most three, and the upload body is the picture
itself so a 4 MiB image never becomes a 5 MiB JSON string.
A question with a picture is answered from what the picture shows. It is not
measured against the pages of the project — no page could ever quote a
screenshot — and it does not become a gap in what the project's docs cover.
Also fixes the Copilot tool stub in the security test, which had stopped
satisfying the project-scoped code reader.
Two copies of the same words could appear on screen, and both came from the
panel rather than from the model.
The card that asks the customer to confirm a drafted wish fell back to the
answer text whenever the Copilot wrote no separate goal, then printed it under
「要做的改动」 — the answer above the card already said it. The card now shows
that section only when the goal really is a different sentence.
The streamed answer also stayed on screen after it ended, next to the stored
message it had just become. It is now dropped as soon as the transcript holds
the same text, and the stored session is read back before the stream is cleared.
The generated overview listed every file, including wiki/modules/, which is the
platform's own map of the codebase and never shown to a customer. Naming it in a
customer page makes the page a table of contents for pages they cannot open, so
the module map is filtered from the material and from the finished page.
The code client sent its arguments without the tenant and project, so every call was
refused by the git service and the Copilot answered that it could not look. It now
binds both when it is created for one project, and a missing path or commit comes
back as a sentence the model can act on instead of a failed tool call.
The leak check also stopped treating a shared phrase as a leak: a twenty-character
run of the system prompt is evidence, "变成一次具体、能落地的改动" is the Copilot
describing itself to a customer.
Ten ways a customer, a page or a log line may try to make the Copilot hand over
what it must not: a key, the connection string, the system prompt, a kubeconfig.
Where a mock model leaks, the platform still refuses; where it obeys an
injected instruction, the prompt already says a document is data, not a command.
The tool layer is tested separately: an environment file is refused even when
the model names it, and logs outside the project's namespaces are refused.
Screenshot acceptance is prepared, not faked: the fixtures directory explains
what to put there, and the test runs only when an operator does, against the
real gateway.
Model names stored with a context suffix are rewritten by a dry-run-by-default
script (the local database currently has no projects), and the console calls
/providers what it is: 模型连接.
The drawer reads a stream instead of polling every 1.5 s. A thinking block folds
away, a short progress sentence says what is being looked at in the customer's
words, the answer types itself with a cursor, and stopping is a button rather
than closing the drawer.
The wish draft becomes one card: what will change, how it will be checked,
confirm. The two text areas and the eight-character minimum are gone; the card
already holds the Copilot's phrasing, and the customer's job is to say yes.
The drawer is wider (520px) and the composer grows with what is typed: Enter
sends, Shift+Enter breaks the line.
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.
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-*.
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.
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.
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.
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.
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.
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)
`npm run format:check` flagged infra/k8s/cluster-poc/platform.yaml,
tests/model-catalog.test.ts, tests/run-budget.test.ts and
tests/wish-refiner.test.ts (prettier reflow only). The control-hardening
test still expected the release failure reason the broker used to write
before canceling a run began failing its own releases directly — it is now
「运行已取消」, matching run-lifecycle.test.ts.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Wishes can now carry screenshots, designs, logs and documents: upload,
drag-and-drop, or paste into the goal/criteria boxes. The files are stored
as attachment records, written into the executor's workspace under a
Git-ignored directory, and pointed out to the agent in its prompt. People
fetch them back one at a time (images inline, everything else downloads)
with nosniff and a sandbox CSP.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>