atris 3.38.0 → 3.40.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.
Files changed (77) hide show
  1. package/AGENTS.md +25 -6
  2. package/atris/PERSONA.md +8 -4
  3. package/atris.md +7 -0
  4. package/ax +2 -1
  5. package/bin/atris.js +30 -5
  6. package/commands/agent-spawn.js +13 -11
  7. package/commands/autoland.js +28 -77
  8. package/commands/bench.js +10 -12
  9. package/commands/business.js +345 -0
  10. package/commands/chat-scan.js +5 -7
  11. package/commands/codex-goal.js +8 -10
  12. package/commands/console.js +19 -3
  13. package/commands/decide.js +166 -0
  14. package/commands/deck.js +1 -4
  15. package/commands/drill.js +14 -24
  16. package/commands/engine.js +196 -8
  17. package/commands/gm.js +8 -6
  18. package/commands/harvest.js +1 -4
  19. package/commands/init.js +23 -3
  20. package/commands/land.js +8 -14
  21. package/commands/launchpad.js +1 -14
  22. package/commands/lifecycle.js +5 -5
  23. package/commands/log.js +55 -5
  24. package/commands/member.js +558 -574
  25. package/commands/mission.js +456 -237
  26. package/commands/pack.js +2746 -164
  27. package/commands/play.js +6 -4
  28. package/commands/probe.js +2 -2
  29. package/commands/pulse.js +15 -16
  30. package/commands/release.js +10 -9
  31. package/commands/router.js +5 -4
  32. package/commands/site-deploy.js +870 -0
  33. package/commands/site.js +11 -2
  34. package/commands/slop.js +14 -2
  35. package/commands/stream.js +4 -18
  36. package/commands/task.js +880 -558
  37. package/commands/taste.js +101 -0
  38. package/commands/team.js +83 -3
  39. package/commands/vercel.js +4 -2
  40. package/commands/voice.js +195 -0
  41. package/commands/watch.js +1 -22
  42. package/commands/wiki.js +1 -4
  43. package/commands/workflow.js +2 -2
  44. package/commands/worktree.js +1 -14
  45. package/commands/xp.js +27 -24
  46. package/lib/accept-verify-gate.js +5 -1
  47. package/lib/arg-parser.js +41 -0
  48. package/lib/auto-accept-certified.js +116 -1
  49. package/lib/autoland.js +66 -0
  50. package/lib/bench/runner.js +19 -1
  51. package/lib/context-gatherer.js +7 -1
  52. package/lib/engine-registry.js +141 -20
  53. package/lib/falsifier-probe.js +84 -0
  54. package/lib/fleet.js +65 -15
  55. package/lib/git-spawn.js +15 -0
  56. package/lib/json-file.js +37 -0
  57. package/lib/known-commands.js +2 -2
  58. package/lib/lesson-preflight.js +146 -0
  59. package/lib/loop-doctor.js +0 -2
  60. package/lib/mission-human-asks.js +28 -0
  61. package/lib/mission-protected-lane.js +4 -1
  62. package/lib/official-cli-integration.js +47 -2
  63. package/lib/orb-context.js +8 -1
  64. package/lib/pack-capabilities.js +685 -0
  65. package/lib/router-brain.js +51 -1
  66. package/lib/runner-command.js +0 -6
  67. package/lib/self-drive.js +44 -13
  68. package/lib/task-db.js +137 -3
  69. package/lib/task-decision.js +50 -0
  70. package/lib/taste-lessons.js +153 -0
  71. package/lib/tool-result-encode.js +17 -1
  72. package/lib/voice-gate.js +66 -0
  73. package/lib/wish-audit.js +1 -1
  74. package/lib/wish-delegate.js +1 -1
  75. package/lib/zip.js +95 -7
  76. package/package.json +2 -1
  77. package/templates/business-starter/persona.md +9 -0
package/commands/site.js CHANGED
@@ -4,21 +4,30 @@
4
4
  // atris site <dir|doc.md> [--out dist] [--theme atris|terminal|paper] [--title T] [--serve]
5
5
 
6
6
  const { buildSite, serveSite } = require('../lib/site');
7
+ const { hasFlag } = require('../lib/arg-parser');
7
8
 
8
9
  function flag(argv, name) { const i = argv.indexOf(name); return i !== -1 ? argv[i + 1] : null; }
9
- function hasFlag(argv, name) { return argv.includes(name); }
10
10
 
11
11
  async function run(argv) {
12
+ if (argv[0] === 'deploy') {
13
+ return require('./site-deploy').run(argv.slice(1));
14
+ }
15
+
12
16
  const input = argv.find((a) => !a.startsWith('-'));
13
17
  if (!input || input === 'help' || hasFlag(argv, '--help')) {
14
18
  console.log(`
15
- atris site — a beautiful static site from a folder of markdown
19
+ atris site: build markdown sites or deploy web folders
16
20
 
17
21
  atris site <dir|doc.md> [--out dist] [--theme atris|terminal|paper] [--title T]
18
22
  atris site atris/wiki --title "Atris Wiki" --serve
23
+ atris site deploy <dir> --name <slug> [--spa] [--dry-run]
24
+ atris site deploy <dir> --fullstack --name <slug> [--dry-run]
19
25
 
20
26
  Each .md becomes a page; an index links them all. Same anti-slop design system,
21
27
  semantic data-atris-block sections, ready for the web app. --serve previews it.
28
+
29
+ deploy publishes web folders to <slug>.atris.ai. --fullstack deploys a node
30
+ server with its own render service.
22
31
  `);
23
32
  return input === 'help' || hasFlag(argv, '--help') ? 0 : 2;
24
33
  }
package/commands/slop.js CHANGED
@@ -463,12 +463,24 @@ function findOrphanedExports(root, files, allRepoJs) {
463
463
  if (!texts.has(f)) { try { texts.set(f, fs.readFileSync(f, 'utf8')); } catch { texts.set(f, ''); } }
464
464
  return texts.get(f);
465
465
  };
466
+ // Token index instead of a per-name regex pass over every file: one read +
467
+ // tokenize per file, then O(1) name lookups. The regex version took nearly a
468
+ // minute on this repo, which kept this detector out of the landing gate.
469
+ // Identifiers split on `$` so `foo` still matches inside `foo$bar`, matching
470
+ // the old \b semantics; the rare `$`-carrying name falls back to the regex.
471
+ const tokens = new Map();
472
+ const tokensOf = (f) => {
473
+ if (!tokens.has(f)) tokens.set(f, new Set(readText(f).match(/[A-Za-z0-9_]+/g) || []));
474
+ return tokens.get(f);
475
+ };
466
476
  const orphans = [];
467
477
  for (const file of files) {
468
478
  for (const name of exportedNames(file)) {
469
479
  if (name.length < 4) continue; // generic short names drown in noise either way
470
- const re = new RegExp(`\\b${name}\\b`);
471
- const used = allRepoJs.some((f) => f !== file && re.test(readText(f)));
480
+ const usesRegex = name.includes('$');
481
+ const re = usesRegex ? new RegExp(`\\b${name.replace(/\$/g, '\\$')}\\b`) : null;
482
+ const used = allRepoJs.some((f) => f !== file
483
+ && (usesRegex ? re.test(readText(f)) : tokensOf(f).has(name)));
472
484
  if (!used) orphans.push({ file, name });
473
485
  }
474
486
  }
@@ -2,8 +2,8 @@
2
2
 
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
- const { spawnSync } = require('child_process');
6
-
5
+ const { hasFlag, readFlag } = require('../lib/arg-parser');
6
+ const { runGit: spawnGit } = require('../lib/git-spawn');
7
7
  const { collectBoard } = require('./land');
8
8
  const { listWorktrees } = require('./worktree');
9
9
 
@@ -20,25 +20,11 @@ function defaultDeps() {
20
20
  readdirSync: fs.readdirSync,
21
21
  statSync: fs.statSync,
22
22
  watch: fs.watch,
23
- spawnSync,
23
+ runGit: (root, args) => spawnGit(args, { cwd: root, check: false }),
24
24
  now: () => Date.now(),
25
25
  };
26
26
  }
27
27
 
28
- function hasFlag(args, name) {
29
- return args.includes(name);
30
- }
31
-
32
- function readFlag(args, name, fallback = '') {
33
- const prefix = `${name}=`;
34
- for (let i = 0; i < args.length; i += 1) {
35
- const arg = String(args[i] || '');
36
- if (arg === name && args[i + 1] && !String(args[i + 1]).startsWith('--')) return String(args[i + 1]);
37
- if (arg.startsWith(prefix)) return arg.slice(prefix.length);
38
- }
39
- return fallback;
40
- }
41
-
42
28
  function timestampMs(value) {
43
29
  if (value == null || value === '') return 0;
44
30
  if (typeof value === 'number') {
@@ -102,7 +88,7 @@ function isDirectory(file, deps) {
102
88
 
103
89
  function runGit(root, args, deps) {
104
90
  try {
105
- const result = deps.spawnSync('git', args, { cwd: root, encoding: 'utf8' });
91
+ const result = deps.runGit(root, args);
106
92
  return result && typeof result.status === 'number' ? result : { status: 1, stdout: '', stderr: '' };
107
93
  } catch {
108
94
  return { status: 1, stdout: '', stderr: '' };