@su-record/vibe 3.2.14 → 3.2.16
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/commands/index.d.ts +1 -1
- package/dist/cli/commands/index.d.ts.map +1 -1
- package/dist/cli/commands/index.js +1 -1
- package/dist/cli/commands/index.js.map +1 -1
- package/dist/cli/commands/info.d.ts +3 -1
- package/dist/cli/commands/info.d.ts.map +1 -1
- package/dist/cli/commands/info.js +12 -3
- package/dist/cli/commands/info.js.map +1 -1
- package/dist/cli/commands/init.d.ts +0 -7
- package/dist/cli/commands/init.d.ts.map +1 -1
- package/dist/cli/commands/init.js +5 -37
- package/dist/cli/commands/init.js.map +1 -1
- package/dist/cli/commands/update.d.ts.map +1 -1
- package/dist/cli/commands/update.js +4 -6
- package/dist/cli/commands/update.js.map +1 -1
- package/dist/cli/commands/upgrade.d.ts +1 -1
- package/dist/cli/commands/upgrade.d.ts.map +1 -1
- package/dist/cli/commands/upgrade.js +7 -2
- package/dist/cli/commands/upgrade.js.map +1 -1
- package/dist/cli/postinstall/claude-agents.js +1 -1
- package/dist/cli/postinstall/claude-agents.js.map +1 -1
- package/dist/cli/postinstall/constants.d.ts +0 -1
- package/dist/cli/postinstall/constants.d.ts.map +1 -1
- package/dist/cli/postinstall/constants.js +0 -8
- package/dist/cli/postinstall/constants.js.map +1 -1
- package/dist/cli/postinstall/main.d.ts.map +1 -1
- package/dist/cli/postinstall/main.js +20 -13
- package/dist/cli/postinstall/main.js.map +1 -1
- package/dist/cli/postinstall.d.ts +0 -3
- package/dist/cli/postinstall.d.ts.map +1 -1
- package/dist/cli/postinstall.js +0 -3
- package/dist/cli/postinstall.js.map +1 -1
- package/dist/cli/setup/InstallHome.d.ts +27 -0
- package/dist/cli/setup/InstallHome.d.ts.map +1 -0
- package/dist/cli/setup/InstallHome.js +105 -0
- package/dist/cli/setup/InstallHome.js.map +1 -0
- package/dist/cli/setup/ProjectSetup.d.ts +0 -8
- package/dist/cli/setup/ProjectSetup.d.ts.map +1 -1
- package/dist/cli/setup/ProjectSetup.js +0 -96
- package/dist/cli/setup/ProjectSetup.js.map +1 -1
- package/dist/cli/setup.d.ts +1 -1
- package/dist/cli/setup.d.ts.map +1 -1
- package/dist/cli/setup.js +1 -1
- package/dist/cli/setup.js.map +1 -1
- package/dist/infra/lib/codex-proxy.d.ts +126 -0
- package/dist/infra/lib/codex-proxy.d.ts.map +1 -1
- package/dist/infra/lib/codex-proxy.js +16 -16
- package/dist/infra/lib/codex-proxy.js.map +1 -1
- package/dist/infra/lib/figma/audit.d.ts.map +1 -1
- package/dist/infra/lib/figma/audit.js +0 -2
- package/dist/infra/lib/figma/audit.js.map +1 -1
- package/dist/infra/lib/figma/extract.d.ts +6 -1
- package/dist/infra/lib/figma/extract.d.ts.map +1 -1
- package/dist/infra/lib/figma/extract.js +17 -15
- package/dist/infra/lib/figma/extract.js.map +1 -1
- package/dist/infra/lib/figma/types.d.ts +103 -0
- package/dist/infra/lib/figma/types.d.ts.map +1 -1
- package/dist/infra/lib/figma/types.js +8 -0
- package/dist/infra/lib/figma/types.js.map +1 -1
- package/hooks/scripts/clone-extract.js +16 -1
- package/hooks/scripts/code-check.js +12 -5
- package/hooks/scripts/lib/dispatcher.js +43 -3
- package/hooks/scripts/utils.js +32 -2
- package/package.json +10 -8
- package/dist/__tests__/agent-model-sync.test.d.ts +0 -2
- package/dist/__tests__/agent-model-sync.test.d.ts.map +0 -1
- package/dist/__tests__/agent-model-sync.test.js +0 -71
- package/dist/__tests__/agent-model-sync.test.js.map +0 -1
- package/dist/__tests__/architecture.test.d.ts +0 -2
- package/dist/__tests__/architecture.test.d.ts.map +0 -1
- package/dist/__tests__/architecture.test.js +0 -207
- package/dist/__tests__/architecture.test.js.map +0 -1
- package/dist/__tests__/engines-contract.test.d.ts +0 -2
- package/dist/__tests__/engines-contract.test.d.ts.map +0 -1
- package/dist/__tests__/engines-contract.test.js +0 -72
- package/dist/__tests__/engines-contract.test.js.map +0 -1
- package/dist/__tests__/instruction-drift.test.d.ts +0 -2
- package/dist/__tests__/instruction-drift.test.d.ts.map +0 -1
- package/dist/__tests__/instruction-drift.test.js +0 -116
- package/dist/__tests__/instruction-drift.test.js.map +0 -1
- package/dist/__tests__/skill-namespace.test.d.ts +0 -2
- package/dist/__tests__/skill-namespace.test.d.ts.map +0 -1
- package/dist/__tests__/skill-namespace.test.js +0 -60
- package/dist/__tests__/skill-namespace.test.js.map +0 -1
- package/dist/__tests__/stakes-contract.test.d.ts +0 -2
- package/dist/__tests__/stakes-contract.test.d.ts.map +0 -1
- package/dist/__tests__/stakes-contract.test.js +0 -173
- package/dist/__tests__/stakes-contract.test.js.map +0 -1
- package/dist/__tests__/stuck-semantics.test.d.ts +0 -2
- package/dist/__tests__/stuck-semantics.test.d.ts.map +0 -1
- package/dist/__tests__/stuck-semantics.test.js +0 -161
- package/dist/__tests__/stuck-semantics.test.js.map +0 -1
- package/dist/__tests__/wiring-integrity.test.d.ts +0 -2
- package/dist/__tests__/wiring-integrity.test.d.ts.map +0 -1
- package/dist/__tests__/wiring-integrity.test.js +0 -160
- package/dist/__tests__/wiring-integrity.test.js.map +0 -1
- package/dist/cli/commands/info.test.d.ts +0 -2
- package/dist/cli/commands/info.test.d.ts.map +0 -1
- package/dist/cli/commands/info.test.js +0 -74
- package/dist/cli/commands/info.test.js.map +0 -1
- package/dist/cli/commands/upgrade.test.d.ts +0 -2
- package/dist/cli/commands/upgrade.test.d.ts.map +0 -1
- package/dist/cli/commands/upgrade.test.js +0 -99
- package/dist/cli/commands/upgrade.test.js.map +0 -1
- package/dist/cli/design/design-md-parser.test.d.ts +0 -2
- package/dist/cli/design/design-md-parser.test.d.ts.map +0 -1
- package/dist/cli/design/design-md-parser.test.js +0 -149
- package/dist/cli/design/design-md-parser.test.js.map +0 -1
- package/dist/cli/detect.characterization.test.d.ts +0 -7
- package/dist/cli/detect.characterization.test.d.ts.map +0 -1
- package/dist/cli/detect.characterization.test.js +0 -294
- package/dist/cli/detect.characterization.test.js.map +0 -1
- package/dist/cli/postinstall/cursor-agents.d.ts +0 -13
- package/dist/cli/postinstall/cursor-agents.d.ts.map +0 -1
- package/dist/cli/postinstall/cursor-agents.js +0 -89
- package/dist/cli/postinstall/cursor-agents.js.map +0 -1
- package/dist/cli/postinstall/cursor-rules.d.ts +0 -11
- package/dist/cli/postinstall/cursor-rules.d.ts.map +0 -1
- package/dist/cli/postinstall/cursor-rules.js +0 -205
- package/dist/cli/postinstall/cursor-rules.js.map +0 -1
- package/dist/cli/postinstall/cursor-skills.d.ts +0 -9
- package/dist/cli/postinstall/cursor-skills.d.ts.map +0 -1
- package/dist/cli/postinstall/cursor-skills.js +0 -796
- package/dist/cli/postinstall/cursor-skills.js.map +0 -1
- package/dist/cli/postinstall/fs-utils.test.d.ts +0 -2
- package/dist/cli/postinstall/fs-utils.test.d.ts.map +0 -1
- package/dist/cli/postinstall/fs-utils.test.js +0 -259
- package/dist/cli/postinstall/fs-utils.test.js.map +0 -1
- package/dist/cli/setup/CodexHooks.test.d.ts +0 -2
- package/dist/cli/setup/CodexHooks.test.d.ts.map +0 -1
- package/dist/cli/setup/CodexHooks.test.js +0 -52
- package/dist/cli/setup/CodexHooks.test.js.map +0 -1
- package/dist/cli/setup/GlobalInstaller.test.d.ts +0 -2
- package/dist/cli/setup/GlobalInstaller.test.d.ts.map +0 -1
- package/dist/cli/setup/GlobalInstaller.test.js +0 -16
- package/dist/cli/setup/GlobalInstaller.test.js.map +0 -1
- package/dist/cli/utils/cli-detector.test.d.ts +0 -2
- package/dist/cli/utils/cli-detector.test.d.ts.map +0 -1
- package/dist/cli/utils/cli-detector.test.js +0 -52
- package/dist/cli/utils/cli-detector.test.js.map +0 -1
- package/dist/infra/lib/SkillFrontmatter.test.d.ts +0 -2
- package/dist/infra/lib/SkillFrontmatter.test.d.ts.map +0 -1
- package/dist/infra/lib/SkillFrontmatter.test.js +0 -60
- package/dist/infra/lib/SkillFrontmatter.test.js.map +0 -1
- package/dist/infra/lib/__tests__/AutomationLevel.test.d.ts +0 -2
- package/dist/infra/lib/__tests__/AutomationLevel.test.d.ts.map +0 -1
- package/dist/infra/lib/__tests__/AutomationLevel.test.js +0 -297
- package/dist/infra/lib/__tests__/AutomationLevel.test.js.map +0 -1
- package/dist/infra/lib/__tests__/ComponentRegistry.test.d.ts +0 -2
- package/dist/infra/lib/__tests__/ComponentRegistry.test.d.ts.map +0 -1
- package/dist/infra/lib/__tests__/ComponentRegistry.test.js +0 -99
- package/dist/infra/lib/__tests__/ComponentRegistry.test.js.map +0 -1
- package/dist/infra/lib/__tests__/DecisionTracer.test.d.ts +0 -2
- package/dist/infra/lib/__tests__/DecisionTracer.test.d.ts.map +0 -1
- package/dist/infra/lib/__tests__/DecisionTracer.test.js +0 -274
- package/dist/infra/lib/__tests__/DecisionTracer.test.js.map +0 -1
- package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.d.ts +0 -2
- package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.d.ts.map +0 -1
- package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.js +0 -350
- package/dist/infra/lib/__tests__/InteractiveCheckpoint.test.js.map +0 -1
- package/dist/infra/lib/__tests__/LoopBreaker.test.d.ts +0 -2
- package/dist/infra/lib/__tests__/LoopBreaker.test.d.ts.map +0 -1
- package/dist/infra/lib/__tests__/LoopBreaker.test.js +0 -340
- package/dist/infra/lib/__tests__/LoopBreaker.test.js.map +0 -1
- package/dist/infra/lib/__tests__/VerificationLoop.test.d.ts +0 -2
- package/dist/infra/lib/__tests__/VerificationLoop.test.d.ts.map +0 -1
- package/dist/infra/lib/__tests__/VerificationLoop.test.js +0 -486
- package/dist/infra/lib/__tests__/VerificationLoop.test.js.map +0 -1
- package/dist/infra/lib/config/GlobalConfigManager.test.d.ts +0 -2
- package/dist/infra/lib/config/GlobalConfigManager.test.d.ts.map +0 -1
- package/dist/infra/lib/config/GlobalConfigManager.test.js +0 -9
- package/dist/infra/lib/config/GlobalConfigManager.test.js.map +0 -1
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.d.ts +0 -2
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.d.ts.map +0 -1
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js +0 -43
- package/dist/infra/lib/embedding/__tests__/EmbeddingProvider.test.js.map +0 -1
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.d.ts +0 -2
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.d.ts.map +0 -1
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.js +0 -94
- package/dist/infra/lib/embedding/__tests__/VectorStore.test.js.map +0 -1
- package/dist/infra/lib/embedding/__tests__/cosine.test.d.ts +0 -2
- package/dist/infra/lib/embedding/__tests__/cosine.test.d.ts.map +0 -1
- package/dist/infra/lib/embedding/__tests__/cosine.test.js +0 -73
- package/dist/infra/lib/embedding/__tests__/cosine.test.js.map +0 -1
- package/dist/infra/lib/evolution/__tests__/deprecation.test.d.ts +0 -2
- package/dist/infra/lib/evolution/__tests__/deprecation.test.d.ts.map +0 -1
- package/dist/infra/lib/evolution/__tests__/deprecation.test.js +0 -251
- package/dist/infra/lib/evolution/__tests__/deprecation.test.js.map +0 -1
- package/dist/infra/lib/evolution/__tests__/eval.test.d.ts +0 -2
- package/dist/infra/lib/evolution/__tests__/eval.test.d.ts.map +0 -1
- package/dist/infra/lib/evolution/__tests__/eval.test.js +0 -603
- package/dist/infra/lib/evolution/__tests__/eval.test.js.map +0 -1
- package/dist/infra/lib/evolution/__tests__/generation.test.d.ts +0 -2
- package/dist/infra/lib/evolution/__tests__/generation.test.d.ts.map +0 -1
- package/dist/infra/lib/evolution/__tests__/generation.test.js +0 -396
- package/dist/infra/lib/evolution/__tests__/generation.test.js.map +0 -1
- package/dist/infra/lib/evolution/__tests__/insight.test.d.ts +0 -2
- package/dist/infra/lib/evolution/__tests__/insight.test.d.ts.map +0 -1
- package/dist/infra/lib/evolution/__tests__/insight.test.js +0 -204
- package/dist/infra/lib/evolution/__tests__/insight.test.js.map +0 -1
- package/dist/infra/lib/evolution/__tests__/integration.test.d.ts +0 -2
- package/dist/infra/lib/evolution/__tests__/integration.test.d.ts.map +0 -1
- package/dist/infra/lib/evolution/__tests__/integration.test.js +0 -206
- package/dist/infra/lib/evolution/__tests__/integration.test.js.map +0 -1
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.d.ts +0 -2
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.d.ts.map +0 -1
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.js +0 -350
- package/dist/infra/lib/evolution/__tests__/lifecycle.test.js.map +0 -1
- package/dist/infra/lib/evolution/__tests__/parity.test.d.ts +0 -2
- package/dist/infra/lib/evolution/__tests__/parity.test.d.ts.map +0 -1
- package/dist/infra/lib/evolution/__tests__/parity.test.js +0 -319
- package/dist/infra/lib/evolution/__tests__/parity.test.js.map +0 -1
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.d.ts +0 -5
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.d.ts.map +0 -1
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.js +0 -168
- package/dist/infra/lib/llm/auth/AuthProfileManager.test.js.map +0 -1
- package/dist/infra/lib/llm/auth/TokenRefresher.test.d.ts +0 -2
- package/dist/infra/lib/llm/auth/TokenRefresher.test.d.ts.map +0 -1
- package/dist/infra/lib/llm/auth/TokenRefresher.test.js +0 -120
- package/dist/infra/lib/llm/auth/TokenRefresher.test.js.map +0 -1
- package/dist/infra/lib/llm/timeout.test.d.ts +0 -2
- package/dist/infra/lib/llm/timeout.test.d.ts.map +0 -1
- package/dist/infra/lib/llm/timeout.test.js +0 -50
- package/dist/infra/lib/llm/timeout.test.js.map +0 -1
- package/dist/infra/lib/llm-availability.test.d.ts +0 -2
- package/dist/infra/lib/llm-availability.test.d.ts.map +0 -1
- package/dist/infra/lib/llm-availability.test.js +0 -37
- package/dist/infra/lib/llm-availability.test.js.map +0 -1
- package/dist/infra/lib/memory/KnowledgeGraph.test.d.ts +0 -2
- package/dist/infra/lib/memory/KnowledgeGraph.test.d.ts.map +0 -1
- package/dist/infra/lib/memory/KnowledgeGraph.test.js +0 -189
- package/dist/infra/lib/memory/KnowledgeGraph.test.js.map +0 -1
- package/dist/infra/lib/memory/MemorySearch.test.d.ts +0 -2
- package/dist/infra/lib/memory/MemorySearch.test.d.ts.map +0 -1
- package/dist/infra/lib/memory/MemorySearch.test.js +0 -149
- package/dist/infra/lib/memory/MemorySearch.test.js.map +0 -1
- package/dist/infra/lib/memory/MemoryStorage.test.d.ts +0 -2
- package/dist/infra/lib/memory/MemoryStorage.test.d.ts.map +0 -1
- package/dist/infra/lib/memory/MemoryStorage.test.js +0 -198
- package/dist/infra/lib/memory/MemoryStorage.test.js.map +0 -1
- package/dist/infra/lib/memory/SessionRAGRetriever.test.d.ts +0 -2
- package/dist/infra/lib/memory/SessionRAGRetriever.test.d.ts.map +0 -1
- package/dist/infra/lib/memory/SessionRAGRetriever.test.js +0 -180
- package/dist/infra/lib/memory/SessionRAGRetriever.test.js.map +0 -1
- package/dist/infra/lib/memory/SessionRAGStore.test.d.ts +0 -2
- package/dist/infra/lib/memory/SessionRAGStore.test.d.ts.map +0 -1
- package/dist/infra/lib/memory/SessionRAGStore.test.js +0 -326
- package/dist/infra/lib/memory/SessionRAGStore.test.js.map +0 -1
- package/dist/infra/lib/memory/__tests__/InMemoryStorage.test.d.ts +0 -2
- package/dist/infra/lib/memory/__tests__/InMemoryStorage.test.d.ts.map +0 -1
- package/dist/infra/lib/memory/__tests__/InMemoryStorage.test.js +0 -114
- package/dist/infra/lib/memory/__tests__/InMemoryStorage.test.js.map +0 -1
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.d.ts +0 -2
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.d.ts.map +0 -1
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.js +0 -196
- package/dist/infra/lib/memory/__tests__/ReflectionStore.test.js.map +0 -1
- package/dist/infra/lib/memory/index.test.d.ts +0 -2
- package/dist/infra/lib/memory/index.test.d.ts.map +0 -1
- package/dist/infra/lib/memory/index.test.js +0 -23
- package/dist/infra/lib/memory/index.test.js.map +0 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.test.d.ts +0 -2
- package/dist/infra/lib/telemetry/SkillTelemetry.test.d.ts.map +0 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.test.js +0 -124
- package/dist/infra/lib/telemetry/SkillTelemetry.test.js.map +0 -1
- package/dist/infra/lib/ui-ux/Bm25Engine.test.d.ts +0 -2
- package/dist/infra/lib/ui-ux/Bm25Engine.test.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/Bm25Engine.test.js +0 -159
- package/dist/infra/lib/ui-ux/Bm25Engine.test.js.map +0 -1
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.d.ts +0 -2
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.js +0 -141
- package/dist/infra/lib/ui-ux/CsvDataLoader.test.js.map +0 -1
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.d.ts +0 -2
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.js +0 -370
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.test.js.map +0 -1
- package/dist/infra/lib/ui-ux/SearchService.test.d.ts +0 -2
- package/dist/infra/lib/ui-ux/SearchService.test.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/SearchService.test.js +0 -215
- package/dist/infra/lib/ui-ux/SearchService.test.js.map +0 -1
- package/dist/test-helpers/index.d.ts +0 -36
- package/dist/test-helpers/index.d.ts.map +0 -1
- package/dist/test-helpers/index.js +0 -85
- package/dist/test-helpers/index.js.map +0 -1
- package/dist/test-helpers/index.test.d.ts +0 -2
- package/dist/test-helpers/index.test.d.ts.map +0 -1
- package/dist/test-helpers/index.test.js +0 -92
- package/dist/test-helpers/index.test.js.map +0 -1
- package/dist/tests/curated-release-notes.test.d.ts +0 -2
- package/dist/tests/curated-release-notes.test.d.ts.map +0 -1
- package/dist/tests/curated-release-notes.test.js +0 -160
- package/dist/tests/curated-release-notes.test.js.map +0 -1
- package/dist/tools/convention/analyzeComplexity.test.d.ts +0 -2
- package/dist/tools/convention/analyzeComplexity.test.d.ts.map +0 -1
- package/dist/tools/convention/analyzeComplexity.test.js +0 -207
- package/dist/tools/convention/analyzeComplexity.test.js.map +0 -1
- package/dist/tools/convention/validateCodeQuality.test.d.ts +0 -2
- package/dist/tools/convention/validateCodeQuality.test.d.ts.map +0 -1
- package/dist/tools/convention/validateCodeQuality.test.js +0 -230
- package/dist/tools/convention/validateCodeQuality.test.js.map +0 -1
- package/dist/tools/loop/validateLoopDefinition.test.d.ts +0 -14
- package/dist/tools/loop/validateLoopDefinition.test.d.ts.map +0 -1
- package/dist/tools/loop/validateLoopDefinition.test.js +0 -229
- package/dist/tools/loop/validateLoopDefinition.test.js.map +0 -1
- package/dist/tools/spec/executionPacket.test.d.ts +0 -2
- package/dist/tools/spec/executionPacket.test.d.ts.map +0 -1
- package/dist/tools/spec/executionPacket.test.js +0 -374
- package/dist/tools/spec/executionPacket.test.js.map +0 -1
- package/dist/tools/spec/prdParser.test.d.ts +0 -6
- package/dist/tools/spec/prdParser.test.d.ts.map +0 -1
- package/dist/tools/spec/prdParser.test.js +0 -332
- package/dist/tools/spec/prdParser.test.js.map +0 -1
- package/dist/tools/spec/specGenerator.test.d.ts +0 -2
- package/dist/tools/spec/specGenerator.test.d.ts.map +0 -1
- package/dist/tools/spec/specGenerator.test.js +0 -130
- package/dist/tools/spec/specGenerator.test.js.map +0 -1
- package/dist/tools/spec/traceabilityMatrix.path-resolution.test.d.ts +0 -10
- package/dist/tools/spec/traceabilityMatrix.path-resolution.test.d.ts.map +0 -1
- package/dist/tools/spec/traceabilityMatrix.path-resolution.test.js +0 -120
- package/dist/tools/spec/traceabilityMatrix.path-resolution.test.js.map +0 -1
- package/dist/tools/spec/traceabilityMatrix.test.d.ts +0 -6
- package/dist/tools/spec/traceabilityMatrix.test.d.ts.map +0 -1
- package/dist/tools/spec/traceabilityMatrix.test.js +0 -359
- package/dist/tools/spec/traceabilityMatrix.test.js.map +0 -1
- package/hooks/scripts/__tests__/.vibe/command-log.txt +0 -3
- package/hooks/scripts/__tests__/anchor-inbox.test.js +0 -119
- package/hooks/scripts/__tests__/auto-test-debounce.test.js +0 -145
- package/hooks/scripts/__tests__/clone-behaviors.test.js +0 -152
- package/hooks/scripts/__tests__/clone-merge-responsive.test.js +0 -106
- package/hooks/scripts/__tests__/code-check-detectors.test.js +0 -213
- package/hooks/scripts/__tests__/code-check-false-positive.test.js +0 -74
- package/hooks/scripts/__tests__/code-check-memory-write.test.js +0 -81
- package/hooks/scripts/__tests__/codex-hook-adapter.test.js +0 -64
- package/hooks/scripts/__tests__/curation-index.test.js +0 -157
- package/hooks/scripts/__tests__/dispatcher-inprocess.test.js +0 -99
- package/hooks/scripts/__tests__/figma-extract.test.js +0 -338
- package/hooks/scripts/__tests__/fixtures/seq-harness.js +0 -13
- package/hooks/scripts/__tests__/fixtures/seq-step.js +0 -22
- package/hooks/scripts/__tests__/hook-payload.test.js +0 -29
- package/hooks/scripts/__tests__/llm-orchestrate-antigravity.test.js +0 -66
- package/hooks/scripts/__tests__/loop-ledger.test.js +0 -321
- package/hooks/scripts/__tests__/post-edit-dispatcher.test.js +0 -139
- package/hooks/scripts/__tests__/pre-tool-guard.test.js +0 -523
- package/hooks/scripts/__tests__/recipe-extractor.test.js +0 -244
- package/hooks/scripts/__tests__/run-ledger-verify-required.test.js +0 -151
- package/hooks/scripts/__tests__/run-ledger.test.js +0 -481
- package/hooks/scripts/__tests__/scope-from-spec.test.js +0 -215
- package/hooks/scripts/__tests__/sentinel-guard.test.js +0 -263
- package/hooks/scripts/__tests__/step-counter.test.js +0 -459
- package/hooks/scripts/__tests__/stop-dispatcher-sequential.test.js +0 -74
- package/hooks/scripts/__tests__/utils-npm-root.test.js +0 -99
|
@@ -1,338 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import {
|
|
3
|
-
walk,
|
|
4
|
-
isDesignTextNode,
|
|
5
|
-
hasTextDescendantRaw,
|
|
6
|
-
hasRepeatingInstancesRaw,
|
|
7
|
-
vectorChildCountRaw,
|
|
8
|
-
shouldRenderImageAsBg,
|
|
9
|
-
resolveImageFills,
|
|
10
|
-
toHTML,
|
|
11
|
-
} from '../figma-extract.js';
|
|
12
|
-
|
|
13
|
-
// ─── Fixture helpers ────────────────────────────────────────────────
|
|
14
|
-
|
|
15
|
-
const bbox = (w = 100, h = 100, x = 0, y = 0) => ({ x, y, width: w, height: h });
|
|
16
|
-
|
|
17
|
-
function textNode(overrides = {}) {
|
|
18
|
-
return {
|
|
19
|
-
id: 'text-1', name: 'heading', type: 'TEXT', characters: 'Hello',
|
|
20
|
-
absoluteBoundingBox: bbox(200, 40),
|
|
21
|
-
style: { fontFamily: 'Inter', fontSize: 24, fontWeight: 600 },
|
|
22
|
-
fills: [{ type: 'SOLID', color: { r: 0, g: 0, b: 0, a: 1 } }],
|
|
23
|
-
...overrides,
|
|
24
|
-
};
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
function frame(name, children = [], overrides = {}) {
|
|
28
|
-
return {
|
|
29
|
-
id: `frame-${name}`, name, type: 'FRAME',
|
|
30
|
-
absoluteBoundingBox: bbox(800, 400),
|
|
31
|
-
children,
|
|
32
|
-
...overrides,
|
|
33
|
-
};
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
function imageFillNode(name, overrides = {}) {
|
|
37
|
-
return {
|
|
38
|
-
id: `img-${name}`, name, type: 'RECTANGLE',
|
|
39
|
-
absoluteBoundingBox: bbox(400, 300),
|
|
40
|
-
fills: [{ type: 'IMAGE', imageRef: 'ref-' + name, scaleMode: 'FILL' }],
|
|
41
|
-
...overrides,
|
|
42
|
-
};
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
// ─── isDesignTextNode (D1-D3) ───────────────────────────────────────
|
|
46
|
-
|
|
47
|
-
describe('isDesignTextNode', () => {
|
|
48
|
-
it('returns false for plain SOLID-filled text', () => {
|
|
49
|
-
expect(isDesignTextNode(textNode())).toBe(false);
|
|
50
|
-
});
|
|
51
|
-
|
|
52
|
-
it('D1: detects 2+ visible fills', () => {
|
|
53
|
-
const n = textNode({
|
|
54
|
-
fills: [
|
|
55
|
-
{ type: 'SOLID', color: { r: 0, g: 0, b: 0, a: 1 } },
|
|
56
|
-
{ type: 'SOLID', color: { r: 1, g: 0, b: 0, a: 0.5 } },
|
|
57
|
-
],
|
|
58
|
-
});
|
|
59
|
-
expect(isDesignTextNode(n)).toBe(true);
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
it('D3: detects GRADIENT_LINEAR fill', () => {
|
|
63
|
-
const n = textNode({
|
|
64
|
-
fills: [{
|
|
65
|
-
type: 'GRADIENT_LINEAR',
|
|
66
|
-
gradientStops: [
|
|
67
|
-
{ position: 0, color: { r: 1, g: 0, b: 0, a: 1 } },
|
|
68
|
-
{ position: 1, color: { r: 0, g: 0, b: 1, a: 1 } },
|
|
69
|
-
],
|
|
70
|
-
gradientHandlePositions: [{ x: 0, y: 0 }, { x: 1, y: 0 }],
|
|
71
|
-
}],
|
|
72
|
-
});
|
|
73
|
-
expect(isDesignTextNode(n)).toBe(true);
|
|
74
|
-
});
|
|
75
|
-
|
|
76
|
-
it('D2: detects DROP_SHADOW effect', () => {
|
|
77
|
-
const n = textNode({ effects: [{ type: 'DROP_SHADOW', visible: true, radius: 4 }] });
|
|
78
|
-
expect(isDesignTextNode(n)).toBe(true);
|
|
79
|
-
});
|
|
80
|
-
|
|
81
|
-
it('D2: detects visible stroke', () => {
|
|
82
|
-
const n = textNode({ strokes: [{ type: 'SOLID', visible: true, color: { r: 1, g: 1, b: 1, a: 1 } }] });
|
|
83
|
-
expect(isDesignTextNode(n)).toBe(true);
|
|
84
|
-
});
|
|
85
|
-
|
|
86
|
-
it('ignores invisible fills', () => {
|
|
87
|
-
const n = textNode({
|
|
88
|
-
fills: [
|
|
89
|
-
{ type: 'SOLID', color: { r: 0, g: 0, b: 0, a: 1 } },
|
|
90
|
-
{ type: 'GRADIENT_LINEAR', visible: false },
|
|
91
|
-
],
|
|
92
|
-
});
|
|
93
|
-
expect(isDesignTextNode(n)).toBe(false);
|
|
94
|
-
});
|
|
95
|
-
|
|
96
|
-
it('returns false for non-TEXT nodes', () => {
|
|
97
|
-
expect(isDesignTextNode({ type: 'FRAME', fills: [] })).toBe(false);
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
|
|
101
|
-
// ─── hasTextDescendantRaw (Q1) ──────────────────────────────────────
|
|
102
|
-
|
|
103
|
-
describe('hasTextDescendantRaw', () => {
|
|
104
|
-
it('true when node itself is non-empty TEXT', () => {
|
|
105
|
-
expect(hasTextDescendantRaw(textNode())).toBe(true);
|
|
106
|
-
});
|
|
107
|
-
|
|
108
|
-
it('false when TEXT node has only whitespace', () => {
|
|
109
|
-
expect(hasTextDescendantRaw(textNode({ characters: ' ' }))).toBe(false);
|
|
110
|
-
});
|
|
111
|
-
|
|
112
|
-
it('true when any descendant is TEXT', () => {
|
|
113
|
-
const tree = frame('BG', [
|
|
114
|
-
{ id: 'g', name: 'group', type: 'GROUP', children: [textNode()] },
|
|
115
|
-
]);
|
|
116
|
-
expect(hasTextDescendantRaw(tree)).toBe(true);
|
|
117
|
-
});
|
|
118
|
-
|
|
119
|
-
it('false for purely decorative VECTOR/RECTANGLE subtree', () => {
|
|
120
|
-
const tree = frame('BG', [
|
|
121
|
-
{ id: 'v1', name: 'sparkle', type: 'VECTOR', children: [] },
|
|
122
|
-
{ id: 'v2', name: 'glow', type: 'RECTANGLE', children: [] },
|
|
123
|
-
]);
|
|
124
|
-
expect(hasTextDescendantRaw(tree)).toBe(false);
|
|
125
|
-
});
|
|
126
|
-
});
|
|
127
|
-
|
|
128
|
-
// ─── hasRepeatingInstancesRaw (Q2) ──────────────────────────────────
|
|
129
|
-
|
|
130
|
-
describe('hasRepeatingInstancesRaw', () => {
|
|
131
|
-
it('true for 2+ INSTANCE children with same componentId', () => {
|
|
132
|
-
const tree = frame('cards', [
|
|
133
|
-
{ id: 'i1', name: 'Card 1', type: 'INSTANCE', componentId: 'C:1', children: [] },
|
|
134
|
-
{ id: 'i2', name: 'Card 2', type: 'INSTANCE', componentId: 'C:1', children: [] },
|
|
135
|
-
]);
|
|
136
|
-
expect(hasRepeatingInstancesRaw(tree)).toBe(true);
|
|
137
|
-
});
|
|
138
|
-
|
|
139
|
-
it('true for 2+ INSTANCE children with same name stem (trailing digits stripped)', () => {
|
|
140
|
-
const tree = frame('list', [
|
|
141
|
-
{ id: 'i1', name: 'item 1', type: 'INSTANCE', children: [] },
|
|
142
|
-
{ id: 'i2', name: 'item 2', type: 'INSTANCE', children: [] },
|
|
143
|
-
]);
|
|
144
|
-
expect(hasRepeatingInstancesRaw(tree)).toBe(true);
|
|
145
|
-
});
|
|
146
|
-
|
|
147
|
-
it('false for single INSTANCE', () => {
|
|
148
|
-
const tree = frame('solo', [
|
|
149
|
-
{ id: 'i1', name: 'hero', type: 'INSTANCE', children: [] },
|
|
150
|
-
]);
|
|
151
|
-
expect(hasRepeatingInstancesRaw(tree)).toBe(false);
|
|
152
|
-
});
|
|
153
|
-
|
|
154
|
-
it('false for mixed non-repeating INSTANCEs', () => {
|
|
155
|
-
const tree = frame('mix', [
|
|
156
|
-
{ id: 'i1', name: 'hero', type: 'INSTANCE', componentId: 'C:A', children: [] },
|
|
157
|
-
{ id: 'i2', name: 'footer', type: 'INSTANCE', componentId: 'C:B', children: [] },
|
|
158
|
-
]);
|
|
159
|
-
expect(hasRepeatingInstancesRaw(tree)).toBe(false);
|
|
160
|
-
});
|
|
161
|
-
});
|
|
162
|
-
|
|
163
|
-
// ─── vectorChildCountRaw (D4 helper) ────────────────────────────────
|
|
164
|
-
|
|
165
|
-
describe('vectorChildCountRaw', () => {
|
|
166
|
-
it('counts direct VECTOR-family children', () => {
|
|
167
|
-
const tree = frame('parent', [
|
|
168
|
-
{ id: 'v1', type: 'VECTOR', children: [] },
|
|
169
|
-
{ id: 'v2', type: 'LINE', children: [] },
|
|
170
|
-
{ id: 'v3', type: 'BOOLEAN_OPERATION', children: [] },
|
|
171
|
-
{ id: 'r1', type: 'RECTANGLE', children: [] },
|
|
172
|
-
]);
|
|
173
|
-
expect(vectorChildCountRaw(tree)).toBe(3);
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
it('returns 0 for leaf', () => {
|
|
177
|
-
expect(vectorChildCountRaw({ id: 'x', type: 'FRAME' })).toBe(0);
|
|
178
|
-
});
|
|
179
|
-
});
|
|
180
|
-
|
|
181
|
-
// ─── walk() integration: metadata propagates into tree ──────────────
|
|
182
|
-
|
|
183
|
-
describe('walk() metadata', () => {
|
|
184
|
-
it('emits hasTextChildren on ancestors of TEXT nodes', () => {
|
|
185
|
-
const raw = frame('section', [
|
|
186
|
-
frame('BG', [textNode({ name: 'title' })]),
|
|
187
|
-
]);
|
|
188
|
-
const tree = walk(raw);
|
|
189
|
-
expect(tree.hasTextChildren).toBe(true);
|
|
190
|
-
expect(tree.children[0].hasTextChildren).toBe(true); // BG frame too
|
|
191
|
-
});
|
|
192
|
-
|
|
193
|
-
it('omits hasTextChildren for pure decoration', () => {
|
|
194
|
-
const raw = frame('section', [
|
|
195
|
-
frame('BG', [
|
|
196
|
-
{ id: 'v1', name: 'glow', type: 'VECTOR', children: [] },
|
|
197
|
-
]),
|
|
198
|
-
]);
|
|
199
|
-
const tree = walk(raw);
|
|
200
|
-
expect(tree.hasTextChildren).toBeUndefined();
|
|
201
|
-
});
|
|
202
|
-
|
|
203
|
-
it('emits hasInstanceRepeat on parents of repeating INSTANCEs', () => {
|
|
204
|
-
const raw = frame('list', [
|
|
205
|
-
{ id: 'c1', name: 'card 1', type: 'INSTANCE', componentId: 'C:1', children: [] },
|
|
206
|
-
{ id: 'c2', name: 'card 2', type: 'INSTANCE', componentId: 'C:1', children: [] },
|
|
207
|
-
]);
|
|
208
|
-
const tree = walk(raw);
|
|
209
|
-
expect(tree.hasInstanceRepeat).toBe(true);
|
|
210
|
-
});
|
|
211
|
-
|
|
212
|
-
it('emits isDesignText on gradient-filled TEXT', () => {
|
|
213
|
-
const raw = textNode({
|
|
214
|
-
fills: [{
|
|
215
|
-
type: 'GRADIENT_LINEAR',
|
|
216
|
-
gradientStops: [
|
|
217
|
-
{ position: 0, color: { r: 1, g: 0, b: 0, a: 1 } },
|
|
218
|
-
{ position: 1, color: { r: 0, g: 0, b: 1, a: 1 } },
|
|
219
|
-
],
|
|
220
|
-
gradientHandlePositions: [{ x: 0, y: 0 }, { x: 1, y: 0 }],
|
|
221
|
-
}],
|
|
222
|
-
});
|
|
223
|
-
const tree = walk(raw);
|
|
224
|
-
expect(tree.isDesignText).toBe(true);
|
|
225
|
-
});
|
|
226
|
-
});
|
|
227
|
-
|
|
228
|
-
// ─── shouldRenderImageAsBg ──────────────────────────────────────────
|
|
229
|
-
|
|
230
|
-
describe('shouldRenderImageAsBg', () => {
|
|
231
|
-
it('container with TEXT descendants → CSS bg', () => {
|
|
232
|
-
const node = { name: 'hero', imageRef: 'r1', hasTextChildren: true, children: [{}] };
|
|
233
|
-
expect(shouldRenderImageAsBg(node)).toBe(true);
|
|
234
|
-
});
|
|
235
|
-
|
|
236
|
-
it('container with repeating instances → CSS bg', () => {
|
|
237
|
-
const node = { name: 'grid', imageRef: 'r1', hasInstanceRepeat: true, children: [{}, {}] };
|
|
238
|
-
expect(shouldRenderImageAsBg(node)).toBe(true);
|
|
239
|
-
});
|
|
240
|
-
|
|
241
|
-
it('node named BG → CSS bg', () => {
|
|
242
|
-
const node = { name: 'BG', imageRef: 'r1', children: [] };
|
|
243
|
-
expect(shouldRenderImageAsBg(node)).toBe(true);
|
|
244
|
-
});
|
|
245
|
-
|
|
246
|
-
it('node named 배경 → CSS bg', () => {
|
|
247
|
-
const node = { name: '배경', imageRef: 'r1', children: [] };
|
|
248
|
-
expect(shouldRenderImageAsBg(node)).toBe(true);
|
|
249
|
-
});
|
|
250
|
-
|
|
251
|
-
it('container with non-vector children → CSS bg', () => {
|
|
252
|
-
const node = {
|
|
253
|
-
name: 'card', imageRef: 'r1',
|
|
254
|
-
children: [{ type: 'FRAME' }],
|
|
255
|
-
};
|
|
256
|
-
expect(shouldRenderImageAsBg(node)).toBe(true);
|
|
257
|
-
});
|
|
258
|
-
|
|
259
|
-
it('leaf with image-like name → <img>', () => {
|
|
260
|
-
const node = { name: 'photo-1', imageRef: 'r1', children: [] };
|
|
261
|
-
expect(shouldRenderImageAsBg(node)).toBe(false);
|
|
262
|
-
});
|
|
263
|
-
|
|
264
|
-
it('leaf with generic name → <img> (default)', () => {
|
|
265
|
-
const node = { name: 'Rectangle 5', imageRef: 'r1', children: [] };
|
|
266
|
-
expect(shouldRenderImageAsBg(node)).toBe(false);
|
|
267
|
-
});
|
|
268
|
-
|
|
269
|
-
it('container with only VECTOR children still → CSS bg (parent is not a leaf image)', () => {
|
|
270
|
-
const node = {
|
|
271
|
-
name: 'hero',
|
|
272
|
-
imageRef: 'r1',
|
|
273
|
-
children: [{ type: 'VECTOR' }, { type: 'VECTOR' }],
|
|
274
|
-
};
|
|
275
|
-
expect(shouldRenderImageAsBg(node)).toBe(true);
|
|
276
|
-
});
|
|
277
|
-
});
|
|
278
|
-
|
|
279
|
-
// ─── resolveImageFills + toHTML integration ─────────────────────────
|
|
280
|
-
|
|
281
|
-
describe('resolveImageFills', () => {
|
|
282
|
-
it('converts BG-named leaf with IMAGE fill to CSS bg (no <img>)', () => {
|
|
283
|
-
const tree = walk(frame('section', [imageFillNode('BG')]));
|
|
284
|
-
const imageMap = { 'ref-BG': 'images/bg.webp' };
|
|
285
|
-
resolveImageFills(tree, imageMap);
|
|
286
|
-
const bgChild = tree.children[0];
|
|
287
|
-
expect(bgChild.imageRef).toBeUndefined();
|
|
288
|
-
expect(bgChild.renderAsBg).toBe(true);
|
|
289
|
-
expect(bgChild.css.backgroundImage).toBe("url('images/bg.webp')");
|
|
290
|
-
expect(bgChild.css.backgroundSize).toBe('cover');
|
|
291
|
-
});
|
|
292
|
-
|
|
293
|
-
it('keeps <img> for leaf named like a photo', () => {
|
|
294
|
-
const tree = walk(frame('section', [imageFillNode('photo-hero')]));
|
|
295
|
-
const imageMap = { 'ref-photo-hero': 'images/photo.webp' };
|
|
296
|
-
resolveImageFills(tree, imageMap);
|
|
297
|
-
const leaf = tree.children[0];
|
|
298
|
-
expect(leaf.imageRef).toBe('ref-photo-hero');
|
|
299
|
-
expect(leaf.renderAsBg).toBeUndefined();
|
|
300
|
-
});
|
|
301
|
-
|
|
302
|
-
it('converts IMAGE-fill container with TEXT descendant to CSS bg', () => {
|
|
303
|
-
const container = imageFillNode('card', { type: 'FRAME' });
|
|
304
|
-
container.children = [textNode({ name: 'title' })];
|
|
305
|
-
const tree = walk(frame('section', [container]));
|
|
306
|
-
const imageMap = { 'ref-card': 'images/card.webp' };
|
|
307
|
-
resolveImageFills(tree, imageMap);
|
|
308
|
-
const card = tree.children[0];
|
|
309
|
-
expect(card.imageRef).toBeUndefined();
|
|
310
|
-
expect(card.renderAsBg).toBe(true);
|
|
311
|
-
});
|
|
312
|
-
|
|
313
|
-
it('uses contain for FIT scale mode', () => {
|
|
314
|
-
const tree = walk(frame('s', [imageFillNode('BG', { fills: [{ type: 'IMAGE', imageRef: 'ref-BG', scaleMode: 'FIT' }] })]));
|
|
315
|
-
const imageMap = { 'ref-BG': 'images/bg.webp' };
|
|
316
|
-
resolveImageFills(tree, imageMap);
|
|
317
|
-
expect(tree.children[0].css.backgroundSize).toBe('contain');
|
|
318
|
-
});
|
|
319
|
-
});
|
|
320
|
-
|
|
321
|
-
describe('toHTML after resolveImageFills', () => {
|
|
322
|
-
it('BG-named image node renders as <div>, not <img>', () => {
|
|
323
|
-
const tree = walk(frame('section', [imageFillNode('BG')]));
|
|
324
|
-
const imageMap = { 'ref-BG': 'images/bg.webp' };
|
|
325
|
-
resolveImageFills(tree, imageMap);
|
|
326
|
-
const html = toHTML(tree, '', imageMap);
|
|
327
|
-
expect(html).not.toMatch(/<img[^>]+images\/bg\.webp/);
|
|
328
|
-
expect(html).toMatch(/<div class="section-bg"/);
|
|
329
|
-
});
|
|
330
|
-
|
|
331
|
-
it('standalone photo leaf renders as <img>', () => {
|
|
332
|
-
const tree = walk(frame('section', [imageFillNode('photo-hero')]));
|
|
333
|
-
const imageMap = { 'ref-photo-hero': 'images/photo.webp' };
|
|
334
|
-
resolveImageFills(tree, imageMap);
|
|
335
|
-
const html = toHTML(tree, '', imageMap);
|
|
336
|
-
expect(html).toMatch(/<img[^>]+images\/photo\.webp/);
|
|
337
|
-
});
|
|
338
|
-
});
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* dispatch() 를 실제 계약대로 (CLI spawn + stdin) 구동하는 테스트 하네스.
|
|
4
|
-
* 스텝 3개를 dispatch 에 넘기고, 각 스텝은 seq-step.js 가 트레이스를 남긴다.
|
|
5
|
-
*/
|
|
6
|
-
import { dispatch } from '../../lib/dispatcher.js';
|
|
7
|
-
|
|
8
|
-
await dispatch([
|
|
9
|
-
{ name: 'seq-a', script: '__tests__/fixtures/seq-step.js', args: ['a'] },
|
|
10
|
-
{ name: 'seq-b', script: '__tests__/fixtures/seq-step.js', args: ['b'] },
|
|
11
|
-
{ name: 'seq-c', script: '__tests__/fixtures/seq-step.js', args: ['c'] },
|
|
12
|
-
]);
|
|
13
|
-
process.exit(0);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* dispatch() 순차 실행 회귀 테스트용 스텝 픽스처.
|
|
4
|
-
*
|
|
5
|
-
* 실행 구간의 시작/끝을 VIBE_SEQ_TRACE 파일에 append 한다.
|
|
6
|
-
* 순차 실행이면 트레이스는 `a:start,a:end,b:start,b:end` 처럼 구간이 겹치지 않고,
|
|
7
|
-
* 병렬 실행이면 `a:start,b:start,...` 로 인터리빙된다.
|
|
8
|
-
*/
|
|
9
|
-
import fs from 'fs';
|
|
10
|
-
|
|
11
|
-
const name = process.argv[2] || '?';
|
|
12
|
-
const tracePath = process.env.VIBE_SEQ_TRACE;
|
|
13
|
-
const holdMs = Number(process.env.VIBE_SEQ_HOLD_MS || 120);
|
|
14
|
-
|
|
15
|
-
fs.appendFileSync(tracePath, `${name}:start\n`);
|
|
16
|
-
|
|
17
|
-
// 동기 홀드 — 병렬 실행 시 다른 스텝의 start 가 이 구간 안에 끼어들도록 만든다.
|
|
18
|
-
const until = Date.now() + holdMs;
|
|
19
|
-
while (Date.now() < until) { /* busy wait */ }
|
|
20
|
-
|
|
21
|
-
fs.appendFileSync(tracePath, `${name}:end\n`);
|
|
22
|
-
process.exit(0);
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect } from 'vitest';
|
|
2
|
-
import {
|
|
3
|
-
extractToolInput,
|
|
4
|
-
extractToolName,
|
|
5
|
-
normalizeHookPayload,
|
|
6
|
-
} from '../hook-payload.js';
|
|
7
|
-
|
|
8
|
-
describe('hook-payload', () => {
|
|
9
|
-
it('normalizes stdin JSON payloads from native hook runners', () => {
|
|
10
|
-
const payload = normalizeHookPayload(
|
|
11
|
-
JSON.stringify({
|
|
12
|
-
tool_name: 'Bash',
|
|
13
|
-
tool_input: { command: 'npm test' },
|
|
14
|
-
}),
|
|
15
|
-
{},
|
|
16
|
-
);
|
|
17
|
-
|
|
18
|
-
expect(extractToolName(payload)).toBe('Bash');
|
|
19
|
-
expect(extractToolInput(payload).command).toBe('npm test');
|
|
20
|
-
});
|
|
21
|
-
|
|
22
|
-
it('falls back to legacy TOOL_INPUT env for Claude-style scripts', () => {
|
|
23
|
-
const payload = normalizeHookPayload('', {
|
|
24
|
-
TOOL_INPUT: JSON.stringify({ command: 'npm run build' }),
|
|
25
|
-
});
|
|
26
|
-
|
|
27
|
-
expect(extractToolInput(payload).command).toBe('npm run build');
|
|
28
|
-
});
|
|
29
|
-
});
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
import { describe, it, expect, afterEach } from 'vitest';
|
|
2
|
-
import fs from 'fs';
|
|
3
|
-
import os from 'os';
|
|
4
|
-
import path from 'path';
|
|
5
|
-
import { execFileSync } from 'child_process';
|
|
6
|
-
|
|
7
|
-
describe('llm-orchestrate Antigravity provider', () => {
|
|
8
|
-
const tempDirs = [];
|
|
9
|
-
|
|
10
|
-
afterEach(() => {
|
|
11
|
-
for (const dir of tempDirs.splice(0)) {
|
|
12
|
-
fs.rmSync(dir, { recursive: true, force: true });
|
|
13
|
-
}
|
|
14
|
-
});
|
|
15
|
-
|
|
16
|
-
// win32 skip: spawnCli가 cmd.exe /c 로 실행하는데 cmd.exe는 인자 내 LF에서 명령을
|
|
17
|
-
// 절단하므로 멀티라인 프롬프트의 argv 전송 자체가 불가능하다 (프로덕션 결함 — codex/claude
|
|
18
|
-
// 경로처럼 stdin 전송으로 전환할지는 agy CLI의 stdin 지원 확인 후 결정).
|
|
19
|
-
it.skipIf(process.platform === 'win32')('calls agy -p for Antigravity text orchestration', () => {
|
|
20
|
-
const root = fs.mkdtempSync(path.join(os.tmpdir(), 'vibe-agy-'));
|
|
21
|
-
const binDir = path.join(root, 'bin');
|
|
22
|
-
const homeDir = path.join(root, 'home');
|
|
23
|
-
const capturePath = path.join(root, 'capture.json');
|
|
24
|
-
fs.mkdirSync(binDir, { recursive: true });
|
|
25
|
-
fs.mkdirSync(homeDir, { recursive: true });
|
|
26
|
-
tempDirs.push(root);
|
|
27
|
-
|
|
28
|
-
fs.writeFileSync(
|
|
29
|
-
path.join(binDir, 'agy'),
|
|
30
|
-
[
|
|
31
|
-
`#!${process.execPath}`,
|
|
32
|
-
'const fs = require("fs");',
|
|
33
|
-
'const stdin = fs.readFileSync(0, "utf8");',
|
|
34
|
-
'fs.writeFileSync(process.env.AGY_CAPTURE, JSON.stringify({ argv: process.argv.slice(2), stdin }));',
|
|
35
|
-
'process.stdout.write("antigravity ok");',
|
|
36
|
-
'',
|
|
37
|
-
].join('\n'),
|
|
38
|
-
{ mode: 0o755 }
|
|
39
|
-
);
|
|
40
|
-
|
|
41
|
-
const scriptPath = path.resolve('hooks/scripts/llm-orchestrate.js');
|
|
42
|
-
const output = execFileSync(
|
|
43
|
-
process.execPath,
|
|
44
|
-
[scriptPath, 'antigravity', 'orchestrate-json', 'System prompt', 'User prompt'],
|
|
45
|
-
{
|
|
46
|
-
cwd: root,
|
|
47
|
-
env: {
|
|
48
|
-
...process.env,
|
|
49
|
-
HOME: homeDir,
|
|
50
|
-
PATH: [binDir, process.env.PATH || ''].join(path.delimiter),
|
|
51
|
-
AGY_CAPTURE: capturePath,
|
|
52
|
-
},
|
|
53
|
-
encoding: 'utf8',
|
|
54
|
-
timeout: 5000,
|
|
55
|
-
}
|
|
56
|
-
);
|
|
57
|
-
|
|
58
|
-
const capture = JSON.parse(fs.readFileSync(capturePath, 'utf8'));
|
|
59
|
-
expect(output).toContain('Antigravity response: antigravity ok');
|
|
60
|
-
expect(capture.argv[0]).toBe('-p');
|
|
61
|
-
expect(capture.argv[1]).toContain('[System]\nSystem prompt');
|
|
62
|
-
expect(capture.argv[1]).toContain('[User]\nUser prompt');
|
|
63
|
-
expect(capture.argv[1]).toContain('valid JSON only');
|
|
64
|
-
expect(capture.stdin).toBe('');
|
|
65
|
-
});
|
|
66
|
-
});
|