@technomoron/agent-run 0.99.41 → 0.99.43

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 CHANGED
@@ -1,6 +1,19 @@
1
1
  CHANGES
2
2
  =======
3
3
 
4
+ Version 0.99.43 (2026-09-25)
5
+ ----------------------------
6
+ * Report startup errors without a stack trace and include file ownership and
7
+ permissions guidance when access is denied.
8
+
9
+ Version 0.99.42 (2026-09-25)
10
+ ----------------------------
11
+ * Apply repository AI-file checks only to project scopes and actual repositories.
12
+ Default-scope launches from a home directory no longer scan protected Windows
13
+ folders or treat personal Codex and Claude settings as repository files.
14
+ * Skip the startup scan when the repository AI-file guard is disabled, and
15
+ preserve personal Claude settings during default-scope postflight checks.
16
+
4
17
  Version 0.99.41 (2026-09-25)
5
18
  ----------------------------
6
19
  * Use a shared Codex home with native named profiles, keeping project
package/dist/checks.js CHANGED
@@ -25,7 +25,7 @@ function checkProject(projectRoot) {
25
25
  return findings;
26
26
  }
27
27
  const agentDir = (0, project_1.resolveAgentDir)(projectRoot);
28
- if (profileForbidsLocalAiFiles(projectRoot, agentDir, profileResult.profile)) {
28
+ if ((0, project_1.hasProjectFileScope)(projectRoot, profileResult.profile) && profileForbidsLocalAiFiles(projectRoot, agentDir, profileResult.profile)) {
29
29
  for (const file of (0, project_1.findLocalAiFiles)(projectRoot, agentDir)) {
30
30
  findings.push({ message: `local AI file in project: ${file}`, severity: 'ERROR' });
31
31
  }
package/dist/commands.js CHANGED
@@ -15,12 +15,18 @@ const renderer_1 = require("./renderer");
15
15
  const spawn_agent_1 = require("./runtime/spawn-agent");
16
16
  const utils_1 = require("./utils");
17
17
  function main(invokedTool, argv) {
18
- dispatch((0, cli_1.parseInvocation)(invokedTool, argv));
18
+ try {
19
+ dispatch((0, cli_1.parseInvocation)(invokedTool, argv));
20
+ }
21
+ catch (error) {
22
+ process.stderr.write(`agent-run: ${(0, utils_1.formatError)(error)}\n`);
23
+ process.exitCode = 1;
24
+ }
19
25
  }
20
26
  function dispatch(command) {
21
27
  switch (command.command) {
22
28
  case 'compress':
23
- void runCompress(command).catch((error) => { process.stderr.write(`agent-run: ${error instanceof Error ? error.message : String(error)}\n`); process.exitCode = 1; });
29
+ void runCompress(command).catch((error) => { process.stderr.write(`agent-run: ${(0, utils_1.formatError)(error)}\n`); process.exitCode = 1; });
24
30
  return;
25
31
  case 'mcp':
26
32
  case 'create':
@@ -187,8 +193,10 @@ function requireProfile(tool, agentDir) {
187
193
  process.exit(1);
188
194
  }
189
195
  function checkLocalAiFiles(command, projectRoot, agentDir, context, allowLocal) {
196
+ if (!context.guardrails.forbidRepoAiFiles || !(0, project_1.hasProjectFileScope)(projectRoot, context.profile))
197
+ return;
190
198
  const files = (0, project_1.findLocalAiFiles)(projectRoot, agentDir);
191
- if (!context.guardrails.forbidRepoAiFiles || files.length === 0) {
199
+ if (files.length === 0) {
192
200
  return;
193
201
  }
194
202
  if (!allowLocal) {
package/dist/project.js CHANGED
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.resolveAgentDir = resolveAgentDir;
4
4
  exports.findLocalAiFiles = findLocalAiFiles;
5
5
  exports.findSourceRepos = findSourceRepos;
6
+ exports.hasProjectFileScope = hasProjectFileScope;
6
7
  exports.isIgnoredDir = isIgnoredDir;
7
8
  exports.warnForLocalAiFiles = warnForLocalAiFiles;
8
9
  exports.failForLocalAiFiles = failForLocalAiFiles;
@@ -74,6 +75,11 @@ function findSourceRepos(rootPath) {
74
75
  function looksLikeRepoRoot(dir) {
75
76
  return fs.existsSync(path.join(dir, '.git')) || fs.existsSync(path.join(dir, 'package.json'));
76
77
  }
78
+ function hasProjectFileScope(projectRoot, profile) {
79
+ // The default brain scope also serves home directories and other non-project
80
+ // folders. Personal tool configuration there is not repository-local state.
81
+ return profile !== 'default' || looksLikeRepoRoot(projectRoot);
82
+ }
77
83
  function isIgnoredDir(dir) {
78
84
  if (fs.existsSync(path.join(dir, constants_1.IGNORE_FILE_NAME))) {
79
85
  return true;
@@ -5,7 +5,7 @@ const fs = require("fs");
5
5
  const path = require("path");
6
6
  const project_1 = require("../project");
7
7
  function postflightProjectCheck(context, allowLocal, code) {
8
- if (!context.guardrails.forbidRepoAiFiles) {
8
+ if (!context.guardrails.forbidRepoAiFiles || !(0, project_1.hasProjectFileScope)(context.projectRoot, context.profile)) {
9
9
  return code;
10
10
  }
11
11
  if (!allowLocal) {
package/dist/utils.js CHANGED
@@ -35,6 +35,12 @@ function localDateString() {
35
35
  return `${year}-${month}-${day}`;
36
36
  }
37
37
  function formatError(error) {
38
+ if (error instanceof Error) {
39
+ const { code, path: filePath } = error;
40
+ if (code === 'EACCES' || code === 'EPERM') {
41
+ return `${error.message}\nCheck file ownership and permissions${filePath ? ` for ${filePath}` : ''} and its parent directories. Run agent-run as your normal user, not with sudo.`;
42
+ }
43
+ }
38
44
  return error instanceof Error ? error.message : String(error);
39
45
  }
40
46
  function verbose(message) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@technomoron/agent-run",
3
- "version": "0.99.41",
3
+ "version": "0.99.43",
4
4
  "packageManager": "pnpm@10.34.5",
5
5
  "bin": {
6
6
  "agent-run": "dist/agent-run.js",