diff --git a/.project-docs/30-worklog/tasks/20260903-load-installed-resources-8f3c1a72.md b/.project-docs/30-worklog/tasks/20260903-load-installed-resources-8f3c1a72.md new file mode 100644 index 0000000..83cb5b2 --- /dev/null +++ b/.project-docs/30-worklog/tasks/20260903-load-installed-resources-8f3c1a72.md @@ -0,0 +1,142 @@ +# 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.