@weldr/runr 0.7.2 → 0.7.4
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 +39 -0
- package/dist/cli.js +8 -1
- package/dist/commands/init.js +68 -27
- package/dist/commands/version.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,45 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [0.7.3] - 2026-01-08
|
|
11
|
+
|
|
12
|
+
**Documentation Consistency** - Complete rebrand cleanup.
|
|
13
|
+
|
|
14
|
+
### Fixed
|
|
15
|
+
|
|
16
|
+
- Complete documentation rebrand from `agent` → `runr` commands
|
|
17
|
+
- Updated all path references from `.agent/` → `.runr/`
|
|
18
|
+
- Fixed worktree path references (`.agent-worktrees/` → `.runr-worktrees/`)
|
|
19
|
+
- Updated config file references (`agent.config.json` → `runr.config.json`)
|
|
20
|
+
- Rebranded "Agent Framework" → "Runr" throughout docs
|
|
21
|
+
|
|
22
|
+
### Added
|
|
23
|
+
|
|
24
|
+
- Documentation for v0.7.x features in MIGRATION.md (modes, hooks, demo)
|
|
25
|
+
- Missing CLI commands in docs/cli.md (`--demo`, `continue`, `meta`, `watch`)
|
|
26
|
+
- Documentation audit document (docs/DOCS_AUDIT.md)
|
|
27
|
+
|
|
28
|
+
## [0.7.2] - 2026-01-07
|
|
29
|
+
|
|
30
|
+
**Rails-energy UX refresh** - 2-minute try-it flow.
|
|
31
|
+
|
|
32
|
+
### Added
|
|
33
|
+
|
|
34
|
+
- `runr init --demo` flag for self-contained TypeScript demo project
|
|
35
|
+
- Demo includes 3 graduated tasks (success, fix-loop, scope-violation)
|
|
36
|
+
- Built-in verification with TypeScript and Vitest
|
|
37
|
+
|
|
38
|
+
## [0.7.1] - 2026-01-06
|
|
39
|
+
|
|
40
|
+
**Sprint Complete** - Git hooks and mode-aware commit checking.
|
|
41
|
+
|
|
42
|
+
### Added
|
|
43
|
+
|
|
44
|
+
- Git hooks mechanism with `runr hooks install`
|
|
45
|
+
- Mode-aware commit check behavior (flow vs ledger)
|
|
46
|
+
- Orchestration receipt (manager dashboard)
|
|
47
|
+
- Stop footer with clear next steps
|
|
48
|
+
|
|
10
49
|
## [0.7.0] - 2026-01-06
|
|
11
50
|
|
|
12
51
|
**Hybrid Workflow Foundation** - Productivity + Auditability together.
|
package/dist/cli.js
CHANGED
|
@@ -47,6 +47,13 @@ import { computeBrain } from './ux/brain.js';
|
|
|
47
47
|
import { formatFrontDoor, formatJson as formatBrainJson } from './ux/render.js';
|
|
48
48
|
import { recordFrontDoor } from './ux/telemetry.js';
|
|
49
49
|
import fs from 'node:fs';
|
|
50
|
+
import path from 'node:path';
|
|
51
|
+
import { fileURLToPath } from 'node:url';
|
|
52
|
+
// Read version from package.json at module load time
|
|
53
|
+
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
54
|
+
const packageJsonPath = path.resolve(__dirname, '../package.json');
|
|
55
|
+
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, 'utf-8'));
|
|
56
|
+
const CLI_VERSION = packageJson.version;
|
|
50
57
|
const program = new Command();
|
|
51
58
|
// Check if invoked as deprecated 'agent' command
|
|
52
59
|
const invokedAs = process.argv[1]?.split('/').pop() || 'runr';
|
|
@@ -69,7 +76,7 @@ Advanced:
|
|
|
69
76
|
program
|
|
70
77
|
.name('runr')
|
|
71
78
|
.description('Autopilot for agent tasks')
|
|
72
|
-
.version(
|
|
79
|
+
.version(CLI_VERSION);
|
|
73
80
|
// ============================================================================
|
|
74
81
|
// CORE COMMANDS (the 5 commands everyone needs)
|
|
75
82
|
// ============================================================================
|
package/dist/commands/init.js
CHANGED
|
@@ -386,14 +386,18 @@ async function generateDemoProject(demoDir) {
|
|
|
386
386
|
*/
|
|
387
387
|
export function add(a: number, b: number): number { return a + b; }
|
|
388
388
|
export function subtract(a: number, b: number): number { return a - b; }
|
|
389
|
+
export function divide(a: number, b: number): number { return a / b; }
|
|
389
390
|
// TODO: implement multiply
|
|
390
391
|
`);
|
|
391
392
|
fs.writeFileSync(path.join(demoDir, 'tests', 'math.test.ts'), `import { describe, it, expect } from 'vitest';
|
|
392
|
-
import { add, subtract } from '../src/math.js';
|
|
393
|
+
import { add, subtract, divide } from '../src/math.js';
|
|
393
394
|
|
|
394
395
|
describe('math', () => {
|
|
395
396
|
it('adds two numbers', () => { expect(add(2, 3)).toBe(5); });
|
|
396
397
|
it('subtracts two numbers', () => { expect(subtract(5, 3)).toBe(2); });
|
|
398
|
+
// INTENTIONAL BUG: expects 999 but divide(10, 2) returns 5
|
|
399
|
+
// Task 01 will fix this by changing 999 to 5
|
|
400
|
+
it('divides two numbers', () => { expect(divide(10, 2)).toBe(999); });
|
|
397
401
|
});
|
|
398
402
|
`);
|
|
399
403
|
const runrConfig = {
|
|
@@ -423,20 +427,27 @@ Add a multiply function to src/math.ts and add a test for it.
|
|
|
423
427
|
- npm run typecheck passes
|
|
424
428
|
- npm test passes
|
|
425
429
|
`);
|
|
426
|
-
fs.writeFileSync(path.join(demoDir, '.runr', 'tasks', '01-
|
|
430
|
+
fs.writeFileSync(path.join(demoDir, '.runr', 'tasks', '01-fix-failing-test.md'), `# Fix the failing divide test
|
|
427
431
|
|
|
428
432
|
## Goal
|
|
429
|
-
|
|
433
|
+
The divide test is currently failing. Fix it.
|
|
434
|
+
|
|
435
|
+
## Context
|
|
436
|
+
Run \`npm test\` to see the failure. The test expects the wrong value.
|
|
430
437
|
|
|
431
438
|
## Requirements
|
|
432
|
-
-
|
|
433
|
-
-
|
|
439
|
+
- Fix the failing test in tests/math.test.ts
|
|
440
|
+
- The divide(10, 2) test should expect 5, not 999
|
|
434
441
|
|
|
435
442
|
## Success Criteria
|
|
436
443
|
- npm run typecheck passes
|
|
437
444
|
- npm test passes
|
|
445
|
+
|
|
446
|
+
## Note
|
|
447
|
+
This task demonstrates the autofix flow. When verification fails,
|
|
448
|
+
run \`runr\` to see safe commands, then \`runr continue\` to auto-fix.
|
|
438
449
|
`);
|
|
439
|
-
fs.writeFileSync(path.join(demoDir, '.runr', 'tasks', '02-scope-violation.md'), `# Update README
|
|
450
|
+
fs.writeFileSync(path.join(demoDir, '.runr', 'tasks', '02-scope-violation.md'), `# Update README (will be blocked)
|
|
440
451
|
|
|
441
452
|
## Goal
|
|
442
453
|
Update README.md to describe this math library.
|
|
@@ -448,63 +459,93 @@ Update README.md to describe this math library.
|
|
|
448
459
|
## Success Criteria
|
|
449
460
|
- README.md contains function documentation
|
|
450
461
|
|
|
451
|
-
##
|
|
452
|
-
This task
|
|
462
|
+
## Expected Behavior
|
|
463
|
+
This task WILL be blocked by the scope guard.
|
|
464
|
+
README.md is in the denylist (see .runr/runr.config.json).
|
|
465
|
+
|
|
466
|
+
This demonstrates Runr's safety guardrails working correctly.
|
|
467
|
+
Run \`runr report latest\` to see the guard violation details.
|
|
453
468
|
`);
|
|
454
469
|
fs.writeFileSync(path.join(demoDir, 'README.md'), `# Runr Demo
|
|
455
470
|
|
|
456
471
|
Try Runr in 2 minutes.
|
|
457
472
|
|
|
458
|
-
##
|
|
473
|
+
## Setup
|
|
459
474
|
|
|
460
475
|
\`\`\`bash
|
|
461
476
|
npm install
|
|
462
477
|
\`\`\`
|
|
463
478
|
|
|
464
|
-
|
|
479
|
+
---
|
|
465
480
|
|
|
466
|
-
|
|
481
|
+
## Task 1: Success (the happy path)
|
|
467
482
|
|
|
468
483
|
\`\`\`bash
|
|
469
484
|
runr run --task .runr/tasks/00-success.md
|
|
470
485
|
\`\`\`
|
|
471
486
|
|
|
472
|
-
**
|
|
487
|
+
**What happens:** Agent adds a multiply function, tests pass, checkpoint created.
|
|
488
|
+
|
|
489
|
+
\`\`\`bash
|
|
490
|
+
runr report latest # See the run details
|
|
491
|
+
\`\`\`
|
|
492
|
+
|
|
493
|
+
---
|
|
494
|
+
|
|
495
|
+
## Task 2: Autofix (the "wow" moment)
|
|
496
|
+
|
|
497
|
+
This task has a **failing test** (intentional). Watch Runr detect it and offer safe commands.
|
|
473
498
|
|
|
474
499
|
\`\`\`bash
|
|
475
|
-
runr
|
|
500
|
+
runr run --task .runr/tasks/01-fix-failing-test.md
|
|
476
501
|
\`\`\`
|
|
477
502
|
|
|
478
|
-
|
|
503
|
+
**What happens:** Verification fails (npm test fails). Run stops.
|
|
479
504
|
|
|
480
505
|
\`\`\`bash
|
|
481
|
-
runr
|
|
506
|
+
runr # Shows STOPPED + 3 next actions
|
|
482
507
|
\`\`\`
|
|
483
508
|
|
|
484
|
-
|
|
509
|
+
You'll see safe commands like \`npm test\`. Now auto-fix:
|
|
485
510
|
|
|
486
511
|
\`\`\`bash
|
|
487
|
-
runr
|
|
488
|
-
runr continue # attempt auto-fix
|
|
489
|
-
runr report latest
|
|
512
|
+
runr continue # Runs safe commands, then resumes
|
|
490
513
|
\`\`\`
|
|
491
514
|
|
|
492
|
-
|
|
515
|
+
\`\`\`bash
|
|
516
|
+
runr report latest # See what was fixed
|
|
517
|
+
\`\`\`
|
|
518
|
+
|
|
519
|
+
---
|
|
520
|
+
|
|
521
|
+
## Task 3: Guard (safety demo)
|
|
522
|
+
|
|
523
|
+
This task tries to modify README.md, which is in the denylist.
|
|
493
524
|
|
|
494
525
|
\`\`\`bash
|
|
495
526
|
runr run --task .runr/tasks/02-scope-violation.md
|
|
496
527
|
\`\`\`
|
|
497
528
|
|
|
498
|
-
**
|
|
529
|
+
**What happens:** STOPPED immediately. Scope guard blocks the change.
|
|
530
|
+
|
|
531
|
+
\`\`\`bash
|
|
532
|
+
runr # Shows BLOCKED headline + manual recipe
|
|
533
|
+
runr report latest # See the guard violation details
|
|
534
|
+
\`\`\`
|
|
535
|
+
|
|
536
|
+
This is the safety layer working correctly. No \`--force\` can bypass scope.
|
|
537
|
+
|
|
538
|
+
---
|
|
539
|
+
|
|
540
|
+
## The Point
|
|
499
541
|
|
|
500
|
-
|
|
542
|
+
Runr stops with receipts and 3 actions you can trust:
|
|
501
543
|
|
|
502
|
-
|
|
544
|
+
1. **continue** — run safe commands, then resume
|
|
545
|
+
2. **report** — inspect the run: diffs, logs, timeline
|
|
546
|
+
3. **intervene** — record manual fixes for provenance
|
|
503
547
|
|
|
504
|
-
|
|
505
|
-
- **continue** — auto-fix what's safe, then resume
|
|
506
|
-
- **report** — open the run receipt: diffs + logs + timeline
|
|
507
|
-
- **intervene** — record manual fixes
|
|
548
|
+
Every stop has a headline. Every headline maps to a fix.
|
|
508
549
|
`);
|
|
509
550
|
fs.writeFileSync(path.join(demoDir, '.gitignore'), 'node_modules/\ndist/\n.runr/runs/\n');
|
|
510
551
|
}
|
package/dist/commands/version.js
CHANGED
|
@@ -59,7 +59,7 @@ export function getVersionInfo() {
|
|
|
59
59
|
*/
|
|
60
60
|
function formatVersion(info) {
|
|
61
61
|
const lines = [];
|
|
62
|
-
lines.push(`
|
|
62
|
+
lines.push(`Runr v${info.agent_version}`);
|
|
63
63
|
lines.push(` Artifact Schema: v${info.artifact_schema_version}`);
|
|
64
64
|
lines.push(` Node: ${info.node}`);
|
|
65
65
|
lines.push(` Platform: ${info.platform}`);
|