@herbertgao/pi-extensions 2026.9.6 → 2026.9.8
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 -8
- package/THIRD_PARTY_NOTICES.md +0 -4
- package/node_modules/@narumitw/pi-btw/README.md +2 -0
- package/node_modules/@narumitw/pi-btw/dist/index.ts +284 -365
- package/node_modules/@narumitw/pi-btw/dist/index.ts.map +3 -3
- package/node_modules/@narumitw/pi-btw/package.json +52 -53
- package/node_modules/@narumitw/pi-btw/src/bring-to-main.ts +494 -547
- package/node_modules/@narumitw/pi-btw/src/btw.ts +814 -856
- package/node_modules/@narumitw/pi-btw/src/fullscreen-ui.ts +673 -674
- package/node_modules/@narumitw/pi-btw/src/keybindings.ts +228 -270
- package/node_modules/@narumitw/pi-btw/src/main-tree-picker.ts +309 -318
- package/node_modules/@narumitw/pi-btw/src/menu.ts +416 -454
- package/node_modules/@narumitw/pi-btw/src/settings.ts +203 -219
- package/node_modules/@narumitw/pi-btw/src/side-thread.ts +173 -201
- package/node_modules/@narumitw/pi-btw/src/text.ts +21 -23
- package/node_modules/@narumitw/pi-btw/src/transcript-markdown.ts +65 -0
- package/node_modules/@narumitw/pi-btw/src/transcript-pager.ts +611 -662
- package/node_modules/grok-mermaid/CHANGELOG.md +46 -0
- package/node_modules/grok-mermaid/LICENSE +205 -0
- package/node_modules/grok-mermaid/README.md +191 -0
- package/node_modules/grok-mermaid/dist/ansi.d.ts +16 -0
- package/node_modules/grok-mermaid/dist/ansi.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/ansi.js +23 -0
- package/node_modules/grok-mermaid/dist/ansi.js.map +1 -0
- package/node_modules/grok-mermaid/dist/canvas.d.ts +87 -0
- package/node_modules/grok-mermaid/dist/canvas.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/canvas.js +366 -0
- package/node_modules/grok-mermaid/dist/canvas.js.map +1 -0
- package/node_modules/grok-mermaid/dist/graph.d.ts +74 -0
- package/node_modules/grok-mermaid/dist/graph.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/graph.js +91 -0
- package/node_modules/grok-mermaid/dist/graph.js.map +1 -0
- package/node_modules/grok-mermaid/dist/index.d.ts +32 -0
- package/node_modules/grok-mermaid/dist/index.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/index.js +100 -0
- package/node_modules/grok-mermaid/dist/index.js.map +1 -0
- package/node_modules/grok-mermaid/dist/labels.d.ts +62 -0
- package/node_modules/grok-mermaid/dist/labels.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/labels.js +324 -0
- package/node_modules/grok-mermaid/dist/labels.js.map +1 -0
- package/node_modules/grok-mermaid/dist/layout-seq.d.ts +12 -0
- package/node_modules/grok-mermaid/dist/layout-seq.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/layout-seq.js +194 -0
- package/node_modules/grok-mermaid/dist/layout-seq.js.map +1 -0
- package/node_modules/grok-mermaid/dist/layout.d.ts +87 -0
- package/node_modules/grok-mermaid/dist/layout.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/layout.js +881 -0
- package/node_modules/grok-mermaid/dist/layout.js.map +1 -0
- package/node_modules/grok-mermaid/dist/parse.d.ts +83 -0
- package/node_modules/grok-mermaid/dist/parse.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/parse.js +1151 -0
- package/node_modules/grok-mermaid/dist/parse.js.map +1 -0
- package/node_modules/grok-mermaid/dist/source-box.d.ts +18 -0
- package/node_modules/grok-mermaid/dist/source-box.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/source-box.js +78 -0
- package/node_modules/grok-mermaid/dist/source-box.js.map +1 -0
- package/node_modules/grok-mermaid/dist/types.d.ts +42 -0
- package/node_modules/grok-mermaid/dist/types.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/types.js +1 -0
- package/node_modules/grok-mermaid/dist/types.js.map +1 -0
- package/node_modules/grok-mermaid/dist/width-data.d.ts +2 -0
- package/node_modules/grok-mermaid/dist/width-data.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/width-data.js +994 -0
- package/node_modules/grok-mermaid/dist/width-data.js.map +1 -0
- package/node_modules/grok-mermaid/dist/width.d.ts +18 -0
- package/node_modules/grok-mermaid/dist/width.d.ts.map +1 -0
- package/node_modules/grok-mermaid/dist/width.js +76 -0
- package/node_modules/grok-mermaid/dist/width.js.map +1 -0
- package/node_modules/grok-mermaid/package.json +49 -0
- package/node_modules/grok-mermaid/src/ansi.ts +34 -0
- package/node_modules/grok-mermaid/src/canvas.ts +373 -0
- package/node_modules/grok-mermaid/src/graph.ts +142 -0
- package/node_modules/grok-mermaid/src/index.ts +104 -0
- package/node_modules/grok-mermaid/src/labels.ts +326 -0
- package/node_modules/grok-mermaid/src/layout-seq.ts +203 -0
- package/node_modules/grok-mermaid/src/layout.ts +1015 -0
- package/node_modules/grok-mermaid/src/parse.ts +1189 -0
- package/node_modules/grok-mermaid/src/source-box.ts +89 -0
- package/node_modules/grok-mermaid/src/types.ts +43 -0
- package/node_modules/grok-mermaid/src/width-data.ts +993 -0
- package/node_modules/grok-mermaid/src/width.ts +74 -0
- package/node_modules/pi-lens/CHANGELOG.md +239 -0
- package/node_modules/pi-lens/config/dependency-cruiser-eager-allowlist.json +3 -0
- package/node_modules/pi-lens/dist/clients/actionable-warnings.js +30 -4
- package/node_modules/pi-lens/dist/clients/agent-behavior-client.js +2 -0
- package/node_modules/pi-lens/dist/clients/bash-file-access.js +26 -0
- package/node_modules/pi-lens/dist/clients/biome-client.js +1 -1
- package/node_modules/pi-lens/dist/clients/blocker-freshness.js +403 -35
- package/node_modules/pi-lens/dist/clients/bootstrap.js +6 -1
- package/node_modules/pi-lens/dist/clients/cascade-format.js +200 -4
- package/node_modules/pi-lens/dist/clients/code-quality-warnings.js +10 -2
- package/node_modules/pi-lens/dist/clients/degradation-ledger.js +16 -1
- package/node_modules/pi-lens/dist/clients/diagnostic-dispositions.js +12 -1
- package/node_modules/pi-lens/dist/clients/dispatch/ast-grep-catalog.js +65 -0
- package/node_modules/pi-lens/dist/clients/dispatch/auxiliary-lsp.js +28 -0
- package/node_modules/pi-lens/dist/clients/dispatch/dispatcher.js +9 -2
- package/node_modules/pi-lens/dist/clients/dispatch/finding-policy.js +222 -0
- package/node_modules/pi-lens/dist/clients/dispatch/indent-detect.js +389 -13
- package/node_modules/pi-lens/dist/clients/dispatch/integration.js +175 -25
- package/node_modules/pi-lens/dist/clients/dispatch/rule-ignores.js +62 -0
- package/node_modules/pi-lens/dist/clients/dispatch/runners/ast-grep-napi.js +21 -41
- package/node_modules/pi-lens/dist/clients/dispatch/runners/biome-check.js +6 -1
- package/node_modules/pi-lens/dist/clients/dispatch/runners/rust-clippy.js +7 -7
- package/node_modules/pi-lens/dist/clients/dispatch/runners/shfmt.js +2 -12
- package/node_modules/pi-lens/dist/clients/dispatch/runners/tree-sitter.js +2 -21
- package/node_modules/pi-lens/dist/clients/dispatch/runners/utils/runner-helpers.js +1 -1
- package/node_modules/pi-lens/dist/clients/dispatch/types.js +4 -1
- package/node_modules/pi-lens/dist/clients/disposition-publish.js +1 -0
- package/node_modules/pi-lens/dist/clients/effective-config.js +1 -1
- package/node_modules/pi-lens/dist/clients/file-kinds.js +26 -1
- package/node_modules/pi-lens/dist/clients/file-role.js +21 -21
- package/node_modules/pi-lens/dist/clients/file-utils.js +156 -10
- package/node_modules/pi-lens/dist/clients/finding-delivery-gate.js +56 -9
- package/node_modules/pi-lens/dist/clients/format-service.js +39 -21
- package/node_modules/pi-lens/dist/clients/formatters.js +60 -13
- package/node_modules/pi-lens/dist/clients/generation-guard.js +2 -2
- package/node_modules/pi-lens/dist/clients/git-guard.js +11 -3
- package/node_modules/pi-lens/dist/clients/indent-retarget.js +78 -8
- package/node_modules/pi-lens/dist/clients/installer/index.js +333 -114
- package/node_modules/pi-lens/dist/clients/instance-reaper-state.js +7 -0
- package/node_modules/pi-lens/dist/clients/instance-reaper.js +20 -10
- package/node_modules/pi-lens/dist/clients/language-profile.js +23 -1
- package/node_modules/pi-lens/dist/clients/language-registry.js +5 -1
- package/node_modules/pi-lens/dist/clients/latency-logger.js +4 -1
- package/node_modules/pi-lens/dist/clients/lens-engine.js +12 -3
- package/node_modules/pi-lens/dist/clients/lens-events.js +2 -1
- package/node_modules/pi-lens/dist/clients/lens-flag-registry.js +79 -0
- package/node_modules/pi-lens/dist/clients/live-bus-emitter.js +2 -1
- package/node_modules/pi-lens/dist/clients/lsp/client.js +25 -21
- package/node_modules/pi-lens/dist/clients/lsp/config.js +2 -2
- package/node_modules/pi-lens/dist/clients/lsp/index.js +7 -0
- package/node_modules/pi-lens/dist/clients/lsp/launch.js +16 -4
- package/node_modules/pi-lens/dist/clients/lsp/server.js +19 -2
- package/node_modules/pi-lens/dist/clients/lsp/workspace-diagnostics-cache.js +2 -1
- package/node_modules/pi-lens/dist/clients/lsp-mutation.js +5 -3
- package/node_modules/pi-lens/dist/clients/map-with-concurrency.js +12 -8
- package/node_modules/pi-lens/dist/clients/mcp/session.js +36 -4
- package/node_modules/pi-lens/dist/clients/ndjson-logger.js +24 -7
- package/node_modules/pi-lens/dist/clients/observed-mutation.js +40 -2
- package/node_modules/pi-lens/dist/clients/opaque-mutation-scan.js +23 -3
- package/node_modules/pi-lens/dist/clients/opengrep-client.js +110 -15
- package/node_modules/pi-lens/dist/clients/path-utils.js +123 -3
- package/node_modules/pi-lens/dist/clients/performance-report.js +5 -1
- package/node_modules/pi-lens/dist/clients/php-cs-fixer-config.js +1 -1
- package/node_modules/pi-lens/dist/clients/pipeline.js +74 -5
- package/node_modules/pi-lens/dist/clients/project-diagnostics/cache.js +37 -5
- package/node_modules/pi-lens/dist/clients/project-diagnostics/fresh-fetch.js +145 -18
- package/node_modules/pi-lens/dist/clients/project-diagnostics/runner-adapters/dead-code.js +4 -1
- package/node_modules/pi-lens/dist/clients/project-diagnostics/scanner.js +59 -3
- package/node_modules/pi-lens/dist/clients/project-lens-config.js +45 -2
- package/node_modules/pi-lens/dist/clients/read-guard.js +70 -11
- package/node_modules/pi-lens/dist/clients/resource-sampler.js +147 -9
- package/node_modules/pi-lens/dist/clients/ruff-client.js +1 -1
- package/node_modules/pi-lens/dist/clients/runtime-agent-end.js +33 -5
- package/node_modules/pi-lens/dist/clients/runtime-context.js +6 -2
- package/node_modules/pi-lens/dist/clients/runtime-coordinator.js +77 -7
- package/node_modules/pi-lens/dist/clients/runtime-session.js +21 -2
- package/node_modules/pi-lens/dist/clients/runtime-tool-call.js +43 -12
- package/node_modules/pi-lens/dist/clients/runtime-tool-result.js +330 -85
- package/node_modules/pi-lens/dist/clients/runtime-turn.js +147 -17
- package/node_modules/pi-lens/dist/clients/safe-spawn.js +258 -5
- package/node_modules/pi-lens/dist/clients/scratch-tree-policy.js +6 -0
- package/node_modules/pi-lens/dist/clients/session-event-guard.js +50 -5
- package/node_modules/pi-lens/dist/clients/sg-runner.js +23 -11
- package/node_modules/pi-lens/dist/clients/sgconfig.js +79 -2
- package/node_modules/pi-lens/dist/clients/test-runner-client.js +6 -41
- package/node_modules/pi-lens/dist/clients/test-runner-delivery.js +43 -0
- package/node_modules/pi-lens/dist/clients/tool-agreement.js +423 -0
- package/node_modules/pi-lens/dist/clients/tool-config.js +50 -0
- package/node_modules/pi-lens/dist/clients/tool-cwd.js +47 -76
- package/node_modules/pi-lens/dist/clients/tool-policy.js +163 -7
- package/node_modules/pi-lens/dist/clients/tree-sitter-client.js +120 -0
- package/node_modules/pi-lens/dist/clients/tree-sitter-query-loader.js +127 -189
- package/node_modules/pi-lens/dist/clients/widget-state.js +98 -0
- package/node_modules/pi-lens/dist/clients/word-index.js +5 -2
- package/node_modules/pi-lens/dist/clients/write-ordering-guard.js +7 -0
- package/node_modules/pi-lens/dist/index.js +27416 -24153
- package/node_modules/pi-lens/dist/mcp/server.js +5 -2
- package/node_modules/pi-lens/dist/tools/lens-diagnostic-mark.js +7 -1
- package/node_modules/pi-lens/dist/tools/lens-diagnostics.js +168 -53
- package/node_modules/pi-lens/dist/tools/lsp-diagnostics.js +244 -72
- package/node_modules/pi-lens/docs/audit1.md +5 -5
- package/node_modules/pi-lens/docs/dependencies.md +11 -0
- package/node_modules/pi-lens/docs/dispositions.md +52 -0
- package/node_modules/pi-lens/docs/environment-variables.md +2 -2
- package/node_modules/pi-lens/docs/features.md +4 -4
- package/node_modules/pi-lens/docs/globalconfig.md +3 -1
- package/node_modules/pi-lens/docs/language-coverage.md +1 -0
- package/node_modules/pi-lens/docs/pi-lens-fixer.md +53 -94
- package/node_modules/pi-lens/docs/pi-lens-investigator.md +43 -38
- package/node_modules/pi-lens/docs/pi-lens-retro.md +97 -0
- package/node_modules/pi-lens/docs/pi-lens-reviewer.md +53 -66
- package/node_modules/pi-lens/docs/release-qa-baseline.md +22 -0
- package/node_modules/pi-lens/docs/settings.md +7 -4
- package/node_modules/pi-lens/docs/tree-sitter_rules_catalog.md +1 -1
- package/node_modules/pi-lens/docs/usage.md +2 -0
- package/node_modules/pi-lens/package.json +1 -1
- package/node_modules/pi-lens/rules/tree-sitter-queries/typescript/sql-injection.yml +24 -12
- package/node_modules/pi-lens/scripts/analyze-pi-lens-logs.mjs +40 -0
- package/node_modules/pi-lens/skills/pi-lens-ast-grep/SKILL.md +15 -0
- package/node_modules/pi-lens/skills/pi-lens-lsp-navigation/SKILL.md +7 -0
- package/package.json +6 -11
- package/node_modules/@luxusai/pi-hindsight/CHANGELOG.md +0 -376
- package/node_modules/@luxusai/pi-hindsight/README.md +0 -92
- package/node_modules/@luxusai/pi-hindsight/docs/adr/001-memory-lifecycle-and-scope.md +0 -56
- package/node_modules/@luxusai/pi-hindsight/docs/adr/002-explicit-routing-strategy-seam.md +0 -169
- package/node_modules/@luxusai/pi-hindsight/docs/adr/003-tui-memory-mode-vocabulary.md +0 -107
- package/node_modules/@luxusai/pi-hindsight/docs/adr/004-lifeos-dual-bank-design.md +0 -89
- package/node_modules/@luxusai/pi-hindsight/docs/adr/005-domain-banks-and-agent-first-surface.md +0 -189
- package/node_modules/@luxusai/pi-hindsight/docs/assets/logos/pi-hindsight-logo-dark.webp +0 -0
- package/node_modules/@luxusai/pi-hindsight/docs/assets/logos/pi-hindsight-logo-dark@2x.webp +0 -0
- package/node_modules/@luxusai/pi-hindsight/docs/coding-memory-evaluation.md +0 -54
- package/node_modules/@luxusai/pi-hindsight/docs/compatibility.md +0 -75
- package/node_modules/@luxusai/pi-hindsight/docs/hindsight-core-functions.md +0 -300
- package/node_modules/@luxusai/pi-hindsight/docs/mission-and-mental-model-quality.md +0 -158
- package/node_modules/@luxusai/pi-hindsight/docs/next-opt-out-design.md +0 -164
- package/node_modules/@luxusai/pi-hindsight/docs/risky-memory-modes.md +0 -139
- package/node_modules/@luxusai/pi-hindsight/docs/starter-mental-model-suggestions.md +0 -74
- package/node_modules/@luxusai/pi-hindsight/docs/surface-reference.md +0 -261
- package/node_modules/@luxusai/pi-hindsight/extensions/banks/bank-operations.ts +0 -151
- package/node_modules/@luxusai/pi-hindsight/extensions/banks/bank-selection.ts +0 -18
- package/node_modules/@luxusai/pi-hindsight/extensions/banks/bank-settings-presenter.ts +0 -46
- package/node_modules/@luxusai/pi-hindsight/extensions/banks/bank-templates.ts +0 -383
- package/node_modules/@luxusai/pi-hindsight/extensions/banks/banking.ts +0 -240
- package/node_modules/@luxusai/pi-hindsight/extensions/banks/knowledge-page-seed.ts +0 -176
- package/node_modules/@luxusai/pi-hindsight/extensions/banks/retain-strategies.ts +0 -178
- package/node_modules/@luxusai/pi-hindsight/extensions/client/client-retry.ts +0 -41
- package/node_modules/@luxusai/pi-hindsight/extensions/client/client.ts +0 -386
- package/node_modules/@luxusai/pi-hindsight/extensions/client/fetch-compat.ts +0 -39
- package/node_modules/@luxusai/pi-hindsight/extensions/client/timeout.ts +0 -34
- package/node_modules/@luxusai/pi-hindsight/extensions/config/config-defaults.ts +0 -140
- package/node_modules/@luxusai/pi-hindsight/extensions/config/config-editing-model.ts +0 -61
- package/node_modules/@luxusai/pi-hindsight/extensions/config/config-editing-registry.ts +0 -925
- package/node_modules/@luxusai/pi-hindsight/extensions/config/config-field-paths.ts +0 -247
- package/node_modules/@luxusai/pi-hindsight/extensions/config/config-normalize.ts +0 -547
- package/node_modules/@luxusai/pi-hindsight/extensions/config/config-writer.ts +0 -480
- package/node_modules/@luxusai/pi-hindsight/extensions/config/config.ts +0 -182
- package/node_modules/@luxusai/pi-hindsight/extensions/config/setup-gate.ts +0 -86
- package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-execute.ts +0 -1010
- package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-parse.ts +0 -175
- package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-plan.ts +0 -425
- package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-presentation.ts +0 -210
- package/node_modules/@luxusai/pi-hindsight/extensions/imports/import-sessions.ts +0 -817
- package/node_modules/@luxusai/pi-hindsight/extensions/index.ts +0 -25
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/git-seed.ts +0 -319
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/memory-lifecycle-recall.ts +0 -196
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/memory-lifecycle-retain.ts +0 -189
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/memory-lifecycle-runtime.ts +0 -65
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/memory-lifecycle.ts +0 -260
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/mental-models.ts +0 -244
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/observation-scopes.ts +0 -59
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/recall-cleanup.ts +0 -82
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/recall-visibility.ts +0 -45
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/recall.ts +0 -331
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/retain-cursor.ts +0 -354
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/retain-job-builder.ts +0 -66
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/retain-receipts.ts +0 -132
- package/node_modules/@luxusai/pi-hindsight/extensions/lifecycle/retain.ts +0 -228
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-bank-template-operations.ts +0 -74
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-config-operations.ts +0 -16
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-control-operations.ts +0 -648
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-diagnostics-operations.ts +0 -105
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-identity.ts +0 -68
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-operation-service.ts +0 -71
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-operation-types.ts +0 -13
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-recall-operations.ts +0 -162
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-retain-operations.ts +0 -131
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-scope.ts +0 -104
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/memory-session-operations.ts +0 -37
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/operation-catalog.ts +0 -893
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/reflect-presenter.ts +0 -35
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/scope-migrate.ts +0 -177
- package/node_modules/@luxusai/pi-hindsight/extensions/operations/tools.ts +0 -7
- package/node_modules/@luxusai/pi-hindsight/extensions/queue/flush-presenter.ts +0 -21
- package/node_modules/@luxusai/pi-hindsight/extensions/queue/jsonl-queue-store.ts +0 -112
- package/node_modules/@luxusai/pi-hindsight/extensions/queue/queue-delivery.ts +0 -111
- package/node_modules/@luxusai/pi-hindsight/extensions/queue/queue-lock.ts +0 -214
- package/node_modules/@luxusai/pi-hindsight/extensions/queue/queue-operations.ts +0 -70
- package/node_modules/@luxusai/pi-hindsight/extensions/queue/queue.ts +0 -392
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/bank-template-presentation.ts +0 -45
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/commands.ts +0 -9
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/guided-setup.ts +0 -860
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/prefill-input.ts +0 -105
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-flow.ts +0 -189
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-server-probe.ts +0 -299
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui-actions.ts +0 -201
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui-facts.ts +0 -47
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui-render.ts +0 -239
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui-types.ts +0 -50
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/setup-tui.ts +0 -259
- package/node_modules/@luxusai/pi-hindsight/extensions/tui/tool-presenters.ts +0 -77
- package/node_modules/@luxusai/pi-hindsight/extensions/types.ts +0 -534
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/diagnostics.ts +0 -319
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/messages.ts +0 -325
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/sanitize.ts +0 -42
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/session-memory-meta.ts +0 -244
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/session-operations.ts +0 -56
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/session.ts +0 -50
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/status-fields.ts +0 -167
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/status-health.ts +0 -207
- package/node_modules/@luxusai/pi-hindsight/extensions/utils/status.ts +0 -120
- package/node_modules/@luxusai/pi-hindsight/extensions/version.ts +0 -8
- package/node_modules/@luxusai/pi-hindsight/package.json +0 -118
- package/node_modules/@luxusai/pi-hindsight/skills/hindsight-memory-doctor/SKILL.md +0 -75
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
<!-- This file is generated by scripts/generate-surface-reference.ts. Do not edit by hand. -->
|
|
2
|
-
|
|
3
|
-
This reference is generated from the operation catalog and config editing registry.
|
|
4
|
-
|
|
5
|
-
## 1.0 support scope
|
|
6
|
-
|
|
7
|
-
Pi Hindsight 1.0 supports a stable Pi-first Hindsight integration. Core and Pi workflow tools are part of the stable 1.0 contract. Capability-gated tools are supported when the connected Hindsight server exposes the required upstream endpoint or field; unsupported servers should return a clear capability error.
|
|
8
|
-
|
|
9
|
-
| Tool | Scope |
|
|
10
|
-
| ------------------------- | -------------------- |
|
|
11
|
-
| `hindsight_recall` | core 1.0 |
|
|
12
|
-
| `hindsight_retain` | core 1.0 |
|
|
13
|
-
| `hindsight_retain_global` | core 1.0 |
|
|
14
|
-
| `hindsight_reflect` | core 1.0 |
|
|
15
|
-
| `hindsight_status` | supported 1.0 |
|
|
16
|
-
| `hindsight_seed_git` | supported 1.0 |
|
|
17
|
-
| `hindsight_scope` | supported 1.0 |
|
|
18
|
-
| `hindsight_config` | supported 1.0 |
|
|
19
|
-
| `hindsight_bank` | supported 1.0 |
|
|
20
|
-
| `hindsight_mental_model` | capability-gated 1.0 |
|
|
21
|
-
| `hindsight_knowledge` | capability-gated 1.0 |
|
|
22
|
-
| `hindsight_scope_migrate` | supported 1.0 |
|
|
23
|
-
|
|
24
|
-
## Deferred or non-goal upstream surfaces
|
|
25
|
-
|
|
26
|
-
| Surface | 1.0 status | Rationale |
|
|
27
|
-
| ----------------------- | ---------- | ------------------------------------------------------------------------------------------- |
|
|
28
|
-
| Cross-bank list/create | Deferred | No public `list_banks` or arbitrary cross-bank `create_bank` tool in 1.0. |
|
|
29
|
-
| Full-bank deletion | Deferred | No public `delete_bank` tool in 1.0; selected-bank reset/delete-like repair remains scoped. |
|
|
30
|
-
| Platform bank stats | Deferred | No global `get_bank_stats` dashboard/tool in 1.0. |
|
|
31
|
-
| Audit logs and webhooks | Non-goal | Platform administration is outside the Pi-first 1.0 memory lifecycle. |
|
|
32
|
-
|
|
33
|
-
## Tools
|
|
34
|
-
|
|
35
|
-
### `hindsight_recall`
|
|
36
|
-
|
|
37
|
-
Recall raw memories from Hindsight for this project.
|
|
38
|
-
|
|
39
|
-
| Parameter | Type | Required | Description |
|
|
40
|
-
| --------------------------- | ----------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
41
|
-
| `query` | string | yes | Natural language memory query |
|
|
42
|
-
| `bank` | string | no | Optional bank id. Defaults to project bank. |
|
|
43
|
-
| `types` | array<world \| experience \| observation> | no | Optional Hindsight fact types to retrieve. |
|
|
44
|
-
| `preferObservations` | boolean | no | When recalling raw facts ('world'/'experience') together with 'observation', drop raw facts superseded by a returned observation. Defaults to the configured recall.preferObservations. |
|
|
45
|
-
| `minScores` | object | no | Optional per-stage score floors. Omitted stages impose no floor. No floor by default. |
|
|
46
|
-
| `budget` | low \| mid \| high | no | Optional Hindsight recall budget override for this tool call. |
|
|
47
|
-
| `maxTokens` | integer | no | Optional Hindsight recall token cap override for this tool call. Use 0 for metadata/source-only recall when supported by Hindsight. |
|
|
48
|
-
| `queryTimestamp` | string | no | Optional ISO timestamp for time-scoped recall. |
|
|
49
|
-
| `includeChunks` | boolean | no | Ask Hindsight to include source chunks when supported. |
|
|
50
|
-
| `recallChunksMaxTokens` | integer | no | Optional token cap for included recall chunks. |
|
|
51
|
-
| `includeSourceFacts` | boolean | no | Ask Hindsight to include source facts when supported. |
|
|
52
|
-
| `maxSourceFactsTokens` | integer | no | Optional token cap for included source facts. |
|
|
53
|
-
| `includeEntities` | boolean | no | Ask Hindsight to include entities when supported. |
|
|
54
|
-
| `trace` | boolean | no | Ask Hindsight to include recall trace/debug data. |
|
|
55
|
-
| `tags` | array<string> | no | Additional tag filter. |
|
|
56
|
-
| `tagsMatch` | any \| all \| any_strict \| all_strict \| exact | no | How to match tags. Always enforced together with the automatic Pi project/user scope tag filter. 'exact' folds the automatic scope tags into the exact-match set (memory tags must equal scope tags plus these tags, no more, no less) instead of AND-ing a separate scope group, since scope tags must still be present. To also include Hindsight shared/untagged observations (exact empty tags), set includeSharedObservations=true or config.scope.includeSharedObservations. |
|
|
57
|
-
| `tagGroups` | array<object> | no | Compound Hindsight tag_groups filter. AND-ed with the automatic Pi project/user scope filter. |
|
|
58
|
-
| `includeSharedObservations` | boolean | no | When true, also match exact-empty (shared/untagged) observations inside the bank via tag_groups OR. Defaults to config.scope.includeSharedObservations (false). Not cross-bank. |
|
|
59
|
-
|
|
60
|
-
### `hindsight_retain`
|
|
61
|
-
|
|
62
|
-
Retain explicit raw content in Hindsight. Use for durable facts or decisions.
|
|
63
|
-
|
|
64
|
-
| Parameter | Type | Required | Description |
|
|
65
|
-
| ------------------- | ------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
66
|
-
| `content` | string | yes | Raw content to retain, not summary if source content is available. |
|
|
67
|
-
| `context` | string | yes | Source context for this memory. |
|
|
68
|
-
| `bank` | string | no | Optional bank id. Defaults to project bank. |
|
|
69
|
-
| `tags` | array<string> | no | |
|
|
70
|
-
| `entities` | array<object> | no | Optional Hindsight entities to associate with this retained content. |
|
|
71
|
-
| `documentId` | string | no | Optional Hindsight document ID. Defaults to the existing deterministic explicit retain document ID. |
|
|
72
|
-
| `timestamp` | string | no | Optional Hindsight timestamp string, including ISO-ish strings or literal unset, passed through as provided. |
|
|
73
|
-
| `metadata` | object/map | no | Optional caller metadata string map. Reserved provenance keys such as cwd, pi_session_file, source, and retainSource are set by pi-hindsight and cannot be overridden. |
|
|
74
|
-
| `updateMode` | append \| replace | no | Optional Hindsight update mode for this explicit retain call. |
|
|
75
|
-
| `observationScopes` | per_tag \| combined \| all_combinations \| shared \| array<array<string>> | no | Optional Hindsight observation scopes. Use per_tag, combined, all_combinations, shared, or explicit string groups. When provided, overrides configured default observation scopes for this retain call. |
|
|
76
|
-
| `documentTags` | array<string> | no | Optional Hindsight document_tags for this retained document when supported. |
|
|
77
|
-
| `async` | boolean | no | Optional Hindsight async extraction flag for this retain call. Defaults to configured retain.async. |
|
|
78
|
-
|
|
79
|
-
### `hindsight_retain_global`
|
|
80
|
-
|
|
81
|
-
Retain explicit durable user memory in the configured user bank. Use for stable user identity, preferences, and cross-project workflows only.
|
|
82
|
-
|
|
83
|
-
| Parameter | Type | Required | Description |
|
|
84
|
-
| ------------------- | ------------------------------------------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
85
|
-
| `content` | string | yes | Raw memory content to retain. |
|
|
86
|
-
| `context` | string | yes | Why this memory is durable user context. |
|
|
87
|
-
| `tags` | array<string> | no | |
|
|
88
|
-
| `entities` | array<object> | no | Optional Hindsight entities to associate with this retained content. |
|
|
89
|
-
| `documentId` | string | no | Optional Hindsight document ID. Defaults to the existing deterministic explicit retain document ID. |
|
|
90
|
-
| `timestamp` | string | no | Optional Hindsight timestamp string, including ISO-ish strings or literal unset, passed through as provided. |
|
|
91
|
-
| `metadata` | object/map | no | Optional caller metadata string map. Reserved provenance keys such as cwd, pi_session_file, source, and retainSource are set by pi-hindsight and cannot be overridden. |
|
|
92
|
-
| `updateMode` | append \| replace | no | Optional Hindsight update mode for this explicit retain call. |
|
|
93
|
-
| `observationScopes` | per_tag \| combined \| all_combinations \| shared \| array<array<string>> | no | Optional Hindsight observation scopes. Use per_tag, combined, all_combinations, shared, or explicit string groups. When provided, overrides configured default observation scopes for this retain call. |
|
|
94
|
-
| `documentTags` | array<string> | no | Optional Hindsight document_tags for this retained document when supported. |
|
|
95
|
-
| `async` | boolean | no | Optional Hindsight async extraction flag for this retain call. Defaults to configured retain.async. |
|
|
96
|
-
|
|
97
|
-
### `hindsight_reflect`
|
|
98
|
-
|
|
99
|
-
Ask Hindsight to synthesize an answer from memory. Use explicitly, not for default recall.
|
|
100
|
-
|
|
101
|
-
| Parameter | Type | Required | Description |
|
|
102
|
-
| --------------------------- | ----------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
103
|
-
| `query` | string | yes | |
|
|
104
|
-
| `context` | string | no | |
|
|
105
|
-
| `bank` | string | no | |
|
|
106
|
-
| `budget` | low \| mid \| high | no | Optional Hindsight reflect budget override for this tool call. |
|
|
107
|
-
| `maxTokens` | integer | no | Optional Hindsight reflect token cap override for this tool call. |
|
|
108
|
-
| `responseSchema` | object/map | no | |
|
|
109
|
-
| `includeFacts` | boolean | no | Ask Hindsight reflect to include facts when supported. |
|
|
110
|
-
| `includeToolCalls` | boolean | no | Ask Hindsight reflect to include tool-call trace data when supported. |
|
|
111
|
-
| `includeToolCallOutput` | boolean | no | When includeToolCalls is set, include tool-call outputs (default true); set false for an inputs-only trace. |
|
|
112
|
-
| `factTypes` | array<world \| experience \| observation> | no | Restrict reflection to these Hindsight fact types. |
|
|
113
|
-
| `excludeMentalModels` | boolean | no | Exclude all mental models from reflection. |
|
|
114
|
-
| `excludeMentalModelIds` | array<string> | no | Exclude specific mental models by id from reflection. |
|
|
115
|
-
| `tags` | array<string> | no | Additional tag filter. |
|
|
116
|
-
| `tagsMatch` | any \| all \| any_strict \| all_strict \| exact | no | How to match tags. Always enforced together with the automatic Pi project/user scope tag filter. 'exact' folds the automatic scope tags into the exact-match set (memory tags must equal scope tags plus these tags, no more, no less) instead of AND-ing a separate scope group, since scope tags must still be present. To also include Hindsight shared/untagged observations (exact empty tags), set includeSharedObservations=true or config.scope.includeSharedObservations. |
|
|
117
|
-
| `tagGroups` | array<object> | no | Compound Hindsight tag_groups filter. AND-ed with the automatic Pi project/user scope filter. |
|
|
118
|
-
| `includeSharedObservations` | boolean | no | When true, also match exact-empty (shared/untagged) observations inside the bank via tag_groups OR. Defaults to config.scope.includeSharedObservations (false). Not cross-bank. |
|
|
119
|
-
|
|
120
|
-
### `hindsight_status`
|
|
121
|
-
|
|
122
|
-
Inspect Pi Hindsight status: setup gate, coding/life banks, project scope tags (basis), recall/retain flags, queue, and sync readiness (queue depth, git seed receipt, knowledge-page capability). Use before changing memory config. Read-only.
|
|
123
|
-
|
|
124
|
-
| Parameter | Type | Required | Description |
|
|
125
|
-
| --------- | ---- | -------- | ----------- |
|
|
126
|
-
|
|
127
|
-
### `hindsight_seed_git`
|
|
128
|
-
|
|
129
|
-
Opt-in cold-repo seed: retain recent git commit messages (strategy gitlog) into the project bank. Not automatic — conversation retain remains primary. dryRun defaults true; set dryRun=false to enqueue (and flush by default).
|
|
130
|
-
|
|
131
|
-
| Parameter | Type | Required | Description |
|
|
132
|
-
| --------- | ------- | -------- | ---------------------------------------------------------------- |
|
|
133
|
-
| `limit` | integer | no | Max commits to include (default 300). |
|
|
134
|
-
| `dryRun` | boolean | no | Default true (preview). Set false to enqueue retain. |
|
|
135
|
-
| `flush` | boolean | no | When dryRun=false, flush the queue after enqueue (default true). |
|
|
136
|
-
|
|
137
|
-
### `hindsight_scope`
|
|
138
|
-
|
|
139
|
-
Show active project identity: project:<id> tag, derivation (pin/remote/basename), scope.mode (domain-tagged vs isolated-bank), coding/life bank ids. Read-only.
|
|
140
|
-
|
|
141
|
-
| Parameter | Type | Required | Description |
|
|
142
|
-
| --------- | ---- | -------- | ----------- |
|
|
143
|
-
|
|
144
|
-
### `hindsight_config`
|
|
145
|
-
|
|
146
|
-
Get or patch allowlisted Pi Hindsight config (project or global file). action=get returns effective values (no secrets) and the allowlist. action=patch updates only typed allowlisted keys (setupComplete, scopeMode, projectId, projectIdStrategy, includeSharedObservations, projectBankId, enableGlobalBank, globalBankId, agentUse, mentalModelsInject, memoryProfile, recall/retain knobs, baseUrl, apiKeyEnvVar, timeoutMs). dryRun defaults true for patch. Domain-tagged setupComplete requires projectBankId. Never pass raw API keys — use apiKeyEnvVar.
|
|
147
|
-
|
|
148
|
-
| Parameter | Type | Required | Description |
|
|
149
|
-
| --------- | ----------------- | -------- | ---------------------------------------------------------------- |
|
|
150
|
-
| `action` | get \| patch | yes | |
|
|
151
|
-
| `patch` | object | no | Typed allowlisted config fields only (no free-form keys). |
|
|
152
|
-
| `scope` | project \| global | no | Which config file to write (default project .pi/hindsight.json). |
|
|
153
|
-
| `dryRun` | boolean | no | When true (default for patch), preview only; set false to write. |
|
|
154
|
-
|
|
155
|
-
### `hindsight_bank`
|
|
156
|
-
|
|
157
|
-
Inspect or update the selected coding/life bank. action=get returns profile/stats/config. action=update_mission patches retain/reflect/observations mission (dryRun default true for safety).
|
|
158
|
-
|
|
159
|
-
| Parameter | Type | Required | Description |
|
|
160
|
-
| --------------------- | --------------------- | -------- | ------------------------------------------------------------------------ |
|
|
161
|
-
| `action` | get \| update_mission | yes | |
|
|
162
|
-
| `bank` | string | no | Bank id or alias project\|global\|user. Defaults to coding/project bank. |
|
|
163
|
-
| `retainMission` | string | no | |
|
|
164
|
-
| `reflectMission` | string | no | |
|
|
165
|
-
| `observationsMission` | string | no | |
|
|
166
|
-
| `dryRun` | boolean | no | When true (default for update_mission), preview only. |
|
|
167
|
-
|
|
168
|
-
### `hindsight_mental_model`
|
|
169
|
-
|
|
170
|
-
Agent control plane for mental models on the selected bank. Actions: list|get|create|update|refresh|delete. list returns metadata only (id, name, tags, max_tokens, last_refreshed_at); use get for full content/reflect_response. Project-tier create defaults tags to source:pi + project:<activeId>. Optional tagsMatch sets refresh tag matching on create/update trigger. Mutating actions default dryRun=true; set dryRun=false to apply.
|
|
171
|
-
|
|
172
|
-
| Parameter | Type | Required | Description |
|
|
173
|
-
| ------------- | ---------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
174
|
-
| `action` | list \| get \| create \| update \| refresh \| delete | yes | |
|
|
175
|
-
| `bank` | string | no | Bank id or alias project\|global\|user. |
|
|
176
|
-
| `id` | string | no | Mental model id for get/update/refresh/delete. |
|
|
177
|
-
| `name` | string | no | |
|
|
178
|
-
| `sourceQuery` | string | no | |
|
|
179
|
-
| `tags` | array<string> | no | |
|
|
180
|
-
| `maxTokens` | integer | no | |
|
|
181
|
-
| `tagsMatch` | any \| all \| any_strict \| all_strict \| exact | no | How to match tags. Always enforced together with the automatic Pi project/user scope tag filter. 'exact' folds the automatic scope tags into the exact-match set (memory tags must equal scope tags plus these tags, no more, no less) instead of AND-ing a separate scope group, since scope tags must still be present. To also include Hindsight shared/untagged observations (exact empty tags), set includeSharedObservations=true or config.scope.includeSharedObservations. |
|
|
182
|
-
| `dryRun` | boolean | no | Mutating actions default true (preview). Set false to apply. |
|
|
183
|
-
|
|
184
|
-
### `hindsight_knowledge`
|
|
185
|
-
|
|
186
|
-
Agent control plane for knowledge pages (living docs over bank observations). Actions: tree|search|get|export|seed_taxonomy|create_page|create_folder|update|delete. Prefer search then get for routine Q&A (pages are not auto-injected). seed_taxonomy creates the fixed five-page coding taxonomy (idempotent; degrades when pages unavailable). Use export only for a portable full-bank markdown bundle. Project-tier create_page defaults tags to source:pi + project:<activeId>. Mutating actions default dryRun=true. Requires Hindsight client/server knowledge-base support.
|
|
187
|
-
|
|
188
|
-
| Parameter | Type | Required | Description |
|
|
189
|
-
| ------------- | ---------------------------------------------------------------------------------------------------- | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
190
|
-
| `action` | tree \| search \| get \| export \| seed_taxonomy \| create_page \| create_folder \| update \| delete | yes | |
|
|
191
|
-
| `bank` | string | no | Bank id or alias project\|global\|user. |
|
|
192
|
-
| `id` | string | no | Page or folder id for get/update/delete. |
|
|
193
|
-
| `query` | string | no | Search query for action=search (hybrid page search). |
|
|
194
|
-
| `limit` | integer | no | Search result limit (1–50). |
|
|
195
|
-
| `name` | string | no | |
|
|
196
|
-
| `sourceQuery` | string | no | Page question for create_page / update. |
|
|
197
|
-
| `parentId` | string \| null | no | Folder parent. Omit for root create; pass null on update to move to root. |
|
|
198
|
-
| `tags` | array<string> | no | |
|
|
199
|
-
| `maxTokens` | integer | no | |
|
|
200
|
-
| `tagsMatch` | any \| all \| any_strict \| all_strict \| exact | no | How to match tags. Always enforced together with the automatic Pi project/user scope tag filter. 'exact' folds the automatic scope tags into the exact-match set (memory tags must equal scope tags plus these tags, no more, no less) instead of AND-ing a separate scope group, since scope tags must still be present. To also include Hindsight shared/untagged observations (exact empty tags), set includeSharedObservations=true or config.scope.includeSharedObservations. |
|
|
201
|
-
| `dryRun` | boolean | no | Mutating actions (seed_taxonomy\|create_page\|create_folder\|update\|delete) default true (preview). Set false to apply. |
|
|
202
|
-
|
|
203
|
-
### `hindsight_scope_migrate`
|
|
204
|
-
|
|
205
|
-
Dry-run only: plan dual-tag / legacy repo:<path-hash> → project:<id> migration. Writes a local receipt under .pi/hindsight/. Never rewrites Hindsight tags or documents. Prefer Hindsight export/import or Pi transcript reimport for actual rebuilds.
|
|
206
|
-
|
|
207
|
-
| Parameter | Type | Required | Description |
|
|
208
|
-
| -------------- | ------------- | -------- | ----------------------------------------------------------------------------------------------------- |
|
|
209
|
-
| `bankTags` | array<string> | no | Optional tag inventory sample from the coding bank (e.g. listTags). Used only for counts in the plan. |
|
|
210
|
-
| `writeReceipt` | boolean | no | Write .pi/hindsight/scope-migrate-receipt.json (default true). |
|
|
211
|
-
|
|
212
|
-
## Commands
|
|
213
|
-
|
|
214
|
-
| Command | Description |
|
|
215
|
-
| ------------------------- | ---------------------------------------------------------------------------------------------------- |
|
|
216
|
-
| `/hindsight` | Open Hindsight memory hub (status, mode, next-opt-out, mental models, import, flush, doctor, setup). |
|
|
217
|
-
| `/hindsight:next-opt-out` | Skip automatic retain for the next agent run in this session. |
|
|
218
|
-
|
|
219
|
-
## Config fields
|
|
220
|
-
|
|
221
|
-
| Field | Tab | Kind | Default | Choices | Advanced | Reset key | Description |
|
|
222
|
-
| --------------------------- | ---------- | ------------ | ------------------------------------ | ------------------------------------------------------ | -------- | ---------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
223
|
-
| `enabled` | Connection | boolean | enabled | | no | enabled | Master switch. When off, automatic recall and retain are skipped. |
|
|
224
|
-
| `baseUrl` | Connection | text | http://localhost:8888 | | no | hindsight.baseUrl | Server endpoint used for recall, retain, reflect, and bank setup. |
|
|
225
|
-
| `apiKeyEnv` | Connection | text | not set | | no | hindsight.apiKey | Recommended: environment variable name that contains the API key. Editing writes a safe env SecretRef, not the raw secret. |
|
|
226
|
-
| `apiKeyDirect` | Connection | text | not set | | yes | hindsight.apiKey | Advanced. Writes raw API key only to user/global config. Prefer API key source/env var whenever possible. |
|
|
227
|
-
| `timeoutMs` | Connection | positive-int | 30000 ms | | no | hindsight.timeoutMs | Maximum time to wait for Hindsight network calls. |
|
|
228
|
-
| `memoryProfile` | Banks | select | project-only | project-only, project+global, global-only, recall-only | no | banks.profile | Coding (project-only) is recommended: shared coding bank. Coding+Life (project+global) adds a personal bank. Isolated is a hard-wall escape hatch. Life-only / recall-only are special cases. |
|
|
229
|
-
| `agentUse` | Banks | select | coding | coding, conversation | no | agentUse | Selects starter mental-model sets. Coding: architecture/conventions/decisions. Conversation: goals, people/context, and life-task preferences. |
|
|
230
|
-
| `mentalModelsInject` | Banks | boolean | enabled | | no | mentalModels.inject | When models exist on the active bank(s), inject their content into automatic context alongside recall. |
|
|
231
|
-
| `projectBankId` | Banks | text | auto-derived | | no | banks.project.bankId | Shared coding bank for domain-tagged mode (prefer user/global config). Isolated mode may pin a per-repo bank. |
|
|
232
|
-
| `globalBankEnabled` | Banks | boolean | disabled | | no | banks.global.enabled | Allows cross-project recall from a shared bank. |
|
|
233
|
-
| `globalBankId` | Banks | text | not set | | no | banks.global.bankId | Shared user bank used only when user memory is enabled. |
|
|
234
|
-
| `recallEnabled` | Recall | boolean | enabled | | no | recall.enabled | Looks up memory before answer generation and injects it ephemerally. |
|
|
235
|
-
| `recallBudget` | Recall | select | mid | low, mid, high | no | recall.budget | Low, mid, or high retrieval effort. |
|
|
236
|
-
| `recallMaxTokens` | Recall | positive-int | 800 | | no | recall.maxTokens | Maximum Project Bank memory tokens injected into context. |
|
|
237
|
-
| `recallUserMaxTokens` | Recall | positive-int | 400 | | yes | recall.userMaxTokens | Maximum User Bank memory tokens injected into context, independent of the Project Bank limit. |
|
|
238
|
-
| `recallStoreLast` | Recall | boolean | disabled | | yes | recall.storeLastRecall | Advanced. Writes the latest successful recall snapshot to a local sidecar under .pi/hindsight/ for debugging. |
|
|
239
|
-
| `recallStoreFailures` | Recall | boolean | disabled | | yes | recall.storeLastRecallFailures | Advanced. Also records redacted failed recall attempts in the last-recall sidecar. Requires storing last recall snapshots. |
|
|
240
|
-
| `recallPreferObservations` | Recall | boolean | enabled | | yes | recall.preferObservations | Advanced. When recalling raw facts together with observations, drop raw facts superseded by a returned observation. |
|
|
241
|
-
| `retainEnabled` | Retain | boolean | enabled | | no | retain.enabled | Stores raw structured conversation deltas after turns. |
|
|
242
|
-
| `retainAsync` | Retain | boolean | enabled | | yes | retain.async | Writes retain jobs through durable queue instead of blocking UI. |
|
|
243
|
-
| `retainDelivery` | Retain | select | immediate | immediate, coalesced | yes | retain.delivery | immediate flushes after every turn (default); coalesced merges compatible deltas and defers delivery to session end or periodic flush (retain.flushIntervalMs) to cut database write amplification. |
|
|
244
|
-
| `queuePath` | Retain | text | .pi/hindsight/retain-queue.jsonl | | yes | retain.queuePath | JSONL retry queue used when Hindsight is unavailable. |
|
|
245
|
-
| `globalRetainMode` | Retain | select | explicit-only | explicit-only | yes | globalRetain.mode | Advanced. explicit-only keeps User Bank writes manual (the only supported mode). |
|
|
246
|
-
| `importMode` | Import | select | curated | curated, raw, forensic | no | import.mode | Curated drops noisy successful tool results from preview metrics; raw keeps current raw branch import behavior; forensic preserves recall blocks too. |
|
|
247
|
-
| `importQualityProfile` | Import | select | compatible | compatible, strict | no | import.qualityProfile | Compatible preserves current curated behavior; strict drops process/UI-like, oversized, or repeated successful tool output in curated mode. |
|
|
248
|
-
| `importBranches` | Import | select | current-only | current-only, all-leaves | no | import.includeBranches | Import current branch only, or every leaf branch explicitly. |
|
|
249
|
-
| `importToolResults` | Import | select | errors-only | errors-only, summary, content | no | import.toolResults | Curated import defaults to errors-only; summary keeps bounded low-noise successful tool output; content keeps allowed full successful tool content. |
|
|
250
|
-
| `importToolSummaryMaxChars` | Import | positive-int | 500 | | yes | import.toolResultSummaryMaxChars | Maximum characters kept for successful tool summaries in curated imports. |
|
|
251
|
-
| `importManifest` | Import | text | .pi/hindsight/import-manifest.json | | yes | import.manifestPath | Tracks imported sessions so reimports stay deterministic. |
|
|
252
|
-
| `importCheckpoint` | Import | text | .pi/hindsight/import-checkpoint.json | | yes | import.checkpointPath | Tracks import progress so interrupted imports can resume safely. |
|
|
253
|
-
| `importReplaceExisting` | Import | boolean | enabled | | yes | import.replaceExistingImportedDocs | Uses deterministic replace mode for historical reimports instead of appending duplicates. |
|
|
254
|
-
| `importResume` | Import | boolean | enabled | | yes | import.resume | Skips completed import documents when checkpoint content hashes match. |
|
|
255
|
-
| `statusStyle` | UI | select | text | off, text, emoji, nerdfont | no | status.style | Off, plain text, emoji, or nerdfont symbols. |
|
|
256
|
-
| `statusDetail` | UI | select | activity | minimal, project, activity, verbose | no | status.detail | How much Hindsight info appears in Pi footer. |
|
|
257
|
-
| `statusMaxLength` | UI | positive-int | 24 | | no | status.maxLength | Maximum characters used by Hindsight footer status. |
|
|
258
|
-
| `statusActivity` | UI | boolean | enabled | | no | status.showActivity | Displays recall/retain activity in the status line. |
|
|
259
|
-
| `notifyStartup` | UI | boolean | enabled | | no | notifications.startup | Shows selected Hindsight bank when Pi session starts. |
|
|
260
|
-
| `notifyRecall` | UI | boolean | disabled | | no | notifications.recall | Shows a toast when automatic recall runs. |
|
|
261
|
-
| `notifyRetain` | UI | boolean | disabled | | no | notifications.retain | Shows a toast when automatic retain queues memory. |
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
import type { AgentUseProfile, BankMissionSettings, HindsightLikeClient } from "../types.js";
|
|
2
|
-
|
|
3
|
-
const DEFAULT_PROJECT_REFLECT_MISSION =
|
|
4
|
-
"You are a senior developer helping a Pi coding agent. Prefer past technical decisions, architecture trade-offs, conventions, and constraints. Be direct and opinionated when memory supports it; do not invent facts not grounded in memory.";
|
|
5
|
-
|
|
6
|
-
const DEFAULT_PROJECT_RETAIN_MISSION =
|
|
7
|
-
"Always extract technical decisions, API/architecture trade-offs, blockers, error resolutions, repo conventions, and durable project-local preferences. " +
|
|
8
|
-
"CRITICAL for conversations: record ONLY the FINAL settled state as what is in effect — when the same rule is amended, keep only the LAST choice; superseded proposals appear only as rejected alternatives, never as active decisions. " +
|
|
9
|
-
"Ignore greetings, small talk, scheduling logistics, secrets, probe/bait harness instructions (e.g. temporary 'do not ask questions' test rules), and resurfaced recalled memory unless it adds a new correction or decision.";
|
|
10
|
-
|
|
11
|
-
const DEFAULT_PROJECT_OBSERVATIONS_MISSION =
|
|
12
|
-
"Identify evolving durable project patterns, recurring constraints, architectural preferences, and contradictions with prior knowledge. Focus on stable repo-relevant knowledge — not transient task state, one-off plans, or test-harness noise.";
|
|
13
|
-
|
|
14
|
-
const DEFAULT_GLOBAL_REFLECT_MISSION =
|
|
15
|
-
"You are a coding assistant with durable cross-project context. Personalize using stable user preferences, workflows, and communication style. Be direct; prefer high-signal clarifications over speculation.";
|
|
16
|
-
|
|
17
|
-
const DEFAULT_GLOBAL_RETAIN_MISSION =
|
|
18
|
-
"Extract durable cross-project memory: user preferences (including clarification/communication style), recurring workflows, coding habits, and stable assistant behavior. Ignore greetings, secrets, probe/bait session rules, repo-specific code facts, file paths, and project-local bugs unless they generalize across projects.";
|
|
19
|
-
|
|
20
|
-
const DEFAULT_GLOBAL_OBSERVATIONS_MISSION =
|
|
21
|
-
"Identify durable cross-project preferences, recurring workflows, coding habits, and stable assistant behavior patterns. Highlight contradictions with prior knowledge. Ignore repo-specific implementation details and one-off probe constraints unless they generalize.";
|
|
22
|
-
|
|
23
|
-
/** Life / conversation user bank — personal durable context, not coding-repo facts. */
|
|
24
|
-
const DEFAULT_LIFE_REFLECT_MISSION =
|
|
25
|
-
"You are a personal assistant with durable life and task context. Use stable preferences, commitments, people/context, and planning habits. Be concise and practical; prefer high-signal clarifications over speculation. Do not invent personal facts not grounded in memory.";
|
|
26
|
-
|
|
27
|
-
const DEFAULT_LIFE_RETAIN_MISSION =
|
|
28
|
-
"Extract durable personal and life-task memory: communication preferences, commitments, deadlines, people/roles/context, planning and prioritization habits, and stable constraints. Ignore greetings, secrets, probe/bait harness rules, and repo-specific engineering details (file paths, bugs, PR mechanics) unless they are truly personal durable preferences.";
|
|
29
|
-
|
|
30
|
-
const DEFAULT_LIFE_OBSERVATIONS_MISSION =
|
|
31
|
-
"Identify durable life and task patterns: recurring preferences, commitments, relationship/context patterns, and planning habits. Highlight contradictions with prior knowledge. Ignore transient chat filler, one-off logistics, and coding-repo implementation noise.";
|
|
32
|
-
|
|
33
|
-
export interface BankMissionDefaults {
|
|
34
|
-
reflectMission: string;
|
|
35
|
-
retainMission: string;
|
|
36
|
-
observationsMission: string;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function defaultProjectBankMissions(): BankMissionDefaults {
|
|
40
|
-
return {
|
|
41
|
-
reflectMission: DEFAULT_PROJECT_REFLECT_MISSION,
|
|
42
|
-
retainMission: DEFAULT_PROJECT_RETAIN_MISSION,
|
|
43
|
-
observationsMission: DEFAULT_PROJECT_OBSERVATIONS_MISSION,
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
export function defaultGlobalBankMissions(): BankMissionDefaults {
|
|
48
|
-
return {
|
|
49
|
-
reflectMission: DEFAULT_GLOBAL_REFLECT_MISSION,
|
|
50
|
-
retainMission: DEFAULT_GLOBAL_RETAIN_MISSION,
|
|
51
|
-
observationsMission: DEFAULT_GLOBAL_OBSERVATIONS_MISSION,
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
/** Defaults for Life / conversation user bank (agentUse conversation). */
|
|
56
|
-
export function defaultLifeBankMissions(): BankMissionDefaults {
|
|
57
|
-
return {
|
|
58
|
-
reflectMission: DEFAULT_LIFE_REFLECT_MISSION,
|
|
59
|
-
retainMission: DEFAULT_LIFE_RETAIN_MISSION,
|
|
60
|
-
observationsMission: DEFAULT_LIFE_OBSERVATIONS_MISSION,
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** User/life bank defaults: conversation → life missions; coding → cross-project coding prefs. */
|
|
65
|
-
export function defaultUserBankMissions(agentUse: AgentUseProfile = "coding"): BankMissionDefaults {
|
|
66
|
-
return agentUse === "conversation" ? defaultLifeBankMissions() : defaultGlobalBankMissions();
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
export interface BankMissionConfig extends BankMissionSettings {
|
|
70
|
-
enableObservations?: boolean;
|
|
71
|
-
/** Selects life vs coding-user mission defaults when creating a user bank. */
|
|
72
|
-
agentUse?: AgentUseProfile;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
export function resolveBankMissions(
|
|
76
|
-
config: BankMissionSettings,
|
|
77
|
-
defaults: BankMissionDefaults,
|
|
78
|
-
): BankMissionDefaults {
|
|
79
|
-
return {
|
|
80
|
-
reflectMission: config.reflectMission ?? defaults.reflectMission,
|
|
81
|
-
retainMission: config.retainMission ?? defaults.retainMission,
|
|
82
|
-
observationsMission: config.observationsMission ?? defaults.observationsMission,
|
|
83
|
-
};
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
function isNotFoundError(error: unknown): boolean {
|
|
87
|
-
if (typeof error !== "object" || !error) return false;
|
|
88
|
-
const fields = error as {
|
|
89
|
-
status?: unknown;
|
|
90
|
-
statusCode?: unknown;
|
|
91
|
-
code?: unknown;
|
|
92
|
-
message?: unknown;
|
|
93
|
-
};
|
|
94
|
-
return (
|
|
95
|
-
fields.status === 404 ||
|
|
96
|
-
fields.statusCode === 404 ||
|
|
97
|
-
fields.code === 404 ||
|
|
98
|
-
fields.code === "404" ||
|
|
99
|
-
(typeof fields.message === "string" && /\b404\b|not found/i.test(fields.message))
|
|
100
|
-
);
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
async function bankNeedsCreate(client: HindsightLikeClient, bankId: string): Promise<boolean> {
|
|
104
|
-
if (!client.getBankProfile) return false;
|
|
105
|
-
try {
|
|
106
|
-
await client.getBankProfile(bankId);
|
|
107
|
-
return false;
|
|
108
|
-
} catch (error) {
|
|
109
|
-
if (isNotFoundError(error)) return true;
|
|
110
|
-
throw error;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
export async function ensureProjectBank(
|
|
115
|
-
client: HindsightLikeClient,
|
|
116
|
-
bankId: string,
|
|
117
|
-
config: BankMissionConfig = {},
|
|
118
|
-
): Promise<void> {
|
|
119
|
-
if (!client.createBank || !(await bankNeedsCreate(client, bankId))) return;
|
|
120
|
-
const missions = resolveBankMissions(config, defaultProjectBankMissions());
|
|
121
|
-
await client.createBank(bankId, {
|
|
122
|
-
name: bankId,
|
|
123
|
-
...missions,
|
|
124
|
-
retainExtractionMode: "concise",
|
|
125
|
-
enableObservations: config.enableObservations ?? true,
|
|
126
|
-
...(config.retainStructuredChunkSize !== undefined
|
|
127
|
-
? { retainStructuredChunkSize: config.retainStructuredChunkSize }
|
|
128
|
-
: {}),
|
|
129
|
-
});
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
export async function ensureGlobalBank(
|
|
133
|
-
client: HindsightLikeClient,
|
|
134
|
-
bankId: string,
|
|
135
|
-
config: BankMissionConfig = {},
|
|
136
|
-
): Promise<void> {
|
|
137
|
-
if (!client.createBank || !(await bankNeedsCreate(client, bankId))) return;
|
|
138
|
-
const missions = resolveBankMissions(
|
|
139
|
-
config,
|
|
140
|
-
defaultUserBankMissions(config.agentUse ?? "coding"),
|
|
141
|
-
);
|
|
142
|
-
await client.createBank(bankId, {
|
|
143
|
-
name: bankId,
|
|
144
|
-
...missions,
|
|
145
|
-
retainExtractionMode: "concise",
|
|
146
|
-
enableObservations: config.enableObservations ?? true,
|
|
147
|
-
...(config.retainStructuredChunkSize !== undefined
|
|
148
|
-
? { retainStructuredChunkSize: config.retainStructuredChunkSize }
|
|
149
|
-
: {}),
|
|
150
|
-
});
|
|
151
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import type { ResolvedConfig } from "../types.js";
|
|
2
|
-
|
|
3
|
-
export function resolveOperationBank(args: {
|
|
4
|
-
requestedBank: string | undefined;
|
|
5
|
-
config: ResolvedConfig;
|
|
6
|
-
projectBankId: string;
|
|
7
|
-
}): string {
|
|
8
|
-
const requested = args.requestedBank?.trim();
|
|
9
|
-
if (!requested || requested === "project") return args.projectBankId;
|
|
10
|
-
if (requested === "global") {
|
|
11
|
-
if (!args.config.banks.user.enabled)
|
|
12
|
-
throw new Error("User Hindsight bank is disabled. Enable banks.user first.");
|
|
13
|
-
if (!args.config.banks.user.bankId)
|
|
14
|
-
throw new Error("User Hindsight bank ID is not configured.");
|
|
15
|
-
return args.config.banks.user.bankId;
|
|
16
|
-
}
|
|
17
|
-
return requested;
|
|
18
|
-
}
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
import { isRecord } from "../config/config-normalize.js";
|
|
2
|
-
|
|
3
|
-
export type BankSettingsLocation = "Project" | "User";
|
|
4
|
-
|
|
5
|
-
export interface BankSettingsTarget {
|
|
6
|
-
location: BankSettingsLocation;
|
|
7
|
-
bankId: string;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
export interface BankSettingsTargetDisplay {
|
|
11
|
-
location: BankSettingsLocation;
|
|
12
|
-
bankId: string;
|
|
13
|
-
locationLabel: string;
|
|
14
|
-
bankLabel: string;
|
|
15
|
-
optionLabel: string;
|
|
16
|
-
reviewLine: string;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
export function bankSettingsTargetDisplay(target: BankSettingsTarget): BankSettingsTargetDisplay {
|
|
20
|
-
return {
|
|
21
|
-
location: target.location,
|
|
22
|
-
bankId: target.bankId,
|
|
23
|
-
locationLabel: `Location: ${target.location}`,
|
|
24
|
-
bankLabel: `Bank: ${target.bankId}`,
|
|
25
|
-
optionLabel: `${target.location} bank (${target.bankId})`,
|
|
26
|
-
reviewLine: `${target.location} → Bank: ${target.bankId}`,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
export function bankSettingsTargetLines(target: BankSettingsTarget): string[] {
|
|
31
|
-
const display = bankSettingsTargetDisplay(target);
|
|
32
|
-
return [display.locationLabel, display.bankLabel];
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
function objectCount(value: unknown): number {
|
|
36
|
-
return isRecord(value) ? Object.keys(value).length : 0;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
export function bankConfigOverrideSummaryLines(response: unknown): string[] {
|
|
40
|
-
if (!isRecord(response)) return ["Bank overrides: unavailable"];
|
|
41
|
-
const overrides = isRecord(response.overrides) ? response.overrides : undefined;
|
|
42
|
-
const config = isRecord(response.config) ? response.config : undefined;
|
|
43
|
-
const overrideCount = objectCount(overrides);
|
|
44
|
-
const resolvedCount = objectCount(config);
|
|
45
|
-
return [`Bank overrides: ${overrideCount}`, `Resolved config fields: ${resolvedCount}`];
|
|
46
|
-
}
|