bernard-agent 0.8.1 → 0.9.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 +80 -44
- package/dist/agent.d.ts +14 -3
- package/dist/agent.js +228 -38
- package/dist/agent.js.map +1 -1
- package/dist/builtin-specialists/correction-agent.json +32 -0
- package/dist/builtin-specialists/file-wrapper.json +43 -0
- package/dist/builtin-specialists/shell-wrapper.json +50 -0
- package/dist/builtin-specialists/specialist-creator.json +32 -0
- package/dist/builtin-specialists/web-wrapper.json +38 -0
- package/dist/candidate-bootstrap.d.ts +18 -0
- package/dist/candidate-bootstrap.js +61 -0
- package/dist/candidate-bootstrap.js.map +1 -0
- package/dist/config.d.ts +126 -10
- package/dist/config.js +222 -45
- package/dist/config.js.map +1 -1
- package/dist/context.js +23 -6
- package/dist/context.js.map +1 -1
- package/dist/correction-candidates.d.ts +54 -0
- package/dist/correction-candidates.js +138 -0
- package/dist/correction-candidates.js.map +1 -0
- package/dist/correction.d.ts +67 -0
- package/dist/correction.js +138 -0
- package/dist/correction.js.map +1 -0
- package/dist/critic.js +2 -1
- package/dist/critic.js.map +1 -1
- package/dist/cron/notes-store.d.ts +41 -0
- package/dist/cron/notes-store.js +134 -0
- package/dist/cron/notes-store.js.map +1 -0
- package/dist/cron/runner.js +25 -3
- package/dist/cron/runner.js.map +1 -1
- package/dist/cron/scoped-notes-tools.d.ts +24 -0
- package/dist/cron/scoped-notes-tools.js +50 -0
- package/dist/cron/scoped-notes-tools.js.map +1 -0
- package/dist/custom-providers.d.ts +80 -0
- package/dist/custom-providers.js +238 -0
- package/dist/custom-providers.js.map +1 -0
- package/dist/fs-utils.d.ts +2 -0
- package/dist/fs-utils.js +44 -0
- package/dist/fs-utils.js.map +1 -0
- package/dist/history.js +3 -1
- package/dist/history.js.map +1 -1
- package/dist/image.d.ts +59 -0
- package/dist/image.js +228 -0
- package/dist/image.js.map +1 -0
- package/dist/index.js +72 -4
- package/dist/index.js.map +1 -1
- package/dist/mcp.js +1 -1
- package/dist/mcp.js.map +1 -1
- package/dist/memory.d.ts +13 -0
- package/dist/memory.js +45 -4
- package/dist/memory.js.map +1 -1
- package/dist/menu.d.ts +97 -0
- package/dist/menu.js +338 -0
- package/dist/menu.js.map +1 -0
- package/dist/os-info.d.ts +22 -0
- package/dist/os-info.js +111 -0
- package/dist/os-info.js.map +1 -0
- package/dist/output.d.ts +35 -1
- package/dist/output.js +256 -45
- package/dist/output.js.map +1 -1
- package/dist/pac.d.ts +14 -2
- package/dist/pac.js +5 -5
- package/dist/pac.js.map +1 -1
- package/dist/paths.d.ts +5 -0
- package/dist/paths.js +6 -1
- package/dist/paths.js.map +1 -1
- package/dist/plan-store.d.ts +47 -0
- package/dist/plan-store.js +94 -0
- package/dist/plan-store.js.map +1 -0
- package/dist/prompt-rewriter.d.ts +29 -0
- package/dist/prompt-rewriter.js +155 -0
- package/dist/prompt-rewriter.js.map +1 -0
- package/dist/providers/index.d.ts +56 -4
- package/dist/providers/index.js +86 -5
- package/dist/providers/index.js.map +1 -1
- package/dist/providers/profiles.d.ts +37 -0
- package/dist/providers/profiles.js +110 -0
- package/dist/providers/profiles.js.map +1 -0
- package/dist/providers/types.d.ts +11 -2
- package/dist/providers/types.js +3 -0
- package/dist/providers/types.js.map +1 -1
- package/dist/rag-query.js +15 -1
- package/dist/rag-query.js.map +1 -1
- package/dist/react.d.ts +38 -0
- package/dist/react.js +116 -0
- package/dist/react.js.map +1 -0
- package/dist/reasoning-log.d.ts +30 -0
- package/dist/reasoning-log.js +102 -0
- package/dist/reasoning-log.js.map +1 -0
- package/dist/reference-resolver.d.ts +47 -0
- package/dist/reference-resolver.js +316 -0
- package/dist/reference-resolver.js.map +1 -0
- package/dist/reference-tool-lookup.d.ts +37 -0
- package/dist/reference-tool-lookup.js +318 -0
- package/dist/reference-tool-lookup.js.map +1 -0
- package/dist/repl.js +1038 -371
- package/dist/repl.js.map +1 -1
- package/dist/setup.js +2 -1
- package/dist/setup.js.map +1 -1
- package/dist/specialist-detector.js +2 -1
- package/dist/specialist-detector.js.map +1 -1
- package/dist/specialists.d.ts +74 -3
- package/dist/specialists.js +152 -20
- package/dist/specialists.js.map +1 -1
- package/dist/structured-output.d.ts +58 -0
- package/dist/structured-output.js +138 -0
- package/dist/structured-output.js.map +1 -0
- package/dist/theme.d.ts +2 -0
- package/dist/theme.js +18 -12
- package/dist/theme.js.map +1 -1
- package/dist/tool-call-repair.d.ts +29 -0
- package/dist/tool-call-repair.js +99 -0
- package/dist/tool-call-repair.js.map +1 -0
- package/dist/tool-profiles.d.ts +70 -0
- package/dist/tool-profiles.js +385 -0
- package/dist/tool-profiles.js.map +1 -0
- package/dist/tools/activity-summary.d.ts +15 -0
- package/dist/tools/activity-summary.js +44 -0
- package/dist/tools/activity-summary.js.map +1 -0
- package/dist/tools/ask-user.d.ts +49 -0
- package/dist/tools/ask-user.js +52 -0
- package/dist/tools/ask-user.js.map +1 -0
- package/dist/tools/augment.d.ts +17 -0
- package/dist/tools/augment.js +102 -0
- package/dist/tools/augment.js.map +1 -0
- package/dist/tools/cron-logs.js +7 -0
- package/dist/tools/cron-logs.js.map +1 -1
- package/dist/tools/cron-notes.d.ts +52 -0
- package/dist/tools/cron-notes.js +105 -0
- package/dist/tools/cron-notes.js.map +1 -0
- package/dist/tools/datetime.d.ts +7 -0
- package/dist/tools/datetime.js +29 -3
- package/dist/tools/datetime.js.map +1 -1
- package/dist/tools/evaluate.d.ts +20 -0
- package/dist/tools/evaluate.js +29 -0
- package/dist/tools/evaluate.js.map +1 -0
- package/dist/tools/index.js +4 -0
- package/dist/tools/index.js.map +1 -1
- package/dist/tools/mcp.d.ts +3 -3
- package/dist/tools/plan.d.ts +81 -0
- package/dist/tools/plan.js +108 -0
- package/dist/tools/plan.js.map +1 -0
- package/dist/tools/result-cap.d.ts +24 -0
- package/dist/tools/result-cap.js +44 -0
- package/dist/tools/result-cap.js.map +1 -0
- package/dist/tools/routine.d.ts +3 -3
- package/dist/tools/shell.d.ts +14 -1
- package/dist/tools/shell.js +86 -4
- package/dist/tools/shell.js.map +1 -1
- package/dist/tools/specialist-run.d.ts +5 -3
- package/dist/tools/specialist-run.js +115 -24
- package/dist/tools/specialist-run.js.map +1 -1
- package/dist/tools/specialist.d.ts +83 -3
- package/dist/tools/specialist.js +83 -3
- package/dist/tools/specialist.js.map +1 -1
- package/dist/tools/subagent.js +32 -14
- package/dist/tools/subagent.js.map +1 -1
- package/dist/tools/task.d.ts +5 -5
- package/dist/tools/task.js +9 -42
- package/dist/tools/task.js.map +1 -1
- package/dist/tools/think.d.ts +18 -0
- package/dist/tools/think.js +25 -0
- package/dist/tools/think.js.map +1 -0
- package/dist/tools/tool-wrapper-run.d.ts +121 -0
- package/dist/tools/tool-wrapper-run.js +382 -0
- package/dist/tools/tool-wrapper-run.js.map +1 -0
- package/dist/tools/types.d.ts +28 -2
- package/dist/tools/web-search.d.ts +31 -0
- package/dist/tools/web-search.js +172 -0
- package/dist/tools/web-search.js.map +1 -0
- package/dist/tools/wrap-with-specialist.d.ts +55 -0
- package/dist/tools/wrap-with-specialist.js +137 -0
- package/dist/tools/wrap-with-specialist.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { type ToolWrapperDeps } from './tool-wrapper-run.js';
|
|
2
|
+
/**
|
|
3
|
+
* Builds the natural-language input handed to a wrapper specialist when the
|
|
4
|
+
* shim forwards a direct tool call. The wrapper sees the original tool name
|
|
5
|
+
* and its arguments verbatim so it can validate, transform, or pass through.
|
|
6
|
+
*/
|
|
7
|
+
export declare function buildShimInput(toolName: string, args: unknown): string;
|
|
8
|
+
/**
|
|
9
|
+
* Formats a wrapper's structured result so the main agent — and the
|
|
10
|
+
* tool-augmentation layer's `detectToolError` — observe the *native* tool
|
|
11
|
+
* return shape, just as if the shim had been bypassed.
|
|
12
|
+
*
|
|
13
|
+
* - On `status: 'ok'`, returns `wrapped.result` as-is (no JSON-stringifying
|
|
14
|
+
* structured payloads), so e.g. `shell`'s `{ output, is_error }` and
|
|
15
|
+
* `file_*`'s `{ ... }` propagate unchanged.
|
|
16
|
+
* - On `status: 'error'`, maps the wrapper error to the *same shape* the
|
|
17
|
+
* native tool would have produced for an error:
|
|
18
|
+
* - `shell` → `{ output: 'Error (...): ...', is_error: true }`
|
|
19
|
+
* - `file_read_lines` / `file_edit_lines` / `file_write` → `{ error: '...' }`
|
|
20
|
+
* - everything else (web_*, MCP, generic) → `'Error (...): ...'` string
|
|
21
|
+
* This keeps `detectToolError` and tool-profile learning working whether or
|
|
22
|
+
* not the shim is active.
|
|
23
|
+
*/
|
|
24
|
+
export declare function formatWrappedResult(wrapped: {
|
|
25
|
+
status: 'ok' | 'error';
|
|
26
|
+
result: unknown;
|
|
27
|
+
error?: string;
|
|
28
|
+
}, toolName?: string): unknown;
|
|
29
|
+
/**
|
|
30
|
+
* Wraps a base tool so that, when the corresponding wrapper specialist is
|
|
31
|
+
* registered, the model's call is transparently routed through
|
|
32
|
+
* {@link dispatchToolWrapper}. The model sees the same name, description, and
|
|
33
|
+
* schema — only the execution path changes.
|
|
34
|
+
*
|
|
35
|
+
* When the specialist is absent (or its kind is wrong, etc.), the shim falls
|
|
36
|
+
* through to the base tool's `execute` so behavior degrades gracefully.
|
|
37
|
+
*
|
|
38
|
+
* Only the wrapper's `result` (or `error` message) crosses back to the parent
|
|
39
|
+
* agent; the wrapper's `reasoning` array is logged separately and never enters
|
|
40
|
+
* the parent's context.
|
|
41
|
+
*/
|
|
42
|
+
export declare function wrapToolWithSpecialist<TArgs>(baseTool: any, toolName: string, specialistId: string, deps: ToolWrapperDeps): any;
|
|
43
|
+
/**
|
|
44
|
+
* The default routing table mapping low-level tool names to their wrapper
|
|
45
|
+
* specialist IDs. Used by the main agent to auto-route raw calls.
|
|
46
|
+
*/
|
|
47
|
+
export declare const DEFAULT_SHIM_ROUTING: Record<string, string>;
|
|
48
|
+
/**
|
|
49
|
+
* Applies {@link wrapToolWithSpecialist} to every tool name in the given
|
|
50
|
+
* routing table. Tools not present in the registry are skipped silently.
|
|
51
|
+
*
|
|
52
|
+
* Routing is only applied on the main agent — sub-agents, specialists, and
|
|
53
|
+
* the wrapper specialists themselves keep their raw tools to avoid recursion.
|
|
54
|
+
*/
|
|
55
|
+
export declare function applyShimRouting(tools: Record<string, any>, deps: ToolWrapperDeps, routing?: Record<string, string>): Record<string, any>;
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DEFAULT_SHIM_ROUTING = void 0;
|
|
4
|
+
exports.buildShimInput = buildShimInput;
|
|
5
|
+
exports.formatWrappedResult = formatWrappedResult;
|
|
6
|
+
exports.wrapToolWithSpecialist = wrapToolWithSpecialist;
|
|
7
|
+
exports.applyShimRouting = applyShimRouting;
|
|
8
|
+
const tool_wrapper_run_js_1 = require("./tool-wrapper-run.js");
|
|
9
|
+
const logger_js_1 = require("../logger.js");
|
|
10
|
+
/**
|
|
11
|
+
* Builds the natural-language input handed to a wrapper specialist when the
|
|
12
|
+
* shim forwards a direct tool call. The wrapper sees the original tool name
|
|
13
|
+
* and its arguments verbatim so it can validate, transform, or pass through.
|
|
14
|
+
*/
|
|
15
|
+
function buildShimInput(toolName, args) {
|
|
16
|
+
let argsJson;
|
|
17
|
+
try {
|
|
18
|
+
argsJson = JSON.stringify(args, null, 2);
|
|
19
|
+
}
|
|
20
|
+
catch {
|
|
21
|
+
argsJson = String(args);
|
|
22
|
+
}
|
|
23
|
+
return `The main agent issued a direct call to the \`${toolName}\` tool with these arguments:
|
|
24
|
+
|
|
25
|
+
\`\`\`json
|
|
26
|
+
${argsJson}
|
|
27
|
+
\`\`\`
|
|
28
|
+
|
|
29
|
+
Execute this tool call (or a safer/equivalent variant if you spot a clear problem) and return the structured JSON output. Keep your \`result\` field tight — the parent agent only sees \`result\` and any \`error\`, never your \`reasoning\` array.`;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Formats a wrapper's structured result so the main agent — and the
|
|
33
|
+
* tool-augmentation layer's `detectToolError` — observe the *native* tool
|
|
34
|
+
* return shape, just as if the shim had been bypassed.
|
|
35
|
+
*
|
|
36
|
+
* - On `status: 'ok'`, returns `wrapped.result` as-is (no JSON-stringifying
|
|
37
|
+
* structured payloads), so e.g. `shell`'s `{ output, is_error }` and
|
|
38
|
+
* `file_*`'s `{ ... }` propagate unchanged.
|
|
39
|
+
* - On `status: 'error'`, maps the wrapper error to the *same shape* the
|
|
40
|
+
* native tool would have produced for an error:
|
|
41
|
+
* - `shell` → `{ output: 'Error (...): ...', is_error: true }`
|
|
42
|
+
* - `file_read_lines` / `file_edit_lines` / `file_write` → `{ error: '...' }`
|
|
43
|
+
* - everything else (web_*, MCP, generic) → `'Error (...): ...'` string
|
|
44
|
+
* This keeps `detectToolError` and tool-profile learning working whether or
|
|
45
|
+
* not the shim is active.
|
|
46
|
+
*/
|
|
47
|
+
function formatWrappedResult(wrapped, toolName) {
|
|
48
|
+
if (wrapped.status === 'ok') {
|
|
49
|
+
return wrapped.result;
|
|
50
|
+
}
|
|
51
|
+
const body = typeof wrapped.result === 'string' ? wrapped.result : JSON.stringify(wrapped.result);
|
|
52
|
+
const message = wrapped.error ? `Error (${wrapped.error}): ${body}` : `Error: ${body}`;
|
|
53
|
+
if (toolName === 'shell') {
|
|
54
|
+
return { output: message, is_error: true };
|
|
55
|
+
}
|
|
56
|
+
if (toolName === 'file_read_lines' ||
|
|
57
|
+
toolName === 'file_edit_lines' ||
|
|
58
|
+
toolName === 'file_write') {
|
|
59
|
+
return { error: message };
|
|
60
|
+
}
|
|
61
|
+
return message;
|
|
62
|
+
}
|
|
63
|
+
/**
|
|
64
|
+
* Wraps a base tool so that, when the corresponding wrapper specialist is
|
|
65
|
+
* registered, the model's call is transparently routed through
|
|
66
|
+
* {@link dispatchToolWrapper}. The model sees the same name, description, and
|
|
67
|
+
* schema — only the execution path changes.
|
|
68
|
+
*
|
|
69
|
+
* When the specialist is absent (or its kind is wrong, etc.), the shim falls
|
|
70
|
+
* through to the base tool's `execute` so behavior degrades gracefully.
|
|
71
|
+
*
|
|
72
|
+
* Only the wrapper's `result` (or `error` message) crosses back to the parent
|
|
73
|
+
* agent; the wrapper's `reasoning` array is logged separately and never enters
|
|
74
|
+
* the parent's context.
|
|
75
|
+
*/
|
|
76
|
+
function wrapToolWithSpecialist(baseTool, toolName, specialistId, deps) {
|
|
77
|
+
const baseExecute = baseTool.execute;
|
|
78
|
+
if (typeof baseExecute !== 'function') {
|
|
79
|
+
return baseTool;
|
|
80
|
+
}
|
|
81
|
+
return {
|
|
82
|
+
...baseTool,
|
|
83
|
+
execute: async (args, execOptions) => {
|
|
84
|
+
const specialist = deps.specialistStore.get(specialistId);
|
|
85
|
+
if (!specialist) {
|
|
86
|
+
return baseExecute(args, execOptions);
|
|
87
|
+
}
|
|
88
|
+
const kind = specialist.kind ?? 'persona';
|
|
89
|
+
if (kind !== 'tool-wrapper') {
|
|
90
|
+
// Not the right kind for shim routing — let the raw tool handle it.
|
|
91
|
+
return baseExecute(args, execOptions);
|
|
92
|
+
}
|
|
93
|
+
try {
|
|
94
|
+
const wrapped = await (0, tool_wrapper_run_js_1.dispatchToolWrapper)({
|
|
95
|
+
specialistId,
|
|
96
|
+
input: buildShimInput(toolName, args),
|
|
97
|
+
abortSignal: execOptions?.abortSignal,
|
|
98
|
+
runLabel: `[shim] ${toolName} → ${specialist.name}`,
|
|
99
|
+
}, deps);
|
|
100
|
+
return formatWrappedResult(wrapped, toolName);
|
|
101
|
+
}
|
|
102
|
+
catch (err) {
|
|
103
|
+
// Defensive: if the dispatch itself throws, fall back to the raw tool
|
|
104
|
+
// rather than killing the turn.
|
|
105
|
+
(0, logger_js_1.debugLog)(`wrap-with-specialist:${toolName}:dispatch-error`, err instanceof Error ? err.message : String(err));
|
|
106
|
+
return baseExecute(args, execOptions);
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* The default routing table mapping low-level tool names to their wrapper
|
|
113
|
+
* specialist IDs. Used by the main agent to auto-route raw calls.
|
|
114
|
+
*/
|
|
115
|
+
exports.DEFAULT_SHIM_ROUTING = {
|
|
116
|
+
shell: 'shell-wrapper',
|
|
117
|
+
web_read: 'web-wrapper',
|
|
118
|
+
file_read_lines: 'file-wrapper',
|
|
119
|
+
file_edit_lines: 'file-wrapper',
|
|
120
|
+
};
|
|
121
|
+
/**
|
|
122
|
+
* Applies {@link wrapToolWithSpecialist} to every tool name in the given
|
|
123
|
+
* routing table. Tools not present in the registry are skipped silently.
|
|
124
|
+
*
|
|
125
|
+
* Routing is only applied on the main agent — sub-agents, specialists, and
|
|
126
|
+
* the wrapper specialists themselves keep their raw tools to avoid recursion.
|
|
127
|
+
*/
|
|
128
|
+
function applyShimRouting(tools, deps, routing = exports.DEFAULT_SHIM_ROUTING) {
|
|
129
|
+
const out = { ...tools };
|
|
130
|
+
for (const [toolName, specialistId] of Object.entries(routing)) {
|
|
131
|
+
if (!out[toolName])
|
|
132
|
+
continue;
|
|
133
|
+
out[toolName] = wrapToolWithSpecialist(out[toolName], toolName, specialistId, deps);
|
|
134
|
+
}
|
|
135
|
+
return out;
|
|
136
|
+
}
|
|
137
|
+
//# sourceMappingURL=wrap-with-specialist.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"wrap-with-specialist.js","sourceRoot":"","sources":["../../src/tools/wrap-with-specialist.ts"],"names":[],"mappings":";;;AAQA,wCAcC;AAkBD,kDAqBC;AAeD,wDA8CC;AAoBD,4CAWC;AAzJD,+DAAkF;AAClF,4CAAwC;AAExC;;;;GAIG;AACH,SAAgB,cAAc,CAAC,QAAgB,EAAE,IAAa;IAC5D,IAAI,QAAgB,CAAC;IACrB,IAAI,CAAC;QACH,QAAQ,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;I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cAAc;CAChC,CAAC;AAEF;;;;;;GAMG;AACH,SAAgB,gBAAgB,CAC9B,KAA0B,EAC1B,IAAqB,EACrB,UAAkC,4BAAoB;IAEtD,MAAM,GAAG,GAAwB,EAAE,GAAG,KAAK,EAAE,CAAC;IAC9C,KAAK,MAAM,CAAC,QAAQ,EAAE,YAAY,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;QAC/D,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC;YAAE,SAAS;QAC7B,GAAG,CAAC,QAAQ,CAAC,GAAG,sBAAsB,CAAC,GAAG,CAAC,QAAQ,CAAC,EAAE,QAAQ,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;IACtF,CAAC;IACD,OAAO,GAAG,CAAC;AACb,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "bernard-agent",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Local CLI AI agent with multi-provider support",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"bin": {
|
|
7
7
|
"bernard": "dist/index.js"
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
|
-
"build": "tsc",
|
|
10
|
+
"build": "tsc && node -e \"require('fs').cpSync('src/builtin-specialists','dist/builtin-specialists',{recursive:true})\"",
|
|
11
11
|
"dev": "BERNARD_DEBUG=1 tsx src/index.ts",
|
|
12
12
|
"start": "node dist/index.js",
|
|
13
13
|
"test": "vitest run",
|