atris 3.79.0 → 3.80.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/README.md +6 -0
- package/atris/atris.md +66 -167
- package/atris/skills/security-audit/SKILL.md +77 -0
- package/atris/team/brainstormer/MEMBER.md +2 -2
- package/atris.md +66 -167
- package/bin/atris.js +6 -0
- package/commands/business.js +44 -1984
- package/commands/member.js +189 -966
- package/commands/mission.js +229 -1409
- package/commands/pack.js +112 -1476
- package/commands/security-review.js +125 -0
- package/commands/task.js +137 -1359
- package/lib/business-core.js +2022 -0
- package/lib/engine-ask.js +1 -0
- package/lib/handoff-wake.js +8 -6
- package/lib/known-commands.js +1 -1
- package/lib/member-autoland.js +21 -2
- package/lib/member-board.js +12 -10
- package/lib/member-core.js +1014 -0
- package/lib/member-up.js +46 -3
- package/lib/mission-core.js +1559 -0
- package/lib/pack-core.js +1588 -0
- package/lib/security-audit-classes.js +300 -0
- package/lib/security-audit.js +1519 -0
- package/lib/task-core.js +1412 -0
- package/lib/task-decision.js +66 -0
- package/lib/task-explanation.js +20 -0
- package/lib/yes-lock.js +1 -1
- package/package.json +1 -1
package/lib/task-decision.js
CHANGED
|
@@ -5,6 +5,8 @@
|
|
|
5
5
|
// marker is needs-human (CLI-879); decision is the same hold under a clearer
|
|
6
6
|
// name. Autonomous pickers must refuse these; list renderers must show them.
|
|
7
7
|
|
|
8
|
+
const { decisionChoiceText } = require('./task-explanation');
|
|
9
|
+
|
|
8
10
|
const DECISION_HOLD_TAGS = new Set([
|
|
9
11
|
'needs-human',
|
|
10
12
|
'needshuman',
|
|
@@ -41,10 +43,74 @@ function decisionMarkerFor(task) {
|
|
|
41
43
|
return isDecisionTask(task) ? DECISION_MARKER : '';
|
|
42
44
|
}
|
|
43
45
|
|
|
46
|
+
function decisionRefFor(task) {
|
|
47
|
+
if (!task || typeof task !== 'object') return 'TASK';
|
|
48
|
+
const ref = task.display_id || task.legacy_ref || task.id || '';
|
|
49
|
+
const text = String(ref || '').trim();
|
|
50
|
+
if (!text) return 'TASK';
|
|
51
|
+
if (task.display_id || task.legacy_ref) return text;
|
|
52
|
+
return text.replace(/[^a-zA-Z0-9]/g, '').toUpperCase().slice(0, 8) || 'TASK';
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
function decisionShowCommand(task) {
|
|
56
|
+
return `atris task show ${decisionRefFor(task)}`;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
function summarizeDecisionTask(task) {
|
|
60
|
+
const ref = decisionRefFor(task);
|
|
61
|
+
const title = String((task && task.title) || '').replace(/\s+/g, ' ').trim();
|
|
62
|
+
const choice = decisionChoiceText(task);
|
|
63
|
+
const command = `atris task show ${ref}`;
|
|
64
|
+
return {
|
|
65
|
+
id: (task && task.id) || null,
|
|
66
|
+
task_id: (task && task.id) || null,
|
|
67
|
+
ref,
|
|
68
|
+
display_id: (task && task.display_id) || ref,
|
|
69
|
+
title,
|
|
70
|
+
choice,
|
|
71
|
+
command,
|
|
72
|
+
show_command: command,
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function summarizeSkippedDecisions(tasks = []) {
|
|
77
|
+
const list = (Array.isArray(tasks) ? tasks : [])
|
|
78
|
+
.filter(Boolean)
|
|
79
|
+
.map(summarizeDecisionTask);
|
|
80
|
+
const first = list[0] || null;
|
|
81
|
+
return {
|
|
82
|
+
reason: DECISION_REFUSE_REASON,
|
|
83
|
+
skipped_decision_count: list.length,
|
|
84
|
+
skipped_decision_refs: list.map((item) => item.ref),
|
|
85
|
+
skipped_decisions: list,
|
|
86
|
+
decisions: list,
|
|
87
|
+
choice: first ? first.choice : null,
|
|
88
|
+
command: first ? first.command : null,
|
|
89
|
+
show_command: first ? first.command : null,
|
|
90
|
+
next_command: first ? first.command : null,
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
function formatDecisionRefusalLines(tasks = []) {
|
|
95
|
+
const summary = summarizeSkippedDecisions(tasks);
|
|
96
|
+
const lines = [DECISION_REFUSE_REASON];
|
|
97
|
+
for (const item of summary.skipped_decisions) {
|
|
98
|
+
lines.push(` ${item.ref}: ${item.title}`);
|
|
99
|
+
lines.push(` choice: ${item.choice}`);
|
|
100
|
+
lines.push(` show: ${item.command}`);
|
|
101
|
+
}
|
|
102
|
+
if (summary.command) {
|
|
103
|
+
lines.push(`next: ${summary.command}`);
|
|
104
|
+
}
|
|
105
|
+
return lines;
|
|
106
|
+
}
|
|
107
|
+
|
|
44
108
|
module.exports = {
|
|
45
109
|
DECISION_REFUSE_REASON,
|
|
46
110
|
taskTagTokens,
|
|
47
111
|
isDecisionHoldTag,
|
|
48
112
|
isDecisionTask,
|
|
49
113
|
decisionMarkerFor,
|
|
114
|
+
summarizeSkippedDecisions,
|
|
115
|
+
formatDecisionRefusalLines,
|
|
50
116
|
};
|
package/lib/task-explanation.js
CHANGED
|
@@ -213,6 +213,25 @@ function taskApprovalControls({
|
|
|
213
213
|
};
|
|
214
214
|
}
|
|
215
215
|
|
|
216
|
+
function decisionChoiceText(task) {
|
|
217
|
+
const metadata = task && task.metadata && typeof task.metadata === 'object' ? task.metadata : {};
|
|
218
|
+
const explicitChoice = cleanText(
|
|
219
|
+
(task && task.choice)
|
|
220
|
+
|| metadata.choice
|
|
221
|
+
|| metadata.decision
|
|
222
|
+
|| metadata.question
|
|
223
|
+
);
|
|
224
|
+
if (explicitChoice) return endSentence(plainText(explicitChoice));
|
|
225
|
+
const explicit = explicitExplanationFields(metadata);
|
|
226
|
+
if (explicit.what_changes) return endSentence(plainText(explicit.what_changes));
|
|
227
|
+
if (explicit.why_it_matters) return endSentence(plainText(explicit.why_it_matters));
|
|
228
|
+
const goal = cleanText(explanationGoalText(task));
|
|
229
|
+
if (goal) return endSentence(plainText(goal));
|
|
230
|
+
const title = cleanText(task && task.title);
|
|
231
|
+
if (title) return endSentence(plainText(title));
|
|
232
|
+
return 'Decide whether to approve this work, revise it, or remove the decision hold.';
|
|
233
|
+
}
|
|
234
|
+
|
|
216
235
|
function approvalLines(approval, { indent = '' } = {}) {
|
|
217
236
|
const lines = [`${indent}${approval.question}`];
|
|
218
237
|
if (approval.approve.enabled) lines.push(`${indent}Approve: ${approval.approve.command}`);
|
|
@@ -228,6 +247,7 @@ module.exports = {
|
|
|
228
247
|
explicitDoneLooksLike,
|
|
229
248
|
plainText,
|
|
230
249
|
taskExplanation,
|
|
250
|
+
decisionChoiceText,
|
|
231
251
|
explanationFieldsFromInput,
|
|
232
252
|
explanationLines,
|
|
233
253
|
explanationMarkdownLines,
|
package/lib/yes-lock.js
CHANGED
|
@@ -593,7 +593,7 @@ const ATRIS_INTERNAL = new Set([
|
|
|
593
593
|
'version', 'help', 'next', 'atris', 'clean', 'close', 'harvest', 'verify', 'recover', 'search', 'scout', 'skill', 'member', 'codex-goal', 'learn', 'lesson', 'taste', 'teach',
|
|
594
594
|
'experiments', 'bench', 'router', 'tree', 'receipt', 'proof', 'openclaw', 'pull', 'watch', 'live', 'align', 'terminal', 'computer', 'diff', 'youtube', 'x-search',
|
|
595
595
|
'ingest', 'query', 'lint', 'loop', 'pulse', 'task', 'mission', 'campaign', 'agents', 'probe', 'worktree', 'caretaker', 'aeo', 'slop', 'voice', 'strings', 'write',
|
|
596
|
-
'security-review', 'secure', 'theme', 'improve', 'study', 'rainmaker', 'xp', 'play', 'gm', 'game', 'recap', 'report', 'clarity', 'interview', 'moves', 'unknowns', 'avail',
|
|
596
|
+
'security-review', 'secure', 'sentinel', 'theme', 'improve', 'study', 'rainmaker', 'xp', 'play', 'gm', 'game', 'recap', 'report', 'clarity', 'interview', 'moves', 'unknowns', 'avail',
|
|
597
597
|
'scoreboard', 'sync-checkout', 'zen', 'ci', 'balance', 'usage', 'agent-client', 'transactions', 'hires', 'design', 'mcp', 'integrations', 'setup', 'clean-workspace', 'cw',
|
|
598
598
|
'browse', 'sleep', 'wake', 'errors', 'wiki', 'code-review', 'cr', 'soul', 'fleet', 'fleet-report', 'loops', 'self-improve', 'compile', 'spaceship', 'truth', 'engine',
|
|
599
599
|
'engines', 'link', 'playbook', 'brief', 'inbox', 'friends', 'rsi',
|
package/package.json
CHANGED