pi-background-tasks 2.6.1 → 2.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/TESTING.md +2 -2
- package/TEST_PLAN.md +2 -2
- package/dist/package.json +1 -1
- package/docs/manifest.json +3 -3
- package/docs/operations/testing.md +1 -1
- package/docs/operations/troubleshooting.md +1 -0
- package/docs/subsystems/delegation.md +1 -1
- package/docs/subsystems/docs-freshness-gate.md +1 -1
- package/docs/subsystems/host-ui-and-telemetry.md +3 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
| Fact | Value |
|
|
28
28
|
| --- | --- |
|
|
29
29
|
| Package | `pi-background-tasks` |
|
|
30
|
-
| Version | `2.6.
|
|
30
|
+
| Version | `2.6.2` |
|
|
31
31
|
| Node engine | `>=22.19.0` |
|
|
32
32
|
| Pi entrypoints | `./dist/extensions/anthropic-attribution.js`, `./dist/extensions/background-tasks.js` |
|
|
33
33
|
| Package image | [logo.png](https://raw.githubusercontent.com/ismailsaleekh/pi-background-tasks/main/logo.png) |
|
|
@@ -376,4 +376,4 @@ Operations are `capabilities`, `run`, `status`, `logs`, and `kill`. This is the
|
|
|
376
376
|
|
|
377
377
|
Keep user-facing claims tied to source. If you change public schemas, command behavior, durability, model routing, or environment variables, update these package-local docs in the same change and run focused checks appropriate to the edit.
|
|
378
378
|
|
|
379
|
-
For startup work, use `scripts/benchmark-cold-load.mjs` with an owned output/scratch root, explicit `--runtime source|compiled`, and at least 30 fresh-process samples; the exact command and interpretation rules are in [Testing operations](docs/operations/testing.md#cold-load-measurement-discipline). Its “cold” result means an empty JavaScript/Jiti module cache, not a flushed filesystem cache. It is distribution evidence, not a flaky CI threshold. Published Pi entrypoints use precompiled JavaScript; disabled delegate/Fusion/attribution lanes, the dock UI, and attested execution stay outside process-only static startup. Native-Windows and vendor compiled-Bun timing still require their own evidence.
|
|
379
|
+
For startup work, use `scripts/benchmark-cold-load.mjs` with an owned output/scratch root, explicit `--runtime source|compiled`, and at least 30 fresh-process samples; the exact command and interpretation rules are in [Testing operations](docs/operations/testing.md#cold-load-measurement-discipline). Its “cold” result means an empty JavaScript/Jiti module cache, not a flushed filesystem cache. It is distribution evidence, not a flaky CI threshold. Published Pi entrypoints use precompiled JavaScript; disabled delegate/Fusion/attribution lanes, the dock UI, and attested execution stay outside process-only static startup. Load those entrypoints through Pi; `dist/src/**` contains private implementation chunks and is not a set of standalone Node entrypoints. Native-Windows and vendor compiled-Bun timing still require their own evidence.
|
package/TESTING.md
CHANGED
|
@@ -199,7 +199,7 @@ The package URL guard separates syntax-wide discovery of self-contained file-URL
|
|
|
199
199
|
|
|
200
200
|
The local-tarball consumer test does not borrow a warm user npm cache or npm configuration. It first proves a truly empty isolated cache fails with `ENOTCACHED`, then archives the already-published files in the installed `turndown` production closure through the public portable `tar` API bundled with the active npm CLI, without invoking npm's directory-pack lifecycle. A task-owned package with executable `prepack`, `prepare`, and `postpack` hooks proves plain packing attempts lifecycle code, characterizes npm 10.9.3's unsafe `--ignore-scripts` prepare behavior versus npm 11.13.0, and then proves the fixture archive path runs no hook on either line. The installed source hashes and original script-bearing manifest bytes must remain unchanged. The resulting real closure is exposed through a temporary loopback-only registry to seed a separate empty task-owned cache. Every npm subprocess uses explicit task-owned user/global config, a task-owned project cwd with empty project config, `GIT_ALLOW_PROTOCOL=file`, and absolute filesystem operands. A no-request config probe demonstrates that a hostile scoped global/project registry would win without isolation but is absent from the effective preparation environment. After the registry is closed, consumer installation runs with `--offline`; the test checks exact Turndown/Domino versions and performs a real HTML-to-Markdown conversion to prove the transitive dependency loads. Missing registry inputs, failed cache preparation, lifecycle execution, source mutation, or missing runtime dependencies are hard failures.
|
|
201
201
|
|
|
202
|
-
A separate packed-runtime regression copies only that production Turndown/Domino closure beneath the extracted tarball and proves `@earendil-works/pi-ai`, coding-agent, TUI, and TypeBox are absent from the package-local `node_modules`. Pi's real SDK loader must still activate and shut down
|
|
202
|
+
A separate packed-runtime regression copies only that production Turndown/Domino closure beneath the extracted tarball and proves `@earendil-works/pi-ai`, coding-agent, TUI, and TypeBox are absent from the package-local `node_modules`. Pi's real SDK loader must still activate both compiled default entrypoints, invoke the delegate, attested, Fusion, task-manager, and Fusion-selector lazy lanes through their public surfaces, reach post-import semantic validation, and shut down cleanly. A source-graph guard requires every host-sensitive internal dynamic-import issuer to retain its alias-aware host import. This catches native lazy imports that bypass Pi's host aliases; the fixture no longer symlinks the development `node_modules`, which previously masked that entire installed-package failure class. Direct Node imports of private `dist/src/**` implementation chunks are not package entrypoint tests.
|
|
203
203
|
|
|
204
204
|
Fusion-specific targeted gates:
|
|
205
205
|
|
|
@@ -255,7 +255,7 @@ Implemented coverage includes:
|
|
|
255
255
|
- durability: `tests/unit/durable-fs.test.ts` covers the shared `src/core/durable-fs.ts` primitive used for metadata, event/stderr buffers, attestations, delegate/Fusion artifacts, and configuration — single-open write/sync/close ordering, exclusive `wx` temp creation at `0o600`, direct `w` writes with inherited mode, never reopening a pathname merely to flush it, temp ownership, primary-versus-cleanup error precedence, `renameCompleted` after a post-rename directory failure, the Windows directory-sync skip, atomic replacement, and fatal `fsync` failures. Ordinary task `.output` is a streaming file ended/drained before terminal metadata and is not explicitly fsynced. `tests/package/package.test.ts` mutation guards pin the durable-helper invariants
|
|
256
256
|
- safety: kill, already-finished kill failure, timeout failure, spawn failure, low output-cap failure, multi-task shutdown cleanup, POSIX process-group kill fallback, Windows `taskkill /T` then `/T /F` tree termination with shared soft attempts, soft-abort-on-force, exit-128 race tolerance, loud force failures, no root-only fallback, SIGKILL escalation that terminates instead of re-arming (a SIGKILL never schedules a further escalation, and concurrent stop requests share exactly one escalation timer that is cleared on finalize), duplicate finalization/notification races, metadata/notification failure handling, and pruning
|
|
257
257
|
- agent loop: deterministic scripted-provider coverage against `extensions/background-tasks.ts` for actual event-driven `bg_run` behavior. The provider observes the effective system prompt, public tool descriptions, and real launch receipt and deliberately emits the pre-fix `bg_status` poll if any contract layer is absent; the passing path proves one launch, no sleep/status/log polling, one durable terminal notification, and exactly one follow-up turn. It also covers notification-only `triggerOnCompletion:false`, `/bg` display-only behavior, `notifyOnCompletion:false`, failed-task notification error fields, and parent-model `fusion_reason` tool use followed by normal parent response
|
|
258
|
-
- package: manifest, docs, ordered `pi.extensions`, exported `src/core/extension-api.ts`, registry-only production dependencies, host-provided Pi AI peer posture, packed runtime files/notices, production-only no-host-peer
|
|
258
|
+
- package: manifest, docs, ordered `pi.extensions`, exported `src/core/extension-api.ts`, registry-only production dependencies, host-provided Pi AI peer posture, packed runtime files/notices, production-only no-host-peer activation plus all public lazy lanes and shutdown, alias-aware dynamic-import issuer guards, tarball-install smoke, direct-completion import bans, test/helper/script/artifact exclusion, compiler-tree type-escape and file-URL provenance guards, explicitly prepared isolated offline npm installation with an empty-cache negative control and real transitive load, exact-version compatibility, and current-host persisted/replayed tool-usage safety
|
|
259
259
|
|
|
260
260
|
## PTY notes
|
|
261
261
|
|
package/TEST_PLAN.md
CHANGED
|
@@ -128,7 +128,7 @@ SDK/RPC/scripted-provider/package/compatibility coverage asserts exactly four to
|
|
|
128
128
|
| Process lifecycle/races | registry core | yes | yes | yes | | yes | | yes | Unit tests cover POSIX process-group fallback, Windows `taskkill /T` then `/T /F` tree termination, SIGKILL escalation, duplicate finalization/notification races, notification/metadata failures, pruning, malformed telemetry, split telemetry chunks, large telemetry records above the old 16KiB buffer, and wrapped-agent transcript/telemetry separation with split-chunk and trailing-partial flush; SDK/RPC cover runtime spawn/timeout/output-cap/shutdown; scripted provider covers wakeup integration. |
|
|
129
129
|
| Compiler/source safety guards | package TypeScript and file-URL path handling | | | | | | yes | | TypeScript compiler trees reject actual explicit `any` types, directly nested assertions through multiline/parenthesized/`satisfies` wrappers, production non-null expressions, and recognized `@ts-ignore`/`@ts-expect-error`/`@ts-nocheck` comments while allowing inert comment/string/template/regex text. Alias-separated assertions are intentionally outside the direct-syntax rule, preserving validated `unknown` boundaries without claiming whole-program soundness. The URL guard separates syntax-wide self-contained hazards from finite flow provenance, with distinct normal/break/continue/return/explicit-throw completions and `finally` processing. It uses WHATWG preprocessing/absolute-first classification for static strings and static-head templates; `./`/`../` heads use explicit bases, while proven absolute first values ignore them. It covers inline/variable/import-meta provenance, constructor/object/`pathToFileURL` aliases, exact lowercase `import.meta['url']` versus uppercase intrinsic `globalThis['URL']` keys, computed pathname keys, declaration/assignment/statically known `for...of` destructuring, and Windows drive/UNC fixtures; and retains any explicitly traced may-file branch. Unknown dynamic first values remain unknown but join an explicit base as a possible relative branch; known absolute HTTP(S), definite overwrites, and compiler-resolved shadowed `URL`/`globalThis` bindings are controls. Calls, implicit exceptions, interprocedural/later-closure effects, and heap/proxy mutation are documented limits; no source-file allowlist suppresses findings. |
|
|
130
130
|
| Package manifest | `package.json` | | | | | | yes | | Keywords, ordered `pi.extensions`, files/notices, registry-only production dependencies, local smoke/compat scripts, and direct-completion import bans. |
|
|
131
|
-
| Pack contents | `npm pack --dry-run`, `npm run test:pnpm-pack` | | | | | | yes | | Runtime files and third-party notice included; tests, fake child helpers, release-only scripts, artifacts, nested tarballs, and `node_modules` excluded. An extracted-tarball fixture adds only physical copies of the production Turndown/Domino closure, proves every Pi host peer is absent package-locally, and
|
|
131
|
+
| Pack contents | `npm pack --dry-run`, `npm run test:pnpm-pack` | | | | | | yes | | Runtime files and third-party notice included; tests, fake child helpers, release-only scripts, artifacts, nested tarballs, and `node_modules` excluded. An extracted-tarball fixture adds only physical copies of the production Turndown/Domino closure, proves every Pi host peer is absent package-locally, and drives both compiled entrypoints plus the public delegate, attested, Fusion, task-manager, and Fusion-selector lazy lanes to post-import semantic boundaries before exercising damaged deferred-module behavior. A source-graph guard pins alias-aware host imports on every internal dynamic-import issuer. Private `dist/src/**` chunks are not standalone Node entrypoints. Default npm tarball coverage proves an empty cache fails loudly, then seeds a separate empty task-owned cache only from a loopback registry built from lifecycle-free portable archives of the real installed Turndown/Domino production closure. A task-owned executable `prepack`/`prepare`/`postpack` sentinel pins npm 10.9.3's unsafe `--ignore-scripts` prepare behavior and npm 11.13.0's denial, proves the fixture path executes zero hooks, preserves script-bearing manifest bytes, and leaves source hashes unchanged. Every npm subprocess uses explicit task-owned user/global config, an isolated project cwd/config, `GIT_ALLOW_PROTOCOL=file`, and absolute archive/pack/install operands; a config-only hostile scoped-registry control performs no request. The registry is closed before `--offline` install, and Turndown executes with its Domino transitive dependency. Linux CI separately installs the tarball with pnpm 11.18.0 and `blockExoticSubdeps: true`. |
|
|
132
132
|
| Maintainer docs gateway | `BACKGROUND-TASKS-INSTRUCTIONS.md` | docs focused | | | | | | | Gateway requires INDEX → read-before-edit → owning-doc navigation, records current docs generate/verify/attestation workflow, preserves subscription-only frontier routing, parent/child tool separation, durability/integrity, and no self-certification. Logo reference is package-local (`docs/assets/logo.svg`) when the asset-owner file is present. |
|
|
133
133
|
| Shared architecture/API/runtime/operations docs | `docs/api`, `docs/concepts`, `docs/subsystems`, `docs/reference`, `docs/operations` | docs focused | | | | | | | The active docs engine validates frontmatter, package-local links/reference links, INDEX reachability, exact behavioral source ownership, generated runtime contracts, deterministic generated regions, and manifest freshness. Semantic receipt state is reported by default and enforced only by the optional strict attestation command. Unsupported extraction and legacy placeholders fail closed. |
|
|
134
134
|
| Package maintenance version/tag wording | `PUBLISHING.md`, `docs/operations/releasing.md` | docs focused | | | | | | | Release commands derive `VERSION` from `package.json`; observed git tags stop at `v0.6.0`, so git install/tag certification is separate from npm publishing and no nonexistent v1 tag is advertised. |
|
|
@@ -159,7 +159,7 @@ Lane A residual hardening is now covered by automated tests. No remaining harden
|
|
|
159
159
|
- [x] An incomplete response (`length`, non-`stop` stop reason) or a whitespace-only answer is never committed as a complete result, because a valid hash proves integrity but not completeness.
|
|
160
160
|
- [x] A real subscription-only run demonstrates the whole loop end to end, including that the child used both its read-only tools and the projected conversation.
|
|
161
161
|
- [x] `npm run test:full` validates baseline real TUI/PTY behavior.
|
|
162
|
-
- [x] A production-only extracted package with no private Pi SDK peers loads
|
|
162
|
+
- [x] A production-only extracted package with no private Pi SDK peers loads both compiled entrypoints, exercises every public lazy lane through Pi's real loader, and shuts down cleanly.
|
|
163
163
|
- [x] `npm run pack:dry-run` passes.
|
|
164
164
|
- [x] README claims and all plausible edge cases are exhaustively mapped in this test plan, including Fusion command/tool/model-selector public surfaces and the text-only image omission limitation.
|
|
165
165
|
- [x] Every listed edge case has automated coverage at the lowest reliable layer.
|
package/dist/package.json
CHANGED
package/docs/manifest.json
CHANGED
|
@@ -79,7 +79,7 @@
|
|
|
79
79
|
"state": "stale-authored-prose"
|
|
80
80
|
},
|
|
81
81
|
{
|
|
82
|
-
"authored_body_sha256": "sha256:
|
|
82
|
+
"authored_body_sha256": "sha256:d1e5920202ddc1368fa94148ad96906784937084d6ef5a72f1153f8dc3a4374e",
|
|
83
83
|
"covers_sources": [
|
|
84
84
|
"extensions/delegate-child.ts",
|
|
85
85
|
"src/core/delegate/artifacts.ts",
|
|
@@ -135,7 +135,7 @@
|
|
|
135
135
|
"state": "stale-authored-prose"
|
|
136
136
|
},
|
|
137
137
|
{
|
|
138
|
-
"authored_body_sha256": "sha256:
|
|
138
|
+
"authored_body_sha256": "sha256:e1fdd8fbce4cb918fb8f361b4c13b1f78fadd455a5a18b22836a6f0b466f4119",
|
|
139
139
|
"covers_sources": [
|
|
140
140
|
"extensions/background-tasks.ts",
|
|
141
141
|
"src/core/config.ts",
|
|
@@ -909,7 +909,7 @@
|
|
|
909
909
|
"image": "https://raw.githubusercontent.com/ismailsaleekh/pi-background-tasks/main/logo.png",
|
|
910
910
|
"name": "pi-background-tasks",
|
|
911
911
|
"type": "module",
|
|
912
|
-
"version": "2.6.
|
|
912
|
+
"version": "2.6.2"
|
|
913
913
|
},
|
|
914
914
|
"public_surface_ids": [
|
|
915
915
|
"command:bg",
|
|
@@ -72,7 +72,7 @@ Here, **cold** means a fresh process and empty JavaScript/Jiti module cache. It
|
|
|
72
72
|
|
|
73
73
|
The benchmark requires an explicit `--runtime source|compiled` choice. Published package entrypoints select the compiled JavaScript distribution, while source mode remains an authoritative development control. Process-only startup no longer statically imports delegate/Fusion facades, dock UI, the attribution transport, or attested execution; enabled registrations still load their lightweight facade before the extension factory resolves. Neither mode supports a native-Windows or vendor compiled-Bun timing claim without separate runs.
|
|
74
74
|
|
|
75
|
-
The package gate separately walks literal deferred imports, verifies every source target, builds its compiled counterpart, and requires the complete `dist/` closure in the tarball. A packed-copy regression installs only the real production Turndown/Domino closure, proves all Pi SDK packages and TypeBox are absent beneath the package, and loads both compiled entrypoints through Pi's real SDK loader with default capabilities.
|
|
75
|
+
The package gate separately walks literal deferred imports, verifies every source target, builds its compiled counterpart, and requires the complete `dist/` closure in the tarball. A packed-copy regression installs only the real production Turndown/Domino closure, proves all Pi SDK packages and TypeBox are absent beneath the package, and loads both compiled entrypoints through Pi's real SDK loader with default capabilities. Before damage injection it invokes `bg_delegate`, `bg_run_pi_attested`, `fusion_reason`, the task manager, and the Fusion selector; each must pass module loading and reach its expected post-import semantic boundary. It then removes one delegate producer module: startup and immediate inventory still work, the first producer invocation fails with the bounded module-specific error, and no delegate artifact is created. A source-graph guard also pins the host import on every internal dynamic-import issuer. This distinguishes supported package entrypoint traversal from unsupported direct Node imports of private `dist/src/**` chunks, without borrowing development dependencies or weakening the real payload-closure check.
|
|
76
76
|
|
|
77
77
|
Lazy lifecycle SDK coverage deliberately blocks Fusion cleanup while asserting the shared synchronous fence has already closed delegate, result, command/UI, and both Fusion lanes. A real `AgentSession.reload()` control lets production delegate preparation finish a complete artifact tree before returning, then proves the unregistered transaction is rolled back with no starter or residual run bytes. A separate claim race proves shutdown cannot consume Fusion usage without a successful retrieval, and a registered-task control proves rollback never deletes registry-owned artifacts.
|
|
78
78
|
|
|
@@ -43,6 +43,7 @@ Start from the symptom, verify the source-owned doc, then apply the remediation.
|
|
|
43
43
|
| `/fusion-models` rejects in non-TUI mode | Selector requires interactive UI | Use an interactive Pi TUI session to edit config; headless path should fail loudly. |
|
|
44
44
|
| `/bg-update` shows no update | Offline/opt-out/current-version/registry failure path | Check `PI_OFFLINE`, `PI_BG_DISABLE_UPDATE_CHECK`, `PI_BG_REGISTRY_URL`; update check is one-shot and non-blocking. |
|
|
45
45
|
| `Cannot find package '@earendil-works/pi-ai' imported from .../dist/src/core/anthropic-attribution.js` during Pi startup | A stale compiled attribution gateway crossed its lazy native-import boundary before resolving Pi's host alias | Update the package to a fixed build. Do not install or bundle a private Pi SDK copy; the gateway must resolve and inject the host-owned adapter. Start temporarily with `PI_BG_FEATURES=process pi` or `pi -ne`. |
|
|
46
|
+
| A custom extension directly imports `pi-background-tasks/dist/src/**` and reports a missing Pi SDK package | Private compiled implementation chunks were imported through Node instead of the package's Pi entrypoints | Load the package through `package.json.pi.extensions` or its documented public surfaces. If an actual package command/tool fails, report that invocation and full stack; do not install duplicate Pi SDK packages to make a private-chunk probe pass. |
|
|
46
47
|
| TypeBox/compat failure | Installed package resolved a private/nested TypeBox or used removed APIs | Keep TypeBox as Pi-provided peer and verify installed payload. See `docs/operations/releasing.md`. |
|
|
47
48
|
|
|
48
49
|
Detailed references: EventBus API (`docs/api/eventbus-v1.md`), context budgeting (`docs/concepts/context-projection-and-budgeting.md`), launch/durability (`docs/subsystems/child-launch-durability-and-safety.md`), runtime registry (`docs/reference/runtime-contracts.md`), testing (`docs/operations/testing.md`), releasing (`docs/operations/releasing.md`).
|
|
@@ -39,7 +39,7 @@ Enabled schemas, descriptions, argument preparation, renderers, and tool registr
|
|
|
39
39
|
|
|
40
40
|
Each loader is activation-local and single-flight: simultaneous cold calls await one module import but continue as independent runs. Its states are `unloaded`, `loading`, `loaded`, `failed`, and `closed`. An import failure is wrapped with a bounded module-specific diagnostic and remains sticky for that activation. The entrypoint constructs one activation-local synchronous close fence and explicitly gives it to every enabled core, Fusion, delegate, and result lane. Its first shutdown handler closes every loader, advances Fusion generation, aborts Fusion controllers, and aborts delegate preparation before any later handler can await cleanup. A module arriving after closure is discarded before its operation can create an artifact, task, or child or touch stale host APIs. Reload constructs a new facade and may retry; the closed instance is never reopened, and no process-global cache stores `pi` or host context.
|
|
41
41
|
|
|
42
|
-
The main entrypoint dynamically imports the lightweight delegate/result facade only when delegate or Fusion is enabled. Process-only startup therefore imports neither advanced facade nor verifier/producer code. Published Pi entrypoints execute precompiled JavaScript from `dist/`; authoritative TypeScript remains shipped for source/API compatibility and development tests.
|
|
42
|
+
The main entrypoint dynamically imports the lightweight delegate/result facade only when delegate or Fusion is enabled. Process-only startup therefore imports neither advanced facade nor verifier/producer code. Published Pi entrypoints execute precompiled JavaScript from `dist/`; authoritative TypeScript remains shipped for source/API compatibility and development tests. The compiled `dist/src/**` files are private chunks reached through those Pi entrypoints, not standalone Node entrypoints. Packed-package tests exercise successful delegate/result first use without any package-local Pi SDK peer.
|
|
43
43
|
|
|
44
44
|
## Seed and context policy
|
|
45
45
|
|
|
@@ -16,7 +16,7 @@ The finite grammar recognizes only a top-level immutable binding returned by the
|
|
|
16
16
|
Every registration-owning function, imported registrar, and supported activation callback is checked as a whole, including parameter declarations and initializers. Destructured registration bindings, computed or property registration methods on unknown hosts, default-parameter host aliases, initializer calls/throws/control flow, and unmodeled body returns or throws are rejected. The sole early-return form is the structurally validated synchronous Anthropic duplicate-owner guard: the exact production claim channel, exact schema field/value and closed probe shape, one local empty acknowledgement array, one adjacent direct claim emit with the exact acknowledgement append, and the positive-length bare return. A local pre-probe claim listener is not accepted. Returns inside command/tool/event handlers that own no registrations remain unrelated and legal. Extracted surfaces carry a normalized availability expression and source-derived default status through the manifest, INDEX/read gate, README facts, and generated surface contracts.
|
|
17
17
|
|
|
18
18
|
<!-- pi-docs:begin name="docs-freshness-gate" generator="scripts/docs/generate.mjs" -->
|
|
19
|
-
- Canonical package version: `2.6.
|
|
19
|
+
- Canonical package version: `2.6.2`
|
|
20
20
|
- Governed markdown docs: 42
|
|
21
21
|
- Public surfaces extracted: 32
|
|
22
22
|
- Public surfaces available by default: 31
|
|
@@ -13,7 +13,9 @@ This subsystem owns the extension entrypoint, command/tool registration, footer
|
|
|
13
13
|
|
|
14
14
|
## Entrypoint and registration
|
|
15
15
|
|
|
16
|
-
The published `dist/extensions/background-tasks.js` entrypoint is compiled from `extensions/background-tasks.ts`, which re-exports the authoritative `src/extension.ts`.
|
|
16
|
+
The published `dist/extensions/background-tasks.js` entrypoint is compiled from `extensions/background-tasks.ts`, which re-exports the authoritative `src/extension.ts`. Only the ordered paths in `package.json.pi.extensions` and the package-owned child extension paths are supported extension roots. Files under `dist/src/**` are private compiled implementation chunks, not standalone Node entrypoints. Importing one directly from an unrelated natively loaded extension bypasses Pi's Jiti host-module aliases and is unsupported. The packed-package gate instead exercises every public lazy lane through the real package entrypoint with no package-local Pi SDK or TypeBox installation.
|
|
17
|
+
|
|
18
|
+
Before creating the registry or registering a surface, the extension strictly parses the shared capability/shortcut configuration. It dynamically imports delegate/Fusion facade registration only for enabled capabilities; the dock component is imported only when an interactive manager is opened. `process` is mandatory and registers:
|
|
17
19
|
|
|
18
20
|
- commands: `/bg`, `/tasks`, `/bg-tasks`, `/bg-clear`, `/bg-update`, `/jobs`, `/logs`, `/kill`;
|
|
19
21
|
- tools: `bg_run`, `bg_status`, `bg_logs`, `bg_kill`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pi-background-tasks",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.2",
|
|
4
4
|
"description": "Pi extension for durable background shell tasks, read-only delegated agents, local attested Pi runs, and fixed-purpose Fusion workflows through child Pi processes.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "ISC",
|