@rendotdev/rig 0.0.19 → 0.0.21
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 +3 -1
- package/dist/{cli-1hm5dxfw.js → cli-1x1ej1qw.js} +2 -2
- package/dist/{cli-f7p31fzm.js → cli-5bhr3az0.js} +3 -3
- package/dist/{cli-884hpkjc.js → cli-7ydvyqk0.js} +1 -1
- package/dist/{cli-13q90bjr.js → cli-e36v1j7k.js} +3 -0
- package/dist/{cli-nk194xv0.js → cli-q030hfkh.js} +25 -1
- package/dist/{cli-es8j6mma.js → cli-sthjxz5r.js} +3 -3
- package/dist/cli-v3rc5c7e.js +5161 -0
- package/dist/{cli-zgw1jbeg.js → cli-w0fx5mq7.js} +17 -6
- package/dist/{config-20f90shh.js → config-2m5wjw5n.js} +2 -2
- package/dist/{create-pvym2abv.js → create-92py76p1.js} +4 -4
- package/dist/cron-ynhxww07.js +18 -0
- package/dist/{dev-link-e1mj8w17.js → dev-link-gz0bmj53.js} +1 -1
- package/dist/{discover-95bpzy46.js → discover-wx1p1gt4.js} +3 -3
- package/dist/{help-qj75r0x3.js → help-aftsnsvm.js} +5 -5
- package/dist/{inspect-0ckw7bs5.js → inspect-196evjrm.js} +5 -5
- package/dist/list-v29rq1q1.js +13 -0
- package/dist/{paths-3vxw7dek.js → paths-04fjw4rr.js} +1 -1
- package/dist/{registry-fzc3aeb8.js → registry-ksty807w.js} +2 -2
- package/dist/rig.js +40 -36
- package/dist/run-4dhw2n7j.js +13 -0
- package/dist/{runtime-comment-07cpchsr.js → runtime-comment-ngjh6vxk.js} +10 -3
- package/dist/{sync-kkqh3axx.js → sync-nhscv97a.js} +9 -7
- package/dist/{typecheck-971tmqbp.js → typecheck-qeatn7d2.js} +4 -4
- package/dist/{update-check-dpkh7hc6.js → update-check-qef8tgen.js} +1 -1
- package/package.json +2 -1
- package/dist/cli-113n7c3t.js +0 -513
- package/dist/cron-aw908dzn.js +0 -18
- package/dist/list-reekhy3q.js +0 -13
- package/dist/run-thx15p83.js +0 -13
package/README.md
CHANGED
|
@@ -76,7 +76,9 @@ The `rig` CLI is installed on this machine. It allows you to write, run and own
|
|
|
76
76
|
- To remove an existing tool, run `rig remove <tool>`.
|
|
77
77
|
- To list tool registries, run `rig registry list`.
|
|
78
78
|
- To add a registry, run `rig registry create [path]` (defaults to current directory).
|
|
79
|
-
-
|
|
79
|
+
- Use `context.log` for structured Pino logs with a default tool command prefix; Rig writes logs to `~/rig/.logs`, rolls files by size, and keeps seven days.
|
|
80
|
+
- Use `context.kv.set(key, value)` and `context.kv.get(key)` for lightweight JSON state in `kv.sqlite` beside the tool entry file.
|
|
81
|
+
- If a tool needs relational persistent state, define `setupDb` and use `context.db`; Rig stores that SQLite database beside the tool entry file as `index.sqlite`.
|
|
80
82
|
|
|
81
83
|
When rig runs, it keeps detected `AGENTS.md` and `CLAUDE.md` files updated with these instructions and the current `rig list` output.
|
|
82
84
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RigConfigStore
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-q030hfkh.js";
|
|
4
4
|
import {
|
|
5
5
|
RigError
|
|
6
6
|
} from "./cli-1c7te5cg.js";
|
|
7
7
|
import {
|
|
8
8
|
RigPaths
|
|
9
|
-
} from "./cli-
|
|
9
|
+
} from "./cli-e36v1j7k.js";
|
|
10
10
|
|
|
11
11
|
// src/registry/discover.ts
|
|
12
12
|
import { existsSync, statSync } from "node:fs";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolDiscoveryService
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-1x1ej1qw.js";
|
|
4
4
|
import {
|
|
5
5
|
exports_external
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-q030hfkh.js";
|
|
7
7
|
import {
|
|
8
8
|
RigError
|
|
9
9
|
} from "./cli-1c7te5cg.js";
|
|
@@ -236,7 +236,7 @@ class RigCommandRunnerRuntime {
|
|
|
236
236
|
}
|
|
237
237
|
async run(options) {
|
|
238
238
|
const target = this.commandTarget(options);
|
|
239
|
-
const { ToolRunner } = await import("./run-
|
|
239
|
+
const { ToolRunner } = await import("./run-4dhw2n7j.js");
|
|
240
240
|
const result = await new ToolRunner(this.options).run(target.tool, target.command, {
|
|
241
241
|
...this.options,
|
|
242
242
|
args: options.args,
|
|
@@ -3,7 +3,7 @@ import {
|
|
|
3
3
|
} from "./cli-1c7te5cg.js";
|
|
4
4
|
import {
|
|
5
5
|
RigPaths
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-e36v1j7k.js";
|
|
7
7
|
import {
|
|
8
8
|
__export
|
|
9
9
|
} from "./cli-b7jgjgy7.js";
|
|
@@ -318,12 +318,36 @@ export type RigToolDatabase = Database & {
|
|
|
318
318
|
migrate(version: number, name: string, sql: string): void;
|
|
319
319
|
};
|
|
320
320
|
|
|
321
|
+
export type RigToolKvStore = {
|
|
322
|
+
readonly path: string;
|
|
323
|
+
get<T = unknown>(key: string): T | undefined;
|
|
324
|
+
set(key: string, value: unknown): void;
|
|
325
|
+
};
|
|
326
|
+
|
|
327
|
+
export type RigLogMethod = {
|
|
328
|
+
(message: string): void;
|
|
329
|
+
(bindings: Record<string, unknown>, message?: string): void;
|
|
330
|
+
(error: Error, message?: string): void;
|
|
331
|
+
};
|
|
332
|
+
|
|
333
|
+
export type RigToolLogger = {
|
|
334
|
+
trace: RigLogMethod;
|
|
335
|
+
debug: RigLogMethod;
|
|
336
|
+
info: RigLogMethod;
|
|
337
|
+
warn: RigLogMethod;
|
|
338
|
+
error: RigLogMethod;
|
|
339
|
+
fatal: RigLogMethod;
|
|
340
|
+
child(bindings: Record<string, unknown>): RigToolLogger;
|
|
341
|
+
};
|
|
342
|
+
|
|
321
343
|
export type RigToolRunContext<Input, Env = unknown> = {
|
|
322
344
|
input: Input;
|
|
323
345
|
env: Env;
|
|
324
346
|
processEnv: NodeJS.ProcessEnv;
|
|
325
347
|
cwd: string;
|
|
326
348
|
db: RigToolDatabase;
|
|
349
|
+
kv: RigToolKvStore;
|
|
350
|
+
log: RigToolLogger;
|
|
327
351
|
rig: RigToolKit;
|
|
328
352
|
};
|
|
329
353
|
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolRunner
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-v3rc5c7e.js";
|
|
4
4
|
import {
|
|
5
5
|
RigConfigStore
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-q030hfkh.js";
|
|
7
7
|
import {
|
|
8
8
|
RigError
|
|
9
9
|
} from "./cli-1c7te5cg.js";
|
|
10
10
|
import {
|
|
11
11
|
RigPaths
|
|
12
|
-
} from "./cli-
|
|
12
|
+
} from "./cli-e36v1j7k.js";
|
|
13
13
|
|
|
14
14
|
// src/tools/cron.ts
|
|
15
15
|
import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
|