@mono-agent/agent-app 0.5.1 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/adapter-send-tools.d.ts +7 -7
- package/dist/adapter-send-tools.d.ts.map +1 -1
- package/dist/adapter-send-tools.js +59 -50
- package/dist/adapter-send-tools.js.map +1 -1
- package/dist/app.js +8 -8
- package/dist/app.js.map +1 -1
- package/dist/channels.js +3 -3
- package/dist/channels.js.map +1 -1
- package/dist/cli.d.ts +14 -10
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +197 -162
- package/dist/cli.js.map +1 -1
- package/dist/config-reference.js +4 -4
- package/dist/config-reference.js.map +1 -1
- package/dist/consumer-contract.d.ts.map +1 -1
- package/dist/consumer-contract.js +5 -3
- package/dist/consumer-contract.js.map +1 -1
- package/dist/doctor.d.ts.map +1 -1
- package/dist/doctor.js +126 -5
- package/dist/doctor.js.map +1 -1
- package/dist/init.d.ts +11 -22
- package/dist/init.d.ts.map +1 -1
- package/dist/init.js +25 -116
- package/dist/init.js.map +1 -1
- package/dist/interaction-bridge.d.ts +3 -3
- package/dist/interaction-bridge.d.ts.map +1 -1
- package/dist/memory-recall.d.ts +2 -2
- package/dist/memory-recall.d.ts.map +1 -1
- package/dist/memory-recall.js +3 -3
- package/dist/memory-recall.js.map +1 -1
- package/dist/modules/base.d.ts +25 -0
- package/dist/modules/base.d.ts.map +1 -0
- package/dist/{recipes → modules}/base.js +16 -11
- package/dist/modules/base.js.map +1 -0
- package/dist/modules/catalog.d.ts +12 -0
- package/dist/modules/catalog.d.ts.map +1 -0
- package/dist/modules/catalog.js +412 -0
- package/dist/modules/catalog.js.map +1 -0
- package/dist/modules/index.d.ts +8 -0
- package/dist/modules/index.d.ts.map +1 -0
- package/dist/modules/index.js +5 -0
- package/dist/modules/index.js.map +1 -0
- package/dist/modules/known-tools.d.ts +44 -0
- package/dist/modules/known-tools.d.ts.map +1 -0
- package/dist/modules/known-tools.js +88 -0
- package/dist/modules/known-tools.js.map +1 -0
- package/dist/modules/types.d.ts +73 -0
- package/dist/modules/types.d.ts.map +1 -0
- package/dist/{recipes → modules}/types.js +3 -3
- package/dist/{recipes → modules}/types.js.map +1 -1
- package/dist/posted-message-index.d.ts +2 -2
- package/dist/posted-message-index.js +2 -2
- package/dist/wizard/answers.d.ts +85 -0
- package/dist/wizard/answers.d.ts.map +1 -0
- package/dist/wizard/answers.js +231 -0
- package/dist/wizard/answers.js.map +1 -0
- package/dist/wizard/from-flags.d.ts +26 -0
- package/dist/wizard/from-flags.d.ts.map +1 -0
- package/dist/wizard/from-flags.js +44 -0
- package/dist/wizard/from-flags.js.map +1 -0
- package/dist/wizard/index.d.ts +11 -0
- package/dist/wizard/index.d.ts.map +1 -0
- package/dist/wizard/index.js +6 -0
- package/dist/wizard/index.js.map +1 -0
- package/dist/wizard/presets.d.ts +40 -0
- package/dist/wizard/presets.d.ts.map +1 -0
- package/dist/wizard/presets.js +85 -0
- package/dist/wizard/presets.js.map +1 -0
- package/dist/wizard/prompts.d.ts +52 -0
- package/dist/wizard/prompts.d.ts.map +1 -0
- package/dist/wizard/prompts.js +141 -0
- package/dist/wizard/prompts.js.map +1 -0
- package/dist/wizard/run.d.ts +19 -0
- package/dist/wizard/run.d.ts.map +1 -0
- package/dist/wizard/run.js +345 -0
- package/dist/wizard/run.js.map +1 -0
- package/package.json +17 -16
- package/schema/mono-agent.config.schema.json +5 -3
- package/skills/mono-agent-composer/SKILL.md +7 -7
- package/skills/mono-agent-composer/references/config-blueprint.md +7 -7
- package/skills/mono-agent-composer/references/discovery-questions.md +8 -6
- package/skills/mono-agent-composer/references/feature-coverage.md +10 -8
- package/skills/mono-agent-composer/references/package-map.md +5 -5
- package/skills/mono-agent-composer/references/playbooks.md +22 -22
- package/skills/mono-agent-composer/references/validation.md +3 -3
- package/dist/recipes/base.d.ts +0 -15
- package/dist/recipes/base.d.ts.map +0 -1
- package/dist/recipes/base.js.map +0 -1
- package/dist/recipes/catalog.d.ts +0 -4
- package/dist/recipes/catalog.d.ts.map +0 -1
- package/dist/recipes/catalog.js +0 -525
- package/dist/recipes/catalog.js.map +0 -1
- package/dist/recipes/index.d.ts +0 -11
- package/dist/recipes/index.d.ts.map +0 -1
- package/dist/recipes/index.js +0 -14
- package/dist/recipes/index.js.map +0 -1
- package/dist/recipes/types.d.ts +0 -70
- package/dist/recipes/types.d.ts.map +0 -1
- package/dist/setup.d.ts +0 -29
- package/dist/setup.d.ts.map +0 -1
- package/dist/setup.js +0 -97
- package/dist/setup.js.map +0 -1
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
import { stat } from "node:fs/promises";
|
|
2
|
+
import { basename, join } from "node:path";
|
|
3
|
+
import * as p from "@clack/prompts";
|
|
4
|
+
import { findModule } from "../modules/catalog.js";
|
|
5
|
+
import { ALLOW_ALL_TOOLS, BUILTIN_TOOL_NAMES, isAllowAllTools } from "../modules/known-tools.js";
|
|
6
|
+
import { alwaysOnTools, composeWizardPlan, defaultAnswers, recommendedToolSelection, } from "./answers.js";
|
|
7
|
+
import { findPreset, presetAnswers } from "./presets.js";
|
|
8
|
+
import { channelSelectOptions, guard, memorySelectOptions, modelSelectOptions, presetSelectOptions, toolMultiselectOptions, WizardCancelled, } from "./prompts.js";
|
|
9
|
+
const LOCAL_PROVIDER_MODEL = /^pi:(?:ollama|lmstudio):/u;
|
|
10
|
+
const SANDBOXABLE_TOOLS = new Set(["Bash", "Write", "Edit"]);
|
|
11
|
+
/**
|
|
12
|
+
* The interactive `init` wizard: a colourful, step-by-step flow that COLLECTS a
|
|
13
|
+
* {@link WizardAnswers} and hands it back — it never writes anything. The caller
|
|
14
|
+
* (`runInit`) does the scaffold/validate/print. Ctrl-C at any prompt unwinds
|
|
15
|
+
* through {@link WizardCancelled} to a single clean `p.cancel`, so a cancelled
|
|
16
|
+
* wizard leaves the folder untouched.
|
|
17
|
+
*/
|
|
18
|
+
export async function runInitWizard(ctx) {
|
|
19
|
+
try {
|
|
20
|
+
const answers = await collectAnswers(ctx);
|
|
21
|
+
return { status: "answers", answers };
|
|
22
|
+
}
|
|
23
|
+
catch (error) {
|
|
24
|
+
if (error instanceof WizardCancelled) {
|
|
25
|
+
p.cancel("Cancelled — nothing was written.");
|
|
26
|
+
return { status: "cancelled" };
|
|
27
|
+
}
|
|
28
|
+
throw error;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/** Walk the flow (preset or custom), returning the fully collected answers. */
|
|
32
|
+
async function collectAnswers(ctx) {
|
|
33
|
+
p.intro("mono-agent init — let's build your agent");
|
|
34
|
+
const choice = guard(await p.select({
|
|
35
|
+
message: "Start from…",
|
|
36
|
+
options: presetSelectOptions(),
|
|
37
|
+
initialValue: "__custom__",
|
|
38
|
+
}));
|
|
39
|
+
return choice === "__custom__"
|
|
40
|
+
? await collectCustom(ctx)
|
|
41
|
+
: await collectFromPreset(ctx, choice);
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* The full custom flow: model → channels → memory → per-module inputs → tools →
|
|
45
|
+
* sandbox (only if code tools were chosen) → observability → summary.
|
|
46
|
+
*/
|
|
47
|
+
async function collectCustom(ctx) {
|
|
48
|
+
const draft = draftFrom(defaultAnswers());
|
|
49
|
+
// 1. Model.
|
|
50
|
+
const model = guard(await p.select({
|
|
51
|
+
message: "Which model?",
|
|
52
|
+
options: modelSelectOptions(),
|
|
53
|
+
initialValue: "claude:claude-sonnet-4-6",
|
|
54
|
+
}));
|
|
55
|
+
draft.model = model === "__other__"
|
|
56
|
+
? guard(await p.text({
|
|
57
|
+
message: "Model reference",
|
|
58
|
+
placeholder: "pi:ollama:llama3.1:8b",
|
|
59
|
+
validate: (v) => (v ?? "").trim().length === 0
|
|
60
|
+
? "Enter a provider:model reference (e.g. pi:ollama:llama3.1:8b)"
|
|
61
|
+
: undefined,
|
|
62
|
+
}))
|
|
63
|
+
: model;
|
|
64
|
+
// Optional fallback chain.
|
|
65
|
+
if (guard(await p.confirm({ message: "Add fallback models?", initialValue: false }))) {
|
|
66
|
+
const raw = guard(await p.text({
|
|
67
|
+
message: "Fallback models (comma-separated)",
|
|
68
|
+
placeholder: "codex:gpt-5.5, pi:ollama:llama3.1:8b",
|
|
69
|
+
}));
|
|
70
|
+
draft.fallbackModels = splitCsv(raw);
|
|
71
|
+
}
|
|
72
|
+
// 2. Channels.
|
|
73
|
+
const channels = guard(await p.multiselect({
|
|
74
|
+
message: "How will you talk to this agent?",
|
|
75
|
+
options: channelSelectOptions(),
|
|
76
|
+
initialValues: ["channel:webhook"],
|
|
77
|
+
required: false,
|
|
78
|
+
}));
|
|
79
|
+
draft.channels = [...channels];
|
|
80
|
+
// 3. Memory (before per-module inputs so a memory module's inputs are prompted).
|
|
81
|
+
const memory = guard(await p.select({
|
|
82
|
+
message: "Should the agent remember across conversations?",
|
|
83
|
+
options: memorySelectOptions(),
|
|
84
|
+
initialValue: "",
|
|
85
|
+
}));
|
|
86
|
+
draft.memory = memory === "" ? undefined : memory;
|
|
87
|
+
// 4. Per-module (non-secret) inputs for the chosen channels + memory.
|
|
88
|
+
await promptModuleInputs(draft);
|
|
89
|
+
// 5. Tools.
|
|
90
|
+
await promptTools(draft);
|
|
91
|
+
// 6. Sandbox — only meaningful once shell/file tools are in play. Allow-all
|
|
92
|
+
// includes Bash/Write/Edit, so the sandbox question must still appear under it.
|
|
93
|
+
if (isAllowAllTools(draft.allowedTools) || draft.allowedTools.some((tool) => SANDBOXABLE_TOOLS.has(tool))) {
|
|
94
|
+
draft.sandbox = guard(await p.confirm({
|
|
95
|
+
message: "Sandbox shell/file tools? (native srt, localhost-only network, fails closed if srt is missing)",
|
|
96
|
+
initialValue: true,
|
|
97
|
+
}));
|
|
98
|
+
}
|
|
99
|
+
// 7. Observability.
|
|
100
|
+
draft.observability = guard(await p.confirm({
|
|
101
|
+
message: "Export traces to Phoenix (best-effort OTLP, sensitive data excluded)?",
|
|
102
|
+
initialValue: false,
|
|
103
|
+
}));
|
|
104
|
+
// 8. Summary + final confirm.
|
|
105
|
+
await confirmSummary(draft, ctx);
|
|
106
|
+
return toWizardAnswers(draft);
|
|
107
|
+
}
|
|
108
|
+
/**
|
|
109
|
+
* The preset flow: the preset fixes model/channels/memory/sandbox/observability,
|
|
110
|
+
* so we only prompt its per-module inputs, let the operator adjust tools, and
|
|
111
|
+
* confirm the summary.
|
|
112
|
+
*/
|
|
113
|
+
async function collectFromPreset(ctx, presetId) {
|
|
114
|
+
const preset = findPreset(presetId);
|
|
115
|
+
// presetSelectOptions only offers known ids; guard defensively regardless.
|
|
116
|
+
if (preset === undefined) {
|
|
117
|
+
throw new WizardCancelled();
|
|
118
|
+
}
|
|
119
|
+
p.log.step(`Preset: ${preset.title}`);
|
|
120
|
+
const draft = draftFrom(presetAnswers(preset));
|
|
121
|
+
await promptModuleInputs(draft);
|
|
122
|
+
await promptTools(draft);
|
|
123
|
+
await confirmSummary(draft, ctx);
|
|
124
|
+
return toWizardAnswers(draft);
|
|
125
|
+
}
|
|
126
|
+
/**
|
|
127
|
+
* Prompt every non-secret input of the selected channel + memory modules and store
|
|
128
|
+
* the answers into `draft.moduleInputs`. Secret inputs are never prompted — they
|
|
129
|
+
* only ever surface as `.env.example` placeholders.
|
|
130
|
+
*/
|
|
131
|
+
async function promptModuleInputs(draft) {
|
|
132
|
+
const moduleIds = [...draft.channels, ...(draft.memory === undefined ? [] : [draft.memory])];
|
|
133
|
+
for (const id of moduleIds) {
|
|
134
|
+
const module = findModule(id);
|
|
135
|
+
if (module === undefined) {
|
|
136
|
+
continue;
|
|
137
|
+
}
|
|
138
|
+
for (const input of module.inputs) {
|
|
139
|
+
if (input.secret === true) {
|
|
140
|
+
continue;
|
|
141
|
+
}
|
|
142
|
+
const answer = guard(await p.text({
|
|
143
|
+
message: `${module.title}: ${input.label}`,
|
|
144
|
+
placeholder: input.description,
|
|
145
|
+
...(input.default === undefined ? {} : { defaultValue: input.default }),
|
|
146
|
+
}));
|
|
147
|
+
const trimmed = answer.trim();
|
|
148
|
+
if (trimmed.length > 0) {
|
|
149
|
+
(draft.moduleInputs[module.id] ??= {})[input.id] = trimmed;
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
/** Short reasons annotating each always-on tool in the framing note. */
|
|
155
|
+
const ALWAYS_ON_TOOL_REASONS = {
|
|
156
|
+
MemoryRecall: "memory recall is on",
|
|
157
|
+
};
|
|
158
|
+
/** The always-on tool names annotated with their reason, e.g. `MemoryRecall (memory recall is on)`. */
|
|
159
|
+
function alwaysOnDisplay(alwaysOn) {
|
|
160
|
+
return alwaysOn.map((tool) => {
|
|
161
|
+
const reason = ALWAYS_ON_TOOL_REASONS[tool];
|
|
162
|
+
return reason === undefined ? tool : `${tool} (${reason})`;
|
|
163
|
+
});
|
|
164
|
+
}
|
|
165
|
+
/**
|
|
166
|
+
* The channel-contributed send/ask tools for the enabled channels (PascalCase),
|
|
167
|
+
* minus the channel-agnostic `AskUser` (surfaced on its own line). Reuses the
|
|
168
|
+
* multiselect option builder so the framing note can never drift from the picker.
|
|
169
|
+
*/
|
|
170
|
+
function channelSendTools(channels) {
|
|
171
|
+
return toolMultiselectOptions(channels)
|
|
172
|
+
.slice(BUILTIN_TOOL_NAMES.length)
|
|
173
|
+
.map((option) => option.value)
|
|
174
|
+
.filter((value) => value !== "AskUser");
|
|
175
|
+
}
|
|
176
|
+
/**
|
|
177
|
+
* The three tool families, explained before the allow-all decision so the operator
|
|
178
|
+
* knows what "Allow all" turns on and what is unaffected by the choice:
|
|
179
|
+
* 1. Always on — auto-provisioned, NOT gated by this choice (e.g. MemoryRecall).
|
|
180
|
+
* 2. Built-ins — file/shell/web tools.
|
|
181
|
+
* 3. Channel tools — the send/ask tools that came with the channels you enabled,
|
|
182
|
+
* plus AskUser (ask the human, any channel).
|
|
183
|
+
*/
|
|
184
|
+
function toolSituationFraming(draft, alwaysOn) {
|
|
185
|
+
const sends = channelSendTools(draft.channels);
|
|
186
|
+
const channelLine = sends.length > 0
|
|
187
|
+
? `Channel tools (from the channels you enabled): ${sends.join(", ")}, plus AskUser (ask the human, any channel).`
|
|
188
|
+
: "Channel tools: AskUser (ask the human, any channel).";
|
|
189
|
+
return [
|
|
190
|
+
alwaysOn.length > 0
|
|
191
|
+
? `Always on (auto-provisioned, not affected by this choice): ${alwaysOnDisplay(alwaysOn).join(", ")}.`
|
|
192
|
+
: "Always on (auto-provisioned): none for this setup.",
|
|
193
|
+
"Built-ins: files (Read/Write/Edit/Glob/Grep), shell (Bash), web (WebFetch/WebSearch).",
|
|
194
|
+
channelLine,
|
|
195
|
+
'"Allow all" turns on every built-in and channel tool; you can turn specific tools off later via tools.disallowedTools.',
|
|
196
|
+
].join("\n");
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* The tools step: frame the three tool families, then a single "Allow all tools?"
|
|
200
|
+
* confirm (default yes → `["*"]`). Choosing "No" drops into the specific-tool
|
|
201
|
+
* multiselect. Always-on tools (MemoryRecall/ReadSkill/MCP) are auto-provisioned and
|
|
202
|
+
* are surfaced only for clarity — never gated by this choice.
|
|
203
|
+
*/
|
|
204
|
+
async function promptTools(draft) {
|
|
205
|
+
const alwaysOn = alwaysOnTools(toWizardAnswers(draft));
|
|
206
|
+
p.note(toolSituationFraming(draft, alwaysOn), "Tools");
|
|
207
|
+
const allowAll = guard(await p.confirm({
|
|
208
|
+
message: "Allow all tools? (recommended — the model can use every built-in and your channels' tools)",
|
|
209
|
+
initialValue: true,
|
|
210
|
+
}));
|
|
211
|
+
if (allowAll) {
|
|
212
|
+
draft.allowedTools = [ALLOW_ALL_TOOLS];
|
|
213
|
+
return;
|
|
214
|
+
}
|
|
215
|
+
await pickSpecificTools(draft);
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* The "choose specific tools" multiselect, pre-checking the recommended selection for
|
|
219
|
+
* the current capabilities. An empty selection loops back unless the operator confirms
|
|
220
|
+
* the chat-only warning. The final list is ordered by the option order so
|
|
221
|
+
* `tools.allowedTools` is deterministic regardless of toggle order.
|
|
222
|
+
*/
|
|
223
|
+
async function pickSpecificTools(draft) {
|
|
224
|
+
const options = toolMultiselectOptions(draft.channels);
|
|
225
|
+
const optionOrder = new Map(options.map((option, index) => [option.value, index]));
|
|
226
|
+
const recommended = recommendedToolSelection(toWizardAnswers(draft));
|
|
227
|
+
for (;;) {
|
|
228
|
+
const tools = guard(await p.multiselect({
|
|
229
|
+
message: "Which tools may the model call?",
|
|
230
|
+
options,
|
|
231
|
+
initialValues: [...recommended],
|
|
232
|
+
required: false,
|
|
233
|
+
}));
|
|
234
|
+
if (tools.length === 0) {
|
|
235
|
+
const proceed = guard(await p.confirm({
|
|
236
|
+
message: "⚠ Zero tools selected — the agent will be chat-only (cannot read files, run commands, or send proactively). Continue?",
|
|
237
|
+
initialValue: false,
|
|
238
|
+
}));
|
|
239
|
+
if (!proceed) {
|
|
240
|
+
continue;
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
draft.allowedTools = [...tools].sort((a, b) => (optionOrder.get(a) ?? 0) - (optionOrder.get(b) ?? 0));
|
|
244
|
+
return;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* Render the compact plan summary and ask for the single write-time confirmation.
|
|
249
|
+
* Provider modules are implementation detail (auto-added for local models), so
|
|
250
|
+
* they are excluded from the user-facing capabilities line. A "no" cancels.
|
|
251
|
+
*/
|
|
252
|
+
async function confirmSummary(draft, ctx) {
|
|
253
|
+
if (LOCAL_PROVIDER_MODEL.test(draft.model)) {
|
|
254
|
+
p.note("A matching local provider block is added automatically.\nThe first turn may be slow while the model loads.", "Local model");
|
|
255
|
+
}
|
|
256
|
+
const answers = toWizardAnswers(draft);
|
|
257
|
+
const plan = composeWizardPlan(answers, {
|
|
258
|
+
dirBasename: basename(ctx.cwd),
|
|
259
|
+
skillsRootExists: await pathExists(join(ctx.cwd, "skills")),
|
|
260
|
+
});
|
|
261
|
+
const capabilities = plan.selectedModules
|
|
262
|
+
.filter((module) => module.kind !== "provider")
|
|
263
|
+
.map((module) => module.title);
|
|
264
|
+
const writes = ["mono-agent.config.json", "IDENTITY.md"];
|
|
265
|
+
if (plan.envExample !== undefined) {
|
|
266
|
+
writes.push(".env.example");
|
|
267
|
+
}
|
|
268
|
+
for (const file of plan.files) {
|
|
269
|
+
writes.push(file.path);
|
|
270
|
+
}
|
|
271
|
+
const secrets = plan.secrets.map((secret) => secret.envVar);
|
|
272
|
+
const toolsLine = isAllowAllTools(draft.allowedTools)
|
|
273
|
+
? "all tools"
|
|
274
|
+
: draft.allowedTools.length > 0
|
|
275
|
+
? draft.allowedTools.join(", ")
|
|
276
|
+
: "none (chat-only)";
|
|
277
|
+
const alwaysOn = alwaysOnTools(answers);
|
|
278
|
+
const lines = [
|
|
279
|
+
`Model: ${draft.model}${draft.fallbackModels.length > 0 ? ` (fallbacks: ${draft.fallbackModels.join(", ")})` : ""}`,
|
|
280
|
+
`Capabilities: ${capabilities.length > 0 ? capabilities.join(", ") : "none"}`,
|
|
281
|
+
`Tools: ${toolsLine}`,
|
|
282
|
+
...(alwaysOn.length > 0 ? [`Always on: ${alwaysOnDisplay(alwaysOn).join(", ")}`] : []),
|
|
283
|
+
`Writes: ${writes.join(", ")}`,
|
|
284
|
+
`Secrets: ${secrets.length > 0 ? `${secrets.join(", ")} → .env.example` : "none"}`,
|
|
285
|
+
];
|
|
286
|
+
p.note(lines.join("\n"), "Review");
|
|
287
|
+
if (!guard(await p.confirm({ message: "Write these files?", initialValue: true }))) {
|
|
288
|
+
throw new WizardCancelled();
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
/** Seed a mutable draft from immutable answers (defaults or a preset). */
|
|
292
|
+
function draftFrom(answers) {
|
|
293
|
+
const moduleInputs = {};
|
|
294
|
+
for (const [moduleId, values] of Object.entries(answers.moduleInputs)) {
|
|
295
|
+
const bag = {};
|
|
296
|
+
for (const [key, value] of Object.entries(values)) {
|
|
297
|
+
if (value !== undefined) {
|
|
298
|
+
bag[key] = value;
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
moduleInputs[moduleId] = bag;
|
|
302
|
+
}
|
|
303
|
+
return {
|
|
304
|
+
model: answers.model,
|
|
305
|
+
fallbackModels: [...answers.fallbackModels],
|
|
306
|
+
channels: [...answers.channels],
|
|
307
|
+
memory: answers.memory,
|
|
308
|
+
sandbox: answers.sandbox,
|
|
309
|
+
observability: answers.observability,
|
|
310
|
+
allowedTools: [...answers.allowedTools],
|
|
311
|
+
moduleInputs,
|
|
312
|
+
};
|
|
313
|
+
}
|
|
314
|
+
/**
|
|
315
|
+
* Freeze a draft back into {@link WizardAnswers}. `memory` is omitted entirely when
|
|
316
|
+
* undefined (exactOptionalPropertyTypes: an optional key must be absent, not
|
|
317
|
+
* `undefined`).
|
|
318
|
+
*/
|
|
319
|
+
function toWizardAnswers(draft) {
|
|
320
|
+
return {
|
|
321
|
+
model: draft.model,
|
|
322
|
+
fallbackModels: [...draft.fallbackModels],
|
|
323
|
+
channels: [...draft.channels],
|
|
324
|
+
...(draft.memory === undefined ? {} : { memory: draft.memory }),
|
|
325
|
+
sandbox: draft.sandbox,
|
|
326
|
+
observability: draft.observability,
|
|
327
|
+
allowedTools: [...draft.allowedTools],
|
|
328
|
+
moduleInputs: draft.moduleInputs,
|
|
329
|
+
};
|
|
330
|
+
}
|
|
331
|
+
/** Split a comma-separated string into trimmed, non-empty entries. */
|
|
332
|
+
function splitCsv(value) {
|
|
333
|
+
return value.split(",").map((entry) => entry.trim()).filter(Boolean);
|
|
334
|
+
}
|
|
335
|
+
/** True when `path` exists (a local mirror of the CLI's private helper). */
|
|
336
|
+
async function pathExists(path) {
|
|
337
|
+
try {
|
|
338
|
+
await stat(path);
|
|
339
|
+
return true;
|
|
340
|
+
}
|
|
341
|
+
catch {
|
|
342
|
+
return false;
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
//# sourceMappingURL=run.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
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EAAE,MAAM,EAAE,KAAK,CAAC,MAAM,EAAE,CAAC;QAC/D,OAAO,EAAE,KAAK,CAAC,OAAO;QACtB,aAAa,EAAE,KAAK,CAAC,aAAa;QAClC,YAAY,EAAE,CAAC,GAAG,KAAK,CAAC,YAAY,CAAC;QACrC,YAAY,EAAE,KAAK,CAAC,YAAY;KACjC,CAAC;AACJ,CAAC;AAED,sEAAsE;AACtE,SAAS,QAAQ,CAAC,KAAa;IAC7B,OAAO,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC;AACvE,CAAC;AAED,4EAA4E;AAC5E,KAAK,UAAU,UAAU,CAAC,IAAY;IACpC,IAAI,CAAC;QACH,MAAM,IAAI,CAAC,IAAI,CAAC,CAAC;QACjB,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mono-agent/agent-app",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.6.0",
|
|
4
4
|
"description": "Config-first mono-agent host: builds a responder and starts every configured communication channel and traceability from one mono-agent.config.json.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -25,22 +25,23 @@
|
|
|
25
25
|
"README.md"
|
|
26
26
|
],
|
|
27
27
|
"dependencies": {
|
|
28
|
+
"@clack/prompts": "^1.7.0",
|
|
28
29
|
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
29
|
-
"@mono-agent/agent-contracts": "0.
|
|
30
|
-
"@mono-agent/agent-harness": "0.
|
|
31
|
-
"@mono-agent/config": "0.
|
|
32
|
-
"@mono-agent/cron-adapter": "0.
|
|
33
|
-
"@mono-agent/operator-adapter": "0.
|
|
34
|
-
"@mono-agent/memory": "0.
|
|
35
|
-
"@mono-agent/memory-supermemory": "0.
|
|
36
|
-
"@mono-agent/observability": "0.
|
|
37
|
-
"@mono-agent/openai-api-adapter": "0.
|
|
38
|
-
"@mono-agent/runtime-adapter": "0.
|
|
39
|
-
"@mono-agent/session-web": "0.
|
|
40
|
-
"@mono-agent/slack-adapter": "0.
|
|
41
|
-
"@mono-agent/telegram-adapter": "0.
|
|
42
|
-
"@mono-agent/tui": "0.
|
|
43
|
-
"@mono-agent/webhook-adapter": "0.
|
|
30
|
+
"@mono-agent/agent-contracts": "0.6.0",
|
|
31
|
+
"@mono-agent/agent-harness": "0.6.0",
|
|
32
|
+
"@mono-agent/config": "0.6.0",
|
|
33
|
+
"@mono-agent/cron-adapter": "0.6.0",
|
|
34
|
+
"@mono-agent/operator-adapter": "0.6.0",
|
|
35
|
+
"@mono-agent/memory": "0.6.0",
|
|
36
|
+
"@mono-agent/memory-supermemory": "0.6.0",
|
|
37
|
+
"@mono-agent/observability": "0.6.0",
|
|
38
|
+
"@mono-agent/openai-api-adapter": "0.6.0",
|
|
39
|
+
"@mono-agent/runtime-adapter": "0.6.0",
|
|
40
|
+
"@mono-agent/session-web": "0.6.0",
|
|
41
|
+
"@mono-agent/slack-adapter": "0.6.0",
|
|
42
|
+
"@mono-agent/telegram-adapter": "0.6.0",
|
|
43
|
+
"@mono-agent/tui": "0.6.0",
|
|
44
|
+
"@mono-agent/webhook-adapter": "0.6.0",
|
|
44
45
|
"zod": "^4.4.3"
|
|
45
46
|
},
|
|
46
47
|
"publishConfig": {
|
|
@@ -482,7 +482,9 @@
|
|
|
482
482
|
"items": {
|
|
483
483
|
"type": "string"
|
|
484
484
|
},
|
|
485
|
-
"default": [
|
|
485
|
+
"default": [
|
|
486
|
+
"*"
|
|
487
|
+
]
|
|
486
488
|
},
|
|
487
489
|
"disallowedTools": {
|
|
488
490
|
"description": "Configures disallowedTools for the tools section.",
|
|
@@ -819,7 +821,7 @@
|
|
|
819
821
|
"additionalProperties": false,
|
|
820
822
|
"properties": {
|
|
821
823
|
"host": {
|
|
822
|
-
"description": "Loopback host for the app-owned
|
|
824
|
+
"description": "Loopback host for the app-owned AskUser/tool-progress bridge.",
|
|
823
825
|
"examples": [
|
|
824
826
|
"127.0.0.1"
|
|
825
827
|
],
|
|
@@ -841,7 +843,7 @@
|
|
|
841
843
|
"additionalProperties": false,
|
|
842
844
|
"properties": {
|
|
843
845
|
"timeoutMs": {
|
|
844
|
-
"description": "Maximum wait for one
|
|
846
|
+
"description": "Maximum wait for one AskUser question.",
|
|
845
847
|
"examples": [
|
|
846
848
|
600000
|
|
847
849
|
],
|
|
@@ -59,23 +59,23 @@ Everything below runs in the user's agent folder, not the workspace.
|
|
|
59
59
|
|
|
60
60
|
## Composition Flow
|
|
61
61
|
|
|
62
|
-
1. **Discover.** Read `references/discovery-questions.md` and resolve: runtime model + backup models, channels, identity/knowledge, skills, tools/MCP, memory strategy, sandbox, observability, and the acceptance smoke test. Then run `mono-agent
|
|
63
|
-
2. **Scaffold.** In the user's folder, prefer the
|
|
62
|
+
1. **Discover.** Read `references/discovery-questions.md` and resolve: runtime model + backup models, channels, identity/knowledge, skills, tools/MCP, memory strategy, sandbox, observability, and the acceptance smoke test. Then run `mono-agent presets list` (and `mono-agent presets show <id>`) for a saved answer-set matching the user's intent; `references/playbooks.md` is the prose companion. If a preset fits, use it as the starting shape. The six presets are `starter`, `telegram-assistant`, `telegram-supermemory`, `slack-bot`, `local-private`, and `code-sandbox`; shapes with no preset (an OpenAI-API gateway, cron digest, A2A provider, Phoenix-observed, or a full multi-channel build) are hand-assembled from the capability modules and playbooks.
|
|
63
|
+
2. **Scaffold.** In the user's folder, prefer the preset path when one fits — scaffold non-interactively with `--yes` (the composer is not the interactive `init` wizard):
|
|
64
64
|
|
|
65
65
|
```bash
|
|
66
|
-
mono-agent init --
|
|
66
|
+
mono-agent init --preset <id> --yes [--with slack,cron] [--dry-run] # preset + .env.example + checklist
|
|
67
67
|
mono-agent init --model <ref> [--fallback-models <csv>] [--memory lite|journal|bujo] # bare scaffold
|
|
68
68
|
```
|
|
69
69
|
|
|
70
|
-
Either writes a `mono-agent.config.json
|
|
70
|
+
Either writes a `mono-agent.config.json` (with `tools.allowedTools` pre-filled from the selected capabilities' recommended tools), an `IDENTITY.md` that references any knowledge files already present, and `.mono-agent/` working directories (presets also emit a `.env.example` and any extra files). `--dry-run` previews without writing. It never overwrites existing files.
|
|
71
71
|
3. **Configure.** Edit `mono-agent.config.json` to match the discovery answers. Read `references/config-blueprint.md` for the full annotated config shape: every channel section, skills, MCP, memory, sandbox, and fallback models. Run `mono-agent config` to see the resolved configuration field-by-field with each value tagged `env` / `json` / `default` — the fastest way to confirm a value came from where you intended.
|
|
72
72
|
4. **Validate.**
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
|
-
mono-agent validate [--
|
|
75
|
+
mono-agent validate [--preset <id>] [--consumer <path>]
|
|
76
76
|
```
|
|
77
77
|
|
|
78
|
-
Fix every `[error]` section. `[waiting]` channels are fine — they are simply not configured yet. With `--
|
|
78
|
+
Fix every `[error]` section. `[waiting]` channels are fine — they are simply not configured yet. Watch the **Tools & MCP** section: allow-all (the default) shows `All tools allowed`, an **explicit empty** `tools.allowedTools: []` reports `waiting` (the no-tools trap), and an unknown tool name in a specific allowlist is flagged with a "did you mean" hint. With `--preset`, the report also flags any capability the preset promised that is not yet live. Re-run until the report says the config is ready.
|
|
79
79
|
5. **Start and smoke.**
|
|
80
80
|
|
|
81
81
|
```bash
|
|
@@ -93,7 +93,7 @@ Config-first covers one responder served over any combination of the seven chann
|
|
|
93
93
|
- `references/discovery-questions.md` — the question sequence and which config keys each answer fills.
|
|
94
94
|
- `references/config-blueprint.md` — annotated `mono-agent.config.json` covering every section, plus the folder layout and programmatic escape hatch.
|
|
95
95
|
- `references/feature-coverage.md` — every framework feature mapped to config / CLI / code / dev-tooling coverage; the answer to "can the config do X?".
|
|
96
|
-
- `references/playbooks.md` — end-to-end recipes (persona → config block → `init`/`validate`/`start`/smoke). Check for a matching
|
|
96
|
+
- `references/playbooks.md` — end-to-end recipes (persona → config block → `init`/`validate`/`start`/smoke). Check for a matching preset or playbook before hand-assembling a config.
|
|
97
97
|
- `references/package-map.md` — which package owns what, for programmatic composition and troubleshooting.
|
|
98
98
|
- `references/validation.md` — validation commands and per-channel smoke tests; read before claiming the agent works.
|
|
99
99
|
|
|
@@ -103,10 +103,10 @@ my-agent/
|
|
|
103
103
|
"consolidation": { "enabled": true, "cron": "0 */2 * * *" } // default: every two hours
|
|
104
104
|
},
|
|
105
105
|
|
|
106
|
-
//
|
|
106
|
+
// Tool policy (allow-all by default) + MCP servers. Deny wins; overlap is rejected.
|
|
107
107
|
"tools": {
|
|
108
|
-
"allowedTools": ["
|
|
109
|
-
"disallowedTools": ["Bash"],
|
|
108
|
+
"allowedTools": ["*"], // omit or ["*"] = all tools; ["Read","Bash"] = just those; [] = none (chat-only)
|
|
109
|
+
"disallowedTools": ["Bash"], // deny wins even under allow-all; the escape hatch to subtract one tool
|
|
110
110
|
"mcpConfigPath": "./mcp.json" // stdio/sse/http servers; inlined for SDK runtimes
|
|
111
111
|
},
|
|
112
112
|
|
|
@@ -278,12 +278,12 @@ my-agent/
|
|
|
278
278
|
## Lifecycle
|
|
279
279
|
|
|
280
280
|
```bash
|
|
281
|
-
mono-agent
|
|
282
|
-
mono-agent
|
|
283
|
-
mono-agent init --
|
|
281
|
+
mono-agent presets list # saved answer-sets (id, risk, description)
|
|
282
|
+
mono-agent presets show <id> # generated config + .env.example + follow-up checklist
|
|
283
|
+
mono-agent init --preset <id> --yes [--with slack,cron] [--dry-run] # scaffold from a preset (non-interactive)
|
|
284
284
|
mono-agent init --model claude:claude-sonnet-4-6 --fallback-models pi:ollama:gemma4:31b [--memory lite|journal|bujo]
|
|
285
285
|
mono-agent config # resolved config field-by-field, each value tagged env/json/default
|
|
286
|
-
mono-agent validate [--
|
|
286
|
+
mono-agent validate [--preset <id>] [--consumer <path>] # per-section report; --preset also checks the preset's capabilities
|
|
287
287
|
mono-agent start # traceability + every configured channel
|
|
288
288
|
mono-agent restart # apply config edits (config is JSON-first; restart to re-apply)
|
|
289
289
|
mono-agent restart --force # restart AND purge persisted pi sessions (fresh start; durable memory kept)
|
|
@@ -66,15 +66,17 @@ Fills: `context.skillsRoot`, `context.selectedSkills`, optionally `context.skill
|
|
|
66
66
|
Question:
|
|
67
67
|
|
|
68
68
|
```text
|
|
69
|
-
What tools
|
|
69
|
+
What tools does the agent need?
|
|
70
70
|
|
|
71
|
-
1.
|
|
72
|
-
2.
|
|
73
|
-
3.
|
|
74
|
-
4.
|
|
71
|
+
1. Allow all tools (recommended — the default: every built-in + enabled channels' send tools)
|
|
72
|
+
2. Allow all, but deny a few by name (tools.disallowedTools)
|
|
73
|
+
3. A specific allowlist of built-in / channel tools
|
|
74
|
+
4. Chat-only, no tools (explicit tools.allowedTools: [])
|
|
75
|
+
|
|
76
|
+
Plus, independently: MCP servers from an mcp.json config file?
|
|
75
77
|
```
|
|
76
78
|
|
|
77
|
-
Fills: `tools.allowedTools`, `tools.disallowedTools` (denylist wins), `tools.mcpConfigPath`.
|
|
79
|
+
Fills: `tools.allowedTools`, `tools.disallowedTools` (denylist wins, even under allow-all), `tools.mcpConfigPath`. The default is allow-all (`["*"]`) — write that unless the user asks to narrow. Under allow-all the adapter-derived send tools (`SlackSendMessage` / `TelegramSendMessage` / …) are auto-available once the channel is enabled; only a **specific** allowlist needs their exact names added. Valid enabled Slack/Telegram adapter config and destination allowlists are required either way. On the pi-native runtime `disallowedTools` does not filter external MCP-server tools — to withhold one, don't declare its server.
|
|
78
80
|
|
|
79
81
|
## 6. Memory Strategy
|
|
80
82
|
|
|
@@ -35,16 +35,16 @@ Every framework capability and how a composed agent reaches it. This table is th
|
|
|
35
35
|
| Config-aware memory preview CLI (stats/today/show/search/top for the configured backend; local search warns and falls back to FTS-only when embeddings are down) | cli | `mono-agent memory stats\|today\|show <date>\|search <query>\|top [--limit <n>] [--json]` |
|
|
36
36
|
| Memory liveness check (root writable; provider-specific Ollama checks only when embeddings/chat use Ollama; BuJo LLM config + consolidation cadence — loud warn, no silent fallback) | cli | `mono-agent validate` |
|
|
37
37
|
| Host summaries appended after runs | config | `memory.writeMode: "append-host-summary"` |
|
|
38
|
-
| Auto-provisioned read-only `
|
|
38
|
+
| Auto-provisioned read-only `MemoryRecall` tool (hybrid keyword+semantic search) exposed to the agent from the single memory config; no chat LLM | config | `config.memory.recallTool.enabled` (`MONO_AGENT_MEMORY_RECALL_TOOL_ENABLED`, default on for journal/bujo with embeddings) |
|
|
39
39
|
|
|
40
40
|
## Tools, MCP, sandbox
|
|
41
41
|
|
|
42
42
|
| Capability | Coverage | Where |
|
|
43
43
|
| --- | --- | --- |
|
|
44
|
-
|
|
|
45
|
-
| Tool allow/deny lists (deny wins) | config | `tools.allowedTools`, `tools.disallowedTools` |
|
|
44
|
+
| Allow-all tool policy (omitted / `["*"]` = all tools; `[]` = none) | config | default `tools.allowedTools`; the harness no-policy safety net is `failClosedToolPolicy()` |
|
|
45
|
+
| Tool allow/deny lists (deny wins, even under allow-all; pi doesn't deny external MCP tools) | config | `tools.allowedTools`, `tools.disallowedTools` |
|
|
46
46
|
| MCP servers (stdio/sse/http) from a JSON file | config | `tools.mcpConfigPath` |
|
|
47
|
-
| Adapter-derived send tools for enabled Slack/Telegram adapters | config | `tools.allowedTools` must include `
|
|
47
|
+
| Adapter-derived send tools for enabled Slack/Telegram adapters | config | auto-available under allow-all once the channel is enabled; a **specific** `tools.allowedTools` must include `SlackSendMessage` / `TelegramSendMessage`; valid `slack.*` / `telegram.*` config and existing adapter allowlists provide credentials and destination bounds |
|
|
48
48
|
| Sandbox on/off + srt engine | config | `sandbox.mode` |
|
|
49
49
|
| Network policy (none/localhost/allowlist/all) | config | `sandbox.network.{mode,allowlist}` |
|
|
50
50
|
| Filesystem scopes (readable/writable roots, deny-write globs) | config | `sandbox.readableRoots`, `sandbox.writableRoots`, `sandbox.denyWrite` |
|
|
@@ -78,11 +78,13 @@ Every framework capability and how a composed agent reaches it. This table is th
|
|
|
78
78
|
| Phoenix trace viewer (OTLP exporter; local JSONL artifacts are the fallback) | config | `observability.exporters` (phoenix entry) |
|
|
79
79
|
| Operator console (live chat with thinking/tool/telemetry insight, run replay, config view) | cli | `mono-agent tui [--agent <label>]`; agents serve the `tui` stream endpoint by default (`tui.enabled`, loopback) |
|
|
80
80
|
| Session Recorder web PWA (read-only run browser) | cli | `mono-agent web [--host] [--port] [--no-open] [--allow-non-loopback] [--include-memory]`; consumes the default-on `live` relay and local artifacts; memory runs are opt-in |
|
|
81
|
-
|
|
|
81
|
+
| Setup presets (saved answer-sets: generate config + `.env.example` + checklist) | cli | `mono-agent presets list\|show <id>`, `mono-agent init --preset <id> --yes` (`recipes`/`--recipe` deprecated aliases) |
|
|
82
|
+
| Interactive setup wizard (preset/custom; walks model→channels→memory→tools→sandbox→observability) | cli | `mono-agent init` (no flags, on a TTY; `setup` alias) |
|
|
83
|
+
| Tools reporting + no-tools guardrail (allow-all → `All tools allowed`; explicit empty `allowedTools: []` → `waiting`; unknown-tool "did you mean"; send-tool/channel cross-checks) | cli | part of `mono-agent validate`/`doctor`; the wizard's tools step |
|
|
82
84
|
| Resolved config view (every field tagged env/json/default) | cli | `mono-agent config` |
|
|
83
|
-
| Scaffold / validate / start / install-skill | cli | `mono-agent init\|validate [--consumer <path>]\|config\|
|
|
84
|
-
|
|
|
85
|
+
| Scaffold / validate / start / install-skill | cli | `mono-agent init\|validate [--consumer <path>]\|config\|presets\|start\|install-skill` |
|
|
86
|
+
| Preset capability check (selected preset live?) | cli | `mono-agent validate --preset <id>` |
|
|
85
87
|
| `.env` auto-loading | cli | automatic; `--env-file <path>` |
|
|
86
88
|
| Explicit failure objects (no fake success) | auto | harness |
|
|
87
89
|
| Per-request runtime options, custom memory/history stores | code | `createConfiguredAgentResponder` options |
|
|
88
|
-
| Multi-agent delegation (`
|
|
90
|
+
| Multi-agent delegation (`AskCollaborator` loopback MCP tool) | code | `@mono-agent/agent-orchestrator` |
|
|
@@ -51,7 +51,7 @@ Use this path when the agent needs identity, selected skills, history, and optio
|
|
|
51
51
|
| Memory substrate (schema, migrations, FTS+vector db, RRF) | `@mono-agent/memory/store` | SQLite storage, BM25 FTS, optional vector index, hybrid recall; re-exports `MemoryStore`/`MemoryBlock`/`MemoryWriteResult` from `@mono-agent/agent-contracts` |
|
|
52
52
|
| Memory engine (all tiers: lite/journal/bujo) | `@mono-agent/memory/bujo` | `BujoMemoryStore` — tier-aware: FTS recall (lite), hybrid recall + decay (journal), LLM capture/reconcile + entity graph + scheduled consolidation (bujo) |
|
|
53
53
|
| Embedding providers | `@mono-agent/memory/search` | Ollama/OpenAI embedding providers used by the store subpath for vector recall |
|
|
54
|
-
| Recall tool surface | `@mono-agent/agent-app` (bundled) | Auto-provisions a read-only `
|
|
54
|
+
| Recall tool surface | `@mono-agent/agent-app` (bundled) | Auto-provisions a read-only `MemoryRecall` tool (hybrid keyword+semantic search) from `config.memory.recallTool.enabled`; spawns the bundled `mono-agent-memory` stdio child using the same memory root + embeddings as the in-app memory |
|
|
55
55
|
|
|
56
56
|
Mono-agent selected skills are not auto-selected by description. The host chooses `context.selectedSkills`, and the harness loads those exact bodies.
|
|
57
57
|
|
|
@@ -72,21 +72,21 @@ Use `@mono-agent/agent-harness` directly when a host needs custom prompt/runtime
|
|
|
72
72
|
|
|
73
73
|
## Tools And MCP Join
|
|
74
74
|
|
|
75
|
-
Use `@mono-agent/agent-harness` for
|
|
75
|
+
Use `@mono-agent/agent-harness` for tool/MCP policy normalization. The **config** default is allow-all (`["*"]`); `createToolPolicy` itself does no defaulting, and the harness's no-policy safety net is `failClosedToolPolicy()` (an empty, fail-closed policy):
|
|
76
76
|
|
|
77
77
|
```ts
|
|
78
78
|
import { createToolPolicy, toolPolicyToRuntimeOptions } from "@mono-agent/agent-harness";
|
|
79
79
|
|
|
80
80
|
const policy = createToolPolicy({
|
|
81
|
-
allowedTools: ["
|
|
82
|
-
disallowedTools: ["WebFetch"],
|
|
81
|
+
allowedTools: ["*"], // ["*"] = all; ["Read","Grep"] = specific; [] = none
|
|
82
|
+
disallowedTools: ["WebFetch"], // deny wins, even under allow-all
|
|
83
83
|
mcpConfigPath: "./mcp.json",
|
|
84
84
|
});
|
|
85
85
|
|
|
86
86
|
const runtimeOptions = toolPolicyToRuntimeOptions(policy);
|
|
87
87
|
```
|
|
88
88
|
|
|
89
|
-
|
|
89
|
+
Match the user's intent: allow-all is the recommended default. Prefer subtracting with `disallowedTools` over hand-curating an allowlist, and only narrow to a specific list when the user asks for it.
|
|
90
90
|
|
|
91
91
|
## Adapter Join
|
|
92
92
|
|