@rendotdev/rig 0.0.19 → 0.0.20

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.
@@ -69,7 +69,17 @@ class CommandRunExampleRenderer {
69
69
  }
70
70
  }
71
71
 
72
+ class ToolListPlainTextFormatter {
73
+ description(value) {
74
+ return value.replace(/\s+/g, " ").trim();
75
+ }
76
+ example(value) {
77
+ return value.replace(/\r\n/g, "\\n").replace(/\n/g, "\\n").replace(/\r/g, "\\r").replace(/\t/g, "\\t").trim();
78
+ }
79
+ }
80
+
72
81
  class ToolListPlainRenderer {
82
+ formatter = new ToolListPlainTextFormatter;
73
83
  render(data) {
74
84
  if (data.tools.length === 0)
75
85
  return "No Rig tools found.";
@@ -82,11 +92,12 @@ class ToolListPlainRenderer {
82
92
  `);
83
93
  }
84
94
  renderToolHeader(tool) {
85
- return `${tool.name} # ${tool.description}`;
95
+ return `${tool.name} # ${this.formatter.description(tool.description)}`;
86
96
  }
87
97
  renderCommand(command) {
88
- const args = command.runExample.replace(`rig run ${command.id}`, "").trim();
89
- return ` ${command.id}${args ? ` ${args}` : ""} # ${command.description}`;
98
+ const args = this.formatter.example(command.runExample.replace(`rig run ${command.id}`, ""));
99
+ const description = this.formatter.description(command.description);
100
+ return ` ${command.id}${args ? ` ${args}` : ""} # ${description}`;
90
101
  }
91
102
  }
92
103
 
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ToolListService
3
- } from "./cli-zgw1jbeg.js";
3
+ } from "./cli-1354fmns.js";
4
4
  import"./cli-884hpkjc.js";
5
5
  import"./cli-f7p31fzm.js";
6
6
  import"./cli-1hm5dxfw.js";
package/dist/rig.js CHANGED
@@ -157,7 +157,7 @@ class CliApplication {
157
157
  configureListCommand() {
158
158
  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
159
  this.requestGeneratedSync();
160
- const { ToolListService } = await import("./list-reekhy3q.js");
160
+ const { ToolListService } = await import("./list-gqdh0m23.js");
161
161
  const service = new ToolListService(this.pathOptions());
162
162
  const data = await service.list({ visibleFromPath: commandOptions.forPath });
163
163
  if (commandOptions.json)
@@ -410,7 +410,7 @@ ${notice.message}`);
410
410
  if (process.env.RIG_AGENT_SYNC === "0")
411
411
  return;
412
412
  await this.ignoreSyncErrors(async () => {
413
- const { AgentInstructionSyncService } = await import("./sync-kkqh3axx.js");
413
+ const { AgentInstructionSyncService } = await import("./sync-k2spbt3f.js");
414
414
  await new AgentInstructionSyncService(this.pathOptions()).sync();
415
415
  });
416
416
  }
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ToolListService
3
- } from "./cli-zgw1jbeg.js";
3
+ } from "./cli-1354fmns.js";
4
4
  import"./cli-884hpkjc.js";
5
5
  import"./cli-f7p31fzm.js";
6
6
  import"./cli-1hm5dxfw.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rendotdev/rig",
3
- "version": "0.0.19",
3
+ "version": "0.0.20",
4
4
  "description": "Local typed command runtime for agents.",
5
5
  "homepage": "https://github.com/rendotdev/rig#readme",
6
6
  "bugs": {