@technomoron/agent-run 0.99.33 → 0.99.35
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/CHANGES +13 -0
- package/README.md +12 -7
- package/dist/brain/config.js +1 -1
- package/dist/brain/skills.js +3 -2
- package/dist/cli.js +4 -15
- package/dist/commands.js +2 -4
- package/dist/config/render-instructions.js +5 -5
- package/dist/renderer.js +2 -7
- package/package.json +1 -1
- package/scripts/ensure-agent-brain.sh +1 -1
package/CHANGES
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
CHANGES
|
|
2
2
|
=======
|
|
3
3
|
|
|
4
|
+
Version 0.99.35 (2026-09-07)
|
|
5
|
+
----------------------------
|
|
6
|
+
* Recognize standing user authorization for project memory updates.
|
|
7
|
+
* Simplify command dispatch, instruction rendering and skill handling without
|
|
8
|
+
changing their behavior.
|
|
9
|
+
|
|
10
|
+
Version 0.99.34 (2026-09-07)
|
|
11
|
+
----------------------------
|
|
12
|
+
* Keep the agent-brain socket under the configured root so the service and
|
|
13
|
+
MCP clients connect regardless of their environment. Restart the service
|
|
14
|
+
and agent sessions after upgrading.
|
|
15
|
+
* Remove the runtime-directory environment variable from the service helper.
|
|
16
|
+
|
|
4
17
|
Version 0.99.33 (2026-09-06)
|
|
5
18
|
----------------------------
|
|
6
19
|
* Run the agent-brain MCP server as `agent-brain` from `PATH` and choose its
|
package/README.md
CHANGED
|
@@ -302,8 +302,9 @@ new ChatGPT login.
|
|
|
302
302
|
|
|
303
303
|
Each profile has a durable `notes/memory/` directory outside the source repo.
|
|
304
304
|
`README.md` is a short index; agents read only the linked files relevant to the
|
|
305
|
-
current task. Agents may update project memory
|
|
306
|
-
|
|
305
|
+
current task. Agents may update project memory when the user explicitly requests it or
|
|
306
|
+
authorizes a standing workflow, such as saving durable corrections and updating
|
|
307
|
+
affected specs. This authorization does not permit Git or external-service writes.
|
|
307
308
|
|
|
308
309
|
Codex's native `$CODEX_HOME/memories/` remains under ignored `live/` state. It
|
|
309
310
|
is generated, machine-local recall data and is not copied into the tracked
|
|
@@ -865,8 +866,9 @@ agent-brain serve
|
|
|
865
866
|
```
|
|
866
867
|
|
|
867
868
|
The service hosts SDK Streamable HTTP at `/mcp` using apicore's Fastify instance.
|
|
868
|
-
It listens on
|
|
869
|
-
`~/.agent-run/runtime/agent-brain.sock
|
|
869
|
+
It listens on `<config-root>/runtime/agent-brain.sock`, which defaults to
|
|
870
|
+
`~/.agent-run/runtime/agent-brain.sock`. Both the service and clients use the
|
|
871
|
+
configured root regardless of their environment. The socket
|
|
870
872
|
directory must belong to the current user and have mode `0700`; the socket has
|
|
871
873
|
mode `0600`. No TCP listener or application user database is created.
|
|
872
874
|
|
|
@@ -874,7 +876,9 @@ Generated native-agent configurations run `agent-brain mcp` through `PATH`, so
|
|
|
874
876
|
`agent-brain` must be installed and available there. The bridge selects the socket
|
|
875
877
|
when it starts; generated files do not depend on the installation or runtime
|
|
876
878
|
directory used to render them. Re-render existing profiles with `agent-run update`
|
|
877
|
-
to replace older commands that contain absolute installation paths.
|
|
879
|
+
to replace older commands that contain absolute installation paths. After
|
|
880
|
+
upgrading from a version that used a different socket location, restart the service and
|
|
881
|
+
agent sessions so they use the socket under the configuration root.
|
|
878
882
|
|
|
879
883
|
`agent-run mcp` also bridges native-agent stdio to this socket. Use `--socket PATH`
|
|
880
884
|
for a particular service. The bridge verifies the socket's ownership and private
|
|
@@ -888,8 +892,9 @@ stopped. Starting a second service on an existing socket fails without replacing
|
|
|
888
892
|
the first service's socket.
|
|
889
893
|
|
|
890
894
|
For a user service, copy `ops/systemd/agent-brain.service` to
|
|
891
|
-
`~/.config/systemd/user
|
|
892
|
-
|
|
895
|
+
`~/.config/systemd/user/` and adjust `ExecStart` if your executable is elsewhere.
|
|
896
|
+
Add `--configdir PATH` to `ExecStart` if you use a custom configuration root.
|
|
897
|
+
Run `systemctl --user daemon-reload` followed by
|
|
893
898
|
`systemctl --user enable --now agent-brain`. Installation is explicit.
|
|
894
899
|
|
|
895
900
|
The supplied service uses `serve --pull`. On startup this pulls the configuration
|
package/dist/brain/config.js
CHANGED
|
@@ -14,7 +14,7 @@ const yaml_1 = require("yaml");
|
|
|
14
14
|
const zod_1 = require("zod");
|
|
15
15
|
const utils_1 = require("../utils");
|
|
16
16
|
function defaultSocketPath(configRoot) {
|
|
17
|
-
return path.join(
|
|
17
|
+
return path.join(configRoot, 'runtime', 'agent-brain.sock');
|
|
18
18
|
}
|
|
19
19
|
exports.brainConfigSchema = zod_1.z.object({
|
|
20
20
|
enabled: zod_1.z.boolean().default(true),
|
package/dist/brain/skills.js
CHANGED
|
@@ -36,9 +36,10 @@ function getSkills(store) {
|
|
|
36
36
|
throw new Error(`Missing global parent for skill ${parsed.name}`);
|
|
37
37
|
content = `${parent.content}\n\n${content}`;
|
|
38
38
|
}
|
|
39
|
-
|
|
39
|
+
const skill = { ...parsed, scope, content, source: path.relative(store.configRoot, file) };
|
|
40
|
+
skills.set(parsed.name, skill);
|
|
40
41
|
if (scope === 'global')
|
|
41
|
-
globalSkills.set(parsed.name,
|
|
42
|
+
globalSkills.set(parsed.name, skill);
|
|
42
43
|
}
|
|
43
44
|
}
|
|
44
45
|
return [...skills.values()];
|
package/dist/cli.js
CHANGED
|
@@ -57,13 +57,11 @@ function parseCommand(command, args) {
|
|
|
57
57
|
case 'status':
|
|
58
58
|
return parseStatusCommand(args);
|
|
59
59
|
case 'init':
|
|
60
|
-
return parseInitCommand(args);
|
|
61
60
|
case 'generate':
|
|
62
|
-
|
|
61
|
+
case 'edit':
|
|
62
|
+
return { command, targetPath: parseSinglePath(args, command) };
|
|
63
63
|
case 'setup':
|
|
64
64
|
return parseSetupCommand(args);
|
|
65
|
-
case 'edit':
|
|
66
|
-
return parseEditCommand(args);
|
|
67
65
|
case 'update':
|
|
68
66
|
return parseUpdateCommand(args);
|
|
69
67
|
case 'migrate-config':
|
|
@@ -216,12 +214,6 @@ function parseCheckCommand(inputArgs) {
|
|
|
216
214
|
}
|
|
217
215
|
return { all, command: 'check', targetPath: path.resolve(targetPath) };
|
|
218
216
|
}
|
|
219
|
-
function parseInitCommand(inputArgs) {
|
|
220
|
-
return { command: 'init', targetPath: parseSinglePath(inputArgs, 'init') };
|
|
221
|
-
}
|
|
222
|
-
function parseGenerateCommand(inputArgs) {
|
|
223
|
-
return { command: 'generate', targetPath: parseSinglePath(inputArgs, 'generate') };
|
|
224
|
-
}
|
|
225
217
|
function parseSetupCommand(inputArgs) {
|
|
226
218
|
let profile = null;
|
|
227
219
|
for (const arg of inputArgs) {
|
|
@@ -238,11 +230,8 @@ function parseSetupCommand(inputArgs) {
|
|
|
238
230
|
}
|
|
239
231
|
return { command: 'setup', profile };
|
|
240
232
|
}
|
|
241
|
-
function
|
|
242
|
-
|
|
243
|
-
}
|
|
244
|
-
function parseSinglePath(inputArgs, command, defaultPath = process.cwd()) {
|
|
245
|
-
let targetPath = defaultPath;
|
|
233
|
+
function parseSinglePath(inputArgs, command) {
|
|
234
|
+
let targetPath = process.cwd();
|
|
246
235
|
for (const arg of inputArgs) {
|
|
247
236
|
if (isHelpFlag(arg)) {
|
|
248
237
|
printHelp(command);
|
package/dist/commands.js
CHANGED
|
@@ -29,11 +29,9 @@ function dispatch(command) {
|
|
|
29
29
|
runCheck(command);
|
|
30
30
|
return;
|
|
31
31
|
case 'status':
|
|
32
|
-
runStatus(
|
|
32
|
+
runStatus();
|
|
33
33
|
return;
|
|
34
34
|
case 'init':
|
|
35
|
-
runGenerate(command);
|
|
36
|
-
return;
|
|
37
35
|
case 'generate':
|
|
38
36
|
runGenerate(command);
|
|
39
37
|
return;
|
|
@@ -104,7 +102,7 @@ function runTool(parsed) {
|
|
|
104
102
|
}
|
|
105
103
|
(0, spawn_agent_1.spawnAgent)(adapter.spawn(runtime, { binary: realBinary, passthroughArgs: args, wrapperArgs }));
|
|
106
104
|
}
|
|
107
|
-
function runStatus(
|
|
105
|
+
function runStatus() {
|
|
108
106
|
const adapters = (0, registry_1.listAgentAdapters)();
|
|
109
107
|
const columns = adapters.map((adapter) => adapter.displayName);
|
|
110
108
|
const capabilityRows = [
|
|
@@ -29,16 +29,16 @@ function buildCanonicalInstructions(env, configRoot, manifest, context, trace) {
|
|
|
29
29
|
return { sections: renderedSections };
|
|
30
30
|
}
|
|
31
31
|
function writeAgentsMd(env, configRoot, context, trace) {
|
|
32
|
-
return renderInstructionFile('AGENTS.md', env, configRoot, context,
|
|
32
|
+
return renderInstructionFile('AGENTS.md', env, configRoot, context, trace);
|
|
33
33
|
}
|
|
34
34
|
function writeClaudeMd(env, configRoot, context, trace) {
|
|
35
|
-
return renderInstructionFile('CLAUDE.md', env, configRoot, context,
|
|
35
|
+
return renderInstructionFile('CLAUDE.md', env, configRoot, context, trace);
|
|
36
36
|
}
|
|
37
|
-
function renderInstructionFile(templateName, env, configRoot, context,
|
|
37
|
+
function renderInstructionFile(templateName, env, configRoot, context, trace) {
|
|
38
38
|
const templatePath = `global/tool-templates/${templateName}.njk`;
|
|
39
39
|
const content = fs.existsSync(path.join(configRoot, templatePath))
|
|
40
40
|
? (0, templates_1.renderTemplateFile)(env, configRoot, templatePath, context, trace)
|
|
41
|
-
: env.renderString((0, defaults_1.defaultToolInstructionsTemplate)(
|
|
41
|
+
: env.renderString((0, defaults_1.defaultToolInstructionsTemplate)(templateName === 'CLAUDE.md'), context);
|
|
42
42
|
(0, templates_1.assertNoUnexpandedTemplateVars)(templateName, content);
|
|
43
43
|
return content.replace(/\n*$/, '\n');
|
|
44
44
|
}
|
|
@@ -49,6 +49,6 @@ function projectMemoryInstructions(context) {
|
|
|
49
49
|
`Project memory is stored in ${context.paths.projectMemoryDir}.`,
|
|
50
50
|
'Read README.md there before starting work when prior project context may matter, then read only the linked files relevant to the task.',
|
|
51
51
|
'Do not store secrets, raw chat transcripts, or temporary task state there.',
|
|
52
|
-
'Update project memory
|
|
52
|
+
'Update project memory when the user explicitly requests it or has authorized a standing workflow that records it.'
|
|
53
53
|
].join('\n');
|
|
54
54
|
}
|
package/dist/renderer.js
CHANGED
|
@@ -164,7 +164,7 @@ function removeStaleGeneratedEntries(rendered) {
|
|
|
164
164
|
}
|
|
165
165
|
}
|
|
166
166
|
}
|
|
167
|
-
function removeStaleGeneratedSkills(dir, expectedNames, preservedNames
|
|
167
|
+
function removeStaleGeneratedSkills(dir, expectedNames, preservedNames) {
|
|
168
168
|
if (!fs.existsSync(dir)) {
|
|
169
169
|
return;
|
|
170
170
|
}
|
|
@@ -292,7 +292,7 @@ function migrateLiveReviewFiles(context) {
|
|
|
292
292
|
const sourcePath = path.join(legacyReviewDir, entry.name);
|
|
293
293
|
let targetPath = path.join(context.paths.reviewDir, entry.name);
|
|
294
294
|
if (fs.existsSync(targetPath)) {
|
|
295
|
-
if (
|
|
295
|
+
if (fs.readFileSync(sourcePath).equals(fs.readFileSync(targetPath))) {
|
|
296
296
|
fs.rmSync(sourcePath);
|
|
297
297
|
continue;
|
|
298
298
|
}
|
|
@@ -301,11 +301,6 @@ function migrateLiveReviewFiles(context) {
|
|
|
301
301
|
moveFile(sourcePath, targetPath);
|
|
302
302
|
}
|
|
303
303
|
}
|
|
304
|
-
function filesHaveSameContent(leftPath, rightPath) {
|
|
305
|
-
const left = fs.readFileSync(leftPath);
|
|
306
|
-
const right = fs.readFileSync(rightPath);
|
|
307
|
-
return left.length === right.length && left.equals(right);
|
|
308
|
-
}
|
|
309
304
|
function nextAvailablePath(dir, filename) {
|
|
310
305
|
const parsed = path.parse(filename);
|
|
311
306
|
for (let sequence = 1;; sequence += 1) {
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@ for account in "$@"; do
|
|
|
17
17
|
loginctl enable-linger "$username"
|
|
18
18
|
systemctl start "user@$uid.service"
|
|
19
19
|
user_systemctl() {
|
|
20
|
-
runuser -u "$username" -- env "
|
|
20
|
+
runuser -u "$username" -- env "DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/$uid/bus" systemctl --user "$@"
|
|
21
21
|
}
|
|
22
22
|
user_systemctl daemon-reload
|
|
23
23
|
user_systemctl enable agent-brain.service
|