@agimon-ai/doompi-config 0.0.1-alpha.21 → 0.0.1-alpha.23
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 +70 -112
- package/package.json +10 -8
package/README.md
CHANGED
|
@@ -1,19 +1,15 @@
|
|
|
1
1
|
# @agimon-ai/doompi-config
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Typed loading, validation, composition, and host adapters for DoomPi configuration.
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
`profiles.yaml`. The rest of Doompi should not grow a second opinion about them. This package
|
|
7
|
-
loads and validates `.doom/`, resolves the user and repository layers, and writes the harness
|
|
8
|
-
state every other package reads.
|
|
5
|
+
This package is the configuration foundation of the [DoomPi distribution](https://www.npmjs.com/package/@agimon-ai/doompi). DoomPi users receive it as core; extension authors and host integrations can install it as a library.
|
|
9
6
|
|
|
10
|
-
|
|
11
|
-
profiles, hook-group references inside modes, and the `doompi init` defaults. A bad declaration
|
|
12
|
-
fails here instead of becoming a stranger error halfway through startup.
|
|
7
|
+
> **Alpha:** configuration contracts may change between releases.
|
|
13
8
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
9
|
+
## Requirements
|
|
10
|
+
|
|
11
|
+
- Node.js 22.19.0 or newer
|
|
12
|
+
- Pi 0.84.2 when using a Pi adapter
|
|
17
13
|
|
|
18
14
|
## Install
|
|
19
15
|
|
|
@@ -21,112 +17,49 @@ contract.
|
|
|
21
17
|
npm install @agimon-ai/doompi-config
|
|
22
18
|
```
|
|
23
19
|
|
|
24
|
-
|
|
20
|
+
Do not add this package to a DoomPi layer. The distribution loads it before layers so the rest of the session can consume one resolved configuration.
|
|
21
|
+
|
|
22
|
+
## What it owns
|
|
25
23
|
|
|
26
|
-
|
|
27
|
-
`.doom/modes.yaml`; making the config reader optional would only create configs nobody can
|
|
28
|
-
read.
|
|
24
|
+
DoomPi reads four YAML files from `~/.pi/.doom/` and optional repository overrides from `.doom/`:
|
|
29
25
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
26
|
+
| File | Contract |
|
|
27
|
+
| --------------- | ---------------------------------------------------- |
|
|
28
|
+
| `config.yaml` | Runtime, trust, editor, planning, and Voice settings |
|
|
29
|
+
| `modes.yaml` | Ordered extension layers and major modes |
|
|
30
|
+
| `domains.yaml` | Plugin catalog, domains, aliases, and MCP boundaries |
|
|
31
|
+
| `profiles.yaml` | Persona roots, profiles, and environment defaults |
|
|
33
32
|
|
|
34
|
-
|
|
33
|
+
The package validates declarations, preserves the declaring root for relative paths, resolves personal/repository precedence, and writes harness state consumed by the runtime and child processes. Invalid explicit declarations fail early instead of surfacing as unrelated startup errors.
|
|
35
34
|
|
|
36
|
-
|
|
37
|
-
- Discovering Codex-compatible marketplaces, plugin roots, and profile roots.
|
|
38
|
-
- Validating `config.yaml`, modes, domains, profiles, and package-owned runtime settings.
|
|
39
|
-
- Resolving repository overrides without losing the declaration root for relative paths.
|
|
40
|
-
- Writing the resolved harness state used by child sessions and other extensions.
|
|
41
|
-
- Seeding a working config through `doompi init`.
|
|
35
|
+
## Layering rules
|
|
42
36
|
|
|
43
|
-
|
|
37
|
+
Personal files load first. Unique personal and repository entries remain available; a same-named repository entry replaces the personal entry. Plugin and profile roots accumulate and remain relative to the file that declared them.
|
|
44
38
|
|
|
45
|
-
|
|
46
|
-
Plugin roots from both files are retained and resolved relative to the file that declared them;
|
|
47
|
-
plugin entries, domains, and aliases merge by name, with the repository definition winning a
|
|
48
|
-
collision.
|
|
39
|
+
Discovery is intentionally nonrecursive. A plugin root can be a plugin or a directory whose direct children are plugins. A profile qualifies when its directory directly contains `profile.md`, `SOUL.md`, or `AGENTS.md`.
|
|
49
40
|
|
|
50
41
|
```yaml
|
|
51
42
|
plugins:
|
|
52
|
-
roots: [plugins
|
|
43
|
+
roots: [plugins]
|
|
53
44
|
entries:
|
|
54
|
-
|
|
55
|
-
source: url
|
|
56
|
-
url: https://github.com/acme/plugins.git
|
|
57
|
-
path: plugins/reviewer
|
|
58
|
-
ref: main
|
|
59
|
-
npm-plugin:
|
|
45
|
+
pinned-reviewer:
|
|
60
46
|
source: npm
|
|
61
|
-
package: '@
|
|
47
|
+
package: '@example/review-plugin'
|
|
62
48
|
version: 1.2.3
|
|
63
49
|
|
|
64
50
|
domains:
|
|
65
|
-
|
|
66
|
-
description:
|
|
67
|
-
plugins: [
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
Each root can be a marketplace, a single plugin, or a container whose direct-child folders
|
|
71
|
-
are plugins. Container discovery is intentionally nonrecursive. Plugins use the manifest
|
|
72
|
-
`name` when present and otherwise the directory name. DoomPi also inspects the standard
|
|
73
|
-
personal and repository Codex marketplace files, but never Codex's private cache. Marketplace
|
|
74
|
-
plugins are referenced as `plugin@marketplace`. Invalid auto-discoveries are diagnostics;
|
|
75
|
-
invalid explicit entries or unknown domain references fail configuration loading.
|
|
76
|
-
|
|
77
|
-
## Profile catalogs
|
|
78
|
-
|
|
79
|
-
`profiles.yaml` uses the same roots-and-entries pattern for personas. A root can be one
|
|
80
|
-
profile or a container whose direct-child directories are profiles. A directory qualifies
|
|
81
|
-
when it contains `profile.md`, `SOUL.md`, or `AGENTS.md`; the directory name becomes the
|
|
82
|
-
profile name, its environment defaults are empty, and discovery never recurses.
|
|
83
|
-
|
|
84
|
-
```yaml
|
|
85
|
-
profiles:
|
|
86
|
-
roots: [agents/acme, ../shared-personas]
|
|
87
|
-
entries:
|
|
88
|
-
writer:
|
|
89
|
-
persona: agents/special/writer
|
|
90
|
-
env:
|
|
91
|
-
TONE: concise
|
|
92
|
-
```
|
|
93
|
-
|
|
94
|
-
Home roots are inspected before repository roots, and every relative root stays relative to
|
|
95
|
-
the file that declared it. Later discovered names replace earlier ones. Explicit entries
|
|
96
|
-
override automatic discoveries, and a repository entry replaces a same-named home entry.
|
|
97
|
-
An explicit persona may live under `agents/` or under a root declared in the same file.
|
|
98
|
-
DoomPi concatenates `profile.md`, `SOUL.md`, and `AGENTS.md` in that order. Sync freshness
|
|
99
|
-
includes discovered names and persona file content. The legacy flat `profiles: {name: ...}`
|
|
100
|
-
mapping remains accepted for migration.
|
|
101
|
-
|
|
102
|
-
## Layer extensions and package-owned config
|
|
103
|
-
|
|
104
|
-
A layer can mix DoomPi built-ins, repository-local Pi extension scripts, and packages.
|
|
105
|
-
Bare values in `extensions` name DoomPi's own entries. Path-like values use Pi's local
|
|
106
|
-
extension behavior and resolve relative to the config that declares them:
|
|
107
|
-
|
|
108
|
-
```yaml
|
|
109
|
-
layers:
|
|
110
|
-
development:
|
|
111
|
-
extensions:
|
|
112
|
-
- repositoryHooks
|
|
113
|
-
- ./extensions/review.ts
|
|
114
|
-
- ./extensions/local-tools
|
|
115
|
-
packages:
|
|
116
|
-
- '@agimon-ai/vibe-lint'
|
|
51
|
+
review:
|
|
52
|
+
description: Focused review tools.
|
|
53
|
+
plugins: [pinned-reviewer]
|
|
117
54
|
```
|
|
118
55
|
|
|
119
|
-
|
|
120
|
-
supported script files and child `index` modules. Use `./` or `../` for a relative path so
|
|
121
|
-
it cannot be confused with a built-in name. Repository paths resolve from the repository
|
|
122
|
-
root. Paths in `~/.pi/.doom/modes.yaml` resolve from `~/.pi/.doom`.
|
|
56
|
+
Git and npm plugins are executable code, not passive configuration. Treat their sources as trusted dependencies and pin an exact version or Git SHA when reproducibility matters.
|
|
123
57
|
|
|
124
|
-
|
|
125
|
-
on the package entry that consumes it:
|
|
58
|
+
Package settings belong to the package entry that consumes them:
|
|
126
59
|
|
|
127
60
|
```yaml
|
|
128
61
|
layers:
|
|
129
|
-
|
|
62
|
+
coordination:
|
|
130
63
|
packages:
|
|
131
64
|
- name: '@agimon-ai/doompi-team'
|
|
132
65
|
config:
|
|
@@ -135,26 +68,51 @@ layers:
|
|
|
135
68
|
thinking: high
|
|
136
69
|
```
|
|
137
70
|
|
|
138
|
-
|
|
139
|
-
The selected package validates its own fields. Bare package strings, optional package
|
|
140
|
-
objects, and explicit adapter subpaths keep their existing resolution and ordering
|
|
141
|
-
behavior. Local paths under `packages` remain accepted for compatibility with unpublished
|
|
142
|
-
Pi packages. The removed sibling `layer.config` form is rejected rather than silently
|
|
143
|
-
assigned to whichever package happens to read it.
|
|
71
|
+
## Host adapters
|
|
144
72
|
|
|
145
|
-
|
|
73
|
+
| Entry | Purpose |
|
|
74
|
+
| ------------------------------------------------------------- | ------------------------------------------------------ |
|
|
75
|
+
| Package manifest / `@agimon-ai/doompi-config/extensions/doom` | DoomPi adapter used by the distribution |
|
|
76
|
+
| `@agimon-ai/doompi-config/pi` | Compatibility alias for the DoomPi adapter |
|
|
77
|
+
| `@agimon-ai/doompi-config/extensions/pi` | Plain Pi adapter for hosts that do not assemble DoomPi |
|
|
146
78
|
|
|
147
|
-
|
|
148
|
-
`doompi-config-help` skill while the parent-only Help mode is active. The index links to
|
|
149
|
-
this README and the bundled configuration contract instead of duplicating them.
|
|
79
|
+
Use an explicit adapter path when embedding the package so the host boundary is visible in configuration.
|
|
150
80
|
|
|
151
81
|
## Public API
|
|
152
82
|
|
|
153
|
-
The root export contains
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
83
|
+
The root export contains common loaders, resolvers, types, and container factories. Focused subpaths include `/config`, `/domains`, `/majorModes`, `/profiles`, `/harnessState`, and `/container`.
|
|
84
|
+
|
|
85
|
+
```ts
|
|
86
|
+
import {
|
|
87
|
+
loadDoomConfig,
|
|
88
|
+
loadDomains,
|
|
89
|
+
loadMajorModesConfig,
|
|
90
|
+
resolvePackageConfigurations,
|
|
91
|
+
} from '@agimon-ai/doompi-config';
|
|
92
|
+
|
|
93
|
+
const root = process.cwd();
|
|
94
|
+
const config = loadDoomConfig(root);
|
|
95
|
+
const domains = loadDomains(root);
|
|
96
|
+
const modes = loadMajorModesConfig(root);
|
|
97
|
+
const teamConfig = resolvePackageConfigurations(modes, ['@agimon-ai/doompi-team']);
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
See the shipped [configuration contract](./skills/doom-pi-config/references/config-contract.md) for the complete YAML model.
|
|
101
|
+
|
|
102
|
+
## Help
|
|
103
|
+
|
|
104
|
+
The package publishes `llms.txt` and a `doompi-config-help` descriptor. In the DoomPi distribution, that guidance is visible only while the parent Help mode is active.
|
|
105
|
+
|
|
106
|
+
## Development
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pnpm build
|
|
110
|
+
pnpm typecheck
|
|
111
|
+
pnpm test
|
|
112
|
+
pnpm lint
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
Maintained by [Agimon](https://agimon.ai/about).
|
|
158
116
|
|
|
159
117
|
## License
|
|
160
118
|
|
package/package.json
CHANGED
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-config",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.0.1-alpha.23",
|
|
4
|
+
"description": "Typed configuration loading, validation, and host adapters for composing DoomPi sessions.",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"
|
|
7
|
-
"
|
|
8
|
-
"
|
|
6
|
+
"agent-configuration",
|
|
7
|
+
"configuration",
|
|
8
|
+
"dependency-injection",
|
|
9
9
|
"doompi",
|
|
10
|
-
"pi-
|
|
10
|
+
"pi-coding-agent",
|
|
11
|
+
"typescript",
|
|
12
|
+
"yaml"
|
|
11
13
|
],
|
|
12
14
|
"homepage": "https://agimon.ai",
|
|
13
15
|
"license": "MIT",
|
|
@@ -130,8 +132,8 @@
|
|
|
130
132
|
"inversify": "8.2.1",
|
|
131
133
|
"reflect-metadata": "0.2.2",
|
|
132
134
|
"yaml": "2.9.0",
|
|
133
|
-
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.
|
|
134
|
-
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.
|
|
135
|
+
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.23",
|
|
136
|
+
"@agimon-ai/doompi-telemetry": "0.0.1-alpha.23"
|
|
135
137
|
},
|
|
136
138
|
"devDependencies": {
|
|
137
139
|
"@earendil-works/pi-coding-agent": "0.84.2",
|