oh-my-opencode 4.19.1 → 4.19.3
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/.agents/command/publish.md +95 -28
- package/.agents/skills/publish/SKILL.md +20 -6
- package/.opencode/command/publish.md +95 -28
- package/README.ja.md +2 -2
- package/README.ko.md +2 -2
- package/README.md +2 -2
- package/README.ru.md +2 -2
- package/README.zh-cn.md +2 -2
- package/THIRD-PARTY-NOTICES.md +7 -7
- package/dist/agents/atlas/agent.d.ts +4 -2
- package/dist/agents/explore.d.ts +4 -2
- package/dist/agents/hephaestus/agent.d.ts +4 -2
- package/dist/agents/librarian.d.ts +4 -2
- package/dist/agents/metis.d.ts +4 -2
- package/dist/agents/momus.d.ts +3 -2
- package/dist/agents/multimodal-looker.d.ts +4 -2
- package/dist/agents/oracle.d.ts +4 -2
- package/dist/agents/sisyphus/claude-opus-5.d.ts +33 -0
- package/dist/agents/sisyphus/index.d.ts +2 -0
- package/dist/agents/sisyphus-agent-factory.d.ts +5 -2
- package/dist/agents/sisyphus-junior/agent.d.ts +4 -1
- package/dist/agents/sisyphus-runtime-prompt-reconciler.d.ts +1 -1
- package/dist/agents/types.d.ts +2 -2
- package/dist/cli/config-migrate.d.ts +8 -0
- package/dist/cli/doctor/checks/legacy-config-leftovers.d.ts +10 -0
- package/dist/cli/doctor/checks/model-resolution-config.d.ts +1 -1
- package/dist/cli/doctor/checks/tools-lsp.d.ts +1 -1
- package/dist/cli/doctor/framework/constants.d.ts +1 -1
- package/dist/cli/index.js +95391 -88524
- package/dist/cli-node/index.js +95504 -88637
- package/dist/config/schema/agent-names.d.ts +26 -26
- package/dist/config/schema/agent-overrides.d.ts +400 -400
- package/dist/config/schema/browser-automation.d.ts +2 -2
- package/dist/config/schema/categories.d.ts +36 -36
- package/dist/config/schema/commands.d.ts +2 -2
- package/dist/config/schema/dynamic-context-pruning.d.ts +1 -1
- package/dist/config/schema/experimental.d.ts +1 -1
- package/dist/config/schema/fallback-models.d.ts +25 -25
- package/dist/config/schema/hooks.d.ts +43 -43
- package/dist/config/schema/internal/permission.d.ts +9 -9
- package/dist/config/schema/keyword-detector.d.ts +6 -6
- package/dist/config/schema/oh-my-opencode-config.d.ts +402 -402
- package/dist/config/schema/tmux.d.ts +6 -6
- package/dist/config/validate.d.ts +2 -1
- package/dist/config-migration/deep-diff.d.ts +1 -0
- package/dist/config-migration/discovery-paths.d.ts +11 -0
- package/dist/config-migration/discovery-roots.d.ts +7 -0
- package/dist/config-migration/discovery.d.ts +4 -0
- package/dist/config-migration/index.d.ts +9 -0
- package/dist/config-migration/legacy-history.d.ts +3 -0
- package/dist/config-migration/migration-executor.d.ts +4 -0
- package/dist/config-migration/migration-plans.d.ts +14 -0
- package/dist/config-migration/record-values.d.ts +4 -0
- package/dist/config-migration/schema-url.d.ts +1 -0
- package/dist/config-migration/transform-config-jsonc.d.ts +2 -0
- package/dist/config-migration/transform-opencode.d.ts +2 -0
- package/dist/config-migration/transform-types.d.ts +24 -0
- package/dist/config-migration/types.d.ts +39 -0
- package/dist/create-hooks.d.ts +35 -35
- package/dist/features/background-agent/spawner/tmux-callback-invoker.d.ts +11 -0
- package/dist/features/builtin-commands/templates/hyperplan.d.ts +1 -1
- package/dist/features/builtin-commands/templates/start-work.d.ts +1 -1
- package/dist/features/claude-tasks/types.d.ts +4 -4
- package/dist/features/team-mode/team-runtime/shutdown-helpers.d.ts +1 -1
- package/dist/features/team-mode/team-runtime/shutdown-test-fixtures.d.ts +4 -4
- package/dist/features/team-mode/tools/lifecycle-test-fixture.d.ts +42 -42
- package/dist/features/tmux-subagent/environment-eligibility.d.ts +2 -0
- package/dist/features/tmux-subagent/index.d.ts +1 -0
- package/dist/features/tmux-subagent/tracked-session-state.d.ts +1 -0
- package/dist/features/tui-sidebar/snapshot-schema.d.ts +6 -6
- package/dist/help/schema/acp.d.ts +3 -3
- package/dist/help/schema/doctor.d.ts +4 -4
- package/dist/help/schema/status.d.ts +3 -3
- package/dist/hooks/auto-update-checker/constants.d.ts +3 -3
- package/dist/hooks/goal/types.d.ts +5 -5
- package/dist/hooks/non-interactive-env/constants.d.ts +4 -1
- package/dist/hooks/start-work/parse-user-request.d.ts +2 -0
- package/dist/hooks/start-work/worktree-block.d.ts +5 -0
- package/dist/index.js +35450 -28257
- package/dist/mcp/types.d.ts +3 -3
- package/dist/oh-my-opencode.schema.json +1 -1
- package/dist/plugin/chat-message/loop-commands.d.ts +1 -0
- package/dist/plugin/command-execute-before.d.ts +3 -3
- package/dist/plugin/hooks/create-core-hooks.d.ts +25 -25
- package/dist/plugin-config/omo-config-chain.d.ts +14 -0
- package/dist/plugin-config/unknown-key-diagnostics.d.ts +5 -0
- package/dist/plugin-config.d.ts +2 -2
- package/dist/shared/agent-display-names.d.ts +1 -1
- package/dist/shared/jsonc-parser.d.ts +1 -1
- package/dist/shared/migration.d.ts +5 -1
- package/dist/shared/opencode-config-dir-types.d.ts +0 -1
- package/dist/shared/plugin-identity.d.ts +6 -8
- package/dist/shared/project-discovery-dirs.d.ts +0 -1
- package/dist/shared/tmux/tmux-utils/environment.d.ts +1 -1
- package/dist/shared/tmux/tmux-utils.d.ts +1 -1
- package/dist/shared/typescript-native-source-parser.d.ts +7 -0
- package/dist/skills/coding-agent-sessions/SKILL.md +5 -2
- package/dist/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/dist/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/dist/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/dist/skills/debugging/SKILL.md +2 -1
- package/dist/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/dist/skills/frontend/ATTRIBUTION.md +7 -0
- package/dist/skills/frontend/SKILL.md +4 -1
- package/dist/skills/frontend/references/design/README.md +8 -0
- package/dist/skills/frontend/references/design/_INDEX.md +14 -1
- package/dist/skills/frontend/references/design/interaction-skill.md +144 -0
- package/dist/skills/programming/SKILL.md +11 -1
- package/dist/skills/programming/references/logging.md +6 -1
- package/dist/skills/programming/scripts/typescript/check-no-excuse-rules.ts +51 -17
- package/dist/skills/start-work/SKILL.md +12 -2
- package/dist/skills/ulw-plan/SKILL.md +1 -1
- package/dist/skills/ulw-plan/references/full-workflow.md +12 -1
- package/dist/skills/ulw-plan/references/intent-clear.md +1 -1
- package/dist/startup-migration.d.ts +28 -0
- package/dist/testing/create-plugin-module.d.ts +4 -0
- package/dist/tools/task/types.d.ts +10 -10
- package/dist/tui.js +31812 -26849
- package/package.json +14 -14
- package/packages/lsp-core/src/lsp/client-diagnostics-freshness.integration.test.ts +21 -5
- package/packages/lsp-core/src/lsp/fixtures/workspace-edit-server.mjs +11 -2
- package/packages/omo-codex/THIRD-PARTY-NOTICES.md +2 -2
- package/packages/omo-codex/plugin/.codex-plugin/plugin.json +1 -1
- package/packages/omo-codex/plugin/components/bootstrap/dist/cli.js +8 -4
- 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/AGENTS.md +11 -5
- package/packages/omo-codex/plugin/components/codegraph/NOTICE +1 -1
- package/packages/omo-codex/plugin/components/codegraph/dist/cli.js +10272 -2600
- package/packages/omo-codex/plugin/components/codegraph/dist/serve.js +7341 -562
- package/packages/omo-codex/plugin/components/codegraph/package.json +2 -2
- package/packages/omo-codex/plugin/components/codegraph/src/hook-input.ts +33 -0
- package/packages/omo-codex/plugin/components/codegraph/src/hook-types.ts +36 -10
- package/packages/omo-codex/plugin/components/codegraph/src/hook.ts +170 -186
- package/packages/omo-codex/plugin/components/codegraph/src/post-tool-use-hook.ts +34 -0
- package/packages/omo-codex/plugin/components/codegraph/src/serve.ts +22 -5
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-command.ts +106 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-cooldown.ts +145 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-hook-runtime.ts +21 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-lock.ts +139 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-outcome.ts +15 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-paths.ts +32 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-project.ts +109 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker-result.ts +148 -0
- package/packages/omo-codex/plugin/components/codegraph/src/session-start-worker.ts +126 -186
- package/packages/omo-codex/plugin/components/codegraph/test/hook-exclusion.test.ts +9 -4
- package/packages/omo-codex/plugin/components/codegraph/test/hook-session-start-guard.test.ts +160 -0
- package/packages/omo-codex/plugin/components/codegraph/test/hook-store-upgrade.test.ts +12 -110
- package/packages/omo-codex/plugin/components/codegraph/test/hook.test.ts +29 -20
- package/packages/omo-codex/plugin/components/codegraph/test/mcp-bridge-fixtures.ts +3 -3
- package/packages/omo-codex/plugin/components/codegraph/test/package-runtime.test.ts +2 -2
- package/packages/omo-codex/plugin/components/codegraph/test/provisioned-node-guard.test.ts +11 -5
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-bridge.test.ts +3 -3
- package/packages/omo-codex/plugin/components/codegraph/test/serve-mcp-facade.test.ts +2 -1
- package/packages/omo-codex/plugin/components/codegraph/test/serve-provision.test.ts +50 -5
- package/packages/omo-codex/plugin/components/codegraph/test/serve-unavailable.test.ts +3 -2
- package/packages/omo-codex/plugin/components/codegraph/test/serve.test.ts +24 -13
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-node-support.test.ts +70 -13
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-project.test.ts +58 -0
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-state.test.ts +104 -0
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-trust-boundary.test.ts +4 -2
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-cooldown.test.ts +116 -0
- package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts +114 -119
- 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 +2 -2
- 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/dist/cli.js +31 -14
- 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/start-work-continuation/directive.md +1 -1
- package/packages/omo-codex/plugin/components/start-work-continuation/hooks/hooks.json +2 -2
- package/packages/omo-codex/plugin/components/start-work-continuation/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/directive.md +12 -7
- package/packages/omo-codex/plugin/components/ultrawork/hooks/hooks.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/package.json +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ultrawork/SKILL.md +12 -7
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/SKILL.md +1 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/omo-codex/plugin/components/ultrawork/skills/ulw-plan/references/intent-clear.md +1 -1
- package/packages/omo-codex/plugin/components/ulw-loop/directive.md +12 -7
- 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/SKILL.md +19 -1
- 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-start-work-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-start-work-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 +42 -41
- package/packages/omo-codex/plugin/package.json +1 -1
- package/packages/omo-codex/plugin/shared/src/config-loader.ts +165 -16
- package/packages/omo-codex/plugin/shared/src/config-migration.ts +162 -0
- package/packages/omo-codex/plugin/shared/test/config-loader.test.ts +196 -18
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/SKILL.md +5 -2
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/packages/omo-codex/plugin/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/packages/omo-codex/plugin/skills/debugging/SKILL.md +2 -1
- package/packages/omo-codex/plugin/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/packages/omo-codex/plugin/skills/frontend/ATTRIBUTION.md +7 -0
- package/packages/omo-codex/plugin/skills/frontend/SKILL.md +4 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/README.md +8 -0
- package/packages/omo-codex/plugin/skills/frontend/references/design/_INDEX.md +14 -1
- package/packages/omo-codex/plugin/skills/frontend/references/design/interaction-skill.md +144 -0
- package/packages/omo-codex/plugin/skills/programming/SKILL.md +11 -1
- package/packages/omo-codex/plugin/skills/programming/references/logging.md +6 -1
- package/packages/omo-codex/plugin/skills/programming/scripts/typescript/check-no-excuse-rules.ts +51 -17
- package/packages/omo-codex/plugin/skills/start-work/SKILL.md +12 -2
- package/packages/omo-codex/plugin/skills/ultrawork/SKILL.md +12 -7
- package/packages/omo-codex/plugin/skills/ulw-loop/SKILL.md +19 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/SKILL.md +1 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/omo-codex/plugin/skills/ulw-plan/references/intent-clear.md +1 -1
- package/packages/omo-codex/plugin/test/sync-skills-orchestration.test.mjs +22 -0
- package/packages/omo-codex/scripts/install-dist/install-local.mjs +1 -1
- package/packages/shared-skills/skills/coding-agent-sessions/SKILL.md +5 -2
- package/packages/shared-skills/skills/coding-agent-sessions/references/all-platforms.md +3 -1
- package/packages/shared-skills/skills/coding-agent-sessions/references/senpi.md +15 -5
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/pi_family.py +46 -0
- package/packages/shared-skills/skills/coding-agent-sessions/scripts/agent_sessions/scanners.py +19 -10
- package/packages/shared-skills/skills/debugging/SKILL.md +2 -1
- package/packages/shared-skills/skills/debugging/references/methodology/03-flaky-triage.md +47 -0
- package/packages/shared-skills/skills/frontend/ATTRIBUTION.md +7 -0
- package/packages/shared-skills/skills/frontend/SKILL.md +4 -1
- package/packages/shared-skills/skills/frontend/references/design/README.md +8 -0
- package/packages/shared-skills/skills/frontend/references/design/_INDEX.md +14 -1
- package/packages/shared-skills/skills/frontend/references/design/interaction-skill.md +144 -0
- package/packages/shared-skills/skills/programming/SKILL.md +11 -1
- package/packages/shared-skills/skills/programming/references/logging.md +6 -1
- package/packages/shared-skills/skills/programming/scripts/typescript/check-no-excuse-rules.ts +51 -17
- package/packages/shared-skills/skills/start-work/SKILL.md +12 -2
- package/packages/shared-skills/skills/ulw-plan/SKILL.md +1 -1
- package/packages/shared-skills/skills/ulw-plan/references/full-workflow.md +12 -1
- package/packages/shared-skills/skills/ulw-plan/references/intent-clear.md +1 -1
- package/dist/plugin-config/layered-config-loader.d.ts +0 -2
- package/dist/plugin-config/single-config-loader.d.ts +0 -4
- package/dist/shared/migrate-legacy-config-file.d.ts +0 -1
- package/dist/shared/migration/config-migration.d.ts +0 -1
package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-cooldown.test.ts
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { describe, expect, it } from "bun:test";
|
|
2
|
+
import { mkdtempSync, rmSync } from "node:fs";
|
|
3
|
+
import { tmpdir } from "node:os";
|
|
4
|
+
import { join } from "node:path";
|
|
5
|
+
|
|
6
|
+
import type { CodegraphSessionStartOutcome } from "../src/hook.ts";
|
|
7
|
+
import { runCodegraphSessionStartWorker } from "../src/hook.ts";
|
|
8
|
+
import { readSessionStartCooldown } from "../src/session-start-cooldown.ts";
|
|
9
|
+
|
|
10
|
+
describe("CodeGraph SessionStart worker cooldown", () => {
|
|
11
|
+
it("#given codegraph init times out #when the worker finishes #then it records a failed outcome and cooldown", async () => {
|
|
12
|
+
// given
|
|
13
|
+
const workspace = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-timeout-"));
|
|
14
|
+
const homeDir = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-timeout-home-"));
|
|
15
|
+
const outcomes: CodegraphSessionStartOutcome[] = [];
|
|
16
|
+
try {
|
|
17
|
+
// when
|
|
18
|
+
const result = await runCodegraphSessionStartWorker({
|
|
19
|
+
config: { codegraph: { enabled: true, session_start_cooldown_ms: 60_000 }, sources: [], warnings: [] },
|
|
20
|
+
cwd: workspace,
|
|
21
|
+
env: { HOME: homeDir },
|
|
22
|
+
logOutcome: (outcome) => outcomes.push(outcome),
|
|
23
|
+
nodeVersion: "22.14.0",
|
|
24
|
+
nowMs: 1_000,
|
|
25
|
+
projectProbe: () => ({ kind: "uninitialized" }),
|
|
26
|
+
deps: {
|
|
27
|
+
ensureGitignored: () => true,
|
|
28
|
+
ensureProvisioned: () => Promise.resolve({ binPath: "/tmp/codegraph", provisioned: true }),
|
|
29
|
+
prepareWorkspace: () => ({
|
|
30
|
+
dataDir: join(homeDir, ".omo/codegraph/projects/test"),
|
|
31
|
+
dataRoot: join(homeDir, ".omo/codegraph"),
|
|
32
|
+
linked: true,
|
|
33
|
+
mode: "global-linked",
|
|
34
|
+
projectLink: join(workspace, ".codegraph"),
|
|
35
|
+
}),
|
|
36
|
+
resolveCommand: () => ({ argsPrefix: [], command: "/tmp/codegraph", exists: true, source: "path" }),
|
|
37
|
+
runCommand: () => Promise.resolve({ exitCode: 1, stdout: "", timedOut: true }),
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
const cooldown = readSessionStartCooldown({
|
|
41
|
+
baseCooldownMs: 60_000,
|
|
42
|
+
homeDir,
|
|
43
|
+
nowMs: 2_000,
|
|
44
|
+
projectRoot: workspace,
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
// then
|
|
48
|
+
expect(result).toEqual({ action: "failed" });
|
|
49
|
+
expect(outcomes).toEqual([{
|
|
50
|
+
action: "failed",
|
|
51
|
+
error: "codegraph init timed out",
|
|
52
|
+
exitCode: 1,
|
|
53
|
+
projectRoot: workspace,
|
|
54
|
+
source: "path",
|
|
55
|
+
timedOut: true,
|
|
56
|
+
}]);
|
|
57
|
+
expect(cooldown).toEqual({ cooldownUntil: 61_000, failureCount: 1, kind: "active" });
|
|
58
|
+
} finally {
|
|
59
|
+
rmSync(homeDir, { recursive: true, force: true });
|
|
60
|
+
rmSync(workspace, { recursive: true, force: true });
|
|
61
|
+
}
|
|
62
|
+
});
|
|
63
|
+
|
|
64
|
+
it("#given codegraph init exits zero without an exact database #when the worker verifies the result #then it records a failure cooldown", async () => {
|
|
65
|
+
// given
|
|
66
|
+
const workspace = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-no-db-"));
|
|
67
|
+
const homeDir = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-no-db-home-"));
|
|
68
|
+
const outcomes: CodegraphSessionStartOutcome[] = [];
|
|
69
|
+
try {
|
|
70
|
+
// when
|
|
71
|
+
const result = await runCodegraphSessionStartWorker({
|
|
72
|
+
config: { codegraph: { enabled: true, session_start_cooldown_ms: 60_000 }, sources: [], warnings: [] },
|
|
73
|
+
cwd: workspace,
|
|
74
|
+
env: { HOME: homeDir },
|
|
75
|
+
logOutcome: (outcome) => outcomes.push(outcome),
|
|
76
|
+
nodeVersion: "22.14.0",
|
|
77
|
+
nowMs: 1_000,
|
|
78
|
+
projectProbe: () => ({ kind: "uninitialized" }),
|
|
79
|
+
deps: {
|
|
80
|
+
ensureGitignored: () => true,
|
|
81
|
+
ensureProvisioned: () => Promise.resolve({ binPath: "/tmp/codegraph", provisioned: true }),
|
|
82
|
+
prepareWorkspace: () => ({
|
|
83
|
+
dataDir: join(homeDir, ".omo/codegraph/projects/test"),
|
|
84
|
+
dataRoot: join(homeDir, ".omo/codegraph"),
|
|
85
|
+
linked: true,
|
|
86
|
+
mode: "global-linked",
|
|
87
|
+
projectLink: join(workspace, ".codegraph"),
|
|
88
|
+
}),
|
|
89
|
+
resolveCommand: () => ({ argsPrefix: [], command: "/tmp/codegraph", exists: true, source: "path" }),
|
|
90
|
+
runCommand: () => Promise.resolve({ exitCode: 0, stdout: "", timedOut: false }),
|
|
91
|
+
},
|
|
92
|
+
});
|
|
93
|
+
const cooldown = readSessionStartCooldown({
|
|
94
|
+
baseCooldownMs: 60_000,
|
|
95
|
+
homeDir,
|
|
96
|
+
nowMs: 2_000,
|
|
97
|
+
projectRoot: workspace,
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
// then
|
|
101
|
+
expect(result).toEqual({ action: "failed" });
|
|
102
|
+
expect(outcomes).toEqual([{
|
|
103
|
+
action: "failed",
|
|
104
|
+
error: "codegraph init completed without creating an exact project database",
|
|
105
|
+
exitCode: 0,
|
|
106
|
+
projectRoot: workspace,
|
|
107
|
+
source: "path",
|
|
108
|
+
timedOut: false,
|
|
109
|
+
}]);
|
|
110
|
+
expect(cooldown).toEqual({ cooldownUntil: 61_000, failureCount: 1, kind: "active" });
|
|
111
|
+
} finally {
|
|
112
|
+
rmSync(homeDir, { recursive: true, force: true });
|
|
113
|
+
rmSync(workspace, { recursive: true, force: true });
|
|
114
|
+
}
|
|
115
|
+
});
|
|
116
|
+
});
|
package/packages/omo-codex/plugin/components/codegraph/test/session-start-worker-flow.test.ts
CHANGED
|
@@ -3,66 +3,76 @@ import { mkdirSync, mkdtempSync, readFileSync, rmSync, writeFileSync } from "nod
|
|
|
3
3
|
import { tmpdir } from "node:os";
|
|
4
4
|
import { join } from "node:path";
|
|
5
5
|
|
|
6
|
+
import { CODEGRAPH_PINNED_VERSION } from "../../../../../utils/src/codegraph/manifest.ts";
|
|
6
7
|
import { resolveCodegraphCommandInvocation, runCodegraphSessionStartWorker } from "../src/hook.ts";
|
|
7
8
|
|
|
9
|
+
function writeProjectDatabase(workspace: string): void {
|
|
10
|
+
mkdirSync(join(workspace, ".codegraph"), { recursive: true });
|
|
11
|
+
writeFileSync(join(workspace, ".codegraph", "codegraph.db"), "fixture");
|
|
12
|
+
}
|
|
13
|
+
|
|
8
14
|
describe("CodeGraph SessionStart worker flow", () => {
|
|
9
|
-
it("#given
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
15
|
+
it("#given install_dir has the pinned platform binary #when worker resolves provisioned CodeGraph #then it uses that launcher", async () => {
|
|
16
|
+
// given
|
|
17
|
+
const workspace = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-platform-"));
|
|
18
|
+
const homeDir = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-platform-home-"));
|
|
19
|
+
const installDir = mkdtempSync(join(tmpdir(), "omo-codegraph-worker-platform-install-"));
|
|
20
|
+
const binPath = join(installDir, "bin", process.platform === "win32" ? "codegraph.cmd" : "codegraph");
|
|
21
|
+
const calls: { readonly args: readonly string[]; readonly command: string; readonly env: Record<string, string> }[] = [];
|
|
22
|
+
const outcomes: unknown[] = [];
|
|
23
|
+
try {
|
|
24
|
+
mkdirSync(join(installDir, "bin"), { recursive: true });
|
|
25
|
+
mkdirSync(join(installDir, ".provisioned"), { recursive: true });
|
|
26
|
+
writeFileSync(binPath, "");
|
|
27
|
+
writeFileSync(
|
|
28
|
+
join(installDir, ".provisioned", `codegraph-${CODEGRAPH_PINNED_VERSION}.json`),
|
|
29
|
+
`${JSON.stringify({ binPath, version: CODEGRAPH_PINNED_VERSION })}\n`,
|
|
30
|
+
);
|
|
21
31
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
},
|
|
34
|
-
prepareWorkspace: () => ({
|
|
35
|
-
dataDir: join(homeDir, ".omo/codegraph/projects/test"),
|
|
36
|
-
dataRoot: join(homeDir, ".omo/codegraph"),
|
|
37
|
-
linked: true,
|
|
38
|
-
mode: "global-linked",
|
|
39
|
-
projectLink: join(workspace, ".codegraph"),
|
|
40
|
-
}),
|
|
41
|
-
resolveCommand: (options) => {
|
|
42
|
-
const provisioned = options?.provisioned?.() ?? null;
|
|
43
|
-
return { argsPrefix: [], command: provisioned ?? "missing-codegraph", exists: provisioned !== null, source: provisioned === null ? "path" : "provisioned" };
|
|
44
|
-
},
|
|
45
|
-
runCommand: (_projectRoot, command, args, options) => {
|
|
46
|
-
calls.push({ args, command, env: options.env });
|
|
47
|
-
return Promise.resolve({ exitCode: 0, stdout: calls.length === 1 ? '{"initialized":false}' : "", timedOut: false });
|
|
48
|
-
},
|
|
32
|
+
// when
|
|
33
|
+
const result = await runCodegraphSessionStartWorker({
|
|
34
|
+
config: { codegraph: { enabled: true, install_dir: installDir }, sources: [], trustedCodegraphInstallDir: installDir, warnings: [] },
|
|
35
|
+
nodeVersion: "22.14.0",
|
|
36
|
+
cwd: workspace,
|
|
37
|
+
env: { HOME: homeDir },
|
|
38
|
+
logOutcome: (outcome) => outcomes.push(outcome),
|
|
39
|
+
deps: {
|
|
40
|
+
ensureGitignored: () => true,
|
|
41
|
+
ensureProvisioned: () => {
|
|
42
|
+
throw new Error("provisioning should not run when install_dir binary exists");
|
|
49
43
|
},
|
|
50
|
-
|
|
44
|
+
prepareWorkspace: () => ({
|
|
45
|
+
dataDir: join(homeDir, ".omo/codegraph/projects/test"),
|
|
46
|
+
dataRoot: join(homeDir, ".omo/codegraph"),
|
|
47
|
+
linked: true,
|
|
48
|
+
mode: "global-linked",
|
|
49
|
+
projectLink: join(workspace, ".codegraph"),
|
|
50
|
+
}),
|
|
51
|
+
resolveCommand: (options) => {
|
|
52
|
+
const provisioned = options?.provisioned?.() ?? null;
|
|
53
|
+
return { argsPrefix: [], command: provisioned ?? "missing-codegraph", exists: provisioned !== null, source: provisioned === null ? "path" : "provisioned" };
|
|
54
|
+
},
|
|
55
|
+
resolveManagedBin: () => binPath,
|
|
56
|
+
runCommand: (_projectRoot, command, args, options) => {
|
|
57
|
+
calls.push({ args, command, env: options.env });
|
|
58
|
+
writeProjectDatabase(workspace);
|
|
59
|
+
return Promise.resolve({ exitCode: 0, stdout: "", timedOut: false });
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
});
|
|
51
63
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
}
|
|
65
|
-
});
|
|
64
|
+
// then
|
|
65
|
+
expect(result).toEqual({ action: "initialized" });
|
|
66
|
+
expect(calls.map((call) => ({ args: [...call.args], command: call.command }))).toEqual([
|
|
67
|
+
{ args: ["init"], command: binPath },
|
|
68
|
+
]);
|
|
69
|
+
expect(calls[0]?.env["CODEGRAPH_INSTALL_DIR"]).toBe(installDir);
|
|
70
|
+
expect(outcomes).toEqual([{ action: "initialized", exitCode: 0, projectRoot: workspace, source: "provisioned", timedOut: false }]);
|
|
71
|
+
} finally {
|
|
72
|
+
rmSync(workspace, { recursive: true, force: true });
|
|
73
|
+
rmSync(homeDir, { recursive: true, force: true });
|
|
74
|
+
rmSync(installDir, { recursive: true, force: true });
|
|
75
|
+
}
|
|
66
76
|
});
|
|
67
77
|
|
|
68
78
|
it("#given Windows codegraph.cmd #when default worker runner builds invocation #then it runs through cmd.exe", () => {
|
|
@@ -70,11 +80,11 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
70
80
|
const command = "C:\\Users\\test\\.omo\\codegraph\\bin\\codegraph.cmd";
|
|
71
81
|
|
|
72
82
|
// when
|
|
73
|
-
const invocation = resolveCodegraphCommandInvocation(command, ["
|
|
83
|
+
const invocation = resolveCodegraphCommandInvocation(command, ["init"], "win32");
|
|
74
84
|
|
|
75
85
|
// then
|
|
76
86
|
expect(invocation).toEqual({
|
|
77
|
-
args: ["/d", "/s", "/c", command, "
|
|
87
|
+
args: ["/d", "/s", "/c", command, "init"],
|
|
78
88
|
command: "cmd.exe",
|
|
79
89
|
});
|
|
80
90
|
});
|
|
@@ -84,11 +94,11 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
84
94
|
const command = "C:\\Users\\test\\.omo\\codegraph\\bin\\codegraph.cjs";
|
|
85
95
|
|
|
86
96
|
// when
|
|
87
|
-
const invocation = resolveCodegraphCommandInvocation(command, ["
|
|
97
|
+
const invocation = resolveCodegraphCommandInvocation(command, ["init"], "win32");
|
|
88
98
|
|
|
89
99
|
// then
|
|
90
100
|
expect(invocation).toEqual({
|
|
91
|
-
args: [command, "
|
|
101
|
+
args: [command, "init"],
|
|
92
102
|
command: process.execPath,
|
|
93
103
|
});
|
|
94
104
|
});
|
|
@@ -104,51 +114,47 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
104
114
|
expect(invocation).toEqual({ args: ["sync"], command });
|
|
105
115
|
});
|
|
106
116
|
|
|
107
|
-
it("#given
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
]
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
runCommand: (_projectRoot, command, args, options) => {
|
|
137
|
-
calls.push({ args, command, env: options.env });
|
|
138
|
-
return Promise.resolve({ exitCode: 0, stdout: calls.length === 1 ? scenario.stdout : "", timedOut: false });
|
|
139
|
-
},
|
|
117
|
+
it("#given an uninitialized exact project #when worker runs #then it invokes init directly without a status command", async () => {
|
|
118
|
+
// given
|
|
119
|
+
const workspace = mkdtempSync(join(tmpdir(), "omo-codegraph-init-direct-"));
|
|
120
|
+
const homeDir = mkdtempSync(join(tmpdir(), "omo-codegraph-init-direct-home-"));
|
|
121
|
+
const calls: { readonly args: readonly string[]; readonly env: Record<string, string> }[] = [];
|
|
122
|
+
const outcomes: unknown[] = [];
|
|
123
|
+
try {
|
|
124
|
+
// when
|
|
125
|
+
const result = await runCodegraphSessionStartWorker({
|
|
126
|
+
config: { codegraph: { enabled: true, install_dir: "/tmp/codegraph-install" }, sources: [], trustedCodegraphInstallDir: "/tmp/codegraph-install", warnings: [] },
|
|
127
|
+
nodeVersion: "22.14.0",
|
|
128
|
+
cwd: workspace,
|
|
129
|
+
env: { HOME: homeDir },
|
|
130
|
+
logOutcome: (outcome) => outcomes.push(outcome),
|
|
131
|
+
deps: {
|
|
132
|
+
ensureGitignored: () => true,
|
|
133
|
+
ensureProvisioned: () => Promise.resolve({ binPath: "/tmp/codegraph", provisioned: true }),
|
|
134
|
+
prepareWorkspace: () => ({
|
|
135
|
+
dataDir: join(homeDir, ".omo/codegraph/projects/test"),
|
|
136
|
+
dataRoot: join(homeDir, ".omo/codegraph"),
|
|
137
|
+
linked: true,
|
|
138
|
+
mode: "global-linked",
|
|
139
|
+
projectLink: join(workspace, ".codegraph"),
|
|
140
|
+
}),
|
|
141
|
+
resolveCommand: () => ({ argsPrefix: [], command: "/tmp/codegraph", exists: true, source: "path" }),
|
|
142
|
+
runCommand: (_projectRoot, _command, args, options) => {
|
|
143
|
+
calls.push({ args, env: options.env });
|
|
144
|
+
writeProjectDatabase(workspace);
|
|
145
|
+
return Promise.resolve({ exitCode: 0, stdout: "", timedOut: false });
|
|
140
146
|
},
|
|
141
|
-
}
|
|
147
|
+
},
|
|
148
|
+
});
|
|
142
149
|
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}
|
|
150
|
+
// then
|
|
151
|
+
expect(result).toEqual({ action: "initialized" });
|
|
152
|
+
expect(calls.map((call) => [...call.args])).toEqual([["init"]]);
|
|
153
|
+
expect(calls[0]?.env["CODEGRAPH_INSTALL_DIR"]).toBe("/tmp/codegraph-install");
|
|
154
|
+
expect(outcomes).toEqual([{ action: "initialized", exitCode: 0, projectRoot: workspace, source: "path", timedOut: false }]);
|
|
155
|
+
} finally {
|
|
156
|
+
rmSync(workspace, { recursive: true, force: true });
|
|
157
|
+
rmSync(homeDir, { recursive: true, force: true });
|
|
152
158
|
}
|
|
153
159
|
});
|
|
154
160
|
|
|
@@ -178,13 +184,14 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
178
184
|
resolveCommand: () => ({ argsPrefix: [], command: "/tmp/codegraph", exists: true, source: "path" }),
|
|
179
185
|
runCommand: (_projectRoot, command, args, options) => {
|
|
180
186
|
calls.push({ args, command, env: options.env });
|
|
181
|
-
|
|
187
|
+
writeProjectDatabase(workspace);
|
|
188
|
+
return Promise.resolve({ exitCode: 0, stdout: "", timedOut: false });
|
|
182
189
|
},
|
|
183
190
|
},
|
|
184
191
|
});
|
|
185
192
|
|
|
186
193
|
// then
|
|
187
|
-
expect(result).toEqual({ action: "
|
|
194
|
+
expect(result).toEqual({ action: "initialized" });
|
|
188
195
|
expect(calls.length).toBeGreaterThan(0);
|
|
189
196
|
for (const call of calls) {
|
|
190
197
|
expect(call.env["CODEGRAPH_NO_DAEMON"]).toBe("1");
|
|
@@ -207,7 +214,8 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
207
214
|
const fakeCodegraphScript = [
|
|
208
215
|
"const fs = require('node:fs');",
|
|
209
216
|
`fs.appendFileSync(${JSON.stringify(logPath)}, JSON.stringify({install:process.env.CODEGRAPH_INSTALL_DIR,openai:process.env.OPENAI_API_KEY}) + '\\n');`,
|
|
210
|
-
"
|
|
217
|
+
"fs.mkdirSync('.codegraph', { recursive: true });",
|
|
218
|
+
"fs.writeFileSync('.codegraph/codegraph.db', 'fixture');",
|
|
211
219
|
].join("");
|
|
212
220
|
|
|
213
221
|
// when
|
|
@@ -234,15 +242,12 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
234
242
|
});
|
|
235
243
|
|
|
236
244
|
// then
|
|
237
|
-
expect(result).toEqual({ action: "
|
|
245
|
+
expect(result).toEqual({ action: "initialized" });
|
|
238
246
|
const captured = readFileSync(logPath, "utf8")
|
|
239
247
|
.trim()
|
|
240
248
|
.split("\n")
|
|
241
249
|
.map((line) => JSON.parse(line));
|
|
242
|
-
expect(captured).toEqual([
|
|
243
|
-
{ install: join(homeDir, ".omo", "codegraph") },
|
|
244
|
-
{ install: join(homeDir, ".omo", "codegraph") },
|
|
245
|
-
]);
|
|
250
|
+
expect(captured).toEqual([{ install: join(homeDir, ".omo", "codegraph") }]);
|
|
246
251
|
} finally {
|
|
247
252
|
if (originalOpenAiKey === undefined) delete process.env["OPENAI_API_KEY"];
|
|
248
253
|
else process.env["OPENAI_API_KEY"] = originalOpenAiKey;
|
|
@@ -251,13 +256,3 @@ describe("CodeGraph SessionStart worker flow", () => {
|
|
|
251
256
|
}
|
|
252
257
|
});
|
|
253
258
|
});
|
|
254
|
-
|
|
255
|
-
async function withProcessPlatform(platform: NodeJS.Platform, run: () => Promise<void>): Promise<void> {
|
|
256
|
-
const descriptor = Object.getOwnPropertyDescriptor(process, "platform");
|
|
257
|
-
Object.defineProperty(process, "platform", { configurable: true, enumerable: true, value: platform });
|
|
258
|
-
try {
|
|
259
|
-
await run();
|
|
260
|
-
} finally {
|
|
261
|
-
if (descriptor !== undefined) Object.defineProperty(process, "platform", descriptor);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
@@ -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 4.19.
|
|
11
|
+
"statusMessage": "(OmO 4.19.3) 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 4.19.
|
|
23
|
+
"statusMessage": "(OmO 4.19.3) 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 4.19.
|
|
11
|
+
"statusMessage": "(OmO 4.19.3) Verifying LazyCodex Executor Evidence"
|
|
12
12
|
}
|
|
13
13
|
]
|
|
14
14
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "4.19.
|
|
4
|
-
"inputDigest": "sha256:
|
|
3
|
+
"version": "4.19.3",
|
|
4
|
+
"inputDigest": "sha256:dfeeeb0d34b6628116df23520c551f9da58b8593111a0a08ffb3f04ed8918bff",
|
|
5
5
|
"outputs": [
|
|
6
6
|
{
|
|
7
7
|
"path": "cli.d.ts",
|
|
@@ -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 4.19.
|
|
11
|
+
"statusMessage": "(OmO 4.19.3) 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 4.19.
|
|
24
|
+
"statusMessage": "(OmO 4.19.3) Resetting LSP Diagnostics Cache"
|
|
25
25
|
}
|
|
26
26
|
]
|
|
27
27
|
}
|
|
@@ -31,7 +31,7 @@ var __toESM = (mod, isNodeMode, target) => {
|
|
|
31
31
|
};
|
|
32
32
|
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
33
33
|
|
|
34
|
-
// ../../../node_modules/.bun/picomatch@4.0.
|
|
34
|
+
// ../../../node_modules/.bun/picomatch@4.0.5/node_modules/picomatch/lib/constants.js
|
|
35
35
|
var require_constants = __commonJS((exports, module) => {
|
|
36
36
|
var WIN_SLASH = "\\\\/";
|
|
37
37
|
var WIN_NO_SLASH = `[^${WIN_SLASH}]`;
|
|
@@ -176,7 +176,7 @@ var require_constants = __commonJS((exports, module) => {
|
|
|
176
176
|
};
|
|
177
177
|
});
|
|
178
178
|
|
|
179
|
-
// ../../../node_modules/.bun/picomatch@4.0.
|
|
179
|
+
// ../../../node_modules/.bun/picomatch@4.0.5/node_modules/picomatch/lib/utils.js
|
|
180
180
|
var require_utils = __commonJS((exports) => {
|
|
181
181
|
var {
|
|
182
182
|
REGEX_BACKSLASH,
|
|
@@ -239,7 +239,7 @@ var require_utils = __commonJS((exports) => {
|
|
|
239
239
|
};
|
|
240
240
|
});
|
|
241
241
|
|
|
242
|
-
// ../../../node_modules/.bun/picomatch@4.0.
|
|
242
|
+
// ../../../node_modules/.bun/picomatch@4.0.5/node_modules/picomatch/lib/scan.js
|
|
243
243
|
var require_scan = __commonJS((exports, module) => {
|
|
244
244
|
var utils = require_utils();
|
|
245
245
|
var {
|
|
@@ -554,7 +554,7 @@ var require_scan = __commonJS((exports, module) => {
|
|
|
554
554
|
module.exports = scan;
|
|
555
555
|
});
|
|
556
556
|
|
|
557
|
-
// ../../../node_modules/.bun/picomatch@4.0.
|
|
557
|
+
// ../../../node_modules/.bun/picomatch@4.0.5/node_modules/picomatch/lib/parse.js
|
|
558
558
|
var require_parse = __commonJS((exports, module) => {
|
|
559
559
|
var constants = require_constants();
|
|
560
560
|
var utils = require_utils();
|
|
@@ -730,7 +730,11 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
730
730
|
}
|
|
731
731
|
}
|
|
732
732
|
};
|
|
733
|
-
var
|
|
733
|
+
var buildCharClassStar = (chars) => {
|
|
734
|
+
const source = chars.length === 1 ? utils.escapeRegex(chars[0]) : `[${chars.map((ch) => utils.escapeRegex(ch)).join("")}]`;
|
|
735
|
+
return `${source}*`;
|
|
736
|
+
};
|
|
737
|
+
var getStarExtglobSequenceChars = (pattern) => {
|
|
734
738
|
let index = 0;
|
|
735
739
|
const chars = [];
|
|
736
740
|
while (index < pattern.length) {
|
|
@@ -752,8 +756,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
752
756
|
if (chars.length < 1) {
|
|
753
757
|
return;
|
|
754
758
|
}
|
|
755
|
-
|
|
756
|
-
return `${source}*`;
|
|
759
|
+
return chars;
|
|
757
760
|
};
|
|
758
761
|
var repeatedExtglobRecursion = (pattern) => {
|
|
759
762
|
let depth = 0;
|
|
@@ -777,15 +780,29 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
777
780
|
return { risky: true };
|
|
778
781
|
}
|
|
779
782
|
}
|
|
783
|
+
const safeChars = [];
|
|
784
|
+
let sawStarSequence = false;
|
|
785
|
+
let combinable = true;
|
|
780
786
|
for (const branch of branches) {
|
|
781
|
-
const
|
|
782
|
-
if (
|
|
783
|
-
|
|
787
|
+
const chars = getStarExtglobSequenceChars(branch);
|
|
788
|
+
if (chars) {
|
|
789
|
+
sawStarSequence = true;
|
|
790
|
+
safeChars.push(...chars);
|
|
791
|
+
continue;
|
|
792
|
+
}
|
|
793
|
+
const literal = normalizeSimpleBranch(branch);
|
|
794
|
+
if (literal && literal.length === 1) {
|
|
795
|
+
safeChars.push(literal);
|
|
796
|
+
continue;
|
|
784
797
|
}
|
|
798
|
+
combinable = false;
|
|
785
799
|
if (repeatedExtglobRecursion(branch) > max) {
|
|
786
800
|
return { risky: true };
|
|
787
801
|
}
|
|
788
802
|
}
|
|
803
|
+
if (sawStarSequence) {
|
|
804
|
+
return combinable ? { risky: true, safeOutput: buildCharClassStar([...new Set(safeChars)]) } : { risky: true };
|
|
805
|
+
}
|
|
789
806
|
return { risky: false };
|
|
790
807
|
};
|
|
791
808
|
var parse = (input, options) => {
|
|
@@ -1556,7 +1573,7 @@ var require_parse = __commonJS((exports, module) => {
|
|
|
1556
1573
|
module.exports = parse;
|
|
1557
1574
|
});
|
|
1558
1575
|
|
|
1559
|
-
// ../../../node_modules/.bun/picomatch@4.0.
|
|
1576
|
+
// ../../../node_modules/.bun/picomatch@4.0.5/node_modules/picomatch/lib/picomatch.js
|
|
1560
1577
|
var require_picomatch = __commonJS((exports, module) => {
|
|
1561
1578
|
var scan = require_scan();
|
|
1562
1579
|
var parse = require_parse();
|
|
@@ -1641,9 +1658,9 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
1641
1658
|
}
|
|
1642
1659
|
return { isMatch: Boolean(match), match, output };
|
|
1643
1660
|
};
|
|
1644
|
-
picomatch.matchBase = (input, glob, options) => {
|
|
1661
|
+
picomatch.matchBase = (input, glob, options, posix = options && options.windows) => {
|
|
1645
1662
|
const regex = glob instanceof RegExp ? glob : picomatch.makeRe(glob, options);
|
|
1646
|
-
return regex.test(utils.basename(input));
|
|
1663
|
+
return regex.test(utils.basename(input, { windows: posix }));
|
|
1647
1664
|
};
|
|
1648
1665
|
picomatch.isMatch = (str, patterns, options) => picomatch(patterns, options)(str);
|
|
1649
1666
|
picomatch.parse = (pattern, options) => {
|
|
@@ -1696,7 +1713,7 @@ var require_picomatch = __commonJS((exports, module) => {
|
|
|
1696
1713
|
module.exports = picomatch;
|
|
1697
1714
|
});
|
|
1698
1715
|
|
|
1699
|
-
// ../../../node_modules/.bun/picomatch@4.0.
|
|
1716
|
+
// ../../../node_modules/.bun/picomatch@4.0.5/node_modules/picomatch/index.js
|
|
1700
1717
|
var require_picomatch2 = __commonJS((exports, module) => {
|
|
1701
1718
|
var pico = require_picomatch();
|
|
1702
1719
|
var utils = require_utils();
|