@rendotdev/rig 0.0.21 → 0.0.22

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.
Files changed (28) hide show
  1. package/dist/{cli-q030hfkh.js → cli-043bae8s.js} +61 -3
  2. package/dist/{cli-sthjxz5r.js → cli-1ssn3a04.js} +3 -3
  3. package/dist/{cli-e36v1j7k.js → cli-32dzwg3p.js} +3 -0
  4. package/dist/{cli-1x1ej1qw.js → cli-ahwyqf1f.js} +2 -2
  5. package/dist/{cli-5bhr3az0.js → cli-dqz4gvqd.js} +3 -3
  6. package/dist/{cli-v3rc5c7e.js → cli-eavzwv49.js} +3 -3
  7. package/dist/{cli-w0fx5mq7.js → cli-q2ajq5qe.js} +3 -3
  8. package/dist/{cli-7ydvyqk0.js → cli-zbp3334x.js} +1 -1
  9. package/dist/{config-2m5wjw5n.js → config-72dha2z0.js} +2 -2
  10. package/dist/{create-92py76p1.js → create-pnsj60ym.js} +4 -4
  11. package/dist/cron-zhb9hpbs.js +18 -0
  12. package/dist/{dev-link-gz0bmj53.js → dev-link-znh4mch1.js} +1 -1
  13. package/dist/{discover-wx1p1gt4.js → discover-549nzamy.js} +3 -3
  14. package/dist/{help-aftsnsvm.js → help-kg1zhj6n.js} +5 -5
  15. package/dist/{inspect-196evjrm.js → inspect-vqtm5htv.js} +5 -5
  16. package/dist/list-2n0p40dn.js +13 -0
  17. package/dist/{paths-04fjw4rr.js → paths-4kzahz8f.js} +1 -1
  18. package/dist/{registry-ksty807w.js → registry-nvnbmws0.js} +2 -2
  19. package/dist/rig.js +46 -40
  20. package/dist/run-mvhmkkfe.js +13 -0
  21. package/dist/{runtime-comment-ngjh6vxk.js → runtime-comment-n9aft3g5.js} +3 -3
  22. package/dist/{sync-nhscv97a.js → sync-javg558s.js} +8 -6
  23. package/dist/{typecheck-qeatn7d2.js → typecheck-c944bvz2.js} +4 -4
  24. package/dist/{update-check-qef8tgen.js → update-check-bqa9ejex.js} +1 -1
  25. package/package.json +1 -1
  26. package/dist/cron-ynhxww07.js +0 -18
  27. package/dist/list-v29rq1q1.js +0 -13
  28. package/dist/run-4dhw2n7j.js +0 -13
@@ -3,7 +3,7 @@ import {
3
3
  } from "./cli-1c7te5cg.js";
4
4
  import {
5
5
  RigPaths
6
- } from "./cli-e36v1j7k.js";
6
+ } from "./cli-32dzwg3p.js";
7
7
  import {
8
8
  __export
9
9
  } from "./cli-b7jgjgy7.js";
@@ -445,12 +445,54 @@ ${JSON.stringify({
445
445
  import { existsSync as existsSync3 } from "node:fs";
446
446
  import { mkdir as mkdir2, readdir, readFile as readFile2, rename, rm, stat, writeFile as writeFile2 } from "node:fs/promises";
447
447
  import { join as join3 } from "node:path";
448
+ var RigHomeDirectoryMigrationPromptId = "v0.0.19-home-directory";
448
449
 
449
- class RigDirectoryMigrationService {
450
+ class RigMigrationPromptStore {
450
451
  paths;
451
452
  constructor(paths) {
452
453
  this.paths = paths;
453
454
  }
455
+ async hasPrompted(promptId) {
456
+ const state = await this.read();
457
+ return state.prompts[promptId] !== undefined;
458
+ }
459
+ async markPrompted(promptId) {
460
+ const state = await this.read();
461
+ state.prompts[promptId] ??= { shownAt: new Date().toISOString() };
462
+ await this.write(state);
463
+ }
464
+ async read() {
465
+ try {
466
+ const parsed = JSON.parse(await readFile2(this.paths.migrationPromptStatePath, "utf8"));
467
+ if (!this.isState(parsed))
468
+ return this.emptyState();
469
+ return parsed;
470
+ } catch {
471
+ return this.emptyState();
472
+ }
473
+ }
474
+ async write(state) {
475
+ await mkdir2(this.paths.rigDir, { recursive: true });
476
+ const tmpPath = `${this.paths.migrationPromptStatePath}.tmp-${process.pid}`;
477
+ await writeFile2(tmpPath, `${JSON.stringify(state, null, 2)}
478
+ `, "utf8");
479
+ await rename(tmpPath, this.paths.migrationPromptStatePath);
480
+ }
481
+ emptyState() {
482
+ return { version: 1, prompts: {} };
483
+ }
484
+ isState(value) {
485
+ return typeof value === "object" && value !== null && !Array.isArray(value) && value.version === 1 && typeof value.prompts === "object" && value.prompts !== null && !Array.isArray(value.prompts);
486
+ }
487
+ }
488
+
489
+ class RigDirectoryMigrationService {
490
+ paths;
491
+ promptStore;
492
+ constructor(paths, promptStore = new RigMigrationPromptStore(paths)) {
493
+ this.paths = paths;
494
+ this.promptStore = promptStore;
495
+ }
454
496
  async migrateIfNeeded() {
455
497
  const legacyDir = this.paths.legacyRigDir;
456
498
  const currentDir = this.paths.rigDir;
@@ -458,7 +500,10 @@ class RigDirectoryMigrationService {
458
500
  return;
459
501
  const currentExists = existsSync3(currentDir);
460
502
  if (currentExists && !await this.canReplaceCurrentDirectory(currentDir)) {
503
+ if (await this.promptStore.hasPrompted(RigHomeDirectoryMigrationPromptId))
504
+ return;
461
505
  return {
506
+ promptId: RigHomeDirectoryMigrationPromptId,
462
507
  status: "manual",
463
508
  legacyDir,
464
509
  currentDir,
@@ -471,6 +516,7 @@ class RigDirectoryMigrationService {
471
516
  await mkdir2(this.paths.homeDir, { recursive: true });
472
517
  await rename(legacyDir, currentDir);
473
518
  return {
519
+ promptId: RigHomeDirectoryMigrationPromptId,
474
520
  status: "migrated",
475
521
  legacyDir,
476
522
  currentDir,
@@ -506,7 +552,14 @@ class RigDirectoryMigrationService {
506
552
  }
507
553
  async hasOnlyGeneratedCurrentEntries(currentDir) {
508
554
  const entries = await this.visibleEntries(currentDir);
509
- return entries.every((entry) => ["rig.json", "runtime", "tools", "update-check.json", "cron"].includes(entry));
555
+ return entries.every((entry) => [
556
+ "rig.json",
557
+ "runtime",
558
+ "tools",
559
+ "update-check.json",
560
+ "cron",
561
+ "migration-prompts.json"
562
+ ].includes(entry));
510
563
  }
511
564
  async rewriteMigratedConfig() {
512
565
  const configPath = this.paths.configPath;
@@ -14848,6 +14901,11 @@ class RigConfigStore {
14848
14901
  migrationResult() {
14849
14902
  return this.migration;
14850
14903
  }
14904
+ async acknowledgeMigrationPrompt() {
14905
+ if (this.migration?.status !== "manual")
14906
+ return;
14907
+ await new RigMigrationPromptStore(this.paths).markPrompted(this.migration.promptId);
14908
+ }
14851
14909
  async ensure() {
14852
14910
  this.migration = await new RigDirectoryMigrationService(this.paths).migrateIfNeeded();
14853
14911
  await mkdir3(this.paths.rigDir, { recursive: true });
@@ -1,15 +1,15 @@
1
1
  import {
2
2
  ToolRunner
3
- } from "./cli-v3rc5c7e.js";
3
+ } from "./cli-eavzwv49.js";
4
4
  import {
5
5
  RigConfigStore
6
- } from "./cli-q030hfkh.js";
6
+ } from "./cli-043bae8s.js";
7
7
  import {
8
8
  RigError
9
9
  } from "./cli-1c7te5cg.js";
10
10
  import {
11
11
  RigPaths
12
- } from "./cli-e36v1j7k.js";
12
+ } from "./cli-32dzwg3p.js";
13
13
 
14
14
  // src/tools/cron.ts
15
15
  import { mkdir, readFile, rm, writeFile } from "node:fs/promises";
@@ -57,6 +57,9 @@ class RigPaths {
57
57
  get updateCheckCachePath() {
58
58
  return join(this.rigDir, "update-check.json");
59
59
  }
60
+ get migrationPromptStatePath() {
61
+ return join(this.rigDir, "migration-prompts.json");
62
+ }
60
63
  get defaultBaseRegistryDir() {
61
64
  return "~/rig/tools";
62
65
  }
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  RigConfigStore
3
- } from "./cli-q030hfkh.js";
3
+ } from "./cli-043bae8s.js";
4
4
  import {
5
5
  RigError
6
6
  } from "./cli-1c7te5cg.js";
7
7
  import {
8
8
  RigPaths
9
- } from "./cli-e36v1j7k.js";
9
+ } from "./cli-32dzwg3p.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-1x1ej1qw.js";
3
+ } from "./cli-ahwyqf1f.js";
4
4
  import {
5
5
  exports_external
6
- } from "./cli-q030hfkh.js";
6
+ } from "./cli-043bae8s.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-4dhw2n7j.js");
239
+ const { ToolRunner } = await import("./run-mvhmkkfe.js");
240
240
  const result = await new ToolRunner(this.options).run(target.tool, target.command, {
241
241
  ...this.options,
242
242
  args: options.args,
@@ -1,18 +1,18 @@
1
1
  import {
2
2
  SchemaRenderer
3
- } from "./cli-7ydvyqk0.js";
3
+ } from "./cli-zbp3334x.js";
4
4
  import {
5
5
  CommandIds,
6
6
  ToolLoader,
7
7
  createRigToolKit
8
- } from "./cli-5bhr3az0.js";
8
+ } from "./cli-dqz4gvqd.js";
9
9
  import {
10
10
  RigError,
11
11
  RigErrors
12
12
  } from "./cli-1c7te5cg.js";
13
13
  import {
14
14
  RigPaths
15
- } from "./cli-e36v1j7k.js";
15
+ } from "./cli-32dzwg3p.js";
16
16
  import {
17
17
  __commonJS,
18
18
  __require,
@@ -1,13 +1,13 @@
1
1
  import {
2
2
  SchemaRenderer
3
- } from "./cli-7ydvyqk0.js";
3
+ } from "./cli-zbp3334x.js";
4
4
  import {
5
5
  CommandIds,
6
6
  ToolLoader
7
- } from "./cli-5bhr3az0.js";
7
+ } from "./cli-dqz4gvqd.js";
8
8
  import {
9
9
  ToolDiscoveryService
10
- } from "./cli-1x1ej1qw.js";
10
+ } from "./cli-ahwyqf1f.js";
11
11
 
12
12
  // src/tools/list.ts
13
13
  class CommandRunExampleRenderer {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  exports_external
3
- } from "./cli-q030hfkh.js";
3
+ } from "./cli-043bae8s.js";
4
4
 
5
5
  // src/tools/schema.ts
6
6
  class SchemaRenderer {
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  RigConfigStore
3
- } from "./cli-q030hfkh.js";
3
+ } from "./cli-043bae8s.js";
4
4
  import"./cli-1c7te5cg.js";
5
- import"./cli-e36v1j7k.js";
5
+ import"./cli-32dzwg3p.js";
6
6
  import"./cli-b7jgjgy7.js";
7
7
  export {
8
8
  RigConfigStore
@@ -1,17 +1,17 @@
1
1
  import {
2
2
  ToolLoader
3
- } from "./cli-5bhr3az0.js";
3
+ } from "./cli-dqz4gvqd.js";
4
4
  import {
5
5
  RigToolEntryFiles,
6
6
  ToolDiscoveryService
7
- } from "./cli-1x1ej1qw.js";
7
+ } from "./cli-ahwyqf1f.js";
8
8
  import {
9
9
  RigConfigStore
10
- } from "./cli-q030hfkh.js";
10
+ } from "./cli-043bae8s.js";
11
11
  import {
12
12
  RigError
13
13
  } from "./cli-1c7te5cg.js";
14
- import"./cli-e36v1j7k.js";
14
+ import"./cli-32dzwg3p.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-1ssn3a04.js";
6
+ import"./cli-eavzwv49.js";
7
+ import"./cli-zbp3334x.js";
8
+ import"./cli-dqz4gvqd.js";
9
+ import"./cli-ahwyqf1f.js";
10
+ import"./cli-043bae8s.js";
11
+ import"./cli-1c7te5cg.js";
12
+ import"./cli-32dzwg3p.js";
13
+ import"./cli-b7jgjgy7.js";
14
+ export {
15
+ cronModuleUrl,
16
+ RigCronWorker,
17
+ RigCronService
18
+ };
@@ -3,7 +3,7 @@ import {
3
3
  } from "./cli-1c7te5cg.js";
4
4
  import {
5
5
  RigPaths
6
- } from "./cli-e36v1j7k.js";
6
+ } from "./cli-32dzwg3p.js";
7
7
  import"./cli-b7jgjgy7.js";
8
8
 
9
9
  // src/dev/dev-link.ts
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  RigToolEntryFiles,
3
3
  ToolDiscoveryService
4
- } from "./cli-1x1ej1qw.js";
5
- import"./cli-q030hfkh.js";
4
+ } from "./cli-ahwyqf1f.js";
5
+ import"./cli-043bae8s.js";
6
6
  import"./cli-1c7te5cg.js";
7
- import"./cli-e36v1j7k.js";
7
+ import"./cli-32dzwg3p.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-7ydvyqk0.js";
3
+ } from "./cli-zbp3334x.js";
4
4
  import {
5
5
  CommandIds,
6
6
  ToolLoader
7
- } from "./cli-5bhr3az0.js";
8
- import"./cli-1x1ej1qw.js";
9
- import"./cli-q030hfkh.js";
7
+ } from "./cli-dqz4gvqd.js";
8
+ import"./cli-ahwyqf1f.js";
9
+ import"./cli-043bae8s.js";
10
10
  import {
11
11
  RigError
12
12
  } from "./cli-1c7te5cg.js";
13
- import"./cli-e36v1j7k.js";
13
+ import"./cli-32dzwg3p.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-7ydvyqk0.js";
3
+ } from "./cli-zbp3334x.js";
4
4
  import {
5
5
  CommandIds,
6
6
  ToolLoader
7
- } from "./cli-5bhr3az0.js";
8
- import"./cli-1x1ej1qw.js";
9
- import"./cli-q030hfkh.js";
7
+ } from "./cli-dqz4gvqd.js";
8
+ import"./cli-ahwyqf1f.js";
9
+ import"./cli-043bae8s.js";
10
10
  import {
11
11
  RigError
12
12
  } from "./cli-1c7te5cg.js";
13
- import"./cli-e36v1j7k.js";
13
+ import"./cli-32dzwg3p.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-q2ajq5qe.js";
4
+ import"./cli-zbp3334x.js";
5
+ import"./cli-dqz4gvqd.js";
6
+ import"./cli-ahwyqf1f.js";
7
+ import"./cli-043bae8s.js";
8
+ import"./cli-1c7te5cg.js";
9
+ import"./cli-32dzwg3p.js";
10
+ import"./cli-b7jgjgy7.js";
11
+ export {
12
+ ToolListService
13
+ };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RigPaths
3
- } from "./cli-e36v1j7k.js";
3
+ } from "./cli-32dzwg3p.js";
4
4
  import"./cli-b7jgjgy7.js";
5
5
  export {
6
6
  RigPaths
@@ -1,12 +1,12 @@
1
1
  import {
2
2
  RigConfigStore
3
- } from "./cli-q030hfkh.js";
3
+ } from "./cli-043bae8s.js";
4
4
  import {
5
5
  RigError
6
6
  } from "./cli-1c7te5cg.js";
7
7
  import {
8
8
  RigPaths
9
- } from "./cli-e36v1j7k.js";
9
+ } from "./cli-32dzwg3p.js";
10
10
  import"./cli-b7jgjgy7.js";
11
11
 
12
12
  // src/registry/registry.ts
package/dist/rig.js CHANGED
@@ -1,21 +1,21 @@
1
1
  #!/usr/bin/env node
2
2
  import {
3
3
  RigCronWorker
4
- } from "./cli-sthjxz5r.js";
4
+ } from "./cli-1ssn3a04.js";
5
5
  import {
6
6
  RigLoggerFactory
7
- } from "./cli-v3rc5c7e.js";
8
- import"./cli-7ydvyqk0.js";
9
- import"./cli-5bhr3az0.js";
10
- import"./cli-1x1ej1qw.js";
7
+ } from "./cli-eavzwv49.js";
8
+ import"./cli-zbp3334x.js";
9
+ import"./cli-dqz4gvqd.js";
10
+ import"./cli-ahwyqf1f.js";
11
11
  import {
12
12
  RigPackageRoot
13
- } from "./cli-q030hfkh.js";
13
+ } from "./cli-043bae8s.js";
14
14
  import {
15
15
  RigError,
16
16
  RigErrors
17
17
  } from "./cli-1c7te5cg.js";
18
- import"./cli-e36v1j7k.js";
18
+ import"./cli-32dzwg3p.js";
19
19
  import {
20
20
  __require
21
21
  } from "./cli-b7jgjgy7.js";
@@ -112,7 +112,7 @@ class CliApplication {
112
112
  return;
113
113
  }
114
114
  this.requestGeneratedSync();
115
- const { ToolHelpService } = await import("./help-aftsnsvm.js");
115
+ const { ToolHelpService } = await import("./help-kg1zhj6n.js");
116
116
  console.log(await new ToolHelpService(this.pathOptions()).render(target));
117
117
  });
118
118
  }
@@ -129,37 +129,37 @@ class CliApplication {
129
129
  configureConfigCommands() {
130
130
  const configCommand = this.program.command("config").description("Manage Rig config.");
131
131
  configCommand.command("show").description("Print config JSON.").action(async () => {
132
- const { RigConfigStore } = await import("./config-2m5wjw5n.js");
132
+ const { RigConfigStore } = await import("./config-72dha2z0.js");
133
133
  const configStore = new RigConfigStore(this.pathOptions());
134
134
  await configStore.ensure();
135
135
  this.printJson(await configStore.read());
136
136
  });
137
137
  configCommand.command("path").description("Print absolute config path.").action(async () => {
138
- const { RigPaths } = await import("./paths-04fjw4rr.js");
138
+ const { RigPaths } = await import("./paths-4kzahz8f.js");
139
139
  console.log(new RigPaths(this.pathOptions()).configPath);
140
140
  });
141
141
  }
142
142
  configureRegistryCommands() {
143
143
  const registryCommand = this.program.command("registry").description("Manage tool registries.");
144
144
  registryCommand.command("list").description("List registries as JSON.").action(async () => {
145
- const { RegistryConfigService } = await import("./registry-ksty807w.js");
145
+ const { RegistryConfigService } = await import("./registry-nvnbmws0.js");
146
146
  this.printJson(await new RegistryConfigService(this.pathOptions()).list());
147
147
  });
148
148
  registryCommand.command("create").argument("[path]").description("Add a custom registry. Defaults to the current directory.").action(async (pathValue) => {
149
149
  this.requestGeneratedSync();
150
- const { RegistryConfigService } = await import("./registry-ksty807w.js");
150
+ const { RegistryConfigService } = await import("./registry-nvnbmws0.js");
151
151
  this.printJson(await new RegistryConfigService(this.pathOptions()).add(pathValue ?? process.cwd()));
152
152
  });
153
153
  registryCommand.command("remove").argument("<path>").description("Remove a custom registry.").action(async (pathValue) => {
154
154
  this.requestGeneratedSync();
155
- const { RegistryConfigService } = await import("./registry-ksty807w.js");
155
+ const { RegistryConfigService } = await import("./registry-nvnbmws0.js");
156
156
  this.printJson(await new RegistryConfigService(this.pathOptions()).remove(pathValue));
157
157
  });
158
158
  }
159
159
  configureListCommand() {
160
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) => {
161
161
  this.requestGeneratedSync();
162
- const { ToolListService } = await import("./list-v29rq1q1.js");
162
+ const { ToolListService } = await import("./list-2n0p40dn.js");
163
163
  const service = new ToolListService(this.pathOptions());
164
164
  const data = await service.list({ visibleFromPath: commandOptions.forPath });
165
165
  if (commandOptions.json)
@@ -171,7 +171,7 @@ class CliApplication {
171
171
  configureInspectCommand() {
172
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) => {
173
173
  this.requestGeneratedSync();
174
- const { ToolInspector } = await import("./inspect-196evjrm.js");
174
+ const { ToolInspector } = await import("./inspect-vqtm5htv.js");
175
175
  this.printJson(await new ToolInspector(this.pathOptions()).inspect(target));
176
176
  });
177
177
  }
@@ -184,7 +184,7 @@ class CliApplication {
184
184
  configureEditCommand() {
185
185
  this.program.command("edit").argument("<tool>").description("Print the TypeScript file path for a tool.").action(async (name) => {
186
186
  this.requestGeneratedSync();
187
- const { ToolFileService } = await import("./create-92py76p1.js");
187
+ const { ToolFileService } = await import("./create-pnsj60ym.js");
188
188
  const result = await new ToolFileService(this.pathOptions()).path(name);
189
189
  console.log(result.toolPath);
190
190
  });
@@ -192,7 +192,7 @@ class CliApplication {
192
192
  configureRemoveCommand() {
193
193
  this.program.command("remove").argument("<tool>").description("Remove a local tool directory.").action(async (name) => {
194
194
  this.requestGeneratedSync();
195
- const { ToolRemover } = await import("./create-92py76p1.js");
195
+ const { ToolRemover } = await import("./create-pnsj60ym.js");
196
196
  const result = await new ToolRemover(this.pathOptions()).remove(name);
197
197
  console.log(`Removed tool ${result.name}`);
198
198
  console.log(`Tool directory: ${result.toolDir}`);
@@ -207,11 +207,11 @@ class CliApplication {
207
207
  configureCronCommands() {
208
208
  const cronCommand = this.program.command("cron").description("Manage scheduled Rig tool commands.");
209
209
  cronCommand.command("list").description("List scheduled Rig tool commands as JSON.").action(async () => {
210
- const { RigCronService } = await import("./cron-ynhxww07.js");
210
+ const { RigCronService } = await import("./cron-zhb9hpbs.js");
211
211
  this.printJson(await new RigCronService(this.pathOptions()).list());
212
212
  });
213
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) => {
214
- const { cronModuleUrl, RigCronService } = await import("./cron-ynhxww07.js");
214
+ const { cronModuleUrl, RigCronService } = await import("./cron-zhb9hpbs.js");
215
215
  const result = await new RigCronService(this.pathOptions()).add({
216
216
  name,
217
217
  command: commandId,
@@ -223,11 +223,11 @@ class CliApplication {
223
223
  this.printJson(result);
224
224
  });
225
225
  cronCommand.command("remove").argument("<name>", "Cron job name.").description("Remove a scheduled Rig tool command.").action(async (name) => {
226
- const { RigCronService } = await import("./cron-ynhxww07.js");
226
+ const { RigCronService } = await import("./cron-zhb9hpbs.js");
227
227
  this.printJson(await new RigCronService(this.pathOptions()).remove(name));
228
228
  });
229
229
  cronCommand.command("run").argument("<name>", "Cron job name.").description("Run a scheduled Rig tool command now.").action(async (name) => {
230
- const { RigCronService } = await import("./cron-ynhxww07.js");
230
+ const { RigCronService } = await import("./cron-zhb9hpbs.js");
231
231
  const result = await new RigCronService(this.pathOptions()).run(name);
232
232
  this.printJson(result.envelope);
233
233
  process.exitCode = result.exitCode;
@@ -236,7 +236,7 @@ class CliApplication {
236
236
  configureTypecheckCommand() {
237
237
  this.program.command("typecheck").argument("[tool]").description("Type-check local tool files with the injected Rig tool runtime types.").action(async (tool) => {
238
238
  this.requestGeneratedSync();
239
- const { ToolTypecheckService } = await import("./typecheck-qeatn7d2.js");
239
+ const { ToolTypecheckService } = await import("./typecheck-c944bvz2.js");
240
240
  const result = await new ToolTypecheckService(this.pathOptions()).typecheck(tool);
241
241
  this.printJson(result);
242
242
  process.exitCode = result.exitCode;
@@ -266,7 +266,7 @@ class CliApplication {
266
266
  configureDevCommands() {
267
267
  const devCommand = this.program.command("dev").description("Local development helpers.");
268
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) => {
269
- const { DevLinkService } = await import("./dev-link-gz0bmj53.js");
269
+ const { DevLinkService } = await import("./dev-link-znh4mch1.js");
270
270
  const service = new DevLinkService(this.pathOptions());
271
271
  const status = await service.link({
272
272
  binDir: commandOptions.binDir,
@@ -275,7 +275,7 @@ class CliApplication {
275
275
  console.log(service.renderLinkResult(status));
276
276
  });
277
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) => {
278
- const { DevLinkService } = await import("./dev-link-gz0bmj53.js");
278
+ const { DevLinkService } = await import("./dev-link-znh4mch1.js");
279
279
  const service = new DevLinkService(this.pathOptions());
280
280
  const status = await service.unlink({
281
281
  binDir: commandOptions.binDir,
@@ -284,12 +284,12 @@ class CliApplication {
284
284
  console.log(service.renderUnlinkResult(status));
285
285
  });
286
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) => {
287
- const { DevLinkService } = await import("./dev-link-gz0bmj53.js");
287
+ const { DevLinkService } = await import("./dev-link-znh4mch1.js");
288
288
  this.printJson(await new DevLinkService(this.pathOptions()).status(commandOptions));
289
289
  });
290
290
  }
291
291
  async runToolCommand(commandId, args, commandOptions) {
292
- const { ToolRunner } = await import("./run-4dhw2n7j.js");
292
+ const { ToolRunner } = await import("./run-mvhmkkfe.js");
293
293
  const commandTarget = this.commandTarget(commandId);
294
294
  const result = await new ToolRunner(this.pathOptions()).run(commandTarget.tool, commandTarget.command, {
295
295
  ...this.pathOptions(),
@@ -303,9 +303,9 @@ class CliApplication {
303
303
  }
304
304
  async showDefaultStatus() {
305
305
  const [{ RigConfigStore }, { RigPaths }, { ToolDiscoveryService }] = await Promise.all([
306
- import("./config-2m5wjw5n.js"),
307
- import("./paths-04fjw4rr.js"),
308
- import("./discover-wx1p1gt4.js")
306
+ import("./config-72dha2z0.js"),
307
+ import("./paths-4kzahz8f.js"),
308
+ import("./discover-549nzamy.js")
309
309
  ]);
310
310
  const options = this.pathOptions();
311
311
  const paths = new RigPaths(options);
@@ -315,7 +315,9 @@ class CliApplication {
315
315
  const registries = configStore.registryEntries(config);
316
316
  const currentVersion = this.version();
317
317
  new RigLoggerFactory(options).app("cli").info({ version: currentVersion, tools: tools.length }, "Default status rendered.");
318
- this.printMigrationNotice(configStore.migrationResult());
318
+ if (this.printMigrationNotice(configStore.migrationResult())) {
319
+ await configStore.acknowledgeMigrationPrompt();
320
+ }
319
321
  console.log(`Rig is ready.
320
322
  `);
321
323
  console.log(`Version: ${currentVersion}`);
@@ -330,7 +332,7 @@ Run "rig doctor" if you want to verify your setup.`);
330
332
  await this.printUpdateNotice(currentVersion);
331
333
  }
332
334
  async createTool(name) {
333
- const { ToolCreator } = await import("./create-92py76p1.js");
335
+ const { ToolCreator } = await import("./create-pnsj60ym.js");
334
336
  const result = await new ToolCreator(this.pathOptions()).create(name);
335
337
  console.log(`Created tool ${result.name}`);
336
338
  console.log(`
@@ -350,15 +352,17 @@ Try:`);
350
352
  }
351
353
  async doctor() {
352
354
  const [{ RigConfigStore }, { RigPaths }, { ToolDiscoveryService }] = await Promise.all([
353
- import("./config-2m5wjw5n.js"),
354
- import("./paths-04fjw4rr.js"),
355
- import("./discover-wx1p1gt4.js")
355
+ import("./config-72dha2z0.js"),
356
+ import("./paths-4kzahz8f.js"),
357
+ import("./discover-549nzamy.js")
356
358
  ]);
357
359
  const options = this.pathOptions();
358
360
  const paths = new RigPaths(options);
359
361
  const configStore = new RigConfigStore(options);
360
362
  const config = await configStore.ensure();
361
- this.printMigrationNotice(configStore.migrationResult());
363
+ if (this.printMigrationNotice(configStore.migrationResult())) {
364
+ await configStore.acknowledgeMigrationPrompt();
365
+ }
362
366
  const registries = configStore.registryEntries(config);
363
367
  const tools = await new ToolDiscoveryService(options).discover();
364
368
  new RigLoggerFactory(options).app("doctor").info({ registries: registries.length, tools: tools.length }, "Doctor check completed.");
@@ -377,7 +381,7 @@ Status: OK`);
377
381
  }
378
382
  printMigrationNotice(migration) {
379
383
  if (!migration)
380
- return;
384
+ return false;
381
385
  if (migration.status === "migrated") {
382
386
  console.log("Rig moved its home folder:");
383
387
  console.log(` From: ${migration.legacyDir}`);
@@ -385,18 +389,20 @@ Status: OK`);
385
389
  if (migration.configUpdated)
386
390
  console.log(" Updated base registry: ~/rig/tools");
387
391
  console.log("");
388
- return;
392
+ return false;
389
393
  }
390
394
  console.log("Rig home folder migration needs your attention:");
391
395
  console.log(` Old folder: ${migration.legacyDir}`);
392
396
  console.log(` New folder: ${migration.currentDir}`);
393
397
  console.log(` Reason: ${migration.reason}`);
394
398
  console.log("Move the files you want to keep into the new folder, then remove the old folder.");
399
+ console.log("This migration prompt is versioned; Rig will not show it again after this run.");
395
400
  console.log("");
401
+ return true;
396
402
  }
397
403
  async printUpdateNotice(currentVersion) {
398
404
  await this.ignoreSyncErrors(async () => {
399
- const { NpmUpdateCheckService } = await import("./update-check-qef8tgen.js");
405
+ const { NpmUpdateCheckService } = await import("./update-check-bqa9ejex.js");
400
406
  const notice = await new NpmUpdateCheckService(this.pathOptions()).check(currentVersion);
401
407
  if (notice)
402
408
  console.log(`
@@ -408,13 +414,13 @@ ${notice.message}`);
408
414
  }
409
415
  async syncGeneratedFiles() {
410
416
  await this.ignoreSyncErrors(async () => {
411
- const { ToolRuntimeCommentSyncService } = await import("./runtime-comment-ngjh6vxk.js");
417
+ const { ToolRuntimeCommentSyncService } = await import("./runtime-comment-n9aft3g5.js");
412
418
  await new ToolRuntimeCommentSyncService(this.pathOptions()).sync();
413
419
  });
414
420
  if (process.env.RIG_AGENT_SYNC === "0")
415
421
  return;
416
422
  await this.ignoreSyncErrors(async () => {
417
- const { AgentInstructionSyncService } = await import("./sync-nhscv97a.js");
423
+ const { AgentInstructionSyncService } = await import("./sync-javg558s.js");
418
424
  await new AgentInstructionSyncService(this.pathOptions()).sync();
419
425
  });
420
426
  }
@@ -0,0 +1,13 @@
1
+ import {
2
+ ToolRunner
3
+ } from "./cli-eavzwv49.js";
4
+ import"./cli-zbp3334x.js";
5
+ import"./cli-dqz4gvqd.js";
6
+ import"./cli-ahwyqf1f.js";
7
+ import"./cli-043bae8s.js";
8
+ import"./cli-1c7te5cg.js";
9
+ import"./cli-32dzwg3p.js";
10
+ import"./cli-b7jgjgy7.js";
11
+ export {
12
+ ToolRunner
13
+ };
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  ToolDiscoveryService
3
- } from "./cli-1x1ej1qw.js";
4
- import"./cli-q030hfkh.js";
3
+ } from "./cli-ahwyqf1f.js";
4
+ import"./cli-043bae8s.js";
5
5
  import"./cli-1c7te5cg.js";
6
- import"./cli-e36v1j7k.js";
6
+ import"./cli-32dzwg3p.js";
7
7
  import"./cli-b7jgjgy7.js";
8
8
 
9
9
  // src/tools/runtime-comment.ts
@@ -1,14 +1,14 @@
1
1
  import {
2
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";
3
+ } from "./cli-q2ajq5qe.js";
4
+ import"./cli-zbp3334x.js";
5
+ import"./cli-dqz4gvqd.js";
6
+ import"./cli-ahwyqf1f.js";
7
+ import"./cli-043bae8s.js";
8
8
  import"./cli-1c7te5cg.js";
9
9
  import {
10
10
  RigPaths
11
- } from "./cli-e36v1j7k.js";
11
+ } from "./cli-32dzwg3p.js";
12
12
  import"./cli-b7jgjgy7.js";
13
13
 
14
14
  // src/agents/sync.ts
@@ -92,6 +92,7 @@ class AgentInstructionSyncService {
92
92
  }
93
93
  renderBlock(toolList) {
94
94
  return `${StartMarker}
95
+
95
96
  ## Rig local tools
96
97
 
97
98
  ${RigAgentInstructions}
@@ -100,6 +101,7 @@ ${RigAgentInstructions}
100
101
  \`\`\`text
101
102
  ${toolList}
102
103
  \`\`\`
104
+
103
105
  ${EndMarker}`;
104
106
  }
105
107
  async renderToolList(target) {
@@ -1,19 +1,19 @@
1
1
  import {
2
2
  ToolLoader
3
- } from "./cli-5bhr3az0.js";
3
+ } from "./cli-dqz4gvqd.js";
4
4
  import {
5
5
  ToolDiscoveryService
6
- } from "./cli-1x1ej1qw.js";
6
+ } from "./cli-ahwyqf1f.js";
7
7
  import {
8
8
  RigConfigStore,
9
9
  RigPackageRoot
10
- } from "./cli-q030hfkh.js";
10
+ } from "./cli-043bae8s.js";
11
11
  import {
12
12
  RigError
13
13
  } from "./cli-1c7te5cg.js";
14
14
  import {
15
15
  RigPaths
16
- } from "./cli-e36v1j7k.js";
16
+ } from "./cli-32dzwg3p.js";
17
17
  import {
18
18
  __commonJS,
19
19
  __require,
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  RigPaths
3
- } from "./cli-e36v1j7k.js";
3
+ } from "./cli-32dzwg3p.js";
4
4
  import"./cli-b7jgjgy7.js";
5
5
 
6
6
  // src/runtime/update-check.ts
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendotdev/rig",
3
- "version": "0.0.21",
3
+ "version": "0.0.22",
4
4
  "description": "Local typed command runtime for agents.",
5
5
  "homepage": "https://github.com/rendotdev/rig#readme",
6
6
  "bugs": {
@@ -1,18 +0,0 @@
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,13 +0,0 @@
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,13 +0,0 @@
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
- };