@tryinget/pi-agent-vent 0.1.0 → 0.1.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 +3 -2
- package/docs/project/2026-05-21-agent-vent-design.md +2 -2
- package/docs/project/2026-05-21-agent-vent-implementation-plan.md +2 -2
- package/docs/project/product-posture.md +3 -3
- package/extensions/agent-vent.ts +6 -8
- package/package.json +1 -1
- package/tests/agent-vent-extension.test.js +2 -2
package/README.md
CHANGED
|
@@ -18,8 +18,9 @@ It is intentionally local-first and advisory. It does **not** create AK tasks, G
|
|
|
18
18
|
|
|
19
19
|
- Workspace path: `packages/pi-agent-vent`
|
|
20
20
|
- Release component key: `pi-agent-vent`
|
|
21
|
-
- Package command: `/agent_vent`
|
|
21
|
+
- Package command: `/agent_vent`
|
|
22
22
|
- LLM tool: `agent_vent`
|
|
23
|
+
- Toolbox bundle id: `agent_vent`
|
|
23
24
|
|
|
24
25
|
## Why this exists
|
|
25
26
|
|
|
@@ -92,7 +93,7 @@ The tool prompt tells the agent to avoid ordinary status updates, raw logs, secr
|
|
|
92
93
|
/agent_vent path
|
|
93
94
|
```
|
|
94
95
|
|
|
95
|
-
|
|
96
|
+
The runtime-facing name is intentionally singular: use `agent_vent` for the LLM tool, `/agent_vent` for the command, and `agent_vent` for the toolbox bundle id. Review queue, outcome, compare, retention-candidate, retention-history, export, and detail output include advisory human-review hints, explicit local decision-posture projections, exact local next-action commands for review state, draft-only handoff targets, export prompts, retention preview eligibility, and rollback-candidate commands from archive receipts; generated commands quote dynamic recurrence keys/paths so legacy keys remain copyable. Decision posture is derived local diagnostic wording only: it is not resolution, assignment, issue status, task truth, incident state, evidence, or publication. Filtered compare follow-up commands preserve supported category/tag/tool/package filters for `outcomes`, `retention candidates`, and `export`. Export filters are local diagnostic focus aids only, not evidence scoping, publication, owner routing, or owner assignment; export applies review-state and facet scope before counts, summaries, display rows, and safe local follow-up commands. Outcome and compare limits are explicit per review-state bucket so `outcomes all 1` can show one `new`, one `acknowledged`, one `dismissed`, and one `escalation_drafted` group, while `compare 1` shows at most one group per state. Review/outcome/compare/export/retention-candidate/history command syntax fails closed before store reads for unknown filters, empty filter values such as `owner=` or `tag=`, invalid states/arguments, invalid category values, or invalid retention-history arguments. These surfaces are guidance only and do not route, file, create, declare, assign, record evidence, publish, archive, restore, or mutate owner systems.
|
|
96
97
|
|
|
97
98
|
## Deeper Pi integration
|
|
98
99
|
|
|
@@ -129,7 +129,7 @@ Important behavior:
|
|
|
129
129
|
|
|
130
130
|
### `/agent_vent`
|
|
131
131
|
|
|
132
|
-
Human/operator command for lightweight inspection.
|
|
132
|
+
Human/operator command for lightweight inspection. The command name is intentionally singular: `/agent_vent`.
|
|
133
133
|
|
|
134
134
|
- `/agent_vent help`
|
|
135
135
|
- `/agent_vent summary`
|
|
@@ -168,7 +168,7 @@ This heuristic intentionally errs toward surfacing review candidates, not assert
|
|
|
168
168
|
|
|
169
169
|
- ASC/`self` owns operational introspection, subagent/runtime control, and mirror-only handoff/progress summaries.
|
|
170
170
|
- `pi-agent-vent` owns local diagnostic vent records, redaction, recurrence grouping, and advisory candidate-incident heuristics.
|
|
171
|
-
- `pi-toolbox-discovery` owns discovery/activation of the already-registered `agent_vent` tool through the same-named `agent_vent` bundle.
|
|
171
|
+
- `pi-toolbox-discovery` owns discovery/activation of the already-registered `agent_vent` tool through the same-named `agent_vent` bundle; `agent-vent` is not a runtime alias.
|
|
172
172
|
|
|
173
173
|
This keeps vent persistence from becoming hidden ASC state while still making the capability discoverable during autonomous work.
|
|
174
174
|
|
|
@@ -19,7 +19,7 @@ Create a new simple-package monorepo package from `pi-extensions-template` and r
|
|
|
19
19
|
|
|
20
20
|
- Package exists at `packages/pi-agent-vent` with tracked `.copier-answers.yml` and template-aligned metadata.
|
|
21
21
|
- `agent_vent` custom tool supports `record`, `summary`, `list`, and `path` actions.
|
|
22
|
-
- `/agent_vent` command supports human-readable `help`, `summary`, `list`, and `path` inspection, with `/agent-vent`
|
|
22
|
+
- `/agent_vent` command supports human-readable `help`, `summary`, `list`, and `path` inspection, with no `/agent-vent` runtime alias.
|
|
23
23
|
- Durable data is append-only JSONL at `~/.pi/agent/agent-vent/vents.jsonl` or `PI_AGENT_VENT_DIR`.
|
|
24
24
|
- Records are minimized, schema-versioned, and redacted for common secret patterns.
|
|
25
25
|
- Recurrence grouping and candidate-incident heuristics are implemented in testable core code.
|
|
@@ -38,7 +38,7 @@ Create a new simple-package monorepo package from `pi-extensions-template` and r
|
|
|
38
38
|
- grouping, candidate-incident, and formatting helpers.
|
|
39
39
|
3. Replace `extensions/agent-vent.ts` scaffold command:
|
|
40
40
|
- register `agent_vent` custom tool with clear prompt guidelines;
|
|
41
|
-
- register `/agent_vent` inspection command
|
|
41
|
+
- register `/agent_vent` inspection command only; do not add `/agent-vent` as a runtime alias;
|
|
42
42
|
- keep all storage local; avoid network and owner-surface writes.
|
|
43
43
|
4. Add `tests/vent-store.test.js` for redaction, record creation, JSONL round-trip, and summary grouping.
|
|
44
44
|
5. Update package metadata and docs:
|
|
@@ -51,7 +51,7 @@ When an agent keeps hitting the same bug, missing affordance, brittle workflow,
|
|
|
51
51
|
|
|
52
52
|
- maturity: `local diagnostic alpha, review-and-retention safety hardened; privacy, review-command, outcome-follow-up, review-filter, review-compare, follow-up-scope, export-scope, export-follow-up, review-decision-legibility, destructive-selection, retention-history, public-contract parity, unpacked-artifact contract, installed-command smoke, installed shadow registered-tool smoke, and release-metadata alignment membranes verified`
|
|
53
53
|
- current capability baseline: local append-only vent capture with optional local tool/package facets, recurrence grouping, local facet summary, local operator review queue with fail-closed-before-store-read command syntax and read-only category/tag/tool/package facet filters, read-only per-state review outcome follow-up buckets, read-only cross-state review comparison without archive/restore tokens, explicit derived local decision-posture projections, curation-aware recurrence resolution for review-state commands and record feedback, filter-preserving supported follow-up commands including record/state-scoped facet export, export-local-follow-up guidance without archive/restore tokens, read-only reviewed-group retention candidate planning without archive tokens, read-only retention receipt history with rollback-candidate restore command reconstruction, advisory human-review hints, quoted state-aware local next-action guidance that round-trips legacy recurrence keys, bounded representative-sample detail, review-state events, append-only recurrence curation projections with remove/undo events, diagnostic-state load membrane with privacy metadata recomputation, facet-aware draft-only owner-surface text generation, lifecycle stats/export projections, lock/hash-guarded confirmation-gated retention archive/restore with duplicate-id-safe record selection, local backup receipts, and rollback safeguards, advisory candidate-incident heuristic, redaction/minimization, `/agent_vent` inspection command, toolbox discovery, ASC/self companion routing, self-contained public-artifact validation for advertised package scripts/docs, no-auth installed-artifact shadow registered-tool `agent_vent path` release smoke with isolated npm prefix/cache and vent storage, installed-tarball local-path package-discovery `/agent_vent path` release smoke with isolated Pi settings, npm prefix/cache, and vent store, explicit local `npm:<tarball>` install-source validation, and package-local release metadata alignment checks for `repository.directory`, `x-pi-template.workspacePath`, and `x-pi-template.releaseComponent`
|
|
54
|
-
- release posture: first
|
|
54
|
+
- release posture: first published package release is `0.1.0` on npm; `0.1.1` removed the `/agent-vent` command alias and kept runtime-facing naming singularly `agent_vent`; source/package version `0.1.2` hardens extension load against stale review-state imports during reload; unpacked tarball contract has artifact-local `npm install && npm run check` proof, artifact-only quick release checks install the packed tarball into an isolated npm prefix and execute the installed artifact's registered `agent_vent` tool `action=path` through a shadow import against isolated vent storage without Pi auth, full release checks additionally validate local `npm:<tarball>` as the install source and smoke the installed packed artifact through local-path Pi package discovery by running `/agent_vent path` with isolated Pi settings, isolated npm prefix/cache, and isolated vent storage, and package-local structure validation fails closed on release metadata drift against `.copier-answers.yml`; post-publication registry smoke installed `@tryinget/pi-agent-vent@0.1.0` into an isolated npm prefix and verified the installed artifact and shadow registered-tool `path` behavior
|
|
55
55
|
- current strategic line: harden the local review workflow before adding owner-surface escalation adapters
|
|
56
56
|
|
|
57
57
|
## Product success criteria
|
|
@@ -71,7 +71,7 @@ The package is product-healthy when:
|
|
|
71
71
|
The package currently owns:
|
|
72
72
|
|
|
73
73
|
- `agent_vent` tool with `record`, `summary`, `list`, `path`, `facets`, `review`, `outcomes`, `compare`, `set_review`, `curate`, `draft`, `stats`, `export`, and `retention` actions, including read-only local facet filters for review queues, outcome follow-up, cross-state comparison, retention-candidate planning, and read-only retention receipt history;
|
|
74
|
-
- `/agent_vent` command for local inspection and recurrence review, with `/agent-vent`
|
|
74
|
+
- `/agent_vent` command for local inspection and recurrence review, with no `/agent-vent` runtime alias;
|
|
75
75
|
- schema-versioned local JSONL storage at `~/.pi/agent/agent-vent/vents.jsonl`, local review events at `~/.pi/agent/agent-vent/review-events.jsonl`, local curation events at `~/.pi/agent/agent-vent/curation-events.jsonl`, local retention receipts at `~/.pi/agent/agent-vent/retention-events.jsonl`, and retention backups under `~/.pi/agent/agent-vent/backups/`, overridable via `PI_AGENT_VENT_DIR`;
|
|
76
76
|
- conservative redaction for common secret/token/password shapes;
|
|
77
77
|
- recurrence key derivation and grouping;
|
|
@@ -168,7 +168,7 @@ These drafts do not submit automatically. The package prepares local text, local
|
|
|
168
168
|
|
|
169
169
|
## Next frontier guidance
|
|
170
170
|
|
|
171
|
-
The next highest-leverage slice should assume the facets/review/outcomes/compare/filter/hint/detail/draft/curation/retention-candidate/retention-history/retention-archive/export/export-follow-up/review-decision-posture and public-runtime-artifact smoke membranes are the baseline and should not broaden authority. Retention now has transaction-oriented safeguards (store/review/curation-hash tokens, append/archive locking, duplicate-id-safe selected-record removal, stale-lock cleanup, receipt-failure rollback, derived restore tokens, realpath backup containment, quoted rollback commands, retention-history receipt rediscovery, and stale-restore checks) plus read-only reviewed-candidate, receipt-history, export follow-up, decision-posture, and cross-state comparison surfaces that preserve supported follow-up scope without owner-surface mutation. Local facet labels, filters, curation aliases, outcome states, comparison buckets, hints, generated commands, export snapshots, history receipts, decision posture, and draft text are diagnostic projections only; filtered export is record/state-scoped and is not evidence, publication, owner routing, or owner assignment. The clarified source-owner seam is that export/history/review scope may focus local diagnostic data but cannot make that data canonical evidence or publication, and curation-aware recurrence keys are local projection identity rather than owner-system identity; local release smoke and release metadata checks may prove package-loading and repo-local metadata alignment but cannot prove npm publication/provenance; Prompt Vault, AK, GitHub, incident, evidence, ROCS, ASC/self, toolbox surfaces, and npm publication/provenance remain separate owners. The latest contract-parity frontier is maintaining source checkout versus public runtime artifact proof together: `npm pack` contents, README/package scripts, packaged docs, release checks, installed package settings, isolated npm installation state, no-auth installed shadow registered-tool smoke, installed command smoke, local tarball install-source validation, local-path Pi package-discovery smoke, and release metadata alignment must be validated as consumed, not only from the monorepo checkout. Discovery showed local `npm:<tarball>` is useful as a Pi install input but is not a documented runtime package-discovery source like `npm:@scope/pkg@1.2.3`; the package now fails closed against falsely claiming that proof. The remaining release frontier is
|
|
171
|
+
The next highest-leverage slice should assume the facets/review/outcomes/compare/filter/hint/detail/draft/curation/retention-candidate/retention-history/retention-archive/export/export-follow-up/review-decision-posture and public-runtime-artifact smoke membranes are the baseline and should not broaden authority. Retention now has transaction-oriented safeguards (store/review/curation-hash tokens, append/archive locking, duplicate-id-safe selected-record removal, stale-lock cleanup, receipt-failure rollback, derived restore tokens, realpath backup containment, quoted rollback commands, retention-history receipt rediscovery, and stale-restore checks) plus read-only reviewed-candidate, receipt-history, export follow-up, decision-posture, and cross-state comparison surfaces that preserve supported follow-up scope without owner-surface mutation. Local facet labels, filters, curation aliases, outcome states, comparison buckets, hints, generated commands, export snapshots, history receipts, decision posture, and draft text are diagnostic projections only; filtered export is record/state-scoped and is not evidence, publication, owner routing, or owner assignment. The clarified source-owner seam is that export/history/review scope may focus local diagnostic data but cannot make that data canonical evidence or publication, and curation-aware recurrence keys are local projection identity rather than owner-system identity; local release smoke and release metadata checks may prove package-loading and repo-local metadata alignment but cannot prove npm publication/provenance; Prompt Vault, AK, GitHub, incident, evidence, ROCS, ASC/self, toolbox surfaces, and npm publication/provenance remain separate owners. The latest contract-parity frontier is maintaining source checkout versus public runtime artifact proof together: `npm pack` contents, README/package scripts, packaged docs, release checks, installed package settings, isolated npm installation state, no-auth installed shadow registered-tool smoke, installed command smoke, local tarball install-source validation, local-path Pi package-discovery smoke, and release metadata alignment must be validated as consumed, not only from the monorepo checkout. Discovery showed local `npm:<tarball>` is useful as a Pi install input but is not a documented runtime package-discovery source like `npm:@scope/pkg@1.2.3`; the package now fails closed against falsely claiming that proof. The remaining release frontier is ongoing provenance/release-process evidence for future versions, not more unlabeled local package smoke for `0.1.0`. npm publish, AK/GitHub/incident/evidence creation, and hard-delete remain out of scope unless explicitly authorized. Preserve the contract-parity lesson from this iteration: command grammar, LLM tool schema, README examples, posture docs, package `files[]`, release checks, artifact-local scripts, smoke scripts, and tests must change together; unknown syntax must fail closed before store reads even when values are empty. Do not spend the next slice on hard-delete unless a new decision explicitly supersedes [ADR 2026-05-22](../adr/2026-05-22-agent-vent-retention-delete-policy.md).
|
|
172
172
|
|
|
173
173
|
## Ownership map
|
|
174
174
|
|
package/extensions/agent-vent.ts
CHANGED
|
@@ -48,11 +48,11 @@ import {
|
|
|
48
48
|
normalizeRetentionAction,
|
|
49
49
|
normalizeReviewState,
|
|
50
50
|
RETENTION_ACTIONS,
|
|
51
|
-
REVIEW_STATES,
|
|
52
51
|
readRetentionEvents,
|
|
53
52
|
resolveRecurrenceGroup,
|
|
54
53
|
restoreRetentionBackup,
|
|
55
54
|
SEVERITIES,
|
|
55
|
+
REVIEW_STATES as STORE_REVIEW_STATES,
|
|
56
56
|
summarizeRecords,
|
|
57
57
|
summarizeReviewQueue,
|
|
58
58
|
} from "../src/vent-store.js";
|
|
@@ -74,6 +74,10 @@ const ACTIONS = [
|
|
|
74
74
|
"retention",
|
|
75
75
|
] as const;
|
|
76
76
|
const EXPORT_FORMATS = ["markdown", "json"] as const;
|
|
77
|
+
const FALLBACK_REVIEW_STATES = ["new", "acknowledged", "dismissed", "escalation_drafted"] as const;
|
|
78
|
+
const REVIEW_STATES = Array.isArray(STORE_REVIEW_STATES)
|
|
79
|
+
? STORE_REVIEW_STATES
|
|
80
|
+
: FALLBACK_REVIEW_STATES;
|
|
77
81
|
const RETENTION_CANDIDATE_STATES = ["reviewed", "all", ...REVIEW_STATES] as const;
|
|
78
82
|
|
|
79
83
|
const AgentVentParams = Type.Object({
|
|
@@ -724,12 +728,7 @@ export default function agentVentExtension(pi: ExtensionAPI) {
|
|
|
724
728
|
registerAgentVentCommand(
|
|
725
729
|
pi,
|
|
726
730
|
"agent_vent",
|
|
727
|
-
"Inspect local
|
|
728
|
-
);
|
|
729
|
-
registerAgentVentCommand(
|
|
730
|
-
pi,
|
|
731
|
-
"agent-vent",
|
|
732
|
-
"Alias for /agent_vent [help|summary|list|facets|review|outcomes|compare|curate|draft|retention|stats|export|path]",
|
|
731
|
+
"Inspect local agent_vent records: /agent_vent [help|summary|list|facets|review|outcomes|compare|curate|draft|retention|stats|export|path]",
|
|
733
732
|
);
|
|
734
733
|
}
|
|
735
734
|
|
|
@@ -787,7 +786,6 @@ function handleCommand(args: string) {
|
|
|
787
786
|
" /agent_vent export [markdown|json] [state|all] [limit] [category=bug] [tag=reload] [tool=pi-reload] [package=tryinget-pi-agent-vent]",
|
|
788
787
|
" Export a bounded local diagnostic projection, optionally facet-filtered.",
|
|
789
788
|
" /agent_vent path Show local JSONL store paths.",
|
|
790
|
-
" /agent-vent ... Backward-compatible alias.",
|
|
791
789
|
"",
|
|
792
790
|
"LLM tool: agent_vent can record minimized frustration events, local review states, local recurrence curation projections, and read-only review comparisons.",
|
|
793
791
|
"Boundary: local diagnostics only; no AK tasks, GitHub issues, incidents, evidence, telemetry, or ASC/self state are created.",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tryinget/pi-agent-vent",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.2",
|
|
4
4
|
"description": "Local pi tool for agents to record recurring frustrations, bugs, and workflow friction without creating incidents or external telemetry",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE",
|
|
@@ -23,13 +23,13 @@ function createMockPi() {
|
|
|
23
23
|
};
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
test("extension registers agent_vent tool and command
|
|
26
|
+
test("extension registers only the canonical agent_vent tool and command", () => {
|
|
27
27
|
const pi = createMockPi();
|
|
28
28
|
agentVentExtension(pi.api);
|
|
29
29
|
|
|
30
30
|
assert.equal(pi.tools.has("agent_vent"), true);
|
|
31
31
|
assert.equal(pi.commands.has("agent_vent"), true);
|
|
32
|
-
assert.equal(pi.commands.has("agent-vent"),
|
|
32
|
+
assert.equal(pi.commands.has("agent-vent"), false);
|
|
33
33
|
assert.match(pi.tools.get("agent_vent").description, /frustration/i);
|
|
34
34
|
});
|
|
35
35
|
|