@robota-sdk/agent-preset 3.0.0-beta.81 → 3.0.0-beta.83
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/CHANGELOG.md +201 -0
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.d.cts.map +1 -1
- package/dist/node/index.d.ts.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +9 -4
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# @robota-sdk/agent-preset
|
|
2
|
+
|
|
3
|
+
## 3.0.0-beta.83
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 57280bf: Every published package now declares `"engines": { "node": ">=22.12.0" }`. Before, 27 of the 38
|
|
8
|
+
packages declared no floor (`agent-core`, `agent-tools` and every provider among them),
|
|
9
|
+
`agent-session` and `agent-file-authority` declared `>=20.19.0`, and the other nine declared
|
|
10
|
+
`>=22.0.0`, so a consumer on Node 20 saw at most a warning from a transitive dependency.
|
|
11
|
+
|
|
12
|
+
Why 22.12: `agent-cli` and `agent-ui-terminal` need Node 22 through `ink` 7, and the CommonJS entries
|
|
13
|
+
of `agent-tools` and its dependents, `agent-transport`/`node` and its dependents, and
|
|
14
|
+
`agent-ui-terminal` `require()` ESM-only dependencies (`p-limit`, `jose`, `chalk`), which Node 22
|
|
15
|
+
supports unflagged only from 22.12. `engines` is advisory unless the consumer enables `engine-strict`.
|
|
16
|
+
|
|
17
|
+
No code changes: `tsdown` now reads `node22.12.0` as its build target from the field.
|
|
18
|
+
|
|
19
|
+
- 18c0d5c: Every published package now exports `./package.json`, so `require('<package>/package.json')` and
|
|
20
|
+
`import('<package>/package.json', { with: { type: 'json' } })` work instead of failing with
|
|
21
|
+
`ERR_PACKAGE_PATH_NOT_EXPORTED`, and each tarball now ships the package's `CHANGELOG.md`.
|
|
22
|
+
- Updated dependencies [3c81769]
|
|
23
|
+
- Updated dependencies [724fabb]
|
|
24
|
+
- Updated dependencies [997f2fb]
|
|
25
|
+
- Updated dependencies [bfe8ed5]
|
|
26
|
+
- Updated dependencies [e689c8e]
|
|
27
|
+
- Updated dependencies [4241fc5]
|
|
28
|
+
- Updated dependencies [4f49d14]
|
|
29
|
+
- Updated dependencies [7b72344]
|
|
30
|
+
- Updated dependencies [6ae3f28]
|
|
31
|
+
- Updated dependencies [9721162]
|
|
32
|
+
- Updated dependencies [57f57f5]
|
|
33
|
+
- Updated dependencies [ba822c1]
|
|
34
|
+
- Updated dependencies [9721162]
|
|
35
|
+
- Updated dependencies [6e6b06b]
|
|
36
|
+
- Updated dependencies [7d77ce4]
|
|
37
|
+
- Updated dependencies [57280bf]
|
|
38
|
+
- Updated dependencies [18c0d5c]
|
|
39
|
+
- Updated dependencies [caaab20]
|
|
40
|
+
- Updated dependencies [f01868f]
|
|
41
|
+
- Updated dependencies [e8779c9]
|
|
42
|
+
- Updated dependencies [5a0ee96]
|
|
43
|
+
- @robota-sdk/agent-framework@3.0.0-beta.83
|
|
44
|
+
|
|
45
|
+
## 3.0.0-beta.82
|
|
46
|
+
|
|
47
|
+
### Patch Changes
|
|
48
|
+
|
|
49
|
+
- Updated dependencies [c7f9203]
|
|
50
|
+
- @robota-sdk/agent-framework@3.0.0-beta.82
|
|
51
|
+
|
|
52
|
+
## 3.0.0-beta.81
|
|
53
|
+
|
|
54
|
+
### Patch Changes
|
|
55
|
+
|
|
56
|
+
- Updated dependencies [3038eb7]
|
|
57
|
+
- Updated dependencies [02b7452]
|
|
58
|
+
- Updated dependencies [ec5e477]
|
|
59
|
+
- Updated dependencies [007fd90]
|
|
60
|
+
- Updated dependencies [18b52cc]
|
|
61
|
+
- Updated dependencies [9843fe6]
|
|
62
|
+
- @robota-sdk/agent-framework@3.0.0-beta.81
|
|
63
|
+
|
|
64
|
+
## 3.0.0-beta.80
|
|
65
|
+
|
|
66
|
+
### Minor Changes
|
|
67
|
+
|
|
68
|
+
- 378c585: ARCH-005 Stage S1 — the external product-composition layer. Three new published packages plus a minimal
|
|
69
|
+
`agent-preset` addition:
|
|
70
|
+
|
|
71
|
+
- **`@robota-sdk/agent-capability-pack`** (new) — the additive capability-bundle contract
|
|
72
|
+
(`ICapabilityPack`) and the pure `mergeCapabilityPacks` merger (base ⊕ packs in profile order, with a
|
|
73
|
+
`{ merged, rejected }` conflict channel — never a silent override). The additive analog of
|
|
74
|
+
`agent-preset`; contract + pure fold, no IO.
|
|
75
|
+
- **`@robota-sdk/agent-product`** (new) — the product-assembly kernel. `assembleProduct(profile)` is a pure,
|
|
76
|
+
deterministic, IO-free fold over `IProductProfile` with zero product-specific branching: it resolves
|
|
77
|
+
presets via a per-call instance-scoped registry, merges additive packs, and DELEGATES runtime
|
|
78
|
+
construction to `agent-framework`'s `buildRuntimeSession` seam (never re-implemented). Its neutrality is
|
|
79
|
+
enforced by three mechanical guards (dependency-graph neutrality, purity/no-IO, no product-name
|
|
80
|
+
conditionals), coupling the amended project-structure L129 carve-out to the guards.
|
|
81
|
+
- **`@robota-sdk/pack-coding`** (new) — robota's coding capability as one `ICapabilityPack` (the built-in
|
|
82
|
+
coding tools, the `/shell` + `/editor` command modules, and the coding subagents) — the additive-axis
|
|
83
|
+
proof and robota's first pack.
|
|
84
|
+
- **`@robota-sdk/agent-preset`** — adds `createPresetRegistry`, a per-call instance-scoped resolver that
|
|
85
|
+
never mutates the module-level external-preset global (consumed by `assembleProduct`).
|
|
86
|
+
|
|
87
|
+
`agent-framework` and `agent-core` are unchanged. The CLI is not yet wired to `assembleProduct` (that is
|
|
88
|
+
Stage S2).
|
|
89
|
+
|
|
90
|
+
### Patch Changes
|
|
91
|
+
|
|
92
|
+
- 4f3c075: Assemble complete, verified package generations before switching build output; preserve the previous generation on build failure and pack only verified regular-file images. Include copied CLI web assets in affected-build ordering and artifact transfer. Preserve the CLI version in managed build paths. Public runtime contracts remain compatible (patch).
|
|
93
|
+
- Updated dependencies [9c19c50]
|
|
94
|
+
- Updated dependencies [5307f8a]
|
|
95
|
+
- Updated dependencies [b462ee7]
|
|
96
|
+
- Updated dependencies [08a9bd6]
|
|
97
|
+
- Updated dependencies [818f0c8]
|
|
98
|
+
- Updated dependencies [9368d00]
|
|
99
|
+
- Updated dependencies [d4189b9]
|
|
100
|
+
- Updated dependencies [4078a72]
|
|
101
|
+
- Updated dependencies [af2f2ad]
|
|
102
|
+
- Updated dependencies [267af5f]
|
|
103
|
+
- Updated dependencies [f336838]
|
|
104
|
+
- Updated dependencies [34e50f0]
|
|
105
|
+
- Updated dependencies [722e88a]
|
|
106
|
+
- Updated dependencies [a5cc36e]
|
|
107
|
+
- Updated dependencies [b70fa3d]
|
|
108
|
+
- Updated dependencies [2711ec6]
|
|
109
|
+
- Updated dependencies [4dd45cc]
|
|
110
|
+
- Updated dependencies [4c5148e]
|
|
111
|
+
- Updated dependencies [37af5dc]
|
|
112
|
+
- Updated dependencies [807d161]
|
|
113
|
+
- Updated dependencies [e82215f]
|
|
114
|
+
- Updated dependencies [52b7346]
|
|
115
|
+
- Updated dependencies [2ebff01]
|
|
116
|
+
- Updated dependencies [2ebff01]
|
|
117
|
+
- Updated dependencies [2d3b2c0]
|
|
118
|
+
- Updated dependencies [b078afa]
|
|
119
|
+
- Updated dependencies [2d3b2c0]
|
|
120
|
+
- Updated dependencies [baa6863]
|
|
121
|
+
- Updated dependencies [3a8876b]
|
|
122
|
+
- Updated dependencies [4772067]
|
|
123
|
+
- Updated dependencies [7b85767]
|
|
124
|
+
- Updated dependencies [0f98419]
|
|
125
|
+
- Updated dependencies [64ba748]
|
|
126
|
+
- Updated dependencies [d312755]
|
|
127
|
+
- Updated dependencies [1e3f91a]
|
|
128
|
+
- Updated dependencies [4f3c075]
|
|
129
|
+
- Updated dependencies [bed26ea]
|
|
130
|
+
- Updated dependencies [fe48835]
|
|
131
|
+
- Updated dependencies [1e40b5b]
|
|
132
|
+
- Updated dependencies [4b76cfa]
|
|
133
|
+
- Updated dependencies [d9bd9ec]
|
|
134
|
+
- Updated dependencies [8865acf]
|
|
135
|
+
- Updated dependencies [90e7a10]
|
|
136
|
+
- Updated dependencies [fcb0da3]
|
|
137
|
+
- Updated dependencies [07b627f]
|
|
138
|
+
- Updated dependencies [d0de5b2]
|
|
139
|
+
- Updated dependencies [9665c6e]
|
|
140
|
+
- Updated dependencies [44393be]
|
|
141
|
+
- Updated dependencies [c7fa299]
|
|
142
|
+
- Updated dependencies [5134b3b]
|
|
143
|
+
- Updated dependencies [dd444c1]
|
|
144
|
+
- Updated dependencies [1f57e7f]
|
|
145
|
+
- Updated dependencies [833afe1]
|
|
146
|
+
- Updated dependencies [7863b16]
|
|
147
|
+
- Updated dependencies [fde558e]
|
|
148
|
+
- Updated dependencies [db5c439]
|
|
149
|
+
- Updated dependencies [4a01a87]
|
|
150
|
+
- Updated dependencies [cbee54e]
|
|
151
|
+
- Updated dependencies [9814afc]
|
|
152
|
+
- Updated dependencies [242a644]
|
|
153
|
+
- @robota-sdk/agent-framework@3.0.0-beta.80
|
|
154
|
+
|
|
155
|
+
## 3.0.0-beta.79
|
|
156
|
+
|
|
157
|
+
### Patch Changes
|
|
158
|
+
|
|
159
|
+
- @robota-sdk/agent-framework@3.0.0-beta.79
|
|
160
|
+
|
|
161
|
+
## 3.0.0-beta.78
|
|
162
|
+
|
|
163
|
+
### Patch Changes
|
|
164
|
+
|
|
165
|
+
- @robota-sdk/agent-framework@3.0.0-beta.78
|
|
166
|
+
|
|
167
|
+
## 3.0.0-beta.77
|
|
168
|
+
|
|
169
|
+
### Patch Changes
|
|
170
|
+
|
|
171
|
+
- @robota-sdk/agent-framework@3.0.0-beta.77
|
|
172
|
+
|
|
173
|
+
## 3.0.0-beta.76
|
|
174
|
+
|
|
175
|
+
### Patch Changes
|
|
176
|
+
|
|
177
|
+
- Updated dependencies [c0a6287]
|
|
178
|
+
- Updated dependencies [9df3a88]
|
|
179
|
+
- Updated dependencies [576af62]
|
|
180
|
+
- @robota-sdk/agent-framework@3.0.0-beta.76
|
|
181
|
+
|
|
182
|
+
## 3.0.0-beta.75
|
|
183
|
+
|
|
184
|
+
### Patch Changes
|
|
185
|
+
|
|
186
|
+
- Agent preset system + live preset switching + context/history correctness fixes.
|
|
187
|
+
|
|
188
|
+
- **Preset system (PRESET-001~017):** new `@robota-sdk/agent-preset` package layering framework
|
|
189
|
+
assembly options into named, selectable profiles (`default`, `autonomous-builder`, `careful-reviewer`,
|
|
190
|
+
`neutral-executor`) plus user-authored external presets loaded from `~/.robota/presets/*.json`.
|
|
191
|
+
- **Live preset switching:** `/preset` command (list + active marker + switch) and a TUI active-preset
|
|
192
|
+
display. Switching live re-applies permission posture, model/effort, persona, command-module
|
|
193
|
+
selection, parallel-subagents gating, and a self-verification system-prompt section via the single
|
|
194
|
+
`applyPresetToSession` engine.
|
|
195
|
+
- **CTX-001:** the TUI Context display + session auto-compact now use the accurate provider-based token
|
|
196
|
+
estimate (system prompt + tool schemas included) instead of a crude history-only char heuristic.
|
|
197
|
+
- **HIST-001:** conversation history is now append-only — removed the silent 100-message count cap that
|
|
198
|
+
could drop early context; context size is managed solely by size-based compaction.
|
|
199
|
+
|
|
200
|
+
- Updated dependencies
|
|
201
|
+
- @robota-sdk/agent-framework@3.0.0-beta.75
|
package/dist/node/index.cjs
CHANGED
|
@@ -2,5 +2,5 @@ Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require
|
|
|
2
2
|
`)},a={id:`careful-reviewer`,title:`Careful Reviewer`,description:`Conservative, ask-first reviewing posture — reads and plans before changing, prompts on write/exec, self-verifies, runs focused (no parallel subagents) at high effort.`,effort:`high`,autonomy:`ask-first`,enableParallelSubagents:!1,selfVerification:!0,persona:[`You are a careful, review-oriented assistant. Read and analyse before you change anything —`,`understand the surrounding code and context first, then lay out a short plan for the change and`,`wait for confirmation before you write or run things that have side effects.`,``,`When you propose a change, explain why — the reasoning behind it and the trade-offs against the`,`alternatives you considered, so the choice can be reviewed rather than taken on trust.`,``,`Stay conservative in scope. Make the change that was asked for and the detail it plainly needs;`,`do not widen the blast radius with unrequested refactors or rewrites.`,``,`Ground your claims in evidence. Before reporting progress or completion, check each claim against`,`an actual tool result from this session; if something is not yet verified, say so plainly rather`,`than implying it is done.`,``,`Be warm and honest without being sycophantic — tell people what is useful, not just what they`,`want to hear. Stay even-handed and let your conclusions follow from the evidence. When you get`,`something wrong, own it directly, correct it, and move on.`].join(`
|
|
3
3
|
`)},o={id:`neutral-executor`,title:`Neutral Executor`,description:`Thin, steerable executor — follows instructions literally, minimal editorialising, strict scope, terse output; balanced autonomy, no parallel subagents, no self-verification, medium effort for predictable scripted use (neutral-alignment work-style; original English wording).`,effort:`medium`,autonomy:`balanced`,enableParallelSubagents:!1,selfVerification:!1,persona:[`Follow the system and user instructions literally. Do what was asked, the way it was asked, and`,`defer to the given instructions over your own preferences.`,``,`Editorialise as little as possible. Skip unrequested commentary, caveats, and asides — give the`,`result, not a narration of it.`,``,`Stay strictly in scope. Make only the change that was requested and the detail it plainly needs;`,`do not add adjacent refactors, comments, or features that were not asked for.`,``,`Keep output terse. Prefer the shortest response that fully answers, so the result is predictable`,`and easy to consume in a script or pipeline.`].join(`
|
|
4
4
|
`)},s={"ask-first":`default`,balanced:`default`,"act-first":`acceptEdits`},c=[r,i,a,o];function l(e){let t=new Set(c.map(e=>e.id)),n=[],r=[];for(let i of e){if(t.has(i.id)){r.push({id:i.id,reason:`collides with built-in preset`});continue}if(n.some(e=>e.id===i.id)){r.push({id:i.id,reason:`duplicate preset id`});continue}n.push(i)}return{accepted:n,rejected:r}}function u(e){let{id:t,title:n,description:r,...i}=e;return i}function d(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}function f(e,t){if(!t)return e;let n={...e,...d(t)};return t.deniedTools!==void 0||e.deniedTools!==void 0?{...n,deniedTools:p(e.deniedTools,t.deniedTools)}:n}function p(e,t){return[...new Set([...e??[],...t??[]])]}function m(e,t,n={}){let r=e.find(e=>e.id===t);if(!r){let n=e.map(e=>e.id).join(`, `);throw Error(`Unknown preset: "${t}". Available presets: ${n}.`)}let i=u(r);return i=f(i,n.cliOverrides),i=f(i,n.explicit),g(i)}function h(e=[]){let t=[...c,...l(e).accepted];return{resolvePreset:(e,n={})=>m(t,e,n),getPreset:e=>t.find(t=>t.id===e),listPresets:()=>t.map(({id:e,title:t,description:n})=>({id:e,title:t,description:n}))}}function g(e){return e.permissionMode===void 0?e.defaultPermissionMode===void 0?e.autonomy===void 0?e:{...e,permissionMode:s[e.autonomy]}:{...e,permissionMode:e.defaultPermissionMode}:e}const _=[`ask-first`,`act-first`,`balanced`],v=[`plan`,`default`,`acceptEdits`,`bypassPermissions`];function y(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function b(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function x(e,t){let n=[[`persona`,e.persona,e=>t.persona=e],[`systemPrompt`,e.systemPrompt,e=>t.systemPrompt=e],[`appendSystemPrompt`,e.appendSystemPrompt,e=>t.appendSystemPrompt=e],[`agentName`,e.agentName,e=>t.agentName=e],[`model`,e.model,e=>t.model=e],[`language`,e.language,e=>t.language=e]];for(let[e,t,r]of n)if(t!==void 0){if(typeof t!=`string`)return`${e}: expected a string`;r(t)}}function S(e,t){let n=[[`temperature`,e.temperature,e=>t.temperature=e],[`maxOutputTokens`,e.maxOutputTokens,e=>t.maxOutputTokens=e]];for(let[e,t,r]of n)if(t!==void 0){if(typeof t!=`number`||Number.isNaN(t))return`${e}: expected a number`;r(t)}let r=[[`enableParallelSubagents`,e.enableParallelSubagents,e=>t.enableParallelSubagents=e],[`selfVerification`,e.selfVerification,e=>t.selfVerification=e]];for(let[e,t,n]of r)if(t!==void 0){if(typeof t!=`boolean`)return`${e}: expected a boolean`;n(t)}}function C(e,t){if(e.effort!==void 0){if(typeof e.effort!=`string`)return`effort: expected a string`;try{let r=(0,n.parseModelEffort)(e.effort,`effort`);if(r===void 0)return`effort: expected a Core-owned effort selection`;t.effort=r}catch(e){return`effort: ${e instanceof Error?e.message:String(e)}`}}if(e.autonomy!==void 0){if(!_.includes(e.autonomy))return`autonomy: expected one of ${_.join(`, `)}`;t.autonomy=e.autonomy}let r=[[`permissionMode`,e.permissionMode,e=>t.permissionMode=e],[`defaultPermissionMode`,e.defaultPermissionMode,e=>t.defaultPermissionMode=e]];for(let[e,t,n]of r)if(t!==void 0){if(!v.includes(t))return`${e}: expected one of ${v.join(`, `)}`;n(t)}}function w(e,t){let n=[[`allowedTools`,e.allowedTools,e=>t.allowedTools=e],[`deniedTools`,e.deniedTools,e=>t.deniedTools=e],[`enabledCommandModules`,e.enabledCommandModules,e=>t.enabledCommandModules=e],[`disabledCommandModules`,e.disabledCommandModules,e=>t.disabledCommandModules=e]];for(let[e,t,r]of n)if(t!==void 0){if(!b(t))return`${e}: expected an array of strings`;r(t)}}function T(e){if(!y(e))return{ok:!1,error:`preset: expected a non-null object`};let t=[[`id`,e.id],[`title`,e.title],[`description`,e.description]];for(let[e,n]of t)if(typeof n!=`string`||n.length===0)return{ok:!1,error:`${e}: expected a non-empty string`};let n={},r=x(e,n)??S(e,n)??C(e,n)??w(e,n);return r===void 0?{ok:!0,preset:{id:e.id,title:e.title,description:e.description,...n}}:{ok:!1,error:r}}function E(n){if(!(0,e.existsSync)(n))return{presets:[],loaded:[],errors:[]};let r=[],i=[],a=new Map,o=(0,e.readdirSync)(n).filter(e=>e.endsWith(`.json`));for(let s of o){let o=(0,t.join)(n,s),c;try{c=JSON.parse((0,e.readFileSync)(o,`utf8`))}catch(e){r.push({file:s,error:e instanceof Error?e.message:String(e)});continue}let l=T(c);if(!l.ok){r.push({file:s,error:l.error});continue}i.push(l.preset),a.set(l.preset.id,s)}let{accepted:s,rejected:c}=l(i);for(let e of c)r.push({file:a.get(e.id)??e.id,error:e.reason});return{presets:s,loaded:s.map(e=>e.id),errors:r}}const D=[{id:`default`,name:`Default`,description:`The ordinary response style.`,instructions:``,keepCodingInstructions:!0,tokenCost:`baseline`,source:`built-in`},{id:`concise`,name:`Concise`,description:`Lead with the result and keep routine responses short.`,instructions:`Lead with the answer and skip routine preamble or tool narration. Keep responses concise while doing the same engineering work. Expand fully when asked for detail. Always keep error reports, security warnings and destructive-action confirmations complete.`,keepCodingInstructions:!0,tokenCost:`low`,source:`built-in`},{id:`proactive`,name:`Proactive`,description:`Take the next reasonable step without pausing on routine choices.`,instructions:`Act on reasonable routine assumptions and take the next useful step. State assumptions when they matter. The active permission mode remains authoritative; this style never grants, changes, or bypasses permission.`,keepCodingInstructions:!0,tokenCost:`medium`,source:`built-in`},{id:`explanatory`,name:`Explanatory`,description:`Teach the reasoning and trade-offs behind the answer.`,instructions:`Explain the reasoning, important trade-offs, and relevant terminology as you work. Keep the explanation connected to the requested outcome and do not omit complete error, security, or destructive-action guidance.`,keepCodingInstructions:!0,tokenCost:`high`,source:`built-in`},{id:`learning`,name:`Learning`,description:`Teach by marking useful gaps for the human to fill.`,instructions:`Teach the requested subject step by step. Mark a small number of useful gaps with [Your turn:] and invite the human to fill them before revealing the explanation. Never turn safety, security, error, or destructive-action guidance into a gap.`,keepCodingInstructions:!0,tokenCost:`high`,source:`built-in`}],O=new Set([`baseline`,`low`,`medium`,`high`,`unspecified`]);function k(e){return e.replace(/^(?:"([\s\S]*)"|'([\s\S]*)')$/,`$1$2`)}function A(e,t){if(t===`true`)return!0;if(t===`false`)return!1;throw Error(`${e}: expected boolean, received "${t}"`)}function j(e,t){let n=t.split(`
|
|
5
|
-
`);if(n[0]?.trim()!==`---`)throw Error(`frontmatter: expected an opening --- marker`);let r={},i=-1;for(let e=1;e<n.length;e+=1){let t=n[e];if(t.trim()===`---`){i=e;break}if(t.trim()===``)continue;let a=/^([a-z][a-z0-9-]*):\s*(
|
|
5
|
+
`);if(n[0]?.trim()!==`---`)throw Error(`frontmatter: expected an opening --- marker`);let r={},i=-1;for(let e=1;e<n.length;e+=1){let t=n[e];if(t.trim()===`---`){i=e;break}if(t.trim()===``)continue;let a=/^([a-z][a-z0-9-]*):\s*(\S[^\n\r\u2028\u2029]*)?$/.exec(t);if(!a)throw Error(`frontmatter: invalid entry at line ${e+1}`);let o=a[1];if(r[o]!==void 0)throw Error(`frontmatter.${o}: duplicate field`);r[o]=k((a[2]??``).trim())}if(i<0)throw Error(`frontmatter: expected a closing --- marker`);let a=Object.keys(r).filter(e=>![`name`,`description`,`keep-coding-instructions`,`token-cost`].includes(e));if(a.length>0)throw Error(`frontmatter.${a[0]}: unknown field`);return{values:r,instructions:n.slice(i+1).join(`
|
|
6
6
|
`).trim()}}function M(e){let n=(0,t.basename)(e,(0,t.extname)(e)).trim();if(!/^[a-z0-9][a-z0-9-]*$/i.test(n))throw Error(`id: expected the Markdown filename stem to be a slug, received "${n}"`);return n.toLowerCase()}function N(e,n){if(!e.fileName.endsWith(`.md`))throw Error(`file: expected a .md output-style file`);let r=M(e.fileName),i=j(e.fileName,e.content),a=i.values.name?.trim()||(0,t.basename)(e.fileName,`.md`),o=i.values.description?.trim()||`Custom output style: ${a}`,s=i.values[`keep-coding-instructions`]!==void 0&&A(`frontmatter.keep-coding-instructions`,i.values[`keep-coding-instructions`]),c=i.values[`token-cost`]??`unspecified`;if(!O.has(c))throw Error(`frontmatter.token-cost: expected baseline|low|medium|high|unspecified, received "${c}"`);if(i.instructions.length===0)throw Error(`body: expected non-empty style instructions`);return{id:r,name:a,description:o,instructions:i.instructions,keepCodingInstructions:s,tokenCost:c,source:n}}function P(e){return{id:e.id,name:e.name,description:e.description,tokenCost:e.tokenCost,source:e.source}}function F(e){let t=new Map,n=[];for(let e of D)t.set(e.id,e);let r=[...e].sort((e,t)=>e.precedence-t.precedence);for(let e of r){let r=new Set;for(let i of[...e.files].sort((e,t)=>e.fileName.localeCompare(t.fileName))){let a=`${e.displayName}/${i.fileName}`,o;try{o=N(i,e.scope)}catch(e){n.push({file:a,error:e instanceof Error?e.message:String(e)});continue}if(r.has(o.id)){n.push({file:a,error:`duplicate style id "${o.id}" in source`});continue}if(r.add(o.id),t.get(o.id)?.source===`built-in`){n.push({file:a,error:`style id "${o.id}" collides with a built-in`});continue}t.set(o.id,o)}}return{styles:[...t.values()],loaded:[...t.values()].filter(e=>e.source!==`built-in`).map(e=>e.id),errors:n}}function I(e=[]){let t=F(e),n=new Map(t.styles.map(e=>[e.id,e]));return{listOutputStyles:()=>t.styles.map(P),getOutputStyle:e=>n.get(e)}}exports.autonomousBuilderPreset=i,exports.builtInOutputStyles=D,exports.createOutputStyleRegistry=I,exports.createPresetRegistry=h,exports.defaultPreset=r,exports.loadExternalPresetsFromDir=E,exports.loadOutputStylesFromSources=F,exports.parseOutputStyleFile=N,exports.partitionExternalPresets=l,exports.validateExternalPreset=T;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/preset-types.ts","../../src/output-style-types.ts","../../src/presets/default.ts","../../src/presets/autonomous-builder.ts","../../src/resolve-preset.ts","../../src/load-external-presets.ts","../../src/preset-validation.ts","../../src/output-styles.ts","../../src/output-style-registry.ts"],"mappings":";;;;;;;;;;KAUY,gBAAgB,YAAY;;;;;KAM5B;;;;;KAMA,wBAAwB;;;;;UAMnB;;;;;;EAOf;EACA;EACA;EACA;EAGA;EACA;EACA,SAAS;EACT;EACA;;;;;;;EASA,iBAAiB;;;;;EAKjB,wBAAwB;EACxB;EACA;EAGA;EACA;EAGA;EACA;EAGA,WAAW;;;;;;UAOI,gBAAgB;EAC/B;EACA;EACA;;;;KClFU;KAEA;;UAGK;WACN;WACA;WACA;WACA;WACA;WACA,WAAW;WACX,QAAQ;;;KAIP,sBAAsB,KAChC;UAIe;WACN;WACA;;;UAIM;WACN,OAAO,QAAQ;WACf;;WAEA;WACA,gBAAgB;;UAGV;WACN,iBAAiB;WACjB;WACA;IAAmB;IAAc;;;UAG3B;EACf,6BAA6B;EAC7B,eAAe,aAAa;;;;;;;;;;cCnCjB,eAAe;;;;;;;;;;;;;;cCsCf,yBAAyB;;;;UCXrB;EACf;EACA;EACA;;;UAIe;EACf,mBAAmB;EACnB;IAAqB;IAAY;;;;;;;;;;;;;;;iBAenB,yBAAyB,kBAAkB,YAAY;;;;;UAwBtD;EACf,eAAe;EACf,WAAW;;;;;;;;;;;UAuFI;;EAEf,cAAc,YAAY,UAAU,wBAAwB;;EAE5D,UAAU,aAAa;;EAEvB,wBAAwB;;;;;;;;;;;iBAYV,qBAAqB,2BAA0B,YAAiB;;;;;;;;;;;UC9K/D;EACf,kBAAkB;EAClB;EACA;IAAmB;IAAc;;;;;;;;;;;;;iBAanB,2BAA2B,cAAc;;;;KCtB7C;EAA4B;EAAU,QAAQ;;EAAc;EAAW;;;;;;;;;;iBA8KnE,uBAAuB,iBAAiB;;;cCpL3C,8BAA8B;;;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/preset-types.ts","../../src/output-style-types.ts","../../src/presets/default.ts","../../src/presets/autonomous-builder.ts","../../src/resolve-preset.ts","../../src/load-external-presets.ts","../../src/preset-validation.ts","../../src/output-styles.ts","../../src/output-style-registry.ts"],"mappings":";;;;;;;;;;KAUY,gBAAgB,YAAY;;;;;KAM5B;;;;;KAMA,wBAAwB;;;;;UAMnB;;;;;;EAOf;EACA;EACA;EACA;EAGA;EACA;EACA,SAAS;EACT;EACA;;;;;;;EASA,iBAAiB;;;;;EAKjB,wBAAwB;EACxB;EACA;EAGA;EACA;EAGA;EACA;EAGA,WAAW;;;;;;UAOI,gBAAgB;EAC/B;EACA;EACA;;;;KClFU;KAEA;;UAGK;WACN;WACA;WACA;WACA;WACA;WACA,WAAW;WACX,QAAQ;;;KAIP,sBAAsB,KAChC;UAIe;WACN;WACA;;;UAIM;WACN,OAAO,QAAQ;WACf;;WAEA;WACA,gBAAgB;;UAGV;WACN,iBAAiB;WACjB;WACA;IAAmB;IAAc;;;UAG3B;EACf,6BAA6B;EAC7B,eAAe,aAAa;;;;;;;;;;cCnCjB,eAAe;;;;;;;;;;;;;;cCsCf,yBAAyB;;;;UCXrB;EACf;EACA;EACA;;;UAIe;EACf,mBAAmB;EACnB;IAAqB;IAAY;;;;;;;;;;;;;;;iBAenB,yBAAyB,kBAAkB,YAAY;;;;;UAwBtD;EACf,eAAe;EACf,WAAW;;;;;;;;;;;UAuFI;;EAEf,cAAc,YAAY,UAAU,wBAAwB;;EAE5D,UAAU,aAAa;;EAEvB,wBAAwB;;;;;;;;;;;iBAYV,qBAAqB,2BAA0B,YAAiB;;;;;;;;;;;UC9K/D;EACf,kBAAkB;EAClB;EACA;IAAmB;IAAc;;;;;;;;;;;;;iBAanB,2BAA2B,cAAc;;;;KCtB7C;EAA4B;EAAU,QAAQ;;EAAc;EAAW;;;;;;;;;;iBA8KnE,uBAAuB,iBAAiB;;;cCpL3C,8BAA8B;;;iBCgF3B,qBACd,MAAM,kBACN,QAAQ,qBACP;iBA6Ca,4BACd,kBAAkB,uBACjB;iBA4Ca,0BACd,mBAAkB,uBACjB"}
|
package/dist/node/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/preset-types.ts","../../src/output-style-types.ts","../../src/presets/default.ts","../../src/presets/autonomous-builder.ts","../../src/resolve-preset.ts","../../src/load-external-presets.ts","../../src/preset-validation.ts","../../src/output-styles.ts","../../src/output-style-registry.ts"],"mappings":";;;;;;;;;;KAUY,gBAAgB,YAAY;;;;;KAM5B;;;;;KAMA,wBAAwB;;;;;UAMnB;;;;;;EAOf;EACA;EACA;EACA;EAGA;EACA;EACA,SAAS;EACT;EACA;;;;;;;EASA,iBAAiB;;;;;EAKjB,wBAAwB;EACxB;EACA;EAGA;EACA;EAGA;EACA;EAGA,WAAW;;;;;;UAOI,gBAAgB;EAC/B;EACA;EACA;;;;KClFU;KAEA;;UAGK;WACN;WACA;WACA;WACA;WACA;WACA,WAAW;WACX,QAAQ;;;KAIP,sBAAsB,KAChC;UAIe;WACN;WACA;;;UAIM;WACN,OAAO,QAAQ;WACf;;WAEA;WACA,gBAAgB;;UAGV;WACN,iBAAiB;WACjB;WACA;IAAmB;IAAc;;;UAG3B;EACf,6BAA6B;EAC7B,eAAe,aAAa;;;;;;;;;;cCnCjB,eAAe;;;;;;;;;;;;;;cCsCf,yBAAyB;;;;UCXrB;EACf;EACA;EACA;;;UAIe;EACf,mBAAmB;EACnB;IAAqB;IAAY;;;;;;;;;;;;;;;iBAenB,yBAAyB,kBAAkB,YAAY;;;;;UAwBtD;EACf,eAAe;EACf,WAAW;;;;;;;;;;;UAuFI;;EAEf,cAAc,YAAY,UAAU,wBAAwB;;EAE5D,UAAU,aAAa;;EAEvB,wBAAwB;;;;;;;;;;;iBAYV,qBAAqB,2BAA0B,YAAiB;;;;;;;;;;;UC9K/D;EACf,kBAAkB;EAClB;EACA;IAAmB;IAAc;;;;;;;;;;;;;iBAanB,2BAA2B,cAAc;;;;KCtB7C;EAA4B;EAAU,QAAQ;;EAAc;EAAW;;;;;;;;;;iBA8KnE,uBAAuB,iBAAiB;;;cCpL3C,8BAA8B;;;
|
|
1
|
+
{"version":3,"file":"index.d.ts","names":[],"sources":["../../src/preset-types.ts","../../src/output-style-types.ts","../../src/presets/default.ts","../../src/presets/autonomous-builder.ts","../../src/resolve-preset.ts","../../src/load-external-presets.ts","../../src/preset-validation.ts","../../src/output-styles.ts","../../src/output-style-registry.ts"],"mappings":";;;;;;;;;;KAUY,gBAAgB,YAAY;;;;;KAM5B;;;;;KAMA,wBAAwB;;;;;UAMnB;;;;;;EAOf;EACA;EACA;EACA;EAGA;EACA;EACA,SAAS;EACT;EACA;;;;;;;EASA,iBAAiB;;;;;EAKjB,wBAAwB;EACxB;EACA;EAGA;EACA;EAGA;EACA;EAGA,WAAW;;;;;;UAOI,gBAAgB;EAC/B;EACA;EACA;;;;KClFU;KAEA;;UAGK;WACN;WACA;WACA;WACA;WACA;WACA,WAAW;WACX,QAAQ;;;KAIP,sBAAsB,KAChC;UAIe;WACN;WACA;;;UAIM;WACN,OAAO,QAAQ;WACf;;WAEA;WACA,gBAAgB;;UAGV;WACN,iBAAiB;WACjB;WACA;IAAmB;IAAc;;;UAG3B;EACf,6BAA6B;EAC7B,eAAe,aAAa;;;;;;;;;;cCnCjB,eAAe;;;;;;;;;;;;;;cCsCf,yBAAyB;;;;UCXrB;EACf;EACA;EACA;;;UAIe;EACf,mBAAmB;EACnB;IAAqB;IAAY;;;;;;;;;;;;;;;iBAenB,yBAAyB,kBAAkB,YAAY;;;;;UAwBtD;EACf,eAAe;EACf,WAAW;;;;;;;;;;;UAuFI;;EAEf,cAAc,YAAY,UAAU,wBAAwB;;EAE5D,UAAU,aAAa;;EAEvB,wBAAwB;;;;;;;;;;;iBAYV,qBAAqB,2BAA0B,YAAiB;;;;;;;;;;;UC9K/D;EACf,kBAAkB;EAClB;EACA;IAAmB;IAAc;;;;;;;;;;;;;iBAanB,2BAA2B,cAAc;;;;KCtB7C;EAA4B;EAAU,QAAQ;;EAAc;EAAW;;;;;;;;;;iBA8KnE,uBAAuB,iBAAiB;;;cCpL3C,8BAA8B;;;iBCgF3B,qBACd,MAAM,kBACN,QAAQ,qBACP;iBA6Ca,4BACd,kBAAkB,uBACjB;iBA4Ca,0BACd,mBAAkB,uBACjB"}
|
package/dist/node/index.js
CHANGED
|
@@ -2,6 +2,6 @@ import{existsSync as e,readFileSync as t,readdirSync as n}from"node:fs";import{b
|
|
|
2
2
|
`)},l={id:`careful-reviewer`,title:`Careful Reviewer`,description:`Conservative, ask-first reviewing posture — reads and plans before changing, prompts on write/exec, self-verifies, runs focused (no parallel subagents) at high effort.`,effort:`high`,autonomy:`ask-first`,enableParallelSubagents:!1,selfVerification:!0,persona:[`You are a careful, review-oriented assistant. Read and analyse before you change anything —`,`understand the surrounding code and context first, then lay out a short plan for the change and`,`wait for confirmation before you write or run things that have side effects.`,``,`When you propose a change, explain why — the reasoning behind it and the trade-offs against the`,`alternatives you considered, so the choice can be reviewed rather than taken on trust.`,``,`Stay conservative in scope. Make the change that was asked for and the detail it plainly needs;`,`do not widen the blast radius with unrequested refactors or rewrites.`,``,`Ground your claims in evidence. Before reporting progress or completion, check each claim against`,`an actual tool result from this session; if something is not yet verified, say so plainly rather`,`than implying it is done.`,``,`Be warm and honest without being sycophantic — tell people what is useful, not just what they`,`want to hear. Stay even-handed and let your conclusions follow from the evidence. When you get`,`something wrong, own it directly, correct it, and move on.`].join(`
|
|
3
3
|
`)},u={id:`neutral-executor`,title:`Neutral Executor`,description:`Thin, steerable executor — follows instructions literally, minimal editorialising, strict scope, terse output; balanced autonomy, no parallel subagents, no self-verification, medium effort for predictable scripted use (neutral-alignment work-style; original English wording).`,effort:`medium`,autonomy:`balanced`,enableParallelSubagents:!1,selfVerification:!1,persona:[`Follow the system and user instructions literally. Do what was asked, the way it was asked, and`,`defer to the given instructions over your own preferences.`,``,`Editorialise as little as possible. Skip unrequested commentary, caveats, and asides — give the`,`result, not a narration of it.`,``,`Stay strictly in scope. Make only the change that was requested and the detail it plainly needs;`,`do not add adjacent refactors, comments, or features that were not asked for.`,``,`Keep output terse. Prefer the shortest response that fully answers, so the result is predictable`,`and easy to consume in a script or pipeline.`].join(`
|
|
4
4
|
`)},d={"ask-first":`default`,balanced:`default`,"act-first":`acceptEdits`},f=[s,c,l,u];function p(e){let t=new Set(f.map(e=>e.id)),n=[],r=[];for(let i of e){if(t.has(i.id)){r.push({id:i.id,reason:`collides with built-in preset`});continue}if(n.some(e=>e.id===i.id)){r.push({id:i.id,reason:`duplicate preset id`});continue}n.push(i)}return{accepted:n,rejected:r}}function m(e){let{id:t,title:n,description:r,...i}=e;return i}function h(e){return Object.fromEntries(Object.entries(e).filter(([,e])=>e!==void 0))}function g(e,t){if(!t)return e;let n={...e,...h(t)};return t.deniedTools!==void 0||e.deniedTools!==void 0?{...n,deniedTools:_(e.deniedTools,t.deniedTools)}:n}function _(e,t){return[...new Set([...e??[],...t??[]])]}function v(e,t,n={}){let r=e.find(e=>e.id===t);if(!r){let n=e.map(e=>e.id).join(`, `);throw Error(`Unknown preset: "${t}". Available presets: ${n}.`)}let i=m(r);return i=g(i,n.cliOverrides),i=g(i,n.explicit),b(i)}function y(e=[]){let t=[...f,...p(e).accepted];return{resolvePreset:(e,n={})=>v(t,e,n),getPreset:e=>t.find(t=>t.id===e),listPresets:()=>t.map(({id:e,title:t,description:n})=>({id:e,title:t,description:n}))}}function b(e){return e.permissionMode===void 0?e.defaultPermissionMode===void 0?e.autonomy===void 0?e:{...e,permissionMode:d[e.autonomy]}:{...e,permissionMode:e.defaultPermissionMode}:e}const x=[`ask-first`,`act-first`,`balanced`],S=[`plan`,`default`,`acceptEdits`,`bypassPermissions`];function C(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function w(e){return Array.isArray(e)&&e.every(e=>typeof e==`string`)}function T(e,t){let n=[[`persona`,e.persona,e=>t.persona=e],[`systemPrompt`,e.systemPrompt,e=>t.systemPrompt=e],[`appendSystemPrompt`,e.appendSystemPrompt,e=>t.appendSystemPrompt=e],[`agentName`,e.agentName,e=>t.agentName=e],[`model`,e.model,e=>t.model=e],[`language`,e.language,e=>t.language=e]];for(let[e,t,r]of n)if(t!==void 0){if(typeof t!=`string`)return`${e}: expected a string`;r(t)}}function E(e,t){let n=[[`temperature`,e.temperature,e=>t.temperature=e],[`maxOutputTokens`,e.maxOutputTokens,e=>t.maxOutputTokens=e]];for(let[e,t,r]of n)if(t!==void 0){if(typeof t!=`number`||Number.isNaN(t))return`${e}: expected a number`;r(t)}let r=[[`enableParallelSubagents`,e.enableParallelSubagents,e=>t.enableParallelSubagents=e],[`selfVerification`,e.selfVerification,e=>t.selfVerification=e]];for(let[e,t,n]of r)if(t!==void 0){if(typeof t!=`boolean`)return`${e}: expected a boolean`;n(t)}}function D(e,t){if(e.effort!==void 0){if(typeof e.effort!=`string`)return`effort: expected a string`;try{let n=o(e.effort,`effort`);if(n===void 0)return`effort: expected a Core-owned effort selection`;t.effort=n}catch(e){return`effort: ${e instanceof Error?e.message:String(e)}`}}if(e.autonomy!==void 0){if(!x.includes(e.autonomy))return`autonomy: expected one of ${x.join(`, `)}`;t.autonomy=e.autonomy}let n=[[`permissionMode`,e.permissionMode,e=>t.permissionMode=e],[`defaultPermissionMode`,e.defaultPermissionMode,e=>t.defaultPermissionMode=e]];for(let[e,t,r]of n)if(t!==void 0){if(!S.includes(t))return`${e}: expected one of ${S.join(`, `)}`;r(t)}}function O(e,t){let n=[[`allowedTools`,e.allowedTools,e=>t.allowedTools=e],[`deniedTools`,e.deniedTools,e=>t.deniedTools=e],[`enabledCommandModules`,e.enabledCommandModules,e=>t.enabledCommandModules=e],[`disabledCommandModules`,e.disabledCommandModules,e=>t.disabledCommandModules=e]];for(let[e,t,r]of n)if(t!==void 0){if(!w(t))return`${e}: expected an array of strings`;r(t)}}function k(e){if(!C(e))return{ok:!1,error:`preset: expected a non-null object`};let t=[[`id`,e.id],[`title`,e.title],[`description`,e.description]];for(let[e,n]of t)if(typeof n!=`string`||n.length===0)return{ok:!1,error:`${e}: expected a non-empty string`};let n={},r=T(e,n)??E(e,n)??D(e,n)??O(e,n);return r===void 0?{ok:!0,preset:{id:e.id,title:e.title,description:e.description,...n}}:{ok:!1,error:r}}function A(r){if(!e(r))return{presets:[],loaded:[],errors:[]};let i=[],o=[],s=new Map,c=n(r).filter(e=>e.endsWith(`.json`));for(let e of c){let n=a(r,e),c;try{c=JSON.parse(t(n,`utf8`))}catch(t){i.push({file:e,error:t instanceof Error?t.message:String(t)});continue}let l=k(c);if(!l.ok){i.push({file:e,error:l.error});continue}o.push(l.preset),s.set(l.preset.id,e)}let{accepted:l,rejected:u}=p(o);for(let e of u)i.push({file:s.get(e.id)??e.id,error:e.reason});return{presets:l,loaded:l.map(e=>e.id),errors:i}}const j=[{id:`default`,name:`Default`,description:`The ordinary response style.`,instructions:``,keepCodingInstructions:!0,tokenCost:`baseline`,source:`built-in`},{id:`concise`,name:`Concise`,description:`Lead with the result and keep routine responses short.`,instructions:`Lead with the answer and skip routine preamble or tool narration. Keep responses concise while doing the same engineering work. Expand fully when asked for detail. Always keep error reports, security warnings and destructive-action confirmations complete.`,keepCodingInstructions:!0,tokenCost:`low`,source:`built-in`},{id:`proactive`,name:`Proactive`,description:`Take the next reasonable step without pausing on routine choices.`,instructions:`Act on reasonable routine assumptions and take the next useful step. State assumptions when they matter. The active permission mode remains authoritative; this style never grants, changes, or bypasses permission.`,keepCodingInstructions:!0,tokenCost:`medium`,source:`built-in`},{id:`explanatory`,name:`Explanatory`,description:`Teach the reasoning and trade-offs behind the answer.`,instructions:`Explain the reasoning, important trade-offs, and relevant terminology as you work. Keep the explanation connected to the requested outcome and do not omit complete error, security, or destructive-action guidance.`,keepCodingInstructions:!0,tokenCost:`high`,source:`built-in`},{id:`learning`,name:`Learning`,description:`Teach by marking useful gaps for the human to fill.`,instructions:`Teach the requested subject step by step. Mark a small number of useful gaps with [Your turn:] and invite the human to fill them before revealing the explanation. Never turn safety, security, error, or destructive-action guidance into a gap.`,keepCodingInstructions:!0,tokenCost:`high`,source:`built-in`}],M=new Set([`baseline`,`low`,`medium`,`high`,`unspecified`]);function N(e){return e.replace(/^(?:"([\s\S]*)"|'([\s\S]*)')$/,`$1$2`)}function P(e,t){if(t===`true`)return!0;if(t===`false`)return!1;throw Error(`${e}: expected boolean, received "${t}"`)}function F(e,t){let n=t.split(`
|
|
5
|
-
`);if(n[0]?.trim()!==`---`)throw Error(`frontmatter: expected an opening --- marker`);let r={},i=-1;for(let e=1;e<n.length;e+=1){let t=n[e];if(t.trim()===`---`){i=e;break}if(t.trim()===``)continue;let a=/^([a-z][a-z0-9-]*):\s*(
|
|
5
|
+
`);if(n[0]?.trim()!==`---`)throw Error(`frontmatter: expected an opening --- marker`);let r={},i=-1;for(let e=1;e<n.length;e+=1){let t=n[e];if(t.trim()===`---`){i=e;break}if(t.trim()===``)continue;let a=/^([a-z][a-z0-9-]*):\s*(\S[^\n\r\u2028\u2029]*)?$/.exec(t);if(!a)throw Error(`frontmatter: invalid entry at line ${e+1}`);let o=a[1];if(r[o]!==void 0)throw Error(`frontmatter.${o}: duplicate field`);r[o]=N((a[2]??``).trim())}if(i<0)throw Error(`frontmatter: expected a closing --- marker`);let a=Object.keys(r).filter(e=>![`name`,`description`,`keep-coding-instructions`,`token-cost`].includes(e));if(a.length>0)throw Error(`frontmatter.${a[0]}: unknown field`);return{values:r,instructions:n.slice(i+1).join(`
|
|
6
6
|
`).trim()}}function I(e){let t=r(e,i(e)).trim();if(!/^[a-z0-9][a-z0-9-]*$/i.test(t))throw Error(`id: expected the Markdown filename stem to be a slug, received "${t}"`);return t.toLowerCase()}function L(e,t){if(!e.fileName.endsWith(`.md`))throw Error(`file: expected a .md output-style file`);let n=I(e.fileName),i=F(e.fileName,e.content),a=i.values.name?.trim()||r(e.fileName,`.md`),o=i.values.description?.trim()||`Custom output style: ${a}`,s=i.values[`keep-coding-instructions`]!==void 0&&P(`frontmatter.keep-coding-instructions`,i.values[`keep-coding-instructions`]),c=i.values[`token-cost`]??`unspecified`;if(!M.has(c))throw Error(`frontmatter.token-cost: expected baseline|low|medium|high|unspecified, received "${c}"`);if(i.instructions.length===0)throw Error(`body: expected non-empty style instructions`);return{id:n,name:a,description:o,instructions:i.instructions,keepCodingInstructions:s,tokenCost:c,source:t}}function R(e){return{id:e.id,name:e.name,description:e.description,tokenCost:e.tokenCost,source:e.source}}function z(e){let t=new Map,n=[];for(let e of j)t.set(e.id,e);let r=[...e].sort((e,t)=>e.precedence-t.precedence);for(let e of r){let r=new Set;for(let i of[...e.files].sort((e,t)=>e.fileName.localeCompare(t.fileName))){let a=`${e.displayName}/${i.fileName}`,o;try{o=L(i,e.scope)}catch(e){n.push({file:a,error:e instanceof Error?e.message:String(e)});continue}if(r.has(o.id)){n.push({file:a,error:`duplicate style id "${o.id}" in source`});continue}if(r.add(o.id),t.get(o.id)?.source===`built-in`){n.push({file:a,error:`style id "${o.id}" collides with a built-in`});continue}t.set(o.id,o)}}return{styles:[...t.values()],loaded:[...t.values()].filter(e=>e.source!==`built-in`).map(e=>e.id),errors:n}}function B(e=[]){let t=z(e),n=new Map(t.styles.map(e=>[e.id,e]));return{listOutputStyles:()=>t.styles.map(R),getOutputStyle:e=>n.get(e)}}export{c as autonomousBuilderPreset,j as builtInOutputStyles,B as createOutputStyleRegistry,y as createPresetRegistry,s as defaultPreset,A as loadExternalPresetsFromDir,z as loadOutputStylesFromSources,L as parseOutputStyleFile,p as partitionExternalPresets,k as validateExternalPreset};
|
|
7
7
|
//# sourceMappingURL=index.js.map
|
package/dist/node/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/presets/default.ts","../../src/presets/autonomous-builder.ts","../../src/presets/careful-reviewer.ts","../../src/presets/neutral-executor.ts","../../src/resolve-preset.ts","../../src/preset-validation.ts","../../src/load-external-presets.ts","../../src/output-styles.ts","../../src/output-style-registry.ts"],"sourcesContent":["import type { IPreset } from '../preset-types.js';\n\n/**\n * The neutral baseline preset. It carries NO option overrides so that resolving it is a\n * pure no-op — applying `default` reproduces the standard agent behaviour exactly (no regression).\n * The default agent identity is chosen by the product shell, not here,\n * so that this preset stays a true identity element under merging.\n */\nexport const defaultPreset: IPreset = {\n id: 'default',\n title: 'Default',\n description: 'Neutral baseline preset — no overrides; reproduces the standard agent behaviour.',\n};\n","import type { IPreset } from '../preset-types.js';\n\n/**\n * Portable behavioural principles for the autonomous-builder persona.\n *\n * Authored in our own English wording (paraphrase, not a verbatim copy of any external prompt)\n * and scoped to the PERSONA layer only. It carries no runtime/environment content — working\n * directory, tool schemas, product identity, dates, and permission text remain the framework\n * RUNTIME layer's responsibility (composed after this block by `buildSystemPrompt`).\n */\nconst AUTONOMOUS_BUILDER_PERSONA = [\n 'You are a proactive, high-autonomy builder. When you have enough to proceed, proceed and',\n 'complete the task — act rather than stop to ask. Keep going through the points where a more',\n 'hesitant assistant would pause for confirmation, and only check in when something is genuinely',\n 'ambiguous or risky.',\n '',\n 'Stay inside the scope of the task. Do the simplest thing that works; do not refactor, add',\n 'abstractions, or expand scope beyond what was asked. Handle the adjacent detail that the task',\n 'plainly needs, but resist turning a focused change into a sweeping one.',\n '',\n 'After making changes, verify your own work — run the tests, re-read the goal, and confirm the',\n 'result actually matches what was requested before you call it done.',\n '',\n 'Ground your claims in evidence. Before reporting progress, check each claim against an actual',\n 'tool result from this session; if something is not yet verified, say so plainly rather than',\n 'implying it is finished.',\n '',\n 'Be warm and honest without being sycophantic — tell people what is useful, not just what they',\n 'want to hear. Stay even-handed and let your conclusions follow from the evidence. When you get',\n 'something wrong, own it directly, correct it, and move on.',\n '',\n 'Lead with the outcome. Report results plainly instead of narrating each step, keep formatting',\n 'light, and stay concise.',\n].join('\\n');\n\n/**\n * The first opinionated built-in preset: an autonomous, self-verifying builder posture.\n *\n * It both ships a portable persona block AND sets the framework/executor mechanism flags\n * (`effort`, `autonomy`, `enableParallelSubagents`, `selfVerification`) so the style is backed\n * by real, observable behaviour rather than persona text alone. The identifier is generic; the\n * sourcing footnote in `description` is the only place a work-style attribution appears.\n *\n * For long-running tasks the effort dial may be raised to a higher tier; `'high'` is the\n * neutral default carried here.\n */\nexport const autonomousBuilderPreset: IPreset = {\n id: 'autonomous-builder',\n title: 'Autonomous Builder',\n description:\n 'Proactive, self-verifying builder posture — high effort, acts first, dispatches parallel ' +\n 'subagents (proactive autonomous-builder persona; original English wording).',\n effort: 'high',\n autonomy: 'act-first',\n enableParallelSubagents: true,\n selfVerification: true,\n persona: AUTONOMOUS_BUILDER_PERSONA,\n};\n","import type { IPreset } from '../preset-types.js';\n\n/**\n * Portable behavioural principles for the careful-reviewer persona.\n *\n * Authored in our own English wording (paraphrase, not a verbatim copy of any external prompt)\n * and scoped to the PERSONA layer only. It carries no runtime/environment content — working\n * directory, tool schemas, product identity, dates, and permission text remain the framework\n * RUNTIME layer's responsibility (composed after this block by `buildSystemPrompt`).\n *\n * The block stays light: a few oriented traits plus a guiding posture, with no stacked emphasis\n * words and no instruction to surface raw reasoning.\n */\nconst CAREFUL_REVIEWER_PERSONA = [\n 'You are a careful, review-oriented assistant. Read and analyse before you change anything —',\n 'understand the surrounding code and context first, then lay out a short plan for the change and',\n 'wait for confirmation before you write or run things that have side effects.',\n '',\n 'When you propose a change, explain why — the reasoning behind it and the trade-offs against the',\n 'alternatives you considered, so the choice can be reviewed rather than taken on trust.',\n '',\n 'Stay conservative in scope. Make the change that was asked for and the detail it plainly needs;',\n 'do not widen the blast radius with unrequested refactors or rewrites.',\n '',\n 'Ground your claims in evidence. Before reporting progress or completion, check each claim against',\n 'an actual tool result from this session; if something is not yet verified, say so plainly rather',\n 'than implying it is done.',\n '',\n 'Be warm and honest without being sycophantic — tell people what is useful, not just what they',\n 'want to hear. Stay even-handed and let your conclusions follow from the evidence. When you get',\n 'something wrong, own it directly, correct it, and move on.',\n].join('\\n');\n\n/**\n * An opinionated built-in preset: a conservative, ask-first reviewing posture.\n *\n * It is the deliberate counterpart to `autonomous-builder` on the autonomy axis. It both ships a\n * portable persona block AND sets the framework/executor mechanism flags so the review style is\n * backed by real, observable behaviour rather than persona text alone:\n *\n * - `autonomy: 'ask-first'` → PRESET-004 maps this onto the ask-on-write permission posture, so\n * writes/exec are prompted rather than auto-accepted.\n * - `selfVerification: true` → the framework/executor verifier loop runs before changes settle.\n * - `enableParallelSubagents: false` → focused analysis, not fan-out.\n * - `effort: 'high'` → deep reading/analysis of code and context before acting.\n *\n * The identifier is generic; no work-style attribution appears in the source.\n */\nexport const carefulReviewerPreset: IPreset = {\n id: 'careful-reviewer',\n title: 'Careful Reviewer',\n description:\n 'Conservative, ask-first reviewing posture — reads and plans before changing, prompts on ' +\n 'write/exec, self-verifies, runs focused (no parallel subagents) at high effort.',\n effort: 'high',\n autonomy: 'ask-first',\n enableParallelSubagents: false,\n selfVerification: true,\n persona: CAREFUL_REVIEWER_PERSONA,\n};\n","import type { IPreset } from '../preset-types.js';\n\n/**\n * Portable behavioural principles for the neutral-executor persona — a thin, steerable posture.\n *\n * Authored in our own English wording (paraphrase, not a verbatim copy of any external prompt)\n * and scoped to the PERSONA layer only. It carries no runtime/environment content — working\n * directory, tool schemas, product identity, dates, and permission text remain the framework\n * RUNTIME layer's responsibility (composed after this block by `buildSystemPrompt`).\n *\n * The block is intentionally minimal: follow instructions literally, editorialise little, stay in\n * scope, output tersely. No stacked emphasis words; no instruction to surface raw reasoning.\n */\nconst NEUTRAL_EXECUTOR_PERSONA = [\n 'Follow the system and user instructions literally. Do what was asked, the way it was asked, and',\n 'defer to the given instructions over your own preferences.',\n '',\n 'Editorialise as little as possible. Skip unrequested commentary, caveats, and asides — give the',\n 'result, not a narration of it.',\n '',\n 'Stay strictly in scope. Make only the change that was requested and the detail it plainly needs;',\n 'do not add adjacent refactors, comments, or features that were not asked for.',\n '',\n 'Keep output terse. Prefer the shortest response that fully answers, so the result is predictable',\n 'and easy to consume in a script or pipeline.',\n].join('\\n');\n\n/**\n * A thin, steerable built-in preset: a minimal-opinion executor that follows instructions\n * literally and keeps output predictable for automation/scripting.\n *\n * Unlike `default` (which pins behaviour in no direction), this preset actively pins a terse,\n * literal posture, AND it sets framework/executor mechanism flags so the thinness is observable\n * rather than persona text alone:\n *\n * - `autonomy: 'balanced'` → neither prompts on every write nor acts aggressively (PRESET-004\n * maps it onto the standard permission posture).\n * - `enableParallelSubagents: false` and `selfVerification: false` → minimal machinery, predictable.\n * - `effort: 'medium'` → predictable, reproducible output for scripted use.\n *\n * The identifier is generic; any work-style attribution is confined to `description`.\n */\nexport const neutralExecutorPreset: IPreset = {\n id: 'neutral-executor',\n title: 'Neutral Executor',\n description:\n 'Thin, steerable executor — follows instructions literally, minimal editorialising, strict ' +\n 'scope, terse output; balanced autonomy, no parallel subagents, no self-verification, medium ' +\n 'effort for predictable scripted use (neutral-alignment work-style; original English wording).',\n effort: 'medium',\n autonomy: 'balanced',\n enableParallelSubagents: false,\n selfVerification: false,\n persona: NEUTRAL_EXECUTOR_PERSONA,\n};\n","import { autonomousBuilderPreset } from './presets/autonomous-builder.js';\nimport { carefulReviewerPreset } from './presets/careful-reviewer.js';\nimport { defaultPreset } from './presets/default.js';\nimport { neutralExecutorPreset } from './presets/neutral-executor.js';\n\nimport type {\n IPreset,\n TPresetAutonomy,\n TPresetPermissionMode,\n IResolvedPresetOptions,\n} from './preset-types.js';\n\n/**\n * Map a behavioural {@link TPresetAutonomy} posture onto a concrete permission mode.\n *\n * `act-first` opts into `acceptEdits` (writes are not prompted every time);\n * `ask-first` and `balanced` stay on `default` (the standard ask-on-write posture).\n * Only consulted when the resolved options set `autonomy` but no explicit\n * `permissionMode`/`defaultPermissionMode`.\n */\nconst AUTONOMY_TO_PERMISSION_MODE: Record<TPresetAutonomy, TPresetPermissionMode> = {\n 'ask-first': 'default',\n balanced: 'default',\n 'act-first': 'acceptEdits',\n};\n\n/** Registry of built-in presets. Built-ins always win on id conflict and cannot be overridden. */\nconst BUILT_IN_PRESETS: readonly IPreset[] = [\n defaultPreset,\n autonomousBuilderPreset,\n carefulReviewerPreset,\n neutralExecutorPreset,\n];\n\n/** Lightweight `{ id, title, description }` view of a preset for discovery/UX. */\nexport interface IPresetSummary {\n id: string;\n title: string;\n description: string;\n}\n\n/** Outcome of {@link partitionExternalPresets}: which presets were accepted and which rejected. */\nexport interface IPresetRegistrationResult {\n accepted: readonly IPreset[];\n rejected: readonly { id: string; reason: string }[];\n}\n\n/**\n * Apply the external-preset conflict policy to one list, reading and mutating NOTHING outside it.\n *\n * Conflict policy: an external preset whose id matches a BUILT-IN preset is rejected\n * (`'collides with built-in preset'`) — built-ins always win. An external preset whose id matches an\n * earlier ACCEPTED external preset is rejected (`'duplicate preset id'`) — first one wins.\n *\n * ARCH-009. This is the whole of what the module-global registry used to be, minus the register:\n * the policy was never the process's to hold, only the list it was applied to was. Both callers —\n * {@link createPresetRegistry} and the external-preset loader — now pass their own list, so two\n * products in one process cannot see each other's presets, and a repeated load cannot accumulate.\n */\nexport function partitionExternalPresets(presets: readonly IPreset[]): IPresetRegistrationResult {\n const builtInIds = new Set(BUILT_IN_PRESETS.map((preset) => preset.id));\n const accepted: IPreset[] = [];\n const rejected: { id: string; reason: string }[] = [];\n\n for (const preset of presets) {\n if (builtInIds.has(preset.id)) {\n rejected.push({ id: preset.id, reason: 'collides with built-in preset' });\n continue;\n }\n if (accepted.some((existing) => existing.id === preset.id)) {\n rejected.push({ id: preset.id, reason: 'duplicate preset id' });\n continue;\n }\n accepted.push(preset);\n }\n\n return { accepted, rejected };\n}\n\n/**\n * Override layers for {@link resolvePreset}, in increasing precedence.\n * `cliOverrides` model CLI flags; `explicit` models programmatic/SDK options.\n */\nexport interface IResolvePresetContext {\n cliOverrides?: IResolvedPresetOptions;\n explicit?: IResolvedPresetOptions;\n}\n\n/** Strip the identity triple from a preset, leaving only resolvable option overrides. */\nfunction toPresetOptions(preset: IPreset): IResolvedPresetOptions {\n const { id: _id, title: _title, description: _description, ...options } = preset;\n return options;\n}\n\n/** Keep only the entries of `source` whose value is defined. */\nfunction definedEntries(source: IResolvedPresetOptions): Partial<IResolvedPresetOptions> {\n return Object.fromEntries(Object.entries(source).filter(([, value]) => value !== undefined));\n}\n\n/**\n * Merge `source` onto `target`, skipping `undefined` values so later layers only override set keys.\n *\n * ARCH-040 Group C (issue #1934): the two tool lists combine differently, and the difference is the\n * decision rather than an implementation detail.\n *\n * - **`allowedTools` REPLACES.** An allowlist is a statement of the COMPLETE permitted set, so a\n * later, more specific layer stating one supersedes the earlier answer. Intersecting would let an\n * earlier layer veto a tool the operator just named, and unioning would let it smuggle one in.\n * - **`deniedTools` UNIONS.** A denial is not weakened by a later layer that forgot to repeat it —\n * forgetting is the common case, and the cost of the two mistakes is not symmetric.\n *\n * This lives HERE, in the resolver, because precedence is the resolver's job: a union applied by one\n * of three shells is a rule the other two disagree with, which is the class ARCH-013 exists over.\n */\nfunction mergeDefined(\n target: IResolvedPresetOptions,\n source: IResolvedPresetOptions | undefined,\n): IResolvedPresetOptions {\n if (!source) {\n return target;\n }\n const merged = { ...target, ...definedEntries(source) };\n return source.deniedTools !== undefined || target.deniedTools !== undefined\n ? { ...merged, deniedTools: unionTools(target.deniedTools, source.deniedTools) }\n : merged;\n}\n\n/** Every denial either layer stated, order preserved and duplicates dropped. */\nfunction unionTools(\n earlier: readonly string[] | undefined,\n later: readonly string[] | undefined,\n): string[] {\n return [...new Set([...(earlier ?? []), ...(later ?? [])])];\n}\n\n/**\n * Pure resolve over an explicit preset list — the core every {@link createPresetRegistry} instance\n * resolves through. Reads only its arguments; performs the precedence merge + permission-mode\n * derivation.\n *\n * Precedence LOW → HIGH: preset options < `context.cliOverrides` < `context.explicit` (later layers\n * win; `undefined` values are skipped). For the no-op `'default'` preset the result equals the\n * merged overrides.\n *\n * @throws Error when `id` does not match a preset in `presets`.\n */\nfunction resolvePresetFrom(\n presets: readonly IPreset[],\n id: string,\n context: IResolvePresetContext = {},\n): IResolvedPresetOptions {\n const preset = presets.find((p) => p.id === id);\n if (!preset) {\n const available = presets.map((p) => p.id).join(', ');\n throw new Error(`Unknown preset: \"${id}\". Available presets: ${available}.`);\n }\n\n let resolved = toPresetOptions(preset);\n resolved = mergeDefined(resolved, context.cliOverrides);\n resolved = mergeDefined(resolved, context.explicit);\n return derivePermissionMode(resolved);\n}\n\n/**\n * A per-call, instance-scoped preset registry (ARCH-005 R8) — since ARCH-009 the ONLY one there is.\n *\n * A registry holds its own merged list `[built-ins, ...accepted externals]`, so two products in one\n * process do not share one and repeat construction does not accumulate. The\n * `@robota-sdk/agent-product` assembler builds one per `assembleProduct` call and surfaces it on the\n * command-host context, which is how `/preset` inside a live session reaches THIS product's presets\n * rather than the process's.\n */\nexport interface IPresetRegistry {\n /** Resolve a preset id against this registry's presets. */\n resolvePreset(id: string, context?: IResolvePresetContext): IResolvedPresetOptions;\n /** Look up a preset by id within this registry, or `undefined`. */\n getPreset(id: string): IPreset | undefined;\n /** `{ id, title, description }` summaries of every preset in this registry. */\n listPresets(): readonly IPresetSummary[];\n}\n\n/**\n * Build an instance-scoped {@link IPresetRegistry} over `[built-ins, ...externalPresets]`.\n *\n * The conflict policy is {@link partitionExternalPresets}, applied to the argument list only: built-ins\n * always win, and among the external presets the first one wins. No module-level state is read or\n * mutated — this is a pure factory, and since ARCH-009 there is no module-level state to read.\n *\n * Called with no argument it is the BUILT-INS, which is the registry a host that supplies none gets.\n */\nexport function createPresetRegistry(externalPresets: readonly IPreset[] = []): IPresetRegistry {\n const merged: readonly IPreset[] = [\n ...BUILT_IN_PRESETS,\n ...partitionExternalPresets(externalPresets).accepted,\n ];\n\n return {\n resolvePreset: (id, context = {}) => resolvePresetFrom(merged, id, context),\n getPreset: (id) => merged.find((preset) => preset.id === id),\n listPresets: () => merged.map(({ id, title, description }) => ({ id, title, description })),\n };\n}\n\n/**\n * Fill the framework `permissionMode` seam from the preset's posture fields when it\n * is not already set. Precedence: explicit `permissionMode` (untouched) >\n * `defaultPermissionMode` > `autonomy` mapping. A no-op preset (no posture fields)\n * leaves the object unchanged — keeping `resolvePreset('default')` a no-op.\n */\nfunction derivePermissionMode(resolved: IResolvedPresetOptions): IResolvedPresetOptions {\n if (resolved.permissionMode !== undefined) {\n return resolved;\n }\n if (resolved.defaultPermissionMode !== undefined) {\n return { ...resolved, permissionMode: resolved.defaultPermissionMode };\n }\n if (resolved.autonomy !== undefined) {\n return { ...resolved, permissionMode: AUTONOMY_TO_PERMISSION_MODE[resolved.autonomy] };\n }\n return resolved;\n}\n","import { parseModelEffort } from '@robota-sdk/agent-framework';\n\nimport type {\n IPreset,\n TPresetAutonomy,\n TPresetPermissionMode,\n IResolvedPresetOptions,\n} from './preset-types.js';\n\n/** Result of {@link validateExternalPreset}: the validated preset, or a single error message. */\nexport type TPresetValidationResult = { ok: true; preset: IPreset } | { ok: false; error: string };\n\n/** Runtime membership list for {@link TPresetAutonomy}. */\nconst AUTONOMY_VALUES: readonly TPresetAutonomy[] = ['ask-first', 'act-first', 'balanced'];\n\n/** Runtime membership list for {@link TPresetPermissionMode}. */\nconst PERMISSION_MODE_VALUES: readonly TPresetPermissionMode[] = [\n 'plan',\n 'default',\n 'acceptEdits',\n 'bypassPermissions',\n];\n\n/** Narrowing guard: `value` is a non-null, non-array object. */\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Narrowing guard: `value` is an array whose every element is a string. */\nfunction isStringArray(value: unknown): value is string[] {\n return Array.isArray(value) && value.every((item) => typeof item === 'string');\n}\n\n/** Validate the string-typed optional fields onto `options`; return the first error, if any. */\nfunction validateStringFields(\n value: Record<string, unknown>,\n options: IResolvedPresetOptions,\n): string | undefined {\n const fields: readonly [string, unknown, (v: string) => void][] = [\n ['persona', value.persona, (v) => (options.persona = v)],\n ['systemPrompt', value.systemPrompt, (v) => (options.systemPrompt = v)],\n ['appendSystemPrompt', value.appendSystemPrompt, (v) => (options.appendSystemPrompt = v)],\n ['agentName', value.agentName, (v) => (options.agentName = v)],\n ['model', value.model, (v) => (options.model = v)],\n ['language', value.language, (v) => (options.language = v)],\n ];\n for (const [field, raw, assign] of fields) {\n if (raw === undefined) {\n continue;\n }\n if (typeof raw !== 'string') {\n return `${field}: expected a string`;\n }\n assign(raw);\n }\n return undefined;\n}\n\n/** Validate the number- and boolean-typed optional fields onto `options`; return the first error. */\nfunction validateScalarFields(\n value: Record<string, unknown>,\n options: IResolvedPresetOptions,\n): string | undefined {\n const numbers: readonly [string, unknown, (v: number) => void][] = [\n ['temperature', value.temperature, (v) => (options.temperature = v)],\n ['maxOutputTokens', value.maxOutputTokens, (v) => (options.maxOutputTokens = v)],\n ];\n for (const [field, raw, assign] of numbers) {\n if (raw === undefined) {\n continue;\n }\n if (typeof raw !== 'number' || Number.isNaN(raw)) {\n return `${field}: expected a number`;\n }\n assign(raw);\n }\n\n const booleans: readonly [string, unknown, (v: boolean) => void][] = [\n [\n 'enableParallelSubagents',\n value.enableParallelSubagents,\n (v) => (options.enableParallelSubagents = v),\n ],\n ['selfVerification', value.selfVerification, (v) => (options.selfVerification = v)],\n ];\n for (const [field, raw, assign] of booleans) {\n if (raw === undefined) {\n continue;\n }\n if (typeof raw !== 'boolean') {\n return `${field}: expected a boolean`;\n }\n assign(raw);\n }\n return undefined;\n}\n\n/** Validate the enum-typed optional fields onto `options`; return the first error, if any. */\nfunction validateEnumFields(\n value: Record<string, unknown>,\n options: IResolvedPresetOptions,\n): string | undefined {\n if (value.effort !== undefined) {\n if (typeof value.effort !== 'string') {\n return 'effort: expected a string';\n }\n try {\n const effort = parseModelEffort(value.effort, 'effort');\n if (effort === undefined) {\n return 'effort: expected a Core-owned effort selection';\n }\n options.effort = effort;\n } catch (error) {\n return `effort: ${error instanceof Error ? error.message : String(error)}`;\n }\n }\n\n if (value.autonomy !== undefined) {\n if (!AUTONOMY_VALUES.includes(value.autonomy as TPresetAutonomy)) {\n return `autonomy: expected one of ${AUTONOMY_VALUES.join(', ')}`;\n }\n options.autonomy = value.autonomy as TPresetAutonomy;\n }\n\n const modes: readonly [string, unknown, (v: TPresetPermissionMode) => void][] = [\n ['permissionMode', value.permissionMode, (v) => (options.permissionMode = v)],\n [\n 'defaultPermissionMode',\n value.defaultPermissionMode,\n (v) => (options.defaultPermissionMode = v),\n ],\n ];\n for (const [field, raw, assign] of modes) {\n if (raw === undefined) {\n continue;\n }\n if (!PERMISSION_MODE_VALUES.includes(raw as TPresetPermissionMode)) {\n return `${field}: expected one of ${PERMISSION_MODE_VALUES.join(', ')}`;\n }\n assign(raw as TPresetPermissionMode);\n }\n\n return undefined;\n}\n\n/** Validate the string-array optional fields onto `options`; return the first error, if any. */\nfunction validateArrayFields(\n value: Record<string, unknown>,\n options: IResolvedPresetOptions,\n): string | undefined {\n const arrays: readonly [string, unknown, (v: readonly string[]) => void][] = [\n ['allowedTools', value.allowedTools, (v) => (options.allowedTools = v)],\n ['deniedTools', value.deniedTools, (v) => (options.deniedTools = v)],\n [\n 'enabledCommandModules',\n value.enabledCommandModules,\n (v) => (options.enabledCommandModules = v),\n ],\n [\n 'disabledCommandModules',\n value.disabledCommandModules,\n (v) => (options.disabledCommandModules = v),\n ],\n ];\n for (const [field, raw, assign] of arrays) {\n if (raw === undefined) {\n continue;\n }\n if (!isStringArray(raw)) {\n return `${field}: expected an array of strings`;\n }\n assign(raw);\n }\n return undefined;\n}\n\n/**\n * Manually validate an unknown value as an {@link IPreset} (no schema library).\n *\n * Required fields: non-empty `id`, `title`, `description` strings. Every other field is\n * optional and is validated only when present; an unrecognised field is dropped (the built\n * preset carries the recognised fields only, never unknown keys). On the first failed check\n * returns `{ ok: false, error: '<field>: <reason>' }`.\n */\nexport function validateExternalPreset(value: unknown): TPresetValidationResult {\n if (!isPlainObject(value)) {\n return { ok: false, error: 'preset: expected a non-null object' };\n }\n\n const requiredStrings: readonly ['id' | 'title' | 'description', unknown][] = [\n ['id', value.id],\n ['title', value.title],\n ['description', value.description],\n ];\n for (const [field, raw] of requiredStrings) {\n if (typeof raw !== 'string' || raw.length === 0) {\n return { ok: false, error: `${field}: expected a non-empty string` };\n }\n }\n\n // Accumulate recognised optional fields here, then spread onto the identity triple so the\n // built preset never carries unknown keys.\n const options: IResolvedPresetOptions = {};\n const error =\n validateStringFields(value, options) ??\n validateScalarFields(value, options) ??\n validateEnumFields(value, options) ??\n validateArrayFields(value, options);\n if (error !== undefined) {\n return { ok: false, error };\n }\n\n const preset: IPreset = {\n id: value.id as string,\n title: value.title as string,\n description: value.description as string,\n ...options,\n };\n return { ok: true, preset };\n}\n","import { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { join } from 'node:path';\n\nimport { validateExternalPreset } from './preset-validation.js';\nimport { partitionExternalPresets } from './resolve-preset.js';\n\nimport type { IPreset } from './preset-types.js';\n\n/**\n * Outcome of an external-preset load: the presets themselves, their ids, and per-file errors.\n *\n * ARCH-009 added `presets`. `loaded` used to be the only way out, because the presets went into a\n * module-global registry and the caller read them back by id — which is what made the global\n * load-bearing at startup. The caller now receives the values it loaded and builds its own registry\n * over them, so nothing has to be looked up from process state.\n */\nexport interface IExternalPresetLoadResult {\n presets: readonly IPreset[];\n loaded: readonly string[];\n errors: readonly { file: string; error: string }[];\n}\n\n/**\n * Load and validate every `*.json` external preset from `dir`.\n *\n * A missing directory yields an empty result (no error). Each file is JSON-parsed and validated;\n * a parse or validation failure is recorded as a per-file error and skipped — the remaining files\n * still load. The surviving presets go through {@link partitionExternalPresets}, whose rejections\n * (built-in id collision or duplicate id) are folded into `errors` against their file.\n *\n * Loading REGISTERS NOTHING. The result is a value the caller owns.\n */\nexport function loadExternalPresetsFromDir(dir: string): IExternalPresetLoadResult {\n if (!existsSync(dir)) {\n return { presets: [], loaded: [], errors: [] };\n }\n\n const errors: { file: string; error: string }[] = [];\n const validPresets: IPreset[] = [];\n // Track which file each validated preset id came from so registry rejections map back to a file.\n const fileById = new Map<string, string>();\n\n const jsonFiles = readdirSync(dir).filter((name) => name.endsWith('.json'));\n for (const name of jsonFiles) {\n const filePath = join(dir, name);\n let parsed: unknown;\n try {\n parsed = JSON.parse(readFileSync(filePath, 'utf8'));\n } catch (error) {\n // allow-fallback: a malformed file is reported per-file and skipped, not silently swallowed\n errors.push({ file: name, error: error instanceof Error ? error.message : String(error) });\n continue;\n }\n\n const result = validateExternalPreset(parsed);\n if (!result.ok) {\n errors.push({ file: name, error: result.error });\n continue;\n }\n\n validPresets.push(result.preset);\n fileById.set(result.preset.id, name);\n }\n\n const { accepted, rejected } = partitionExternalPresets(validPresets);\n for (const rejection of rejected) {\n errors.push({ file: fileById.get(rejection.id) ?? rejection.id, error: rejection.reason });\n }\n\n return { presets: accepted, loaded: accepted.map((preset) => preset.id), errors };\n}\n","import type { IOutputStyle } from './output-style-types.js';\n\nconst DEFAULT_INSTRUCTIONS = '';\n\nexport const builtInOutputStyles: readonly IOutputStyle[] = [\n {\n id: 'default',\n name: 'Default',\n description: 'The ordinary response style.',\n instructions: DEFAULT_INSTRUCTIONS,\n keepCodingInstructions: true,\n tokenCost: 'baseline',\n source: 'built-in',\n },\n {\n id: 'concise',\n name: 'Concise',\n description: 'Lead with the result and keep routine responses short.',\n instructions:\n 'Lead with the answer and skip routine preamble or tool narration. Keep responses concise while doing the same engineering work. Expand fully when asked for detail. Always keep error reports, security warnings and destructive-action confirmations complete.',\n keepCodingInstructions: true,\n tokenCost: 'low',\n source: 'built-in',\n },\n {\n id: 'proactive',\n name: 'Proactive',\n description: 'Take the next reasonable step without pausing on routine choices.',\n instructions:\n 'Act on reasonable routine assumptions and take the next useful step. State assumptions when they matter. The active permission mode remains authoritative; this style never grants, changes, or bypasses permission.',\n keepCodingInstructions: true,\n tokenCost: 'medium',\n source: 'built-in',\n },\n {\n id: 'explanatory',\n name: 'Explanatory',\n description: 'Teach the reasoning and trade-offs behind the answer.',\n instructions:\n 'Explain the reasoning, important trade-offs, and relevant terminology as you work. Keep the explanation connected to the requested outcome and do not omit complete error, security, or destructive-action guidance.',\n keepCodingInstructions: true,\n tokenCost: 'high',\n source: 'built-in',\n },\n {\n id: 'learning',\n name: 'Learning',\n description: 'Teach by marking useful gaps for the human to fill.',\n instructions:\n 'Teach the requested subject step by step. Mark a small number of useful gaps with [Your turn:] and invite the human to fill them before revealing the explanation. Never turn safety, security, error, or destructive-action guidance into a gap.',\n keepCodingInstructions: true,\n tokenCost: 'high',\n source: 'built-in',\n },\n];\n","import { basename, extname } from 'node:path';\n\nimport { builtInOutputStyles } from './output-styles.js';\n\nimport type {\n IOutputStyle,\n IOutputStyleFile,\n IOutputStyleLoadResult,\n IOutputStyleRegistry,\n IOutputStyleSource,\n IOutputStyleSummary,\n TOutputStyleSource,\n TOutputStyleTokenCost,\n} from './output-style-types.js';\n\nexport { builtInOutputStyles } from './output-styles.js';\n\nconst TOKEN_COSTS = new Set<TOutputStyleTokenCost>([\n 'baseline',\n 'low',\n 'medium',\n 'high',\n 'unspecified',\n]);\n\nfunction stripScalarQuotes(value: string): string {\n return value.replace(/^(?:\"([\\s\\S]*)\"|'([\\s\\S]*)')$/, '$1$2');\n}\n\nfunction parseBoolean(field: string, raw: string): boolean {\n if (raw === 'true') return true;\n if (raw === 'false') return false;\n throw new Error(`${field}: expected boolean, received \"${raw}\"`);\n}\n\nfunction parseFrontmatter(\n fileName: string,\n content: string,\n): { values: Record<string, string>; instructions: string } {\n const lines = content.split('\\n');\n if (lines[0]?.trim() !== '---') {\n throw new Error('frontmatter: expected an opening --- marker');\n }\n const values: Record<string, string> = {};\n let end = -1;\n for (let index = 1; index < lines.length; index += 1) {\n const line = lines[index]!;\n if (line.trim() === '---') {\n end = index;\n break;\n }\n if (line.trim() === '') continue;\n const match = /^([a-z][a-z0-9-]*):\\s*(.*)$/.exec(line);\n if (!match) throw new Error(`frontmatter: invalid entry at line ${index + 1}`);\n const key = match[1]!;\n if (values[key] !== undefined) throw new Error(`frontmatter.${key}: duplicate field`);\n values[key] = stripScalarQuotes(match[2]!.trim());\n }\n if (end < 0) throw new Error('frontmatter: expected a closing --- marker');\n const unknown = Object.keys(values).filter(\n (key) => !['name', 'description', 'keep-coding-instructions', 'token-cost'].includes(key),\n );\n if (unknown.length > 0) {\n throw new Error(`frontmatter.${unknown[0]}: unknown field`);\n }\n return {\n values,\n instructions: lines\n .slice(end + 1)\n .join('\\n')\n .trim(),\n };\n}\n\nfunction fileId(fileName: string): string {\n const id = basename(fileName, extname(fileName)).trim();\n if (!/^[a-z0-9][a-z0-9-]*$/i.test(id)) {\n throw new Error(`id: expected the Markdown filename stem to be a slug, received \"${id}\"`);\n }\n return id.toLowerCase();\n}\n\nexport function parseOutputStyleFile(\n file: IOutputStyleFile,\n source: TOutputStyleSource,\n): IOutputStyle {\n if (!file.fileName.endsWith('.md')) {\n throw new Error('file: expected a .md output-style file');\n }\n const id = fileId(file.fileName);\n const parsed = parseFrontmatter(file.fileName, file.content);\n const name = parsed.values.name?.trim() || basename(file.fileName, '.md');\n const description = parsed.values.description?.trim() || `Custom output style: ${name}`;\n const keepCodingInstructions =\n parsed.values['keep-coding-instructions'] === undefined\n ? false\n : parseBoolean(\n 'frontmatter.keep-coding-instructions',\n parsed.values['keep-coding-instructions'],\n );\n const tokenCost = parsed.values['token-cost'] ?? 'unspecified';\n if (!TOKEN_COSTS.has(tokenCost as TOutputStyleTokenCost)) {\n throw new Error(\n `frontmatter.token-cost: expected baseline|low|medium|high|unspecified, received \"${tokenCost}\"`,\n );\n }\n if (parsed.instructions.length === 0) {\n throw new Error('body: expected non-empty style instructions');\n }\n return {\n id,\n name,\n description,\n instructions: parsed.instructions,\n keepCodingInstructions,\n tokenCost: tokenCost as TOutputStyleTokenCost,\n source,\n };\n}\n\nfunction summarize(style: IOutputStyle): IOutputStyleSummary {\n return {\n id: style.id,\n name: style.name,\n description: style.description,\n tokenCost: style.tokenCost,\n source: style.source,\n };\n}\n\nexport function loadOutputStylesFromSources(\n sources: readonly IOutputStyleSource[],\n): IOutputStyleLoadResult {\n const styles = new Map<string, IOutputStyle>();\n const errors: { file: string; error: string }[] = [];\n for (const style of builtInOutputStyles) styles.set(style.id, style);\n\n const orderedSources = [...sources].sort((a, b) => a.precedence - b.precedence);\n for (const source of orderedSources) {\n const seenInSource = new Set<string>();\n for (const file of [...source.files].sort((a, b) => a.fileName.localeCompare(b.fileName))) {\n const displayFile = `${source.displayName}/${file.fileName}`;\n let style: IOutputStyle;\n try {\n style = parseOutputStyleFile(file, source.scope);\n } catch (error) {\n errors.push({\n file: displayFile,\n error: error instanceof Error ? error.message : String(error),\n });\n continue;\n }\n if (seenInSource.has(style.id)) {\n errors.push({ file: displayFile, error: `duplicate style id \"${style.id}\" in source` });\n continue;\n }\n seenInSource.add(style.id);\n if (styles.get(style.id)?.source === 'built-in') {\n errors.push({\n file: displayFile,\n error: `style id \"${style.id}\" collides with a built-in`,\n });\n continue;\n }\n styles.set(style.id, style);\n }\n }\n return {\n styles: [...styles.values()],\n loaded: [...styles.values()]\n .filter((style) => style.source !== 'built-in')\n .map((style) => style.id),\n errors,\n };\n}\n\nexport function createOutputStyleRegistry(\n sources: readonly IOutputStyleSource[] = [],\n): IOutputStyleRegistry {\n const loaded = loadOutputStylesFromSources(sources);\n const byId = new Map(loaded.styles.map((style) => [style.id, style]));\n return {\n listOutputStyles: () => loaded.styles.map(summarize),\n getOutputStyle: (id: string) => byId.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O,OAAO,CAAC,CAAC,CACzB,OAAQ,GAAU,EAAM,SAAW,UAAU,CAAC,CAC9C,IAAK,GAAU,EAAM,EAAE,EAC1B,QACF,CACF,CAEA,SAAgB,EACd,EAAyC,CAAC,EACpB,CACtB,IAAM,EAAS,EAA4B,CAAO,EAC5C,EAAO,IAAI,IAAI,EAAO,OAAO,IAAK,GAAU,CAAC,EAAM,GAAI,CAAK,CAAC,CAAC,EACpE,MAAO,CACL,qBAAwB,EAAO,OAAO,IAAI,CAAS,EACnD,eAAiB,GAAe,EAAK,IAAI,CAAE,CAC7C,CACF"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/presets/default.ts","../../src/presets/autonomous-builder.ts","../../src/presets/careful-reviewer.ts","../../src/presets/neutral-executor.ts","../../src/resolve-preset.ts","../../src/preset-validation.ts","../../src/load-external-presets.ts","../../src/output-styles.ts","../../src/output-style-registry.ts"],"sourcesContent":["import type { IPreset } from '../preset-types.js';\n\n/**\n * The neutral baseline preset. It carries NO option overrides so that resolving it is a\n * pure no-op — applying `default` reproduces the standard agent behaviour exactly (no regression).\n * The default agent identity is chosen by the product shell, not here,\n * so that this preset stays a true identity element under merging.\n */\nexport const defaultPreset: IPreset = {\n id: 'default',\n title: 'Default',\n description: 'Neutral baseline preset — no overrides; reproduces the standard agent behaviour.',\n};\n","import type { IPreset } from '../preset-types.js';\n\n/**\n * Portable behavioural principles for the autonomous-builder persona.\n *\n * Authored in our own English wording (paraphrase, not a verbatim copy of any external prompt)\n * and scoped to the PERSONA layer only. It carries no runtime/environment content — working\n * directory, tool schemas, product identity, dates, and permission text remain the framework\n * RUNTIME layer's responsibility (composed after this block by `buildSystemPrompt`).\n */\nconst AUTONOMOUS_BUILDER_PERSONA = [\n 'You are a proactive, high-autonomy builder. When you have enough to proceed, proceed and',\n 'complete the task — act rather than stop to ask. Keep going through the points where a more',\n 'hesitant assistant would pause for confirmation, and only check in when something is genuinely',\n 'ambiguous or risky.',\n '',\n 'Stay inside the scope of the task. Do the simplest thing that works; do not refactor, add',\n 'abstractions, or expand scope beyond what was asked. Handle the adjacent detail that the task',\n 'plainly needs, but resist turning a focused change into a sweeping one.',\n '',\n 'After making changes, verify your own work — run the tests, re-read the goal, and confirm the',\n 'result actually matches what was requested before you call it done.',\n '',\n 'Ground your claims in evidence. Before reporting progress, check each claim against an actual',\n 'tool result from this session; if something is not yet verified, say so plainly rather than',\n 'implying it is finished.',\n '',\n 'Be warm and honest without being sycophantic — tell people what is useful, not just what they',\n 'want to hear. Stay even-handed and let your conclusions follow from the evidence. When you get',\n 'something wrong, own it directly, correct it, and move on.',\n '',\n 'Lead with the outcome. Report results plainly instead of narrating each step, keep formatting',\n 'light, and stay concise.',\n].join('\\n');\n\n/**\n * The first opinionated built-in preset: an autonomous, self-verifying builder posture.\n *\n * It both ships a portable persona block AND sets the framework/executor mechanism flags\n * (`effort`, `autonomy`, `enableParallelSubagents`, `selfVerification`) so the style is backed\n * by real, observable behaviour rather than persona text alone. The identifier is generic; the\n * sourcing footnote in `description` is the only place a work-style attribution appears.\n *\n * For long-running tasks the effort dial may be raised to a higher tier; `'high'` is the\n * neutral default carried here.\n */\nexport const autonomousBuilderPreset: IPreset = {\n id: 'autonomous-builder',\n title: 'Autonomous Builder',\n description:\n 'Proactive, self-verifying builder posture — high effort, acts first, dispatches parallel ' +\n 'subagents (proactive autonomous-builder persona; original English wording).',\n effort: 'high',\n autonomy: 'act-first',\n enableParallelSubagents: true,\n selfVerification: true,\n persona: AUTONOMOUS_BUILDER_PERSONA,\n};\n","import type { IPreset } from '../preset-types.js';\n\n/**\n * Portable behavioural principles for the careful-reviewer persona.\n *\n * Authored in our own English wording (paraphrase, not a verbatim copy of any external prompt)\n * and scoped to the PERSONA layer only. It carries no runtime/environment content — working\n * directory, tool schemas, product identity, dates, and permission text remain the framework\n * RUNTIME layer's responsibility (composed after this block by `buildSystemPrompt`).\n *\n * The block stays light: a few oriented traits plus a guiding posture, with no stacked emphasis\n * words and no instruction to surface raw reasoning.\n */\nconst CAREFUL_REVIEWER_PERSONA = [\n 'You are a careful, review-oriented assistant. Read and analyse before you change anything —',\n 'understand the surrounding code and context first, then lay out a short plan for the change and',\n 'wait for confirmation before you write or run things that have side effects.',\n '',\n 'When you propose a change, explain why — the reasoning behind it and the trade-offs against the',\n 'alternatives you considered, so the choice can be reviewed rather than taken on trust.',\n '',\n 'Stay conservative in scope. Make the change that was asked for and the detail it plainly needs;',\n 'do not widen the blast radius with unrequested refactors or rewrites.',\n '',\n 'Ground your claims in evidence. Before reporting progress or completion, check each claim against',\n 'an actual tool result from this session; if something is not yet verified, say so plainly rather',\n 'than implying it is done.',\n '',\n 'Be warm and honest without being sycophantic — tell people what is useful, not just what they',\n 'want to hear. Stay even-handed and let your conclusions follow from the evidence. When you get',\n 'something wrong, own it directly, correct it, and move on.',\n].join('\\n');\n\n/**\n * An opinionated built-in preset: a conservative, ask-first reviewing posture.\n *\n * It is the deliberate counterpart to `autonomous-builder` on the autonomy axis. It both ships a\n * portable persona block AND sets the framework/executor mechanism flags so the review style is\n * backed by real, observable behaviour rather than persona text alone:\n *\n * - `autonomy: 'ask-first'` → PRESET-004 maps this onto the ask-on-write permission posture, so\n * writes/exec are prompted rather than auto-accepted.\n * - `selfVerification: true` → the framework/executor verifier loop runs before changes settle.\n * - `enableParallelSubagents: false` → focused analysis, not fan-out.\n * - `effort: 'high'` → deep reading/analysis of code and context before acting.\n *\n * The identifier is generic; no work-style attribution appears in the source.\n */\nexport const carefulReviewerPreset: IPreset = {\n id: 'careful-reviewer',\n title: 'Careful Reviewer',\n description:\n 'Conservative, ask-first reviewing posture — reads and plans before changing, prompts on ' +\n 'write/exec, self-verifies, runs focused (no parallel subagents) at high effort.',\n effort: 'high',\n autonomy: 'ask-first',\n enableParallelSubagents: false,\n selfVerification: true,\n persona: CAREFUL_REVIEWER_PERSONA,\n};\n","import type { IPreset } from '../preset-types.js';\n\n/**\n * Portable behavioural principles for the neutral-executor persona — a thin, steerable posture.\n *\n * Authored in our own English wording (paraphrase, not a verbatim copy of any external prompt)\n * and scoped to the PERSONA layer only. It carries no runtime/environment content — working\n * directory, tool schemas, product identity, dates, and permission text remain the framework\n * RUNTIME layer's responsibility (composed after this block by `buildSystemPrompt`).\n *\n * The block is intentionally minimal: follow instructions literally, editorialise little, stay in\n * scope, output tersely. No stacked emphasis words; no instruction to surface raw reasoning.\n */\nconst NEUTRAL_EXECUTOR_PERSONA = [\n 'Follow the system and user instructions literally. Do what was asked, the way it was asked, and',\n 'defer to the given instructions over your own preferences.',\n '',\n 'Editorialise as little as possible. Skip unrequested commentary, caveats, and asides — give the',\n 'result, not a narration of it.',\n '',\n 'Stay strictly in scope. Make only the change that was requested and the detail it plainly needs;',\n 'do not add adjacent refactors, comments, or features that were not asked for.',\n '',\n 'Keep output terse. Prefer the shortest response that fully answers, so the result is predictable',\n 'and easy to consume in a script or pipeline.',\n].join('\\n');\n\n/**\n * A thin, steerable built-in preset: a minimal-opinion executor that follows instructions\n * literally and keeps output predictable for automation/scripting.\n *\n * Unlike `default` (which pins behaviour in no direction), this preset actively pins a terse,\n * literal posture, AND it sets framework/executor mechanism flags so the thinness is observable\n * rather than persona text alone:\n *\n * - `autonomy: 'balanced'` → neither prompts on every write nor acts aggressively (PRESET-004\n * maps it onto the standard permission posture).\n * - `enableParallelSubagents: false` and `selfVerification: false` → minimal machinery, predictable.\n * - `effort: 'medium'` → predictable, reproducible output for scripted use.\n *\n * The identifier is generic; any work-style attribution is confined to `description`.\n */\nexport const neutralExecutorPreset: IPreset = {\n id: 'neutral-executor',\n title: 'Neutral Executor',\n description:\n 'Thin, steerable executor — follows instructions literally, minimal editorialising, strict ' +\n 'scope, terse output; balanced autonomy, no parallel subagents, no self-verification, medium ' +\n 'effort for predictable scripted use (neutral-alignment work-style; original English wording).',\n effort: 'medium',\n autonomy: 'balanced',\n enableParallelSubagents: false,\n selfVerification: false,\n persona: NEUTRAL_EXECUTOR_PERSONA,\n};\n","import { autonomousBuilderPreset } from './presets/autonomous-builder.js';\nimport { carefulReviewerPreset } from './presets/careful-reviewer.js';\nimport { defaultPreset } from './presets/default.js';\nimport { neutralExecutorPreset } from './presets/neutral-executor.js';\n\nimport type {\n IPreset,\n TPresetAutonomy,\n TPresetPermissionMode,\n IResolvedPresetOptions,\n} from './preset-types.js';\n\n/**\n * Map a behavioural {@link TPresetAutonomy} posture onto a concrete permission mode.\n *\n * `act-first` opts into `acceptEdits` (writes are not prompted every time);\n * `ask-first` and `balanced` stay on `default` (the standard ask-on-write posture).\n * Only consulted when the resolved options set `autonomy` but no explicit\n * `permissionMode`/`defaultPermissionMode`.\n */\nconst AUTONOMY_TO_PERMISSION_MODE: Record<TPresetAutonomy, TPresetPermissionMode> = {\n 'ask-first': 'default',\n balanced: 'default',\n 'act-first': 'acceptEdits',\n};\n\n/** Registry of built-in presets. Built-ins always win on id conflict and cannot be overridden. */\nconst BUILT_IN_PRESETS: readonly IPreset[] = [\n defaultPreset,\n autonomousBuilderPreset,\n carefulReviewerPreset,\n neutralExecutorPreset,\n];\n\n/** Lightweight `{ id, title, description }` view of a preset for discovery/UX. */\nexport interface IPresetSummary {\n id: string;\n title: string;\n description: string;\n}\n\n/** Outcome of {@link partitionExternalPresets}: which presets were accepted and which rejected. */\nexport interface IPresetRegistrationResult {\n accepted: readonly IPreset[];\n rejected: readonly { id: string; reason: string }[];\n}\n\n/**\n * Apply the external-preset conflict policy to one list, reading and mutating NOTHING outside it.\n *\n * Conflict policy: an external preset whose id matches a BUILT-IN preset is rejected\n * (`'collides with built-in preset'`) — built-ins always win. An external preset whose id matches an\n * earlier ACCEPTED external preset is rejected (`'duplicate preset id'`) — first one wins.\n *\n * ARCH-009. This is the whole of what the module-global registry used to be, minus the register:\n * the policy was never the process's to hold, only the list it was applied to was. Both callers —\n * {@link createPresetRegistry} and the external-preset loader — now pass their own list, so two\n * products in one process cannot see each other's presets, and a repeated load cannot accumulate.\n */\nexport function partitionExternalPresets(presets: readonly IPreset[]): IPresetRegistrationResult {\n const builtInIds = new Set(BUILT_IN_PRESETS.map((preset) => preset.id));\n const accepted: IPreset[] = [];\n const rejected: { id: string; reason: string }[] = [];\n\n for (const preset of presets) {\n if (builtInIds.has(preset.id)) {\n rejected.push({ id: preset.id, reason: 'collides with built-in preset' });\n continue;\n }\n if (accepted.some((existing) => existing.id === preset.id)) {\n rejected.push({ id: preset.id, reason: 'duplicate preset id' });\n continue;\n }\n accepted.push(preset);\n }\n\n return { accepted, rejected };\n}\n\n/**\n * Override layers for {@link resolvePreset}, in increasing precedence.\n * `cliOverrides` model CLI flags; `explicit` models programmatic/SDK options.\n */\nexport interface IResolvePresetContext {\n cliOverrides?: IResolvedPresetOptions;\n explicit?: IResolvedPresetOptions;\n}\n\n/** Strip the identity triple from a preset, leaving only resolvable option overrides. */\nfunction toPresetOptions(preset: IPreset): IResolvedPresetOptions {\n const { id: _id, title: _title, description: _description, ...options } = preset;\n return options;\n}\n\n/** Keep only the entries of `source` whose value is defined. */\nfunction definedEntries(source: IResolvedPresetOptions): Partial<IResolvedPresetOptions> {\n return Object.fromEntries(Object.entries(source).filter(([, value]) => value !== undefined));\n}\n\n/**\n * Merge `source` onto `target`, skipping `undefined` values so later layers only override set keys.\n *\n * ARCH-040 Group C (issue #1934): the two tool lists combine differently, and the difference is the\n * decision rather than an implementation detail.\n *\n * - **`allowedTools` REPLACES.** An allowlist is a statement of the COMPLETE permitted set, so a\n * later, more specific layer stating one supersedes the earlier answer. Intersecting would let an\n * earlier layer veto a tool the operator just named, and unioning would let it smuggle one in.\n * - **`deniedTools` UNIONS.** A denial is not weakened by a later layer that forgot to repeat it —\n * forgetting is the common case, and the cost of the two mistakes is not symmetric.\n *\n * This lives HERE, in the resolver, because precedence is the resolver's job: a union applied by one\n * of three shells is a rule the other two disagree with, which is the class ARCH-013 exists over.\n */\nfunction mergeDefined(\n target: IResolvedPresetOptions,\n source: IResolvedPresetOptions | undefined,\n): IResolvedPresetOptions {\n if (!source) {\n return target;\n }\n const merged = { ...target, ...definedEntries(source) };\n return source.deniedTools !== undefined || target.deniedTools !== undefined\n ? { ...merged, deniedTools: unionTools(target.deniedTools, source.deniedTools) }\n : merged;\n}\n\n/** Every denial either layer stated, order preserved and duplicates dropped. */\nfunction unionTools(\n earlier: readonly string[] | undefined,\n later: readonly string[] | undefined,\n): string[] {\n return [...new Set([...(earlier ?? []), ...(later ?? [])])];\n}\n\n/**\n * Pure resolve over an explicit preset list — the core every {@link createPresetRegistry} instance\n * resolves through. Reads only its arguments; performs the precedence merge + permission-mode\n * derivation.\n *\n * Precedence LOW → HIGH: preset options < `context.cliOverrides` < `context.explicit` (later layers\n * win; `undefined` values are skipped). For the no-op `'default'` preset the result equals the\n * merged overrides.\n *\n * @throws Error when `id` does not match a preset in `presets`.\n */\nfunction resolvePresetFrom(\n presets: readonly IPreset[],\n id: string,\n context: IResolvePresetContext = {},\n): IResolvedPresetOptions {\n const preset = presets.find((p) => p.id === id);\n if (!preset) {\n const available = presets.map((p) => p.id).join(', ');\n throw new Error(`Unknown preset: \"${id}\". Available presets: ${available}.`);\n }\n\n let resolved = toPresetOptions(preset);\n resolved = mergeDefined(resolved, context.cliOverrides);\n resolved = mergeDefined(resolved, context.explicit);\n return derivePermissionMode(resolved);\n}\n\n/**\n * A per-call, instance-scoped preset registry (ARCH-005 R8) — since ARCH-009 the ONLY one there is.\n *\n * A registry holds its own merged list `[built-ins, ...accepted externals]`, so two products in one\n * process do not share one and repeat construction does not accumulate. The\n * `@robota-sdk/agent-product` assembler builds one per `assembleProduct` call and surfaces it on the\n * command-host context, which is how `/preset` inside a live session reaches THIS product's presets\n * rather than the process's.\n */\nexport interface IPresetRegistry {\n /** Resolve a preset id against this registry's presets. */\n resolvePreset(id: string, context?: IResolvePresetContext): IResolvedPresetOptions;\n /** Look up a preset by id within this registry, or `undefined`. */\n getPreset(id: string): IPreset | undefined;\n /** `{ id, title, description }` summaries of every preset in this registry. */\n listPresets(): readonly IPresetSummary[];\n}\n\n/**\n * Build an instance-scoped {@link IPresetRegistry} over `[built-ins, ...externalPresets]`.\n *\n * The conflict policy is {@link partitionExternalPresets}, applied to the argument list only: built-ins\n * always win, and among the external presets the first one wins. No module-level state is read or\n * mutated — this is a pure factory, and since ARCH-009 there is no module-level state to read.\n *\n * Called with no argument it is the BUILT-INS, which is the registry a host that supplies none gets.\n */\nexport function createPresetRegistry(externalPresets: readonly IPreset[] = []): IPresetRegistry {\n const merged: readonly IPreset[] = [\n ...BUILT_IN_PRESETS,\n ...partitionExternalPresets(externalPresets).accepted,\n ];\n\n return {\n resolvePreset: (id, context = {}) => resolvePresetFrom(merged, id, context),\n getPreset: (id) => merged.find((preset) => preset.id === id),\n listPresets: () => merged.map(({ id, title, description }) => ({ id, title, description })),\n };\n}\n\n/**\n * Fill the framework `permissionMode` seam from the preset's posture fields when it\n * is not already set. Precedence: explicit `permissionMode` (untouched) >\n * `defaultPermissionMode` > `autonomy` mapping. A no-op preset (no posture fields)\n * leaves the object unchanged — keeping `resolvePreset('default')` a no-op.\n */\nfunction derivePermissionMode(resolved: IResolvedPresetOptions): IResolvedPresetOptions {\n if (resolved.permissionMode !== undefined) {\n return resolved;\n }\n if (resolved.defaultPermissionMode !== undefined) {\n return { ...resolved, permissionMode: resolved.defaultPermissionMode };\n }\n if (resolved.autonomy !== undefined) {\n return { ...resolved, permissionMode: AUTONOMY_TO_PERMISSION_MODE[resolved.autonomy] };\n }\n return resolved;\n}\n","import { parseModelEffort } from '@robota-sdk/agent-framework';\n\nimport type {\n IPreset,\n TPresetAutonomy,\n TPresetPermissionMode,\n IResolvedPresetOptions,\n} from './preset-types.js';\n\n/** Result of {@link validateExternalPreset}: the validated preset, or a single error message. */\nexport type TPresetValidationResult = { ok: true; preset: IPreset } | { ok: false; error: string };\n\n/** Runtime membership list for {@link TPresetAutonomy}. */\nconst AUTONOMY_VALUES: readonly TPresetAutonomy[] = ['ask-first', 'act-first', 'balanced'];\n\n/** Runtime membership list for {@link TPresetPermissionMode}. */\nconst PERMISSION_MODE_VALUES: readonly TPresetPermissionMode[] = [\n 'plan',\n 'default',\n 'acceptEdits',\n 'bypassPermissions',\n];\n\n/** Narrowing guard: `value` is a non-null, non-array object. */\nfunction isPlainObject(value: unknown): value is Record<string, unknown> {\n return typeof value === 'object' && value !== null && !Array.isArray(value);\n}\n\n/** Narrowing guard: `value` is an array whose every element is a string. */\nfunction isStringArray(value: unknown): value is string[] {\n return Array.isArray(value) && value.every((item) => typeof item === 'string');\n}\n\n/** Validate the string-typed optional fields onto `options`; return the first error, if any. */\nfunction validateStringFields(\n value: Record<string, unknown>,\n options: IResolvedPresetOptions,\n): string | undefined {\n const fields: readonly [string, unknown, (v: string) => void][] = [\n ['persona', value.persona, (v) => (options.persona = v)],\n ['systemPrompt', value.systemPrompt, (v) => (options.systemPrompt = v)],\n ['appendSystemPrompt', value.appendSystemPrompt, (v) => (options.appendSystemPrompt = v)],\n ['agentName', value.agentName, (v) => (options.agentName = v)],\n ['model', value.model, (v) => (options.model = v)],\n ['language', value.language, (v) => (options.language = v)],\n ];\n for (const [field, raw, assign] of fields) {\n if (raw === undefined) {\n continue;\n }\n if (typeof raw !== 'string') {\n return `${field}: expected a string`;\n }\n assign(raw);\n }\n return undefined;\n}\n\n/** Validate the number- and boolean-typed optional fields onto `options`; return the first error. */\nfunction validateScalarFields(\n value: Record<string, unknown>,\n options: IResolvedPresetOptions,\n): string | undefined {\n const numbers: readonly [string, unknown, (v: number) => void][] = [\n ['temperature', value.temperature, (v) => (options.temperature = v)],\n ['maxOutputTokens', value.maxOutputTokens, (v) => (options.maxOutputTokens = v)],\n ];\n for (const [field, raw, assign] of numbers) {\n if (raw === undefined) {\n continue;\n }\n if (typeof raw !== 'number' || Number.isNaN(raw)) {\n return `${field}: expected a number`;\n }\n assign(raw);\n }\n\n const booleans: readonly [string, unknown, (v: boolean) => void][] = [\n [\n 'enableParallelSubagents',\n value.enableParallelSubagents,\n (v) => (options.enableParallelSubagents = v),\n ],\n ['selfVerification', value.selfVerification, (v) => (options.selfVerification = v)],\n ];\n for (const [field, raw, assign] of booleans) {\n if (raw === undefined) {\n continue;\n }\n if (typeof raw !== 'boolean') {\n return `${field}: expected a boolean`;\n }\n assign(raw);\n }\n return undefined;\n}\n\n/** Validate the enum-typed optional fields onto `options`; return the first error, if any. */\nfunction validateEnumFields(\n value: Record<string, unknown>,\n options: IResolvedPresetOptions,\n): string | undefined {\n if (value.effort !== undefined) {\n if (typeof value.effort !== 'string') {\n return 'effort: expected a string';\n }\n try {\n const effort = parseModelEffort(value.effort, 'effort');\n if (effort === undefined) {\n return 'effort: expected a Core-owned effort selection';\n }\n options.effort = effort;\n } catch (error) {\n return `effort: ${error instanceof Error ? error.message : String(error)}`;\n }\n }\n\n if (value.autonomy !== undefined) {\n if (!AUTONOMY_VALUES.includes(value.autonomy as TPresetAutonomy)) {\n return `autonomy: expected one of ${AUTONOMY_VALUES.join(', ')}`;\n }\n options.autonomy = value.autonomy as TPresetAutonomy;\n }\n\n const modes: readonly [string, unknown, (v: TPresetPermissionMode) => void][] = [\n ['permissionMode', value.permissionMode, (v) => (options.permissionMode = v)],\n [\n 'defaultPermissionMode',\n value.defaultPermissionMode,\n (v) => (options.defaultPermissionMode = v),\n ],\n ];\n for (const [field, raw, assign] of modes) {\n if (raw === undefined) {\n continue;\n }\n if (!PERMISSION_MODE_VALUES.includes(raw as TPresetPermissionMode)) {\n return `${field}: expected one of ${PERMISSION_MODE_VALUES.join(', ')}`;\n }\n assign(raw as TPresetPermissionMode);\n }\n\n return undefined;\n}\n\n/** Validate the string-array optional fields onto `options`; return the first error, if any. */\nfunction validateArrayFields(\n value: Record<string, unknown>,\n options: IResolvedPresetOptions,\n): string | undefined {\n const arrays: readonly [string, unknown, (v: readonly string[]) => void][] = [\n ['allowedTools', value.allowedTools, (v) => (options.allowedTools = v)],\n ['deniedTools', value.deniedTools, (v) => (options.deniedTools = v)],\n [\n 'enabledCommandModules',\n value.enabledCommandModules,\n (v) => (options.enabledCommandModules = v),\n ],\n [\n 'disabledCommandModules',\n value.disabledCommandModules,\n (v) => (options.disabledCommandModules = v),\n ],\n ];\n for (const [field, raw, assign] of arrays) {\n if (raw === undefined) {\n continue;\n }\n if (!isStringArray(raw)) {\n return `${field}: expected an array of strings`;\n }\n assign(raw);\n }\n return undefined;\n}\n\n/**\n * Manually validate an unknown value as an {@link IPreset} (no schema library).\n *\n * Required fields: non-empty `id`, `title`, `description` strings. Every other field is\n * optional and is validated only when present; an unrecognised field is dropped (the built\n * preset carries the recognised fields only, never unknown keys). On the first failed check\n * returns `{ ok: false, error: '<field>: <reason>' }`.\n */\nexport function validateExternalPreset(value: unknown): TPresetValidationResult {\n if (!isPlainObject(value)) {\n return { ok: false, error: 'preset: expected a non-null object' };\n }\n\n const requiredStrings: readonly ['id' | 'title' | 'description', unknown][] = [\n ['id', value.id],\n ['title', value.title],\n ['description', value.description],\n ];\n for (const [field, raw] of requiredStrings) {\n if (typeof raw !== 'string' || raw.length === 0) {\n return { ok: false, error: `${field}: expected a non-empty string` };\n }\n }\n\n // Accumulate recognised optional fields here, then spread onto the identity triple so the\n // built preset never carries unknown keys.\n const options: IResolvedPresetOptions = {};\n const error =\n validateStringFields(value, options) ??\n validateScalarFields(value, options) ??\n validateEnumFields(value, options) ??\n validateArrayFields(value, options);\n if (error !== undefined) {\n return { ok: false, error };\n }\n\n const preset: IPreset = {\n id: value.id as string,\n title: value.title as string,\n description: value.description as string,\n ...options,\n };\n return { ok: true, preset };\n}\n","import { existsSync, readdirSync, readFileSync } from 'node:fs';\nimport { join } from 'node:path';\n\nimport { validateExternalPreset } from './preset-validation.js';\nimport { partitionExternalPresets } from './resolve-preset.js';\n\nimport type { IPreset } from './preset-types.js';\n\n/**\n * Outcome of an external-preset load: the presets themselves, their ids, and per-file errors.\n *\n * ARCH-009 added `presets`. `loaded` used to be the only way out, because the presets went into a\n * module-global registry and the caller read them back by id — which is what made the global\n * load-bearing at startup. The caller now receives the values it loaded and builds its own registry\n * over them, so nothing has to be looked up from process state.\n */\nexport interface IExternalPresetLoadResult {\n presets: readonly IPreset[];\n loaded: readonly string[];\n errors: readonly { file: string; error: string }[];\n}\n\n/**\n * Load and validate every `*.json` external preset from `dir`.\n *\n * A missing directory yields an empty result (no error). Each file is JSON-parsed and validated;\n * a parse or validation failure is recorded as a per-file error and skipped — the remaining files\n * still load. The surviving presets go through {@link partitionExternalPresets}, whose rejections\n * (built-in id collision or duplicate id) are folded into `errors` against their file.\n *\n * Loading REGISTERS NOTHING. The result is a value the caller owns.\n */\nexport function loadExternalPresetsFromDir(dir: string): IExternalPresetLoadResult {\n if (!existsSync(dir)) {\n return { presets: [], loaded: [], errors: [] };\n }\n\n const errors: { file: string; error: string }[] = [];\n const validPresets: IPreset[] = [];\n // Track which file each validated preset id came from so registry rejections map back to a file.\n const fileById = new Map<string, string>();\n\n const jsonFiles = readdirSync(dir).filter((name) => name.endsWith('.json'));\n for (const name of jsonFiles) {\n const filePath = join(dir, name);\n let parsed: unknown;\n try {\n parsed = JSON.parse(readFileSync(filePath, 'utf8'));\n } catch (error) {\n // allow-fallback: a malformed file is reported per-file and skipped, not silently swallowed\n errors.push({ file: name, error: error instanceof Error ? error.message : String(error) });\n continue;\n }\n\n const result = validateExternalPreset(parsed);\n if (!result.ok) {\n errors.push({ file: name, error: result.error });\n continue;\n }\n\n validPresets.push(result.preset);\n fileById.set(result.preset.id, name);\n }\n\n const { accepted, rejected } = partitionExternalPresets(validPresets);\n for (const rejection of rejected) {\n errors.push({ file: fileById.get(rejection.id) ?? rejection.id, error: rejection.reason });\n }\n\n return { presets: accepted, loaded: accepted.map((preset) => preset.id), errors };\n}\n","import type { IOutputStyle } from './output-style-types.js';\n\nconst DEFAULT_INSTRUCTIONS = '';\n\nexport const builtInOutputStyles: readonly IOutputStyle[] = [\n {\n id: 'default',\n name: 'Default',\n description: 'The ordinary response style.',\n instructions: DEFAULT_INSTRUCTIONS,\n keepCodingInstructions: true,\n tokenCost: 'baseline',\n source: 'built-in',\n },\n {\n id: 'concise',\n name: 'Concise',\n description: 'Lead with the result and keep routine responses short.',\n instructions:\n 'Lead with the answer and skip routine preamble or tool narration. Keep responses concise while doing the same engineering work. Expand fully when asked for detail. Always keep error reports, security warnings and destructive-action confirmations complete.',\n keepCodingInstructions: true,\n tokenCost: 'low',\n source: 'built-in',\n },\n {\n id: 'proactive',\n name: 'Proactive',\n description: 'Take the next reasonable step without pausing on routine choices.',\n instructions:\n 'Act on reasonable routine assumptions and take the next useful step. State assumptions when they matter. The active permission mode remains authoritative; this style never grants, changes, or bypasses permission.',\n keepCodingInstructions: true,\n tokenCost: 'medium',\n source: 'built-in',\n },\n {\n id: 'explanatory',\n name: 'Explanatory',\n description: 'Teach the reasoning and trade-offs behind the answer.',\n instructions:\n 'Explain the reasoning, important trade-offs, and relevant terminology as you work. Keep the explanation connected to the requested outcome and do not omit complete error, security, or destructive-action guidance.',\n keepCodingInstructions: true,\n tokenCost: 'high',\n source: 'built-in',\n },\n {\n id: 'learning',\n name: 'Learning',\n description: 'Teach by marking useful gaps for the human to fill.',\n instructions:\n 'Teach the requested subject step by step. Mark a small number of useful gaps with [Your turn:] and invite the human to fill them before revealing the explanation. Never turn safety, security, error, or destructive-action guidance into a gap.',\n keepCodingInstructions: true,\n tokenCost: 'high',\n source: 'built-in',\n },\n];\n","import { basename, extname } from 'node:path';\n\nimport { builtInOutputStyles } from './output-styles.js';\n\nimport type {\n IOutputStyle,\n IOutputStyleFile,\n IOutputStyleLoadResult,\n IOutputStyleRegistry,\n IOutputStyleSource,\n IOutputStyleSummary,\n TOutputStyleSource,\n TOutputStyleTokenCost,\n} from './output-style-types.js';\n\nexport { builtInOutputStyles } from './output-styles.js';\n\nconst TOKEN_COSTS = new Set<TOutputStyleTokenCost>([\n 'baseline',\n 'low',\n 'medium',\n 'high',\n 'unspecified',\n]);\n\nfunction stripScalarQuotes(value: string): string {\n return value.replace(/^(?:\"([\\s\\S]*)\"|'([\\s\\S]*)')$/, '$1$2');\n}\n\nfunction parseBoolean(field: string, raw: string): boolean {\n if (raw === 'true') return true;\n if (raw === 'false') return false;\n throw new Error(`${field}: expected boolean, received \"${raw}\"`);\n}\n\nfunction parseFrontmatter(\n fileName: string,\n content: string,\n): { values: Record<string, string>; instructions: string } {\n const lines = content.split('\\n');\n if (lines[0]?.trim() !== '---') {\n throw new Error('frontmatter: expected an opening --- marker');\n }\n const values: Record<string, string> = {};\n let end = -1;\n for (let index = 1; index < lines.length; index += 1) {\n const line = lines[index]!;\n if (line.trim() === '---') {\n end = index;\n break;\n }\n if (line.trim() === '') continue;\n // The value starts at its first non-space character, so the space before it is never split\n // two ways between `\\s*` and the value — that ambiguity made a rejected line quadratic.\n const match = /^([a-z][a-z0-9-]*):\\s*(\\S[^\\n\\r\\u2028\\u2029]*)?$/.exec(line);\n if (!match) throw new Error(`frontmatter: invalid entry at line ${index + 1}`);\n const key = match[1]!;\n if (values[key] !== undefined) throw new Error(`frontmatter.${key}: duplicate field`);\n values[key] = stripScalarQuotes((match[2] ?? '').trim());\n }\n if (end < 0) throw new Error('frontmatter: expected a closing --- marker');\n const unknown = Object.keys(values).filter(\n (key) => !['name', 'description', 'keep-coding-instructions', 'token-cost'].includes(key),\n );\n if (unknown.length > 0) {\n throw new Error(`frontmatter.${unknown[0]}: unknown field`);\n }\n return {\n values,\n instructions: lines\n .slice(end + 1)\n .join('\\n')\n .trim(),\n };\n}\n\nfunction fileId(fileName: string): string {\n const id = basename(fileName, extname(fileName)).trim();\n if (!/^[a-z0-9][a-z0-9-]*$/i.test(id)) {\n throw new Error(`id: expected the Markdown filename stem to be a slug, received \"${id}\"`);\n }\n return id.toLowerCase();\n}\n\nexport function parseOutputStyleFile(\n file: IOutputStyleFile,\n source: TOutputStyleSource,\n): IOutputStyle {\n if (!file.fileName.endsWith('.md')) {\n throw new Error('file: expected a .md output-style file');\n }\n const id = fileId(file.fileName);\n const parsed = parseFrontmatter(file.fileName, file.content);\n const name = parsed.values.name?.trim() || basename(file.fileName, '.md');\n const description = parsed.values.description?.trim() || `Custom output style: ${name}`;\n const keepCodingInstructions =\n parsed.values['keep-coding-instructions'] === undefined\n ? false\n : parseBoolean(\n 'frontmatter.keep-coding-instructions',\n parsed.values['keep-coding-instructions'],\n );\n const tokenCost = parsed.values['token-cost'] ?? 'unspecified';\n if (!TOKEN_COSTS.has(tokenCost as TOutputStyleTokenCost)) {\n throw new Error(\n `frontmatter.token-cost: expected baseline|low|medium|high|unspecified, received \"${tokenCost}\"`,\n );\n }\n if (parsed.instructions.length === 0) {\n throw new Error('body: expected non-empty style instructions');\n }\n return {\n id,\n name,\n description,\n instructions: parsed.instructions,\n keepCodingInstructions,\n tokenCost: tokenCost as TOutputStyleTokenCost,\n source,\n };\n}\n\nfunction summarize(style: IOutputStyle): IOutputStyleSummary {\n return {\n id: style.id,\n name: style.name,\n description: style.description,\n tokenCost: style.tokenCost,\n source: style.source,\n };\n}\n\nexport function loadOutputStylesFromSources(\n sources: readonly IOutputStyleSource[],\n): IOutputStyleLoadResult {\n const styles = new Map<string, IOutputStyle>();\n const errors: { file: string; error: string }[] = [];\n for (const style of builtInOutputStyles) styles.set(style.id, style);\n\n const orderedSources = [...sources].sort((a, b) => a.precedence - b.precedence);\n for (const source of orderedSources) {\n const seenInSource = new Set<string>();\n for (const file of [...source.files].sort((a, b) => a.fileName.localeCompare(b.fileName))) {\n const displayFile = `${source.displayName}/${file.fileName}`;\n let style: IOutputStyle;\n try {\n style = parseOutputStyleFile(file, source.scope);\n } catch (error) {\n errors.push({\n file: displayFile,\n error: error instanceof Error ? error.message : String(error),\n });\n continue;\n }\n if (seenInSource.has(style.id)) {\n errors.push({ file: displayFile, error: `duplicate style id \"${style.id}\" in source` });\n continue;\n }\n seenInSource.add(style.id);\n if (styles.get(style.id)?.source === 'built-in') {\n errors.push({\n file: displayFile,\n error: `style id \"${style.id}\" collides with a built-in`,\n });\n continue;\n }\n styles.set(style.id, style);\n }\n }\n return {\n styles: [...styles.values()],\n loaded: [...styles.values()]\n .filter((style) => style.source !== 'built-in')\n .map((style) => style.id),\n errors,\n };\n}\n\nexport function createOutputStyleRegistry(\n sources: readonly IOutputStyleSource[] = [],\n): IOutputStyleRegistry {\n const loaded = loadOutputStylesFromSources(sources);\n const byId = new Map(loaded.styles.map((style) => [style.id, style]));\n return {\n listOutputStyles: () => loaded.styles.map(summarize),\n getOutputStyle: (id: string) => byId.get(id),\n };\n}\n"],"mappings":"mMAQA,MAAa,EAAyB,CACpC,GAAI,UACJ,MAAO,UACP,YAAa,kFACf,ECkCa,EAAmC,CAC9C,GAAI,qBACJ,MAAO,qBACP,YACE,uKAEF,OAAQ,OACR,SAAU,YACV,wBAAyB,GACzB,iBAAkB,GAClB,QA9CiC,CACjC,2FACA,8FACA,iGACA,sBACA,GACA,4FACA,gGACA,0EACA,GACA,gGACA,sEACA,GACA,gGACA,8FACA,2BACA,GACA,gGACA,iGACA,6DACA,GACA,gGACA,0BACF,CAAC,CAAC,KAAK;CAuBI,CACX,ECTa,EAAiC,CAC5C,GAAI,mBACJ,MAAO,mBACP,YACE,0KAEF,OAAQ,OACR,SAAU,YACV,wBAAyB,GACzB,iBAAkB,GAClB,QA7C+B,CAC/B,8FACA,kGACA,+EACA,GACA,kGACA,yFACA,GACA,kGACA,wEACA,GACA,oGACA,mGACA,4BACA,GACA,gGACA,iGACA,4DACF,CAAC,CAAC,KAAK;CA2BI,CACX,ECjBa,EAAiC,CAC5C,GAAI,mBACJ,MAAO,mBACP,YACE,sRAGF,OAAQ,SACR,SAAU,WACV,wBAAyB,GACzB,iBAAkB,GAClB,QAxC+B,CAC/B,kGACA,6DACA,GACA,kGACA,iCACA,GACA,mGACA,gFACA,GACA,mGACA,8CACF,CAAC,CAAC,KAAK;CA4BI,CACX,EClCM,EAA8E,CAClF,YAAa,UACb,SAAU,UACV,YAAa,aACf,EAGM,EAAuC,CAC3C,EACA,EACA,EACA,CACF,EA2BA,SAAgB,EAAyB,EAAwD,CAC/F,IAAM,EAAa,IAAI,IAAI,EAAiB,IAAK,GAAW,EAAO,EAAE,CAAC,E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AC/C,EAAO,KAAK,CACV,KAAM,EACN,MAAO,aAAa,EAAM,GAAG,2BAC/B,CAAC,EACD,QACF,CACA,EAAO,IAAI,EAAM,GAAI,CAAK,CAC5B,CACF,CACA,MAAO,CACL,OAAQ,CAAC,GAAG,EAAO,OAAO,CAAC,EAC3B,OAAQ,CAAC,GAAG,EAAO,OAAO,CAAC,CAAC,CACzB,OAAQ,GAAU,EAAM,SAAW,UAAU,CAAC,CAC9C,IAAK,GAAU,EAAM,EAAE,EAC1B,QACF,CACF,CAEA,SAAgB,EACd,EAAyC,CAAC,EACpB,CACtB,IAAM,EAAS,EAA4B,CAAO,EAC5C,EAAO,IAAI,IAAI,EAAO,OAAO,IAAK,GAAU,CAAC,EAAM,GAAI,CAAK,CAAC,CAAC,EACpE,MAAO,CACL,qBAAwB,EAAO,OAAO,IAAI,CAAS,EACnD,eAAiB,GAAe,EAAK,IAAI,CAAE,CAC7C,CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@robota-sdk/agent-preset",
|
|
3
|
-
"version": "3.0.0-beta.
|
|
3
|
+
"version": "3.0.0-beta.83",
|
|
4
4
|
"description": "Preset contract and resolver for the Robota SDK (IPreset, resolvePreset, listPresets, built-in presets)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/node/index.js",
|
|
@@ -28,7 +28,8 @@
|
|
|
28
28
|
"default": "./dist/node/index.cjs"
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
}
|
|
31
|
+
},
|
|
32
|
+
"./package.json": "./package.json"
|
|
32
33
|
},
|
|
33
34
|
"repository": {
|
|
34
35
|
"type": "git",
|
|
@@ -38,11 +39,15 @@
|
|
|
38
39
|
"bugs": {
|
|
39
40
|
"url": "https://github.com/woojubb/robota/issues"
|
|
40
41
|
},
|
|
42
|
+
"engines": {
|
|
43
|
+
"node": ">=22.12.0"
|
|
44
|
+
},
|
|
41
45
|
"files": [
|
|
42
|
-
"dist"
|
|
46
|
+
"dist",
|
|
47
|
+
"CHANGELOG.md"
|
|
43
48
|
],
|
|
44
49
|
"dependencies": {
|
|
45
|
-
"@robota-sdk/agent-framework": "3.0.0-beta.
|
|
50
|
+
"@robota-sdk/agent-framework": "3.0.0-beta.83"
|
|
46
51
|
},
|
|
47
52
|
"devDependencies": {
|
|
48
53
|
"rimraf": "^5.0.10",
|