@su-record/vibe 3.2.64 → 4.0.0
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/LICENSE +1 -1
- package/README.md +100 -288
- package/card.md +9 -0
- package/dist/cli.js +584 -0
- package/dist/cli.js.map +1 -0
- package/dist/core/check.js +245 -0
- package/dist/core/check.js.map +1 -0
- package/dist/core/checks/eval.js +66 -0
- package/dist/core/checks/eval.js.map +1 -0
- package/dist/core/checks/file.js +88 -0
- package/dist/core/checks/file.js.map +1 -0
- package/dist/core/checks/http.js +48 -0
- package/dist/core/checks/http.js.map +1 -0
- package/dist/core/checks/run.js +42 -0
- package/dist/core/checks/run.js.map +1 -0
- package/dist/core/client.js +35 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/config.js +30 -0
- package/dist/core/config.js.map +1 -0
- package/dist/core/errors.js +12 -0
- package/dist/core/errors.js.map +1 -0
- package/dist/core/github.js +49 -0
- package/dist/core/github.js.map +1 -0
- package/dist/core/inbox.js +73 -0
- package/dist/core/inbox.js.map +1 -0
- package/dist/core/intent.js +91 -0
- package/dist/core/intent.js.map +1 -0
- package/dist/core/knowledge.js +22 -0
- package/dist/core/knowledge.js.map +1 -0
- package/dist/core/ledger.js +124 -0
- package/dist/core/ledger.js.map +1 -0
- package/dist/core/paths.js +29 -0
- package/dist/core/paths.js.map +1 -0
- package/dist/core/profile.js +88 -0
- package/dist/core/profile.js.map +1 -0
- package/dist/core/regress.js +66 -0
- package/dist/core/regress.js.map +1 -0
- package/dist/core/research.js +205 -0
- package/dist/core/research.js.map +1 -0
- package/dist/core/scenarios.js +193 -0
- package/dist/core/scenarios.js.map +1 -0
- package/dist/core/skills.js +276 -0
- package/dist/core/skills.js.map +1 -0
- package/dist/core/state.js +70 -0
- package/dist/core/state.js.map +1 -0
- package/dist/core/store.js +59 -0
- package/dist/core/store.js.map +1 -0
- package/dist/core/table.js +106 -0
- package/dist/core/table.js.map +1 -0
- package/dist/core/tokens.js +67 -0
- package/dist/core/tokens.js.map +1 -0
- package/dist/core/tree.js +97 -0
- package/dist/core/tree.js.map +1 -0
- package/dist/core/view.js +67 -0
- package/dist/core/view.js.map +1 -0
- package/dist/install/plugin.js +145 -0
- package/dist/install/plugin.js.map +1 -0
- package/dist/install/project.js +213 -0
- package/dist/install/project.js.map +1 -0
- package/hooks/notify.js +92 -0
- package/package.json +27 -118
- package/skills/vibe/SKILL.md +20 -265
- package/skills/vibe.build/SKILL.md +35 -0
- package/skills/vibe.discover/SKILL.md +35 -0
- package/skills/vibe.handoff/SKILL.md +21 -6
- package/skills/vibe.prove/SKILL.md +19 -0
- package/skills/vibe.scope/SKILL.md +39 -0
- package/.claude-plugin/plugin.json +0 -22
- package/.codex-plugin/plugin.json +0 -34
- package/.env.example +0 -52
- package/CLAUDE.md +0 -239
- package/README.en.md +0 -347
- package/agents/architect.md +0 -38
- package/agents/build-error-resolver.md +0 -46
- package/agents/code-reviewer.md +0 -89
- package/agents/e2e-tester.md +0 -66
- package/agents/event/event-ops.md +0 -61
- package/agents/event/event-planner.md +0 -63
- package/agents/implementer.md +0 -39
- package/agents/security-reviewer.md +0 -56
- package/agents/tester.md +0 -53
- package/agents/ui/design-reviewer.md +0 -62
- package/agents/ui/design-system-gen.md +0 -63
- package/dist/cli/auth.d.ts +0 -30
- package/dist/cli/auth.d.ts.map +0 -1
- package/dist/cli/auth.js +0 -140
- package/dist/cli/auth.js.map +0 -1
- package/dist/cli/collaborator.d.ts +0 -12
- package/dist/cli/collaborator.d.ts.map +0 -1
- package/dist/cli/collaborator.js +0 -150
- package/dist/cli/collaborator.js.map +0 -1
- package/dist/cli/commands/codex-proxy.d.ts +0 -10
- package/dist/cli/commands/codex-proxy.d.ts.map +0 -1
- package/dist/cli/commands/codex-proxy.js +0 -272
- package/dist/cli/commands/codex-proxy.js.map +0 -1
- package/dist/cli/commands/config.d.ts +0 -17
- package/dist/cli/commands/config.d.ts.map +0 -1
- package/dist/cli/commands/config.js +0 -209
- package/dist/cli/commands/config.js.map +0 -1
- package/dist/cli/commands/evolution.d.ts +0 -16
- package/dist/cli/commands/evolution.d.ts.map +0 -1
- package/dist/cli/commands/evolution.js +0 -211
- package/dist/cli/commands/evolution.js.map +0 -1
- package/dist/cli/commands/figma.d.ts +0 -29
- package/dist/cli/commands/figma.d.ts.map +0 -1
- package/dist/cli/commands/figma.js +0 -147
- package/dist/cli/commands/figma.js.map +0 -1
- package/dist/cli/commands/index.d.ts +0 -19
- package/dist/cli/commands/index.d.ts.map +0 -1
- package/dist/cli/commands/index.js +0 -19
- package/dist/cli/commands/index.js.map +0 -1
- package/dist/cli/commands/info.d.ts +0 -72
- package/dist/cli/commands/info.d.ts.map +0 -1
- package/dist/cli/commands/info.js +0 -263
- package/dist/cli/commands/info.js.map +0 -1
- package/dist/cli/commands/init.d.ts +0 -36
- package/dist/cli/commands/init.d.ts.map +0 -1
- package/dist/cli/commands/init.js +0 -393
- package/dist/cli/commands/init.js.map +0 -1
- package/dist/cli/commands/llm.d.ts +0 -11
- package/dist/cli/commands/llm.d.ts.map +0 -1
- package/dist/cli/commands/llm.js +0 -63
- package/dist/cli/commands/llm.js.map +0 -1
- package/dist/cli/commands/plugin.d.ts +0 -5
- package/dist/cli/commands/plugin.d.ts.map +0 -1
- package/dist/cli/commands/plugin.js +0 -223
- package/dist/cli/commands/plugin.js.map +0 -1
- package/dist/cli/commands/remove.d.ts +0 -8
- package/dist/cli/commands/remove.d.ts.map +0 -1
- package/dist/cli/commands/remove.js +0 -157
- package/dist/cli/commands/remove.js.map +0 -1
- package/dist/cli/commands/sentinel.d.ts +0 -22
- package/dist/cli/commands/sentinel.d.ts.map +0 -1
- package/dist/cli/commands/sentinel.js +0 -324
- package/dist/cli/commands/sentinel.js.map +0 -1
- package/dist/cli/commands/setup.d.ts +0 -9
- package/dist/cli/commands/setup.d.ts.map +0 -1
- package/dist/cli/commands/setup.js +0 -223
- package/dist/cli/commands/setup.js.map +0 -1
- package/dist/cli/commands/skills.d.ts +0 -13
- package/dist/cli/commands/skills.d.ts.map +0 -1
- package/dist/cli/commands/skills.js +0 -117
- package/dist/cli/commands/skills.js.map +0 -1
- package/dist/cli/commands/slack.d.ts +0 -11
- package/dist/cli/commands/slack.d.ts.map +0 -1
- package/dist/cli/commands/slack.js +0 -83
- package/dist/cli/commands/slack.js.map +0 -1
- package/dist/cli/commands/stats.d.ts +0 -13
- package/dist/cli/commands/stats.d.ts.map +0 -1
- package/dist/cli/commands/stats.js +0 -281
- package/dist/cli/commands/stats.js.map +0 -1
- package/dist/cli/commands/telegram.d.ts +0 -13
- package/dist/cli/commands/telegram.d.ts.map +0 -1
- package/dist/cli/commands/telegram.js +0 -236
- package/dist/cli/commands/telegram.js.map +0 -1
- package/dist/cli/commands/update.d.ts +0 -10
- package/dist/cli/commands/update.d.ts.map +0 -1
- package/dist/cli/commands/update.js +0 -168
- package/dist/cli/commands/update.js.map +0 -1
- package/dist/cli/commands/upgrade.d.ts +0 -96
- package/dist/cli/commands/upgrade.d.ts.map +0 -1
- package/dist/cli/commands/upgrade.js +0 -357
- package/dist/cli/commands/upgrade.js.map +0 -1
- package/dist/cli/design/design-md-parser.d.ts +0 -25
- package/dist/cli/design/design-md-parser.d.ts.map +0 -1
- package/dist/cli/design/design-md-parser.js +0 -86
- package/dist/cli/design/design-md-parser.js.map +0 -1
- package/dist/cli/detect/matcher.d.ts +0 -15
- package/dist/cli/detect/matcher.d.ts.map +0 -1
- package/dist/cli/detect/matcher.js +0 -278
- package/dist/cli/detect/matcher.js.map +0 -1
- package/dist/cli/detect/signatures.d.ts +0 -76
- package/dist/cli/detect/signatures.d.ts.map +0 -1
- package/dist/cli/detect/signatures.js +0 -175
- package/dist/cli/detect/signatures.js.map +0 -1
- package/dist/cli/detect/workspace.d.ts +0 -7
- package/dist/cli/detect/workspace.d.ts.map +0 -1
- package/dist/cli/detect/workspace.js +0 -112
- package/dist/cli/detect/workspace.js.map +0 -1
- package/dist/cli/detect.d.ts +0 -35
- package/dist/cli/detect.d.ts.map +0 -1
- package/dist/cli/detect.js +0 -213
- package/dist/cli/detect.js.map +0 -1
- package/dist/cli/generate-release-notes.d.ts +0 -3
- package/dist/cli/generate-release-notes.d.ts.map +0 -1
- package/dist/cli/generate-release-notes.js +0 -49
- package/dist/cli/generate-release-notes.js.map +0 -1
- package/dist/cli/index.d.ts +0 -30
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js +0 -475
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/llm/antigravity-commands.d.ts +0 -25
- package/dist/cli/llm/antigravity-commands.d.ts.map +0 -1
- package/dist/cli/llm/antigravity-commands.js +0 -142
- package/dist/cli/llm/antigravity-commands.js.map +0 -1
- package/dist/cli/llm/claude-commands.d.ts +0 -12
- package/dist/cli/llm/claude-commands.d.ts.map +0 -1
- package/dist/cli/llm/claude-commands.js +0 -75
- package/dist/cli/llm/claude-commands.js.map +0 -1
- package/dist/cli/llm/config.d.ts +0 -19
- package/dist/cli/llm/config.d.ts.map +0 -1
- package/dist/cli/llm/config.js +0 -137
- package/dist/cli/llm/config.js.map +0 -1
- package/dist/cli/llm/gpt-commands.d.ts +0 -17
- package/dist/cli/llm/gpt-commands.d.ts.map +0 -1
- package/dist/cli/llm/gpt-commands.js +0 -85
- package/dist/cli/llm/gpt-commands.js.map +0 -1
- package/dist/cli/llm/help.d.ts +0 -12
- package/dist/cli/llm/help.d.ts.map +0 -1
- package/dist/cli/llm/help.js +0 -37
- package/dist/cli/llm/help.js.map +0 -1
- package/dist/cli/llm/index.d.ts +0 -10
- package/dist/cli/llm/index.d.ts.map +0 -1
- package/dist/cli/llm/index.js +0 -10
- package/dist/cli/llm/index.js.map +0 -1
- package/dist/cli/llm/model-refresh.d.ts +0 -29
- package/dist/cli/llm/model-refresh.d.ts.map +0 -1
- package/dist/cli/llm/model-refresh.js +0 -139
- package/dist/cli/llm/model-refresh.js.map +0 -1
- package/dist/cli/llm/zai-commands.d.ts +0 -15
- package/dist/cli/llm/zai-commands.d.ts.map +0 -1
- package/dist/cli/llm/zai-commands.js +0 -64
- package/dist/cli/llm/zai-commands.js.map +0 -1
- package/dist/cli/llm.d.ts +0 -13
- package/dist/cli/llm.d.ts.map +0 -1
- package/dist/cli/llm.js +0 -13
- package/dist/cli/llm.js.map +0 -1
- package/dist/cli/postinstall/claude-agents.d.ts +0 -35
- package/dist/cli/postinstall/claude-agents.d.ts.map +0 -1
- package/dist/cli/postinstall/claude-agents.js +0 -177
- package/dist/cli/postinstall/claude-agents.js.map +0 -1
- package/dist/cli/postinstall/constants.d.ts +0 -134
- package/dist/cli/postinstall/constants.d.ts.map +0 -1
- package/dist/cli/postinstall/constants.js +0 -554
- package/dist/cli/postinstall/constants.js.map +0 -1
- package/dist/cli/postinstall/fs-utils.d.ts +0 -94
- package/dist/cli/postinstall/fs-utils.d.ts.map +0 -1
- package/dist/cli/postinstall/fs-utils.js +0 -376
- package/dist/cli/postinstall/fs-utils.js.map +0 -1
- package/dist/cli/postinstall/global-config.d.ts +0 -22
- package/dist/cli/postinstall/global-config.d.ts.map +0 -1
- package/dist/cli/postinstall/global-config.js +0 -165
- package/dist/cli/postinstall/global-config.js.map +0 -1
- package/dist/cli/postinstall/inline-skills.d.ts +0 -8
- package/dist/cli/postinstall/inline-skills.d.ts.map +0 -1
- package/dist/cli/postinstall/inline-skills.js +0 -158
- package/dist/cli/postinstall/inline-skills.js.map +0 -1
- package/dist/cli/postinstall/main.d.ts +0 -20
- package/dist/cli/postinstall/main.d.ts.map +0 -1
- package/dist/cli/postinstall/main.js +0 -250
- package/dist/cli/postinstall/main.js.map +0 -1
- package/dist/cli/postinstall.d.ts +0 -9
- package/dist/cli/postinstall.d.ts.map +0 -1
- package/dist/cli/postinstall.js +0 -11
- package/dist/cli/postinstall.js.map +0 -1
- package/dist/cli/prompt.d.ts +0 -28
- package/dist/cli/prompt.d.ts.map +0 -1
- package/dist/cli/prompt.js +0 -64
- package/dist/cli/prompt.js.map +0 -1
- package/dist/cli/setup/CodexHooks.d.ts +0 -39
- package/dist/cli/setup/CodexHooks.d.ts.map +0 -1
- package/dist/cli/setup/CodexHooks.js +0 -73
- package/dist/cli/setup/CodexHooks.js.map +0 -1
- package/dist/cli/setup/GlobalInstaller.d.ts +0 -10
- package/dist/cli/setup/GlobalInstaller.d.ts.map +0 -1
- package/dist/cli/setup/GlobalInstaller.js +0 -34
- package/dist/cli/setup/GlobalInstaller.js.map +0 -1
- package/dist/cli/setup/InstallHome.d.ts +0 -27
- package/dist/cli/setup/InstallHome.d.ts.map +0 -1
- package/dist/cli/setup/InstallHome.js +0 -105
- package/dist/cli/setup/InstallHome.js.map +0 -1
- package/dist/cli/setup/LanguageDetector.d.ts +0 -15
- package/dist/cli/setup/LanguageDetector.d.ts.map +0 -1
- package/dist/cli/setup/LanguageDetector.js +0 -48
- package/dist/cli/setup/LanguageDetector.js.map +0 -1
- package/dist/cli/setup/LegacyMigration.d.ts +0 -38
- package/dist/cli/setup/LegacyMigration.d.ts.map +0 -1
- package/dist/cli/setup/LegacyMigration.js +0 -301
- package/dist/cli/setup/LegacyMigration.js.map +0 -1
- package/dist/cli/setup/NativeDeps.d.ts +0 -29
- package/dist/cli/setup/NativeDeps.d.ts.map +0 -1
- package/dist/cli/setup/NativeDeps.js +0 -79
- package/dist/cli/setup/NativeDeps.js.map +0 -1
- package/dist/cli/setup/ProjectSetup.d.ts +0 -105
- package/dist/cli/setup/ProjectSetup.d.ts.map +0 -1
- package/dist/cli/setup/ProjectSetup.js +0 -694
- package/dist/cli/setup/ProjectSetup.js.map +0 -1
- package/dist/cli/setup/Provisioner.d.ts +0 -28
- package/dist/cli/setup/Provisioner.d.ts.map +0 -1
- package/dist/cli/setup/Provisioner.js +0 -215
- package/dist/cli/setup/Provisioner.js.map +0 -1
- package/dist/cli/setup.d.ts +0 -9
- package/dist/cli/setup.d.ts.map +0 -1
- package/dist/cli/setup.js +0 -12
- package/dist/cli/setup.js.map +0 -1
- package/dist/cli/types.d.ts +0 -195
- package/dist/cli/types.d.ts.map +0 -1
- package/dist/cli/types.js +0 -5
- package/dist/cli/types.js.map +0 -1
- package/dist/cli/utils/cli-detector.d.ts +0 -35
- package/dist/cli/utils/cli-detector.d.ts.map +0 -1
- package/dist/cli/utils/cli-detector.js +0 -99
- package/dist/cli/utils/cli-detector.js.map +0 -1
- package/dist/cli/utils.d.ts +0 -49
- package/dist/cli/utils.d.ts.map +0 -1
- package/dist/cli/utils.js +0 -137
- package/dist/cli/utils.js.map +0 -1
- package/dist/infra/lib/AutomationLevel.d.ts +0 -48
- package/dist/infra/lib/AutomationLevel.d.ts.map +0 -1
- package/dist/infra/lib/AutomationLevel.js +0 -157
- package/dist/infra/lib/AutomationLevel.js.map +0 -1
- package/dist/infra/lib/ComponentRegistry.d.ts +0 -35
- package/dist/infra/lib/ComponentRegistry.d.ts.map +0 -1
- package/dist/infra/lib/ComponentRegistry.js +0 -59
- package/dist/infra/lib/ComponentRegistry.js.map +0 -1
- package/dist/infra/lib/CostAccumulator.d.ts +0 -75
- package/dist/infra/lib/CostAccumulator.d.ts.map +0 -1
- package/dist/infra/lib/CostAccumulator.js +0 -189
- package/dist/infra/lib/CostAccumulator.js.map +0 -1
- package/dist/infra/lib/DecisionTracer.d.ts +0 -85
- package/dist/infra/lib/DecisionTracer.d.ts.map +0 -1
- package/dist/infra/lib/DecisionTracer.js +0 -139
- package/dist/infra/lib/DecisionTracer.js.map +0 -1
- package/dist/infra/lib/InteractiveCheckpoint.d.ts +0 -75
- package/dist/infra/lib/InteractiveCheckpoint.d.ts.map +0 -1
- package/dist/infra/lib/InteractiveCheckpoint.js +0 -179
- package/dist/infra/lib/InteractiveCheckpoint.js.map +0 -1
- package/dist/infra/lib/IterationTracker.d.ts +0 -125
- package/dist/infra/lib/IterationTracker.d.ts.map +0 -1
- package/dist/infra/lib/IterationTracker.js +0 -444
- package/dist/infra/lib/IterationTracker.js.map +0 -1
- package/dist/infra/lib/LoopBreaker.d.ts +0 -60
- package/dist/infra/lib/LoopBreaker.d.ts.map +0 -1
- package/dist/infra/lib/LoopBreaker.js +0 -113
- package/dist/infra/lib/LoopBreaker.js.map +0 -1
- package/dist/infra/lib/MemoryManager.d.ts +0 -96
- package/dist/infra/lib/MemoryManager.d.ts.map +0 -1
- package/dist/infra/lib/MemoryManager.js +0 -312
- package/dist/infra/lib/MemoryManager.js.map +0 -1
- package/dist/infra/lib/ProjectCache.d.ts +0 -28
- package/dist/infra/lib/ProjectCache.d.ts.map +0 -1
- package/dist/infra/lib/ProjectCache.js +0 -130
- package/dist/infra/lib/ProjectCache.js.map +0 -1
- package/dist/infra/lib/PythonParser.d.ts +0 -47
- package/dist/infra/lib/PythonParser.d.ts.map +0 -1
- package/dist/infra/lib/PythonParser.js +0 -268
- package/dist/infra/lib/PythonParser.js.map +0 -1
- package/dist/infra/lib/SkillFrontmatter.d.ts +0 -70
- package/dist/infra/lib/SkillFrontmatter.d.ts.map +0 -1
- package/dist/infra/lib/SkillFrontmatter.js +0 -240
- package/dist/infra/lib/SkillFrontmatter.js.map +0 -1
- package/dist/infra/lib/TaskContext.d.ts +0 -43
- package/dist/infra/lib/TaskContext.d.ts.map +0 -1
- package/dist/infra/lib/TaskContext.js +0 -84
- package/dist/infra/lib/TaskContext.js.map +0 -1
- package/dist/infra/lib/VerificationLoop.d.ts +0 -171
- package/dist/infra/lib/VerificationLoop.d.ts.map +0 -1
- package/dist/infra/lib/VerificationLoop.js +0 -308
- package/dist/infra/lib/VerificationLoop.js.map +0 -1
- package/dist/infra/lib/antigravity/auth.d.ts +0 -18
- package/dist/infra/lib/antigravity/auth.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/auth.js +0 -32
- package/dist/infra/lib/antigravity/auth.js.map +0 -1
- package/dist/infra/lib/antigravity/capabilities.d.ts +0 -28
- package/dist/infra/lib/antigravity/capabilities.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/capabilities.js +0 -178
- package/dist/infra/lib/antigravity/capabilities.js.map +0 -1
- package/dist/infra/lib/antigravity/chat.d.ts +0 -34
- package/dist/infra/lib/antigravity/chat.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/chat.js +0 -166
- package/dist/infra/lib/antigravity/chat.js.map +0 -1
- package/dist/infra/lib/antigravity/completion.d.ts +0 -12
- package/dist/infra/lib/antigravity/completion.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/completion.js +0 -13
- package/dist/infra/lib/antigravity/completion.js.map +0 -1
- package/dist/infra/lib/antigravity/constants.d.ts +0 -8
- package/dist/infra/lib/antigravity/constants.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/constants.js +0 -11
- package/dist/infra/lib/antigravity/constants.js.map +0 -1
- package/dist/infra/lib/antigravity/index.d.ts +0 -13
- package/dist/infra/lib/antigravity/index.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/index.js +0 -12
- package/dist/infra/lib/antigravity/index.js.map +0 -1
- package/dist/infra/lib/antigravity/models.d.ts +0 -11
- package/dist/infra/lib/antigravity/models.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/models.js +0 -38
- package/dist/infra/lib/antigravity/models.js.map +0 -1
- package/dist/infra/lib/antigravity/orchestration.d.ts +0 -33
- package/dist/infra/lib/antigravity/orchestration.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/orchestration.js +0 -74
- package/dist/infra/lib/antigravity/orchestration.js.map +0 -1
- package/dist/infra/lib/antigravity/types.d.ts +0 -123
- package/dist/infra/lib/antigravity/types.d.ts.map +0 -1
- package/dist/infra/lib/antigravity/types.js +0 -5
- package/dist/infra/lib/antigravity/types.js.map +0 -1
- package/dist/infra/lib/browser/capture.d.ts +0 -26
- package/dist/infra/lib/browser/capture.d.ts.map +0 -1
- package/dist/infra/lib/browser/capture.js +0 -115
- package/dist/infra/lib/browser/capture.js.map +0 -1
- package/dist/infra/lib/browser/compare.d.ts +0 -46
- package/dist/infra/lib/browser/compare.d.ts.map +0 -1
- package/dist/infra/lib/browser/compare.js +0 -188
- package/dist/infra/lib/browser/compare.js.map +0 -1
- package/dist/infra/lib/browser/index.d.ts +0 -6
- package/dist/infra/lib/browser/index.d.ts.map +0 -1
- package/dist/infra/lib/browser/index.js +0 -4
- package/dist/infra/lib/browser/index.js.map +0 -1
- package/dist/infra/lib/browser/launch.d.ts +0 -19
- package/dist/infra/lib/browser/launch.d.ts.map +0 -1
- package/dist/infra/lib/browser/launch.js +0 -58
- package/dist/infra/lib/browser/launch.js.map +0 -1
- package/dist/infra/lib/browser/types.d.ts +0 -103
- package/dist/infra/lib/browser/types.d.ts.map +0 -1
- package/dist/infra/lib/browser/types.js +0 -8
- package/dist/infra/lib/browser/types.js.map +0 -1
- package/dist/infra/lib/codex-proxy.d.ts +0 -150
- package/dist/infra/lib/codex-proxy.d.ts.map +0 -1
- package/dist/infra/lib/codex-proxy.js +0 -961
- package/dist/infra/lib/codex-proxy.js.map +0 -1
- package/dist/infra/lib/config/GlobalConfigManager.d.ts +0 -40
- package/dist/infra/lib/config/GlobalConfigManager.d.ts.map +0 -1
- package/dist/infra/lib/config/GlobalConfigManager.js +0 -396
- package/dist/infra/lib/config/GlobalConfigManager.js.map +0 -1
- package/dist/infra/lib/constants.d.ts +0 -81
- package/dist/infra/lib/constants.d.ts.map +0 -1
- package/dist/infra/lib/constants.js +0 -97
- package/dist/infra/lib/constants.js.map +0 -1
- package/dist/infra/lib/embedding/EmbeddingProvider.d.ts +0 -20
- package/dist/infra/lib/embedding/EmbeddingProvider.d.ts.map +0 -1
- package/dist/infra/lib/embedding/EmbeddingProvider.js +0 -83
- package/dist/infra/lib/embedding/EmbeddingProvider.js.map +0 -1
- package/dist/infra/lib/embedding/VectorStore.d.ts +0 -54
- package/dist/infra/lib/embedding/VectorStore.d.ts.map +0 -1
- package/dist/infra/lib/embedding/VectorStore.js +0 -139
- package/dist/infra/lib/embedding/VectorStore.js.map +0 -1
- package/dist/infra/lib/embedding/cosine.d.ts +0 -19
- package/dist/infra/lib/embedding/cosine.d.ts.map +0 -1
- package/dist/infra/lib/embedding/cosine.js +0 -40
- package/dist/infra/lib/embedding/cosine.js.map +0 -1
- package/dist/infra/lib/embedding/index.d.ts +0 -9
- package/dist/infra/lib/embedding/index.d.ts.map +0 -1
- package/dist/infra/lib/embedding/index.js +0 -8
- package/dist/infra/lib/embedding/index.js.map +0 -1
- package/dist/infra/lib/embedding/types.d.ts +0 -30
- package/dist/infra/lib/embedding/types.d.ts.map +0 -1
- package/dist/infra/lib/embedding/types.js +0 -12
- package/dist/infra/lib/embedding/types.js.map +0 -1
- package/dist/infra/lib/evolution/AgentAnalyzer.d.ts +0 -15
- package/dist/infra/lib/evolution/AgentAnalyzer.d.ts.map +0 -1
- package/dist/infra/lib/evolution/AgentAnalyzer.js +0 -84
- package/dist/infra/lib/evolution/AgentAnalyzer.js.map +0 -1
- package/dist/infra/lib/evolution/CircuitBreaker.d.ts +0 -31
- package/dist/infra/lib/evolution/CircuitBreaker.d.ts.map +0 -1
- package/dist/infra/lib/evolution/CircuitBreaker.js +0 -86
- package/dist/infra/lib/evolution/CircuitBreaker.js.map +0 -1
- package/dist/infra/lib/evolution/DeprecationDetector.d.ts +0 -68
- package/dist/infra/lib/evolution/DeprecationDetector.d.ts.map +0 -1
- package/dist/infra/lib/evolution/DeprecationDetector.js +0 -207
- package/dist/infra/lib/evolution/DeprecationDetector.js.map +0 -1
- package/dist/infra/lib/evolution/DescriptionOptimizer.d.ts +0 -124
- package/dist/infra/lib/evolution/DescriptionOptimizer.d.ts.map +0 -1
- package/dist/infra/lib/evolution/DescriptionOptimizer.js +0 -410
- package/dist/infra/lib/evolution/DescriptionOptimizer.js.map +0 -1
- package/dist/infra/lib/evolution/EvolutionOrchestrator.d.ts +0 -35
- package/dist/infra/lib/evolution/EvolutionOrchestrator.d.ts.map +0 -1
- package/dist/infra/lib/evolution/EvolutionOrchestrator.js +0 -212
- package/dist/infra/lib/evolution/EvolutionOrchestrator.js.map +0 -1
- package/dist/infra/lib/evolution/GenerationRegistry.d.ts +0 -53
- package/dist/infra/lib/evolution/GenerationRegistry.d.ts.map +0 -1
- package/dist/infra/lib/evolution/GenerationRegistry.js +0 -121
- package/dist/infra/lib/evolution/GenerationRegistry.js.map +0 -1
- package/dist/infra/lib/evolution/GuardAnalyzer.d.ts +0 -44
- package/dist/infra/lib/evolution/GuardAnalyzer.d.ts.map +0 -1
- package/dist/infra/lib/evolution/GuardAnalyzer.js +0 -116
- package/dist/infra/lib/evolution/GuardAnalyzer.js.map +0 -1
- package/dist/infra/lib/evolution/HookTraceReader.d.ts +0 -45
- package/dist/infra/lib/evolution/HookTraceReader.d.ts.map +0 -1
- package/dist/infra/lib/evolution/HookTraceReader.js +0 -108
- package/dist/infra/lib/evolution/HookTraceReader.js.map +0 -1
- package/dist/infra/lib/evolution/InsightExtractor.d.ts +0 -24
- package/dist/infra/lib/evolution/InsightExtractor.d.ts.map +0 -1
- package/dist/infra/lib/evolution/InsightExtractor.js +0 -131
- package/dist/infra/lib/evolution/InsightExtractor.js.map +0 -1
- package/dist/infra/lib/evolution/InsightStore.d.ts +0 -55
- package/dist/infra/lib/evolution/InsightStore.d.ts.map +0 -1
- package/dist/infra/lib/evolution/InsightStore.js +0 -219
- package/dist/infra/lib/evolution/InsightStore.js.map +0 -1
- package/dist/infra/lib/evolution/LifecycleManager.d.ts +0 -43
- package/dist/infra/lib/evolution/LifecycleManager.d.ts.map +0 -1
- package/dist/infra/lib/evolution/LifecycleManager.js +0 -134
- package/dist/infra/lib/evolution/LifecycleManager.js.map +0 -1
- package/dist/infra/lib/evolution/ParityTester.d.ts +0 -74
- package/dist/infra/lib/evolution/ParityTester.d.ts.map +0 -1
- package/dist/infra/lib/evolution/ParityTester.js +0 -238
- package/dist/infra/lib/evolution/ParityTester.js.map +0 -1
- package/dist/infra/lib/evolution/RollbackManager.d.ts +0 -26
- package/dist/infra/lib/evolution/RollbackManager.d.ts.map +0 -1
- package/dist/infra/lib/evolution/RollbackManager.js +0 -133
- package/dist/infra/lib/evolution/RollbackManager.js.map +0 -1
- package/dist/infra/lib/evolution/SkillBenchmark.d.ts +0 -81
- package/dist/infra/lib/evolution/SkillBenchmark.d.ts.map +0 -1
- package/dist/infra/lib/evolution/SkillBenchmark.js +0 -233
- package/dist/infra/lib/evolution/SkillBenchmark.js.map +0 -1
- package/dist/infra/lib/evolution/SkillClassifier.d.ts +0 -35
- package/dist/infra/lib/evolution/SkillClassifier.d.ts.map +0 -1
- package/dist/infra/lib/evolution/SkillClassifier.js +0 -167
- package/dist/infra/lib/evolution/SkillClassifier.js.map +0 -1
- package/dist/infra/lib/evolution/SkillEvalRunner.d.ts +0 -102
- package/dist/infra/lib/evolution/SkillEvalRunner.d.ts.map +0 -1
- package/dist/infra/lib/evolution/SkillEvalRunner.js +0 -256
- package/dist/infra/lib/evolution/SkillEvalRunner.js.map +0 -1
- package/dist/infra/lib/evolution/SkillGapDetector.d.ts +0 -22
- package/dist/infra/lib/evolution/SkillGapDetector.d.ts.map +0 -1
- package/dist/infra/lib/evolution/SkillGapDetector.js +0 -81
- package/dist/infra/lib/evolution/SkillGapDetector.js.map +0 -1
- package/dist/infra/lib/evolution/TriggerCollisionDetector.d.ts +0 -27
- package/dist/infra/lib/evolution/TriggerCollisionDetector.d.ts.map +0 -1
- package/dist/infra/lib/evolution/TriggerCollisionDetector.js +0 -100
- package/dist/infra/lib/evolution/TriggerCollisionDetector.js.map +0 -1
- package/dist/infra/lib/evolution/UsageTracker.d.ts +0 -53
- package/dist/infra/lib/evolution/UsageTracker.d.ts.map +0 -1
- package/dist/infra/lib/evolution/UsageTracker.js +0 -157
- package/dist/infra/lib/evolution/UsageTracker.js.map +0 -1
- package/dist/infra/lib/evolution/generators/AgentGenerator.d.ts +0 -14
- package/dist/infra/lib/evolution/generators/AgentGenerator.d.ts.map +0 -1
- package/dist/infra/lib/evolution/generators/AgentGenerator.js +0 -55
- package/dist/infra/lib/evolution/generators/AgentGenerator.js.map +0 -1
- package/dist/infra/lib/evolution/generators/RuleGenerator.d.ts +0 -13
- package/dist/infra/lib/evolution/generators/RuleGenerator.d.ts.map +0 -1
- package/dist/infra/lib/evolution/generators/RuleGenerator.js +0 -52
- package/dist/infra/lib/evolution/generators/RuleGenerator.js.map +0 -1
- package/dist/infra/lib/evolution/generators/SkillGenerator.d.ts +0 -15
- package/dist/infra/lib/evolution/generators/SkillGenerator.d.ts.map +0 -1
- package/dist/infra/lib/evolution/generators/SkillGenerator.js +0 -73
- package/dist/infra/lib/evolution/generators/SkillGenerator.js.map +0 -1
- package/dist/infra/lib/evolution/index.d.ts +0 -39
- package/dist/infra/lib/evolution/index.d.ts.map +0 -1
- package/dist/infra/lib/evolution/index.js +0 -32
- package/dist/infra/lib/evolution/index.js.map +0 -1
- package/dist/infra/lib/figma/api.d.ts +0 -9
- package/dist/infra/lib/figma/api.d.ts.map +0 -1
- package/dist/infra/lib/figma/api.js +0 -73
- package/dist/infra/lib/figma/api.js.map +0 -1
- package/dist/infra/lib/figma/audit.d.ts +0 -37
- package/dist/infra/lib/figma/audit.d.ts.map +0 -1
- package/dist/infra/lib/figma/audit.js +0 -128
- package/dist/infra/lib/figma/audit.js.map +0 -1
- package/dist/infra/lib/figma/extract.d.ts +0 -37
- package/dist/infra/lib/figma/extract.d.ts.map +0 -1
- package/dist/infra/lib/figma/extract.js +0 -414
- package/dist/infra/lib/figma/extract.js.map +0 -1
- package/dist/infra/lib/figma/index.d.ts +0 -6
- package/dist/infra/lib/figma/index.d.ts.map +0 -1
- package/dist/infra/lib/figma/index.js +0 -4
- package/dist/infra/lib/figma/index.js.map +0 -1
- package/dist/infra/lib/figma/types.d.ts +0 -182
- package/dist/infra/lib/figma/types.d.ts.map +0 -1
- package/dist/infra/lib/figma/types.js +0 -13
- package/dist/infra/lib/figma/types.js.map +0 -1
- package/dist/infra/lib/gpt/auth.d.ts +0 -31
- package/dist/infra/lib/gpt/auth.d.ts.map +0 -1
- package/dist/infra/lib/gpt/auth.js +0 -178
- package/dist/infra/lib/gpt/auth.js.map +0 -1
- package/dist/infra/lib/gpt/chat.d.ts +0 -40
- package/dist/infra/lib/gpt/chat.d.ts.map +0 -1
- package/dist/infra/lib/gpt/chat.js +0 -514
- package/dist/infra/lib/gpt/chat.js.map +0 -1
- package/dist/infra/lib/gpt/constants.d.ts +0 -9
- package/dist/infra/lib/gpt/constants.d.ts.map +0 -1
- package/dist/infra/lib/gpt/constants.js +0 -13
- package/dist/infra/lib/gpt/constants.js.map +0 -1
- package/dist/infra/lib/gpt/embedding.d.ts +0 -15
- package/dist/infra/lib/gpt/embedding.d.ts.map +0 -1
- package/dist/infra/lib/gpt/embedding.js +0 -80
- package/dist/infra/lib/gpt/embedding.js.map +0 -1
- package/dist/infra/lib/gpt/index.d.ts +0 -17
- package/dist/infra/lib/gpt/index.d.ts.map +0 -1
- package/dist/infra/lib/gpt/index.js +0 -17
- package/dist/infra/lib/gpt/index.js.map +0 -1
- package/dist/infra/lib/gpt/oauth.d.ts +0 -39
- package/dist/infra/lib/gpt/oauth.d.ts.map +0 -1
- package/dist/infra/lib/gpt/oauth.js +0 -103
- package/dist/infra/lib/gpt/oauth.js.map +0 -1
- package/dist/infra/lib/gpt/orchestration.d.ts +0 -28
- package/dist/infra/lib/gpt/orchestration.d.ts.map +0 -1
- package/dist/infra/lib/gpt/orchestration.js +0 -64
- package/dist/infra/lib/gpt/orchestration.js.map +0 -1
- package/dist/infra/lib/gpt/specializations.d.ts +0 -12
- package/dist/infra/lib/gpt/specializations.d.ts.map +0 -1
- package/dist/infra/lib/gpt/specializations.js +0 -32
- package/dist/infra/lib/gpt/specializations.js.map +0 -1
- package/dist/infra/lib/gpt/types.d.ts +0 -80
- package/dist/infra/lib/gpt/types.d.ts.map +0 -1
- package/dist/infra/lib/gpt/types.js +0 -5
- package/dist/infra/lib/gpt/types.js.map +0 -1
- package/dist/infra/lib/llm/auth/ApiKeyManager.d.ts +0 -21
- package/dist/infra/lib/llm/auth/ApiKeyManager.d.ts.map +0 -1
- package/dist/infra/lib/llm/auth/ApiKeyManager.js +0 -43
- package/dist/infra/lib/llm/auth/ApiKeyManager.js.map +0 -1
- package/dist/infra/lib/llm/auth/AuthProfileManager.d.ts +0 -59
- package/dist/infra/lib/llm/auth/AuthProfileManager.d.ts.map +0 -1
- package/dist/infra/lib/llm/auth/AuthProfileManager.js +0 -248
- package/dist/infra/lib/llm/auth/AuthProfileManager.js.map +0 -1
- package/dist/infra/lib/llm/auth/ConfigManager.d.ts +0 -32
- package/dist/infra/lib/llm/auth/ConfigManager.d.ts.map +0 -1
- package/dist/infra/lib/llm/auth/ConfigManager.js +0 -66
- package/dist/infra/lib/llm/auth/ConfigManager.js.map +0 -1
- package/dist/infra/lib/llm/auth/ProfileFileLock.d.ts +0 -16
- package/dist/infra/lib/llm/auth/ProfileFileLock.d.ts.map +0 -1
- package/dist/infra/lib/llm/auth/ProfileFileLock.js +0 -99
- package/dist/infra/lib/llm/auth/ProfileFileLock.js.map +0 -1
- package/dist/infra/lib/llm/auth/TokenRefresher.d.ts +0 -35
- package/dist/infra/lib/llm/auth/TokenRefresher.d.ts.map +0 -1
- package/dist/infra/lib/llm/auth/TokenRefresher.js +0 -217
- package/dist/infra/lib/llm/auth/TokenRefresher.js.map +0 -1
- package/dist/infra/lib/llm/auth/index.d.ts +0 -20
- package/dist/infra/lib/llm/auth/index.d.ts.map +0 -1
- package/dist/infra/lib/llm/auth/index.js +0 -28
- package/dist/infra/lib/llm/auth/index.js.map +0 -1
- package/dist/infra/lib/llm/index.d.ts +0 -10
- package/dist/infra/lib/llm/index.d.ts.map +0 -1
- package/dist/infra/lib/llm/index.js +0 -12
- package/dist/infra/lib/llm/index.js.map +0 -1
- package/dist/infra/lib/llm/timeout.d.ts +0 -34
- package/dist/infra/lib/llm/timeout.d.ts.map +0 -1
- package/dist/infra/lib/llm/timeout.js +0 -45
- package/dist/infra/lib/llm/timeout.js.map +0 -1
- package/dist/infra/lib/llm/types.d.ts +0 -96
- package/dist/infra/lib/llm/types.d.ts.map +0 -1
- package/dist/infra/lib/llm/types.js +0 -17
- package/dist/infra/lib/llm/types.js.map +0 -1
- package/dist/infra/lib/llm/utils/index.d.ts +0 -6
- package/dist/infra/lib/llm/utils/index.d.ts.map +0 -1
- package/dist/infra/lib/llm/utils/index.js +0 -6
- package/dist/infra/lib/llm/utils/index.js.map +0 -1
- package/dist/infra/lib/llm/utils/retry.d.ts +0 -25
- package/dist/infra/lib/llm/utils/retry.d.ts.map +0 -1
- package/dist/infra/lib/llm/utils/retry.js +0 -72
- package/dist/infra/lib/llm/utils/retry.js.map +0 -1
- package/dist/infra/lib/llm/utils/stream.d.ts +0 -13
- package/dist/infra/lib/llm/utils/stream.d.ts.map +0 -1
- package/dist/infra/lib/llm/utils/stream.js +0 -110
- package/dist/infra/lib/llm/utils/stream.js.map +0 -1
- package/dist/infra/lib/llm-availability.d.ts +0 -28
- package/dist/infra/lib/llm-availability.d.ts.map +0 -1
- package/dist/infra/lib/llm-availability.js +0 -69
- package/dist/infra/lib/llm-availability.js.map +0 -1
- package/dist/infra/lib/memory/IMemoryStorage.d.ts +0 -16
- package/dist/infra/lib/memory/IMemoryStorage.d.ts.map +0 -1
- package/dist/infra/lib/memory/IMemoryStorage.js +0 -7
- package/dist/infra/lib/memory/IMemoryStorage.js.map +0 -1
- package/dist/infra/lib/memory/InMemoryStorage.d.ts +0 -13
- package/dist/infra/lib/memory/InMemoryStorage.d.ts.map +0 -1
- package/dist/infra/lib/memory/InMemoryStorage.js +0 -44
- package/dist/infra/lib/memory/InMemoryStorage.js.map +0 -1
- package/dist/infra/lib/memory/KnowledgeGraph.d.ts +0 -34
- package/dist/infra/lib/memory/KnowledgeGraph.d.ts.map +0 -1
- package/dist/infra/lib/memory/KnowledgeGraph.js +0 -222
- package/dist/infra/lib/memory/KnowledgeGraph.js.map +0 -1
- package/dist/infra/lib/memory/MemorySearch.d.ts +0 -59
- package/dist/infra/lib/memory/MemorySearch.d.ts.map +0 -1
- package/dist/infra/lib/memory/MemorySearch.js +0 -330
- package/dist/infra/lib/memory/MemorySearch.js.map +0 -1
- package/dist/infra/lib/memory/MemoryStorage.d.ts +0 -133
- package/dist/infra/lib/memory/MemoryStorage.d.ts.map +0 -1
- package/dist/infra/lib/memory/MemoryStorage.js +0 -612
- package/dist/infra/lib/memory/MemoryStorage.js.map +0 -1
- package/dist/infra/lib/memory/ObservationStore.d.ts +0 -61
- package/dist/infra/lib/memory/ObservationStore.d.ts.map +0 -1
- package/dist/infra/lib/memory/ObservationStore.js +0 -119
- package/dist/infra/lib/memory/ObservationStore.js.map +0 -1
- package/dist/infra/lib/memory/ReflectionStore.d.ts +0 -60
- package/dist/infra/lib/memory/ReflectionStore.d.ts.map +0 -1
- package/dist/infra/lib/memory/ReflectionStore.js +0 -153
- package/dist/infra/lib/memory/ReflectionStore.js.map +0 -1
- package/dist/infra/lib/memory/SessionRAGRetriever.d.ts +0 -89
- package/dist/infra/lib/memory/SessionRAGRetriever.d.ts.map +0 -1
- package/dist/infra/lib/memory/SessionRAGRetriever.js +0 -348
- package/dist/infra/lib/memory/SessionRAGRetriever.js.map +0 -1
- package/dist/infra/lib/memory/SessionRAGStore.d.ts +0 -168
- package/dist/infra/lib/memory/SessionRAGStore.d.ts.map +0 -1
- package/dist/infra/lib/memory/SessionRAGStore.js +0 -763
- package/dist/infra/lib/memory/SessionRAGStore.js.map +0 -1
- package/dist/infra/lib/memory/SessionSummarizer.d.ts +0 -50
- package/dist/infra/lib/memory/SessionSummarizer.d.ts.map +0 -1
- package/dist/infra/lib/memory/SessionSummarizer.js +0 -157
- package/dist/infra/lib/memory/SessionSummarizer.js.map +0 -1
- package/dist/infra/lib/memory/index.d.ts +0 -15
- package/dist/infra/lib/memory/index.d.ts.map +0 -1
- package/dist/infra/lib/memory/index.js +0 -16
- package/dist/infra/lib/memory/index.js.map +0 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.d.ts +0 -66
- package/dist/infra/lib/telemetry/SkillTelemetry.d.ts.map +0 -1
- package/dist/infra/lib/telemetry/SkillTelemetry.js +0 -168
- package/dist/infra/lib/telemetry/SkillTelemetry.js.map +0 -1
- package/dist/infra/lib/telemetry/VibeSpan.d.ts +0 -20
- package/dist/infra/lib/telemetry/VibeSpan.d.ts.map +0 -1
- package/dist/infra/lib/telemetry/VibeSpan.js +0 -26
- package/dist/infra/lib/telemetry/VibeSpan.js.map +0 -1
- package/dist/infra/lib/ui-ux/Bm25Engine.d.ts +0 -67
- package/dist/infra/lib/ui-ux/Bm25Engine.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/Bm25Engine.js +0 -153
- package/dist/infra/lib/ui-ux/Bm25Engine.js.map +0 -1
- package/dist/infra/lib/ui-ux/CsvDataLoader.d.ts +0 -57
- package/dist/infra/lib/ui-ux/CsvDataLoader.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/CsvDataLoader.js +0 -158
- package/dist/infra/lib/ui-ux/CsvDataLoader.js.map +0 -1
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.d.ts +0 -119
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.js +0 -519
- package/dist/infra/lib/ui-ux/DesignSystemGenerator.js.map +0 -1
- package/dist/infra/lib/ui-ux/SearchService.d.ts +0 -64
- package/dist/infra/lib/ui-ux/SearchService.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/SearchService.js +0 -240
- package/dist/infra/lib/ui-ux/SearchService.js.map +0 -1
- package/dist/infra/lib/ui-ux/UiUxWorkflow.d.ts +0 -58
- package/dist/infra/lib/ui-ux/UiUxWorkflow.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/UiUxWorkflow.js +0 -181
- package/dist/infra/lib/ui-ux/UiUxWorkflow.js.map +0 -1
- package/dist/infra/lib/ui-ux/constants.d.ts +0 -39
- package/dist/infra/lib/ui-ux/constants.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/constants.js +0 -203
- package/dist/infra/lib/ui-ux/constants.js.map +0 -1
- package/dist/infra/lib/ui-ux/index.d.ts +0 -11
- package/dist/infra/lib/ui-ux/index.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/index.js +0 -11
- package/dist/infra/lib/ui-ux/index.js.map +0 -1
- package/dist/infra/lib/ui-ux/types.d.ts +0 -243
- package/dist/infra/lib/ui-ux/types.d.ts.map +0 -1
- package/dist/infra/lib/ui-ux/types.js +0 -7
- package/dist/infra/lib/ui-ux/types.js.map +0 -1
- package/dist/infra/lib/utils.d.ts +0 -66
- package/dist/infra/lib/utils.d.ts.map +0 -1
- package/dist/infra/lib/utils.js +0 -152
- package/dist/infra/lib/utils.js.map +0 -1
- package/dist/infra/lib/zai/client.d.ts +0 -30
- package/dist/infra/lib/zai/client.d.ts.map +0 -1
- package/dist/infra/lib/zai/client.js +0 -124
- package/dist/infra/lib/zai/client.js.map +0 -1
- package/dist/infra/lib/zai/index.d.ts +0 -11
- package/dist/infra/lib/zai/index.d.ts.map +0 -1
- package/dist/infra/lib/zai/index.js +0 -10
- package/dist/infra/lib/zai/index.js.map +0 -1
- package/dist/infra/lib/zai/orchestration.d.ts +0 -15
- package/dist/infra/lib/zai/orchestration.d.ts.map +0 -1
- package/dist/infra/lib/zai/orchestration.js +0 -54
- package/dist/infra/lib/zai/orchestration.js.map +0 -1
- package/dist/infra/lib/zai/types.d.ts +0 -40
- package/dist/infra/lib/zai/types.d.ts.map +0 -1
- package/dist/infra/lib/zai/types.js +0 -5
- package/dist/infra/lib/zai/types.js.map +0 -1
- package/dist/infra/types/tool.d.ts +0 -71
- package/dist/infra/types/tool.d.ts.map +0 -1
- package/dist/infra/types/tool.js +0 -3
- package/dist/infra/types/tool.js.map +0 -1
- package/dist/tools/bench/benchCompare.d.ts +0 -78
- package/dist/tools/bench/benchCompare.d.ts.map +0 -1
- package/dist/tools/bench/benchCompare.js +0 -113
- package/dist/tools/bench/benchCompare.js.map +0 -1
- package/dist/tools/bench/benchDefinition.d.ts +0 -37
- package/dist/tools/bench/benchDefinition.d.ts.map +0 -1
- package/dist/tools/bench/benchDefinition.js +0 -69
- package/dist/tools/bench/benchDefinition.js.map +0 -1
- package/dist/tools/bench/benchReport.d.ts +0 -16
- package/dist/tools/bench/benchReport.d.ts.map +0 -1
- package/dist/tools/bench/benchReport.js +0 -64
- package/dist/tools/bench/benchReport.js.map +0 -1
- package/dist/tools/bench/index.d.ts +0 -10
- package/dist/tools/bench/index.d.ts.map +0 -1
- package/dist/tools/bench/index.js +0 -7
- package/dist/tools/bench/index.js.map +0 -1
- package/dist/tools/contract/agentContract.d.ts +0 -86
- package/dist/tools/contract/agentContract.d.ts.map +0 -1
- package/dist/tools/contract/agentContract.js +0 -140
- package/dist/tools/contract/agentContract.js.map +0 -1
- package/dist/tools/contract/index.d.ts +0 -8
- package/dist/tools/contract/index.d.ts.map +0 -1
- package/dist/tools/contract/index.js +0 -6
- package/dist/tools/contract/index.js.map +0 -1
- package/dist/tools/contract/reverseDrift.d.ts +0 -71
- package/dist/tools/contract/reverseDrift.d.ts.map +0 -1
- package/dist/tools/contract/reverseDrift.js +0 -136
- package/dist/tools/contract/reverseDrift.js.map +0 -1
- package/dist/tools/convention/analyzeComplexity.d.ts +0 -9
- package/dist/tools/convention/analyzeComplexity.d.ts.map +0 -1
- package/dist/tools/convention/analyzeComplexity.js +0 -330
- package/dist/tools/convention/analyzeComplexity.js.map +0 -1
- package/dist/tools/convention/applyQualityRules.d.ts +0 -7
- package/dist/tools/convention/applyQualityRules.d.ts.map +0 -1
- package/dist/tools/convention/applyQualityRules.js +0 -107
- package/dist/tools/convention/applyQualityRules.js.map +0 -1
- package/dist/tools/convention/checkCouplingCohesion.d.ts +0 -8
- package/dist/tools/convention/checkCouplingCohesion.d.ts.map +0 -1
- package/dist/tools/convention/checkCouplingCohesion.js +0 -224
- package/dist/tools/convention/checkCouplingCohesion.js.map +0 -1
- package/dist/tools/convention/index.d.ts +0 -9
- package/dist/tools/convention/index.d.ts.map +0 -1
- package/dist/tools/convention/index.js +0 -9
- package/dist/tools/convention/index.js.map +0 -1
- package/dist/tools/convention/suggestImprovements.d.ts +0 -8
- package/dist/tools/convention/suggestImprovements.d.ts.map +0 -1
- package/dist/tools/convention/suggestImprovements.js +0 -262
- package/dist/tools/convention/suggestImprovements.js.map +0 -1
- package/dist/tools/convention/validateCodeQuality.d.ts +0 -41
- package/dist/tools/convention/validateCodeQuality.d.ts.map +0 -1
- package/dist/tools/convention/validateCodeQuality.js +0 -327
- package/dist/tools/convention/validateCodeQuality.js.map +0 -1
- package/dist/tools/dispatch/costGate.d.ts +0 -59
- package/dist/tools/dispatch/costGate.d.ts.map +0 -1
- package/dist/tools/dispatch/costGate.js +0 -85
- package/dist/tools/dispatch/costGate.js.map +0 -1
- package/dist/tools/dispatch/deterministicSignals.d.ts +0 -61
- package/dist/tools/dispatch/deterministicSignals.d.ts.map +0 -1
- package/dist/tools/dispatch/deterministicSignals.js +0 -136
- package/dist/tools/dispatch/deterministicSignals.js.map +0 -1
- package/dist/tools/dispatch/index.d.ts +0 -5
- package/dist/tools/dispatch/index.d.ts.map +0 -1
- package/dist/tools/dispatch/index.js +0 -3
- package/dist/tools/dispatch/index.js.map +0 -1
- package/dist/tools/dispatch/vibePaths.d.ts +0 -7
- package/dist/tools/dispatch/vibePaths.d.ts.map +0 -1
- package/dist/tools/dispatch/vibePaths.js +0 -35
- package/dist/tools/dispatch/vibePaths.js.map +0 -1
- package/dist/tools/docs/agentsMd.d.ts +0 -45
- package/dist/tools/docs/agentsMd.d.ts.map +0 -1
- package/dist/tools/docs/agentsMd.js +0 -51
- package/dist/tools/docs/agentsMd.js.map +0 -1
- package/dist/tools/docs/cacheSurface.d.ts +0 -37
- package/dist/tools/docs/cacheSurface.d.ts.map +0 -1
- package/dist/tools/docs/cacheSurface.js +0 -98
- package/dist/tools/docs/cacheSurface.js.map +0 -1
- package/dist/tools/evolution/dashboardTools.d.ts +0 -26
- package/dist/tools/evolution/dashboardTools.d.ts.map +0 -1
- package/dist/tools/evolution/dashboardTools.js +0 -216
- package/dist/tools/evolution/dashboardTools.js.map +0 -1
- package/dist/tools/evolution/index.d.ts +0 -3
- package/dist/tools/evolution/index.d.ts.map +0 -1
- package/dist/tools/evolution/index.js +0 -6
- package/dist/tools/evolution/index.js.map +0 -1
- package/dist/tools/evolution/insightTools.d.ts +0 -21
- package/dist/tools/evolution/insightTools.d.ts.map +0 -1
- package/dist/tools/evolution/insightTools.js +0 -184
- package/dist/tools/evolution/insightTools.js.map +0 -1
- package/dist/tools/index.d.ts +0 -81
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -94
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/interaction/askUser.d.ts +0 -113
- package/dist/tools/interaction/askUser.d.ts.map +0 -1
- package/dist/tools/interaction/askUser.js +0 -502
- package/dist/tools/interaction/askUser.js.map +0 -1
- package/dist/tools/interaction/index.d.ts +0 -6
- package/dist/tools/interaction/index.d.ts.map +0 -1
- package/dist/tools/interaction/index.js +0 -15
- package/dist/tools/interaction/index.js.map +0 -1
- package/dist/tools/loop/index.d.ts +0 -6
- package/dist/tools/loop/index.d.ts.map +0 -1
- package/dist/tools/loop/index.js +0 -5
- package/dist/tools/loop/index.js.map +0 -1
- package/dist/tools/loop/validateLoopDefinition.d.ts +0 -67
- package/dist/tools/loop/validateLoopDefinition.d.ts.map +0 -1
- package/dist/tools/loop/validateLoopDefinition.js +0 -281
- package/dist/tools/loop/validateLoopDefinition.js.map +0 -1
- package/dist/tools/memory/addObservation.d.ts +0 -16
- package/dist/tools/memory/addObservation.d.ts.map +0 -1
- package/dist/tools/memory/addObservation.js +0 -71
- package/dist/tools/memory/addObservation.js.map +0 -1
- package/dist/tools/memory/autoSaveContext.d.ts +0 -11
- package/dist/tools/memory/autoSaveContext.d.ts.map +0 -1
- package/dist/tools/memory/autoSaveContext.js +0 -71
- package/dist/tools/memory/autoSaveContext.js.map +0 -1
- package/dist/tools/memory/createMemoryTimeline.d.ts +0 -13
- package/dist/tools/memory/createMemoryTimeline.d.ts.map +0 -1
- package/dist/tools/memory/createMemoryTimeline.js +0 -193
- package/dist/tools/memory/createMemoryTimeline.js.map +0 -1
- package/dist/tools/memory/deleteMemory.d.ts +0 -7
- package/dist/tools/memory/deleteMemory.d.ts.map +0 -1
- package/dist/tools/memory/deleteMemory.js +0 -45
- package/dist/tools/memory/deleteMemory.js.map +0 -1
- package/dist/tools/memory/getMemoryGraph.d.ts +0 -12
- package/dist/tools/memory/getMemoryGraph.d.ts.map +0 -1
- package/dist/tools/memory/getMemoryGraph.js +0 -204
- package/dist/tools/memory/getMemoryGraph.js.map +0 -1
- package/dist/tools/memory/getSessionContext.d.ts +0 -14
- package/dist/tools/memory/getSessionContext.d.ts.map +0 -1
- package/dist/tools/memory/getSessionContext.js +0 -252
- package/dist/tools/memory/getSessionContext.js.map +0 -1
- package/dist/tools/memory/index.d.ts +0 -25
- package/dist/tools/memory/index.d.ts.map +0 -1
- package/dist/tools/memory/index.js +0 -27
- package/dist/tools/memory/index.js.map +0 -1
- package/dist/tools/memory/linkMemories.d.ts +0 -13
- package/dist/tools/memory/linkMemories.d.ts.map +0 -1
- package/dist/tools/memory/linkMemories.js +0 -116
- package/dist/tools/memory/linkMemories.js.map +0 -1
- package/dist/tools/memory/listMemories.d.ts +0 -8
- package/dist/tools/memory/listMemories.d.ts.map +0 -1
- package/dist/tools/memory/listMemories.js +0 -48
- package/dist/tools/memory/listMemories.js.map +0 -1
- package/dist/tools/memory/manageGoals.d.ts +0 -11
- package/dist/tools/memory/manageGoals.d.ts.map +0 -1
- package/dist/tools/memory/manageGoals.js +0 -152
- package/dist/tools/memory/manageGoals.js.map +0 -1
- package/dist/tools/memory/prioritizeMemory.d.ts +0 -11
- package/dist/tools/memory/prioritizeMemory.d.ts.map +0 -1
- package/dist/tools/memory/prioritizeMemory.js +0 -115
- package/dist/tools/memory/prioritizeMemory.js.map +0 -1
- package/dist/tools/memory/recallMemory.d.ts +0 -8
- package/dist/tools/memory/recallMemory.d.ts.map +0 -1
- package/dist/tools/memory/recallMemory.js +0 -50
- package/dist/tools/memory/recallMemory.js.map +0 -1
- package/dist/tools/memory/reflectionTools.d.ts +0 -27
- package/dist/tools/memory/reflectionTools.d.ts.map +0 -1
- package/dist/tools/memory/reflectionTools.js +0 -180
- package/dist/tools/memory/reflectionTools.js.map +0 -1
- package/dist/tools/memory/restoreSessionContext.d.ts +0 -9
- package/dist/tools/memory/restoreSessionContext.d.ts.map +0 -1
- package/dist/tools/memory/restoreSessionContext.js +0 -75
- package/dist/tools/memory/restoreSessionContext.js.map +0 -1
- package/dist/tools/memory/retrieveSessionContext.d.ts +0 -9
- package/dist/tools/memory/retrieveSessionContext.d.ts.map +0 -1
- package/dist/tools/memory/retrieveSessionContext.js +0 -140
- package/dist/tools/memory/retrieveSessionContext.js.map +0 -1
- package/dist/tools/memory/saveMemory.d.ts +0 -9
- package/dist/tools/memory/saveMemory.d.ts.map +0 -1
- package/dist/tools/memory/saveMemory.js +0 -45
- package/dist/tools/memory/saveMemory.js.map +0 -1
- package/dist/tools/memory/saveSessionItem.d.ts +0 -26
- package/dist/tools/memory/saveSessionItem.d.ts.map +0 -1
- package/dist/tools/memory/saveSessionItem.js +0 -218
- package/dist/tools/memory/saveSessionItem.js.map +0 -1
- package/dist/tools/memory/searchMemories.d.ts +0 -8
- package/dist/tools/memory/searchMemories.d.ts.map +0 -1
- package/dist/tools/memory/searchMemories.js +0 -43
- package/dist/tools/memory/searchMemories.js.map +0 -1
- package/dist/tools/memory/searchMemoriesAdvanced.d.ts +0 -15
- package/dist/tools/memory/searchMemoriesAdvanced.d.ts.map +0 -1
- package/dist/tools/memory/searchMemoriesAdvanced.js +0 -168
- package/dist/tools/memory/searchMemoriesAdvanced.js.map +0 -1
- package/dist/tools/memory/searchObservations.d.ts +0 -12
- package/dist/tools/memory/searchObservations.d.ts.map +0 -1
- package/dist/tools/memory/searchObservations.js +0 -67
- package/dist/tools/memory/searchObservations.js.map +0 -1
- package/dist/tools/memory/startSession.d.ts +0 -9
- package/dist/tools/memory/startSession.d.ts.map +0 -1
- package/dist/tools/memory/startSession.js +0 -238
- package/dist/tools/memory/startSession.js.map +0 -1
- package/dist/tools/memory/updateMemory.d.ts +0 -9
- package/dist/tools/memory/updateMemory.d.ts.map +0 -1
- package/dist/tools/memory/updateMemory.js +0 -52
- package/dist/tools/memory/updateMemory.js.map +0 -1
- package/dist/tools/release/releaseNotes.d.ts +0 -43
- package/dist/tools/release/releaseNotes.d.ts.map +0 -1
- package/dist/tools/release/releaseNotes.js +0 -151
- package/dist/tools/release/releaseNotes.js.map +0 -1
- package/dist/tools/spec/executionPacket.d.ts +0 -102
- package/dist/tools/spec/executionPacket.d.ts.map +0 -1
- package/dist/tools/spec/executionPacket.js +0 -396
- package/dist/tools/spec/executionPacket.js.map +0 -1
- package/dist/tools/spec/index.d.ts +0 -18
- package/dist/tools/spec/index.d.ts.map +0 -1
- package/dist/tools/spec/index.js +0 -19
- package/dist/tools/spec/index.js.map +0 -1
- package/dist/tools/spec/prdParser.d.ts +0 -42
- package/dist/tools/spec/prdParser.d.ts.map +0 -1
- package/dist/tools/spec/prdParser.js +0 -293
- package/dist/tools/spec/prdParser.js.map +0 -1
- package/dist/tools/spec/requirementId.d.ts +0 -64
- package/dist/tools/spec/requirementId.d.ts.map +0 -1
- package/dist/tools/spec/requirementId.js +0 -160
- package/dist/tools/spec/requirementId.js.map +0 -1
- package/dist/tools/spec/specGenerator.d.ts +0 -50
- package/dist/tools/spec/specGenerator.d.ts.map +0 -1
- package/dist/tools/spec/specGenerator.js +0 -505
- package/dist/tools/spec/specGenerator.js.map +0 -1
- package/dist/tools/spec/specLifecycle.d.ts +0 -40
- package/dist/tools/spec/specLifecycle.d.ts.map +0 -1
- package/dist/tools/spec/specLifecycle.js +0 -147
- package/dist/tools/spec/specLifecycle.js.map +0 -1
- package/dist/tools/spec/traceabilityMatrix.d.ts +0 -56
- package/dist/tools/spec/traceabilityMatrix.d.ts.map +0 -1
- package/dist/tools/spec/traceabilityMatrix.js +0 -479
- package/dist/tools/spec/traceabilityMatrix.js.map +0 -1
- package/dist/tools/spec/validateSpecDocument.d.ts +0 -30
- package/dist/tools/spec/validateSpecDocument.d.ts.map +0 -1
- package/dist/tools/spec/validateSpecDocument.js +0 -280
- package/dist/tools/spec/validateSpecDocument.js.map +0 -1
- package/dist/tools/time/getCurrentTime.d.ts +0 -7
- package/dist/tools/time/getCurrentTime.d.ts.map +0 -1
- package/dist/tools/time/getCurrentTime.js +0 -58
- package/dist/tools/time/getCurrentTime.js.map +0 -1
- package/dist/tools/time/index.d.ts +0 -5
- package/dist/tools/time/index.d.ts.map +0 -1
- package/dist/tools/time/index.js +0 -5
- package/dist/tools/time/index.js.map +0 -1
- package/dist/tools/ui/generateDesignSystem.d.ts +0 -7
- package/dist/tools/ui/generateDesignSystem.d.ts.map +0 -1
- package/dist/tools/ui/generateDesignSystem.js +0 -70
- package/dist/tools/ui/generateDesignSystem.js.map +0 -1
- package/dist/tools/ui/index.d.ts +0 -9
- package/dist/tools/ui/index.d.ts.map +0 -1
- package/dist/tools/ui/index.js +0 -9
- package/dist/tools/ui/index.js.map +0 -1
- package/dist/tools/ui/persistDesignSystem.d.ts +0 -8
- package/dist/tools/ui/persistDesignSystem.d.ts.map +0 -1
- package/dist/tools/ui/persistDesignSystem.js +0 -77
- package/dist/tools/ui/persistDesignSystem.js.map +0 -1
- package/dist/tools/ui/previewUiAscii.d.ts +0 -14
- package/dist/tools/ui/previewUiAscii.d.ts.map +0 -1
- package/dist/tools/ui/previewUiAscii.js +0 -237
- package/dist/tools/ui/previewUiAscii.js.map +0 -1
- package/dist/tools/ui/searchUiUx.d.ts +0 -8
- package/dist/tools/ui/searchUiUx.d.ts.map +0 -1
- package/dist/tools/ui/searchUiUx.js +0 -82
- package/dist/tools/ui/searchUiUx.js.map +0 -1
- package/dist/tools/ui/searchUiUxStack.d.ts +0 -8
- package/dist/tools/ui/searchUiUxStack.d.ts.map +0 -1
- package/dist/tools/ui/searchUiUxStack.js +0 -83
- package/dist/tools/ui/searchUiUxStack.js.map +0 -1
- package/hooks/antigravity-hooks.json +0 -73
- package/hooks/claude-plugin-hooks.json +0 -123
- package/hooks/hooks.json +0 -128
- package/hooks/plugin-hooks.json +0 -123
- package/hooks/scripts/auto-commit.js +0 -123
- package/hooks/scripts/auto-format.js +0 -125
- package/hooks/scripts/auto-test.js +0 -222
- package/hooks/scripts/clone-extract.js +0 -1306
- package/hooks/scripts/clone-merge-responsive.js +0 -184
- package/hooks/scripts/clone-refine.js +0 -642
- package/hooks/scripts/clone-spec.js +0 -262
- package/hooks/scripts/clone-to-scss.js +0 -275
- package/hooks/scripts/clone-validate.js +0 -286
- package/hooks/scripts/code-check.js +0 -354
- package/hooks/scripts/codex-detect.js +0 -46
- package/hooks/scripts/codex-hook-adapter.js +0 -183
- package/hooks/scripts/codex-notify.js +0 -49
- package/hooks/scripts/codex-review-gate.js +0 -84
- package/hooks/scripts/command-log.js +0 -42
- package/hooks/scripts/context-save.js +0 -342
- package/hooks/scripts/devlog-gen.js +0 -230
- package/hooks/scripts/figma-extract.js +0 -885
- package/hooks/scripts/figma-refine.js +0 -315
- package/hooks/scripts/figma-to-scss.js +0 -401
- package/hooks/scripts/figma-validate.js +0 -353
- package/hooks/scripts/hook-payload.js +0 -64
- package/hooks/scripts/lib/anchor.js +0 -99
- package/hooks/scripts/lib/console-allow.js +0 -66
- package/hooks/scripts/lib/curation-index.js +0 -101
- package/hooks/scripts/lib/dispatcher.js +0 -204
- package/hooks/scripts/lib/ephemeral-lane.js +0 -106
- package/hooks/scripts/lib/gates.js +0 -138
- package/hooks/scripts/lib/glob.js +0 -32
- package/hooks/scripts/lib/hook-context.js +0 -147
- package/hooks/scripts/lib/inbox.js +0 -68
- package/hooks/scripts/lib/iteration-cost.js +0 -178
- package/hooks/scripts/lib/loop-ledger.js +0 -250
- package/hooks/scripts/lib/pr-gate-runner.js +0 -62
- package/hooks/scripts/lib/run-ledger.js +0 -271
- package/hooks/scripts/lib/scope-from-spec.js +0 -340
- package/hooks/scripts/llm-orchestrate.js +0 -699
- package/hooks/scripts/loop-ledger.js +0 -167
- package/hooks/scripts/plugin-hook-entry.js +0 -57
- package/hooks/scripts/post-edit-dispatcher.js +0 -101
- package/hooks/scripts/post-edit.js +0 -55
- package/hooks/scripts/pr-test-gate.js +0 -23
- package/hooks/scripts/pre-tool-dispatcher.js +0 -46
- package/hooks/scripts/pre-tool-guard.js +0 -278
- package/hooks/scripts/prompt-dispatcher.js +0 -237
- package/hooks/scripts/recipe-extractor.js +0 -249
- package/hooks/scripts/scope-guard.js +0 -107
- package/hooks/scripts/sentinel-guard.js +0 -115
- package/hooks/scripts/session-start.js +0 -229
- package/hooks/scripts/step-counter.js +0 -364
- package/hooks/scripts/stop-dispatcher.js +0 -56
- package/hooks/scripts/stop-notify.js +0 -209
- package/hooks/scripts/utils.js +0 -410
- package/hooks/scripts/verify-ledger.js +0 -42
- package/languages/csharp-unity.md +0 -515
- package/languages/dart-flutter.md +0 -510
- package/languages/gdscript-godot.md +0 -470
- package/languages/go.md +0 -397
- package/languages/java-spring.md +0 -587
- package/languages/kotlin-android.md +0 -492
- package/languages/python-django.md +0 -372
- package/languages/python-fastapi.md +0 -387
- package/languages/ruby-rails.md +0 -489
- package/languages/rust.md +0 -426
- package/languages/swift-ios.md +0 -517
- package/languages/typescript-angular.md +0 -433
- package/languages/typescript-astro.md +0 -416
- package/languages/typescript-electron.md +0 -406
- package/languages/typescript-nestjs.md +0 -524
- package/languages/typescript-nextjs.md +0 -442
- package/languages/typescript-node.md +0 -376
- package/languages/typescript-nuxt.md +0 -522
- package/languages/typescript-react-native.md +0 -447
- package/languages/typescript-react.md +0 -526
- package/languages/typescript-svelte.md +0 -407
- package/languages/typescript-tauri.md +0 -365
- package/languages/typescript-vue.md +0 -354
- package/skills/vibe/references/routing-examples.md +0 -85
- package/skills/vibe.agents-md/SKILL.md +0 -172
- package/skills/vibe.agents-md/rubrics/what-to-keep.md +0 -49
- package/skills/vibe.agents-md/templates/agents-md.md +0 -36
- package/skills/vibe.agents-md/templates/claude-md.md +0 -54
- package/skills/vibe.analyze/SKILL.md +0 -105
- package/skills/vibe.analyze/references/mode1-feature.md +0 -81
- package/skills/vibe.analyze/references/mode2-document.md +0 -50
- package/skills/vibe.analyze/references/mode3-website.md +0 -47
- package/skills/vibe.analyze/references/mode4-quality.md +0 -35
- package/skills/vibe.analyze/references/output-templates.md +0 -188
- package/skills/vibe.analyze/references/quality-gate.md +0 -93
- package/skills/vibe.brand-assets/SKILL.md +0 -148
- package/skills/vibe.brand-assets/references/mobile-assets.md +0 -6
- package/skills/vibe.brand-assets/rubrics/asset-checklist.md +0 -98
- package/skills/vibe.brand-assets/templates/brand-guide.md +0 -161
- package/skills/vibe.capability-loop/SKILL.md +0 -208
- package/skills/vibe.capability-loop/agents/capability-designer.md +0 -61
- package/skills/vibe.capability-loop/agents/failure-analyst.md +0 -55
- package/skills/vibe.capability-loop/agents/implementer.md +0 -50
- package/skills/vibe.capability-loop/agents/tester.md +0 -53
- package/skills/vibe.capability-loop/references/escalate.md +0 -86
- package/skills/vibe.capability-loop/templates/capability-spec.md +0 -118
- package/skills/vibe.capability-loop/templates/failure-analysis.md +0 -118
- package/skills/vibe.chub-usage/SKILL.md +0 -11
- package/skills/vibe.clone/SKILL.md +0 -136
- package/skills/vibe.clone/references/capture-rules.md +0 -48
- package/skills/vibe.clone/references/legal-and-error-recovery.md +0 -40
- package/skills/vibe.clone/references/phase-commands.md +0 -118
- package/skills/vibe.clone/references/refine-rules.md +0 -61
- package/skills/vibe.clone/references/scaffold-phases.md +0 -59
- package/skills/vibe.clone/references/setup-and-layout.md +0 -64
- package/skills/vibe.clone/references/verification-loops.md +0 -67
- package/skills/vibe.commerce-patterns/SKILL.md +0 -65
- package/skills/vibe.commerce-patterns/rubrics/checkout-flow.md +0 -48
- package/skills/vibe.commerce-patterns/templates/product-schema.md +0 -85
- package/skills/vibe.commit-push-pr/SKILL.md +0 -83
- package/skills/vibe.commit-push-pr/agents/change-analyzer.md +0 -55
- package/skills/vibe.commit-push-pr/agents/message-writer.md +0 -50
- package/skills/vibe.commit-push-pr/agents/pr-writer.md +0 -58
- package/skills/vibe.commit-push-pr/agents/reviewer.md +0 -52
- package/skills/vibe.commit-push-pr/rubrics/commit-message.md +0 -73
- package/skills/vibe.commit-push-pr/templates/pr-body.md +0 -63
- package/skills/vibe.context7-usage/SKILL.md +0 -11
- package/skills/vibe.continue/SKILL.md +0 -42
- package/skills/vibe.continue/agents/context-summarizer.md +0 -51
- package/skills/vibe.continue/agents/document-writer.md +0 -63
- package/skills/vibe.continue/agents/state-collector.md +0 -53
- package/skills/vibe.continue/agents/verifier.md +0 -48
- package/skills/vibe.continue/references/handoff-completeness.md +0 -62
- package/skills/vibe.continue/references/handoff.md +0 -142
- package/skills/vibe.contract/SKILL.md +0 -345
- package/skills/vibe.create-prd/SKILL.md +0 -98
- package/skills/vibe.create-prd/agents/edge-case-finder.md +0 -48
- package/skills/vibe.create-prd/agents/prioritizer.md +0 -60
- package/skills/vibe.create-prd/agents/requirements-writer.md +0 -48
- package/skills/vibe.create-prd/agents/researcher.md +0 -55
- package/skills/vibe.create-prd/agents/reviewer.md +0 -54
- package/skills/vibe.create-prd/frameworks/jobs-to-be-done.md +0 -96
- package/skills/vibe.create-prd/frameworks/rice-scoring.md +0 -97
- package/skills/vibe.create-prd/orchestrator.md +0 -72
- package/skills/vibe.create-prd/rubrics/completeness.md +0 -58
- package/skills/vibe.create-prd/templates/prd.md +0 -139
- package/skills/vibe.design/SKILL.md +0 -236
- package/skills/vibe.design/heuristics/code-extract.md +0 -100
- package/skills/vibe.design/references/README.md +0 -39
- package/skills/vibe.design/references/brand-personality.md +0 -73
- package/skills/vibe.design/references/design-context.md +0 -184
- package/skills/vibe.design/references/ui-preview.md +0 -20
- package/skills/vibe.design/templates/DESIGN.md.template +0 -100
- package/skills/vibe.design/templates/design-context.json +0 -36
- package/skills/vibe.design-refine/SKILL.md +0 -147
- package/skills/vibe.design-refine/rubrics/polish-checklist.md +0 -68
- package/skills/vibe.design-refine/rubrics/token-naming.md +0 -117
- package/skills/vibe.design-refine/templates/design-system.md +0 -132
- package/skills/vibe.design-refine/templates/polish-report.md +0 -64
- package/skills/vibe.design-refine/templates/token-audit.md +0 -89
- package/skills/vibe.design-review/SKILL.md +0 -150
- package/skills/vibe.design-review/agents/a11y-auditor.md +0 -43
- package/skills/vibe.design-review/agents/performance-auditor.md +0 -46
- package/skills/vibe.design-review/agents/responsive-auditor.md +0 -46
- package/skills/vibe.design-review/agents/scorer.md +0 -47
- package/skills/vibe.design-review/agents/slop-detector.md +0 -47
- package/skills/vibe.design-review/frameworks/core-web-vitals.md +0 -107
- package/skills/vibe.design-review/frameworks/wcag-checklist.md +0 -64
- package/skills/vibe.design-review/orchestrator.md +0 -66
- package/skills/vibe.design-review/rubrics/ai-slop-patterns.md +0 -83
- package/skills/vibe.design-review/rubrics/scoring.md +0 -63
- package/skills/vibe.design-review/rubrics/ux-heuristics.md +0 -143
- package/skills/vibe.design-review/templates/critique-report.md +0 -86
- package/skills/vibe.design-review/templates/report.md +0 -88
- package/skills/vibe.design-teach/SKILL.md +0 -11
- package/skills/vibe.devlog/SKILL.md +0 -147
- package/skills/vibe.devlog/references/auto-push.md +0 -10
- package/skills/vibe.docs/SKILL.md +0 -121
- package/skills/vibe.docs/references/agent.md +0 -59
- package/skills/vibe.docs/references/api-docs-changelog.md +0 -34
- package/skills/vibe.docs/references/arch.md +0 -28
- package/skills/vibe.docs/references/codemaps-output.md +0 -23
- package/skills/vibe.docs/references/codemaps.md +0 -17
- package/skills/vibe.docs/references/diagram-spec.md +0 -34
- package/skills/vibe.docs/references/diagram.md +0 -24
- package/skills/vibe.docs/references/guide.md +0 -23
- package/skills/vibe.docs/references/readme.md +0 -45
- package/skills/vibe.docs/references/release.md +0 -31
- package/skills/vibe.docs/templates/architecture.md +0 -80
- package/skills/vibe.docs/templates/behavioral-principles.md +0 -47
- package/skills/vibe.docs/templates/readme.md +0 -84
- package/skills/vibe.docs/templates/release-notes.md +0 -74
- package/skills/vibe.documentation-provider/SKILL.md +0 -22
- package/skills/vibe.documentation-provider/references/chub.md +0 -141
- package/skills/vibe.documentation-provider/references/context7-when-to-use.md +0 -50
- package/skills/vibe.documentation-provider/references/context7.md +0 -107
- package/skills/vibe.e2e-commerce/SKILL.md +0 -63
- package/skills/vibe.e2e-commerce/templates/test-scenarios.md +0 -170
- package/skills/vibe.educational-content/SKILL.md +0 -164
- package/skills/vibe.educational-content/references/learning-design.md +0 -81
- package/skills/vibe.educational-content/references/output-patterns.md +0 -109
- package/skills/vibe.educational-content/references/source-method.md +0 -40
- package/skills/vibe.event/SKILL.md +0 -66
- package/skills/vibe.event/references/comms.md +0 -173
- package/skills/vibe.event/references/contingency.md +0 -85
- package/skills/vibe.event/references/d-day-checklist-template.md +0 -65
- package/skills/vibe.event/references/email-invite-template.md +0 -99
- package/skills/vibe.event/references/event-plan-template.md +0 -91
- package/skills/vibe.event/references/operations.md +0 -208
- package/skills/vibe.event/references/orchestration-legacy.md +0 -97
- package/skills/vibe.event/references/planning.md +0 -145
- package/skills/vibe.event/references/sns-post-template.md +0 -133
- package/skills/vibe.event/references/timeline.md +0 -70
- package/skills/vibe.event-comms/SKILL.md +0 -11
- package/skills/vibe.event-ops/SKILL.md +0 -11
- package/skills/vibe.event-planning/SKILL.md +0 -11
- package/skills/vibe.figma/SKILL.md +0 -173
- package/skills/vibe.figma/references/branch-phases.md +0 -113
- package/skills/vibe.figma/references/branch1-read-convention.md +0 -82
- package/skills/vibe.figma/references/branch2-read-standalone.md +0 -69
- package/skills/vibe.figma/references/branch3-write.md +0 -122
- package/skills/vibe.figma/references/core-implementation.md +0 -453
- package/skills/vibe.figma/references/state-schema.md +0 -42
- package/skills/vibe.figma/references/step-algorithms.md +0 -204
- package/skills/vibe.figma/rubrics/conversion-rules.md +0 -141
- package/skills/vibe.figma/rubrics/css-mapping.md +0 -125
- package/skills/vibe.figma/rubrics/extraction-checklist.md +0 -51
- package/skills/vibe.figma/rubrics/image-rules.md +0 -157
- package/skills/vibe.figma/templates/component-index.md +0 -126
- package/skills/vibe.figma/templates/component-spec.md +0 -168
- package/skills/vibe.figma/templates/component.md +0 -140
- package/skills/vibe.figma/templates/figma-handoff.md +0 -100
- package/skills/vibe.figma/templates/remapped-tree.md +0 -277
- package/skills/vibe.git-worktree/SKILL.md +0 -70
- package/skills/vibe.git-worktree/references/troubleshooting.md +0 -9
- package/skills/vibe.git-worktree/rubrics/when-to-use.md +0 -55
- package/skills/vibe.harness/SKILL.md +0 -144
- package/skills/vibe.harness/references/report-template.md +0 -46
- package/skills/vibe.image/SKILL.md +0 -77
- package/skills/vibe.image/references/image-generation-examples.md +0 -39
- package/skills/vibe.llm/SKILL.md +0 -57
- package/skills/vibe.loop/SKILL.md +0 -193
- package/skills/vibe.loop/references/install-adapters.md +0 -25
- package/skills/vibe.parallel-research/SKILL.md +0 -92
- package/skills/vibe.parallel-research/agents/best-practices.md +0 -43
- package/skills/vibe.parallel-research/agents/codebase-patterns.md +0 -46
- package/skills/vibe.parallel-research/agents/framework-docs.md +0 -45
- package/skills/vibe.parallel-research/agents/security-advisory.md +0 -46
- package/skills/vibe.parallel-research/agents/synthesizer.md +0 -57
- package/skills/vibe.parallel-research/experts/best-practices.md +0 -50
- package/skills/vibe.parallel-research/experts/codebase-patterns.md +0 -70
- package/skills/vibe.parallel-research/experts/framework-docs.md +0 -65
- package/skills/vibe.parallel-research/experts/security-advisory.md +0 -69
- package/skills/vibe.parallel-research/orchestrator.md +0 -81
- package/skills/vibe.parallel-research/templates/awesome-list.md +0 -32
- package/skills/vibe.parallel-research/templates/paper.md +0 -88
- package/skills/vibe.parallel-research/templates/synthesis.md +0 -101
- package/skills/vibe.presentation/SKILL.md +0 -90
- package/skills/vibe.presentation/references/style-presets.md +0 -25
- package/skills/vibe.prioritization/SKILL.md +0 -95
- package/skills/vibe.prioritization/rubrics/frameworks.md +0 -79
- package/skills/vibe.prioritization/templates/scoring-matrix.md +0 -69
- package/skills/vibe.priority-todos/SKILL.md +0 -11
- package/skills/vibe.react-best-practices/SKILL.md +0 -61
- package/skills/vibe.react-best-practices/rubrics/performance.md +0 -82
- package/skills/vibe.react-best-practices/rubrics/server-components.md +0 -86
- package/skills/vibe.reason/SKILL.md +0 -160
- package/skills/vibe.reason/references/output-format-template.md +0 -57
- package/skills/vibe.reason/references/quality-rubrics.md +0 -94
- package/skills/vibe.reason/references/worked-example.md +0 -45
- package/skills/vibe.regress/SKILL.md +0 -233
- package/skills/vibe.regress/templates/bug.md +0 -44
- package/skills/vibe.regress/templates/test-template.md +0 -30
- package/skills/vibe.review/SKILL.md +0 -321
- package/skills/vibe.review/references/boundary-check.md +0 -25
- package/skills/vibe.review/references/output-template.md +0 -74
- package/skills/vibe.review/references/priority-todos.md +0 -66
- package/skills/vibe.review/references/quality-gate.md +0 -84
- package/skills/vibe.review/references/race-mode.md +0 -117
- package/skills/vibe.review/references/todo-board-template.md +0 -59
- package/skills/vibe.review/references/todo-prioritization.md +0 -70
- package/skills/vibe.review/references/ui-ux-review.md +0 -39
- package/skills/vibe.review/references/worked-examples.md +0 -94
- package/skills/vibe.run/SKILL.md +0 -254
- package/skills/vibe.run/internal/arch-guard/agents/detector.md +0 -48
- package/skills/vibe.run/internal/arch-guard/agents/reporter.md +0 -48
- package/skills/vibe.run/internal/arch-guard/agents/rule-generator.md +0 -49
- package/skills/vibe.run/internal/arch-guard/agents/violation-checker.md +0 -51
- package/skills/vibe.run/internal/arch-guard/frameworks/clean-architecture.md +0 -108
- package/skills/vibe.run/internal/arch-guard/frameworks/solid.md +0 -102
- package/skills/vibe.run/internal/arch-guard/scripts/check-boundaries.js +0 -90
- package/skills/vibe.run/internal/arch-guard/templates/arch-rules.json +0 -47
- package/skills/vibe.run/internal/arch-guard/templates/violation-report.md +0 -53
- package/skills/vibe.run/internal/exec-plan/agents/decomposer.md +0 -47
- package/skills/vibe.run/internal/exec-plan/agents/dependency-mapper.md +0 -44
- package/skills/vibe.run/internal/exec-plan/agents/estimator.md +0 -43
- package/skills/vibe.run/internal/exec-plan/agents/validator.md +0 -55
- package/skills/vibe.run/internal/exec-plan/orchestrator.md +0 -72
- package/skills/vibe.run/internal/exec-plan/rubrics/complexity-scoring.md +0 -75
- package/skills/vibe.run/internal/exec-plan/templates/plan.md +0 -147
- package/skills/vibe.run/references/arch-guard.md +0 -178
- package/skills/vibe.run/references/automation-level.md +0 -51
- package/skills/vibe.run/references/brand-assets.md +0 -59
- package/skills/vibe.run/references/coverage-loop.md +0 -94
- package/skills/vibe.run/references/e2e-and-autofix.md +0 -43
- package/skills/vibe.run/references/exec-plan.md +0 -145
- package/skills/vibe.run/references/guidelines-and-tools.md +0 -84
- package/skills/vibe.run/references/parallel-agents.md +0 -253
- package/skills/vibe.run/references/process-steps.md +0 -179
- package/skills/vibe.run/references/race-review.md +0 -272
- package/skills/vibe.run/references/restraint.md +0 -66
- package/skills/vibe.scaffold/SKILL.md +0 -193
- package/skills/vibe.scaffold/references/clean-architecture.md +0 -17
- package/skills/vibe.seo-checklist/SKILL.md +0 -59
- package/skills/vibe.seo-checklist/frameworks/structured-data.md +0 -153
- package/skills/vibe.seo-checklist/rubrics/content-seo.md +0 -42
- package/skills/vibe.seo-checklist/rubrics/technical-seo.md +0 -48
- package/skills/vibe.spec/SKILL.md +0 -328
- package/skills/vibe.spec/references/legacy-artifacts.md +0 -6
- package/skills/vibe.test/SKILL.md +0 -209
- package/skills/vibe.test/references/report-template.md +0 -101
- package/skills/vibe.tool-fallback/SKILL.md +0 -83
- package/skills/vibe.tool-fallback/references/external-llm.md +0 -10
- package/skills/vibe.tool-fallback/references/file-lookup.md +0 -9
- package/skills/vibe.tool-fallback/references/web-search.md +0 -11
- package/skills/vibe.tool-fallback/rubrics/fallback-chain.md +0 -58
- package/skills/vibe.trace/SKILL.md +0 -8
- package/skills/vibe.ui-ux-pro-max/SKILL.md +0 -236
- package/skills/vibe.ui-ux-pro-max/reference/color-and-contrast.md +0 -517
- package/skills/vibe.ui-ux-pro-max/reference/interaction-design.md +0 -544
- package/skills/vibe.ui-ux-pro-max/reference/motion-design.md +0 -591
- package/skills/vibe.ui-ux-pro-max/reference/responsive-design.md +0 -463
- package/skills/vibe.ui-ux-pro-max/reference/spatial-design.md +0 -390
- package/skills/vibe.ui-ux-pro-max/reference/typography.md +0 -455
- package/skills/vibe.ui-ux-pro-max/reference/ux-writing.md +0 -469
- package/skills/vibe.ui-ux-pro-max/references/charts-and-data.md +0 -7
- package/skills/vibe.ui-ux-pro-max/rubrics/interaction-states.md +0 -83
- package/skills/vibe.ui-ux-pro-max/rubrics/responsive-breakpoints.md +0 -99
- package/skills/vibe.user-personas/SKILL.md +0 -83
- package/skills/vibe.user-personas/rubrics/research-methods.md +0 -56
- package/skills/vibe.user-personas/templates/persona.md +0 -89
- package/skills/vibe.verify/SKILL.md +0 -175
- package/skills/vibe.verify/references/trace-mode.md +0 -271
- package/skills/vibe.video-production/SKILL.md +0 -72
- package/skills/vibe.video-production/rubrics/quality-checklist.md +0 -58
- package/skills/vibe.video-production/templates/production-plan.md +0 -104
- package/vibe/config.json +0 -30
- package/vibe/constitution.md +0 -254
- package/vibe/rules/loop-contract.md +0 -256
- package/vibe/rules/orchestrator-contract.md +0 -57
- package/vibe/rules/prefix-cache-surface.md +0 -98
- package/vibe/rules/principles/communication-guide.md +0 -98
- package/vibe/rules/principles/development-philosophy.md +0 -52
- package/vibe/rules/principles/dual-harness-doctrine.md +0 -74
- package/vibe/rules/principles/quick-start.md +0 -102
- package/vibe/rules/quality/bdd-contract-testing.md +0 -393
- package/vibe/rules/quality/checklist.md +0 -276
- package/vibe/rules/quality/performance.md +0 -236
- package/vibe/rules/quality/testing-strategy.md +0 -440
- package/vibe/rules/standards/anti-patterns.md +0 -541
- package/vibe/rules/standards/code-structure.md +0 -291
- package/vibe/rules/standards/complexity-metrics.md +0 -313
- package/vibe/rules/standards/git-workflow.md +0 -237
- package/vibe/rules/standards/naming-conventions.md +0 -198
- package/vibe/rules/standards/security.md +0 -305
- package/vibe/rules/writing/document-style.md +0 -74
- package/vibe/setup.sh +0 -31
- package/vibe/templates/claudemd-template.md +0 -62
- package/vibe/templates/constitution-template.md +0 -267
- package/vibe/templates/contract-backend-template.md +0 -526
- package/vibe/templates/contract-frontend-template.md +0 -599
- package/vibe/templates/feature-template.md +0 -96
- package/vibe/templates/loop-template.md +0 -85
- package/vibe/templates/plan-template.md +0 -194
- package/vibe/templates/spec-template.md +0 -184
- package/vibe/ui-ux-data/charts.csv +0 -26
- package/vibe/ui-ux-data/colors.csv +0 -97
- package/vibe/ui-ux-data/icons.csv +0 -101
- package/vibe/ui-ux-data/landing.csv +0 -31
- package/vibe/ui-ux-data/products.csv +0 -97
- package/vibe/ui-ux-data/react-performance.csv +0 -45
- package/vibe/ui-ux-data/stacks/astro.csv +0 -54
- package/vibe/ui-ux-data/stacks/flutter.csv +0 -53
- package/vibe/ui-ux-data/stacks/html-tailwind.csv +0 -56
- package/vibe/ui-ux-data/stacks/jetpack-compose.csv +0 -53
- package/vibe/ui-ux-data/stacks/nextjs.csv +0 -53
- package/vibe/ui-ux-data/stacks/nuxt-ui.csv +0 -51
- package/vibe/ui-ux-data/stacks/nuxtjs.csv +0 -59
- package/vibe/ui-ux-data/stacks/react-native.csv +0 -52
- package/vibe/ui-ux-data/stacks/react.csv +0 -54
- package/vibe/ui-ux-data/stacks/shadcn.csv +0 -61
- package/vibe/ui-ux-data/stacks/svelte.csv +0 -54
- package/vibe/ui-ux-data/stacks/swiftui.csv +0 -51
- package/vibe/ui-ux-data/stacks/vue.csv +0 -50
- package/vibe/ui-ux-data/styles.csv +0 -68
- package/vibe/ui-ux-data/typography.csv +0 -58
- package/vibe/ui-ux-data/ui-reasoning.csv +0 -101
- package/vibe/ui-ux-data/ux-guidelines.csv +0 -100
- package/vibe/ui-ux-data/version.json +0 -31
- package/vibe/ui-ux-data/web-interface.csv +0 -31
|
@@ -1,1306 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* clone-extract.js — 웹사이트 → 렌더링된 DOM/CSS/자산 정밀 추출
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* node clone-extract.js capture <URL> --out=<dir> --viewport=375x812 --bp=mo [--stealth] [--ignore-robots]
|
|
8
|
-
*
|
|
9
|
-
* Output (in <dir>):
|
|
10
|
-
* rendered.html — sanitized full DOM after JS
|
|
11
|
-
* computed.json — per-element computed CSS + box + pseudo-elements + shadow DOM
|
|
12
|
-
* screenshot.png — full-page screenshot
|
|
13
|
-
* stylesheets.json — @font-face + @keyframes harvested from all sheets
|
|
14
|
-
* states.json — non-default state rules (hover/focus/active/checked/tab/aria/data-state)
|
|
15
|
-
* behaviors.json — ACTIVE interaction sweep: scroll-triggered header/nav diffs +
|
|
16
|
-
* click-driven tab groups (content-swap detection). Captures JS-set
|
|
17
|
-
* state that static CSS harvesting can't see. Skip with --no-interact.
|
|
18
|
-
* asset-map.json — remote URL → local path mapping
|
|
19
|
-
* assets/images/*, assets/fonts/*
|
|
20
|
-
*
|
|
21
|
-
* Requires: puppeteer (optional peer dep; `npm install puppeteer` if missing)
|
|
22
|
-
*
|
|
23
|
-
* Fidelity guarantees:
|
|
24
|
-
* 1. Pseudo-elements (::before/::after) captured separately
|
|
25
|
-
* 2. Shadow DOM traversed (open shadow roots)
|
|
26
|
-
* 3. Inline SVG preserved as-is in nodes
|
|
27
|
-
* 4. CSS custom properties (--vars) captured per element
|
|
28
|
-
* 5. @font-face downloaded with format() preference (woff2 > woff > ttf)
|
|
29
|
-
* 6. Node IDs stable via DOM path, not attribute mutation
|
|
30
|
-
* 7. <picture>/srcset resolved to currentSrc (matches viewport)
|
|
31
|
-
* 8. Gradients & multi-backgrounds preserved verbatim
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
import fs from 'fs';
|
|
35
|
-
import path from 'path';
|
|
36
|
-
import { URL } from 'url';
|
|
37
|
-
import http from 'http';
|
|
38
|
-
import https from 'https';
|
|
39
|
-
|
|
40
|
-
// ─── CSS property allow-list (captured per element) ─────────────────
|
|
41
|
-
// Kept narrow to keep computed.json sane; downstream scripts may add more.
|
|
42
|
-
const CSS_PROPS = [
|
|
43
|
-
// layout / box
|
|
44
|
-
'display', 'position', 'top', 'right', 'bottom', 'left', 'inset',
|
|
45
|
-
'float', 'clear',
|
|
46
|
-
'flex-direction', 'flex-wrap', 'justify-content', 'align-items', 'align-content',
|
|
47
|
-
'align-self', 'justify-self', 'place-items', 'place-content',
|
|
48
|
-
'gap', 'row-gap', 'column-gap', 'order', 'flex-grow', 'flex-shrink', 'flex-basis',
|
|
49
|
-
'grid-template-columns', 'grid-template-rows', 'grid-template-areas',
|
|
50
|
-
'grid-column', 'grid-row', 'grid-area', 'grid-auto-flow', 'grid-auto-rows', 'grid-auto-columns',
|
|
51
|
-
'width', 'height', 'min-width', 'min-height', 'max-width', 'max-height',
|
|
52
|
-
'aspect-ratio',
|
|
53
|
-
'margin-top', 'margin-right', 'margin-bottom', 'margin-left',
|
|
54
|
-
'padding-top', 'padding-right', 'padding-bottom', 'padding-left',
|
|
55
|
-
'box-sizing', 'overflow', 'overflow-x', 'overflow-y', 'z-index',
|
|
56
|
-
'pointer-events',
|
|
57
|
-
// typography
|
|
58
|
-
'font-family', 'font-size', 'font-weight', 'font-style', 'line-height',
|
|
59
|
-
'letter-spacing', 'word-spacing', 'text-align', 'text-decoration',
|
|
60
|
-
'text-decoration-color', 'text-decoration-thickness', 'text-underline-offset',
|
|
61
|
-
'text-transform', 'text-shadow', 'color',
|
|
62
|
-
'white-space', 'word-break', 'overflow-wrap', 'text-overflow',
|
|
63
|
-
'-webkit-line-clamp', '-webkit-box-orient',
|
|
64
|
-
// decoration / paint
|
|
65
|
-
'background-color', 'background-image', 'background-size', 'background-position',
|
|
66
|
-
'background-repeat', 'background-attachment', 'background-clip', 'background-origin',
|
|
67
|
-
'background-blend-mode',
|
|
68
|
-
'border-top-width', 'border-right-width', 'border-bottom-width', 'border-left-width',
|
|
69
|
-
'border-top-style', 'border-right-style', 'border-bottom-style', 'border-left-style',
|
|
70
|
-
'border-top-color', 'border-right-color', 'border-bottom-color', 'border-left-color',
|
|
71
|
-
'border-top-left-radius', 'border-top-right-radius',
|
|
72
|
-
'border-bottom-left-radius', 'border-bottom-right-radius',
|
|
73
|
-
'box-shadow', 'opacity', 'mix-blend-mode', 'filter', 'backdrop-filter',
|
|
74
|
-
'transform', 'transform-origin', 'perspective',
|
|
75
|
-
'transition', 'animation', 'visibility',
|
|
76
|
-
// content (pseudo-elements need this)
|
|
77
|
-
'content', 'cursor', 'caret-color', 'list-style', 'object-fit', 'object-position',
|
|
78
|
-
'mask-image', 'mask-size', 'mask-position', 'clip-path',
|
|
79
|
-
];
|
|
80
|
-
|
|
81
|
-
const SUB_URL_LIMIT = 200;
|
|
82
|
-
const SUB_EXCLUDE_TEXT_RE = /^(?:검색|search|top|home|kor|eng|chn|vtn|language|언어|개인정보|privacy|문의|제안|sitemap|사이트맵|youtube|뉴스룸|newsroom|cookie|닫기|partner|파트너)$/i;
|
|
83
|
-
const SUB_EXCLUDE_PATH_RE = /\/(?:search|sitemap|privacy|contact|inquiry|cookie|login|auth|policy)(?:\/|$)/i;
|
|
84
|
-
const SUB_EXCLUDE_EXT_RE = /\.(?:pdf|zip|jpe?g|png|gif|webp|svg|mp4|mov|avi|docx?|xlsx?|pptx?)$/i;
|
|
85
|
-
|
|
86
|
-
// ─── CLI parse ──────────────────────────────────────────────────────
|
|
87
|
-
function parseArgs(argv) {
|
|
88
|
-
const [, , cmd, urlArg, ...rest] = argv;
|
|
89
|
-
const opts = { stealth: false, ignoreRobots: false, interact: true };
|
|
90
|
-
for (const arg of rest) {
|
|
91
|
-
if (arg.startsWith('--out=')) opts.out = arg.slice(6);
|
|
92
|
-
else if (arg.startsWith('--viewport=')) opts.viewport = arg.slice(11);
|
|
93
|
-
else if (arg.startsWith('--bp=')) opts.bp = arg.slice(5);
|
|
94
|
-
else if (arg.startsWith('--wait=')) opts.wait = Number(arg.slice(7));
|
|
95
|
-
else if (arg === '--stealth') opts.stealth = true;
|
|
96
|
-
else if (arg === '--ignore-robots') opts.ignoreRobots = true;
|
|
97
|
-
else if (arg === '--no-interact') opts.interact = false;
|
|
98
|
-
}
|
|
99
|
-
return { cmd, url: urlArg, opts };
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function parseViewport(v) {
|
|
103
|
-
const m = /^(\d+)x(\d+)(?:@(\d+(?:\.\d+)?))?$/.exec(v || '');
|
|
104
|
-
if (!m) throw new Error(`Invalid viewport: ${v}. Expected WxH or WxH@DPR (e.g. 375x812@2)`);
|
|
105
|
-
return {
|
|
106
|
-
width: Number(m[1]),
|
|
107
|
-
height: Number(m[2]),
|
|
108
|
-
deviceScaleFactor: m[3] ? Number(m[3]) : 1,
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
function localePrefixOf(rawUrl) {
|
|
113
|
-
const first = new URL(rawUrl).pathname.split('/').filter(Boolean)[0];
|
|
114
|
-
if (!first || !/^[a-z]{2,3}(?:-[a-z]{2})?$/i.test(first)) return null;
|
|
115
|
-
return `/${first}`;
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
function normalizeSubUrl(startUrl, href) {
|
|
119
|
-
if (!href || typeof href !== 'string') return null;
|
|
120
|
-
try {
|
|
121
|
-
const target = new URL(href, startUrl);
|
|
122
|
-
if (target.protocol !== 'http:' && target.protocol !== 'https:') return null;
|
|
123
|
-
target.hash = '';
|
|
124
|
-
target.search = '';
|
|
125
|
-
target.pathname = target.pathname.replace(/\/+$/, '') || '/';
|
|
126
|
-
return target;
|
|
127
|
-
} catch {
|
|
128
|
-
return null;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function isSameMenuScope(target, start, localePrefix) {
|
|
133
|
-
if (target.origin !== start.origin) return false;
|
|
134
|
-
if (!localePrefix) return true;
|
|
135
|
-
return target.pathname === localePrefix || target.pathname.startsWith(`${localePrefix}/`);
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
function isExcludedSubLink(target, text) {
|
|
139
|
-
const label = String(text || '').trim();
|
|
140
|
-
if (SUB_EXCLUDE_TEXT_RE.test(label)) return true;
|
|
141
|
-
if (SUB_EXCLUDE_PATH_RE.test(target.pathname)) return true;
|
|
142
|
-
return SUB_EXCLUDE_EXT_RE.test(target.pathname);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
function collectSubUrls(startUrl, links, limit = SUB_URL_LIMIT) {
|
|
146
|
-
const start = normalizeSubUrl(startUrl, startUrl);
|
|
147
|
-
if (!start) return [];
|
|
148
|
-
const localePrefix = localePrefixOf(start.href);
|
|
149
|
-
const urls = [start.href];
|
|
150
|
-
const seen = new Set(urls);
|
|
151
|
-
|
|
152
|
-
for (const link of links) {
|
|
153
|
-
if (urls.length >= limit) break;
|
|
154
|
-
const target = normalizeSubUrl(start.href, link.href);
|
|
155
|
-
if (!target || seen.has(target.href)) continue;
|
|
156
|
-
if (!isSameMenuScope(target, start, localePrefix)) continue;
|
|
157
|
-
if (isExcludedSubLink(target, link.text)) continue;
|
|
158
|
-
seen.add(target.href);
|
|
159
|
-
urls.push(target.href);
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return urls;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
function findSitemapUrl(startUrl, links) {
|
|
166
|
-
const start = normalizeSubUrl(startUrl, startUrl);
|
|
167
|
-
if (!start) return null;
|
|
168
|
-
const localePrefix = localePrefixOf(start.href);
|
|
169
|
-
|
|
170
|
-
for (const link of links) {
|
|
171
|
-
const label = String(link.text || '').trim();
|
|
172
|
-
if (!/sitemap|사이트맵/i.test(`${label} ${link.href}`)) continue;
|
|
173
|
-
const target = normalizeSubUrl(start.href, link.href);
|
|
174
|
-
if (target && isSameMenuScope(target, start, localePrefix)) return target.href;
|
|
175
|
-
}
|
|
176
|
-
|
|
177
|
-
return null;
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
// ─── Puppeteer dynamic loader (optional dep) ────────────────────────
|
|
181
|
-
async function loadPuppeteer() {
|
|
182
|
-
try {
|
|
183
|
-
return await import('puppeteer');
|
|
184
|
-
} catch {
|
|
185
|
-
throw new Error(
|
|
186
|
-
'puppeteer is not installed. Run: npm install puppeteer\n' +
|
|
187
|
-
'Required for clone-extract.js (clone Phase 1).',
|
|
188
|
-
);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
// ─── robots.txt check ───────────────────────────────────────────────
|
|
193
|
-
async function checkRobots(targetUrl) {
|
|
194
|
-
const u = new URL(targetUrl);
|
|
195
|
-
const robotsUrl = `${u.protocol}//${u.host}/robots.txt`;
|
|
196
|
-
try {
|
|
197
|
-
const body = await fetchText(robotsUrl, 5000);
|
|
198
|
-
const lines = body.split('\n').map((l) => l.trim());
|
|
199
|
-
let inStar = false;
|
|
200
|
-
const disallows = [];
|
|
201
|
-
for (const line of lines) {
|
|
202
|
-
if (/^user-agent:\s*\*/i.test(line)) inStar = true;
|
|
203
|
-
else if (/^user-agent:/i.test(line)) inStar = false;
|
|
204
|
-
else if (inStar && /^disallow:\s*/i.test(line)) {
|
|
205
|
-
const p = line.replace(/^disallow:\s*/i, '').trim();
|
|
206
|
-
if (p) disallows.push(p);
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
const reqPath = u.pathname || '/';
|
|
210
|
-
return disallows.some((p) => reqPath.startsWith(p));
|
|
211
|
-
} catch {
|
|
212
|
-
return false;
|
|
213
|
-
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
function fetchText(url, timeoutMs = 10000) {
|
|
217
|
-
return new Promise((resolve, reject) => {
|
|
218
|
-
const client = url.startsWith('https:') ? https : http;
|
|
219
|
-
const req = client.get(url, { timeout: timeoutMs }, (res) => {
|
|
220
|
-
if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
|
|
221
|
-
return resolve(fetchText(res.headers.location, timeoutMs));
|
|
222
|
-
}
|
|
223
|
-
if (res.statusCode !== 200) {
|
|
224
|
-
return reject(new Error(`HTTP ${res.statusCode} for ${url}`));
|
|
225
|
-
}
|
|
226
|
-
let data = '';
|
|
227
|
-
res.setEncoding('utf8');
|
|
228
|
-
res.on('data', (c) => { data += c; });
|
|
229
|
-
res.on('end', () => resolve(data));
|
|
230
|
-
});
|
|
231
|
-
req.on('error', reject);
|
|
232
|
-
req.on('timeout', () => req.destroy(new Error(`timeout: ${url}`)));
|
|
233
|
-
});
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
function fetchBinary(url, timeoutMs = 30000, depth = 0) {
|
|
237
|
-
if (depth > 5) return Promise.reject(new Error('too many redirects'));
|
|
238
|
-
return new Promise((resolve, reject) => {
|
|
239
|
-
const client = url.startsWith('https:') ? https : http;
|
|
240
|
-
const req = client.get(url, {
|
|
241
|
-
timeout: timeoutMs,
|
|
242
|
-
headers: { 'User-Agent': 'Mozilla/5.0 clone' },
|
|
243
|
-
}, (res) => {
|
|
244
|
-
if (res.statusCode && res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
|
|
245
|
-
const next = new URL(res.headers.location, url).href;
|
|
246
|
-
return resolve(fetchBinary(next, timeoutMs, depth + 1));
|
|
247
|
-
}
|
|
248
|
-
if (res.statusCode !== 200) {
|
|
249
|
-
return reject(new Error(`HTTP ${res.statusCode}`));
|
|
250
|
-
}
|
|
251
|
-
const chunks = [];
|
|
252
|
-
res.on('data', (c) => chunks.push(c));
|
|
253
|
-
res.on('end', () => resolve(Buffer.concat(chunks)));
|
|
254
|
-
});
|
|
255
|
-
req.on('error', reject);
|
|
256
|
-
req.on('timeout', () => req.destroy(new Error('timeout')));
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
// ─── Asset download with concurrency limit ──────────────────────────
|
|
261
|
-
async function downloadAssets(urls, outDir, concurrency = 8) {
|
|
262
|
-
const queue = [...urls];
|
|
263
|
-
const map = {};
|
|
264
|
-
const seenNames = new Set();
|
|
265
|
-
const workers = Array.from({ length: concurrency }, async () => {
|
|
266
|
-
while (queue.length > 0) {
|
|
267
|
-
const u = queue.shift();
|
|
268
|
-
if (!u) break;
|
|
269
|
-
try {
|
|
270
|
-
const buf = await fetchBinary(u);
|
|
271
|
-
const filename = uniqueFilename(u, outDir, seenNames);
|
|
272
|
-
const full = path.join(outDir, filename);
|
|
273
|
-
fs.mkdirSync(path.dirname(full), { recursive: true });
|
|
274
|
-
fs.writeFileSync(full, buf);
|
|
275
|
-
map[u] = { local: filename, status: 'ok', bytes: buf.length };
|
|
276
|
-
} catch (e) {
|
|
277
|
-
map[u] = { local: null, status: 'missing', error: String(e.message || e) };
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
});
|
|
281
|
-
await Promise.all(workers);
|
|
282
|
-
return map;
|
|
283
|
-
}
|
|
284
|
-
|
|
285
|
-
function uniqueFilename(rawUrl, baseDir, seen) {
|
|
286
|
-
let base;
|
|
287
|
-
try {
|
|
288
|
-
const u = new URL(rawUrl);
|
|
289
|
-
base = path.basename(u.pathname) || 'asset';
|
|
290
|
-
} catch {
|
|
291
|
-
base = 'asset';
|
|
292
|
-
}
|
|
293
|
-
base = base.replace(/[?#].*$/, '') || 'asset';
|
|
294
|
-
// sanitize
|
|
295
|
-
base = base.replace(/[^a-zA-Z0-9._-]/g, '_');
|
|
296
|
-
if (!path.extname(base)) base += '.bin';
|
|
297
|
-
let candidate = base;
|
|
298
|
-
let i = 1;
|
|
299
|
-
while (seen.has(candidate) || fs.existsSync(path.join(baseDir, candidate))) {
|
|
300
|
-
const ext = path.extname(base);
|
|
301
|
-
const stem = base.slice(0, -ext.length);
|
|
302
|
-
candidate = `${stem}-${i++}${ext}`;
|
|
303
|
-
}
|
|
304
|
-
seen.add(candidate);
|
|
305
|
-
return candidate;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
// ─── In-page extraction (runs inside the page) ──────────────────────
|
|
309
|
-
// IMPORTANT: this function is serialized to a string. It must be self-contained.
|
|
310
|
-
const PAGE_EXTRACT = `
|
|
311
|
-
(function (props) {
|
|
312
|
-
const out = [];
|
|
313
|
-
const stylesheets = { fontFaces: [], keyframes: [], cssVars: {} };
|
|
314
|
-
const stateRules = [];
|
|
315
|
-
const pathById = new Map();
|
|
316
|
-
|
|
317
|
-
// ── Non-default state rule harvesting (hover/focus/active/checked/tab/aria/data-state) ──
|
|
318
|
-
// Deterministic: read state-dependent declarations straight from the stylesheets
|
|
319
|
-
// (no scripted clicking/hovering, so the output stays reproducible).
|
|
320
|
-
const propSet = new Set(props);
|
|
321
|
-
const STATE_RE = /:hover|:focus(?:-visible|-within)?|:active|:checked|:target|\\[aria-(?:expanded|selected|current|pressed)|\\[data-(?:state|active|open|selected)|\\[open\\]|\\.is-[a-z-]+|\\.has-[a-z-]+|\\.(?:active|open|selected|expanded|current|show|visible|scrolled|sticky|stuck|pinned|fixed|shrink|shrunk|compact|affix|headroom|scrolling)(?![\\w-])/i;
|
|
322
|
-
const harvestStateRule = (rule, media) => {
|
|
323
|
-
if (rule.selectorText && STATE_RE.test(rule.selectorText)) {
|
|
324
|
-
const decl = {};
|
|
325
|
-
for (let i = 0; i < rule.style.length; i++) {
|
|
326
|
-
const p = rule.style[i];
|
|
327
|
-
if (propSet.has(p)) decl[p] = rule.style.getPropertyValue(p).trim();
|
|
328
|
-
}
|
|
329
|
-
if (Object.keys(decl).length && stateRules.length < 1200) {
|
|
330
|
-
stateRules.push({ selector: rule.selectorText.trim(), media: media || null, css: decl });
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
// Recurse @media / @supports blocks so state rules nested under them are not lost
|
|
334
|
-
if (rule.cssRules && (rule.media || rule.conditionText)) {
|
|
335
|
-
const mq = rule.media ? rule.media.mediaText : (media || null);
|
|
336
|
-
for (const r of rule.cssRules) harvestStateRule(r, mq);
|
|
337
|
-
}
|
|
338
|
-
};
|
|
339
|
-
|
|
340
|
-
// Stable ID via DOM path (no attribute mutation)
|
|
341
|
-
const pathFor = (el, parent) => {
|
|
342
|
-
if (!parent) return '0';
|
|
343
|
-
const siblings = Array.from(el.parentNode.children);
|
|
344
|
-
const idx = siblings.indexOf(el);
|
|
345
|
-
return parent + '.' + idx;
|
|
346
|
-
};
|
|
347
|
-
|
|
348
|
-
const captureCss = (cs) => {
|
|
349
|
-
const css = {};
|
|
350
|
-
for (const p of props) {
|
|
351
|
-
const v = cs.getPropertyValue(p);
|
|
352
|
-
if (v && v !== 'normal' && v !== 'auto' && v !== 'none' && v !== '0px' && v !== '') {
|
|
353
|
-
css[p] = v.trim();
|
|
354
|
-
} else if (v === '0px' || v === 'auto') {
|
|
355
|
-
// keep zeros/auto for box model props
|
|
356
|
-
if (/^(margin|padding|border|width|height|inset|top|right|bottom|left|gap)/.test(p)) {
|
|
357
|
-
css[p] = v.trim();
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
// CSS custom properties
|
|
362
|
-
const vars = {};
|
|
363
|
-
for (let i = 0; i < cs.length; i++) {
|
|
364
|
-
const name = cs[i];
|
|
365
|
-
if (name && name.startsWith('--')) {
|
|
366
|
-
vars[name] = cs.getPropertyValue(name).trim();
|
|
367
|
-
}
|
|
368
|
-
}
|
|
369
|
-
if (Object.keys(vars).length) css['--vars'] = vars;
|
|
370
|
-
return css;
|
|
371
|
-
};
|
|
372
|
-
|
|
373
|
-
const capturePseudo = (el, kind, parentId) => {
|
|
374
|
-
const cs = getComputedStyle(el, '::' + kind);
|
|
375
|
-
const content = cs.getPropertyValue('content');
|
|
376
|
-
// Real pseudo-element only if content is not 'none' or empty
|
|
377
|
-
if (!content || content === 'none' || content === 'normal') return null;
|
|
378
|
-
const css = captureCss(cs);
|
|
379
|
-
if (Object.keys(css).length <= 1) return null;
|
|
380
|
-
return {
|
|
381
|
-
id: parentId + '::' + kind,
|
|
382
|
-
parent: parentId,
|
|
383
|
-
tag: '::' + kind,
|
|
384
|
-
pseudo: true,
|
|
385
|
-
content: content,
|
|
386
|
-
css,
|
|
387
|
-
};
|
|
388
|
-
};
|
|
389
|
-
|
|
390
|
-
const isSvgElement = (el) => el.namespaceURI === 'http://www.w3.org/2000/svg';
|
|
391
|
-
|
|
392
|
-
const captureSvg = (svg, id, parentId) => {
|
|
393
|
-
return {
|
|
394
|
-
id,
|
|
395
|
-
parent: parentId,
|
|
396
|
-
tag: 'svg',
|
|
397
|
-
isSvg: true,
|
|
398
|
-
svgMarkup: svg.outerHTML,
|
|
399
|
-
box: rectOf(svg),
|
|
400
|
-
css: captureCss(getComputedStyle(svg)),
|
|
401
|
-
};
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
const rectOf = (el) => {
|
|
405
|
-
const r = el.getBoundingClientRect();
|
|
406
|
-
// Adjust for current scroll (we capture mid-scroll)
|
|
407
|
-
return {
|
|
408
|
-
x: Math.round((r.x + window.scrollX) * 100) / 100,
|
|
409
|
-
y: Math.round((r.y + window.scrollY) * 100) / 100,
|
|
410
|
-
w: Math.round(r.width * 100) / 100,
|
|
411
|
-
h: Math.round(r.height * 100) / 100,
|
|
412
|
-
};
|
|
413
|
-
};
|
|
414
|
-
|
|
415
|
-
const collectSrcset = (el) => {
|
|
416
|
-
const ss = el.getAttribute('srcset') || el.getAttribute('data-srcset');
|
|
417
|
-
if (!ss) return [];
|
|
418
|
-
return ss.split(',').map((part) => {
|
|
419
|
-
const bits = part.trim().split(/\\s+/);
|
|
420
|
-
try { return new URL(bits[0], location.href).href; } catch { return null; }
|
|
421
|
-
}).filter(Boolean);
|
|
422
|
-
};
|
|
423
|
-
|
|
424
|
-
const walk = (el, parentId, root) => {
|
|
425
|
-
if (!(el instanceof Element)) return;
|
|
426
|
-
|
|
427
|
-
const cs = getComputedStyle(el);
|
|
428
|
-
if (cs.display === 'none') return;
|
|
429
|
-
// Keep visibility:hidden — may matter for layout (placeholders)
|
|
430
|
-
|
|
431
|
-
const id = pathFor(el, parentId);
|
|
432
|
-
pathById.set(id, el);
|
|
433
|
-
|
|
434
|
-
if (isSvgElement(el) && el.tagName.toLowerCase() === 'svg') {
|
|
435
|
-
out.push(captureSvg(el, id, parentId));
|
|
436
|
-
return;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
const node = {
|
|
440
|
-
id,
|
|
441
|
-
parent: parentId,
|
|
442
|
-
tag: el.tagName.toLowerCase(),
|
|
443
|
-
classes: el.getAttribute('class') || '',
|
|
444
|
-
attrs: {
|
|
445
|
-
src: el.getAttribute('src') || el.getAttribute('data-src') || null,
|
|
446
|
-
currentSrc: (el.tagName === 'IMG' || el.tagName === 'SOURCE') ? (el.currentSrc || null) : null,
|
|
447
|
-
srcset: el.getAttribute('srcset') || el.getAttribute('data-srcset') || null,
|
|
448
|
-
href: el.getAttribute('href') || null,
|
|
449
|
-
alt: el.getAttribute('alt') || null,
|
|
450
|
-
title: el.getAttribute('title') || null,
|
|
451
|
-
role: el.getAttribute('role') || null,
|
|
452
|
-
ariaLabel: el.getAttribute('aria-label') || null,
|
|
453
|
-
type: el.getAttribute('type') || null,
|
|
454
|
-
name: el.getAttribute('name') || null,
|
|
455
|
-
placeholder: el.getAttribute('placeholder') || null,
|
|
456
|
-
value: el.getAttribute('value') || null,
|
|
457
|
-
},
|
|
458
|
-
text: '',
|
|
459
|
-
box: rectOf(el),
|
|
460
|
-
css: captureCss(cs),
|
|
461
|
-
};
|
|
462
|
-
|
|
463
|
-
// Direct text content (only if no element children to avoid duplication)
|
|
464
|
-
if (el.children.length === 0 || Array.from(el.childNodes).every((n) => n.nodeType === Node.TEXT_NODE || n.nodeType === Node.ELEMENT_NODE)) {
|
|
465
|
-
let txt = '';
|
|
466
|
-
for (const n of el.childNodes) {
|
|
467
|
-
if (n.nodeType === Node.TEXT_NODE) txt += n.textContent;
|
|
468
|
-
}
|
|
469
|
-
txt = txt.trim();
|
|
470
|
-
if (txt) node.text = txt.length > 2000 ? txt.slice(0, 2000) + '…' : txt;
|
|
471
|
-
}
|
|
472
|
-
|
|
473
|
-
out.push(node);
|
|
474
|
-
|
|
475
|
-
// Pseudo elements
|
|
476
|
-
const before = capturePseudo(el, 'before', id);
|
|
477
|
-
if (before) out.push(before);
|
|
478
|
-
const after = capturePseudo(el, 'after', id);
|
|
479
|
-
if (after) out.push(after);
|
|
480
|
-
|
|
481
|
-
// Shadow DOM (open shadow roots only)
|
|
482
|
-
if (el.shadowRoot && el.shadowRoot.mode === 'open') {
|
|
483
|
-
for (const child of el.shadowRoot.children) walk(child, id + '/shadow', root);
|
|
484
|
-
}
|
|
485
|
-
|
|
486
|
-
for (const child of el.children) walk(child, id, root);
|
|
487
|
-
};
|
|
488
|
-
|
|
489
|
-
walk(document.documentElement, null, document.documentElement);
|
|
490
|
-
|
|
491
|
-
// Collect asset URLs (images + fonts) ─────────────────────────────
|
|
492
|
-
const images = new Set();
|
|
493
|
-
const fonts = new Set();
|
|
494
|
-
|
|
495
|
-
document.querySelectorAll('img').forEach((img) => {
|
|
496
|
-
if (img.currentSrc) images.add(img.currentSrc);
|
|
497
|
-
else if (img.src) images.add(img.src);
|
|
498
|
-
const ss = img.getAttribute('srcset') || img.getAttribute('data-srcset');
|
|
499
|
-
if (ss) {
|
|
500
|
-
ss.split(',').forEach((p) => {
|
|
501
|
-
const u = p.trim().split(/\\s+/)[0];
|
|
502
|
-
try { images.add(new URL(u, location.href).href); } catch {}
|
|
503
|
-
});
|
|
504
|
-
}
|
|
505
|
-
});
|
|
506
|
-
document.querySelectorAll('source').forEach((s) => {
|
|
507
|
-
const ss = s.getAttribute('srcset');
|
|
508
|
-
if (!ss) return;
|
|
509
|
-
ss.split(',').forEach((p) => {
|
|
510
|
-
const u = p.trim().split(/\\s+/)[0];
|
|
511
|
-
try { images.add(new URL(u, location.href).href); } catch {}
|
|
512
|
-
});
|
|
513
|
-
});
|
|
514
|
-
document.querySelectorAll('video, audio').forEach((el) => {
|
|
515
|
-
if (el.poster) images.add(new URL(el.poster, location.href).href);
|
|
516
|
-
});
|
|
517
|
-
|
|
518
|
-
const bgUrlRe = /url\\(['"]?([^'")]+)['"]?\\)/g;
|
|
519
|
-
document.querySelectorAll('*').forEach((el) => {
|
|
520
|
-
const cs = getComputedStyle(el);
|
|
521
|
-
const bg = cs.backgroundImage;
|
|
522
|
-
if (bg && bg !== 'none') {
|
|
523
|
-
let m;
|
|
524
|
-
const re = new RegExp(bgUrlRe.source, 'g');
|
|
525
|
-
while ((m = re.exec(bg)) !== null) {
|
|
526
|
-
try { images.add(new URL(m[1], location.href).href); } catch {}
|
|
527
|
-
}
|
|
528
|
-
}
|
|
529
|
-
// also check pseudo bg
|
|
530
|
-
for (const k of ['::before', '::after']) {
|
|
531
|
-
const pcs = getComputedStyle(el, k);
|
|
532
|
-
const pbg = pcs.backgroundImage;
|
|
533
|
-
if (pbg && pbg !== 'none') {
|
|
534
|
-
let m;
|
|
535
|
-
const re = new RegExp(bgUrlRe.source, 'g');
|
|
536
|
-
while ((m = re.exec(pbg)) !== null) {
|
|
537
|
-
try { images.add(new URL(m[1], location.href).href); } catch {}
|
|
538
|
-
}
|
|
539
|
-
}
|
|
540
|
-
}
|
|
541
|
-
});
|
|
542
|
-
|
|
543
|
-
// @font-face from all stylesheets
|
|
544
|
-
for (const sheet of document.styleSheets) {
|
|
545
|
-
let rules;
|
|
546
|
-
try { rules = sheet.cssRules; } catch { continue; }
|
|
547
|
-
if (!rules) continue;
|
|
548
|
-
for (const rule of rules) {
|
|
549
|
-
if (rule.constructor.name === 'CSSFontFaceRule' || rule.type === 5) {
|
|
550
|
-
const family = rule.style.getPropertyValue('font-family');
|
|
551
|
-
const weight = rule.style.getPropertyValue('font-weight');
|
|
552
|
-
const style = rule.style.getPropertyValue('font-style');
|
|
553
|
-
const display = rule.style.getPropertyValue('font-display');
|
|
554
|
-
const src = rule.style.getPropertyValue('src');
|
|
555
|
-
const parsedSrcs = [];
|
|
556
|
-
const re = /url\\(['"]?([^'")]+)['"]?\\)(?:\\s*format\\(['"]?([^'")]+)['"]?\\))?/g;
|
|
557
|
-
let m;
|
|
558
|
-
while ((m = re.exec(src)) !== null) {
|
|
559
|
-
const abs = (() => { try { return new URL(m[1], location.href).href; } catch { return m[1]; } })();
|
|
560
|
-
parsedSrcs.push({ url: abs, format: m[2] || null });
|
|
561
|
-
fonts.add(abs);
|
|
562
|
-
}
|
|
563
|
-
stylesheets.fontFaces.push({
|
|
564
|
-
family: family.replace(/^['"]|['"]$/g, ''),
|
|
565
|
-
weight, style, display,
|
|
566
|
-
sources: parsedSrcs,
|
|
567
|
-
});
|
|
568
|
-
} else if (rule.constructor.name === 'CSSKeyframesRule' || rule.type === 7) {
|
|
569
|
-
const frames = [];
|
|
570
|
-
for (const fr of rule.cssRules) frames.push({ keyText: fr.keyText, css: fr.cssText });
|
|
571
|
-
stylesheets.keyframes.push({ name: rule.name, frames });
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
for (const rule of rules) harvestStateRule(rule, null);
|
|
575
|
-
}
|
|
576
|
-
|
|
577
|
-
// :root CSS vars
|
|
578
|
-
const rootCs = getComputedStyle(document.documentElement);
|
|
579
|
-
for (let i = 0; i < rootCs.length; i++) {
|
|
580
|
-
const name = rootCs[i];
|
|
581
|
-
if (name && name.startsWith('--')) {
|
|
582
|
-
stylesheets.cssVars[name] = rootCs.getPropertyValue(name).trim();
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
|
-
|
|
586
|
-
return {
|
|
587
|
-
nodes: out,
|
|
588
|
-
assets: { images: Array.from(images), fonts: Array.from(fonts) },
|
|
589
|
-
stylesheets,
|
|
590
|
-
stateRules,
|
|
591
|
-
title: document.title,
|
|
592
|
-
html: document.documentElement.outerHTML,
|
|
593
|
-
docSize: {
|
|
594
|
-
width: document.documentElement.scrollWidth,
|
|
595
|
-
height: document.documentElement.scrollHeight,
|
|
596
|
-
},
|
|
597
|
-
};
|
|
598
|
-
})
|
|
599
|
-
`;
|
|
600
|
-
|
|
601
|
-
// ─── Progressive scroll to trigger lazy loading ─────────────────────
|
|
602
|
-
async function scrollToBottom(page) {
|
|
603
|
-
await page.evaluate(`(async () => {
|
|
604
|
-
await new Promise((resolve) => {
|
|
605
|
-
let total = 0;
|
|
606
|
-
const step = 400;
|
|
607
|
-
const max = Math.max(document.documentElement.scrollHeight, 50000);
|
|
608
|
-
const timer = setInterval(() => {
|
|
609
|
-
window.scrollBy(0, step);
|
|
610
|
-
total += step;
|
|
611
|
-
if (total >= document.body.scrollHeight || total >= max) {
|
|
612
|
-
clearInterval(timer);
|
|
613
|
-
window.scrollTo(0, 0);
|
|
614
|
-
setTimeout(resolve, 600);
|
|
615
|
-
}
|
|
616
|
-
}, 80);
|
|
617
|
-
});
|
|
618
|
-
})()`);
|
|
619
|
-
}
|
|
620
|
-
|
|
621
|
-
// Freeze animations to a deterministic frame for stable capture
|
|
622
|
-
async function freezeAnimations(page) {
|
|
623
|
-
await page.addStyleTag({
|
|
624
|
-
content: `
|
|
625
|
-
*, *::before, *::after {
|
|
626
|
-
animation-duration: 0s !important;
|
|
627
|
-
animation-delay: 0s !important;
|
|
628
|
-
animation-play-state: paused !important;
|
|
629
|
-
transition-duration: 0s !important;
|
|
630
|
-
transition-delay: 0s !important;
|
|
631
|
-
}
|
|
632
|
-
`,
|
|
633
|
-
});
|
|
634
|
-
}
|
|
635
|
-
|
|
636
|
-
// ─── Active interaction sweep ───────────────────────────────────────
|
|
637
|
-
// Static CSS harvesting (states.json) only sees declared :hover/:active/[data-state]
|
|
638
|
-
// rules. It is blind to JS-set state: a header that gains a class on scroll, a tab
|
|
639
|
-
// group that swaps content on click, Framer/GSAP inline-style animations. This sweep
|
|
640
|
-
// actually drives the page and diffs computed styles before/after — the #1 accuracy fix.
|
|
641
|
-
|
|
642
|
-
// Subset of props worth diffing for scroll/click state changes (kept small on purpose).
|
|
643
|
-
const BEHAVIOR_PROPS = [
|
|
644
|
-
'background-color', 'background-image', 'box-shadow', 'backdrop-filter',
|
|
645
|
-
'height', 'min-height', 'padding-top', 'padding-bottom',
|
|
646
|
-
'transform', 'opacity', 'position', 'top',
|
|
647
|
-
'border-bottom-width', 'border-bottom-color', 'color',
|
|
648
|
-
];
|
|
649
|
-
|
|
650
|
-
// Pure style differ — exported for testing. Returns { prop: { from, to } } for changed props.
|
|
651
|
-
function diffStyles(a, b) {
|
|
652
|
-
const out = {};
|
|
653
|
-
if (!a || !b) return out;
|
|
654
|
-
const keys = new Set([...Object.keys(a), ...Object.keys(b)]);
|
|
655
|
-
for (const k of keys) {
|
|
656
|
-
const from = a[k] ?? null;
|
|
657
|
-
const to = b[k] ?? null;
|
|
658
|
-
if (from !== to && (from || to)) out[k] = { from, to };
|
|
659
|
-
}
|
|
660
|
-
return out;
|
|
661
|
-
}
|
|
662
|
-
|
|
663
|
-
// In-page: tag sticky/fixed/top-bar elements with a probe attr so we can re-find them.
|
|
664
|
-
const TAG_SCROLL_CANDIDATES = `(function () {
|
|
665
|
-
const els = Array.from(document.querySelectorAll(
|
|
666
|
-
'header, nav, [class*="header" i], [class*="nav" i], [class*="sticky" i], [class*="fixed" i]'
|
|
667
|
-
));
|
|
668
|
-
const out = []; let i = 0;
|
|
669
|
-
for (const el of els) {
|
|
670
|
-
if (i >= 6) break;
|
|
671
|
-
const cs = getComputedStyle(el);
|
|
672
|
-
const r = el.getBoundingClientRect();
|
|
673
|
-
const sticky = cs.position === 'fixed' || cs.position === 'sticky';
|
|
674
|
-
const topBar = r.top >= 0 && r.top < 120 && r.width > window.innerWidth * 0.5;
|
|
675
|
-
if (!sticky && !topBar) continue;
|
|
676
|
-
if (el.closest('[data-clone-probe]')) continue;
|
|
677
|
-
el.setAttribute('data-clone-probe', 'sc' + i);
|
|
678
|
-
const cls = (el.getAttribute('class') || '').trim().split(/\\s+/).filter(Boolean)[0] || '';
|
|
679
|
-
out.push({ probe: 'sc' + i, tag: el.tagName.toLowerCase(), cls });
|
|
680
|
-
i++;
|
|
681
|
-
}
|
|
682
|
-
return out;
|
|
683
|
-
})`;
|
|
684
|
-
|
|
685
|
-
const SNAP_PROBES = `(function (props) {
|
|
686
|
-
const out = {};
|
|
687
|
-
document.querySelectorAll('[data-clone-probe]').forEach((el) => {
|
|
688
|
-
const cs = getComputedStyle(el); const o = {};
|
|
689
|
-
for (const p of props) { const v = cs.getPropertyValue(p); if (v) o[p] = v.trim(); }
|
|
690
|
-
out[el.getAttribute('data-clone-probe')] = o;
|
|
691
|
-
});
|
|
692
|
-
return out;
|
|
693
|
-
})`;
|
|
694
|
-
|
|
695
|
-
// In-page: tag tab-like groups (≥2 siblings) so we can click them.
|
|
696
|
-
const TAG_TAB_GROUPS = `(function () {
|
|
697
|
-
const els = Array.from(document.querySelectorAll(
|
|
698
|
-
'[role="tab"], [aria-selected], button[class*="tab" i], li[class*="tab" i], [data-state="active"], [data-state="inactive"]'
|
|
699
|
-
));
|
|
700
|
-
const groups = new Map();
|
|
701
|
-
for (const el of els) {
|
|
702
|
-
const p = el.parentElement; if (!p) continue;
|
|
703
|
-
if (!groups.has(p)) groups.set(p, []);
|
|
704
|
-
groups.get(p).push(el);
|
|
705
|
-
}
|
|
706
|
-
const out = []; let g = 0;
|
|
707
|
-
for (const [, items] of groups) {
|
|
708
|
-
if (g >= 4) break;
|
|
709
|
-
if (items.length < 2) continue;
|
|
710
|
-
items.forEach((el, idx) => el.setAttribute('data-clone-tab', g + '_' + idx));
|
|
711
|
-
out.push({ group: g, count: items.length, labels: items.map((el) => (el.textContent || '').trim().slice(0, 40)).filter(Boolean) });
|
|
712
|
-
g++;
|
|
713
|
-
}
|
|
714
|
-
return out;
|
|
715
|
-
})`;
|
|
716
|
-
|
|
717
|
-
// Fingerprint the visible text near a tab group, to detect content swaps on click.
|
|
718
|
-
const TAB_CONTENT_FP = `(function (g) {
|
|
719
|
-
const first = document.querySelector('[data-clone-tab="' + g + '_0"]');
|
|
720
|
-
if (!first) return null;
|
|
721
|
-
const box = first.closest('section, main, div');
|
|
722
|
-
const root = box ? (box.parentElement || box) : document.body;
|
|
723
|
-
return (root.innerText || '').replace(/\\s+/g, ' ').trim().slice(0, 4000);
|
|
724
|
-
})`;
|
|
725
|
-
|
|
726
|
-
// Hover diff props — 색/그림자/변형 등 호버에서 실제로 바뀌는 것들
|
|
727
|
-
const HOVER_PROPS = [
|
|
728
|
-
'color', 'background-color', 'border-color', 'box-shadow',
|
|
729
|
-
'transform', 'opacity', 'text-decoration-line', 'filter', 'outline-width',
|
|
730
|
-
];
|
|
731
|
-
|
|
732
|
-
// In-view 등장 애니메이션 diff props
|
|
733
|
-
const INVIEW_PROPS = ['opacity', 'transform', 'visibility', 'filter', 'clip-path'];
|
|
734
|
-
|
|
735
|
-
// In-page: tag hover candidates. 같은 시그니처(tag+첫 클래스)는 1개만 샘플 — nav 링크 30개 → 1개.
|
|
736
|
-
const TAG_HOVER_CANDIDATES = `(function () {
|
|
737
|
-
const els = Array.from(document.querySelectorAll('a, button, [role="button"], [class*="btn" i], [class*="card" i]'));
|
|
738
|
-
const seen = new Set(); const out = []; let i = 0;
|
|
739
|
-
for (const el of els) {
|
|
740
|
-
if (i >= 30) break;
|
|
741
|
-
const r = el.getBoundingClientRect();
|
|
742
|
-
if (r.width < 8 || r.height < 8) continue;
|
|
743
|
-
const cls = (el.getAttribute('class') || '').trim().split(/\\s+/).filter(Boolean)[0] || '';
|
|
744
|
-
const sig = el.tagName + '.' + cls;
|
|
745
|
-
if (seen.has(sig)) continue;
|
|
746
|
-
seen.add(sig);
|
|
747
|
-
el.setAttribute('data-clone-hover', 'h' + i);
|
|
748
|
-
out.push({ probe: 'h' + i, tag: el.tagName.toLowerCase(), cls, transition: getComputedStyle(el).transition });
|
|
749
|
-
i++;
|
|
750
|
-
}
|
|
751
|
-
return out;
|
|
752
|
-
})`;
|
|
753
|
-
|
|
754
|
-
// In-page: snapshot computed props of all elements tagged with an attribute.
|
|
755
|
-
const SNAP_ATTR = `(function (attr, props) {
|
|
756
|
-
const out = {};
|
|
757
|
-
document.querySelectorAll('[' + attr + ']').forEach((el) => {
|
|
758
|
-
const cs = getComputedStyle(el); const o = {};
|
|
759
|
-
for (const p of props) { const v = cs.getPropertyValue(p); if (v) o[p] = v.trim(); }
|
|
760
|
-
out[el.getAttribute(attr)] = o;
|
|
761
|
-
});
|
|
762
|
-
return out;
|
|
763
|
-
})`;
|
|
764
|
-
|
|
765
|
-
// In-page: tag below-the-fold elements that look "waiting to animate" (opacity 0 / transform offset).
|
|
766
|
-
const TAG_INVIEW = `(function () {
|
|
767
|
-
const innerH = window.innerHeight;
|
|
768
|
-
const all = Array.from(document.querySelectorAll('body *')).slice(0, 3000);
|
|
769
|
-
const out = []; let i = 0;
|
|
770
|
-
for (const el of all) {
|
|
771
|
-
if (i >= 20) break;
|
|
772
|
-
const r = el.getBoundingClientRect();
|
|
773
|
-
if (r.width < 40 || r.height < 40) continue;
|
|
774
|
-
if (r.top < innerH) continue;
|
|
775
|
-
const cs = getComputedStyle(el);
|
|
776
|
-
const hidden = parseFloat(cs.opacity) < 0.05;
|
|
777
|
-
const shifted = cs.transform && cs.transform !== 'none';
|
|
778
|
-
if (!hidden && !shifted) continue;
|
|
779
|
-
if (el.parentElement && el.parentElement.closest('[data-clone-inview]')) continue;
|
|
780
|
-
el.setAttribute('data-clone-inview', 'v' + i);
|
|
781
|
-
const cls = (el.getAttribute('class') || '').trim().split(/\\s+/).filter(Boolean)[0] || '';
|
|
782
|
-
out.push({ probe: 'v' + i, tag: el.tagName.toLowerCase(), cls, top: Math.round(r.top + window.scrollY) });
|
|
783
|
-
i++;
|
|
784
|
-
}
|
|
785
|
-
return out;
|
|
786
|
-
})`;
|
|
787
|
-
|
|
788
|
-
// In-page: observe class/style mutations for N ms with no input → time-driven candidates (carousels, cycling).
|
|
789
|
-
const OBSERVE_MUTATIONS = `(function (ms) {
|
|
790
|
-
return new Promise((resolve) => {
|
|
791
|
-
const counts = new Map();
|
|
792
|
-
const obs = new MutationObserver((muts) => {
|
|
793
|
-
for (const m of muts) {
|
|
794
|
-
const el = m.target;
|
|
795
|
-
if (!el || !el.tagName || el === document.body || el === document.documentElement) continue;
|
|
796
|
-
const tag = el.tagName.toLowerCase();
|
|
797
|
-
const cls = ((el.getAttribute && el.getAttribute('class')) || '').trim().split(/\\s+/).filter(Boolean)[0] || '';
|
|
798
|
-
const key = tag + (cls ? '.' + cls : '');
|
|
799
|
-
const e = counts.get(key) || { tag, cls, mutations: 0, kinds: new Set() };
|
|
800
|
-
e.mutations++; e.kinds.add(m.type === 'attributes' ? m.attributeName : m.type);
|
|
801
|
-
counts.set(key, e);
|
|
802
|
-
}
|
|
803
|
-
});
|
|
804
|
-
obs.observe(document.body, { subtree: true, attributes: true, attributeFilter: ['class', 'style'], childList: true });
|
|
805
|
-
setTimeout(() => {
|
|
806
|
-
obs.disconnect();
|
|
807
|
-
resolve(Array.from(counts.entries())
|
|
808
|
-
.map(([label, e]) => ({ label, tag: e.tag, cls: e.cls, mutations: e.mutations, kinds: Array.from(e.kinds) }))
|
|
809
|
-
.sort((a, b) => b.mutations - a.mutations)
|
|
810
|
-
.slice(0, 10));
|
|
811
|
-
}, ms);
|
|
812
|
-
});
|
|
813
|
-
})`;
|
|
814
|
-
|
|
815
|
-
// In-page: smooth-scroll library detection (Lenis, Locomotive). 네이티브와 체감이 확연히 달라 놓치면 바로 티가 난다.
|
|
816
|
-
const DETECT_SCROLL_LIB = `(function () {
|
|
817
|
-
const checks = [
|
|
818
|
-
['lenis', 'html.lenis, .lenis, [data-lenis]'],
|
|
819
|
-
['locomotive-scroll', '.locomotive-scroll, [data-scroll-container]'],
|
|
820
|
-
];
|
|
821
|
-
for (const [name, sel] of checks) {
|
|
822
|
-
if (document.querySelector(sel)) return { name, evidence: sel };
|
|
823
|
-
}
|
|
824
|
-
if (window.Lenis) return { name: 'lenis', evidence: 'window.Lenis' };
|
|
825
|
-
if (window.LocomotiveScroll || window.locomotive) return { name: 'locomotive-scroll', evidence: 'window.LocomotiveScroll' };
|
|
826
|
-
return null;
|
|
827
|
-
})`;
|
|
828
|
-
|
|
829
|
-
const wait = (ms) => new Promise((r) => setTimeout(r, ms));
|
|
830
|
-
|
|
831
|
-
// ── Scroll-triggered state (header/nav shrink, background, shadow on scroll) ──
|
|
832
|
-
async function sweepScrollState(page) {
|
|
833
|
-
const out = [];
|
|
834
|
-
const candidates = await page.evaluate(`(${TAG_SCROLL_CANDIDATES})()`);
|
|
835
|
-
if (!candidates.length) return out;
|
|
836
|
-
const before = await page.evaluate(`(${SNAP_PROBES})(${JSON.stringify(BEHAVIOR_PROPS)})`);
|
|
837
|
-
const innerH = await page.evaluate('window.innerHeight');
|
|
838
|
-
const triggerY = Math.min(700, Math.max(200, Math.round(innerH * 0.9)));
|
|
839
|
-
await page.evaluate(`window.scrollTo(0, ${triggerY})`);
|
|
840
|
-
await wait(500);
|
|
841
|
-
const after = await page.evaluate(`(${SNAP_PROBES})(${JSON.stringify(BEHAVIOR_PROPS)})`);
|
|
842
|
-
await page.evaluate('window.scrollTo(0, 0)');
|
|
843
|
-
await wait(300);
|
|
844
|
-
for (const c of candidates) {
|
|
845
|
-
const changed = diffStyles(before[c.probe], after[c.probe]);
|
|
846
|
-
if (Object.keys(changed).length) {
|
|
847
|
-
out.push({
|
|
848
|
-
label: c.cls ? `${c.tag}.${c.cls}` : c.tag,
|
|
849
|
-
tag: c.tag, cls: c.cls, triggerScrollY: triggerY, changed,
|
|
850
|
-
});
|
|
851
|
-
}
|
|
852
|
-
}
|
|
853
|
-
return out;
|
|
854
|
-
}
|
|
855
|
-
|
|
856
|
-
// ── Click-driven tab groups (content swap detection) ──
|
|
857
|
-
async function sweepTabGroups(page) {
|
|
858
|
-
const out = [];
|
|
859
|
-
const groups = await page.evaluate(`(${TAG_TAB_GROUPS})()`);
|
|
860
|
-
for (const grp of groups) {
|
|
861
|
-
try {
|
|
862
|
-
const beforeFp = await page.evaluate(`(${TAB_CONTENT_FP})(${grp.group})`);
|
|
863
|
-
const clicked = await page.evaluate(
|
|
864
|
-
`(function (g) { const t = document.querySelector('[data-clone-tab="' + g + '_1"]'); if (!t) return false; t.click(); return true; })(${grp.group})`
|
|
865
|
-
);
|
|
866
|
-
if (!clicked) continue;
|
|
867
|
-
await wait(450);
|
|
868
|
-
const afterFp = await page.evaluate(`(${TAB_CONTENT_FP})(${grp.group})`);
|
|
869
|
-
// restore default state
|
|
870
|
-
await page.evaluate(
|
|
871
|
-
`(function (g) { const t = document.querySelector('[data-clone-tab="' + g + '_0"]'); if (t) t.click(); })(${grp.group})`
|
|
872
|
-
);
|
|
873
|
-
await wait(200);
|
|
874
|
-
out.push({
|
|
875
|
-
kind: 'tab-group',
|
|
876
|
-
count: grp.count,
|
|
877
|
-
tabLabels: grp.labels,
|
|
878
|
-
contentSwapsOnClick: beforeFp != null && afterFp != null && beforeFp !== afterFp,
|
|
879
|
-
});
|
|
880
|
-
} catch { /* one bad group must not abort the whole sweep */ }
|
|
881
|
-
}
|
|
882
|
-
return out;
|
|
883
|
-
}
|
|
884
|
-
|
|
885
|
-
// ── Hover states set by JS (static :hover rules already land in states.json) ──
|
|
886
|
-
async function sweepHover(page) {
|
|
887
|
-
const out = [];
|
|
888
|
-
const candidates = await page.evaluate(`(${TAG_HOVER_CANDIDATES})()`);
|
|
889
|
-
for (const c of candidates) {
|
|
890
|
-
try {
|
|
891
|
-
const sel = `[data-clone-hover="${c.probe}"]`;
|
|
892
|
-
await page.evaluate(`document.querySelector('${sel}')?.scrollIntoView({ block: 'center' })`);
|
|
893
|
-
await wait(150);
|
|
894
|
-
const snap = `(${SNAP_ATTR})('data-clone-hover', ${JSON.stringify(HOVER_PROPS)})`;
|
|
895
|
-
const before = (await page.evaluate(snap))[c.probe];
|
|
896
|
-
await page.hover(sel);
|
|
897
|
-
await wait(350);
|
|
898
|
-
const after = (await page.evaluate(snap))[c.probe];
|
|
899
|
-
await page.mouse.move(0, 0);
|
|
900
|
-
await wait(150);
|
|
901
|
-
const changed = diffStyles(before, after);
|
|
902
|
-
if (Object.keys(changed).length) {
|
|
903
|
-
out.push({
|
|
904
|
-
label: c.cls ? `${c.tag}.${c.cls}` : c.tag,
|
|
905
|
-
tag: c.tag, cls: c.cls, transition: c.transition, changed,
|
|
906
|
-
});
|
|
907
|
-
}
|
|
908
|
-
} catch { /* fail-open: 요소 하나가 스윕 전체를 죽이면 안 된다 */ }
|
|
909
|
-
}
|
|
910
|
-
await page.evaluate('window.scrollTo(0, 0)');
|
|
911
|
-
await wait(200);
|
|
912
|
-
return out;
|
|
913
|
-
}
|
|
914
|
-
|
|
915
|
-
// ── In-view entrance animations (fade-up, slide-in) ──
|
|
916
|
-
// 1회성 등장 애니메이션은 lazy-load 스크롤에서 이미 발화했으므로 페이지를 새로 로드해 관찰한다.
|
|
917
|
-
async function sweepInView(page) {
|
|
918
|
-
const out = [];
|
|
919
|
-
await page.goto(page.url(), { waitUntil: 'networkidle2', timeout: 90000 });
|
|
920
|
-
await wait(800);
|
|
921
|
-
const candidates = await page.evaluate(`(${TAG_INVIEW})()`);
|
|
922
|
-
if (!candidates.length) return out;
|
|
923
|
-
const snap = `(${SNAP_ATTR})('data-clone-inview', ${JSON.stringify(INVIEW_PROPS)})`;
|
|
924
|
-
const before = await page.evaluate(snap);
|
|
925
|
-
for (const c of candidates) {
|
|
926
|
-
try {
|
|
927
|
-
await page.evaluate(`document.querySelector('[data-clone-inview="${c.probe}"]')?.scrollIntoView({ block: 'center' })`);
|
|
928
|
-
await wait(600);
|
|
929
|
-
} catch { /* fail-open */ }
|
|
930
|
-
}
|
|
931
|
-
const after = await page.evaluate(snap);
|
|
932
|
-
await page.evaluate('window.scrollTo(0, 0)');
|
|
933
|
-
await wait(300);
|
|
934
|
-
for (const c of candidates) {
|
|
935
|
-
const changed = diffStyles(before[c.probe], after[c.probe]);
|
|
936
|
-
if (Object.keys(changed).length) {
|
|
937
|
-
out.push({
|
|
938
|
-
label: c.cls ? `${c.tag}.${c.cls}` : c.tag,
|
|
939
|
-
tag: c.tag, cls: c.cls, triggerY: c.top, changed,
|
|
940
|
-
});
|
|
941
|
-
}
|
|
942
|
-
}
|
|
943
|
-
await page.evaluate('document.querySelectorAll("[data-clone-inview]").forEach((e) => e.removeAttribute("data-clone-inview"))');
|
|
944
|
-
return out;
|
|
945
|
-
}
|
|
946
|
-
|
|
947
|
-
async function runInteractionSweep(page) {
|
|
948
|
-
const behaviors = { scroll: [], interactive: [], hover: [], inview: [], timeDriven: [], scrollLib: null };
|
|
949
|
-
|
|
950
|
-
behaviors.scroll = await sweepScrollState(page);
|
|
951
|
-
behaviors.interactive = await sweepTabGroups(page);
|
|
952
|
-
behaviors.hover = await sweepHover(page);
|
|
953
|
-
// 무입력 3초 관찰 — 캐러셀/자동 사이클 후보
|
|
954
|
-
try { behaviors.timeDriven = await page.evaluate(`(${OBSERVE_MUTATIONS})(3000)`); } catch { /* fail-open */ }
|
|
955
|
-
try { behaviors.scrollLib = await page.evaluate(`(${DETECT_SCROLL_LIB})()`); } catch { /* fail-open */ }
|
|
956
|
-
|
|
957
|
-
// Clean up probe attributes BEFORE static extraction so they don't pollute output.
|
|
958
|
-
await page.evaluate(
|
|
959
|
-
'document.querySelectorAll("[data-clone-probe],[data-clone-tab],[data-clone-hover]").forEach((e) => { e.removeAttribute("data-clone-probe"); e.removeAttribute("data-clone-tab"); e.removeAttribute("data-clone-hover"); })'
|
|
960
|
-
);
|
|
961
|
-
|
|
962
|
-
// 마지막: in-view 스윕은 리로드를 동반하므로 다른 스윕 뒤에 실행한다.
|
|
963
|
-
behaviors.inview = await sweepInView(page);
|
|
964
|
-
// 리로드로 lazy-load 상태가 초기화됐으니 정적 추출 전에 복원한다.
|
|
965
|
-
await scrollToBottom(page);
|
|
966
|
-
return behaviors;
|
|
967
|
-
}
|
|
968
|
-
|
|
969
|
-
// In-page: favicon / OG image / webmanifest URLs (Foundation 단계 — public/seo/ 배선용)
|
|
970
|
-
const SEO_EXTRACT = `(function () {
|
|
971
|
-
const abs = (u) => { try { return new URL(u, location.href).href; } catch { return null; } };
|
|
972
|
-
const icons = Array.from(document.querySelectorAll(
|
|
973
|
-
'link[rel*="icon" i], link[rel="apple-touch-icon"], link[rel="manifest"]'
|
|
974
|
-
)).map((l) => abs(l.getAttribute('href'))).filter(Boolean);
|
|
975
|
-
const og = Array.from(document.querySelectorAll(
|
|
976
|
-
'meta[property="og:image"], meta[name="twitter:image"]'
|
|
977
|
-
)).map((m) => abs(m.getAttribute('content'))).filter(Boolean);
|
|
978
|
-
return Array.from(new Set(icons.concat(og)));
|
|
979
|
-
})`;
|
|
980
|
-
|
|
981
|
-
const SUB_LINK_EXTRACT = `(function () {
|
|
982
|
-
const links = Array.from(document.querySelectorAll('a[href]')).map((a) => ({
|
|
983
|
-
href: a.getAttribute('href'),
|
|
984
|
-
text: (a.innerText || a.textContent || '').replace(/\\s+/g, ' ').trim(),
|
|
985
|
-
}));
|
|
986
|
-
return { links };
|
|
987
|
-
})`;
|
|
988
|
-
|
|
989
|
-
// HTML sanitization: strip scripts/analytics before saving
|
|
990
|
-
function sanitizeHtml(html) {
|
|
991
|
-
return html
|
|
992
|
-
.replace(/<script\b[^>]*>[\s\S]*?<\/script>/gi, '')
|
|
993
|
-
.replace(/<noscript\b[^>]*>[\s\S]*?<\/noscript>/gi, '')
|
|
994
|
-
.replace(/\son[a-z]+="[^"]*"/gi, '')
|
|
995
|
-
.replace(/\son[a-z]+='[^']*'/gi, '');
|
|
996
|
-
}
|
|
997
|
-
|
|
998
|
-
async function newClonePage(browser) {
|
|
999
|
-
const page = await browser.newPage();
|
|
1000
|
-
await page.setViewport({ width: 1440, height: 900, deviceScaleFactor: 1 });
|
|
1001
|
-
await page.setUserAgent(
|
|
1002
|
-
'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 ' +
|
|
1003
|
-
'(KHTML, like Gecko) Chrome/120.0.0.0 Safari/537.36',
|
|
1004
|
-
);
|
|
1005
|
-
await page.setCacheEnabled(false);
|
|
1006
|
-
return page;
|
|
1007
|
-
}
|
|
1008
|
-
|
|
1009
|
-
async function discoverSubUrls({ url, opts }) {
|
|
1010
|
-
if (!url) throw new Error('URL is required');
|
|
1011
|
-
if (!opts.out) throw new Error('--out=<file> is required');
|
|
1012
|
-
|
|
1013
|
-
if (!opts.ignoreRobots) {
|
|
1014
|
-
const blocked = await checkRobots(url);
|
|
1015
|
-
if (blocked) {
|
|
1016
|
-
throw new Error(
|
|
1017
|
-
`robots.txt disallows ${url}. Pass --ignore-robots only with the site owner's permission.`,
|
|
1018
|
-
);
|
|
1019
|
-
}
|
|
1020
|
-
}
|
|
1021
|
-
|
|
1022
|
-
const puppeteer = await loadPuppeteer();
|
|
1023
|
-
const browser = await puppeteer.launch({
|
|
1024
|
-
headless: 'new',
|
|
1025
|
-
args: ['--no-sandbox', '--disable-setuid-sandbox', '--disable-dev-shm-usage'],
|
|
1026
|
-
});
|
|
1027
|
-
|
|
1028
|
-
try {
|
|
1029
|
-
const page = await newClonePage(browser);
|
|
1030
|
-
await page.goto(url, { waitUntil: 'networkidle2', timeout: 90000 });
|
|
1031
|
-
await wait(800);
|
|
1032
|
-
|
|
1033
|
-
let source = 'menu';
|
|
1034
|
-
let sourceUrl = url;
|
|
1035
|
-
let { links } = await page.evaluate(`(${SUB_LINK_EXTRACT})()`);
|
|
1036
|
-
const sitemapUrl = findSitemapUrl(url, links);
|
|
1037
|
-
if (sitemapUrl) {
|
|
1038
|
-
await page.goto(sitemapUrl, { waitUntil: 'networkidle2', timeout: 90000 });
|
|
1039
|
-
await wait(800);
|
|
1040
|
-
source = 'sitemap';
|
|
1041
|
-
sourceUrl = sitemapUrl;
|
|
1042
|
-
({ links } = await page.evaluate(`(${SUB_LINK_EXTRACT})()`));
|
|
1043
|
-
}
|
|
1044
|
-
|
|
1045
|
-
const urls = collectSubUrls(url, links);
|
|
1046
|
-
fs.mkdirSync(path.dirname(opts.out), { recursive: true });
|
|
1047
|
-
fs.writeFileSync(
|
|
1048
|
-
opts.out,
|
|
1049
|
-
JSON.stringify({ meta: { url, source, sourceUrl, count: urls.length }, urls }, null, 2),
|
|
1050
|
-
);
|
|
1051
|
-
process.stdout.write(`[clone-extract] suburls ${urls.length} → ${opts.out}\n`);
|
|
1052
|
-
} finally {
|
|
1053
|
-
await browser.close();
|
|
1054
|
-
}
|
|
1055
|
-
}
|
|
1056
|
-
|
|
1057
|
-
// ─── Main capture flow ──────────────────────────────────────────────
|
|
1058
|
-
async function capture({ url, opts }) {
|
|
1059
|
-
if (!url) throw new Error('URL is required');
|
|
1060
|
-
if (!opts.out) throw new Error('--out=<dir> is required');
|
|
1061
|
-
if (!opts.viewport) throw new Error('--viewport=WxH is required');
|
|
1062
|
-
|
|
1063
|
-
const viewport = parseViewport(opts.viewport);
|
|
1064
|
-
|
|
1065
|
-
if (!opts.ignoreRobots) {
|
|
1066
|
-
const blocked = await checkRobots(url);
|
|
1067
|
-
if (blocked) {
|
|
1068
|
-
throw new Error(
|
|
1069
|
-
`robots.txt disallows ${url}. Pass --ignore-robots only with the site owner's permission.`,
|
|
1070
|
-
);
|
|
1071
|
-
}
|
|
1072
|
-
}
|
|
1073
|
-
|
|
1074
|
-
fs.mkdirSync(opts.out, { recursive: true });
|
|
1075
|
-
const assetsDir = path.join(opts.out, 'assets');
|
|
1076
|
-
const imagesDir = path.join(assetsDir, 'images');
|
|
1077
|
-
const fontsDir = path.join(assetsDir, 'fonts');
|
|
1078
|
-
const seoDir = path.join(assetsDir, 'seo');
|
|
1079
|
-
fs.mkdirSync(imagesDir, { recursive: true });
|
|
1080
|
-
fs.mkdirSync(fontsDir, { recursive: true });
|
|
1081
|
-
fs.mkdirSync(seoDir, { recursive: true });
|
|
1082
|
-
|
|
1083
|
-
console.log(`[clone-extract] ${opts.bp || ''} ${viewport.width}x${viewport.height}@${viewport.deviceScaleFactor} ${url}`);
|
|
1084
|
-
|
|
1085
|
-
const puppeteer = await loadPuppeteer();
|
|
1086
|
-
const browser = await puppeteer.launch({
|
|
1087
|
-
headless: 'new',
|
|
1088
|
-
args: [
|
|
1089
|
-
'--no-sandbox',
|
|
1090
|
-
'--disable-setuid-sandbox',
|
|
1091
|
-
'--disable-dev-shm-usage',
|
|
1092
|
-
'--font-render-hinting=none',
|
|
1093
|
-
],
|
|
1094
|
-
});
|
|
1095
|
-
|
|
1096
|
-
try {
|
|
1097
|
-
const page = await newClonePage(browser);
|
|
1098
|
-
await page.setViewport(viewport);
|
|
1099
|
-
|
|
1100
|
-
await page.goto(url, { waitUntil: 'networkidle2', timeout: 90000 });
|
|
1101
|
-
await scrollToBottom(page);
|
|
1102
|
-
if (opts.wait) await new Promise((r) => setTimeout(r, opts.wait));
|
|
1103
|
-
else await new Promise((r) => setTimeout(r, 1200));
|
|
1104
|
-
|
|
1105
|
-
// Active interaction sweep (before freezing — it observes real transitions/JS state).
|
|
1106
|
-
let behaviors = null;
|
|
1107
|
-
if (opts.interact) {
|
|
1108
|
-
try {
|
|
1109
|
-
behaviors = await runInteractionSweep(page);
|
|
1110
|
-
console.log(
|
|
1111
|
-
`[clone-extract] interaction sweep: ${behaviors.scroll.length} scroll-state, ` +
|
|
1112
|
-
`${behaviors.interactive.length} tab-group(s), ${behaviors.hover.length} hover, ` +
|
|
1113
|
-
`${behaviors.inview.length} in-view, ${behaviors.timeDriven.length} time-driven` +
|
|
1114
|
-
`${behaviors.scrollLib ? `, scroll-lib: ${behaviors.scrollLib.name}` : ''}`
|
|
1115
|
-
);
|
|
1116
|
-
} catch (e) {
|
|
1117
|
-
console.log(`[clone-extract] interaction sweep skipped: ${e.message}`);
|
|
1118
|
-
}
|
|
1119
|
-
}
|
|
1120
|
-
|
|
1121
|
-
await freezeAnimations(page);
|
|
1122
|
-
|
|
1123
|
-
// PAGE_EXTRACT is a parenthesized function-expression string. page.evaluate treats a
|
|
1124
|
-
// string arg as an expression and ignores extra args, so build the call ourselves.
|
|
1125
|
-
const extracted = await page.evaluate(`(${PAGE_EXTRACT})(${JSON.stringify(CSS_PROPS)})`);
|
|
1126
|
-
|
|
1127
|
-
// Screenshot AFTER freezing animations
|
|
1128
|
-
const shotPath = path.join(opts.out, 'screenshot.png');
|
|
1129
|
-
await page.screenshot({ path: shotPath, fullPage: true });
|
|
1130
|
-
|
|
1131
|
-
// Pick best font per (family+weight+style): prefer woff2 > woff > ttf > otf
|
|
1132
|
-
const fontPriority = (fmt) => ({ woff2: 0, woff: 1, ttf: 2, otf: 3 }[fmt] ?? 9);
|
|
1133
|
-
const bestFontUrls = new Set();
|
|
1134
|
-
for (const ff of extracted.stylesheets.fontFaces) {
|
|
1135
|
-
const sorted = [...ff.sources].sort((a, b) => fontPriority(a.format) - fontPriority(b.format));
|
|
1136
|
-
if (sorted[0]) bestFontUrls.add(sorted[0].url);
|
|
1137
|
-
}
|
|
1138
|
-
// Also keep all referenced fonts (don't drop fallbacks completely — keep top 2 per face)
|
|
1139
|
-
const fontDownloadSet = new Set(bestFontUrls);
|
|
1140
|
-
for (const ff of extracted.stylesheets.fontFaces) {
|
|
1141
|
-
const sorted = [...ff.sources].sort((a, b) => fontPriority(a.format) - fontPriority(b.format));
|
|
1142
|
-
if (sorted[1]) fontDownloadSet.add(sorted[1].url);
|
|
1143
|
-
}
|
|
1144
|
-
|
|
1145
|
-
// Favicon / OG / webmanifest — Foundation 단계에서 public/seo/ 로 배선한다
|
|
1146
|
-
let seoUrls = [];
|
|
1147
|
-
try { seoUrls = await page.evaluate(`(${SEO_EXTRACT})()`); } catch { /* fail-open */ }
|
|
1148
|
-
|
|
1149
|
-
console.log(`[clone-extract] downloading ${extracted.assets.images.length} images, ${fontDownloadSet.size} fonts (filtered from ${extracted.assets.fonts.length}), ${seoUrls.length} seo assets`);
|
|
1150
|
-
const imageMap = await downloadAssets(extracted.assets.images, imagesDir, 8);
|
|
1151
|
-
const fontMap = await downloadAssets(Array.from(fontDownloadSet), fontsDir, 4);
|
|
1152
|
-
const seoMap = await downloadAssets(seoUrls, seoDir, 4);
|
|
1153
|
-
|
|
1154
|
-
const assetMap = {};
|
|
1155
|
-
for (const [u, info] of Object.entries(imageMap)) {
|
|
1156
|
-
assetMap[u] = info.status === 'ok'
|
|
1157
|
-
? { local: `assets/images/${info.local}`, status: 'ok', bytes: info.bytes, kind: 'image' }
|
|
1158
|
-
: { ...info, kind: 'image' };
|
|
1159
|
-
}
|
|
1160
|
-
for (const [u, info] of Object.entries(fontMap)) {
|
|
1161
|
-
assetMap[u] = info.status === 'ok'
|
|
1162
|
-
? { local: `assets/fonts/${info.local}`, status: 'ok', bytes: info.bytes, kind: 'font' }
|
|
1163
|
-
: { ...info, kind: 'font' };
|
|
1164
|
-
}
|
|
1165
|
-
for (const [u, info] of Object.entries(seoMap)) {
|
|
1166
|
-
assetMap[u] = info.status === 'ok'
|
|
1167
|
-
? { local: `assets/seo/${info.local}`, status: 'ok', bytes: info.bytes, kind: 'seo' }
|
|
1168
|
-
: { ...info, kind: 'seo' };
|
|
1169
|
-
}
|
|
1170
|
-
|
|
1171
|
-
// Rewrite HTML — replace remote URLs with local paths
|
|
1172
|
-
let html = sanitizeHtml(extracted.html);
|
|
1173
|
-
const sortedUrls = Object.keys(assetMap).sort((a, b) => b.length - a.length);
|
|
1174
|
-
for (const u of sortedUrls) {
|
|
1175
|
-
const info = assetMap[u];
|
|
1176
|
-
if (info.status !== 'ok') continue;
|
|
1177
|
-
const escaped = u.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
1178
|
-
html = html.replace(new RegExp(escaped, 'g'), info.local);
|
|
1179
|
-
}
|
|
1180
|
-
|
|
1181
|
-
// Rewrite computed CSS values (background-image, mask-image) per node
|
|
1182
|
-
const rewriteCssValue = (val) => {
|
|
1183
|
-
if (!val || typeof val !== 'string') return val;
|
|
1184
|
-
let out = val;
|
|
1185
|
-
for (const u of sortedUrls) {
|
|
1186
|
-
const info = assetMap[u];
|
|
1187
|
-
if (info.status !== 'ok') continue;
|
|
1188
|
-
if (out.includes(u)) out = out.split(u).join(info.local);
|
|
1189
|
-
}
|
|
1190
|
-
return out;
|
|
1191
|
-
};
|
|
1192
|
-
for (const node of extracted.nodes) {
|
|
1193
|
-
if (!node.css) continue;
|
|
1194
|
-
for (const prop of ['background-image', 'mask-image', 'content', 'border-image']) {
|
|
1195
|
-
if (node.css[prop]) node.css[prop] = rewriteCssValue(node.css[prop]);
|
|
1196
|
-
}
|
|
1197
|
-
}
|
|
1198
|
-
|
|
1199
|
-
// Rewrite @font-face srcs in stylesheets.fontFaces
|
|
1200
|
-
for (const ff of extracted.stylesheets.fontFaces) {
|
|
1201
|
-
ff.sources = ff.sources.map((s) => {
|
|
1202
|
-
const info = assetMap[s.url];
|
|
1203
|
-
return info && info.status === 'ok'
|
|
1204
|
-
? { ...s, url: info.local, original: s.url }
|
|
1205
|
-
: s;
|
|
1206
|
-
});
|
|
1207
|
-
}
|
|
1208
|
-
|
|
1209
|
-
// Rewrite remote asset URLs inside harvested state rules (e.g. :hover background-image)
|
|
1210
|
-
for (const sr of extracted.stateRules) {
|
|
1211
|
-
if (!sr.css) continue;
|
|
1212
|
-
for (const prop of ['background-image', 'mask-image', 'border-image']) {
|
|
1213
|
-
if (sr.css[prop]) sr.css[prop] = rewriteCssValue(sr.css[prop]);
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
|
|
1217
|
-
// Write outputs
|
|
1218
|
-
fs.writeFileSync(path.join(opts.out, 'rendered.html'), html);
|
|
1219
|
-
fs.writeFileSync(
|
|
1220
|
-
path.join(opts.out, 'computed.json'),
|
|
1221
|
-
JSON.stringify({
|
|
1222
|
-
meta: {
|
|
1223
|
-
url,
|
|
1224
|
-
viewport,
|
|
1225
|
-
bp: opts.bp || null,
|
|
1226
|
-
title: extracted.title,
|
|
1227
|
-
docSize: extracted.docSize,
|
|
1228
|
-
capturedAt: new Date().toISOString(),
|
|
1229
|
-
},
|
|
1230
|
-
nodes: extracted.nodes,
|
|
1231
|
-
}),
|
|
1232
|
-
);
|
|
1233
|
-
fs.writeFileSync(
|
|
1234
|
-
path.join(opts.out, 'stylesheets.json'),
|
|
1235
|
-
JSON.stringify(extracted.stylesheets, null, 2),
|
|
1236
|
-
);
|
|
1237
|
-
fs.writeFileSync(
|
|
1238
|
-
path.join(opts.out, 'states.json'),
|
|
1239
|
-
JSON.stringify({
|
|
1240
|
-
meta: { url, bp: opts.bp || null, capturedAt: new Date().toISOString() },
|
|
1241
|
-
stateRules: extracted.stateRules,
|
|
1242
|
-
}, null, 2),
|
|
1243
|
-
);
|
|
1244
|
-
fs.writeFileSync(path.join(opts.out, 'asset-map.json'), JSON.stringify(assetMap, null, 2));
|
|
1245
|
-
if (behaviors) {
|
|
1246
|
-
// Rewrite any remote asset URLs captured in behavior diffs (scroll/hover/inview).
|
|
1247
|
-
const diffed = [...behaviors.scroll, ...(behaviors.hover || []), ...(behaviors.inview || [])];
|
|
1248
|
-
for (const s of diffed) {
|
|
1249
|
-
for (const ch of Object.values(s.changed)) {
|
|
1250
|
-
if (typeof ch.from === 'string') ch.from = rewriteCssValue(ch.from);
|
|
1251
|
-
if (typeof ch.to === 'string') ch.to = rewriteCssValue(ch.to);
|
|
1252
|
-
}
|
|
1253
|
-
}
|
|
1254
|
-
fs.writeFileSync(
|
|
1255
|
-
path.join(opts.out, 'behaviors.json'),
|
|
1256
|
-
JSON.stringify({
|
|
1257
|
-
meta: { url, bp: opts.bp || null, capturedAt: new Date().toISOString() },
|
|
1258
|
-
...behaviors,
|
|
1259
|
-
}, null, 2),
|
|
1260
|
-
);
|
|
1261
|
-
}
|
|
1262
|
-
|
|
1263
|
-
const okCount = Object.values(assetMap).filter((a) => a.status === 'ok').length;
|
|
1264
|
-
console.log(`[clone-extract] done → ${opts.out}`);
|
|
1265
|
-
console.log(` nodes: ${extracted.nodes.length}, fontFaces: ${extracted.stylesheets.fontFaces.length}, stateRules: ${extracted.stateRules.length}`);
|
|
1266
|
-
console.log(` assets: ${okCount}/${Object.keys(assetMap).length} downloaded`);
|
|
1267
|
-
} finally {
|
|
1268
|
-
await browser.close();
|
|
1269
|
-
}
|
|
1270
|
-
}
|
|
1271
|
-
|
|
1272
|
-
// ─── Entry ──────────────────────────────────────────────────────────
|
|
1273
|
-
const isMain = process.argv[1] && process.argv[1].replace(/\\/g, '/').endsWith('clone-extract.js');
|
|
1274
|
-
if (isMain) {
|
|
1275
|
-
const { cmd, url, opts } = parseArgs(process.argv);
|
|
1276
|
-
|
|
1277
|
-
if (cmd !== 'capture' && cmd !== 'suburls') {
|
|
1278
|
-
console.error('Usage: node clone-extract.js capture <URL> --out=<dir> --viewport=WxH[@DPR] --bp=mo|pc [--stealth] [--ignore-robots] [--no-interact] [--wait=ms]');
|
|
1279
|
-
console.error(' node clone-extract.js suburls <URL> --out=<file> [--ignore-robots]');
|
|
1280
|
-
process.exit(1);
|
|
1281
|
-
}
|
|
1282
|
-
|
|
1283
|
-
const run = cmd === 'suburls' ? discoverSubUrls : capture;
|
|
1284
|
-
run({ url, opts }).catch((err) => {
|
|
1285
|
-
console.error(`[clone-extract] FAIL: ${err.message}`);
|
|
1286
|
-
if (process.env.DEBUG) console.error(err.stack);
|
|
1287
|
-
process.exit(1);
|
|
1288
|
-
});
|
|
1289
|
-
}
|
|
1290
|
-
|
|
1291
|
-
// 순수 함수만 노출한다 — 브라우저 기동 없이 단독 검증 가능한 경로
|
|
1292
|
-
// (REQ-audit-p2-remediation-009). capture/discoverSubUrls 등 puppeteer 의존
|
|
1293
|
-
// 경로는 여기서 다루지 않는다.
|
|
1294
|
-
export {
|
|
1295
|
-
collectSubUrls,
|
|
1296
|
-
diffStyles,
|
|
1297
|
-
parseArgs,
|
|
1298
|
-
parseViewport,
|
|
1299
|
-
localePrefixOf,
|
|
1300
|
-
normalizeSubUrl,
|
|
1301
|
-
isSameMenuScope,
|
|
1302
|
-
isExcludedSubLink,
|
|
1303
|
-
findSitemapUrl,
|
|
1304
|
-
uniqueFilename,
|
|
1305
|
-
sanitizeHtml,
|
|
1306
|
-
};
|