@rendotdev/rig 0.0.20 → 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-1354fmns.js → cli-w0fx5mq7.js} +3 -3
- 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-k2spbt3f.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-gqdh0m23.js +0 -13
- package/dist/run-thx15p83.js +0 -13
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SchemaRenderer
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-7ydvyqk0.js";
|
|
4
4
|
import {
|
|
5
5
|
CommandIds,
|
|
6
6
|
ToolLoader
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-5bhr3az0.js";
|
|
8
8
|
import {
|
|
9
9
|
ToolDiscoveryService
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-1x1ej1qw.js";
|
|
11
11
|
|
|
12
12
|
// src/tools/list.ts
|
|
13
13
|
class CommandRunExampleRenderer {
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolLoader
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-5bhr3az0.js";
|
|
4
4
|
import {
|
|
5
5
|
RigToolEntryFiles,
|
|
6
6
|
ToolDiscoveryService
|
|
7
|
-
} from "./cli-
|
|
7
|
+
} from "./cli-1x1ej1qw.js";
|
|
8
8
|
import {
|
|
9
9
|
RigConfigStore
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-q030hfkh.js";
|
|
11
11
|
import {
|
|
12
12
|
RigError
|
|
13
13
|
} from "./cli-1c7te5cg.js";
|
|
14
|
-
import"./cli-
|
|
14
|
+
import"./cli-e36v1j7k.js";
|
|
15
15
|
import"./cli-b7jgjgy7.js";
|
|
16
16
|
|
|
17
17
|
// src/tools/create.ts
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import {
|
|
2
|
+
RigCronService,
|
|
3
|
+
RigCronWorker,
|
|
4
|
+
cronModuleUrl
|
|
5
|
+
} from "./cli-sthjxz5r.js";
|
|
6
|
+
import"./cli-v3rc5c7e.js";
|
|
7
|
+
import"./cli-7ydvyqk0.js";
|
|
8
|
+
import"./cli-5bhr3az0.js";
|
|
9
|
+
import"./cli-1x1ej1qw.js";
|
|
10
|
+
import"./cli-q030hfkh.js";
|
|
11
|
+
import"./cli-1c7te5cg.js";
|
|
12
|
+
import"./cli-e36v1j7k.js";
|
|
13
|
+
import"./cli-b7jgjgy7.js";
|
|
14
|
+
export {
|
|
15
|
+
cronModuleUrl,
|
|
16
|
+
RigCronWorker,
|
|
17
|
+
RigCronService
|
|
18
|
+
};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import {
|
|
2
2
|
RigToolEntryFiles,
|
|
3
3
|
ToolDiscoveryService
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import"./cli-
|
|
4
|
+
} from "./cli-1x1ej1qw.js";
|
|
5
|
+
import"./cli-q030hfkh.js";
|
|
6
6
|
import"./cli-1c7te5cg.js";
|
|
7
|
-
import"./cli-
|
|
7
|
+
import"./cli-e36v1j7k.js";
|
|
8
8
|
import"./cli-b7jgjgy7.js";
|
|
9
9
|
export {
|
|
10
10
|
ToolDiscoveryService,
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SchemaRenderer
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-7ydvyqk0.js";
|
|
4
4
|
import {
|
|
5
5
|
CommandIds,
|
|
6
6
|
ToolLoader
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
7
|
+
} from "./cli-5bhr3az0.js";
|
|
8
|
+
import"./cli-1x1ej1qw.js";
|
|
9
|
+
import"./cli-q030hfkh.js";
|
|
10
10
|
import {
|
|
11
11
|
RigError
|
|
12
12
|
} from "./cli-1c7te5cg.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-e36v1j7k.js";
|
|
14
14
|
import"./cli-b7jgjgy7.js";
|
|
15
15
|
|
|
16
16
|
// src/tools/help.ts
|
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import {
|
|
2
2
|
SchemaRenderer
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-7ydvyqk0.js";
|
|
4
4
|
import {
|
|
5
5
|
CommandIds,
|
|
6
6
|
ToolLoader
|
|
7
|
-
} from "./cli-
|
|
8
|
-
import"./cli-
|
|
9
|
-
import"./cli-
|
|
7
|
+
} from "./cli-5bhr3az0.js";
|
|
8
|
+
import"./cli-1x1ej1qw.js";
|
|
9
|
+
import"./cli-q030hfkh.js";
|
|
10
10
|
import {
|
|
11
11
|
RigError
|
|
12
12
|
} from "./cli-1c7te5cg.js";
|
|
13
|
-
import"./cli-
|
|
13
|
+
import"./cli-e36v1j7k.js";
|
|
14
14
|
import"./cli-b7jgjgy7.js";
|
|
15
15
|
|
|
16
16
|
// src/tools/inspect.ts
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToolListService
|
|
3
|
+
} from "./cli-w0fx5mq7.js";
|
|
4
|
+
import"./cli-7ydvyqk0.js";
|
|
5
|
+
import"./cli-5bhr3az0.js";
|
|
6
|
+
import"./cli-1x1ej1qw.js";
|
|
7
|
+
import"./cli-q030hfkh.js";
|
|
8
|
+
import"./cli-1c7te5cg.js";
|
|
9
|
+
import"./cli-e36v1j7k.js";
|
|
10
|
+
import"./cli-b7jgjgy7.js";
|
|
11
|
+
export {
|
|
12
|
+
ToolListService
|
|
13
|
+
};
|
|
@@ -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
|
import"./cli-b7jgjgy7.js";
|
|
11
11
|
|
|
12
12
|
// src/registry/registry.ts
|
package/dist/rig.js
CHANGED
|
@@ -1,19 +1,21 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import {
|
|
3
3
|
RigCronWorker
|
|
4
|
-
} from "./cli-
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
import"./cli-
|
|
4
|
+
} from "./cli-sthjxz5r.js";
|
|
5
|
+
import {
|
|
6
|
+
RigLoggerFactory
|
|
7
|
+
} from "./cli-v3rc5c7e.js";
|
|
8
|
+
import"./cli-7ydvyqk0.js";
|
|
9
|
+
import"./cli-5bhr3az0.js";
|
|
10
|
+
import"./cli-1x1ej1qw.js";
|
|
9
11
|
import {
|
|
10
12
|
RigPackageRoot
|
|
11
|
-
} from "./cli-
|
|
13
|
+
} from "./cli-q030hfkh.js";
|
|
12
14
|
import {
|
|
13
15
|
RigError,
|
|
14
16
|
RigErrors
|
|
15
17
|
} from "./cli-1c7te5cg.js";
|
|
16
|
-
import"./cli-
|
|
18
|
+
import"./cli-e36v1j7k.js";
|
|
17
19
|
import {
|
|
18
20
|
__require
|
|
19
21
|
} from "./cli-b7jgjgy7.js";
|
|
@@ -110,7 +112,7 @@ class CliApplication {
|
|
|
110
112
|
return;
|
|
111
113
|
}
|
|
112
114
|
this.requestGeneratedSync();
|
|
113
|
-
const { ToolHelpService } = await import("./help-
|
|
115
|
+
const { ToolHelpService } = await import("./help-aftsnsvm.js");
|
|
114
116
|
console.log(await new ToolHelpService(this.pathOptions()).render(target));
|
|
115
117
|
});
|
|
116
118
|
}
|
|
@@ -127,37 +129,37 @@ class CliApplication {
|
|
|
127
129
|
configureConfigCommands() {
|
|
128
130
|
const configCommand = this.program.command("config").description("Manage Rig config.");
|
|
129
131
|
configCommand.command("show").description("Print config JSON.").action(async () => {
|
|
130
|
-
const { RigConfigStore } = await import("./config-
|
|
132
|
+
const { RigConfigStore } = await import("./config-2m5wjw5n.js");
|
|
131
133
|
const configStore = new RigConfigStore(this.pathOptions());
|
|
132
134
|
await configStore.ensure();
|
|
133
135
|
this.printJson(await configStore.read());
|
|
134
136
|
});
|
|
135
137
|
configCommand.command("path").description("Print absolute config path.").action(async () => {
|
|
136
|
-
const { RigPaths } = await import("./paths-
|
|
138
|
+
const { RigPaths } = await import("./paths-04fjw4rr.js");
|
|
137
139
|
console.log(new RigPaths(this.pathOptions()).configPath);
|
|
138
140
|
});
|
|
139
141
|
}
|
|
140
142
|
configureRegistryCommands() {
|
|
141
143
|
const registryCommand = this.program.command("registry").description("Manage tool registries.");
|
|
142
144
|
registryCommand.command("list").description("List registries as JSON.").action(async () => {
|
|
143
|
-
const { RegistryConfigService } = await import("./registry-
|
|
145
|
+
const { RegistryConfigService } = await import("./registry-ksty807w.js");
|
|
144
146
|
this.printJson(await new RegistryConfigService(this.pathOptions()).list());
|
|
145
147
|
});
|
|
146
148
|
registryCommand.command("create").argument("[path]").description("Add a custom registry. Defaults to the current directory.").action(async (pathValue) => {
|
|
147
149
|
this.requestGeneratedSync();
|
|
148
|
-
const { RegistryConfigService } = await import("./registry-
|
|
150
|
+
const { RegistryConfigService } = await import("./registry-ksty807w.js");
|
|
149
151
|
this.printJson(await new RegistryConfigService(this.pathOptions()).add(pathValue ?? process.cwd()));
|
|
150
152
|
});
|
|
151
153
|
registryCommand.command("remove").argument("<path>").description("Remove a custom registry.").action(async (pathValue) => {
|
|
152
154
|
this.requestGeneratedSync();
|
|
153
|
-
const { RegistryConfigService } = await import("./registry-
|
|
155
|
+
const { RegistryConfigService } = await import("./registry-ksty807w.js");
|
|
154
156
|
this.printJson(await new RegistryConfigService(this.pathOptions()).remove(pathValue));
|
|
155
157
|
});
|
|
156
158
|
}
|
|
157
159
|
configureListCommand() {
|
|
158
160
|
this.program.command("list").alias("ls").description("List discovered tools and commands.").option("--json", "Print full JSON metadata.").option("--plain", "Print a compact plain text command list.").option("--for-path <path>", "Only list tools from registries visible from a path.").action(async (commandOptions) => {
|
|
159
161
|
this.requestGeneratedSync();
|
|
160
|
-
const { ToolListService } = await import("./list-
|
|
162
|
+
const { ToolListService } = await import("./list-v29rq1q1.js");
|
|
161
163
|
const service = new ToolListService(this.pathOptions());
|
|
162
164
|
const data = await service.list({ visibleFromPath: commandOptions.forPath });
|
|
163
165
|
if (commandOptions.json)
|
|
@@ -169,7 +171,7 @@ class CliApplication {
|
|
|
169
171
|
configureInspectCommand() {
|
|
170
172
|
this.program.command("inspect").argument("<target>", "Tool name or command id (<tool>.<command>.)").description("Print tool or command metadata as JSON.").action(async (target) => {
|
|
171
173
|
this.requestGeneratedSync();
|
|
172
|
-
const { ToolInspector } = await import("./inspect-
|
|
174
|
+
const { ToolInspector } = await import("./inspect-196evjrm.js");
|
|
173
175
|
this.printJson(await new ToolInspector(this.pathOptions()).inspect(target));
|
|
174
176
|
});
|
|
175
177
|
}
|
|
@@ -182,7 +184,7 @@ class CliApplication {
|
|
|
182
184
|
configureEditCommand() {
|
|
183
185
|
this.program.command("edit").argument("<tool>").description("Print the TypeScript file path for a tool.").action(async (name) => {
|
|
184
186
|
this.requestGeneratedSync();
|
|
185
|
-
const { ToolFileService } = await import("./create-
|
|
187
|
+
const { ToolFileService } = await import("./create-92py76p1.js");
|
|
186
188
|
const result = await new ToolFileService(this.pathOptions()).path(name);
|
|
187
189
|
console.log(result.toolPath);
|
|
188
190
|
});
|
|
@@ -190,7 +192,7 @@ class CliApplication {
|
|
|
190
192
|
configureRemoveCommand() {
|
|
191
193
|
this.program.command("remove").argument("<tool>").description("Remove a local tool directory.").action(async (name) => {
|
|
192
194
|
this.requestGeneratedSync();
|
|
193
|
-
const { ToolRemover } = await import("./create-
|
|
195
|
+
const { ToolRemover } = await import("./create-92py76p1.js");
|
|
194
196
|
const result = await new ToolRemover(this.pathOptions()).remove(name);
|
|
195
197
|
console.log(`Removed tool ${result.name}`);
|
|
196
198
|
console.log(`Tool directory: ${result.toolDir}`);
|
|
@@ -205,11 +207,11 @@ class CliApplication {
|
|
|
205
207
|
configureCronCommands() {
|
|
206
208
|
const cronCommand = this.program.command("cron").description("Manage scheduled Rig tool commands.");
|
|
207
209
|
cronCommand.command("list").description("List scheduled Rig tool commands as JSON.").action(async () => {
|
|
208
|
-
const { RigCronService } = await import("./cron-
|
|
210
|
+
const { RigCronService } = await import("./cron-ynhxww07.js");
|
|
209
211
|
this.printJson(await new RigCronService(this.pathOptions()).list());
|
|
210
212
|
});
|
|
211
213
|
cronCommand.command("add").argument("<name>", "Unique job name, using letters, numbers, hyphens, or underscores.").argument("<command>", "Command id, formatted as <tool>.<command>.").argument("<schedule>", "Cron expression or nickname, such as @weekly.").description("Schedule a Rig tool command with fixed JSON input.").option("--input <json>", "JSON input string.").option("--input-file <path>", "Read JSON input from a file.").action(async (name, commandId, schedule, commandOptions) => {
|
|
212
|
-
const { cronModuleUrl, RigCronService } = await import("./cron-
|
|
214
|
+
const { cronModuleUrl, RigCronService } = await import("./cron-ynhxww07.js");
|
|
213
215
|
const result = await new RigCronService(this.pathOptions()).add({
|
|
214
216
|
name,
|
|
215
217
|
command: commandId,
|
|
@@ -221,11 +223,11 @@ class CliApplication {
|
|
|
221
223
|
this.printJson(result);
|
|
222
224
|
});
|
|
223
225
|
cronCommand.command("remove").argument("<name>", "Cron job name.").description("Remove a scheduled Rig tool command.").action(async (name) => {
|
|
224
|
-
const { RigCronService } = await import("./cron-
|
|
226
|
+
const { RigCronService } = await import("./cron-ynhxww07.js");
|
|
225
227
|
this.printJson(await new RigCronService(this.pathOptions()).remove(name));
|
|
226
228
|
});
|
|
227
229
|
cronCommand.command("run").argument("<name>", "Cron job name.").description("Run a scheduled Rig tool command now.").action(async (name) => {
|
|
228
|
-
const { RigCronService } = await import("./cron-
|
|
230
|
+
const { RigCronService } = await import("./cron-ynhxww07.js");
|
|
229
231
|
const result = await new RigCronService(this.pathOptions()).run(name);
|
|
230
232
|
this.printJson(result.envelope);
|
|
231
233
|
process.exitCode = result.exitCode;
|
|
@@ -234,7 +236,7 @@ class CliApplication {
|
|
|
234
236
|
configureTypecheckCommand() {
|
|
235
237
|
this.program.command("typecheck").argument("[tool]").description("Type-check local tool files with the injected Rig tool runtime types.").action(async (tool) => {
|
|
236
238
|
this.requestGeneratedSync();
|
|
237
|
-
const { ToolTypecheckService } = await import("./typecheck-
|
|
239
|
+
const { ToolTypecheckService } = await import("./typecheck-qeatn7d2.js");
|
|
238
240
|
const result = await new ToolTypecheckService(this.pathOptions()).typecheck(tool);
|
|
239
241
|
this.printJson(result);
|
|
240
242
|
process.exitCode = result.exitCode;
|
|
@@ -264,7 +266,7 @@ class CliApplication {
|
|
|
264
266
|
configureDevCommands() {
|
|
265
267
|
const devCommand = this.program.command("dev").description("Local development helpers.");
|
|
266
268
|
devCommand.command("link").description("Link this checkout as the local rig command for development.").option("--bin-dir <path>", "Directory where the rig shim should be written.").option("--force", "Overwrite an existing non-Rig shim.").action(async (commandOptions) => {
|
|
267
|
-
const { DevLinkService } = await import("./dev-link-
|
|
269
|
+
const { DevLinkService } = await import("./dev-link-gz0bmj53.js");
|
|
268
270
|
const service = new DevLinkService(this.pathOptions());
|
|
269
271
|
const status = await service.link({
|
|
270
272
|
binDir: commandOptions.binDir,
|
|
@@ -273,7 +275,7 @@ class CliApplication {
|
|
|
273
275
|
console.log(service.renderLinkResult(status));
|
|
274
276
|
});
|
|
275
277
|
devCommand.command("unlink").description("Remove the local rig development shim.").option("--bin-dir <path>", "Directory where the rig shim was written.").option("--force", "Remove even if the file is not a Rig dev shim.").action(async (commandOptions) => {
|
|
276
|
-
const { DevLinkService } = await import("./dev-link-
|
|
278
|
+
const { DevLinkService } = await import("./dev-link-gz0bmj53.js");
|
|
277
279
|
const service = new DevLinkService(this.pathOptions());
|
|
278
280
|
const status = await service.unlink({
|
|
279
281
|
binDir: commandOptions.binDir,
|
|
@@ -282,12 +284,12 @@ class CliApplication {
|
|
|
282
284
|
console.log(service.renderUnlinkResult(status));
|
|
283
285
|
});
|
|
284
286
|
devCommand.command("status").description("Show local rig development shim status as JSON.").option("--bin-dir <path>", "Directory where the rig shim should be checked.").action(async (commandOptions) => {
|
|
285
|
-
const { DevLinkService } = await import("./dev-link-
|
|
287
|
+
const { DevLinkService } = await import("./dev-link-gz0bmj53.js");
|
|
286
288
|
this.printJson(await new DevLinkService(this.pathOptions()).status(commandOptions));
|
|
287
289
|
});
|
|
288
290
|
}
|
|
289
291
|
async runToolCommand(commandId, args, commandOptions) {
|
|
290
|
-
const { ToolRunner } = await import("./run-
|
|
292
|
+
const { ToolRunner } = await import("./run-4dhw2n7j.js");
|
|
291
293
|
const commandTarget = this.commandTarget(commandId);
|
|
292
294
|
const result = await new ToolRunner(this.pathOptions()).run(commandTarget.tool, commandTarget.command, {
|
|
293
295
|
...this.pathOptions(),
|
|
@@ -301,9 +303,9 @@ class CliApplication {
|
|
|
301
303
|
}
|
|
302
304
|
async showDefaultStatus() {
|
|
303
305
|
const [{ RigConfigStore }, { RigPaths }, { ToolDiscoveryService }] = await Promise.all([
|
|
304
|
-
import("./config-
|
|
305
|
-
import("./paths-
|
|
306
|
-
import("./discover-
|
|
306
|
+
import("./config-2m5wjw5n.js"),
|
|
307
|
+
import("./paths-04fjw4rr.js"),
|
|
308
|
+
import("./discover-wx1p1gt4.js")
|
|
307
309
|
]);
|
|
308
310
|
const options = this.pathOptions();
|
|
309
311
|
const paths = new RigPaths(options);
|
|
@@ -312,6 +314,7 @@ class CliApplication {
|
|
|
312
314
|
const tools = await new ToolDiscoveryService(options).discover();
|
|
313
315
|
const registries = configStore.registryEntries(config);
|
|
314
316
|
const currentVersion = this.version();
|
|
317
|
+
new RigLoggerFactory(options).app("cli").info({ version: currentVersion, tools: tools.length }, "Default status rendered.");
|
|
315
318
|
this.printMigrationNotice(configStore.migrationResult());
|
|
316
319
|
console.log(`Rig is ready.
|
|
317
320
|
`);
|
|
@@ -327,7 +330,7 @@ Run "rig doctor" if you want to verify your setup.`);
|
|
|
327
330
|
await this.printUpdateNotice(currentVersion);
|
|
328
331
|
}
|
|
329
332
|
async createTool(name) {
|
|
330
|
-
const { ToolCreator } = await import("./create-
|
|
333
|
+
const { ToolCreator } = await import("./create-92py76p1.js");
|
|
331
334
|
const result = await new ToolCreator(this.pathOptions()).create(name);
|
|
332
335
|
console.log(`Created tool ${result.name}`);
|
|
333
336
|
console.log(`
|
|
@@ -347,9 +350,9 @@ Try:`);
|
|
|
347
350
|
}
|
|
348
351
|
async doctor() {
|
|
349
352
|
const [{ RigConfigStore }, { RigPaths }, { ToolDiscoveryService }] = await Promise.all([
|
|
350
|
-
import("./config-
|
|
351
|
-
import("./paths-
|
|
352
|
-
import("./discover-
|
|
353
|
+
import("./config-2m5wjw5n.js"),
|
|
354
|
+
import("./paths-04fjw4rr.js"),
|
|
355
|
+
import("./discover-wx1p1gt4.js")
|
|
353
356
|
]);
|
|
354
357
|
const options = this.pathOptions();
|
|
355
358
|
const paths = new RigPaths(options);
|
|
@@ -358,6 +361,7 @@ Try:`);
|
|
|
358
361
|
this.printMigrationNotice(configStore.migrationResult());
|
|
359
362
|
const registries = configStore.registryEntries(config);
|
|
360
363
|
const tools = await new ToolDiscoveryService(options).discover();
|
|
364
|
+
new RigLoggerFactory(options).app("doctor").info({ registries: registries.length, tools: tools.length }, "Doctor check completed.");
|
|
361
365
|
console.log(`Rig doctor
|
|
362
366
|
`);
|
|
363
367
|
console.log(`Config: OK ${paths.configPath}`);
|
|
@@ -392,7 +396,7 @@ Status: OK`);
|
|
|
392
396
|
}
|
|
393
397
|
async printUpdateNotice(currentVersion) {
|
|
394
398
|
await this.ignoreSyncErrors(async () => {
|
|
395
|
-
const { NpmUpdateCheckService } = await import("./update-check-
|
|
399
|
+
const { NpmUpdateCheckService } = await import("./update-check-qef8tgen.js");
|
|
396
400
|
const notice = await new NpmUpdateCheckService(this.pathOptions()).check(currentVersion);
|
|
397
401
|
if (notice)
|
|
398
402
|
console.log(`
|
|
@@ -404,13 +408,13 @@ ${notice.message}`);
|
|
|
404
408
|
}
|
|
405
409
|
async syncGeneratedFiles() {
|
|
406
410
|
await this.ignoreSyncErrors(async () => {
|
|
407
|
-
const { ToolRuntimeCommentSyncService } = await import("./runtime-comment-
|
|
411
|
+
const { ToolRuntimeCommentSyncService } = await import("./runtime-comment-ngjh6vxk.js");
|
|
408
412
|
await new ToolRuntimeCommentSyncService(this.pathOptions()).sync();
|
|
409
413
|
});
|
|
410
414
|
if (process.env.RIG_AGENT_SYNC === "0")
|
|
411
415
|
return;
|
|
412
416
|
await this.ignoreSyncErrors(async () => {
|
|
413
|
-
const { AgentInstructionSyncService } = await import("./sync-
|
|
417
|
+
const { AgentInstructionSyncService } = await import("./sync-nhscv97a.js");
|
|
414
418
|
await new AgentInstructionSyncService(this.pathOptions()).sync();
|
|
415
419
|
});
|
|
416
420
|
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
ToolRunner
|
|
3
|
+
} from "./cli-v3rc5c7e.js";
|
|
4
|
+
import"./cli-7ydvyqk0.js";
|
|
5
|
+
import"./cli-5bhr3az0.js";
|
|
6
|
+
import"./cli-1x1ej1qw.js";
|
|
7
|
+
import"./cli-q030hfkh.js";
|
|
8
|
+
import"./cli-1c7te5cg.js";
|
|
9
|
+
import"./cli-e36v1j7k.js";
|
|
10
|
+
import"./cli-b7jgjgy7.js";
|
|
11
|
+
export {
|
|
12
|
+
ToolRunner
|
|
13
|
+
};
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolDiscoveryService
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
3
|
+
} from "./cli-1x1ej1qw.js";
|
|
4
|
+
import"./cli-q030hfkh.js";
|
|
5
5
|
import"./cli-1c7te5cg.js";
|
|
6
|
-
import"./cli-
|
|
6
|
+
import"./cli-e36v1j7k.js";
|
|
7
7
|
import"./cli-b7jgjgy7.js";
|
|
8
8
|
|
|
9
9
|
// src/tools/runtime-comment.ts
|
|
@@ -24,6 +24,11 @@ Rig tool runtime:
|
|
|
24
24
|
- \`rig.paths.home()\`, \`rig.paths.resolve(cwd, path)\`, \`rig.paths.ensureParent(path)\`, and \`rig.paths.size(path)\` cover common path work.
|
|
25
25
|
- Add \`env: rig.z.object({ KEY: rig.z.string() })\` to validate a \`.env\` file beside the tool entry file and receive parsed values on \`context.env\`.
|
|
26
26
|
|
|
27
|
+
Tool logging and key-value state:
|
|
28
|
+
- Use \`context.log.info(...)\`, \`context.log.warn(...)\`, or another Pino-style method for structured logs with a default \`tool:<tool>.<command>\` prefix.
|
|
29
|
+
- Rig writes app and tool logs to \`~/rig/.logs\`, rolls files by size, and keeps logs for seven days by default.
|
|
30
|
+
- Use \`context.kv.set(key, value)\` and \`context.kv.get(key)\` for lightweight JSON state stored beside the tool entry file as \`kv.sqlite\`.
|
|
31
|
+
|
|
27
32
|
Tool SQLite database:
|
|
28
33
|
- Add \`setupDb: (db) => { db.migrate(1, "create table", "create table ..."); }\` when a tool needs persistent state.
|
|
29
34
|
- Rig stores the database beside the tool entry file as \`index.sqlite\` and runs \`setupDb\` before every command.
|
|
@@ -35,6 +40,8 @@ Command run context:
|
|
|
35
40
|
- \`context.processEnv\` is the process environment.
|
|
36
41
|
- \`context.cwd\` is the current working directory.
|
|
37
42
|
- \`context.db\` is available when the tool defines \`setupDb\`.
|
|
43
|
+
- \`context.kv\` is always available for lightweight JSON key-value state.
|
|
44
|
+
- \`context.log\` is a structured Pino logger for this tool command.
|
|
38
45
|
- \`context.rig\` is the toolkit (same as the factory \`rig\` arg, useful for nested tool calls).
|
|
39
46
|
- Return a value that matches the output schema.
|
|
40
47
|
`;
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolListService
|
|
3
|
-
} from "./cli-
|
|
4
|
-
import"./cli-
|
|
5
|
-
import"./cli-
|
|
6
|
-
import"./cli-
|
|
7
|
-
import"./cli-
|
|
3
|
+
} from "./cli-w0fx5mq7.js";
|
|
4
|
+
import"./cli-7ydvyqk0.js";
|
|
5
|
+
import"./cli-5bhr3az0.js";
|
|
6
|
+
import"./cli-1x1ej1qw.js";
|
|
7
|
+
import"./cli-q030hfkh.js";
|
|
8
8
|
import"./cli-1c7te5cg.js";
|
|
9
9
|
import {
|
|
10
10
|
RigPaths
|
|
11
|
-
} from "./cli-
|
|
11
|
+
} from "./cli-e36v1j7k.js";
|
|
12
12
|
import"./cli-b7jgjgy7.js";
|
|
13
13
|
|
|
14
14
|
// src/agents/sync.ts
|
|
@@ -31,7 +31,9 @@ var RigAgentInstructions = `The \`rig\` CLI is installed on this machine. It all
|
|
|
31
31
|
- To remove an existing tool, run \`rig remove <tool>\`.
|
|
32
32
|
- To list tool registries, run \`rig registry list\`.
|
|
33
33
|
- To add a registry, run \`rig registry create [path]\` (defaults to current directory).
|
|
34
|
-
-
|
|
34
|
+
- 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.
|
|
35
|
+
- Use \`context.kv.set(key, value)\` and \`context.kv.get(key)\` for lightweight JSON state in \`kv.sqlite\` beside the tool entry file.
|
|
36
|
+
- 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\`.
|
|
35
37
|
`;
|
|
36
38
|
|
|
37
39
|
// src/agents/sync.ts
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolLoader
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-5bhr3az0.js";
|
|
4
4
|
import {
|
|
5
5
|
ToolDiscoveryService
|
|
6
|
-
} from "./cli-
|
|
6
|
+
} from "./cli-1x1ej1qw.js";
|
|
7
7
|
import {
|
|
8
8
|
RigConfigStore,
|
|
9
9
|
RigPackageRoot
|
|
10
|
-
} from "./cli-
|
|
10
|
+
} from "./cli-q030hfkh.js";
|
|
11
11
|
import {
|
|
12
12
|
RigError
|
|
13
13
|
} from "./cli-1c7te5cg.js";
|
|
14
14
|
import {
|
|
15
15
|
RigPaths
|
|
16
|
-
} from "./cli-
|
|
16
|
+
} from "./cli-e36v1j7k.js";
|
|
17
17
|
import {
|
|
18
18
|
__commonJS,
|
|
19
19
|
__require,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rendotdev/rig",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.21",
|
|
4
4
|
"description": "Local typed command runtime for agents.",
|
|
5
5
|
"homepage": "https://github.com/rendotdev/rig#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -43,6 +43,7 @@
|
|
|
43
43
|
"@types/bun": "latest",
|
|
44
44
|
"bun": "1.3.14",
|
|
45
45
|
"commander": "latest",
|
|
46
|
+
"pino": "^10.3.1",
|
|
46
47
|
"typescript": "latest",
|
|
47
48
|
"zod": "latest"
|
|
48
49
|
},
|