atris 3.15.42 → 3.15.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/commands/play.js +11 -0
- package/package.json +1 -1
package/commands/play.js
CHANGED
|
@@ -273,6 +273,16 @@ function globalSyncCommands(player) {
|
|
|
273
273
|
];
|
|
274
274
|
}
|
|
275
275
|
|
|
276
|
+
function handleSourceLine(state) {
|
|
277
|
+
const source = state.player_source || 'unknown';
|
|
278
|
+
if (source === 'flag') return 'Handle source: --as/--player.';
|
|
279
|
+
if (source === 'env') return 'Handle source: ATRIS_PLAYER/ATRIS_USERNAME.';
|
|
280
|
+
if (source === 'atris_account' || source === 'atris_session' || source === 'atris_profile') {
|
|
281
|
+
return `Handle source: ${source.replace(/_/g, ' ')}.`;
|
|
282
|
+
}
|
|
283
|
+
return 'Handle source: inferred. To choose one, run atris play --as <handle> or ATRIS_PLAYER=<handle> atris play.';
|
|
284
|
+
}
|
|
285
|
+
|
|
276
286
|
function ensureStarterMission(taskDb, db, workspaceRoot, player, tasks, args = []) {
|
|
277
287
|
if (hasFlag(args, '--no-seed')) return { tasks, seeded: null };
|
|
278
288
|
if (selectMission(tasks, player)) return { tasks, seeded: null };
|
|
@@ -418,6 +428,7 @@ function render(state) {
|
|
|
418
428
|
console.log('');
|
|
419
429
|
console.log('AgentXP Mode');
|
|
420
430
|
console.log(`Player ${state.player} | Workspace ${state.workspace_name}`);
|
|
431
|
+
console.log(handleSourceLine(state));
|
|
421
432
|
console.log('');
|
|
422
433
|
|
|
423
434
|
if (!state.mission) {
|