pi-para 0.5.2 → 0.5.5
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/ARCHITECTURE.md +160 -0
- package/CHANGELOG.md +29 -0
- package/CONFIGURATION.md +243 -0
- package/README.md +140 -237
- package/SETUP.md +196 -112
- package/STRUCTURE.md +140 -0
- package/dist/atomic-write.d.ts +2 -0
- package/dist/atomic-write.d.ts.map +1 -0
- package/dist/atomic-write.js +18 -0
- package/dist/atomic-write.js.map +1 -0
- package/dist/capture.d.ts +4 -4
- package/dist/capture.d.ts.map +1 -1
- package/dist/capture.js +1 -1
- package/dist/capture.js.map +1 -1
- package/dist/cli-legacy.d.ts +4 -0
- package/dist/cli-legacy.d.ts.map +1 -0
- package/dist/cli-legacy.js +41 -0
- package/dist/cli-legacy.js.map +1 -0
- package/dist/cli.d.ts +2 -9
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +135 -29
- package/dist/cli.js.map +1 -1
- package/dist/commands.d.ts +3 -3
- package/dist/commands.d.ts.map +1 -1
- package/dist/commands.js +189 -256
- package/dist/commands.js.map +1 -1
- package/dist/config.d.ts +104 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +242 -0
- package/dist/config.js.map +1 -0
- package/dist/context.d.ts +4 -2
- package/dist/context.d.ts.map +1 -1
- package/dist/context.js +29 -7
- package/dist/context.js.map +1 -1
- package/dist/credentials.d.ts +27 -0
- package/dist/credentials.d.ts.map +1 -0
- package/dist/credentials.js +85 -0
- package/dist/credentials.js.map +1 -0
- package/dist/daemon.d.ts +1 -1
- package/dist/daemon.d.ts.map +1 -1
- package/dist/doctor.d.ts +20 -0
- package/dist/doctor.d.ts.map +1 -0
- package/dist/doctor.js +171 -0
- package/dist/doctor.js.map +1 -0
- package/dist/gepa/index.js +1 -1
- package/dist/gepa/index.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +102 -37
- package/dist/index.js.map +1 -1
- package/dist/maintainer.d.ts +2 -2
- package/dist/maintainer.d.ts.map +1 -1
- package/dist/maintainer.js +2 -2
- package/dist/maintainer.js.map +1 -1
- package/dist/model-resolver.d.ts +30 -0
- package/dist/model-resolver.d.ts.map +1 -0
- package/dist/model-resolver.js +71 -0
- package/dist/model-resolver.js.map +1 -0
- package/dist/paths.d.ts +20 -0
- package/dist/paths.d.ts.map +1 -0
- package/dist/paths.js +33 -0
- package/dist/paths.js.map +1 -0
- package/dist/processor.d.ts +2 -2
- package/dist/processor.d.ts.map +1 -1
- package/dist/processor.js +2 -2
- package/dist/processor.js.map +1 -1
- package/dist/qmd-providers.d.ts +12 -0
- package/dist/qmd-providers.d.ts.map +1 -0
- package/dist/qmd-providers.js +45 -0
- package/dist/qmd-providers.js.map +1 -0
- package/dist/query.d.ts +1 -1
- package/dist/query.d.ts.map +1 -1
- package/dist/query.js +14 -1
- package/dist/query.js.map +1 -1
- package/dist/repair.d.ts +11 -0
- package/dist/repair.d.ts.map +1 -0
- package/dist/repair.js +41 -0
- package/dist/repair.js.map +1 -0
- package/dist/scheduler/controls.d.ts +35 -0
- package/dist/scheduler/controls.d.ts.map +1 -0
- package/dist/scheduler/controls.js +98 -0
- package/dist/scheduler/controls.js.map +1 -0
- package/dist/scheduler/index.d.ts +48 -0
- package/dist/scheduler/index.d.ts.map +1 -0
- package/dist/scheduler/index.js +193 -0
- package/dist/scheduler/index.js.map +1 -0
- package/dist/scheduler/leases.d.ts +22 -0
- package/dist/scheduler/leases.d.ts.map +1 -0
- package/dist/scheduler/leases.js +74 -0
- package/dist/scheduler/leases.js.map +1 -0
- package/dist/scheduler/session-capture.d.ts +33 -0
- package/dist/scheduler/session-capture.d.ts.map +1 -0
- package/dist/scheduler/session-capture.js +108 -0
- package/dist/scheduler/session-capture.js.map +1 -0
- package/dist/scheduler/state.d.ts +56 -0
- package/dist/scheduler/state.d.ts.map +1 -0
- package/dist/scheduler/state.js +210 -0
- package/dist/scheduler/state.js.map +1 -0
- package/dist/session-tools.d.ts +1 -1
- package/dist/session-tools.d.ts.map +1 -1
- package/dist/settings.d.ts +19 -0
- package/dist/settings.d.ts.map +1 -0
- package/dist/settings.js +106 -0
- package/dist/settings.js.map +1 -0
- package/dist/setup.d.ts +29 -0
- package/dist/setup.d.ts.map +1 -0
- package/dist/setup.js +90 -0
- package/dist/setup.js.map +1 -0
- package/dist/status.d.ts +22 -0
- package/dist/status.d.ts.map +1 -0
- package/dist/status.js +93 -0
- package/dist/status.js.map +1 -0
- package/dist/store.d.ts +23 -8
- package/dist/store.d.ts.map +1 -1
- package/dist/store.js +89 -34
- package/dist/store.js.map +1 -1
- package/dist/summarize.d.ts +6 -2
- package/dist/summarize.d.ts.map +1 -1
- package/dist/summarize.js +60 -25
- package/dist/summarize.js.map +1 -1
- package/dist/templates/prompts.d.ts +1 -1
- package/dist/templates/prompts.d.ts.map +1 -1
- package/dist/templates/prompts.js +1 -1
- package/dist/tools.d.ts +5 -5
- package/dist/tools.d.ts.map +1 -1
- package/dist/tools.js +243 -78
- package/dist/tools.js.map +1 -1
- package/dist/wiki-tool-guidance.d.ts +6 -0
- package/dist/wiki-tool-guidance.d.ts.map +1 -0
- package/dist/wiki-tool-guidance.js +70 -0
- package/dist/wiki-tool-guidance.js.map +1 -0
- package/dist/wiki.d.ts +6 -1
- package/dist/wiki.d.ts.map +1 -1
- package/dist/wiki.js +88 -19
- package/dist/wiki.js.map +1 -1
- package/package.json +80 -15
- package/scripts/install.ps1 +44 -0
- package/scripts/install.sh +62 -0
- package/scripts/smoke-install.mjs +61 -0
- package/skills/para/SKILL.md +1 -1
- package/skills/setup/SKILL.md +1 -1
- package/src/atomic-write.ts +17 -0
- package/src/capture.ts +4 -4
- package/src/cli-legacy.ts +43 -0
- package/src/cli.ts +133 -28
- package/src/commands.ts +203 -243
- package/src/config.ts +355 -0
- package/src/context.ts +29 -14
- package/src/credentials.ts +100 -0
- package/src/daemon.ts +1 -1
- package/src/doctor.ts +204 -0
- package/src/gepa/index.ts +1 -1
- package/src/index.ts +119 -40
- package/src/maintainer.ts +4 -4
- package/src/model-resolver.ts +96 -0
- package/src/paths.ts +48 -0
- package/src/processor.ts +4 -4
- package/src/qmd-providers.ts +63 -0
- package/src/query.ts +15 -1
- package/src/repair.ts +49 -0
- package/src/scheduler/controls.ts +125 -0
- package/src/scheduler/index.ts +210 -0
- package/src/scheduler/leases.ts +98 -0
- package/src/scheduler/session-capture.ts +146 -0
- package/src/scheduler/state.ts +304 -0
- package/src/session-tools.ts +1 -1
- package/src/settings.ts +126 -0
- package/src/setup.ts +116 -0
- package/src/status.ts +115 -0
- package/src/store.ts +116 -31
- package/src/summarize.ts +72 -16
- package/src/templates/prompts.ts +1 -1
- package/src/tools.ts +280 -90
- package/src/wiki-tool-guidance.ts +84 -0
- package/src/wiki.ts +98 -26
package/ARCHITECTURE.md
ADDED
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
# pi-para Architecture
|
|
2
|
+
|
|
3
|
+
pi-para is a Pi extension that maintains a PARA markdown wiki with scoped search, context injection, safe mutation tools, and scheduler-backed background capture.
|
|
4
|
+
|
|
5
|
+
## High-level runtime
|
|
6
|
+
|
|
7
|
+
```text
|
|
8
|
+
Pi process
|
|
9
|
+
└─ pi-para extension
|
|
10
|
+
├─ wiki filesystem (~/.pi/wiki)
|
|
11
|
+
├─ QMD SDK store (.qmd.sqlite)
|
|
12
|
+
├─ in-process scheduler (.pi-para.sqlite)
|
|
13
|
+
├─ tools + slash commands
|
|
14
|
+
├─ context injection
|
|
15
|
+
└─ optional WebWiki UI
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
No separate OS daemon is required. The scheduler runs while Pi is open and catches up on the next startup if Pi was closed.
|
|
19
|
+
|
|
20
|
+
## Startup flow
|
|
21
|
+
|
|
22
|
+
```text
|
|
23
|
+
Pi starts
|
|
24
|
+
-> pi-para loads ~/.pi/para/config.jsonc
|
|
25
|
+
-> migrates legacy ~/.pi/wiki/config.json if needed
|
|
26
|
+
-> registers tools and slash commands
|
|
27
|
+
-> session_start
|
|
28
|
+
-> initWiki(wikiDir)
|
|
29
|
+
-> open QMD SDK store
|
|
30
|
+
-> detect/restore project scope
|
|
31
|
+
-> register capture handler if model/auth is available
|
|
32
|
+
-> start scheduler
|
|
33
|
+
-> enqueue completed-session catch-up
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Failures in optional background systems are fail-open: Pi startup and foreground wiki tools should keep working whenever possible.
|
|
37
|
+
|
|
38
|
+
## Wiki filesystem
|
|
39
|
+
|
|
40
|
+
The wiki is durable markdown:
|
|
41
|
+
|
|
42
|
+
```text
|
|
43
|
+
~/.pi/wiki/
|
|
44
|
+
├── schema.md
|
|
45
|
+
├── index.md
|
|
46
|
+
├── log.md
|
|
47
|
+
├── sessions.md
|
|
48
|
+
├── projects/
|
|
49
|
+
├── areas/
|
|
50
|
+
├── resources/
|
|
51
|
+
├── archives/
|
|
52
|
+
├── raw/
|
|
53
|
+
├── .completed-sessions
|
|
54
|
+
├── .pi-para.sqlite
|
|
55
|
+
└── .qmd.sqlite
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Generated SQLite files are ignored by git. Durable markdown, raw source markdown, and logs are the important user data.
|
|
59
|
+
|
|
60
|
+
## QMD SDK
|
|
61
|
+
|
|
62
|
+
`src/store.ts` opens QMD via `qmd-engine` SDK with inline collection config. It indexes:
|
|
63
|
+
|
|
64
|
+
- `wiki`: all markdown except `raw/**`,
|
|
65
|
+
- `raw`: source material, excluded from default query results.
|
|
66
|
+
|
|
67
|
+
Provider config precedence:
|
|
68
|
+
|
|
69
|
+
1. pi-para provider profiles from `~/.pi/para/config.jsonc`,
|
|
70
|
+
2. legacy `~/.config/qmd/index.yml` only when explicit compatibility mode is used,
|
|
71
|
+
3. an inert API provider shim when no provider is configured.
|
|
72
|
+
|
|
73
|
+
pi-para never uses QMD local/node-llama-cpp LLM defaults. BM25 search works without calling an LLM; accidental vector/chat calls without a configured API provider fail fast instead of downloading/building local models.
|
|
74
|
+
|
|
75
|
+
Global `qmd` CLI is optional for debugging and not part of normal runtime.
|
|
76
|
+
|
|
77
|
+
## Scheduler
|
|
78
|
+
|
|
79
|
+
`src/scheduler/` implements durable background work:
|
|
80
|
+
|
|
81
|
+
- queue/history tables,
|
|
82
|
+
- SQLite leases,
|
|
83
|
+
- bounded retries,
|
|
84
|
+
- periodic ticks,
|
|
85
|
+
- task handlers.
|
|
86
|
+
|
|
87
|
+
Initial tasks include:
|
|
88
|
+
|
|
89
|
+
- `wiki-maintenance`,
|
|
90
|
+
- `capture-session`.
|
|
91
|
+
|
|
92
|
+
The scheduler is process-local but coordinates via SQLite so multiple Pi processes do not process the same task concurrently.
|
|
93
|
+
|
|
94
|
+
## Capture flow
|
|
95
|
+
|
|
96
|
+
```text
|
|
97
|
+
session_compact/session_shutdown/manual capture
|
|
98
|
+
-> append .completed-sessions entry
|
|
99
|
+
-> enqueue capture-session task if scheduler is available
|
|
100
|
+
-> scheduler handler runs createCaptureSessionHandler
|
|
101
|
+
-> capture agent reads session file and uses wiki tools
|
|
102
|
+
-> StateDB records processed session/history
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
Capture model selection uses `config.models.capture` and credential refs. If no model/auth is available, capture handler registration is skipped; queued entries remain for a later session.
|
|
106
|
+
|
|
107
|
+
## Config model
|
|
108
|
+
|
|
109
|
+
Canonical config:
|
|
110
|
+
|
|
111
|
+
```text
|
|
112
|
+
~/.pi/para/config.jsonc
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
The runtime still converts to a small legacy-compatible shape internally in some modules. New code should depend on `ParaUserConfig` from `src/config.ts` where possible.
|
|
116
|
+
|
|
117
|
+
Credential refs never store secret values in config:
|
|
118
|
+
|
|
119
|
+
```text
|
|
120
|
+
pi-auth:<provider>
|
|
121
|
+
secret:<name>
|
|
122
|
+
none
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
## Tool safety and guidance
|
|
126
|
+
|
|
127
|
+
Mutation tools are intentionally split:
|
|
128
|
+
|
|
129
|
+
- `wiki_edit`: atomic exact text replacements for existing pages.
|
|
130
|
+
- `wiki_write mode=create`: creates only, skips existing pages.
|
|
131
|
+
- `wiki_write mode=replace`: explicit full-page replacement.
|
|
132
|
+
|
|
133
|
+
This avoids accidental destructive rewrites from broad LLM edits.
|
|
134
|
+
|
|
135
|
+
Tool API contracts and behavioral guidance are separated:
|
|
136
|
+
|
|
137
|
+
- `src/wiki-tool-guidance.ts`: canonical tool descriptions, prompt snippets, per-tool guidelines, and shared wiki behavior guidance.
|
|
138
|
+
- `src/tools.ts`: host registration, schemas, rendering, and execution only.
|
|
139
|
+
- `src/context.ts`: injects the shared guidance once with wiki context so agents learn when to search, verify stale pages, and self-heal with `wiki_edit`.
|
|
140
|
+
|
|
141
|
+
## GEPA optimizer
|
|
142
|
+
|
|
143
|
+
GEPA lives in two layers:
|
|
144
|
+
|
|
145
|
+
- `src/gepa/index.ts`: TypeScript target extraction/orchestration and CLI.
|
|
146
|
+
- `scripts/gepa/`: Python/uv DSPy program, metric, dataset, custom LMs.
|
|
147
|
+
|
|
148
|
+
It uses DSPy GEPA, not a custom TypeScript optimizer, and uses custom `dspy.BaseLM` providers for Anthropic OAuth/MiniMax/OpenRouter.
|
|
149
|
+
|
|
150
|
+
## Compatibility surfaces
|
|
151
|
+
|
|
152
|
+
Kept temporarily:
|
|
153
|
+
|
|
154
|
+
- `pi-para-daemon` binary alias,
|
|
155
|
+
- `/wiki-daemon` slash command alias,
|
|
156
|
+
- legacy daemon CLI subcommands,
|
|
157
|
+
- legacy config migration from `~/.pi/wiki/config.json`,
|
|
158
|
+
- legacy QMD YAML provider fallback.
|
|
159
|
+
|
|
160
|
+
Primary docs and setup should point users to `pi-para`, `/wiki-scheduler`, and `~/.pi/para/config.jsonc`.
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,34 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## Unreleased
|
|
4
|
+
|
|
5
|
+
### Changed
|
|
6
|
+
- Primary setup/runtime documentation now targets the no-daemon in-process scheduler architecture.
|
|
7
|
+
- Added cross-platform install wrappers in `scripts/install.sh` and `scripts/install.ps1`.
|
|
8
|
+
- Deprecated legacy daemon setup artifacts: `setup.sh` now delegates to the current setup flow, and `pi-para-daemon.service` / `DAEMON-PLAN.md` are marked legacy.
|
|
9
|
+
- Legacy daemon CLI commands (`start`, `stop`, `process`, `process-recent`, `retry-failed`, `history`, `legacy-status`) now print deprecation guidance toward scheduler/task commands.
|
|
10
|
+
- `pi-para status` now reports config/wiki/page/scheduler/QMD status instead of legacy daemon status; old daemon status moved to `pi-para legacy-status`.
|
|
11
|
+
- Added `pi-para status --json` and `npm run smoke:install` for fresh-install smoke validation.
|
|
12
|
+
- Added GitHub Actions CI for typecheck, tests, coverage, build, and fresh-install smoke validation.
|
|
13
|
+
|
|
14
|
+
## [0.5.5] — 2026-05-07
|
|
15
|
+
|
|
16
|
+
### Changed
|
|
17
|
+
- `wiki_edit` stays fast but now schedules debounced background maintenance to rebuild `index.md` and refresh QMD search after surgical edits.
|
|
18
|
+
|
|
19
|
+
## [0.5.4] — 2026-05-07
|
|
20
|
+
|
|
21
|
+
### Fixed
|
|
22
|
+
- Wiki edits no longer stage generated SQLite/search state in git auto-commits.
|
|
23
|
+
- New wiki directories seed a `.gitignore` for `.qmd.sqlite*`, `.daemon.sqlite*`, and GEPA scratch output.
|
|
24
|
+
|
|
25
|
+
## [0.5.3] — 2026-05-02
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- `wiki_write` is now safer: `mode=create` skips existing pages instead of overwriting them.
|
|
29
|
+
- Added `wiki_edit` for atomic surgical page edits with exact `oldText→newText` replacements.
|
|
30
|
+
- Updated prompts/tool guidance to prefer `wiki_edit` for self-healing stale pages and reserve `wiki_write mode=replace` for intentional full-page rewrites.
|
|
31
|
+
|
|
3
32
|
## [0.5.2] — 2026-05-02
|
|
4
33
|
|
|
5
34
|
### Added
|
package/CONFIGURATION.md
ADDED
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# pi-para Configuration
|
|
2
|
+
|
|
3
|
+
Canonical user config lives at:
|
|
4
|
+
|
|
5
|
+
```text
|
|
6
|
+
~/.pi/para/config.jsonc
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
The wiki defaults to:
|
|
10
|
+
|
|
11
|
+
```text
|
|
12
|
+
~/.pi/wiki
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Precedence
|
|
16
|
+
|
|
17
|
+
Current implemented precedence:
|
|
18
|
+
|
|
19
|
+
1. built-in defaults,
|
|
20
|
+
2. `~/.pi/para/config.jsonc`,
|
|
21
|
+
3. migrated legacy `~/.pi/wiki/config.json` when canonical config is missing,
|
|
22
|
+
4. command-specific CLI flags.
|
|
23
|
+
|
|
24
|
+
Planned/project-level overrides may use `<project>/.pi/para.jsonc` in a later slice.
|
|
25
|
+
|
|
26
|
+
## Minimal config
|
|
27
|
+
|
|
28
|
+
```jsonc
|
|
29
|
+
{
|
|
30
|
+
"version": 1,
|
|
31
|
+
"wiki": {
|
|
32
|
+
"dir": "~/.pi/wiki",
|
|
33
|
+
"autoCapture": true,
|
|
34
|
+
"captureOnCompact": true,
|
|
35
|
+
"captureOnStartup": true
|
|
36
|
+
},
|
|
37
|
+
"context": {
|
|
38
|
+
"maxTokens": 4000,
|
|
39
|
+
"includeSchema": true,
|
|
40
|
+
"includeIndex": true,
|
|
41
|
+
"searchLimit": 10,
|
|
42
|
+
"searchGraphBoost": true
|
|
43
|
+
},
|
|
44
|
+
"scheduler": {
|
|
45
|
+
"enabled": true,
|
|
46
|
+
"startupCatchup": true,
|
|
47
|
+
"intervalMinutes": 15,
|
|
48
|
+
"maxConcurrentTasks": 1
|
|
49
|
+
},
|
|
50
|
+
"models": {
|
|
51
|
+
"capture": "auto",
|
|
52
|
+
"summarize": "auto",
|
|
53
|
+
"judge": "auto"
|
|
54
|
+
},
|
|
55
|
+
"qmd": {
|
|
56
|
+
"mode": "sdk",
|
|
57
|
+
"embedEnabled": true,
|
|
58
|
+
"providerConfig": "pi-para-profiles"
|
|
59
|
+
},
|
|
60
|
+
"lint": {
|
|
61
|
+
"autoFix": true,
|
|
62
|
+
"staleDays": 90
|
|
63
|
+
},
|
|
64
|
+
"webWiki": {
|
|
65
|
+
"enabled": false,
|
|
66
|
+
"host": "127.0.0.1",
|
|
67
|
+
"port": 10973,
|
|
68
|
+
"launch": "manual"
|
|
69
|
+
},
|
|
70
|
+
"gepa": {
|
|
71
|
+
"useOptimized": false,
|
|
72
|
+
"studentModel": "anthropic/claude-sonnet-4-20250514",
|
|
73
|
+
"teacherModel": "anthropic/claude-opus-4-6",
|
|
74
|
+
"judgeModel": "anthropic/claude-sonnet-4-20250514",
|
|
75
|
+
"auto": "light",
|
|
76
|
+
"threads": 2,
|
|
77
|
+
"seed": 42
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
## Credential refs
|
|
83
|
+
|
|
84
|
+
Config stores references, not secret values.
|
|
85
|
+
|
|
86
|
+
```text
|
|
87
|
+
pi-auth:<provider> # Pi AuthStorage, e.g. ~/.pi/agent/auth.json
|
|
88
|
+
secret:<name> # ~/.pi/para/secrets.json
|
|
89
|
+
none # local/no-auth endpoint
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
Examples:
|
|
93
|
+
|
|
94
|
+
```jsonc
|
|
95
|
+
{
|
|
96
|
+
"models": {
|
|
97
|
+
"capture": {
|
|
98
|
+
"provider": "anthropic",
|
|
99
|
+
"model": "claude-sonnet-4-20250514",
|
|
100
|
+
"credentialRef": "pi-auth:anthropic"
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
```jsonc
|
|
107
|
+
{
|
|
108
|
+
"qmd": {
|
|
109
|
+
"embedding": {
|
|
110
|
+
"provider": "openai",
|
|
111
|
+
"model": "text-embedding-3-small",
|
|
112
|
+
"dims": 1536,
|
|
113
|
+
"apiFormat": "openai",
|
|
114
|
+
"credentialRef": "secret:embedding"
|
|
115
|
+
},
|
|
116
|
+
"rerank": {
|
|
117
|
+
"provider": "jina",
|
|
118
|
+
"model": "jina-reranker-v2-base-multilingual",
|
|
119
|
+
"credentialRef": "secret:rerank"
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
Store local secrets with:
|
|
126
|
+
|
|
127
|
+
```bash
|
|
128
|
+
pi-para providers set-secret embedding <key>
|
|
129
|
+
pi-para providers set-secret rerank <key>
|
|
130
|
+
```
|
|
131
|
+
|
|
132
|
+
Inspect without leaking values:
|
|
133
|
+
|
|
134
|
+
```bash
|
|
135
|
+
pi-para providers
|
|
136
|
+
pi-para doctor
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Sections
|
|
140
|
+
|
|
141
|
+
### `wiki`
|
|
142
|
+
|
|
143
|
+
| Field | Meaning |
|
|
144
|
+
|---|---|
|
|
145
|
+
| `dir` | Wiki directory |
|
|
146
|
+
| `defaultScope` | Optional default project scope |
|
|
147
|
+
| `autoCapture` | Enable session capture features |
|
|
148
|
+
| `captureOnCompact` | Queue capture on Pi compaction |
|
|
149
|
+
| `captureOnStartup` | Catch up queued captures on startup |
|
|
150
|
+
|
|
151
|
+
### `context`
|
|
152
|
+
|
|
153
|
+
Controls wiki context injection and default search behavior.
|
|
154
|
+
|
|
155
|
+
| Field | Meaning |
|
|
156
|
+
|---|---|
|
|
157
|
+
| `maxTokens` | Context budget |
|
|
158
|
+
| `includeSchema` | Include schema/conventions in context |
|
|
159
|
+
| `includeIndex` | Include wiki index summary |
|
|
160
|
+
| `searchLimit` | Default search limit |
|
|
161
|
+
| `searchGraphBoost` | Enable wikilink graph boost in search |
|
|
162
|
+
|
|
163
|
+
### `scheduler`
|
|
164
|
+
|
|
165
|
+
Controls in-process background work. No OS daemon is required.
|
|
166
|
+
|
|
167
|
+
| Field | Meaning |
|
|
168
|
+
|---|---|
|
|
169
|
+
| `enabled` | Enable scheduler |
|
|
170
|
+
| `startupCatchup` | Enqueue/process missed sessions on startup |
|
|
171
|
+
| `intervalMinutes` | Periodic scheduler tick interval |
|
|
172
|
+
| `maxConcurrentTasks` | Local concurrency limit |
|
|
173
|
+
|
|
174
|
+
### `models`
|
|
175
|
+
|
|
176
|
+
Role-based model selections. Each value is either `"auto"` or a provider profile.
|
|
177
|
+
|
|
178
|
+
Currently used:
|
|
179
|
+
|
|
180
|
+
- `capture`: session capture model.
|
|
181
|
+
|
|
182
|
+
Planned/advanced:
|
|
183
|
+
|
|
184
|
+
- `summarize`,
|
|
185
|
+
- `judge`.
|
|
186
|
+
|
|
187
|
+
### `qmd`
|
|
188
|
+
|
|
189
|
+
QMD SDK configuration.
|
|
190
|
+
|
|
191
|
+
| Field | Meaning |
|
|
192
|
+
|---|---|
|
|
193
|
+
| `mode` | Always `sdk` for current runtime |
|
|
194
|
+
| `embedEnabled` | Whether to run background embeddings |
|
|
195
|
+
| `providerConfig` | `pi-para-profiles` or `legacy-qmd-compatible` |
|
|
196
|
+
| `embedding` | Optional embedding provider profile |
|
|
197
|
+
| `rerank` | Optional rerank provider profile or `null` |
|
|
198
|
+
|
|
199
|
+
`legacy-qmd-compatible` reads `~/.config/qmd/index.yml` for compatibility only. New installs and migrated local setups should use `pi-para-profiles`.
|
|
200
|
+
|
|
201
|
+
pi-para never uses QMD's local/node-llama-cpp LLM fallback. If no API provider is configured, BM25 search still works and vector/chat calls fail fast instead of downloading local models.
|
|
202
|
+
|
|
203
|
+
### `lint`
|
|
204
|
+
|
|
205
|
+
| Field | Meaning |
|
|
206
|
+
|---|---|
|
|
207
|
+
| `autoFix` | Default lint autofix behavior |
|
|
208
|
+
| `staleDays` | Age threshold for stale pages |
|
|
209
|
+
|
|
210
|
+
### `webWiki`
|
|
211
|
+
|
|
212
|
+
Optional browser UI.
|
|
213
|
+
|
|
214
|
+
| Field | Meaning |
|
|
215
|
+
|---|---|
|
|
216
|
+
| `enabled` | Show/use WebWiki status |
|
|
217
|
+
| `host` | Bind host |
|
|
218
|
+
| `port` | Port |
|
|
219
|
+
| `launch` | `manual` or `disabled` |
|
|
220
|
+
|
|
221
|
+
### `gepa`
|
|
222
|
+
|
|
223
|
+
DSPy GEPA optimizer defaults.
|
|
224
|
+
|
|
225
|
+
| Field | Meaning |
|
|
226
|
+
|---|---|
|
|
227
|
+
| `useOptimized` | Load optimized prompt overrides |
|
|
228
|
+
| `studentModel` | Proxy/evaluation model |
|
|
229
|
+
| `teacherModel` | Reflection/mutation model |
|
|
230
|
+
| `judgeModel` | LLM-as-judge model |
|
|
231
|
+
| `auto` | Budget preset: `light`, `medium`, `heavy` |
|
|
232
|
+
| `threads` | Parallel eval threads |
|
|
233
|
+
| `seed` | Reproducibility seed |
|
|
234
|
+
|
|
235
|
+
## Diagnostics
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
pi-para doctor
|
|
239
|
+
pi-para doctor --fix
|
|
240
|
+
pi-para doctor --test-capture-model
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Doctor checks config, wiki directory, scheduler DB, secrets permissions, generated-state `.gitignore`, provider profiles, capture model credentials, QMD SDK health, and capture backlog.
|