atris 3.30.2 → 3.30.3

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.
@@ -3,6 +3,7 @@
3
3
  const fs = require('fs');
4
4
  const path = require('path');
5
5
  const crypto = require('crypto');
6
+ const readline = require('readline');
6
7
  const { spawn, spawnSync } = require('child_process');
7
8
  const {
8
9
  resolveClaudeRunnerModel,
@@ -141,6 +142,58 @@ function printJsonOrText(payload, lines, asJson) {
141
142
  for (const line of lines) console.log(line);
142
143
  }
143
144
 
145
+ function missionRunInputRequired(asJson = false) {
146
+ const payload = {
147
+ ok: false,
148
+ action: 'mission_input_required',
149
+ prompt: 'What mission should Atris run?',
150
+ owner_prompt: 'Which team member should own it?',
151
+ example: 'atris mission run "make onboarding magical" --owner mission-lead',
152
+ };
153
+ if (asJson) {
154
+ console.log(JSON.stringify(payload, null, 2));
155
+ } else {
156
+ console.error('What mission should Atris run?');
157
+ console.error('Try: atris mission run "make onboarding magical" --owner mission-lead');
158
+ }
159
+ process.exit(1);
160
+ }
161
+
162
+ function askLine(rl, question) {
163
+ return new Promise((resolve) => rl.question(question, (answer) => resolve(String(answer || '').trim())));
164
+ }
165
+
166
+ function removeValueFlag(args, name) {
167
+ const out = [];
168
+ const prefix = `${name}=`;
169
+ for (let i = 0; i < args.length; i += 1) {
170
+ const arg = String(args[i]);
171
+ if (arg === name) {
172
+ if (args[i + 1] && !String(args[i + 1]).startsWith('--')) i += 1;
173
+ continue;
174
+ }
175
+ if (arg.startsWith(prefix)) continue;
176
+ out.push(args[i]);
177
+ }
178
+ return out;
179
+ }
180
+
181
+ async function promptMissionRunInput(args) {
182
+ const defaultOwner = readFlag(args, '--owner', process.env.ATRIS_AGENT_ID || 'mission-lead');
183
+ const rl = readline.createInterface({ input: process.stdin, output: process.stderr });
184
+ try {
185
+ const objective = await askLine(rl, 'Mission: ');
186
+ if (!objective) missionRunInputRequired(false);
187
+ const owner = await askLine(rl, `Team member [${defaultOwner}]: `);
188
+ return {
189
+ objective,
190
+ args: [...removeValueFlag(args, '--owner'), '--owner', owner || defaultOwner],
191
+ };
192
+ } finally {
193
+ rl.close();
194
+ }
195
+ }
196
+
144
197
  function loadTaskDb(asJson = false) {
145
198
  try {
146
199
  return require('../lib/task-db');
@@ -2176,6 +2229,15 @@ async function runMission(args) {
2176
2229
  ['--json', '--due', '--no-claude', '--no-verify', '--complete-on-pass', '--no-drain', '--always-on', '--xp-task', '--agent-xp'],
2177
2230
  ).join(' ').trim();
2178
2231
 
2232
+ if (!dueMode && !ref) {
2233
+ if (asJson || !process.stdin.isTTY || !process.stderr.isTTY) {
2234
+ missionRunInputRequired(asJson);
2235
+ }
2236
+ const prompted = await promptMissionRunInput(args);
2237
+ startMissionFromRunObjective(prompted.objective, prompted.args);
2238
+ return;
2239
+ }
2240
+
2179
2241
  let mission = dueMode && !ref ? selectDueMission() : resolveMission(ref);
2180
2242
  if (!mission && dueMode && !ref) {
2181
2243
  printJsonOrText(
@@ -2994,9 +3056,9 @@ atris mission - durable goal + loop + owner + proof state
2994
3056
  atris mission goal [--heartbeat] [--json]
2995
3057
  atris mission goal-loop [--max-wall 28800] [--max-iterations 32] [--no-claude] [--json]
2996
3058
  atris mission tick <id> [--verify] [--complete-on-pass] [--summary "..."] [--json]
2997
- atris mission run <id|--due> [--max-ticks 4] [--max-wall 3600] [--cadence "15m"]
3059
+ atris mission run ["objective"|id|--due] [--owner <member>] [--max-ticks 4] [--max-wall 3600] [--cadence "15m"]
2998
3060
  [--no-claude] [--no-verify] [--complete-on-pass] [--no-drain] [--json]
2999
- (always-on runs drain the review lane each tick; --no-drain skips)
3061
+ (bare run prompts for mission + owner; --due runs the saved queue)
3000
3062
  atris mission complete <id> --proof "..."
3001
3063
  atris mission stop <id> [--pause] [--reason "..."]
3002
3064
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atris",
3
- "version": "3.30.2",
3
+ "version": "3.30.3",
4
4
  "main": "bin/atris.js",
5
5
  "bin": {
6
6
  "atris": "bin/atris.js",