@rendotdev/rig 0.0.9 → 0.0.11
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 +1 -1
- package/dist/{cli-84rveftv.js → cli-7zqnqrah.js} +5 -6
- package/dist/{cli-76dm4cgr.js → cli-yr1hh9da.js} +1 -1
- package/dist/{create-dsweev61.js → create-59myk91d.js} +1 -1
- package/dist/{help-dz0f9jjb.js → help-6k8m07yv.js} +1 -1
- package/dist/{inspect-7z9xf6wz.js → inspect-ks3x7s4n.js} +1 -1
- package/dist/{list-1tpcpkte.js → list-j2y68mve.js} +2 -2
- package/dist/rig.js +16 -11
- package/dist/{run-gga5pxhc.js → run-y66hvyxg.js} +1 -1
- package/dist/{sync-7fq61sj7.js → sync-94y1k0yt.js} +3 -3
- package/dist/{typecheck-vk7rqkef.js → typecheck-c2k87ppw.js} +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -69,7 +69,7 @@ The `rig` CLI is installed on this machine. It allows you to write, run, and own
|
|
|
69
69
|
- To edit an existing tool, run `rig edit <tool>` and open the printed file path.
|
|
70
70
|
- To remove an existing tool, run `rig remove <tool>`.
|
|
71
71
|
- To list tool registries, run `rig registry list`.
|
|
72
|
-
- To add a registry, run `rig registry
|
|
72
|
+
- To add a registry, run `rig registry create [path]` (defaults to current directory).
|
|
73
73
|
|
|
74
74
|
> > source: ./src/agents/instructions.ts
|
|
75
75
|
|
|
@@ -238,7 +238,7 @@ class RigCommandRunnerRuntime {
|
|
|
238
238
|
}
|
|
239
239
|
async run(options) {
|
|
240
240
|
const target = this.commandTarget(options);
|
|
241
|
-
const { ToolRunner } = await import("./run-
|
|
241
|
+
const { ToolRunner } = await import("./run-y66hvyxg.js");
|
|
242
242
|
const result = await new ToolRunner(this.options).run(target.tool, target.command, {
|
|
243
243
|
...this.options,
|
|
244
244
|
args: options.args,
|
|
@@ -313,18 +313,17 @@ function createRigToolKit(options = {}) {
|
|
|
313
313
|
// src/tools/loader.ts
|
|
314
314
|
import { pathToFileURL } from "node:url";
|
|
315
315
|
class ToolDefinitionValidator {
|
|
316
|
-
namePattern = /^[a-z][a-z0-9-]*$/;
|
|
317
316
|
validateToolName(name) {
|
|
318
|
-
if (!
|
|
317
|
+
if (!name || typeof name !== "string") {
|
|
319
318
|
throw new RigError("TOOL_INVALID", `Invalid tool name: ${name}`, {
|
|
320
|
-
expected: "
|
|
319
|
+
expected: "non-empty string"
|
|
321
320
|
});
|
|
322
321
|
}
|
|
323
322
|
}
|
|
324
323
|
validateCommandName(name) {
|
|
325
|
-
if (!
|
|
324
|
+
if (!name || typeof name !== "string") {
|
|
326
325
|
throw new RigError("TOOL_INVALID", `Invalid command name: ${name}`, {
|
|
327
|
-
expected: "
|
|
326
|
+
expected: "non-empty string"
|
|
328
327
|
});
|
|
329
328
|
}
|
|
330
329
|
}
|
package/dist/rig.js
CHANGED
|
@@ -87,9 +87,14 @@ class CliApplication {
|
|
|
87
87
|
this.configureTypecheckCommand();
|
|
88
88
|
this.configureDevCommands();
|
|
89
89
|
this.configureUpdateCommand();
|
|
90
|
-
this.program.command("help").argument("
|
|
90
|
+
this.program.command("help").argument("[target]", "Tool name or command id (<tool>.<command>).").description("Print general help or tool docs.").action(async (target) => {
|
|
91
|
+
if (!target) {
|
|
92
|
+
const readmePath = join(fileURLToPath(import.meta.url), "..", "..", "README.md");
|
|
93
|
+
console.log(existsSync(readmePath) ? readFileSync(readmePath, "utf8") : this.program.helpInformation());
|
|
94
|
+
return;
|
|
95
|
+
}
|
|
91
96
|
this.requestGeneratedSync();
|
|
92
|
-
const { ToolHelpService } = await import("./help-
|
|
97
|
+
const { ToolHelpService } = await import("./help-6k8m07yv.js");
|
|
93
98
|
console.log(await new ToolHelpService(this.pathOptions()).render(target));
|
|
94
99
|
});
|
|
95
100
|
}
|
|
@@ -131,7 +136,7 @@ class CliApplication {
|
|
|
131
136
|
const { RegistryConfigService } = await import("./registry-gng9br0x.js");
|
|
132
137
|
this.printJson(await new RegistryConfigService(this.pathOptions()).list());
|
|
133
138
|
});
|
|
134
|
-
registryCommand.command("
|
|
139
|
+
registryCommand.command("create").argument("[path]").description("Add a custom registry. Defaults to the current directory.").action(async (pathValue) => {
|
|
135
140
|
this.requestGeneratedSync();
|
|
136
141
|
const { RegistryConfigService } = await import("./registry-gng9br0x.js");
|
|
137
142
|
this.printJson(await new RegistryConfigService(this.pathOptions()).add(pathValue ?? process.cwd()));
|
|
@@ -145,7 +150,7 @@ class CliApplication {
|
|
|
145
150
|
configureListCommand() {
|
|
146
151
|
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) => {
|
|
147
152
|
this.requestGeneratedSync();
|
|
148
|
-
const { ToolListService } = await import("./list-
|
|
153
|
+
const { ToolListService } = await import("./list-j2y68mve.js");
|
|
149
154
|
const service = new ToolListService(this.pathOptions());
|
|
150
155
|
const data = await service.list({ visibleFromPath: commandOptions.forPath });
|
|
151
156
|
if (commandOptions.json)
|
|
@@ -157,7 +162,7 @@ class CliApplication {
|
|
|
157
162
|
configureInspectCommand() {
|
|
158
163
|
this.program.command("inspect").argument("<target>", "Tool name or command id (<tool>.<command>.)").description("Print tool or command metadata as JSON.").action(async (target) => {
|
|
159
164
|
this.requestGeneratedSync();
|
|
160
|
-
const { ToolInspector } = await import("./inspect-
|
|
165
|
+
const { ToolInspector } = await import("./inspect-ks3x7s4n.js");
|
|
161
166
|
this.printJson(await new ToolInspector(this.pathOptions()).inspect(target));
|
|
162
167
|
});
|
|
163
168
|
}
|
|
@@ -170,7 +175,7 @@ class CliApplication {
|
|
|
170
175
|
configureEditCommand() {
|
|
171
176
|
this.program.command("edit").argument("<tool>").description("Print the TypeScript file path for a tool.").action(async (name) => {
|
|
172
177
|
this.requestGeneratedSync();
|
|
173
|
-
const { ToolFileService } = await import("./create-
|
|
178
|
+
const { ToolFileService } = await import("./create-59myk91d.js");
|
|
174
179
|
const result = await new ToolFileService(this.pathOptions()).path(name);
|
|
175
180
|
console.log(result.toolPath);
|
|
176
181
|
});
|
|
@@ -178,7 +183,7 @@ class CliApplication {
|
|
|
178
183
|
configureRemoveCommand() {
|
|
179
184
|
this.program.command("remove").argument("<tool>").description("Remove a local tool directory.").action(async (name) => {
|
|
180
185
|
this.requestGeneratedSync();
|
|
181
|
-
const { ToolRemover } = await import("./create-
|
|
186
|
+
const { ToolRemover } = await import("./create-59myk91d.js");
|
|
182
187
|
const result = await new ToolRemover(this.pathOptions()).remove(name);
|
|
183
188
|
console.log(`Removed tool ${result.name}`);
|
|
184
189
|
console.log(`Tool directory: ${result.toolDir}`);
|
|
@@ -193,7 +198,7 @@ class CliApplication {
|
|
|
193
198
|
configureTypecheckCommand() {
|
|
194
199
|
this.program.command("typecheck").argument("[tool]").description("Type-check local tool files with the injected Rig tool runtime types.").action(async (tool) => {
|
|
195
200
|
this.requestGeneratedSync();
|
|
196
|
-
const { ToolTypecheckService } = await import("./typecheck-
|
|
201
|
+
const { ToolTypecheckService } = await import("./typecheck-c2k87ppw.js");
|
|
197
202
|
const result = await new ToolTypecheckService(this.pathOptions()).typecheck(tool);
|
|
198
203
|
this.printJson(result);
|
|
199
204
|
process.exitCode = result.exitCode;
|
|
@@ -246,7 +251,7 @@ class CliApplication {
|
|
|
246
251
|
});
|
|
247
252
|
}
|
|
248
253
|
async runToolCommand(commandId, args, commandOptions) {
|
|
249
|
-
const { ToolRunner } = await import("./run-
|
|
254
|
+
const { ToolRunner } = await import("./run-y66hvyxg.js");
|
|
250
255
|
const commandTarget = this.commandTarget(commandId);
|
|
251
256
|
const result = await new ToolRunner(this.pathOptions()).run(commandTarget.tool, commandTarget.command, {
|
|
252
257
|
...this.pathOptions(),
|
|
@@ -283,7 +288,7 @@ Run "rig doctor" if you want to verify your setup.`);
|
|
|
283
288
|
await this.printUpdateNotice();
|
|
284
289
|
}
|
|
285
290
|
async createTool(name) {
|
|
286
|
-
const { ToolCreator } = await import("./create-
|
|
291
|
+
const { ToolCreator } = await import("./create-59myk91d.js");
|
|
287
292
|
const result = await new ToolCreator(this.pathOptions()).create(name);
|
|
288
293
|
console.log(`Created tool ${result.name}`);
|
|
289
294
|
console.log(`
|
|
@@ -346,7 +351,7 @@ ${notice.message}`);
|
|
|
346
351
|
if (process.env.RIG_AGENT_SYNC === "0")
|
|
347
352
|
return;
|
|
348
353
|
await this.ignoreSyncErrors(async () => {
|
|
349
|
-
const { AgentInstructionSyncService } = await import("./sync-
|
|
354
|
+
const { AgentInstructionSyncService } = await import("./sync-94y1k0yt.js");
|
|
350
355
|
await new AgentInstructionSyncService(this.pathOptions()).sync();
|
|
351
356
|
});
|
|
352
357
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import {
|
|
2
2
|
ToolListService
|
|
3
|
-
} from "./cli-
|
|
3
|
+
} from "./cli-yr1hh9da.js";
|
|
4
4
|
import"./cli-dshh1cp9.js";
|
|
5
|
-
import"./cli-
|
|
5
|
+
import"./cli-7zqnqrah.js";
|
|
6
6
|
import"./cli-vx11bmzr.js";
|
|
7
7
|
import"./cli-xv4m20sx.js";
|
|
8
8
|
import"./cli-aj56a1ja.js";
|
|
@@ -27,7 +27,7 @@ var RigAgentInstructions = `The \`rig\` CLI is installed on this machine. It all
|
|
|
27
27
|
- To edit an existing tool, run \`rig edit <tool>\` and open the printed file path.
|
|
28
28
|
- To remove an existing tool, run \`rig remove <tool>\`.
|
|
29
29
|
- To list tool registries, run \`rig registry list\`.
|
|
30
|
-
- To add a registry, run \`rig registry
|
|
30
|
+
- To add a registry, run \`rig registry create [path]\` (defaults to current directory).
|
|
31
31
|
`;
|
|
32
32
|
|
|
33
33
|
// src/agents/sync.ts
|