@h-rig/cli 0.0.6-alpha.5 → 0.0.6-alpha.7
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/dist/bin/rig.js +5 -4
- package/dist/src/commands/server.js +2 -2
- package/dist/src/commands.js +2 -2
- package/dist/src/index.js +5 -4
- package/dist/src/runner.js +3 -2
- package/package.json +5 -4
package/dist/bin/rig.js
CHANGED
|
@@ -105,12 +105,13 @@ async function runCommand(context, parts) {
|
|
|
105
105
|
const envMode = process.env.RIG_BASH_MODE;
|
|
106
106
|
const effectiveMode = context.policyMode || (envMode === "off" || envMode === "observe" || envMode === "enforce" ? envMode : loadPolicy(context.projectRoot).mode);
|
|
107
107
|
const controlledPath = `${resolve(context.projectRoot, ".rig", "bin")}:${context.projectRoot}/rig/tools:${process.env.PATH ?? ""}`;
|
|
108
|
-
const
|
|
108
|
+
const usesInfrastructureBinary = parts[0] === "rig-server";
|
|
109
|
+
const controlledBash = usesInfrastructureBinary ? null : await ensureAgentShellBinary(context.projectRoot);
|
|
109
110
|
const commandEnv = [
|
|
110
111
|
"env",
|
|
111
112
|
`PATH=${controlledPath}`,
|
|
112
113
|
`PROJECT_RIG_ROOT=${context.projectRoot}`,
|
|
113
|
-
`BASH=${controlledBash}
|
|
114
|
+
...controlledBash ? [`BASH=${controlledBash}`] : [],
|
|
114
115
|
`RIG_BASH_MODE=${effectiveMode}`,
|
|
115
116
|
`RIG_POLICY_FILE=${resolve(context.projectRoot, "rig/policy/policy.json")}`,
|
|
116
117
|
...context.eventBus.getEventsFile() ? [`RIG_EVENTS_FILE=${context.eventBus.getEventsFile()}`] : []
|
|
@@ -6629,7 +6630,7 @@ async function executeServer(context, args, options) {
|
|
|
6629
6630
|
const authTokenResult = takeOption(pending, "--auth-token");
|
|
6630
6631
|
pending = authTokenResult.rest;
|
|
6631
6632
|
requireNoExtraArgs(pending, "bun run rig server start [--host <host>] [--port <n>] [--poll-ms <n>] [--auth-token <token>]");
|
|
6632
|
-
const commandParts = ["
|
|
6633
|
+
const commandParts = ["rig-server", "start"];
|
|
6633
6634
|
if (hostResult.value) {
|
|
6634
6635
|
commandParts.push("--host", hostResult.value);
|
|
6635
6636
|
}
|
|
@@ -6652,7 +6653,7 @@ async function executeServer(context, args, options) {
|
|
|
6652
6653
|
const eventResult = takeOption(pending, "--event");
|
|
6653
6654
|
pending = eventResult.rest;
|
|
6654
6655
|
requireNoExtraArgs(pending, "bun run rig server notify-test [--event <type>]");
|
|
6655
|
-
const commandParts = ["
|
|
6656
|
+
const commandParts = ["rig-server", "notify-test"];
|
|
6656
6657
|
if (eventResult.value) {
|
|
6657
6658
|
commandParts.push("--event", eventResult.value);
|
|
6658
6659
|
}
|
|
@@ -299,7 +299,7 @@ async function executeServer(context, args, options) {
|
|
|
299
299
|
const authTokenResult = takeOption(pending, "--auth-token");
|
|
300
300
|
pending = authTokenResult.rest;
|
|
301
301
|
requireNoExtraArgs(pending, "bun run rig server start [--host <host>] [--port <n>] [--poll-ms <n>] [--auth-token <token>]");
|
|
302
|
-
const commandParts = ["
|
|
302
|
+
const commandParts = ["rig-server", "start"];
|
|
303
303
|
if (hostResult.value) {
|
|
304
304
|
commandParts.push("--host", hostResult.value);
|
|
305
305
|
}
|
|
@@ -322,7 +322,7 @@ async function executeServer(context, args, options) {
|
|
|
322
322
|
const eventResult = takeOption(pending, "--event");
|
|
323
323
|
pending = eventResult.rest;
|
|
324
324
|
requireNoExtraArgs(pending, "bun run rig server notify-test [--event <type>]");
|
|
325
|
-
const commandParts = ["
|
|
325
|
+
const commandParts = ["rig-server", "notify-test"];
|
|
326
326
|
if (eventResult.value) {
|
|
327
327
|
commandParts.push("--event", eventResult.value);
|
|
328
328
|
}
|
package/dist/src/commands.js
CHANGED
|
@@ -6423,7 +6423,7 @@ async function executeServer(context, args, options) {
|
|
|
6423
6423
|
const authTokenResult = takeOption(pending, "--auth-token");
|
|
6424
6424
|
pending = authTokenResult.rest;
|
|
6425
6425
|
requireNoExtraArgs(pending, "bun run rig server start [--host <host>] [--port <n>] [--poll-ms <n>] [--auth-token <token>]");
|
|
6426
|
-
const commandParts = ["
|
|
6426
|
+
const commandParts = ["rig-server", "start"];
|
|
6427
6427
|
if (hostResult.value) {
|
|
6428
6428
|
commandParts.push("--host", hostResult.value);
|
|
6429
6429
|
}
|
|
@@ -6446,7 +6446,7 @@ async function executeServer(context, args, options) {
|
|
|
6446
6446
|
const eventResult = takeOption(pending, "--event");
|
|
6447
6447
|
pending = eventResult.rest;
|
|
6448
6448
|
requireNoExtraArgs(pending, "bun run rig server notify-test [--event <type>]");
|
|
6449
|
-
const commandParts = ["
|
|
6449
|
+
const commandParts = ["rig-server", "notify-test"];
|
|
6450
6450
|
if (eventResult.value) {
|
|
6451
6451
|
commandParts.push("--event", eventResult.value);
|
|
6452
6452
|
}
|
package/dist/src/index.js
CHANGED
|
@@ -101,12 +101,13 @@ async function runCommand(context, parts) {
|
|
|
101
101
|
const envMode = process.env.RIG_BASH_MODE;
|
|
102
102
|
const effectiveMode = context.policyMode || (envMode === "off" || envMode === "observe" || envMode === "enforce" ? envMode : loadPolicy(context.projectRoot).mode);
|
|
103
103
|
const controlledPath = `${resolve(context.projectRoot, ".rig", "bin")}:${context.projectRoot}/rig/tools:${process.env.PATH ?? ""}`;
|
|
104
|
-
const
|
|
104
|
+
const usesInfrastructureBinary = parts[0] === "rig-server";
|
|
105
|
+
const controlledBash = usesInfrastructureBinary ? null : await ensureAgentShellBinary(context.projectRoot);
|
|
105
106
|
const commandEnv = [
|
|
106
107
|
"env",
|
|
107
108
|
`PATH=${controlledPath}`,
|
|
108
109
|
`PROJECT_RIG_ROOT=${context.projectRoot}`,
|
|
109
|
-
`BASH=${controlledBash}
|
|
110
|
+
...controlledBash ? [`BASH=${controlledBash}`] : [],
|
|
110
111
|
`RIG_BASH_MODE=${effectiveMode}`,
|
|
111
112
|
`RIG_POLICY_FILE=${resolve(context.projectRoot, "rig/policy/policy.json")}`,
|
|
112
113
|
...context.eventBus.getEventsFile() ? [`RIG_EVENTS_FILE=${context.eventBus.getEventsFile()}`] : []
|
|
@@ -6625,7 +6626,7 @@ async function executeServer(context, args, options) {
|
|
|
6625
6626
|
const authTokenResult = takeOption(pending, "--auth-token");
|
|
6626
6627
|
pending = authTokenResult.rest;
|
|
6627
6628
|
requireNoExtraArgs(pending, "bun run rig server start [--host <host>] [--port <n>] [--poll-ms <n>] [--auth-token <token>]");
|
|
6628
|
-
const commandParts = ["
|
|
6629
|
+
const commandParts = ["rig-server", "start"];
|
|
6629
6630
|
if (hostResult.value) {
|
|
6630
6631
|
commandParts.push("--host", hostResult.value);
|
|
6631
6632
|
}
|
|
@@ -6648,7 +6649,7 @@ async function executeServer(context, args, options) {
|
|
|
6648
6649
|
const eventResult = takeOption(pending, "--event");
|
|
6649
6650
|
pending = eventResult.rest;
|
|
6650
6651
|
requireNoExtraArgs(pending, "bun run rig server notify-test [--event <type>]");
|
|
6651
|
-
const commandParts = ["
|
|
6652
|
+
const commandParts = ["rig-server", "notify-test"];
|
|
6652
6653
|
if (eventResult.value) {
|
|
6653
6654
|
commandParts.push("--event", eventResult.value);
|
|
6654
6655
|
}
|
package/dist/src/runner.js
CHANGED
|
@@ -99,12 +99,13 @@ async function runCommand(context, parts) {
|
|
|
99
99
|
const envMode = process.env.RIG_BASH_MODE;
|
|
100
100
|
const effectiveMode = context.policyMode || (envMode === "off" || envMode === "observe" || envMode === "enforce" ? envMode : loadPolicy(context.projectRoot).mode);
|
|
101
101
|
const controlledPath = `${resolve(context.projectRoot, ".rig", "bin")}:${context.projectRoot}/rig/tools:${process.env.PATH ?? ""}`;
|
|
102
|
-
const
|
|
102
|
+
const usesInfrastructureBinary = parts[0] === "rig-server";
|
|
103
|
+
const controlledBash = usesInfrastructureBinary ? null : await ensureAgentShellBinary(context.projectRoot);
|
|
103
104
|
const commandEnv = [
|
|
104
105
|
"env",
|
|
105
106
|
`PATH=${controlledPath}`,
|
|
106
107
|
`PROJECT_RIG_ROOT=${context.projectRoot}`,
|
|
107
|
-
`BASH=${controlledBash}
|
|
108
|
+
...controlledBash ? [`BASH=${controlledBash}`] : [],
|
|
108
109
|
`RIG_BASH_MODE=${effectiveMode}`,
|
|
109
110
|
`RIG_POLICY_FILE=${resolve(context.projectRoot, "rig/policy/policy.json")}`,
|
|
110
111
|
...context.eventBus.getEventsFile() ? [`RIG_EVENTS_FILE=${context.eventBus.getEventsFile()}`] : []
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@h-rig/cli",
|
|
3
|
-
"version": "0.0.6-alpha.
|
|
3
|
+
"version": "0.0.6-alpha.7",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Rig package",
|
|
6
6
|
"license": "UNLICENSED",
|
|
@@ -23,9 +23,10 @@
|
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@clack/prompts": "^1.2.0",
|
|
26
|
-
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.
|
|
27
|
-
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.
|
|
28
|
-
"@rig/client": "npm:@h-rig/client@0.0.6-alpha.
|
|
26
|
+
"@rig/core": "npm:@h-rig/core@0.0.6-alpha.7",
|
|
27
|
+
"@rig/runtime": "npm:@h-rig/runtime@0.0.6-alpha.7",
|
|
28
|
+
"@rig/client": "npm:@h-rig/client@0.0.6-alpha.7",
|
|
29
|
+
"@rig/server": "npm:@h-rig/server@0.0.6-alpha.7",
|
|
29
30
|
"picocolors": "^1.1.1"
|
|
30
31
|
}
|
|
31
32
|
}
|