atris 3.37.1 → 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 (164) hide show
  1. package/AGENTS.md +25 -6
  2. package/README.md +2 -0
  3. package/atris/PERSONA.md +11 -11
  4. package/atris.md +17 -2
  5. package/ax +160 -34
  6. package/bin/atris.js +78 -6
  7. package/commands/activate.js +16 -3
  8. package/commands/agent-spawn.js +13 -18
  9. package/commands/autoland.js +76 -47
  10. package/commands/autopilot-front.js +0 -4
  11. package/commands/autopilot.js +0 -12
  12. package/commands/bench.js +10 -12
  13. package/commands/brain.js +0 -7
  14. package/commands/brief.js +0 -2
  15. package/commands/business-sync.js +0 -1
  16. package/commands/business.js +452 -12
  17. package/commands/chat-scan.js +5 -7
  18. package/commands/clean.js +31 -2
  19. package/commands/close.js +46 -11
  20. package/commands/cloud.js +0 -1
  21. package/commands/codex-goal.js +8 -12
  22. package/commands/computer.js +6 -5
  23. package/commands/console.js +64 -11
  24. package/commands/decide.js +166 -0
  25. package/commands/deck.js +30 -12
  26. package/commands/dream.js +0 -7
  27. package/commands/drill.js +14 -25
  28. package/commands/engine.js +206 -26
  29. package/commands/experiments.js +0 -4
  30. package/commands/fleet-report.js +12 -4
  31. package/commands/game.js +261 -0
  32. package/commands/gm.js +17 -7
  33. package/commands/goal.js +0 -6
  34. package/commands/harvest.js +1 -5
  35. package/commands/improve.js +29 -8
  36. package/commands/init.js +41 -37
  37. package/commands/integrations.js +0 -7
  38. package/commands/land.js +77 -20
  39. package/commands/launchpad.js +1 -16
  40. package/commands/lesson.js +17 -7
  41. package/commands/lifecycle.js +5 -5
  42. package/commands/log.js +55 -5
  43. package/commands/loop-front.js +0 -2
  44. package/commands/loops.js +6 -5
  45. package/commands/meet.js +0 -2
  46. package/commands/member.js +622 -573
  47. package/commands/mission.js +790 -314
  48. package/commands/next.js +0 -1
  49. package/commands/now.js +0 -12
  50. package/commands/one-lap.js +8 -8
  51. package/commands/orb.js +0 -4
  52. package/commands/pack-craft.js +0 -1
  53. package/commands/pack.js +3599 -424
  54. package/commands/play.js +6 -6
  55. package/commands/probe.js +12 -6
  56. package/commands/pulse.js +88 -64
  57. package/commands/push.js +0 -4
  58. package/commands/radar.js +14 -11
  59. package/commands/recover.js +340 -0
  60. package/commands/release.js +10 -9
  61. package/commands/report.js +0 -1
  62. package/commands/router.js +320 -0
  63. package/commands/run-front.js +0 -2
  64. package/commands/search.js +0 -3
  65. package/commands/site-deploy.js +870 -0
  66. package/commands/site.js +11 -2
  67. package/commands/skill.js +7 -2
  68. package/commands/slop.js +237 -7
  69. package/commands/status.js +6 -0
  70. package/commands/stream.js +4 -20
  71. package/commands/study.js +0 -3
  72. package/commands/sync-checkout.js +51 -0
  73. package/commands/sync.js +11 -40
  74. package/commands/task.js +999 -595
  75. package/commands/taste.js +101 -0
  76. package/commands/teach.js +86 -0
  77. package/commands/team.js +83 -3
  78. package/commands/unknowns.js +0 -10
  79. package/commands/update.js +0 -1
  80. package/commands/vercel.js +4 -2
  81. package/commands/visualize.js +0 -5
  82. package/commands/voice.js +195 -0
  83. package/commands/watch.js +1 -28
  84. package/commands/wiki.js +42 -15
  85. package/commands/wish.js +0 -1
  86. package/commands/workflow.js +2 -2
  87. package/commands/worktree.js +88 -28
  88. package/commands/xp.js +28 -30
  89. package/commands/youtube.js +0 -2
  90. package/lib/accept-verify-gate.js +126 -0
  91. package/lib/activity-stream.js +0 -2
  92. package/lib/arg-parser.js +41 -0
  93. package/lib/auto-accept-certified.js +261 -3
  94. package/lib/autoland.js +66 -3
  95. package/lib/ax-auto-lane.js +68 -7
  96. package/lib/bench/context.js +0 -2
  97. package/lib/bench/report.js +0 -1
  98. package/lib/bench/runner.js +18 -11
  99. package/lib/brief-ledger.js +0 -6
  100. package/lib/business-simulate.js +382 -0
  101. package/lib/chat-log-scan.js +0 -5
  102. package/lib/checkout-sync.js +52 -0
  103. package/lib/claude-boot-block.js +48 -0
  104. package/lib/cloud-mission.js +0 -6
  105. package/lib/codex-flight.js +0 -1
  106. package/lib/conductor-artifacts.js +25 -0
  107. package/lib/context-gatherer.js +7 -2
  108. package/lib/deck-compose.js +0 -1
  109. package/lib/deck-history.js +0 -1
  110. package/lib/deck-layout.js +0 -5
  111. package/lib/deck-review.js +0 -7
  112. package/lib/deck-schema.js +0 -1
  113. package/lib/default-verifier.js +0 -2
  114. package/lib/engine-registry.js +157 -28
  115. package/lib/experiments/daily.js +0 -6
  116. package/lib/falsifier-probe.js +84 -0
  117. package/lib/fleet.js +275 -42
  118. package/lib/functional-owner.js +0 -3
  119. package/lib/git-spawn.js +15 -0
  120. package/lib/inspect-fields.js +0 -1
  121. package/lib/json-file.js +37 -0
  122. package/lib/known-commands.js +2 -2
  123. package/lib/learnings.js +0 -2
  124. package/lib/lesson-preflight.js +146 -0
  125. package/lib/loop-doctor.js +11 -19
  126. package/lib/manifest.js +0 -2
  127. package/lib/member-alive.js +0 -1
  128. package/lib/member-switches.js +0 -5
  129. package/lib/mission-artifact.js +0 -1
  130. package/lib/mission-human-asks.js +28 -0
  131. package/lib/mission-protected-lane.js +296 -0
  132. package/lib/mission-room.js +0 -2
  133. package/lib/mission-runtime-loop.js +0 -1
  134. package/lib/next-moves.js +0 -18
  135. package/lib/official-cli-integration.js +47 -6
  136. package/lib/orb-context.js +14 -4
  137. package/lib/orb-scorecard.js +0 -1
  138. package/lib/outbound-send-gate.js +0 -6
  139. package/lib/pack-capabilities.js +685 -0
  140. package/lib/permission-grants.js +0 -6
  141. package/lib/policy-lessons.js +0 -2
  142. package/lib/pulse.js +68 -15
  143. package/lib/review-integrity.js +0 -2
  144. package/lib/router-brain.js +51 -3
  145. package/lib/runner-command.js +0 -10
  146. package/lib/runtime-bootstrap.js +0 -1
  147. package/lib/scorecard.js +0 -1
  148. package/lib/self-drive.js +45 -14
  149. package/lib/state-detection.js +0 -6
  150. package/lib/task-db.js +137 -7
  151. package/lib/task-decision.js +50 -0
  152. package/lib/taste-lessons.js +153 -0
  153. package/lib/team-presence.js +0 -1
  154. package/lib/tool-result-encode.js +17 -1
  155. package/lib/voice-gate.js +129 -2
  156. package/lib/wiki.js +152 -9
  157. package/lib/wish-audit.js +21 -7
  158. package/lib/wish-delegate.js +27 -21
  159. package/lib/wish-stats.js +0 -5
  160. package/lib/wish-store.js +0 -1
  161. package/lib/workspace-safety.js +0 -2
  162. package/lib/zip.js +95 -8
  163. package/package.json +2 -1
  164. package/templates/business-starter/persona.md +9 -0
@@ -67,6 +67,10 @@ function printHelp(config) {
67
67
  for (const command of config.commands) {
68
68
  console.log(` ${command.usage.padEnd(13)} ${command.description}`);
69
69
  }
70
+ if (config.commands.some((command) => command.summarize)) {
71
+ console.log('');
72
+ console.log(' --raw print the full cli output instead of the grouped summary');
73
+ }
70
74
  console.log('');
71
75
  console.log(`binary: ${config.binary}`);
72
76
  console.log(`install: ${config.installHint}`);
@@ -115,14 +119,54 @@ function matchCommand(config, args) {
115
119
  });
116
120
  }
117
121
 
122
+ const SUMMARY_SAMPLE_LINES = 5;
123
+
124
+ function summaryLines(result) {
125
+ const stdout = String(result.stdout || '').split(/\r?\n/);
126
+ const stderr = String(result.stderr || '').split(/\r?\n/);
127
+ return { stdout, stderr, all: [...stdout, ...stderr].filter((line) => line.trim()) };
128
+ }
129
+
130
+ function printOutputSummary(config, cliArgs, result) {
131
+ const status = result.status ?? 0;
132
+ const { all } = summaryLines(result);
133
+ const errors = all.filter((line) => /\berror\b|\bfailed\b|\bfatal\b/i.test(line));
134
+ const warnings = all.filter((line) => /\bwarn/i.test(line));
135
+ const links = [...new Set(all.flatMap((line) => line.match(/https?:\/\/\S+/g) || []))];
136
+ const label = `${config.name} ${cliArgs.join(' ')}`.trim();
137
+
138
+ console.log(`${label}: ${status === 0 ? 'ok' : `failed (exit ${status})`}, ${all.length} output lines`);
139
+ console.log('');
140
+ if (links.length) {
141
+ console.log(`links (${links.length})`);
142
+ for (const link of links.slice(0, SUMMARY_SAMPLE_LINES)) console.log(` ${link}`);
143
+ console.log('');
144
+ }
145
+ console.log(errors.length ? `errors (${errors.length})` : 'errors: none');
146
+ for (const line of errors.slice(0, SUMMARY_SAMPLE_LINES)) console.log(` ${line.trim()}`);
147
+ if (errors.length) console.log('');
148
+ console.log(warnings.length ? `warnings (${warnings.length})` : 'warnings: none');
149
+ for (const line of warnings.slice(0, SUMMARY_SAMPLE_LINES)) console.log(` ${line.trim()}`);
150
+ if (warnings.length) console.log('');
151
+ const tail = all.slice(-SUMMARY_SAMPLE_LINES);
152
+ if (tail.length) {
153
+ console.log('last lines');
154
+ for (const line of tail) console.log(` ${line.trim()}`);
155
+ console.log('');
156
+ }
157
+ console.log(`full output: atris ${label} --raw`);
158
+ }
159
+
118
160
  function runPassthrough(config, command, args) {
119
161
  const binary = ensureBinary(config);
120
162
  if (!binary.ok) return 1;
121
163
 
122
- const rest = args.slice(command.match.length);
164
+ const raw = args.includes('--raw');
165
+ const rest = args.slice(command.match.length).filter((arg) => arg !== '--raw');
123
166
  const cliArgs = [...command.forward, ...rest];
167
+ const summarize = command.summarize && !raw;
124
168
  const result = spawnSync(config.binary, cliArgs, {
125
- stdio: 'inherit',
169
+ ...(summarize ? { encoding: 'utf8' } : { stdio: 'inherit' }),
126
170
  env: process.env,
127
171
  });
128
172
  if (missingBinary(result)) {
@@ -133,6 +177,7 @@ function runPassthrough(config, command, args) {
133
177
  console.error(`${config.name} command failed: ${result.error.message}`);
134
178
  return 1;
135
179
  }
180
+ if (summarize) printOutputSummary(config, cliArgs, result);
136
181
  return result.status ?? 0;
137
182
  }
138
183
 
@@ -166,9 +211,5 @@ function createOfficialCliCommand(config) {
166
211
 
167
212
  module.exports = {
168
213
  createOfficialCliCommand,
169
- ensureBinary,
170
- hasHelp,
171
- matchCommand,
172
214
  printHelp,
173
- runAuthCheck,
174
215
  };
@@ -13,7 +13,13 @@ const BACKLOG_STATUSES = new Set(['open', 'backlog', 'inbox', 'planned', 'plan',
13
13
  function cleanTitle(value, max = 64) {
14
14
  const text = String(value || '').replace(/\s+/g, ' ').trim();
15
15
  if (!text) return '';
16
- return text.length > max ? `${text.slice(0, max - 1)}…` : text;
16
+ if (text.length <= max) return text;
17
+ const slice = text.slice(0, max - 1);
18
+ const lastSpace = slice.lastIndexOf(' ');
19
+ // Cut on a word boundary so a title never ends on half a word ("...the owne…").
20
+ // Fall back to the hard slice only when a single word already fills the limit.
21
+ const body = lastSpace > 0 ? slice.slice(0, lastSpace) : slice;
22
+ return `${body.replace(/[\s,;:.!?-]+$/, '')}…`;
17
23
  }
18
24
 
19
25
  function asRecord(value) {
@@ -455,7 +461,8 @@ async function collectOrbContext(root, { threads = [], now = Date.now() } = {})
455
461
  }
456
462
 
457
463
  // The accumulate-context flywheel: each chosen option appends one visible line to the
458
- // project's now.md. Append-only; creates now.md on first choice.
464
+ // project's operating truth at atris/now.md. Append-only; creates the file on first
465
+ // choice. (It used to write <root>/now.md, a stray file nothing reads.)
459
466
  async function appendOrbChoice(root, label, when = new Date()) {
460
467
  const safeRoot = typeof root === 'string' && root ? path.resolve(root) : null;
461
468
  const cleanLabel = cleanTitle(label, 120);
@@ -463,7 +470,10 @@ async function appendOrbChoice(root, label, when = new Date()) {
463
470
  const day = when.toISOString().slice(0, 10);
464
471
  const line = `orb: ${cleanLabel} · ${day}\n`;
465
472
  try {
466
- await fs.promises.appendFile(path.join(safeRoot, 'now.md'), line, 'utf8');
473
+ const nowPath = fs.existsSync(path.join(safeRoot, 'atris'))
474
+ ? path.join(safeRoot, 'atris', 'now.md')
475
+ : path.join(safeRoot, 'now.md'); // pre-init workspaces keep the old spot
476
+ await fs.promises.appendFile(nowPath, line, 'utf8');
467
477
  return { ok: true, line: line.trim() };
468
478
  } catch (error) {
469
479
  return { ok: false, error: String((error && error.message) || error) };
@@ -471,7 +481,7 @@ async function appendOrbChoice(root, label, when = new Date()) {
471
481
  }
472
482
 
473
483
  module.exports = {
474
- buildOrbContext,
484
+ cleanTitle,
475
485
  collectOrbContext,
476
486
  appendOrbChoice,
477
487
  };
@@ -217,7 +217,6 @@ function parseOrbScorecardDays(args = []) {
217
217
  module.exports = {
218
218
  DAY_MS,
219
219
  DEFAULT_DAYS,
220
- emptyOrbScorecard,
221
220
  readOrbScorecard,
222
221
  renderOrbScorecard,
223
222
  parseOrbScorecardDays,
@@ -153,13 +153,7 @@ function prepareOutboundSendTextOrExit(channel, args = [], options = {}) {
153
153
  }
154
154
 
155
155
  module.exports = {
156
- OutboundArtifactGateError,
157
- assertOutboundSendAllowed,
158
156
  assertOutboundSendAllowedOrExit,
159
- defaultGateOptions,
160
157
  extractOutboundGateOptions,
161
- parseOutboundSendArgs,
162
158
  prepareOutboundSendTextOrExit,
163
- readOutboundBodyFile,
164
- shouldRunOutboundGate,
165
159
  };