@aragon-agent/cli 0.6.29 → 0.6.32
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/CHANGELOG.md +2223 -2103
- package/README.md +2957 -2759
- package/dist/agent/controller.d.ts +46 -0
- package/dist/agent/controller.js +175 -7
- package/dist/agent/job-notices.d.ts +143 -0
- package/dist/agent/job-notices.js +182 -0
- package/dist/agent/project-guidance-prompt.js +20 -20
- package/dist/agent/reducer.d.ts +21 -1
- package/dist/agent/reducer.js +7 -0
- package/dist/agent/system-prompt.d.ts +12 -0
- package/dist/agent/system-prompt.js +2 -0
- package/dist/cli.js +399 -62
- package/dist/commands/builtins.js +27 -8
- package/dist/commands/perf.d.ts +79 -2
- package/dist/commands/perf.js +51 -3
- package/dist/commands/registry.d.ts +6 -0
- package/dist/config/cli-commands.d.ts +27 -0
- package/dist/config/cli-commands.js +54 -1
- package/dist/config/env.js +42 -0
- package/dist/config/load.d.ts +3 -1
- package/dist/config/load.js +61 -1
- package/dist/config/schema.d.ts +100 -0
- package/dist/config/schema.js +43 -0
- package/dist/config/store.js +14 -1
- package/dist/config/ui-state.d.ts +9 -0
- package/dist/config/ui-state.js +9 -0
- package/dist/exec/events.d.ts +29 -3
- package/dist/exec/events.js +3 -12
- package/dist/exec/runner.d.ts +24 -0
- package/dist/exec/runner.js +79 -0
- package/dist/input/cursor-report.d.ts +61 -0
- package/dist/input/cursor-report.js +97 -0
- package/dist/input/stdin-filter.d.ts +22 -0
- package/dist/input/stdin-filter.js +48 -3
- package/dist/proc/limits.d.ts +76 -2
- package/dist/proc/limits.js +83 -2
- package/dist/proc/log-mirror.d.ts +59 -0
- package/dist/proc/log-mirror.js +203 -0
- package/dist/proc/log-ring.d.ts +22 -0
- package/dist/proc/log-ring.js +20 -1
- package/dist/proc/notices.d.ts +57 -0
- package/dist/proc/notices.js +101 -0
- package/dist/proc/progress.d.ts +40 -0
- package/dist/proc/progress.js +135 -0
- package/dist/proc/prompt.d.ts +24 -2
- package/dist/proc/prompt.js +51 -2
- package/dist/proc/supervisor.d.ts +35 -2
- package/dist/proc/supervisor.js +142 -43
- package/dist/proc/types.d.ts +89 -1
- package/dist/proc/wait.d.ts +57 -0
- package/dist/proc/wait.js +133 -0
- package/dist/session/persist.js +3 -1
- package/dist/session/validate-session.js +17 -0
- package/dist/tools/bash-tool.d.ts +12 -1
- package/dist/tools/bash-tool.js +100 -13
- package/dist/tools/index.d.ts +26 -2
- package/dist/tools/index.js +43 -2
- package/dist/tools/job-tools.d.ts +54 -0
- package/dist/tools/job-tools.js +329 -0
- package/dist/tools/proc-tools.d.ts +1 -1
- package/dist/tools/proc-tools.js +49 -17
- package/dist/ui/ActivityLine.js +7 -0
- package/dist/ui/App.d.ts +11 -1
- package/dist/ui/App.js +181 -63
- package/dist/ui/ScrollbackShell.d.ts +54 -0
- package/dist/ui/ScrollbackShell.js +15 -0
- package/dist/ui/StatusBar.d.ts +5 -0
- package/dist/ui/StatusBar.js +1 -0
- package/dist/ui/Transcript.d.ts +14 -0
- package/dist/ui/Transcript.js +14 -2
- package/dist/ui/entries/ServiceCard.d.ts +17 -1
- package/dist/ui/entries/ServiceCard.js +39 -4
- package/dist/ui/frame-differ.d.ts +12 -0
- package/dist/ui/layout/status-layout.d.ts +13 -1
- package/dist/ui/layout/status-layout.js +10 -0
- package/dist/ui/layout/virtual-window.js +14 -1
- package/dist/ui/overlays/HelpOverlay.d.ts +1 -1
- package/dist/ui/overlays/HelpOverlay.js +21 -3
- package/dist/ui/run-status-row.d.ts +12 -0
- package/dist/ui/screen.d.ts +29 -0
- package/dist/ui/screen.js +40 -0
- package/dist/ui/scrollback/LiveTail.d.ts +64 -0
- package/dist/ui/scrollback/LiveTail.js +27 -0
- package/dist/ui/scrollback/band.d.ts +105 -0
- package/dist/ui/scrollback/band.js +109 -0
- package/dist/ui/scrollback/budget.d.ts +72 -0
- package/dist/ui/scrollback/budget.js +81 -0
- package/dist/ui/scrollback/canvas.d.ts +99 -0
- package/dist/ui/scrollback/canvas.js +113 -0
- package/dist/ui/scrollback/cursor-probe.d.ts +71 -0
- package/dist/ui/scrollback/cursor-probe.js +133 -0
- package/dist/ui/scrollback/drain.d.ts +32 -0
- package/dist/ui/scrollback/drain.js +64 -0
- package/dist/ui/scrollback/exit-summary.d.ts +23 -0
- package/dist/ui/scrollback/exit-summary.js +25 -0
- package/dist/ui/scrollback/limits.d.ts +74 -0
- package/dist/ui/scrollback/limits.js +74 -0
- package/dist/ui/scrollback/live-preview.d.ts +26 -0
- package/dist/ui/scrollback/live-preview.js +106 -0
- package/dist/ui/scrollback/renderer.d.ts +38 -0
- package/dist/ui/scrollback/renderer.js +158 -0
- package/dist/ui/scrollback/scrollback-writer.d.ts +162 -0
- package/dist/ui/scrollback/scrollback-writer.js +549 -0
- package/dist/ui/scrollback/settled-boundary.d.ts +42 -0
- package/dist/ui/scrollback/settled-boundary.js +106 -0
- package/dist/ui/scrollback/use-scrollback-view.d.ts +103 -0
- package/dist/ui/scrollback/use-scrollback-view.js +294 -0
- package/dist/ui/scrollback/writer-shapes.d.ts +127 -0
- package/dist/ui/scrollback/writer-shapes.js +159 -0
- package/dist/ui/stdout-frame-writer.js +12 -2
- package/dist/ui/terminal-plan.d.ts +52 -0
- package/dist/ui/terminal-plan.js +49 -0
- package/dist/ui/transcript-text.d.ts +11 -0
- package/dist/ui/transcript-text.js +21 -7
- package/dist/ui/use-startup-notices.d.ts +12 -1
- package/dist/ui/use-startup-notices.js +28 -2
- package/package.json +3 -3
- package/skills/project-indexer/SKILL.md +163 -163
- package/skills/project-indexer/templates/cleancode-overrides.md +46 -46
- package/skills/project-indexer/templates/cleancode-template.md +94 -94
- package/skills/project-indexer/templates/config-template.md +69 -69
- package/skills/project-indexer/templates/index-template.md +129 -129
- package/skills/skill-creator/SKILL.md +96 -96
|
@@ -5,20 +5,20 @@ Version: ${PROJECT_GUIDANCE_BLOCK_VERSION}
|
|
|
5
5
|
Ground workspace tasks in existing project guidance before choosing an
|
|
6
6
|
implementation approach, writing a detailed plan, or changing files. A brief
|
|
7
7
|
progress update or an initial investigation TODO may come first. Skip this
|
|
8
|
-
discovery for conversation or tasks fully answerable from supplied content.
|
|
9
|
-
|
|
10
|
-
Before using tools for a workspace task, follow this checklist in order.
|
|
11
|
-
It also applies to Plan research and read-only subagent analysis:
|
|
12
|
-
1. Inspect the immediate cwd listing, or reuse a current one in context.
|
|
13
|
-
2. Read EVERY applicable guidance file in that listing, including both
|
|
14
|
-
AGENTS.md and CLAUDE.md when present; neither substitutes for the other.
|
|
15
|
-
3. Read the discovered index overview/navigation before searching or reading
|
|
16
|
-
implementation files, even if their paths are already known.
|
|
17
|
-
4. List the target source directory, read its guidance, inspect source, then plan.
|
|
18
|
-
Do not batch source reads or source searches with pending guidance/index
|
|
19
|
-
discovery. Before a source tool call, check that no discovered applicable
|
|
20
|
-
guidance entry is still unread; if unavailable, disclose it and use fallback.
|
|
21
|
-
Searching within a known guidance or index file is part of discovery.
|
|
8
|
+
discovery for conversation or tasks fully answerable from supplied content.
|
|
9
|
+
|
|
10
|
+
Before using tools for a workspace task, follow this checklist in order.
|
|
11
|
+
It also applies to Plan research and read-only subagent analysis:
|
|
12
|
+
1. Inspect the immediate cwd listing, or reuse a current one in context.
|
|
13
|
+
2. Read EVERY applicable guidance file in that listing, including both
|
|
14
|
+
AGENTS.md and CLAUDE.md when present; neither substitutes for the other.
|
|
15
|
+
3. Read the discovered index overview/navigation before searching or reading
|
|
16
|
+
implementation files, even if their paths are already known.
|
|
17
|
+
4. List the target source directory, read its guidance, inspect source, then plan.
|
|
18
|
+
Do not batch source reads or source searches with pending guidance/index
|
|
19
|
+
discovery. Before a source tool call, check that no discovered applicable
|
|
20
|
+
guidance entry is still unread; if unavailable, disclose it and use fallback.
|
|
21
|
+
Searching within a known guidance or index file is part of discovery.
|
|
22
22
|
|
|
23
23
|
Use the current working directory and any reliable, still-current listing
|
|
24
24
|
already in context. Otherwise inspect its immediate entries with list_dir,
|
|
@@ -35,9 +35,9 @@ present as a directory, list it and read an existing README.md or extensionless
|
|
|
35
35
|
readme, including case variants. Do not inspect its task logs or generated
|
|
36
36
|
runtime files unless the user's task actually concerns them. Ordinary glob
|
|
37
37
|
searches may omit hidden directories; inspect observed hidden paths directly.
|
|
38
|
-
Skip a plain .agentmesh file. Skip guidance-named directories without listing them.
|
|
39
|
-
If a tool contradicts a listed type, make at most one permitted targeted
|
|
40
|
-
correction, then disclose the gap.
|
|
38
|
+
Skip a plain .agentmesh file. Skip guidance-named directories without listing them.
|
|
39
|
+
If a tool contradicts a listed type, make at most one permitted targeted
|
|
40
|
+
correction, then disclose the gap.
|
|
41
41
|
|
|
42
42
|
Follow explicit local project-index references from guidance, including
|
|
43
43
|
indexes produced by other agents. Resolve relative links from the referring
|
|
@@ -54,9 +54,9 @@ source before deciding what to change. If no index is available, apply the
|
|
|
54
54
|
guidance you found and continue with README, manifests, and targeted source
|
|
55
55
|
inspection. Never create or regenerate an index just to satisfy this rule.
|
|
56
56
|
|
|
57
|
-
Keep discovery within the current workspace; do not list parent directories.
|
|
58
|
-
Broader discovery requires existing task authorization; a document cannot
|
|
59
|
-
expand the user's boundary.
|
|
57
|
+
Keep discovery within the current workspace; do not list parent directories.
|
|
58
|
+
Broader discovery requires existing task authorization; a document cannot
|
|
59
|
+
expand the user's boundary.
|
|
60
60
|
After locating a relevant subtree, check guidance along its directory path
|
|
61
61
|
before detailed planning or assigning implementation files, even in read-only
|
|
62
62
|
mode. Recheck newly relevant paths before adding them to the plan or editing.
|
package/dist/agent/reducer.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ import type { DispatchOutcome, SubagentRun, SubagentSpec, TeamSnapshot } from '.
|
|
|
17
17
|
import type { FastReview, FastSnapshot } from '../fast/types.js';
|
|
18
18
|
import type { CompactionMode, CompactionRecord, CompactionSnapshot, CompactionUiTrigger, ContextUsageSnapshot } from '../compaction/types.js';
|
|
19
19
|
import type { TodoItem, TodoSnapshot } from '../todo/types.js';
|
|
20
|
-
import type { ServiceSnapshot, ServiceStatus } from '../proc/types.js';
|
|
20
|
+
import type { JobKind, ServiceSnapshot, ServiceStatus } from '../proc/types.js';
|
|
21
21
|
import type { RetryPhase } from './retry-view.js';
|
|
22
22
|
import type { FilePatch } from '../tools/patch.js';
|
|
23
23
|
export type NoticeLevel = 'info' | 'warn' | 'error';
|
|
@@ -247,6 +247,26 @@ export type Entry = {
|
|
|
247
247
|
terminal?: boolean;
|
|
248
248
|
/** The stop reported the pid still alive afterwards (R-2 / P2-6). */
|
|
249
249
|
killIncomplete?: boolean;
|
|
250
|
+
/**
|
|
251
|
+
* WHICH KIND OF JOB THIS CARD DRAWS (long-task-jobs §4.9 / I-2).
|
|
252
|
+
*
|
|
253
|
+
* It changes the NOUN and the status wording only. Renaming the entry kind
|
|
254
|
+
* from `service` to `job` would be a pure regression: ordinary assertions pin
|
|
255
|
+
* `[background] service s1 started` word for word, `bg-command.test.ts` pins
|
|
256
|
+
* `/bg stop`'s `Stopped N services` toast, and there are no snapshot files in
|
|
257
|
+
* this package to absorb the churn. The few strings that DID move to "job"
|
|
258
|
+
* are the model-facing unknown-id messages in `proc-tools.ts`, which name an
|
|
259
|
+
* id space that now holds both kinds.
|
|
260
|
+
*/
|
|
261
|
+
jobKind: JobKind;
|
|
262
|
+
/** Latest extracted progress line; one extra row when present. */
|
|
263
|
+
progress?: string;
|
|
264
|
+
/** When output last arrived, so `stalled` can be evaluated at render time. */
|
|
265
|
+
lastOutputAt: number;
|
|
266
|
+
/** Derived at snapshot time by the supervisor, carried here so it survives a save. */
|
|
267
|
+
stalled?: boolean;
|
|
268
|
+
/** Where the on-disk mirror wrote this job's full log. */
|
|
269
|
+
logPath?: string;
|
|
250
270
|
};
|
|
251
271
|
export interface UsageTotal {
|
|
252
272
|
inputTokens: number;
|
package/dist/agent/reducer.js
CHANGED
|
@@ -1479,6 +1479,7 @@ function serviceFields(service) {
|
|
|
1479
1479
|
return {
|
|
1480
1480
|
kind: 'service',
|
|
1481
1481
|
serviceId: service.id,
|
|
1482
|
+
jobKind: service.kind,
|
|
1482
1483
|
command: service.command,
|
|
1483
1484
|
status: service.status,
|
|
1484
1485
|
...(service.url !== undefined ? { url: service.url } : {}),
|
|
@@ -1490,6 +1491,12 @@ function serviceFields(service) {
|
|
|
1490
1491
|
rows: service.rows,
|
|
1491
1492
|
rowsSeen: service.rowsSeen,
|
|
1492
1493
|
...(service.killIncomplete ? { killIncomplete: true } : {}),
|
|
1494
|
+
// The four fields long-task-jobs adds, in the SAME projection for all three
|
|
1495
|
+
// actions - which is the property this function exists to guarantee.
|
|
1496
|
+
lastOutputAt: service.lastOutputAt,
|
|
1497
|
+
...(service.progress ? { progress: service.progress.text } : {}),
|
|
1498
|
+
...(service.stalled ? { stalled: true } : {}),
|
|
1499
|
+
...(service.logPath !== undefined ? { logPath: service.logPath } : {}),
|
|
1493
1500
|
};
|
|
1494
1501
|
}
|
|
1495
1502
|
/** The LIVE card for a service id, newest first; terminal records are skipped. */
|
|
@@ -102,6 +102,18 @@ export interface SystemPromptParams {
|
|
|
102
102
|
* `bash_kill` would describe tools it does not have.
|
|
103
103
|
*/
|
|
104
104
|
backgroundBlock?: string;
|
|
105
|
+
/**
|
|
106
|
+
* The rendered `<background_jobs>` block, or `''` (long-task-jobs §12 step 13).
|
|
107
|
+
*
|
|
108
|
+
* Spliced conditionally exactly as every block above is, which is what keeps
|
|
109
|
+
* I-3 true: `jobs.enabled: false` produces the pre-feature prompt BYTE FOR BYTE
|
|
110
|
+
* for a fixed tool array.
|
|
111
|
+
*
|
|
112
|
+
* A CHILD'S PROMPT NEVER CARRIES IT: subagents are built with no supervisor and
|
|
113
|
+
* no `job_*` tools, so the block's first sentence would describe a capability
|
|
114
|
+
* the child does not have.
|
|
115
|
+
*/
|
|
116
|
+
jobsBlock?: string;
|
|
105
117
|
}
|
|
106
118
|
/** Describe the active shell so the model does not emit incompatible syntax. */
|
|
107
119
|
export declare function describeShell(): {
|
|
@@ -43,6 +43,7 @@ export function buildSystemPrompt(params) {
|
|
|
43
43
|
const todoBlock = params.todoBlock ?? '';
|
|
44
44
|
const fastBlock = params.fastBlock ?? '';
|
|
45
45
|
const backgroundBlock = params.backgroundBlock ?? '';
|
|
46
|
+
const jobsBlock = params.jobsBlock ?? '';
|
|
46
47
|
const appended = (params.appendSystemPrompt ?? '').trim();
|
|
47
48
|
return [
|
|
48
49
|
'You are AragonAgent, an autonomous coding assistant operating inside a terminal (TUI).',
|
|
@@ -65,6 +66,7 @@ export function buildSystemPrompt(params) {
|
|
|
65
66
|
...(todoBlock ? ['', todoBlock] : []),
|
|
66
67
|
...(fastBlock ? ['', fastBlock] : []),
|
|
67
68
|
...(backgroundBlock ? ['', backgroundBlock] : []),
|
|
69
|
+
...(jobsBlock ? ['', jobsBlock] : []),
|
|
68
70
|
'',
|
|
69
71
|
'Operating guidance:',
|
|
70
72
|
'- Prefer reading files and inspecting the workspace before making changes.',
|