@agentrix/agentrix-run 0.3.0 → 0.5.0
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/index.cjs +11 -0
- package/dist/index.mjs +11 -0
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -11,6 +11,7 @@ function usage() {
|
|
|
11
11
|
"",
|
|
12
12
|
"Options:",
|
|
13
13
|
" --title <text>",
|
|
14
|
+
" --allow-filesystem-agent",
|
|
14
15
|
" --repo <json>",
|
|
15
16
|
" --output-schema <json>",
|
|
16
17
|
" --ref <ref>",
|
|
@@ -161,6 +162,7 @@ function parseInteger(value, flag) {
|
|
|
161
162
|
function parseArgs(argv) {
|
|
162
163
|
const options = {
|
|
163
164
|
agent: "",
|
|
165
|
+
allowFilesystemAgent: false,
|
|
164
166
|
prompt: "",
|
|
165
167
|
responseMode: DEFAULT_RESPONSE_MODE,
|
|
166
168
|
metadata: {}
|
|
@@ -175,6 +177,9 @@ function parseArgs(argv) {
|
|
|
175
177
|
options.agent = requireValue(argv, index, arg);
|
|
176
178
|
index += 1;
|
|
177
179
|
break;
|
|
180
|
+
case "--allow-filesystem-agent":
|
|
181
|
+
options.allowFilesystemAgent = true;
|
|
182
|
+
break;
|
|
178
183
|
case "--title":
|
|
179
184
|
options.title = requireValue(argv, index, arg);
|
|
180
185
|
index += 1;
|
|
@@ -311,6 +316,10 @@ function optionalPositiveInt(value) {
|
|
|
311
316
|
const parsed = Number.parseInt(value, 10);
|
|
312
317
|
return Number.isFinite(parsed) && parsed > 0 ? parsed : void 0;
|
|
313
318
|
}
|
|
319
|
+
function readBooleanEnv(name) {
|
|
320
|
+
const value = process.env[name]?.trim().toLowerCase();
|
|
321
|
+
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
322
|
+
}
|
|
314
323
|
function getNestedNumber(value, ...keys) {
|
|
315
324
|
let current = value;
|
|
316
325
|
for (const key of keys) {
|
|
@@ -405,6 +414,8 @@ function buildRequest(options, detected) {
|
|
|
405
414
|
const repo = mergeRepo(options.repo, detected.repo);
|
|
406
415
|
const request = {
|
|
407
416
|
agent: options.agent,
|
|
417
|
+
allowFilesystemAgent: options.allowFilesystemAgent || readBooleanEnv("AGENTRIX_ALLOW_FILESYSTEM_AGENT") || void 0,
|
|
418
|
+
responseMode: options.responseMode,
|
|
408
419
|
title: options.title,
|
|
409
420
|
prompt: options.prompt,
|
|
410
421
|
outputSchema: options.outputSchema,
|
package/dist/index.mjs
CHANGED
|
@@ -9,6 +9,7 @@ function usage() {
|
|
|
9
9
|
"",
|
|
10
10
|
"Options:",
|
|
11
11
|
" --title <text>",
|
|
12
|
+
" --allow-filesystem-agent",
|
|
12
13
|
" --repo <json>",
|
|
13
14
|
" --output-schema <json>",
|
|
14
15
|
" --ref <ref>",
|
|
@@ -159,6 +160,7 @@ function parseInteger(value, flag) {
|
|
|
159
160
|
function parseArgs(argv) {
|
|
160
161
|
const options = {
|
|
161
162
|
agent: "",
|
|
163
|
+
allowFilesystemAgent: false,
|
|
162
164
|
prompt: "",
|
|
163
165
|
responseMode: DEFAULT_RESPONSE_MODE,
|
|
164
166
|
metadata: {}
|
|
@@ -173,6 +175,9 @@ function parseArgs(argv) {
|
|
|
173
175
|
options.agent = requireValue(argv, index, arg);
|
|
174
176
|
index += 1;
|
|
175
177
|
break;
|
|
178
|
+
case "--allow-filesystem-agent":
|
|
179
|
+
options.allowFilesystemAgent = true;
|
|
180
|
+
break;
|
|
176
181
|
case "--title":
|
|
177
182
|
options.title = requireValue(argv, index, arg);
|
|
178
183
|
index += 1;
|
|
@@ -309,6 +314,10 @@ function optionalPositiveInt(value) {
|
|
|
309
314
|
const parsed = Number.parseInt(value, 10);
|
|
310
315
|
return Number.isFinite(parsed) && parsed > 0 ? parsed : void 0;
|
|
311
316
|
}
|
|
317
|
+
function readBooleanEnv(name) {
|
|
318
|
+
const value = process.env[name]?.trim().toLowerCase();
|
|
319
|
+
return value === "1" || value === "true" || value === "yes" || value === "on";
|
|
320
|
+
}
|
|
312
321
|
function getNestedNumber(value, ...keys) {
|
|
313
322
|
let current = value;
|
|
314
323
|
for (const key of keys) {
|
|
@@ -403,6 +412,8 @@ function buildRequest(options, detected) {
|
|
|
403
412
|
const repo = mergeRepo(options.repo, detected.repo);
|
|
404
413
|
const request = {
|
|
405
414
|
agent: options.agent,
|
|
415
|
+
allowFilesystemAgent: options.allowFilesystemAgent || readBooleanEnv("AGENTRIX_ALLOW_FILESYSTEM_AGENT") || void 0,
|
|
416
|
+
responseMode: options.responseMode,
|
|
406
417
|
title: options.title,
|
|
407
418
|
prompt: options.prompt,
|
|
408
419
|
outputSchema: options.outputSchema,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agentrix/agentrix-run",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.5.0",
|
|
4
4
|
"description": "Native CI submit-and-observe wrapper for Agentrix",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"prepublishOnly": "yarn build"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@agentrix/shared": "^2.
|
|
35
|
+
"@agentrix/shared": "^2.32.0"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@types/node": ">=20",
|