@prjct.app/pi-signals 0.0.0-stage → 0.1.0

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/CHANGELOG.md ADDED
@@ -0,0 +1,8 @@
1
+ ## 0.1.0 (2026-10-07)
2
+
3
+ - Capture latency regressions, crashes and concrete response-quality regressions in global `.prjct/shared/signals/signals.sqlite`, with original evidence, versions and model/reasoning provenance.
4
+ - Deduplicate sightings across sessions and subagents; preserve all observations and requeue when new evidence arrives.
5
+ - Run daily triage through Pi's public SDK with the originating model and reasoning; distinguish actionable, intermittent and insufficient-evidence findings.
6
+ - Prepare isolated repair candidates, replay unchanged regression tests on base and candidate, run package checks and require semantic review before marking a candidate verified.
7
+ - Add an npm-shipped worker CLI and a macOS daily scheduler. Capture makes no model requests; unchanged signals do not trigger repeated daily analysis.
8
+ - Reuse pi-secrets protection before persistence and model requests. GitHub issues, PR publication and remote merge are outside the local MVP.
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 prjct
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
20
+ OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,72 @@
1
- # Temporary Holding Version
1
+ # Pi Signals
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Failure signals for Pi: capture locally, triage daily, prepare and verify repairs. The active agent owns detection and semantic decisions. This extension does not use JEV, a classifier, a cheaper replacement model, or an independent context-compaction policy.
4
+
5
+ ## Local MVP
6
+
7
+ 1. `signal_report` records an issue in `${PRJCT_HOME:-~/.prjct}/shared/signals/signals.sqlite`. Categories are `latency`, `crash`, and `response-quality`. Reports include reproduction steps, expected/actual results, exact session evidence, package version and originating model/reasoning. Capture performs no network or generation requests.
8
+ 2. The daily worker reviews new signals with Pi's public SDK. It chooses `attention`, `flaky`, or `needs_evidence`. Flaky requires mixed results from the same reproduction command. The agent interprets the evidence; a transient error alone is not a diagnosis.
9
+ 3. When repair is enabled, actionable signals get an isolated Git worktree. A repair candidate must add a new regression test. The coordinator copies those exact test files to the unchanged base, requires the specific failure there three times, requires success on the candidate three times, runs configured package validation and obtains a semantic review with the same model/reasoning. Changed candidates or moved bases are rejected.
10
+
11
+ The MVP retains verified commits and branches locally. It does **not** create GitHub issues, publish PRs or merge remotely. A verified candidate is not marked resolved. Those external delivery steps require a separately enabled implementation after the MVP scope is settled. Passing these checks provides evidence for a specific defect, not proof of general model intelligence improvement.
12
+
13
+ ## Installation
14
+
15
+ ```sh
16
+ pi install npm:@prjct.app/pi-signals@0.1.0
17
+ ```
18
+
19
+ Node >=22.19 and Pi >=1.0.4 are required. The CLI is shipped inside the npm package; no source checkout or development loader is required. SDKs are peer dependencies and privacy protection comes from the independent `@prjct.app/pi-secrets` dependency. Existing sessions load the extension on an idle `/reload`; installation does not restart them.
20
+
21
+ ## Agent tools and commands
22
+
23
+ - `signal_report`: select minimal evidence, a stable signature identifying the component and failure mechanism, and one of the three signal categories. The same signature groups repeated sightings; repeated submission of the same session evidence is deduplicated.
24
+ - `signal_inspect`: list `targets`, `issues`, or `observations`. Supply `issueId` for persisted issue observations. Pages have explicit continuation offsets; history is never trimmed.
25
+ - `/signals`: show recent local issues and the configured daily time.
26
+ - `pi-signals status`, `show <id>` and `retry <id>`: inspect or explicitly requeue a signal.
27
+ - `pi-signals once`: run queued triage/repair now. `once --scheduled` respects the daily clock and completed-day record.
28
+ - `pi-signals schedule install`: install a macOS LaunchAgent using the absolute installed npm CLI path. An hourly OS wake checks the configured timezone; the worker runs once after the configured hour and catches up after sleep/login. There is no resident polling process inside Pi. Other platforms can schedule `once --scheduled` hourly with their OS scheduler.
29
+
30
+ Native non-cancelled compaction failures are retained as protected session observations. The active agent can inspect and report them. This is not a process-crash monitor: a killed Pi process cannot execute an extension hook. Crash traces discovered by a later session can be reported with their original evidence.
31
+
32
+ ## Global configuration
33
+
34
+ Only `${PRJCT_HOME:-~/.prjct}/shared/signals/config.json` controls automation. Project files cannot expand its authority. Example:
35
+
36
+ ```json
37
+ {
38
+ "enabled": true,
39
+ "hour": 9,
40
+ "minute": 0,
41
+ "timezone": "America/Cancun",
42
+ "repair": true,
43
+ "delivery": "local",
44
+ "packages": ["@prjct.app/"],
45
+ "repositories": {
46
+ "@prjct.app/pi-signals": {
47
+ "path": "/absolute/path/to/pi-signals",
48
+ "base": "main",
49
+ "setup": ["npm ci --ignore-scripts --no-audit --no-fund"],
50
+ "tests": ["npm run check", "npm test", "npm run build"]
51
+ }
52
+ }
53
+ }
54
+ ```
55
+
56
+ The checkout is repair input, not how the extension is installed. The original checkout is left untouched; worktrees, worker sessions and run evidence live under the global signals directory. Repository bindings and their commands are trusted operator configuration. Workers need real commands to verify a fix; `bash` is not a security sandbox. Repair defaults off until bindings and validation commands are configured. Missing bindings/models, failed tests or insufficient evidence retain a visible blocked/pending signal instead of guessing a substitute or claiming success.
57
+
58
+ The originating provider/model/reasoning are used for triage, repair and review. Signals without model provenance use Pi's configured default. Effective native compaction, retry and thinking-budget settings are preserved. By default the worker admits pi-secrets, pi-context-control and pi-self-compact; add provider extensions explicitly through `workerPackages` if needed. It does not load unrelated ambient project extensions.
59
+
60
+ Triage is serial. Unchanged reviewed signals are not sent to a model every day; new evidence requeues them. Flaky and insufficient-evidence findings remain stored and can be retried explicitly. A shared SQLite lease prevents concurrent workers; stale workers cannot overwrite decisions. Interrupted runs retain evidence and can recover. No issue history or original conversation is silently deleted.
61
+
62
+ ## Evidence and privacy
63
+
64
+ Reports must quote current-branch evidence exactly. A claim of reproduction requires actual tool output or a native SDK observation. Author language and original session history remain intact. Workspace/home paths and recognized secrets are protected before report persistence; privacy failure saves no draft. Stored reports and validation results are protected again before model use. Never include unrelated private source or user data in a signal.
65
+
66
+ Latency needs comparable workloads, repeated measurements and environmental context. Crashes need a trigger plus stack/exit evidence. Response-quality regressions need specific original constraints and expected versus observed behavior with a controlled baseline. A small deterministic fixture does not establish a general quality gain.
67
+
68
+ ## Subagents and validation
69
+
70
+ With `@prjct.app/pi-subagents` >=0.5.5, explicitly add `@prjct.app/pi-signals` to its global `extensionPackages`, preserving the other packages. All admitted child roles can record signals while keeping their existing file/command boundaries and model/reasoning. They share the global database for deduplication.
71
+
72
+ Run `npm run check`, `npm test`, `npm run build`, and `npm run check:package`. Tests isolate credentials/state and use offline model fixtures. Validate the installed host with the other extensions and both child runners before releasing.