Repository navigation
feat(providers): add reusable plugin templates with native accounts - #1897
Draft
new-Beginner wants to merge 27 commits into
Draft
new-Beginner wants to merge 27 commits into
new-Beginner wants to merge 27 commits into
Conversation
…ings isPluginWorkspace built its containment prefix with a literal "/" and compared spellings verbatim, but the two inputs arrive from different worlds: the plugin folder comes from a native dialog (backslashes on Windows) while the workspace comes from the host, which can persist a forward-slash or //?/X:/… spelling. On Windows no plugin path ever matched, so the bundled plugin-development skill was never offered for a workspace a plugin was already loaded from — the manifest.json probe only rescued the single-plugin-at-root layout. Containment now folds both sides (separators unified, Windows verbatim prefix stripped, case folded everywhere but Linux, like the worktree ref folding) in a dependency-free module so its boundary behavior — sibling prefixes like repo-x must not count — is tested directly.
Folding a bare root by trimming its trailing separators turned "/" into the empty string, so pluginWorkspaceContains("/", "/tmp/plugins/example") answered false where the prefix check it replaced answered true. Preserve the POSIX root through the fold, compare every absolute path against it directly, and cover the root cases (/ and C:/) alongside the sibling boundary.
Keep integration declarations separate from Host-owned accounts so plugin services share native credential, model, and execution lifecycles without replacing official services or legacy singleton contributions. Fail closed when uninstall credential cleanup fails and authenticate OAuth callbacks before consuming login. Include SDK and internal API reference, lifecycle specifications, migration coverage, and synthetic regressions.
Supply the required plugin runtime boundary in the image-selection fixture\nand align settings contracts with native plugin account preferences.\nKeep official account routing and legacy singleton deletion guards covered.
Separate saved model configuration from endpoint publication state so a previously discovered model cannot silently return to Composer through configured-binding merging or restart hydration. Reconcile only complete nonempty answers, retain manual ids and history, and cover the real Host-to-IPC-to-Composer path with isolated storage. Schema v25 adds a backed-up migration for durable publication state. fixes vastsa#1892
The child panel rendered inside the fixed, scrollable root menu, so it was only viewport-anchored while nothing on that menu created a containing block. With one present (the reporter's build carries backdrop-filter: blur(22px) saturate(1.55)) Chromium offsets the child by the menu's own position and the menu's scrollWidth jumps from 194 to 1274, which is the reported flying panel plus horizontal scrollbar. Measured directly in Chromium: plain CSS puts the child at the expected (448,299) with no overflow; adding the reported declaration moves it to (1980,410) — exactly the menu offset (900,110). Portal the panel to the body so no ancestor of the menu can offset it, add the pointer-leave guards for the two halves of the portal, and follow the trigger through root-menu scroll and growth.
The long-history probe captured its reading baseline while minimap navigation and finite disclosure transitions could still move the view. Wait for completed finite motion and stable geometry before the reader gesture, preserving the original streaming-position assertion. Cover pending motion, scroll and resize corrections, infinite indicators, and bounded failure with controlled frame tests.
Keep the shared PR branch current without rewriting published history. Preserve the upstream documentation corrections alongside native-account template contracts and their matching Chinese examples.
- allow Read/Glob/Grep to run in parallel batches while keeping Task mixed with Read/Glob/Grep sequential - hold a same-batch parent read behind a preceding writable delegate until it settles while preserving Task's ADR 0089 non-blocking return - coordinate shared Read against exclusive Write/Edit per path in PathMutex - isolate delegate path-instruction preflight onto each delegate's own prompt
…ings (vastsa#1883) Normalize plugin/workspace separator spellings while preserving filesystem roots and sibling boundaries.
Separate reading ownership from the live-tail status boundary so restored current output reflects active execution without losing scroll ownership.
…stsa#1903) * fix(delegation): keep the prompt prefix stable across settlements The parent's system prompt carried the resumable-delegation list, and the runtime recomposed that prompt every time a delegation settled. Transports without mid-conversation system messages replay every system message into the first one, so each settlement rewrote the head of the request and invalidated the whole provider prompt cache instead of only its tail. Move discovery to TaskList: its result now reports the resumable chains as both text and details.resumable, while a failed resume still names the reusable ids in its own tool error. Instructions no longer change for reasons the user did not cause, so a long session that spawns many delegates keeps one cache lineage. ADR 0337 records the trade-off and supersedes ADR 0279 section 9; the runtime spec, its zh-CN mirror, and the delegation tests follow the new read path. * docs(adr): index ADR 0337 The docs check requires every ADR file to appear in the ADR index, so the new record needs its row before the branch can land.
…stsa#1596) Prepare file calls in source order, parallelize independent read batches, and preserve mixed Task/read safety and delegate prompt ownership.
…astsa#1901) Persist endpoint publication state separately from model bindings so complete discovery results survive cache hydration and restart without erasing configuration or changing defaults.
Make resource cleanup discoverable while preserving the selected tab. Keep the work panel open after closing all tabs and release Browser resources through the existing close path.
Preserve PR vastsa#1897 and current-main discovery behavior in one merge candidate. Combine Composer eligibility filters and migrate both historical v25 layouts to schema 26 without changing existing accounts or credentials. Add compatibility regressions and record isolated validation. The full Host suite retains the same 18 failures reproduced on the latest main baseline; relevant migration, provider, plugin and process tests pass.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current-main integration update
Current head:
cfc4a953446e9a2dbf4e6676eaac5a12c0ac4775.Latest fetched main:
5aa253883c4e34fd65d31c434256d424c352bf0b.Both main and prior PR head
a2fadb33795e3b41df3656524e76c1f161ac7f27are ancestors of this head. The existing source branch was fast-forwarded without rewriting published history. The PR remains draft; no merge, release or package publication was performed.Integration changes
models.discovery_state, while the earlier PR development v25 addedprovider_template_bindings. Keep discovery v24→v25 before templates v25→v26, and repair template-only development v25 transactionally after backup without resetting existing discovery state or template identities.Verification for the current candidate
Windows/Git Bash, Node 24.19.0, pnpm 12.8.1, Rust 1.98.1; reused dependency stores/Electron, isolated mutable Host outputs and test profiles. No real accounts, production database, running-user Desktop or paid API.
db::41,plugins::124 (1 ignored),providers::71,turn_queue::12,provider_template12. Filters overlap; do not sum them.cfc4a9534:node scripts/e2e-model-discovery-state.mjsand bothprovider-template-native-host.e2e.mjs/provider-template-cleanup-host.e2e.mjsfixtures passed. This covers real Host → IPC → Composer discovery persistence and independent-account lifecycle / cleanup-failure quarantine with synthetic external service boundaries. Tested source fingerprints were checked against the commit.Current validation details and fingerprints.
New-head CI was triggered by this push. Documentation and latest-base ancestry checks passed at publication time; the remaining four checks were still running. Historical successes below apply only to their original candidate commits, not this head. Maintainer review/policy resolution is still required before landing.
Summary
Separate reusable plugin integrations from Host-owned native accounts. Installation adds an Add AI service entry, not an account. Explicit setup creates independent native accounts; official services and legacy singletons remain supported.
probes.mjs, outside automatic product-test discovery.Interface documentation
Plugin provider API reference: SDK exports, manifest examples, fields/limits, custom inference events, scoped credentials, identity, internal RPC/IPC, errors, lifecycle and testing.
Historical candidate and checks (before current-main integration)
Candidate:
a2fadb33795e3b41df3656524e76c1f161ac7f27(implementation9c4093f20, native-account test fixture follow-up38b545a6b, transcript fixture synchronizationa8581f9c5, and non-destructive integration of newer main documentation; runtime sources unchanged by both follow-ups and the integration).Base:
850a2679f34b5ae79680beb029b186daa14a906b, latest fetchedorigin/main, verified ancestor;pnpm check:pr-basepasses.Environment: Windows, Node 24.19.0, pnpm 12.8.1, Rust 1.98.1; reused installed dependencies, synthetic credentials only.
Publication checks previously run on implementation/native-account follow-up candidates (not rerun wholesale for the test-only transcript change):
pnpm build:js, Desktop typecheck andpnpm lint.38b545a6b, pinned to this worktree's binary: independent accounts through use/restart/uninstall, and cleanup-failure quarantine/reload/restart/recovery.Historical local limitations / maintainer review (prior candidates)
This is a draft, not an error-free or full-suite acceptance claim.
pnpm -r --if-present testfailed: Agent runtime had one default-5s image-worker bundle timeout (1465 passed, 1 failed, 1 skipped); that unchanged test passed isolated in 2.4s without raising its timeout. Supplemental pi-host tests: 22 passed, 35 failed, 5 skipped, including Windows socket/POSIX fixture/packaging failures. Supplemental full Desktop execution was stopped after running more than 15 minutes without exiting; partial output contains failures in remote-target subscription, logging, macOS release fixtures, timeout handling and model-catalog bindings. The isolated catalog-binding test reproduces 4 passed, 3 failed. No full-workspace-green claim.fix/perf. This feature is accurately typedfeat, not relabeled to bypass policy. Maintainer authorization/policy resolution is required before landing.No merge, release, package publication or version bump is requested/performed.
Historical remote integration verification
On prior head
38b545a6b, GitHub merge candidate6c38f0cfe013127de1dd988c0978ace82339e895had tree29752c078ed4be2e8d9eff3e9114a4274b8ecb10, identical to that locally tested head tree. JS build/typecheck/lint/architecture/full unit tests, Rust format/lint/full tests, Windows Host E2E, documentation and head/base ancestry passed. Electron failed inLong history: stream stole the reader's scroll position(scripts/e2e-transcript-render.mjs:265): failed job. This historical failure prompted the synchronization fix below; it is not erased by the earlier Electron pass on9c4093f20.The isolated catalog-binding check also yields the same 4 passed / 3 failed with
runtime/provider-catalog.tsloaded verbatim fromorigin/mainthrough a scratch-only module hook. The original test and assertions were unchanged. This is a targeted module-source comparison, not a clean-main whole-tree baseline.First CI iteration and minimal follow-up
On implementation commit
9c4093f20, remote Rust format/lint/full tests, Windows Host E2E, Electron E2E, docs and base ancestry passed. JS build, typecheck, lint and architecture passed; the unit-test step failed in three Desktop cases. Remote Agent-runtime tests passed (1466), Host-runtime passed (128), and pi-host passed (58, 4 skipped).The three failures were reproduced locally before the follow-up: an image-conversation fixture omitted the required plugin runtime dependency; two settings source-contract tests still asserted the pre-feature editing/toggle/deletion policy. Commit
38b545a6bsupplies the external-boundary fixture and synchronizes those contracts with the approved native-account behavior, preserving official routing and legacy singleton deletion guards. No product source, assertions' expected security errors, test timeout or skip settings changed. The combined relevant regression selection passes 169 tests. The latest CI run is separate from that first-iteration evidence.Transcript CI follow-up (
a8581f9c5)The long-history fixture recorded a supposedly stationary reading baseline while finite disclosure transitions were still running after minimap navigation. Scratch-only Chromium instrumentation reproduced that invalid precondition: the baseline-during-finite-animation assertion failed before the fix, then passed with the fix. The diagnosed trace showed follow already released and no product follow-scroll writes during this interval; this does not claim a deterministic local reproduction of the original remote assertion.
The fixture now waits for finite transitions and stable scroll/viewport geometry before the reader gesture. Infinite activity indicators do not block it. The original 2-pixel streaming-position assertion, existing timeouts, skips, product hooks and navigation behavior are unchanged. Five deterministic tests cover finite/pending motion, scroll/resize corrections, infinite/finished animations and bounded failure.
Fresh verification:
pnpm build:js, Biome lint, helper TypeScript check, whitespace/base ancestry checks and 36 targeted tests passed. The isolated production long-history Electron scenario, including the additional baseline precondition, passed on committed candidatea8581f9c5(reading offset 8991 before and after streaming). The unmodified full local transcript harness reached and passed long history but failed existing fractional-DPR status geometry assertions (51.949px versus 52px); a separate DPR=1 diagnostic instead stopped at an existing disclosure hit-target assertion. Neither full local run is reported as passing. No live Desktop/provider was used.Historical CI on prior head
a2fadb337: all six checks passed. On heada2fadb33795e3b41df3656524e76c1f161ac7f27, GitHub merge candidate763f007fde633ed4a42d8ce69af0ade77893261bcombines base850a2679f34b5ae79680beb029b186daa14a906bwith that head. Its tree3f1ea95b6769f2f05ea035045cf78b04a54ed325exactly matches the locally tested head. JS build/typecheck/lint/architecture/full tests, Rust format/lint/full tests, Windows Host E2E, Electron E2E, documentation and base ancestry all succeeded. The downloaded Electron result explicitly reportsrender,runtimeSlot,smoothText,longHistoryand context-overflow recovery passing, with no phase errors. No failed CI run was retried to obtain this result. The PR remains a draft for maintainer review/policy resolution; no merge or release was performed.Before pushing, main advanced through plugin-documentation PR #1890. Integration commit
a2fadb337preserves the shared branch history and both sides of four English/Chinese documentation conflicts (template entries/contracts plus upstream metadata clarifications). The refreshed integration passes documentation checks (88 pairs, 603 pages), documentation build, whitespace/ancestry checks, the same 36 targeted tests and isolated production long-history E2E (8991 before/after streaming). Prior whole-suite results retain their original candidate identities.