@ariacode/cli 0.2.2 → 0.2.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.
- package/README.md +60 -7
- package/dist/actions/db-ask.d.ts +2 -0
- package/dist/actions/db-ask.js +23 -6
- package/dist/actions/db-ask.js.map +1 -1
- package/dist/actions/db-explain.d.ts +2 -0
- package/dist/actions/db-explain.js +23 -5
- package/dist/actions/db-explain.js.map +1 -1
- package/dist/actions/db-schema.d.ts +2 -0
- package/dist/actions/db-schema.js +15 -2
- package/dist/actions/db-schema.js.map +1 -1
- package/dist/actions/upgrade-deps.d.ts +2 -0
- package/dist/actions/upgrade-deps.js +18 -0
- package/dist/actions/upgrade-deps.js.map +1 -1
- package/dist/actions.d.ts +86 -71
- package/dist/actions.js +382 -182
- package/dist/actions.js.map +1 -1
- package/dist/agent.d.ts +0 -1
- package/dist/agent.js +1 -2
- package/dist/agent.js.map +1 -1
- package/dist/app.d.ts +3 -3
- package/dist/app.js +3 -3
- package/dist/cli.d.ts +0 -1
- package/dist/cli.js +15 -3
- package/dist/cli.js.map +1 -1
- package/dist/config.d.ts +1 -1
- package/dist/config.js +1 -1
- package/dist/output/schemas.d.ts +92 -0
- package/dist/output/schemas.js +142 -0
- package/dist/output/schemas.js.map +1 -0
- package/dist/parser.d.ts +8 -3
- package/dist/parser.js +51 -5
- package/dist/parser.js.map +1 -1
- package/dist/repo.d.ts +0 -1
- package/dist/repo.js +6 -9
- package/dist/repo.js.map +1 -1
- package/dist/safety.d.ts +0 -4
- package/dist/safety.js +0 -4
- package/dist/safety.js.map +1 -1
- package/dist/storage/queries.d.ts +39 -0
- package/dist/storage/queries.js +211 -0
- package/dist/storage/queries.js.map +1 -0
- package/dist/tools.d.ts +6 -7
- package/dist/tools.js +20 -7
- package/dist/tools.js.map +1 -1
- package/dist/ui/diff-renderer.d.ts +28 -0
- package/dist/ui/diff-renderer.js +388 -0
- package/dist/ui/diff-renderer.js.map +1 -0
- package/dist/ui/highlight.d.ts +25 -0
- package/dist/ui/highlight.js +239 -0
- package/dist/ui/highlight.js.map +1 -0
- package/dist/ui.d.ts +3 -16
- package/dist/ui.js +7 -28
- package/dist/ui.js.map +1 -1
- package/package.json +1 -1
package/dist/actions.d.ts
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* - Agent loop execution
|
|
9
9
|
* - Terminal output
|
|
10
10
|
*/
|
|
11
|
+
import type { SessionStatus } from "./storage.js";
|
|
11
12
|
/**
|
|
12
13
|
* Options parsed from CLI flags for the ask command.
|
|
13
14
|
*/
|
|
@@ -26,20 +27,21 @@ export interface AskOptions {
|
|
|
26
27
|
provider?: string;
|
|
27
28
|
/** Override model (v0.2.2) */
|
|
28
29
|
model?: string;
|
|
30
|
+
/** Output format (v0.2.3) */
|
|
31
|
+
format?: 'text' | 'json' | 'ndjson' | 'plain';
|
|
29
32
|
}
|
|
30
33
|
/**
|
|
31
34
|
* Execute the ask command.
|
|
32
35
|
*
|
|
33
36
|
* Flow:
|
|
34
|
-
* 1. Load configuration and detect project type
|
|
35
|
-
* 2. Create or resume session with mode: "plan"
|
|
36
|
-
* 3. Build system prompt from ask.md template
|
|
37
|
-
* 4. Expose only read-only tools
|
|
38
|
-
* 5. Execute agent loop
|
|
39
|
-
* 6. Render response to terminal
|
|
40
|
-
* 7. Persist session to database
|
|
37
|
+
* 1. Load configuration and detect project type
|
|
38
|
+
* 2. Create or resume session with mode: "plan"
|
|
39
|
+
* 3. Build system prompt from ask.md template
|
|
40
|
+
* 4. Expose only read-only tools
|
|
41
|
+
* 5. Execute agent loop
|
|
42
|
+
* 6. Render response to terminal
|
|
43
|
+
* 7. Persist session to database
|
|
41
44
|
*
|
|
42
|
-
* Requirements: 9.1, 9.2, 9.3, 9.4, 9.5, 9.6, 9.7, 9.8, 9.9
|
|
43
45
|
*/
|
|
44
46
|
export declare function runAsk(options: AskOptions): Promise<void>;
|
|
45
47
|
/**
|
|
@@ -60,21 +62,22 @@ export interface PlanOptions {
|
|
|
60
62
|
provider?: string;
|
|
61
63
|
/** Override model (v0.2.2) */
|
|
62
64
|
model?: string;
|
|
65
|
+
/** Output format (v0.2.3) */
|
|
66
|
+
format?: 'text' | 'json' | 'ndjson' | 'plain';
|
|
63
67
|
}
|
|
64
68
|
/**
|
|
65
69
|
* Execute the plan command.
|
|
66
70
|
*
|
|
67
71
|
* Flow:
|
|
68
|
-
* 1. Load configuration and detect project type
|
|
69
|
-
* 2. Create or resume session with mode: "plan"
|
|
70
|
-
* 3. Build system prompt from plan.md template
|
|
71
|
-
* 4. Expose only read-only tools
|
|
72
|
-
* 5. Execute agent loop
|
|
73
|
-
* 6. Render structured plan to terminal
|
|
74
|
-
* 7. Save to file if --output flag provided
|
|
75
|
-
* 8. Persist session to database
|
|
72
|
+
* 1. Load configuration and detect project type
|
|
73
|
+
* 2. Create or resume session with mode: "plan"
|
|
74
|
+
* 3. Build system prompt from plan.md template
|
|
75
|
+
* 4. Expose only read-only tools
|
|
76
|
+
* 5. Execute agent loop
|
|
77
|
+
* 6. Render structured plan to terminal
|
|
78
|
+
* 7. Save to file if --output flag provided
|
|
79
|
+
* 8. Persist session to database
|
|
76
80
|
*
|
|
77
|
-
* Requirements: 10.1, 10.2, 10.3, 10.4, 10.5, 10.6, 10.7, 10.8
|
|
78
81
|
*/
|
|
79
82
|
export declare function runPlan(options: PlanOptions): Promise<void>;
|
|
80
83
|
/**
|
|
@@ -97,26 +100,29 @@ export interface PatchOptions {
|
|
|
97
100
|
provider?: string;
|
|
98
101
|
/** Override model (v0.2.2) */
|
|
99
102
|
model?: string;
|
|
103
|
+
/** Render diff in side-by-side layout when terminal is wide enough */
|
|
104
|
+
split?: boolean;
|
|
105
|
+
/** Output format */
|
|
106
|
+
format?: 'text' | 'json' | 'ndjson' | 'plain';
|
|
100
107
|
}
|
|
101
108
|
/**
|
|
102
109
|
* Execute the patch command.
|
|
103
110
|
*
|
|
104
111
|
* Flow:
|
|
105
|
-
* 1. Load configuration and detect project type
|
|
106
|
-
* 2. Create session with mode: "build"
|
|
107
|
-
* 3. Build system prompt from patch.md template
|
|
108
|
-
* 4. Expose read-only + mutation tools
|
|
109
|
-
* 5. Execute agent loop — agent calls propose_diff
|
|
110
|
-
* 6. Render diff preview with syntax highlighting
|
|
111
|
-
* 7. Render mutation summary
|
|
112
|
-
* 8. If --dry-run, exit with code 0
|
|
113
|
-
* 9. If not --yes, prompt for confirmation
|
|
114
|
-
* 10. Agent calls apply_diff atomically
|
|
115
|
-
* 11. Log mutation to database
|
|
116
|
-
* 12. Display rollback hints
|
|
117
|
-
* 13. Persist session to database
|
|
112
|
+
* 1. Load configuration and detect project type
|
|
113
|
+
* 2. Create session with mode: "build"
|
|
114
|
+
* 3. Build system prompt from patch.md template
|
|
115
|
+
* 4. Expose read-only + mutation tools
|
|
116
|
+
* 5. Execute agent loop — agent calls propose_diff
|
|
117
|
+
* 6. Render diff preview with syntax highlighting
|
|
118
|
+
* 7. Render mutation summary
|
|
119
|
+
* 8. If --dry-run, exit with code 0
|
|
120
|
+
* 9. If not --yes, prompt for confirmation
|
|
121
|
+
* 10. Agent calls apply_diff atomically
|
|
122
|
+
* 11. Log mutation to database
|
|
123
|
+
* 12. Display rollback hints
|
|
124
|
+
* 13. Persist session to database
|
|
118
125
|
*
|
|
119
|
-
* Requirements: 11.1–11.13, 17.1–17.9
|
|
120
126
|
*/
|
|
121
127
|
export declare function runPatch(options: PatchOptions): Promise<void>;
|
|
122
128
|
/**
|
|
@@ -127,8 +133,8 @@ export interface ReviewOptions {
|
|
|
127
133
|
unstaged?: boolean;
|
|
128
134
|
/** Compare current branch to specified base branch */
|
|
129
135
|
branch?: string;
|
|
130
|
-
/** Output format
|
|
131
|
-
format?:
|
|
136
|
+
/** Output format */
|
|
137
|
+
format?: 'text' | 'json' | 'ndjson' | 'plain';
|
|
132
138
|
/** Suppress non-essential output */
|
|
133
139
|
quiet?: boolean;
|
|
134
140
|
/** Project root (defaults to process.cwd()) */
|
|
@@ -153,18 +159,17 @@ export interface ReviewResult {
|
|
|
153
159
|
* Execute the review command.
|
|
154
160
|
*
|
|
155
161
|
* Flow:
|
|
156
|
-
* 1. Parse flags and load configuration
|
|
157
|
-
* 2. Detect project type
|
|
158
|
-
* 3. Create session with mode: "plan"
|
|
159
|
-
* 4. Read git diff (staged / unstaged / branch)
|
|
160
|
-
* 5. Build system prompt from review.md template
|
|
161
|
-
* 6. Send diff + project context to provider
|
|
162
|
-
* 7. Parse structured review (summary, issues, suggestions)
|
|
163
|
-
* 8. Render review to terminal
|
|
164
|
-
* 9. Output JSON if --format json
|
|
165
|
-
* 10. Persist session to database
|
|
162
|
+
* 1. Parse flags and load configuration
|
|
163
|
+
* 2. Detect project type
|
|
164
|
+
* 3. Create session with mode: "plan"
|
|
165
|
+
* 4. Read git diff (staged / unstaged / branch)
|
|
166
|
+
* 5. Build system prompt from review.md template
|
|
167
|
+
* 6. Send diff + project context to provider
|
|
168
|
+
* 7. Parse structured review (summary, issues, suggestions)
|
|
169
|
+
* 8. Render review to terminal
|
|
170
|
+
* 9. Output JSON if --format json
|
|
171
|
+
* 10. Persist session to database
|
|
166
172
|
*
|
|
167
|
-
* Requirements: 12.1, 12.2, 12.3, 12.4, 12.5, 12.6, 12.7, 12.8, 12.9, 12.10
|
|
168
173
|
*/
|
|
169
174
|
export declare function runReview(options: ReviewOptions): Promise<void>;
|
|
170
175
|
/**
|
|
@@ -183,24 +188,25 @@ export interface ExploreOptions {
|
|
|
183
188
|
provider?: string;
|
|
184
189
|
/** Override model (v0.2.2) */
|
|
185
190
|
model?: string;
|
|
191
|
+
/** Output format (v0.2.3) */
|
|
192
|
+
format?: 'text' | 'json' | 'ndjson' | 'plain';
|
|
186
193
|
}
|
|
187
194
|
/**
|
|
188
195
|
* Execute the explore command.
|
|
189
196
|
*
|
|
190
197
|
* Flow:
|
|
191
|
-
* 1. Parse flags and load configuration
|
|
192
|
-
* 2. Detect project type
|
|
193
|
-
* 3. Create session with mode: "plan"
|
|
194
|
-
* 4. Scan repository structure respecting .gitignore
|
|
195
|
-
* 5. Detect frameworks and key configuration files
|
|
196
|
-
* 6. Identify entry points based on project type
|
|
197
|
-
* 7. Build system prompt from explore.md template
|
|
198
|
-
* 8. Execute agent loop to summarize structure/patterns
|
|
199
|
-
* 9. Render exploration summary to terminal
|
|
200
|
-
* 10. Save to ./.aria/explore.md if --save flag
|
|
201
|
-
* 11. Persist session to database
|
|
198
|
+
* 1. Parse flags and load configuration
|
|
199
|
+
* 2. Detect project type
|
|
200
|
+
* 3. Create session with mode: "plan"
|
|
201
|
+
* 4. Scan repository structure respecting .gitignore
|
|
202
|
+
* 5. Detect frameworks and key configuration files
|
|
203
|
+
* 6. Identify entry points based on project type
|
|
204
|
+
* 7. Build system prompt from explore.md template
|
|
205
|
+
* 8. Execute agent loop to summarize structure/patterns
|
|
206
|
+
* 9. Render exploration summary to terminal
|
|
207
|
+
* 10. Save to ./.aria/explore.md if --save flag
|
|
208
|
+
* 11. Persist session to database
|
|
202
209
|
*
|
|
203
|
-
* Requirements: 13.1, 13.2, 13.3, 13.4, 13.5, 13.6, 13.7, 13.8, 13.9, 13.10
|
|
204
210
|
*/
|
|
205
211
|
export declare function runExplore(options: ExploreOptions): Promise<void>;
|
|
206
212
|
/**
|
|
@@ -217,18 +223,29 @@ export interface HistoryOptions {
|
|
|
217
223
|
quiet?: boolean;
|
|
218
224
|
/** Project root (defaults to process.cwd()) */
|
|
219
225
|
projectRoot?: string;
|
|
226
|
+
/** Full-text search query across session content */
|
|
227
|
+
search?: string;
|
|
228
|
+
/** Filter by command name */
|
|
229
|
+
command?: string;
|
|
230
|
+
/** Filter by date expression, e.g. "3 days ago" */
|
|
231
|
+
since?: string;
|
|
232
|
+
/** Filter by session status */
|
|
233
|
+
status?: SessionStatus;
|
|
234
|
+
/** Export session transcript to markdown file at this path */
|
|
235
|
+
export?: string;
|
|
236
|
+
/** Output format */
|
|
237
|
+
format?: 'text' | 'json' | 'ndjson' | 'plain';
|
|
220
238
|
}
|
|
221
239
|
/**
|
|
222
240
|
* Execute the history command.
|
|
223
241
|
*
|
|
224
242
|
* Flow:
|
|
225
|
-
* 1. If no --session flag: list recent sessions in a table
|
|
226
|
-
* 2. If --session flag: display full session log
|
|
227
|
-
* 3. If --tree flag: render tool execution tree
|
|
228
|
-
* 4. Format timestamps in human-readable format
|
|
229
|
-
* 5. Support pagination for large result sets
|
|
243
|
+
* 1. If no --session flag: list recent sessions in a table
|
|
244
|
+
* 2. If --session flag: display full session log
|
|
245
|
+
* 3. If --tree flag: render tool execution tree
|
|
246
|
+
* 4. Format timestamps in human-readable format
|
|
247
|
+
* 5. Support pagination for large result sets
|
|
230
248
|
*
|
|
231
|
-
* Requirements: 14.1, 14.2, 14.3, 14.4, 14.5, 14.6, 14.7, 14.8
|
|
232
249
|
*/
|
|
233
250
|
export declare function runHistory(options: HistoryOptions): Promise<void>;
|
|
234
251
|
/**
|
|
@@ -254,21 +271,20 @@ export interface ConfigOptions {
|
|
|
254
271
|
* Execute the config command.
|
|
255
272
|
*
|
|
256
273
|
* Subcommands:
|
|
257
|
-
* - (none): Display effective configuration with precedence sources
|
|
258
|
-
* - get <key>: Display value for specified key
|
|
259
|
-
* - set <key> <value>: Write key-value to ~/.aria/config.toml
|
|
260
|
-
* - path: Display configuration file resolution paths
|
|
261
|
-
* - init: Create ./.aria.toml with default values
|
|
274
|
+
* - (none): Display effective configuration with precedence sources
|
|
275
|
+
* - get <key>: Display value for specified key
|
|
276
|
+
* - set <key> <value>: Write key-value to ~/.aria/config.toml
|
|
277
|
+
* - path: Display configuration file resolution paths
|
|
278
|
+
* - init: Create ./.aria.toml with default values
|
|
262
279
|
*
|
|
263
|
-
* Requirements: 15.1–15.10
|
|
264
280
|
*/
|
|
265
281
|
export declare function runConfig(options: ConfigOptions): Promise<void>;
|
|
266
282
|
/**
|
|
267
283
|
* Options parsed from CLI flags for the doctor command.
|
|
268
284
|
*/
|
|
269
285
|
export interface DoctorOptions {
|
|
270
|
-
/** Output format
|
|
271
|
-
format?:
|
|
286
|
+
/** Output format */
|
|
287
|
+
format?: 'text' | 'json' | 'ndjson' | 'plain';
|
|
272
288
|
/** Project root (defaults to process.cwd()) */
|
|
273
289
|
projectRoot?: string;
|
|
274
290
|
}
|
|
@@ -286,6 +302,5 @@ export interface DiagnosticCheck {
|
|
|
286
302
|
* Runs a series of environment diagnostic checks and reports results.
|
|
287
303
|
* Exits with code 1 if any critical check fails.
|
|
288
304
|
*
|
|
289
|
-
* Requirements: 16.1–16.13
|
|
290
305
|
*/
|
|
291
306
|
export declare function runDoctor(options?: DoctorOptions): Promise<void>;
|