dispach 0.1.0 → 0.1.2

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.
Files changed (115) hide show
  1. package/README.md +131 -31
  2. package/dist/App-b1yrwrcq.js +11 -0
  3. package/dist/{App-dxqm39zx.js.map → App-b1yrwrcq.js.map} +1 -1
  4. package/dist/{ConfigEditor-7v5nebvy.js → ConfigEditor-n8hdw6r7.js} +4 -4
  5. package/dist/{ConfigEditor-7v5nebvy.js.map → ConfigEditor-n8hdw6r7.js.map} +1 -1
  6. package/dist/{KeyProbe-vjhmdpx6.js → KeyProbe-9jjeze5r.js} +3 -3
  7. package/dist/{KeyProbe-vjhmdpx6.js.map → KeyProbe-9jjeze5r.js.map} +1 -1
  8. package/dist/{Picker-jxaesaxy.js → Picker-hfeh1g6m.js} +3 -3
  9. package/dist/{Picker-jxaesaxy.js.map → Picker-hfeh1g6m.js.map} +1 -1
  10. package/dist/{SessionPicker-z2t0p4b5.js → SessionPicker-zyqkg4dn.js} +3 -3
  11. package/dist/{SessionPicker-z2t0p4b5.js.map → SessionPicker-zyqkg4dn.js.map} +1 -1
  12. package/dist/{SkillBrowser-yyf2gy0q.js → SkillBrowser-3qdp8080.js} +3 -3
  13. package/dist/{SkillBrowser-yyf2gy0q.js.map → SkillBrowser-3qdp8080.js.map} +1 -1
  14. package/dist/WizardApp-vzpbydy3.js +5 -0
  15. package/dist/{WizardApp-12ndxgqv.js.map → WizardApp-vzpbydy3.js.map} +1 -1
  16. package/dist/client.js +10 -10
  17. package/dist/client.js.map +5 -5
  18. package/dist/{config-yz0nz51b.js → config-g7za9x13.js} +13 -13
  19. package/dist/{config-yz0nz51b.js.map → config-g7za9x13.js.map} +1 -1
  20. package/dist/credential-npr6z8c8.js +19 -0
  21. package/dist/{credential-wgt4gvcz.js.map → credential-npr6z8c8.js.map} +2 -2
  22. package/dist/index-02dn6m2j.js +7 -0
  23. package/dist/{index-h2yds678.js.map → index-02dn6m2j.js.map} +1 -1
  24. package/dist/index-0d93hyfc.js +6 -0
  25. package/dist/{index-rqbtm761.js.map → index-0d93hyfc.js.map} +1 -1
  26. package/dist/index-1c5113t4.js +66 -0
  27. package/dist/index-1c5113t4.js.map +12 -0
  28. package/dist/{index-3nwfz9jq.js → index-258d8bzg.js} +10 -10
  29. package/dist/{index-3nwfz9jq.js.map → index-258d8bzg.js.map} +1 -1
  30. package/dist/{index-9d011p3q.js → index-3g3ny01d.js} +4 -4
  31. package/dist/{index-9d011p3q.js.map → index-3g3ny01d.js.map} +1 -1
  32. package/dist/{index-8bmhd2hj.js → index-4cf6v9nb.js} +4 -4
  33. package/dist/{index-8bmhd2hj.js.map → index-4cf6v9nb.js.map} +1 -1
  34. package/dist/{index-bwckzbf8.js → index-4z7axw4r.js} +4 -4
  35. package/dist/{index-bwckzbf8.js.map → index-4z7axw4r.js.map} +1 -1
  36. package/dist/{index-xgqzk5cq.js → index-6p999cx4.js} +6 -6
  37. package/dist/{index-xgqzk5cq.js.map → index-6p999cx4.js.map} +1 -1
  38. package/dist/index-6q4wf8e3.js +6 -0
  39. package/dist/{index-jym27m75.js.map → index-6q4wf8e3.js.map} +1 -1
  40. package/dist/{index-cx3vz7sf.js → index-9r0wyj6w.js} +4 -4
  41. package/dist/{index-cx3vz7sf.js.map → index-9r0wyj6w.js.map} +1 -1
  42. package/dist/{index-j97vttdt.js → index-ammv5st7.js} +6 -6
  43. package/dist/{index-j97vttdt.js.map → index-ammv5st7.js.map} +1 -1
  44. package/dist/{index-qc2vrq9z.js → index-cqqb6gaq.js} +5 -5
  45. package/dist/{index-qc2vrq9z.js.map → index-cqqb6gaq.js.map} +1 -1
  46. package/dist/{index-jk0def33.js → index-d4x6yvqh.js} +4 -4
  47. package/dist/{index-jk0def33.js.map → index-d4x6yvqh.js.map} +1 -1
  48. package/dist/index-fecm8xe7.js +77 -0
  49. package/dist/index-fecm8xe7.js.map +12 -0
  50. package/dist/{index-e8n70sgj.js → index-fex44816.js} +4 -4
  51. package/dist/{index-e8n70sgj.js.map → index-fex44816.js.map} +1 -1
  52. package/dist/{index-gbnc99j8.js → index-ff514z3y.js} +9 -9
  53. package/dist/{index-gbnc99j8.js.map → index-ff514z3y.js.map} +1 -1
  54. package/dist/{index-t1xvacym.js → index-gme2egyq.js} +4 -4
  55. package/dist/{index-t1xvacym.js.map → index-gme2egyq.js.map} +1 -1
  56. package/dist/{index-mrtb5y08.js → index-gz9x25tz.js} +4 -4
  57. package/dist/{index-mrtb5y08.js.map → index-gz9x25tz.js.map} +1 -1
  58. package/dist/{index-9nsfs0vy.js → index-h9mw7b9d.js} +4 -4
  59. package/dist/{index-9nsfs0vy.js.map → index-h9mw7b9d.js.map} +1 -1
  60. package/dist/{index-6b7qvh1x.js → index-hwpvhaza.js} +4 -4
  61. package/dist/{index-6b7qvh1x.js.map → index-hwpvhaza.js.map} +1 -1
  62. package/dist/{index-6z0yr17z.js → index-j55s3ehk.js} +7 -7
  63. package/dist/{index-6z0yr17z.js.map → index-j55s3ehk.js.map} +1 -1
  64. package/dist/{index-mgdgx22q.js → index-j7gyr5nx.js} +6 -6
  65. package/dist/{index-mgdgx22q.js.map → index-j7gyr5nx.js.map} +1 -1
  66. package/dist/{index-7da4fqcr.js → index-mtn0g9vc.js} +5 -5
  67. package/dist/{index-7da4fqcr.js.map → index-mtn0g9vc.js.map} +1 -1
  68. package/dist/{index-rqzg861g.js → index-qdbq8crg.js} +4 -4
  69. package/dist/{index-rqzg861g.js.map → index-qdbq8crg.js.map} +1 -1
  70. package/dist/{index-xqyms08r.js → index-s9mbq7h6.js} +4 -4
  71. package/dist/{index-xqyms08r.js.map → index-s9mbq7h6.js.map} +1 -1
  72. package/dist/{index-9f9pp2ef.js → index-tf71ap9v.js} +4 -4
  73. package/dist/{index-9f9pp2ef.js.map → index-tf71ap9v.js.map} +1 -1
  74. package/dist/index-ttwyrdjs.js +427 -0
  75. package/dist/index-ttwyrdjs.js.map +11 -0
  76. package/dist/{index-2cvtz0fy.js → index-tv4yv7d2.js} +228 -228
  77. package/dist/{index-2cvtz0fy.js.map → index-tv4yv7d2.js.map} +9 -9
  78. package/dist/{index-fvhg0xyd.js → index-ty24n0jh.js} +79 -79
  79. package/dist/{index-fvhg0xyd.js.map → index-ty24n0jh.js.map} +1 -1
  80. package/dist/index-v8e92nfw.js +6 -0
  81. package/dist/{index-b8zwg8a3.js.map → index-v8e92nfw.js.map} +1 -1
  82. package/dist/index-vgc3y3rm.js +6 -0
  83. package/dist/{index-my5cjx00.js.map → index-vgc3y3rm.js.map} +1 -1
  84. package/dist/index-whaw4b18.js +6 -0
  85. package/dist/index-whaw4b18.js.map +10 -0
  86. package/dist/index.js +202 -198
  87. package/dist/index.js.map +6 -6
  88. package/dist/lib/bootstrap.d.ts +13 -0
  89. package/dist/lib/bootstrap.d.ts.map +1 -1
  90. package/dist/lib/commands.d.ts.map +1 -1
  91. package/dist/lib/init-flow.d.ts +17 -4
  92. package/dist/lib/init-flow.d.ts.map +1 -1
  93. package/dist/lib/provision.d.ts.map +1 -1
  94. package/dist/serve.d.ts.map +1 -1
  95. package/dist/{web-w7r68df1.js → web-vkb16r62.js} +5 -5
  96. package/dist/{web-w7r68df1.js.map → web-vkb16r62.js.map} +1 -1
  97. package/dist/wire.js +10 -10
  98. package/dist/wire.js.map +4 -4
  99. package/package.json +2 -2
  100. package/dist/App-dxqm39zx.js +0 -11
  101. package/dist/WizardApp-12ndxgqv.js +0 -5
  102. package/dist/credential-wgt4gvcz.js +0 -19
  103. package/dist/index-9pj1ws0p.js +0 -77
  104. package/dist/index-9pj1ws0p.js.map +0 -12
  105. package/dist/index-b5wwtxzk.js +0 -66
  106. package/dist/index-b5wwtxzk.js.map +0 -12
  107. package/dist/index-b8zwg8a3.js +0 -6
  108. package/dist/index-bry9bzt3.js +0 -427
  109. package/dist/index-bry9bzt3.js.map +0 -11
  110. package/dist/index-h2yds678.js +0 -7
  111. package/dist/index-jym27m75.js +0 -6
  112. package/dist/index-my5cjx00.js +0 -6
  113. package/dist/index-rqbtm761.js +0 -6
  114. package/dist/index-yr25dnf5.js +0 -6
  115. package/dist/index-yr25dnf5.js.map +0 -10
@@ -1,6 +0,0 @@
1
- #!/usr/bin/env node
2
- import{o,$r,Ho}from"./index-jk0def33.js";import{Text as e}from"ink";import{useEffect as i,useState as c}from"react";import{jsx as f,jsxs as l}from"react/jsx-runtime";function de({label:r}){let[t,n]=c(0);return i(()=>{let p=setInterval(()=>n((a)=>(a+1)%$r.length),Ho);return()=>clearInterval(p)},[]),l(e,{children:[f(e,{color:o.accent,children:$r[t]})," ",r]})}
3
- export{de};
4
-
5
- //# debugId=6C2A5B9CE147EDBC64756E2164756E21
6
- //# sourceMappingURL=index-b8zwg8a3.js.map
@@ -1,427 +0,0 @@
1
- #!/usr/bin/env node
2
- import{e,Re}from"./index-2cvtz0fy.js";var Zn=`---
3
- name: {{SKILL_NAME}}
4
- description: Replace this description with what the skill does and when to use it, naming the specific words someone would type — file formats, tool names, the error they are looking at. Selection is lexical and this sentence is all it has.
5
- metadata:
6
- "{{WHEN_NOT_TO_USE_KEY}}": >
7
- Replace this too. Say what this skill is NOT for, and name the skill or the plain answer
8
- that handles those cases instead.
9
- ---
10
-
11
- <!--
12
- SKILL.md — one procedure the agent follows on the turns that call for it.
13
-
14
- The format is agentskills.io, so this folder is portable to other clients. The spec's fields are
15
- \`name\` (which must equal this directory's name), \`description\`, and optionally \`license\`,
16
- \`compatibility\`, \`metadata\` and \`allowed-tools\`. Anything else is ignored rather than refused.
17
-
18
- HOW SELECTION WORKS, because it changes how you write the description. The harness ranks every
19
- skill's name and description against what was just asked, picks at most \`skills.maxActive\`, and
20
- injects the winner. The model does not choose — so the description is a routing signal aimed at a
21
- lexical scorer, not a pitch aimed at a reader. Concrete nouns beat adjectives. A description whose
22
- only distinctive word is a common verb activates on any turn using that verb: measured, a skill
23
- opening "Write and debug a Dockerfile" was selected for "write me a haiku about autumn".
24
-
25
- Negative guidance is not a spec field, which is why it lives under \`metadata\`. It is worth writing
26
- anyway — negative examples are the cheapest routing improvement available — and \`skills validate\`
27
- warns when it is missing. It is never required to load, so a skill vendored from elsewhere works
28
- as it arrives.
29
-
30
- THE BODY IS INJECTED VERBATIM on every turn this skill activates, so every line below is paid for.
31
- Write steps, not background. Detail that is only occasionally needed goes in \`references/\` for the
32
- model to read on demand. These HTML comments are stripped before the model sees the file, so
33
- authoring notes like this one are free.
34
-
35
- SCRIPTS. Drop an executable into \`scripts/\` and it becomes a tool named
36
- \`skill.{{SKILL_NAME}}.<filename>\`, callable only while this skill is active. A \`.py\` runs under \`python3\`,
37
- or under \`uv run\` if this folder has a \`pyproject.toml\` or \`requirements.txt\`; \`.ts\` and \`.js\` run
38
- under the host; anything else needs an executable bit and a shebang. A file in \`scripts/\` that
39
- matches none of those will never run, and \`skills validate\` says so. A deterministic script beats
40
- instructions the model has to interpret — prefer one wherever the work is mechanical.
41
- -->
42
-
43
- Replace everything below with the steps.
44
-
45
- 1. State the first step as an action, not a topic.
46
- 2. Where a step has a rule that was learned the hard way, say the rule and why — a step with a
47
- reason generalises to the case you did not think of.
48
- 3. Say what to report at the end, and what not to do. A procedure that does not say where it stops
49
- gets carried into the next turn.
50
- `;var T={"AGENTS.md":`---
51
- tier: static
52
- editable: none
53
- budget: 800
54
- ---
55
-
56
- <!--
57
- AGENTS.md — what this agent DOES: responsibilities and operating procedure.
58
-
59
- TIER 0. Sent every turn, cached, read-only to the agent. Budget: 800 tokens.
60
-
61
- The identity lives in SOUL.md; this file is deliberately free of personality. The split
62
- is the one the wider ecosystem converged on: if SOUL.md answers "who are you?", AGENTS.md
63
- answers "what do you do, and how?" Mixing them makes both files harder to maintain — a
64
- tone change should never touch a procedure, and a workflow change should never risk the
65
- voice.
66
-
67
- WHAT THIS FILE IS FOR: the agent's job, stated as scope; how it works through a task;
68
- when and where it records things. Operational truth that holds whatever mood the prose
69
- in SOUL.md is in.
70
-
71
- WHAT IT IS NOT FOR: rules and boundaries (POLICY.md and the soul's <rules> block own
72
- those, and the rule counter budgets them), facts about the user (USER.md), or anything
73
- enforced in code — a procedure written here is advisory the way all prompt text is.
74
-
75
- STYLE: declarative first person — "I check X before Y", never "Check X before Y". This
76
- is not cosmetic: obligation-shaped lines (imperative openers, must/never/always) count
77
- against the same rule budget as everything else in the static tier, and a procedures
78
- file written as commands reads as twenty rules. Written as description, it reads as one
79
- job. The workspace command's authoring checks will tell you if a line counts.
80
- -->
81
-
82
- # What I do
83
-
84
- {{RESPONSIBILITIES}}
85
-
86
- # How I work
87
-
88
- {{WORKFLOW}}
89
-
90
- # How I use memory
91
-
92
- {{MEMORY_PROCEDURE}}
93
-
94
- <!-- ── Team ──────────────────────────────────────────────────────────────────────────
95
- Sub-agent responsibilities and handoff routing live here once delegation ships. This
96
- section stays commented out until then: comments are stripped before the model sees the
97
- file, and a visible instruction to "hand off to the research agent" on a runtime that
98
- cannot delegate yet produces confidently narrated handoffs that never happened.
99
-
100
- # Team
101
-
102
- - <sub-agent>: <what it owns, and what I hand it>
103
- - <sub-agent>: <what it owns, and what I hand it>
104
-
105
- What comes back from a sub-agent I treat as a draft to check, not a fact to repeat.
106
- ──────────────────────────────────────────────────────────────────────────────────── -->
107
- `,"POLICY.md":`---
108
- tier: static
109
- editable: none
110
- budget: 600
111
- ---
112
-
113
- <!--
114
- POLICY.md — the few standing boundaries worth prompt tokens.
115
-
116
- TIER 0. Sent every turn, cached, read-only. Budget: 600 tokens.
117
-
118
- READ THIS BEFORE WRITING ANYTHING HERE.
119
-
120
- This file is NOT a security control. Prompt-level restrictions are advisory: automated
121
- attacks defeat them on open-weight models at very high success rates, and patient
122
- multi-turn pressure defeats them with no tooling at all. Anything you need to be TRUE
123
- must be enforced in code at the tool boundary.
124
-
125
- Belongs in code, not here How to enforce it
126
- --------------------------------- --------------------------------------------
127
- Cannot spend money no payment tool, or approval middleware
128
- Cannot email arbitrary people recipient allowlist in the tool
129
- Cannot delete data no destructive tool bound to this agent
130
- Cannot read other users' data scoped credentials, per agent
131
- Cannot exceed a budget usage tracking in middleware
132
- Cannot touch production separate credentials per environment
133
-
134
- Belongs here
135
- ---------------------------------
136
- Tone under pressure
137
- When to defer rather than act
138
- What to decline, and how
139
- What to do when uncertain
140
-
141
- If you find yourself writing "never" about something that would be expensive if it
142
- happened, stop and write a wrapToolCall middleware instead.
143
-
144
- STATE THE REASON alongside each boundary. A boundary with a rationale generalises to
145
- situations you didn't enumerate; a bare prohibition only covers what it names.
146
-
147
- STYLE: match the target output, same as the identity file. Prose for chat agents.
148
-
149
- BUDGET: two or three items. They count against the same rule budget as the identity
150
- file, AGENTS.md, and
151
- REMINDER.md. Many agents need none — delete the file and the loader skips it.
152
- -->
153
-
154
- # Policy
155
-
156
- <!--
157
- Soft boundaries, each with its reason.
158
-
159
- Weak: Never share information about other people.
160
- Better: If something involves a person other than the user, ask what they want shared
161
- before including it — the user knows the relationship and I don't.
162
- -->
163
-
164
- {{BOUNDARIES}}
165
-
166
- <!--
167
- One line: what the agent does when it doesn't know, can't reach a tool, or hits an
168
- ambiguous request. A defined fallback measurably reduces confabulation and gives the
169
- agent somewhere to go other than guessing.
170
- -->
171
-
172
- {{UNCERTAINTY_BEHAVIOUR}}
173
- `,"USER.md":`---
174
- tier: volatile
175
- editable: append
176
- budget: 1500
177
- ---
178
-
179
- <!--
180
- USER.md — what the agent knows about the person it works for.
181
-
182
- TIER 1. Sent every turn, UNCACHED. Budget: 1500 tokens.
183
-
184
- You write this file. The agent reads it every turn. memory_write does not land
185
- here — that tool writes MEMORY.md, which declared eviction: oldest. This file
186
- is appendable so you can add a standing fact by hand; notes the agent saves
187
- have a budget and an overflow, and this file has neither.
188
-
189
- This file sits AFTER cache breakpoint A because the volatile tier changes:
190
- MEMORY.md is rewritten on every save, and a changing file ahead of the
191
- breakpoint would invalidate the cached prefix on every write with no error
192
- and no symptom beyond the bill.
193
-
194
- WHAT THIS FILE IS FOR: standing facts about the user — name, role, timezone,
195
- context, preferences they should not have to restate. Facts, not transcript:
196
- "prefers answers under a paragraph" belongs here; "asked about the weather on
197
- Tuesday" does not.
198
-
199
- WHAT IT IS NOT FOR: rules. An obligation written here escapes the rule budget's
200
- count (volatile is excluded — it holds facts about the person, not policy) but
201
- the model reads it like any other instruction, so a rule hidden here is a rule
202
- nobody budgeted for. Put rules in the soul's <rules> block and let the guard
203
- count them.
204
-
205
- WHAT IT IS NOT FOR: working notes. A save that lands here has no eviction and
206
- grows until the next load fails. Promote a settled fact from MEMORY.md into
207
- this file by hand.
208
-
209
- FORMAT: short declarative lines, one fact per line, in prose — not bullets.
210
- Models imitate form. Keep the authored part small and stable — every token
211
- here is paid on every turn.
212
- -->
213
-
214
- # {{USER}}
215
-
216
- {{USER_FACTS}}
217
-
218
- <!--
219
- Add standing facts below, one prose sentence each. Leave a line out rather than
220
- guessing. Timezone, how they like to be addressed, role and recurring people,
221
- length and tone, tools they always want or never want.
222
- -->
223
- `,"MEMORY.md":`---
224
- tier: volatile
225
- editable: replace
226
- budget: 2000
227
- eviction: oldest
228
- ---
229
-
230
- <!--
231
- MEMORY.md — the agent's working memory.
232
-
233
- TIER 1. Sent every turn, UNCACHED, agent-writable (replace + oldest-first eviction).
234
- Budget: 2000 tokens.
235
-
236
- memory_write lands here. The runtime resolves ONE write target — the writable
237
- volatile file that declared \`eviction: oldest\` — and the model never chooses a
238
- filename, because choosing would be a second decision on every save and that is
239
- the two-hop shape small models fail. Declared order does not decide it: USER.md
240
- is listed first and is writable, and saves still land HERE. That is why USER.md
241
- does not grow until the agent refuses to boot.
242
-
243
- WHAT THIS FILE IS FOR: state that matters across sessions but is not a durable
244
- fact about the user — open threads, decisions taken, things promised. It is
245
- capped and evicting by design: working memory that only ever grows becomes a
246
- second conversation history, paid for on every turn.
247
-
248
- WHAT IT IS NOT FOR: an archive. When something stops being working state and
249
- becomes a fact about the person, it belongs in USER.md; when it is reference
250
- material needed only sometimes, it belongs in knowledge/, which costs nothing
251
- on the turns that don't mention it.
252
-
253
- Leave the body empty below this comment. The agent fills it; you don't.
254
- -->
255
- `,"REMINDER.md":`---
256
- tier: reminder
257
- editable: none
258
- budget: 500
259
- ---
260
-
261
- <!--
262
- REMINDER.md — one or two rules, re-asserted where attention is strongest.
263
-
264
- TIER 2. Injected AFTER the conversation history, before retrieved memory and the current input.
265
- Budget: 500 tokens — and using a fraction of it is the point.
266
-
267
- Rule adherence decays over a conversation and compaction does not reliably reset it.
268
- Attention is stronger at both ends of the context than in the middle, so a rule stated
269
- once at the top of a thirty-turn session is effectively in the middle. This file re-states
270
- the one or two rules that must survive turn thirty, at the recency position.
271
-
272
- ONE OR TWO RULES. This is not a second policy file: everything here counts against the
273
- same rule budget as the rest of the static tier (the model does not know the text came from
274
- different files), and a reminder tier that grows into a policy file spends the position
275
- it exists to exploit.
276
-
277
- Pick the rule whose failure is most expensive — usually the confirm-before-consequences
278
- one — and restate it in the same words the identity file uses. Same words, not a paraphrase: two
279
- phrasings of one rule read as two rules.
280
-
281
- Omit this file entirely for short-lived agents; drift isn't a problem under ~10 turns.
282
- -->
283
-
284
- {{REMINDER_RULE}}
285
- `,"SOUL.md":`---
286
- tier: static
287
- budget: 1400
288
- ---
289
-
290
- <!--
291
- SOUL.md — the long-form identity document, in the style of a model constitution.
292
-
293
- This file ships ONLY to a model that meets context.soul.requires (a big window on a
294
- frontier-class id). Anything else gets SOUL.compact.md instead and never sees this file.
295
- Its premise is that a capable model, given enough understanding of the goals, can derive
296
- rules the author never wrote — so write it as explanation, not instruction.
297
-
298
- The <rules> block is the exception: rules survive distillation verbatim and hold on every
299
- model. Keep each rule to ONE LINE — the rule counter is line-based. The prose outside
300
- <rules> is exempt from rule counting for this file only; the compact file enjoys no such
301
- exemption.
302
-
303
- A soul owns WHO the agent is. Operations — responsibilities, workflows, team routing —
304
- live in AGENTS.md, which coexists with the soul; what must not exist is a second identity
305
- document in the same prefix, because two identities contradict each other.
306
-
307
- Every paragraph here is a starting point, not a script. The fastest way to a distinctive
308
- agent is rewriting "How I sound" in the voice you actually want back, then re-deriving
309
- SOUL.compact.md by hand to match. Edit this file first, the compact one second — never
310
- the reverse.
311
- -->
312
-
313
- # Who {{AGENT_NAME}} is
314
-
315
- {{SOUL_WHO}}
316
-
317
- {{SOUL_MEASURE}}
318
-
319
- # How I think about answers
320
-
321
- {{SOUL_ANSWERS}}
322
-
323
- <rules>
324
- {{RULE_CONFIRM}}
325
- {{RULE_HONESTY}}
326
- {{RULE_MEMORY}}
327
- </rules>
328
-
329
- # How I sound
330
-
331
- {{SOUL_VOICE}}
332
-
333
- ## How I talk
334
-
335
- <!--
336
- Three short exchanges, in the voice above. This is the highest-leverage section in the
337
- file and the main defence against generic output — an example demonstrates a voice that
338
- adjectives can only describe. Keep them varied: three examples about one topic produce
339
- an agent that steers every conversation toward it. The placeholders below are deliberate:
340
- the workspace command warns until you replace them with real exchanges.
341
- -->
342
-
343
- <example>
344
- {{USER}}: {{INPUT_1}}
345
- {{AGENT_NAME}}: {{REPLY_1}}
346
- </example>
347
-
348
- <example>
349
- {{USER}}: {{INPUT_2}}
350
- {{AGENT_NAME}}: {{REPLY_2}}
351
- </example>
352
-
353
- <example>
354
- {{USER}}: {{INPUT_3}}
355
- {{AGENT_NAME}}: {{REPLY_3}}
356
- </example>
357
-
358
- # What I refuse to become
359
-
360
- {{SOUL_REFUSE}}
361
- `,"SOUL.compact.md":`---
362
- tier: static
363
- budget: 800
364
- ---
365
-
366
- <!--
367
- Compact identity, derived from SOUL.md. This is the file small models actually run on, so
368
- every sentence here is paid for on every turn — keep it to the few that produce the voice.
369
- The long document stays the source of truth: edit it first, then re-derive this by hand.
370
-
371
- Unlike SOUL.md, EVERY line here counts against the rule budget, not just the <rules>
372
- block — a small model does not get the benefit of the derivation exemption, because it is
373
- precisely the model that cannot derive.
374
- -->
375
-
376
- # Who {{AGENT_NAME}} is
377
-
378
- {{SOUL_COMPACT_WHO}}
379
-
380
- # How I think about answers
381
-
382
- {{SOUL_COMPACT_ANSWERS}}
383
-
384
- <rules>
385
- {{RULE_CONFIRM}}
386
- {{RULE_HONESTY}}
387
- {{RULE_MEMORY}}
388
- </rules>
389
-
390
- # How I sound
391
-
392
- {{SOUL_COMPACT_VOICE}}
393
-
394
- ## How I talk
395
-
396
- <!-- The same three exchanges as SOUL.md, or trimmed variants — same voice, fewer words. -->
397
-
398
- <example>
399
- {{USER}}: {{INPUT_1}}
400
- {{AGENT_NAME}}: {{REPLY_1}}
401
- </example>
402
-
403
- <example>
404
- {{USER}}: {{INPUT_2}}
405
- {{AGENT_NAME}}: {{REPLY_2}}
406
- </example>
407
-
408
- <example>
409
- {{USER}}: {{INPUT_3}}
410
- {{AGENT_NAME}}: {{REPLY_3}}
411
- </example>
412
-
413
- # What I refuse to become
414
-
415
- {{SOUL_REFUSE}}
416
- `};function tn(n,t){return n.replace(/\{\{\s*([A-Za-z0-9_]+)\s*\}\}/g,(o,r)=>{let a=t[r];return a===void 0?o:a})}var A=[{slug:"now",note:"read-only: runs in parallel with other reads"},{slug:"memory_write",note:"mutating: serialises, holds a reserved write slot, never retried"},{slug:"artifact_read",note:"read-only: follows the pointer compaction leaves behind"}],ee=A.map((n)=>n.slug),Me=[{id:"openai",label:"OpenAI",modelId:"gpt-5-6-sol",baseUrl:"https://api.openai.com/v1",apiKeyEnv:"MODEL_API_KEY"},{id:"anthropic",label:"Anthropic (OpenAI-compatible endpoint)",modelId:"claude-sonnet-5",baseUrl:"https://api.anthropic.com/v1",apiKeyEnv:"MODEL_API_KEY"},{id:"deepseek",label:"DeepSeek",modelId:"deepseek-v4-flash",baseUrl:"https://api.deepseek.com/v1",apiKeyEnv:"MODEL_API_KEY"},{id:"ollama",label:"Ollama (local, no key)",modelId:"qwen3.5:9b",baseUrl:"http://localhost:11434/v1"},{id:"custom",label:"custom OpenAI-compatible endpoint or OpenRouter",modelId:"",baseUrl:"",apiKeyEnv:"MODEL_API_KEY"}];function at(n){return Me.find((t)=>t.id===n)}var b=[{value:"none",label:"no — the block is written commented, with an example"},{value:"daily",label:"a daily briefing at 08:00"},{value:"hourly",label:"an hourly check"}];function R(n){return b.find((t)=>t.value===n)}var u=[{value:"sandbox",label:"the sandbox",hint:"run it by name from anywhere"},{value:"here",label:"the current directory",hint:"every later command needs its path"},{value:"custom",label:"somewhere else",hint:"type a path"}];function L(n){return u.find((t)=>t.value===n)}function At(n,t,o){if(t===void 0)return;if(n==="sandbox")return`${o.agentDirBase}/${w(t)}`;if(n==="here")return`./${w(t)}`;return}var c=[{value:"none",label:"No — but it will know the web tools exist and can ask you to enable them",pinned:[]},{value:"fetch",label:"Read pages — it can open a URL you give it. No account or key needed",pinned:["web_fetch"]},{value:"search",label:"Search and read — needs an API key from a search provider",pinned:["web_search","web_fetch"]}];function O(n){return c.find((t)=>t.value===n)}var d=[{value:"tavily",label:"Tavily — built for agents, generous free tier",apiKeyEnv:"TAVILY_API_KEY"},{value:"brave",label:"Brave Search",apiKeyEnv:"BRAVE_API_KEY"},{value:"exa",label:"Exa — neural search, returns page excerpts",apiKeyEnv:"EXA_API_KEY"}];function nn(n){return d.find((t)=>t.value===n)}var Rt="COMPOSIO_API_KEY",m=[{value:"none",label:"No — but it will know the route exists and can tell you how to switch it on",pinned:[]},{value:"connected",label:"Yes — Gmail, Slack, Notion and ~1,000 more, via a Composio account",pinned:["composio_search","composio_connect"]}];function _(n){return m.find((t)=>t.value===n)}var rn="TELEGRAM_BOT_TOKEN",p=[{value:"none",label:"No — it is reachable through the CLI and the API only"},{value:"connected",label:"Yes — a Telegram bot, long-poll (needs no public URL)"}];function C(n){return p.find((t)=>t.value===n)}var g=[{value:"none",label:"No"},{value:"local",label:"Yes — HTTP, SSE and WebSocket on 127.0.0.1:7420"}];function U(n){return g.find((t)=>t.value===n)}var f=[{value:"none",label:"No — it runs while you have `serve` open in a terminal"},{value:"service",label:"Yes — in the background: starts at login, restarts on crash"}];function P(n){return f.find((t)=>t.value===n)}var lt=[{value:"find",label:"Yes — pick from the catalogue: real skills, tick as many as you want"},{value:"starter",label:"Yes — with one worked example to copy"},{value:"none",label:"An empty directory — the concept is there, the procedures are not"}];function M(n){return lt.find((t)=>t.value===n)}var l=[{value:"none",label:"No — it can talk and remember, and change its own settings when you ask",pinned:["config_read","config_set"],allow:["memory_write","config_set"]},{value:"read",label:"Read only — it can read and search files, but change nothing",pinned:["file_read","glob","grep","config_read","config_set"],allow:["memory_write","config_set"]},{value:"write",label:"Read and write files — confined to its own workspace, no shell",pinned:["file_read","file_write","file_edit","glob","grep","config_read","config_set"],allow:["memory_write","file_write","file_edit","config_set"]},{value:"full",label:"Yes — read and write files, run commands, and change its own configuration",pinned:["file_read","file_write","file_edit","glob","grep","exec","config_read","config_set"],allow:["memory_write","file_write","file_edit","exec","config_set"]}];function E(n){return l.find((t)=>t.value===n)}var Vn=["user","name","purpose","preset","model","baseUrl","apiKey","system","web","webBackend","webKey","composio","composioKey","telegram","telegramAllow","telegramToken","server","skills","daemon","dirChoice","dir"],It=new Set(["apiKey","webKey","composioKey","telegramToken"]);function w(n){let t=n.toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-+|-+$/g,"");return t===""?"agent":t}function Le(n,t){let o=n.preset===void 0?void 0:at(n.preset);for(let r of Vn){if(n[r]!==void 0)continue;if(r==="apiKey"&&o!==void 0&&o.apiKeyEnv===void 0)continue;if((r==="webBackend"||r==="webKey")&&n.web!=="search")continue;if(r==="dir"&&n.dirChoice!=="custom")continue;if(r==="dirChoice"&&n.dir!==void 0)continue;if(r==="composioKey"&&n.composio!=="connected")continue;if((r==="telegramToken"||r==="telegramAllow")&&n.telegram!=="connected")continue;if(r==="daemon"&&n.telegram!=="connected"&&n.server!=="local")continue;switch(r){case"user":return{step:r,prompt:"Your name",fallback:""};case"name":return{step:r,prompt:"The agent's name",fallback:""};case"purpose":return{step:r,prompt:"What is it for, in one line",fallback:"helping with whatever comes up"};case"preset":return{step:r,prompt:"Model endpoint",fallback:"1",options:Me.map((a)=>({value:a.id,label:a.label}))};case"model":return{step:r,prompt:"Model id",fallback:o?.modelId??""};case"baseUrl":return{step:r,prompt:"Base URL",fallback:o?.baseUrl??""};case"apiKey":return{step:r,prompt:"Model API key",fallback:"",optional:!0};case"system":return{step:r,prompt:"Can it act on this computer?",fallback:"1",options:l.map((a)=>({value:a.value,label:a.label}))};case"web":return{step:r,prompt:"Can it reach the internet?",fallback:"1",options:c.map((a)=>({value:a.value,label:a.label}))};case"webBackend":return{step:r,prompt:"Search backend",fallback:"1",options:d.map((a)=>({value:a.value,label:a.label}))};case"webKey":return{step:r,prompt:`${nn(n.webBackend??"tavily")?.label.split(" —")[0]??"Search"} API key`,fallback:"",optional:!0};case"composio":return{step:r,prompt:"Can it use your other apps?",fallback:"1",options:m.map((a)=>({value:a.value,label:a.label}))};case"composioKey":return{step:r,prompt:"Composio API key",fallback:"",optional:!0};case"telegram":return{step:r,prompt:"Can people message it on Telegram?",fallback:"1",options:p.map((a)=>({value:a.value,label:a.label}))};case"telegramAllow":return{step:r,prompt:"Your Telegram handle — who may message it",fallback:"",optional:!0};case"telegramToken":return{step:r,prompt:"Telegram bot token (from @BotFather)",fallback:"",optional:!0};case"server":return{step:r,prompt:"Serve the HTTP API?",fallback:"1",options:g.map((a)=>({value:a.value,label:a.label}))};case"skills":return{step:r,prompt:"Give it a skills directory? A skill is a procedure it follows when the turn calls for one.",fallback:"starter",options:lt.map((a)=>({value:a.value,label:a.label}))};case"daemon":return{step:r,prompt:"Keep it running in the background?",fallback:"1",options:f.map((a)=>({value:a.value,label:a.label}))};case"dirChoice":return{step:r,prompt:"Where should it live?",fallback:"1",options:u.map((a)=>({value:a.value,label:At(a.value,n.name,t)??a.label,hint:a.hint}))};case"dir":return{step:r,prompt:"Path to create it at",fallback:""}}}return}function hr(n){let t=n.trim();if(/\s/.test(t))return{ok:!1,reason:"is one handle, with no spaces — for example @moeen."};let o=t.startsWith("@")?t.slice(1):t;if(!/^[A-Za-z0-9_]{5,32}$/.test(o))return{ok:!1,reason:/-/.test(o)?"contains a hyphen, and a Telegram handle cannot — they are letters, digits and underscores only. Did you mean an underscore?":"is not a Telegram handle: 5-32 characters, letters, digits and underscores only. Leave it empty to allow nobody for now."};return{ok:!0,value:`@${o}`}}var K=/^[A-Z_][A-Z0-9_]*$/;function Ee(n,t){let o=t.trim();switch(n){case"user":case"name":case"model":case"purpose":return o===""?{ok:!1,reason:"cannot be empty."}:{ok:!0,value:o};case"preset":{let a=Me[Number(o)-1]??at(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${Me.length}, or a name: ${Me.map((s)=>s.id).join(", ")}.`}:{ok:!0,value:a.id}}case"web":{let a=c[Number(o)-1]??O(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${c.length}, or a name: ${c.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"webBackend":{let a=d[Number(o)-1]??nn(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${d.length}, or a name: ${d.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"webKey":case"composioKey":case"telegramToken":return{ok:!0,value:o};case"telegramAllow":{let r=o.trim();if(r==="")return{ok:!0,value:""};return hr(r)}case"telegram":{let a=p[Number(o)-1]??C(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${p.length}, or a name: ${p.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"server":{let a=g[Number(o)-1]??U(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${g.length}, or a name: ${g.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"schedules":{let a=b[Number(o)-1]??R(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${b.length}, or a name: ${b.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"skillsPick":return{ok:!0,value:o.trim()};case"skillsSearch":return{ok:!0,value:o.trim()};case"skills":{let a=lt[Number(o)-1]??M(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${lt.length}, or a name: ${lt.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"daemon":{let a=f[Number(o)-1]??P(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${f.length}, or a name: ${f.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"composio":{let a=m[Number(o)-1]??_(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${m.length}, or a name: ${m.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"baseUrl":{let r;try{r=new URL(o)}catch{return{ok:!1,reason:"must be an absolute URL, e.g. https://api.example.com/v1."}}if(r.protocol!=="http:"&&r.protocol!=="https:")return{ok:!1,reason:"only http and https are supported."};if(r.pathname.endsWith("/chat/completions"))return{ok:!1,reason:"must end at the version segment — the runtime appends /chat/completions itself."};return{ok:!0,value:o}}case"apiKeyEnv":return K.test(o)?{ok:!0,value:o}:{ok:!1,reason:"must be an env var name, like MODEL_API_KEY."};case"apiKey":return{ok:!0,value:o};case"serverToken":return{ok:!0,value:o};case"system":{let a=l[Number(o)-1]??E(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${l.length}, or a name: ${l.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"dirChoice":{let a=u[Number(o)-1]??L(o.toLowerCase());return a===void 0?{ok:!1,reason:`pick 1-${u.length}, or a name: ${u.map((s)=>s.value).join(", ")}.`}:{ok:!0,value:a.value}}case"dir":return o===""?{ok:!1,reason:"cannot be empty."}:{ok:!0,value:o}}}function W(n){let t=n.system,o=E(t)??l[0],r=o?.pinned.includes("exec")===!0,a=o?.pinned.includes("file_read")===!0,s=o?.pinned.includes("file_write")===!0,v=o===void 0||o.pinned.length===0?[" # Nothing is enabled. Add tools here and permit them in the policy block below."]:!a?[" # This agent cannot read, write or run anything. It CAN read this file and change it when"," # you ask — which is how you turn the rest on without editing YAML yourself."," #"," # It is told which tools exist and are not enabled, so ask it for something it cannot do"," # and it will name the tool and offer to add it. A change takes effect on the next start."," #"," # To enable them by hand instead, add to pinned:"," # file_read, glob, grep read and search files"," # file_write, file_edit change files, confined to workspace/"," # exec run shell commands — the confinement does not bind it"]:r?[" # This agent can read and change files and run shell commands. What it may run is decided"," # by the policy block below — narrow it, and prefer the file tools over the shell, whose"," # target a rule cannot see inside a command string."," #"," # Writes are confined to workspace/. To open another directory, give the system"," # provider a writeRoots list — the agent cannot add one to itself, by design."," # That confinement binds the file tools and NOT exec, whose target lives inside a"," # shell string no path check can see."]:s?[" # This agent can read files and change them, and cannot run commands. That combination",' # is the only one in which "confined to workspace/" is a true statement — a shell'," # carries its target inside a string no path check can look inside."," #"," # To open another directory, give the system provider a writeRoots list. The agent"," # cannot add one to itself, by design."]:[" # This agent can read and search files and change nothing. Reading is still not nothing:"," # anything it reads can carry text a stranger wrote, which is why the write gate exists."," #"," # Reading is not confined; changing things would be, but nothing here changes things."],N=o?.pinned??[],y=O(n.web)?.pinned??[],k=I(n);return[" # ── providers: where tools come from ──",...v," #"," # Several may be configured at once — this is a map, not a choice. Each block is that"," # provider's own configuration and it refuses a key it does not read."," providers:"," system: {}",...r?[" # system: { writeRoots: [~/code/my-project] } # absolute, or relative to this file"]:[],"",...y.length===0?[" # Named with nothing pinned. It cannot reach the internet, and it knows the two"," # tools exist and will tell you which one to enable rather than saying it can't."," # web_fetch needs no key; web_search needs one, named here:"," # web: { backend: tavily, apiKeyEnv: TAVILY_API_KEY } # tavily | brave | exa"," web: {}"]:k===void 0?[" # Reading pages only. No key and no account: web_fetch takes a URL you or the"," # person gave it. To add search, pick a backend and name its variable:"," # web: { backend: tavily, apiKeyEnv: TAVILY_API_KEY } # tavily | brave | exa"," web: {}"]:[" # Search and page reading. The key lives in the .env beside this file; this names"," # only the variable, and a literal key here fails validation."," web:",` backend: ${k.value}`,` apiKeyEnv: ${k.apiKeyEnv}`]," # Addresses on this machine or this network are refused and no setting permits them."," # Neither tool can change anything, but what they return is text a stranger wrote — so it"," # is fenced as data, and a tool that CHANGES something needs an allow rule after one runs.","",...B(n),""," # What the model is actually given, from any provider above. A slug no configured provider"," # has fails the load naming it — nothing is ever dropped quietly."," pinned:",...N.map((h)=>` - ${h}`),...y.map((h)=>` - ${h}`),...y.includes("web_search")?[]:[" # - web_search"],...y.includes("web_fetch")?[]:[" # - web_fetch"],...x(n).map((h)=>` - ${h}`),...dt(n)?[" # App tools land here once composio_search has found them — ask the agent for what"," # you want and it writes the slug itself. A slug typed in by hand needs",` # \`${e.slug} tools . --warm\` first: boot resolves from a cache and makes no`," # request, so an unwarmed slug fails the load rather than fetching."," # - GMAIL_FETCH_EMAILS"," # - composio_workbench # runs Python in Composio's sandbox, under no rule here"]:[" # - GMAIL_FETCH_EMAILS"]]}function dt(n){return n.composio==="connected"}function x(n){return _(n.composio)?.pinned??[]}var Y=["composio_connect","composio_workbench"];function H(n){return Y.includes(n)}function B(n){let t=[" # Your other apps — Gmail, Slack, Notion, ~1,000 more — through a Composio account."," # Two tools do the setup: composio_search finds what a task needs and saves the"," # definitions, composio_connect returns the sign-in link. Ask the agent for an app and it"," # pins the slug itself with config_set; the new tool is live after a restart."];if(!dt(n))return[...t," # Named with nothing pinned, so it knows the route exists and can tell you the line"," # to add. To switch it on: pin the two tools below, put a key in .env, and give this"," # block the two settings shown here.",` # composio: { apiKeyEnv: ${Rt}, userId: default }`," composio: {}"];return[...t," composio:",` apiKeyEnv: ${Rt}`," # Whose accounts these are, in Composio's terms — not a name of yours. One person on",' # one machine wants "default", and a connection made under it is reused by every later'," # session. Change it only to keep two people's accounts apart on one agent."," userId: default"]}function D(n){let t=E(n.system)??l[0],o=t?.pinned.includes("exec")===!0,r=[...t?.allow??[],...x(n).filter(H)],a=[" # ── which calls run, which ask, and which are refused ──"," # deny wins over allow, first match, and being more specific never reorders that. A rule"," # naming a primary content field — exec(command:rm *) — is refused at load, because a"," # compound command defeats it and a rule that can be defeated reads as protection."," #"," # Below every setting here is a floor that cannot be lowered: rm -rf / and rm -rf ~,"," # --no-preserve-root, fork bombs, mkfs, and dd to a block device are never permitted."," policy:"," mode: allow # allow | ask | deny — for calls no rule mentions"];if(r.length===0)return[...a," allow: []"," deny: []"," onNoApprover: deny"];return[...a," # Authorises these even once untrusted content has entered the turn. Remove one and that"," # tool stops working for the rest of any turn that has read a file — which is the gate"," # doing its job, and worth choosing on purpose rather than discovering."," allow:",...r.map((s)=>` - "${s}"`),...o?[" deny:"," # Narrow these to taste. A pattern matches the command, and every part of a",' # compound must match for an allow — so "git status && rm -rf x" is not allowed'," # by exec(git status:*).",' - "exec(rm *)"',' - "exec(sudo *)"']:[" deny: []"],' onNoApprover: deny # what "ask" means with nobody to ask — a schedule, a pipe']}function Yn(n){let t=F(n);return[{relPath:"agent.yaml",contents:q(n)},...["SOUL.md","SOUL.compact.md","AGENTS.md","POLICY.md","USER.md","MEMORY.md","REMINDER.md"].map((o)=>({relPath:`workspace/${o}`,contents:tn(T[o],t)})),...n.skills==="starter"?[{relPath:"skills/starter/SKILL.md",contents:tn(Zn,t)}]:[{relPath:"skills/.keep",contents:""}],{relPath:"knowledge/.keep",contents:""},{relPath:".env.example",contents:Q(n)},{relPath:".env",contents:z(n)},{relPath:".gitignore",contents:`.env
417
- `}]}function F(n){let{user:t,name:o,purpose:r}=n,a="I confirm before anything that sends, spends, schedules, or deletes, because I'm wired into live systems and mistakes there are expensive.",s=`When I don't know something I say so and offer to go find out, rather than producing something plausible and letting ${t} discover the difference later.`,v=`When ${t} tells me something worth keeping — a fact about them, a preference, a decision — I save it with memory_write in the same turn, because the conversation is not memory and a new session starts without it.`;return{AGENT_NAME:o,USER:t,WHEN_NOT_TO_USE_KEY:Re(),SKILL_NAME:"starter",RULE_CONFIRM:"I confirm before anything that sends, spends, schedules, or deletes, because I'm wired into live systems and mistakes there are expensive.",RULE_HONESTY:s,RULE_MEMORY:v,SOUL_WHO:`I'm ${o}. I work with ${t}, and this is what I'm for: ${r}. `+"The relationship is the point — I'm not a search box; I'm closer to a colleague "+`who holds context so ${t} doesn't have to.`,SOUL_MEASURE:"The measure of whether I'm working is not how impressive my answers are — it's "+`whether ${t}'s day runs smoother because I was in it.`,SOUL_ANSWERS:`I lead with the answer and put the reasoning after it, when the reasoning is worth having. Disagreement is part of the job: if I think an idea is bad I say so once, plainly, with the reason, and then help with it anyway if ${t} still wants it. When I'm unsure I name the part I'm unsure about instead of hedging the whole `+"answer into mush — an unhelpful answer isn't the safe one, it just moves the cost "+`somewhere ${t} can't see it.`,SOUL_VOICE:"I write the way people write to each other: plain sentences, no headers, no bullet lists unless there's genuinely a list. Short is a courtesy. I skip performed "+"enthusiasm and padded pleasantries — warmth, where it shows, is in remembering "+`things ${t} didn't ask me to remember.`,SOUL_REFUSE:"A yes-machine. The moment I optimise for sounding agreeable over being right, I stop being worth talking to.",SOUL_COMPACT_WHO:`I'm ${o}. I work with ${t} — ${r}. The measure of whether I'm working is whether ${t}'s day runs smoother because I was in it.`,SOUL_COMPACT_ANSWERS:"I lead with the answer and put the reasoning after it. When I'm unsure I name the part I'm unsure about instead of hedging the whole answer into mush.",SOUL_COMPACT_VOICE:"I write plain sentences: no headers, no bullet lists unless there's genuinely a list. Short is a courtesy.",RESPONSIBILITIES:`My job: ${r}. A task ${t} hands me stays mine until it's done, handed `+`back, or blocked — and when it's blocked, ${t} hears what's blocking it rather than silence.`,WORKFLOW:`I look at what I already know — the files in my context and what ${t} told me `+`earlier — before asking ${t} to repeat themselves. For anything with more than one step I say the plan in a line first, so a wrong direction costs one message instead of the whole job. Work that touches live systems goes through the confirmation rule in my identity file.`,MEMORY_PROCEDURE:`USER.md is the standing picture of ${t} — name, role, preferences they wrote. `+`MEMORY.md is my working notes: when ${t} tells me something worth keeping I save it with memory_write in the same turn, and those notes come back every turn until older ones overflow into the memory directory, where they return when the question matches. Earlier conversations are searched the same way. When a saved note and what ${t} just said disagree, the person wins and I correct the note.`,BOUNDARIES:`If something involves a person other than ${t}, I ask what they want shared `+`before including it — ${t} knows the relationship and I don't.`,UNCERTAINTY_BEHAVIOUR:`When I can't reach a tool or a request is ambiguous, I say which part is unclear and ask, because guessing just moves the cost somewhere ${t} can't see it.`,USER_FACTS:`${t} is the person I work for.
418
- What they brought me in for: ${r}.`,REMINDER_RULE:"I confirm before anything that sends, spends, schedules, or deletes, because I'm wired into live systems and mistakes there are expensive."}}var i=(n)=>`# ── ${n} ${"─".repeat(Math.max(1,88-n.length))}`;function G(n){if(n.telegram!=="connected")return[i("channels — not configured"),"# Reachable through the CLI and the API only.","#",'# You do not have to edit this by hand: ask the agent — "put yourself on Telegram" —',"# and it writes the block below with config_set, then tells you which variable to fill","# in. Two things stay yours either way, and it will say so rather than doing them:","# the token, because .env is protected, and allowFrom, because who may talk to it is","# not its decision. Get a token from @BotFather with /newbot.","#","# allowFrom is INBOUND ONLY, and omitting it permits nobody — which is safe and","# workable: message the bot and the log prints the exact line to paste here.","# channels:","# - type: telegram","# id: tg",`# tokenEnv: ${rn}`,"# mode: longpoll",'# allowFrom: ["@your-handle"]',"# delivery:","# default: tg",""];let t=n.telegramAllow??"";return[i("channels"),"# Long-poll: no public URL, no inbound firewall rule. Switch to webhook by setting","# mode: webhook and webhookUrl once this runtime has a public HTTPS address.","#","# The bot connects AFTER the runtime is ready and never blocks it — a bad token surfaces",`# as an event and the HTTP surface keeps serving. Only \`${e.slug} serve\` starts it;`,`# \`${e.slug} run\` builds the same agent with channels switched off.`,"channels:"," - type: telegram"," id: tg # the channel segment of every session key it produces",` tokenEnv: ${rn}`," mode: longpoll # or webhook, with webhookUrl below",` # webhookUrl: https://your-host/v1/channels/tg/webhook/${w(n.name)}`,...t===""?[" # INBOUND ONLY, and an empty list permits nobody — which is the safe default."," # Message the bot and the log prints the exact line to paste here."," allowFrom: []"]:[" # INBOUND ONLY. It grants nothing on delivery, and omitting it permits nobody.",` allowFrom: ["${t}"]`],"","# Where a turn with no origin goes — a scheduled run, or an API call asking for delivery.","delivery:"," default: tg",""]}function j(n){let t=n.server==="local";return[i("http api"),`# ${t?"Loopback only":'Off — ask the agent to "turn on your HTTP API" and it flips this'}.`,"# A non-loopback host REFUSES to start without a token, and host and tokenEnv are the two","# fields the agent may not change: an agent that runs shell commands, exposed on 0.0.0.0,","# looks identical to a safe one until someone finds it.","server:",` enabled: ${t}`," host: 127.0.0.1"," port: 7420",` tokenEnv: ${e.envPrefix}API_TOKEN`,""]}function V(n){let t=[i("schedules"),`# Only \`${e.slug} serve\` fires these. \`run\` reconciles them so they are listed and`,"# validated, and starts no timer.","#","# cron observes DST: an occurrence whose local time does not exist on a spring-forward day","# is SKIPPED, and a repeated fall-back hour fires ONCE. Avoid 00:00-03:00 and neither","# applies. every is interval-anchored and ignores DST. Each fire carries a fixed offset","# derived from the id — at most a tenth of the interval, capped at 15 minutes — so many","# schedules do not hit one endpoint at the same instant.","#",'# deliver is required: { channel, to }, or the literal "none" for the event stream only.'];if(n.schedules==="daily")return[...t,"schedules:"," - id: morning-brief"," kind: cron",' expr: "0 8 * * *" # 08:00 in the timezone below',` timezone: ${S()}`,' task: "Summarise what is on today and anything left over from yesterday."',' deliver: none # or { channel: tg, to: "@your-handle" } once a channel exists',""];if(n.schedules==="hourly")return[...t,"schedules:"," - id: hourly-check"," kind: every"," expr: 1h",' task: "Check for anything that needs attention and say nothing if all is well."',' deliver: none # or { channel: tg, to: "@your-handle" } once a channel exists',""];return[...t,"# schedules:","# - id: morning-brief","# kind: cron # cron | every | at",'# expr: "0 8 * * *" # cron: 5 or 6 field | every: "15m" | at: ISO 8601',`# timezone: ${S()}`,'# task: "Summarise the day ahead."',"# deliver: none",""]}function S(){return Intl.DateTimeFormat().resolvedOptions().timeZone||"UTC"}function q(n){let t=w(n.name),o=[`# ${n.name} — generated by \`${e.slug} init\`.`,"#","# Everything active below is what init configured; everything commented arrives with the","# phase named beside it, and is REFUSED AT LOAD if uncommented early — the runtime never","# silently ignores configuration. docs/02-SPEC-MANIFEST.md is the binding reference.","",`apiVersion: ${e.apiVersion}`,`id: ${t}`,`name: ${n.name}`,"",i("model"),"model:"," main:",` id: ${n.model}`," # Must end at the version segment; the runtime appends /chat/completions itself.",` baseUrl: ${n.baseUrl}`," # Both take ${VAR} if you would rather set them from the environment — a container, say."," # The KEY never goes here in either form; the manifest names its variable, below."];if(n.apiKeyEnv!==void 0)o.push(" # The *name* of an env var, never a value — a literal key fails validation.",` apiKeyEnv: ${n.apiKeyEnv}`);return o.push(" temperature: 0.3"," # reasoningEffort: none # none | minimal | low | medium | high — a reasoning model"," # # bills its thinking to the output budget; verify per endpoint"," # topP: 0.95"," # maxTokens: 4096"," # streamUsage: true # OpenAI extension; needed for real token counts on Ollama"," # Override the shipped capability registry only when it is wrong for your endpoint."," # capabilities:"," # contextWindow: 32768"," # thinking: none # none | anthropic | openai | deepseek"," # promptStyle: # how workspace files render for this model (Phase 3.5)"," # delimiters: plain # xml | markdown | plain"," # intensity: emphatic # emphatic | neutral | soft",""," # A cheap model for tool selection and summarisation. `$ref` reuses a role."," # selector:"," # id: a-cheaper-model",` # baseUrl: ${n.baseUrl}`," # compactor: { $ref: model.selector }","",i("context"),"context:"," workspace: ./workspace",""," # Tier 0 — cached, read-only. Identity is NOT listed here: the soul below (or its"," # distilled compact file) ships it. AGENTS.md is operations — what the agent does,"," # not who it is — which is why the two coexist."," static:"," - AGENTS.md"," - POLICY.md",""," # Tier 1 — after the cache breakpoint, so a memory write never invalidates the prefix."," volatile:"," - USER.md"," - MEMORY.md",""," # Tier 2 — re-asserted after the history, where attention is strongest."," reminder: REMINDER.md",""," # How much of the window to keep free for the reply, so the prompt cannot crowd it out."," # This is NOT a cap on what the model may generate — nothing is sent as max_tokens unless"," # you set model.main.maxTokens. Generous because a reasoning model thinks here too."," reserveOutput: 8192",""," # Capability-gated identity: SOUL.md ships only to a model meeting `requires`; anything"," # else gets the hand-edited compact file. Edit SOUL.md first, then re-derive"," # SOUL.compact.md to match — never the reverse."," soul:"," file: SOUL.md",' requires: { contextWindow: ">=200000", class: frontier }'," onUnmet: distill"," distilled: SOUL.compact.md",""," # Defaults shown; uncomment to change. Budgets fail the load naming the file — never"," # silent truncation."," # observationMaxTokens: 2000"," # budgets: { static: 2000, volatile: 3500, reminder: 500, total: 6000 }"," # rules:",` # perRuleSuccess: 0.90 # measure with \`${e.slug} eval rules\`, do not guess`," # reliabilityTarget: 0.80 # at 0.90 per rule this permits TWO rules, not four"," # onExceed: fail","",i("tools"),"tools:"," # Config only, never auto-detected: behaviour must not drift when the model changes."," dialect: nlt",""," # Built-in tools, resolved from memory. Never sent to a remote provider."," local:",...A.map((r)=>` - ${r.slug.padEnd(14)}# ${r.note}`),""," budget:"," max: 24"," reserveWrite: 6 # slots held for mutating tools so reads cannot starve writes","",...W(n),""," # tools.search finds a TOOL in the provider's catalogue — nothing to do with web search."," # Off by design in v1: search-then-execute is two-hop reasoning, where small models fail."," search:"," enabled: false","",...D(n),""," # ── the write gate ──"," # A tool whose output came from outside this conversation taints the turn. After that, a"," # tool that CHANGES something needs explicit authorisation — one of the allow rules above,",' # or a live approval. "refuse" never prompts, which is what makes it right for a schedule.'," untrusted:"," onMutate: refuse # refuse | confirm | allow","",i("limits"),"limits:"," # Generous, because a step budget is not a plan. The old default here was 6 — sized for a"," # two-tool chain, call/observe/call/observe/reply and one spare — and it cut a real agent"," # off one step after it had installed the dependency it needed, with the reply ending on",' # "Let me install it". Real work recovers, and recovery costs steps.'," maxSteps: 40"," # This is what catches a model that is stuck rather than working: identical consecutive"," # calls, same tool AND same arguments. Two is a retry, often correct. Three is a pattern."," noProgress:"," identicalCalls: 3"," # Both of these were overridden here at 120000 and 30000, tighter than the defaults for no"," # stated reason — and 6 steps x 30s already exceeded the 120s turn, so the wall clock would"," # have fired first on slow tools. The schema defaults are 1800000 and 120000; uncomment to"," # change them rather than to restate them."," # turnTimeoutMs: 1800000"," # toolTimeoutMs: 120000","",...G(n),...j(n),i("later phases — refused at load until they ship"),"# Phase 7 — phase-scoped tool visibility (the strongest published small-model lever)","# phases:",'# triage: { entry: true, allow: ["now"] }','# act: { allow: ["*"] }',"","# Skills — procedures the harness selects from the turn's input, at most maxActive per turn.","# The model does not choose one; ranking happens before the turn. `skills list` shows them.","skills:"," dir: ./skills"," maxActive: 1"," threshold: 0.35 # normalised floor; below it nothing activates"," # # there is no token budget: maxActive is the only limit, and a"," # # skill's size is shown in the catalogue where you choose it","","# Memory — what carries across sessions. Retrieved per turn and BM25-ranked, never pinned:",'# slot 10 is retrieved, and compaction may drop it. `memory search <agent> "..."` shows what a',"# question would recall; `memory rebuild <agent>` re-reads the notes and the conversations.","memory:"," retriever: fts5"," dir: ./memory # where eviction files older notes. Indexed, never carried;"," # # created on first eviction, so its absence is not an error"," maxActive: 5"," threshold: 0.2 # lexical relevance × original-query coverage × recency"," budget: 2000 # a ceiling, not a target. One exchange bills about 370 tokens"," includeHistory: true # index clean prose, not only what was deliberately saved."," # # Tool output and replies derived from it are never indexed: text a"," # # stranger wrote must not outlive the write gate","","# Knowledge — reference material that activates only on the turns that mention it. Tier 3:","# retrieved, never pinned, outside the workspace budget, and compaction may drop it.","# Every .md in that directory is an entry and must open with frontmatter naming its","# keywords, so a plain README.md there fails the load. An entry looks like:","# ---","# keywords: [invoice, billing, VAT]","# ---","# Whatever this agent should know whenever one of those words comes up.","knowledge:"," dir: ./knowledge"," maxActive: 2 # entries in one turn"," budget: 600 # total across them. One entry over this fails the load: it could"," # # never activate, and silently unreachable is the wrong answer."," # # Matching is whole-word and case-insensitive against the input","",...V(n),"# Phase 9 — plugins","# plugins:",`# - "${e.packageScope}/channel-telegram"`,""),o.join(`
419
- `)}function z(n){let t=["# Secrets for this agent. Gitignored, and the only thing that belongs here.","# Everything else — model, endpoint, tools, permissions — is in agent.yaml."];if(n.apiKeyEnv!==void 0)t.push(`${n.apiKeyEnv}=${n.apiKey??""}`);let o=I(n);if(o!==void 0)t.push(""),t.push(`# ${o.label.split(" —")[0]??o.value}, for web_search.`),t.push(`${o.apiKeyEnv}=${n.webKey??""}`);if(dt(n))t.push(""),t.push("# Composio, for your other apps. Needed to warm the cache and to execute."),t.push(`${Rt}=${n.composioKey??""}`);if(n.telegram==="connected")t.push(""),t.push("# Telegram. From @BotFather with /newbot; /revoke invalidates it immediately."),t.push(`${rn}=${n.telegramToken??""}`);if(n.serverToken!==void 0&&n.serverToken!=="")t.push(""),t.push("# The HTTP API's bearer token. Generated — replace it whenever you like."),t.push(`${e.envPrefix}API_TOKEN=${n.serverToken}`);return`${t.join(`
420
- `)}
421
- `}function I(n){if(n.web!=="search")return;return nn(n.webBackend??"tavily")??d[0]}function Q(n){let t=I(n),o=["# Copy to .env beside the manifest and fill in the values. Never commit the copy.","# Only secrets belong here. The model, the endpoint, the tools and the permissions are all","# in agent.yaml, where you can read them without opening a second file.",""];if(n.apiKeyEnv===void 0)o.push("# This endpoint needs no key — agent.yaml omits apiKeyEnv entirely, so there is nothing","# to put here yet. A hosted endpoint would name its variable there and you would set it","# here, like:","# MODEL_API_KEY=");else o.push(`${n.apiKeyEnv}=`);if(t!==void 0)o.push("",`# ${t.label.split(" —")[0]??t.value}, for web_search.`),o.push(`${t.apiKeyEnv}=`);if(dt(n))o.push("","# Composio, for your other apps."),o.push(`${Rt}=`);return`${o.join(`
422
- `)}
423
- `}
424
- export{Zn,tn,Me,at,At,nn,Rt,rn,lt,Vn,It,Le,hr,Ee,dt,Yn};
425
-
426
- //# debugId=5F94BA4A0E024FBD64756E2164756E21
427
- //# sourceMappingURL=index-bry9bzt3.js.map