docs: integrate installed resource loading

This commit is contained in:
2026-09-03 10:44:41 +08:00
parent d22d4b0f6e
commit bd377c9732
9 changed files with 143 additions and 301 deletions

View File

@@ -1,147 +0,0 @@
# Task: Fix packaged local Skill installation
## Identity
- Task ID: 20260902-local-skill-install-fix-6b3e91a4
- Mode: Feature
- Branch: codex/20260902-local-skill-install-fix-6b3e91a4-local-skill-install-fix
- Worktree: D:\Datas\OthersProjects\makelore-local-skill-install-fix-6b3e91a4
- Base commit: 28e1690038d61b9333a2f6ca77f0187ea4273676
- Owner: codex-root
- Status: Ready for Integration
## Scope
- Fix packaged conversation-driven Device Package installation after the bundled
Pi CLI succeeds but the Main-owned package inspection path fails to load its
production dependency closure.
- Add a red/green packaged-runtime regression for the lazy package-manager
boundary.
- Preserve closed Device Package errors across the Pi extension bridge so
supported-source dependency failures and unsupported source syntax no longer
collapse to the same generic `Bridge request failed` response.
- Rebuild and verify the Windows `app.asar`/product artifact, then execute the
real packaged npm and Git prepare paths without committing a package.
## Intent And Constraints
- Keep the accepted Device Packages product model unchanged: installation is
initiated only through conversation tools; preview and a distinct later
confirmation precede commit; packages are local Main-owned immutable
generations; lifecycle scripts stay disabled; only future/idle parent workers
receive resources and child workers remain empty.
- Work only in the isolated feature worktree from exact client `main`
`28e1690038d61b9333a2f6ca77f0187ea4273676`. Preserve the three unowned task
records in the client root and do not reset, stash, clean, adopt, or modify
that worktree.
- Do not add a global Pi CLI requirement, visible installer, Account Library,
Marketplace Release/Admission, hosted Web Search, Provider, server, billing,
deploy, publish, push, or PR behavior.
- Avoid leaking local paths, stacks, credentials, or raw dependency diagnostics
to Pi/Renderer. Only closed Device Package codes and bounded public messages
may cross the bridge; internal errors may be logged in Main.
- The prior diagnosis is accepted evidence: installed bundled Pi npm/Git
resolution succeeds, while importing the packaged
`@earendil-works/pi-coding-agent` graph fails because
`partial-json@0.1.7` is absent from `app.asar`.
## Concurrent Task Gate
- `check_project_docs` passed for the client root.
- `task_context start` created the exact isolated worktree/branch/base recorded
above; `status --json` confirmed matching task, owner, mode, branch, worktree,
and base.
- The client root remains on `main` with exactly three pre-existing untracked
task records; none was copied as a change or adopted.
- The only semantically adjacent registered peer is the older native Web Search
client coordinator. Its task record owns hosted/model-tool composition, not
Device Package manager loading, bridge error projection, or packaging closure;
no semantic or file-ownership conflict is present.
- Gate result: Passed.
## Project Context Loaded
Read the project memory entry, active record, positioning/current state,
decision index, ADR-006, system/module/data-flow architecture, business rules,
success criteria, evidence/reflection/commitment/stale indexes, the completed
Model Tools and Device Packages integration record, the relevant peer record,
and the prior diagnosis record.
Relevant understanding:
- Electron Main owns package bytes, inspection, durable generations, Pi resource
materialization, and packaged dependency authority; Renderer/Pi receive only
closed projections.
- The current integrated frontier deliberately lazy-loads the ESM-only Pi package
manager for remote installs. Workspace tests passed, but packaged signed-in
installation remained an explicit acceptance gate and the installed artifact
now proves that its ESM dependency closure is incomplete.
- ADR-006 explicitly requires installed-package regressions to be exercised
against final `app.asar` and packaged runtime roots.
- Likely owned modules are `electron/coding-packages/**`, the Pi extension bridge,
artifact verification scripts/tests, and the root production dependency lock.
- Planning Gate result: Passed.
## Outcome
- Replaced the packaged Device Package inspection dependency on the incomplete
`app.asar` Pi graph with the already-distributed physical
`resources/pi-runtime/dist/index.js` authority used by the bundled Pi CLI.
- Preserved closed `local_package_*` failures through Main's worker bridge and
the generated Pi extension while keeping unknown failures generic.
- Added an artifact gate that rejects a Main-reachable bare
`@earendil-works/pi-coding-agent` dynamic import and proves that the packaged
physical runtime exposes `DefaultPackageManager` and
`SettingsManager.inMemory`.
- Bumped the generated MakeLore Pi extension generation so new workers cannot
reuse stale bridge code.
- Produced a final Windows x64 product at source commit
`5a2f0eb6785b59d8b455ed5cb1d9773351ff895a`. No package was committed to
the user's Device Package store and the installed MakeLore application was
not replaced.
## Verification
- Installed-artifact RED: importing the installed `app.asar` Pi graph failed
with `ERR_MODULE_NOT_FOUND` for `partial-json`; importing its physical
`resources/pi-runtime/dist/index.js` succeeded with both required exports.
- TDD RED: the new Device Package manager regression attempted the unavailable
app Pi graph; the real worker bridge reduced a closed failure to
`Bridge request failed`; the artifact gate accepted the stale bare import.
- Focused and adjacent unit tests: 8 files, 69 passed.
- Full unit suite: 222 files, 1815 passed, 2 skipped; pressure test 1 passed.
The first run saw two Windows `spawn EBUSY` failures while Electron was first
downloaded; that file then passed 3/3 alone and the complete rerun passed.
- `pnpm typecheck`: passed.
- Scoped ESLint for every changed TypeScript/JavaScript source and test: passed.
- `pnpm run build:vite`: passed; generated Main contains the physical runtime
loader and no bare dynamic import of `@earendil-works/pi-coding-agent`.
- Final source/runtime acceptance used the Windows product executable, physical
Pi CLI/runtime, and self-contained npm runtime from `release/win-unpacked`.
Prepare succeeded without commit for a loose `SKILL.md`,
`npm:pi-web-search`, and
`https://github.com/DietrichGebert/ponytail`; the latter projected six Skills
plus one Pi extension.
- `pnpm run package:stage:win-x64` and Electron Builder/NSIS: passed. The
installer is 208,323,462 bytes with SHA-256
`A5CA7422B3962ABF6B0391B73EC26C7600D962630289F0EFE3BAFDD03A3B97E1`.
- `pnpm run verify:artifact:win`: passed against source/verification head
`5a2f0eb6785b59d8b455ed5cb1d9773351ff895a`; Electron 43.4.0, Node 24.18.1,
Python, uv 0.10.0, npm 11.6.2 and native modules were verified from the
final product. The pinned Python/uv staging was reused from the existing root
after a fresh Python archive fetch stalled; the verifier proved the copied
runtimes rather than treating the network attempt as evidence.
- `pnpm run verify:artifact:pi`: passed. Its new Device Package evidence is
`authority=bundled-pi-runtime`, `appAsarRootImport=false`, and both package
manager exports are functions; Pi 0.84.2 closure and runtime probes passed.
- `git diff --check`: passed.
## Follow-ups
- Integrate the source commit onto client `main`, rebuild from that exact
frontier if a main-line installer is required, then install/restart MakeLore
before retrying the conversation-driven prepare/confirm flow.
## Promotion Candidates
- None recorded.

View File

@@ -0,0 +1,100 @@
# Task: Integrate installed resource loading fix to main
## Identity
- Task ID: 20260903-integrate-installed-resources-4b7e2c91
- Mode: Integration
- Branch: codex/20260903-integrate-installed-resources-4b7e2c91-integrate-installed-resources
- Worktree: D:\Datas\OthersProjects\makelore-integrate-installed-resources-4b7e2c91
- Base commit: 28e1690038d61b9333a2f6ca77f0187ea4273676
- Owner: codex
- Status: Ready for Main Promotion
## Scope
- Integrate the completed packaged Device Package prepare fix and the successor
installed-resource activation fix onto the current local `main` history.
- Promote the accepted behavior and evidence into current-state, architecture,
README, evidence, and release-acceptance memory.
- Verify the exact integrated source tree without installing a replacement
client, publishing artifacts, pushing, or modifying unrelated user work.
## Intent And Constraints
- Every resource explicitly installed and currently enabled by the user must be
included in the Main-selected parent resource generation. Manual disablement
remains authoritative.
- The generated Makelore extension remains the required first extension. All
further selected Device Package extensions load through Pi's explicit
additional-extension input while ambient project/user discovery stays off;
selected Skill paths remain unchanged and child workers stay empty.
- Treat the two source task records as read-only integration evidence. Do not
rewrite their history or broaden this merge into Marketplace, Provider,
Renderer, deployment, publication, or installed-application changes.
- The root `main` worktree is owned by an earlier diagnostic task and contains
three pre-existing untracked task records. Preserve them exactly; do not
stash, reset, clean, adopt, overwrite, or force-release that ownership
without explicit human confirmation.
## Integration Plan
1. Fast-forward the completed source history from current `main` into this
isolated integration branch and confirm both product commits are present.
2. Reconcile the accepted promotion with canonical product/architecture
memory and the release acceptance commitment.
3. Run focused tests, full unit/pressure verification, typecheck, scoped lint,
production build, diff checks, and the task documentation gates.
4. Advance local `main` only through a clean, ownership-safe operation.
## Outcome
- Fast-forwarded the completed source history through
`d22d4b0`, retaining product commits
`5a2f0eb6785b59d8b455ed5cb1d9773351ff895a` and
`17664c5fffcfe695653b4146503e645f54767c4b` on the integration history.
- Packaged Device Package inspection now resolves `DefaultPackageManager` and
in-memory settings from the distributed physical Pi runtime. The generated
Makelore bridge remains required, and the Agent Server loads every further
Main-selected installed/enabled extension through Pi's explicit additional
paths without ambient discovery; all selected Skill paths remain unchanged.
- Promoted the accepted behavior and verification boundary into `README.md`,
canonical current state, system overview, module map, evidence index, and the
Windows release commitment. The README's stale Hosted Web Search description
was reconciled with the already-integrated selected-model tool architecture.
- Excluded the two source task-owned records from the final integration tree as
required by the task-aware document boundary. Their files and commits remain
intact on the source branches; this integration record carries the promoted
default-branch result.
- No installed application, local Device Package store, user project, package,
deployment, publication, remote branch, or unrelated root-worktree file was
changed.
## Verification
- `corepack pnpm install --frozen-lockfile` — passed with pinned pnpm 10.33.4;
lockfile unchanged.
- Focused integrated regressions — 5 files / 31 tests passed, including packaged
package authority, generated extension bundle, real Agent Server multi-extension
registration, worker opener, and Device Package manager behavior.
- Full unit suite — 222 files / 1,815 passed / 2 conditional skips; serialized
coding-chat pressure test 1/1 passed.
- `corepack pnpm run typecheck` — passed.
- Scoped ESLint over all ten changed source/test files — passed.
- `corepack pnpm run build:vite` — Renderer, Main, Preload, and release utility
passed; only pre-existing mixed-import and chunk-size warnings were emitted.
- `git diff --check` — passed.
- The task-aware drift check initially identified the two imported source task
records as foreign ownership files. They were removed from the integration
result; the final drift result is recorded after this task record is committed.
## Follow-ups
- Build and install a client from the exact promoted `main`, then execute live
Conversation prepare→confirm→activation with npm/Git/loose Skill coverage and
a generation containing at least two enabled extensions. The currently
installed 1.2.6 client remains the old, known-failing artifact.
- No push was requested; remote publication remains separate.
## Promotion Candidates
- None. Accepted source-task promotions were applied during this integration.

View File

@@ -1,142 +0,0 @@
# Task: Load all enabled installed Pi resources
## Identity
- Task ID: 20260903-load-installed-resources-8f3c1a72
- Mode: Feature
- Branch: codex/20260903-load-installed-resources-8f3c1a72-load-installed-resources
- Worktree: D:\Datas\OthersProjects\makelore-load-installed-resources-8f3c1a72
- Base commit: 34e59bfaf2867e6a53a345de52c0ce850d6f426a
- Owner: codex
- Status: Ready for Integration
## Scope
- Make every enabled, conversation-installed Device Package Pi extension load in
the parent Agent Server alongside the required generated Makelore extension.
- Add a real Agent Server process regression that crosses the repeated
`--extension` seam and proves the external extension actually registers.
- Preserve existing Skill loading, manual disablement, parent-worker refresh,
and child-empty behavior. Do not broaden discovery to ambient project/global
Pi resources or change Plugin Marketplace authorization.
## Intent And Constraints
- The user decision is that installed resources load; the bounded
interpretation is every explicitly installed and currently enabled resource.
The existing disable toggle remains authoritative.
- Keep the first `--extension` path as the required Main-generated Makelore
bridge factory. Pass subsequent confirmed Device Package paths through Pi
`0.84.2`'s explicit additional-extension input while retaining discovery-off
settings.
- Make the smallest source/test change. Do not add compatibility layers,
feature flags, new validation frameworks, Renderer behavior, Provider calls,
package installation, or application restart.
## Concurrent Task Gate
- `check_project_docs.py` passed with the bundled Codex Python runtime.
- `task_context.py start` created this isolated feature worktree from clean,
human-verified adjacent fix head
`34e59bfaf2867e6a53a345de52c0ce850d6f426a`; `status --json` matched task ID,
branch, worktree, base, mode, and owner.
- Relevant peer records were read. The local-Skill installation task is the
predecessor and is included in this base. Runtime diagnosis, old package,
client-hang, Model Tools, and Marketplace tasks do not own this worktree.
- The package-1.2.6 record says In Progress while the registry says ready for
integration; it targets the old main artifact and does not overlap this
source change, so the discrepancy is noted but not blocking.
- Gate result: Passed.
## Project Context Loaded
- Read the memory entry and planning gate, active record, project positioning,
current state, decision index and ADR-006, system/module/data-flow
architecture, business rules, success criteria, evidence/reflection/
commitment/stale indexes, and relevant peer records.
- Main owns the Pi resource set. New and idle parent threads must receive every
enabled installed Device Package Skill/extension; active threads switch after
settlement and child threads stay empty.
- Live evidence proves the real Agent Server rejects built-in-plus-device
extension arguments before open. Canonical Device Package behavior is
therefore stale relative to the implementation, not semantically disputed.
- Likely files are `resources/pi-agent-server.mjs` and
`tests/unit/pi-agent-server-process-real.test.ts`.
- `project-positioning.md` remains a template; the repository guidance,
integrated state, ADR-006, and domain rules provide the applicable product
boundary.
- Planning Gate result: Passed.
## Implementation Plan
1. Add a real-process regression with one generated Makelore extension and one
external extension; verify it fails at the current exact-one guard.
2. Treat only the first extension as the Makelore bridge and load all remaining
explicit paths through Pi's additional extension list.
3. Run the focused real-process and opener/resource tests, typecheck, scoped
lint, production build, diff checks, and the project-document completion
gates.
## Outcome
- Product source and real-process regression are committed as
`17664c5fffcfe695653b4146503e645f54767c4b`.
- Removed the accidental exact-one Agent Server constraint. The first explicit
extension remains the required generated Makelore runtime factory, while
every subsequent explicit path is passed to Pi `0.84.2` as
`additionalExtensionPaths`.
- Retained `noExtensions: true`, so Pi loads the complete Main-selected
installed/enabled set without adding ambient project or user-global
discovery. Existing `additionalSkillPaths` behavior is unchanged, so all
enabled installed Skills continue to load through the same frozen parent
resource generation.
- Strengthened the real-process test to open two isolated Conversations with
the Makelore bridge plus two independent external extensions. Both external
commands must appear in `get_commands`, proving every supplied extension is
initialized rather than merely accepted by argument parsing.
- No Renderer, Marketplace policy, package index, child-worker, Provider,
application process, or installed-client state changed.
## Verification
- TDD red: the strengthened real Agent Server process test failed during
`thread_open` with `Thread requires exactly one Makelore extension`.
- TDD green and final focused matrix: `pi-agent-server-process-real`,
`pi-managed-worker-opener`, and `device-package-manager` — 3 files / 10
tests passed. The real process loaded both external extension commands.
- Final full unit suite: 222 files / 1,815 passed / 2 conditional skips;
serialized coding-chat pressure test 1/1 passed.
- `pnpm run typecheck` with pinned pnpm 10.33.4: passed.
- Scoped ESLint for the changed server and test: passed.
- `pnpm run build:vite`: Renderer, Main, Preload, and release utility passed;
only the existing dynamic-import and chunk-size warnings were emitted.
- `pnpm install --frozen-lockfile` used pnpm 10.33.4 and reused the local store
without changing the lockfile.
## Follow-ups
- Integrate this task together with its predecessor
`20260902-local-skill-install-fix-6b3e91a4`, then build and install a new
Windows client before re-enabling/retrying Ponytail in the live application.
- The currently installed 1.2.6 client is unchanged and still contains the
exact-one guard; disabling the Device Package remains the reversible recovery
until a replacement client is installed.
## Promotion Candidates
- Target canonical documents: `.project-docs/30-worklog/current-state.md` and
`.project-docs/50-evidence/evidence-index.md`.
- Proposal: record that the successor of the packaged local-Skill install fix
now loads the required generated Makelore extension plus every explicit
enabled Device Package extension, while keeping ambient discovery disabled.
- Evidence: exact red `thread_open` failure before the source change; real
Agent Server green with two external extension files and both registered
commands; focused, full-unit, pressure, typecheck, lint, and production-build
verification above.
- Future impact: Device Packages that contain Pi extensions no longer make the
parent Conversation unavailable; release acceptance should include
built-in-plus-multiple-device-extension activation, not prepare-only proof.
- Semantic conflicts: none. This implements the already accepted Device Package
behavior and the user's explicit all-installed/enabled loading decision.
- Human confirmation required: no for promotion of the implementation result;
yes before any separate install/restart action if not already authorized.