dot-agents 0.1.5 → 0.3.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 +274 -7
- package/dist/cli/commands/check.d.ts +3 -0
- package/dist/cli/commands/check.d.ts.map +1 -0
- package/dist/cli/commands/check.js +152 -0
- package/dist/cli/commands/check.js.map +1 -0
- package/dist/cli/commands/index.d.ts +2 -0
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +2 -0
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/init.d.ts +3 -0
- package/dist/cli/commands/init.d.ts.map +1 -0
- package/dist/cli/commands/init.js +248 -0
- package/dist/cli/commands/init.js.map +1 -0
- package/dist/cli/index.js +4 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/lib/index.d.ts +1 -0
- package/dist/lib/index.d.ts.map +1 -1
- package/dist/lib/index.js +2 -0
- package/dist/lib/index.js.map +1 -1
- package/dist/lib/validation/cron.d.ts +29 -0
- package/dist/lib/validation/cron.d.ts.map +1 -0
- package/dist/lib/validation/cron.js +159 -0
- package/dist/lib/validation/cron.js.map +1 -0
- package/dist/lib/validation/index.d.ts +18 -0
- package/dist/lib/validation/index.d.ts.map +1 -0
- package/dist/lib/validation/index.js +135 -0
- package/dist/lib/validation/index.js.map +1 -0
- package/dist/lib/validation/persona.d.ts +9 -0
- package/dist/lib/validation/persona.d.ts.map +1 -0
- package/dist/lib/validation/persona.js +143 -0
- package/dist/lib/validation/persona.js.map +1 -0
- package/dist/lib/validation/types.d.ts +64 -0
- package/dist/lib/validation/types.d.ts.map +1 -0
- package/dist/lib/validation/types.js +25 -0
- package/dist/lib/validation/types.js.map +1 -0
- package/dist/lib/validation/workflow.d.ts +10 -0
- package/dist/lib/validation/workflow.d.ts.map +1 -0
- package/dist/lib/validation/workflow.js +242 -0
- package/dist/lib/validation/workflow.js.map +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -15,12 +15,134 @@ dot-agents lets you define **personas** (agent configurations) and **workflows**
|
|
|
15
15
|
|
|
16
16
|
## Installation
|
|
17
17
|
|
|
18
|
+
No installation required - use `npx` to run directly:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
npx dot-agents init
|
|
22
|
+
npx dot-agents run my-workflow
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
Or install globally:
|
|
26
|
+
|
|
18
27
|
```bash
|
|
19
28
|
npm install -g dot-agents
|
|
20
29
|
```
|
|
21
30
|
|
|
22
31
|
Requires Node.js 20+.
|
|
23
32
|
|
|
33
|
+
## Project Setup
|
|
34
|
+
|
|
35
|
+
The easiest way to set up dot-agents is with the `init` command:
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# Fresh install - creates .agents/ with default persona and sample workflow
|
|
39
|
+
npx dot-agents init
|
|
40
|
+
|
|
41
|
+
# Or in a specific directory
|
|
42
|
+
npx dot-agents init --dir /path/to/project
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
If you already have a `.agents/` directory, `init` will analyze it and guide you through migration.
|
|
46
|
+
|
|
47
|
+
### Fresh Install
|
|
48
|
+
|
|
49
|
+
Running `dot-agents init` in a directory without `.agents/` will:
|
|
50
|
+
|
|
51
|
+
1. Create the directory structure (`.agents/personas/`, `.agents/workflows/`, etc.)
|
|
52
|
+
2. Create a default `claude` persona
|
|
53
|
+
3. Create a sample `hello-world` workflow
|
|
54
|
+
|
|
55
|
+
You can also set up manually:
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
mkdir -p .agents/personas/claude .agents/workflows/hello
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Required persona fields:**
|
|
62
|
+
|
|
63
|
+
```yaml
|
|
64
|
+
---
|
|
65
|
+
name: my-persona # Required: unique identifier
|
|
66
|
+
cmd: "claude --print" # Required for root personas (can be inherited)
|
|
67
|
+
description: "..." # Optional but recommended
|
|
68
|
+
---
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
**Required workflow fields:**
|
|
72
|
+
|
|
73
|
+
```yaml
|
|
74
|
+
---
|
|
75
|
+
name: my-workflow # Required: unique identifier
|
|
76
|
+
description: "..." # Required: human-readable description
|
|
77
|
+
persona: my-persona # Required: must match a persona name/path
|
|
78
|
+
---
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
See [Quick Start](#quick-start) for a complete example.
|
|
82
|
+
|
|
83
|
+
### Migrating Existing `.agents/` Directory
|
|
84
|
+
|
|
85
|
+
If you have an existing `.agents/` directory with skills or workflows:
|
|
86
|
+
|
|
87
|
+
```bash
|
|
88
|
+
dot-agents init
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
The init command will:
|
|
92
|
+
|
|
93
|
+
1. Analyze your existing structure
|
|
94
|
+
2. Create a `personas/` directory with a default persona if missing
|
|
95
|
+
3. Report which workflows need frontmatter updates
|
|
96
|
+
|
|
97
|
+
**Workflow migration changes:**
|
|
98
|
+
|
|
99
|
+
| Old Field | New Field | Notes |
|
|
100
|
+
| -------------- | ----------------- | -------------------------------------- |
|
|
101
|
+
| `goal:` | `description:` | Rename the field |
|
|
102
|
+
| (missing) | `persona: claude` | Add reference to your persona |
|
|
103
|
+
| `skills_used:` | (move to persona) | Skills belong in persona, not workflow |
|
|
104
|
+
|
|
105
|
+
Before:
|
|
106
|
+
|
|
107
|
+
```yaml
|
|
108
|
+
---
|
|
109
|
+
name: my-workflow
|
|
110
|
+
goal: Do something useful
|
|
111
|
+
skills_used:
|
|
112
|
+
- osx/calendar
|
|
113
|
+
- productivity/query-todos
|
|
114
|
+
---
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
After:
|
|
118
|
+
|
|
119
|
+
```yaml
|
|
120
|
+
---
|
|
121
|
+
name: my-workflow
|
|
122
|
+
description: Do something useful
|
|
123
|
+
persona: claude
|
|
124
|
+
on:
|
|
125
|
+
manual: true
|
|
126
|
+
---
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
**Verify after migration:**
|
|
130
|
+
|
|
131
|
+
```bash
|
|
132
|
+
dot-agents list personas
|
|
133
|
+
dot-agents list workflows
|
|
134
|
+
dot-agents run my-workflow --dry-run
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
### Directory Discovery
|
|
138
|
+
|
|
139
|
+
dot-agents searches for `.agents/` in these locations (in order):
|
|
140
|
+
|
|
141
|
+
1. Current directory and ancestors (walks up the tree)
|
|
142
|
+
2. Home directory (`~/.agents/`)
|
|
143
|
+
|
|
144
|
+
This means you can run `dot-agents` from any subdirectory of a project.
|
|
145
|
+
|
|
24
146
|
## Quick Start
|
|
25
147
|
|
|
26
148
|
### 1. Create a `.agents` directory
|
|
@@ -140,6 +262,8 @@ Workflows support variable expansion in the task body:
|
|
|
140
262
|
dot-agents [command]
|
|
141
263
|
|
|
142
264
|
Commands:
|
|
265
|
+
init Initialize or migrate a .agents directory
|
|
266
|
+
check [type] Validate workflows and personas
|
|
143
267
|
run <workflow> Run a workflow
|
|
144
268
|
list [workflows|personas] List resources
|
|
145
269
|
show workflow <name> Show workflow details
|
|
@@ -181,28 +305,85 @@ dot-agents show persona claude/autonomous/productivity
|
|
|
181
305
|
dot-agents show workflow daily-standup --prompt
|
|
182
306
|
```
|
|
183
307
|
|
|
308
|
+
### Validating Configuration
|
|
309
|
+
|
|
310
|
+
The `check` command validates your workflows and personas, catching common issues like:
|
|
311
|
+
|
|
312
|
+
- Missing required fields (`name`, `description`, `persona`)
|
|
313
|
+
- Invalid trigger configurations (wrong `schedule` format)
|
|
314
|
+
- Unknown fields (suggesting correct alternatives)
|
|
315
|
+
- Invalid cron expressions
|
|
316
|
+
- Missing persona references
|
|
317
|
+
|
|
318
|
+
```bash
|
|
319
|
+
# Check everything
|
|
320
|
+
dot-agents check
|
|
321
|
+
|
|
322
|
+
# Check only workflows
|
|
323
|
+
dot-agents check workflows
|
|
324
|
+
|
|
325
|
+
# Check only personas
|
|
326
|
+
dot-agents check personas
|
|
327
|
+
|
|
328
|
+
# JSON output (for CI/scripts)
|
|
329
|
+
dot-agents check --json
|
|
330
|
+
```
|
|
331
|
+
|
|
332
|
+
Example output:
|
|
333
|
+
|
|
334
|
+
```text
|
|
335
|
+
Checking workflows...
|
|
336
|
+
✓ hello-world
|
|
337
|
+
○ daily-standup
|
|
338
|
+
⚠ warning: Unknown field 'schedule' [schedule]
|
|
339
|
+
hint: Did you mean 'on.schedule'?
|
|
340
|
+
✗ broken-workflow
|
|
341
|
+
✗ error: Missing required 'persona' field
|
|
342
|
+
hint: Add: persona: claude
|
|
343
|
+
|
|
344
|
+
Summary:
|
|
345
|
+
Workflows: 2/3 valid
|
|
346
|
+
```
|
|
347
|
+
|
|
184
348
|
## Daemon
|
|
185
349
|
|
|
186
|
-
The daemon runs scheduled workflows in the background.
|
|
350
|
+
The daemon runs scheduled workflows in the background based on cron expressions.
|
|
351
|
+
|
|
352
|
+
### Running the Daemon
|
|
187
353
|
|
|
188
354
|
```bash
|
|
189
|
-
# Start
|
|
355
|
+
# Start in foreground (Ctrl+C to stop)
|
|
356
|
+
cd /path/to/project # Must contain .agents/
|
|
190
357
|
dot-agents daemon run
|
|
191
358
|
|
|
192
|
-
#
|
|
359
|
+
# Custom port
|
|
360
|
+
dot-agents daemon run -p 8080
|
|
361
|
+
|
|
362
|
+
# Disable file watching
|
|
363
|
+
dot-agents daemon run --no-watch
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
**Important:** The daemon must be run from a directory containing `.agents/` (or a subdirectory of one).
|
|
367
|
+
|
|
368
|
+
### Managing the Daemon
|
|
369
|
+
|
|
370
|
+
```bash
|
|
371
|
+
# Check if daemon is running
|
|
193
372
|
dot-agents daemon status
|
|
194
373
|
|
|
195
|
-
# View scheduled jobs
|
|
374
|
+
# View scheduled jobs and next run times
|
|
196
375
|
dot-agents daemon jobs
|
|
197
376
|
|
|
198
377
|
# Manually trigger a workflow
|
|
199
|
-
dot-agents daemon trigger
|
|
378
|
+
dot-agents daemon trigger my-workflow
|
|
200
379
|
|
|
201
|
-
# Reload workflows after
|
|
380
|
+
# Reload workflows after editing files
|
|
202
381
|
dot-agents daemon reload
|
|
203
382
|
```
|
|
204
383
|
|
|
205
|
-
|
|
384
|
+
### HTTP API
|
|
385
|
+
|
|
386
|
+
The daemon exposes an HTTP API on port 3141 (configurable with `-p`):
|
|
206
387
|
|
|
207
388
|
- `GET /health` - Health check
|
|
208
389
|
- `GET /status` - Daemon status and uptime
|
|
@@ -210,6 +391,92 @@ The daemon provides an HTTP API on port 3141 (configurable with `-p`):
|
|
|
210
391
|
- `POST /trigger/:workflow` - Trigger a workflow
|
|
211
392
|
- `POST /reload` - Reload workflows from disk
|
|
212
393
|
|
|
394
|
+
### Deploying on macOS (launchd)
|
|
395
|
+
|
|
396
|
+
For an always-on Mac server, use launchd to keep the daemon running:
|
|
397
|
+
|
|
398
|
+
1. Create a plist file at `~/Library/LaunchAgents/com.dot-agents.daemon.plist`:
|
|
399
|
+
|
|
400
|
+
```xml
|
|
401
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
|
402
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
|
403
|
+
<plist version="1.0">
|
|
404
|
+
<dict>
|
|
405
|
+
<key>Label</key>
|
|
406
|
+
<string>com.dot-agents.daemon</string>
|
|
407
|
+
<key>ProgramArguments</key>
|
|
408
|
+
<array>
|
|
409
|
+
<string>/usr/local/bin/npx</string>
|
|
410
|
+
<string>dot-agents</string>
|
|
411
|
+
<string>daemon</string>
|
|
412
|
+
<string>run</string>
|
|
413
|
+
</array>
|
|
414
|
+
<key>WorkingDirectory</key>
|
|
415
|
+
<string>/Users/YOUR_USERNAME/Documents</string>
|
|
416
|
+
<key>RunAtLoad</key>
|
|
417
|
+
<true/>
|
|
418
|
+
<key>KeepAlive</key>
|
|
419
|
+
<true/>
|
|
420
|
+
<key>StandardOutPath</key>
|
|
421
|
+
<string>/tmp/dot-agents.out.log</string>
|
|
422
|
+
<key>StandardErrorPath</key>
|
|
423
|
+
<string>/tmp/dot-agents.err.log</string>
|
|
424
|
+
<key>EnvironmentVariables</key>
|
|
425
|
+
<dict>
|
|
426
|
+
<key>PATH</key>
|
|
427
|
+
<string>/usr/local/bin:/usr/bin:/bin</string>
|
|
428
|
+
</dict>
|
|
429
|
+
</dict>
|
|
430
|
+
</plist>
|
|
431
|
+
```
|
|
432
|
+
|
|
433
|
+
2. Update the `WorkingDirectory` to point to your `.agents/` location.
|
|
434
|
+
|
|
435
|
+
3. Load and start the daemon:
|
|
436
|
+
|
|
437
|
+
```bash
|
|
438
|
+
# Load the service
|
|
439
|
+
launchctl load ~/Library/LaunchAgents/com.dot-agents.daemon.plist
|
|
440
|
+
|
|
441
|
+
# Check status
|
|
442
|
+
launchctl list | grep dot-agents
|
|
443
|
+
|
|
444
|
+
# View logs
|
|
445
|
+
tail -f /tmp/dot-agents.out.log
|
|
446
|
+
|
|
447
|
+
# Stop and unload
|
|
448
|
+
launchctl unload ~/Library/LaunchAgents/com.dot-agents.daemon.plist
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### Workflow Schedule Format
|
|
452
|
+
|
|
453
|
+
For workflows to be scheduled, they need `on.schedule` with cron expressions:
|
|
454
|
+
|
|
455
|
+
```yaml
|
|
456
|
+
---
|
|
457
|
+
name: daily-report
|
|
458
|
+
description: Generate daily report
|
|
459
|
+
persona: claude
|
|
460
|
+
on:
|
|
461
|
+
schedule:
|
|
462
|
+
- cron: "0 9 * * *" # 9:00 AM daily
|
|
463
|
+
- cron: "0 17 * * 1-5" # 5:00 PM weekdays
|
|
464
|
+
manual: true # Also allow manual triggers
|
|
465
|
+
---
|
|
466
|
+
```
|
|
467
|
+
|
|
468
|
+
Common cron patterns:
|
|
469
|
+
|
|
470
|
+
| Pattern | Description |
|
|
471
|
+
| ------------- | ------------------- |
|
|
472
|
+
| `0 9 * * *` | Daily at 9:00 AM |
|
|
473
|
+
| `30 6 * * *` | Daily at 6:30 AM |
|
|
474
|
+
| `0 */3 * * *` | Every 3 hours |
|
|
475
|
+
| `0 9 * * 1-5` | Weekdays at 9:00 AM |
|
|
476
|
+
| `0 0 1 * *` | First of each month |
|
|
477
|
+
|
|
478
|
+
Use `dot-agents check` to validate your cron expressions.
|
|
479
|
+
|
|
213
480
|
## Directory Structure
|
|
214
481
|
|
|
215
482
|
```text
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsEpC,eAAO,MAAM,YAAY,SAiJrB,CAAC"}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { Command } from "commander";
|
|
2
|
+
import chalk from "chalk";
|
|
3
|
+
import { relative } from "node:path";
|
|
4
|
+
import { getConfig } from "../../lib/config.js";
|
|
5
|
+
import { validateAll, validateAllWorkflows, validateAllPersonas, } from "../../lib/validation/index.js";
|
|
6
|
+
/**
|
|
7
|
+
* Format a single validation issue for display
|
|
8
|
+
*/
|
|
9
|
+
function formatIssue(issue, indent = " ") {
|
|
10
|
+
const icon = issue.severity === "error" ? chalk.red("✗") : chalk.yellow("⚠");
|
|
11
|
+
const prefix = issue.severity === "error" ? chalk.red("error") : chalk.yellow("warning");
|
|
12
|
+
let line = `${indent}${icon} ${prefix}: ${issue.message}`;
|
|
13
|
+
if (issue.path && issue.path !== "file" && issue.path !== "frontmatter") {
|
|
14
|
+
line += chalk.dim(` [${issue.path}]`);
|
|
15
|
+
}
|
|
16
|
+
if (issue.suggestion) {
|
|
17
|
+
line += `\n${indent} ${chalk.dim("hint:")} ${chalk.cyan(issue.suggestion)}`;
|
|
18
|
+
}
|
|
19
|
+
return line;
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Format validation results for a resource type
|
|
23
|
+
*/
|
|
24
|
+
function formatResults(results, baseDir, resourceType) {
|
|
25
|
+
const lines = [];
|
|
26
|
+
if (results.length === 0) {
|
|
27
|
+
lines.push(chalk.yellow(` No ${resourceType} found`));
|
|
28
|
+
return lines;
|
|
29
|
+
}
|
|
30
|
+
for (const result of results) {
|
|
31
|
+
const relPath = relative(baseDir, result.path);
|
|
32
|
+
const displayName = result.name || relPath;
|
|
33
|
+
if (result.valid && result.issues.length === 0) {
|
|
34
|
+
lines.push(` ${chalk.green("✓")} ${displayName}`);
|
|
35
|
+
}
|
|
36
|
+
else if (result.valid) {
|
|
37
|
+
// Valid but has warnings
|
|
38
|
+
lines.push(` ${chalk.yellow("○")} ${displayName}`);
|
|
39
|
+
for (const issue of result.issues) {
|
|
40
|
+
lines.push(formatIssue(issue));
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
lines.push(` ${chalk.red("✗")} ${displayName}`);
|
|
45
|
+
for (const issue of result.issues) {
|
|
46
|
+
lines.push(formatIssue(issue));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return lines;
|
|
51
|
+
}
|
|
52
|
+
export const checkCommand = new Command("check")
|
|
53
|
+
.description("Validate workflows and personas")
|
|
54
|
+
.argument("[type]", "Type to check: all (default), workflows, or personas", "all")
|
|
55
|
+
.option("-d, --dir <path>", "Directory to check", process.cwd())
|
|
56
|
+
.option("-q, --quiet", "Only show errors, no summary")
|
|
57
|
+
.option("--json", "Output results as JSON")
|
|
58
|
+
.action(async (type, options) => {
|
|
59
|
+
try {
|
|
60
|
+
const config = await getConfig(options.dir);
|
|
61
|
+
if (!config) {
|
|
62
|
+
console.error(chalk.red("No .agents directory found. Run 'dot-agents init' to create one."));
|
|
63
|
+
process.exit(1);
|
|
64
|
+
}
|
|
65
|
+
if (options.json) {
|
|
66
|
+
// JSON output mode
|
|
67
|
+
let results;
|
|
68
|
+
if (type === "workflows" || type === "w") {
|
|
69
|
+
results = {
|
|
70
|
+
workflows: await validateAllWorkflows(config.workflowsDir, config.personasDir),
|
|
71
|
+
};
|
|
72
|
+
}
|
|
73
|
+
else if (type === "personas" || type === "p") {
|
|
74
|
+
results = {
|
|
75
|
+
personas: await validateAllPersonas(config.personasDir),
|
|
76
|
+
};
|
|
77
|
+
}
|
|
78
|
+
else {
|
|
79
|
+
results = await validateAll(config.agentsDir);
|
|
80
|
+
}
|
|
81
|
+
console.log(JSON.stringify(results, null, 2));
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
// Human-readable output
|
|
85
|
+
if (type === "workflows" || type === "w") {
|
|
86
|
+
const results = await validateAllWorkflows(config.workflowsDir, config.personasDir);
|
|
87
|
+
if (!options.quiet) {
|
|
88
|
+
console.log(chalk.blue("\nChecking workflows...\n"));
|
|
89
|
+
}
|
|
90
|
+
const lines = formatResults(results, config.workflowsDir, "workflows");
|
|
91
|
+
console.log(lines.join("\n"));
|
|
92
|
+
const valid = results.filter((r) => r.valid).length;
|
|
93
|
+
const total = results.length;
|
|
94
|
+
if (!options.quiet) {
|
|
95
|
+
console.log(`\n${valid === total ? chalk.green("✓") : chalk.red("✗")} ${valid}/${total} workflows valid\n`);
|
|
96
|
+
}
|
|
97
|
+
if (valid !== total) {
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else if (type === "personas" || type === "p") {
|
|
102
|
+
const results = await validateAllPersonas(config.personasDir);
|
|
103
|
+
if (!options.quiet) {
|
|
104
|
+
console.log(chalk.blue("\nChecking personas...\n"));
|
|
105
|
+
}
|
|
106
|
+
const lines = formatResults(results, config.personasDir, "personas");
|
|
107
|
+
console.log(lines.join("\n"));
|
|
108
|
+
const valid = results.filter((r) => r.valid).length;
|
|
109
|
+
const total = results.length;
|
|
110
|
+
if (!options.quiet) {
|
|
111
|
+
console.log(`\n${valid === total ? chalk.green("✓") : chalk.red("✗")} ${valid}/${total} personas valid\n`);
|
|
112
|
+
}
|
|
113
|
+
if (valid !== total) {
|
|
114
|
+
process.exit(1);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
else {
|
|
118
|
+
// Check all
|
|
119
|
+
const summary = await validateAll(config.agentsDir);
|
|
120
|
+
if (!options.quiet) {
|
|
121
|
+
console.log(chalk.blue("\nChecking personas...\n"));
|
|
122
|
+
}
|
|
123
|
+
const personaLines = formatResults(summary.personas.results, config.personasDir, "personas");
|
|
124
|
+
console.log(personaLines.join("\n"));
|
|
125
|
+
if (!options.quiet) {
|
|
126
|
+
console.log(chalk.blue("\nChecking workflows...\n"));
|
|
127
|
+
}
|
|
128
|
+
const workflowLines = formatResults(summary.workflows.results, config.workflowsDir, "workflows");
|
|
129
|
+
console.log(workflowLines.join("\n"));
|
|
130
|
+
// Summary
|
|
131
|
+
if (!options.quiet) {
|
|
132
|
+
console.log(chalk.blue("\nSummary:\n"));
|
|
133
|
+
console.log(` Personas: ${summary.personas.valid}/${summary.personas.total} valid`);
|
|
134
|
+
console.log(` Workflows: ${summary.workflows.valid}/${summary.workflows.total} valid`);
|
|
135
|
+
if (summary.valid) {
|
|
136
|
+
console.log(chalk.green("\n✓ All checks passed\n"));
|
|
137
|
+
}
|
|
138
|
+
else {
|
|
139
|
+
console.log(chalk.red("\n✗ Validation failed\n"));
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
if (!summary.valid) {
|
|
143
|
+
process.exit(1);
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
catch (error) {
|
|
148
|
+
console.error(chalk.red(`Error: ${error.message}`));
|
|
149
|
+
process.exit(1);
|
|
150
|
+
}
|
|
151
|
+
});
|
|
152
|
+
//# sourceMappingURL=check.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"check.js","sourceRoot":"","sources":["../../../src/cli/commands/check.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,QAAQ,EAAE,MAAM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,CAAC,CAAC,CAAC;QAC/D,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAC;AAC1C,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AACxC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../src/cli/commands/init.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoSpC,eAAO,MAAM,WAAW,SA0CpB,CAAC"}
|