@probelabs/visor 0.1.146 → 0.1.147
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/ai-review-service.d.ts.map +1 -1
- package/dist/cli-main.d.ts.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/github-auth.d.ts +40 -0
- package/dist/github-auth.d.ts.map +1 -1
- package/dist/index.js +719 -329
- package/dist/output/traces/{run-2026-02-26T07-50-40-741Z.ndjson → run-2026-02-27T11-27-22-261Z.ndjson} +84 -84
- package/dist/{traces/run-2026-02-26T07-51-32-586Z.ndjson → output/traces/run-2026-02-27T11-28-08-546Z.ndjson} +1090 -1090
- package/dist/sandbox/bubblewrap-sandbox.d.ts +2 -1
- package/dist/sandbox/bubblewrap-sandbox.d.ts.map +1 -1
- package/dist/sandbox/seatbelt-sandbox.d.ts +2 -1
- package/dist/sandbox/seatbelt-sandbox.d.ts.map +1 -1
- package/dist/scheduler/scheduler.d.ts.map +1 -1
- package/dist/sdk/{check-provider-registry-TSAMMJ7Q.mjs → check-provider-registry-CDL5AJSI.mjs} +7 -7
- package/dist/sdk/{check-provider-registry-WSFL2SVQ.mjs → check-provider-registry-CTZA3EVE.mjs} +7 -7
- package/dist/sdk/{check-provider-registry-HK6M4PDQ.mjs → check-provider-registry-SCPM6DIT.mjs} +7 -7
- package/dist/sdk/{chunk-LSCWRTSY.mjs → chunk-2NFKN6CY.mjs} +2 -2
- package/dist/sdk/{chunk-OM3WYVFI.mjs → chunk-4F5UVWAN.mjs} +2 -2
- package/dist/sdk/{chunk-OM3WYVFI.mjs.map → chunk-4F5UVWAN.mjs.map} +1 -1
- package/dist/sdk/{chunk-74YJMONB.mjs → chunk-EWGX7LI7.mjs} +69 -27
- package/dist/sdk/chunk-EWGX7LI7.mjs.map +1 -0
- package/dist/sdk/{chunk-LVOWWALU.mjs → chunk-FBJ7MC7R.mjs} +3 -3
- package/dist/sdk/{chunk-4SYQL5UQ.mjs → chunk-H23T7J6Y.mjs} +69 -27
- package/dist/sdk/chunk-H23T7J6Y.mjs.map +1 -0
- package/dist/sdk/{chunk-I42ZCVA5.mjs → chunk-JKWLGLDR.mjs} +3 -3
- package/dist/sdk/{chunk-E6SMU2Z4.mjs → chunk-R77LN3OE.mjs} +69 -27
- package/dist/sdk/chunk-R77LN3OE.mjs.map +1 -0
- package/dist/sdk/{chunk-L3XPYQ6I.mjs → chunk-V2QW6ECX.mjs} +2 -2
- package/dist/sdk/{chunk-YOKAA4IU.mjs → chunk-XNTBSV6M.mjs} +2 -7
- package/dist/sdk/{chunk-YOKAA4IU.mjs.map → chunk-XNTBSV6M.mjs.map} +1 -1
- package/dist/sdk/{chunk-Y4DBNDLQ.mjs → chunk-YQZW3D2V.mjs} +3 -3
- package/dist/sdk/{chunk-Y4DBNDLQ.mjs.map → chunk-YQZW3D2V.mjs.map} +1 -1
- package/dist/sdk/{config-AAB2FL22.mjs → config-G5UU4WXT.mjs} +2 -2
- package/dist/sdk/{failure-condition-evaluator-O464EJMD.mjs → failure-condition-evaluator-2B5WY7QN.mjs} +3 -3
- package/dist/sdk/{failure-condition-evaluator-SMOVMMES.mjs → failure-condition-evaluator-FHNZL2US.mjs} +3 -3
- package/dist/sdk/github-auth-UPBBBOME.mjs +196 -0
- package/dist/sdk/github-auth-UPBBBOME.mjs.map +1 -0
- package/dist/sdk/{github-frontend-4L5YDHM4.mjs → github-frontend-47EU2HBY.mjs} +3 -3
- package/dist/sdk/{github-frontend-MSX6Q2WL.mjs → github-frontend-V3WUHL6E.mjs} +3 -3
- package/dist/sdk/{host-5BJ25CUZ.mjs → host-GVR4UGZ3.mjs} +2 -2
- package/dist/sdk/{host-GYZ7XCLI.mjs → host-UQUQIYFG.mjs} +2 -2
- package/dist/sdk/{routing-CQDKRPTO.mjs → routing-CZ36LVVS.mjs} +4 -4
- package/dist/sdk/{routing-RIHVCEIU.mjs → routing-THIWDEYY.mjs} +4 -4
- package/dist/sdk/{schedule-tool-handler-4YUM6Z5F.mjs → schedule-tool-handler-GEH62OUM.mjs} +7 -7
- package/dist/sdk/{schedule-tool-handler-62K3NGH6.mjs → schedule-tool-handler-KFYNV7HL.mjs} +7 -7
- package/dist/sdk/{schedule-tool-handler-4O2VKNG2.mjs → schedule-tool-handler-QUMAF2DJ.mjs} +7 -7
- package/dist/sdk/sdk.js +52 -15
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +6 -6
- package/dist/sdk/{trace-helpers-QQSTZGDT.mjs → trace-helpers-EHDZ42HH.mjs} +2 -2
- package/dist/sdk/{trace-helpers-AWCFW5KG.mjs → trace-helpers-W7TF5ZKF.mjs} +2 -2
- package/dist/sdk/{workflow-check-provider-OM62QYHF.mjs → workflow-check-provider-3K7732MW.mjs} +7 -7
- package/dist/sdk/{workflow-check-provider-XC7E5OFH.mjs → workflow-check-provider-5453TW65.mjs} +7 -7
- package/dist/sdk/{workflow-check-provider-3N7HDIN6.mjs → workflow-check-provider-HMABCGB5.mjs} +7 -7
- package/dist/slack/socket-runner.d.ts.map +1 -1
- package/dist/test-runner/core/flow-stage.d.ts +2 -1
- package/dist/test-runner/core/flow-stage.d.ts.map +1 -1
- package/dist/test-runner/index.d.ts.map +1 -1
- package/dist/test-runner/validator.d.ts.map +1 -1
- package/dist/traces/{run-2026-02-26T07-50-40-741Z.ndjson → run-2026-02-27T11-27-22-261Z.ndjson} +84 -84
- package/dist/{output/traces/run-2026-02-26T07-51-32-586Z.ndjson → traces/run-2026-02-27T11-28-08-546Z.ndjson} +1090 -1090
- package/dist/utils/worktree-manager.d.ts +11 -1
- package/dist/utils/worktree-manager.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/sdk/chunk-4SYQL5UQ.mjs.map +0 -1
- package/dist/sdk/chunk-74YJMONB.mjs.map +0 -1
- package/dist/sdk/chunk-E6SMU2Z4.mjs.map +0 -1
- /package/dist/sdk/{check-provider-registry-HK6M4PDQ.mjs.map → check-provider-registry-CDL5AJSI.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-TSAMMJ7Q.mjs.map → check-provider-registry-CTZA3EVE.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-WSFL2SVQ.mjs.map → check-provider-registry-SCPM6DIT.mjs.map} +0 -0
- /package/dist/sdk/{chunk-L3XPYQ6I.mjs.map → chunk-2NFKN6CY.mjs.map} +0 -0
- /package/dist/sdk/{chunk-I42ZCVA5.mjs.map → chunk-FBJ7MC7R.mjs.map} +0 -0
- /package/dist/sdk/{chunk-LVOWWALU.mjs.map → chunk-JKWLGLDR.mjs.map} +0 -0
- /package/dist/sdk/{chunk-LSCWRTSY.mjs.map → chunk-V2QW6ECX.mjs.map} +0 -0
- /package/dist/sdk/{config-AAB2FL22.mjs.map → config-G5UU4WXT.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-O464EJMD.mjs.map → failure-condition-evaluator-2B5WY7QN.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-SMOVMMES.mjs.map → failure-condition-evaluator-FHNZL2US.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-4L5YDHM4.mjs.map → github-frontend-47EU2HBY.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-MSX6Q2WL.mjs.map → github-frontend-V3WUHL6E.mjs.map} +0 -0
- /package/dist/sdk/{host-5BJ25CUZ.mjs.map → host-GVR4UGZ3.mjs.map} +0 -0
- /package/dist/sdk/{host-GYZ7XCLI.mjs.map → host-UQUQIYFG.mjs.map} +0 -0
- /package/dist/sdk/{routing-CQDKRPTO.mjs.map → routing-CZ36LVVS.mjs.map} +0 -0
- /package/dist/sdk/{routing-RIHVCEIU.mjs.map → routing-THIWDEYY.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-4O2VKNG2.mjs.map → schedule-tool-handler-GEH62OUM.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-4YUM6Z5F.mjs.map → schedule-tool-handler-KFYNV7HL.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-62K3NGH6.mjs.map → schedule-tool-handler-QUMAF2DJ.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-AWCFW5KG.mjs.map → trace-helpers-EHDZ42HH.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-QQSTZGDT.mjs.map → trace-helpers-W7TF5ZKF.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-3N7HDIN6.mjs.map → workflow-check-provider-3K7732MW.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-OM62QYHF.mjs.map → workflow-check-provider-5453TW65.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-XC7E5OFH.mjs.map → workflow-check-provider-HMABCGB5.mjs.map} +0 -0
package/dist/sdk/sdk.js
CHANGED
|
@@ -646,7 +646,7 @@ var require_package = __commonJS({
|
|
|
646
646
|
"package.json"(exports2, module2) {
|
|
647
647
|
module2.exports = {
|
|
648
648
|
name: "@probelabs/visor",
|
|
649
|
-
version: "0.1.
|
|
649
|
+
version: "0.1.147",
|
|
650
650
|
main: "dist/index.js",
|
|
651
651
|
bin: {
|
|
652
652
|
visor: "./dist/index.js"
|
|
@@ -760,7 +760,7 @@ var require_package = __commonJS({
|
|
|
760
760
|
"@opentelemetry/sdk-node": "^0.203.0",
|
|
761
761
|
"@opentelemetry/sdk-trace-base": "^1.30.1",
|
|
762
762
|
"@opentelemetry/semantic-conventions": "^1.30.1",
|
|
763
|
-
"@probelabs/probe": "^0.6.0-
|
|
763
|
+
"@probelabs/probe": "^0.6.0-rc262",
|
|
764
764
|
"@types/commander": "^2.12.0",
|
|
765
765
|
"@types/uuid": "^10.0.0",
|
|
766
766
|
acorn: "^8.16.0",
|
|
@@ -8501,12 +8501,15 @@ ${"=".repeat(60)}
|
|
|
8501
8501
|
if (!systemPrompt && schema !== "code-review") {
|
|
8502
8502
|
systemPrompt = "You are general assistant, follow user instructions.";
|
|
8503
8503
|
}
|
|
8504
|
+
log(
|
|
8505
|
+
`\u{1F527} AIReviewService config: allowEdit=${this.config.allowEdit}, allowBash=${this.config.allowBash}, promptType=${this.config.promptType}`
|
|
8506
|
+
);
|
|
8504
8507
|
const options = {
|
|
8505
8508
|
sessionId,
|
|
8506
8509
|
// Prefer config promptType, then env override, else fallback to code-review when schema is set
|
|
8507
8510
|
promptType: this.config.promptType && this.config.promptType.trim() ? this.config.promptType.trim() : explicitPromptType ? explicitPromptType : schema === "code-review" ? "code-review-template" : void 0,
|
|
8508
8511
|
allowEdit: false,
|
|
8509
|
-
//
|
|
8512
|
+
// Default: don't allow file modifications
|
|
8510
8513
|
debug: this.config.debug || false,
|
|
8511
8514
|
// Use systemPrompt (native in rc168+) with fallback to customPrompt for backward compat
|
|
8512
8515
|
systemPrompt: systemPrompt || this.config.systemPrompt || this.config.customPrompt
|
|
@@ -8595,6 +8598,9 @@ ${"=".repeat(60)}
|
|
|
8595
8598
|
if (this.config.model) {
|
|
8596
8599
|
options.model = this.config.model;
|
|
8597
8600
|
}
|
|
8601
|
+
log(
|
|
8602
|
+
`\u{1F527} ProbeAgent options: allowEdit=${options.allowEdit}, enableBash=${options.enableBash}, promptType=${options.promptType}`
|
|
8603
|
+
);
|
|
8598
8604
|
const agent = new import_probe2.ProbeAgent(options);
|
|
8599
8605
|
if (typeof agent.initialize === "function") {
|
|
8600
8606
|
await agent.initialize();
|
|
@@ -15543,14 +15549,9 @@ ${errors}`);
|
|
|
15543
15549
|
const { WorkflowRegistry: WorkflowRegistry2 } = await Promise.resolve().then(() => (init_workflow_registry(), workflow_registry_exports));
|
|
15544
15550
|
const registry = WorkflowRegistry2.getInstance();
|
|
15545
15551
|
for (const source of config.imports) {
|
|
15546
|
-
const results = await registry.import(source, { basePath, validate: true });
|
|
15552
|
+
const results = await registry.import(source, { basePath, validate: true, override: true });
|
|
15547
15553
|
for (const result of results) {
|
|
15548
15554
|
if (!result.valid && result.errors) {
|
|
15549
|
-
const isAlreadyExists = result.errors.every((e) => e.message.includes("already exists"));
|
|
15550
|
-
if (isAlreadyExists) {
|
|
15551
|
-
logger.debug(`Workflow from '${source}' already imported, skipping`);
|
|
15552
|
-
continue;
|
|
15553
|
-
}
|
|
15554
15555
|
const errors = result.errors.map((e) => ` ${e.path}: ${e.message}`).join("\n");
|
|
15555
15556
|
throw new Error(`Failed to import workflow from '${source}':
|
|
15556
15557
|
${errors}`);
|
|
@@ -45055,7 +45056,7 @@ var init_worktree_manager = __esm({
|
|
|
45055
45056
|
/**
|
|
45056
45057
|
* Get or create bare repository
|
|
45057
45058
|
*/
|
|
45058
|
-
async getOrCreateBareRepo(repository, repoUrl,
|
|
45059
|
+
async getOrCreateBareRepo(repository, repoUrl, _token, fetchDepth, cloneTimeoutMs) {
|
|
45059
45060
|
const reposDir = this.getReposDir();
|
|
45060
45061
|
const repoName = repository.replace(/\//g, "-");
|
|
45061
45062
|
const bareRepoPath = path20.join(reposDir, `${repoName}.git`);
|
|
@@ -45071,11 +45072,12 @@ var init_worktree_manager = __esm({
|
|
|
45071
45072
|
);
|
|
45072
45073
|
await fsp.rm(bareRepoPath, { recursive: true, force: true });
|
|
45073
45074
|
} else {
|
|
45075
|
+
await this.resetBareRepoRemoteUrl(bareRepoPath, repoUrl);
|
|
45074
45076
|
await this.updateBareRepo(bareRepoPath);
|
|
45075
45077
|
return bareRepoPath;
|
|
45076
45078
|
}
|
|
45077
45079
|
}
|
|
45078
|
-
const cloneUrl =
|
|
45080
|
+
const cloneUrl = repoUrl;
|
|
45079
45081
|
const redactedUrl = this.redactUrl(cloneUrl);
|
|
45080
45082
|
logger.info(
|
|
45081
45083
|
`Cloning bare repository: ${redactedUrl}${fetchDepth ? ` (depth: ${fetchDepth})` : ""}`
|
|
@@ -45156,6 +45158,33 @@ var init_worktree_manager = __esm({
|
|
|
45156
45158
|
return false;
|
|
45157
45159
|
}
|
|
45158
45160
|
}
|
|
45161
|
+
/**
|
|
45162
|
+
* Ensure the origin remote URL of a bare repo is a plain URL (no embedded token).
|
|
45163
|
+
*
|
|
45164
|
+
* Older bare repos may have been cloned with a token in the URL
|
|
45165
|
+
* (https://x-access-token:TOKEN@github.com/...). This causes stale-token
|
|
45166
|
+
* failures because GIT_CONFIG insteadOf rules can't rewrite URLs that
|
|
45167
|
+
* already have credentials. Resetting to the plain URL lets insteadOf
|
|
45168
|
+
* handle auth with the freshest token.
|
|
45169
|
+
*/
|
|
45170
|
+
async resetBareRepoRemoteUrl(bareRepoPath, plainRepoUrl) {
|
|
45171
|
+
try {
|
|
45172
|
+
const cmd = `git -C ${this.escapeShellArg(bareRepoPath)} remote set-url origin ${this.escapeShellArg(plainRepoUrl)}`;
|
|
45173
|
+
const result = await this.executeGitCommand(cmd, { timeout: 1e4 });
|
|
45174
|
+
if (result.exitCode !== 0) {
|
|
45175
|
+
logger.warn(
|
|
45176
|
+
`Failed to reset bare repo remote URL: ${result.stderr}. Git operations may fail with stale token if the URL has embedded credentials.`
|
|
45177
|
+
);
|
|
45178
|
+
} else {
|
|
45179
|
+
logger.debug(`Reset bare repo remote URL to plain URL for ${bareRepoPath}`);
|
|
45180
|
+
}
|
|
45181
|
+
} catch (error) {
|
|
45182
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
45183
|
+
logger.warn(
|
|
45184
|
+
`Error resetting bare repo remote URL: ${msg}. Git operations may fail with stale token if the URL has embedded credentials.`
|
|
45185
|
+
);
|
|
45186
|
+
}
|
|
45187
|
+
}
|
|
45159
45188
|
/**
|
|
45160
45189
|
* Create a new worktree for the given repository/ref.
|
|
45161
45190
|
*
|
|
@@ -51210,10 +51239,12 @@ var init_bubblewrap_sandbox = __esm({
|
|
|
51210
51239
|
name;
|
|
51211
51240
|
config;
|
|
51212
51241
|
repoPath;
|
|
51213
|
-
|
|
51242
|
+
visorDistPath;
|
|
51243
|
+
constructor(name, config, repoPath, visorDistPath) {
|
|
51214
51244
|
this.name = name;
|
|
51215
51245
|
this.config = config;
|
|
51216
51246
|
this.repoPath = (0, import_path10.resolve)(repoPath);
|
|
51247
|
+
this.visorDistPath = (0, import_path10.resolve)(visorDistPath);
|
|
51217
51248
|
}
|
|
51218
51249
|
/**
|
|
51219
51250
|
* Check if bwrap binary is available on the system.
|
|
@@ -51294,6 +51325,8 @@ var init_bubblewrap_sandbox = __esm({
|
|
|
51294
51325
|
} else {
|
|
51295
51326
|
args.push("--bind", this.repoPath, workdir);
|
|
51296
51327
|
}
|
|
51328
|
+
const visorPath = this.config.visor_path || "/opt/visor";
|
|
51329
|
+
args.push("--ro-bind", this.visorDistPath, visorPath);
|
|
51297
51330
|
args.push("--chdir", workdir);
|
|
51298
51331
|
args.push("--unshare-pid");
|
|
51299
51332
|
args.push("--new-session");
|
|
@@ -51335,10 +51368,12 @@ var init_seatbelt_sandbox = __esm({
|
|
|
51335
51368
|
name;
|
|
51336
51369
|
config;
|
|
51337
51370
|
repoPath;
|
|
51338
|
-
|
|
51371
|
+
visorDistPath;
|
|
51372
|
+
constructor(name, config, repoPath, visorDistPath) {
|
|
51339
51373
|
this.name = name;
|
|
51340
51374
|
this.config = config;
|
|
51341
51375
|
this.repoPath = (0, import_fs7.realpathSync)((0, import_path11.resolve)(repoPath));
|
|
51376
|
+
this.visorDistPath = (0, import_fs7.realpathSync)((0, import_path11.resolve)(visorDistPath));
|
|
51342
51377
|
}
|
|
51343
51378
|
/**
|
|
51344
51379
|
* Check if sandbox-exec binary is available on the system.
|
|
@@ -51439,6 +51474,8 @@ var init_seatbelt_sandbox = __esm({
|
|
|
51439
51474
|
if (!this.config.read_only) {
|
|
51440
51475
|
lines.push(`(allow file-write* (subpath "${repoPath}"))`);
|
|
51441
51476
|
}
|
|
51477
|
+
const visorDistPath = this.escapePath(this.visorDistPath);
|
|
51478
|
+
lines.push(`(allow file-read* (subpath "${visorDistPath}"))`);
|
|
51442
51479
|
if (this.config.network !== false) {
|
|
51443
51480
|
lines.push("(allow network*)");
|
|
51444
51481
|
}
|
|
@@ -51511,13 +51548,13 @@ var init_sandbox_manager = __esm({
|
|
|
51511
51548
|
const mode = config.compose ? "compose" : "image";
|
|
51512
51549
|
if (config.engine === "bubblewrap") {
|
|
51513
51550
|
const { BubblewrapSandbox: BubblewrapSandbox2 } = (init_bubblewrap_sandbox(), __toCommonJS(bubblewrap_sandbox_exports));
|
|
51514
|
-
const instance = new BubblewrapSandbox2(name, config, this.repoPath);
|
|
51551
|
+
const instance = new BubblewrapSandbox2(name, config, this.repoPath, this.visorDistPath);
|
|
51515
51552
|
this.instances.set(name, instance);
|
|
51516
51553
|
return instance;
|
|
51517
51554
|
}
|
|
51518
51555
|
if (config.engine === "seatbelt") {
|
|
51519
51556
|
const { SeatbeltSandbox: SeatbeltSandbox2 } = (init_seatbelt_sandbox(), __toCommonJS(seatbelt_sandbox_exports));
|
|
51520
|
-
const instance = new SeatbeltSandbox2(name, config, this.repoPath);
|
|
51557
|
+
const instance = new SeatbeltSandbox2(name, config, this.repoPath, this.visorDistPath);
|
|
51521
51558
|
this.instances.set(name, instance);
|
|
51522
51559
|
return instance;
|
|
51523
51560
|
}
|