lazycodex-ai 5.0.0-beta.31 → 5.0.0-beta.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli/index.js +136 -44
- package/dist/cli-node/index.js +136 -44
- package/package.json +2 -2
- package/packages/lsp-daemon/dist/cli.js +41 -16
- package/packages/lsp-daemon/dist/client.js +41 -16
- package/packages/lsp-daemon/dist/index.js +41 -16
- package/packages/lsp-tools-mcp/dist/cli.js +41 -16
- package/packages/lsp-tools-mcp/dist/lsp/manager.js +41 -16
- package/packages/lsp-tools-mcp/dist/mcp.js +41 -16
- package/packages/lsp-tools-mcp/dist/tools.js +41 -16
- package/packages/lsp-tools-mcp/package.json +1 -1
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/package.json +1 -1
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +3 -17
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +3 -17
- package/packages/omo-codex/plugin/components/codegraph/package.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/comment-checker/package.json +1 -1
- package/packages/omo-codex/plugin/components/git-bash/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/git-bash/package.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/lazycodex-executor-verify/package.json +1 -1
- package/packages/omo-codex/plugin/components/lsp/dist/.omo-runtime-manifest.json +3 -3
- package/packages/omo-codex/plugin/components/lsp/dist/cli.js +39 -16
- package/packages/omo-codex/plugin/components/lsp/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/lsp/package.json +1 -1
- package/packages/omo-codex/plugin/components/rules/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/rules/package.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/teammode/package.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/telemetry/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/AGENTS.md +5 -4
- package/packages/omo-codex/plugin/components/ultrawork/dist/cli.js +489 -4
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -2
- package/packages/omo-codex/plugin/components/ultrawork/scripts/sync-directive.mjs +30 -14
- package/packages/omo-codex/plugin/components/ultrawork/src/directive-content.ts +4 -0
- package/packages/omo-codex/plugin/components/ultrawork/src/directive.ts +5 -2
- package/packages/omo-codex/plugin/components/ultrawork/test/directive-source.test.ts +14 -8
- package/packages/omo-codex/plugin/components/ultrawork/test/package-smoke.test.ts +12 -1
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/ulw-execute-continuation/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/AGENTS.md +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/README.md +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-continuation.js +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.d.ts +14 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-reconciliation.js +10 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-template.d.ts +8 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint-template.js +113 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/checkpoint.js +7 -5
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-commands.js +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.d.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-output.js +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli-subcommands.js +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/cli.js +775 -312
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-instruction.js +18 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.d.ts +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/codex-goal-snapshot.js +14 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/domain-types.d.ts +17 -9
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-io.js +17 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.d.ts +13 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/plan-missing-recovery.js +19 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-aggregate.d.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-aggregate.js +53 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-artifacts.d.ts +9 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-artifacts.js +85 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate-fields.js +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/dist/quality-gate.js +41 -99
- package/packages/omo-codex/plugin/components/ulw-loop/dist/review-blockers.js +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/dist/spawn-guard.js +184 -14
- package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.d.ts +6 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/status-next-actions.js +33 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/surface.d.ts +3 -0
- package/packages/omo-codex/plugin/components/ulw-loop/dist/surface.js +15 -0
- package/packages/omo-codex/plugin/components/ulw-loop/hooks/hooks.json +4 -4
- package/packages/omo-codex/plugin/components/ulw-loop/package.json +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/skills/ulw-loop/references/full-workflow.md +17 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-continuation.ts +7 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-reconciliation.ts +25 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint-template.ts +127 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/checkpoint.ts +8 -12
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-commands.ts +2 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-output.ts +1 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/cli-subcommands.ts +2 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-instruction.ts +18 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/codex-goal-snapshot.ts +23 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/domain-types.ts +19 -9
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-io.ts +18 -3
- package/packages/omo-codex/plugin/components/ulw-loop/src/plan-missing-recovery.ts +27 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-aggregate.ts +57 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-artifacts.ts +103 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate-fields.ts +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/src/quality-gate.ts +50 -116
- package/packages/omo-codex/plugin/components/ulw-loop/src/review-blockers.ts +4 -2
- package/packages/omo-codex/plugin/components/ulw-loop/src/spawn-guard.ts +186 -12
- package/packages/omo-codex/plugin/components/ulw-loop/src/status-next-actions.ts +36 -0
- package/packages/omo-codex/plugin/components/ulw-loop/src/surface.ts +22 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-final.test.ts +66 -3
- package/packages/omo-codex/plugin/components/ulw-loop/test/checkpoint-template.test.ts +92 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/cli-status-next-actions.test.ts +183 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/codex-goal-instruction.test.ts +13 -3
- package/packages/omo-codex/plugin/components/ulw-loop/test/guided-recovery.test.ts +105 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-aggregate.test.ts +101 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-roles.test.ts +16 -15
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate-senpi-surface.test.ts +131 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/quality-gate.test.ts +5 -0
- package/packages/omo-codex/plugin/components/ulw-loop/test/spawn-guard.test.ts +300 -3
- package/packages/omo-codex/plugin/components/ulw-loop/test/ultrawork-directive.test.ts +9 -3
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-git-bash-mcp-reminder.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-lsp-diagnostics-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-compact-resetting-project-rule-cache.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-codegraph-init-guidance.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-comments.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-lsp-diagnostics.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-checking-thread-title-hygiene.json +1 -1
- package/packages/omo-codex/plugin/hooks/post-tool-use-matching-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-enforcing-unlimited-goal-budget.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-guarding-ulw-loop-spawns.json +1 -1
- package/packages/omo-codex/plugin/hooks/pre-tool-use-recommending-git-bash-mcp.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-auto-update.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-bootstrap-provisioning.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-checking-codegraph-bootstrap.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/hooks/session-start-recording-session-telemetry.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/stop-checking-ulw-loop-resume.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-checking-ulw-execute-continuation.json +1 -1
- package/packages/omo-codex/plugin/hooks/subagent-stop-verifying-lazycodex-executor-evidence.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ultrawork-trigger.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-checking-ulw-loop-steering.json +1 -1
- package/packages/omo-codex/plugin/hooks/user-prompt-submit-loading-project-rules.json +1 -1
- package/packages/omo-codex/plugin/package-lock.json +13 -13
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/scripts/sync-skills.mjs +31 -2
- package/packages/omo-codex/plugin/skills/ultimate-browsing/references/insane-search/README.md +9 -2
- package/packages/omo-codex/plugin/skills/ulw-loop/references/full-workflow.md +17 -0
- package/packages/omo-codex/plugin/test/sync-skills-test-support.mjs +11 -1
- package/packages/omo-codex/plugin/test/sync-skills.test.mjs +13 -0
- package/packages/omo-codex/plugin/test/ultrawork-skill-pointer.test.mjs +5 -2
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +2 -2
- package/packages/shared-skills/skills/ultimate-browsing/references/insane-search/README.md +9 -2
- package/packages/omo-codex/plugin/components/ultrawork/directive.md +0 -483
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +0 -490
|
@@ -284,6 +284,13 @@ import { pathToFileURL as pathToFileURL3 } from "node:url";
|
|
|
284
284
|
// ../lsp-core/src/lsp/connection.ts
|
|
285
285
|
import { pathToFileURL } from "node:url";
|
|
286
286
|
|
|
287
|
+
// ../lsp-core/src/lsp/timer-provider.ts
|
|
288
|
+
var realTimerProvider = {
|
|
289
|
+
now: () => Date.now(),
|
|
290
|
+
setTimeout: (callback, delayMs) => setTimeout(callback, delayMs),
|
|
291
|
+
clearTimeout: (handle) => clearTimeout(handle)
|
|
292
|
+
};
|
|
293
|
+
|
|
287
294
|
// ../lsp-core/src/lsp/constants.ts
|
|
288
295
|
var DEFAULT_MAX_REFERENCES = 200;
|
|
289
296
|
var DEFAULT_MAX_SYMBOLS = 200;
|
|
@@ -823,6 +830,7 @@ class LspClientTransport {
|
|
|
823
830
|
this.documentFormattingSupported = false;
|
|
824
831
|
this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
|
|
825
832
|
this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
833
|
+
this.timerProvider = timeouts.timerProvider ?? realTimerProvider;
|
|
826
834
|
}
|
|
827
835
|
pid() {
|
|
828
836
|
return this.proc?.pid;
|
|
@@ -923,7 +931,7 @@ class LspClientTransport {
|
|
|
923
931
|
const options = args[1];
|
|
924
932
|
const timeoutMs = options?.timeoutMs ?? this.requestTimeoutMs;
|
|
925
933
|
const timeoutController = new AbortController;
|
|
926
|
-
const timeoutHandle = setTimeout(() => {
|
|
934
|
+
const timeoutHandle = this.timerProvider.setTimeout(() => {
|
|
927
935
|
const stderrTail = this.stderrBuffer.slice(-5).join(`
|
|
928
936
|
`);
|
|
929
937
|
timeoutController.abort(new LspRequestTimeoutError(method, stderrTail || undefined));
|
|
@@ -942,7 +950,7 @@ class LspClientTransport {
|
|
|
942
950
|
}
|
|
943
951
|
throw error;
|
|
944
952
|
} finally {
|
|
945
|
-
clearTimeout(timeoutHandle);
|
|
953
|
+
this.timerProvider.clearTimeout(timeoutHandle);
|
|
946
954
|
combinedSignal.dispose();
|
|
947
955
|
}
|
|
948
956
|
}
|
|
@@ -1323,6 +1331,17 @@ function canonicalPath(filePath) {
|
|
|
1323
1331
|
return absolute;
|
|
1324
1332
|
}
|
|
1325
1333
|
}
|
|
1334
|
+
function normalizeDocumentUri(uri) {
|
|
1335
|
+
let decoded = uri;
|
|
1336
|
+
try {
|
|
1337
|
+
decoded = decodeURIComponent(uri);
|
|
1338
|
+
} catch {
|
|
1339
|
+
decoded = uri;
|
|
1340
|
+
}
|
|
1341
|
+
if (process.platform !== "win32")
|
|
1342
|
+
return decoded;
|
|
1343
|
+
return decoded.replace(/^(file:\/\/\/)([a-z]):/, (_match, prefix, drive) => `${prefix}${drive.toUpperCase()}:`);
|
|
1344
|
+
}
|
|
1326
1345
|
function isSameOrDescendant(candidate, parent) {
|
|
1327
1346
|
const suffix = relative2(parent, candidate);
|
|
1328
1347
|
return suffix === "" || !suffix.startsWith("..") && suffix !== "..";
|
|
@@ -1339,7 +1358,12 @@ class WorkspaceDocumentState {
|
|
|
1339
1358
|
this.openDocuments = new Map;
|
|
1340
1359
|
this.openByUri = new Map;
|
|
1341
1360
|
this.openPromises = new Map;
|
|
1342
|
-
this.
|
|
1361
|
+
this.timerProvider = options.timerProvider ?? {
|
|
1362
|
+
now: options.now ?? (() => Date.now()),
|
|
1363
|
+
setTimeout: (callback, delayMs) => setTimeout(callback, delayMs),
|
|
1364
|
+
clearTimeout: (handle) => clearTimeout(handle)
|
|
1365
|
+
};
|
|
1366
|
+
this.now = () => this.timerProvider.now();
|
|
1343
1367
|
this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
|
|
1344
1368
|
}
|
|
1345
1369
|
async openFile(filePath) {
|
|
@@ -1361,7 +1385,7 @@ class WorkspaceDocumentState {
|
|
|
1361
1385
|
return this.openDocuments.get(canonicalPath(filePath))?.version;
|
|
1362
1386
|
}
|
|
1363
1387
|
getStoredDiagnostics(uri) {
|
|
1364
|
-
const state = this.openByUri.get(uri);
|
|
1388
|
+
const state = this.openByUri.get(normalizeDocumentUri(uri));
|
|
1365
1389
|
if (!state)
|
|
1366
1390
|
return [];
|
|
1367
1391
|
return state.lastPublish?.diagnostics ?? state.pullCache?.diagnostics ?? [];
|
|
@@ -1383,13 +1407,13 @@ class WorkspaceDocumentState {
|
|
|
1383
1407
|
return state !== undefined && state.uri === snapshot.uri && state.version === snapshot.version && state.generation === snapshot.documentGeneration;
|
|
1384
1408
|
}
|
|
1385
1409
|
getPullCache(snapshot) {
|
|
1386
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1410
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1387
1411
|
if (!state?.pullCache || state.pullCache.documentVersion !== snapshot.version)
|
|
1388
1412
|
return null;
|
|
1389
1413
|
return state.pullCache;
|
|
1390
1414
|
}
|
|
1391
1415
|
recordPullDiagnostics(snapshot, report) {
|
|
1392
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1416
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1393
1417
|
if (!state)
|
|
1394
1418
|
return;
|
|
1395
1419
|
state.pullCache = {
|
|
@@ -1399,7 +1423,7 @@ class WorkspaceDocumentState {
|
|
|
1399
1423
|
};
|
|
1400
1424
|
}
|
|
1401
1425
|
recordPublishedDiagnostics(params) {
|
|
1402
|
-
const state = this.openByUri.get(params.uri);
|
|
1426
|
+
const state = this.openByUri.get(normalizeDocumentUri(params.uri));
|
|
1403
1427
|
if (!state)
|
|
1404
1428
|
return;
|
|
1405
1429
|
state.publishGeneration += 1;
|
|
@@ -1413,7 +1437,7 @@ class WorkspaceDocumentState {
|
|
|
1413
1437
|
this.notifyWaiters(state);
|
|
1414
1438
|
}
|
|
1415
1439
|
resolvePushDiagnostics(snapshot) {
|
|
1416
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1440
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1417
1441
|
if (!state?.lastPublish)
|
|
1418
1442
|
return { status: "missing" };
|
|
1419
1443
|
const publish = state.lastPublish;
|
|
@@ -1427,7 +1451,7 @@ class WorkspaceDocumentState {
|
|
|
1427
1451
|
return waitMs === 0 ? { status: "ready", diagnostics: publish.diagnostics } : { status: "wait", waitMs };
|
|
1428
1452
|
}
|
|
1429
1453
|
waitForDiagnosticsActivity(snapshot, timeoutMs) {
|
|
1430
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1454
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1431
1455
|
if (!state || timeoutMs <= 0)
|
|
1432
1456
|
return Promise.resolve();
|
|
1433
1457
|
return new Promise((resolveActivity) => {
|
|
@@ -1436,11 +1460,11 @@ class WorkspaceDocumentState {
|
|
|
1436
1460
|
if (settled)
|
|
1437
1461
|
return;
|
|
1438
1462
|
settled = true;
|
|
1439
|
-
clearTimeout(timer);
|
|
1463
|
+
this.timerProvider.clearTimeout(timer);
|
|
1440
1464
|
state.waiters.delete(finish);
|
|
1441
1465
|
resolveActivity();
|
|
1442
1466
|
};
|
|
1443
|
-
const timer = setTimeout(finish, timeoutMs);
|
|
1467
|
+
const timer = this.timerProvider.setTimeout(finish, timeoutMs);
|
|
1444
1468
|
if (typeof timer.unref === "function")
|
|
1445
1469
|
timer.unref();
|
|
1446
1470
|
state.waiters.add(finish);
|
|
@@ -1548,7 +1572,7 @@ class WorkspaceDocumentState {
|
|
|
1548
1572
|
waiters: new Set
|
|
1549
1573
|
};
|
|
1550
1574
|
this.openDocuments.set(path, state);
|
|
1551
|
-
this.openByUri.set(state.uri, state);
|
|
1575
|
+
this.openByUri.set(normalizeDocumentUri(state.uri), state);
|
|
1552
1576
|
this.notifyWaiters(state);
|
|
1553
1577
|
await this.sendNotification("textDocument/didOpen", {
|
|
1554
1578
|
textDocument: { uri: state.uri, languageId: state.languageId, version: state.version, text }
|
|
@@ -1573,7 +1597,7 @@ class WorkspaceDocumentState {
|
|
|
1573
1597
|
}
|
|
1574
1598
|
async closeDocument(state) {
|
|
1575
1599
|
this.openDocuments.delete(state.path);
|
|
1576
|
-
this.openByUri.delete(state.uri);
|
|
1600
|
+
this.openByUri.delete(normalizeDocumentUri(state.uri));
|
|
1577
1601
|
this.clearDiagnostics(state.uri);
|
|
1578
1602
|
this.notifyWaiters(state);
|
|
1579
1603
|
await this.sendNotification("textDocument/didClose", { textDocument: { uri: state.uri } });
|
|
@@ -2660,6 +2684,7 @@ class LspClient extends LspClientConnection {
|
|
|
2660
2684
|
this.diagnosticPullErrors = [];
|
|
2661
2685
|
this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
|
|
2662
2686
|
this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
|
|
2687
|
+
timerProvider: this.timerProvider,
|
|
2663
2688
|
versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
|
|
2664
2689
|
});
|
|
2665
2690
|
this.workspaceMutations = new WorkspaceMutationController(root, this.documents);
|
|
@@ -2763,7 +2788,7 @@ class LspClient extends LspClientConnection {
|
|
|
2763
2788
|
const absPath = this.resolveWorkspacePath(filePath);
|
|
2764
2789
|
const uri = pathToFileURL3(absPath).href;
|
|
2765
2790
|
await this.openFile(absPath);
|
|
2766
|
-
const deadlineAt =
|
|
2791
|
+
const deadlineAt = this.timerProvider.now() + this.diagnosticsFreshnessTimeoutMs;
|
|
2767
2792
|
for (;; ) {
|
|
2768
2793
|
signal?.throwIfAborted();
|
|
2769
2794
|
const snapshot = this.documents.captureDiagnosticSnapshot(absPath);
|
|
@@ -2776,7 +2801,7 @@ class LspClient extends LspClientConnection {
|
|
|
2776
2801
|
if (!pushFallbackOnly) {
|
|
2777
2802
|
const cached = this.documents.getPullCache(snapshot);
|
|
2778
2803
|
try {
|
|
2779
|
-
const remainingMs2 = deadlineAt -
|
|
2804
|
+
const remainingMs2 = deadlineAt - this.timerProvider.now();
|
|
2780
2805
|
if (remainingMs2 <= 0)
|
|
2781
2806
|
return this.freshnessTimeout(absPath);
|
|
2782
2807
|
const result = await this.sendRequest("textDocument/diagnostic", {
|
|
@@ -2811,7 +2836,7 @@ class LspClient extends LspClientConnection {
|
|
|
2811
2836
|
}
|
|
2812
2837
|
if (!pushFallbackOnly)
|
|
2813
2838
|
continue;
|
|
2814
|
-
const remainingMs = deadlineAt -
|
|
2839
|
+
const remainingMs = deadlineAt - this.timerProvider.now();
|
|
2815
2840
|
if (remainingMs <= 0) {
|
|
2816
2841
|
if (!this.isDiagnosticPullSupported() && snapshot.publishGeneration === 0) {
|
|
2817
2842
|
const cached = this.documents.getPullCache(snapshot);
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"CHANGELOG.md"
|
|
33
33
|
],
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "node scripts/ensure-core-links.mjs &&
|
|
35
|
+
"build": "node scripts/ensure-core-links.mjs && node -e \"require('node:fs').rmSync('dist',{recursive:true,force:true})\" && tsc -p tsconfig.build.json --emitDeclarationOnly && bun build src/cli.ts src/mcp.ts src/tools.ts src/request-context.ts src/lsp/manager.ts --outdir dist --target node --format esm",
|
|
36
36
|
"test": "vitest --run",
|
|
37
37
|
"test:watch": "vitest",
|
|
38
38
|
"typecheck": "tsc --noEmit",
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/components/bootstrap/dist/cli.js\" hook session-start",
|
|
9
9
|
"commandWindows": "powershell -NoProfile -ExecutionPolicy Bypass -File \"${PLUGIN_ROOT}\\components\\bootstrap\\scripts\\bootstrap.ps1\"",
|
|
10
10
|
"timeout": 30,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Checking Bootstrap Provisioning"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sisyphuslabs/codex-bootstrap",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.32",
|
|
4
4
|
"description": "Codex SessionStart bootstrap component that provisions LazyCodex runtime dependencies from a detached worker.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"private": true,
|
|
@@ -5582,11 +5582,7 @@ var OmoMemorySearchSchema = object({
|
|
|
5582
5582
|
}).strict();
|
|
5583
5583
|
var OmoMemoryRecallSchema = object({
|
|
5584
5584
|
enabled: boolean2().default(true),
|
|
5585
|
-
max_items: number2().int().min(1).max(5).default(2)
|
|
5586
|
-
budget_tokens: number2().int().positive().default(600),
|
|
5587
|
-
excerpt_chars: number2().int().positive().default(200),
|
|
5588
|
-
min_score: number2().optional(),
|
|
5589
|
-
exclude: array(string2()).default([])
|
|
5585
|
+
max_items: number2().int().min(1).max(5).default(2)
|
|
5590
5586
|
}).strict();
|
|
5591
5587
|
var OmoMemoryNudgeSchema = object({
|
|
5592
5588
|
enabled: boolean2().default(true),
|
|
@@ -5636,11 +5632,7 @@ var OmoMemorySearchLayerSchema = object({
|
|
|
5636
5632
|
}).strict();
|
|
5637
5633
|
var OmoMemoryRecallLayerSchema = object({
|
|
5638
5634
|
enabled: boolean2().optional(),
|
|
5639
|
-
max_items: number2().int().min(1).max(5).optional()
|
|
5640
|
-
budget_tokens: number2().int().positive().optional(),
|
|
5641
|
-
excerpt_chars: number2().int().positive().optional(),
|
|
5642
|
-
min_score: number2().optional(),
|
|
5643
|
-
exclude: array(string2()).optional()
|
|
5635
|
+
max_items: number2().int().min(1).max(5).optional()
|
|
5644
5636
|
}).strict();
|
|
5645
5637
|
var OmoMemoryNudgeLayerSchema = object({
|
|
5646
5638
|
enabled: boolean2().optional(),
|
|
@@ -5711,13 +5703,7 @@ var OmoMemorySettingsSchema = object({
|
|
|
5711
5703
|
write_notice: OmoMemoryWriteNoticeSchema.default({ enabled: true }),
|
|
5712
5704
|
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
5713
5705
|
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
5714
|
-
recall: OmoMemoryRecallSchema.default({
|
|
5715
|
-
enabled: true,
|
|
5716
|
-
max_items: 2,
|
|
5717
|
-
budget_tokens: 600,
|
|
5718
|
-
excerpt_chars: 200,
|
|
5719
|
-
exclude: []
|
|
5720
|
-
}),
|
|
5706
|
+
recall: OmoMemoryRecallSchema.default({ enabled: true, max_items: 2 }),
|
|
5721
5707
|
compile_warn_tokens: number2().int().positive().default(30000),
|
|
5722
5708
|
agents: record(string2(), OmoMemoryAgentOverridesSchema).default({})
|
|
5723
5709
|
}).strict();
|
|
@@ -5848,11 +5848,7 @@ var OmoMemorySearchSchema = object({
|
|
|
5848
5848
|
}).strict();
|
|
5849
5849
|
var OmoMemoryRecallSchema = object({
|
|
5850
5850
|
enabled: boolean2().default(true),
|
|
5851
|
-
max_items: number2().int().min(1).max(5).default(2)
|
|
5852
|
-
budget_tokens: number2().int().positive().default(600),
|
|
5853
|
-
excerpt_chars: number2().int().positive().default(200),
|
|
5854
|
-
min_score: number2().optional(),
|
|
5855
|
-
exclude: array(string2()).default([])
|
|
5851
|
+
max_items: number2().int().min(1).max(5).default(2)
|
|
5856
5852
|
}).strict();
|
|
5857
5853
|
var OmoMemoryNudgeSchema = object({
|
|
5858
5854
|
enabled: boolean2().default(true),
|
|
@@ -5902,11 +5898,7 @@ var OmoMemorySearchLayerSchema = object({
|
|
|
5902
5898
|
}).strict();
|
|
5903
5899
|
var OmoMemoryRecallLayerSchema = object({
|
|
5904
5900
|
enabled: boolean2().optional(),
|
|
5905
|
-
max_items: number2().int().min(1).max(5).optional()
|
|
5906
|
-
budget_tokens: number2().int().positive().optional(),
|
|
5907
|
-
excerpt_chars: number2().int().positive().optional(),
|
|
5908
|
-
min_score: number2().optional(),
|
|
5909
|
-
exclude: array(string2()).optional()
|
|
5901
|
+
max_items: number2().int().min(1).max(5).optional()
|
|
5910
5902
|
}).strict();
|
|
5911
5903
|
var OmoMemoryNudgeLayerSchema = object({
|
|
5912
5904
|
enabled: boolean2().optional(),
|
|
@@ -5977,13 +5969,7 @@ var OmoMemorySettingsSchema = object({
|
|
|
5977
5969
|
write_notice: OmoMemoryWriteNoticeSchema.default({ enabled: true }),
|
|
5978
5970
|
sync: OmoMemorySyncSchema.default({ enabled: true }),
|
|
5979
5971
|
search: OmoMemorySearchSchema.default({ enabled: true }),
|
|
5980
|
-
recall: OmoMemoryRecallSchema.default({
|
|
5981
|
-
enabled: true,
|
|
5982
|
-
max_items: 2,
|
|
5983
|
-
budget_tokens: 600,
|
|
5984
|
-
excerpt_chars: 200,
|
|
5985
|
-
exclude: []
|
|
5986
|
-
}),
|
|
5972
|
+
recall: OmoMemoryRecallSchema.default({ enabled: true, max_items: 2 }),
|
|
5987
5973
|
compile_warn_tokens: number2().int().positive().default(30000),
|
|
5988
5974
|
agents: record(string2(), OmoMemoryAgentOverridesSchema).default({})
|
|
5989
5975
|
}).strict();
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook pre-tool-use",
|
|
10
10
|
"timeout": 5,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Recommending Git Bash MCP"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"type": "command",
|
|
21
21
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
22
22
|
"timeout": 5,
|
|
23
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
23
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Resetting Git Bash MCP Reminder"
|
|
24
24
|
}
|
|
25
25
|
]
|
|
26
26
|
}
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/components/lazycodex-executor-verify/dist/cli.js\" hook subagent-stop",
|
|
10
10
|
"timeout": 10,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Verifying LazyCodex Executor Evidence"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@code-yeongyu/codex-lazycodex-executor-verify",
|
|
3
|
-
"version": "5.0.0-beta.
|
|
3
|
+
"version": "5.0.0-beta.32",
|
|
4
4
|
"description": "Codex SubagentStop evidence verifier for LazyCodex executor completions.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"packageManager": "npm@11.12.1",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "5.0.0-beta.
|
|
4
|
-
"inputDigest": "sha256:
|
|
3
|
+
"version": "5.0.0-beta.32",
|
|
4
|
+
"inputDigest": "sha256:7ebeb55787bcfcf32f5cdd2782c145f22c9aa8c595b7dedde0228036267ccfee",
|
|
5
5
|
"outputs": [
|
|
6
6
|
{
|
|
7
7
|
"path": "cli.d.ts",
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
},
|
|
10
10
|
{
|
|
11
11
|
"path": "cli.js",
|
|
12
|
-
"sha256": "
|
|
12
|
+
"sha256": "89f0a2360dc1977cc00f2cdb661ff6929a7b90131728488502834a372840db3c"
|
|
13
13
|
},
|
|
14
14
|
{
|
|
15
15
|
"path": "codex-hook-cli.d.ts",
|
|
@@ -766,6 +766,11 @@ function reportBestEffortCleanupError(operation, error, logger = writeCleanupErr
|
|
|
766
766
|
const message = error instanceof Error ? error.message : String(error);
|
|
767
767
|
logger(`[lsp] ignored ${operation} failure during cleanup: ${message}`);
|
|
768
768
|
}
|
|
769
|
+
var realTimerProvider = {
|
|
770
|
+
now: () => Date.now(),
|
|
771
|
+
setTimeout: (callback, delayMs) => setTimeout(callback, delayMs),
|
|
772
|
+
clearTimeout: (handle) => clearTimeout(handle)
|
|
773
|
+
};
|
|
769
774
|
var DEFAULT_MAX_REFERENCES = 200;
|
|
770
775
|
var DEFAULT_MAX_SYMBOLS = 200;
|
|
771
776
|
var DEFAULT_MAX_DIAGNOSTICS = 200;
|
|
@@ -1294,6 +1299,7 @@ class LspClientTransport {
|
|
|
1294
1299
|
this.documentFormattingSupported = false;
|
|
1295
1300
|
this.requestTimeoutMs = timeouts.requestTimeoutMs ?? REQUEST_TIMEOUT_MS;
|
|
1296
1301
|
this.initializeTimeoutMs = timeouts.initializeTimeoutMs ?? INIT_TIMEOUT_MS;
|
|
1302
|
+
this.timerProvider = timeouts.timerProvider ?? realTimerProvider;
|
|
1297
1303
|
}
|
|
1298
1304
|
pid() {
|
|
1299
1305
|
return this.proc?.pid;
|
|
@@ -1394,7 +1400,7 @@ class LspClientTransport {
|
|
|
1394
1400
|
const options = args[1];
|
|
1395
1401
|
const timeoutMs = options?.timeoutMs ?? this.requestTimeoutMs;
|
|
1396
1402
|
const timeoutController = new AbortController;
|
|
1397
|
-
const timeoutHandle = setTimeout(() => {
|
|
1403
|
+
const timeoutHandle = this.timerProvider.setTimeout(() => {
|
|
1398
1404
|
const stderrTail = this.stderrBuffer.slice(-5).join(`
|
|
1399
1405
|
`);
|
|
1400
1406
|
timeoutController.abort(new LspRequestTimeoutError(method, stderrTail || undefined));
|
|
@@ -1413,7 +1419,7 @@ class LspClientTransport {
|
|
|
1413
1419
|
}
|
|
1414
1420
|
throw error;
|
|
1415
1421
|
} finally {
|
|
1416
|
-
clearTimeout(timeoutHandle);
|
|
1422
|
+
this.timerProvider.clearTimeout(timeoutHandle);
|
|
1417
1423
|
combinedSignal.dispose();
|
|
1418
1424
|
}
|
|
1419
1425
|
}
|
|
@@ -1783,6 +1789,17 @@ function canonicalPath(filePath) {
|
|
|
1783
1789
|
return absolute;
|
|
1784
1790
|
}
|
|
1785
1791
|
}
|
|
1792
|
+
function normalizeDocumentUri(uri) {
|
|
1793
|
+
let decoded = uri;
|
|
1794
|
+
try {
|
|
1795
|
+
decoded = decodeURIComponent(uri);
|
|
1796
|
+
} catch {
|
|
1797
|
+
decoded = uri;
|
|
1798
|
+
}
|
|
1799
|
+
if (process.platform !== "win32")
|
|
1800
|
+
return decoded;
|
|
1801
|
+
return decoded.replace(/^(file:\/\/\/)([a-z]):/, (_match, prefix, drive) => `${prefix}${drive.toUpperCase()}:`);
|
|
1802
|
+
}
|
|
1786
1803
|
function isSameOrDescendant(candidate, parent) {
|
|
1787
1804
|
const suffix = relative2(parent, candidate);
|
|
1788
1805
|
return suffix === "" || !suffix.startsWith("..") && suffix !== "..";
|
|
@@ -1799,7 +1816,12 @@ class WorkspaceDocumentState {
|
|
|
1799
1816
|
this.openDocuments = new Map;
|
|
1800
1817
|
this.openByUri = new Map;
|
|
1801
1818
|
this.openPromises = new Map;
|
|
1802
|
-
this.
|
|
1819
|
+
this.timerProvider = options.timerProvider ?? {
|
|
1820
|
+
now: options.now ?? (() => Date.now()),
|
|
1821
|
+
setTimeout: (callback, delayMs) => setTimeout(callback, delayMs),
|
|
1822
|
+
clearTimeout: (handle) => clearTimeout(handle)
|
|
1823
|
+
};
|
|
1824
|
+
this.now = () => this.timerProvider.now();
|
|
1803
1825
|
this.versionlessPublishQuiescenceMs = options.versionlessPublishQuiescenceMs ?? DEFAULT_VERSIONLESS_PUBLISH_QUIESCENCE_MS;
|
|
1804
1826
|
}
|
|
1805
1827
|
async openFile(filePath) {
|
|
@@ -1821,7 +1843,7 @@ class WorkspaceDocumentState {
|
|
|
1821
1843
|
return this.openDocuments.get(canonicalPath(filePath))?.version;
|
|
1822
1844
|
}
|
|
1823
1845
|
getStoredDiagnostics(uri) {
|
|
1824
|
-
const state = this.openByUri.get(uri);
|
|
1846
|
+
const state = this.openByUri.get(normalizeDocumentUri(uri));
|
|
1825
1847
|
if (!state)
|
|
1826
1848
|
return [];
|
|
1827
1849
|
return state.lastPublish?.diagnostics ?? state.pullCache?.diagnostics ?? [];
|
|
@@ -1843,13 +1865,13 @@ class WorkspaceDocumentState {
|
|
|
1843
1865
|
return state !== undefined && state.uri === snapshot.uri && state.version === snapshot.version && state.generation === snapshot.documentGeneration;
|
|
1844
1866
|
}
|
|
1845
1867
|
getPullCache(snapshot) {
|
|
1846
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1868
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1847
1869
|
if (!state?.pullCache || state.pullCache.documentVersion !== snapshot.version)
|
|
1848
1870
|
return null;
|
|
1849
1871
|
return state.pullCache;
|
|
1850
1872
|
}
|
|
1851
1873
|
recordPullDiagnostics(snapshot, report) {
|
|
1852
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1874
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1853
1875
|
if (!state)
|
|
1854
1876
|
return;
|
|
1855
1877
|
state.pullCache = {
|
|
@@ -1859,7 +1881,7 @@ class WorkspaceDocumentState {
|
|
|
1859
1881
|
};
|
|
1860
1882
|
}
|
|
1861
1883
|
recordPublishedDiagnostics(params) {
|
|
1862
|
-
const state = this.openByUri.get(params.uri);
|
|
1884
|
+
const state = this.openByUri.get(normalizeDocumentUri(params.uri));
|
|
1863
1885
|
if (!state)
|
|
1864
1886
|
return;
|
|
1865
1887
|
state.publishGeneration += 1;
|
|
@@ -1873,7 +1895,7 @@ class WorkspaceDocumentState {
|
|
|
1873
1895
|
this.notifyWaiters(state);
|
|
1874
1896
|
}
|
|
1875
1897
|
resolvePushDiagnostics(snapshot) {
|
|
1876
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1898
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1877
1899
|
if (!state?.lastPublish)
|
|
1878
1900
|
return { status: "missing" };
|
|
1879
1901
|
const publish = state.lastPublish;
|
|
@@ -1887,7 +1909,7 @@ class WorkspaceDocumentState {
|
|
|
1887
1909
|
return waitMs === 0 ? { status: "ready", diagnostics: publish.diagnostics } : { status: "wait", waitMs };
|
|
1888
1910
|
}
|
|
1889
1911
|
waitForDiagnosticsActivity(snapshot, timeoutMs) {
|
|
1890
|
-
const state = this.openByUri.get(snapshot.uri);
|
|
1912
|
+
const state = this.openByUri.get(normalizeDocumentUri(snapshot.uri));
|
|
1891
1913
|
if (!state || timeoutMs <= 0)
|
|
1892
1914
|
return Promise.resolve();
|
|
1893
1915
|
return new Promise((resolveActivity) => {
|
|
@@ -1896,11 +1918,11 @@ class WorkspaceDocumentState {
|
|
|
1896
1918
|
if (settled)
|
|
1897
1919
|
return;
|
|
1898
1920
|
settled = true;
|
|
1899
|
-
clearTimeout(timer);
|
|
1921
|
+
this.timerProvider.clearTimeout(timer);
|
|
1900
1922
|
state.waiters.delete(finish);
|
|
1901
1923
|
resolveActivity();
|
|
1902
1924
|
};
|
|
1903
|
-
const timer = setTimeout(finish, timeoutMs);
|
|
1925
|
+
const timer = this.timerProvider.setTimeout(finish, timeoutMs);
|
|
1904
1926
|
if (typeof timer.unref === "function")
|
|
1905
1927
|
timer.unref();
|
|
1906
1928
|
state.waiters.add(finish);
|
|
@@ -2008,7 +2030,7 @@ class WorkspaceDocumentState {
|
|
|
2008
2030
|
waiters: new Set
|
|
2009
2031
|
};
|
|
2010
2032
|
this.openDocuments.set(path2, state);
|
|
2011
|
-
this.openByUri.set(state.uri, state);
|
|
2033
|
+
this.openByUri.set(normalizeDocumentUri(state.uri), state);
|
|
2012
2034
|
this.notifyWaiters(state);
|
|
2013
2035
|
await this.sendNotification("textDocument/didOpen", {
|
|
2014
2036
|
textDocument: { uri: state.uri, languageId: state.languageId, version: state.version, text }
|
|
@@ -2033,7 +2055,7 @@ class WorkspaceDocumentState {
|
|
|
2033
2055
|
}
|
|
2034
2056
|
async closeDocument(state) {
|
|
2035
2057
|
this.openDocuments.delete(state.path);
|
|
2036
|
-
this.openByUri.delete(state.uri);
|
|
2058
|
+
this.openByUri.delete(normalizeDocumentUri(state.uri));
|
|
2037
2059
|
this.clearDiagnostics(state.uri);
|
|
2038
2060
|
this.notifyWaiters(state);
|
|
2039
2061
|
await this.sendNotification("textDocument/didClose", { textDocument: { uri: state.uri } });
|
|
@@ -3083,6 +3105,7 @@ class LspClient extends LspClientConnection {
|
|
|
3083
3105
|
this.diagnosticPullErrors = [];
|
|
3084
3106
|
this.diagnosticsFreshnessTimeoutMs = options.diagnosticsFreshnessTimeoutMs ?? DIAGNOSTICS_FRESHNESS_TIMEOUT_MS;
|
|
3085
3107
|
this.documents = new WorkspaceDocumentState((method, params) => this.sendNotification(method, params), (uri) => this.diagnosticsStore.delete(uri), {
|
|
3108
|
+
timerProvider: this.timerProvider,
|
|
3086
3109
|
versionlessPublishQuiescenceMs: options.versionlessPublishQuiescenceMs ?? VERSIONLESS_PUBLISH_QUIESCENCE_MS
|
|
3087
3110
|
});
|
|
3088
3111
|
this.workspaceMutations = new WorkspaceMutationController(root, this.documents);
|
|
@@ -3186,7 +3209,7 @@ class LspClient extends LspClientConnection {
|
|
|
3186
3209
|
const absPath = this.resolveWorkspacePath(filePath);
|
|
3187
3210
|
const uri = pathToFileURL3(absPath).href;
|
|
3188
3211
|
await this.openFile(absPath);
|
|
3189
|
-
const deadlineAt =
|
|
3212
|
+
const deadlineAt = this.timerProvider.now() + this.diagnosticsFreshnessTimeoutMs;
|
|
3190
3213
|
for (;; ) {
|
|
3191
3214
|
signal?.throwIfAborted();
|
|
3192
3215
|
const snapshot = this.documents.captureDiagnosticSnapshot(absPath);
|
|
@@ -3199,7 +3222,7 @@ class LspClient extends LspClientConnection {
|
|
|
3199
3222
|
if (!pushFallbackOnly) {
|
|
3200
3223
|
const cached = this.documents.getPullCache(snapshot);
|
|
3201
3224
|
try {
|
|
3202
|
-
const remainingMs2 = deadlineAt -
|
|
3225
|
+
const remainingMs2 = deadlineAt - this.timerProvider.now();
|
|
3203
3226
|
if (remainingMs2 <= 0)
|
|
3204
3227
|
return this.freshnessTimeout(absPath);
|
|
3205
3228
|
const result = await this.sendRequest("textDocument/diagnostic", {
|
|
@@ -3234,7 +3257,7 @@ class LspClient extends LspClientConnection {
|
|
|
3234
3257
|
}
|
|
3235
3258
|
if (!pushFallbackOnly)
|
|
3236
3259
|
continue;
|
|
3237
|
-
const remainingMs = deadlineAt -
|
|
3260
|
+
const remainingMs = deadlineAt - this.timerProvider.now();
|
|
3238
3261
|
if (remainingMs <= 0) {
|
|
3239
3262
|
if (!this.isDiagnosticPullSupported() && snapshot.publishGeneration === 0) {
|
|
3240
3263
|
const cached = this.documents.getPullCache(snapshot);
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
"type": "command",
|
|
9
9
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
|
|
10
10
|
"timeout": 60,
|
|
11
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
11
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Checking LSP Diagnostics"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"type": "command",
|
|
22
22
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
23
23
|
"timeout": 5,
|
|
24
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
24
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Resetting LSP Diagnostics Cache"
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
"type": "command",
|
|
8
8
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook session-start",
|
|
9
9
|
"timeout": 10,
|
|
10
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
10
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Loading Project Rules"
|
|
11
11
|
}
|
|
12
12
|
]
|
|
13
13
|
}
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
"type": "command",
|
|
20
20
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook user-prompt-submit",
|
|
21
21
|
"timeout": 10,
|
|
22
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
22
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Loading Project Rules"
|
|
23
23
|
}
|
|
24
24
|
]
|
|
25
25
|
}
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"type": "command",
|
|
33
33
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-tool-use",
|
|
34
34
|
"timeout": 10,
|
|
35
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
35
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Matching Project Rules"
|
|
36
36
|
}
|
|
37
37
|
]
|
|
38
38
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"type": "command",
|
|
46
46
|
"command": "node \"${PLUGIN_ROOT}/dist/cli.js\" hook post-compact",
|
|
47
47
|
"timeout": 10,
|
|
48
|
-
"statusMessage": "(OmO 5.0.0-beta.
|
|
48
|
+
"statusMessage": "(OmO 5.0.0-beta.32) Resetting Project Rule Cache"
|
|
49
49
|
}
|
|
50
50
|
]
|
|
51
51
|
}
|