atris 3.38.0 → 3.41.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.
- package/AGENTS.md +25 -6
- package/atris/PERSONA.md +8 -4
- package/atris.md +7 -0
- package/ax +2 -1
- package/bin/atris.js +31 -6
- package/commands/agent-spawn.js +13 -11
- package/commands/autoland.js +28 -77
- package/commands/bench.js +10 -12
- package/commands/business.js +345 -0
- package/commands/chat-scan.js +5 -7
- package/commands/codex-goal.js +8 -10
- package/commands/computer.js +20 -0
- package/commands/console.js +19 -3
- package/commands/decide.js +166 -0
- package/commands/deck.js +1 -4
- package/commands/drill.js +14 -24
- package/commands/engine.js +196 -8
- package/commands/gm.js +8 -6
- package/commands/harvest.js +1 -4
- package/commands/init.js +23 -3
- package/commands/land.js +8 -14
- package/commands/launchpad.js +1 -14
- package/commands/lifecycle.js +5 -5
- package/commands/log.js +55 -5
- package/commands/member.js +558 -574
- package/commands/mission.js +456 -237
- package/commands/pack.js +2746 -164
- package/commands/play.js +6 -4
- package/commands/probe.js +2 -2
- package/commands/pulse.js +15 -16
- package/commands/release.js +10 -9
- package/commands/router.js +5 -4
- package/commands/site-deploy.js +885 -0
- package/commands/site.js +11 -2
- package/commands/slop.js +14 -2
- package/commands/stream.js +4 -18
- package/commands/task.js +880 -558
- package/commands/taste.js +101 -0
- package/commands/team.js +176 -3
- package/commands/vercel.js +4 -2
- package/commands/voice.js +195 -0
- package/commands/watch.js +1 -22
- package/commands/wiki.js +1 -4
- package/commands/workflow.js +2 -2
- package/commands/worktree.js +1 -14
- package/commands/xp.js +27 -24
- package/lib/accept-verify-gate.js +5 -1
- package/lib/arg-parser.js +41 -0
- package/lib/auto-accept-certified.js +116 -1
- package/lib/autoland.js +66 -0
- package/lib/bench/runner.js +19 -1
- package/lib/context-gatherer.js +7 -1
- package/lib/engine-registry.js +141 -20
- package/lib/falsifier-probe.js +84 -0
- package/lib/fleet.js +65 -15
- package/lib/git-spawn.js +15 -0
- package/lib/json-file.js +37 -0
- package/lib/known-commands.js +2 -2
- package/lib/lesson-preflight.js +146 -0
- package/lib/loop-doctor.js +0 -2
- package/lib/mission-human-asks.js +28 -0
- package/lib/mission-protected-lane.js +4 -1
- package/lib/official-cli-integration.js +47 -2
- package/lib/orb-context.js +8 -1
- package/lib/pack-capabilities.js +685 -0
- package/lib/router-brain.js +51 -1
- package/lib/runner-command.js +0 -6
- package/lib/self-drive.js +44 -13
- package/lib/task-db.js +137 -3
- package/lib/task-decision.js +50 -0
- package/lib/taste-lessons.js +153 -0
- package/lib/tool-result-encode.js +17 -1
- package/lib/voice-gate.js +66 -0
- package/lib/wish-audit.js +1 -1
- package/lib/wish-delegate.js +1 -1
- package/lib/zip.js +95 -7
- package/package.json +2 -1
- package/templates/business-starter/persona.md +9 -0
package/commands/play.js
CHANGED
|
@@ -5,6 +5,7 @@ const os = require('os');
|
|
|
5
5
|
const fs = require('fs');
|
|
6
6
|
const { spawnSync } = require('child_process');
|
|
7
7
|
const { getSessionProfile, loadCredentials } = require('../utils/auth');
|
|
8
|
+
const { hasFlag: hasExactFlag } = require('../lib/arg-parser');
|
|
8
9
|
|
|
9
10
|
const AGENTXP_LEADERBOARD_URL = 'https://api.atris.ai/api/agentxp/leaderboard';
|
|
10
11
|
const AGENTXP_GLOBAL_SYNC_RULE = 'Run atris login, then sync. Owner-provided sync tokens are guided-demo fallback only.';
|
|
@@ -38,8 +39,9 @@ function flag(args, name) {
|
|
|
38
39
|
return null;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
|
|
42
|
-
|
|
42
|
+
// This command treats --name=value as flag presence as well as a standalone flag.
|
|
43
|
+
function hasFlagOrValue(args, name) {
|
|
44
|
+
return hasExactFlag(args, name) || args.some(arg => arg.startsWith(`${name}=`));
|
|
43
45
|
}
|
|
44
46
|
|
|
45
47
|
function positional(args) {
|
|
@@ -284,7 +286,7 @@ function handleSourceLine(state) {
|
|
|
284
286
|
}
|
|
285
287
|
|
|
286
288
|
function ensureStarterMission(taskDb, db, workspaceRoot, player, tasks, args = []) {
|
|
287
|
-
if (
|
|
289
|
+
if (hasFlagOrValue(args, '--no-seed')) return { tasks, seeded: null };
|
|
288
290
|
if (selectMission(tasks, player)) return { tasks, seeded: null };
|
|
289
291
|
fs.mkdirSync(path.join(workspaceRoot, 'atris'), { recursive: true });
|
|
290
292
|
|
|
@@ -476,7 +478,7 @@ async function playCommand(...args) {
|
|
|
476
478
|
}
|
|
477
479
|
|
|
478
480
|
const state = modeState(args);
|
|
479
|
-
if (
|
|
481
|
+
if (hasFlagOrValue(args, '--json')) {
|
|
480
482
|
console.log(JSON.stringify(state, null, 2));
|
|
481
483
|
return;
|
|
482
484
|
}
|
package/commands/probe.js
CHANGED
|
@@ -29,7 +29,7 @@ const http = require('http');
|
|
|
29
29
|
const path = require('path');
|
|
30
30
|
const { getApiBaseUrl } = require('../utils/api');
|
|
31
31
|
const { loadCredentials } = require('../utils/auth');
|
|
32
|
-
const {
|
|
32
|
+
const { buildToolResultBody } = require('../lib/tool-result-encode');
|
|
33
33
|
|
|
34
34
|
// G2's honest blocked message (tool_policy_bench.MAX_TURNS_EXHAUSTED_MESSAGE)
|
|
35
35
|
// starts with this — an answer that is only this marker is a dead-end.
|
|
@@ -357,7 +357,7 @@ async function runAtris2Turn(opts = {}) {
|
|
|
357
357
|
unsupported.push(`tool:${name || '?'}`);
|
|
358
358
|
}
|
|
359
359
|
await postJson(`${base}/atris2/turn/tool-result`, token,
|
|
360
|
-
|
|
360
|
+
buildToolResultBody(ev.call_id || ev.id, out), 30000);
|
|
361
361
|
resetIdle();
|
|
362
362
|
}).catch((e) => reject(e));
|
|
363
363
|
} else if (et === 'result') {
|
package/commands/pulse.js
CHANGED
|
@@ -19,11 +19,10 @@ const path = require('path');
|
|
|
19
19
|
const { spawnSync } = require('child_process');
|
|
20
20
|
const pulse = require('../lib/pulse');
|
|
21
21
|
const { DEFAULT_CLAUDE_RUNNER_MODEL } = require('../lib/runner-command');
|
|
22
|
+
const { hasFlag } = require('../lib/arg-parser');
|
|
22
23
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
}
|
|
26
|
-
function readFlag(args, name, fallback = null) {
|
|
24
|
+
// Preserve the existing rule that the next token is a value, even if it is a flag.
|
|
25
|
+
function readFollowingFlag(args, name, fallback = null) {
|
|
27
26
|
const i = args.indexOf(name);
|
|
28
27
|
if (i === -1 || i === args.length - 1) return fallback;
|
|
29
28
|
return args[i + 1];
|
|
@@ -208,7 +207,7 @@ function tickCommand(args, root = process.cwd()) {
|
|
|
208
207
|
const asJson = wantsJson(args);
|
|
209
208
|
const noClaude = hasFlag(args, '--no-claude');
|
|
210
209
|
const noVerify = hasFlag(args, '--no-verify');
|
|
211
|
-
const verifyCmd = noVerify ? null :
|
|
210
|
+
const verifyCmd = noVerify ? null : readFollowingFlag(args, '--verify', pulse.defaultVerifyCmd(root));
|
|
212
211
|
const startedAt = Date.now();
|
|
213
212
|
|
|
214
213
|
// Detect a previous tick that died mid-run before we take the lock.
|
|
@@ -577,7 +576,7 @@ function installCommand(args, root = process.cwd(), options = {}) {
|
|
|
577
576
|
const commandSpawn = options.spawnSync || spawnSync;
|
|
578
577
|
const writeOutput = options.writeOutput || ((text) => process.stdout.write(text));
|
|
579
578
|
const slot = pulse.resolvePulseSlot(root, options.homeDir ? { homeDir: options.homeDir } : {});
|
|
580
|
-
const cadenceInput =
|
|
579
|
+
const cadenceInput = readFollowingFlag(args, '--cadence', pulse.DEFAULT_CADENCE_CRON);
|
|
581
580
|
let cron;
|
|
582
581
|
try {
|
|
583
582
|
cron = pulse.normalizeCronCadence(cadenceInput);
|
|
@@ -595,8 +594,8 @@ function installCommand(args, root = process.cwd(), options = {}) {
|
|
|
595
594
|
let expiry;
|
|
596
595
|
try {
|
|
597
596
|
expiry = pulse.normalizeExpiryDuration({
|
|
598
|
-
hours:
|
|
599
|
-
days:
|
|
597
|
+
hours: readFollowingFlag(args, '--hours', null),
|
|
598
|
+
days: readFollowingFlag(args, '--days', '7'),
|
|
600
599
|
});
|
|
601
600
|
} catch (error) {
|
|
602
601
|
const out = {
|
|
@@ -604,17 +603,17 @@ function installCommand(args, root = process.cwd(), options = {}) {
|
|
|
604
603
|
action: 'pulse_install',
|
|
605
604
|
reason: 'invalid_expiry',
|
|
606
605
|
detail: error && error.message ? error.message : String(error),
|
|
607
|
-
hours:
|
|
608
|
-
days:
|
|
606
|
+
hours: readFollowingFlag(args, '--hours', null),
|
|
607
|
+
days: readFollowingFlag(args, '--days', '7'),
|
|
609
608
|
};
|
|
610
609
|
if (!asJson) process.stdout.write(`pulse install failed: ${out.detail}\n`);
|
|
611
610
|
return emit(out, asJson);
|
|
612
611
|
}
|
|
613
|
-
const verifyCmd =
|
|
614
|
-
const model =
|
|
615
|
-
const runnerProfile =
|
|
616
|
-
const runnerBin =
|
|
617
|
-
const runnerCommandTemplate =
|
|
612
|
+
const verifyCmd = readFollowingFlag(args, '--verify', pulse.defaultVerifyCmd(root));
|
|
613
|
+
const model = readFollowingFlag(args, '--model', process.env.ATRIS_RUNNER_MODEL || process.env.ATRIS_CLAUDE_MODEL || DEFAULT_CLAUDE_RUNNER_MODEL);
|
|
614
|
+
const runnerProfile = readFollowingFlag(args, '--runner-profile', process.env.ATRIS_RUNNER_PROFILE || '');
|
|
615
|
+
const runnerBin = readFollowingFlag(args, '--runner-bin', process.env.ATRIS_RUNNER_BIN || process.env.ATRIS_CLAUDE_BIN || '');
|
|
616
|
+
const runnerCommandTemplate = readFollowingFlag(args, '--runner-template', process.env.ATRIS_RUNNER_COMMAND_TEMPLATE || process.env.ATRIS_CLAUDE_COMMAND_TEMPLATE || '');
|
|
618
617
|
const deadlineEpoch = Math.floor(Date.now() / 1000) + expiry.seconds;
|
|
619
618
|
|
|
620
619
|
fs.mkdirSync(slot.stateHome, { recursive: true });
|
|
@@ -735,7 +734,7 @@ function uninstallCommand(args, root = process.cwd(), options = {}) {
|
|
|
735
734
|
|
|
736
735
|
function runCommand(args, root = process.cwd()) {
|
|
737
736
|
const asJson = wantsJson(args);
|
|
738
|
-
const maxTicks = Math.max(1, Number(
|
|
737
|
+
const maxTicks = Math.max(1, Number(readFollowingFlag(args, '--max-ticks', '1')) || 1);
|
|
739
738
|
const passthrough = args.filter((a) => a !== '--max-ticks' && a !== String(maxTicks));
|
|
740
739
|
const results = [];
|
|
741
740
|
for (let i = 0; i < maxTicks; i++) {
|
package/commands/release.js
CHANGED
|
@@ -7,7 +7,7 @@ const { execFileSync } = require('child_process');
|
|
|
7
7
|
*
|
|
8
8
|
* - Reads git log since last tag
|
|
9
9
|
* - Determines bump type (minor if any scorecard has reward>=5, else patch)
|
|
10
|
-
* - Bumps package.json
|
|
10
|
+
* - Bumps package.json and package-lock.json together
|
|
11
11
|
* - Commits, tags, pushes
|
|
12
12
|
* - Creates GitHub release via `gh`
|
|
13
13
|
* - Drafts a /launch post (3 emoji bullets)
|
|
@@ -79,16 +79,17 @@ async function releaseAtris({ dryRun = false } = {}) {
|
|
|
79
79
|
return;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
|
-
// 7.
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
82
|
+
// 7. Let npm keep package.json and package-lock.json aligned.
|
|
83
|
+
execFileSync('npm', [
|
|
84
|
+
'version',
|
|
85
|
+
nextVersion,
|
|
86
|
+
'--no-git-tag-version',
|
|
87
|
+
'--ignore-scripts',
|
|
88
|
+
], { cwd, stdio: 'ignore' });
|
|
89
|
+
console.log(`bumped package.json and package-lock.json to ${nextVersion}`);
|
|
89
90
|
|
|
90
91
|
// 8. Commit
|
|
91
|
-
execFileSync('git', ['add', 'package.json'], { cwd });
|
|
92
|
+
execFileSync('git', ['add', 'package.json', 'package-lock.json'], { cwd });
|
|
92
93
|
execFileSync('git', ['commit', '-m', `v${nextVersion}`], { cwd });
|
|
93
94
|
console.log('committed');
|
|
94
95
|
|
package/commands/router.js
CHANGED
|
@@ -13,7 +13,8 @@ const LANE_ORDER = ['fast', 'pro', 'max', 'code-fast'];
|
|
|
13
13
|
const DEPTH = { fast: 0, 'code-fast': 1, pro: 1, max: 2 };
|
|
14
14
|
const QUALITY_MISS_WEIGHT = 3;
|
|
15
15
|
|
|
16
|
-
|
|
16
|
+
// Preserve alias priority and inline-value priority within each alias.
|
|
17
|
+
function readFirstNamedFlag(args, names) {
|
|
17
18
|
for (const name of names) {
|
|
18
19
|
const prefix = `${name}=`;
|
|
19
20
|
const inline = args.find((arg) => String(arg).startsWith(prefix));
|
|
@@ -29,14 +30,14 @@ function readFlag(args, names) {
|
|
|
29
30
|
function resolveRouterPaths(args = [], env = process.env) {
|
|
30
31
|
const home = env.HOME || os.homedir();
|
|
31
32
|
return {
|
|
32
|
-
picks: path.resolve(
|
|
33
|
+
picks: path.resolve(readFirstNamedFlag(args, ['--picks', '--picks-path'])
|
|
33
34
|
|| env.ATRIS_ROUTER_PICKS_PATH
|
|
34
35
|
|| env.ATRIS_AX_AUTO_PICKS_PATH
|
|
35
36
|
|| path.join(home, '.atris', 'ax-auto-picks.jsonl')),
|
|
36
|
-
overrides: path.resolve(
|
|
37
|
+
overrides: path.resolve(readFirstNamedFlag(args, ['--overrides', '--overrides-path'])
|
|
37
38
|
|| env.ATRIS_ROUTER_OVERRIDES_PATH
|
|
38
39
|
|| path.join(home, '.atris', 'router-overrides.json')),
|
|
39
|
-
gold: path.resolve(
|
|
40
|
+
gold: path.resolve(readFirstNamedFlag(args, ['--gold', '--gold-path'])
|
|
40
41
|
|| env.ATRIS_ROUTER_GOLD_PATH
|
|
41
42
|
|| DEFAULT_GOLD_PATH),
|
|
42
43
|
};
|