@agimon-ai/po-config 0.0.0-alpha.2 → 0.0.0-alpha.200
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 +1 -1
- package/README.md +34 -132
- package/dist/agentPluginMcp.cjs +380 -134
- package/dist/agentPluginMcp.cjs.map +1 -1
- package/dist/agentPluginMcp.d.mts +25 -4
- package/dist/agentPluginMcp.d.mts.map +1 -1
- package/dist/agentPluginMcp.mjs +378 -134
- package/dist/agentPluginMcp.mjs.map +1 -1
- package/dist/apiContracts.cjs +13 -12
- package/dist/apiContracts.cjs.map +1 -1
- package/dist/apiContracts.d.mts +2 -2
- package/dist/apiContracts.d.mts.map +1 -1
- package/dist/apiContracts.mjs +13 -12
- package/dist/apiContracts.mjs.map +1 -1
- package/dist/atomicJson-D3MHqnLW.cjs +59 -0
- package/dist/atomicJson-D3MHqnLW.cjs.map +1 -0
- package/dist/atomicJson-Dj3rlZbD.mjs +40 -0
- package/dist/atomicJson-Dj3rlZbD.mjs.map +1 -0
- package/dist/atomicJson.cjs +4 -2
- package/dist/atomicJson.d.mts +2 -2
- package/dist/atomicJson.mjs +3 -2
- package/dist/completion-BeLpnmA4.d.mts +102 -0
- package/dist/completion-BeLpnmA4.d.mts.map +1 -0
- package/dist/config-BBvn_ZLP.mjs +1 -0
- package/dist/config-BeErFE6a.mjs +230 -0
- package/dist/config-BeErFE6a.mjs.map +1 -0
- package/dist/config-DB7YUo6N.cjs +292 -0
- package/dist/config-DB7YUo6N.cjs.map +1 -0
- package/dist/{config-D2HbBLzo.d.mts → config-tk56d8mk.d.mts} +173 -52
- package/dist/config-tk56d8mk.d.mts.map +1 -0
- package/dist/config.cjs +38 -17
- package/dist/config.d.mts +5 -3
- package/dist/config.mjs +4 -3
- package/dist/{configPolicy-DCQgF5-f.mjs → configPolicy-BFBzdISO.mjs} +432 -97
- package/dist/configPolicy-BFBzdISO.mjs.map +1 -0
- package/dist/{configPolicy-Ce1QKDxa.cjs → configPolicy-BL4UUBLR.cjs} +459 -112
- package/dist/configPolicy-BL4UUBLR.cjs.map +1 -0
- package/dist/configSchema.d.mts +2 -2
- package/dist/configWriter-BzTOeJCT.cjs +218 -0
- package/dist/configWriter-BzTOeJCT.cjs.map +1 -0
- package/dist/configWriter-DwaYuqi8.mjs +180 -0
- package/dist/configWriter-DwaYuqi8.mjs.map +1 -0
- package/dist/configWriter.cjs +7 -4
- package/dist/configWriter.d.mts +2 -2
- package/dist/configWriter.mjs +1 -2
- package/dist/core-B8x1gjyx.cjs +369 -0
- package/dist/core-B8x1gjyx.cjs.map +1 -0
- package/dist/core-BjM59sEK.mjs +230 -0
- package/dist/core-BjM59sEK.mjs.map +1 -0
- package/dist/core-DMD33YiW.d.mts +27 -0
- package/dist/core-DMD33YiW.d.mts.map +1 -0
- package/dist/domains-B2jnohjL.mjs +1096 -0
- package/dist/domains-B2jnohjL.mjs.map +1 -0
- package/dist/domains-DBNTBmuc.d.mts +111 -0
- package/dist/domains-DBNTBmuc.d.mts.map +1 -0
- package/dist/domains-dSPktRdk.cjs +1267 -0
- package/dist/domains-dSPktRdk.cjs.map +1 -0
- package/dist/domains.cjs +19 -4
- package/dist/domains.d.mts +5 -3
- package/dist/domains.mjs +4 -3
- package/dist/extensions/mcp-ui.mjs +24 -21
- package/dist/extensions/mcp-ui.mjs.map +1 -1
- package/dist/extensions/mcp.cjs +13 -13
- package/dist/extensions/mcp.cjs.map +1 -1
- package/dist/extensions/mcp.d.mts +1 -1
- package/dist/extensions/mcp.mjs +13 -13
- package/dist/extensions/mcp.mjs.map +1 -1
- package/dist/extensions/server.cjs +38 -380
- package/dist/extensions/server.cjs.map +1 -1
- package/dist/extensions/server.d.mts +2 -2
- package/dist/extensions/server.d.mts.map +1 -1
- package/dist/extensions/server.mjs +40 -382
- package/dist/extensions/server.mjs.map +1 -1
- package/dist/{harnessState-CCyBeutB.cjs → harnessState-BpJcKc7A.cjs} +12 -34
- package/dist/harnessState-BpJcKc7A.cjs.map +1 -0
- package/dist/{harnessState-Dn_S7fB9.mjs → harnessState-XYW0Kxrp.mjs} +12 -34
- package/dist/harnessState-XYW0Kxrp.mjs.map +1 -0
- package/dist/harnessState.cjs +1 -1
- package/dist/harnessState.d.mts +1 -1
- package/dist/harnessState.mjs +1 -2
- package/dist/{harnessStore-CltwLB7M.mjs → harnessStore-C3slJmA6.mjs} +160 -82
- package/dist/harnessStore-C3slJmA6.mjs.map +1 -0
- package/dist/{harnessStore-CJSxdSkV.cjs → harnessStore-CEGS2XsW.cjs} +189 -81
- package/dist/harnessStore-CEGS2XsW.cjs.map +1 -0
- package/dist/harnessStore.cjs +6 -3
- package/dist/harnessStore.d.mts +2 -2
- package/dist/harnessStore.mjs +1 -2
- package/dist/index-7RuIAWX1.d.mts +63 -0
- package/dist/index-7RuIAWX1.d.mts.map +1 -0
- package/dist/index-B2r4kUcO.d.mts +62 -0
- package/dist/index-B2r4kUcO.d.mts.map +1 -0
- package/dist/{index-Dy_-m7gx.d.mts → index-BSqfRiCE.d.mts} +8 -11
- package/dist/index-BSqfRiCE.d.mts.map +1 -0
- package/dist/index-BXUn46YE.d.mts +71 -0
- package/dist/index-BXUn46YE.d.mts.map +1 -0
- package/dist/index-CJ9sIwip.d.mts +40 -0
- package/dist/index-CJ9sIwip.d.mts.map +1 -0
- package/dist/index-Cehagk1u.d.mts +155 -0
- package/dist/index-Cehagk1u.d.mts.map +1 -0
- package/dist/{index-CEUc7m16.d.mts → index-ClDBEynT.d.mts} +82 -32
- package/dist/index-ClDBEynT.d.mts.map +1 -0
- package/dist/index-N_GmmWJz.d.mts +83 -0
- package/dist/index-N_GmmWJz.d.mts.map +1 -0
- package/dist/index-OSfUuVIi.d.mts +94 -0
- package/dist/index-OSfUuVIi.d.mts.map +1 -0
- package/dist/index-_ANcZzRj.d.mts +69 -0
- package/dist/index-_ANcZzRj.d.mts.map +1 -0
- package/dist/index-fTuf8tVH.d.mts +34 -0
- package/dist/index-fTuf8tVH.d.mts.map +1 -0
- package/dist/index-wyQiF3PI.d.mts +226 -0
- package/dist/index-wyQiF3PI.d.mts.map +1 -0
- package/dist/index.cjs +99 -68
- package/dist/index.d.mts +29 -15
- package/dist/index.d.mts.map +1 -0
- package/dist/index.mjs +18 -15
- package/dist/init-DvEao9kS.cjs +654 -0
- package/dist/init-DvEao9kS.cjs.map +1 -0
- package/dist/init-sDZ0vh78.mjs +610 -0
- package/dist/init-sDZ0vh78.mjs.map +1 -0
- package/dist/init.cjs +8 -6
- package/dist/init.d.mts +2 -2
- package/dist/init.mjs +1 -2
- package/dist/layeredConfig-5gINd_qJ.cjs +267 -0
- package/dist/layeredConfig-5gINd_qJ.cjs.map +1 -0
- package/dist/layeredConfig-DpLY-Azh.mjs +205 -0
- package/dist/layeredConfig-DpLY-Azh.mjs.map +1 -0
- package/dist/layeredConfig.cjs +5 -4
- package/dist/layeredConfig.d.mts +2 -2
- package/dist/layeredConfig.mjs +1 -2
- package/dist/{piConfig-qGyCbcVj.mjs → piConfig-Bq36PQFF.mjs} +104 -69
- package/dist/piConfig-Bq36PQFF.mjs.map +1 -0
- package/dist/{piConfig-Bx26HMb_.d.mts → piConfig-C9rGUqPe.d.mts} +3 -3
- package/dist/{piConfig-Bx26HMb_.d.mts.map → piConfig-C9rGUqPe.d.mts.map} +1 -1
- package/dist/{piConfig-CCBdZXQr.cjs → piConfig-cluCie5i.cjs} +122 -70
- package/dist/piConfig-cluCie5i.cjs.map +1 -0
- package/dist/piConfig.cjs +4 -1
- package/dist/piConfig.d.mts +2 -2
- package/dist/piConfig.mjs +1 -2
- package/dist/piContext.cjs +27 -16
- package/dist/piContext.d.mts +3 -3
- package/dist/piContext.mjs +1 -2
- package/dist/po-runtime-identity.json +1 -0
- package/dist/presetConfig-BcmdY04H.cjs +531 -0
- package/dist/presetConfig-BcmdY04H.cjs.map +1 -0
- package/dist/presetConfig-BmoZvYW-.mjs +457 -0
- package/dist/presetConfig-BmoZvYW-.mjs.map +1 -0
- package/dist/presets-6swHXI2u.cjs +230 -0
- package/dist/presets-6swHXI2u.cjs.map +1 -0
- package/dist/presets-lP01-CKK.mjs +211 -0
- package/dist/presets-lP01-CKK.mjs.map +1 -0
- package/dist/presets.cjs +17 -0
- package/dist/presets.d.mts +113 -0
- package/dist/presets.d.mts.map +1 -0
- package/dist/presets.mjs +4 -0
- package/dist/profiles-CUHo67zR.cjs +1513 -0
- package/dist/profiles-CUHo67zR.cjs.map +1 -0
- package/dist/profiles-CY2ga4PH.mjs +1324 -0
- package/dist/profiles-CY2ga4PH.mjs.map +1 -0
- package/dist/profiles.cjs +266 -1
- package/dist/profiles.cjs.map +1 -0
- package/dist/profiles.d.mts +119 -4
- package/dist/profiles.d.mts.map +1 -1
- package/dist/profiles.mjs +248 -2
- package/dist/profiles.mjs.map +1 -0
- package/dist/selectionSwitch.cjs +97 -32
- package/dist/selectionSwitch.cjs.map +1 -1
- package/dist/selectionSwitch.d.mts +41 -18
- package/dist/selectionSwitch.d.mts.map +1 -1
- package/dist/selectionSwitch.mjs +93 -31
- package/dist/selectionSwitch.mjs.map +1 -1
- package/dist/{sessionConfig-DV5xTRRw.mjs → sessionConfig-BESVV7Qg.mjs} +66 -57
- package/dist/sessionConfig-BESVV7Qg.mjs.map +1 -0
- package/dist/{sessionConfig-Bf6xHWLd.cjs → sessionConfig-CLuSKK3A.cjs} +92 -95
- package/dist/sessionConfig-CLuSKK3A.cjs.map +1 -0
- package/dist/settingsApi-BE3Jj3W9.mjs +479 -0
- package/dist/settingsApi-BE3Jj3W9.mjs.map +1 -0
- package/dist/settingsApi-bS3MV2dz.cjs +484 -0
- package/dist/settingsApi-bS3MV2dz.cjs.map +1 -0
- package/dist/sync-BJ8gCP9s.mjs +29 -0
- package/dist/sync-BJ8gCP9s.mjs.map +1 -0
- package/dist/sync-DW2exveL.d.mts +47 -0
- package/dist/sync-DW2exveL.d.mts.map +1 -0
- package/dist/sync-Dlxz2msM.cjs +37 -0
- package/dist/sync-Dlxz2msM.cjs.map +1 -0
- package/dist/sync.cjs +18 -0
- package/dist/sync.d.mts +4 -0
- package/dist/sync.mjs +4 -0
- package/dist/types.cjs +2 -2
- package/dist/types.d.mts +2 -2
- package/dist/types.mjs +1 -2
- package/llms.txt +3 -3
- package/package.json +31 -23
- package/src/prompts/help-how-to-config/SKILL.md +47 -0
- package/src/prompts/help-how-to-config/agents/openai.yaml +4 -0
- package/src/prompts/help-how-to-config/references/config-contract.md +299 -0
- package/dist/atomicJson-1W0WhuFF.mjs +0 -44
- package/dist/atomicJson-1W0WhuFF.mjs.map +0 -1
- package/dist/atomicJson-Dt2z_DXl.cjs +0 -52
- package/dist/atomicJson-Dt2z_DXl.cjs.map +0 -1
- package/dist/config-CfTb0_9G.cjs +0 -219
- package/dist/config-CfTb0_9G.cjs.map +0 -1
- package/dist/config-D2HbBLzo.d.mts.map +0 -1
- package/dist/config-DoQWSt1V.mjs +0 -162
- package/dist/config-DoQWSt1V.mjs.map +0 -1
- package/dist/config-NSHRd6na.mjs +0 -2
- package/dist/configPolicy-Ce1QKDxa.cjs.map +0 -1
- package/dist/configPolicy-DCQgF5-f.mjs.map +0 -1
- package/dist/configWriter-B7uO8MuN.cjs +0 -150
- package/dist/configWriter-B7uO8MuN.cjs.map +0 -1
- package/dist/configWriter-DUtLgOlD.mjs +0 -130
- package/dist/configWriter-DUtLgOlD.mjs.map +0 -1
- package/dist/domains-BroCVHrS.mjs +0 -633
- package/dist/domains-BroCVHrS.mjs.map +0 -1
- package/dist/domains-DGCb7uMC.cjs +0 -727
- package/dist/domains-DGCb7uMC.cjs.map +0 -1
- package/dist/harnessState-CCyBeutB.cjs.map +0 -1
- package/dist/harnessState-Dn_S7fB9.mjs.map +0 -1
- package/dist/harnessStore-CJSxdSkV.cjs.map +0 -1
- package/dist/harnessStore-CltwLB7M.mjs.map +0 -1
- package/dist/index-78zvoS9s.d.mts +0 -35
- package/dist/index-78zvoS9s.d.mts.map +0 -1
- package/dist/index-BT29GZx5.d.mts +0 -142
- package/dist/index-BT29GZx5.d.mts.map +0 -1
- package/dist/index-C6GaYjq-.d.mts +0 -6
- package/dist/index-C6GaYjq-.d.mts.map +0 -1
- package/dist/index-CEUc7m16.d.mts.map +0 -1
- package/dist/index-CRcoVYXz.d.mts +0 -39
- package/dist/index-CRcoVYXz.d.mts.map +0 -1
- package/dist/index-CVlciCJF.d.mts +0 -40
- package/dist/index-CVlciCJF.d.mts.map +0 -1
- package/dist/index-Ch7ptOkW.d.mts +0 -54
- package/dist/index-Ch7ptOkW.d.mts.map +0 -1
- package/dist/index-CkDDvVQt.d.mts +0 -118
- package/dist/index-CkDDvVQt.d.mts.map +0 -1
- package/dist/index-Cvdt-Y-i.d.mts +0 -66
- package/dist/index-Cvdt-Y-i.d.mts.map +0 -1
- package/dist/index-DNk4q0Qm.d.mts +0 -81
- package/dist/index-DNk4q0Qm.d.mts.map +0 -1
- package/dist/index-DdH0w56b.d.mts +0 -116
- package/dist/index-DdH0w56b.d.mts.map +0 -1
- package/dist/index-Dy_-m7gx.d.mts.map +0 -1
- package/dist/init-Cd3Ki6Ub.cjs +0 -448
- package/dist/init-Cd3Ki6Ub.cjs.map +0 -1
- package/dist/init-DVzhiCUE.mjs +0 -415
- package/dist/init-DVzhiCUE.mjs.map +0 -1
- package/dist/layeredConfig-fukqN2EA.mjs +0 -67
- package/dist/layeredConfig-fukqN2EA.mjs.map +0 -1
- package/dist/layeredConfig-ol0274TN.cjs +0 -94
- package/dist/layeredConfig-ol0274TN.cjs.map +0 -1
- package/dist/majorModes-D1Itd8SN.mjs +0 -337
- package/dist/majorModes-D1Itd8SN.mjs.map +0 -1
- package/dist/majorModes-DnNSH9ZK.cjs +0 -387
- package/dist/majorModes-DnNSH9ZK.cjs.map +0 -1
- package/dist/majorModes.cjs +0 -10
- package/dist/majorModes.d.mts +0 -2
- package/dist/majorModes.mjs +0 -2
- package/dist/piConfig-CCBdZXQr.cjs.map +0 -1
- package/dist/piConfig-qGyCbcVj.mjs.map +0 -1
- package/dist/profiles-CTrUCmIh.d.mts +0 -27
- package/dist/profiles-CTrUCmIh.d.mts.map +0 -1
- package/dist/profiles-DBcYg5nA.mjs +0 -483
- package/dist/profiles-DBcYg5nA.mjs.map +0 -1
- package/dist/profiles-tpplXY4r.cjs +0 -552
- package/dist/profiles-tpplXY4r.cjs.map +0 -1
- package/dist/sessionConfig-Bf6xHWLd.cjs.map +0 -1
- package/dist/sessionConfig-DV5xTRRw.mjs.map +0 -1
- package/src/prompts/po-author-config/SKILL.md +0 -26
- package/src/prompts/po-author-config/agents/openai.yaml +0 -4
- package/src/prompts/po-author-config/references/config-contract.md +0 -201
package/LICENSE
CHANGED
package/README.md
CHANGED
|
@@ -1,170 +1,72 @@
|
|
|
1
1
|
# @agimon-ai/po-config
|
|
2
2
|
|
|
3
|
-
Typed
|
|
4
|
-
[Po](https://www.npmjs.com/package/@agimon-ai/po).
|
|
3
|
+
Typed configuration loading, validation, and session selection state for Po. The distribution loads Config before selectable packages; do not add it to a layer.
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
runtime settings, publishes the `doom/config` Cordis service, and maintains selection state shared
|
|
8
|
-
by the major-mode, domain, and profile transition flows.
|
|
5
|
+
Requires Node.js 24 or newer. Pi consumers use the peer version declared in `package.json`.
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
## Runtime settings
|
|
11
8
|
|
|
12
|
-
|
|
9
|
+
Po reads host settings from `~/.po/config.yaml` and repository settings from `<repoRoot>/.po/config.yaml`. The strict runtime reader also applies the selected person's cached issuer-global settings beneath the host file, for portable keys only. It uses the session starter's identity when supplied, otherwise the host owner's. A missing cache contributes nothing. See [Hierarchy](../../../docs/architecture.md#hierarchy).
|
|
13
10
|
|
|
14
|
-
-
|
|
15
|
-
- Pi 1.0.0 as a peer dependency
|
|
16
|
-
|
|
17
|
-
## Install
|
|
18
|
-
|
|
19
|
-
```bash
|
|
20
|
-
npm install @agimon-ai/po-config
|
|
21
|
-
```
|
|
22
|
-
|
|
23
|
-
Do not add this package to a Po layer. The distribution activates it before selectable packages
|
|
24
|
-
so the rest of the parent session can consume one resolved configuration snapshot.
|
|
25
|
-
|
|
26
|
-
## Runtime configuration
|
|
27
|
-
|
|
28
|
-
Po reads `~/.po/config.yaml` first and `<repoRoot>/.po/config.yaml` second. Merge policy
|
|
29
|
-
is field-specific because some settings are personal and others are repository policy:
|
|
30
|
-
|
|
31
|
-
| Setting | Effective source policy |
|
|
32
|
-
| ------------------- | -------------------------------------------------------------------- |
|
|
33
|
-
| `projectTrust` | Repository value, defaulting to `ask` |
|
|
34
|
-
| `editor` | Personal config only |
|
|
35
|
-
| `modes.planning` | Personal and repository fields merge, with repository values winning |
|
|
36
|
-
| `voice` | Personal and repository fields merge, with repository values winning |
|
|
37
|
-
| `voice.autoCapture` | Personal config only |
|
|
38
|
-
| `selection` | Per-axis merge, with repository values winning |
|
|
39
|
-
|
|
40
|
-
Supported root keys are `modes`, `projectTrust`, `editor`, `voice`, and `selection`. Unknown keys and
|
|
41
|
-
invalid values fail during loading.
|
|
11
|
+
Merge rules depend on the field: repository trust policy defaults to `ask`; editor choice and autonomous voice capture are host-only; planning, voice, and default selection merge where supported. Unknown keys and invalid values fail loading. The settings inspection reader `readPoConfigLayers` currently reports host and repository layers, not the cached global layer.
|
|
42
12
|
|
|
43
13
|
```yaml
|
|
44
14
|
projectTrust: ask
|
|
45
|
-
modes:
|
|
46
|
-
planning:
|
|
47
|
-
main:
|
|
48
|
-
model: openai/gpt-5.4
|
|
49
|
-
thinking: high
|
|
50
|
-
plansDirectory: .po/plans
|
|
51
|
-
voice:
|
|
52
|
-
engine: auto
|
|
53
|
-
language: en
|
|
54
15
|
selection:
|
|
55
|
-
|
|
16
|
+
preset: copilot
|
|
56
17
|
domains: [default]
|
|
57
18
|
profile: reviewer
|
|
58
19
|
```
|
|
59
20
|
|
|
60
|
-
|
|
61
|
-
`domains.yaml`, and `profiles.yaml` and are documented by their owning package Help skills.
|
|
62
|
-
|
|
63
|
-
See the shipped [configuration contract](./src/prompts/po-author-config/references/config-contract.md) for
|
|
64
|
-
the complete runtime schema and additional configuration details.
|
|
21
|
+
Selection names defaults. Definitions belong in `presets.yaml`, `domains.yaml`, and `profiles.yaml`, whose owning packages provide Help guidance. The [configuration contract](./src/prompts/help-how-to-config/references/config-contract.md) gives authoring examples; the parser in `src/services/configPolicy` owns accepted fields and merge behavior.
|
|
65
22
|
|
|
66
|
-
##
|
|
23
|
+
## Workspace declarations
|
|
67
24
|
|
|
68
|
-
|
|
69
|
-
`DOOM_CONFIG_SERVICE`. Consumers must access it under an owning service injection:
|
|
25
|
+
Declare workspaces in repository `.po/workspaces.yaml`:
|
|
70
26
|
|
|
71
|
-
```
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}
|
|
27
|
+
```yaml
|
|
28
|
+
workspaces:
|
|
29
|
+
- name: Product
|
|
30
|
+
path: .
|
|
31
|
+
alias: product
|
|
32
|
+
instructions: Focus on this product.
|
|
33
|
+
metadata:
|
|
34
|
+
'@example/plugin': { projectId: product }
|
|
80
35
|
```
|
|
81
36
|
|
|
82
|
-
|
|
83
|
-
`pendingSelection`, and `requiresRelaunch`. Do not mutate it or retain it across provider or session
|
|
84
|
-
replacement. The next session publishes a new snapshot.
|
|
85
|
-
|
|
86
|
-
## Plugin structure and lifecycle
|
|
37
|
+
Paths currently must resolve to the repository root, including equivalent symlinks. Declarations can share that root while receiving distinct workspace IDs. Names and aliases must be unique within the file. Metadata is JSON, not a credential store or an authorization boundary; each consuming plugin validates its own fields.
|
|
87
38
|
|
|
88
|
-
|
|
39
|
+
An existing declaration file is authoritative, including `workspaces: []`. Invalid or blank files fail rather than falling back. Only an absent file permits the deprecated repository `config.yaml` list. Personal declarations are ignored; Po does not migrate files automatically. Instructions are copied on initial admission, not overwritten later.
|
|
89
40
|
|
|
90
|
-
|
|
41
|
+
Hosts read declarations at composition boundaries with `readWorkspaceDeclarations`. Plugins inject `po/workspace-registry` instead of rereading YAML. Resolve the current workspace ID; path lookup can be ambiguous when declarations share a root.
|
|
91
42
|
|
|
92
|
-
|
|
43
|
+
## Consume the session snapshot
|
|
93
44
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
Major-mode, domain, and profile packages resolve their own requested changes, then use the shared
|
|
97
|
-
transition coordinator. Config owns the persisted selection and transition journal records used to
|
|
98
|
-
distinguish active state from pending intent.
|
|
99
|
-
|
|
100
|
-
Native session selection is serialized by the kernel and applied to retained facet candidates. Config owns persisted selection and pending transition records; Po factory reload and terminal relaunch are not native authoring mechanisms.
|
|
101
|
-
|
|
102
|
-
Consumers must not edit `snapshot.harness`, bypass the coordinator, or cache launcher environment
|
|
103
|
-
state at module scope.
|
|
104
|
-
|
|
105
|
-
## Public API
|
|
106
|
-
|
|
107
|
-
The root and focused `/config` and `/piContext` exports provide runtime parsing, merge policy, and
|
|
108
|
-
session integration:
|
|
45
|
+
Inject `PO_CONFIG_SERVICE` and call `requirePoConfigContext` inside the owning service fiber:
|
|
109
46
|
|
|
110
47
|
```ts
|
|
111
|
-
import {
|
|
48
|
+
import { PO_CONFIG_SERVICE, requirePoConfigContext } from '@agimon-ai/po-config';
|
|
112
49
|
|
|
113
|
-
|
|
50
|
+
context.inject([PO_CONFIG_SERVICE], (context) => {
|
|
51
|
+
const snapshot = requirePoConfigContext(context);
|
|
52
|
+
// Consume snapshot.settings without mutating it.
|
|
53
|
+
});
|
|
114
54
|
```
|
|
115
55
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
The package also exposes lower-level loaders used by the fixed axis packages. User-facing guidance
|
|
119
|
-
for defining modes, domains, and profiles is intentionally owned by those packages instead of this
|
|
120
|
-
runtime Config authoring skill.
|
|
56
|
+
Snapshots are deeply frozen. Do not retain one across provider or session replacement. Selection changes go through the shared coordinator, not direct edits to harness state. Runtime packages use injected configuration; host composition code can use the FileSystem-based `readPoConfig` with explicit environment and home directory. Node-only loaders are compatibility shims, not portable runtime APIs.
|
|
121
57
|
|
|
122
|
-
|
|
58
|
+
Focused exports include `/config`, `/piConfig`, `/configSchema`, and `/piContext`; inspect `package.json` for the current public surface.
|
|
123
59
|
|
|
124
|
-
|
|
125
|
-
`po-author-config` with the `doom/help` Cordis service. The guidance is visible to the AI only
|
|
126
|
-
while the parent Help minor mode is active.
|
|
60
|
+
## Remote session summary
|
|
127
61
|
|
|
128
|
-
|
|
62
|
+
The remote `show_session` tool returns a read-only summary and an MCP App for compatible hosts. It exposes session identity and selection, not credentials, instruction text, or absolute repository paths. Conversation-routed callers must preserve host-supplied conversation metadata on every call, including refresh. Otherwise use a dedicated-session connection; there is no shared-session fallback.
|
|
129
63
|
|
|
130
|
-
|
|
131
|
-
Compatible hosts render the repository name, session identity, revision, profile, domains, layers,
|
|
132
|
-
and modes. Text-only clients receive the same information as readable text. `load_context` remains
|
|
133
|
-
separate and does not open a widget.
|
|
134
|
-
|
|
135
|
-
The component refreshes through the host's `tools/call` bridge. It receives no access token, does
|
|
136
|
-
not contact localhost or an external asset server, and does not include instructions, persona text,
|
|
137
|
-
or absolute repository paths. Conversation-routed connections still require host-supplied
|
|
138
|
-
conversation metadata on every tool call, including refresh. A host that cannot preserve that
|
|
139
|
-
metadata must use a dedicated-session connection; there is no fallback to a shared session.
|
|
140
|
-
|
|
141
|
-
`build:mcp` first runs `build:app`. The browser SDK and HTML are bundled into
|
|
142
|
-
`generated/mcp-apps/session.ts`, then embedded in the published MCP facet. The `ui://` resource URI
|
|
143
|
-
contains a hash of the complete HTML. Do not edit generated assets or reuse an old URI for changed
|
|
144
|
-
content. Resource reads are authorized static prefetches and never create a child session.
|
|
145
|
-
|
|
146
|
-
Connect an MCP Apps host to the existing session MCP URL. After rebuilding and restarting the
|
|
147
|
-
server, refresh the host's tool catalog and invoke `show_session`. ChatGPT developer-mode
|
|
148
|
-
connections use the same endpoint. Public app submission, a stable production widget origin, and
|
|
149
|
-
upstream third-party widget forwarding are separate deployment work.
|
|
64
|
+
MCP UI assets are generated by the build. Do not edit them or reuse an old content-hashed resource URI. Source tests do not establish behavior inside a third-party MCP App host.
|
|
150
65
|
|
|
151
66
|
## Development
|
|
152
67
|
|
|
153
|
-
|
|
154
|
-
pnpm build
|
|
155
|
-
pnpm typecheck
|
|
156
|
-
pnpm test
|
|
157
|
-
pnpm lint
|
|
158
|
-
pnpm test:app
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
The browser tests require Playwright Chromium (`pnpm exec playwright install chromium`). They
|
|
162
|
-
exercise the packaged HTML in a sandboxed iframe using the standard SDK's `AppBridge`, including
|
|
163
|
-
refresh, theme changes, errors, text safety, and teardown. They do not substitute for testing the
|
|
164
|
-
connection inside ChatGPT itself.
|
|
165
|
-
|
|
166
|
-
Maintained by [Agimon](https://agimon.ai/about).
|
|
68
|
+
Run `pnpm build`, `pnpm typecheck`, `pnpm test`, and `pnpm lint` from this package. Help guidance is published through `llms.txt` and `src/prompts`.
|
|
167
69
|
|
|
168
70
|
## License
|
|
169
71
|
|
|
170
|
-
MIT
|
|
72
|
+
MIT. See [LICENSE](LICENSE).
|