@klaudworks/rmr 0.4.0 → 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 +63 -8
- 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
|
@@ -11414,10 +11414,8 @@ import { cp, readdir as readdir2 } from "node:fs/promises";
|
|
|
11414
11414
|
import { existsSync } from "node:fs";
|
|
11415
11415
|
import { dirname as dirname2, resolve as resolve6 } from "node:path";
|
|
11416
11416
|
import { fileURLToPath } from "node:url";
|
|
11417
|
-
var __filename = "/home/runner/work/ralph-meets-rex/ralph-meets-rex/src/commands/install.ts";
|
|
11418
11417
|
function getExamplesWorkflowsDir() {
|
|
11419
|
-
const
|
|
11420
|
-
const thisDir = dirname2(thisFile);
|
|
11418
|
+
const thisDir = dirname2(fileURLToPath(import.meta.url));
|
|
11421
11419
|
const fromDist = resolve6(thisDir, "..", "examples", "workflows");
|
|
11422
11420
|
const fromSrc = resolve6(thisDir, "..", "..", "examples", "workflows");
|
|
11423
11421
|
if (existsSync(fromDist))
|
|
@@ -11452,7 +11450,9 @@ class InstallCommand extends Command {
|
|
|
11452
11450
|
throw new UserInputError(`Unknown workflow "${this.workflowName}".${hint}`);
|
|
11453
11451
|
}
|
|
11454
11452
|
if (existsSync(destinationDir)) {
|
|
11455
|
-
|
|
11453
|
+
ui.info(`Workflow already installed at .rmr/workflows/${this.workflowName}/`);
|
|
11454
|
+
ui.info(`Run it with: rmr run .rmr/workflows/${this.workflowName}/workflow.yaml --task "Describe your task"`);
|
|
11455
|
+
return 0;
|
|
11456
11456
|
}
|
|
11457
11457
|
await cp(sourceDir, destinationDir, { recursive: true, force: false, errorOnExist: true });
|
|
11458
11458
|
ui.success(`installed .rmr/workflows/${this.workflowName}/`);
|
|
@@ -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.
|
|
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.
|
|
9
|
+
"version": "0.4.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"clipanion": "^4.0.0-rc.4",
|
|
12
12
|
"yaml": "^2.8.2"
|