@klaudworks/rmr 0.4.1 → 0.4.2
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 +8 -3
- package/dist/index.js +59 -4
- package/npm-shrinkwrap.json +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -7,9 +7,14 @@ Define multi-step coding workflows that match how you actually work. `rmr` orche
|
|
|
7
7
|
## Quick Start
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
|
|
11
|
-
rmr
|
|
12
|
-
|
|
10
|
+
npx @klaudworks/rmr@latest install feature-dev # add the feature-dev workflow
|
|
11
|
+
npx @klaudworks/rmr@latest run .rmr/workflows/feature-dev/workflow.yaml --task "Implement feature X" # run it
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Using `npx` with `@latest` always runs the newest version. To avoid the prefix, install globally:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install -g @klaudworks/rmr@latest
|
|
13
18
|
```
|
|
14
19
|
|
|
15
20
|
## Sample Workflows
|
package/dist/index.js
CHANGED
|
@@ -11463,6 +11463,34 @@ class InstallCommand extends Command {
|
|
|
11463
11463
|
|
|
11464
11464
|
// src/commands/root.ts
|
|
11465
11465
|
import { basename } from "node:path";
|
|
11466
|
+
|
|
11467
|
+
// src/lib/version.ts
|
|
11468
|
+
import { readFileSync } from "node:fs";
|
|
11469
|
+
import { dirname as dirname3, resolve as resolve7 } from "node:path";
|
|
11470
|
+
import { fileURLToPath as fileURLToPath2 } from "node:url";
|
|
11471
|
+
var cached;
|
|
11472
|
+
function getVersion() {
|
|
11473
|
+
if (cached)
|
|
11474
|
+
return cached;
|
|
11475
|
+
const thisDir = dirname3(fileURLToPath2(import.meta.url));
|
|
11476
|
+
const candidates = [
|
|
11477
|
+
resolve7(thisDir, "..", "package.json"),
|
|
11478
|
+
resolve7(thisDir, "..", "..", "package.json")
|
|
11479
|
+
];
|
|
11480
|
+
for (const candidate of candidates) {
|
|
11481
|
+
try {
|
|
11482
|
+
const pkg = JSON.parse(readFileSync(candidate, "utf8"));
|
|
11483
|
+
if (pkg.version) {
|
|
11484
|
+
cached = pkg.version;
|
|
11485
|
+
return cached;
|
|
11486
|
+
}
|
|
11487
|
+
} catch {}
|
|
11488
|
+
}
|
|
11489
|
+
cached = "0.0.0";
|
|
11490
|
+
return cached;
|
|
11491
|
+
}
|
|
11492
|
+
|
|
11493
|
+
// src/commands/root.ts
|
|
11466
11494
|
function detectShell() {
|
|
11467
11495
|
const raw = process.env.SHELL;
|
|
11468
11496
|
if (!raw) {
|
|
@@ -11479,7 +11507,7 @@ class RootCommand extends Command {
|
|
|
11479
11507
|
static paths = [Command.Default];
|
|
11480
11508
|
async execute() {
|
|
11481
11509
|
const shell = detectShell();
|
|
11482
|
-
process.stdout.write(`rmr - multi-step coding workflows for AI agents
|
|
11510
|
+
process.stdout.write(`rmr ${getVersion()} - multi-step coding workflows for AI agents
|
|
11483
11511
|
|
|
11484
11512
|
`);
|
|
11485
11513
|
process.stdout.write(`Setup
|
|
@@ -11573,7 +11601,7 @@ var logger = {
|
|
|
11573
11601
|
|
|
11574
11602
|
// src/commands/run.ts
|
|
11575
11603
|
import { readFile as readFile4 } from "node:fs/promises";
|
|
11576
|
-
import { resolve as
|
|
11604
|
+
import { resolve as resolve8 } from "node:path";
|
|
11577
11605
|
function parseVar(input) {
|
|
11578
11606
|
const index = input.indexOf("=");
|
|
11579
11607
|
if (index < 1 || index === input.length - 1) {
|
|
@@ -11649,7 +11677,7 @@ class RunCommand extends Command {
|
|
|
11649
11677
|
}
|
|
11650
11678
|
if (this.taskFile) {
|
|
11651
11679
|
try {
|
|
11652
|
-
const content = await readFile4(
|
|
11680
|
+
const content = await readFile4(resolve8(this.taskFile), "utf-8");
|
|
11653
11681
|
const task = content.trim();
|
|
11654
11682
|
return { task, displayTask: `(file: ${this.taskFile})` };
|
|
11655
11683
|
} catch (error) {
|
|
@@ -11669,7 +11697,7 @@ class RunCommand extends Command {
|
|
|
11669
11697
|
const parsedVars = this.vars.map(parseVar);
|
|
11670
11698
|
const effectiveAllowAll = this.noAllowAll ? false : this.allowAll;
|
|
11671
11699
|
const varsObject = Object.fromEntries(parsedVars.map((entry) => [entry.key, entry.value]));
|
|
11672
|
-
const workflowPath =
|
|
11700
|
+
const workflowPath = resolve8(this.workflowPath);
|
|
11673
11701
|
const workflow = await loadWorkflowDefinition(workflowPath);
|
|
11674
11702
|
const runId = generateRunId();
|
|
11675
11703
|
const runState = createInitialRunState({
|
|
@@ -11708,10 +11736,37 @@ class RunCommand extends Command {
|
|
|
11708
11736
|
}
|
|
11709
11737
|
}
|
|
11710
11738
|
|
|
11739
|
+
// src/lib/version.ts
|
|
11740
|
+
import { readFileSync as readFileSync2 } from "node:fs";
|
|
11741
|
+
import { dirname as dirname4, resolve as resolve9 } from "node:path";
|
|
11742
|
+
import { fileURLToPath as fileURLToPath3 } from "node:url";
|
|
11743
|
+
var cached2;
|
|
11744
|
+
function getVersion2() {
|
|
11745
|
+
if (cached2)
|
|
11746
|
+
return cached2;
|
|
11747
|
+
const thisDir = dirname4(fileURLToPath3(import.meta.url));
|
|
11748
|
+
const candidates = [
|
|
11749
|
+
resolve9(thisDir, "..", "package.json"),
|
|
11750
|
+
resolve9(thisDir, "..", "..", "package.json")
|
|
11751
|
+
];
|
|
11752
|
+
for (const candidate of candidates) {
|
|
11753
|
+
try {
|
|
11754
|
+
const pkg = JSON.parse(readFileSync2(candidate, "utf8"));
|
|
11755
|
+
if (pkg.version) {
|
|
11756
|
+
cached2 = pkg.version;
|
|
11757
|
+
return cached2;
|
|
11758
|
+
}
|
|
11759
|
+
} catch {}
|
|
11760
|
+
}
|
|
11761
|
+
cached2 = "0.0.0";
|
|
11762
|
+
return cached2;
|
|
11763
|
+
}
|
|
11764
|
+
|
|
11711
11765
|
// src/index.ts
|
|
11712
11766
|
var [, , ...args] = process.argv;
|
|
11713
11767
|
var cli = new Cli({
|
|
11714
11768
|
binaryName: "rmr",
|
|
11769
|
+
binaryVersion: getVersion2(),
|
|
11715
11770
|
enableColors: false
|
|
11716
11771
|
});
|
|
11717
11772
|
cli.register(exports_builtins.HelpCommand);
|
package/npm-shrinkwrap.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@klaudworks/rex",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "@klaudworks/rex",
|
|
9
|
-
"version": "0.4.
|
|
9
|
+
"version": "0.4.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"clipanion": "^4.0.0-rc.4",
|
|
12
12
|
"yaml": "^2.8.2"
|