@h-rig/cli 0.0.6-alpha.6 → 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 +3 -2
- package/dist/src/index.js +3 -2
- package/dist/src/runner.js +3 -2
- package/package.json +5 -5
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()}`] : []
|
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()}`] : []
|
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,10 +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.
|
|
29
|
-
"@rig/server": "npm:@h-rig/server@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",
|
|
30
30
|
"picocolors": "^1.1.1"
|
|
31
31
|
}
|
|
32
32
|
}
|