ultimate-pi 0.4.0 → 0.4.1
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/.pi/PACKAGING.md +3 -2
- package/.pi/extensions/lib/harness-vcc-settings.ts +50 -0
- package/.pi/extensions/ultimate-pi-vcc.ts +17 -0
- package/.pi/harness/docs/adrs/0030-inhouse-vcc-compaction.md +40 -0
- package/.pi/harness/docs/adrs/README.md +1 -0
- package/.pi/prompts/harness-setup.md +2 -2
- package/.pi/scripts/vendor-pi-vcc-settings.stub.ts +8 -0
- package/.pi/scripts/vendor-sync-pi-vcc.sh +40 -0
- package/.pi/settings.example.json +1 -6
- package/CHANGELOG.md +9 -7
- package/THIRD_PARTY_NOTICES.md +8 -22
- package/package.json +7 -6
- package/vendor/pi-vcc/README.md +215 -0
- package/vendor/pi-vcc/UPSTREAM_PIN.md +12 -0
- package/vendor/pi-vcc/demo.gif +0 -0
- package/vendor/pi-vcc/index.ts +12 -0
- package/vendor/pi-vcc/package.json +26 -0
- package/vendor/pi-vcc/scripts/audit-sessions.ts +88 -0
- package/vendor/pi-vcc/scripts/benchmark-real-sessions.ts +25 -0
- package/vendor/pi-vcc/scripts/compare-before-after.ts +36 -0
- package/vendor/pi-vcc/scripts/dump-branch-output.ts +20 -0
- package/vendor/pi-vcc/src/commands/pi-vcc.ts +36 -0
- package/vendor/pi-vcc/src/commands/vcc-recall.ts +65 -0
- package/vendor/pi-vcc/src/core/brief.ts +381 -0
- package/vendor/pi-vcc/src/core/build-sections.ts +79 -0
- package/vendor/pi-vcc/src/core/content.ts +60 -0
- package/vendor/pi-vcc/src/core/filter-noise.ts +42 -0
- package/vendor/pi-vcc/src/core/format-recall.ts +27 -0
- package/vendor/pi-vcc/src/core/format.ts +49 -0
- package/vendor/pi-vcc/src/core/lineage.ts +26 -0
- package/vendor/pi-vcc/src/core/load-messages.ts +41 -0
- package/vendor/pi-vcc/src/core/normalize.ts +66 -0
- package/vendor/pi-vcc/src/core/recall-scope.ts +14 -0
- package/vendor/pi-vcc/src/core/render-entries.ts +55 -0
- package/vendor/pi-vcc/src/core/report.ts +237 -0
- package/vendor/pi-vcc/src/core/sanitize.ts +5 -0
- package/vendor/pi-vcc/src/core/search-entries.ts +221 -0
- package/vendor/pi-vcc/src/core/settings.ts +8 -0
- package/vendor/pi-vcc/src/core/skill-collapse.ts +35 -0
- package/vendor/pi-vcc/src/core/summarize.ts +157 -0
- package/vendor/pi-vcc/src/core/tool-args.ts +14 -0
- package/vendor/pi-vcc/src/details.ts +7 -0
- package/vendor/pi-vcc/src/extract/commits.ts +69 -0
- package/vendor/pi-vcc/src/extract/files.ts +80 -0
- package/vendor/pi-vcc/src/extract/goals.ts +79 -0
- package/vendor/pi-vcc/src/extract/preferences.ts +55 -0
- package/vendor/pi-vcc/src/hooks/before-compact.ts +314 -0
- package/vendor/pi-vcc/src/sections.ts +12 -0
- package/vendor/pi-vcc/src/tools/recall.ts +109 -0
- package/vendor/pi-vcc/src/types.ts +14 -0
- package/vendor/pi-vcc/tests/before-compact-hook.test.ts +204 -0
- package/vendor/pi-vcc/tests/before-compact.test.ts +145 -0
- package/vendor/pi-vcc/tests/brief.test.ts +206 -0
- package/vendor/pi-vcc/tests/build-sections.test.ts +59 -0
- package/vendor/pi-vcc/tests/compile.test.ts +80 -0
- package/vendor/pi-vcc/tests/content.test.ts +31 -0
- package/vendor/pi-vcc/tests/extract-goals.test.ts +86 -0
- package/vendor/pi-vcc/tests/extract-preferences.test.ts +30 -0
- package/vendor/pi-vcc/tests/filter-noise.test.ts +61 -0
- package/vendor/pi-vcc/tests/fixtures.ts +61 -0
- package/vendor/pi-vcc/tests/format-recall.test.ts +30 -0
- package/vendor/pi-vcc/tests/format.test.ts +62 -0
- package/vendor/pi-vcc/tests/lineage.test.ts +33 -0
- package/vendor/pi-vcc/tests/load-messages.test.ts +51 -0
- package/vendor/pi-vcc/tests/normalize.test.ts +97 -0
- package/vendor/pi-vcc/tests/real-sessions.test.ts +38 -0
- package/vendor/pi-vcc/tests/recall-expand.test.ts +15 -0
- package/vendor/pi-vcc/tests/recall-scope.test.ts +32 -0
- package/vendor/pi-vcc/tests/recall-tool-scope.test.ts +67 -0
- package/vendor/pi-vcc/tests/render-entries.test.ts +62 -0
- package/vendor/pi-vcc/tests/report.test.ts +44 -0
- package/vendor/pi-vcc/tests/sanitize.test.ts +24 -0
- package/vendor/pi-vcc/tests/search-entries.test.ts +144 -0
- package/vendor/pi-vcc/tests/support/load-session.ts +23 -0
- package/vendor/pi-vcc/tests/support/real-sessions.ts +51 -0
- package/.pi/pi-vcc-config.json +0 -4
package/.pi/PACKAGING.md
CHANGED
|
@@ -13,16 +13,17 @@ Aligned with [pi packages](https://github.com/badlogic/pi-mono/blob/main/package
|
|
|
13
13
|
Pi does **not** define `scripts`, `agents`, or `providers` in the manifest.
|
|
14
14
|
|
|
15
15
|
- **Harness scripts** → `.pi/scripts/` — run via `node` / `bash` and `$UP_PKG` (see `.pi/scripts/README.md`); do not require npm script aliases in consumer `package.json`
|
|
16
|
-
- **Subagent agents** → `.pi/agents/**/*.md`
|
|
16
|
+
- **Subagent agents** → `.pi/agents/**/*.md` (loaded by `@tintinweb/pi-subagents` from the **project** `.pi/agents/`; `/harness-setup` seeds them from the installed package)
|
|
17
17
|
- **Providers** → install via `bundledDependencies` + user settings, not a separate manifest directory
|
|
18
18
|
|
|
19
19
|
## npm `files` allowlist
|
|
20
20
|
|
|
21
21
|
We use an explicit allowlist (not the whole `.pi/` tree) so dev-only artifacts never ship:
|
|
22
22
|
|
|
23
|
-
- No `.pi/harness/runs/`, local `model-router.json`, or
|
|
23
|
+
- No `.pi/harness/runs/`, local `model-router.json`, or `firecrawl/.env`
|
|
24
24
|
- Ship `.pi/settings.example.json`, not `.pi/settings.json` (dev checkout uses `".."` local package)
|
|
25
25
|
- Include **`vendor/pi-model-router/`** ([`pi-model-router`](https://github.com/yeliu84/pi-model-router), MIT) — see repo [`THIRD_PARTY_NOTICES.md`](../THIRD_PARTY_NOTICES.md); refresh with `npm run vendor:sync-router`
|
|
26
|
+
- Include **`vendor/pi-vcc/`** ([`pi-vcc`](https://github.com/sting8k/pi-vcc), MIT; inspired by [lllyasviel/VCC](https://github.com/lllyasviel/VCC)) — loaded via `.pi/extensions/ultimate-pi-vcc.ts`; refresh with `npm run vendor:sync-vcc`
|
|
26
27
|
|
|
27
28
|
## Settings
|
|
28
29
|
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ultimate-pi VCC configuration — env only (no config files).
|
|
3
|
+
*
|
|
4
|
+
* @see https://github.com/sting8k/pi-vcc (vendored algorithm)
|
|
5
|
+
* @see https://github.com/lllyasviel/VCC
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
export interface PiVccSettings {
|
|
9
|
+
/** When true, VCC handles /compact, auto-threshold, and overflow compaction. */
|
|
10
|
+
overrideDefaultCompaction: boolean;
|
|
11
|
+
/** Write debug snapshot to /tmp/pi-vcc-debug.json on each compaction. */
|
|
12
|
+
debug: boolean;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const FALSE_VALUES = new Set(["false", "0", "off", "no"]);
|
|
16
|
+
const TRUE_VALUES = new Set(["true", "1", "on", "yes"]);
|
|
17
|
+
|
|
18
|
+
function parseHarnessBool(envName: string, defaultValue: boolean): boolean {
|
|
19
|
+
const raw = process.env[envName]?.trim().toLowerCase();
|
|
20
|
+
if (!raw) {
|
|
21
|
+
return defaultValue;
|
|
22
|
+
}
|
|
23
|
+
if (FALSE_VALUES.has(raw)) {
|
|
24
|
+
return false;
|
|
25
|
+
}
|
|
26
|
+
if (TRUE_VALUES.has(raw)) {
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
return defaultValue;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Whether VCC overrides Pi built-in LLM compaction (default: true). */
|
|
33
|
+
export function resolveOverrideDefaultCompaction(): boolean {
|
|
34
|
+
return parseHarnessBool("HARNESS_VCC_COMPACTION", true);
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
/** Compaction debug snapshots (default: false). */
|
|
38
|
+
export function resolveVccDebug(): boolean {
|
|
39
|
+
return parseHarnessBool("HARNESS_VCC_DEBUG", false);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
export function loadSettings(): PiVccSettings {
|
|
43
|
+
return {
|
|
44
|
+
overrideDefaultCompaction: resolveOverrideDefaultCompaction(),
|
|
45
|
+
debug: resolveVccDebug(),
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** No-op — harness VCC does not scaffold or read JSON config files. */
|
|
50
|
+
export function scaffoldSettings(): void {}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-house VCC compaction for ultimate-pi.
|
|
3
|
+
*
|
|
4
|
+
* Vendored compaction core from [pi-vcc](https://github.com/sting8k/pi-vcc),
|
|
5
|
+
* inspired by [VCC](https://github.com/lllyasviel/VCC).
|
|
6
|
+
*
|
|
7
|
+
* Configuration is **env-only** (no JSON config files):
|
|
8
|
+
* - `HARNESS_VCC_COMPACTION` — default on; set `false` for Pi LLM compaction on /compact + auto-compact
|
|
9
|
+
* - `HARNESS_VCC_DEBUG` — set `true` to write `/tmp/pi-vcc-debug.json` on compaction
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
13
|
+
import registerVcc from "../../vendor/pi-vcc/index.js";
|
|
14
|
+
|
|
15
|
+
export default function ultimatePiVcc(pi: ExtensionAPI): void {
|
|
16
|
+
registerVcc(pi);
|
|
17
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
# ADR 0030: In-house VCC compaction (vendored pi-vcc)
|
|
2
|
+
|
|
3
|
+
- **Status:** Accepted
|
|
4
|
+
- **Date:** 2026-05-17
|
|
5
|
+
- **Deciders:** ultimate-pi harness team
|
|
6
|
+
|
|
7
|
+
## Context
|
|
8
|
+
|
|
9
|
+
ultimate-pi depended on the npm package `@sting8k/pi-vcc` for deterministic, view-oriented session compaction (no LLM summarization call). We need that behavior by default for harness sessions, without an external package coupling, while preserving attribution to upstream [pi-vcc](https://github.com/sting8k/pi-vcc) and the conceptual [VCC](https://github.com/lllyasviel/VCC) work.
|
|
10
|
+
|
|
11
|
+
## Decision
|
|
12
|
+
|
|
13
|
+
1. Vendor [sting8k/pi-vcc](https://github.com/sting8k/pi-vcc) under `vendor/pi-vcc/` (refresh via `npm run vendor:sync-vcc`), following the same pattern as `vendor/pi-model-router`.
|
|
14
|
+
2. Load compaction through [`.pi/extensions/ultimate-pi-vcc.ts`](../../../extensions/ultimate-pi-vcc.ts).
|
|
15
|
+
3. Remove `@sting8k/pi-vcc` from `package.json` dependencies and from `.pi/settings*.json` `packages` arrays.
|
|
16
|
+
4. **Configuration is env-only** — no JSON config files (`PI_VCC_CONFIG_PATH` and `.pi/pi-vcc-config.json` are not used).
|
|
17
|
+
5. **Default:** `HARNESS_VCC_COMPACTION` unset → VCC overrides Pi built-in LLM compaction for `/compact`, auto-threshold, and overflow.
|
|
18
|
+
6. **Opt-out:** `HARNESS_VCC_COMPACTION=false` (also `0` / `off`) uses Pi’s LLM compaction for those paths; explicit `/pi-vcc` still uses VCC.
|
|
19
|
+
7. **Debug:** `HARNESS_VCC_DEBUG=true` writes `/tmp/pi-vcc-debug.json` on compaction (default off).
|
|
20
|
+
8. Settings implementation: [`.pi/extensions/lib/harness-vcc-settings.ts`](../../../extensions/lib/harness-vcc-settings.ts).
|
|
21
|
+
9. Compaction telemetry `details.compactor` is `ultimate-pi-vcc`.
|
|
22
|
+
|
|
23
|
+
## Consequences
|
|
24
|
+
|
|
25
|
+
### Positive
|
|
26
|
+
|
|
27
|
+
- No runtime dependency on `@sting8k/pi-vcc` npm; vendored tree is pinned and patchable.
|
|
28
|
+
- Harness-default compaction matches ADR intent (deterministic, recall-friendly summaries).
|
|
29
|
+
- Operators can revert to LLM compaction per project via one env var.
|
|
30
|
+
|
|
31
|
+
### Negative / trade-offs
|
|
32
|
+
|
|
33
|
+
- Maintainer must run `vendor:sync-vcc` to pick up upstream pi-vcc fixes.
|
|
34
|
+
- Vendored `loadSettings` re-exports harness env settings from `.pi/extensions/lib/` (couples vendor tree to ultimate-pi layout).
|
|
35
|
+
|
|
36
|
+
## References
|
|
37
|
+
|
|
38
|
+
- [THIRD_PARTY_NOTICES.md](../../../../THIRD_PARTY_NOTICES.md)
|
|
39
|
+
- [vendor/pi-vcc/UPSTREAM_PIN.md](../../../../vendor/pi-vcc/UPSTREAM_PIN.md)
|
|
40
|
+
- [`.env.example`](../../../../.env.example) — `HARNESS_VCC_COMPACTION`, `HARNESS_VCC_DEBUG`
|
|
@@ -15,6 +15,7 @@ Team-shared ADRs for the ultimate-pi harness live under `.pi/harness/docs/adrs/`
|
|
|
15
15
|
| [0007](0007-interactive-drift-monitor.md) | Interactive drift monitor | Accepted |
|
|
16
16
|
| [0008](0008-harness-posthog-telemetry.md) | Harness PostHog telemetry | Accepted |
|
|
17
17
|
| [0009](0009-sentrux-rules-lifecycle.md) | Sentrux rules.toml lifecycle | Accepted |
|
|
18
|
+
| [0030](0030-inhouse-vcc-compaction.md) | In-house VCC compaction (vendored pi-vcc) | Accepted |
|
|
18
19
|
|
|
19
20
|
## Template
|
|
20
21
|
|
|
@@ -343,7 +343,7 @@ Verify each package:
|
|
|
343
343
|
| `@posthog/pi` | Analytics event capture | F0 |
|
|
344
344
|
| `pi-lean-ctx` | Context runtime (read/bash/find/grep/MCP bridge) | F0 |
|
|
345
345
|
| `harness-subagents` (bundled extension) | L4 sub-agent spawn, blackboard, package agents | P16 |
|
|
346
|
-
|
|
|
346
|
+
| Vendored `pi-vcc` (`vendor/pi-vcc`, `.pi/extensions/ultimate-pi-vcc.ts`) | VCC compaction / `vcc_recall` — env-only: `HARNESS_VCC_COMPACTION` (default on), `HARNESS_VCC_DEBUG` | Shipped |
|
|
347
347
|
| `pi-model-router` | Vendored (`vendor/`); activates after `.pi/model-router.json` exists | F0 |
|
|
348
348
|
|
|
349
349
|
## Step 3.5 — Model Router Configuration (Dynamic)
|
|
@@ -428,7 +428,7 @@ Rules:
|
|
|
428
428
|
- Re-runs only add keys from `$UP_PKG/.pi/harness/env.harness.template` that are absent (managed block at EOF).
|
|
429
429
|
- Ensure `.env` is gitignored (Step 4.1).
|
|
430
430
|
|
|
431
|
-
Template keys (placeholders — user fills secrets): `HARNESS_TELEMETRY_ENABLED`, `HARNESS_WEB_*`, `
|
|
431
|
+
Template keys (placeholders — user fills secrets): `HARNESS_TELEMETRY_ENABLED`, `HARNESS_WEB_*`, `HARNESS_VCC_COMPACTION`, `HARNESS_VCC_DEBUG`, plus commented optional PostHog / Graphify vars.
|
|
432
432
|
|
|
433
433
|
### 4.1 — .gitignore Entries
|
|
434
434
|
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ultimate-pi harness settings (env-only). Re-exported for vendored pi-vcc layout.
|
|
3
|
+
*/
|
|
4
|
+
export type { PiVccSettings } from "../../../../.pi/extensions/lib/harness-vcc-settings.js";
|
|
5
|
+
export {
|
|
6
|
+
loadSettings,
|
|
7
|
+
scaffoldSettings,
|
|
8
|
+
} from "../../../../.pi/extensions/lib/harness-vcc-settings.js";
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Re-fetch upstream pi-vcc and re-apply ultimate-pi patches.
|
|
3
|
+
set -euo pipefail
|
|
4
|
+
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)"
|
|
5
|
+
VEND="$ROOT/vendor/pi-vcc"
|
|
6
|
+
SETTINGS_STUB="$ROOT/.pi/scripts/vendor-pi-vcc-settings.stub.ts"
|
|
7
|
+
|
|
8
|
+
rm -rf "$VEND"
|
|
9
|
+
git clone --depth 1 https://github.com/sting8k/pi-vcc.git "$VEND"
|
|
10
|
+
COMMIT="$(git -C "$VEND" rev-parse HEAD)"
|
|
11
|
+
rm -rf "$VEND/.git"
|
|
12
|
+
|
|
13
|
+
# Env-only settings (no JSON config files)
|
|
14
|
+
cp "$SETTINGS_STUB" "$VEND/src/core/settings.ts"
|
|
15
|
+
|
|
16
|
+
# Drop config scaffolding on extension load
|
|
17
|
+
sed -i '/scaffoldSettings/d' "$VEND/index.ts"
|
|
18
|
+
sed -i '/import.*scaffoldSettings/d' "$VEND/index.ts"
|
|
19
|
+
|
|
20
|
+
# Telemetry / compaction details label
|
|
21
|
+
sed -i 's/compactor: "pi-vcc";/compactor: "pi-vcc" | "ultimate-pi-vcc";/' "$VEND/src/details.ts"
|
|
22
|
+
sed -i 's/compactor: "pi-vcc"/compactor: "ultimate-pi-vcc"/' "$VEND/src/hooks/before-compact.ts"
|
|
23
|
+
|
|
24
|
+
cat >"$VEND/UPSTREAM_PIN.md" <<EOF
|
|
25
|
+
# Vendored \`pi-vcc\`
|
|
26
|
+
|
|
27
|
+
- **Repository:** https://github.com/sting8k/pi-vcc
|
|
28
|
+
- **Conceptual basis:** [lllyasviel/VCC](https://github.com/lllyasviel/VCC) (View-oriented Conversation Compiler)
|
|
29
|
+
- **License:** MIT (see upstream repository)
|
|
30
|
+
- **Pinned upstream commit:** \`$COMMIT\`
|
|
31
|
+
- **Local changes:**
|
|
32
|
+
- \`src/core/settings.ts\` re-exports env-only [\`harness-vcc-settings\`](../../.pi/extensions/lib/harness-vcc-settings.ts) (\`HARNESS_VCC_COMPACTION\`, \`HARNESS_VCC_DEBUG\`)
|
|
33
|
+
- No \`scaffoldSettings\` / no \`PI_VCC_CONFIG_PATH\`
|
|
34
|
+
- Compaction \`details.compactor\` is \`ultimate-pi-vcc\`
|
|
35
|
+
|
|
36
|
+
**Refresh upstream:** run \`npm run vendor:sync-vcc\` from ultimate-pi root.
|
|
37
|
+
EOF
|
|
38
|
+
|
|
39
|
+
rm -f "$VEND/package-lock.json"
|
|
40
|
+
echo "✓ Vendor refreshed at $VEND (commit $COMMIT)"
|
package/CHANGELOG.md
CHANGED
|
@@ -2,17 +2,19 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project are documented in this file.
|
|
4
4
|
|
|
5
|
-
## [
|
|
5
|
+
## [Unreleased]
|
|
6
6
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
- **Firecrawl removed**: deleted self-hosted `firecrawl/` Docker stack and all `firecrawl*` agent skills. Web fetch/search now uses **`harness-web`** (Scrapling). Artifact dir is **`.web/`** (not `.firecrawl/`). Remove `FIRECRAWL_API_KEY` / `FIRECRAWL_API_URL`; use `uv tool install "scrapling[fetchers]"` and `scrapling install` per `/harness-setup`.
|
|
10
|
-
- **Harness web CLI**: `python3 "$UP_PKG/.pi/scripts/harness-web.py" search|scrape|map|bulk-scrape` — see `.agents/skills/scrapling-web/SKILL.md`.
|
|
7
|
+
## [v0.4.1] — 2026-05-17
|
|
11
8
|
|
|
12
9
|
### ✨ Features
|
|
13
10
|
|
|
14
|
-
- **
|
|
15
|
-
- **Harness subagents
|
|
11
|
+
- **In-house VCC compaction:** vendored [pi-vcc](https://github.com/sting8k/pi-vcc) (inspired by [lllyasviel/VCC](https://github.com/lllyasviel/VCC)); removed `@sting8k/pi-vcc` npm dependency. Configuration is **env-only** (`HARNESS_VCC_COMPACTION`, `HARNESS_VCC_DEBUG`) — no `PI_VCC_CONFIG_PATH` or JSON config files. VCC overrides `/compact` and auto-compaction by default; set `HARNESS_VCC_COMPACTION=false` for Pi LLM compaction. Refresh upstream: `npm run vendor:sync-vcc`.
|
|
12
|
+
- **Harness subagents:** vendored harness-subagents extension with Sentrux bootstrap agent and related harness wiring.
|
|
13
|
+
- **Harness web:** replace Firecrawl with Scrapling-based `harness-web` CLI for search and fetch.
|
|
14
|
+
|
|
15
|
+
### 🔧 Chores
|
|
16
|
+
|
|
17
|
+
- Format `.pi/settings.json` / `.pi/settings.example.json` and refresh `graphify-out` after VCC merge.
|
|
16
18
|
|
|
17
19
|
## [v0.3.1] — 2026-05-15
|
|
18
20
|
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -1,30 +1,16 @@
|
|
|
1
1
|
# Third-party notices
|
|
2
2
|
|
|
3
|
-
## Design references (not vendored)
|
|
4
|
-
|
|
5
|
-
The in-house `ask_user` harness extension (`.pi/extensions/harness-ask-user.ts`) borrows **behavior and UX patterns only** from these projects. No code from them is bundled.
|
|
6
|
-
|
|
7
|
-
| Project | License | Reference |
|
|
8
|
-
|---------|---------|-----------|
|
|
9
|
-
| [pi-ask-user](https://github.com/edlsh/pi-ask-user) | MIT | Overlay/inline modes, SelectList + Editor, custom renderCall/renderResult, headless fallback |
|
|
10
|
-
| [@pi-unipi/ask-user](https://cdn.jsdelivr.net/npm/@pi-unipi/unipi@2.0.1/packages/ask-user/README.md) | (package docs) | Tool contract: `question`, `context`, `options`, `allowMultiple`, `allowFreeform` |
|
|
11
|
-
| [rpiv-ask-user-question](https://github.com/juicesharp/rpiv-mono/tree/main/packages/rpiv-ask-user-question) | MIT | Rich option rows, decision-handshake policy text, structured answer envelope |
|
|
12
|
-
|
|
13
|
-
## @tintinweb/pi-subagents (vendored in harness-subagents)
|
|
14
|
-
|
|
15
|
-
- **Project:** https://github.com/tintinweb/pi-subagents
|
|
16
|
-
- **Version pinned:** 0.7.3 (source vendored under `.pi/extensions/lib/harness-subagents/vendored/`)
|
|
17
|
-
- **License:** MIT
|
|
18
|
-
- **Notes:** Adapted for `@mariozechner/pi-coding-agent` in ultimate-pi `harness-subagents` extension. Agent discovery replaced with package-root recursive loader.
|
|
19
|
-
|
|
20
|
-
## subagent-v2 reference (design only)
|
|
21
|
-
|
|
22
|
-
- **Path:** `raw/references/subagents/extensions/subagent-v2/`
|
|
23
|
-
- **License:** Treat as third-party reference; not shipped in npm `files`. Blackboard, supervisor, and isolated session patterns were ported into `harness-subagents` without copying the earendil-works Pi stack.
|
|
24
|
-
|
|
25
3
|
## pi-model-router (vendored)
|
|
26
4
|
|
|
27
5
|
- **Project:** https://github.com/yeliu84/pi-model-router
|
|
28
6
|
- **License:** MIT ([vendor/pi-model-router/LICENSE](vendor/pi-model-router/LICENSE))
|
|
29
7
|
- **Pinned revision:** See [vendor/pi-model-router/UPSTREAM_PIN.md](vendor/pi-model-router/UPSTREAM_PIN.md)
|
|
30
8
|
- ultimate-pi loads it from [`vendor/pi-model-router`](vendor/pi-model-router); import specifiers were adapted for `@mariozechner/pi-coding-agent` and related Pi packages.
|
|
9
|
+
|
|
10
|
+
## pi-vcc (vendored)
|
|
11
|
+
|
|
12
|
+
- **Project:** https://github.com/sting8k/pi-vcc
|
|
13
|
+
- **Conceptual basis:** https://github.com/lllyasviel/VCC (View-oriented Conversation Compiler)
|
|
14
|
+
- **License:** MIT (see upstream repository)
|
|
15
|
+
- **Pinned revision:** See [vendor/pi-vcc/UPSTREAM_PIN.md](vendor/pi-vcc/UPSTREAM_PIN.md)
|
|
16
|
+
- ultimate-pi loads it from [`vendor/pi-vcc`](vendor/pi-vcc) via [`.pi/extensions/ultimate-pi-vcc.ts`](.pi/extensions/ultimate-pi-vcc.ts). Harness configuration is env-only: `HARNESS_VCC_COMPACTION`, `HARNESS_VCC_DEBUG` ([`.pi/extensions/lib/harness-vcc-settings.ts`](.pi/extensions/lib/harness-vcc-settings.ts)). Maintainer refresh: `npm run vendor:sync-vcc`.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ultimate-pi",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Ultimate AI coding harness for pi.dev — extensible skills, Obsidian wiki knowledge layer, compressed context, deterministic output",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"pi-package",
|
|
@@ -60,7 +60,6 @@
|
|
|
60
60
|
".pi/settings.example.json",
|
|
61
61
|
".pi/auto-commit.json",
|
|
62
62
|
".pi/mcp.json",
|
|
63
|
-
".pi/pi-vcc-config.json",
|
|
64
63
|
".pi/SYSTEM.md",
|
|
65
64
|
".pi/PACKAGING.md",
|
|
66
65
|
"AGENTS.md",
|
|
@@ -68,21 +67,24 @@
|
|
|
68
67
|
"CHANGELOG.md",
|
|
69
68
|
"README.md",
|
|
70
69
|
"THIRD_PARTY_NOTICES.md",
|
|
71
|
-
"vendor/pi-model-router"
|
|
70
|
+
"vendor/pi-model-router",
|
|
71
|
+
"vendor/pi-vcc"
|
|
72
72
|
],
|
|
73
73
|
"peerDependencies": {
|
|
74
74
|
"@mariozechner/pi-coding-agent": "*"
|
|
75
75
|
},
|
|
76
76
|
"scripts": {
|
|
77
|
-
"check:ts": "tsc --noEmit --target ES2023 --lib ES2023 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/dotenv-loader.ts .pi/extensions/lib/posthog-node.d.ts .pi/extensions/lib/harness-posthog.ts .pi/extensions/lib/harness-paths.ts .pi/extensions/pi-model-router-harness.ts .pi/extensions/provider-payload-sanitize.ts .pi/extensions/harness-telemetry.ts .pi/extensions/harness-ask-user.ts .pi/extensions/lib/ask-user/schema.ts .pi/extensions/lib/ask-user/types.ts .pi/extensions/lib/ask-user/validate.ts .pi/extensions/lib/ask-user/dialog.ts .pi/extensions/lib/ask-user/fallback.ts .pi/extensions/lib/ask-user/render.ts .pi/extensions/trace-recorder.ts .pi/extensions/observation-bus.ts .pi/extensions/drift-monitor.ts .pi/extensions/sentrux-rules-sync.ts .pi/extensions/custom-header.ts .pi/extensions/lib/harness-subagents/agent-loader.ts .pi/extensions/lib/harness-subagents/agent-parser.ts .pi/extensions/lib/harness-subagents/agent-manifest.ts .pi/extensions/lib/harness-subagents/blackboard.ts .pi/extensions/lib/harness-subagents/blackboard-tool.ts .pi/extensions/lib/harness-subagents/spawn-policy.ts .pi/extensions/lib/harness-subagents/types-blackboard.ts",
|
|
77
|
+
"check:ts": "tsc --noEmit --target ES2023 --lib ES2023 --moduleResolution nodenext --module nodenext --skipLibCheck .pi/extensions/lib/harness-vcc-settings.ts .pi/extensions/dotenv-loader.ts .pi/extensions/lib/posthog-node.d.ts .pi/extensions/lib/harness-posthog.ts .pi/extensions/lib/harness-paths.ts .pi/extensions/pi-model-router-harness.ts .pi/extensions/provider-payload-sanitize.ts .pi/extensions/harness-telemetry.ts .pi/extensions/harness-ask-user.ts .pi/extensions/lib/ask-user/schema.ts .pi/extensions/lib/ask-user/types.ts .pi/extensions/lib/ask-user/validate.ts .pi/extensions/lib/ask-user/dialog.ts .pi/extensions/lib/ask-user/fallback.ts .pi/extensions/lib/ask-user/render.ts .pi/extensions/trace-recorder.ts .pi/extensions/observation-bus.ts .pi/extensions/drift-monitor.ts .pi/extensions/sentrux-rules-sync.ts .pi/extensions/custom-header.ts .pi/extensions/lib/harness-subagents/agent-loader.ts .pi/extensions/lib/harness-subagents/agent-parser.ts .pi/extensions/lib/harness-subagents/agent-manifest.ts .pi/extensions/lib/harness-subagents/blackboard.ts .pi/extensions/lib/harness-subagents/blackboard-tool.ts .pi/extensions/lib/harness-subagents/spawn-policy.ts .pi/extensions/lib/harness-subagents/types-blackboard.ts",
|
|
78
78
|
"vendor:sync-router": "bash .pi/scripts/vendor-sync-pi-model-router.sh",
|
|
79
|
+
"vendor:sync-vcc": "bash .pi/scripts/vendor-sync-pi-vcc.sh",
|
|
79
80
|
"release": "bash .pi/scripts/release.sh",
|
|
80
81
|
"lint": "biome check",
|
|
81
82
|
"lint:fix": "biome check --fix",
|
|
82
83
|
"format": "biome format --write",
|
|
83
84
|
"format:check": "biome format",
|
|
84
85
|
"prepare": "lefthook install",
|
|
85
|
-
"test": "node --test test/harness-verify.test.mjs test/harness-ask-user.test.mjs test/harness-subagents-loader.test.mjs test/sentrux-rules-sync.test.mjs",
|
|
86
|
+
"test": "node --test test/harness-verify.test.mjs test/harness-ask-user.test.mjs test/harness-subagents-loader.test.mjs test/sentrux-rules-sync.test.mjs && npx -y tsx --test test/harness-vcc-settings.test.ts",
|
|
87
|
+
"test:vcc": "npx -y tsx --test vendor/pi-vcc/tests/*.test.ts",
|
|
86
88
|
"harness:sentrux-bootstrap": "node .pi/scripts/harness-sentrux-bootstrap.mjs",
|
|
87
89
|
"harness:sentrux-sync": "node .pi/scripts/sentrux-rules-sync.mjs --force",
|
|
88
90
|
"test:integration": "npx -y tsx --test test/cursor-sdk-provider.integration.test.ts"
|
|
@@ -99,7 +101,6 @@
|
|
|
99
101
|
},
|
|
100
102
|
"dependencies": {
|
|
101
103
|
"@posthog/pi": "latest",
|
|
102
|
-
"@sting8k/pi-vcc": "^0.3.12",
|
|
103
104
|
"asciify-image": "^0.1.10",
|
|
104
105
|
"croner": "^9.0.0",
|
|
105
106
|
"jimp": "^1.6.1",
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
# pi-vcc
|
|
2
|
+
|
|
3
|
+
[](https://www.npmjs.com/package/@sting8k/pi-vcc)
|
|
4
|
+
|
|
5
|
+
Algorithmic conversation compactor for [Pi](https://github.com/badlogic/pi-mono). No LLM calls — produces a brief transcript via extraction and formatting.
|
|
6
|
+
|
|
7
|
+
Inspired by [VCC](https://github.com/lllyasviel/VCC) **(View-oriented Conversation Compiler)**.
|
|
8
|
+
|
|
9
|
+
## Demo
|
|
10
|
+
|
|
11
|
+

|
|
12
|
+
|
|
13
|
+
## Why pi-vcc
|
|
14
|
+
|
|
15
|
+
| | Pi default | pi-vcc |
|
|
16
|
+
|---|---|---|
|
|
17
|
+
| **Method** | LLM-generated summary | Algorithmic extraction, no LLM |
|
|
18
|
+
| **Determinism** | Non-deterministic, can hallucinate | Same input = same output, always |
|
|
19
|
+
| **Token reduction** | Varies | 35-99% on real sessions (higher on longer sessions) |
|
|
20
|
+
| **Compaction latency** | Waits for LLM call | 30-470ms, no API calls |
|
|
21
|
+
| **History after compaction** | Gone — agent only sees summary | Active lineage searchable via `vcc_recall` (`scope:"all"` available) |
|
|
22
|
+
| **Repeated compactions** | Each rewrite risks losing more | Sections merge and accumulate |
|
|
23
|
+
| **Cost** | Burns tokens on summarization call | Zero — no API calls |
|
|
24
|
+
| **Structure** | Free-form prose | Brief transcript + 4 semantic sections |
|
|
25
|
+
|
|
26
|
+
### Real session metrics
|
|
27
|
+
|
|
28
|
+
Measured on real session JSONLs under `~/.pi/agent/sessions` (chars = rendered message text).
|
|
29
|
+
|
|
30
|
+
| Session | Messages | Before | After | Reduction | Time |
|
|
31
|
+
|---|---|---|---|---|---|
|
|
32
|
+
| Session A | 2,943 | 997,162 | 7,959 | 99.2% | 64ms |
|
|
33
|
+
| Session B | 1,703 | 428,334 | 7,762 | 98.2% | 29ms |
|
|
34
|
+
| Session C | 1,657 | 424,183 | 9,577 | 97.7% | 54ms |
|
|
35
|
+
| Session D | 1,004 | 2,258,477 | 4,439 | 99.8% | 30ms |
|
|
36
|
+
| Session E | 486 | 295,006 | 11,163 | 96.2% | 30ms |
|
|
37
|
+
| Session F | 46 | 5,234 | 3,364 | 35.7% | 5ms |
|
|
38
|
+
| Session G | 27 | 8,595 | 2,489 | 71.0% | 2ms |
|
|
39
|
+
|
|
40
|
+
## Features
|
|
41
|
+
|
|
42
|
+
- **No LLM** — purely algorithmic, zero extra API cost
|
|
43
|
+
- **Brief transcript** — chronological conversation flow, each tool call collapsed to a one-liner with `(#N)` refs, text truncated to keep it compact
|
|
44
|
+
- **5 semantic sections** — session goal, files & changes, commits, outstanding context, user preferences
|
|
45
|
+
- **Bounded merge** — rolling sections re-capped after merge instead of growing unbounded
|
|
46
|
+
- **Lossless recall** — `vcc_recall` reads raw session JSONL, so active-lineage history stays searchable across compactions
|
|
47
|
+
- **Scoped recall** — default search is active lineage; use `scope:"all"` / `scope:all` to intentionally search across all lineages
|
|
48
|
+
- **Regex search** — `vcc_recall` supports regex patterns (`hook|inject`, `fail.*build`) and OR-ranked multi-word queries
|
|
49
|
+
- **Result ranking** — search results ranked by term relevance, rare terms weighted higher than common ones
|
|
50
|
+
- **`/pi-vcc-recall`** — slash command to search history directly, results shown as collapsible message and auto-fed to agent as context
|
|
51
|
+
- **Fallback cut** — still works when Pi core returns nothing to summarize
|
|
52
|
+
- **`/pi-vcc`** — manual compaction on demand
|
|
53
|
+
|
|
54
|
+
## Install
|
|
55
|
+
|
|
56
|
+
```bash
|
|
57
|
+
pi install npm:@sting8k/pi-vcc
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
Or from GitHub:
|
|
61
|
+
|
|
62
|
+
```bash
|
|
63
|
+
pi install https://github.com/sting8k/pi-vcc
|
|
64
|
+
```
|
|
65
|
+
|
|
66
|
+
Or try without installing:
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pi -e https://github.com/sting8k/pi-vcc
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
## Usage
|
|
73
|
+
|
|
74
|
+
Once installed, pi-vcc registers a `session_before_compact` hook.
|
|
75
|
+
|
|
76
|
+
- Run `/pi-vcc` to trigger pi-vcc compaction manually.
|
|
77
|
+
- By default, `/compact` and auto-threshold compactions still go through pi core (LLM-based). Set `overrideDefaultCompaction: true` in the config to let pi-vcc handle all compaction paths.
|
|
78
|
+
- To search older active-lineage history after compaction, use `vcc_recall`.
|
|
79
|
+
- To intentionally search across all lineages, pass `scope:"all"` to `vcc_recall` or run `/pi-vcc-recall <query> scope:all`.
|
|
80
|
+
- To search and feed results to agent yourself, run `/pi-vcc-recall <query> [page:N]`.
|
|
81
|
+
- Tip: type `/recall` and Pi will autocomplete to `/pi-vcc-recall`.
|
|
82
|
+
|
|
83
|
+
### How compaction works
|
|
84
|
+
|
|
85
|
+
Pi splits the conversation at the **last user message**. Everything after — the **kept tail** — stays intact and untouched. pi-vcc only summarizes the older portion before that cut point.
|
|
86
|
+
|
|
87
|
+
### Compacted message structure
|
|
88
|
+
|
|
89
|
+
```
|
|
90
|
+
[Session Goal]
|
|
91
|
+
- Fix the authentication bug in login flow
|
|
92
|
+
- [Scope change]
|
|
93
|
+
- Also update the session token refresh logic
|
|
94
|
+
|
|
95
|
+
[Files And Changes]
|
|
96
|
+
- Modified: src/auth/session.ts
|
|
97
|
+
- Created: tests/auth-refresh.test.ts
|
|
98
|
+
|
|
99
|
+
[Commits]
|
|
100
|
+
- a1b2c3d: fix(auth): refresh token after password reset
|
|
101
|
+
|
|
102
|
+
[Outstanding Context]
|
|
103
|
+
- lint check still failing on line 42
|
|
104
|
+
|
|
105
|
+
[User Preferences]
|
|
106
|
+
- Prefer Vietnamese responses
|
|
107
|
+
- Always run tests before committing
|
|
108
|
+
|
|
109
|
+
[user]
|
|
110
|
+
Fix the auth bug, users can't log in after password reset
|
|
111
|
+
|
|
112
|
+
[assistant]
|
|
113
|
+
Root cause is a missing token refresh after password reset...
|
|
114
|
+
* bash "bun test tests/auth.test.ts" (#12)
|
|
115
|
+
* edit "src/auth/session.ts" (#14)
|
|
116
|
+
* bash "bun test tests/auth.test.ts" (#16)
|
|
117
|
+
...(28 earlier lines omitted)
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
Sections appear only when relevant — a session with no git commits won't have `[Commits]`.
|
|
121
|
+
|
|
122
|
+
**Sections:**
|
|
123
|
+
|
|
124
|
+
| Section | Description |
|
|
125
|
+
|---|---|
|
|
126
|
+
| `[Session Goal]` | Initial goal + scope changes (regex-based extraction) |
|
|
127
|
+
| `[Files And Changes]` | Modified/created files from tool calls (capped, paths trimmed to common root) |
|
|
128
|
+
| `[Commits]` | Git commits made during the session (last 8, hash + first line) |
|
|
129
|
+
| `[Outstanding Context]` | Unresolved items — errors, pending questions |
|
|
130
|
+
| `[User Preferences]` | Regex-extracted from user messages (`always`, `never`, `prefer`...) |
|
|
131
|
+
| Brief transcript | Chronological conversation flow — rolling window of ~120 recent lines, tool calls collapsed to one-liners with `(#N)` refs |
|
|
132
|
+
|
|
133
|
+
**Merge policy:**
|
|
134
|
+
- `Session Goal`, `User Preferences`: concise sticky sections
|
|
135
|
+
- `Outstanding Context`: fresh-only (replaced each compaction)
|
|
136
|
+
- `Files And Changes`, `Commits`: unique union across compactions
|
|
137
|
+
- Brief transcript: rolling window, older lines drop off
|
|
138
|
+
|
|
139
|
+
## Recall (Lossless History)
|
|
140
|
+
|
|
141
|
+
Pi's default compaction discards old messages permanently. After compaction, the agent only sees the summary.
|
|
142
|
+
|
|
143
|
+
`vcc_recall` bypasses this by reading the raw session JSONL file directly. By default it searches only the active conversation lineage, regardless of how many compactions have happened. Use `scope:"all"` only when you intentionally want to include off-lineage branches.
|
|
144
|
+
|
|
145
|
+
### Search
|
|
146
|
+
|
|
147
|
+
Queries support **regex** and **multi-word OR logic** ranked by relevance:
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
vcc_recall({ query: "auth token" }) // active-lineage OR search, ranked
|
|
151
|
+
vcc_recall({ query: "auth token", page: 2 }) // paginated (5 results/page)
|
|
152
|
+
vcc_recall({ query: "hook|inject" }) // regex pattern
|
|
153
|
+
vcc_recall({ query: "fail.*build" }) // regex pattern
|
|
154
|
+
vcc_recall({ query: "auth token", scope: "all" }) // search all lineages
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
Manual slash command:
|
|
158
|
+
|
|
159
|
+
```
|
|
160
|
+
/pi-vcc-recall auth token scope:all
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Browse
|
|
164
|
+
|
|
165
|
+
Without a query, returns the last 25 entries as brief summaries:
|
|
166
|
+
|
|
167
|
+
```
|
|
168
|
+
vcc_recall()
|
|
169
|
+
vcc_recall({ scope: "all" }) // browse recent entries across all lineages
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
### Expand
|
|
173
|
+
|
|
174
|
+
Returns full untruncated content for specific indices found via search:
|
|
175
|
+
|
|
176
|
+
```
|
|
177
|
+
vcc_recall({ expand: [41, 42] }) // active-lineage expand
|
|
178
|
+
vcc_recall({ expand: [41, 42], scope: "all" }) // expand across all lineages
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
Typical workflow: **search → find relevant entry indices → expand those indices for full content**.
|
|
182
|
+
|
|
183
|
+
> Some tool results are truncated by Pi core at save time. `expand` returns everything in the JSONL but can't recover what Pi already cut.
|
|
184
|
+
|
|
185
|
+
## Pipeline
|
|
186
|
+
|
|
187
|
+
1. **Normalize** — raw Pi messages → uniform blocks (user, assistant, tool_call, tool_result, thinking)
|
|
188
|
+
2. **Filter noise** — strip system messages, empty blocks
|
|
189
|
+
3. **Build sections** — extract goal, file paths, blockers, preferences
|
|
190
|
+
4. **Brief transcript** — chronological conversation flow, tool calls collapsed to one-liners, text truncated
|
|
191
|
+
5. **Format** — render into bracketed sections + transcript
|
|
192
|
+
6. **Merge** — if previous summary exists: sticky sections merge, volatile sections replace, transcript rolls
|
|
193
|
+
|
|
194
|
+
## Config
|
|
195
|
+
|
|
196
|
+
Config lives at `~/.pi/agent/pi-vcc-config.json` (auto-scaffolded on first load with safe defaults):
|
|
197
|
+
|
|
198
|
+
```json
|
|
199
|
+
{
|
|
200
|
+
"overrideDefaultCompaction": false,
|
|
201
|
+
"debug": false
|
|
202
|
+
}
|
|
203
|
+
```
|
|
204
|
+
|
|
205
|
+
- **`overrideDefaultCompaction`** *(default `false`)*: when `false`, pi-vcc only runs for `/pi-vcc`; `/compact` and auto-threshold compactions fall through to pi core. Set `true` to make pi-vcc handle all compaction paths.
|
|
206
|
+
- **`debug`** *(default `false`)*: when `true`, each compaction writes detailed info to `/tmp/pi-vcc-debug.json` — message counts, cut boundary, summary preview, sections.
|
|
207
|
+
|
|
208
|
+
## Related Work
|
|
209
|
+
|
|
210
|
+
- [VCC](https://github.com/lllyasviel/VCC) — the original transcript-preserving conversation compiler
|
|
211
|
+
- [Pi](https://github.com/badlogic/pi-mono) — the AI coding agent this extension is built for
|
|
212
|
+
|
|
213
|
+
## License
|
|
214
|
+
|
|
215
|
+
MIT
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Vendored `pi-vcc`
|
|
2
|
+
|
|
3
|
+
- **Repository:** https://github.com/sting8k/pi-vcc
|
|
4
|
+
- **Conceptual basis:** [lllyasviel/VCC](https://github.com/lllyasviel/VCC) (View-oriented Conversation Compiler)
|
|
5
|
+
- **License:** MIT (see upstream repository)
|
|
6
|
+
- **Pinned upstream commit:** `3e0b49e4ef605370e3dd92889e6b70502262cc28`
|
|
7
|
+
- **Local changes:**
|
|
8
|
+
- `src/core/settings.ts` re-exports env-only [`.pi/extensions/lib/harness-vcc-settings.ts`](../../.pi/extensions/lib/harness-vcc-settings.ts) (`HARNESS_VCC_COMPACTION`, `HARNESS_VCC_DEBUG`)
|
|
9
|
+
- No `scaffoldSettings` / no `PI_VCC_CONFIG_PATH`
|
|
10
|
+
- Compaction `details.compactor` is `ultimate-pi-vcc`
|
|
11
|
+
|
|
12
|
+
**Refresh upstream:** run `npm run vendor:sync-vcc` from ultimate-pi root.
|
|
Binary file
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { ExtensionAPI } from "@mariozechner/pi-coding-agent";
|
|
2
|
+
import { registerBeforeCompactHook } from "./src/hooks/before-compact";
|
|
3
|
+
import { registerPiVccCommand } from "./src/commands/pi-vcc";
|
|
4
|
+
import { registerVccRecallCommand } from "./src/commands/vcc-recall";
|
|
5
|
+
import { registerRecallTool } from "./src/tools/recall";
|
|
6
|
+
|
|
7
|
+
export default (pi: ExtensionAPI) => {
|
|
8
|
+
registerBeforeCompactHook(pi);
|
|
9
|
+
registerPiVccCommand(pi);
|
|
10
|
+
registerVccRecallCommand(pi);
|
|
11
|
+
registerRecallTool(pi);
|
|
12
|
+
};
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sting8k/pi-vcc",
|
|
3
|
+
"version": "0.3.13",
|
|
4
|
+
"description": "Algorithmic conversation compactor for pi - transcript-preserving structured summaries, no LLM calls",
|
|
5
|
+
"main": "index.ts",
|
|
6
|
+
"keywords": [
|
|
7
|
+
"pi-package",
|
|
8
|
+
"pi-extension",
|
|
9
|
+
"vcc",
|
|
10
|
+
"compact",
|
|
11
|
+
"compaction"
|
|
12
|
+
],
|
|
13
|
+
"repository": {
|
|
14
|
+
"type": "git",
|
|
15
|
+
"url": "git+https://github.com/sting8k/pi-vcc.git"
|
|
16
|
+
},
|
|
17
|
+
"peerDependencies": {
|
|
18
|
+
"@mariozechner/pi-coding-agent": "*",
|
|
19
|
+
"@sinclair/typebox": "*"
|
|
20
|
+
},
|
|
21
|
+
"pi": {
|
|
22
|
+
"extensions": [
|
|
23
|
+
"./index.ts"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
26
|
+
}
|