@agimon-ai/po-config 0.0.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +170 -0
- package/dist/agentPluginMcp.cjs +322 -0
- package/dist/agentPluginMcp.cjs.map +1 -0
- package/dist/agentPluginMcp.d.mts +38 -0
- package/dist/agentPluginMcp.d.mts.map +1 -0
- package/dist/agentPluginMcp.mjs +318 -0
- package/dist/agentPluginMcp.mjs.map +1 -0
- package/dist/apiContracts.cjs +203 -0
- package/dist/apiContracts.cjs.map +1 -0
- package/dist/apiContracts.d.mts +53 -0
- package/dist/apiContracts.d.mts.map +1 -0
- package/dist/apiContracts.mjs +198 -0
- package/dist/apiContracts.mjs.map +1 -0
- package/dist/atomicJson-1W0WhuFF.mjs +44 -0
- package/dist/atomicJson-1W0WhuFF.mjs.map +1 -0
- package/dist/atomicJson-Dt2z_DXl.cjs +52 -0
- package/dist/atomicJson-Dt2z_DXl.cjs.map +1 -0
- package/dist/atomicJson.cjs +3 -0
- package/dist/atomicJson.d.mts +2 -0
- package/dist/atomicJson.mjs +2 -0
- package/dist/config-BUw5kHsx.cjs +219 -0
- package/dist/config-BUw5kHsx.cjs.map +1 -0
- package/dist/config-CKA07FxG.mjs +162 -0
- package/dist/config-CKA07FxG.mjs.map +1 -0
- package/dist/config-Cm3EV1jp.d.mts +320 -0
- package/dist/config-Cm3EV1jp.d.mts.map +1 -0
- package/dist/config-NSHRd6na.mjs +2 -0
- package/dist/config-zZz80Mh5.cjs +1 -0
- package/dist/config.cjs +24 -0
- package/dist/config.d.mts +3 -0
- package/dist/config.mjs +3 -0
- package/dist/configPolicy--TNX7feH.mjs +718 -0
- package/dist/configPolicy--TNX7feH.mjs.map +1 -0
- package/dist/configPolicy-DmsZEp0t.cjs +795 -0
- package/dist/configPolicy-DmsZEp0t.cjs.map +1 -0
- package/dist/configSchema.cjs +0 -0
- package/dist/configSchema.d.mts +2 -0
- package/dist/configSchema.mjs +1 -0
- package/dist/configWriter-BTuinLjs.cjs +150 -0
- package/dist/configWriter-BTuinLjs.cjs.map +1 -0
- package/dist/configWriter-BgkGaLrf.mjs +130 -0
- package/dist/configWriter-BgkGaLrf.mjs.map +1 -0
- package/dist/configWriter.cjs +5 -0
- package/dist/configWriter.d.mts +2 -0
- package/dist/configWriter.mjs +2 -0
- package/dist/domains-CBYkuxs5.cjs +727 -0
- package/dist/domains-CBYkuxs5.cjs.map +1 -0
- package/dist/domains-DZOu9vYM.mjs +633 -0
- package/dist/domains-DZOu9vYM.mjs.map +1 -0
- package/dist/domains.cjs +19 -0
- package/dist/domains.d.mts +3 -0
- package/dist/domains.mjs +3 -0
- package/dist/extensions/mcp-ui.mjs +101 -0
- package/dist/extensions/mcp-ui.mjs.map +1 -0
- package/dist/extensions/mcp.cjs +171 -0
- package/dist/extensions/mcp.cjs.map +1 -0
- package/dist/extensions/mcp.d.mts +5 -0
- package/dist/extensions/mcp.d.mts.map +1 -0
- package/dist/extensions/mcp.mjs +166 -0
- package/dist/extensions/mcp.mjs.map +1 -0
- package/dist/extensions/server.cjs +504 -0
- package/dist/extensions/server.cjs.map +1 -0
- package/dist/extensions/server.d.mts +5 -0
- package/dist/extensions/server.d.mts.map +1 -0
- package/dist/extensions/server.mjs +499 -0
- package/dist/extensions/server.mjs.map +1 -0
- package/dist/harnessState-CCyBeutB.cjs +188 -0
- package/dist/harnessState-CCyBeutB.cjs.map +1 -0
- package/dist/harnessState-Dn_S7fB9.mjs +163 -0
- package/dist/harnessState-Dn_S7fB9.mjs.map +1 -0
- package/dist/harnessState.cjs +6 -0
- package/dist/harnessState.d.mts +2 -0
- package/dist/harnessState.mjs +2 -0
- package/dist/harnessStore-CJSxdSkV.cjs +343 -0
- package/dist/harnessStore-CJSxdSkV.cjs.map +1 -0
- package/dist/harnessStore-CltwLB7M.mjs +262 -0
- package/dist/harnessStore-CltwLB7M.mjs.map +1 -0
- package/dist/harnessStore.cjs +15 -0
- package/dist/harnessStore.d.mts +2 -0
- package/dist/harnessStore.mjs +2 -0
- package/dist/index-BAaTySaM.d.mts +35 -0
- package/dist/index-BAaTySaM.d.mts.map +1 -0
- package/dist/index-BT29GZx5.d.mts +142 -0
- package/dist/index-BT29GZx5.d.mts.map +1 -0
- package/dist/index-B_lp0W3U.d.mts +114 -0
- package/dist/index-B_lp0W3U.d.mts.map +1 -0
- package/dist/index-C6GaYjq-.d.mts +6 -0
- package/dist/index-C6GaYjq-.d.mts.map +1 -0
- package/dist/index-CIQrKS1A.d.mts +50 -0
- package/dist/index-CIQrKS1A.d.mts.map +1 -0
- package/dist/index-CRcoVYXz.d.mts +39 -0
- package/dist/index-CRcoVYXz.d.mts.map +1 -0
- package/dist/index-CVlciCJF.d.mts +40 -0
- package/dist/index-CVlciCJF.d.mts.map +1 -0
- package/dist/index-CeOk2kqs.d.mts +118 -0
- package/dist/index-CeOk2kqs.d.mts.map +1 -0
- package/dist/index-Ch7ptOkW.d.mts +54 -0
- package/dist/index-Ch7ptOkW.d.mts.map +1 -0
- package/dist/index-Cvdt-Y-i.d.mts +66 -0
- package/dist/index-Cvdt-Y-i.d.mts.map +1 -0
- package/dist/index-DJpG-I9K.d.mts +122 -0
- package/dist/index-DJpG-I9K.d.mts.map +1 -0
- package/dist/index-DNk4q0Qm.d.mts +81 -0
- package/dist/index-DNk4q0Qm.d.mts.map +1 -0
- package/dist/index.cjs +121 -0
- package/dist/index.d.mts +15 -0
- package/dist/index.mjs +15 -0
- package/dist/init-C_9nyp3-.cjs +448 -0
- package/dist/init-C_9nyp3-.cjs.map +1 -0
- package/dist/init-DJ6wm-dr.mjs +415 -0
- package/dist/init-DJ6wm-dr.mjs.map +1 -0
- package/dist/init.cjs +7 -0
- package/dist/init.d.mts +2 -0
- package/dist/init.mjs +2 -0
- package/dist/layeredConfig-B922ibgn.mjs +67 -0
- package/dist/layeredConfig-B922ibgn.mjs.map +1 -0
- package/dist/layeredConfig-DdI5ysUf.cjs +94 -0
- package/dist/layeredConfig-DdI5ysUf.cjs.map +1 -0
- package/dist/layeredConfig.cjs +6 -0
- package/dist/layeredConfig.d.mts +2 -0
- package/dist/layeredConfig.mjs +2 -0
- package/dist/majorModes-CmPLEpMT.mjs +333 -0
- package/dist/majorModes-CmPLEpMT.mjs.map +1 -0
- package/dist/majorModes-DPhVMuhT.cjs +383 -0
- package/dist/majorModes-DPhVMuhT.cjs.map +1 -0
- package/dist/majorModes.cjs +10 -0
- package/dist/majorModes.d.mts +2 -0
- package/dist/majorModes.mjs +2 -0
- package/dist/piConfig-Bx26HMb_.d.mts +33 -0
- package/dist/piConfig-Bx26HMb_.d.mts.map +1 -0
- package/dist/piConfig-CCBdZXQr.cjs +260 -0
- package/dist/piConfig-CCBdZXQr.cjs.map +1 -0
- package/dist/piConfig-qGyCbcVj.mjs +197 -0
- package/dist/piConfig-qGyCbcVj.mjs.map +1 -0
- package/dist/piConfig.cjs +12 -0
- package/dist/piConfig.d.mts +2 -0
- package/dist/piConfig.mjs +2 -0
- package/dist/piContext.cjs +18 -0
- package/dist/piContext.d.mts +3 -0
- package/dist/piContext.mjs +2 -0
- package/dist/profiles-CTrUCmIh.d.mts +27 -0
- package/dist/profiles-CTrUCmIh.d.mts.map +1 -0
- package/dist/profiles-DnF9DBpd.cjs +552 -0
- package/dist/profiles-DnF9DBpd.cjs.map +1 -0
- package/dist/profiles-fujQKrS0.mjs +483 -0
- package/dist/profiles-fujQKrS0.mjs.map +1 -0
- package/dist/profiles.cjs +13 -0
- package/dist/profiles.d.mts +25 -0
- package/dist/profiles.d.mts.map +1 -0
- package/dist/profiles.mjs +2 -0
- package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
- package/dist/selectionSwitch.cjs +70 -0
- package/dist/selectionSwitch.cjs.map +1 -0
- package/dist/selectionSwitch.d.mts +30 -0
- package/dist/selectionSwitch.d.mts.map +1 -0
- package/dist/selectionSwitch.mjs +64 -0
- package/dist/selectionSwitch.mjs.map +1 -0
- package/dist/sessionConfig-Boh4Fdje.cjs +342 -0
- package/dist/sessionConfig-Boh4Fdje.cjs.map +1 -0
- package/dist/sessionConfig-CtLoc-lO.mjs +240 -0
- package/dist/sessionConfig-CtLoc-lO.mjs.map +1 -0
- package/dist/types.cjs +9 -0
- package/dist/types.d.mts +2 -0
- package/dist/types.mjs +2 -0
- package/llms.txt +12 -0
- package/package.json +206 -0
- package/src/prompts/po-author-config/SKILL.md +26 -0
- package/src/prompts/po-author-config/agents/openai.yaml +4 -0
- package/src/prompts/po-author-config/references/config-contract.md +201 -0
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Po runtime configuration authoring contract
|
|
2
|
+
|
|
3
|
+
## Sources
|
|
4
|
+
|
|
5
|
+
Po loads runtime settings from two files:
|
|
6
|
+
|
|
7
|
+
1. `~/.po/config.yaml`
|
|
8
|
+
2. `<repoRoot>/.po/config.yaml`
|
|
9
|
+
|
|
10
|
+
An absent file parses as `projectTrust: ask`. Both files reject unknown keys and invalid value
|
|
11
|
+
types. Parsing and merge policy live in `@agimon-ai/po-config`; packages should not duplicate
|
|
12
|
+
that logic.
|
|
13
|
+
|
|
14
|
+
The runtime file is separate from the three selection-axis catalogs. `modes.yaml` defines major
|
|
15
|
+
modes and layers, `domains.yaml` defines content domains, and `profiles.yaml` defines personas.
|
|
16
|
+
Consult the Help skill owned by the corresponding package when editing those files.
|
|
17
|
+
|
|
18
|
+
## Runtime schema
|
|
19
|
+
|
|
20
|
+
The supported root keys are:
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
projectTrust: ask
|
|
24
|
+
|
|
25
|
+
modes:
|
|
26
|
+
planning:
|
|
27
|
+
main:
|
|
28
|
+
model: openai/gpt-5.4
|
|
29
|
+
thinking: high
|
|
30
|
+
subagents:
|
|
31
|
+
model: openai/gpt-5.4-mini
|
|
32
|
+
thinking: medium
|
|
33
|
+
plansDirectory: .po/plans
|
|
34
|
+
|
|
35
|
+
editor:
|
|
36
|
+
command: code
|
|
37
|
+
|
|
38
|
+
voice:
|
|
39
|
+
engine: auto
|
|
40
|
+
language: en
|
|
41
|
+
recorder:
|
|
42
|
+
binary: ffmpeg
|
|
43
|
+
device: none:default
|
|
44
|
+
adapters:
|
|
45
|
+
openai-whisper:
|
|
46
|
+
binary: whisper
|
|
47
|
+
model:
|
|
48
|
+
id: turbo
|
|
49
|
+
|
|
50
|
+
selection:
|
|
51
|
+
majorMode: copilot
|
|
52
|
+
domains: [default]
|
|
53
|
+
profile: reviewer
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### Project trust
|
|
57
|
+
|
|
58
|
+
`projectTrust` accepts `ask`, `always`, or `never`. It is repository policy. The repository value
|
|
59
|
+
is authoritative, and an absent repository value defaults to `ask` rather than inheriting a
|
|
60
|
+
personal value.
|
|
61
|
+
|
|
62
|
+
### Planning
|
|
63
|
+
|
|
64
|
+
`modes` may contain only `planning`. `planning.main` and `planning.subagents` accept an optional
|
|
65
|
+
non-empty `model` and a `thinking` value from `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, or
|
|
66
|
+
`max`.
|
|
67
|
+
|
|
68
|
+
`plansDirectory` accepts an absolute path, `~`, `~/...`, or a path relative to the active repository
|
|
69
|
+
root. If omitted, it resolves to `~/.po/plans`. Other home aliases such as `~other/...` are rejected.
|
|
70
|
+
|
|
71
|
+
This `modes.planning` namespace configures the planning runtime. It does not define major modes from
|
|
72
|
+
`modes.yaml`.
|
|
73
|
+
|
|
74
|
+
### Editor
|
|
75
|
+
|
|
76
|
+
`editor` may contain only a non-empty `command`. Editor choice is personal, so the effective value
|
|
77
|
+
comes from the personal config.
|
|
78
|
+
|
|
79
|
+
### Voice
|
|
80
|
+
|
|
81
|
+
`voice.engine` accepts `auto`, `whisper-cpp`, `openai-whisper`, or `mlx-whisper`. `language`, recorder
|
|
82
|
+
binary, and recorder device are optional non-empty strings.
|
|
83
|
+
|
|
84
|
+
Adapters may be declared only for those three concrete engines. An adapter may set a binary and must
|
|
85
|
+
set a model containing exactly one of `path` or `id`. `whisper-cpp` accepts only a path. The OpenAI
|
|
86
|
+
and MLX adapters accept either form.
|
|
87
|
+
|
|
88
|
+
Autonomous capture is personal-only and belongs in `~/.po/config.yaml`:
|
|
89
|
+
|
|
90
|
+
```yaml
|
|
91
|
+
voice:
|
|
92
|
+
autoCapture:
|
|
93
|
+
model: openai/gpt-4.1-mini
|
|
94
|
+
startPhrases: [hey doom]
|
|
95
|
+
stopPhrases: [stop speaking]
|
|
96
|
+
utteranceIdleMs: 3000
|
|
97
|
+
transcriptionTimeoutMs: 120000
|
|
98
|
+
tts:
|
|
99
|
+
engine: macos-say
|
|
100
|
+
voice: Samantha
|
|
101
|
+
rate: 190
|
|
102
|
+
```
|
|
103
|
+
|
|
104
|
+
The model must use `provider/model-id` form. Control phrases must be non-empty, bounded strings and
|
|
105
|
+
must remain unique after normalization. Idle time accepts 1500 through 10000 milliseconds. The
|
|
106
|
+
transcription timeout accepts 1000 through 120000 milliseconds and defaults to 120000 milliseconds
|
|
107
|
+
so cold local ASR model startup is covered. TTS currently accepts only `macos-say`, with an optional
|
|
108
|
+
rate from 80 through 500. Repository `voice.autoCapture` is rejected.
|
|
109
|
+
|
|
110
|
+
### Default selection
|
|
111
|
+
|
|
112
|
+
`selection` may contain a non-empty `majorMode`, an array of string `domains`, and a non-empty
|
|
113
|
+
`profile`. An empty domains array intentionally selects no content domains.
|
|
114
|
+
|
|
115
|
+
These values choose defaults only. They do not define any mode, domain, or profile.
|
|
116
|
+
|
|
117
|
+
When a repository declares `selection`, repeat every personal axis that should remain selected.
|
|
118
|
+
Parsed omitted keys become unset, so the effective file-loaded selection contains the repository's
|
|
119
|
+
declared values rather than inheriting omitted personal axes.
|
|
120
|
+
|
|
121
|
+
## Source merge rules
|
|
122
|
+
|
|
123
|
+
Merge behavior is field-specific:
|
|
124
|
+
|
|
125
|
+
- `projectTrust` comes from the repository parse result. Missing repository configuration produces
|
|
126
|
+
the `ask` default.
|
|
127
|
+
- `editor` comes from personal configuration. A repository editor value is not selected.
|
|
128
|
+
- `modes.planning.main` and `modes.planning.subagents` merge their fields, with repository fields
|
|
129
|
+
replacing personal fields. Repository `plansDirectory` replaces the personal value when present.
|
|
130
|
+
- `voice` merges with repository fields replacing personal fields. Recorder fields merge. Adapter
|
|
131
|
+
binary fields merge, while a repository adapter model replaces the personal model as one value.
|
|
132
|
+
- `voice.autoCapture` remains the personal value. Declaring it in repository configuration is an
|
|
133
|
+
error.
|
|
134
|
+
- If neither file declares `selection`, it remains absent. When only one file declares it, that
|
|
135
|
+
mapping supplies the defaults. When the repository declares `selection`, its parsed mapping
|
|
136
|
+
replaces personal values for omitted axes as well as axes it sets.
|
|
137
|
+
|
|
138
|
+
Do not assume one generic deep-merge rule or copy this policy into consumers. Call `loadDoomConfig`
|
|
139
|
+
or use the live service snapshot.
|
|
140
|
+
|
|
141
|
+
## Immutable Cordis context
|
|
142
|
+
|
|
143
|
+
`@agimon-ai/po-config/extensions/pi` provides `DOOM_CONFIG_SERVICE` on the runner's shared Cordis
|
|
144
|
+
session branch. Consume it inside an owning injection:
|
|
145
|
+
|
|
146
|
+
```ts
|
|
147
|
+
cordis.inject([DOOM_CONFIG_SERVICE], (configContext) => {
|
|
148
|
+
const snapshot = requireDoomConfigContext(configContext);
|
|
149
|
+
const settings = snapshot.settings;
|
|
150
|
+
const active = snapshot.harness;
|
|
151
|
+
const pending = snapshot.pendingSelection;
|
|
152
|
+
const requiresRelaunch = snapshot.requiresRelaunch;
|
|
153
|
+
|
|
154
|
+
return () => disposeConsumer();
|
|
155
|
+
});
|
|
156
|
+
```
|
|
157
|
+
|
|
158
|
+
The full snapshot is deeply frozen:
|
|
159
|
+
|
|
160
|
+
- `settings` is the merged `config.yaml` result.
|
|
161
|
+
- `harness` is the active launcher and synchronized composition state.
|
|
162
|
+
- `pendingSelection` is the latest unacknowledged transition target, when one exists.
|
|
163
|
+
- `requiresRelaunch` reports whether active state still differs from pending intent.
|
|
164
|
+
|
|
165
|
+
The provider publishes a new snapshot for a replacement session. Never mutate a snapshot, keep it
|
|
166
|
+
at module scope, or retain it after the injection is disposed. Consumers that register Pi callbacks
|
|
167
|
+
may close over an active Cordis context only when their injection cleanup clears that binding.
|
|
168
|
+
|
|
169
|
+
## Cross-axis transition state
|
|
170
|
+
|
|
171
|
+
Major-mode, domain, and profile packages own resolution and user interaction for their respective
|
|
172
|
+
axes. The transition coordinator serializes their requests against the current session,
|
|
173
|
+
configuration generation, and synchronized artifacts.
|
|
174
|
+
|
|
175
|
+
Config supplies two append-only Pi custom entry types:
|
|
176
|
+
|
|
177
|
+
- `po:config:v1` records a complete selected major mode, domains list, optional profile, and
|
|
178
|
+
optional composition fingerprint.
|
|
179
|
+
- `po:transition:v1` records an operation ID, active selection, target selection, strategy, and
|
|
180
|
+
`pending`, `applied`, `aborted`, or `superseded` phase.
|
|
181
|
+
|
|
182
|
+
Active selection and pending intent are different state. A reload-capable transition stages the
|
|
183
|
+
target harness and appends journal entries before calling Pi reload. A launcher-owned composition
|
|
184
|
+
change keeps pending intent for process relaunch. A fresh session acknowledges a pending record only
|
|
185
|
+
when both the exact target selection and composition fingerprint are active.
|
|
186
|
+
|
|
187
|
+
Pre-application failure must not claim the target as active. Do not bypass the coordinator, mutate
|
|
188
|
+
`snapshot.harness`, or treat environment transport as the durable journal.
|
|
189
|
+
|
|
190
|
+
## Verification
|
|
191
|
+
|
|
192
|
+
```sh
|
|
193
|
+
pnpm nx test @agimon-ai/po-config
|
|
194
|
+
pnpm nx typecheck @agimon-ai/po-config
|
|
195
|
+
pnpm nx build @agimon-ai/po-config
|
|
196
|
+
pnpm nx test @agimon-ai/po
|
|
197
|
+
pnpm --filter @agimon-ai/po exec po --explain
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
Run a parent-session smoke test when changing Cordis publication, provider replacement, reload, or
|
|
201
|
+
process-relaunch behavior.
|