refactor!: clarify library contracts and unify CI verification - #92
Merged
Merged
Conversation
Unify plugin author contracts and explicit tool results in the public SDK. Carry complete execution plans through one host commit API, preserving nested suspension accounting, immutable hook settings and activation scope. Separate vector index progress from plugin data and scope background work to each memory instance. Narrow store and context entrypoints and share production tool setup with the plugin runner. Update consumers, regression coverage and package responsibility guidance. Validation: workspace lint and package boundary checks pass. Runtime has 1413 passing tests excluding the network listener suite; server has 1596 passing tests excluding sandbox-restricted HTTP and watcher suites. SDK, tools, plugins, store, memory and author-runner checks pass. Full test/E2E runs are limited by sandbox socket/IPC permissions. Frozen offline install validation lacks cached registry metadata for its supply-chain check. BREAKING CHANGE: executeTurn and resume return prepared executions; commitExecution consumes their plans. Tool effects use explicit envelopes, buildContext is asynchronous, store backends require subpath imports, and memory background lifecycle is instance-owned. Recreate development data and checkpoints containing the previous vector-progress representation.
Capture localized runtime prose with plugin generations, use logical parent turns for retries, and resolve settings backends before store initialization. Clear deleted-session plugin caches after successful deletion. Share query embeddings and source ranking in memory search. Separate world generation from explicit file export and preserve portable contract data. Exercise real commits and hooks in plugin author tests, report unsupported host capabilities, retain active entry callbacks, and check JavaScript SDK usage in generated plugins and the character-creation guard. Validation: workspace lint (22 tasks), changed-file formatting, package boundaries, and focused regressions passed. Full tests reported 7310 Vitest passes and 23 environment-blocked cases (loopback EPERM or watcher EMFILE). Desktop selfchecks and browser E2E were blocked by tsx IPC EPERM; offline installation verification lacked cached supply-chain metadata. BREAKING CHANGE: createWorld returns validated content without outputDir; use writeWorldPackage for file export. Memory tool wiring consumes the unified MemorySystem.search interface.
Keep derived vectors and their progress consistent across concurrent ingestion instances. Apply CAS, vector deletions and upserts as one batch on Memory, SQLite and PostgreSQL. BREAKING CHANGE: VectorStoreCapability.commitVectorIndexBatch and CommitVectorIndexBatchInput replace compareAndSetVectorIndexProgress and UpdateVectorIndexProgressInput.
Return schema transforms and defaults from world generation so file, store and return-only targets consume the same manifest. Cover canonical locales, character defaults and preserved content through the API.
Integrate the library boundary, execution ownership, consumer, atomic vector index, and normalized world generation changes with the current provider code. Remove obsolete workspace dependency declarations and migrate the remaining Playwright Store import to the Memory backend entrypoint. Validation: pnpm check, full tests (7780 Vitest and 33 desktop tests), required PostgreSQL checks (960 Store and 24 integration tests), coverage, release preflight, browser smoke (4), complete deterministic E2E (118; 6 live-model cases skipped), and pnpm build including staged desktop server smoke passed. BREAKING CHANGE: Runtime hosts consume prepared execution plans, plugin tools use explicit result envelopes, context building is asynchronous, and Store backends use subpath imports. World generation and export are separate APIs. Atomic vector batches replace the previous vector-progress CAS API. Recreate development data/checkpoints using the previous vector-progress representation.
Reuse CI gates during releases, collect the full browser suite and run a small deterministic smoke suite. Validate workflow syntax with pinned actionlint and check lockfiles in an isolated metadata-only workspace. Track root TypeScript configuration and prompts in Turbo inputs, pass PostgreSQL test environment through uncached Store/Server tasks, and retain shared build dependencies without implicitly bundling Web during lint/test. Separate Vitest and desktop coverage commands and require explicit database integration tests. Cover failure propagation, cache invalidation, and preflight side effects with script regressions; update contributor guidance. Validation: pnpm check (13 script regressions), pnpm test, pnpm test:pg, pnpm test:coverage, pnpm release:preflight, browser test collection and smoke, full deterministic E2E, and pnpm build passed.
Replace the inherited webServer array instead of concatenating it through defineConfig. Add a regression for owned and external stacks. Validation: 14 script regressions and all 4 smoke flows pass with the default automatic server startup.
This was referenced Sep 29, 2026
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.
Summary / 摘要
Clarify the responsibilities and public contracts of the shared libraries, migrate their consumers together, and make local validation, PR CI, and release verification use the same checks.
Type of change / 变更类型
Verification / 验证方式
Validation is performed in an isolated checkout with Node 26.7.0 and pnpm 11.22.0. PostgreSQL uses a disposable pgvector container; browser checks use an isolated Memory backend.
pnpm lintviapnpm check; peer, boundary, dependency, manifest, i18n, 14 script regression, and actionlint checks passed.pnpm test --concurrency=2: 7,780 Vitest tests and 33 desktop Node tests passed, plus desktop self-checks. PostgreSQL was required; 2 existing skips and 10 todos remain.pnpm test:pg: 960 Store tests and 24 Server integration tests passed against disposable PostgreSQL/pgvector.pnpm test:coverage: Vitest reports and desktop raw V8 coverage generated successfully.pnpm e2e --list: 124 tests collected from 39 files; catches stale imports outside the smoke subset.pnpm e2e:smoke --retries=0: 4 passed using the default automatic server startup. An external-stack run also passed all 4.pnpm e2e --workers=2 --retries=0: 118 passed, 6 live-model cases skipped withLIVE_LLM_ENABLED=0. UsedE2E_BASE_URLwith a private Memory server on separate ports; the final run used a non-watching server to avoid interference from coverage file writes.pnpm release:preflight: all 8 gates passed.pnpm build: all 5 tasks passed, including staged desktop server startup smoke.Platform installer packaging and real-model acceptance were not run; no release was published.
Related issue / context / 关联
Includes the previous library-contract and consumer improvements plus CI/pnpm fixes. Based on current main, including the provider improvements from #91. Concurrent dependency/toolchain upgrades and plugin-panel changes are excluded.
BREAKING CHANGE: Runtime execution/resume return prepared executions consumed by
commitExecution; plugin tools use explicit result envelopes, context building is asynchronous, and Store backends use subpath imports.createWorldreturns normalized content andwriteWorldPackageexports it. AtomiccommitVectorIndexBatchreplaces the previous vector-progress CAS API. All repository consumers and fixtures are migrated together. Recreate development data/checkpoints that contain the previous vector-progress representation.Docs sync / 文档同步
docs/reference/for framework contracts, storage, tools, and settings behavior.