@volter/supercode-frontend-vscode 0.1.57 → 0.1.60

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/NOTICE.md CHANGED
@@ -16,4 +16,4 @@ The generated attachment client under `vendor/supercode-frontend/` is this repos
16
16
  Volter Harness-authored integration and presentation code is identified by this package's source history
17
17
  and remains under the repository's declared `MIT OR Apache-2.0` license.
18
18
 
19
- The bundled provider/harness SVG marks in media/ are derived from this repository's sdk/ui/src/logo.jsx. Brand marks identify the active provider; they do not imply affiliation.
19
+ The provider SVG marks in media/ are written by the build (scripts/sync-marks.mjs) from this repository's one mark catalogue, sdk/ui/logo-data.mjs. Brand marks identify the active provider; they do not imply affiliation.
package/README.md CHANGED
@@ -18,8 +18,14 @@ A click starts one install/sign-in operation for that agent. The host returns
18
18
  its exact structured terminal launch through the authenticated `/setup` door;
19
19
  a missing agent installs from its vendor package, then the same click continues
20
20
  to login. The frontend never interprets repair prose as a command.
21
+ Installation output stays in its own native task terminal after the command
22
+ ends, including failure. Retrying uses a new terminal; cancelling terminates
23
+ only that click's active installation. Login keeps its native sign-in terminal.
21
24
 
22
25
  The host's `/state` supplies `setup: {ready, actions, agents, reason, cwd}`.
26
+ After a native login exits, setup allows two inventory refreshes begun after
27
+ that exit before reporting failure. Inventory-confirmed sign-in remains the
28
+ success condition, including when the process exits with code zero.
23
29
  Each agent supplies `{harness, name, installed, signedIn, account}`; an unknown
24
30
  account is `null`. Each action supplies `{kind, harness, name, command}` with
25
31
  `kind` equal to `install` or `login`. The host revalidates the chosen action
@@ -53,13 +59,23 @@ in the disabled composer. Stock hosts retain native Markdown links. The
53
59
  editor's renderer/build is a separate integration; the frontend package alone
54
60
  does not claim those richer controls are installed in every host. A successful
55
61
  explicit sign-in publishes **Signed in with ChatGPT** or **Signed in with
56
- Claude** above the newly opened Chat.
62
+ Claude** above the newly opened Chat, or **Signed in with <account>** when the
63
+ host names the account that signs the agent in (a setup agent's `account`).
57
64
 
58
65
  Setup creates no transcript turns. The guarded readiness reveal preserves a
59
66
  newer draft or selection; a welcome-owned empty draft can give way to the first
60
67
  ready conversation. Hosts without the guarded reveal command report the
61
68
  limitation. Passive inventory polling retries a transient handoff failure until
62
69
  attachment and reveal both succeed for the same conversation.
70
+ When the native guard cancels an automatic reveal, the same connected
71
+ conversation/focus waits instead of repeating that navigation every three seconds.
72
+ A changed focus, conversation, connection or live-turn state permits another
73
+ attempt; the explicit `supercode.frontend.refreshSetup` command retries too.
74
+ Cancellation leaves the handoff incomplete. Other refresh failures keep their
75
+ warning and retry behavior, labeled as Chat setup. Inspect-mode runtime status
76
+ includes the focused resource/generation and the last canceled reveal's basis.
77
+ [Source and package evidence](../../docs/evidence/chat-canceled-reveal-2026-10-10.md)
78
+ leaves the native restored-composer input and real Windows reopen unresolved.
63
79
 
64
80
  A bundling host can expose a private lifecycle endpoint through
65
81
  `SUPERCODE_FRONTEND_HOST_URL` and `SUPERCODE_FRONTEND_HOST_CREDENTIAL_FILE`.
@@ -72,22 +88,33 @@ The contract is in `src/host-controls.ts`.
72
88
 
73
89
  With that host, **New Session** / **Chat: New Chat: Choose Agent** lists all
74
90
  coding agents, including Codex and Claude Code when missing or signed out.
75
- Their rows say **Signed in with ChatGPT/Claude** or **Sign in with
76
- ChatGPT/Claude…**. A sign-in row starts the same install/login operation as the
91
+ Their rows say **Signed in with ChatGPT/Claude** (**Signed in with <account>**
92
+ when the host names one) or **Sign in with ChatGPT/Claude…**. A sign-in row starts the same install/login operation as the
77
93
  welcome. Selecting a ready agent leaves model and reasoning at its defaults;
78
94
  the separate **<agent>: model and reasoning…** rows retain explicit settings.
79
95
  The picker is titled **New chat**, with **Choose your coding agent** as its
80
96
  placeholder. Cancelling it starts no backend conversation. Initial automatic
81
97
  agent selection and last-used selection remain the host's responsibility.
82
98
 
83
- The native blank chat opens before the picker appears. First send waits for the
84
- choice and the host's new connection through Code-OSS's session-creation handler;
99
+ The native blank chat opens before the picker appears. Sending before the choice
100
+ finishes shows **Choose your coding agent before sending** and leaves the draft
101
+ available. Choose the agent, then send again. A cancelled choice in the current
102
+ window also refuses a send; it starts no backend. After selection, first send
103
+ waits for the host's new connection through Code-OSS's session-creation handler;
85
104
  the composer keeps the draft until the request is accepted. There is no later
86
105
  conversation swap that can hide a message sent while the agent starts. This follows
87
106
  the pinned workbench's [first-send materialization](https://github.com/volter-ai/code-oss/blob/f16dc165c0dffe701a7bbf59aefb1c662b206cee/src/vs/workbench/contrib/chat/common/chatService/chatServiceImpl.ts#L1272)
88
107
  and [draft acceptance](https://github.com/volter-ai/code-oss/blob/f16dc165c0dffe701a7bbf59aefb1c662b206cee/src/vs/workbench/contrib/chat/browser/widget/chatWidget.ts#L3493)
89
108
  paths. A failed startup leaves the draft available to retry.
90
109
 
110
+ The paired editor host also explains Enter when native session options are
111
+ invalid and the submit keybinding cannot reach the extension. Its explanation
112
+ uses the read-only `supercode.frontend.sendRefusal` command when available;
113
+ older frontends receive the host's agent/model explanation. The extension alone
114
+ cannot receive a keypress rejected by a host's keybinding precondition.
115
+ [Source and qualification](../../docs/evidence/chat-unselected-send-2026-10-10.md)
116
+ record the genuine published 0.1.58 source and the unperformed Windows reading.
117
+
91
118
  New Chat highlights the agent from the focused conversation (or an already
92
119
  chosen draft) before opening the blank chat. With no matching choice it keeps
93
120
  the host/native default. This is a source correction with
@@ -158,6 +185,33 @@ re-joined after a page reload (the conversation's active response) is answered t
158
185
  harnesses show **Harness permissions**. Previously answered requests cannot affect another
159
186
  connection. Native command-button fallback limitations are documented below.
160
187
 
188
+ A lifecycle host can also select a project **YOLO** runtime policy. Model Editor reads
189
+ `"volter.chat.runtimePolicy": "yolo"` from the project's `.vscode/settings.json`;
190
+ user-wide values do not enable it. The next native Claude Code or Codex start or
191
+ resume runs without asking anyone, including configured model and inference
192
+ launches: Claude Code with its bypass flag; Codex with `approvalPolicy:
193
+ "on-request"`, `sandbox: "danger-full-access"` and a thread config that hands
194
+ every request to Codex's auto-reviewer (`approvals_reviewer = "auto_review"`)
195
+ under an `auto_review.policy` that approves it, on thread start and resume.
196
+ Never `never`, under which Codex refuses outright any command its own check
197
+ flags as dangerous. A service must advertise `yolo_policy: true` before
198
+ the host starts it this way. Other harnesses and existing endpoint attachments
199
+ cannot acquire this policy from the project setting.
200
+
201
+ The host records `ManagedChatSession.runtimePolicy` from the opened runtime.
202
+ The permission group shows **YOLO** for that runtime and does not save the item
203
+ as an approval choice. A saved Ask choice cannot restore prompts in a process
204
+ already launched under YOLO (Claude Code's bypass flag, Codex's auto-reviewer). Changing the workspace setting to `default`
205
+ applies on its next start or resume. `HostState.newChatRuntimePolicy` describes
206
+ the next runtime; it does not relabel a running conversation. Default-policy
207
+ chats retain their Ask and Auto approve choices. Auto approve also answers
208
+ supported requests raised outside this window's turns, through the same frontend
209
+ response door and with one answered-request set per connection.
210
+
211
+ The [source and build evidence](../../docs/evidence/chat-project-yolo-2026-10-10.md)
212
+ records successful compilation and the built service's capability replies. Real
213
+ build-agent approval behavior and the embedded workbench remain unmeasured.
214
+
161
215
  Text files and selected ranges use native Add Context and attachment chips. Their current
162
216
  editor contents are serialized as explicitly labeled user-supplied context through the existing
163
217
  prompt protocol. Binary text, more than 256 KiB per attachment, or more than 1 MiB total is
@@ -220,8 +274,42 @@ Three paths, in precedence order.
220
274
  The generated client opens SSE **before** taking the attachment snapshot, so no event falls between
221
275
  history and live. Dropping or detaching never closes the runtime.
222
276
 
277
+ After that snapshot arrives, the connection enters the session picker and follows
278
+ events while an interactive attachment acquires control. `connect()` still waits
279
+ for the control attempt before returning; early actions share that attempt.
280
+ Input arriving in a rejoined response, or after a submitted turn's `turn_started`,
281
+ appears as **Additional input** while the response runs. Reopening reads the
282
+ runtime's user turns from history. The initial submitted prompt already has a
283
+ native request turn. [Source and package evidence](../../docs/evidence/chat-attach-live-input-2026-10-10.md)
284
+ records the remaining native timing and display qualification.
285
+
286
+ When a snapshot supplies `pending_requests`, the attachment replaces its local
287
+ request set at the exact snapshot capture boundary, then merges later retained
288
+ request, resolution and turn events before committing state and cursor. An empty
289
+ snapshot still clears old asks, while missing later events refuse attachment. Older runtimes retain
290
+ the existing replay-based behavior. Actual stream and recovery failures are
291
+ retained until a fresh attachment succeeds. They end the waiting Chat view with
292
+ the error while preserving the native turn state; reopening also shows the
293
+ failure in Chat. A failed initial attachment marks its saved session row failed.
294
+ Approval and interrupt RPCs remain available under their existing authority.
295
+ Fresh snapshots also restore retained `history_events` before replay at the
296
+ runtime's cursor. Their original sequences and payloads are preserved. Recovered
297
+ unseen events reach existing response listeners, and an authoritative idle
298
+ snapshot releases a restored response even when its terminal event is no longer
299
+ retained. Chat states when older events are outside the bounded display window.
300
+ An unavailable saved runtime returns an error in Chat instead of a blank draft.
301
+ These are implemented source paths; real editor recovery and pending approval
302
+ interaction remain unqualified.
303
+
223
304
  ## API proposals, and what it does without them
224
305
 
306
+ Saved transcript text parts (`text`, `input_text`, `output_text`) use the same
307
+ bounded renderer as live payloads. Structured values display their JSON contents;
308
+ the frontend does not coerce them into JavaScript's object label.
309
+ [Published 0.1.35/0.1.42 comparison and source correction](../../docs/evidence/chat-structured-transcript-text-2026-10-09.md)
310
+ record this history path. The original Windows approval-row report remains
311
+ unattributed, and native approval behavior is separate.
312
+
225
313
  The extension asks for five proposals. A host grants them through
226
314
  `product.json#extensionEnabledApiProposals` (a Code-OSS derivative that bundles this extension) or
227
315
  `--enable-proposed-api volter-ai-dev.supercode-frontend-vscode`. **Stock VS Code grants none, and
@@ -269,20 +357,20 @@ it needs and the fallback it degrades to. Each arm names the producer it reads.
269
357
  | Event kind | Producer | Rendered as |
270
358
  |---|---|---|
271
359
  | `text_delta` | `crates/runtime/src/event.rs` `AgentEvent::TextDelta` | `response.markdown` (streamed) |
272
- | `user_message` | `crates/harness/src/server.rs` `submit_claimed` | the request turn in history; dropped live (VS Code already shows it) |
360
+ | `user_message` | `sdk/interchange/agent-runtime-host.mjs` accepted-turn projection | the request turn in history; dropped live (VS Code already shows it) |
273
361
  | `turn_started` / `turn_completed` / `turn_succeeded` | `submit_claimed`; `AgentEvent::TurnCompleted` | lifecycle only — the handler resolves, nothing renders |
274
362
  | `turn_interrupted` | `submit_claimed` | an italic notice |
275
363
  | `turn_failed` | `submit_claimed` | `ChatResponseWarningPart` → blockquote |
276
364
  | `tool_call_started` / `tool_call_completed` | `AgentEvent::ToolCallStarted` / `ToolCallCompleted` | one `ChatToolInvocationPart` per call, updated in place with its result (`enablePartialUpdate`) → a progress line plus a labeled Markdown result |
277
365
  | `diff_updated` | `crates/codex-frontend/src/codex_app_server_v0_144.rs` (stock Codex `turn/diff/updated`) | `codeblockUri` + a fenced `diff` block, plus one stable `reference` per file the diff names → the fenced block alone |
278
- | `request` | `crates/harness/src/server.rs` `FrontendRequestBroker::publish` | a titled markdown block plus one **command button per answer** — stable API, no proposal |
366
+ | `request` | `sdk/interchange/frontend-request-bridge.mjs` request publication | a titled markdown block plus one **command button per answer** — stable API, no proposal |
279
367
  | `cache_warning` | `AgentEvent::CacheWarning` | `ChatResponseWarningPart` → blockquote |
280
368
  | `usage` | `AgentEvent::Usage` | a progress line |
281
369
  | `background_output` | `AgentEvent::BackgroundOutput` | a fenced block, saying so when the runtime stopped retaining |
282
370
  | `scheduled_prompt_started` / `_deferred` / `_completed` | declared by `frontend_descriptor`'s `display.event_kinds` | a progress line |
283
371
  | `scheduler_error` | same | `ChatResponseWarningPart` → blockquote |
284
- | `reasoning` / `thinking` | no producer in this repository; read because `crates/frontend-model/src/transcript.rs` reads them | `ChatResponseThinkingProgressPart` → blockquote |
285
- | `stream_error` / `transport_error` / `watch_error` / `runtime_disconnected` | `crates/opencode-frontend/src/server.rs`; `crates/interchange/src/watch.rs`; synthesized by a frontend (`crates/frontend-tui/src/app.rs`); `stream_error` has no producer here | `ChatResponseWarningPart` → blockquote |
372
+ | `reasoning` / `thinking` | no producer in this repository; read because `sdk/interchange/frontend-transcript.mjs` reads them | `ChatResponseThinkingProgressPart` → blockquote |
373
+ | `stream_error` / `transport_error` / `watch_error` / `runtime_disconnected` | `crates/opencode-frontend/src/server.rs`; `crates/interchange/src/watch.rs`; synthesized by a frontend (`sdk/interchange/frontend-app.mjs`); `stream_error` has no producer here | `ChatResponseWarningPart` → blockquote |
286
374
  | anything else | opaque by contract | one **bounded** markdown cell that names the kind and shows the payload — never dropped |
287
375
 
288
376
  **Why `diff_updated` is not an edit part.** Measured: the payload carries one unified-diff *string*
@@ -317,7 +405,7 @@ can also be answered by typing.
317
405
  **A hosted harness runtime.** When the runtime is one Volter Harness HOSTS — a Claude Code, Codex, pi or
318
406
  opencode session it started through `harness.v1.runtimes.start` — an approval it raises is
319
407
  **answerable from this view** for every harness whose reply this runtime can translate
320
- (`crates/harness/src/runtime/hosted.rs`): the canonical `respond {decision}` becomes that harness's
408
+ (`sdk/interchange/runtime-hosted.mjs`): the canonical `respond {decision}` becomes that harness's
321
409
  own envelope, which for Claude Code is `{behavior:'allow'}` / `{behavior:'deny', message}`. The
322
410
  request states which decisions its harness protocol actually carries, so this view offers exactly
323
411
  those and no button the runtime would refuse — Claude Code has an allow and a deny and no
@@ -350,6 +438,13 @@ needs it; a reader does not, and a collapsed block is still a reader's problem.
350
438
  one to a person, so `role: 'system'` is dropped outright and the transcript starts where the
351
439
  conversation does.
352
440
 
441
+ Saved user-role records marked `isMeta`, `isCompactSummary` or
442
+ `promptSource: system` are also context. They create no person-message bubble;
443
+ ordinary quoted text without those flags stays a person message. Claude's
444
+ unmarked, exact `[Request interrupted by user]` record becomes a short turn
445
+ interruption notice. The native transcript remains authoritative and unchanged.
446
+ [Source evidence and remaining qualification](../../docs/evidence/chat-native-notices-20261013.md).
447
+
353
448
  **Session times are real or nothing.** `frontend.v2` carries no session timestamp, and the editor's
354
449
  session list ALWAYS reads `timing.created`, rendering the epoch ("57 yrs ago") when a provider
355
450
  supplies none — there is no path in `agentSessionsViewer` that omits the time. So the item gets the
@@ -449,6 +544,13 @@ remains because the native model catalogue and participant identity are provider
449
544
 
450
545
  ### Native approval cards
451
546
 
547
+ A file approval names the harness-supplied path and shows its proposed replacement
548
+ text, new contents or patch before the answer buttons. Other requests show their
549
+ supplied arguments. Preview bounds are labelled, and a request with no supplied
550
+ preview says so. The frontend reads no workspace file to invent missing context
551
+ and never applies the preview. This source correction's real-editor qualification
552
+ is recorded separately in [the first-walk findings](../../docs/evidence/chat-first-walk-approvals-2026-10-09.md).
553
+
452
554
  A host advertising `volter.chat.inTurnApprovalCapability` version 1 presents
453
555
  actual approval requests in its native confirmation card. The original offered
454
556
  labels, order and response payloads are preserved. Clicking answers the pending
@@ -468,6 +570,13 @@ raw token. External attachments retain their exact identity across reloads.
468
570
  `supercode.frontend.status(true)` reports connection state, conversation view
469
571
  readiness/resource and rendered event cursor. View readiness follows history
470
572
  restoration and live-response subscription, rather than a socket alone.
573
+ Its `selection` follows the focused draft or saved conversation; `selectionSource`
574
+ names that source. A draft with no choice and an external attachment report no
575
+ host selection. `hostSelection` retains the host's separate runtime choice.
576
+ Conversation-creation failures show their native error immediately, before a
577
+ request handler exists, and retain the refusal for that draft's handler.
578
+ [Source and outstanding Windows qualification](../../docs/evidence/chat-start-failures-2026-10-10.md)
579
+ record this change separately from the earlier native Windows launcher fixes.
471
580
  `supercode.frontend.disconnect(connectionId)` also forgets the saved attachment.
472
581
  IDs belonging to managed conversations cannot be reused for external attachments.
473
582
  Calling `connect` without arguments retains the interactive settings flow.
@@ -30,8 +30,9 @@ export function setupPresentation(state, operations, notice) {
30
30
  const busy = phase === 'installing' || phase === 'signing-in';
31
31
  return { ...agent, provider: provider.provider, phase,
32
32
  buttonLabel: phase === 'installing' ? `Installing ${provider.name}…` : phase === 'signing-in' ? 'Finish signing in in your browser…'
33
- : phase === 'failed' ? 'Try again' : `Sign in with ${provider.provider}`,
34
- caption: busy ? 'Cancel' : phase === 'failed' ? "Sign-in didn't finish." : provider.caption,
33
+ : phase === 'failed' ? 'Try again' : phase === 'signed-in' ? `Signed in with ${agent.account || provider.provider}` : `Sign in with ${provider.provider}`,
34
+ // A row an account the host names signs in is not on a ChatGPT or Claude plan.
35
+ caption: busy ? 'Cancel' : phase === 'failed' ? "Sign-in didn't finish." : phase === 'signed-in' && agent.account ? `Runs ${provider.name} · ${agent.account}` : provider.caption,
35
36
  busy, operationId: operation?.id ?? null };
36
37
  });
37
38
  const visible = Boolean(state.setup && !state.setup.ready);