@probelabs/visor 0.1.146-ee → 0.1.147-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/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/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-TH25S2OB.mjs → check-provider-registry-LBYIKFYM.mjs} +6 -6
- package/dist/sdk/{check-provider-registry-WSFL2SVQ.mjs → check-provider-registry-SCPM6DIT.mjs} +7 -7
- 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-I42ZCVA5.mjs → chunk-FBJ7MC7R.mjs} +3 -3
- package/dist/sdk/{chunk-3BOOHJI5.mjs → chunk-PNZH3JSI.mjs} +66 -24
- package/dist/sdk/chunk-PNZH3JSI.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/{config-AAB2FL22.mjs → config-G5UU4WXT.mjs} +2 -2
- package/dist/sdk/{failure-condition-evaluator-O464EJMD.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-MSX6Q2WL.mjs → github-frontend-47EU2HBY.mjs} +3 -3
- package/dist/sdk/{host-5BJ25CUZ.mjs → host-GVR4UGZ3.mjs} +2 -2
- package/dist/sdk/{host-GA76UESS.mjs → host-KGN5OIAM.mjs} +2 -2
- package/dist/sdk/{loader-ZC5G3JGJ.mjs → loader-YSRMVXC3.mjs} +1 -1
- package/dist/sdk/{routing-RIHVCEIU.mjs → routing-CZ36LVVS.mjs} +4 -4
- package/dist/sdk/{schedule-tool-handler-NYL2ONJB.mjs → schedule-tool-handler-E7XHMU5G.mjs} +6 -6
- package/dist/sdk/{schedule-tool-handler-62K3NGH6.mjs → schedule-tool-handler-KFYNV7HL.mjs} +7 -7
- package/dist/sdk/sdk.js +51 -14
- package/dist/sdk/sdk.js.map +1 -1
- package/dist/sdk/sdk.mjs +5 -5
- package/dist/sdk/{trace-helpers-QQSTZGDT.mjs → trace-helpers-EHDZ42HH.mjs} +2 -2
- package/dist/sdk/{workflow-check-provider-LVUUL2PZ.mjs → workflow-check-provider-5453TW65.mjs} +6 -6
- package/dist/sdk/{workflow-check-provider-XC7E5OFH.mjs → workflow-check-provider-BSUSPFOF.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/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-3BOOHJI5.mjs.map +0 -1
- package/dist/sdk/chunk-74YJMONB.mjs.map +0 -1
- /package/dist/sdk/{check-provider-registry-TH25S2OB.mjs.map → check-provider-registry-LBYIKFYM.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-I42ZCVA5.mjs.map → chunk-FBJ7MC7R.mjs.map} +0 -0
- /package/dist/sdk/{chunk-L3XPYQ6I.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-FHNZL2US.mjs.map} +0 -0
- /package/dist/sdk/{github-frontend-MSX6Q2WL.mjs.map → github-frontend-47EU2HBY.mjs.map} +0 -0
- /package/dist/sdk/{host-5BJ25CUZ.mjs.map → host-GVR4UGZ3.mjs.map} +0 -0
- /package/dist/sdk/{host-GA76UESS.mjs.map → host-KGN5OIAM.mjs.map} +0 -0
- /package/dist/sdk/{loader-ZC5G3JGJ.mjs.map → loader-YSRMVXC3.mjs.map} +0 -0
- /package/dist/sdk/{routing-RIHVCEIU.mjs.map → routing-CZ36LVVS.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-62K3NGH6.mjs.map → schedule-tool-handler-E7XHMU5G.mjs.map} +0 -0
- /package/dist/sdk/{schedule-tool-handler-NYL2ONJB.mjs.map → schedule-tool-handler-KFYNV7HL.mjs.map} +0 -0
- /package/dist/sdk/{trace-helpers-QQSTZGDT.mjs.map → trace-helpers-EHDZ42HH.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-LVUUL2PZ.mjs.map → workflow-check-provider-5453TW65.mjs.map} +0 -0
- /package/dist/sdk/{workflow-check-provider-XC7E5OFH.mjs.map → workflow-check-provider-BSUSPFOF.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.147';
|
|
3
|
+
process.env.PROBE_VERSION = '0.6.0-rc262';
|
|
4
|
+
process.env.VISOR_COMMIT_SHA = '986bd9df126dcf4c0564d12701994e4bad407897';
|
|
5
|
+
process.env.VISOR_COMMIT_SHORT = '986bd9d';
|
|
6
6
|
/******/ (() => { // webpackBootstrap
|
|
7
7
|
/******/ var __webpack_modules__ = ({
|
|
8
8
|
|
|
@@ -160001,6 +160001,7 @@ ${'='.repeat(60)}
|
|
|
160001
160001
|
if (!systemPrompt && schema !== 'code-review') {
|
|
160002
160002
|
systemPrompt = 'You are general assistant, follow user instructions.';
|
|
160003
160003
|
}
|
|
160004
|
+
log(`🔧 AIReviewService config: allowEdit=${this.config.allowEdit}, allowBash=${this.config.allowBash}, promptType=${this.config.promptType}`);
|
|
160004
160005
|
const options = {
|
|
160005
160006
|
sessionId: sessionId,
|
|
160006
160007
|
// Prefer config promptType, then env override, else fallback to code-review when schema is set
|
|
@@ -160011,7 +160012,7 @@ ${'='.repeat(60)}
|
|
|
160011
160012
|
: schema === 'code-review'
|
|
160012
160013
|
? 'code-review-template'
|
|
160013
160014
|
: undefined,
|
|
160014
|
-
allowEdit: false, //
|
|
160015
|
+
allowEdit: false, // Default: don't allow file modifications
|
|
160015
160016
|
debug: this.config.debug || false,
|
|
160016
160017
|
// Use systemPrompt (native in rc168+) with fallback to customPrompt for backward compat
|
|
160017
160018
|
systemPrompt: systemPrompt || this.config.systemPrompt || this.config.customPrompt,
|
|
@@ -160059,6 +160060,7 @@ ${'='.repeat(60)}
|
|
|
160059
160060
|
options.fallback = this.config.fallback;
|
|
160060
160061
|
}
|
|
160061
160062
|
// Enable Edit and Create tools if configured
|
|
160063
|
+
// Enable Edit and Create tools if configured
|
|
160062
160064
|
if (this.config.allowEdit !== undefined) {
|
|
160063
160065
|
options.allowEdit = this.config.allowEdit;
|
|
160064
160066
|
}
|
|
@@ -160134,6 +160136,7 @@ ${'='.repeat(60)}
|
|
|
160134
160136
|
if (this.config.model) {
|
|
160135
160137
|
options.model = this.config.model;
|
|
160136
160138
|
}
|
|
160139
|
+
log(`🔧 ProbeAgent options: allowEdit=${options.allowEdit}, enableBash=${options.enableBash}, promptType=${options.promptType}`);
|
|
160137
160140
|
const agent = new probe_1.ProbeAgent(options);
|
|
160138
160141
|
// Initialize agent to enable CLI fallback detection (claude-code/codex)
|
|
160139
160142
|
// This must be called before agent.answer() for auto-fallback to work.
|
|
@@ -161380,6 +161383,15 @@ async function handleTestCommand(argv) {
|
|
|
161380
161383
|
// Respect --debug flag if present, or VISOR_DEBUG from environment
|
|
161381
161384
|
const debugFlag = hasFlag('--debug') || process.env.VISOR_DEBUG === 'true';
|
|
161382
161385
|
(0, logger_1.configureLoggerFromCli)({ output: 'table', debug: debugFlag, verbose: false, quiet: false });
|
|
161386
|
+
// Initialize telemetry for test runs (auto-enabled in --no-mocks mode)
|
|
161387
|
+
const telemetryEnabled = noMocks || process.env.VISOR_TELEMETRY_ENABLED === 'true';
|
|
161388
|
+
if (telemetryEnabled) {
|
|
161389
|
+
await (0, opentelemetry_1.initTelemetry)({
|
|
161390
|
+
enabled: true,
|
|
161391
|
+
sink: process.env.VISOR_TELEMETRY_SINK || 'file',
|
|
161392
|
+
file: { dir: process.env.VISOR_TRACE_DIR },
|
|
161393
|
+
});
|
|
161394
|
+
}
|
|
161383
161395
|
console.log('🧪 Visor Test Runner');
|
|
161384
161396
|
try {
|
|
161385
161397
|
const { discoverAndPrint, validateTestsOnly, VisorTestRunner, discoverSuites, runSuites } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(41585)));
|
|
@@ -161658,9 +161670,21 @@ async function handleTestCommand(argv) {
|
|
|
161658
161670
|
}
|
|
161659
161671
|
}
|
|
161660
161672
|
catch { }
|
|
161673
|
+
if (telemetryEnabled) {
|
|
161674
|
+
try {
|
|
161675
|
+
await (0, opentelemetry_1.shutdownTelemetry)();
|
|
161676
|
+
}
|
|
161677
|
+
catch { }
|
|
161678
|
+
}
|
|
161661
161679
|
process.exit(failures > 0 ? 1 : 0);
|
|
161662
161680
|
}
|
|
161663
161681
|
catch (err) {
|
|
161682
|
+
if (telemetryEnabled) {
|
|
161683
|
+
try {
|
|
161684
|
+
await (0, opentelemetry_1.shutdownTelemetry)();
|
|
161685
|
+
}
|
|
161686
|
+
catch { }
|
|
161687
|
+
}
|
|
161664
161688
|
console.error('❌ test: ' + (err instanceof Error ? err.message : String(err)));
|
|
161665
161689
|
process.exit(1);
|
|
161666
161690
|
}
|
|
@@ -161905,6 +161929,11 @@ async function main() {
|
|
|
161905
161929
|
if (authResult) {
|
|
161906
161930
|
// Inject token + git credentials into process.env for child processes
|
|
161907
161931
|
(0, github_auth_1.injectGitHubCredentials)(authResult.token);
|
|
161932
|
+
// Mark as fresh so long-running modes (Slack, scheduler) don't regenerate immediately
|
|
161933
|
+
if (authResult.authType === 'github-app') {
|
|
161934
|
+
const { markTokenFresh } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
|
|
161935
|
+
markTokenFresh();
|
|
161936
|
+
}
|
|
161908
161937
|
// Set Octokit on execution context for in-process API calls
|
|
161909
161938
|
executionContext.octokit = authResult.octokit;
|
|
161910
161939
|
logger_1.logger.info(`🔑 GitHub auth: ${authResult.authType}`);
|
|
@@ -164046,17 +164075,11 @@ class ConfigManager {
|
|
|
164046
164075
|
const { WorkflowRegistry } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(82824)));
|
|
164047
164076
|
const registry = WorkflowRegistry.getInstance();
|
|
164048
164077
|
// Import workflow files
|
|
164078
|
+
// Use override: true so config reloads pick up changes to workflow definitions
|
|
164049
164079
|
for (const source of config.imports) {
|
|
164050
|
-
const results = await registry.import(source, { basePath, validate: true });
|
|
164080
|
+
const results = await registry.import(source, { basePath, validate: true, override: true });
|
|
164051
164081
|
for (const result of results) {
|
|
164052
164082
|
if (!result.valid && result.errors) {
|
|
164053
|
-
// Check if error is just "already exists" - skip silently
|
|
164054
|
-
// This allows multiple workflows to import the same dependency
|
|
164055
|
-
const isAlreadyExists = result.errors.every(e => e.message.includes('already exists'));
|
|
164056
|
-
if (isAlreadyExists) {
|
|
164057
|
-
logger_1.logger.debug(`Workflow from '${source}' already imported, skipping`);
|
|
164058
|
-
continue;
|
|
164059
|
-
}
|
|
164060
164083
|
const errors = result.errors.map(e => ` ${e.path}: ${e.message}`).join('\n');
|
|
164061
164084
|
throw new Error(`Failed to import workflow from '${source}':\n${errors}`);
|
|
164062
164085
|
}
|
|
@@ -174264,9 +174287,16 @@ exports.createAuthenticatedOctokit = createAuthenticatedOctokit;
|
|
|
174264
174287
|
exports.resolveAuthFromEnvironment = resolveAuthFromEnvironment;
|
|
174265
174288
|
exports.resolvePrivateKey = resolvePrivateKey;
|
|
174266
174289
|
exports.injectGitHubCredentials = injectGitHubCredentials;
|
|
174290
|
+
exports.markTokenFresh = markTokenFresh;
|
|
174291
|
+
exports.refreshGitHubCredentials = refreshGitHubCredentials;
|
|
174292
|
+
exports.startTokenRefreshTimer = startTokenRefreshTimer;
|
|
174293
|
+
exports.stopTokenRefreshTimer = stopTokenRefreshTimer;
|
|
174294
|
+
exports._testSetCachedToken = _testSetCachedToken;
|
|
174295
|
+
exports._testGetCachedToken = _testGetCachedToken;
|
|
174267
174296
|
const rest_1 = __nccwpck_require__(47432);
|
|
174268
174297
|
const fs = __importStar(__nccwpck_require__(79896));
|
|
174269
174298
|
const path = __importStar(__nccwpck_require__(16928));
|
|
174299
|
+
const logger_1 = __nccwpck_require__(86999);
|
|
174270
174300
|
/**
|
|
174271
174301
|
* Create an authenticated Octokit instance.
|
|
174272
174302
|
* Returns undefined if no credentials are provided (auth is optional in CLI mode).
|
|
@@ -174365,6 +174395,11 @@ function resolvePrivateKey(keyOrPath) {
|
|
|
174365
174395
|
// Return as-is and let the auth library handle errors
|
|
174366
174396
|
return keyOrPath;
|
|
174367
174397
|
}
|
|
174398
|
+
// Track our auth entries position so repeated calls replace instead of stacking.
|
|
174399
|
+
// _authBase: the GIT_CONFIG index where our 2 auth entries start.
|
|
174400
|
+
// _lastWrittenCount: what we last set GIT_CONFIG_COUNT to (detects external changes).
|
|
174401
|
+
let _authBase;
|
|
174402
|
+
let _lastWrittenCount;
|
|
174368
174403
|
/**
|
|
174369
174404
|
* Inject GitHub credentials into process.env for child processes.
|
|
174370
174405
|
*
|
|
@@ -174376,22 +174411,148 @@ function resolvePrivateKey(keyOrPath) {
|
|
|
174376
174411
|
* - No temp files or global config mutation
|
|
174377
174412
|
* - Inherited by all child processes automatically
|
|
174378
174413
|
* - Works regardless of local git configuration
|
|
174414
|
+
*
|
|
174415
|
+
* Safe to call multiple times (e.g. on token refresh) — replaces previous entries.
|
|
174379
174416
|
*/
|
|
174380
174417
|
function injectGitHubCredentials(token) {
|
|
174381
174418
|
// Set for gh CLI and general GitHub API usage
|
|
174382
174419
|
process.env.GITHUB_TOKEN = token;
|
|
174383
174420
|
process.env.GH_TOKEN = token;
|
|
174421
|
+
const currentCount = parseInt(process.env.GIT_CONFIG_COUNT || '0', 10);
|
|
174422
|
+
// Determine where to write our 2 auth entries:
|
|
174423
|
+
// - First call: append after any pre-existing entries
|
|
174424
|
+
// - Subsequent calls with unchanged count: overwrite at same position
|
|
174425
|
+
// - If count changed externally: someone added entries, append after them
|
|
174426
|
+
let base;
|
|
174427
|
+
if (_authBase === undefined) {
|
|
174428
|
+
base = currentCount;
|
|
174429
|
+
}
|
|
174430
|
+
else if (_lastWrittenCount !== undefined && currentCount !== _lastWrittenCount) {
|
|
174431
|
+
base = currentCount;
|
|
174432
|
+
}
|
|
174433
|
+
else {
|
|
174434
|
+
base = _authBase;
|
|
174435
|
+
}
|
|
174436
|
+
_authBase = base;
|
|
174384
174437
|
// Configure git HTTPS auth via url.<base>.insteadOf
|
|
174385
|
-
// This rewrites all github.com URLs to include the access token
|
|
174386
|
-
const existingCount = parseInt(process.env.GIT_CONFIG_COUNT || '0', 10);
|
|
174387
174438
|
const authUrl = `https://x-access-token:${token}@github.com/`;
|
|
174388
174439
|
// Rewrite HTTPS URLs
|
|
174389
|
-
process.env[`GIT_CONFIG_KEY_${
|
|
174390
|
-
process.env[`GIT_CONFIG_VALUE_${
|
|
174440
|
+
process.env[`GIT_CONFIG_KEY_${base}`] = `url.${authUrl}.insteadOf`;
|
|
174441
|
+
process.env[`GIT_CONFIG_VALUE_${base}`] = 'https://github.com/';
|
|
174391
174442
|
// Rewrite SSH-style URLs (git@github.com:org/repo)
|
|
174392
|
-
process.env[`GIT_CONFIG_KEY_${
|
|
174393
|
-
process.env[`GIT_CONFIG_VALUE_${
|
|
174394
|
-
|
|
174443
|
+
process.env[`GIT_CONFIG_KEY_${base + 1}`] = `url.${authUrl}.insteadOf`;
|
|
174444
|
+
process.env[`GIT_CONFIG_VALUE_${base + 1}`] = 'git@github.com:';
|
|
174445
|
+
const newCount = base + 2;
|
|
174446
|
+
process.env.GIT_CONFIG_COUNT = String(newCount);
|
|
174447
|
+
_lastWrittenCount = newCount;
|
|
174448
|
+
}
|
|
174449
|
+
/**
|
|
174450
|
+
* Mark the current token as freshly generated (for use after initial startup auth).
|
|
174451
|
+
* Prevents the first refreshGitHubCredentials() call from unnecessarily regenerating.
|
|
174452
|
+
*/
|
|
174453
|
+
function markTokenFresh() {
|
|
174454
|
+
const token = process.env.GITHUB_TOKEN || process.env.GH_TOKEN;
|
|
174455
|
+
if (token) {
|
|
174456
|
+
_cachedAppToken = { token, generatedAt: Date.now() };
|
|
174457
|
+
}
|
|
174458
|
+
}
|
|
174459
|
+
// Cached token with generation timestamp for expiry checks
|
|
174460
|
+
let _cachedAppToken;
|
|
174461
|
+
// Installation tokens live 1 hour; refresh after 45 minutes.
|
|
174462
|
+
// Using 45 min (not 50) leaves a 15-minute buffer for long-running tasks
|
|
174463
|
+
// that start right before a refresh cycle.
|
|
174464
|
+
const TOKEN_REFRESH_MS = 45 * 60 * 1000;
|
|
174465
|
+
// Background refresh timer
|
|
174466
|
+
let _refreshTimer;
|
|
174467
|
+
// How often the background timer checks (30 minutes)
|
|
174468
|
+
const TIMER_INTERVAL_MS = 30 * 60 * 1000;
|
|
174469
|
+
/**
|
|
174470
|
+
* Refresh GitHub App installation credentials if they are about to expire.
|
|
174471
|
+
*
|
|
174472
|
+
* No-op when:
|
|
174473
|
+
* - No GitHub App credentials are configured (GITHUB_APP_ID + GITHUB_APP_PRIVATE_KEY)
|
|
174474
|
+
* - The current token was generated less than 45 minutes ago
|
|
174475
|
+
*
|
|
174476
|
+
* Call this before each execution in long-running processes (Slack bot, scheduler)
|
|
174477
|
+
* to ensure child processes always have a valid token for git/gh operations.
|
|
174478
|
+
*/
|
|
174479
|
+
async function refreshGitHubCredentials() {
|
|
174480
|
+
// Quick check: do we have App credentials?
|
|
174481
|
+
const appId = process.env.GITHUB_APP_ID;
|
|
174482
|
+
const privateKey = process.env.GITHUB_APP_PRIVATE_KEY;
|
|
174483
|
+
if (!appId || !privateKey)
|
|
174484
|
+
return;
|
|
174485
|
+
// Skip if cached token is still fresh
|
|
174486
|
+
const now = Date.now();
|
|
174487
|
+
if (_cachedAppToken && now - _cachedAppToken.generatedAt < TOKEN_REFRESH_MS) {
|
|
174488
|
+
return;
|
|
174489
|
+
}
|
|
174490
|
+
try {
|
|
174491
|
+
const opts = resolveAuthFromEnvironment();
|
|
174492
|
+
const result = await createAuthenticatedOctokit(opts);
|
|
174493
|
+
if (result && result.authType === 'github-app') {
|
|
174494
|
+
injectGitHubCredentials(result.token);
|
|
174495
|
+
_cachedAppToken = { token: result.token, generatedAt: now };
|
|
174496
|
+
logger_1.logger.debug('[github-auth] Refreshed GitHub App installation token');
|
|
174497
|
+
}
|
|
174498
|
+
}
|
|
174499
|
+
catch (err) {
|
|
174500
|
+
const age = _cachedAppToken
|
|
174501
|
+
? `${Math.round((now - _cachedAppToken.generatedAt) / 60000)}min old`
|
|
174502
|
+
: 'no cached token';
|
|
174503
|
+
logger_1.logger.warn(`[github-auth] Failed to refresh GitHub App token (${age}): ${err instanceof Error ? err.message : String(err)}. ` +
|
|
174504
|
+
'Child processes may fail with authentication errors.');
|
|
174505
|
+
}
|
|
174506
|
+
}
|
|
174507
|
+
/**
|
|
174508
|
+
* Start a background timer that refreshes GitHub App tokens every 30 minutes.
|
|
174509
|
+
*
|
|
174510
|
+
* This ensures tokens stay fresh even during long-running tasks (e.g., an engineer
|
|
174511
|
+
* task that takes 40+ minutes). Without this, a token generated at startup could
|
|
174512
|
+
* expire mid-execution of a child process.
|
|
174513
|
+
*
|
|
174514
|
+
* The timer is unref'd so it doesn't prevent Node from exiting.
|
|
174515
|
+
* Call stopTokenRefreshTimer() on shutdown.
|
|
174516
|
+
*/
|
|
174517
|
+
function startTokenRefreshTimer() {
|
|
174518
|
+
if (_refreshTimer)
|
|
174519
|
+
return; // Already running
|
|
174520
|
+
// Only start if we have App credentials
|
|
174521
|
+
const appId = process.env.GITHUB_APP_ID;
|
|
174522
|
+
const privateKey = process.env.GITHUB_APP_PRIVATE_KEY;
|
|
174523
|
+
if (!appId || !privateKey)
|
|
174524
|
+
return;
|
|
174525
|
+
_refreshTimer = setInterval(() => {
|
|
174526
|
+
refreshGitHubCredentials().catch(err => {
|
|
174527
|
+
logger_1.logger.warn(`[github-auth] Background token refresh failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
174528
|
+
});
|
|
174529
|
+
}, TIMER_INTERVAL_MS);
|
|
174530
|
+
// Don't prevent Node from exiting
|
|
174531
|
+
_refreshTimer.unref();
|
|
174532
|
+
logger_1.logger.debug('[github-auth] Background token refresh timer started (every 30 min)');
|
|
174533
|
+
}
|
|
174534
|
+
/**
|
|
174535
|
+
* Stop the background token refresh timer.
|
|
174536
|
+
*/
|
|
174537
|
+
function stopTokenRefreshTimer() {
|
|
174538
|
+
if (_refreshTimer) {
|
|
174539
|
+
clearInterval(_refreshTimer);
|
|
174540
|
+
_refreshTimer = undefined;
|
|
174541
|
+
logger_1.logger.debug('[github-auth] Background token refresh timer stopped');
|
|
174542
|
+
}
|
|
174543
|
+
}
|
|
174544
|
+
/** Visible for testing: override the cached token state. */
|
|
174545
|
+
function _testSetCachedToken(token, generatedAt) {
|
|
174546
|
+
if (token) {
|
|
174547
|
+
_cachedAppToken = { token, generatedAt: generatedAt ?? Date.now() };
|
|
174548
|
+
}
|
|
174549
|
+
else {
|
|
174550
|
+
_cachedAppToken = undefined;
|
|
174551
|
+
}
|
|
174552
|
+
}
|
|
174553
|
+
/** Visible for testing: get the current cached token info. */
|
|
174554
|
+
function _testGetCachedToken() {
|
|
174555
|
+
return _cachedAppToken;
|
|
174395
174556
|
}
|
|
174396
174557
|
|
|
174397
174558
|
|
|
@@ -191929,10 +192090,12 @@ class BubblewrapSandbox {
|
|
|
191929
192090
|
name;
|
|
191930
192091
|
config;
|
|
191931
192092
|
repoPath;
|
|
191932
|
-
|
|
192093
|
+
visorDistPath;
|
|
192094
|
+
constructor(name, config, repoPath, visorDistPath) {
|
|
191933
192095
|
this.name = name;
|
|
191934
192096
|
this.config = config;
|
|
191935
192097
|
this.repoPath = (0, path_1.resolve)(repoPath);
|
|
192098
|
+
this.visorDistPath = (0, path_1.resolve)(visorDistPath);
|
|
191936
192099
|
}
|
|
191937
192100
|
/**
|
|
191938
192101
|
* Check if bwrap binary is available on the system.
|
|
@@ -192021,6 +192184,9 @@ class BubblewrapSandbox {
|
|
|
192021
192184
|
else {
|
|
192022
192185
|
args.push('--bind', this.repoPath, workdir);
|
|
192023
192186
|
}
|
|
192187
|
+
// Visor dist mount (read-only) — required for child visor process
|
|
192188
|
+
const visorPath = this.config.visor_path || '/opt/visor';
|
|
192189
|
+
args.push('--ro-bind', this.visorDistPath, visorPath);
|
|
192024
192190
|
// Working directory inside sandbox
|
|
192025
192191
|
args.push('--chdir', workdir);
|
|
192026
192192
|
// Namespace isolation
|
|
@@ -192942,14 +193108,14 @@ class SandboxManager {
|
|
|
192942
193108
|
// Bubblewrap engine: ephemeral per-exec, no persistent container
|
|
192943
193109
|
if (config.engine === 'bubblewrap') {
|
|
192944
193110
|
const { BubblewrapSandbox } = __nccwpck_require__(11207);
|
|
192945
|
-
const instance = new BubblewrapSandbox(name, config, this.repoPath);
|
|
193111
|
+
const instance = new BubblewrapSandbox(name, config, this.repoPath, this.visorDistPath);
|
|
192946
193112
|
this.instances.set(name, instance);
|
|
192947
193113
|
return instance;
|
|
192948
193114
|
}
|
|
192949
193115
|
// Seatbelt engine: macOS sandbox-exec, ephemeral per-exec
|
|
192950
193116
|
if (config.engine === 'seatbelt') {
|
|
192951
193117
|
const { SeatbeltSandbox } = __nccwpck_require__(46429);
|
|
192952
|
-
const instance = new SeatbeltSandbox(name, config, this.repoPath);
|
|
193118
|
+
const instance = new SeatbeltSandbox(name, config, this.repoPath, this.visorDistPath);
|
|
192953
193119
|
this.instances.set(name, instance);
|
|
192954
193120
|
return instance;
|
|
192955
193121
|
}
|
|
@@ -193108,12 +193274,14 @@ class SeatbeltSandbox {
|
|
|
193108
193274
|
name;
|
|
193109
193275
|
config;
|
|
193110
193276
|
repoPath;
|
|
193111
|
-
|
|
193277
|
+
visorDistPath;
|
|
193278
|
+
constructor(name, config, repoPath, visorDistPath) {
|
|
193112
193279
|
this.name = name;
|
|
193113
193280
|
this.config = config;
|
|
193114
193281
|
// Resolve symlinks — macOS has /var → /private/var, /tmp → /private/tmp etc.
|
|
193115
193282
|
// sandbox-exec operates on real paths, so we must resolve before building profiles.
|
|
193116
193283
|
this.repoPath = (0, fs_1.realpathSync)((0, path_1.resolve)(repoPath));
|
|
193284
|
+
this.visorDistPath = (0, fs_1.realpathSync)((0, path_1.resolve)(visorDistPath));
|
|
193117
193285
|
}
|
|
193118
193286
|
/**
|
|
193119
193287
|
* Check if sandbox-exec binary is available on the system.
|
|
@@ -193226,6 +193394,9 @@ class SeatbeltSandbox {
|
|
|
193226
193394
|
if (!this.config.read_only) {
|
|
193227
193395
|
lines.push(`(allow file-write* (subpath "${repoPath}"))`);
|
|
193228
193396
|
}
|
|
193397
|
+
// Visor dist read access — required for child visor process
|
|
193398
|
+
const visorDistPath = this.escapePath(this.visorDistPath);
|
|
193399
|
+
lines.push(`(allow file-read* (subpath "${visorDistPath}"))`);
|
|
193229
193400
|
// Network access (unless explicitly disabled)
|
|
193230
193401
|
if (this.config.network !== false) {
|
|
193231
193402
|
lines.push('(allow network*)');
|
|
@@ -195427,6 +195598,39 @@ function buildScheduleToolContext(sources, availableWorkflows, permissions, outp
|
|
|
195427
195598
|
|
|
195428
195599
|
"use strict";
|
|
195429
195600
|
|
|
195601
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
195602
|
+
if (k2 === undefined) k2 = k;
|
|
195603
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
195604
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
195605
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
195606
|
+
}
|
|
195607
|
+
Object.defineProperty(o, k2, desc);
|
|
195608
|
+
}) : (function(o, m, k, k2) {
|
|
195609
|
+
if (k2 === undefined) k2 = k;
|
|
195610
|
+
o[k2] = m[k];
|
|
195611
|
+
}));
|
|
195612
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
195613
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
195614
|
+
}) : function(o, v) {
|
|
195615
|
+
o["default"] = v;
|
|
195616
|
+
});
|
|
195617
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
195618
|
+
var ownKeys = function(o) {
|
|
195619
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
195620
|
+
var ar = [];
|
|
195621
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
195622
|
+
return ar;
|
|
195623
|
+
};
|
|
195624
|
+
return ownKeys(o);
|
|
195625
|
+
};
|
|
195626
|
+
return function (mod) {
|
|
195627
|
+
if (mod && mod.__esModule) return mod;
|
|
195628
|
+
var result = {};
|
|
195629
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
195630
|
+
__setModuleDefault(result, mod);
|
|
195631
|
+
return result;
|
|
195632
|
+
};
|
|
195633
|
+
})();
|
|
195430
195634
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
195431
195635
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
195432
195636
|
};
|
|
@@ -196018,6 +196222,12 @@ class Scheduler {
|
|
|
196018
196222
|
const webhookData = new Map();
|
|
196019
196223
|
const endpoint = '/scheduler/trigger';
|
|
196020
196224
|
webhookData.set(endpoint, syntheticPayload);
|
|
196225
|
+
// Refresh GitHub App installation token (no-op if not using App auth or still fresh)
|
|
196226
|
+
try {
|
|
196227
|
+
const { refreshGitHubCredentials } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
|
|
196228
|
+
await refreshGitHubCredentials();
|
|
196229
|
+
}
|
|
196230
|
+
catch { }
|
|
196021
196231
|
// Use common preparation helper
|
|
196022
196232
|
const { engine: runEngine, config: cfgForRun } = this.prepareExecution(schedule);
|
|
196023
196233
|
// Execute the workflow
|
|
@@ -196132,6 +196342,12 @@ Please provide an updated response based on the reminder above. You may referenc
|
|
|
196132
196342
|
logger_1.logger.warn(`[Scheduler] Execution preparation failed: ${error instanceof Error ? error.message : error}`);
|
|
196133
196343
|
}
|
|
196134
196344
|
}
|
|
196345
|
+
// Refresh GitHub App installation token (no-op if not using App auth or still fresh)
|
|
196346
|
+
try {
|
|
196347
|
+
const { refreshGitHubCredentials } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
|
|
196348
|
+
await refreshGitHubCredentials();
|
|
196349
|
+
}
|
|
196350
|
+
catch { }
|
|
196135
196351
|
// Use common execution helper
|
|
196136
196352
|
const { engine: runEngine, config: cfgForRun, responseRef, } = this.prepareExecution(schedule, reminderText);
|
|
196137
196353
|
try {
|
|
@@ -198943,6 +199159,12 @@ class SlackSocketRunner {
|
|
|
198943
199159
|
catch (e) {
|
|
198944
199160
|
logger_1.logger.warn(`[SlackSocket] Scheduler init failed: ${e instanceof Error ? e.message : e}`);
|
|
198945
199161
|
}
|
|
199162
|
+
// Start background GitHub App token refresh timer (no-op if no App credentials)
|
|
199163
|
+
try {
|
|
199164
|
+
const { startTokenRefreshTimer } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
|
|
199165
|
+
startTokenRefreshTimer();
|
|
199166
|
+
}
|
|
199167
|
+
catch { }
|
|
198946
199168
|
const url = await this.openConnection();
|
|
198947
199169
|
await this.connect(url);
|
|
198948
199170
|
// Clean up stale workspace directories from previous runs
|
|
@@ -199272,6 +199494,13 @@ class SlackSocketRunner {
|
|
|
199272
199494
|
mgr.setFirstMessage(ch, rootTs, cleaned);
|
|
199273
199495
|
}
|
|
199274
199496
|
catch { }
|
|
199497
|
+
// Refresh GitHub App installation token before each run.
|
|
199498
|
+
// Installation tokens expire after 1 hour; this is a no-op if still fresh.
|
|
199499
|
+
try {
|
|
199500
|
+
const { refreshGitHubCredentials } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
|
|
199501
|
+
await refreshGitHubCredentials();
|
|
199502
|
+
}
|
|
199503
|
+
catch { }
|
|
199275
199504
|
logger_1.logger.info('[SlackSocket] Dispatching engine run for Slack event');
|
|
199276
199505
|
try {
|
|
199277
199506
|
// Rate limiting (optional)
|
|
@@ -199364,6 +199593,12 @@ class SlackSocketRunner {
|
|
|
199364
199593
|
* Stop the socket runner and clean up resources
|
|
199365
199594
|
*/
|
|
199366
199595
|
async stop() {
|
|
199596
|
+
// Stop background GitHub App token refresh
|
|
199597
|
+
try {
|
|
199598
|
+
const { stopTokenRefreshTimer } = await Promise.resolve().then(() => __importStar(__nccwpck_require__(11347)));
|
|
199599
|
+
stopTokenRefreshTimer();
|
|
199600
|
+
}
|
|
199601
|
+
catch { }
|
|
199367
199602
|
// Stop the generic scheduler if active
|
|
199368
199603
|
if (this.genericScheduler) {
|
|
199369
199604
|
try {
|
|
@@ -211544,7 +211779,8 @@ class FlowStage {
|
|
|
211544
211779
|
defaultIncludeTags;
|
|
211545
211780
|
defaultExcludeTags;
|
|
211546
211781
|
defaultFrontends;
|
|
211547
|
-
|
|
211782
|
+
noMocks;
|
|
211783
|
+
constructor(flowName, engine, recorder, cfg, prompts, promptCap, mapEventFromFixtureName, computeChecksToRun, printStageHeader, printSelectedChecks, warnUnmockedProviders, defaultIncludeTags, defaultExcludeTags, defaultFrontends, noMocks) {
|
|
211548
211784
|
this.flowName = flowName;
|
|
211549
211785
|
this.engine = engine;
|
|
211550
211786
|
this.recorder = recorder;
|
|
@@ -211559,6 +211795,7 @@ class FlowStage {
|
|
|
211559
211795
|
this.defaultIncludeTags = defaultIncludeTags;
|
|
211560
211796
|
this.defaultExcludeTags = defaultExcludeTags;
|
|
211561
211797
|
this.defaultFrontends = defaultFrontends;
|
|
211798
|
+
this.noMocks = noMocks;
|
|
211562
211799
|
}
|
|
211563
211800
|
async run(stage, flowCase, strict) {
|
|
211564
211801
|
const fixtureInput = typeof stage.fixture === 'object' && stage.fixture
|
|
@@ -211599,7 +211836,17 @@ class FlowStage {
|
|
|
211599
211836
|
this.prompts[k].push(p);
|
|
211600
211837
|
// prompts are captured for assertions only — no ad-hoc console/file output
|
|
211601
211838
|
},
|
|
211602
|
-
mockForStep: (step) =>
|
|
211839
|
+
mockForStep: (step) => {
|
|
211840
|
+
if (this.noMocks)
|
|
211841
|
+
return undefined;
|
|
211842
|
+
const raw = mockMgr.get(step);
|
|
211843
|
+
// Strip tool_calls from mock value — handled separately for stageHist injection
|
|
211844
|
+
if (raw && typeof raw === 'object' && 'tool_calls' in raw) {
|
|
211845
|
+
const { tool_calls: _unused, ...rest } = raw; // eslint-disable-line @typescript-eslint/no-unused-vars
|
|
211846
|
+
return rest;
|
|
211847
|
+
}
|
|
211848
|
+
return raw;
|
|
211849
|
+
},
|
|
211603
211850
|
},
|
|
211604
211851
|
});
|
|
211605
211852
|
// (debug cleanup) removed stage-debug prints
|
|
@@ -211765,6 +212012,26 @@ class FlowStage {
|
|
|
211765
212012
|
for (const [k, arr] of Object.entries(outHistory || {})) {
|
|
211766
212013
|
stageHist[k] = Array.isArray(arr) ? arr : [];
|
|
211767
212014
|
}
|
|
212015
|
+
// Inject synthetic outputHistory entries for tool_calls declared in mocks.
|
|
212016
|
+
// When a mock (e.g. generate-response) declares tool_calls, the AI never runs
|
|
212017
|
+
// and no workflow tools are invoked. This injects entries so the evaluator
|
|
212018
|
+
// counts them as executed steps, enabling at_least assertions in mock mode.
|
|
212019
|
+
if (!this.noMocks) {
|
|
212020
|
+
for (const [, mockVal] of Object.entries(mergedMocks)) {
|
|
212021
|
+
if (mockVal && typeof mockVal === 'object' && 'tool_calls' in mockVal) {
|
|
212022
|
+
const toolCalls = mockVal.tool_calls;
|
|
212023
|
+
if (Array.isArray(toolCalls)) {
|
|
212024
|
+
for (const tc of toolCalls) {
|
|
212025
|
+
if (tc && typeof tc === 'object' && typeof tc.step === 'string') {
|
|
212026
|
+
if (!stageHist[tc.step])
|
|
212027
|
+
stageHist[tc.step] = [];
|
|
212028
|
+
stageHist[tc.step].push(tc.output !== undefined ? tc.output : {});
|
|
212029
|
+
}
|
|
212030
|
+
}
|
|
212031
|
+
}
|
|
212032
|
+
}
|
|
212033
|
+
}
|
|
212034
|
+
}
|
|
211768
212035
|
try {
|
|
211769
212036
|
if (process.env.VISOR_DEBUG === 'true') {
|
|
211770
212037
|
const parts = Object.entries(stageHist)
|
|
@@ -212775,6 +213042,7 @@ exports.runMvp = runMvp;
|
|
|
212775
213042
|
exports.validateTestsOnly = validateTestsOnly;
|
|
212776
213043
|
const fs_1 = __importDefault(__nccwpck_require__(79896));
|
|
212777
213044
|
const path_1 = __importDefault(__nccwpck_require__(16928));
|
|
213045
|
+
const child_process_1 = __nccwpck_require__(35317);
|
|
212778
213046
|
const yaml = __importStar(__nccwpck_require__(74281));
|
|
212779
213047
|
const config_1 = __nccwpck_require__(22973);
|
|
212780
213048
|
const state_machine_execution_engine_1 = __nccwpck_require__(39004);
|
|
@@ -213004,6 +213272,36 @@ async function runSuites(files, options) {
|
|
|
213004
213272
|
function isObject(v) {
|
|
213005
213273
|
return !!v && typeof v === 'object' && !Array.isArray(v);
|
|
213006
213274
|
}
|
|
213275
|
+
function checkRequirements(requires) {
|
|
213276
|
+
if (!requires)
|
|
213277
|
+
return { met: true };
|
|
213278
|
+
const reqs = Array.isArray(requires) ? requires : [requires];
|
|
213279
|
+
for (const req of reqs) {
|
|
213280
|
+
switch (req.toLowerCase()) {
|
|
213281
|
+
case 'linux':
|
|
213282
|
+
if (process.platform !== 'linux')
|
|
213283
|
+
return { met: false, reason: `requires linux (got ${process.platform})` };
|
|
213284
|
+
break;
|
|
213285
|
+
case 'darwin':
|
|
213286
|
+
if (process.platform !== 'darwin')
|
|
213287
|
+
return { met: false, reason: `requires darwin (got ${process.platform})` };
|
|
213288
|
+
break;
|
|
213289
|
+
case 'windows':
|
|
213290
|
+
if (process.platform !== 'win32')
|
|
213291
|
+
return { met: false, reason: `requires windows (got ${process.platform})` };
|
|
213292
|
+
break;
|
|
213293
|
+
default:
|
|
213294
|
+
// Treat as tool name — check availability via `which`
|
|
213295
|
+
try {
|
|
213296
|
+
(0, child_process_1.execFileSync)('which', [req], { timeout: 5000, stdio: 'ignore' });
|
|
213297
|
+
}
|
|
213298
|
+
catch {
|
|
213299
|
+
return { met: false, reason: `'${req}' not found in PATH` };
|
|
213300
|
+
}
|
|
213301
|
+
}
|
|
213302
|
+
}
|
|
213303
|
+
return { met: true };
|
|
213304
|
+
}
|
|
213007
213305
|
class VisorTestRunner {
|
|
213008
213306
|
cwd;
|
|
213009
213307
|
constructor(cwd = process.cwd()) {
|
|
@@ -213520,7 +213818,11 @@ class VisorTestRunner {
|
|
|
213520
213818
|
const defaultIncludeTags = parseTags(defaultsAny?.tags);
|
|
213521
213819
|
const defaultExcludeTags = parseTags(defaultsAny?.exclude_tags);
|
|
213522
213820
|
// Test overrides: force AI provider to 'mock' when requested (default: mock per RFC)
|
|
213821
|
+
// In --no-mocks mode, skip the mock provider override so real AI providers execute.
|
|
213523
213822
|
const cfg = JSON.parse(JSON.stringify(config));
|
|
213823
|
+
const noMocksAll = options.noMocks || false;
|
|
213824
|
+
const noMocksForAi = !noMocksAll && options.noMocksFor ? options.noMocksFor.includes('ai') : false;
|
|
213825
|
+
const skipAiMockOverride = noMocksAll || noMocksForAi;
|
|
213524
213826
|
const allowCtxEnv = String(process.env.VISOR_TEST_ALLOW_CODE_CONTEXT || '').toLowerCase() === 'true';
|
|
213525
213827
|
const forceNoCtxEnv = String(process.env.VISOR_TEST_FORCE_NO_CODE_CONTEXT || '').toLowerCase() === 'true';
|
|
213526
213828
|
for (const name of Object.keys(cfg.checks || {})) {
|
|
@@ -213534,13 +213836,23 @@ class VisorTestRunner {
|
|
|
213534
213836
|
: allowCtxEnv
|
|
213535
213837
|
? false
|
|
213536
213838
|
: prev.skip_code_context;
|
|
213537
|
-
|
|
213538
|
-
|
|
213539
|
-
|
|
213540
|
-
|
|
213541
|
-
|
|
213542
|
-
|
|
213543
|
-
|
|
213839
|
+
if (skipAiMockOverride) {
|
|
213840
|
+
// --no-mocks or --no-mocks-for ai: keep the original provider/timeout/tools,
|
|
213841
|
+
// only apply code-context overrides if requested.
|
|
213842
|
+
chk.ai = {
|
|
213843
|
+
...prev,
|
|
213844
|
+
...(skipCtx === undefined ? {} : { skip_code_context: skipCtx }),
|
|
213845
|
+
};
|
|
213846
|
+
}
|
|
213847
|
+
else {
|
|
213848
|
+
chk.ai = {
|
|
213849
|
+
...prev,
|
|
213850
|
+
provider: aiProviderDefault,
|
|
213851
|
+
...(skipCtx === undefined ? {} : { skip_code_context: skipCtx }),
|
|
213852
|
+
disable_tools: true,
|
|
213853
|
+
timeout: Math.min(15000, prev.timeout || 15000),
|
|
213854
|
+
};
|
|
213855
|
+
}
|
|
213544
213856
|
cfg.checks[name] = chk;
|
|
213545
213857
|
}
|
|
213546
213858
|
}
|
|
@@ -213560,7 +213872,12 @@ class VisorTestRunner {
|
|
|
213560
213872
|
console.log(`Suite: ${__suiteRel}`);
|
|
213561
213873
|
if (noMocksMode) {
|
|
213562
213874
|
console.log(this.color('🔴 NO-MOCKS MODE: Running with real providers (no mock injection)', '33'));
|
|
213563
|
-
console.log(this.gray(' Step outputs will be captured and printed as suggested mocks
|
|
213875
|
+
console.log(this.gray(' Step outputs will be captured and printed as suggested mocks'));
|
|
213876
|
+
if (process.env.VISOR_TELEMETRY_ENABLED === 'true') {
|
|
213877
|
+
const traceDir = process.env.VISOR_TRACE_DIR || 'output/traces';
|
|
213878
|
+
console.log(this.gray(` Tracing enabled → ${traceDir}`));
|
|
213879
|
+
}
|
|
213880
|
+
console.log();
|
|
213564
213881
|
}
|
|
213565
213882
|
else if (noMocksForTypes && noMocksForTypes.length > 0) {
|
|
213566
213883
|
console.log(this.color(`🟡 PARTIAL-MOCK MODE: Real providers for: ${noMocksForTypes.join(', ')}`, '33'));
|
|
@@ -213578,8 +213895,14 @@ class VisorTestRunner {
|
|
|
213578
213895
|
caseResults.push({ name: _case.name, passed: true, /* annotate skip */ errors: [] });
|
|
213579
213896
|
return { name: _case.name, failed: 0 };
|
|
213580
213897
|
}
|
|
213898
|
+
const reqResult = checkRequirements(_case.requires);
|
|
213899
|
+
if (!reqResult.met) {
|
|
213900
|
+
console.log(`⏭ SKIP ${_case.name} (${reqResult.reason})`);
|
|
213901
|
+
caseResults.push({ name: _case.name, passed: true, errors: [] });
|
|
213902
|
+
return { name: _case.name, failed: 0 };
|
|
213903
|
+
}
|
|
213581
213904
|
if (Array.isArray(_case.flow) && _case.flow.length > 0) {
|
|
213582
|
-
const flowRes = await this.runFlowCase(_case, cfg, defaultStrict, options.bail || false, defaultPromptCap, stageFilter);
|
|
213905
|
+
const flowRes = await this.runFlowCase(_case, cfg, defaultStrict, options.bail || false, defaultPromptCap, stageFilter, noMocksMode);
|
|
213583
213906
|
const failed = flowRes.failures;
|
|
213584
213907
|
caseResults.push({ name: _case.name, passed: failed === 0, stages: flowRes.stages });
|
|
213585
213908
|
return { name: _case.name, failed };
|
|
@@ -213972,7 +214295,7 @@ class VisorTestRunner {
|
|
|
213972
214295
|
clearInterval(__keepAlive);
|
|
213973
214296
|
return { failures, results: caseResults };
|
|
213974
214297
|
}
|
|
213975
|
-
async runFlowCase(flowCase, cfg, defaultStrict, bail, promptCap, stageFilter) {
|
|
214298
|
+
async runFlowCase(flowCase, cfg, defaultStrict, bail, promptCap, stageFilter, noMocks) {
|
|
213976
214299
|
const suiteDefaults = this.suiteDefaults || {};
|
|
213977
214300
|
const ghRec = suiteDefaults.github_recorder;
|
|
213978
214301
|
const ghRecCase = typeof flowCase.github_recorder === 'object' && flowCase.github_recorder
|
|
@@ -214032,7 +214355,7 @@ class VisorTestRunner {
|
|
|
214032
214355
|
const suiteDefaults = this.suiteDefaults || {};
|
|
214033
214356
|
const defaultIncludeTags = parseTags(suiteDefaults?.tags);
|
|
214034
214357
|
const defaultExcludeTags = parseTags(suiteDefaults?.exclude_tags);
|
|
214035
|
-
const stageRunner = new flow_stage_1.FlowStage(flowName, engine, recorder, cfg, prompts, promptCap, this.mapEventFromFixtureName.bind(this), this.computeChecksToRun.bind(this), this.printStageHeader.bind(this), this.printSelectedChecks.bind(this), this.warnUnmockedProviders.bind(this), defaultIncludeTags, defaultExcludeTags, (suiteDefaults.frontends || undefined));
|
|
214358
|
+
const stageRunner = new flow_stage_1.FlowStage(flowName, engine, recorder, cfg, prompts, promptCap, this.mapEventFromFixtureName.bind(this), this.computeChecksToRun.bind(this), this.printStageHeader.bind(this), this.printSelectedChecks.bind(this), this.warnUnmockedProviders.bind(this), defaultIncludeTags, defaultExcludeTags, (suiteDefaults.frontends || undefined), noMocks);
|
|
214036
214359
|
const outcome = await stageRunner.run(stage, flowCase, strict);
|
|
214037
214360
|
const expect = stage.expect || {};
|
|
214038
214361
|
if (outcome.stats)
|
|
@@ -214686,6 +215009,8 @@ const schema = {
|
|
|
214686
215009
|
frontends: { type: 'array' },
|
|
214687
215010
|
workspace: { type: 'object' },
|
|
214688
215011
|
scheduler: { type: 'object' },
|
|
215012
|
+
sandboxes: { type: 'object' },
|
|
215013
|
+
sandbox: { type: 'string' },
|
|
214689
215014
|
// Workflow definition fields (for workflow files with co-located tests)
|
|
214690
215015
|
id: { type: 'string' },
|
|
214691
215016
|
name: { type: 'string' },
|
|
@@ -214775,6 +215100,9 @@ const schema = {
|
|
|
214775
215100
|
name: { type: 'string' },
|
|
214776
215101
|
description: { type: 'string' },
|
|
214777
215102
|
skip: { type: 'boolean' },
|
|
215103
|
+
requires: {
|
|
215104
|
+
oneOf: [{ type: 'string' }, { type: 'array', items: { type: 'string' } }],
|
|
215105
|
+
},
|
|
214778
215106
|
strict: { type: 'boolean' },
|
|
214779
215107
|
ai_include_code_context: { type: 'boolean' },
|
|
214780
215108
|
tags: {
|
|
@@ -215067,6 +215395,7 @@ const knownKeys = new Set([
|
|
|
215067
215395
|
'name',
|
|
215068
215396
|
'description',
|
|
215069
215397
|
'skip',
|
|
215398
|
+
'requires',
|
|
215070
215399
|
'strict',
|
|
215071
215400
|
'event',
|
|
215072
215401
|
'fixture',
|
|
@@ -222877,7 +223206,7 @@ class WorktreeManager {
|
|
|
222877
223206
|
/**
|
|
222878
223207
|
* Get or create bare repository
|
|
222879
223208
|
*/
|
|
222880
|
-
async getOrCreateBareRepo(repository, repoUrl,
|
|
223209
|
+
async getOrCreateBareRepo(repository, repoUrl, _token, fetchDepth, cloneTimeoutMs) {
|
|
222881
223210
|
const reposDir = this.getReposDir();
|
|
222882
223211
|
const repoName = repository.replace(/\//g, '-');
|
|
222883
223212
|
const bareRepoPath = path.join(reposDir, `${repoName}.git`);
|
|
@@ -222897,13 +223226,25 @@ class WorktreeManager {
|
|
|
222897
223226
|
// Fall through to clone below
|
|
222898
223227
|
}
|
|
222899
223228
|
else {
|
|
223229
|
+
// Refresh the remote URL with the current token so that fetch/push
|
|
223230
|
+
// use valid credentials. The bare repo may have been cloned with a
|
|
223231
|
+
// token that has since expired (GitHub App installation tokens live
|
|
223232
|
+
// only 1 hour). Without this, git operations inside worktrees
|
|
223233
|
+
// derived from this bare repo will fail with "Authentication failed".
|
|
223234
|
+
// If the bare repo was cloned with a token embedded in the URL,
|
|
223235
|
+
// reset it to the plain URL so git uses GIT_CONFIG insteadOf rules
|
|
223236
|
+
// for auth (which always have the freshest token).
|
|
223237
|
+
await this.resetBareRepoRemoteUrl(bareRepoPath, repoUrl);
|
|
222900
223238
|
// Update remote refs
|
|
222901
223239
|
await this.updateBareRepo(bareRepoPath);
|
|
222902
223240
|
return bareRepoPath;
|
|
222903
223241
|
}
|
|
222904
223242
|
}
|
|
222905
|
-
// Clone as bare repository
|
|
222906
|
-
|
|
223243
|
+
// Clone as bare repository — use the plain URL, not buildAuthenticatedUrl().
|
|
223244
|
+
// Auth is handled by GIT_CONFIG insteadOf rules (set by injectGitHubCredentials),
|
|
223245
|
+
// which keeps the stored origin URL token-free. This prevents stale tokens from
|
|
223246
|
+
// being baked into the bare repo's remote config.
|
|
223247
|
+
const cloneUrl = repoUrl;
|
|
222907
223248
|
const redactedUrl = this.redactUrl(cloneUrl);
|
|
222908
223249
|
logger_1.logger.info(`Cloning bare repository: ${redactedUrl}${fetchDepth ? ` (depth: ${fetchDepth})` : ''}`);
|
|
222909
223250
|
// Build clone command with optional depth
|
|
@@ -223002,6 +223343,33 @@ class WorktreeManager {
|
|
|
223002
223343
|
return false;
|
|
223003
223344
|
}
|
|
223004
223345
|
}
|
|
223346
|
+
/**
|
|
223347
|
+
* Ensure the origin remote URL of a bare repo is a plain URL (no embedded token).
|
|
223348
|
+
*
|
|
223349
|
+
* Older bare repos may have been cloned with a token in the URL
|
|
223350
|
+
* (https://x-access-token:TOKEN@github.com/...). This causes stale-token
|
|
223351
|
+
* failures because GIT_CONFIG insteadOf rules can't rewrite URLs that
|
|
223352
|
+
* already have credentials. Resetting to the plain URL lets insteadOf
|
|
223353
|
+
* handle auth with the freshest token.
|
|
223354
|
+
*/
|
|
223355
|
+
async resetBareRepoRemoteUrl(bareRepoPath, plainRepoUrl) {
|
|
223356
|
+
try {
|
|
223357
|
+
const cmd = `git -C ${this.escapeShellArg(bareRepoPath)} remote set-url origin ${this.escapeShellArg(plainRepoUrl)}`;
|
|
223358
|
+
const result = await this.executeGitCommand(cmd, { timeout: 10000 });
|
|
223359
|
+
if (result.exitCode !== 0) {
|
|
223360
|
+
logger_1.logger.warn(`Failed to reset bare repo remote URL: ${result.stderr}. ` +
|
|
223361
|
+
'Git operations may fail with stale token if the URL has embedded credentials.');
|
|
223362
|
+
}
|
|
223363
|
+
else {
|
|
223364
|
+
logger_1.logger.debug(`Reset bare repo remote URL to plain URL for ${bareRepoPath}`);
|
|
223365
|
+
}
|
|
223366
|
+
}
|
|
223367
|
+
catch (error) {
|
|
223368
|
+
const msg = error instanceof Error ? error.message : String(error);
|
|
223369
|
+
logger_1.logger.warn(`Error resetting bare repo remote URL: ${msg}. ` +
|
|
223370
|
+
'Git operations may fail with stale token if the URL has embedded credentials.');
|
|
223371
|
+
}
|
|
223372
|
+
}
|
|
223005
223373
|
/**
|
|
223006
223374
|
* Create a new worktree for the given repository/ref.
|
|
223007
223375
|
*
|
|
@@ -247171,7 +247539,7 @@ async function getPackageBinDir() {
|
|
|
247171
247539
|
}
|
|
247172
247540
|
async function findPackageRoot() {
|
|
247173
247541
|
const debug = process.env.DEBUG === "1" || process.env.VERBOSE === "1";
|
|
247174
|
-
let currentDir =
|
|
247542
|
+
let currentDir = __dirname2;
|
|
247175
247543
|
const rootDir = import_path.default.parse(currentDir).root;
|
|
247176
247544
|
if (debug) {
|
|
247177
247545
|
console.log(`DEBUG: Starting package root search from: ${currentDir}`);
|
|
@@ -247245,7 +247613,7 @@ async function canWriteToDirectory(dirPath) {
|
|
|
247245
247613
|
return false;
|
|
247246
247614
|
}
|
|
247247
247615
|
}
|
|
247248
|
-
var import_path, import_os, import_fs_extra, import_url, __filename,
|
|
247616
|
+
var import_path, import_os, import_fs_extra, import_url, __filename, __dirname2;
|
|
247249
247617
|
var init_directory_resolver = __esm({
|
|
247250
247618
|
"src/directory-resolver.js"() {
|
|
247251
247619
|
"use strict";
|
|
@@ -247254,7 +247622,7 @@ var init_directory_resolver = __esm({
|
|
|
247254
247622
|
import_fs_extra = __toESM(__nccwpck_require__(61455), 1);
|
|
247255
247623
|
import_url = __nccwpck_require__(87016);
|
|
247256
247624
|
__filename = (0, import_url.fileURLToPath)("file:///");
|
|
247257
|
-
|
|
247625
|
+
__dirname2 = import_path.default.dirname(__filename);
|
|
247258
247626
|
}
|
|
247259
247627
|
});
|
|
247260
247628
|
|
|
@@ -247877,9 +248245,9 @@ async function saveVersionInfo(version2, binDir) {
|
|
|
247877
248245
|
async function getPackageVersion() {
|
|
247878
248246
|
try {
|
|
247879
248247
|
const possiblePaths = [
|
|
247880
|
-
import_path2.default.resolve(
|
|
248248
|
+
import_path2.default.resolve(__dirname3, "..", "package.json"),
|
|
247881
248249
|
// When installed from npm: src/../package.json
|
|
247882
|
-
import_path2.default.resolve(
|
|
248250
|
+
import_path2.default.resolve(__dirname3, "..", "..", "package.json")
|
|
247883
248251
|
// In development: src/../../package.json
|
|
247884
248252
|
];
|
|
247885
248253
|
for (const packageJsonPath of possiblePaths) {
|
|
@@ -248016,7 +248384,7 @@ async function downloadProbeBinary(version2) {
|
|
|
248016
248384
|
throw sanitizeError(error2);
|
|
248017
248385
|
}
|
|
248018
248386
|
}
|
|
248019
|
-
var import_axios, import_fs_extra2, import_path2, import_crypto, import_util, import_child_process, import_tar, import_os2, import_url2, exec, REPO_OWNER, REPO_NAME, BINARY_NAME, __filename2,
|
|
248387
|
+
var import_axios, import_fs_extra2, import_path2, import_crypto, import_util, import_child_process, import_tar, import_os2, import_url2, exec, REPO_OWNER, REPO_NAME, BINARY_NAME, __filename2, __dirname3, downloadLocks, LOCK_TIMEOUT_MS, LOCK_POLL_INTERVAL_MS, MAX_LOCK_WAIT_MS;
|
|
248020
248388
|
var init_downloader = __esm({
|
|
248021
248389
|
"src/downloader.js"() {
|
|
248022
248390
|
"use strict";
|
|
@@ -248037,7 +248405,7 @@ var init_downloader = __esm({
|
|
|
248037
248405
|
REPO_NAME = "probe";
|
|
248038
248406
|
BINARY_NAME = "probe";
|
|
248039
248407
|
__filename2 = (0, import_url2.fileURLToPath)("file:///");
|
|
248040
|
-
|
|
248408
|
+
__dirname3 = import_path2.default.dirname(__filename2);
|
|
248041
248409
|
downloadLocks = /* @__PURE__ */ new Map();
|
|
248042
248410
|
LOCK_TIMEOUT_MS = 5 * 60 * 1e3;
|
|
248043
248411
|
LOCK_POLL_INTERVAL_MS = 1e3;
|
|
@@ -248059,7 +248427,7 @@ async function getBinaryPath(options = {}) {
|
|
|
248059
248427
|
}
|
|
248060
248428
|
const isWindows = process.platform === "win32";
|
|
248061
248429
|
const binaryName = isWindows ? "probe.exe" : "probe-binary";
|
|
248062
|
-
const localPackageBin = import_path3.default.resolve(
|
|
248430
|
+
const localPackageBin = import_path3.default.resolve(__dirname4, "..", "bin");
|
|
248063
248431
|
const localBinaryPath = import_path3.default.join(localPackageBin, binaryName);
|
|
248064
248432
|
if (import_fs_extra3.default.existsSync(localBinaryPath) && !forceDownload) {
|
|
248065
248433
|
probeBinaryPath = localBinaryPath;
|
|
@@ -248108,7 +248476,7 @@ function escapeString(str) {
|
|
|
248108
248476
|
return `'${str.replace(/'/g, "'\\''")}'`;
|
|
248109
248477
|
}
|
|
248110
248478
|
}
|
|
248111
|
-
var import_path3, import_fs_extra3, import_url3, __filename3,
|
|
248479
|
+
var import_path3, import_fs_extra3, import_url3, __filename3, __dirname4, probeBinaryPath;
|
|
248112
248480
|
var init_utils = __esm({
|
|
248113
248481
|
"src/utils.js"() {
|
|
248114
248482
|
"use strict";
|
|
@@ -248118,7 +248486,7 @@ var init_utils = __esm({
|
|
|
248118
248486
|
init_downloader();
|
|
248119
248487
|
init_directory_resolver();
|
|
248120
248488
|
__filename3 = (0, import_url3.fileURLToPath)("file:///");
|
|
248121
|
-
|
|
248489
|
+
__dirname4 = import_path3.default.dirname(__filename3);
|
|
248122
248490
|
probeBinaryPath = "";
|
|
248123
248491
|
}
|
|
248124
248492
|
});
|
|
@@ -266058,7 +266426,7 @@ var require_package2 = __commonJS({
|
|
|
266058
266426
|
module2.exports = {
|
|
266059
266427
|
name: "@aws-sdk/client-bedrock-runtime",
|
|
266060
266428
|
description: "AWS SDK for JavaScript Bedrock Runtime Client for Node.js, Browser and React Native",
|
|
266061
|
-
version: "3.
|
|
266429
|
+
version: "3.999.0",
|
|
266062
266430
|
scripts: {
|
|
266063
266431
|
build: "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
266064
266432
|
"build:cjs": "node ../../scripts/compilation/inline client-bedrock-runtime",
|
|
@@ -266078,21 +266446,21 @@ var require_package2 = __commonJS({
|
|
|
266078
266446
|
dependencies: {
|
|
266079
266447
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
266080
266448
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
266081
|
-
"@aws-sdk/core": "^3.973.
|
|
266082
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
266083
|
-
"@aws-sdk/eventstream-handler-node": "^3.972.
|
|
266084
|
-
"@aws-sdk/middleware-eventstream": "^3.972.
|
|
266085
|
-
"@aws-sdk/middleware-host-header": "^3.972.
|
|
266086
|
-
"@aws-sdk/middleware-logger": "^3.972.
|
|
266087
|
-
"@aws-sdk/middleware-recursion-detection": "^3.972.
|
|
266088
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
266089
|
-
"@aws-sdk/middleware-websocket": "^3.972.
|
|
266090
|
-
"@aws-sdk/region-config-resolver": "^3.972.
|
|
266091
|
-
"@aws-sdk/token-providers": "3.
|
|
266092
|
-
"@aws-sdk/types": "^3.973.
|
|
266093
|
-
"@aws-sdk/util-endpoints": "^3.996.
|
|
266094
|
-
"@aws-sdk/util-user-agent-browser": "^3.972.
|
|
266095
|
-
"@aws-sdk/util-user-agent-node": "^3.
|
|
266449
|
+
"@aws-sdk/core": "^3.973.15",
|
|
266450
|
+
"@aws-sdk/credential-provider-node": "^3.972.14",
|
|
266451
|
+
"@aws-sdk/eventstream-handler-node": "^3.972.9",
|
|
266452
|
+
"@aws-sdk/middleware-eventstream": "^3.972.6",
|
|
266453
|
+
"@aws-sdk/middleware-host-header": "^3.972.6",
|
|
266454
|
+
"@aws-sdk/middleware-logger": "^3.972.6",
|
|
266455
|
+
"@aws-sdk/middleware-recursion-detection": "^3.972.6",
|
|
266456
|
+
"@aws-sdk/middleware-user-agent": "^3.972.15",
|
|
266457
|
+
"@aws-sdk/middleware-websocket": "^3.972.10",
|
|
266458
|
+
"@aws-sdk/region-config-resolver": "^3.972.6",
|
|
266459
|
+
"@aws-sdk/token-providers": "3.999.0",
|
|
266460
|
+
"@aws-sdk/types": "^3.973.4",
|
|
266461
|
+
"@aws-sdk/util-endpoints": "^3.996.3",
|
|
266462
|
+
"@aws-sdk/util-user-agent-browser": "^3.972.6",
|
|
266463
|
+
"@aws-sdk/util-user-agent-node": "^3.973.0",
|
|
266096
266464
|
"@smithy/config-resolver": "^4.4.9",
|
|
266097
266465
|
"@smithy/core": "^3.23.6",
|
|
266098
266466
|
"@smithy/eventstream-serde-browser": "^4.2.10",
|
|
@@ -266686,7 +267054,7 @@ var require_fromHttp = __commonJS({
|
|
|
266686
267054
|
var client_1 = (init_client(), __toCommonJS(client_exports));
|
|
266687
267055
|
var node_http_handler_1 = require_dist_cjs15();
|
|
266688
267056
|
var property_provider_1 = require_dist_cjs24();
|
|
266689
|
-
var promises_1 = tslib_1.__importDefault(__nccwpck_require__(
|
|
267057
|
+
var promises_1 = tslib_1.__importDefault(__nccwpck_require__(73836));
|
|
266690
267058
|
var checkUrl_1 = require_checkUrl();
|
|
266691
267059
|
var requestHelpers_1 = require_requestHelpers();
|
|
266692
267060
|
var retry_wrapper_1 = require_retry_wrapper();
|
|
@@ -266839,7 +267207,7 @@ var init_package = __esm({
|
|
|
266839
267207
|
"node_modules/@aws-sdk/nested-clients/package.json"() {
|
|
266840
267208
|
package_default = {
|
|
266841
267209
|
name: "@aws-sdk/nested-clients",
|
|
266842
|
-
version: "3.996.
|
|
267210
|
+
version: "3.996.3",
|
|
266843
267211
|
description: "Nested clients for AWS SDK packages.",
|
|
266844
267212
|
main: "./dist-cjs/index.js",
|
|
266845
267213
|
module: "./dist-es/index.js",
|
|
@@ -266868,16 +267236,16 @@ var init_package = __esm({
|
|
|
266868
267236
|
dependencies: {
|
|
266869
267237
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
266870
267238
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
266871
|
-
"@aws-sdk/core": "^3.973.
|
|
266872
|
-
"@aws-sdk/middleware-host-header": "^3.972.
|
|
266873
|
-
"@aws-sdk/middleware-logger": "^3.972.
|
|
266874
|
-
"@aws-sdk/middleware-recursion-detection": "^3.972.
|
|
266875
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
266876
|
-
"@aws-sdk/region-config-resolver": "^3.972.
|
|
266877
|
-
"@aws-sdk/types": "^3.973.
|
|
266878
|
-
"@aws-sdk/util-endpoints": "^3.996.
|
|
266879
|
-
"@aws-sdk/util-user-agent-browser": "^3.972.
|
|
266880
|
-
"@aws-sdk/util-user-agent-node": "^3.
|
|
267239
|
+
"@aws-sdk/core": "^3.973.15",
|
|
267240
|
+
"@aws-sdk/middleware-host-header": "^3.972.6",
|
|
267241
|
+
"@aws-sdk/middleware-logger": "^3.972.6",
|
|
267242
|
+
"@aws-sdk/middleware-recursion-detection": "^3.972.6",
|
|
267243
|
+
"@aws-sdk/middleware-user-agent": "^3.972.15",
|
|
267244
|
+
"@aws-sdk/region-config-resolver": "^3.972.6",
|
|
267245
|
+
"@aws-sdk/types": "^3.973.4",
|
|
267246
|
+
"@aws-sdk/util-endpoints": "^3.996.3",
|
|
267247
|
+
"@aws-sdk/util-user-agent-browser": "^3.972.6",
|
|
267248
|
+
"@aws-sdk/util-user-agent-node": "^3.973.0",
|
|
266881
267249
|
"@smithy/config-resolver": "^4.4.9",
|
|
266882
267250
|
"@smithy/core": "^3.23.6",
|
|
266883
267251
|
"@smithy/fetch-http-handler": "^5.3.11",
|
|
@@ -266989,17 +267357,51 @@ var init_package = __esm({
|
|
|
266989
267357
|
var require_dist_cjs51 = __commonJS({
|
|
266990
267358
|
"node_modules/@aws-sdk/util-user-agent-node/dist-cjs/index.js"(exports2) {
|
|
266991
267359
|
"use strict";
|
|
266992
|
-
var
|
|
266993
|
-
var
|
|
267360
|
+
var node_os = __nccwpck_require__(48161);
|
|
267361
|
+
var node_process = __nccwpck_require__(1708);
|
|
267362
|
+
var promises = __nccwpck_require__(73836);
|
|
267363
|
+
var node_path = __nccwpck_require__(76760);
|
|
266994
267364
|
var middlewareUserAgent = require_dist_cjs29();
|
|
266995
267365
|
var getRuntimeUserAgentPair = () => {
|
|
266996
267366
|
const runtimesToCheck = ["deno", "bun", "llrt"];
|
|
266997
267367
|
for (const runtime of runtimesToCheck) {
|
|
266998
|
-
if (
|
|
266999
|
-
return [`md/${runtime}`,
|
|
267368
|
+
if (node_process.versions[runtime]) {
|
|
267369
|
+
return [`md/${runtime}`, node_process.versions[runtime]];
|
|
267370
|
+
}
|
|
267371
|
+
}
|
|
267372
|
+
return ["md/nodejs", node_process.versions.node];
|
|
267373
|
+
};
|
|
267374
|
+
var getTypeScriptPackageJsonPath = (dirname6 = "") => {
|
|
267375
|
+
let nodeModulesPath;
|
|
267376
|
+
const normalizedPath = node_path.normalize(dirname6);
|
|
267377
|
+
const parts = normalizedPath.split(node_path.sep);
|
|
267378
|
+
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
267379
|
+
if (nodeModulesIndex !== -1) {
|
|
267380
|
+
nodeModulesPath = parts.slice(0, nodeModulesIndex).join(node_path.sep);
|
|
267381
|
+
} else {
|
|
267382
|
+
nodeModulesPath = dirname6;
|
|
267383
|
+
}
|
|
267384
|
+
return node_path.join(nodeModulesPath, "node_modules", "typescript", "package.json");
|
|
267385
|
+
};
|
|
267386
|
+
var tscVersion;
|
|
267387
|
+
var getTypeScriptUserAgentPair = async () => {
|
|
267388
|
+
if (tscVersion === null) {
|
|
267389
|
+
return void 0;
|
|
267390
|
+
} else if (typeof tscVersion === "string") {
|
|
267391
|
+
return ["md/tsc", tscVersion];
|
|
267392
|
+
}
|
|
267393
|
+
try {
|
|
267394
|
+
const packageJson = await promises.readFile(getTypeScriptPackageJsonPath(__dirname), "utf-8");
|
|
267395
|
+
const { version: version2 } = JSON.parse(packageJson);
|
|
267396
|
+
if (typeof version2 !== "string") {
|
|
267397
|
+
tscVersion = null;
|
|
267398
|
+
return void 0;
|
|
267000
267399
|
}
|
|
267400
|
+
tscVersion = version2;
|
|
267401
|
+
return ["md/tsc", tscVersion];
|
|
267402
|
+
} catch {
|
|
267403
|
+
tscVersion = null;
|
|
267001
267404
|
}
|
|
267002
|
-
return ["md/nodejs", process2.versions.node];
|
|
267003
267405
|
};
|
|
267004
267406
|
var crtAvailability = {
|
|
267005
267407
|
isCrtAvailable: false
|
|
@@ -267016,10 +267418,14 @@ var require_dist_cjs51 = __commonJS({
|
|
|
267016
267418
|
const sections = [
|
|
267017
267419
|
["aws-sdk-js", clientVersion],
|
|
267018
267420
|
["ua", "2.1"],
|
|
267019
|
-
[`os/${
|
|
267421
|
+
[`os/${node_os.platform()}`, node_os.release()],
|
|
267020
267422
|
["lang/js"],
|
|
267021
267423
|
runtimeUserAgentPair
|
|
267022
267424
|
];
|
|
267425
|
+
const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
|
|
267426
|
+
if (typescriptUserAgentPair) {
|
|
267427
|
+
sections.push(typescriptUserAgentPair);
|
|
267428
|
+
}
|
|
267023
267429
|
const crtAvailable = isCrtAvailable();
|
|
267024
267430
|
if (crtAvailable) {
|
|
267025
267431
|
sections.push(crtAvailable);
|
|
@@ -267027,8 +267433,8 @@ var require_dist_cjs51 = __commonJS({
|
|
|
267027
267433
|
if (serviceId) {
|
|
267028
267434
|
sections.push([`api/${serviceId}`, clientVersion]);
|
|
267029
267435
|
}
|
|
267030
|
-
if (
|
|
267031
|
-
sections.push([`exec-env/${
|
|
267436
|
+
if (node_process.env.AWS_EXECUTION_ENV) {
|
|
267437
|
+
sections.push([`exec-env/${node_process.env.AWS_EXECUTION_ENV}`]);
|
|
267032
267438
|
}
|
|
267033
267439
|
const appId = await config?.userAgentAppId?.();
|
|
267034
267440
|
const resolvedUserAgent = appId ? [...sections, [`app/${appId}`]] : [...sections];
|
|
@@ -268102,7 +268508,7 @@ var require_dist_cjs56 = __commonJS({
|
|
|
268102
268508
|
var httpAuthSchemes = (init_httpAuthSchemes2(), __toCommonJS(httpAuthSchemes_exports));
|
|
268103
268509
|
var propertyProvider = require_dist_cjs24();
|
|
268104
268510
|
var sharedIniFileLoader = require_dist_cjs42();
|
|
268105
|
-
var
|
|
268511
|
+
var node_fs = __nccwpck_require__(73024);
|
|
268106
268512
|
var fromEnvSigningName = ({ logger: logger2, signingName } = {}) => async () => {
|
|
268107
268513
|
logger2?.debug?.("@aws-sdk/token-providers - fromEnvSigningName");
|
|
268108
268514
|
if (!signingName) {
|
|
@@ -268148,7 +268554,7 @@ var require_dist_cjs56 = __commonJS({
|
|
|
268148
268554
|
throw new propertyProvider.TokenProviderError(`Value not present for '${key}' in SSO Token${forRefresh ? ". Cannot refresh" : ""}. ${REFRESH_MESSAGE}`, false);
|
|
268149
268555
|
}
|
|
268150
268556
|
};
|
|
268151
|
-
var { writeFile: writeFile2 } =
|
|
268557
|
+
var { writeFile: writeFile2 } = node_fs.promises;
|
|
268152
268558
|
var writeSSOTokenToFile = (id, ssoToken) => {
|
|
268153
268559
|
const tokenFilepath = sharedIniFileLoader.getSSOTokenFilepath(id);
|
|
268154
268560
|
const tokenString = JSON.stringify(ssoToken, null, 2);
|
|
@@ -271270,8 +271676,8 @@ var require_dist_cjs59 = __commonJS({
|
|
|
271270
271676
|
"use strict";
|
|
271271
271677
|
var sharedIniFileLoader = require_dist_cjs42();
|
|
271272
271678
|
var propertyProvider = require_dist_cjs24();
|
|
271273
|
-
var
|
|
271274
|
-
var
|
|
271679
|
+
var node_child_process = __nccwpck_require__(31421);
|
|
271680
|
+
var node_util = __nccwpck_require__(57975);
|
|
271275
271681
|
var client = (init_client(), __toCommonJS(client_exports));
|
|
271276
271682
|
var getValidatedProcessCredentials = (profileName, data3, profiles) => {
|
|
271277
271683
|
if (data3.Version !== 1) {
|
|
@@ -271307,7 +271713,7 @@ var require_dist_cjs59 = __commonJS({
|
|
|
271307
271713
|
if (profiles[profileName]) {
|
|
271308
271714
|
const credentialProcess = profile["credential_process"];
|
|
271309
271715
|
if (credentialProcess !== void 0) {
|
|
271310
|
-
const execPromise =
|
|
271716
|
+
const execPromise = node_util.promisify(sharedIniFileLoader.externalDataInterceptor?.getTokenRecord?.().exec ?? node_child_process.exec);
|
|
271311
271717
|
try {
|
|
271312
271718
|
const { stdout } = await execPromise(credentialProcess);
|
|
271313
271719
|
let data3;
|
|
@@ -271421,7 +271827,7 @@ var require_fromTokenFile = __commonJS({
|
|
|
271421
271827
|
var client_1 = (init_client(), __toCommonJS(client_exports));
|
|
271422
271828
|
var property_provider_1 = require_dist_cjs24();
|
|
271423
271829
|
var shared_ini_file_loader_1 = require_dist_cjs42();
|
|
271424
|
-
var
|
|
271830
|
+
var node_fs_1 = __nccwpck_require__(73024);
|
|
271425
271831
|
var fromWebToken_1 = require_fromWebToken();
|
|
271426
271832
|
var ENV_TOKEN_FILE = "AWS_WEB_IDENTITY_TOKEN_FILE";
|
|
271427
271833
|
var ENV_ROLE_ARN = "AWS_ROLE_ARN";
|
|
@@ -271438,7 +271844,7 @@ var require_fromTokenFile = __commonJS({
|
|
|
271438
271844
|
}
|
|
271439
271845
|
const credentials = await (0, fromWebToken_1.fromWebToken)({
|
|
271440
271846
|
...init,
|
|
271441
|
-
webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0,
|
|
271847
|
+
webIdentityToken: shared_ini_file_loader_1.externalDataInterceptor?.getTokenRecord?.()[webIdentityTokenFile] ?? (0, node_fs_1.readFileSync)(webIdentityTokenFile, { encoding: "ascii" }),
|
|
271442
271848
|
roleArn,
|
|
271443
271849
|
roleSessionName
|
|
271444
271850
|
})(awsIdentityProperties);
|
|
@@ -284313,13 +284719,13 @@ Capabilities:
|
|
|
284313
284719
|
});
|
|
284314
284720
|
|
|
284315
284721
|
// src/agent/xmlParsingUtils.js
|
|
284316
|
-
function removeThinkingTags(xmlString) {
|
|
284722
|
+
function removeThinkingTags(xmlString, validTools = DEFAULT_VALID_TOOLS) {
|
|
284317
284723
|
let result = xmlString;
|
|
284318
284724
|
result = result.replace(/<thinking>[\s\S]*?<\/thinking>/g, "");
|
|
284319
284725
|
const thinkingIndex = result.indexOf("<thinking>");
|
|
284320
284726
|
if (thinkingIndex !== -1) {
|
|
284321
284727
|
const afterThinking = result.substring(thinkingIndex + "<thinking>".length);
|
|
284322
|
-
const toolPattern = buildToolTagPattern(
|
|
284728
|
+
const toolPattern = buildToolTagPattern(validTools);
|
|
284323
284729
|
const toolMatch = afterThinking.match(toolPattern);
|
|
284324
284730
|
if (toolMatch) {
|
|
284325
284731
|
const toolStart = thinkingIndex + "<thinking>".length + toolMatch.index;
|
|
@@ -284418,7 +284824,7 @@ function hasOtherToolTags(xmlString, validTools = []) {
|
|
|
284418
284824
|
}
|
|
284419
284825
|
function processXmlWithThinkingAndRecovery(xmlString, validTools = []) {
|
|
284420
284826
|
const thinkingContent = extractThinkingContent(xmlString);
|
|
284421
|
-
const cleanedXmlString = removeThinkingTags(xmlString);
|
|
284827
|
+
const cleanedXmlString = removeThinkingTags(xmlString, validTools.length > 0 ? validTools : void 0);
|
|
284422
284828
|
const recoveryResult = checkAttemptCompleteRecovery(cleanedXmlString, validTools);
|
|
284423
284829
|
if (process.env.DEBUG === "1" && thinkingContent) {
|
|
284424
284830
|
console.log(`[DEBUG] AI Thinking Process:
|
|
@@ -285368,31 +285774,33 @@ var init_fileTracker = __esm({
|
|
|
285368
285774
|
}
|
|
285369
285775
|
});
|
|
285370
285776
|
|
|
285371
|
-
// node_modules/balanced-match/
|
|
285372
|
-
var
|
|
285373
|
-
|
|
285374
|
-
|
|
285375
|
-
|
|
285376
|
-
|
|
285377
|
-
|
|
285378
|
-
|
|
285777
|
+
// node_modules/balanced-match/index.js
|
|
285778
|
+
var require_balanced_match = __commonJS({
|
|
285779
|
+
"node_modules/balanced-match/index.js"(exports2, module2) {
|
|
285780
|
+
"use strict";
|
|
285781
|
+
module2.exports = balanced;
|
|
285782
|
+
function balanced(a5, b5, str) {
|
|
285783
|
+
if (a5 instanceof RegExp) a5 = maybeMatch(a5, str);
|
|
285784
|
+
if (b5 instanceof RegExp) b5 = maybeMatch(b5, str);
|
|
285785
|
+
var r5 = range2(a5, b5, str);
|
|
285379
285786
|
return r5 && {
|
|
285380
285787
|
start: r5[0],
|
|
285381
285788
|
end: r5[1],
|
|
285382
285789
|
pre: str.slice(0, r5[0]),
|
|
285383
|
-
body: str.slice(r5[0] +
|
|
285384
|
-
post: str.slice(r5[1] +
|
|
285790
|
+
body: str.slice(r5[0] + a5.length, r5[1]),
|
|
285791
|
+
post: str.slice(r5[1] + b5.length)
|
|
285385
285792
|
};
|
|
285386
|
-
}
|
|
285387
|
-
maybeMatch
|
|
285388
|
-
|
|
285793
|
+
}
|
|
285794
|
+
function maybeMatch(reg, str) {
|
|
285795
|
+
var m5 = str.match(reg);
|
|
285389
285796
|
return m5 ? m5[0] : null;
|
|
285390
|
-
}
|
|
285391
|
-
|
|
285392
|
-
|
|
285393
|
-
|
|
285394
|
-
|
|
285395
|
-
|
|
285797
|
+
}
|
|
285798
|
+
balanced.range = range2;
|
|
285799
|
+
function range2(a5, b5, str) {
|
|
285800
|
+
var begs, beg, left, right, result;
|
|
285801
|
+
var ai = str.indexOf(a5);
|
|
285802
|
+
var bi = str.indexOf(b5, ai + 1);
|
|
285803
|
+
var i5 = ai;
|
|
285396
285804
|
if (ai >= 0 && bi > 0) {
|
|
285397
285805
|
if (a5 === b5) {
|
|
285398
285806
|
return [ai, bi];
|
|
@@ -285400,16 +285808,14 @@ var init_esm = __esm({
|
|
|
285400
285808
|
begs = [];
|
|
285401
285809
|
left = str.length;
|
|
285402
285810
|
while (i5 >= 0 && !result) {
|
|
285403
|
-
if (i5
|
|
285811
|
+
if (i5 == ai) {
|
|
285404
285812
|
begs.push(i5);
|
|
285405
285813
|
ai = str.indexOf(a5, i5 + 1);
|
|
285406
|
-
} else if (begs.length
|
|
285407
|
-
|
|
285408
|
-
if (r5 !== void 0)
|
|
285409
|
-
result = [r5, bi];
|
|
285814
|
+
} else if (begs.length == 1) {
|
|
285815
|
+
result = [begs.pop(), bi];
|
|
285410
285816
|
} else {
|
|
285411
285817
|
beg = begs.pop();
|
|
285412
|
-
if (beg
|
|
285818
|
+
if (beg < left) {
|
|
285413
285819
|
left = beg;
|
|
285414
285820
|
right = bi;
|
|
285415
285821
|
}
|
|
@@ -285417,179 +285823,163 @@ var init_esm = __esm({
|
|
|
285417
285823
|
}
|
|
285418
285824
|
i5 = ai < bi && ai >= 0 ? ai : bi;
|
|
285419
285825
|
}
|
|
285420
|
-
if (begs.length
|
|
285826
|
+
if (begs.length) {
|
|
285421
285827
|
result = [left, right];
|
|
285422
285828
|
}
|
|
285423
285829
|
}
|
|
285424
285830
|
return result;
|
|
285425
|
-
}
|
|
285831
|
+
}
|
|
285426
285832
|
}
|
|
285427
285833
|
});
|
|
285428
285834
|
|
|
285429
|
-
// node_modules/brace-expansion/
|
|
285430
|
-
|
|
285431
|
-
|
|
285432
|
-
|
|
285433
|
-
|
|
285434
|
-
|
|
285435
|
-
|
|
285436
|
-
|
|
285437
|
-
|
|
285438
|
-
|
|
285439
|
-
function
|
|
285440
|
-
|
|
285441
|
-
|
|
285442
|
-
|
|
285443
|
-
|
|
285444
|
-
|
|
285445
|
-
|
|
285446
|
-
|
|
285447
|
-
|
|
285448
|
-
|
|
285449
|
-
|
|
285450
|
-
|
|
285451
|
-
|
|
285452
|
-
|
|
285453
|
-
|
|
285454
|
-
|
|
285455
|
-
|
|
285456
|
-
|
|
285457
|
-
|
|
285458
|
-
|
|
285459
|
-
}
|
|
285460
|
-
|
|
285461
|
-
|
|
285462
|
-
|
|
285463
|
-
|
|
285464
|
-
|
|
285465
|
-
|
|
285466
|
-
|
|
285467
|
-
|
|
285468
|
-
|
|
285469
|
-
|
|
285470
|
-
|
|
285471
|
-
|
|
285472
|
-
}
|
|
285473
|
-
|
|
285474
|
-
|
|
285475
|
-
}
|
|
285476
|
-
function lte(i5, y2) {
|
|
285477
|
-
return i5 <= y2;
|
|
285478
|
-
}
|
|
285479
|
-
function gte(i5, y2) {
|
|
285480
|
-
return i5 >= y2;
|
|
285481
|
-
}
|
|
285482
|
-
function expand_(str, max, isTop) {
|
|
285483
|
-
const expansions = [];
|
|
285484
|
-
const m5 = balanced("{", "}", str);
|
|
285485
|
-
if (!m5)
|
|
285486
|
-
return [str];
|
|
285487
|
-
const pre = m5.pre;
|
|
285488
|
-
const post = m5.post.length ? expand_(m5.post, max, false) : [""];
|
|
285489
|
-
if (/\$$/.test(m5.pre)) {
|
|
285490
|
-
for (let k5 = 0; k5 < post.length && k5 < max; k5++) {
|
|
285491
|
-
const expansion = pre + "{" + m5.body + "}" + post[k5];
|
|
285492
|
-
expansions.push(expansion);
|
|
285835
|
+
// node_modules/brace-expansion/index.js
|
|
285836
|
+
var require_brace_expansion = __commonJS({
|
|
285837
|
+
"node_modules/brace-expansion/index.js"(exports2, module2) {
|
|
285838
|
+
var balanced = require_balanced_match();
|
|
285839
|
+
module2.exports = expandTop;
|
|
285840
|
+
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
285841
|
+
var escOpen = "\0OPEN" + Math.random() + "\0";
|
|
285842
|
+
var escClose = "\0CLOSE" + Math.random() + "\0";
|
|
285843
|
+
var escComma = "\0COMMA" + Math.random() + "\0";
|
|
285844
|
+
var escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
285845
|
+
function numeric(str) {
|
|
285846
|
+
return parseInt(str, 10) == str ? parseInt(str, 10) : str.charCodeAt(0);
|
|
285847
|
+
}
|
|
285848
|
+
function escapeBraces(str) {
|
|
285849
|
+
return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod);
|
|
285850
|
+
}
|
|
285851
|
+
function unescapeBraces(str) {
|
|
285852
|
+
return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".");
|
|
285853
|
+
}
|
|
285854
|
+
function parseCommaParts(str) {
|
|
285855
|
+
if (!str)
|
|
285856
|
+
return [""];
|
|
285857
|
+
var parts = [];
|
|
285858
|
+
var m5 = balanced("{", "}", str);
|
|
285859
|
+
if (!m5)
|
|
285860
|
+
return str.split(",");
|
|
285861
|
+
var pre = m5.pre;
|
|
285862
|
+
var body = m5.body;
|
|
285863
|
+
var post = m5.post;
|
|
285864
|
+
var p5 = pre.split(",");
|
|
285865
|
+
p5[p5.length - 1] += "{" + body + "}";
|
|
285866
|
+
var postParts = parseCommaParts(post);
|
|
285867
|
+
if (post.length) {
|
|
285868
|
+
p5[p5.length - 1] += postParts.shift();
|
|
285869
|
+
p5.push.apply(p5, postParts);
|
|
285870
|
+
}
|
|
285871
|
+
parts.push.apply(parts, p5);
|
|
285872
|
+
return parts;
|
|
285873
|
+
}
|
|
285874
|
+
function expandTop(str) {
|
|
285875
|
+
if (!str)
|
|
285876
|
+
return [];
|
|
285877
|
+
if (str.substr(0, 2) === "{}") {
|
|
285878
|
+
str = "\\{\\}" + str.substr(2);
|
|
285879
|
+
}
|
|
285880
|
+
return expand2(escapeBraces(str), true).map(unescapeBraces);
|
|
285493
285881
|
}
|
|
285494
|
-
|
|
285495
|
-
|
|
285496
|
-
|
|
285497
|
-
|
|
285498
|
-
|
|
285499
|
-
|
|
285500
|
-
|
|
285501
|
-
|
|
285502
|
-
|
|
285503
|
-
|
|
285504
|
-
return
|
|
285505
|
-
}
|
|
285506
|
-
|
|
285507
|
-
|
|
285508
|
-
|
|
285509
|
-
|
|
285510
|
-
|
|
285511
|
-
|
|
285512
|
-
|
|
285513
|
-
|
|
285514
|
-
|
|
285515
|
-
|
|
285516
|
-
|
|
285517
|
-
|
|
285518
|
-
|
|
285519
|
-
|
|
285520
|
-
|
|
285521
|
-
|
|
285522
|
-
|
|
285523
|
-
|
|
285524
|
-
|
|
285525
|
-
|
|
285526
|
-
if (reverse) {
|
|
285527
|
-
incr *= -1;
|
|
285528
|
-
test = gte;
|
|
285529
|
-
}
|
|
285530
|
-
const pad = n5.some(isPadded);
|
|
285531
|
-
N = [];
|
|
285532
|
-
for (let i5 = x5; test(i5, y2); i5 += incr) {
|
|
285533
|
-
let c5;
|
|
285534
|
-
if (isAlphaSequence) {
|
|
285535
|
-
c5 = String.fromCharCode(i5);
|
|
285536
|
-
if (c5 === "\\") {
|
|
285537
|
-
c5 = "";
|
|
285882
|
+
function embrace(str) {
|
|
285883
|
+
return "{" + str + "}";
|
|
285884
|
+
}
|
|
285885
|
+
function isPadded(el) {
|
|
285886
|
+
return /^-?0\d/.test(el);
|
|
285887
|
+
}
|
|
285888
|
+
function lte(i5, y2) {
|
|
285889
|
+
return i5 <= y2;
|
|
285890
|
+
}
|
|
285891
|
+
function gte(i5, y2) {
|
|
285892
|
+
return i5 >= y2;
|
|
285893
|
+
}
|
|
285894
|
+
function expand2(str, isTop) {
|
|
285895
|
+
var expansions = [];
|
|
285896
|
+
var m5 = balanced("{", "}", str);
|
|
285897
|
+
if (!m5) return [str];
|
|
285898
|
+
var pre = m5.pre;
|
|
285899
|
+
var post = m5.post.length ? expand2(m5.post, false) : [""];
|
|
285900
|
+
if (/\$$/.test(m5.pre)) {
|
|
285901
|
+
for (var k5 = 0; k5 < post.length; k5++) {
|
|
285902
|
+
var expansion = pre + "{" + m5.body + "}" + post[k5];
|
|
285903
|
+
expansions.push(expansion);
|
|
285904
|
+
}
|
|
285905
|
+
} else {
|
|
285906
|
+
var isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m5.body);
|
|
285907
|
+
var isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m5.body);
|
|
285908
|
+
var isSequence = isNumericSequence || isAlphaSequence;
|
|
285909
|
+
var isOptions = m5.body.indexOf(",") >= 0;
|
|
285910
|
+
if (!isSequence && !isOptions) {
|
|
285911
|
+
if (m5.post.match(/,(?!,).*\}/)) {
|
|
285912
|
+
str = m5.pre + "{" + m5.body + escClose + m5.post;
|
|
285913
|
+
return expand2(str);
|
|
285538
285914
|
}
|
|
285915
|
+
return [str];
|
|
285916
|
+
}
|
|
285917
|
+
var n5;
|
|
285918
|
+
if (isSequence) {
|
|
285919
|
+
n5 = m5.body.split(/\.\./);
|
|
285539
285920
|
} else {
|
|
285540
|
-
|
|
285541
|
-
if (
|
|
285542
|
-
|
|
285543
|
-
if (
|
|
285544
|
-
|
|
285545
|
-
|
|
285546
|
-
|
|
285547
|
-
|
|
285548
|
-
|
|
285921
|
+
n5 = parseCommaParts(m5.body);
|
|
285922
|
+
if (n5.length === 1) {
|
|
285923
|
+
n5 = expand2(n5[0], false).map(embrace);
|
|
285924
|
+
if (n5.length === 1) {
|
|
285925
|
+
return post.map(function(p5) {
|
|
285926
|
+
return m5.pre + n5[0] + p5;
|
|
285927
|
+
});
|
|
285928
|
+
}
|
|
285929
|
+
}
|
|
285930
|
+
}
|
|
285931
|
+
var N;
|
|
285932
|
+
if (isSequence) {
|
|
285933
|
+
var x5 = numeric(n5[0]);
|
|
285934
|
+
var y2 = numeric(n5[1]);
|
|
285935
|
+
var width = Math.max(n5[0].length, n5[1].length);
|
|
285936
|
+
var incr = n5.length == 3 ? Math.abs(numeric(n5[2])) : 1;
|
|
285937
|
+
var test = lte;
|
|
285938
|
+
var reverse = y2 < x5;
|
|
285939
|
+
if (reverse) {
|
|
285940
|
+
incr *= -1;
|
|
285941
|
+
test = gte;
|
|
285942
|
+
}
|
|
285943
|
+
var pad = n5.some(isPadded);
|
|
285944
|
+
N = [];
|
|
285945
|
+
for (var i5 = x5; test(i5, y2); i5 += incr) {
|
|
285946
|
+
var c5;
|
|
285947
|
+
if (isAlphaSequence) {
|
|
285948
|
+
c5 = String.fromCharCode(i5);
|
|
285949
|
+
if (c5 === "\\")
|
|
285950
|
+
c5 = "";
|
|
285951
|
+
} else {
|
|
285952
|
+
c5 = String(i5);
|
|
285953
|
+
if (pad) {
|
|
285954
|
+
var need = width - c5.length;
|
|
285955
|
+
if (need > 0) {
|
|
285956
|
+
var z2 = new Array(need + 1).join("0");
|
|
285957
|
+
if (i5 < 0)
|
|
285958
|
+
c5 = "-" + z2 + c5.slice(1);
|
|
285959
|
+
else
|
|
285960
|
+
c5 = z2 + c5;
|
|
285961
|
+
}
|
|
285549
285962
|
}
|
|
285550
285963
|
}
|
|
285964
|
+
N.push(c5);
|
|
285965
|
+
}
|
|
285966
|
+
} else {
|
|
285967
|
+
N = [];
|
|
285968
|
+
for (var j5 = 0; j5 < n5.length; j5++) {
|
|
285969
|
+
N.push.apply(N, expand2(n5[j5], false));
|
|
285551
285970
|
}
|
|
285552
285971
|
}
|
|
285553
|
-
N.
|
|
285554
|
-
|
|
285555
|
-
|
|
285556
|
-
|
|
285557
|
-
|
|
285558
|
-
|
|
285559
|
-
}
|
|
285560
|
-
}
|
|
285561
|
-
for (let j5 = 0; j5 < N.length; j5++) {
|
|
285562
|
-
for (let k5 = 0; k5 < post.length && expansions.length < max; k5++) {
|
|
285563
|
-
const expansion = pre + N[j5] + post[k5];
|
|
285564
|
-
if (!isTop || isSequence || expansion) {
|
|
285565
|
-
expansions.push(expansion);
|
|
285972
|
+
for (var j5 = 0; j5 < N.length; j5++) {
|
|
285973
|
+
for (var k5 = 0; k5 < post.length; k5++) {
|
|
285974
|
+
var expansion = pre + N[j5] + post[k5];
|
|
285975
|
+
if (!isTop || isSequence || expansion)
|
|
285976
|
+
expansions.push(expansion);
|
|
285977
|
+
}
|
|
285566
285978
|
}
|
|
285567
285979
|
}
|
|
285980
|
+
return expansions;
|
|
285568
285981
|
}
|
|
285569
285982
|
}
|
|
285570
|
-
return expansions;
|
|
285571
|
-
}
|
|
285572
|
-
var escSlash, escOpen, escClose, escComma, escPeriod, escSlashPattern, escOpenPattern, escClosePattern, escCommaPattern, escPeriodPattern, slashPattern, openPattern, closePattern, commaPattern, periodPattern, EXPANSION_MAX;
|
|
285573
|
-
var init_esm2 = __esm({
|
|
285574
|
-
"node_modules/brace-expansion/dist/esm/index.js"() {
|
|
285575
|
-
init_esm();
|
|
285576
|
-
escSlash = "\0SLASH" + Math.random() + "\0";
|
|
285577
|
-
escOpen = "\0OPEN" + Math.random() + "\0";
|
|
285578
|
-
escClose = "\0CLOSE" + Math.random() + "\0";
|
|
285579
|
-
escComma = "\0COMMA" + Math.random() + "\0";
|
|
285580
|
-
escPeriod = "\0PERIOD" + Math.random() + "\0";
|
|
285581
|
-
escSlashPattern = new RegExp(escSlash, "g");
|
|
285582
|
-
escOpenPattern = new RegExp(escOpen, "g");
|
|
285583
|
-
escClosePattern = new RegExp(escClose, "g");
|
|
285584
|
-
escCommaPattern = new RegExp(escComma, "g");
|
|
285585
|
-
escPeriodPattern = new RegExp(escPeriod, "g");
|
|
285586
|
-
slashPattern = /\\\\/g;
|
|
285587
|
-
openPattern = /\\{/g;
|
|
285588
|
-
closePattern = /\\}/g;
|
|
285589
|
-
commaPattern = /\\,/g;
|
|
285590
|
-
periodPattern = /\\./g;
|
|
285591
|
-
EXPANSION_MAX = 1e5;
|
|
285592
|
-
}
|
|
285593
285983
|
});
|
|
285594
285984
|
|
|
285595
285985
|
// node_modules/minimatch/dist/esm/assert-valid-pattern.js
|
|
@@ -286361,10 +286751,10 @@ var init_escape = __esm({
|
|
|
286361
286751
|
});
|
|
286362
286752
|
|
|
286363
286753
|
// node_modules/minimatch/dist/esm/index.js
|
|
286364
|
-
var minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path5, sep2, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
|
|
286365
|
-
var
|
|
286754
|
+
var import_brace_expansion, minimatch, starDotExtRE, starDotExtTest, starDotExtTestDot, starDotExtTestNocase, starDotExtTestNocaseDot, starDotStarRE, starDotStarTest, starDotStarTestDot, dotStarRE, dotStarTest, starRE, starTest, starTestDot, qmarksRE, qmarksTestNocase, qmarksTestNocaseDot, qmarksTestDot, qmarksTest, qmarksTestNoExt, qmarksTestNoExtDot, defaultPlatform, path5, sep2, GLOBSTAR, qmark2, star2, twoStarDot, twoStarNoDot, filter, ext, defaults, braceExpand, makeRe, match, globMagic, regExpEscape2, Minimatch;
|
|
286755
|
+
var init_esm = __esm({
|
|
286366
286756
|
"node_modules/minimatch/dist/esm/index.js"() {
|
|
286367
|
-
|
|
286757
|
+
import_brace_expansion = __toESM(require_brace_expansion(), 1);
|
|
286368
286758
|
init_assert_valid_pattern();
|
|
286369
286759
|
init_ast();
|
|
286370
286760
|
init_escape();
|
|
@@ -286487,7 +286877,7 @@ var init_esm3 = __esm({
|
|
|
286487
286877
|
if (options.nobrace || !/\{(?:(?!\{).)*\}/.test(pattern)) {
|
|
286488
286878
|
return [pattern];
|
|
286489
286879
|
}
|
|
286490
|
-
return
|
|
286880
|
+
return (0, import_brace_expansion.default)(pattern);
|
|
286491
286881
|
};
|
|
286492
286882
|
minimatch.braceExpand = braceExpand;
|
|
286493
286883
|
makeRe = (pattern, options = {}) => new Minimatch(pattern, options).makeRe();
|
|
@@ -287163,7 +287553,7 @@ var init_esm3 = __esm({
|
|
|
287163
287553
|
|
|
287164
287554
|
// node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js
|
|
287165
287555
|
var perf, warned, PROCESS, emitWarning, AC, AS, shouldWarn, TYPE, isPosInt, getUintArray, ZeroArray, Stack, LRUCache;
|
|
287166
|
-
var
|
|
287556
|
+
var init_esm2 = __esm({
|
|
287167
287557
|
"node_modules/path-scurry/node_modules/lru-cache/dist/esm/index.js"() {
|
|
287168
287558
|
perf = typeof performance === "object" && performance && typeof performance.now === "function" ? performance : Date;
|
|
287169
287559
|
warned = /* @__PURE__ */ new Set();
|
|
@@ -288537,7 +288927,7 @@ var init_esm4 = __esm({
|
|
|
288537
288927
|
|
|
288538
288928
|
// node_modules/minipass/dist/esm/index.js
|
|
288539
288929
|
var import_node_events, import_node_stream, import_node_string_decoder, proc, isStream, isReadable, isWritable, EOF, MAYBE_EMIT_END, EMITTED_END, EMITTING_END, EMITTED_ERROR, CLOSED, READ, FLUSH, FLUSHCHUNK, ENCODING, DECODER, FLOWING, PAUSED, RESUME, BUFFER, PIPES, BUFFERLENGTH, BUFFERPUSH, BUFFERSHIFT, OBJECTMODE, DESTROYED, ERROR, EMITDATA, EMITEND, EMITEND2, ASYNC, ABORT, ABORTED, SIGNAL, DATALISTENERS, DISCARDED, defer, nodefer, isEndish, isArrayBufferLike, isArrayBufferView, Pipe, PipeProxyErrors, isObjectModeOptions, isEncodingOptions, Minipass;
|
|
288540
|
-
var
|
|
288930
|
+
var init_esm3 = __esm({
|
|
288541
288931
|
"node_modules/minipass/dist/esm/index.js"() {
|
|
288542
288932
|
import_node_events = __nccwpck_require__(78474);
|
|
288543
288933
|
import_node_stream = __toESM(__nccwpck_require__(57075), 1);
|
|
@@ -289424,15 +289814,15 @@ var init_esm5 = __esm({
|
|
|
289424
289814
|
|
|
289425
289815
|
// node_modules/path-scurry/dist/esm/index.js
|
|
289426
289816
|
var import_node_path, import_node_url, import_fs6, actualFS, import_promises, realpathSync2, defaultFS, fsFromOption, uncDriveRegexp, uncToDrive, eitherSep, UNKNOWN, IFIFO, IFCHR, IFDIR, IFBLK, IFREG, IFLNK, IFSOCK, IFMT, IFMT_UNKNOWN, READDIR_CALLED, LSTAT_CALLED, ENOTDIR, ENOENT, ENOREADLINK, ENOREALPATH, ENOCHILD, TYPEMASK, entToType, normalizeCache, normalize, normalizeNocaseCache, normalizeNocase, ResolveCache, ChildrenCache, setAsCwd, PathBase, PathWin32, PathPosix, PathScurryBase, PathScurryWin32, PathScurryPosix, PathScurryDarwin, Path, PathScurry;
|
|
289427
|
-
var
|
|
289817
|
+
var init_esm4 = __esm({
|
|
289428
289818
|
"node_modules/path-scurry/dist/esm/index.js"() {
|
|
289429
|
-
|
|
289819
|
+
init_esm2();
|
|
289430
289820
|
import_node_path = __nccwpck_require__(76760);
|
|
289431
289821
|
import_node_url = __nccwpck_require__(73136);
|
|
289432
289822
|
import_fs6 = __nccwpck_require__(79896);
|
|
289433
289823
|
actualFS = __toESM(__nccwpck_require__(73024), 1);
|
|
289434
289824
|
import_promises = __nccwpck_require__(73836);
|
|
289435
|
-
|
|
289825
|
+
init_esm3();
|
|
289436
289826
|
realpathSync2 = import_fs6.realpathSync.native;
|
|
289437
289827
|
defaultFS = {
|
|
289438
289828
|
lstatSync: import_fs6.lstatSync,
|
|
@@ -291162,7 +291552,7 @@ var init_esm6 = __esm({
|
|
|
291162
291552
|
var isPatternList, isGlobList, Pattern;
|
|
291163
291553
|
var init_pattern = __esm({
|
|
291164
291554
|
"node_modules/glob/dist/esm/pattern.js"() {
|
|
291165
|
-
|
|
291555
|
+
init_esm();
|
|
291166
291556
|
isPatternList = (pl) => pl.length >= 1;
|
|
291167
291557
|
isGlobList = (gl) => gl.length >= 1;
|
|
291168
291558
|
Pattern = class _Pattern {
|
|
@@ -291333,7 +291723,7 @@ var init_pattern = __esm({
|
|
|
291333
291723
|
var defaultPlatform2, Ignore;
|
|
291334
291724
|
var init_ignore = __esm({
|
|
291335
291725
|
"node_modules/glob/dist/esm/ignore.js"() {
|
|
291336
|
-
|
|
291726
|
+
init_esm();
|
|
291337
291727
|
init_pattern();
|
|
291338
291728
|
defaultPlatform2 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
291339
291729
|
Ignore = class {
|
|
@@ -291427,7 +291817,7 @@ var init_ignore = __esm({
|
|
|
291427
291817
|
var HasWalkedCache, MatchRecord, SubWalks, Processor;
|
|
291428
291818
|
var init_processor = __esm({
|
|
291429
291819
|
"node_modules/glob/dist/esm/processor.js"() {
|
|
291430
|
-
|
|
291820
|
+
init_esm();
|
|
291431
291821
|
HasWalkedCache = class _HasWalkedCache {
|
|
291432
291822
|
store;
|
|
291433
291823
|
constructor(store = /* @__PURE__ */ new Map()) {
|
|
@@ -291654,7 +292044,7 @@ var init_processor = __esm({
|
|
|
291654
292044
|
var makeIgnore, GlobUtil, GlobWalker, GlobStream;
|
|
291655
292045
|
var init_walker = __esm({
|
|
291656
292046
|
"node_modules/glob/dist/esm/walker.js"() {
|
|
291657
|
-
|
|
292047
|
+
init_esm3();
|
|
291658
292048
|
init_ignore();
|
|
291659
292049
|
init_processor();
|
|
291660
292050
|
makeIgnore = (ignore2, opts) => typeof ignore2 === "string" ? new Ignore([ignore2], opts) : Array.isArray(ignore2) ? new Ignore(ignore2, opts) : ignore2;
|
|
@@ -291989,9 +292379,9 @@ var init_walker = __esm({
|
|
|
291989
292379
|
var import_node_url2, defaultPlatform3, Glob;
|
|
291990
292380
|
var init_glob = __esm({
|
|
291991
292381
|
"node_modules/glob/dist/esm/glob.js"() {
|
|
291992
|
-
|
|
292382
|
+
init_esm();
|
|
291993
292383
|
import_node_url2 = __nccwpck_require__(73136);
|
|
291994
|
-
|
|
292384
|
+
init_esm4();
|
|
291995
292385
|
init_pattern();
|
|
291996
292386
|
init_walker();
|
|
291997
292387
|
defaultPlatform3 = typeof process === "object" && process && typeof process.platform === "string" ? process.platform : "linux";
|
|
@@ -292199,7 +292589,7 @@ var init_glob = __esm({
|
|
|
292199
292589
|
var hasMagic;
|
|
292200
292590
|
var init_has_magic = __esm({
|
|
292201
292591
|
"node_modules/glob/dist/esm/has-magic.js"() {
|
|
292202
|
-
|
|
292592
|
+
init_esm();
|
|
292203
292593
|
hasMagic = (pattern, options = {}) => {
|
|
292204
292594
|
if (!Array.isArray(pattern)) {
|
|
292205
292595
|
pattern = [pattern];
|
|
@@ -292233,12 +292623,12 @@ function globIterate(pattern, options = {}) {
|
|
|
292233
292623
|
return new Glob(pattern, options).iterate();
|
|
292234
292624
|
}
|
|
292235
292625
|
var streamSync, stream, iterateSync, iterate, sync, glob;
|
|
292236
|
-
var
|
|
292626
|
+
var init_esm5 = __esm({
|
|
292237
292627
|
"node_modules/glob/dist/esm/index.js"() {
|
|
292238
|
-
|
|
292628
|
+
init_esm();
|
|
292239
292629
|
init_glob();
|
|
292240
292630
|
init_has_magic();
|
|
292241
|
-
|
|
292631
|
+
init_esm();
|
|
292242
292632
|
init_glob();
|
|
292243
292633
|
init_has_magic();
|
|
292244
292634
|
init_ignore();
|
|
@@ -292387,7 +292777,7 @@ var init_probeTool = __esm({
|
|
|
292387
292777
|
import_fs7 = __toESM(__nccwpck_require__(79896), 1);
|
|
292388
292778
|
import_fs8 = __nccwpck_require__(79896);
|
|
292389
292779
|
import_path8 = __toESM(__nccwpck_require__(16928), 1);
|
|
292390
|
-
|
|
292780
|
+
init_esm5();
|
|
292391
292781
|
init_symlink_utils();
|
|
292392
292782
|
toolCallEmitter = new import_events.EventEmitter();
|
|
292393
292783
|
activeToolExecutions = /* @__PURE__ */ new Map();
|
|
@@ -297798,23 +298188,23 @@ var init_regexp_parser = __esm({
|
|
|
297798
298188
|
return ASSERT_NEVER_REACH_HERE();
|
|
297799
298189
|
}
|
|
297800
298190
|
quantifier(isBacktracking = false) {
|
|
297801
|
-
let
|
|
298191
|
+
let range2 = void 0;
|
|
297802
298192
|
const begin = this.idx;
|
|
297803
298193
|
switch (this.popChar()) {
|
|
297804
298194
|
case "*":
|
|
297805
|
-
|
|
298195
|
+
range2 = {
|
|
297806
298196
|
atLeast: 0,
|
|
297807
298197
|
atMost: Infinity
|
|
297808
298198
|
};
|
|
297809
298199
|
break;
|
|
297810
298200
|
case "+":
|
|
297811
|
-
|
|
298201
|
+
range2 = {
|
|
297812
298202
|
atLeast: 1,
|
|
297813
298203
|
atMost: Infinity
|
|
297814
298204
|
};
|
|
297815
298205
|
break;
|
|
297816
298206
|
case "?":
|
|
297817
|
-
|
|
298207
|
+
range2 = {
|
|
297818
298208
|
atLeast: 0,
|
|
297819
298209
|
atMost: 1
|
|
297820
298210
|
};
|
|
@@ -297823,7 +298213,7 @@ var init_regexp_parser = __esm({
|
|
|
297823
298213
|
const atLeast = this.integerIncludingZero();
|
|
297824
298214
|
switch (this.popChar()) {
|
|
297825
298215
|
case "}":
|
|
297826
|
-
|
|
298216
|
+
range2 = {
|
|
297827
298217
|
atLeast,
|
|
297828
298218
|
atMost: atLeast
|
|
297829
298219
|
};
|
|
@@ -297832,12 +298222,12 @@ var init_regexp_parser = __esm({
|
|
|
297832
298222
|
let atMost;
|
|
297833
298223
|
if (this.isDigit()) {
|
|
297834
298224
|
atMost = this.integerIncludingZero();
|
|
297835
|
-
|
|
298225
|
+
range2 = {
|
|
297836
298226
|
atLeast,
|
|
297837
298227
|
atMost
|
|
297838
298228
|
};
|
|
297839
298229
|
} else {
|
|
297840
|
-
|
|
298230
|
+
range2 = {
|
|
297841
298231
|
atLeast,
|
|
297842
298232
|
atMost: Infinity
|
|
297843
298233
|
};
|
|
@@ -297845,25 +298235,25 @@ var init_regexp_parser = __esm({
|
|
|
297845
298235
|
this.consumeChar("}");
|
|
297846
298236
|
break;
|
|
297847
298237
|
}
|
|
297848
|
-
if (isBacktracking === true &&
|
|
298238
|
+
if (isBacktracking === true && range2 === void 0) {
|
|
297849
298239
|
return void 0;
|
|
297850
298240
|
}
|
|
297851
|
-
ASSERT_EXISTS(
|
|
298241
|
+
ASSERT_EXISTS(range2);
|
|
297852
298242
|
break;
|
|
297853
298243
|
}
|
|
297854
|
-
if (isBacktracking === true &&
|
|
298244
|
+
if (isBacktracking === true && range2 === void 0) {
|
|
297855
298245
|
return void 0;
|
|
297856
298246
|
}
|
|
297857
|
-
if (ASSERT_EXISTS(
|
|
298247
|
+
if (ASSERT_EXISTS(range2)) {
|
|
297858
298248
|
if (this.peekChar(0) === "?") {
|
|
297859
298249
|
this.consumeChar("?");
|
|
297860
|
-
|
|
298250
|
+
range2.greedy = false;
|
|
297861
298251
|
} else {
|
|
297862
|
-
|
|
298252
|
+
range2.greedy = true;
|
|
297863
298253
|
}
|
|
297864
|
-
|
|
297865
|
-
|
|
297866
|
-
return
|
|
298254
|
+
range2.type = "Quantifier";
|
|
298255
|
+
range2.loc = this.loc(begin);
|
|
298256
|
+
return range2;
|
|
297867
298257
|
}
|
|
297868
298258
|
}
|
|
297869
298259
|
atom() {
|
|
@@ -298565,18 +298955,18 @@ function firstCharOptimizedIndices(ast, result, ignoreCase) {
|
|
|
298565
298955
|
if (typeof code === "number") {
|
|
298566
298956
|
addOptimizedIdxToResult(code, result, ignoreCase);
|
|
298567
298957
|
} else {
|
|
298568
|
-
const
|
|
298958
|
+
const range2 = code;
|
|
298569
298959
|
if (ignoreCase === true) {
|
|
298570
|
-
for (let rangeCode =
|
|
298960
|
+
for (let rangeCode = range2.from; rangeCode <= range2.to; rangeCode++) {
|
|
298571
298961
|
addOptimizedIdxToResult(rangeCode, result, ignoreCase);
|
|
298572
298962
|
}
|
|
298573
298963
|
} else {
|
|
298574
|
-
for (let rangeCode =
|
|
298964
|
+
for (let rangeCode = range2.from; rangeCode <= range2.to && rangeCode < minOptimizationVal; rangeCode++) {
|
|
298575
298965
|
addOptimizedIdxToResult(rangeCode, result, ignoreCase);
|
|
298576
298966
|
}
|
|
298577
|
-
if (
|
|
298578
|
-
const minUnOptVal =
|
|
298579
|
-
const maxUnOptVal =
|
|
298967
|
+
if (range2.to >= minOptimizationVal) {
|
|
298968
|
+
const minUnOptVal = range2.from >= minOptimizationVal ? range2.from : minOptimizationVal;
|
|
298969
|
+
const maxUnOptVal = range2.to;
|
|
298580
298970
|
const minOptIdx = charCodeToOptimizedIndex(minUnOptVal);
|
|
298581
298971
|
const maxOptIdx = charCodeToOptimizedIndex(maxUnOptVal);
|
|
298582
298972
|
for (let currOptIdx = minOptIdx; currOptIdx <= maxOptIdx; currOptIdx++) {
|
|
@@ -298637,8 +299027,8 @@ function findCode(setNode, targetCharCodes) {
|
|
|
298637
299027
|
if (typeof codeOrRange === "number") {
|
|
298638
299028
|
return includes_default(targetCharCodes, codeOrRange);
|
|
298639
299029
|
} else {
|
|
298640
|
-
const
|
|
298641
|
-
return find_default(targetCharCodes, (targetCode) =>
|
|
299030
|
+
const range2 = codeOrRange;
|
|
299031
|
+
return find_default(targetCharCodes, (targetCode) => range2.from <= targetCode && targetCode <= range2.to) !== void 0;
|
|
298642
299032
|
}
|
|
298643
299033
|
});
|
|
298644
299034
|
}
|
|
@@ -316543,8 +316933,8 @@ var require_createRange = __commonJS({
|
|
|
316543
316933
|
var require_range = __commonJS({
|
|
316544
316934
|
"node_modules/lodash/range.js"(exports2, module2) {
|
|
316545
316935
|
var createRange = require_createRange();
|
|
316546
|
-
var
|
|
316547
|
-
module2.exports =
|
|
316936
|
+
var range2 = createRange();
|
|
316937
|
+
module2.exports = range2;
|
|
316548
316938
|
}
|
|
316549
316939
|
});
|
|
316550
316940
|
|
|
@@ -331397,7 +331787,7 @@ function parseEnabledServers(config) {
|
|
|
331397
331787
|
}
|
|
331398
331788
|
return servers;
|
|
331399
331789
|
}
|
|
331400
|
-
var import_fs9, import_path9, import_os3, import_url4, __filename4,
|
|
331790
|
+
var import_fs9, import_path9, import_os3, import_url4, __filename4, __dirname5, DEFAULT_TIMEOUT, MAX_TIMEOUT, DEFAULT_CONFIG;
|
|
331401
331791
|
var init_config = __esm({
|
|
331402
331792
|
"src/agent/mcp/config.js"() {
|
|
331403
331793
|
"use strict";
|
|
@@ -331406,7 +331796,7 @@ var init_config = __esm({
|
|
|
331406
331796
|
import_os3 = __nccwpck_require__(70857);
|
|
331407
331797
|
import_url4 = __nccwpck_require__(87016);
|
|
331408
331798
|
__filename4 = (0, import_url4.fileURLToPath)("file:///");
|
|
331409
|
-
|
|
331799
|
+
__dirname5 = (0, import_path9.dirname)(__filename4);
|
|
331410
331800
|
DEFAULT_TIMEOUT = 3e4;
|
|
331411
331801
|
MAX_TIMEOUT = (() => {
|
|
331412
331802
|
if (process.env.MCP_MAX_TIMEOUT) {
|
|
@@ -331420,7 +331810,7 @@ var init_config = __esm({
|
|
|
331420
331810
|
// Example probe server configuration
|
|
331421
331811
|
"probe-local": {
|
|
331422
331812
|
command: "node",
|
|
331423
|
-
args: [(0, import_path9.join)(
|
|
331813
|
+
args: [(0, import_path9.join)(__dirname5, "../../../examples/chat/mcpServer.js")],
|
|
331424
331814
|
transport: "stdio",
|
|
331425
331815
|
enabled: false
|
|
331426
331816
|
},
|
|
@@ -337004,7 +337394,7 @@ var require_compose_scalar = __commonJS({
|
|
|
337004
337394
|
var resolveBlockScalar = require_resolve_block_scalar();
|
|
337005
337395
|
var resolveFlowScalar = require_resolve_flow_scalar();
|
|
337006
337396
|
function composeScalar(ctx, token, tagToken, onError) {
|
|
337007
|
-
const { value, type, comment, range:
|
|
337397
|
+
const { value, type, comment, range: range2 } = token.type === "block-scalar" ? resolveBlockScalar.resolveBlockScalar(ctx, token, onError) : resolveFlowScalar.resolveFlowScalar(token, ctx.options.strict, onError);
|
|
337008
337398
|
const tagName = tagToken ? ctx.directives.tagName(tagToken.source, (msg) => onError(tagToken, "TAG_RESOLVE_FAILED", msg)) : null;
|
|
337009
337399
|
let tag2;
|
|
337010
337400
|
if (ctx.options.stringKeys && ctx.atKey) {
|
|
@@ -337024,7 +337414,7 @@ var require_compose_scalar = __commonJS({
|
|
|
337024
337414
|
onError(tagToken ?? token, "TAG_RESOLVE_FAILED", msg);
|
|
337025
337415
|
scalar = new Scalar.Scalar(value);
|
|
337026
337416
|
}
|
|
337027
|
-
scalar.range =
|
|
337417
|
+
scalar.range = range2;
|
|
337028
337418
|
scalar.source = value;
|
|
337029
337419
|
if (type)
|
|
337030
337420
|
scalar.type = type;
|
|
@@ -353278,7 +353668,7 @@ var init_executePlan = __esm({
|
|
|
353278
353668
|
init_query();
|
|
353279
353669
|
init_extract();
|
|
353280
353670
|
init_delegate();
|
|
353281
|
-
|
|
353671
|
+
init_esm5();
|
|
353282
353672
|
init_bash();
|
|
353283
353673
|
RAW_OUTPUT_START = "<<<RAW_OUTPUT>>>";
|
|
353284
353674
|
RAW_OUTPUT_END = "<<<END_RAW_OUTPUT>>>";
|
|
@@ -396560,7 +396950,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"100":"Continue","101":"Switching Pro
|
|
|
396560
396950
|
/***/ ((module) => {
|
|
396561
396951
|
|
|
396562
396952
|
"use strict";
|
|
396563
|
-
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","@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","@probelabs/probe":"^0.6.0-
|
|
396953
|
+
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","@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","@probelabs/probe":"^0.6.0-rc262","@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","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"]}}');
|
|
396564
396954
|
|
|
396565
396955
|
/***/ })
|
|
396566
396956
|
|