@vibecodetown/mcp-server 1.3.1
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/CONTRIBUTING.md +294 -0
- package/README.md +146 -0
- package/bin/clinic_linux_x64/clinic +0 -0
- package/bin/clinic_win_x64/clinic.exe +0 -0
- package/bin/musu-linux-x64 +0 -0
- package/bin/spec-high_linux_x64/spec-high +0 -0
- package/bin/spec-high_win_x64/spec-high.exe +0 -0
- package/bin/vibecoding-helper_linux_x64/vibecoding-helper +0 -0
- package/bin/vibecoding-helper_win_x64/vibecoding-helper.exe +0 -0
- package/bin/vpm-back_linux_x64/vpm-back +0 -0
- package/bin/vpm-back_win_x64/vpm-back.exe +0 -0
- package/build/background-sync-worker.d.ts +55 -0
- package/build/background-sync-worker.js +172 -0
- package/build/bin/vibe-auth.d.ts +12 -0
- package/build/bin/vibe-auth.js +246 -0
- package/build/bin/vibe-bitnet-worker.d.ts +21 -0
- package/build/bin/vibe-bitnet-worker.js +123 -0
- package/build/bin/vibe-ci.d.ts +15 -0
- package/build/bin/vibe-ci.js +1558 -0
- package/build/bin/vibe-dashboard.d.ts +12 -0
- package/build/bin/vibe-dashboard.js +76 -0
- package/build/bin/vibe-mapper-worker.d.ts +15 -0
- package/build/bin/vibe-mapper-worker.js +92 -0
- package/build/bitnet-worker/autostart.d.ts +39 -0
- package/build/bitnet-worker/autostart.js +110 -0
- package/build/bitnet-worker/client.d.ts +177 -0
- package/build/bitnet-worker/client.js +393 -0
- package/build/bitnet-worker/cpu_brake.d.ts +106 -0
- package/build/bitnet-worker/cpu_brake.js +177 -0
- package/build/bitnet-worker/embed_client.d.ts +31 -0
- package/build/bitnet-worker/embed_client.js +109 -0
- package/build/bitnet-worker/hw_slots.d.ts +90 -0
- package/build/bitnet-worker/hw_slots.js +167 -0
- package/build/bitnet-worker/index.d.ts +24 -0
- package/build/bitnet-worker/index.js +27 -0
- package/build/bitnet-worker/metrics.d.ts +78 -0
- package/build/bitnet-worker/metrics.js +129 -0
- package/build/bitnet-worker/native_inference.d.ts +86 -0
- package/build/bitnet-worker/native_inference.js +256 -0
- package/build/bitnet-worker/pool-autostart.d.ts +41 -0
- package/build/bitnet-worker/pool-autostart.js +124 -0
- package/build/bitnet-worker/request_cache.d.ts +41 -0
- package/build/bitnet-worker/request_cache.js +101 -0
- package/build/bitnet-worker/serial_queue.d.ts +13 -0
- package/build/bitnet-worker/serial_queue.js +22 -0
- package/build/bitnet-worker/server-autostart.d.ts +48 -0
- package/build/bitnet-worker/server-autostart.js +129 -0
- package/build/bitnet-worker/server.d.ts +76 -0
- package/build/bitnet-worker/server.js +545 -0
- package/build/bitnet-worker/server_manager.d.ts +133 -0
- package/build/bitnet-worker/server_manager.js +359 -0
- package/build/bitnet-worker/tiered_queue.d.ts +126 -0
- package/build/bitnet-worker/tiered_queue.js +187 -0
- package/build/bitnet-worker/types.d.ts +196 -0
- package/build/bitnet-worker/types.js +146 -0
- package/build/config/load-config.d.ts +40 -0
- package/build/config/load-config.js +227 -0
- package/build/coordinator/client.d.ts +99 -0
- package/build/coordinator/client.js +158 -0
- package/build/coordinator/index.d.ts +27 -0
- package/build/coordinator/index.js +31 -0
- package/build/correction-messages.d.ts +66 -0
- package/build/correction-messages.js +245 -0
- package/build/dashboard/autostart.d.ts +45 -0
- package/build/dashboard/autostart.js +121 -0
- package/build/dashboard/index.d.ts +21 -0
- package/build/dashboard/index.js +23 -0
- package/build/dashboard/server.d.ts +43 -0
- package/build/dashboard/server.js +334 -0
- package/build/db_sync/config.d.ts +76 -0
- package/build/db_sync/config.js +153 -0
- package/build/db_sync/index.d.ts +86 -0
- package/build/db_sync/index.js +294 -0
- package/build/db_sync/parsers/bitnet.d.ts +20 -0
- package/build/db_sync/parsers/bitnet.js +61 -0
- package/build/db_sync/parsers/gate.d.ts +23 -0
- package/build/db_sync/parsers/gate.js +73 -0
- package/build/db_sync/parsers/index.d.ts +10 -0
- package/build/db_sync/parsers/index.js +10 -0
- package/build/db_sync/parsers/ingress.d.ts +22 -0
- package/build/db_sync/parsers/ingress.js +57 -0
- package/build/db_sync/parsers/mapping.d.ts +22 -0
- package/build/db_sync/parsers/mapping.js +57 -0
- package/build/db_sync/parsers/orchestrator.d.ts +66 -0
- package/build/db_sync/parsers/orchestrator.js +110 -0
- package/build/db_sync/pool.d.ts +120 -0
- package/build/db_sync/pool.js +225 -0
- package/build/db_sync/publish.d.ts +125 -0
- package/build/db_sync/publish.js +197 -0
- package/build/db_sync/read_model.d.ts +54 -0
- package/build/db_sync/read_model.js +254 -0
- package/build/db_sync/scanner.d.ts +97 -0
- package/build/db_sync/scanner.js +287 -0
- package/build/db_sync/types.d.ts +254 -0
- package/build/db_sync/types.js +76 -0
- package/build/db_sync/writer.d.ts +111 -0
- package/build/db_sync/writer.js +377 -0
- package/build/decision-log-reader.d.ts +38 -0
- package/build/decision-log-reader.js +116 -0
- package/build/deep-link.d.ts +97 -0
- package/build/deep-link.js +176 -0
- package/build/deps/deps-update.d.ts +36 -0
- package/build/deps/deps-update.js +324 -0
- package/build/deps/drift-check.d.ts +35 -0
- package/build/deps/drift-check.js +247 -0
- package/build/deps/env-check.d.ts +43 -0
- package/build/deps/env-check.js +310 -0
- package/build/deps/index.d.ts +16 -0
- package/build/deps/index.js +22 -0
- package/build/deps/pm-detect.d.ts +56 -0
- package/build/deps/pm-detect.js +213 -0
- package/build/deps/types.d.ts +84 -0
- package/build/deps/types.js +4 -0
- package/build/deps/ux-renderer.d.ts +102 -0
- package/build/deps/ux-renderer.js +410 -0
- package/build/evidence-report.d.ts +152 -0
- package/build/evidence-report.js +648 -0
- package/build/health/index.d.ts +30 -0
- package/build/health/index.js +31 -0
- package/build/health/liveness.d.ts +32 -0
- package/build/health/liveness.js +49 -0
- package/build/health/readiness.d.ts +60 -0
- package/build/health/readiness.js +136 -0
- package/build/health/types.d.ts +75 -0
- package/build/health/types.js +31 -0
- package/build/index.d.ts +41 -0
- package/build/index.js +131 -0
- package/build/license-manager.d.ts +85 -0
- package/build/license-manager.js +349 -0
- package/build/mapper-worker/client.d.ts +92 -0
- package/build/mapper-worker/client.js +360 -0
- package/build/mapper-worker/index.d.ts +29 -0
- package/build/mapper-worker/index.js +33 -0
- package/build/mapper-worker/pool.d.ts +24 -0
- package/build/mapper-worker/pool.js +301 -0
- package/build/mapper-worker/server.d.ts +49 -0
- package/build/mapper-worker/server.js +324 -0
- package/build/mapper-worker/types.d.ts +215 -0
- package/build/mapper-worker/types.js +106 -0
- package/build/mcp/a2a/observer/hooks.d.ts +102 -0
- package/build/mcp/a2a/observer/hooks.js +207 -0
- package/build/mcp/a2a/observer/logger.d.ts +66 -0
- package/build/mcp/a2a/observer/logger.js +300 -0
- package/build/mcp/a2a/observer/types.d.ts +92 -0
- package/build/mcp/a2a/observer/types.js +11 -0
- package/build/mcp/a2a/orchestrator/loop.d.ts +84 -0
- package/build/mcp/a2a/orchestrator/loop.js +151 -0
- package/build/mcp/a2a/orchestrator/ralph-audit.d.ts +66 -0
- package/build/mcp/a2a/orchestrator/ralph-audit.js +113 -0
- package/build/mcp/a2a/orchestrator/ralph-runner.d.ts +120 -0
- package/build/mcp/a2a/orchestrator/ralph-runner.js +365 -0
- package/build/mcp/a2a/orchestrator/rewind-actions.d.ts +38 -0
- package/build/mcp/a2a/orchestrator/rewind-actions.js +148 -0
- package/build/mcp/a2a/types.d.ts +82 -0
- package/build/mcp/a2a/types.js +4 -0
- package/build/mcp/airlock/airlock.d.ts +2 -0
- package/build/mcp/airlock/airlock.js +34 -0
- package/build/mcp/airlock/index.d.ts +5 -0
- package/build/mcp/airlock/index.js +5 -0
- package/build/mcp/airlock/policy.d.ts +14 -0
- package/build/mcp/airlock/policy.js +31 -0
- package/build/mcp/airlock/redact.d.ts +11 -0
- package/build/mcp/airlock/redact.js +69 -0
- package/build/mcp/airlock/report.d.ts +14 -0
- package/build/mcp/airlock/report.js +53 -0
- package/build/mcp/airlock/types.d.ts +66 -0
- package/build/mcp/airlock/types.js +1 -0
- package/build/mcp/auth/gate.d.ts +51 -0
- package/build/mcp/auth/gate.js +225 -0
- package/build/mcp/auth/index.d.ts +32 -0
- package/build/mcp/auth/index.js +55 -0
- package/build/mcp/auth/public_key.d.ts +31 -0
- package/build/mcp/auth/public_key.js +34 -0
- package/build/mcp/auth/token_cache.d.ts +49 -0
- package/build/mcp/auth/token_cache.js +122 -0
- package/build/mcp/auth/token_verifier.d.ts +57 -0
- package/build/mcp/auth/token_verifier.js +117 -0
- package/build/mcp/bootstrap/doctor.d.ts +75 -0
- package/build/mcp/bootstrap/doctor.js +223 -0
- package/build/mcp/bootstrap/installer.d.ts +73 -0
- package/build/mcp/bootstrap/installer.js +993 -0
- package/build/mcp/bootstrap/lock.d.ts +5 -0
- package/build/mcp/bootstrap/lock.js +37 -0
- package/build/mcp/bootstrap/platform.d.ts +9 -0
- package/build/mcp/bootstrap/platform.js +26 -0
- package/build/mcp/bootstrap/registry.d.ts +46 -0
- package/build/mcp/bootstrap/registry.js +49 -0
- package/build/mcp/bootstrap/skills-installer.d.ts +154 -0
- package/build/mcp/bootstrap/skills-installer.js +610 -0
- package/build/mcp/cache/index.d.ts +77 -0
- package/build/mcp/cache/index.js +147 -0
- package/build/mcp/chunking/artifacts.d.ts +9 -0
- package/build/mcp/chunking/artifacts.js +41 -0
- package/build/mcp/chunking/chunking.d.ts +10 -0
- package/build/mcp/chunking/chunking.js +193 -0
- package/build/mcp/chunking/index.d.ts +4 -0
- package/build/mcp/chunking/index.js +4 -0
- package/build/mcp/chunking/policy.d.ts +27 -0
- package/build/mcp/chunking/policy.js +71 -0
- package/build/mcp/chunking/types.d.ts +66 -0
- package/build/mcp/chunking/types.js +1 -0
- package/build/mcp/cli.d.ts +57 -0
- package/build/mcp/cli.js +182 -0
- package/build/mcp/cockpit-bridge/client.d.ts +84 -0
- package/build/mcp/cockpit-bridge/client.js +78 -0
- package/build/mcp/cockpit-bridge/index.d.ts +16 -0
- package/build/mcp/cockpit-bridge/index.js +20 -0
- package/build/mcp/cockpit-bridge/tools/command.d.ts +101 -0
- package/build/mcp/cockpit-bridge/tools/command.js +185 -0
- package/build/mcp/cockpit-bridge/tools/decide.d.ts +27 -0
- package/build/mcp/cockpit-bridge/tools/decide.js +62 -0
- package/build/mcp/cockpit-bridge/tools/index.d.ts +17 -0
- package/build/mcp/cockpit-bridge/tools/index.js +28 -0
- package/build/mcp/cockpit-bridge/tools/manual.d.ts +26 -0
- package/build/mcp/cockpit-bridge/tools/manual.js +56 -0
- package/build/mcp/cockpit-bridge/tools/prompt.d.ts +19 -0
- package/build/mcp/cockpit-bridge/tools/prompt.js +57 -0
- package/build/mcp/cockpit-bridge/tools/status.d.ts +19 -0
- package/build/mcp/cockpit-bridge/tools/status.js +50 -0
- package/build/mcp/contracts.d.ts +609 -0
- package/build/mcp/contracts.js +22 -0
- package/build/mcp/engine.d.ts +86 -0
- package/build/mcp/engine.js +273 -0
- package/build/mcp/errors.d.ts +118 -0
- package/build/mcp/errors.js +278 -0
- package/build/mcp/events/constants.d.ts +31 -0
- package/build/mcp/events/constants.js +44 -0
- package/build/mcp/events/dedup_cooldown.d.ts +19 -0
- package/build/mcp/events/dedup_cooldown.js +51 -0
- package/build/mcp/events/emitter.d.ts +12 -0
- package/build/mcp/events/emitter.js +27 -0
- package/build/mcp/events/event_loop.d.ts +13 -0
- package/build/mcp/events/event_loop.js +248 -0
- package/build/mcp/events/file_watcher.d.ts +8 -0
- package/build/mcp/events/file_watcher.js +24 -0
- package/build/mcp/events/index.d.ts +11 -0
- package/build/mcp/events/index.js +11 -0
- package/build/mcp/events/logger.d.ts +8 -0
- package/build/mcp/events/logger.js +38 -0
- package/build/mcp/events/mq.d.ts +10 -0
- package/build/mcp/events/mq.js +22 -0
- package/build/mcp/events/mq_nats.d.ts +5 -0
- package/build/mcp/events/mq_nats.js +20 -0
- package/build/mcp/events/mq_redis.d.ts +5 -0
- package/build/mcp/events/mq_redis.js +20 -0
- package/build/mcp/events/nav_refresh.d.ts +14 -0
- package/build/mcp/events/nav_refresh.js +64 -0
- package/build/mcp/events/processor.d.ts +19 -0
- package/build/mcp/events/processor.js +76 -0
- package/build/mcp/events/replay.d.ts +6 -0
- package/build/mcp/events/replay.js +27 -0
- package/build/mcp/events/types.d.ts +32 -0
- package/build/mcp/events/types.js +18 -0
- package/build/mcp/generated/activate_input.d.ts +15 -0
- package/build/mcp/generated/activate_input.js +2 -0
- package/build/mcp/generated/activate_output.d.ts +36 -0
- package/build/mcp/generated/activate_output.js +57 -0
- package/build/mcp/generated/advisory_review_input.d.ts +42 -0
- package/build/mcp/generated/advisory_review_input.js +2 -0
- package/build/mcp/generated/advisory_review_output.d.ts +3 -0
- package/build/mcp/generated/advisory_review_output.js +35 -0
- package/build/mcp/generated/auth_token_file.d.ts +79 -0
- package/build/mcp/generated/auth_token_file.js +2 -0
- package/build/mcp/generated/autopilot_policy.d.ts +133 -0
- package/build/mcp/generated/autopilot_policy.js +77 -0
- package/build/mcp/generated/bitnet_signal.d.ts +146 -0
- package/build/mcp/generated/bitnet_signal.js +71 -0
- package/build/mcp/generated/bridge_build_seed_input.d.ts +65 -0
- package/build/mcp/generated/bridge_build_seed_input.js +2 -0
- package/build/mcp/generated/bridge_build_seed_output.d.ts +36 -0
- package/build/mcp/generated/bridge_build_seed_output.js +2 -0
- package/build/mcp/generated/bridge_confirm_reference_input.d.ts +30 -0
- package/build/mcp/generated/bridge_confirm_reference_input.js +2 -0
- package/build/mcp/generated/bridge_confirm_reference_output.d.ts +59 -0
- package/build/mcp/generated/bridge_confirm_reference_output.js +2 -0
- package/build/mcp/generated/bridge_confirmed_reference_file.d.ts +74 -0
- package/build/mcp/generated/bridge_confirmed_reference_file.js +2 -0
- package/build/mcp/generated/bridge_generate_references_input.d.ts +66 -0
- package/build/mcp/generated/bridge_generate_references_input.js +2 -0
- package/build/mcp/generated/bridge_generate_references_output.d.ts +62 -0
- package/build/mcp/generated/bridge_generate_references_output.js +2 -0
- package/build/mcp/generated/bridge_references_file.d.ts +141 -0
- package/build/mcp/generated/bridge_references_file.js +2 -0
- package/build/mcp/generated/bridge_work_order_seed_file.d.ts +120 -0
- package/build/mcp/generated/bridge_work_order_seed_file.js +2 -0
- package/build/mcp/generated/briefing_input.d.ts +15 -0
- package/build/mcp/generated/briefing_input.js +2 -0
- package/build/mcp/generated/briefing_output.d.ts +58 -0
- package/build/mcp/generated/briefing_output.js +2 -0
- package/build/mcp/generated/clinic_bridge_file.d.ts +3 -0
- package/build/mcp/generated/clinic_bridge_file.js +13 -0
- package/build/mcp/generated/contracts_bundle_info.d.ts +3 -0
- package/build/mcp/generated/contracts_bundle_info.js +5 -0
- package/build/mcp/generated/create_work_order_input.d.ts +12 -0
- package/build/mcp/generated/create_work_order_input.js +2 -0
- package/build/mcp/generated/create_work_order_output.d.ts +214 -0
- package/build/mcp/generated/create_work_order_output.js +2 -0
- package/build/mcp/generated/current_work_order_file.d.ts +39 -0
- package/build/mcp/generated/current_work_order_file.js +2 -0
- package/build/mcp/generated/deps_drift_report.d.ts +167 -0
- package/build/mcp/generated/deps_drift_report.js +33 -0
- package/build/mcp/generated/deps_scan.d.ts +207 -0
- package/build/mcp/generated/deps_scan.js +38 -0
- package/build/mcp/generated/doctor_input.d.ts +9 -0
- package/build/mcp/generated/doctor_input.js +2 -0
- package/build/mcp/generated/doctor_output.d.ts +217 -0
- package/build/mcp/generated/doctor_output.js +24 -0
- package/build/mcp/generated/execution_result.d.ts +116 -0
- package/build/mcp/generated/execution_result.js +2 -0
- package/build/mcp/generated/execution_task.d.ts +136 -0
- package/build/mcp/generated/execution_task.js +2 -0
- package/build/mcp/generated/export_output_input.d.ts +42 -0
- package/build/mcp/generated/export_output_input.js +2 -0
- package/build/mcp/generated/export_output_output.d.ts +71 -0
- package/build/mcp/generated/export_output_output.js +2 -0
- package/build/mcp/generated/finalize_work_input.d.ts +68 -0
- package/build/mcp/generated/finalize_work_input.js +2 -0
- package/build/mcp/generated/finalize_work_output.d.ts +42 -0
- package/build/mcp/generated/finalize_work_output.js +2 -0
- package/build/mcp/generated/gate_input.d.ts +158 -0
- package/build/mcp/generated/gate_input.js +2 -0
- package/build/mcp/generated/gate_output.d.ts +131 -0
- package/build/mcp/generated/gate_output.js +2 -0
- package/build/mcp/generated/gate_result_v1.d.ts +131 -0
- package/build/mcp/generated/gate_result_v1.js +2 -0
- package/build/mcp/generated/get_decision_input.d.ts +15 -0
- package/build/mcp/generated/get_decision_input.js +6 -0
- package/build/mcp/generated/get_decision_output.d.ts +68 -0
- package/build/mcp/generated/get_decision_output.js +13 -0
- package/build/mcp/generated/get_semantic_complexity_input.d.ts +21 -0
- package/build/mcp/generated/get_semantic_complexity_input.js +2 -0
- package/build/mcp/generated/get_semantic_complexity_output.d.ts +161 -0
- package/build/mcp/generated/get_semantic_complexity_output.js +2 -0
- package/build/mcp/generated/handoff_to_clinic.d.ts +15 -0
- package/build/mcp/generated/handoff_to_clinic.js +2 -0
- package/build/mcp/generated/index.d.ts +106 -0
- package/build/mcp/generated/index.js +108 -0
- package/build/mcp/generated/ingress_input.d.ts +30 -0
- package/build/mcp/generated/ingress_input.js +11 -0
- package/build/mcp/generated/ingress_output.d.ts +136 -0
- package/build/mcp/generated/ingress_output.js +2 -0
- package/build/mcp/generated/ingress_resolution_file.d.ts +33 -0
- package/build/mcp/generated/ingress_resolution_file.js +2 -0
- package/build/mcp/generated/ingress_summary_file.d.ts +130 -0
- package/build/mcp/generated/ingress_summary_file.js +2 -0
- package/build/mcp/generated/inspect_code_input.d.ts +47 -0
- package/build/mcp/generated/inspect_code_input.js +2 -0
- package/build/mcp/generated/inspect_code_output.d.ts +164 -0
- package/build/mcp/generated/inspect_code_output.js +13 -0
- package/build/mcp/generated/memory_retrieve_input.d.ts +21 -0
- package/build/mcp/generated/memory_retrieve_input.js +2 -0
- package/build/mcp/generated/memory_retrieve_output.d.ts +18 -0
- package/build/mcp/generated/memory_retrieve_output.js +2 -0
- package/build/mcp/generated/memory_state_file.d.ts +46 -0
- package/build/mcp/generated/memory_state_file.js +2 -0
- package/build/mcp/generated/memory_status_input.d.ts +15 -0
- package/build/mcp/generated/memory_status_input.js +2 -0
- package/build/mcp/generated/memory_status_output.d.ts +79 -0
- package/build/mcp/generated/memory_status_output.js +13 -0
- package/build/mcp/generated/memory_sync_input.d.ts +18 -0
- package/build/mcp/generated/memory_sync_input.js +2 -0
- package/build/mcp/generated/memory_sync_output.d.ts +66 -0
- package/build/mcp/generated/memory_sync_output.js +13 -0
- package/build/mcp/generated/message_template_id_mapping_file.d.ts +132 -0
- package/build/mcp/generated/message_template_id_mapping_file.js +2 -0
- package/build/mcp/generated/observer_event_map.d.ts +198 -0
- package/build/mcp/generated/observer_event_map.js +74 -0
- package/build/mcp/generated/ose_expand_input.d.ts +48 -0
- package/build/mcp/generated/ose_expand_input.js +2 -0
- package/build/mcp/generated/ose_expand_output.d.ts +45 -0
- package/build/mcp/generated/ose_expand_output.js +2 -0
- package/build/mcp/generated/oss_candidates_file.d.ts +132 -0
- package/build/mcp/generated/oss_candidates_file.js +2 -0
- package/build/mcp/generated/oss_decisions_file.d.ts +125 -0
- package/build/mcp/generated/oss_decisions_file.js +2 -0
- package/build/mcp/generated/oss_snippets_file.d.ts +117 -0
- package/build/mcp/generated/oss_snippets_file.js +2 -0
- package/build/mcp/generated/plugin_result.d.ts +43 -0
- package/build/mcp/generated/plugin_result.js +2 -0
- package/build/mcp/generated/react_perf_check_patterns_input.d.ts +15 -0
- package/build/mcp/generated/react_perf_check_patterns_input.js +2 -0
- package/build/mcp/generated/react_perf_check_patterns_output.d.ts +102 -0
- package/build/mcp/generated/react_perf_check_patterns_output.js +2 -0
- package/build/mcp/generated/react_perf_generate_report_input.d.ts +18 -0
- package/build/mcp/generated/react_perf_generate_report_input.js +2 -0
- package/build/mcp/generated/react_perf_generate_report_output.d.ts +76 -0
- package/build/mcp/generated/react_perf_generate_report_output.js +2 -0
- package/build/mcp/generated/read_file_input.d.ts +21 -0
- package/build/mcp/generated/read_file_input.js +2 -0
- package/build/mcp/generated/read_file_output.d.ts +119 -0
- package/build/mcp/generated/read_file_output.js +2 -0
- package/build/mcp/generated/repair_analysis_engine_input.d.ts +21 -0
- package/build/mcp/generated/repair_analysis_engine_input.js +2 -0
- package/build/mcp/generated/repair_analysis_engine_output.d.ts +45 -0
- package/build/mcp/generated/repair_analysis_engine_output.js +2 -0
- package/build/mcp/generated/repair_plan_input.d.ts +12 -0
- package/build/mcp/generated/repair_plan_input.js +2 -0
- package/build/mcp/generated/repair_plan_output.d.ts +48 -0
- package/build/mcp/generated/repair_plan_output.js +2 -0
- package/build/mcp/generated/run_app_input.d.ts +50 -0
- package/build/mcp/generated/run_app_input.js +2 -0
- package/build/mcp/generated/run_app_output.d.ts +27 -0
- package/build/mcp/generated/run_app_output.js +2 -0
- package/build/mcp/generated/run_state_file.d.ts +3 -0
- package/build/mcp/generated/run_state_file.js +13 -0
- package/build/mcp/generated/scaffold_input.d.ts +15 -0
- package/build/mcp/generated/scaffold_input.js +2 -0
- package/build/mcp/generated/scaffold_output.d.ts +39 -0
- package/build/mcp/generated/scaffold_output.js +2 -0
- package/build/mcp/generated/search_oss_input.d.ts +59 -0
- package/build/mcp/generated/search_oss_input.js +2 -0
- package/build/mcp/generated/search_oss_output.d.ts +88 -0
- package/build/mcp/generated/search_oss_output.js +2 -0
- package/build/mcp/generated/selection_validation_result.d.ts +358 -0
- package/build/mcp/generated/selection_validation_result.js +2 -0
- package/build/mcp/generated/signal_agent_input.d.ts +101 -0
- package/build/mcp/generated/signal_agent_input.js +2 -0
- package/build/mcp/generated/skillpack_file.d.ts +825 -0
- package/build/mcp/generated/skillpack_file.js +102 -0
- package/build/mcp/generated/skills_input.d.ts +30 -0
- package/build/mcp/generated/skills_input.js +11 -0
- package/build/mcp/generated/skills_output.d.ts +349 -0
- package/build/mcp/generated/skills_output.js +52 -0
- package/build/mcp/generated/spec_expansion_file.d.ts +282 -0
- package/build/mcp/generated/spec_expansion_file.js +2 -0
- package/build/mcp/generated/spec_high_ask_queue_items_file.d.ts +247 -0
- package/build/mcp/generated/spec_high_ask_queue_items_file.js +2 -0
- package/build/mcp/generated/spec_high_clinic_bridge_output.d.ts +15 -0
- package/build/mcp/generated/spec_high_clinic_bridge_output.js +2 -0
- package/build/mcp/generated/spec_high_decision_draft_output.d.ts +40 -0
- package/build/mcp/generated/spec_high_decision_draft_output.js +2 -0
- package/build/mcp/generated/spec_high_validate_output.d.ts +24 -0
- package/build/mcp/generated/spec_high_validate_output.js +2 -0
- package/build/mcp/generated/status_input.d.ts +12 -0
- package/build/mcp/generated/status_input.js +5 -0
- package/build/mcp/generated/status_output.d.ts +919 -0
- package/build/mcp/generated/status_output.js +188 -0
- package/build/mcp/generated/submit_decision_input.d.ts +18 -0
- package/build/mcp/generated/submit_decision_input.js +2 -0
- package/build/mcp/generated/submit_decision_output.d.ts +53 -0
- package/build/mcp/generated/submit_decision_output.js +2 -0
- package/build/mcp/generated/tool_error_output.d.ts +80 -0
- package/build/mcp/generated/tool_error_output.js +26 -0
- package/build/mcp/generated/undo_last_task_input.d.ts +12 -0
- package/build/mcp/generated/undo_last_task_input.js +2 -0
- package/build/mcp/generated/undo_last_task_output.d.ts +38 -0
- package/build/mcp/generated/undo_last_task_output.js +2 -0
- package/build/mcp/generated/update_input.d.ts +18 -0
- package/build/mcp/generated/update_input.js +2 -0
- package/build/mcp/generated/update_output.d.ts +124 -0
- package/build/mcp/generated/update_output.js +2 -0
- package/build/mcp/generated/verification_steps.d.ts +249 -0
- package/build/mcp/generated/verification_steps.js +34 -0
- package/build/mcp/generated/vibe_pm_inspection_result.d.ts +68 -0
- package/build/mcp/generated/vibe_pm_inspection_result.js +2 -0
- package/build/mcp/generated/vibe_pm_report_markdown.d.ts +15 -0
- package/build/mcp/generated/vibe_pm_report_markdown.js +2 -0
- package/build/mcp/generated/vibe_pm_verdict.d.ts +15 -0
- package/build/mcp/generated/vibe_pm_verdict.js +2 -0
- package/build/mcp/generated/vibe_repo_config.d.ts +214 -0
- package/build/mcp/generated/vibe_repo_config.js +2 -0
- package/build/mcp/generated/vibecoding_helper_answer_output.d.ts +18 -0
- package/build/mcp/generated/vibecoding_helper_answer_output.js +2 -0
- package/build/mcp/generated/vibecoding_helper_one_loop_selection_output.d.ts +115 -0
- package/build/mcp/generated/vibecoding_helper_one_loop_selection_output.js +2 -0
- package/build/mcp/generated/vibecoding_helper_show_ask_queue_output.d.ts +230 -0
- package/build/mcp/generated/vibecoding_helper_show_ask_queue_output.js +2 -0
- package/build/mcp/generated/work_order_v1.d.ts +89 -0
- package/build/mcp/generated/work_order_v1.js +2 -0
- package/build/mcp/generated/zoekt_evidence_input.d.ts +27 -0
- package/build/mcp/generated/zoekt_evidence_input.js +2 -0
- package/build/mcp/generated/zoekt_evidence_output.d.ts +70 -0
- package/build/mcp/generated/zoekt_evidence_output.js +2 -0
- package/build/mcp/index.d.ts +2 -0
- package/build/mcp/index.js +187 -0
- package/build/mcp/legacy_alias.d.ts +29 -0
- package/build/mcp/legacy_alias.js +53 -0
- package/build/mcp/metrics/collector.d.ts +23 -0
- package/build/mcp/metrics/collector.js +270 -0
- package/build/mcp/metrics/index.d.ts +8 -0
- package/build/mcp/metrics/index.js +6 -0
- package/build/mcp/metrics/server.d.ts +39 -0
- package/build/mcp/metrics/server.js +129 -0
- package/build/mcp/metrics/types.d.ts +105 -0
- package/build/mcp/metrics/types.js +46 -0
- package/build/mcp/path-utils.d.ts +34 -0
- package/build/mcp/path-utils.js +68 -0
- package/build/mcp/paths.d.ts +29 -0
- package/build/mcp/paths.js +90 -0
- package/build/mcp/policy/index.d.ts +2 -0
- package/build/mcp/policy/index.js +2 -0
- package/build/mcp/policy/loader.d.ts +18 -0
- package/build/mcp/policy/loader.js +46 -0
- package/build/mcp/policy/schema.d.ts +558 -0
- package/build/mcp/policy/schema.js +87 -0
- package/build/mcp/preprocess.d.ts +16 -0
- package/build/mcp/preprocess.js +64 -0
- package/build/mcp/profile-config.d.ts +87 -0
- package/build/mcp/profile-config.js +211 -0
- package/build/mcp/router/artifacts.d.ts +15 -0
- package/build/mcp/router/artifacts.js +30 -0
- package/build/mcp/router/decide.d.ts +2 -0
- package/build/mcp/router/decide.js +51 -0
- package/build/mcp/router/index.d.ts +4 -0
- package/build/mcp/router/index.js +4 -0
- package/build/mcp/router/rules.d.ts +14 -0
- package/build/mcp/router/rules.js +32 -0
- package/build/mcp/router/types.d.ts +32 -0
- package/build/mcp/router/types.js +1 -0
- package/build/mcp/run-retention.d.ts +15 -0
- package/build/mcp/run-retention.js +87 -0
- package/build/mcp/runtime/helper_commands.d.ts +205 -0
- package/build/mcp/runtime/helper_commands.js +198 -0
- package/build/mcp/runtime/helper_invoker.d.ts +48 -0
- package/build/mcp/runtime/helper_invoker.js +134 -0
- package/build/mcp/runtime/helper_resolver.d.ts +41 -0
- package/build/mcp/runtime/helper_resolver.js +148 -0
- package/build/mcp/runtime/index.d.ts +3 -0
- package/build/mcp/runtime/index.js +8 -0
- package/build/mcp/runtime/musu_adapter.d.ts +193 -0
- package/build/mcp/runtime/musu_adapter.js +373 -0
- package/build/mcp/security/input-validator.d.ts +76 -0
- package/build/mcp/security/input-validator.js +119 -0
- package/build/mcp/security/path-policy.d.ts +102 -0
- package/build/mcp/security/path-policy.js +289 -0
- package/build/mcp/security/sandbox.d.ts +55 -0
- package/build/mcp/security/sandbox.js +378 -0
- package/build/mcp/tool-registry.d.ts +26 -0
- package/build/mcp/tool-registry.js +136 -0
- package/build/mcp/tools/bitnet/index.d.ts +494 -0
- package/build/mcp/tools/bitnet/index.js +748 -0
- package/build/mcp/tools/vibe_pm/ask-queue/index.d.ts +9 -0
- package/build/mcp/tools/vibe_pm/ask-queue/index.js +10 -0
- package/build/mcp/tools/vibe_pm/ask-queue/loader.d.ts +29 -0
- package/build/mcp/tools/vibe_pm/ask-queue/loader.js +137 -0
- package/build/mcp/tools/vibe_pm/ask-queue/transformer.d.ts +18 -0
- package/build/mcp/tools/vibe_pm/ask-queue/transformer.js +58 -0
- package/build/mcp/tools/vibe_pm/ask-queue/types.d.ts +75 -0
- package/build/mcp/tools/vibe_pm/ask-queue/types.js +16 -0
- package/build/mcp/tools/vibe_pm/auto-init.d.ts +41 -0
- package/build/mcp/tools/vibe_pm/auto-init.js +133 -0
- package/build/mcp/tools/vibe_pm/autopilot.d.ts +74 -0
- package/build/mcp/tools/vibe_pm/autopilot.js +334 -0
- package/build/mcp/tools/vibe_pm/bitnet-cache.d.ts +124 -0
- package/build/mcp/tools/vibe_pm/bitnet-cache.js +327 -0
- package/build/mcp/tools/vibe_pm/bitnet-ensure.d.ts +58 -0
- package/build/mcp/tools/vibe_pm/bitnet-ensure.js +204 -0
- package/build/mcp/tools/vibe_pm/bitnet-hook-consumer.d.ts +87 -0
- package/build/mcp/tools/vibe_pm/bitnet-hook-consumer.js +323 -0
- package/build/mcp/tools/vibe_pm/bitnet-runner.d.ts +44 -0
- package/build/mcp/tools/vibe_pm/bitnet-runner.js +144 -0
- package/build/mcp/tools/vibe_pm/briefing.d.ts +15 -0
- package/build/mcp/tools/vibe_pm/briefing.js +165 -0
- package/build/mcp/tools/vibe_pm/context.d.ts +113 -0
- package/build/mcp/tools/vibe_pm/context.js +579 -0
- package/build/mcp/tools/vibe_pm/create_work_order.d.ts +15 -0
- package/build/mcp/tools/vibe_pm/create_work_order.js +252 -0
- package/build/mcp/tools/vibe_pm/dashboard.d.ts +64 -0
- package/build/mcp/tools/vibe_pm/dashboard.js +175 -0
- package/build/mcp/tools/vibe_pm/decision-log.d.ts +24 -0
- package/build/mcp/tools/vibe_pm/decision-log.js +38 -0
- package/build/mcp/tools/vibe_pm/diagrams/animator.d.ts +27 -0
- package/build/mcp/tools/vibe_pm/diagrams/animator.js +122 -0
- package/build/mcp/tools/vibe_pm/diagrams/constants.d.ts +71 -0
- package/build/mcp/tools/vibe_pm/diagrams/constants.js +158 -0
- package/build/mcp/tools/vibe_pm/diagrams/gate_engine.d.ts +67 -0
- package/build/mcp/tools/vibe_pm/diagrams/gate_engine.js +695 -0
- package/build/mcp/tools/vibe_pm/diagrams/generator.d.ts +8 -0
- package/build/mcp/tools/vibe_pm/diagrams/generator.js +214 -0
- package/build/mcp/tools/vibe_pm/diagrams/index.d.ts +8 -0
- package/build/mcp/tools/vibe_pm/diagrams/index.js +9 -0
- package/build/mcp/tools/vibe_pm/diagrams/manifest.d.ts +37 -0
- package/build/mcp/tools/vibe_pm/diagrams/manifest.js +151 -0
- package/build/mcp/tools/vibe_pm/diagrams/mermaid_generator.d.ts +70 -0
- package/build/mcp/tools/vibe_pm/diagrams/mermaid_generator.js +214 -0
- package/build/mcp/tools/vibe_pm/diagrams/renderer.d.ts +29 -0
- package/build/mcp/tools/vibe_pm/diagrams/renderer.js +207 -0
- package/build/mcp/tools/vibe_pm/diagrams/types.d.ts +66 -0
- package/build/mcp/tools/vibe_pm/diagrams/types.js +16 -0
- package/build/mcp/tools/vibe_pm/dirty-scan.d.ts +59 -0
- package/build/mcp/tools/vibe_pm/dirty-scan.js +242 -0
- package/build/mcp/tools/vibe_pm/docs_structure.d.ts +17 -0
- package/build/mcp/tools/vibe_pm/docs_structure.js +148 -0
- package/build/mcp/tools/vibe_pm/doctor.d.ts +65 -0
- package/build/mcp/tools/vibe_pm/doctor.js +244 -0
- package/build/mcp/tools/vibe_pm/engine-errors/index.d.ts +9 -0
- package/build/mcp/tools/vibe_pm/engine-errors/index.js +10 -0
- package/build/mcp/tools/vibe_pm/engine-errors/normalizer.d.ts +35 -0
- package/build/mcp/tools/vibe_pm/engine-errors/normalizer.js +122 -0
- package/build/mcp/tools/vibe_pm/engine-errors/patterns.d.ts +26 -0
- package/build/mcp/tools/vibe_pm/engine-errors/patterns.js +111 -0
- package/build/mcp/tools/vibe_pm/engine-errors/types.d.ts +51 -0
- package/build/mcp/tools/vibe_pm/engine-errors/types.js +47 -0
- package/build/mcp/tools/vibe_pm/facts/collector.d.ts +35 -0
- package/build/mcp/tools/vibe_pm/facts/collector.js +285 -0
- package/build/mcp/tools/vibe_pm/facts/index.d.ts +8 -0
- package/build/mcp/tools/vibe_pm/facts/index.js +8 -0
- package/build/mcp/tools/vibe_pm/facts/types.d.ts +94 -0
- package/build/mcp/tools/vibe_pm/facts/types.js +44 -0
- package/build/mcp/tools/vibe_pm/failure/classifier.d.ts +37 -0
- package/build/mcp/tools/vibe_pm/failure/classifier.js +134 -0
- package/build/mcp/tools/vibe_pm/failure/index.d.ts +11 -0
- package/build/mcp/tools/vibe_pm/failure/index.js +11 -0
- package/build/mcp/tools/vibe_pm/failure/loop_diagnose.d.ts +33 -0
- package/build/mcp/tools/vibe_pm/failure/loop_diagnose.js +232 -0
- package/build/mcp/tools/vibe_pm/failure/tracker.d.ts +66 -0
- package/build/mcp/tools/vibe_pm/failure/tracker.js +113 -0
- package/build/mcp/tools/vibe_pm/failure/types.d.ts +98 -0
- package/build/mcp/tools/vibe_pm/failure/types.js +17 -0
- package/build/mcp/tools/vibe_pm/feature-flags.d.ts +105 -0
- package/build/mcp/tools/vibe_pm/feature-flags.js +156 -0
- package/build/mcp/tools/vibe_pm/flow_policy.d.ts +66 -0
- package/build/mcp/tools/vibe_pm/flow_policy.js +253 -0
- package/build/mcp/tools/vibe_pm/get_decision.d.ts +9 -0
- package/build/mcp/tools/vibe_pm/get_decision.js +122 -0
- package/build/mcp/tools/vibe_pm/get_result.d.ts +43 -0
- package/build/mcp/tools/vibe_pm/get_result.js +82 -0
- package/build/mcp/tools/vibe_pm/index.d.ts +499 -0
- package/build/mcp/tools/vibe_pm/index.js +837 -0
- package/build/mcp/tools/vibe_pm/ingress.d.ts +29 -0
- package/build/mcp/tools/vibe_pm/ingress.js +435 -0
- package/build/mcp/tools/vibe_pm/init_docs.d.ts +21 -0
- package/build/mcp/tools/vibe_pm/init_docs.js +38 -0
- package/build/mcp/tools/vibe_pm/inspect_code.d.ts +10 -0
- package/build/mcp/tools/vibe_pm/inspect_code.js +729 -0
- package/build/mcp/tools/vibe_pm/mapping/change_map.d.ts +12 -0
- package/build/mcp/tools/vibe_pm/mapping/change_map.js +154 -0
- package/build/mcp/tools/vibe_pm/mapping/diff_scan.d.ts +31 -0
- package/build/mcp/tools/vibe_pm/mapping/diff_scan.js +156 -0
- package/build/mcp/tools/vibe_pm/mapping/gate_judge.d.ts +18 -0
- package/build/mcp/tools/vibe_pm/mapping/gate_judge.js +101 -0
- package/build/mcp/tools/vibe_pm/mapping/import_scan.d.ts +9 -0
- package/build/mcp/tools/vibe_pm/mapping/import_scan.js +56 -0
- package/build/mcp/tools/vibe_pm/mapping/index.d.ts +8 -0
- package/build/mcp/tools/vibe_pm/mapping/index.js +10 -0
- package/build/mcp/tools/vibe_pm/mapping/orchestrator.d.ts +41 -0
- package/build/mcp/tools/vibe_pm/mapping/orchestrator.js +200 -0
- package/build/mcp/tools/vibe_pm/mapping/skeleton_patch.d.ts +15 -0
- package/build/mcp/tools/vibe_pm/mapping/skeleton_patch.js +59 -0
- package/build/mcp/tools/vibe_pm/mapping/spec_map.d.ts +19 -0
- package/build/mcp/tools/vibe_pm/mapping/spec_map.js +43 -0
- package/build/mcp/tools/vibe_pm/mapping/types.d.ts +126 -0
- package/build/mcp/tools/vibe_pm/mapping/types.js +2 -0
- package/build/mcp/tools/vibe_pm/memory.d.ts +53 -0
- package/build/mcp/tools/vibe_pm/memory.js +92 -0
- package/build/mcp/tools/vibe_pm/memory_backend.d.ts +50 -0
- package/build/mcp/tools/vibe_pm/memory_backend.js +187 -0
- package/build/mcp/tools/vibe_pm/memory_docs_root.d.ts +15 -0
- package/build/mcp/tools/vibe_pm/memory_docs_root.js +39 -0
- package/build/mcp/tools/vibe_pm/memory_index.d.ts +36 -0
- package/build/mcp/tools/vibe_pm/memory_index.js +302 -0
- package/build/mcp/tools/vibe_pm/memory_index_embeddings.d.ts +138 -0
- package/build/mcp/tools/vibe_pm/memory_index_embeddings.js +481 -0
- package/build/mcp/tools/vibe_pm/memory_index_hashvec.d.ts +53 -0
- package/build/mcp/tools/vibe_pm/memory_index_hashvec.js +251 -0
- package/build/mcp/tools/vibe_pm/memory_rerank.d.ts +92 -0
- package/build/mcp/tools/vibe_pm/memory_rerank.js +164 -0
- package/build/mcp/tools/vibe_pm/memory_retrieve.d.ts +22 -0
- package/build/mcp/tools/vibe_pm/memory_retrieve.js +247 -0
- package/build/mcp/tools/vibe_pm/memory_status.d.ts +6 -0
- package/build/mcp/tools/vibe_pm/memory_status.js +101 -0
- package/build/mcp/tools/vibe_pm/memory_sync.d.ts +6 -0
- package/build/mcp/tools/vibe_pm/memory_sync.js +226 -0
- package/build/mcp/tools/vibe_pm/modules/fix_dependencies.d.ts +18 -0
- package/build/mcp/tools/vibe_pm/modules/fix_dependencies.js +223 -0
- package/build/mcp/tools/vibe_pm/modules/fix_imports.d.ts +43 -0
- package/build/mcp/tools/vibe_pm/modules/fix_imports.js +317 -0
- package/build/mcp/tools/vibe_pm/modules/fix_lint.d.ts +34 -0
- package/build/mcp/tools/vibe_pm/modules/fix_lint.js +267 -0
- package/build/mcp/tools/vibe_pm/modules/one_loop.d.ts +40 -0
- package/build/mcp/tools/vibe_pm/modules/one_loop.js +181 -0
- package/build/mcp/tools/vibe_pm/navigation/index.d.ts +10 -0
- package/build/mcp/tools/vibe_pm/navigation/index.js +9 -0
- package/build/mcp/tools/vibe_pm/navigation/resolver.d.ts +61 -0
- package/build/mcp/tools/vibe_pm/navigation/resolver.js +148 -0
- package/build/mcp/tools/vibe_pm/navigation/rules.d.ts +27 -0
- package/build/mcp/tools/vibe_pm/navigation/rules.js +258 -0
- package/build/mcp/tools/vibe_pm/navigation/types.d.ts +92 -0
- package/build/mcp/tools/vibe_pm/navigation/types.js +29 -0
- package/build/mcp/tools/vibe_pm/observer.d.ts +153 -0
- package/build/mcp/tools/vibe_pm/observer.js +402 -0
- package/build/mcp/tools/vibe_pm/phase.d.ts +69 -0
- package/build/mcp/tools/vibe_pm/phase.js +252 -0
- package/build/mcp/tools/vibe_pm/pm_language.d.ts +97 -0
- package/build/mcp/tools/vibe_pm/pm_language.js +355 -0
- package/build/mcp/tools/vibe_pm/policy/config.d.ts +30 -0
- package/build/mcp/tools/vibe_pm/policy/config.js +50 -0
- package/build/mcp/tools/vibe_pm/policy/index.d.ts +13 -0
- package/build/mcp/tools/vibe_pm/policy/index.js +12 -0
- package/build/mcp/tools/vibe_pm/policy/recommender.d.ts +49 -0
- package/build/mcp/tools/vibe_pm/policy/recommender.js +119 -0
- package/build/mcp/tools/vibe_pm/policy/types.d.ts +75 -0
- package/build/mcp/tools/vibe_pm/policy/types.js +32 -0
- package/build/mcp/tools/vibe_pm/ralph-loop-tools.d.ts +66 -0
- package/build/mcp/tools/vibe_pm/ralph-loop-tools.js +101 -0
- package/build/mcp/tools/vibe_pm/scaffold.d.ts +57 -0
- package/build/mcp/tools/vibe_pm/scaffold.js +403 -0
- package/build/mcp/tools/vibe_pm/schema-adapter.d.ts +44 -0
- package/build/mcp/tools/vibe_pm/schema-adapter.js +165 -0
- package/build/mcp/tools/vibe_pm/scorecard/index.d.ts +3 -0
- package/build/mcp/tools/vibe_pm/scorecard/index.js +3 -0
- package/build/mcp/tools/vibe_pm/scorecard/types.d.ts +66 -0
- package/build/mcp/tools/vibe_pm/scorecard/types.js +27 -0
- package/build/mcp/tools/vibe_pm/scorecard/writer.d.ts +33 -0
- package/build/mcp/tools/vibe_pm/scorecard/writer.js +134 -0
- package/build/mcp/tools/vibe_pm/setup.d.ts +52 -0
- package/build/mcp/tools/vibe_pm/setup.js +411 -0
- package/build/mcp/tools/vibe_pm/signals/index.d.ts +4 -0
- package/build/mcp/tools/vibe_pm/signals/index.js +4 -0
- package/build/mcp/tools/vibe_pm/signals/logger.d.ts +36 -0
- package/build/mcp/tools/vibe_pm/signals/logger.js +115 -0
- package/build/mcp/tools/vibe_pm/signals/rotation.d.ts +43 -0
- package/build/mcp/tools/vibe_pm/signals/rotation.js +128 -0
- package/build/mcp/tools/vibe_pm/signals/types.d.ts +46 -0
- package/build/mcp/tools/vibe_pm/signals/types.js +39 -0
- package/build/mcp/tools/vibe_pm/state-guesser.d.ts +50 -0
- package/build/mcp/tools/vibe_pm/state-guesser.js +322 -0
- package/build/mcp/tools/vibe_pm/state-schema.d.ts +133 -0
- package/build/mcp/tools/vibe_pm/state-schema.js +57 -0
- package/build/mcp/tools/vibe_pm/state-store.d.ts +8 -0
- package/build/mcp/tools/vibe_pm/state-store.js +97 -0
- package/build/mcp/tools/vibe_pm/status.d.ts +9 -0
- package/build/mcp/tools/vibe_pm/status.js +704 -0
- package/build/mcp/tools/vibe_pm/submit_decision.d.ts +9 -0
- package/build/mcp/tools/vibe_pm/submit_decision.js +154 -0
- package/build/mcp/tools/vibe_pm/submit_task.d.ts +107 -0
- package/build/mcp/tools/vibe_pm/submit_task.js +85 -0
- package/build/mcp/tools/vibe_pm/types.d.ts +4649 -0
- package/build/mcp/tools/vibe_pm/types.js +377 -0
- package/build/mcp/tools/vibe_pm/ui/index.d.ts +29 -0
- package/build/mcp/tools/vibe_pm/ui/index.js +17 -0
- package/build/mcp/tools/vibe_pm/ui/manifest.d.ts +14 -0
- package/build/mcp/tools/vibe_pm/ui/manifest.js +94 -0
- package/build/mcp/tools/vibe_pm/ui/types.d.ts +61 -0
- package/build/mcp/tools/vibe_pm/ui/types.js +3 -0
- package/build/mcp/tools/vibe_pm/ui/viewer_bundle.d.ts +6 -0
- package/build/mcp/tools/vibe_pm/ui/viewer_bundle.js +351 -0
- package/build/mcp/tools/vibe_pm/ux_fsm.d.ts +48 -0
- package/build/mcp/tools/vibe_pm/ux_fsm.js +127 -0
- package/build/mcp/tools/vibe_pm/verdict/index.d.ts +8 -0
- package/build/mcp/tools/vibe_pm/verdict/index.js +8 -0
- package/build/mcp/tools/vibe_pm/verdict/types.d.ts +69 -0
- package/build/mcp/tools/vibe_pm/verdict/types.js +50 -0
- package/build/mcp/tools/vibe_pm/verdict/writer.d.ts +42 -0
- package/build/mcp/tools/vibe_pm/verdict/writer.js +136 -0
- package/build/mcp/tools/vibe_pm/watcher.d.ts +91 -0
- package/build/mcp/tools/vibe_pm/watcher.js +235 -0
- package/build/mcp/tools/vibe_pm/worker_status.d.ts +43 -0
- package/build/mcp/tools/vibe_pm/worker_status.js +89 -0
- package/build/mcp/tools.d.ts +1 -0
- package/build/mcp/tools.js +11 -0
- package/build/mcp/transport/cli.d.ts +27 -0
- package/build/mcp/transport/cli.js +71 -0
- package/build/mcp/transport/handlers.d.ts +24 -0
- package/build/mcp/transport/handlers.js +118 -0
- package/build/mcp/transport/http.d.ts +28 -0
- package/build/mcp/transport/http.js +115 -0
- package/build/mcp/transport/index.d.ts +17 -0
- package/build/mcp/transport/index.js +18 -0
- package/build/mcp/transport/types.d.ts +81 -0
- package/build/mcp/transport/types.js +8 -0
- package/build/mcp/workspace-root.d.ts +49 -0
- package/build/mcp/workspace-root.js +165 -0
- package/build/offline-queue.d.ts +67 -0
- package/build/offline-queue.js +233 -0
- package/build/pool-manager/adapter.d.ts +118 -0
- package/build/pool-manager/adapter.js +99 -0
- package/build/pool-manager/bitnet-adapter.d.ts +74 -0
- package/build/pool-manager/bitnet-adapter.js +208 -0
- package/build/pool-manager/index.d.ts +16 -0
- package/build/pool-manager/index.js +14 -0
- package/build/pool-manager/mapper-adapter.d.ts +74 -0
- package/build/pool-manager/mapper-adapter.js +194 -0
- package/build/pool-manager/resource-monitor.d.ts +112 -0
- package/build/pool-manager/resource-monitor.js +213 -0
- package/build/pool-manager/types.d.ts +286 -0
- package/build/pool-manager/types.js +137 -0
- package/build/pool-manager/unified-pool.d.ts +168 -0
- package/build/pool-manager/unified-pool.js +561 -0
- package/build/profile-config.d.ts +115 -0
- package/build/profile-config.js +202 -0
- package/build/report-generator.d.ts +201 -0
- package/build/report-generator.js +763 -0
- package/build/review-history.d.ts +61 -0
- package/build/review-history.js +228 -0
- package/build/reviewer-ux-types.d.ts +85 -0
- package/build/reviewer-ux-types.js +21 -0
- package/build/skeleton-types.d.ts +89 -0
- package/build/skeleton-types.js +9 -0
- package/build/skill-loader.d.ts +177 -0
- package/build/skill-loader.js +407 -0
- package/build/spec-map.d.ts +32 -0
- package/build/spec-map.js +100 -0
- package/build/startup/index.d.ts +26 -0
- package/build/startup/index.js +26 -0
- package/build/startup/manager.d.ts +67 -0
- package/build/startup/manager.js +219 -0
- package/build/sync-manager.d.ts +58 -0
- package/build/sync-manager.js +113 -0
- package/build/sync-packet-builder.d.ts +215 -0
- package/build/sync-packet-builder.js +303 -0
- package/build/tier/ant_lane.d.ts +99 -0
- package/build/tier/ant_lane.js +308 -0
- package/build/tier/checkpoint.d.ts +61 -0
- package/build/tier/checkpoint.js +255 -0
- package/build/tier/checkpoint_types.d.ts +95 -0
- package/build/tier/checkpoint_types.js +8 -0
- package/build/tier/cooldown_store.d.ts +46 -0
- package/build/tier/cooldown_store.js +137 -0
- package/build/tier/feature_gate.d.ts +192 -0
- package/build/tier/feature_gate.js +416 -0
- package/build/tier/index.d.ts +45 -0
- package/build/tier/index.js +63 -0
- package/build/tier/policy_analysis.d.ts +130 -0
- package/build/tier/policy_analysis.js +465 -0
- package/build/tier/scorecard.d.ts +142 -0
- package/build/tier/scorecard.js +496 -0
- package/build/tier/scout_runner.d.ts +28 -0
- package/build/tier/scout_runner.js +203 -0
- package/build/tier/trigger_evaluator.d.ts +42 -0
- package/build/tier/trigger_evaluator.js +229 -0
- package/build/tier/trigger_facts_collector.d.ts +20 -0
- package/build/tier/trigger_facts_collector.js +294 -0
- package/build/tier/trigger_types.d.ts +87 -0
- package/build/tier/trigger_types.js +21 -0
- package/build/workers/base/autoscaler.d.ts +96 -0
- package/build/workers/base/autoscaler.js +165 -0
- package/build/workers/base/dashboard.d.ts +131 -0
- package/build/workers/base/dashboard.js +311 -0
- package/build/workers/base/health.d.ts +79 -0
- package/build/workers/base/health.js +240 -0
- package/build/workers/base/index.d.ts +13 -0
- package/build/workers/base/index.js +13 -0
- package/build/workers/base/metrics.d.ts +88 -0
- package/build/workers/base/metrics.js +183 -0
- package/build/workers/base/pool.d.ts +100 -0
- package/build/workers/base/pool.js +279 -0
- package/build/workers/base/queue.d.ts +48 -0
- package/build/workers/base/queue.js +163 -0
- package/build/workers/base/types.d.ts +131 -0
- package/build/workers/base/types.js +6 -0
- package/build/workers/base/worker.d.ts +64 -0
- package/build/workers/base/worker.js +198 -0
- package/build/workers/browser/index.d.ts +102 -0
- package/build/workers/browser/index.js +222 -0
- package/build/workers/build/index.d.ts +77 -0
- package/build/workers/build/index.js +167 -0
- package/build/workers/fs/index.d.ts +84 -0
- package/build/workers/fs/index.js +290 -0
- package/build/workers/index.d.ts +31 -0
- package/build/workers/index.js +60 -0
- package/build/workers/manager.d.ts +228 -0
- package/build/workers/manager.js +562 -0
- package/build/workers/model/index.d.ts +119 -0
- package/build/workers/model/index.js +239 -0
- package/build/workers/search/index.d.ts +93 -0
- package/build/workers/search/index.js +260 -0
- package/package.json +129 -0
- package/schemas/autopilot_policy.v1.schema.json +90 -0
- package/schemas/banned_question_rules.v1.schema.json +186 -0
- package/schemas/bitnet_signal.v1.schema.json +112 -0
- package/schemas/catalog_tree.v1.schema.json +172 -0
- package/schemas/choice_card.v1.schema.json +104 -0
- package/schemas/ci_summary.v1.schema.json +275 -0
- package/schemas/clinic_result.v1.2.schema.json +202 -0
- package/schemas/encrypted_packet.v1.schema.json +18 -0
- package/schemas/handoff_packet.v1.schema.json +192 -0
- package/schemas/observer_event_map.v1.schema.json +89 -0
- package/schemas/result.v1.schema.json +130 -0
- package/schemas/skeleton_map_summary.v1.schema.json +128 -0
- package/schemas/spec_gate_result.v1.schema.json +41 -0
- package/schemas/spec_map.v1.schema.json +40 -0
- package/schemas/sync_packet.v1.schema.json +103 -0
- package/schemas/task.v1.schema.json +227 -0
- package/schemas/vibe_tool_status.schema.json +182 -0
- package/scripts/build-artifacts.mjs +124 -0
- package/scripts/build-musu.sh +132 -0
- package/scripts/check-musu.mjs +78 -0
- package/scripts/check-pr-scope.mjs +121 -0
- package/scripts/clean-build.mjs +20 -0
- package/scripts/e2e-k8s-test.sh +202 -0
- package/scripts/ensure-exec.mjs +80 -0
- package/scripts/validate-doc-links.mjs +321 -0
- package/skills/skillpack.json +383 -0
- package/skills/skillpack.schema.json +212 -0
- package/templates/docs-structure/README.md +41 -0
- package/templates/docs-structure/active/.gitkeep +0 -0
- package/templates/docs-structure/archived/legacy/.gitkeep +0 -0
- package/templates/docs-structure/archived/topics/.gitkeep +0 -0
- package/templates/docs-structure/reference/contracts/.gitkeep +0 -0
- package/templates/docs-structure/reference/product-spec/.gitkeep +0 -0
- package/templates/docs-structure/reference/ssot/.gitkeep +0 -0
- package/templates/github-actions/vibe-ci.yml +27 -0
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* db_sync/read_model.ts
|
|
3
|
+
*
|
|
4
|
+
* PostgreSQL Secondary Truth Layer - Read Model Builder
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* ssot 데이터에서 rm (Read Model) 테이블을 빌드합니다.
|
|
8
|
+
* rm.* 테이블은 언제든 ssot.*에서 재생성 가능합니다.
|
|
9
|
+
*
|
|
10
|
+
* @see docs/DEV_SPEC/active/postgresql-secondary-truth/CONTRACT.md
|
|
11
|
+
*/
|
|
12
|
+
import { isVerdict } from "./types.js";
|
|
13
|
+
import { upsertRunCard, upsertArtifact } from "./writer.js";
|
|
14
|
+
import { parseAllEvidence, extractRiskScore, extractChangedFiles, extractChangedLines, extractTopRisks, } from "./parsers/index.js";
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// Run Card Builder
|
|
17
|
+
// =============================================================================
|
|
18
|
+
/**
|
|
19
|
+
* rm.run_card 빌드 (DB 쿼리 기반)
|
|
20
|
+
*
|
|
21
|
+
* @param client DB client
|
|
22
|
+
* @param key run 키
|
|
23
|
+
*
|
|
24
|
+
* @description
|
|
25
|
+
* ssot 테이블에서 데이터를 집계하여 run_card를 빌드합니다.
|
|
26
|
+
* 이 함수는 DB에 데이터가 이미 있을 때 사용합니다.
|
|
27
|
+
*/
|
|
28
|
+
export async function buildRunCardFromDb(client, key) {
|
|
29
|
+
// ssot.run에서 기본 정보 조회
|
|
30
|
+
const runResult = await client.query(`SELECT created_at FROM ssot.run
|
|
31
|
+
WHERE rail = $1 AND workspace_id = $2 AND run_id = $3`, [key.rail, key.workspace_id, key.run_id]);
|
|
32
|
+
if (runResult.rows.length === 0) {
|
|
33
|
+
throw new Error(`[db_sync] Run not found: ${key.rail}/${key.workspace_id}/${key.run_id}`);
|
|
34
|
+
}
|
|
35
|
+
const createdAt = runResult.rows[0].created_at;
|
|
36
|
+
// ssot.event에서 last_event_at 조회
|
|
37
|
+
const eventResult = await client.query(`SELECT MAX(ts) as last_event_at FROM ssot.event
|
|
38
|
+
WHERE rail = $1 AND workspace_id = $2 AND run_id = $3`, [key.rail, key.workspace_id, key.run_id]);
|
|
39
|
+
const lastEventAt = eventResult.rows[0]?.last_event_at ?? null;
|
|
40
|
+
// ssot.gate_verdict에서 verdict, risk_score 조회
|
|
41
|
+
const verdictResult = await client.query(`SELECT verdict FROM ssot.gate_verdict
|
|
42
|
+
WHERE rail = $1 AND workspace_id = $2 AND run_id = $3`, [key.rail, key.workspace_id, key.run_id]);
|
|
43
|
+
const verdictRaw = verdictResult.rows[0]?.verdict;
|
|
44
|
+
const verdict = isVerdict(verdictRaw) ? verdictRaw : null;
|
|
45
|
+
// ssot.file_index에서 파일 수 조회
|
|
46
|
+
const fileResult = await client.query(`SELECT COUNT(*) as file_count FROM ssot.file_index
|
|
47
|
+
WHERE rail = $1 AND workspace_id = $2 AND run_id = $3`, [key.rail, key.workspace_id, key.run_id]);
|
|
48
|
+
const changedFiles = parseInt(fileResult.rows[0]?.file_count ?? "0", 10);
|
|
49
|
+
// ssot.event에서 top_risks 추출 (gate 이벤트의 payload)
|
|
50
|
+
const riskResult = await client.query(`SELECT payload FROM ssot.event
|
|
51
|
+
WHERE rail = $1 AND workspace_id = $2 AND run_id = $3
|
|
52
|
+
AND kind = 'gate'
|
|
53
|
+
ORDER BY ts DESC LIMIT 1`, [key.rail, key.workspace_id, key.run_id]);
|
|
54
|
+
const gatePayload = riskResult.rows[0]?.payload;
|
|
55
|
+
const riskScore = typeof gatePayload?.risk_score === "number"
|
|
56
|
+
? gatePayload.risk_score
|
|
57
|
+
: null;
|
|
58
|
+
const topRisks = Array.isArray(gatePayload?.issues)
|
|
59
|
+
? gatePayload.issues.slice(0, 5)
|
|
60
|
+
: null;
|
|
61
|
+
// run_card upsert
|
|
62
|
+
const card = {
|
|
63
|
+
...key,
|
|
64
|
+
created_at: createdAt,
|
|
65
|
+
last_event_at: lastEventAt,
|
|
66
|
+
verdict,
|
|
67
|
+
risk_score: riskScore,
|
|
68
|
+
changed_files: changedFiles,
|
|
69
|
+
changed_lines: null, // DB에서는 lines 정보 없음 (파일 기반에서만 가능)
|
|
70
|
+
top_risks: topRisks,
|
|
71
|
+
next_actions: null,
|
|
72
|
+
};
|
|
73
|
+
await upsertRunCard(client, card);
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* rm.run_card 빌드 (파일 시스템 기반)
|
|
77
|
+
*
|
|
78
|
+
* @param client DB client
|
|
79
|
+
* @param key run 키
|
|
80
|
+
* @param runDir run 디렉토리 경로
|
|
81
|
+
* @param createdAt run 생성 시각
|
|
82
|
+
*
|
|
83
|
+
* @description
|
|
84
|
+
* 파일 시스템에서 직접 증거를 파싱하여 run_card를 빌드합니다.
|
|
85
|
+
* CI sync에서 주로 사용됩니다.
|
|
86
|
+
*/
|
|
87
|
+
export async function buildRunCardFromFiles(client, key, runDir, createdAt) {
|
|
88
|
+
// 증거 파싱
|
|
89
|
+
const evidence = parseAllEvidence(runDir);
|
|
90
|
+
// verdict 결정
|
|
91
|
+
const verdict = evidence.gate?.verdict ?? null;
|
|
92
|
+
// run_card 빌드
|
|
93
|
+
const card = {
|
|
94
|
+
...key,
|
|
95
|
+
created_at: createdAt,
|
|
96
|
+
last_event_at: new Date(),
|
|
97
|
+
verdict,
|
|
98
|
+
risk_score: extractRiskScore(evidence),
|
|
99
|
+
changed_files: extractChangedFiles(evidence),
|
|
100
|
+
changed_lines: extractChangedLines(evidence),
|
|
101
|
+
top_risks: extractTopRisks(evidence),
|
|
102
|
+
next_actions: buildNextActions(evidence),
|
|
103
|
+
};
|
|
104
|
+
await upsertRunCard(client, card);
|
|
105
|
+
}
|
|
106
|
+
/**
|
|
107
|
+
* next_actions 빌드
|
|
108
|
+
*/
|
|
109
|
+
function buildNextActions(evidence) {
|
|
110
|
+
const actions = [];
|
|
111
|
+
// verdict에 따른 기본 액션
|
|
112
|
+
if (evidence.gate?.verdict === "FIX") {
|
|
113
|
+
actions.push({
|
|
114
|
+
action: "fix_issues",
|
|
115
|
+
description: "Fix the reported issues before proceeding",
|
|
116
|
+
priority: "high",
|
|
117
|
+
});
|
|
118
|
+
}
|
|
119
|
+
else if (evidence.gate?.verdict === "BLOCK") {
|
|
120
|
+
actions.push({
|
|
121
|
+
action: "review_required",
|
|
122
|
+
description: "Manual review required due to blocking issues",
|
|
123
|
+
priority: "critical",
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
else if (evidence.gate?.verdict === "GO") {
|
|
127
|
+
actions.push({
|
|
128
|
+
action: "ready_to_proceed",
|
|
129
|
+
description: "All checks passed, ready to proceed",
|
|
130
|
+
priority: "info",
|
|
131
|
+
});
|
|
132
|
+
}
|
|
133
|
+
// bitnet 위험 수준에 따른 액션
|
|
134
|
+
if (evidence.bitnet?.risk_level === "high" || evidence.bitnet?.risk_level === "critical") {
|
|
135
|
+
actions.push({
|
|
136
|
+
action: "bitnet_review",
|
|
137
|
+
description: `BitNet flagged ${evidence.bitnet.risk_level} risk level`,
|
|
138
|
+
priority: "high",
|
|
139
|
+
});
|
|
140
|
+
}
|
|
141
|
+
return actions.length > 0 ? actions : null;
|
|
142
|
+
}
|
|
143
|
+
// =============================================================================
|
|
144
|
+
// Artifact Builder
|
|
145
|
+
// =============================================================================
|
|
146
|
+
/**
|
|
147
|
+
* rm.artifact 빌드 (증거 파일별)
|
|
148
|
+
*
|
|
149
|
+
* @param client DB client
|
|
150
|
+
* @param key run 키
|
|
151
|
+
* @param runDir run 디렉토리 경로
|
|
152
|
+
*/
|
|
153
|
+
export async function buildArtifactsFromFiles(client, key, runDir) {
|
|
154
|
+
const evidence = parseAllEvidence(runDir);
|
|
155
|
+
// ingress artifact
|
|
156
|
+
if (evidence.ingress) {
|
|
157
|
+
await upsertArtifact(client, {
|
|
158
|
+
...key,
|
|
159
|
+
kind: "ingress_summary",
|
|
160
|
+
logical_path: "ingress/ingress_summary.json",
|
|
161
|
+
content_sha: "", // 파일 해시는 file_index에서 가져와야 함
|
|
162
|
+
summary: truncateSummary({
|
|
163
|
+
changed_files: evidence.ingress.changed_files,
|
|
164
|
+
staged_files: evidence.ingress.staged_files,
|
|
165
|
+
mode: evidence.ingress.mode,
|
|
166
|
+
}),
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
// mapping artifact
|
|
170
|
+
if (evidence.mapping) {
|
|
171
|
+
await upsertArtifact(client, {
|
|
172
|
+
...key,
|
|
173
|
+
kind: "change_map",
|
|
174
|
+
logical_path: "mapping/change_map.v1.json",
|
|
175
|
+
content_sha: "",
|
|
176
|
+
summary: truncateSummary({
|
|
177
|
+
domains: evidence.mapping.domains,
|
|
178
|
+
risk_areas: evidence.mapping.risk_areas,
|
|
179
|
+
lines_changed: evidence.mapping.lines_changed,
|
|
180
|
+
}),
|
|
181
|
+
});
|
|
182
|
+
}
|
|
183
|
+
// gate artifact
|
|
184
|
+
if (evidence.gate) {
|
|
185
|
+
await upsertArtifact(client, {
|
|
186
|
+
...key,
|
|
187
|
+
kind: "gate_report",
|
|
188
|
+
logical_path: "gate/gate_report.json",
|
|
189
|
+
content_sha: "",
|
|
190
|
+
summary: truncateSummary({
|
|
191
|
+
verdict: evidence.gate.verdict,
|
|
192
|
+
risk_score: evidence.gate.risk_score,
|
|
193
|
+
issue_count: evidence.gate.issues.length,
|
|
194
|
+
}),
|
|
195
|
+
});
|
|
196
|
+
}
|
|
197
|
+
// bitnet artifact
|
|
198
|
+
if (evidence.bitnet) {
|
|
199
|
+
await upsertArtifact(client, {
|
|
200
|
+
...key,
|
|
201
|
+
kind: "bitnet_trace",
|
|
202
|
+
logical_path: "90_logs/bitnet_trace.jsonl",
|
|
203
|
+
content_sha: "",
|
|
204
|
+
summary: truncateSummary({
|
|
205
|
+
risk_level: evidence.bitnet.risk_level,
|
|
206
|
+
trace_count: evidence.bitnet.trace_count,
|
|
207
|
+
}),
|
|
208
|
+
});
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* summary 크기 제한 (P0-8: 16KB 상한)
|
|
213
|
+
*/
|
|
214
|
+
function truncateSummary(obj) {
|
|
215
|
+
const json = JSON.stringify(obj);
|
|
216
|
+
const MAX_SIZE = 16 * 1024; // 16KB
|
|
217
|
+
if (json.length <= MAX_SIZE) {
|
|
218
|
+
return obj;
|
|
219
|
+
}
|
|
220
|
+
// 크기 초과 시 최소 정보만 유지
|
|
221
|
+
return {
|
|
222
|
+
_truncated: true,
|
|
223
|
+
_original_size: json.length,
|
|
224
|
+
};
|
|
225
|
+
}
|
|
226
|
+
// =============================================================================
|
|
227
|
+
// Rebuild Functions
|
|
228
|
+
// =============================================================================
|
|
229
|
+
/**
|
|
230
|
+
* 특정 workspace의 모든 run_card 재빌드
|
|
231
|
+
*
|
|
232
|
+
* @param client DB client
|
|
233
|
+
* @param rail 레일
|
|
234
|
+
* @param workspaceId workspace_id
|
|
235
|
+
* @returns 재빌드된 run 수
|
|
236
|
+
*/
|
|
237
|
+
export async function rebuildAllRunCards(client, rail, workspaceId) {
|
|
238
|
+
const result = await client.query(`SELECT run_id FROM ssot.run WHERE rail = $1 AND workspace_id = $2`, [rail, workspaceId]);
|
|
239
|
+
let count = 0;
|
|
240
|
+
for (const row of result.rows) {
|
|
241
|
+
try {
|
|
242
|
+
await buildRunCardFromDb(client, {
|
|
243
|
+
rail: rail,
|
|
244
|
+
workspace_id: workspaceId,
|
|
245
|
+
run_id: row.run_id,
|
|
246
|
+
});
|
|
247
|
+
count++;
|
|
248
|
+
}
|
|
249
|
+
catch {
|
|
250
|
+
// 개별 실패는 무시하고 계속
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
return count;
|
|
254
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* db_sync/scanner.ts
|
|
3
|
+
*
|
|
4
|
+
* PostgreSQL Secondary Truth Layer - File Scanner
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* run 디렉토리의 증거 파일을 스캔하고 해시를 계산합니다.
|
|
8
|
+
* snapshot_hash는 내용 동일성만 반영합니다 (mtime 미포함, P0-4).
|
|
9
|
+
*
|
|
10
|
+
* @see docs/DEV_SPEC/active/postgresql-secondary-truth/CONTRACT.md
|
|
11
|
+
*/
|
|
12
|
+
import type { FileEntry } from "./types.js";
|
|
13
|
+
/**
|
|
14
|
+
* 스캔 대상 경로 패턴 (whitelist)
|
|
15
|
+
*/
|
|
16
|
+
export declare const SCAN_WHITELIST: readonly ["ingress/**", "mapping/**", "ci/**", "gate/**", "90_logs/**"];
|
|
17
|
+
/**
|
|
18
|
+
* run 디렉토리 스캔
|
|
19
|
+
*
|
|
20
|
+
* @param runDir run 디렉토리 절대 경로
|
|
21
|
+
* @param whitelist 스캔 대상 패턴 (기본값: SCAN_WHITELIST)
|
|
22
|
+
* @returns FileEntry 배열
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* const files = await scanRunDirectory('/path/to/runs/r_20260202_041512_abc123');
|
|
26
|
+
*/
|
|
27
|
+
export declare function scanRunDirectory(runDir: string, whitelist?: readonly string[]): Promise<FileEntry[]>;
|
|
28
|
+
/**
|
|
29
|
+
* 파일 콘텐츠 해시 계산 (SHA-256)
|
|
30
|
+
*
|
|
31
|
+
* @param content 파일 바이트
|
|
32
|
+
* @returns hex 인코딩된 SHA-256 해시
|
|
33
|
+
*/
|
|
34
|
+
export declare function computeContentHash(content: Buffer): string;
|
|
35
|
+
/**
|
|
36
|
+
* snapshot_hash 계산
|
|
37
|
+
*
|
|
38
|
+
* @param files FileEntry 배열
|
|
39
|
+
* @returns hex 인코딩된 SHA-256 해시
|
|
40
|
+
*
|
|
41
|
+
* @description
|
|
42
|
+
* P0-4: mtime은 snapshot_hash 계산에 포함되지 않습니다.
|
|
43
|
+
* 내용 동일성(content identity)만 반영합니다.
|
|
44
|
+
*
|
|
45
|
+
* 정렬된 `${logical_path}|${bytes}|${content_sha}` 문자열의 해시
|
|
46
|
+
*/
|
|
47
|
+
export declare function computeSnapshotHash(files: FileEntry[]): string;
|
|
48
|
+
/**
|
|
49
|
+
* 파일 태그 결정
|
|
50
|
+
*
|
|
51
|
+
* @param logicalPath 논리 경로
|
|
52
|
+
* @returns 태그 배열
|
|
53
|
+
*/
|
|
54
|
+
export declare function determineFileTags(logicalPath: string): string[];
|
|
55
|
+
/**
|
|
56
|
+
* workspace_id 생성 (결정적)
|
|
57
|
+
*
|
|
58
|
+
* @param workspaceRoot 워크스페이스 루트 (논리 경로)
|
|
59
|
+
* @param repoRemoteUrl git remote URL (optional)
|
|
60
|
+
* @param defaultBranch 기본 브랜치 (optional)
|
|
61
|
+
* @returns ws_<sha256_12> 형식의 workspace_id
|
|
62
|
+
*
|
|
63
|
+
* @description
|
|
64
|
+
* P0-2: 결정적 workspace_id 생성
|
|
65
|
+
* 같은 입력에 대해 항상 같은 결과
|
|
66
|
+
*/
|
|
67
|
+
export declare function generateWorkspaceId(workspaceRoot: string, repoRemoteUrl?: string, defaultBranch?: string): string;
|
|
68
|
+
/**
|
|
69
|
+
* 논리 경로 생성 (절대 경로 → 논리 경로)
|
|
70
|
+
*
|
|
71
|
+
* @param absolutePath 절대 경로
|
|
72
|
+
* @param workspaceRoot 워크스페이스 루트
|
|
73
|
+
* @returns 논리 경로
|
|
74
|
+
*
|
|
75
|
+
* @description
|
|
76
|
+
* DB에는 논리 경로만 저장 (절대 경로 금지)
|
|
77
|
+
*/
|
|
78
|
+
export declare function toLogicalPath(absolutePath: string, workspaceRoot: string): string;
|
|
79
|
+
/**
|
|
80
|
+
* Git 정보 획득
|
|
81
|
+
*
|
|
82
|
+
* @param workspaceRoot 워크스페이스 루트
|
|
83
|
+
* @returns { branch, commitSha, remoteUrl } or null
|
|
84
|
+
*/
|
|
85
|
+
export declare function getGitInfo(workspaceRoot: string): {
|
|
86
|
+
branch: string | null;
|
|
87
|
+
commitSha: string | null;
|
|
88
|
+
remoteUrl: string | null;
|
|
89
|
+
} | null;
|
|
90
|
+
/**
|
|
91
|
+
* run 디렉토리 존재 확인
|
|
92
|
+
*/
|
|
93
|
+
export declare function runDirectoryExists(runDir: string): boolean;
|
|
94
|
+
/**
|
|
95
|
+
* 특정 증거 파일 존재 확인
|
|
96
|
+
*/
|
|
97
|
+
export declare function evidenceFileExists(runDir: string, relativePath: string): boolean;
|
|
@@ -0,0 +1,287 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* db_sync/scanner.ts
|
|
3
|
+
*
|
|
4
|
+
* PostgreSQL Secondary Truth Layer - File Scanner
|
|
5
|
+
*
|
|
6
|
+
* @description
|
|
7
|
+
* run 디렉토리의 증거 파일을 스캔하고 해시를 계산합니다.
|
|
8
|
+
* snapshot_hash는 내용 동일성만 반영합니다 (mtime 미포함, P0-4).
|
|
9
|
+
*
|
|
10
|
+
* @see docs/DEV_SPEC/active/postgresql-secondary-truth/CONTRACT.md
|
|
11
|
+
*/
|
|
12
|
+
import * as fs from "fs";
|
|
13
|
+
import * as path from "path";
|
|
14
|
+
import * as crypto from "crypto";
|
|
15
|
+
// =============================================================================
|
|
16
|
+
// Constants
|
|
17
|
+
// =============================================================================
|
|
18
|
+
/**
|
|
19
|
+
* 스캔 대상 경로 패턴 (whitelist)
|
|
20
|
+
*/
|
|
21
|
+
export const SCAN_WHITELIST = [
|
|
22
|
+
"ingress/**",
|
|
23
|
+
"mapping/**",
|
|
24
|
+
"ci/**",
|
|
25
|
+
"gate/**",
|
|
26
|
+
"90_logs/**",
|
|
27
|
+
];
|
|
28
|
+
/**
|
|
29
|
+
* 파일 태그 매핑
|
|
30
|
+
*/
|
|
31
|
+
const TAG_PATTERNS = [
|
|
32
|
+
{ pattern: /^ingress\//, tags: ["ingress"] },
|
|
33
|
+
{ pattern: /ingress_summary\.json$/, tags: ["ingress", "summary"] },
|
|
34
|
+
{ pattern: /^mapping\//, tags: ["mapping"] },
|
|
35
|
+
{ pattern: /change_map\.v1\.json$/, tags: ["mapping", "change_map"] },
|
|
36
|
+
{ pattern: /^ci\//, tags: ["ci"] },
|
|
37
|
+
{ pattern: /^gate\//, tags: ["gate"] },
|
|
38
|
+
{ pattern: /gate_report\.json$/, tags: ["gate", "report"] },
|
|
39
|
+
{ pattern: /^90_logs\//, tags: ["logs"] },
|
|
40
|
+
{ pattern: /bitnet_trace\.jsonl$/, tags: ["logs", "bitnet"] },
|
|
41
|
+
];
|
|
42
|
+
/**
|
|
43
|
+
* Content-Type 매핑
|
|
44
|
+
*/
|
|
45
|
+
const CONTENT_TYPE_MAP = {
|
|
46
|
+
".json": "application/json",
|
|
47
|
+
".jsonl": "application/jsonl",
|
|
48
|
+
".md": "text/markdown",
|
|
49
|
+
".txt": "text/plain",
|
|
50
|
+
".ts": "text/typescript",
|
|
51
|
+
".js": "application/javascript",
|
|
52
|
+
".yaml": "application/yaml",
|
|
53
|
+
".yml": "application/yaml",
|
|
54
|
+
};
|
|
55
|
+
// =============================================================================
|
|
56
|
+
// Main Scanner
|
|
57
|
+
// =============================================================================
|
|
58
|
+
/**
|
|
59
|
+
* run 디렉토리 스캔
|
|
60
|
+
*
|
|
61
|
+
* @param runDir run 디렉토리 절대 경로
|
|
62
|
+
* @param whitelist 스캔 대상 패턴 (기본값: SCAN_WHITELIST)
|
|
63
|
+
* @returns FileEntry 배열
|
|
64
|
+
*
|
|
65
|
+
* @example
|
|
66
|
+
* const files = await scanRunDirectory('/path/to/runs/r_20260202_041512_abc123');
|
|
67
|
+
*/
|
|
68
|
+
export async function scanRunDirectory(runDir, whitelist = SCAN_WHITELIST) {
|
|
69
|
+
const results = [];
|
|
70
|
+
// 각 whitelist 패턴에 대해 스캔
|
|
71
|
+
for (const pattern of whitelist) {
|
|
72
|
+
const baseDir = pattern.replace(/\/\*\*$/, "");
|
|
73
|
+
const targetDir = path.join(runDir, baseDir);
|
|
74
|
+
if (!fs.existsSync(targetDir)) {
|
|
75
|
+
continue;
|
|
76
|
+
}
|
|
77
|
+
const files = await scanDirectoryRecursive(targetDir, runDir);
|
|
78
|
+
results.push(...files);
|
|
79
|
+
}
|
|
80
|
+
return results;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* 디렉토리 재귀 스캔
|
|
84
|
+
*/
|
|
85
|
+
async function scanDirectoryRecursive(dir, runDir) {
|
|
86
|
+
const results = [];
|
|
87
|
+
const entries = fs.readdirSync(dir, { withFileTypes: true });
|
|
88
|
+
for (const entry of entries) {
|
|
89
|
+
const fullPath = path.join(dir, entry.name);
|
|
90
|
+
if (entry.isDirectory()) {
|
|
91
|
+
const subFiles = await scanDirectoryRecursive(fullPath, runDir);
|
|
92
|
+
results.push(...subFiles);
|
|
93
|
+
}
|
|
94
|
+
else if (entry.isFile()) {
|
|
95
|
+
const fileEntry = await processFile(fullPath, runDir);
|
|
96
|
+
if (fileEntry) {
|
|
97
|
+
results.push(fileEntry);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
return results;
|
|
102
|
+
}
|
|
103
|
+
/**
|
|
104
|
+
* 단일 파일 처리
|
|
105
|
+
*/
|
|
106
|
+
async function processFile(fullPath, runDir) {
|
|
107
|
+
try {
|
|
108
|
+
const stat = fs.statSync(fullPath);
|
|
109
|
+
const content = fs.readFileSync(fullPath);
|
|
110
|
+
// 논리 경로 (runDir 기준 상대 경로)
|
|
111
|
+
const logicalPath = path.relative(runDir, fullPath).replace(/\\/g, "/");
|
|
112
|
+
// 콘텐츠 해시
|
|
113
|
+
const contentSha = computeContentHash(content);
|
|
114
|
+
// 확장자
|
|
115
|
+
const ext = path.extname(fullPath).toLowerCase();
|
|
116
|
+
// 태그 결정
|
|
117
|
+
const tags = determineFileTags(logicalPath);
|
|
118
|
+
return {
|
|
119
|
+
logical_path: logicalPath,
|
|
120
|
+
content_sha: contentSha,
|
|
121
|
+
bytes: stat.size,
|
|
122
|
+
mtime: stat.mtime, // 참고용 (snapshot_hash에는 미포함)
|
|
123
|
+
content_type: CONTENT_TYPE_MAP[ext] || null,
|
|
124
|
+
tags,
|
|
125
|
+
};
|
|
126
|
+
}
|
|
127
|
+
catch {
|
|
128
|
+
// 파일 읽기 실패 시 skip
|
|
129
|
+
return null;
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
// =============================================================================
|
|
133
|
+
// Hash Functions
|
|
134
|
+
// =============================================================================
|
|
135
|
+
/**
|
|
136
|
+
* 파일 콘텐츠 해시 계산 (SHA-256)
|
|
137
|
+
*
|
|
138
|
+
* @param content 파일 바이트
|
|
139
|
+
* @returns hex 인코딩된 SHA-256 해시
|
|
140
|
+
*/
|
|
141
|
+
export function computeContentHash(content) {
|
|
142
|
+
return crypto.createHash("sha256").update(content).digest("hex");
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* snapshot_hash 계산
|
|
146
|
+
*
|
|
147
|
+
* @param files FileEntry 배열
|
|
148
|
+
* @returns hex 인코딩된 SHA-256 해시
|
|
149
|
+
*
|
|
150
|
+
* @description
|
|
151
|
+
* P0-4: mtime은 snapshot_hash 계산에 포함되지 않습니다.
|
|
152
|
+
* 내용 동일성(content identity)만 반영합니다.
|
|
153
|
+
*
|
|
154
|
+
* 정렬된 `${logical_path}|${bytes}|${content_sha}` 문자열의 해시
|
|
155
|
+
*/
|
|
156
|
+
export function computeSnapshotHash(files) {
|
|
157
|
+
const sorted = files
|
|
158
|
+
.map((f) => `${f.logical_path}|${f.bytes}|${f.content_sha}`)
|
|
159
|
+
.sort();
|
|
160
|
+
const combined = sorted.join("\n");
|
|
161
|
+
return crypto.createHash("sha256").update(combined).digest("hex");
|
|
162
|
+
}
|
|
163
|
+
// =============================================================================
|
|
164
|
+
// Tag Functions
|
|
165
|
+
// =============================================================================
|
|
166
|
+
/**
|
|
167
|
+
* 파일 태그 결정
|
|
168
|
+
*
|
|
169
|
+
* @param logicalPath 논리 경로
|
|
170
|
+
* @returns 태그 배열
|
|
171
|
+
*/
|
|
172
|
+
export function determineFileTags(logicalPath) {
|
|
173
|
+
const tags = new Set();
|
|
174
|
+
for (const { pattern, tags: matchTags } of TAG_PATTERNS) {
|
|
175
|
+
if (pattern.test(logicalPath)) {
|
|
176
|
+
for (const tag of matchTags) {
|
|
177
|
+
tags.add(tag);
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
return Array.from(tags);
|
|
182
|
+
}
|
|
183
|
+
// =============================================================================
|
|
184
|
+
// Workspace ID Generation (P0-2)
|
|
185
|
+
// =============================================================================
|
|
186
|
+
/**
|
|
187
|
+
* workspace_id 생성 (결정적)
|
|
188
|
+
*
|
|
189
|
+
* @param workspaceRoot 워크스페이스 루트 (논리 경로)
|
|
190
|
+
* @param repoRemoteUrl git remote URL (optional)
|
|
191
|
+
* @param defaultBranch 기본 브랜치 (optional)
|
|
192
|
+
* @returns ws_<sha256_12> 형식의 workspace_id
|
|
193
|
+
*
|
|
194
|
+
* @description
|
|
195
|
+
* P0-2: 결정적 workspace_id 생성
|
|
196
|
+
* 같은 입력에 대해 항상 같은 결과
|
|
197
|
+
*/
|
|
198
|
+
export function generateWorkspaceId(workspaceRoot, repoRemoteUrl, defaultBranch) {
|
|
199
|
+
const canonical = [
|
|
200
|
+
`root=${workspaceRoot}`,
|
|
201
|
+
`remote=${repoRemoteUrl ?? ""}`,
|
|
202
|
+
`branch=${defaultBranch ?? ""}`,
|
|
203
|
+
].join("|");
|
|
204
|
+
const hash = crypto
|
|
205
|
+
.createHash("sha256")
|
|
206
|
+
.update(canonical)
|
|
207
|
+
.digest("hex")
|
|
208
|
+
.substring(0, 12);
|
|
209
|
+
return `ws_${hash}`;
|
|
210
|
+
}
|
|
211
|
+
/**
|
|
212
|
+
* 논리 경로 생성 (절대 경로 → 논리 경로)
|
|
213
|
+
*
|
|
214
|
+
* @param absolutePath 절대 경로
|
|
215
|
+
* @param workspaceRoot 워크스페이스 루트
|
|
216
|
+
* @returns 논리 경로
|
|
217
|
+
*
|
|
218
|
+
* @description
|
|
219
|
+
* DB에는 논리 경로만 저장 (절대 경로 금지)
|
|
220
|
+
*/
|
|
221
|
+
export function toLogicalPath(absolutePath, workspaceRoot) {
|
|
222
|
+
return path.relative(workspaceRoot, absolutePath).replace(/\\/g, "/");
|
|
223
|
+
}
|
|
224
|
+
// =============================================================================
|
|
225
|
+
// Git Integration
|
|
226
|
+
// =============================================================================
|
|
227
|
+
/**
|
|
228
|
+
* Git 정보 획득
|
|
229
|
+
*
|
|
230
|
+
* @param workspaceRoot 워크스페이스 루트
|
|
231
|
+
* @returns { branch, commitSha, remoteUrl } or null
|
|
232
|
+
*/
|
|
233
|
+
export function getGitInfo(workspaceRoot) {
|
|
234
|
+
const gitDir = path.join(workspaceRoot, ".git");
|
|
235
|
+
if (!fs.existsSync(gitDir)) {
|
|
236
|
+
return null;
|
|
237
|
+
}
|
|
238
|
+
try {
|
|
239
|
+
// HEAD 읽기
|
|
240
|
+
const headPath = path.join(gitDir, "HEAD");
|
|
241
|
+
const headContent = fs.readFileSync(headPath, "utf-8").trim();
|
|
242
|
+
let branch = null;
|
|
243
|
+
let commitSha = null;
|
|
244
|
+
if (headContent.startsWith("ref: refs/heads/")) {
|
|
245
|
+
branch = headContent.replace("ref: refs/heads/", "");
|
|
246
|
+
// ref 파일에서 commit SHA 읽기
|
|
247
|
+
const refPath = path.join(gitDir, "refs", "heads", branch);
|
|
248
|
+
if (fs.existsSync(refPath)) {
|
|
249
|
+
commitSha = fs.readFileSync(refPath, "utf-8").trim();
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
else {
|
|
253
|
+
// detached HEAD
|
|
254
|
+
commitSha = headContent;
|
|
255
|
+
}
|
|
256
|
+
// remote origin URL 읽기
|
|
257
|
+
let remoteUrl = null;
|
|
258
|
+
const configPath = path.join(gitDir, "config");
|
|
259
|
+
if (fs.existsSync(configPath)) {
|
|
260
|
+
const configContent = fs.readFileSync(configPath, "utf-8");
|
|
261
|
+
const match = configContent.match(/\[remote "origin"\][^[]*url\s*=\s*(.+)/);
|
|
262
|
+
if (match) {
|
|
263
|
+
remoteUrl = match[1].trim();
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
return { branch, commitSha, remoteUrl };
|
|
267
|
+
}
|
|
268
|
+
catch {
|
|
269
|
+
return null;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
// =============================================================================
|
|
273
|
+
// Utilities
|
|
274
|
+
// =============================================================================
|
|
275
|
+
/**
|
|
276
|
+
* run 디렉토리 존재 확인
|
|
277
|
+
*/
|
|
278
|
+
export function runDirectoryExists(runDir) {
|
|
279
|
+
return fs.existsSync(runDir) && fs.statSync(runDir).isDirectory();
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* 특정 증거 파일 존재 확인
|
|
283
|
+
*/
|
|
284
|
+
export function evidenceFileExists(runDir, relativePath) {
|
|
285
|
+
const fullPath = path.join(runDir, relativePath);
|
|
286
|
+
return fs.existsSync(fullPath) && fs.statSync(fullPath).isFile();
|
|
287
|
+
}
|