@h-rig/cli 0.0.6-alpha.28 → 0.0.6-alpha.29

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 (40) hide show
  1. package/dist/bin/rig.js +421 -241
  2. package/dist/src/commands/_connection-state.js +0 -2
  3. package/dist/src/commands/_doctor-checks.js +0 -2
  4. package/dist/src/commands/_help-catalog.js +27 -3
  5. package/dist/src/commands/_operator-view.js +0 -2
  6. package/dist/src/commands/_parsers.js +0 -2
  7. package/dist/src/commands/_pi-frontend.js +0 -2
  8. package/dist/src/commands/_pi-worker-bridge-extension.js +0 -2
  9. package/dist/src/commands/_policy.js +0 -2
  10. package/dist/src/commands/_preflight.js +0 -2
  11. package/dist/src/commands/_run-driver-helpers.js +0 -2
  12. package/dist/src/commands/_server-client.js +0 -2
  13. package/dist/src/commands/_snapshot-upload.js +0 -2
  14. package/dist/src/commands/agent.js +0 -2
  15. package/dist/src/commands/browser.js +0 -2
  16. package/dist/src/commands/connect.js +0 -2
  17. package/dist/src/commands/dist.js +0 -2
  18. package/dist/src/commands/doctor.js +0 -2
  19. package/dist/src/commands/github.js +0 -2
  20. package/dist/src/commands/inbox.js +0 -2
  21. package/dist/src/commands/init.js +0 -2
  22. package/dist/src/commands/inspect.js +0 -2
  23. package/dist/src/commands/inspector.js +0 -2
  24. package/dist/src/commands/plugin.js +73 -19
  25. package/dist/src/commands/profile-and-review.js +0 -2
  26. package/dist/src/commands/queue.js +0 -2
  27. package/dist/src/commands/remote.js +0 -2
  28. package/dist/src/commands/repo-git-harness.js +2 -4
  29. package/dist/src/commands/run.js +2 -4
  30. package/dist/src/commands/server.js +0 -2
  31. package/dist/src/commands/setup.js +0 -8
  32. package/dist/src/commands/task-report-bug.js +0 -2
  33. package/dist/src/commands/task-run-driver.js +0 -2
  34. package/dist/src/commands/task.js +34 -7
  35. package/dist/src/commands/test.js +0 -2
  36. package/dist/src/commands/workspace.js +0 -2
  37. package/dist/src/commands.js +403 -214
  38. package/dist/src/index.js +415 -238
  39. package/dist/src/runner.js +2 -17
  40. package/package.json +6 -6
@@ -6,8 +6,6 @@ import { resolve } from "path";
6
6
  import { EventBus } from "@rig/runtime/control-plane/runtime/events";
7
7
  import { CliError } from "@rig/runtime/control-plane/errors";
8
8
  import { evaluate, loadPolicy, resolveAction } from "@rig/runtime/control-plane/runtime/guard";
9
- import { PluginManager } from "@rig/runtime/control-plane/runtime/plugins";
10
- import { loadRuntimeContextFromEnv } from "@rig/runtime/control-plane/runtime/context";
11
9
  import { buildBinary } from "@rig/runtime/control-plane/runtime/isolation";
12
10
  import { CliError as CliError2 } from "@rig/runtime/control-plane/errors";
13
11
  function withProjectRoot(projectRoot) {
@@ -61,13 +59,6 @@ async function ensureAgentShellBinary(projectRoot, options = {}) {
61
59
  }
62
60
  async function initializeRuntime(options) {
63
61
  const eventBus = new EventBus({ projectRoot: options.projectRoot, runId: options.runId });
64
- const runtimeContext = loadRuntimeContextFromEnv() ?? undefined;
65
- const plugins = await PluginManager.load({
66
- projectRoot: options.projectRoot,
67
- runId: eventBus.getRunId(),
68
- eventBus,
69
- runtimeContext
70
- });
71
62
  const context = {
72
63
  projectRoot: options.projectRoot,
73
64
  dryRun: options.dryRun,
@@ -75,10 +66,8 @@ async function initializeRuntime(options) {
75
66
  runId: eventBus.getRunId(),
76
67
  policyMode: options.policyMode,
77
68
  eventBus,
78
- plugins,
79
69
  emitEvent: async (type, payload) => {
80
- const event = await eventBus.emit(type, payload);
81
- await plugins.onEvent(event);
70
+ await eventBus.emit(type, payload);
82
71
  }
83
72
  };
84
73
  context.runCommand = async (parts) => runCommand(context, parts);
@@ -87,8 +76,7 @@ async function initializeRuntime(options) {
87
76
  outputMode: context.outputMode,
88
77
  dryRun: context.dryRun,
89
78
  policyMode: context.policyMode ?? loadPolicy(options.projectRoot).mode,
90
- policyFile: resolve(options.projectRoot, "rig/policy/policy.json"),
91
- plugins: context.plugins.list()
79
+ policyFile: resolve(options.projectRoot, "rig/policy/policy.json")
92
80
  });
93
81
  return context;
94
82
  }
@@ -139,7 +127,6 @@ async function runCommand(context, parts) {
139
127
  });
140
128
  throw new CliError(`Policy blocked command: ${formatted}`, 126);
141
129
  }
142
- await context.plugins.beforeCommand({ command: commandWithEnv, formattedCommand: formatted });
143
130
  const startedAt = new Date;
144
131
  await context.emitEvent("command.started", {
145
132
  command: commandWithEnv,
@@ -159,7 +146,6 @@ async function runCommand(context, parts) {
159
146
  if (context.outputMode === "text") {
160
147
  console.log(`$ ${formatted}`);
161
148
  }
162
- await context.plugins.afterCommand(dryResult);
163
149
  await context.emitEvent("command.finished", {
164
150
  ...dryResult,
165
151
  dryRun: true
@@ -199,7 +185,6 @@ async function runCommand(context, parts) {
199
185
  stdout: context.outputMode === "json" ? stdout : undefined,
200
186
  stderr: context.outputMode === "json" ? stderr : undefined
201
187
  };
202
- await context.plugins.afterCommand(result);
203
188
  if (exitCode !== 0) {
204
189
  await context.emitEvent("command.failed", {
205
190
  ...result
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@h-rig/cli",
3
- "version": "0.0.6-alpha.28",
3
+ "version": "0.0.6-alpha.29",
4
4
  "type": "module",
5
5
  "description": "Rig package",
6
6
  "license": "UNLICENSED",
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "dependencies": {
25
25
  "@clack/prompts": "^1.2.0",
26
- "@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.28",
27
- "@rig/core": "npm:@h-rig/core@0.0.6-alpha.28",
28
- "@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.28",
29
- "@rig/client": "npm:@h-rig/client@0.0.6-alpha.28",
30
- "@rig/server": "npm:@h-rig/server@0.0.6-alpha.28",
26
+ "@earendil-works/pi-coding-agent": "npm:@h-rig/pi-coding-agent@0.0.6-alpha.29",
27
+ "@rig/core": "npm:@h-rig/core@0.0.6-alpha.29",
28
+ "@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.29",
29
+ "@rig/client": "npm:@h-rig/client@0.0.6-alpha.29",
30
+ "@rig/server": "npm:@h-rig/server@0.0.6-alpha.29",
31
31
  "picocolors": "^1.1.1"
32
32
  }
33
33
  }