Commit Graph

61 Commits

Author SHA1 Message Date
liugaowei
374bfeca5d merge: 同步插件公共入口与主干宿主装配
合入 209212431e,保留凭证复用和现有风险守卫;Node 平台 provider 与插件共用,Skill 迁移到记录制版本 113。

Signed-off-by: liugaowei <liugaowei@xd.com>
2026-11-12 10:29:34 +08:00
liugaowei
a7f5289e84 feat(host): 接入插件公共宿主工具与客户端确认
Node Host 复用同一 helper registry、终端服务和调用授权,首次能力批准保存在既有 receipt。确认按客户端协商并绑定真实控制窗口,取消与断线不进入任务事件回放。

Signed-off-by: liugaowei <liugaowei@xd.com>
2026-11-11 18:23:29 +08:00
Dash
19327ee93f fix(web): keep interrupted input receipts out of agent events
Explicitly consume transport receipts in the browser shim. Preserve queue
projections and subsequent real model events. Extend the existing bundled
shim event test; reproduced before the fix and passed after it.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-11 19:58:15 +13:00
nana
641fe45f5c chore(discord): 合并主干并解决 Web 接口冲突
保留 main 的 Web 不支持写入边界,合入 Discord 频道占位读取接口。

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: nana <823073145@qq.com>
2026-11-10 19:12:02 +08:00
nana
b96f9288fb feat(discord): 支持白名单服务器频道与独立话题
支持个人与伙伴 Discord 连接按服务器开放文字频道,保留频道共享与 thread 独立路由、实时准入撤销、个人主人边界及伙伴显式成员准入。

审查修复旧卡片 ACK 期间切换连接与远端版本降级后保留写入基准两处竞态,移除无用转发并校正过时说明。

Refs: makecindy/cindy#9463

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: nana <823073145@qq.com>
2026-11-10 16:40:09 +08:00
Dash
75d6c79c57 fix(host): connect task controls and preserve desktop plugin behavior
Keep queued message display separate from stored payloads, share tags and search with Host, and preserve desktop plugin setup and commit semantics.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-10 14:58:19 +13:00
Dash
2c230ea21f WIP: share headless runtime services with desktop adapters
Preserve the implemented task, Device Link, plugin and model runtime work locally before integrating main. Full multi-client, automation and platform acceptance remains incomplete.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-10 11:11:41 +13:00
Dash
1176c53019 fix(host): finish account and session recovery and preserve desktop tests
Restore stored settings on both task entrypoints, synchronize explicit Host
client owners, route logout to the Host, reject mismatched startup accounts,
and invalidate local setting snapshots. Remove the unused permissive relay
prototype. Update desktop test fixtures to inject extracted runtime ports.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-08 01:16:10 +13:00
Dash
cc99b6b059 fix(host): harden browser pairing, credentials and task execution for the experimental web client
Address the open review findings on the Host web client without changing how
the desktop starts: the desktop no longer auto-discovers and joins a running
Host (only an explicit CINDY_HOST_API does).

- pairing: one-time pairing exchanges for a session cookie; the home page no
  longer issues credentials or embeds the API token; Host/Origin checks,
  session expiry closes event streams, logout clears cookies.
- credentials/accounts: provider keys are scoped by account/provider/engine and
  never fall back to the gateway key; model catalog cache is isolated per
  account; logout reuses the desktop saved-account tombstone policy; macOS and
  Windows credentials go through a private Electron safeStorage helper.
- execution: input queue claims its slot before async preparation, keeps input on
  failure, stops cleanly while preserving streamed output, pauses on save
  failure, and deleting a task stops and clears it; SDK session context is
  restored after refresh and Host restart.
- web shim: unsupported actions fail instead of reporting success.
- desktop explicit Host mode: auth, interaction and input-queue events reach the
  existing channels; shared storage cores (project aliases, recent workdirs,
  ghost snapshot worker) are used by both desktop and Host.
- CI: Host regression matrix on macOS, Windows and Linux; fix the task tag
  migration test to use the new migration config.

Out of scope here: a windowless Electron helper and custom MCP storage
extraction. Simulated OS tests do not replace real keychain/DPAPI or
three-platform validation; see docs/host/pr-9246-completion.md.

Assisted-by: Cindy (https://cindy.app)
Signed-off-by: Dash <125997726+dashhuang@users.noreply.github.com>
2026-11-08 00:31:13 +13:00
CHEYAN
4254dd3d1f fix(host,web): persist immediate auto-title placeholder for web sessions
- add /api/sessions/auto-title route and host autoTitle dep
- web shim delegates maker.autoTitle to host instead of returning false
- host writes normalized first-message title only while the row is still
  the default sentinel and broadcasts session_changed so sidebar updates
- unit test coverage: host tests 35/35 pass

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 14:55:51 +09:00
CHEYAN
07368e84a8 fix(host,web): implement deferred cross-engine switch intent
- add /api/sessions/switch-agent and /api/sessions/agent-switch-intent
- register pending intent, broadcast agentSwitchIntent, apply it on the
  next enqueue (updates agentKind/model/providerId/effort/fastMode)
- shim delegates maker.switchSessionAgent / getSessionAgentSwitchIntent
  to the host instead of silently writing session fields
- cover the route contract in server tests

Verified end-to-end: Pi -> Claude Code -> Pi switches persist and the
next message runs on the target engine (CLAUDE_OK/PI_OK); UI shows no
RPC failures or '未生效' toasts.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 14:30:01 +09:00
CHEYAN
10f189a4dd fix(web): add maker.autoTitle shim fallback
Avoid unsupported RPC noise for web host client; renderer owns
optimistic title preview, host title persistence remains desktop-owned.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 12:35:59 +09:00
CHEYAN
92c4937e51 fix(web): add notificationMarkSessionAttention shim fallback
Avoid unsupported RPC noise when web host client marks session
attention; matches existing clearSessionAttention no-op handling.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 12:08:00 +09:00
CHEYAN
496838513e fix(web,host): implement maker.switchSessionAgent in web shim and device-link
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 11:31:36 +09:00
CHEYAN
086c37d410 fix(host): enable real-time streaming push to device-link and fix persistId
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 10:04:43 +09:00
CHEYAN
c6f0b623f4 fix(host,web): support session delete and title on create for web client
- add /api/sessions/delete route, deleteSession dep, and session_changed
  deleted event so web client can delete sessions (D5)
- wire localDb.sessions.delete in shim
- allow and apply title field in host session create (used by web audit
  and UI flows)

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 09:17:22 +09:00
CHEYAN
2d65b465ce fix(web): add shim fallbacks for settings tab auxiliary channels
Cover local themes, Work Louder/xbox probes, relay, workspace/projects
root, worktree recycle, auto-update and log upload settings reads seen
while traversing all settings tabs in the host web client.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 09:14:00 +09:00
CHEYAN
bbe584fb88 fix(web): add voice input permission cache shim fallbacks
Avoid unsupported-channel noise for voice permission cache reads in
the browser host client.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 09:09:58 +09:00
CHEYAN
6a295a5286 fix(web): add safe shim fallbacks for gitContext and noisy unsupported channels
- gitContext.getForSession returns {workdir,head,source} shape to prevent
  useSessionGitContext crash (Cannot read properties of null reading source)
- Add gitContext watch/unwatch/onChanged/listPrRefs/findLinkedWorktree fallbacks
- Add safe fallbacks for maker session helpers, binding, learn, subagent runs,
  resolvePathBatch, claude session channels seen during web-client audit

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 09:07:22 +09:00
CHEYAN
44a53a7e3d fix(web): stream agent events in real time to makerChatStore
- align host and shim event shape to MakerEventPayload { sessionId, event }
- auto-start SSE event stream on boot and listener registration
- enable real-time thinking and text streaming in web client without F5 reload

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 09:03:37 +09:00
CHEYAN
67ca681361 fix(host): wire maker input queue mutations and interaction channels
- implement updateContent, updateText, move, setExpanded, setInteractionLock, setEditLock, clearSession in host input-queue
- add endpoints /api/input/* and wire into web shim
- push input_projection events via SSE to synchronize queue changes
- wire maker.getPendingInteractions and maker.resolveInteraction

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 08:36:18 +09:00
CHEYAN
e370d2f2f5 fix(host): polyfill crypto.randomUUID for non-secure contexts and fix web chat sending
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 08:15:37 +09:00
CHEYAN
e8081ac868 fix(web): flatten capabilities descriptor and wire session settings channels
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 02:03:03 +09:00
CHEYAN
43e2598c68 fix(host): enable message sending in web client and support Pi agent runtime
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 01:05:54 +09:00
CHEYAN
f1ebfab643 fix(host): resolve custom providers and windowed chat history
- Load custom providers from SQLite custom_providers table in cindy-host
- Support Pi agent capabilities and models from custom providers (e.g. DEEPSEEK on magpie-debian)
- Implement windowed chat history with createHistoryViewReader, supporting backward pagination and workDetails
- Fix chat history truncation and epoch duration calculation in web client
- Add localDb.messages.workDetails in web preload shim

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-07 00:14:33 +09:00
CHEYAN
c1fad31bba fix(web): add full contract routes and switcher snapshot to prevent settings crashes
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-06 23:33:59 +09:00
CHEYAN
ccbd44a380 feat(host): sync sidebar session rows and eliminate web client route exceptions
- Connect local SQLite session queries (selectSessionListRows with ordinaryTaskListFilter and camelCase mapping) so the left sidebar populates all 192 active tasks.
- Bind webSession to a deterministic profile hash rather than random per-boot bytes to prevent 401 unauthorizations across host restarts.
- Populate full channel definitions and fallback shapes in apps/web/shim.js for companion cloud, goal state, plugin market, billing usage & orders, local CLI scans, media storage, memory management, and agent binary versions, preventing React Error Boundary triggers across all views.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-06 22:51:28 +09:00
CHEYAN
a287b7c1e1 feat(host): S8 live profile transition, duplicate IPC fix, and HEAD web support
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-06 21:42:14 +09:00
CHEYAN
3bb7923b06 feat(host): S7 auth single writer and token refresh delegation
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-06 20:54:47 +09:00
CHEYAN
9585851c9e feat(host): S6 two-way subscription and settings convergence
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-06 20:46:25 +09:00
CHEYAN
d4f8d6ea70 feat(host): make cindy-host the single data owner for the Debian profile
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-06 19:13:16 +09:00
CHEYAN
52661e9f05 feat(desktop): refuse to open the profile database in host client mode
Client mode now sets a flag the local DB respects, so the Electron client never
becomes a second writer on the profile the host owns; the guard has a test. The
web shim also answers the startup-stall report instead of rejecting it.

Records the three acceptance criteria and the residual list (manual OAuth,
plugin execution sandbox, Codex Responses proxy, scheduler, device-link, file
dialogs, history paging) in the status doc.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 18:27:57 +09:00
CHEYAN
7d6d5d2e4c feat(host): list installed plugins through the shared GhostManager
The host constructs the desktop's own GhostManager with owner-scoped roots
instead of maintaining a second plugin registry, serves it at /api/ghosts, feeds
the web client's synchronous list channel from a boot prefetch, and replays it
for Electron client mode. Host suite: 43/43.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 14:56:06 +09:00
CHEYAN
b03a083bac feat(host): answer permission prompts through the shared API
Add an interaction broker that publishes requests on the event stream, resolves
them from an HTTP response and denies on abort; expose pending/respond routes,
route interaction events to their preload channels in the web shim, and proxy the
two desktop channels in client mode. Host suite: 42/42.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 14:32:05 +09:00
CHEYAN
c11b579cef feat(host): support task metadata updates over the shared API
Add /api/sessions/update with an explicit field allowlist (title, status, pin,
mute, model/effort/permission/fast/plan), route it from the web client and proxy
the desktop channel in client mode. Verified by renaming a stored task through
the host and reading it back.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 14:14:37 +09:00
CHEYAN
81cb06277c feat(host): serve the pending-alert probes from the shared queries
Expose interrupted-pending, error-tail-pending and interrupted-resume-candidates
through the host using the desktop's own portable queries, wire them into the web
client, and proxy the three channels into Electron client mode.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 13:54:19 +09:00
CHEYAN
cff557d20b feat(web): expose the login-state query and local-mode entry
Serve the desktop login entry state and local-mode switches so a host profile
without an account session reaches the normal sign-in screen instead of a
channel error; local mode itself still stops at the startup gate (documented).

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 13:45:14 +09:00
CHEYAN
dcd45fc0d0 feat(host): persist task messages and project real history pages
Consume the agent's text events while a queued turn runs and store the user and
assistant rows in the shared messages table (partial text survives Stop), encode
content exactly as the desktop does, and answer historyView through the shared
projector so a reload restores the conversation.

Verified in the browser: a new task streams a real reply, and reloading the page
(or opening it in a fresh tab) shows both the user message and the answer.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 11:28:29 +09:00
CHEYAN
9fd0f4a041 feat(host): run the composer's input queue and persist task messages
The renderer submits through maker.input.* rather than maker.send, so the host
now owns a real per-task queue (enqueue, stop, steer, remove, resume) with a full
AgentInputProjection, dispatches the next item when a turn terminates, and fans
every runtime event out over one SSE stream the browser forwards to
maker.onEvent. Messages created by the renderer are written to the shared
messages table and read back through the same mapper.

Verified: a queued turn reaches the agent and streams text/done; the task route
renders with the full projection enabled.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 11:16:11 +09:00
CHEYAN
dd582531d2 fix(web): keep shim nodes identity-stable
The preload exposes plain objects whose identity renderer code memoizes on
(useMemo([api, ...]), external-store subscribe/getSnapshot pairs). Building a new
Proxy per property read made those keys change every render, so the read-aloud
store re-subscribed forever and the task view died with React #185. Cache one
Proxy per channel path.

Verified in the browser: the task route now renders its composer, message area
and right sidebar instead of the error boundary.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 10:58:20 +09:00
CHEYAN
ac0dba3bca docs(host): record the hook-level bisect result; reuse unchanged API payloads
Bisect shows the loop sits inside CCAgentSessionContent before the first commit,
but short-circuiting the two effects in the identified range does not remove it,
so build-level bisection has reached its limit. Also reuse the previous parsed
response when the host returns identical bytes, keeping object identity stable
for stores that compare snapshots.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 10:18:03 +09:00
CHEYAN
a6a129f01c fix(web): return the real device-link state shape
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 09:41:53 +09:00
CHEYAN
684fc28388 docs(host): add the feature-parity ledger and align sync channels with the preload
Record per-capability status with the evidence behind each claim, and fix the
shim members the preload answers synchronously (shortcut state, voice readiness,
ghost unread/recent) so snapshot stores stop seeing promises.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 09:33:49 +09:00
CHEYAN
9c0c1c5a22 fix(web): answer the sidebar snapshot synchronously like the preload
sidebarSettings.loadSnapshot is a sendSync read; returning a promise made every
consumer see a fresh value and kept re-rendering. Serve it as a frozen value
stamped with the host owner.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 09:29:33 +09:00
CHEYAN
b4543cd733 feat(web): answer provider-group reads with the real empty shapes
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 09:24:59 +09:00
CHEYAN
0d89992414 feat(web): answer right-sidebar tab reads with a stable empty list
Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 09:23:53 +09:00
CHEYAN
bdef054818 feat(host): serve task messages, history pages and stored usage
Implement localDb.messages.list as the bare array the preload promises, answer
historyView with a real empty page for tasks that provably have no messages
(non-empty tasks fail loudly until the windowed reader is ported), and report
task usage from the stored session row.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 09:15:16 +09:00
CHEYAN
cead8e3356 fix(web): keep capability and voice reads referentially stable
Cache the capability descriptor per agent and answer the voice-readiness
channels with frozen states, so stores that compare snapshots by identity stop
seeing a new value on every read.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 09:04:32 +09:00
CHEYAN
c374a1fb98 feat(web): answer desktop-only and polling channels with real empty states
Serve slash-command/skill surfaces from the registered agents and return the
shapes the renderer polls (bot groups, device link, interrupted-task probes,
shortcut state) instead of rejecting every read. Constant answers are frozen so
snapshot comparisons stay stable.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 08:54:12 +09:00
CHEYAN
c5c6e3a740 fix(web): expose endpoint and version members as plain values
The preload exposes some members as plain strings; the shim proxied them as
functions, so string coercion inside render rejected and re-entered the error
boundary. Serve the constant ones as values and freeze the remaining constant
snapshots.

Signed-off-by: CHEYAN <me@iamcheyan.com>
2026-11-05 08:39:25 +09:00