@probelabs/visor 0.1.137-ee → 0.1.138-ee
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/cli-main.d.ts.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/docs/action-reference.md +14 -0
- package/dist/docs/ci-cli-mode.md +51 -2
- package/dist/docs/commands.md +8 -0
- package/dist/docs/github-auth.md +326 -0
- package/dist/docs/github-ops.md +6 -2
- package/dist/docs/index.md +1 -0
- package/dist/docs/security.md +11 -1
- package/dist/github-auth.d.ts +61 -0
- package/dist/github-auth.d.ts.map +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +594 -277
- package/dist/sdk/{check-provider-registry-SCL4KP55.mjs → check-provider-registry-B5X3AL4Z.mjs} +6 -6
- package/dist/sdk/{check-provider-registry-ULZRI3TC.mjs → check-provider-registry-XRD3J74K.mjs} +6 -6
- package/dist/sdk/{chunk-F4K5WFSM.mjs → chunk-3CREE2RR.mjs} +14 -14
- package/dist/sdk/{chunk-E2N3U5HU.mjs → chunk-G3W5KQL7.mjs} +3 -3
- package/dist/sdk/{chunk-BRD36I43.mjs → chunk-GIPTKOXT.mjs} +2 -2
- package/dist/sdk/{chunk-QUEWQWDX.mjs → chunk-RR2KJCQS.mjs} +2 -2
- package/dist/sdk/{chunk-QUEWQWDX.mjs.map → chunk-RR2KJCQS.mjs.map} +1 -1
- package/dist/sdk/{chunk-HQIVGUSV.mjs → chunk-SUZCXRJ4.mjs} +14 -14
- package/dist/sdk/{failure-condition-evaluator-B5JJFYKU.mjs → failure-condition-evaluator-D5XXOVV2.mjs} +3 -3
- package/dist/sdk/{github-frontend-VAWVSCNX.mjs → github-frontend-LGS6PO5Y.mjs} +3 -3
- package/dist/sdk/{host-67XTJ3BN.mjs → host-RF2UEKMG.mjs} +2 -2
- package/dist/sdk/{host-TEQ7HKKH.mjs → host-YDQC5HZQ.mjs} +2 -2
- package/dist/sdk/{routing-SEQYM4N6.mjs → routing-6YONAZI2.mjs} +4 -4
- package/dist/sdk/{schedule-tool-handler-D7XX7WM4.mjs → schedule-tool-handler-47KJUUJH.mjs} +5 -5
- package/dist/sdk/{schedule-tool-handler-5BDMLHS5.mjs → schedule-tool-handler-WHB5AGLT.mjs} +5 -5
- package/dist/sdk/sdk.js +1 -1
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +4 -4
- package/dist/sdk/{trace-helpers-FAAGLXBI.mjs → trace-helpers-LSOZHDYF.mjs} +2 -2
- package/dist/sdk/{workflow-check-provider-K4MQQOYQ.mjs → workflow-check-provider-D375GDQS.mjs} +5 -5
- package/dist/sdk/{workflow-check-provider-WLA7LO56.mjs → workflow-check-provider-MIFPOENL.mjs} +5 -5
- package/dist/types/cli.d.ts +8 -0
- package/dist/types/cli.d.ts.map +1 -1
- package/package.json +2 -2
- /package/dist/sdk/{check-provider-registry-SCL4KP55.mjs.map → check-provider-registry-B5X3AL4Z.mjs.map} +0 -0
- /package/dist/sdk/{check-provider-registry-ULZRI3TC.mjs.map → check-provider-registry-XRD3J74K.mjs.map} +0 -0
- /package/dist/sdk/{chunk-F4K5WFSM.mjs.map → chunk-3CREE2RR.mjs.map} +0 -0
- /package/dist/sdk/{chunk-E2N3U5HU.mjs.map → chunk-G3W5KQL7.mjs.map} +0 -0
- /package/dist/sdk/{chunk-BRD36I43.mjs.map → chunk-GIPTKOXT.mjs.map} +0 -0
- /package/dist/sdk/{chunk-HQIVGUSV.mjs.map → chunk-SUZCXRJ4.mjs.map} +0 -0
- /package/dist/sdk/{failure-condition-evaluator-B5JJFYKU.mjs.map → failure-condition-evaluator-D5XXOVV2.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-VAWVSCNX.mjs.map → github-frontend-LGS6PO5Y.mjs.map} +0 -0
- /package/dist/sdk/{host-67XTJ3BN.mjs.map → host-RF2UEKMG.mjs.map} +0 -0
- /package/dist/sdk/{host-TEQ7HKKH.mjs.map → host-YDQC5HZQ.mjs.map} +0 -0
- /package/dist/sdk/{routing-SEQYM4N6.mjs.map → routing-6YONAZI2.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-5BDMLHS5.mjs.map → schedule-tool-handler-47KJUUJH.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-D7XX7WM4.mjs.map → schedule-tool-handler-WHB5AGLT.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-FAAGLXBI.mjs.map → trace-helpers-LSOZHDYF.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-K4MQQOYQ.mjs.map → workflow-check-provider-D375GDQS.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-WLA7LO56.mjs.map → workflow-check-provider-MIFPOENL.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
process.env.VISOR_VERSION = '0.1.
|
|
3
|
-
process.env.PROBE_VERSION = '0.6.0-
|
|
4
|
-
process.env.VISOR_COMMIT_SHA = '
|
|
5
|
-
process.env.VISOR_COMMIT_SHORT = '
|
|
2
|
+
process.env.VISOR_VERSION = '0.1.138';
|
|
3
|
+
process.env.PROBE_VERSION = '0.6.0-rc257';
|
|
4
|
+
process.env.VISOR_COMMIT_SHA = '0fe252c4d2e04567b4f5d72d73796d0abc3a88f7';
|
|
5
|
+
process.env.VISOR_COMMIT_SHORT = '0fe252c';
|
|
6
6
|
/******/ (() => { // webpackBootstrap
|
|
7
7
|
/******/ var __webpack_modules__ = ({
|
|
8
8
|
|
|
@@ -160950,6 +160950,7 @@ const fallback_ndjson_1 = __nccwpck_require__(35938);
|
|
|
160950
160950
|
const trace_helpers_1 = __nccwpck_require__(75338);
|
|
160951
160951
|
const ws_server_1 = __nccwpck_require__(82620);
|
|
160952
160952
|
const open_1 = __importDefault(__nccwpck_require__(19106));
|
|
160953
|
+
const github_auth_1 = __nccwpck_require__(11347);
|
|
160953
160954
|
/**
|
|
160954
160955
|
* Execute a single check in sandbox mode (--run-check).
|
|
160955
160956
|
* Reads CheckRunPayload from argument or stdin, executes one check,
|
|
@@ -161872,6 +161873,36 @@ async function main() {
|
|
|
161872
161873
|
: null;
|
|
161873
161874
|
// Build execution context for providers
|
|
161874
161875
|
const executionContext = {};
|
|
161876
|
+
// Set up GitHub authentication (optional in CLI mode)
|
|
161877
|
+
// Resolves from CLI flags first, then environment variables
|
|
161878
|
+
{
|
|
161879
|
+
const authOpts = {
|
|
161880
|
+
token: options.githubToken,
|
|
161881
|
+
appId: options.githubAppId,
|
|
161882
|
+
privateKey: options.githubPrivateKey,
|
|
161883
|
+
installationId: options.githubInstallationId,
|
|
161884
|
+
};
|
|
161885
|
+
// Fall back to environment variables if no explicit CLI flags
|
|
161886
|
+
if (!authOpts.token && !authOpts.appId) {
|
|
161887
|
+
Object.assign(authOpts, (0, github_auth_1.resolveAuthFromEnvironment)());
|
|
161888
|
+
}
|
|
161889
|
+
if (authOpts.token || authOpts.appId) {
|
|
161890
|
+
try {
|
|
161891
|
+
const authResult = await (0, github_auth_1.createAuthenticatedOctokit)(authOpts);
|
|
161892
|
+
if (authResult) {
|
|
161893
|
+
// Inject token + git credentials into process.env for child processes
|
|
161894
|
+
(0, github_auth_1.injectGitHubCredentials)(authResult.token);
|
|
161895
|
+
// Set Octokit on execution context for in-process API calls
|
|
161896
|
+
executionContext.octokit = authResult.octokit;
|
|
161897
|
+
logger_1.logger.info(`🔑 GitHub auth: ${authResult.authType}`);
|
|
161898
|
+
}
|
|
161899
|
+
}
|
|
161900
|
+
catch (err) {
|
|
161901
|
+
logger_1.logger.warn(`⚠️ GitHub auth failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
161902
|
+
logger_1.logger.warn('Continuing without GitHub API access');
|
|
161903
|
+
}
|
|
161904
|
+
}
|
|
161905
|
+
}
|
|
161875
161906
|
// Set CLI message for human-input checks if provided
|
|
161876
161907
|
if (options.message !== undefined) {
|
|
161877
161908
|
executionContext.cliMessage = options.message;
|
|
@@ -163095,6 +163126,10 @@ class CLI {
|
|
|
163095
163126
|
.option('--workspace-name <name>', 'Workspace directory name (overrides VISOR_WORKSPACE_NAME)')
|
|
163096
163127
|
.option('--workspace-project-name <name>', 'Main project folder name inside workspace (overrides VISOR_WORKSPACE_PROJECT)')
|
|
163097
163128
|
.option('--watch', 'Watch config file for changes and reload automatically (requires --config)')
|
|
163129
|
+
.option('--github-token <token>', 'GitHub token for API operations (env: GITHUB_TOKEN)')
|
|
163130
|
+
.option('--github-app-id <id>', 'GitHub App ID (env: GITHUB_APP_ID)')
|
|
163131
|
+
.option('--github-private-key <key>', 'GitHub App private key, PEM content or file path (env: GITHUB_APP_PRIVATE_KEY)')
|
|
163132
|
+
.option('--github-installation-id <id>', 'GitHub App installation ID, auto-detected if omitted')
|
|
163098
163133
|
.addHelpText('after', this.getExamplesText())
|
|
163099
163134
|
.exitOverride(); // Prevent automatic process.exit for better error handling
|
|
163100
163135
|
// Add validation for options
|
|
@@ -163151,6 +163186,10 @@ class CLI {
|
|
|
163151
163186
|
.option('--workspace-name <name>', 'Workspace directory name (overrides VISOR_WORKSPACE_NAME)')
|
|
163152
163187
|
.option('--workspace-project-name <name>', 'Main project folder name inside workspace (overrides VISOR_WORKSPACE_PROJECT)')
|
|
163153
163188
|
.option('--watch', 'Watch config file for changes and reload automatically (requires --config)')
|
|
163189
|
+
.option('--github-token <token>', 'GitHub token for API operations (env: GITHUB_TOKEN)')
|
|
163190
|
+
.option('--github-app-id <id>', 'GitHub App ID (env: GITHUB_APP_ID)')
|
|
163191
|
+
.option('--github-private-key <key>', 'GitHub App private key, PEM content or file path (env: GITHUB_APP_PRIVATE_KEY)')
|
|
163192
|
+
.option('--github-installation-id <id>', 'GitHub App installation ID, auto-detected if omitted')
|
|
163154
163193
|
.allowUnknownOption(false)
|
|
163155
163194
|
.allowExcessArguments(false) // Don't allow positional arguments
|
|
163156
163195
|
.addHelpText('after', this.getExamplesText())
|
|
@@ -163220,6 +163259,10 @@ class CLI {
|
|
|
163220
163259
|
workspaceName: options.workspaceName,
|
|
163221
163260
|
workspaceProjectName: options.workspaceProjectName,
|
|
163222
163261
|
watch: Boolean(options.watch),
|
|
163262
|
+
githubToken: options.githubToken,
|
|
163263
|
+
githubAppId: options.githubAppId,
|
|
163264
|
+
githubPrivateKey: options.githubPrivateKey,
|
|
163265
|
+
githubInstallationId: options.githubInstallationId,
|
|
163223
163266
|
};
|
|
163224
163267
|
}
|
|
163225
163268
|
catch (error) {
|
|
@@ -174111,6 +174154,182 @@ class GitRepositoryAnalyzer {
|
|
|
174111
174154
|
exports.GitRepositoryAnalyzer = GitRepositoryAnalyzer;
|
|
174112
174155
|
|
|
174113
174156
|
|
|
174157
|
+
/***/ }),
|
|
174158
|
+
|
|
174159
|
+
/***/ 11347:
|
|
174160
|
+
/***/ (function(__unused_webpack_module, exports, __nccwpck_require__) {
|
|
174161
|
+
|
|
174162
|
+
"use strict";
|
|
174163
|
+
|
|
174164
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
174165
|
+
if (k2 === undefined) k2 = k;
|
|
174166
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
174167
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
174168
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
174169
|
+
}
|
|
174170
|
+
Object.defineProperty(o, k2, desc);
|
|
174171
|
+
}) : (function(o, m, k, k2) {
|
|
174172
|
+
if (k2 === undefined) k2 = k;
|
|
174173
|
+
o[k2] = m[k];
|
|
174174
|
+
}));
|
|
174175
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
174176
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
174177
|
+
}) : function(o, v) {
|
|
174178
|
+
o["default"] = v;
|
|
174179
|
+
});
|
|
174180
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
174181
|
+
var ownKeys = function(o) {
|
|
174182
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
174183
|
+
var ar = [];
|
|
174184
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
174185
|
+
return ar;
|
|
174186
|
+
};
|
|
174187
|
+
return ownKeys(o);
|
|
174188
|
+
};
|
|
174189
|
+
return function (mod) {
|
|
174190
|
+
if (mod && mod.__esModule) return mod;
|
|
174191
|
+
var result = {};
|
|
174192
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
174193
|
+
__setModuleDefault(result, mod);
|
|
174194
|
+
return result;
|
|
174195
|
+
};
|
|
174196
|
+
})();
|
|
174197
|
+
Object.defineProperty(exports, "__esModule", ({ value: true }));
|
|
174198
|
+
exports.createAuthenticatedOctokit = createAuthenticatedOctokit;
|
|
174199
|
+
exports.resolveAuthFromEnvironment = resolveAuthFromEnvironment;
|
|
174200
|
+
exports.resolvePrivateKey = resolvePrivateKey;
|
|
174201
|
+
exports.injectGitHubCredentials = injectGitHubCredentials;
|
|
174202
|
+
const rest_1 = __nccwpck_require__(47432);
|
|
174203
|
+
const fs = __importStar(__nccwpck_require__(79896));
|
|
174204
|
+
const path = __importStar(__nccwpck_require__(16928));
|
|
174205
|
+
/**
|
|
174206
|
+
* Create an authenticated Octokit instance.
|
|
174207
|
+
* Returns undefined if no credentials are provided (auth is optional in CLI mode).
|
|
174208
|
+
*
|
|
174209
|
+
* For token auth: uses the token directly.
|
|
174210
|
+
* For GitHub App auth: creates JWT-authenticated client, resolves installation ID,
|
|
174211
|
+
* then extracts an installation access token for environment propagation.
|
|
174212
|
+
*/
|
|
174213
|
+
async function createAuthenticatedOctokit(options) {
|
|
174214
|
+
const { token, appId, installationId, owner, repo } = options;
|
|
174215
|
+
const privateKey = options.privateKey ? resolvePrivateKey(options.privateKey) : undefined;
|
|
174216
|
+
// Prefer GitHub App authentication if app credentials are provided
|
|
174217
|
+
if (appId && privateKey) {
|
|
174218
|
+
const { createAppAuth } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(76479)));
|
|
174219
|
+
let finalInstallationId;
|
|
174220
|
+
if (installationId) {
|
|
174221
|
+
finalInstallationId = parseInt(installationId, 10);
|
|
174222
|
+
if (isNaN(finalInstallationId) || finalInstallationId <= 0) {
|
|
174223
|
+
throw new Error('Invalid installation-id. It must be a positive integer.');
|
|
174224
|
+
}
|
|
174225
|
+
}
|
|
174226
|
+
// Auto-detect installation ID if not provided
|
|
174227
|
+
if (!finalInstallationId && owner && repo) {
|
|
174228
|
+
const appOctokit = new rest_1.Octokit({
|
|
174229
|
+
authStrategy: createAppAuth,
|
|
174230
|
+
auth: { appId, privateKey },
|
|
174231
|
+
});
|
|
174232
|
+
try {
|
|
174233
|
+
const { data: installation } = await appOctokit.rest.apps.getRepoInstallation({
|
|
174234
|
+
owner,
|
|
174235
|
+
repo,
|
|
174236
|
+
});
|
|
174237
|
+
finalInstallationId = installation.id;
|
|
174238
|
+
}
|
|
174239
|
+
catch {
|
|
174240
|
+
throw new Error('GitHub App installation ID could not be auto-detected. ' +
|
|
174241
|
+
'Provide --github-installation-id or ensure the app is installed on the repository.');
|
|
174242
|
+
}
|
|
174243
|
+
}
|
|
174244
|
+
if (!finalInstallationId) {
|
|
174245
|
+
throw new Error('GitHub App installation ID is required. Provide --github-installation-id or set owner/repo for auto-detection.');
|
|
174246
|
+
}
|
|
174247
|
+
// Create the authenticated Octokit instance
|
|
174248
|
+
const octokit = new rest_1.Octokit({
|
|
174249
|
+
authStrategy: createAppAuth,
|
|
174250
|
+
auth: {
|
|
174251
|
+
appId,
|
|
174252
|
+
privateKey,
|
|
174253
|
+
installationId: finalInstallationId,
|
|
174254
|
+
},
|
|
174255
|
+
});
|
|
174256
|
+
// Extract the installation access token for environment propagation
|
|
174257
|
+
const authResult = (await octokit.auth({ type: 'installation' }));
|
|
174258
|
+
return {
|
|
174259
|
+
octokit,
|
|
174260
|
+
authType: 'github-app',
|
|
174261
|
+
token: authResult.token,
|
|
174262
|
+
};
|
|
174263
|
+
}
|
|
174264
|
+
// Fall back to token authentication
|
|
174265
|
+
if (token) {
|
|
174266
|
+
return {
|
|
174267
|
+
octokit: new rest_1.Octokit({ auth: token }),
|
|
174268
|
+
authType: 'token',
|
|
174269
|
+
token,
|
|
174270
|
+
};
|
|
174271
|
+
}
|
|
174272
|
+
// No credentials provided
|
|
174273
|
+
return undefined;
|
|
174274
|
+
}
|
|
174275
|
+
/**
|
|
174276
|
+
* Resolve GitHub auth options from environment variables.
|
|
174277
|
+
* Used as fallback when no explicit CLI arguments are provided.
|
|
174278
|
+
*/
|
|
174279
|
+
function resolveAuthFromEnvironment() {
|
|
174280
|
+
return {
|
|
174281
|
+
token: process.env.GITHUB_TOKEN || process.env.GH_TOKEN,
|
|
174282
|
+
appId: process.env.GITHUB_APP_ID,
|
|
174283
|
+
privateKey: process.env.GITHUB_APP_PRIVATE_KEY,
|
|
174284
|
+
installationId: process.env.GITHUB_APP_INSTALLATION_ID,
|
|
174285
|
+
owner: process.env.GITHUB_REPOSITORY_OWNER || process.env.GITHUB_REPOSITORY?.split('/')[0],
|
|
174286
|
+
repo: process.env.GITHUB_REPOSITORY?.split('/')[1],
|
|
174287
|
+
};
|
|
174288
|
+
}
|
|
174289
|
+
/**
|
|
174290
|
+
* Resolve private key — supports both inline PEM content and file paths.
|
|
174291
|
+
*/
|
|
174292
|
+
function resolvePrivateKey(keyOrPath) {
|
|
174293
|
+
if (keyOrPath.includes('-----BEGIN')) {
|
|
174294
|
+
return keyOrPath;
|
|
174295
|
+
}
|
|
174296
|
+
const resolved = path.resolve(keyOrPath);
|
|
174297
|
+
if (fs.existsSync(resolved)) {
|
|
174298
|
+
return fs.readFileSync(resolved, 'utf8');
|
|
174299
|
+
}
|
|
174300
|
+
// Return as-is and let the auth library handle errors
|
|
174301
|
+
return keyOrPath;
|
|
174302
|
+
}
|
|
174303
|
+
/**
|
|
174304
|
+
* Inject GitHub credentials into process.env for child processes.
|
|
174305
|
+
*
|
|
174306
|
+
* Sets GITHUB_TOKEN/GH_TOKEN for gh CLI, and configures git HTTPS auth
|
|
174307
|
+
* via GIT_CONFIG_COUNT/KEY/VALUE env vars so `git clone`, `git push`, etc.
|
|
174308
|
+
* work automatically against github.com without any local git config.
|
|
174309
|
+
*
|
|
174310
|
+
* Uses git's GIT_CONFIG_COUNT mechanism (git 2.31+, March 2021):
|
|
174311
|
+
* - No temp files or global config mutation
|
|
174312
|
+
* - Inherited by all child processes automatically
|
|
174313
|
+
* - Works regardless of local git configuration
|
|
174314
|
+
*/
|
|
174315
|
+
function injectGitHubCredentials(token) {
|
|
174316
|
+
// Set for gh CLI and general GitHub API usage
|
|
174317
|
+
process.env.GITHUB_TOKEN = token;
|
|
174318
|
+
process.env.GH_TOKEN = token;
|
|
174319
|
+
// Configure git HTTPS auth via url.<base>.insteadOf
|
|
174320
|
+
// This rewrites all github.com URLs to include the access token
|
|
174321
|
+
const existingCount = parseInt(process.env.GIT_CONFIG_COUNT || '0', 10);
|
|
174322
|
+
const authUrl = `https://x-access-token:${token}@github.com/`;
|
|
174323
|
+
// Rewrite HTTPS URLs
|
|
174324
|
+
process.env[`GIT_CONFIG_KEY_${existingCount}`] = `url.${authUrl}.insteadOf`;
|
|
174325
|
+
process.env[`GIT_CONFIG_VALUE_${existingCount}`] = 'https://github.com/';
|
|
174326
|
+
// Rewrite SSH-style URLs (git@github.com:org/repo)
|
|
174327
|
+
process.env[`GIT_CONFIG_KEY_${existingCount + 1}`] = `url.${authUrl}.insteadOf`;
|
|
174328
|
+
process.env[`GIT_CONFIG_VALUE_${existingCount + 1}`] = 'git@github.com:';
|
|
174329
|
+
process.env.GIT_CONFIG_COUNT = String(existingCount + 2);
|
|
174330
|
+
}
|
|
174331
|
+
|
|
174332
|
+
|
|
174114
174333
|
/***/ }),
|
|
174115
174334
|
|
|
174116
174335
|
/***/ 21367:
|
|
@@ -175048,8 +175267,6 @@ exports.run = run;
|
|
|
175048
175267
|
// Load environment variables from .env file (override existing to allow .env to take precedence)
|
|
175049
175268
|
const dotenv = __importStar(__nccwpck_require__(18889));
|
|
175050
175269
|
dotenv.config({ override: true, quiet: true });
|
|
175051
|
-
const rest_1 = __nccwpck_require__(47432);
|
|
175052
|
-
const auth_app_1 = __nccwpck_require__(76479);
|
|
175053
175270
|
const core_1 = __nccwpck_require__(37484);
|
|
175054
175271
|
const commands_1 = __nccwpck_require__(99153);
|
|
175055
175272
|
const pr_analyzer_1 = __nccwpck_require__(80100);
|
|
@@ -175060,79 +175277,39 @@ const config_1 = __nccwpck_require__(22973);
|
|
|
175060
175277
|
const github_reactions_1 = __nccwpck_require__(67997);
|
|
175061
175278
|
const footer_1 = __nccwpck_require__(6924);
|
|
175062
175279
|
const json_text_extractor_1 = __nccwpck_require__(49022);
|
|
175280
|
+
const github_auth_1 = __nccwpck_require__(11347);
|
|
175063
175281
|
/**
|
|
175064
|
-
* Create an authenticated Octokit instance using either GitHub App
|
|
175282
|
+
* Create an authenticated Octokit instance using either GitHub App or token authentication.
|
|
175283
|
+
* Delegates to the shared github-auth module and injects credentials into process.env
|
|
175284
|
+
* so child processes (git, gh CLI, Claude Code agents) can authenticate automatically.
|
|
175065
175285
|
*/
|
|
175066
175286
|
async function createAuthenticatedOctokit() {
|
|
175067
|
-
const
|
|
175068
|
-
|
|
175069
|
-
|
|
175070
|
-
|
|
175071
|
-
|
|
175072
|
-
|
|
175073
|
-
|
|
175074
|
-
|
|
175075
|
-
|
|
175076
|
-
|
|
175077
|
-
|
|
175078
|
-
|
|
175079
|
-
if (installationId) {
|
|
175080
|
-
finalInstallationId = parseInt(installationId, 10);
|
|
175081
|
-
if (isNaN(finalInstallationId) || finalInstallationId <= 0) {
|
|
175082
|
-
throw new Error('Invalid installation-id provided. It must be a positive integer.');
|
|
175083
|
-
}
|
|
175084
|
-
}
|
|
175085
|
-
if (!finalInstallationId) {
|
|
175086
|
-
const owner = (0, core_1.getInput)('owner') || process.env.GITHUB_REPOSITORY_OWNER;
|
|
175087
|
-
const repo = (0, core_1.getInput)('repo') || process.env.GITHUB_REPOSITORY?.split('/')[1];
|
|
175088
|
-
if (owner && repo) {
|
|
175089
|
-
// Create a temporary JWT-authenticated client to find the installation
|
|
175090
|
-
const appOctokit = new rest_1.Octokit({
|
|
175091
|
-
authStrategy: auth_app_1.createAppAuth,
|
|
175092
|
-
auth: {
|
|
175093
|
-
appId,
|
|
175094
|
-
privateKey,
|
|
175095
|
-
},
|
|
175096
|
-
});
|
|
175097
|
-
try {
|
|
175098
|
-
const { data: installation } = await appOctokit.rest.apps.getRepoInstallation({
|
|
175099
|
-
owner,
|
|
175100
|
-
repo,
|
|
175101
|
-
});
|
|
175102
|
-
finalInstallationId = installation.id;
|
|
175103
|
-
console.log(`✅ Auto-detected installation ID: ${finalInstallationId}`);
|
|
175104
|
-
}
|
|
175105
|
-
catch {
|
|
175106
|
-
console.warn('⚠️ Could not auto-detect installation ID. Please check app permissions && installation status.');
|
|
175107
|
-
throw new Error('GitHub App installation ID is required but could not be auto-detected. Please ensure the app is installed on this repository || provide the `installation-id` manually.');
|
|
175108
|
-
}
|
|
175109
|
-
}
|
|
175110
|
-
}
|
|
175111
|
-
// Create the authenticated Octokit instance
|
|
175112
|
-
const octokit = new rest_1.Octokit({
|
|
175113
|
-
authStrategy: auth_app_1.createAppAuth,
|
|
175114
|
-
auth: {
|
|
175115
|
-
appId,
|
|
175116
|
-
privateKey,
|
|
175117
|
-
installationId: finalInstallationId,
|
|
175118
|
-
},
|
|
175119
|
-
});
|
|
175120
|
-
return { octokit, authType: 'github-app' };
|
|
175121
|
-
}
|
|
175122
|
-
catch (error) {
|
|
175123
|
-
console.error('❌ GitHub App authentication failed. Please check your App ID, Private Key, && installation permissions.');
|
|
175124
|
-
throw new Error(`GitHub App authentication failed`, { cause: error });
|
|
175287
|
+
const options = {
|
|
175288
|
+
token: (0, core_1.getInput)('github-token'),
|
|
175289
|
+
appId: (0, core_1.getInput)('app-id'),
|
|
175290
|
+
privateKey: (0, core_1.getInput)('private-key'),
|
|
175291
|
+
installationId: (0, core_1.getInput)('installation-id'),
|
|
175292
|
+
owner: (0, core_1.getInput)('owner') || process.env.GITHUB_REPOSITORY_OWNER,
|
|
175293
|
+
repo: (0, core_1.getInput)('repo') || process.env.GITHUB_REPOSITORY?.split('/')[1],
|
|
175294
|
+
};
|
|
175295
|
+
try {
|
|
175296
|
+
const result = await (0, github_auth_1.createAuthenticatedOctokit)(options);
|
|
175297
|
+
if (!result) {
|
|
175298
|
+
throw new Error('Either github-token or app-id/private-key must be provided for authentication');
|
|
175125
175299
|
}
|
|
175300
|
+
console.log(result.authType === 'github-app'
|
|
175301
|
+
? '🔐 Using GitHub App authentication'
|
|
175302
|
+
: '🔑 Using GitHub token authentication');
|
|
175303
|
+
// Inject credentials for child processes (git, gh, Claude Code agents)
|
|
175304
|
+
(0, github_auth_1.injectGitHubCredentials)(result.token);
|
|
175305
|
+
return result;
|
|
175126
175306
|
}
|
|
175127
|
-
|
|
175128
|
-
|
|
175129
|
-
|
|
175130
|
-
|
|
175131
|
-
|
|
175132
|
-
authType: 'token',
|
|
175133
|
-
};
|
|
175307
|
+
catch (error) {
|
|
175308
|
+
if (options.appId && options.privateKey) {
|
|
175309
|
+
console.error('❌ GitHub App authentication failed. Please check your App ID, Private Key, and installation permissions.');
|
|
175310
|
+
}
|
|
175311
|
+
throw error;
|
|
175134
175312
|
}
|
|
175135
|
-
throw new Error('Either github-token || app-id/private-key must be provided for authentication');
|
|
175136
175313
|
}
|
|
175137
175314
|
async function run() {
|
|
175138
175315
|
try {
|
|
@@ -249683,6 +249860,7 @@ var require_ChecksumStream = __commonJS({
|
|
|
249683
249860
|
checksum;
|
|
249684
249861
|
source;
|
|
249685
249862
|
base64Encoder;
|
|
249863
|
+
pendingCallback = null;
|
|
249686
249864
|
constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder }) {
|
|
249687
249865
|
super();
|
|
249688
249866
|
if (typeof source.pipe === "function") {
|
|
@@ -249697,11 +249875,20 @@ var require_ChecksumStream = __commonJS({
|
|
|
249697
249875
|
this.source.pipe(this);
|
|
249698
249876
|
}
|
|
249699
249877
|
_read(size) {
|
|
249878
|
+
if (this.pendingCallback) {
|
|
249879
|
+
const callback = this.pendingCallback;
|
|
249880
|
+
this.pendingCallback = null;
|
|
249881
|
+
callback();
|
|
249882
|
+
}
|
|
249700
249883
|
}
|
|
249701
249884
|
_write(chunk, encoding, callback) {
|
|
249702
249885
|
try {
|
|
249703
249886
|
this.checksum.update(chunk);
|
|
249704
|
-
this.push(chunk);
|
|
249887
|
+
const canPushMore = this.push(chunk);
|
|
249888
|
+
if (!canPushMore) {
|
|
249889
|
+
this.pendingCallback = callback;
|
|
249890
|
+
return;
|
|
249891
|
+
}
|
|
249705
249892
|
} catch (e5) {
|
|
249706
249893
|
return callback(e5);
|
|
249707
249894
|
}
|
|
@@ -284997,6 +285184,10 @@ function getValidParamsForTool(toolName) {
|
|
|
284997
285184
|
}
|
|
284998
285185
|
return [];
|
|
284999
285186
|
}
|
|
285187
|
+
function unescapeXmlEntities(str) {
|
|
285188
|
+
if (typeof str !== "string") return str;
|
|
285189
|
+
return str.replace(/</g, "<").replace(/>/g, ">").replace(/"/g, '"').replace(/'/g, "'").replace(/&/g, "&");
|
|
285190
|
+
}
|
|
285000
285191
|
function parseXmlToolCall(xmlString, validTools = DEFAULT_VALID_TOOLS) {
|
|
285001
285192
|
let earliestToolName = null;
|
|
285002
285193
|
let earliestOpenIndex = Infinity;
|
|
@@ -285053,10 +285244,10 @@ function parseXmlToolCall(xmlString, validTools = DEFAULT_VALID_TOOLS) {
|
|
|
285053
285244
|
}
|
|
285054
285245
|
paramCloseIndex = nextTagIndex;
|
|
285055
285246
|
}
|
|
285056
|
-
let paramValue = innerContent.substring(
|
|
285247
|
+
let paramValue = unescapeXmlEntities(innerContent.substring(
|
|
285057
285248
|
paramOpenIndex + paramOpenTag.length,
|
|
285058
285249
|
paramCloseIndex
|
|
285059
|
-
).trim();
|
|
285250
|
+
).trim());
|
|
285060
285251
|
if (paramValue.toLowerCase() === "true") {
|
|
285061
285252
|
paramValue = true;
|
|
285062
285253
|
} else if (paramValue.toLowerCase() === "false") {
|
|
@@ -285070,7 +285261,7 @@ function parseXmlToolCall(xmlString, validTools = DEFAULT_VALID_TOOLS) {
|
|
|
285070
285261
|
params[paramName] = paramValue;
|
|
285071
285262
|
}
|
|
285072
285263
|
if (toolName === "attempt_completion") {
|
|
285073
|
-
params["result"] = innerContent.trim();
|
|
285264
|
+
params["result"] = unescapeXmlEntities(innerContent.trim());
|
|
285074
285265
|
if (params.command) {
|
|
285075
285266
|
delete params.command;
|
|
285076
285267
|
}
|
|
@@ -330449,6 +330640,7 @@ __export(schemaUtils_exports, {
|
|
|
330449
330640
|
replaceMermaidDiagramsInMarkdown: () => replaceMermaidDiagramsInMarkdown,
|
|
330450
330641
|
sanitizeMarkdownEscapesInJson: () => sanitizeMarkdownEscapesInJson,
|
|
330451
330642
|
tryAutoWrapForSimpleSchema: () => tryAutoWrapForSimpleSchema,
|
|
330643
|
+
tryExtractValidJsonPrefix: () => tryExtractValidJsonPrefix,
|
|
330452
330644
|
tryMaidAutoFix: () => tryMaidAutoFix,
|
|
330453
330645
|
validateAndFixMermaidResponse: () => validateAndFixMermaidResponse,
|
|
330454
330646
|
validateJsonResponse: () => validateJsonResponse,
|
|
@@ -330835,6 +331027,13 @@ function validateJsonResponse(response, options = {}) {
|
|
|
330835
331027
|
errorPosition = response.indexOf(problematicToken);
|
|
330836
331028
|
}
|
|
330837
331029
|
}
|
|
331030
|
+
const prefixResult = tryExtractValidJsonPrefix(responseToValidate, { schema, debug });
|
|
331031
|
+
if (prefixResult && prefixResult.isValid) {
|
|
331032
|
+
if (debug) {
|
|
331033
|
+
console.log(`[DEBUG] JSON validation: Recovered valid JSON prefix (${prefixResult.extracted.length} chars) from response with trailing content`);
|
|
331034
|
+
}
|
|
331035
|
+
return { isValid: true, parsed: prefixResult.parsed };
|
|
331036
|
+
}
|
|
330838
331037
|
let enhancedError = error2.message;
|
|
330839
331038
|
let errorContext = null;
|
|
330840
331039
|
if (errorPosition !== null && errorPosition >= 0 && response && response.length > 0) {
|
|
@@ -330885,6 +331084,84 @@ ${errorContext.pointer}`);
|
|
|
330885
331084
|
};
|
|
330886
331085
|
}
|
|
330887
331086
|
}
|
|
331087
|
+
function tryExtractValidJsonPrefix(response, options = {}) {
|
|
331088
|
+
const { schema = null, debug = false } = options;
|
|
331089
|
+
if (!response || typeof response !== "string") {
|
|
331090
|
+
return null;
|
|
331091
|
+
}
|
|
331092
|
+
const trimmed = response.trim();
|
|
331093
|
+
if (trimmed.length === 0) {
|
|
331094
|
+
return null;
|
|
331095
|
+
}
|
|
331096
|
+
const firstChar = trimmed[0];
|
|
331097
|
+
if (firstChar !== "{" && firstChar !== "[") {
|
|
331098
|
+
return null;
|
|
331099
|
+
}
|
|
331100
|
+
try {
|
|
331101
|
+
JSON.parse(trimmed);
|
|
331102
|
+
return null;
|
|
331103
|
+
} catch {
|
|
331104
|
+
}
|
|
331105
|
+
const openChar = firstChar;
|
|
331106
|
+
const closeChar = openChar === "{" ? "}" : "]";
|
|
331107
|
+
let depth = 0;
|
|
331108
|
+
let inString = false;
|
|
331109
|
+
let escapeNext = false;
|
|
331110
|
+
let endPos = -1;
|
|
331111
|
+
for (let i5 = 0; i5 < trimmed.length; i5++) {
|
|
331112
|
+
const char = trimmed[i5];
|
|
331113
|
+
if (escapeNext) {
|
|
331114
|
+
escapeNext = false;
|
|
331115
|
+
continue;
|
|
331116
|
+
}
|
|
331117
|
+
if (char === "\\" && inString) {
|
|
331118
|
+
escapeNext = true;
|
|
331119
|
+
continue;
|
|
331120
|
+
}
|
|
331121
|
+
if (char === '"') {
|
|
331122
|
+
inString = !inString;
|
|
331123
|
+
continue;
|
|
331124
|
+
}
|
|
331125
|
+
if (inString) {
|
|
331126
|
+
continue;
|
|
331127
|
+
}
|
|
331128
|
+
if (char === openChar) {
|
|
331129
|
+
depth++;
|
|
331130
|
+
} else if (char === closeChar) {
|
|
331131
|
+
depth--;
|
|
331132
|
+
if (depth === 0) {
|
|
331133
|
+
endPos = i5 + 1;
|
|
331134
|
+
break;
|
|
331135
|
+
}
|
|
331136
|
+
}
|
|
331137
|
+
}
|
|
331138
|
+
if (endPos <= 0 || endPos >= trimmed.length) {
|
|
331139
|
+
return null;
|
|
331140
|
+
}
|
|
331141
|
+
const remainder = trimmed.substring(endPos).trim();
|
|
331142
|
+
if (remainder.length === 0) {
|
|
331143
|
+
return null;
|
|
331144
|
+
}
|
|
331145
|
+
const prefix = trimmed.substring(0, endPos);
|
|
331146
|
+
try {
|
|
331147
|
+
const parsed = JSON.parse(prefix);
|
|
331148
|
+
if (debug) {
|
|
331149
|
+
console.log(`[DEBUG] tryExtractValidJsonPrefix: Extracted valid JSON prefix (${prefix.length} chars), stripped trailing content (${remainder.length} chars)`);
|
|
331150
|
+
}
|
|
331151
|
+
if (schema) {
|
|
331152
|
+
const schemaValidation = validateJsonResponse(prefix, { debug, schema });
|
|
331153
|
+
if (!schemaValidation.isValid) {
|
|
331154
|
+
if (debug) {
|
|
331155
|
+
console.log(`[DEBUG] tryExtractValidJsonPrefix: Prefix is valid JSON but fails schema validation: ${schemaValidation.error}`);
|
|
331156
|
+
}
|
|
331157
|
+
return null;
|
|
331158
|
+
}
|
|
331159
|
+
}
|
|
331160
|
+
return { isValid: true, parsed, extracted: prefix };
|
|
331161
|
+
} catch {
|
|
331162
|
+
return null;
|
|
331163
|
+
}
|
|
331164
|
+
}
|
|
330888
331165
|
function validateXmlResponse(response) {
|
|
330889
331166
|
const xmlPattern = /<\/?[\w\s="'.-]+>/g;
|
|
330890
331167
|
const tags = response.match(xmlPattern);
|
|
@@ -332986,7 +333263,7 @@ function parseXmlMcpToolCall(xmlString, mcpToolNames = []) {
|
|
|
332986
333263
|
let match2;
|
|
332987
333264
|
while ((match2 = paramPattern.exec(content)) !== null) {
|
|
332988
333265
|
const [, paramName, paramValue] = match2;
|
|
332989
|
-
params[paramName] = paramValue.trim();
|
|
333266
|
+
params[paramName] = unescapeXmlEntities(paramValue.trim());
|
|
332990
333267
|
}
|
|
332991
333268
|
}
|
|
332992
333269
|
return { toolName, params };
|
|
@@ -333036,7 +333313,7 @@ function parseNativeXmlTool(xmlString, toolName) {
|
|
|
333036
333313
|
while ((match2 = paramPattern.exec(content)) !== null) {
|
|
333037
333314
|
const [, paramName, paramValue] = match2;
|
|
333038
333315
|
if (paramName !== "params") {
|
|
333039
|
-
params[paramName] = paramValue.trim();
|
|
333316
|
+
params[paramName] = unescapeXmlEntities(paramValue.trim());
|
|
333040
333317
|
}
|
|
333041
333318
|
}
|
|
333042
333319
|
if (Object.keys(params).length > 0) {
|
|
@@ -333051,6 +333328,7 @@ var init_xmlBridge = __esm({
|
|
|
333051
333328
|
init_client2();
|
|
333052
333329
|
init_config();
|
|
333053
333330
|
init_xmlParsingUtils();
|
|
333331
|
+
init_common2();
|
|
333054
333332
|
MCPXmlBridge = class {
|
|
333055
333333
|
constructor(options = {}) {
|
|
333056
333334
|
this.debug = options.debug || false;
|
|
@@ -341264,10 +341542,10 @@ var init_FallbackManager = __esm({
|
|
|
341264
341542
|
// Use custom provider list
|
|
341265
341543
|
};
|
|
341266
341544
|
DEFAULT_MODELS = {
|
|
341267
|
-
anthropic: "claude-sonnet-4-
|
|
341268
|
-
openai: "gpt-
|
|
341269
|
-
google: "gemini-2.
|
|
341270
|
-
bedrock: "anthropic.claude-sonnet-4-
|
|
341545
|
+
anthropic: "claude-sonnet-4-6",
|
|
341546
|
+
openai: "gpt-5.2",
|
|
341547
|
+
google: "gemini-2.5-flash",
|
|
341548
|
+
bedrock: "anthropic.claude-sonnet-4-6"
|
|
341271
341549
|
};
|
|
341272
341550
|
FallbackManager = class {
|
|
341273
341551
|
/**
|
|
@@ -351684,95 +351962,102 @@ var init_bashDefaults = __esm({
|
|
|
351684
351962
|
"dir",
|
|
351685
351963
|
"pwd",
|
|
351686
351964
|
"cd",
|
|
351687
|
-
"cd:*",
|
|
351688
351965
|
// File reading commands
|
|
351689
351966
|
"cat",
|
|
351690
|
-
"cat:*",
|
|
351691
351967
|
"head",
|
|
351692
|
-
"head:*",
|
|
351693
351968
|
"tail",
|
|
351694
|
-
"tail:*",
|
|
351695
351969
|
"less",
|
|
351696
351970
|
"more",
|
|
351697
351971
|
"view",
|
|
351698
351972
|
// File information and metadata
|
|
351699
351973
|
"file",
|
|
351700
|
-
"file:*",
|
|
351701
351974
|
"stat",
|
|
351702
|
-
"stat:*",
|
|
351703
351975
|
"wc",
|
|
351704
|
-
"wc:*",
|
|
351705
351976
|
"du",
|
|
351706
|
-
"du:*",
|
|
351707
351977
|
"df",
|
|
351708
|
-
"df:*",
|
|
351709
351978
|
"realpath",
|
|
351710
|
-
|
|
351711
|
-
//
|
|
351979
|
+
// Search and find commands (read-only)
|
|
351980
|
+
// Note: bare 'find' allows all find variants; dangerous ones (find -exec) are blocked by deny list
|
|
351712
351981
|
"find",
|
|
351713
|
-
"find:-name:*",
|
|
351714
|
-
"find:-type:*",
|
|
351715
|
-
"find:-size:*",
|
|
351716
|
-
"find:-mtime:*",
|
|
351717
|
-
"find:-newer:*",
|
|
351718
|
-
"find:-path:*",
|
|
351719
|
-
"find:-iname:*",
|
|
351720
|
-
"find:-maxdepth:*",
|
|
351721
|
-
"find:-mindepth:*",
|
|
351722
|
-
"find:-print",
|
|
351723
351982
|
"grep",
|
|
351724
|
-
"grep:*",
|
|
351725
351983
|
"egrep",
|
|
351726
|
-
"egrep:*",
|
|
351727
351984
|
"fgrep",
|
|
351728
|
-
"fgrep:*",
|
|
351729
351985
|
"rg",
|
|
351730
|
-
"rg:*",
|
|
351731
351986
|
"ag",
|
|
351732
|
-
"ag:*",
|
|
351733
351987
|
"ack",
|
|
351734
|
-
"ack:*",
|
|
351735
351988
|
"which",
|
|
351736
|
-
"which:*",
|
|
351737
351989
|
"whereis",
|
|
351738
|
-
"whereis:*",
|
|
351739
351990
|
"locate",
|
|
351740
|
-
"locate:*",
|
|
351741
351991
|
"type",
|
|
351742
|
-
"type:*",
|
|
351743
351992
|
"command",
|
|
351744
|
-
"command:*",
|
|
351745
351993
|
// Tree and structure visualization
|
|
351746
351994
|
"tree",
|
|
351747
|
-
"tree:*",
|
|
351748
351995
|
// Git read-only operations
|
|
351749
351996
|
"git:status",
|
|
351750
351997
|
"git:log",
|
|
351751
|
-
"git:log:*",
|
|
351752
351998
|
"git:diff",
|
|
351753
|
-
"git:diff:*",
|
|
351754
351999
|
"git:show",
|
|
351755
|
-
"git:show:*",
|
|
351756
352000
|
"git:branch",
|
|
351757
|
-
"git:branch:*",
|
|
351758
352001
|
"git:tag",
|
|
351759
|
-
"git:tag:*",
|
|
351760
352002
|
"git:describe",
|
|
351761
|
-
"git:describe:*",
|
|
351762
352003
|
"git:remote",
|
|
351763
|
-
"git:
|
|
351764
|
-
"git:config:*",
|
|
352004
|
+
"git:config",
|
|
351765
352005
|
"git:blame",
|
|
351766
|
-
"git:blame:*",
|
|
351767
352006
|
"git:shortlog",
|
|
351768
352007
|
"git:reflog",
|
|
351769
352008
|
"git:ls-files",
|
|
351770
352009
|
"git:ls-tree",
|
|
352010
|
+
"git:ls-remote",
|
|
351771
352011
|
"git:rev-parse",
|
|
351772
352012
|
"git:rev-list",
|
|
352013
|
+
"git:cat-file",
|
|
352014
|
+
"git:diff-tree",
|
|
352015
|
+
"git:diff-files",
|
|
352016
|
+
"git:diff-index",
|
|
352017
|
+
"git:for-each-ref",
|
|
352018
|
+
"git:merge-base",
|
|
352019
|
+
"git:name-rev",
|
|
352020
|
+
"git:count-objects",
|
|
352021
|
+
"git:verify-commit",
|
|
352022
|
+
"git:verify-tag",
|
|
352023
|
+
"git:check-ignore",
|
|
352024
|
+
"git:check-attr",
|
|
352025
|
+
"git:stash:list",
|
|
352026
|
+
"git:stash:show",
|
|
352027
|
+
"git:worktree:list",
|
|
352028
|
+
"git:notes:list",
|
|
352029
|
+
"git:notes:show",
|
|
351773
352030
|
"git:--version",
|
|
351774
352031
|
"git:help",
|
|
351775
|
-
|
|
352032
|
+
// GitHub CLI (gh) read-only operations
|
|
352033
|
+
"gh:--version",
|
|
352034
|
+
"gh:help",
|
|
352035
|
+
"gh:status",
|
|
352036
|
+
"gh:auth:status",
|
|
352037
|
+
"gh:issue:list",
|
|
352038
|
+
"gh:issue:view",
|
|
352039
|
+
"gh:issue:status",
|
|
352040
|
+
"gh:pr:list",
|
|
352041
|
+
"gh:pr:view",
|
|
352042
|
+
"gh:pr:status",
|
|
352043
|
+
"gh:pr:diff",
|
|
352044
|
+
"gh:pr:checks",
|
|
352045
|
+
"gh:repo:list",
|
|
352046
|
+
"gh:repo:view",
|
|
352047
|
+
"gh:release:list",
|
|
352048
|
+
"gh:release:view",
|
|
352049
|
+
"gh:run:list",
|
|
352050
|
+
"gh:run:view",
|
|
352051
|
+
"gh:workflow:list",
|
|
352052
|
+
"gh:workflow:view",
|
|
352053
|
+
"gh:gist:list",
|
|
352054
|
+
"gh:gist:view",
|
|
352055
|
+
"gh:search:issues",
|
|
352056
|
+
"gh:search:prs",
|
|
352057
|
+
"gh:search:repos",
|
|
352058
|
+
"gh:search:code",
|
|
352059
|
+
"gh:search:commits",
|
|
352060
|
+
"gh:api",
|
|
351776
352061
|
// Package managers (information only)
|
|
351777
352062
|
"npm:list",
|
|
351778
352063
|
"npm:ls",
|
|
@@ -351833,7 +352118,6 @@ var init_bashDefaults = __esm({
|
|
|
351833
352118
|
"sqlite3:--version",
|
|
351834
352119
|
// System information
|
|
351835
352120
|
"uname",
|
|
351836
|
-
"uname:*",
|
|
351837
352121
|
"hostname",
|
|
351838
352122
|
"whoami",
|
|
351839
352123
|
"id",
|
|
@@ -351844,23 +352128,17 @@ var init_bashDefaults = __esm({
|
|
|
351844
352128
|
"w",
|
|
351845
352129
|
"users",
|
|
351846
352130
|
"sleep",
|
|
351847
|
-
"sleep:*",
|
|
351848
352131
|
// Environment and shell
|
|
351849
352132
|
"env",
|
|
351850
352133
|
"printenv",
|
|
351851
352134
|
"echo",
|
|
351852
|
-
"echo:*",
|
|
351853
352135
|
"printf",
|
|
351854
|
-
"printf:*",
|
|
351855
352136
|
"export",
|
|
351856
|
-
"export:*",
|
|
351857
352137
|
"set",
|
|
351858
352138
|
"unset",
|
|
351859
352139
|
// Process information (read-only)
|
|
351860
352140
|
"ps",
|
|
351861
|
-
"ps:*",
|
|
351862
352141
|
"pgrep",
|
|
351863
|
-
"pgrep:*",
|
|
351864
352142
|
"jobs",
|
|
351865
352143
|
"top:-n:1",
|
|
351866
352144
|
// Network information (read-only)
|
|
@@ -351875,39 +352153,24 @@ var init_bashDefaults = __esm({
|
|
|
351875
352153
|
// Text processing and utilities (awk removed - too powerful)
|
|
351876
352154
|
"sed:-n:*",
|
|
351877
352155
|
"cut",
|
|
351878
|
-
"cut:*",
|
|
351879
352156
|
"sort",
|
|
351880
|
-
"sort:*",
|
|
351881
352157
|
"uniq",
|
|
351882
|
-
"uniq:*",
|
|
351883
352158
|
"tr",
|
|
351884
|
-
"tr:*",
|
|
351885
352159
|
"column",
|
|
351886
|
-
"column:*",
|
|
351887
352160
|
"paste",
|
|
351888
|
-
"paste:*",
|
|
351889
352161
|
"join",
|
|
351890
|
-
"join:*",
|
|
351891
352162
|
"comm",
|
|
351892
|
-
"comm:*",
|
|
351893
352163
|
"diff",
|
|
351894
|
-
"diff:*",
|
|
351895
352164
|
"cmp",
|
|
351896
|
-
"cmp:*",
|
|
351897
352165
|
"patch:--dry-run:*",
|
|
351898
352166
|
// Hashing and encoding (read-only)
|
|
351899
352167
|
"md5sum",
|
|
351900
|
-
"md5sum:*",
|
|
351901
352168
|
"sha1sum",
|
|
351902
|
-
"sha1sum:*",
|
|
351903
352169
|
"sha256sum",
|
|
351904
|
-
"sha256sum:*",
|
|
351905
352170
|
"base64",
|
|
351906
352171
|
"base64:-d",
|
|
351907
352172
|
"od",
|
|
351908
|
-
"od:*",
|
|
351909
352173
|
"hexdump",
|
|
351910
|
-
"hexdump:*",
|
|
351911
352174
|
// Archive and compression (list/view only)
|
|
351912
352175
|
"tar:-tf:*",
|
|
351913
352176
|
"tar:-tzf:*",
|
|
@@ -351917,15 +352180,11 @@ var init_bashDefaults = __esm({
|
|
|
351917
352180
|
"gunzip:-l:*",
|
|
351918
352181
|
// Help and documentation
|
|
351919
352182
|
"man",
|
|
351920
|
-
"man:*",
|
|
351921
352183
|
"--help",
|
|
351922
352184
|
"help",
|
|
351923
352185
|
"info",
|
|
351924
|
-
"info:*",
|
|
351925
352186
|
"whatis",
|
|
351926
|
-
"whatis:*",
|
|
351927
352187
|
"apropos",
|
|
351928
|
-
"apropos:*",
|
|
351929
352188
|
// Make (dry run and info)
|
|
351930
352189
|
"make:-n",
|
|
351931
352190
|
"make:--dry-run",
|
|
@@ -351948,36 +352207,30 @@ var init_bashDefaults = __esm({
|
|
|
351948
352207
|
"rm:-rf",
|
|
351949
352208
|
"rm:-f:/",
|
|
351950
352209
|
"rm:/",
|
|
351951
|
-
"rm:-rf:*",
|
|
351952
352210
|
"rmdir",
|
|
351953
352211
|
"chmod:777",
|
|
351954
352212
|
"chmod:-R:777",
|
|
351955
352213
|
"chown",
|
|
351956
352214
|
"chgrp",
|
|
351957
352215
|
"dd",
|
|
351958
|
-
"dd:*",
|
|
351959
352216
|
"shred",
|
|
351960
|
-
"shred:*",
|
|
351961
352217
|
// Dangerous find operations that can execute arbitrary commands
|
|
351962
|
-
"find:-exec
|
|
351963
|
-
"find:*:-exec
|
|
351964
|
-
"find:-execdir
|
|
351965
|
-
"find:*:-execdir
|
|
351966
|
-
"find:-ok
|
|
351967
|
-
"find:*:-ok
|
|
351968
|
-
"find:-okdir
|
|
351969
|
-
"find:*:-okdir
|
|
352218
|
+
"find:-exec",
|
|
352219
|
+
"find:*:-exec",
|
|
352220
|
+
"find:-execdir",
|
|
352221
|
+
"find:*:-execdir",
|
|
352222
|
+
"find:-ok",
|
|
352223
|
+
"find:*:-ok",
|
|
352224
|
+
"find:-okdir",
|
|
352225
|
+
"find:*:-okdir",
|
|
351970
352226
|
// Powerful scripting tools that can execute arbitrary commands
|
|
351971
352227
|
"awk",
|
|
351972
|
-
"awk:*",
|
|
351973
352228
|
"perl",
|
|
351974
|
-
"perl:*",
|
|
351975
352229
|
"python:-c:*",
|
|
351976
352230
|
"node:-e:*",
|
|
351977
352231
|
// System administration and modification
|
|
351978
|
-
"sudo
|
|
352232
|
+
"sudo",
|
|
351979
352233
|
"su",
|
|
351980
|
-
"su:*",
|
|
351981
352234
|
"passwd",
|
|
351982
352235
|
"adduser",
|
|
351983
352236
|
"useradd",
|
|
@@ -352015,11 +352268,11 @@ var init_bashDefaults = __esm({
|
|
|
352015
352268
|
"composer:install",
|
|
352016
352269
|
"composer:update",
|
|
352017
352270
|
"composer:remove",
|
|
352018
|
-
"apt
|
|
352019
|
-
"apt-get
|
|
352020
|
-
"yum
|
|
352021
|
-
"dnf
|
|
352022
|
-
"zypper
|
|
352271
|
+
"apt",
|
|
352272
|
+
"apt-get",
|
|
352273
|
+
"yum",
|
|
352274
|
+
"dnf",
|
|
352275
|
+
"zypper",
|
|
352023
352276
|
"brew:install",
|
|
352024
352277
|
"brew:uninstall",
|
|
352025
352278
|
"brew:upgrade",
|
|
@@ -352027,11 +352280,11 @@ var init_bashDefaults = __esm({
|
|
|
352027
352280
|
"conda:remove",
|
|
352028
352281
|
"conda:update",
|
|
352029
352282
|
// Service and system control
|
|
352030
|
-
"systemctl
|
|
352031
|
-
"service
|
|
352032
|
-
"chkconfig
|
|
352033
|
-
"initctl
|
|
352034
|
-
"upstart
|
|
352283
|
+
"systemctl",
|
|
352284
|
+
"service",
|
|
352285
|
+
"chkconfig",
|
|
352286
|
+
"initctl",
|
|
352287
|
+
"upstart",
|
|
352035
352288
|
// Network operations that could be dangerous
|
|
352036
352289
|
"curl:-d:*",
|
|
352037
352290
|
"curl:--data:*",
|
|
@@ -352040,32 +352293,21 @@ var init_bashDefaults = __esm({
|
|
|
352040
352293
|
"wget:-O:/",
|
|
352041
352294
|
"wget:--post-data:*",
|
|
352042
352295
|
"ssh",
|
|
352043
|
-
"ssh:*",
|
|
352044
352296
|
"scp",
|
|
352045
|
-
"scp:*",
|
|
352046
352297
|
"sftp",
|
|
352047
|
-
"
|
|
352048
|
-
"rsync:*",
|
|
352298
|
+
"rsync",
|
|
352049
352299
|
"nc",
|
|
352050
|
-
"nc:*",
|
|
352051
352300
|
"netcat",
|
|
352052
|
-
"netcat:*",
|
|
352053
352301
|
"telnet",
|
|
352054
|
-
"telnet:*",
|
|
352055
352302
|
"ftp",
|
|
352056
|
-
"ftp:*",
|
|
352057
352303
|
// Process control and termination
|
|
352058
352304
|
"kill",
|
|
352059
|
-
"kill:*",
|
|
352060
352305
|
"killall",
|
|
352061
|
-
"killall:*",
|
|
352062
352306
|
"pkill",
|
|
352063
|
-
"
|
|
352064
|
-
"
|
|
352065
|
-
"disown:*",
|
|
352307
|
+
"nohup",
|
|
352308
|
+
"disown",
|
|
352066
352309
|
// System control and shutdown
|
|
352067
352310
|
"shutdown",
|
|
352068
|
-
"shutdown:*",
|
|
352069
352311
|
"reboot",
|
|
352070
352312
|
"halt",
|
|
352071
352313
|
"poweroff",
|
|
@@ -352073,50 +352315,92 @@ var init_bashDefaults = __esm({
|
|
|
352073
352315
|
"telinit",
|
|
352074
352316
|
// Kernel and module operations
|
|
352075
352317
|
"insmod",
|
|
352076
|
-
"insmod:*",
|
|
352077
352318
|
"rmmod",
|
|
352078
|
-
"rmmod:*",
|
|
352079
352319
|
"modprobe",
|
|
352080
|
-
"modprobe:*",
|
|
352081
352320
|
"sysctl:-w:*",
|
|
352082
352321
|
// Dangerous git operations
|
|
352083
352322
|
"git:push",
|
|
352084
|
-
"git:push:*",
|
|
352085
352323
|
"git:force",
|
|
352086
|
-
"git:reset
|
|
352087
|
-
"git:clean
|
|
352088
|
-
"git:rm
|
|
352324
|
+
"git:reset",
|
|
352325
|
+
"git:clean",
|
|
352326
|
+
"git:rm",
|
|
352089
352327
|
"git:commit",
|
|
352090
352328
|
"git:merge",
|
|
352091
352329
|
"git:rebase",
|
|
352092
352330
|
"git:cherry-pick",
|
|
352093
352331
|
"git:stash:drop",
|
|
352332
|
+
"git:stash:pop",
|
|
352333
|
+
"git:stash:push",
|
|
352334
|
+
"git:stash:clear",
|
|
352335
|
+
"git:branch:-d",
|
|
352336
|
+
"git:branch:-D",
|
|
352337
|
+
"git:branch:--delete",
|
|
352338
|
+
"git:tag:-d",
|
|
352339
|
+
"git:tag:--delete",
|
|
352340
|
+
"git:remote:remove",
|
|
352341
|
+
"git:remote:rm",
|
|
352342
|
+
"git:checkout:--force",
|
|
352343
|
+
"git:checkout:-f",
|
|
352344
|
+
"git:submodule:deinit",
|
|
352345
|
+
"git:notes:add",
|
|
352346
|
+
"git:notes:remove",
|
|
352347
|
+
"git:worktree:add",
|
|
352348
|
+
"git:worktree:remove",
|
|
352349
|
+
// Dangerous GitHub CLI (gh) write operations
|
|
352350
|
+
"gh:issue:create",
|
|
352351
|
+
"gh:issue:close",
|
|
352352
|
+
"gh:issue:delete",
|
|
352353
|
+
"gh:issue:edit",
|
|
352354
|
+
"gh:issue:reopen",
|
|
352355
|
+
"gh:issue:comment",
|
|
352356
|
+
"gh:pr:create",
|
|
352357
|
+
"gh:pr:close",
|
|
352358
|
+
"gh:pr:merge",
|
|
352359
|
+
"gh:pr:edit",
|
|
352360
|
+
"gh:pr:reopen",
|
|
352361
|
+
"gh:pr:review",
|
|
352362
|
+
"gh:pr:comment",
|
|
352363
|
+
"gh:repo:create",
|
|
352364
|
+
"gh:repo:delete",
|
|
352365
|
+
"gh:repo:fork",
|
|
352366
|
+
"gh:repo:rename",
|
|
352367
|
+
"gh:repo:archive",
|
|
352368
|
+
"gh:repo:clone",
|
|
352369
|
+
"gh:release:create",
|
|
352370
|
+
"gh:release:delete",
|
|
352371
|
+
"gh:release:edit",
|
|
352372
|
+
"gh:run:cancel",
|
|
352373
|
+
"gh:run:rerun",
|
|
352374
|
+
"gh:workflow:run",
|
|
352375
|
+
"gh:workflow:enable",
|
|
352376
|
+
"gh:workflow:disable",
|
|
352377
|
+
"gh:gist:create",
|
|
352378
|
+
"gh:gist:delete",
|
|
352379
|
+
"gh:gist:edit",
|
|
352380
|
+
"gh:secret:set",
|
|
352381
|
+
"gh:secret:delete",
|
|
352382
|
+
"gh:variable:set",
|
|
352383
|
+
"gh:variable:delete",
|
|
352384
|
+
"gh:label:create",
|
|
352385
|
+
"gh:label:delete",
|
|
352386
|
+
"gh:ssh-key:add",
|
|
352387
|
+
"gh:ssh-key:delete",
|
|
352094
352388
|
// File system mounting and partitioning
|
|
352095
352389
|
"mount",
|
|
352096
|
-
"mount:*",
|
|
352097
352390
|
"umount",
|
|
352098
|
-
"umount:*",
|
|
352099
352391
|
"fdisk",
|
|
352100
|
-
"fdisk:*",
|
|
352101
352392
|
"parted",
|
|
352102
|
-
"parted:*",
|
|
352103
352393
|
"mkfs",
|
|
352104
|
-
"mkfs:*",
|
|
352105
352394
|
"fsck",
|
|
352106
|
-
"fsck:*",
|
|
352107
352395
|
// Cron and scheduling
|
|
352108
352396
|
"crontab",
|
|
352109
|
-
"crontab:*",
|
|
352110
352397
|
"at",
|
|
352111
|
-
"at:*",
|
|
352112
352398
|
"batch",
|
|
352113
|
-
"batch:*",
|
|
352114
352399
|
// Compression with potential overwrite
|
|
352115
352400
|
"tar:-xf:*",
|
|
352116
352401
|
"unzip",
|
|
352117
|
-
"
|
|
352118
|
-
"
|
|
352119
|
-
"gunzip:*",
|
|
352402
|
+
"gzip",
|
|
352403
|
+
"gunzip",
|
|
352120
352404
|
// Build and compilation that might modify files
|
|
352121
352405
|
"make",
|
|
352122
352406
|
"make:install",
|
|
@@ -352129,11 +352413,8 @@ var init_bashDefaults = __esm({
|
|
|
352129
352413
|
"gradle:build",
|
|
352130
352414
|
// Docker operations that could modify state
|
|
352131
352415
|
"docker:run",
|
|
352132
|
-
"docker:run:*",
|
|
352133
352416
|
"docker:exec",
|
|
352134
|
-
"docker:exec:*",
|
|
352135
352417
|
"docker:build",
|
|
352136
|
-
"docker:build:*",
|
|
352137
352418
|
"docker:pull",
|
|
352138
352419
|
"docker:push",
|
|
352139
352420
|
"docker:rm",
|
|
@@ -352147,22 +352428,15 @@ var init_bashDefaults = __esm({
|
|
|
352147
352428
|
"mongo:--eval:*",
|
|
352148
352429
|
// Text editors that could modify files
|
|
352149
352430
|
"vi",
|
|
352150
|
-
"vi:*",
|
|
352151
352431
|
"vim",
|
|
352152
|
-
"vim:*",
|
|
352153
352432
|
"nano",
|
|
352154
|
-
"nano:*",
|
|
352155
352433
|
"emacs",
|
|
352156
|
-
"emacs:*",
|
|
352157
352434
|
"sed:-i:*",
|
|
352158
352435
|
"perl:-i:*",
|
|
352159
352436
|
// Potentially dangerous utilities
|
|
352160
352437
|
"eval",
|
|
352161
|
-
"eval:*",
|
|
352162
352438
|
"exec",
|
|
352163
|
-
"exec:*",
|
|
352164
352439
|
"source",
|
|
352165
|
-
"source:*",
|
|
352166
352440
|
"bash:-c:*",
|
|
352167
352441
|
"sh:-c:*",
|
|
352168
352442
|
"zsh:-c:*"
|
|
@@ -352441,9 +352715,19 @@ var init_bashPermissions = __esm({
|
|
|
352441
352715
|
BashPermissionChecker = class {
|
|
352442
352716
|
/**
|
|
352443
352717
|
* Create a permission checker
|
|
352718
|
+
*
|
|
352719
|
+
* Priority order (highest to lowest):
|
|
352720
|
+
* 1. Custom deny — always blocks (user explicitly blocked it)
|
|
352721
|
+
* 2. Custom allow — overrides default deny (user explicitly allowed it)
|
|
352722
|
+
* 3. Default deny — blocks by default
|
|
352723
|
+
* 4. Allow list — allows recognized safe commands
|
|
352724
|
+
*
|
|
352725
|
+
* This means `--bash-allow "git:push"` overrides the default deny for git:push
|
|
352726
|
+
* without requiring `--no-default-bash-deny`.
|
|
352727
|
+
*
|
|
352444
352728
|
* @param {Object} config - Configuration options
|
|
352445
|
-
* @param {string[]} [config.allow] - Additional allow patterns
|
|
352446
|
-
* @param {string[]} [config.deny] - Additional deny patterns
|
|
352729
|
+
* @param {string[]} [config.allow] - Additional allow patterns (override default deny)
|
|
352730
|
+
* @param {string[]} [config.deny] - Additional deny patterns (always win)
|
|
352447
352731
|
* @param {boolean} [config.disableDefaultAllow] - Disable default allow list
|
|
352448
352732
|
* @param {boolean} [config.disableDefaultDeny] - Disable default deny list
|
|
352449
352733
|
* @param {boolean} [config.debug] - Enable debug logging
|
|
@@ -352452,40 +352736,22 @@ var init_bashPermissions = __esm({
|
|
|
352452
352736
|
constructor(config = {}) {
|
|
352453
352737
|
this.debug = config.debug || false;
|
|
352454
352738
|
this.tracer = config.tracer || null;
|
|
352455
|
-
this.
|
|
352456
|
-
|
|
352457
|
-
|
|
352458
|
-
|
|
352459
|
-
|
|
352460
|
-
|
|
352461
|
-
}
|
|
352462
|
-
if (config.allow && Array.isArray(config.allow)) {
|
|
352463
|
-
this.allowPatterns.push(...config.allow);
|
|
352464
|
-
if (this.debug) {
|
|
352465
|
-
console.log(`[BashPermissions] Added ${config.allow.length} custom allow patterns:`, config.allow);
|
|
352466
|
-
}
|
|
352467
|
-
}
|
|
352468
|
-
this.denyPatterns = [];
|
|
352469
|
-
if (!config.disableDefaultDeny) {
|
|
352470
|
-
this.denyPatterns.push(...DEFAULT_DENY_PATTERNS);
|
|
352471
|
-
if (this.debug) {
|
|
352472
|
-
console.log(`[BashPermissions] Added ${DEFAULT_DENY_PATTERNS.length} default deny patterns`);
|
|
352473
|
-
}
|
|
352474
|
-
}
|
|
352475
|
-
if (config.deny && Array.isArray(config.deny)) {
|
|
352476
|
-
this.denyPatterns.push(...config.deny);
|
|
352477
|
-
if (this.debug) {
|
|
352478
|
-
console.log(`[BashPermissions] Added ${config.deny.length} custom deny patterns:`, config.deny);
|
|
352479
|
-
}
|
|
352480
|
-
}
|
|
352739
|
+
this.defaultAllowPatterns = config.disableDefaultAllow ? [] : [...DEFAULT_ALLOW_PATTERNS];
|
|
352740
|
+
this.customAllowPatterns = config.allow && Array.isArray(config.allow) ? [...config.allow] : [];
|
|
352741
|
+
this.allowPatterns = [...this.defaultAllowPatterns, ...this.customAllowPatterns];
|
|
352742
|
+
this.defaultDenyPatterns = config.disableDefaultDeny ? [] : [...DEFAULT_DENY_PATTERNS];
|
|
352743
|
+
this.customDenyPatterns = config.deny && Array.isArray(config.deny) ? [...config.deny] : [];
|
|
352744
|
+
this.denyPatterns = [...this.defaultDenyPatterns, ...this.customDenyPatterns];
|
|
352481
352745
|
if (this.debug) {
|
|
352746
|
+
console.log(`[BashPermissions] Default allow: ${this.defaultAllowPatterns.length}, Custom allow: ${this.customAllowPatterns.length}`);
|
|
352747
|
+
console.log(`[BashPermissions] Default deny: ${this.defaultDenyPatterns.length}, Custom deny: ${this.customDenyPatterns.length}`);
|
|
352482
352748
|
console.log(`[BashPermissions] Total patterns - Allow: ${this.allowPatterns.length}, Deny: ${this.denyPatterns.length}`);
|
|
352483
352749
|
}
|
|
352484
352750
|
this.recordBashEvent("permissions.initialized", {
|
|
352485
352751
|
allowPatternCount: this.allowPatterns.length,
|
|
352486
352752
|
denyPatternCount: this.denyPatterns.length,
|
|
352487
|
-
hasCustomAllowPatterns:
|
|
352488
|
-
hasCustomDenyPatterns:
|
|
352753
|
+
hasCustomAllowPatterns: this.customAllowPatterns.length > 0,
|
|
352754
|
+
hasCustomDenyPatterns: this.customDenyPatterns.length > 0,
|
|
352489
352755
|
disableDefaultAllow: !!config.disableDefaultAllow,
|
|
352490
352756
|
disableDefaultDeny: !!config.disableDefaultDeny
|
|
352491
352757
|
});
|
|
@@ -352555,8 +352821,11 @@ var init_bashPermissions = __esm({
|
|
|
352555
352821
|
console.log(`[BashPermissions] Checking simple command: "${command}"`);
|
|
352556
352822
|
console.log(`[BashPermissions] Parsed: ${parsed.command} with args: [${parsed.args.join(", ")}]`);
|
|
352557
352823
|
}
|
|
352558
|
-
if (matchesAnyPattern(parsed, this.
|
|
352559
|
-
const matchedPatterns = this.
|
|
352824
|
+
if (matchesAnyPattern(parsed, this.customDenyPatterns)) {
|
|
352825
|
+
const matchedPatterns = this.customDenyPatterns.filter((pattern) => matchesPattern(parsed, pattern));
|
|
352826
|
+
if (this.debug) {
|
|
352827
|
+
console.log(`[BashPermissions] DENIED - matches custom deny pattern: ${matchedPatterns[0]}`);
|
|
352828
|
+
}
|
|
352560
352829
|
const result2 = {
|
|
352561
352830
|
allowed: false,
|
|
352562
352831
|
reason: `Command matches deny pattern: ${matchedPatterns[0]}`,
|
|
@@ -352569,7 +352838,31 @@ var init_bashPermissions = __esm({
|
|
|
352569
352838
|
parsedCommand: parsed.command,
|
|
352570
352839
|
reason: "matches_deny_pattern",
|
|
352571
352840
|
matchedPattern: matchedPatterns[0],
|
|
352572
|
-
isComplex: false
|
|
352841
|
+
isComplex: false,
|
|
352842
|
+
isCustomDeny: true
|
|
352843
|
+
});
|
|
352844
|
+
return result2;
|
|
352845
|
+
}
|
|
352846
|
+
const matchesCustomAllow = matchesAnyPattern(parsed, this.customAllowPatterns);
|
|
352847
|
+
if (!matchesCustomAllow && matchesAnyPattern(parsed, this.defaultDenyPatterns)) {
|
|
352848
|
+
const matchedPatterns = this.defaultDenyPatterns.filter((pattern) => matchesPattern(parsed, pattern));
|
|
352849
|
+
if (this.debug) {
|
|
352850
|
+
console.log(`[BashPermissions] DENIED - matches default deny pattern: ${matchedPatterns[0]}`);
|
|
352851
|
+
}
|
|
352852
|
+
const result2 = {
|
|
352853
|
+
allowed: false,
|
|
352854
|
+
reason: `Command matches deny pattern: ${matchedPatterns[0]}`,
|
|
352855
|
+
command,
|
|
352856
|
+
parsed,
|
|
352857
|
+
matchedPatterns
|
|
352858
|
+
};
|
|
352859
|
+
this.recordBashEvent("permission.denied", {
|
|
352860
|
+
command,
|
|
352861
|
+
parsedCommand: parsed.command,
|
|
352862
|
+
reason: "matches_deny_pattern",
|
|
352863
|
+
matchedPattern: matchedPatterns[0],
|
|
352864
|
+
isComplex: false,
|
|
352865
|
+
isCustomDeny: false
|
|
352573
352866
|
});
|
|
352574
352867
|
return result2;
|
|
352575
352868
|
}
|
|
@@ -352594,15 +352887,21 @@ var init_bashPermissions = __esm({
|
|
|
352594
352887
|
allowed: true,
|
|
352595
352888
|
command,
|
|
352596
352889
|
parsed,
|
|
352597
|
-
isComplex: false
|
|
352890
|
+
isComplex: false,
|
|
352891
|
+
overriddenDeny: matchesCustomAllow && matchesAnyPattern(parsed, this.defaultDenyPatterns)
|
|
352598
352892
|
};
|
|
352599
352893
|
if (this.debug) {
|
|
352600
|
-
|
|
352894
|
+
if (result.overriddenDeny) {
|
|
352895
|
+
console.log(`[BashPermissions] ALLOWED - custom allow overrides default deny`);
|
|
352896
|
+
} else {
|
|
352897
|
+
console.log(`[BashPermissions] ALLOWED - command passed all checks`);
|
|
352898
|
+
}
|
|
352601
352899
|
}
|
|
352602
352900
|
this.recordBashEvent("permission.allowed", {
|
|
352603
352901
|
command,
|
|
352604
352902
|
parsedCommand: parsed.command,
|
|
352605
|
-
isComplex: false
|
|
352903
|
+
isComplex: false,
|
|
352904
|
+
overriddenDeny: result.overriddenDeny || false
|
|
352606
352905
|
});
|
|
352607
352906
|
return result;
|
|
352608
352907
|
}
|
|
@@ -352771,9 +353070,19 @@ var init_bashPermissions = __esm({
|
|
|
352771
353070
|
deniedReason = parsed.error || "Component contains nested complex constructs";
|
|
352772
353071
|
break;
|
|
352773
353072
|
}
|
|
352774
|
-
if (matchesAnyPattern(parsed, this.
|
|
353073
|
+
if (matchesAnyPattern(parsed, this.customDenyPatterns)) {
|
|
353074
|
+
if (this.debug) {
|
|
353075
|
+
console.log(`[BashPermissions] Component "${component}" matches custom deny pattern`);
|
|
353076
|
+
}
|
|
353077
|
+
allAllowed = false;
|
|
353078
|
+
deniedComponent = component;
|
|
353079
|
+
deniedReason = "Component matches deny pattern";
|
|
353080
|
+
break;
|
|
353081
|
+
}
|
|
353082
|
+
const componentMatchesCustomAllow = matchesAnyPattern(parsed, this.customAllowPatterns);
|
|
353083
|
+
if (!componentMatchesCustomAllow && matchesAnyPattern(parsed, this.defaultDenyPatterns)) {
|
|
352775
353084
|
if (this.debug) {
|
|
352776
|
-
console.log(`[BashPermissions] Component "${component}" matches deny pattern`);
|
|
353085
|
+
console.log(`[BashPermissions] Component "${component}" matches default deny pattern`);
|
|
352777
353086
|
}
|
|
352778
353087
|
allAllowed = false;
|
|
352779
353088
|
deniedComponent = component;
|
|
@@ -352853,6 +353162,10 @@ var init_bashPermissions = __esm({
|
|
|
352853
353162
|
return {
|
|
352854
353163
|
allowPatterns: this.allowPatterns.length,
|
|
352855
353164
|
denyPatterns: this.denyPatterns.length,
|
|
353165
|
+
customAllowPatterns: this.customAllowPatterns.length,
|
|
353166
|
+
customDenyPatterns: this.customDenyPatterns.length,
|
|
353167
|
+
defaultAllowPatterns: this.defaultAllowPatterns.length,
|
|
353168
|
+
defaultDenyPatterns: this.defaultDenyPatterns.length,
|
|
352856
353169
|
totalPatterns: this.allowPatterns.length + this.denyPatterns.length
|
|
352857
353170
|
};
|
|
352858
353171
|
}
|
|
@@ -353235,8 +353548,8 @@ Common reasons:
|
|
|
353235
353548
|
2. The command is not in the allow list (not a recognized safe command)
|
|
353236
353549
|
|
|
353237
353550
|
If you believe this command should be allowed, you can:
|
|
353238
|
-
- Use the --bash-allow option to add specific patterns
|
|
353239
|
-
|
|
353551
|
+
- Use the --bash-allow option to add specific patterns (overrides default deny list)
|
|
353552
|
+
Example: --bash-allow "git:push" allows git push while keeping all other deny rules
|
|
353240
353553
|
|
|
353241
353554
|
For code exploration, try these safe alternatives:
|
|
353242
353555
|
- ls, cat, head, tail for file operations
|
|
@@ -356260,7 +356573,7 @@ var init_ProbeAgent = __esm({
|
|
|
356260
356573
|
}
|
|
356261
356574
|
this.clientApiProvider = "claude-code";
|
|
356262
356575
|
this.provider = null;
|
|
356263
|
-
this.model = this.clientApiModel || "claude-
|
|
356576
|
+
this.model = this.clientApiModel || "claude-sonnet-4-6";
|
|
356264
356577
|
this.apiType = "claude-code";
|
|
356265
356578
|
} else if (codexAvailable) {
|
|
356266
356579
|
if (this.debug) {
|
|
@@ -356269,7 +356582,7 @@ var init_ProbeAgent = __esm({
|
|
|
356269
356582
|
}
|
|
356270
356583
|
this.clientApiProvider = "codex";
|
|
356271
356584
|
this.provider = null;
|
|
356272
|
-
this.model = this.clientApiModel || "gpt-
|
|
356585
|
+
this.model = this.clientApiModel || "gpt-5.2";
|
|
356273
356586
|
this.apiType = "codex";
|
|
356274
356587
|
} else {
|
|
356275
356588
|
throw new Error("No API key provided and neither claude nor codex command found. Please either:\n1. Set an API key: ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY, or AWS credentials\n2. Install claude command from https://docs.claude.com/en/docs/claude-code\n3. Install codex command from https://openai.com/codex");
|
|
@@ -356507,7 +356820,7 @@ var init_ProbeAgent = __esm({
|
|
|
356507
356820
|
}
|
|
356508
356821
|
if (this.clientApiProvider === "claude-code" || process.env.USE_CLAUDE_CODE === "true") {
|
|
356509
356822
|
this.provider = null;
|
|
356510
|
-
this.model = modelName || "claude-
|
|
356823
|
+
this.model = modelName || "claude-sonnet-4-6";
|
|
356511
356824
|
this.apiType = "claude-code";
|
|
356512
356825
|
if (this.debug) {
|
|
356513
356826
|
console.log("[DEBUG] Claude Code engine selected - will use built-in access if available");
|
|
@@ -356874,7 +357187,7 @@ var init_ProbeAgent = __esm({
|
|
|
356874
357187
|
apiKey,
|
|
356875
357188
|
...apiUrl && { baseURL: apiUrl }
|
|
356876
357189
|
});
|
|
356877
|
-
this.model = modelName || "claude-sonnet-4-
|
|
357190
|
+
this.model = modelName || "claude-sonnet-4-6";
|
|
356878
357191
|
this.apiType = "anthropic";
|
|
356879
357192
|
if (this.debug) {
|
|
356880
357193
|
console.log(`Using Anthropic API with model: ${this.model}${apiUrl ? ` (URL: ${apiUrl})` : ""}`);
|
|
@@ -356889,7 +357202,7 @@ var init_ProbeAgent = __esm({
|
|
|
356889
357202
|
apiKey,
|
|
356890
357203
|
...apiUrl && { baseURL: apiUrl }
|
|
356891
357204
|
});
|
|
356892
|
-
this.model = modelName || "gpt-5
|
|
357205
|
+
this.model = modelName || "gpt-5.2";
|
|
356893
357206
|
this.apiType = "openai";
|
|
356894
357207
|
if (this.debug) {
|
|
356895
357208
|
console.log(`Using OpenAI API with model: ${this.model}${apiUrl ? ` (URL: ${apiUrl})` : ""}`);
|
|
@@ -356993,7 +357306,7 @@ var init_ProbeAgent = __esm({
|
|
|
356993
357306
|
config.baseURL = baseURL;
|
|
356994
357307
|
}
|
|
356995
357308
|
this.provider = createAmazonBedrock(config);
|
|
356996
|
-
this.model = modelName || "anthropic.claude-sonnet-4-
|
|
357309
|
+
this.model = modelName || "anthropic.claude-sonnet-4-6";
|
|
356997
357310
|
this.apiType = "bedrock";
|
|
356998
357311
|
if (this.debug) {
|
|
356999
357312
|
const authMethod = apiKey ? "API Key" : "AWS Credentials";
|
|
@@ -357052,7 +357365,7 @@ var init_ProbeAgent = __esm({
|
|
|
357052
357365
|
allowedTools: this.allowedTools,
|
|
357053
357366
|
// Pass tool filtering configuration
|
|
357054
357367
|
model: this.model
|
|
357055
|
-
// Pass model name (e.g., gpt-
|
|
357368
|
+
// Pass model name (e.g., gpt-5.2, o3, etc.)
|
|
357056
357369
|
});
|
|
357057
357370
|
if (this.debug) {
|
|
357058
357371
|
console.log("[DEBUG] Using Codex CLI engine with Probe tools");
|
|
@@ -358148,8 +358461,8 @@ You are working with a workspace. Available paths: ${workspaceDesc}
|
|
|
358148
358461
|
let currentIteration = 0;
|
|
358149
358462
|
let completionAttempted = false;
|
|
358150
358463
|
let finalResult = "I was unable to complete your request due to reaching the maximum number of tool iterations.";
|
|
358151
|
-
const baseMaxIterations = this.maxIterations || MAX_TOOL_ITERATIONS;
|
|
358152
|
-
const maxIterations = options.schema ? baseMaxIterations + 4 : baseMaxIterations;
|
|
358464
|
+
const baseMaxIterations = options._maxIterationsOverride || this.maxIterations || MAX_TOOL_ITERATIONS;
|
|
358465
|
+
const maxIterations = options._maxIterationsOverride ? baseMaxIterations : options.schema ? baseMaxIterations + 4 : baseMaxIterations;
|
|
358153
358466
|
const isClaudeCode = this.clientApiProvider === "claude-code" || process.env.USE_CLAUDE_CODE === "true";
|
|
358154
358467
|
const isCodex = this.clientApiProvider === "codex" || process.env.USE_CODEX === "true";
|
|
358155
358468
|
if (isClaudeCode) {
|
|
@@ -358307,9 +358620,7 @@ You are working with a workspace. Available paths: ${workspaceDesc}
|
|
|
358307
358620
|
let maxResponseTokens = this.maxResponseTokens;
|
|
358308
358621
|
if (!maxResponseTokens) {
|
|
358309
358622
|
maxResponseTokens = 4e3;
|
|
358310
|
-
if (this.model && this.model.includes("opus") || this.model && this.model.includes("sonnet") || this.model && this.model.startsWith("gpt-4-")) {
|
|
358311
|
-
maxResponseTokens = 8192;
|
|
358312
|
-
} else if (this.model && this.model.startsWith("gpt-4o")) {
|
|
358623
|
+
if (this.model && this.model.includes("opus") || this.model && this.model.includes("sonnet") || this.model && this.model.startsWith("gpt-4") || this.model && this.model.startsWith("gpt-5")) {
|
|
358313
358624
|
maxResponseTokens = 8192;
|
|
358314
358625
|
} else if (this.model && this.model.startsWith("gemini")) {
|
|
358315
358626
|
maxResponseTokens = 32e3;
|
|
@@ -359386,13 +359697,16 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
359386
359697
|
options.schema,
|
|
359387
359698
|
0
|
|
359388
359699
|
);
|
|
359700
|
+
const { schema: _unusedSchema1, ...schemaDefCorrectionOptions } = options;
|
|
359389
359701
|
finalResult = await this.answer(schemaDefinitionPrompt, [], {
|
|
359390
|
-
...
|
|
359702
|
+
...schemaDefCorrectionOptions,
|
|
359391
359703
|
_schemaFormatted: true,
|
|
359392
359704
|
_skipValidation: true,
|
|
359393
359705
|
// Skip validation in recursive correction calls to prevent loops
|
|
359394
|
-
_completionPromptProcessed: true
|
|
359706
|
+
_completionPromptProcessed: true,
|
|
359395
359707
|
// Prevent cascading completion prompts in retry calls
|
|
359708
|
+
_maxIterationsOverride: 3
|
|
359709
|
+
// Correction should complete in 1-2 iterations (issue #447)
|
|
359396
359710
|
});
|
|
359397
359711
|
finalResult = cleanSchemaResponse(finalResult);
|
|
359398
359712
|
validation = validateJsonResponse(finalResult);
|
|
@@ -359440,15 +359754,18 @@ Convert your previous response content into actual JSON data that follows this s
|
|
|
359440
359754
|
retryCount
|
|
359441
359755
|
);
|
|
359442
359756
|
}
|
|
359757
|
+
const { schema: _unusedSchema2, ...correctionOptions } = options;
|
|
359443
359758
|
finalResult = await this.answer(correctionPrompt, [], {
|
|
359444
|
-
...
|
|
359759
|
+
...correctionOptions,
|
|
359445
359760
|
_schemaFormatted: true,
|
|
359446
359761
|
_skipValidation: true,
|
|
359447
359762
|
// Skip validation in recursive correction calls to prevent loops
|
|
359448
359763
|
_disableTools: true,
|
|
359449
359764
|
// Only allow attempt_completion - prevent AI from using search/query tools
|
|
359450
|
-
_completionPromptProcessed: true
|
|
359765
|
+
_completionPromptProcessed: true,
|
|
359451
359766
|
// Prevent cascading completion prompts in retry calls
|
|
359767
|
+
_maxIterationsOverride: 3
|
|
359768
|
+
// Correction should complete in 1-2 iterations (issue #447)
|
|
359452
359769
|
});
|
|
359453
359770
|
finalResult = cleanSchemaResponse(finalResult);
|
|
359454
359771
|
validation = validateJsonResponse(finalResult, { debug: this.debug });
|
|
@@ -397487,7 +397804,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"100":"Continue","101":"Switching Pro
|
|
|
397487
397804
|
/***/ ((module) => {
|
|
397488
397805
|
|
|
397489
397806
|
"use strict";
|
|
397490
|
-
module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.42","main":"dist/index.js","bin":{"visor":"./dist/index.js"},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.js"},"./sdk":{"types":"./dist/sdk/sdk.d.ts","import":"./dist/sdk/sdk.mjs","require":"./dist/sdk/sdk.js"},"./cli":{"require":"./dist/index.js"}},"files":["dist/","defaults/","action.yml","README.md","LICENSE"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build:cli":"ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && cp -r docs dist/ && cp -r examples dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo \'#!/usr/bin/env node\' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js","build:sdk":"tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk","build":"./scripts/build-oss.sh","build:ee":"npm run build:cli && npm run build:sdk","test":"jest && npm run test:yaml","test:unit":"jest","prepublishOnly":"npm run build","test:watch":"jest --watch","test:coverage":"jest --coverage","test:ee":"jest --testPathPatterns=\'tests/ee\' --testPathIgnorePatterns=\'/node_modules/\' --no-coverage","test:manual:bash":"RUN_MANUAL_TESTS=true jest tests/manual/bash-config-manual.test.ts","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write src tests","format:check":"prettier --check src tests","clean":"","clean:traces":"node scripts/clean-traces.js","prebuild":"npm run clean && node scripts/generate-config-schema.js","pretest":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","pretest:unit":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","test:with-build":"npm run build:cli && jest","test:yaml":"node dist/index.js test --progress compact","test:yaml:parallel":"node dist/index.js test --progress compact --max-parallel 4","prepare":"husky","pre-commit":"lint-staged","deploy:site":"cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true","deploy:worker":"npx wrangler deploy","deploy":"npm run deploy:site && npm run deploy:worker","publish:ee":"./scripts/publish-ee.sh","release":"./scripts/release.sh","release:patch":"./scripts/release.sh patch","release:minor":"./scripts/release.sh minor","release:major":"./scripts/release.sh major","release:prerelease":"./scripts/release.sh prerelease","docs:validate":"node scripts/validate-readme-links.js","workshop:setup":"npm install -D reveal-md@6.1.2","workshop:serve":"cd workshop && reveal-md slides.md -w","workshop:export":"reveal-md workshop/slides.md --static workshop/build","workshop:pdf":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter","workshop:pdf:ci":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args=\\"--no-sandbox --disable-dev-shm-usage\\"","workshop:pdf:a4":"reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4","workshop:build":"npm run workshop:export && npm run workshop:pdf","simulate:issue":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issues --action opened --debug","simulate:comment":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issue_comment --action created --debug"},"keywords":["code-review","ai","github-action","cli","pr-review","visor"],"author":"Probe Labs","license":"MIT","description":"AI workflow engine for code review, assistants, and automation — orchestrate checks, MCP tools, and AI providers with YAML-driven pipelines","repository":{"type":"git","url":"git+https://github.com/probelabs/visor.git"},"bugs":{"url":"https://github.com/probelabs/visor/issues"},"homepage":"https://github.com/probelabs/visor#readme","dependencies":{"@actions/core":"^1.11.1","@apidevtools/swagger-parser":"^12.1.0","@modelcontextprotocol/sdk":"^1.25.3","@nyariv/sandboxjs":"github:probelabs/SandboxJS#f1c13b8eee98734a8ea024061eada4aa9a9ff2e9","@octokit/action":"^8.0.2","@octokit/auth-app":"^8.1.0","@octokit/core":"^7.0.3","@octokit/rest":"^22.0.0","@probelabs/probe":"^0.6.0-
|
|
397807
|
+
module.exports = /*#__PURE__*/JSON.parse('{"name":"@probelabs/visor","version":"0.1.42","main":"dist/index.js","bin":{"visor":"./dist/index.js"},"exports":{".":{"require":"./dist/index.js","import":"./dist/index.js"},"./sdk":{"types":"./dist/sdk/sdk.d.ts","import":"./dist/sdk/sdk.mjs","require":"./dist/sdk/sdk.js"},"./cli":{"require":"./dist/index.js"}},"files":["dist/","defaults/","action.yml","README.md","LICENSE"],"publishConfig":{"access":"public","registry":"https://registry.npmjs.org/"},"scripts":{"build:cli":"ncc build src/index.ts -o dist && cp -r defaults dist/ && cp -r output dist/ && cp -r docs dist/ && cp -r examples dist/ && cp -r src/debug-visualizer/ui dist/debug-visualizer/ && node scripts/inject-version.js && echo \'#!/usr/bin/env node\' | cat - dist/index.js > temp && mv temp dist/index.js && chmod +x dist/index.js","build:sdk":"tsup src/sdk.ts --dts --sourcemap --format esm,cjs --out-dir dist/sdk","build":"./scripts/build-oss.sh","build:ee":"npm run build:cli && npm run build:sdk","test":"jest && npm run test:yaml","test:unit":"jest","prepublishOnly":"npm run build","test:watch":"jest --watch","test:coverage":"jest --coverage","test:ee":"jest --testPathPatterns=\'tests/ee\' --testPathIgnorePatterns=\'/node_modules/\' --no-coverage","test:manual:bash":"RUN_MANUAL_TESTS=true jest tests/manual/bash-config-manual.test.ts","lint":"eslint src tests --ext .ts","lint:fix":"eslint src tests --ext .ts --fix","format":"prettier --write src tests","format:check":"prettier --check src tests","clean":"","clean:traces":"node scripts/clean-traces.js","prebuild":"npm run clean && node scripts/generate-config-schema.js","pretest":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","pretest:unit":"npm run clean:traces && node scripts/generate-config-schema.js && npm run build:cli","test:with-build":"npm run build:cli && jest","test:yaml":"node dist/index.js test --progress compact","test:yaml:parallel":"node dist/index.js test --progress compact --max-parallel 4","prepare":"husky","pre-commit":"lint-staged","deploy:site":"cd site && npx wrangler pages deploy . --project-name=visor-site --commit-dirty=true","deploy:worker":"npx wrangler deploy","deploy":"npm run deploy:site && npm run deploy:worker","publish:ee":"./scripts/publish-ee.sh","release":"./scripts/release.sh","release:patch":"./scripts/release.sh patch","release:minor":"./scripts/release.sh minor","release:major":"./scripts/release.sh major","release:prerelease":"./scripts/release.sh prerelease","docs:validate":"node scripts/validate-readme-links.js","workshop:setup":"npm install -D reveal-md@6.1.2","workshop:serve":"cd workshop && reveal-md slides.md -w","workshop:export":"reveal-md workshop/slides.md --static workshop/build","workshop:pdf":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter","workshop:pdf:ci":"reveal-md workshop/slides.md --print workshop/Visor-Workshop.pdf --print-size letter --puppeteer-launch-args=\\"--no-sandbox --disable-dev-shm-usage\\"","workshop:pdf:a4":"reveal-md workshop/slides.md --print workshop/Visor-Workshop-A4.pdf --print-size A4","workshop:build":"npm run workshop:export && npm run workshop:pdf","simulate:issue":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issues --action opened --debug","simulate:comment":"TS_NODE_TRANSPILE_ONLY=1 ts-node scripts/simulate-gh-run.ts --event issue_comment --action created --debug"},"keywords":["code-review","ai","github-action","cli","pr-review","visor"],"author":"Probe Labs","license":"MIT","description":"AI workflow engine for code review, assistants, and automation — orchestrate checks, MCP tools, and AI providers with YAML-driven pipelines","repository":{"type":"git","url":"git+https://github.com/probelabs/visor.git"},"bugs":{"url":"https://github.com/probelabs/visor/issues"},"homepage":"https://github.com/probelabs/visor#readme","dependencies":{"@actions/core":"^1.11.1","@apidevtools/swagger-parser":"^12.1.0","@modelcontextprotocol/sdk":"^1.25.3","@nyariv/sandboxjs":"github:probelabs/SandboxJS#f1c13b8eee98734a8ea024061eada4aa9a9ff2e9","@octokit/action":"^8.0.2","@octokit/auth-app":"^8.1.0","@octokit/core":"^7.0.3","@octokit/rest":"^22.0.0","@probelabs/probe":"^0.6.0-rc257","@types/commander":"^2.12.0","@types/uuid":"^10.0.0","acorn":"^8.16.0","acorn-walk":"^8.3.5","ajv":"^8.17.1","ajv-formats":"^3.0.1","better-sqlite3":"^11.0.0","blessed":"^0.1.81","cli-table3":"^0.6.5","commander":"^14.0.0","deepmerge":"^4.3.1","dotenv":"^17.2.3","ignore":"^7.0.5","js-yaml":"^4.1.0","jsonpath-plus":"^10.4.0","liquidjs":"^10.21.1","minimatch":"^10.2.2","node-cron":"^3.0.3","open":"^9.1.0","simple-git":"^3.28.0","uuid":"^11.1.0","ws":"^8.18.3"},"optionalDependencies":{"@anthropic/claude-code-sdk":"npm:null@*","@open-policy-agent/opa-wasm":"^1.10.0","@opentelemetry/api":"^1.9.0","@opentelemetry/core":"^1.30.1","@opentelemetry/exporter-trace-otlp-grpc":"^0.203.0","@opentelemetry/exporter-trace-otlp-http":"^0.203.0","@opentelemetry/instrumentation":"^0.203.0","@opentelemetry/resources":"^1.30.1","@opentelemetry/sdk-metrics":"^1.30.1","@opentelemetry/sdk-node":"^0.203.0","@opentelemetry/sdk-trace-base":"^1.30.1","@opentelemetry/semantic-conventions":"^1.30.1","knex":"^3.1.0","mysql2":"^3.11.0","pg":"^8.13.0","tedious":"^19.0.0"},"devDependencies":{"@eslint/js":"^9.34.0","@kie/act-js":"^2.6.2","@kie/mock-github":"^2.0.1","@swc/core":"^1.13.2","@swc/jest":"^0.2.37","@types/better-sqlite3":"^7.6.0","@types/blessed":"^0.1.27","@types/jest":"^30.0.0","@types/js-yaml":"^4.0.9","@types/node":"^24.3.0","@types/node-cron":"^3.0.11","@types/ws":"^8.18.1","@typescript-eslint/eslint-plugin":"^8.42.0","@typescript-eslint/parser":"^8.42.0","@vercel/ncc":"^0.38.4","eslint":"^9.34.0","eslint-config-prettier":"^10.1.8","eslint-plugin-prettier":"^5.5.4","husky":"^9.1.7","jest":"^30.1.3","lint-staged":"^16.1.6","prettier":"^3.6.2","reveal-md":"^6.1.2","ts-json-schema-generator":"^1.5.1","ts-node":"^10.9.2","tsup":"^8.5.0","typescript":"^5.9.2","wrangler":"^3.0.0"},"peerDependenciesMeta":{"@anthropic/claude-code-sdk":{"optional":true}},"directories":{"test":"tests"},"lint-staged":{"src/**/*.{ts,js}":["eslint --fix","prettier --write"],"tests/**/*.{ts,js}":["eslint --fix","prettier --write"],"*.{json,md,yml,yaml}":["prettier --write"]}}');
|
|
397491
397808
|
|
|
397492
397809
|
/***/ })
|
|
397493
397810
|
|