@vibecodetown/mcp-server 1.3.1 → 1.4.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/CONTRIBUTING.md +0 -0
- package/LICENSE +21 -0
- package/README.md +0 -0
- package/THIRD_PARTY_NOTICES.md +106 -0
- package/bin/SHA256SUMS +9 -0
- package/bin/clinic_win_x64/clinic.exe +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_win_x64/vibecoding-helper.exe +0 -0
- package/bin/vpm-back_win_x64/vpm-back.exe +0 -0
- package/build/background-sync-worker.d.ts +1 -2
- package/build/background-sync-worker.js +0 -0
- package/build/bin/vibe-auth.d.ts +0 -0
- package/build/bin/vibe-auth.js +0 -0
- package/build/bin/vibe-bitnet-worker.d.ts +0 -0
- package/build/bin/vibe-bitnet-worker.js +5 -4
- package/build/bin/vibe-ci.d.ts +2 -10
- package/build/bin/vibe-ci.js +6 -1552
- package/build/bin/vibe-companion.d.ts +15 -0
- package/build/bin/vibe-companion.js +134 -0
- package/build/bin/vibe-dashboard.d.ts +0 -0
- package/build/bin/vibe-dashboard.js +11 -11
- package/build/bin/vibe-mapper-worker.d.ts +0 -0
- package/build/bin/vibe-mapper-worker.js +37 -15
- package/build/bitnet-worker/autostart.d.ts +0 -0
- package/build/bitnet-worker/autostart.js +4 -3
- package/build/bitnet-worker/client.d.ts +0 -0
- package/build/bitnet-worker/client.js +3 -2
- package/build/bitnet-worker/cpu_brake.d.ts +0 -0
- package/build/bitnet-worker/cpu_brake.js +4 -3
- package/build/bitnet-worker/embed_client.d.ts +0 -0
- package/build/bitnet-worker/embed_client.js +0 -0
- package/build/bitnet-worker/hw_slots.d.ts +0 -0
- package/build/bitnet-worker/hw_slots.js +3 -2
- package/build/bitnet-worker/index.d.ts +1 -1
- package/build/bitnet-worker/index.js +1 -1
- package/build/bitnet-worker/metrics.d.ts +0 -0
- package/build/bitnet-worker/metrics.js +0 -0
- package/build/bitnet-worker/native_inference.d.ts +1 -1
- package/build/bitnet-worker/native_inference.js +49 -43
- package/build/bitnet-worker/pool-autostart.d.ts +0 -0
- package/build/bitnet-worker/pool-autostart.js +5 -4
- package/build/bitnet-worker/request_cache.d.ts +0 -0
- package/build/bitnet-worker/request_cache.js +0 -0
- package/build/bitnet-worker/serial_queue.d.ts +0 -0
- package/build/bitnet-worker/serial_queue.js +0 -0
- package/build/bitnet-worker/server-autostart.d.ts +1 -1
- package/build/bitnet-worker/server-autostart.js +9 -9
- package/build/bitnet-worker/server.d.ts +4 -4
- package/build/bitnet-worker/server.js +131 -115
- package/build/bitnet-worker/server_manager.d.ts +28 -54
- package/build/bitnet-worker/server_manager.js +107 -238
- package/build/bitnet-worker/tiered_queue.d.ts +0 -0
- package/build/bitnet-worker/tiered_queue.js +3 -2
- package/build/bitnet-worker/types.d.ts +0 -0
- package/build/bitnet-worker/types.js +0 -0
- package/build/ci/args.d.ts +16 -0
- package/build/ci/args.js +103 -0
- package/build/ci/clinic_result.d.ts +22 -0
- package/build/ci/clinic_result.js +197 -0
- package/build/ci/cloud_sync.d.ts +2 -0
- package/build/ci/cloud_sync.js +29 -0
- package/build/ci/engine.d.ts +10 -0
- package/build/ci/engine.js +63 -0
- package/build/ci/file_changes.d.ts +10 -0
- package/build/ci/file_changes.js +127 -0
- package/build/ci/pipeline.d.ts +22 -0
- package/build/ci/pipeline.js +662 -0
- package/build/ci/pipeline_types.d.ts +134 -0
- package/build/ci/pipeline_types.js +5 -0
- package/build/ci/pipeline_violations.d.ts +44 -0
- package/build/ci/pipeline_violations.js +229 -0
- package/build/ci/rules/go.d.ts +8 -0
- package/build/ci/rules/go.js +22 -0
- package/build/ci/rules/index.d.ts +32 -0
- package/build/ci/rules/index.js +42 -0
- package/build/ci/rules/java.d.ts +8 -0
- package/build/ci/rules/java.js +22 -0
- package/build/ci/rules/javascript.d.ts +8 -0
- package/build/ci/rules/javascript.js +32 -0
- package/build/ci/rules/python.d.ts +8 -0
- package/build/ci/rules/python.js +27 -0
- package/build/ci/rules/rust.d.ts +8 -0
- package/build/ci/rules/rust.js +27 -0
- package/build/ci/spec_gate.d.ts +15 -0
- package/build/ci/spec_gate.js +143 -0
- package/build/ci/subcommands.d.ts +2 -0
- package/build/ci/subcommands.js +147 -0
- package/build/companion/autostart.d.ts +23 -0
- package/build/companion/autostart.js +105 -0
- package/build/companion/external_tools.d.ts +36 -0
- package/build/companion/external_tools.js +74 -0
- package/build/companion/index.d.ts +7 -0
- package/build/companion/index.js +6 -0
- package/build/companion/providers/bitnet_provider.d.ts +43 -0
- package/build/companion/providers/bitnet_provider.js +189 -0
- package/build/companion/providers/index.d.ts +1 -0
- package/build/companion/providers/index.js +1 -0
- package/build/companion/runtime.d.ts +9 -0
- package/build/companion/runtime.js +106 -0
- package/build/companion/server.d.ts +10 -0
- package/build/companion/server.js +143 -0
- package/build/companion/tools.d.ts +27 -0
- package/build/companion/tools.js +305 -0
- package/build/companion/types.d.ts +44 -0
- package/build/companion/types.js +10 -0
- package/build/companion/warden_runtime.d.ts +106 -0
- package/build/companion/warden_runtime.js +419 -0
- package/build/config/load-config.d.ts +0 -0
- package/build/config/load-config.js +2 -1
- package/build/coordinator/client.d.ts +0 -0
- package/build/coordinator/client.js +10 -19
- package/build/coordinator/index.d.ts +0 -0
- package/build/coordinator/index.js +0 -0
- package/build/correction-messages.d.ts +0 -0
- package/build/correction-messages.js +0 -0
- package/build/dashboard/index.d.ts +7 -17
- package/build/dashboard/index.js +9 -19
- package/build/dashboard/server.d.ts +4 -2
- package/build/dashboard/server.js +237 -83
- package/build/dashboard/signal_stream.d.ts +24 -0
- package/build/dashboard/signal_stream.js +252 -0
- package/build/db_sync/block_migration.d.ts +35 -0
- package/build/db_sync/block_migration.js +106 -0
- package/build/db_sync/block_reader.d.ts +38 -0
- package/build/db_sync/block_reader.js +97 -0
- package/build/db_sync/block_search_adapter.d.ts +26 -0
- package/build/db_sync/block_search_adapter.js +69 -0
- package/build/db_sync/block_sync.d.ts +26 -0
- package/build/db_sync/block_sync.js +95 -0
- package/build/db_sync/block_writer.d.ts +41 -0
- package/build/db_sync/block_writer.js +83 -0
- package/build/db_sync/config.d.ts +1 -7
- package/build/db_sync/config.js +7 -20
- package/build/db_sync/index.d.ts +20 -12
- package/build/db_sync/index.js +56 -56
- package/build/db_sync/parsers/bitnet.d.ts +0 -0
- package/build/db_sync/parsers/bitnet.js +0 -0
- package/build/db_sync/parsers/gate.d.ts +0 -0
- package/build/db_sync/parsers/gate.js +0 -0
- package/build/db_sync/parsers/index.d.ts +0 -0
- package/build/db_sync/parsers/index.js +0 -0
- package/build/db_sync/parsers/ingress.d.ts +0 -0
- package/build/db_sync/parsers/ingress.js +0 -0
- package/build/db_sync/parsers/mapping.d.ts +0 -0
- package/build/db_sync/parsers/mapping.js +0 -0
- package/build/db_sync/parsers/orchestrator.d.ts +0 -0
- package/build/db_sync/parsers/orchestrator.js +0 -0
- package/build/db_sync/pool.d.ts +2 -3
- package/build/db_sync/pool.js +10 -11
- package/build/db_sync/publish.d.ts +0 -0
- package/build/db_sync/publish.js +14 -14
- package/build/db_sync/read_model.d.ts +0 -0
- package/build/db_sync/read_model.js +7 -7
- package/build/db_sync/scanner.d.ts +4 -4
- package/build/db_sync/scanner.js +42 -30
- package/build/db_sync/types.d.ts +53 -7
- package/build/db_sync/types.js +11 -18
- package/build/db_sync/writer.d.ts +0 -0
- package/build/db_sync/writer.js +129 -129
- package/build/decision-log-reader.d.ts +33 -0
- package/build/decision-log-reader.js +129 -5
- package/build/deep-link.d.ts +0 -0
- package/build/deep-link.js +12 -11
- package/build/deps/deps-update.d.ts +0 -0
- package/build/deps/deps-update.js +0 -0
- package/build/deps/drift-check.d.ts +0 -0
- package/build/deps/drift-check.js +0 -0
- package/build/deps/env-check.d.ts +0 -0
- package/build/deps/env-check.js +0 -0
- package/build/deps/index.d.ts +0 -0
- package/build/deps/index.js +0 -0
- package/build/deps/pm-detect.d.ts +0 -0
- package/build/deps/pm-detect.js +0 -0
- package/build/deps/types.d.ts +0 -0
- package/build/deps/types.js +0 -0
- package/build/deps/ux-renderer.d.ts +0 -0
- package/build/deps/ux-renderer.js +0 -0
- package/build/{tier → domains/ant}/ant_lane.d.ts +2 -2
- package/build/{tier → domains/ant}/ant_lane.js +52 -50
- package/build/domains/ant/ant_lane_remediation.d.ts +50 -0
- package/build/domains/ant/ant_lane_remediation.js +157 -0
- package/build/domains/ant/ant_remediator.d.ts +48 -0
- package/build/domains/ant/ant_remediator.js +129 -0
- package/build/{tier → domains/ant}/checkpoint.d.ts +1 -1
- package/build/{tier → domains/ant}/checkpoint.js +66 -67
- package/build/{tier → domains/ant}/checkpoint_types.d.ts +17 -16
- package/build/{tier → domains/ant}/checkpoint_types.js +0 -0
- package/build/domains/ant/healing_loop.d.ts +42 -0
- package/build/domains/ant/healing_loop.js +196 -0
- package/build/domains/ant/index.d.ts +19 -0
- package/build/domains/ant/index.js +20 -0
- package/build/domains/ant/payload_builder.d.ts +51 -0
- package/build/domains/ant/payload_builder.js +137 -0
- package/build/domains/ant/remediation_log.d.ts +59 -0
- package/build/domains/ant/remediation_log.js +84 -0
- package/build/domains/bee/bee_chain_storage.d.ts +50 -0
- package/build/domains/bee/bee_chain_storage.js +155 -0
- package/build/domains/bee/bee_context_enricher.d.ts +76 -0
- package/build/domains/bee/bee_context_enricher.js +194 -0
- package/build/domains/bee/bee_import_parser.d.ts +68 -0
- package/build/domains/bee/bee_import_parser.js +359 -0
- package/build/domains/bee/bee_incremental_analyzer.d.ts +59 -0
- package/build/domains/bee/bee_incremental_analyzer.js +158 -0
- package/build/domains/bee/bee_ipc_server.d.ts +60 -0
- package/build/domains/bee/bee_ipc_server.js +146 -0
- package/build/domains/bee/bee_orchestrator.d.ts +35 -0
- package/build/domains/bee/bee_orchestrator.js +429 -0
- package/build/domains/bee/bee_rechunk.d.ts +41 -0
- package/build/domains/bee/bee_rechunk.js +128 -0
- package/build/domains/bee/bee_rechunk_incremental.d.ts +36 -0
- package/build/domains/bee/bee_rechunk_incremental.js +204 -0
- package/build/domains/bee/bee_stream_listener.d.ts +62 -0
- package/build/domains/bee/bee_stream_listener.js +161 -0
- package/build/domains/bee/bee_swarm_bridge.d.ts +32 -0
- package/build/domains/bee/bee_swarm_bridge.js +120 -0
- package/build/domains/bee/bee_triangulation.d.ts +66 -0
- package/build/domains/bee/bee_triangulation.js +186 -0
- package/build/domains/bee/bee_types.d.ts +142 -0
- package/build/domains/bee/bee_types.js +15 -0
- package/build/domains/bee/bee_watcher.d.ts +63 -0
- package/build/domains/bee/bee_watcher.js +267 -0
- package/build/{tier → domains/bee}/cooldown_store.d.ts +1 -1
- package/build/{tier → domains/bee}/cooldown_store.js +9 -8
- package/build/domains/bee/file_hash_registry.d.ts +69 -0
- package/build/domains/bee/file_hash_registry.js +189 -0
- package/build/domains/bee/index.d.ts +36 -0
- package/build/domains/bee/index.js +37 -0
- package/build/domains/bee/intent_tracker.d.ts +81 -0
- package/build/domains/bee/intent_tracker.js +185 -0
- package/build/domains/bee/log_pattern_registry.d.ts +91 -0
- package/build/domains/bee/log_pattern_registry.js +160 -0
- package/build/domains/bee/log_reasoning_bridge.d.ts +69 -0
- package/build/domains/bee/log_reasoning_bridge.js +182 -0
- package/build/domains/bee/scout_chain_storage.d.ts +27 -0
- package/build/domains/bee/scout_chain_storage.js +69 -0
- package/build/domains/bee/scout_heuristics.d.ts +30 -0
- package/build/domains/bee/scout_heuristics.js +446 -0
- package/build/{tier → domains/bee}/scout_runner.d.ts +5 -0
- package/build/{tier → domains/bee}/scout_runner.js +57 -2
- package/build/{tier → domains/bee}/trigger_evaluator.d.ts +4 -4
- package/build/{tier → domains/bee}/trigger_evaluator.js +63 -65
- package/build/{tier → domains/bee}/trigger_facts_collector.d.ts +3 -3
- package/build/domains/bee/trigger_facts_collector.js +280 -0
- package/build/{tier → domains/bee}/trigger_types.d.ts +3 -3
- package/build/{tier → domains/bee}/trigger_types.js +0 -0
- package/build/domains/prime/activity_sensor.d.ts +36 -0
- package/build/domains/prime/activity_sensor.js +64 -0
- package/build/domains/prime/context_assembly.d.ts +102 -0
- package/build/domains/prime/context_assembly.js +174 -0
- package/build/domains/prime/director.d.ts +38 -0
- package/build/domains/prime/director.js +136 -0
- package/build/domains/prime/goal_classifier.d.ts +11 -0
- package/build/domains/prime/goal_classifier.js +62 -0
- package/build/domains/prime/hive_mind.d.ts +48 -0
- package/build/domains/prime/hive_mind.js +249 -0
- package/build/domains/prime/hive_mind_prompts.d.ts +22 -0
- package/build/domains/prime/hive_mind_prompts.js +110 -0
- package/build/domains/prime/hive_mind_types.d.ts +43 -0
- package/build/domains/prime/hive_mind_types.js +4 -0
- package/build/domains/prime/holodeck.d.ts +33 -0
- package/build/domains/prime/holodeck.js +102 -0
- package/build/domains/prime/holodeck_types.d.ts +28 -0
- package/build/domains/prime/holodeck_types.js +4 -0
- package/build/domains/prime/hybrid_check.d.ts +23 -0
- package/build/domains/prime/hybrid_check.js +58 -0
- package/build/domains/prime/index.d.ts +20 -0
- package/build/domains/prime/index.js +15 -0
- package/build/domains/prime/mission_store.d.ts +27 -0
- package/build/domains/prime/mission_store.js +95 -0
- package/build/domains/prime/planner.d.ts +55 -0
- package/build/domains/prime/planner.js +307 -0
- package/build/domains/prime/planner_prompts.d.ts +18 -0
- package/build/domains/prime/planner_prompts.js +116 -0
- package/build/domains/prime/reviewer.d.ts +27 -0
- package/build/domains/prime/reviewer.js +83 -0
- package/build/domains/prime/stage_machine.d.ts +62 -0
- package/build/domains/prime/stage_machine.js +143 -0
- package/build/domains/prime/time_stone.d.ts +37 -0
- package/build/domains/prime/time_stone.js +212 -0
- package/build/domains/prime/time_stone_scorer.d.ts +17 -0
- package/build/domains/prime/time_stone_scorer.js +44 -0
- package/build/domains/prime/time_stone_types.d.ts +71 -0
- package/build/domains/prime/time_stone_types.js +4 -0
- package/build/domains/prime/types.d.ts +44 -0
- package/build/domains/prime/types.js +7 -0
- package/build/domains/rag/block_indexer.d.ts +39 -0
- package/build/domains/rag/block_indexer.js +61 -0
- package/build/domains/rag/context_builder.d.ts +11 -0
- package/build/domains/rag/context_builder.js +30 -0
- package/build/domains/rag/index.d.ts +6 -0
- package/build/domains/rag/index.js +6 -0
- package/build/domains/rag/rag_bridge.d.ts +29 -0
- package/build/domains/rag/rag_bridge.js +22 -0
- package/build/domains/rag/rag_client.d.ts +14 -0
- package/build/domains/rag/rag_client.js +77 -0
- package/build/domains/rag/retrieval.d.ts +18 -0
- package/build/domains/rag/retrieval.js +47 -0
- package/build/domains/rag/types.d.ts +57 -0
- package/build/domains/rag/types.js +3 -0
- package/build/domains/swarm/index.d.ts +19 -0
- package/build/domains/swarm/index.js +20 -0
- package/build/domains/swarm/reasoning_chain.d.ts +62 -0
- package/build/domains/swarm/reasoning_chain.js +121 -0
- package/build/domains/swarm/swarm_chain_dispatcher.d.ts +52 -0
- package/build/domains/swarm/swarm_chain_dispatcher.js +144 -0
- package/build/domains/swarm/swarm_consensus.d.ts +34 -0
- package/build/domains/swarm/swarm_consensus.js +87 -0
- package/build/domains/swarm/swarm_dispatcher.d.ts +34 -0
- package/build/domains/swarm/swarm_dispatcher.js +111 -0
- package/build/domains/swarm/swarm_prompt.d.ts +16 -0
- package/build/domains/swarm/swarm_prompt.js +70 -0
- package/build/domains/swarm/swarm_types.d.ts +55 -0
- package/build/domains/swarm/swarm_types.js +9 -0
- package/build/domains/swarm/swarm_verdict_router.d.ts +55 -0
- package/build/domains/swarm/swarm_verdict_router.js +129 -0
- package/build/evidence-report.d.ts +2 -2
- package/build/evidence-report.js +18 -153
- package/build/gateway/client.d.ts +35 -0
- package/build/gateway/client.js +98 -0
- package/build/gateway/config.d.ts +41 -0
- package/build/gateway/config.js +49 -0
- package/build/gateway/dispatch_handler.d.ts +17 -0
- package/build/gateway/dispatch_handler.js +95 -0
- package/build/gateway/heartbeat.d.ts +23 -0
- package/build/gateway/heartbeat.js +78 -0
- package/build/gateway/index.d.ts +18 -0
- package/build/gateway/index.js +14 -0
- package/build/gateway/prime_dispatch.d.ts +29 -0
- package/build/gateway/prime_dispatch.js +80 -0
- package/build/health/index.d.ts +0 -0
- package/build/health/index.js +0 -0
- package/build/health/liveness.d.ts +0 -0
- package/build/health/liveness.js +0 -0
- package/build/health/readiness.d.ts +5 -0
- package/build/health/readiness.js +28 -5
- package/build/health/types.d.ts +0 -0
- package/build/health/types.js +0 -0
- package/build/hub/autostart.d.ts +23 -0
- package/build/hub/autostart.js +137 -0
- package/build/hub/dashboard_routes.d.ts +17 -0
- package/build/hub/dashboard_routes.js +307 -0
- package/build/hub/index.d.ts +10 -0
- package/build/hub/index.js +8 -0
- package/build/hub/server.d.ts +10 -0
- package/build/hub/server.js +207 -0
- package/build/hub/types.d.ts +43 -0
- package/build/hub/types.js +8 -0
- package/build/index.d.ts +19 -19
- package/build/index.js +22 -47
- package/build/kernel/async-fs.d.ts +22 -0
- package/build/kernel/async-fs.js +50 -0
- package/build/kernel/atomic_writer.d.ts +22 -0
- package/build/kernel/atomic_writer.js +43 -0
- package/build/kernel/blocks/assembler.d.ts +101 -0
- package/build/kernel/blocks/assembler.js +254 -0
- package/build/kernel/blocks/chain.d.ts +148 -0
- package/build/kernel/blocks/chain.js +329 -0
- package/build/kernel/blocks/doubt.d.ts +141 -0
- package/build/kernel/blocks/doubt.js +288 -0
- package/build/kernel/blocks/events.d.ts +130 -0
- package/build/kernel/blocks/events.js +246 -0
- package/build/kernel/blocks/gc.d.ts +93 -0
- package/build/kernel/blocks/gc.js +320 -0
- package/build/kernel/blocks/hasher.d.ts +79 -0
- package/build/kernel/blocks/hasher.js +108 -0
- package/build/kernel/blocks/index.d.ts +29 -0
- package/build/kernel/blocks/index.js +44 -0
- package/build/kernel/blocks/inference_cache.d.ts +64 -0
- package/build/kernel/blocks/inference_cache.js +123 -0
- package/build/kernel/blocks/migration.d.ts +103 -0
- package/build/kernel/blocks/migration.js +273 -0
- package/build/kernel/blocks/policy.d.ts +41 -0
- package/build/kernel/blocks/policy.js +132 -0
- package/build/kernel/blocks/signal_bridge.d.ts +130 -0
- package/build/kernel/blocks/signal_bridge.js +324 -0
- package/build/kernel/blocks/signal_reader.d.ts +47 -0
- package/build/kernel/blocks/signal_reader.js +185 -0
- package/build/kernel/blocks/snapshot.d.ts +44 -0
- package/build/kernel/blocks/snapshot.js +258 -0
- package/build/kernel/blocks/store.d.ts +163 -0
- package/build/kernel/blocks/store.js +390 -0
- package/build/kernel/blocks/types.d.ts +340 -0
- package/build/kernel/blocks/types.js +31 -0
- package/build/kernel/blocks/vector.d.ts +90 -0
- package/build/kernel/blocks/vector.js +495 -0
- package/build/kernel/contracts.d.ts +53 -0
- package/build/kernel/contracts.js +1 -0
- package/build/kernel/deps.d.ts +22 -0
- package/build/kernel/deps.js +32 -0
- package/build/{mcp/events → kernel}/file_watcher.d.ts +1 -1
- package/build/{mcp/events → kernel}/file_watcher.js +5 -5
- package/build/kernel/index.d.ts +8 -0
- package/build/kernel/index.js +13 -0
- package/build/kernel/musu_adapter.d.ts +198 -0
- package/build/kernel/musu_adapter.js +836 -0
- package/build/kernel/musu_adapter_types.d.ts +212 -0
- package/build/kernel/musu_adapter_types.js +10 -0
- package/build/kernel/musu_endpoint.d.ts +15 -0
- package/build/kernel/musu_endpoint.js +62 -0
- package/build/kernel/paths.d.ts +90 -0
- package/build/kernel/paths.js +240 -0
- package/build/kernel/resolve_deps.d.ts +12 -0
- package/build/kernel/resolve_deps.js +14 -0
- package/build/kernel/smart_patcher.d.ts +52 -0
- package/build/kernel/smart_patcher.js +221 -0
- package/build/kernel/sys_admin_types.d.ts +34 -0
- package/build/kernel/sys_admin_types.js +7 -0
- package/build/license-manager.d.ts +0 -0
- package/build/license-manager.js +0 -0
- package/build/mapper-worker/client.d.ts +0 -0
- package/build/mapper-worker/client.js +5 -4
- package/build/mapper-worker/index.d.ts +0 -0
- package/build/mapper-worker/index.js +0 -0
- package/build/mapper-worker/pool.d.ts +1 -1
- package/build/mapper-worker/pool.js +46 -48
- package/build/mapper-worker/server.d.ts +0 -0
- package/build/mapper-worker/server.js +7 -8
- package/build/mapper-worker/types.d.ts +0 -0
- package/build/mapper-worker/types.js +2 -1
- package/build/mcp/a2a/envelope.d.ts +36 -0
- package/build/mcp/a2a/envelope.js +82 -0
- package/build/mcp/a2a/executor/actions.d.ts +39 -0
- package/build/mcp/a2a/executor/actions.js +218 -0
- package/build/mcp/a2a/executor/dry_run.d.ts +51 -0
- package/build/mcp/a2a/executor/dry_run.js +117 -0
- package/build/mcp/a2a/executor/handler.d.ts +23 -0
- package/build/mcp/a2a/executor/handler.js +125 -0
- package/build/mcp/a2a/executor/index.d.ts +3 -0
- package/build/mcp/a2a/executor/index.js +8 -0
- package/build/mcp/a2a/gate/index.d.ts +3 -0
- package/build/mcp/a2a/gate/index.js +15 -0
- package/build/mcp/a2a/gate/types.d.ts +106 -0
- package/build/mcp/a2a/gate/types.js +68 -0
- package/build/mcp/a2a/gate/verdict.d.ts +69 -0
- package/build/mcp/a2a/gate/verdict.js +286 -0
- package/build/mcp/a2a/history/builder.d.ts +78 -0
- package/build/mcp/a2a/history/builder.js +399 -0
- package/build/mcp/a2a/history/index.d.ts +6 -0
- package/build/mcp/a2a/history/index.js +6 -0
- package/build/mcp/a2a/history/types.d.ts +185 -0
- package/build/mcp/a2a/history/types.js +5 -0
- package/build/mcp/a2a/index.d.ts +7 -0
- package/build/mcp/a2a/index.js +13 -0
- package/build/mcp/a2a/intent/constitutional.d.ts +41 -0
- package/build/mcp/a2a/intent/constitutional.js +187 -0
- package/build/mcp/a2a/intent/converter.d.ts +23 -0
- package/build/mcp/a2a/intent/converter.js +32 -0
- package/build/mcp/a2a/intent/index.d.ts +13 -0
- package/build/mcp/a2a/intent/index.js +13 -0
- package/build/mcp/a2a/intent/interpreter.d.ts +51 -0
- package/build/mcp/a2a/intent/interpreter.js +341 -0
- package/build/mcp/a2a/intent/loader.d.ts +20 -0
- package/build/mcp/a2a/intent/loader.js +54 -0
- package/build/mcp/a2a/intent/project_intent.d.ts +54 -0
- package/build/mcp/a2a/intent/project_intent.js +221 -0
- package/build/mcp/a2a/intent/types.d.ts +156 -0
- package/build/mcp/a2a/intent/types.js +12 -0
- package/build/mcp/a2a/observer/hooks.d.ts +15 -0
- package/build/mcp/a2a/observer/hooks.js +35 -6
- package/build/mcp/a2a/observer/index.d.ts +5 -0
- package/build/mcp/a2a/observer/index.js +6 -0
- package/build/mcp/a2a/observer/logger.d.ts +0 -0
- package/build/mcp/a2a/observer/logger.js +2 -1
- package/build/mcp/a2a/observer/types.d.ts +1 -1
- package/build/mcp/a2a/observer/types.js +0 -0
- package/build/mcp/a2a/oracle/index.d.ts +3 -0
- package/build/mcp/a2a/oracle/index.js +5 -0
- package/build/mcp/a2a/oracle/oracle.d.ts +35 -0
- package/build/mcp/a2a/oracle/oracle.js +253 -0
- package/build/mcp/a2a/oracle/types.d.ts +108 -0
- package/build/mcp/a2a/oracle/types.js +10 -0
- package/build/mcp/a2a/orchestrator/index.d.ts +4 -0
- package/build/mcp/a2a/orchestrator/index.js +11 -0
- package/build/mcp/a2a/orchestrator/loop.d.ts +0 -0
- package/build/mcp/a2a/orchestrator/loop.js +2 -1
- package/build/mcp/a2a/orchestrator/ralph-audit.d.ts +0 -0
- package/build/mcp/a2a/orchestrator/ralph-audit.js +0 -0
- package/build/mcp/a2a/orchestrator/ralph-runner.d.ts +0 -0
- package/build/mcp/a2a/orchestrator/ralph-runner.js +0 -0
- package/build/mcp/a2a/orchestrator/rewind-actions.d.ts +2 -2
- package/build/mcp/a2a/orchestrator/rewind-actions.js +39 -27
- package/build/mcp/a2a/state/index.d.ts +6 -0
- package/build/mcp/a2a/state/index.js +6 -0
- package/build/mcp/a2a/state/manager.d.ts +105 -0
- package/build/mcp/a2a/state/manager.js +565 -0
- package/build/mcp/a2a/state/types.d.ts +179 -0
- package/build/mcp/a2a/state/types.js +46 -0
- package/build/mcp/a2a/types.d.ts +23 -1
- package/build/mcp/a2a/types.js +0 -0
- package/build/mcp/agents/catalog_loader.d.ts +23 -0
- package/build/mcp/agents/catalog_loader.js +168 -0
- package/build/mcp/agents/checksum.d.ts +30 -0
- package/build/mcp/agents/checksum.js +51 -0
- package/build/mcp/agents/dependency_resolver.d.ts +34 -0
- package/build/mcp/agents/dependency_resolver.js +109 -0
- package/build/mcp/agents/dispatcher.d.ts +33 -0
- package/build/mcp/agents/dispatcher.js +168 -0
- package/build/mcp/agents/feedback_loop.d.ts +84 -0
- package/build/mcp/agents/feedback_loop.js +241 -0
- package/build/mcp/agents/index.d.ts +13 -0
- package/build/mcp/agents/index.js +18 -0
- package/build/mcp/agents/lifecycle_monitor.d.ts +59 -0
- package/build/mcp/agents/lifecycle_monitor.js +189 -0
- package/build/mcp/agents/manifest_validator.d.ts +31 -0
- package/build/mcp/agents/manifest_validator.js +120 -0
- package/build/mcp/agents/oppa_router.d.ts +44 -0
- package/build/mcp/agents/oppa_router.js +134 -0
- package/build/mcp/agents/tool_executor.d.ts +22 -0
- package/build/mcp/agents/tool_executor.js +82 -0
- package/build/mcp/agents/types.d.ts +139 -0
- package/build/mcp/agents/types.js +7 -0
- package/build/mcp/agents/workflow_engine.d.ts +25 -0
- package/build/mcp/agents/workflow_engine.js +226 -0
- package/build/mcp/ai-native/discover.d.ts +41 -0
- package/build/mcp/ai-native/discover.js +69 -0
- package/build/mcp/ai-native/envelope.d.ts +47 -0
- package/build/mcp/ai-native/envelope.js +70 -0
- package/build/mcp/ai-native/health.d.ts +33 -0
- package/build/mcp/ai-native/health.js +97 -0
- package/build/mcp/ai-native/index.d.ts +7 -0
- package/build/mcp/ai-native/index.js +7 -0
- package/build/mcp/ai-native/next_action.d.ts +53 -0
- package/build/mcp/ai-native/next_action.js +133 -0
- package/build/mcp/airlock/airlock.d.ts +0 -0
- package/build/mcp/airlock/airlock.js +0 -0
- package/build/mcp/airlock/index.d.ts +0 -0
- package/build/mcp/airlock/index.js +0 -0
- package/build/mcp/airlock/policy.d.ts +2 -2
- package/build/mcp/airlock/policy.js +6 -6
- package/build/mcp/airlock/redact.d.ts +0 -0
- package/build/mcp/airlock/redact.js +0 -0
- package/build/mcp/airlock/report.d.ts +1 -1
- package/build/mcp/airlock/report.js +25 -25
- package/build/mcp/airlock/types.d.ts +0 -0
- package/build/mcp/airlock/types.js +0 -0
- package/build/mcp/auth/gate.d.ts +0 -0
- package/build/mcp/auth/gate.js +0 -0
- package/build/mcp/auth/index.d.ts +0 -0
- package/build/mcp/auth/index.js +0 -0
- package/build/mcp/auth/public_key.d.ts +0 -0
- package/build/mcp/auth/public_key.js +0 -0
- package/build/mcp/auth/token_cache.d.ts +0 -0
- package/build/mcp/auth/token_cache.js +2 -1
- package/build/mcp/auth/token_verifier.d.ts +0 -0
- package/build/mcp/auth/token_verifier.js +0 -0
- package/build/mcp/bootstrap/doctor.d.ts +0 -0
- package/build/mcp/bootstrap/doctor.js +3 -3
- package/build/mcp/bootstrap/installer.d.ts +12 -33
- package/build/mcp/bootstrap/installer.js +244 -674
- package/build/mcp/bootstrap/installer_env.d.ts +19 -0
- package/build/mcp/bootstrap/installer_env.js +128 -0
- package/build/mcp/bootstrap/installer_network.d.ts +24 -0
- package/build/mcp/bootstrap/installer_network.js +192 -0
- package/build/mcp/bootstrap/installer_version.d.ts +54 -0
- package/build/mcp/bootstrap/installer_version.js +163 -0
- package/build/mcp/bootstrap/lock.d.ts +0 -0
- package/build/mcp/bootstrap/lock.js +0 -0
- package/build/mcp/bootstrap/platform.d.ts +0 -0
- package/build/mcp/bootstrap/platform.js +0 -0
- package/build/mcp/bootstrap/registry.d.ts +12 -0
- package/build/mcp/bootstrap/registry.js +53 -4
- package/build/mcp/bootstrap/skills-installer.d.ts +15 -15
- package/build/mcp/bootstrap/skills-installer.js +115 -102
- package/build/mcp/cache/index.d.ts +0 -0
- package/build/mcp/cache/index.js +0 -0
- package/build/mcp/chunking/artifacts.d.ts +44 -4
- package/build/mcp/chunking/artifacts.js +120 -21
- package/build/mcp/chunking/chunking.d.ts +37 -1
- package/build/mcp/chunking/chunking.js +108 -24
- package/build/mcp/chunking/index.d.ts +0 -0
- package/build/mcp/chunking/index.js +0 -0
- package/build/mcp/chunking/policy.d.ts +3 -3
- package/build/mcp/chunking/policy.js +11 -11
- package/build/mcp/chunking/types.d.ts +0 -0
- package/build/mcp/chunking/types.js +0 -0
- package/build/mcp/cli.d.ts +0 -0
- package/build/mcp/cli.js +17 -1
- package/build/mcp/cockpit-bridge/client.d.ts +85 -2
- package/build/mcp/cockpit-bridge/client.js +170 -9
- package/build/mcp/cockpit-bridge/index.d.ts +0 -0
- package/build/mcp/cockpit-bridge/index.js +2 -1
- package/build/mcp/cockpit-bridge/tools/command.d.ts +25 -1
- package/build/mcp/cockpit-bridge/tools/command.js +26 -4
- package/build/mcp/cockpit-bridge/tools/decide.d.ts +0 -0
- package/build/mcp/cockpit-bridge/tools/decide.js +0 -0
- package/build/mcp/cockpit-bridge/tools/gate_result.d.ts +19 -0
- package/build/mcp/cockpit-bridge/tools/gate_result.js +64 -0
- package/build/mcp/cockpit-bridge/tools/index.d.ts +1 -0
- package/build/mcp/cockpit-bridge/tools/index.js +3 -0
- package/build/mcp/cockpit-bridge/tools/manual.d.ts +0 -0
- package/build/mcp/cockpit-bridge/tools/manual.js +2 -2
- package/build/mcp/cockpit-bridge/tools/prompt.d.ts +0 -0
- package/build/mcp/cockpit-bridge/tools/prompt.js +0 -0
- package/build/mcp/cockpit-bridge/tools/status.d.ts +0 -0
- package/build/mcp/cockpit-bridge/tools/status.js +0 -0
- package/build/mcp/contracts.d.ts +4 -4
- package/build/mcp/contracts.js +0 -0
- package/build/mcp/engine/deps.d.ts +12 -0
- package/build/mcp/engine/deps.js +19 -0
- package/build/mcp/engine/lazy.d.ts +5 -0
- package/build/mcp/engine/lazy.js +32 -0
- package/build/mcp/engine.d.ts +4 -3
- package/build/mcp/engine.js +79 -38
- package/build/mcp/errors.d.ts +21 -0
- package/build/mcp/errors.js +36 -0
- package/build/mcp/events/constants.d.ts +7 -0
- package/build/mcp/events/constants.js +8 -0
- package/build/mcp/events/dedup_cooldown.d.ts +0 -0
- package/build/mcp/events/dedup_cooldown.js +0 -0
- package/build/mcp/events/dedup_registry.d.ts +3 -0
- package/build/mcp/events/dedup_registry.js +25 -0
- package/build/mcp/events/emitter.d.ts +5 -2
- package/build/mcp/events/emitter.js +16 -10
- package/build/mcp/events/event_loop.d.ts +2 -1
- package/build/mcp/events/event_loop.js +94 -89
- package/build/mcp/events/index.d.ts +10 -11
- package/build/mcp/events/index.js +10 -11
- package/build/mcp/events/logger.d.ts +0 -0
- package/build/mcp/events/logger.js +0 -0
- package/build/mcp/events/mq.d.ts +2 -1
- package/build/mcp/events/mq.js +2 -2
- package/build/mcp/events/mq_nats.d.ts +0 -0
- package/build/mcp/events/mq_nats.js +3 -2
- package/build/mcp/events/mq_redis.d.ts +0 -0
- package/build/mcp/events/mq_redis.js +2 -1
- package/build/mcp/events/nav_refresh.d.ts +0 -0
- package/build/mcp/events/nav_refresh.js +15 -15
- package/build/mcp/events/processor.d.ts +2 -2
- package/build/mcp/events/processor.js +56 -24
- package/build/mcp/events/replay.d.ts +0 -0
- package/build/mcp/events/replay.js +0 -0
- package/build/mcp/events/types.d.ts +7 -4
- package/build/mcp/events/types.js +2 -2
- package/build/mcp/generated/activate_input.d.ts +0 -0
- package/build/mcp/generated/activate_input.js +0 -0
- package/build/mcp/generated/activate_output.d.ts +2 -2
- package/build/mcp/generated/activate_output.js +0 -0
- package/build/mcp/generated/advisory_review_input.d.ts +6 -6
- package/build/mcp/generated/advisory_review_input.js +0 -0
- package/build/mcp/generated/advisory_review_output.d.ts +0 -0
- package/build/mcp/generated/advisory_review_output.js +0 -0
- package/build/mcp/generated/auth_token_file.d.ts +0 -0
- package/build/mcp/generated/auth_token_file.js +0 -0
- package/build/mcp/generated/autopilot_policy.d.ts +0 -0
- package/build/mcp/generated/autopilot_policy.js +0 -0
- package/build/mcp/generated/bee_output.d.ts +59 -0
- package/build/mcp/generated/bee_output.js +36 -0
- package/build/mcp/generated/bitnet_signal.d.ts +18 -18
- package/build/mcp/generated/bitnet_signal.js +0 -0
- package/build/mcp/generated/bridge_build_seed_input.d.ts +0 -0
- package/build/mcp/generated/bridge_build_seed_input.js +0 -0
- package/build/mcp/generated/bridge_build_seed_output.d.ts +2 -2
- package/build/mcp/generated/bridge_build_seed_output.js +0 -0
- package/build/mcp/generated/bridge_confirm_reference_input.d.ts +0 -0
- package/build/mcp/generated/bridge_confirm_reference_input.js +0 -0
- package/build/mcp/generated/bridge_confirm_reference_output.d.ts +2 -2
- package/build/mcp/generated/bridge_confirm_reference_output.js +0 -0
- package/build/mcp/generated/bridge_confirmed_reference_file.d.ts +4 -4
- package/build/mcp/generated/bridge_confirmed_reference_file.js +0 -0
- package/build/mcp/generated/bridge_generate_references_input.d.ts +4 -4
- package/build/mcp/generated/bridge_generate_references_input.js +0 -0
- package/build/mcp/generated/bridge_generate_references_output.d.ts +2 -2
- package/build/mcp/generated/bridge_generate_references_output.js +0 -0
- package/build/mcp/generated/bridge_references_file.d.ts +10 -10
- package/build/mcp/generated/bridge_references_file.js +0 -0
- package/build/mcp/generated/bridge_work_order_seed_file.d.ts +2 -2
- package/build/mcp/generated/bridge_work_order_seed_file.js +0 -0
- package/build/mcp/generated/briefing_input.d.ts +0 -0
- package/build/mcp/generated/briefing_input.js +0 -0
- package/build/mcp/generated/briefing_output.d.ts +2 -2
- package/build/mcp/generated/briefing_output.js +0 -0
- package/build/mcp/generated/clinic_bridge_file.d.ts +0 -0
- package/build/mcp/generated/clinic_bridge_file.js +0 -0
- package/build/mcp/generated/contracts_bundle_info.d.ts +0 -0
- package/build/mcp/generated/contracts_bundle_info.js +0 -0
- package/build/mcp/generated/create_work_order_input.d.ts +0 -0
- package/build/mcp/generated/create_work_order_input.js +0 -0
- package/build/mcp/generated/create_work_order_output.d.ts +20 -20
- package/build/mcp/generated/create_work_order_output.js +0 -0
- package/build/mcp/generated/current_work_order_file.d.ts +0 -0
- package/build/mcp/generated/current_work_order_file.js +0 -0
- package/build/mcp/generated/deps_drift_report.d.ts +6 -6
- package/build/mcp/generated/deps_drift_report.js +0 -0
- package/build/mcp/generated/deps_scan.d.ts +24 -24
- package/build/mcp/generated/deps_scan.js +0 -0
- package/build/mcp/generated/doctor_input.d.ts +8 -2
- package/build/mcp/generated/doctor_input.js +1 -1
- package/build/mcp/generated/doctor_output.d.ts +14 -14
- package/build/mcp/generated/doctor_output.js +0 -0
- package/build/mcp/generated/execution_result.d.ts +12 -12
- package/build/mcp/generated/execution_result.js +0 -0
- package/build/mcp/generated/execution_task.d.ts +12 -12
- package/build/mcp/generated/execution_task.js +0 -0
- package/build/mcp/generated/export_output_input.d.ts +1 -1
- package/build/mcp/generated/export_output_input.js +0 -0
- package/build/mcp/generated/export_output_output.d.ts +6 -6
- package/build/mcp/generated/export_output_output.js +0 -0
- package/build/mcp/generated/finalize_work_input.d.ts +0 -0
- package/build/mcp/generated/finalize_work_input.js +0 -0
- package/build/mcp/generated/finalize_work_output.d.ts +0 -0
- package/build/mcp/generated/finalize_work_output.js +0 -0
- package/build/mcp/generated/gate_input.d.ts +0 -0
- package/build/mcp/generated/gate_input.js +0 -0
- package/build/mcp/generated/gate_output.d.ts +4 -4
- package/build/mcp/generated/gate_output.js +0 -0
- package/build/mcp/generated/gate_result_v1.d.ts +4 -4
- package/build/mcp/generated/gate_result_v1.js +0 -0
- package/build/mcp/generated/get_decision_input.d.ts +0 -0
- package/build/mcp/generated/get_decision_input.js +0 -0
- package/build/mcp/generated/get_decision_output.d.ts +24 -1
- package/build/mcp/generated/get_decision_output.js +45 -7
- package/build/mcp/generated/get_semantic_complexity_input.d.ts +0 -0
- package/build/mcp/generated/get_semantic_complexity_input.js +0 -0
- package/build/mcp/generated/get_semantic_complexity_output.d.ts +2 -2
- package/build/mcp/generated/get_semantic_complexity_output.js +0 -0
- package/build/mcp/generated/handoff_to_clinic.d.ts +0 -0
- package/build/mcp/generated/handoff_to_clinic.js +0 -0
- package/build/mcp/generated/index.d.ts +0 -0
- package/build/mcp/generated/index.js +0 -0
- package/build/mcp/generated/ingress_input.d.ts +0 -0
- package/build/mcp/generated/ingress_input.js +0 -0
- package/build/mcp/generated/ingress_output.d.ts +2 -2
- package/build/mcp/generated/ingress_output.js +0 -0
- package/build/mcp/generated/ingress_resolution_file.d.ts +0 -0
- package/build/mcp/generated/ingress_resolution_file.js +0 -0
- package/build/mcp/generated/ingress_summary_file.d.ts +0 -0
- package/build/mcp/generated/ingress_summary_file.js +0 -0
- package/build/mcp/generated/inspect_code_input.d.ts +5 -2
- package/build/mcp/generated/inspect_code_input.js +1 -1
- package/build/mcp/generated/inspect_code_output.d.ts +6 -6
- package/build/mcp/generated/inspect_code_output.js +0 -0
- package/build/mcp/generated/memory_retrieve_input.d.ts +0 -0
- package/build/mcp/generated/memory_retrieve_input.js +0 -0
- package/build/mcp/generated/memory_retrieve_output.d.ts +0 -0
- package/build/mcp/generated/memory_retrieve_output.js +0 -0
- package/build/mcp/generated/memory_state_file.d.ts +0 -0
- package/build/mcp/generated/memory_state_file.js +0 -0
- package/build/mcp/generated/memory_status_input.d.ts +0 -0
- package/build/mcp/generated/memory_status_input.js +0 -0
- package/build/mcp/generated/memory_status_output.d.ts +2 -2
- package/build/mcp/generated/memory_status_output.js +0 -0
- package/build/mcp/generated/memory_sync_input.d.ts +0 -0
- package/build/mcp/generated/memory_sync_input.js +0 -0
- package/build/mcp/generated/memory_sync_output.d.ts +8 -8
- package/build/mcp/generated/memory_sync_output.js +0 -0
- package/build/mcp/generated/message_template_id_mapping_file.d.ts +2 -2
- package/build/mcp/generated/message_template_id_mapping_file.js +0 -0
- package/build/mcp/generated/observer_event_map.d.ts +18 -18
- package/build/mcp/generated/observer_event_map.js +0 -0
- package/build/mcp/generated/ose_expand_input.d.ts +2 -2
- package/build/mcp/generated/ose_expand_input.js +0 -0
- package/build/mcp/generated/ose_expand_output.d.ts +0 -0
- package/build/mcp/generated/ose_expand_output.js +0 -0
- package/build/mcp/generated/oss_candidates_file.d.ts +12 -12
- package/build/mcp/generated/oss_candidates_file.js +0 -0
- package/build/mcp/generated/oss_decisions_file.d.ts +0 -0
- package/build/mcp/generated/oss_decisions_file.js +0 -0
- package/build/mcp/generated/oss_snippets_file.d.ts +16 -16
- package/build/mcp/generated/oss_snippets_file.js +0 -0
- package/build/mcp/generated/plugin_result.d.ts +0 -0
- package/build/mcp/generated/plugin_result.js +0 -0
- package/build/mcp/generated/react_perf_check_patterns_input.d.ts +2 -2
- package/build/mcp/generated/react_perf_check_patterns_input.js +0 -0
- package/build/mcp/generated/react_perf_check_patterns_output.d.ts +8 -8
- package/build/mcp/generated/react_perf_check_patterns_output.js +0 -0
- package/build/mcp/generated/react_perf_generate_report_input.d.ts +0 -0
- package/build/mcp/generated/react_perf_generate_report_input.js +0 -0
- package/build/mcp/generated/react_perf_generate_report_output.d.ts +6 -6
- package/build/mcp/generated/react_perf_generate_report_output.js +0 -0
- package/build/mcp/generated/read_file_input.d.ts +0 -0
- package/build/mcp/generated/read_file_input.js +0 -0
- package/build/mcp/generated/read_file_output.d.ts +8 -8
- package/build/mcp/generated/read_file_output.js +0 -0
- package/build/mcp/generated/repair_analysis_engine_input.d.ts +0 -0
- package/build/mcp/generated/repair_analysis_engine_input.js +0 -0
- package/build/mcp/generated/repair_analysis_engine_output.d.ts +2 -2
- package/build/mcp/generated/repair_analysis_engine_output.js +0 -0
- package/build/mcp/generated/repair_plan_input.d.ts +0 -0
- package/build/mcp/generated/repair_plan_input.js +0 -0
- package/build/mcp/generated/repair_plan_output.d.ts +2 -2
- package/build/mcp/generated/repair_plan_output.js +0 -0
- package/build/mcp/generated/run_app_input.d.ts +4 -4
- package/build/mcp/generated/run_app_input.js +0 -0
- package/build/mcp/generated/run_app_output.d.ts +4 -4
- package/build/mcp/generated/run_app_output.js +0 -0
- package/build/mcp/generated/run_state_file.d.ts +0 -0
- package/build/mcp/generated/run_state_file.js +0 -0
- package/build/mcp/generated/scaffold_input.d.ts +2 -2
- package/build/mcp/generated/scaffold_input.js +0 -0
- package/build/mcp/generated/scaffold_output.d.ts +0 -0
- package/build/mcp/generated/scaffold_output.js +0 -0
- package/build/mcp/generated/scout_input.d.ts +27 -0
- package/build/mcp/generated/scout_input.js +21 -0
- package/build/mcp/generated/scout_output.d.ts +33 -0
- package/build/mcp/generated/scout_output.js +20 -0
- package/build/mcp/generated/search_oss_input.d.ts +2 -2
- package/build/mcp/generated/search_oss_input.js +0 -0
- package/build/mcp/generated/search_oss_output.d.ts +12 -12
- package/build/mcp/generated/search_oss_output.js +0 -0
- package/build/mcp/generated/selection_validation_result.d.ts +4 -4
- package/build/mcp/generated/selection_validation_result.js +0 -0
- package/build/mcp/generated/signal_agent_input.d.ts +0 -0
- package/build/mcp/generated/signal_agent_input.js +0 -0
- package/build/mcp/generated/skillpack_file.d.ts +18 -18
- package/build/mcp/generated/skillpack_file.js +0 -0
- package/build/mcp/generated/skills_input.d.ts +2 -2
- package/build/mcp/generated/skills_input.js +0 -0
- package/build/mcp/generated/skills_output.d.ts +20 -20
- package/build/mcp/generated/skills_output.js +0 -0
- package/build/mcp/generated/spec_expansion_file.d.ts +12 -12
- package/build/mcp/generated/spec_expansion_file.js +0 -0
- package/build/mcp/generated/spec_high_ask_queue_items_file.d.ts +35 -35
- package/build/mcp/generated/spec_high_ask_queue_items_file.js +0 -0
- package/build/mcp/generated/spec_high_clinic_bridge_output.d.ts +0 -0
- package/build/mcp/generated/spec_high_clinic_bridge_output.js +0 -0
- package/build/mcp/generated/spec_high_decision_draft_output.d.ts +0 -0
- package/build/mcp/generated/spec_high_decision_draft_output.js +0 -0
- package/build/mcp/generated/spec_high_validate_output.d.ts +2 -2
- package/build/mcp/generated/spec_high_validate_output.js +0 -0
- package/build/mcp/generated/status_input.d.ts +0 -0
- package/build/mcp/generated/status_input.js +0 -0
- package/build/mcp/generated/status_output.d.ts +100 -67
- package/build/mcp/generated/status_output.js +142 -65
- package/build/mcp/generated/submit_decision_input.d.ts +9 -0
- package/build/mcp/generated/submit_decision_input.js +1 -1
- package/build/mcp/generated/submit_decision_output.d.ts +2 -2
- package/build/mcp/generated/submit_decision_output.js +0 -0
- package/build/mcp/generated/tool_error_output.d.ts +2 -2
- package/build/mcp/generated/tool_error_output.js +0 -0
- package/build/mcp/generated/undo_last_task_input.d.ts +0 -0
- package/build/mcp/generated/undo_last_task_input.js +0 -0
- package/build/mcp/generated/undo_last_task_output.d.ts +0 -0
- package/build/mcp/generated/undo_last_task_output.js +0 -0
- package/build/mcp/generated/update_input.d.ts +2 -2
- package/build/mcp/generated/update_input.js +0 -0
- package/build/mcp/generated/update_output.d.ts +8 -8
- package/build/mcp/generated/update_output.js +0 -0
- package/build/mcp/generated/verification_steps.d.ts +20 -20
- package/build/mcp/generated/verification_steps.js +0 -0
- package/build/mcp/generated/vibe_pm_inspection_result.d.ts +0 -0
- package/build/mcp/generated/vibe_pm_inspection_result.js +0 -0
- package/build/mcp/generated/vibe_pm_report_markdown.d.ts +0 -0
- package/build/mcp/generated/vibe_pm_report_markdown.js +0 -0
- package/build/mcp/generated/vibe_pm_verdict.d.ts +2 -2
- package/build/mcp/generated/vibe_pm_verdict.js +0 -0
- package/build/mcp/generated/vibe_repo_config.d.ts +22 -22
- package/build/mcp/generated/vibe_repo_config.js +0 -0
- package/build/mcp/generated/vibecoding_helper_answer_output.d.ts +0 -0
- package/build/mcp/generated/vibecoding_helper_answer_output.js +0 -0
- package/build/mcp/generated/vibecoding_helper_one_loop_selection_output.d.ts +10 -10
- package/build/mcp/generated/vibecoding_helper_one_loop_selection_output.js +0 -0
- package/build/mcp/generated/vibecoding_helper_show_ask_queue_output.d.ts +8 -8
- package/build/mcp/generated/vibecoding_helper_show_ask_queue_output.js +0 -0
- package/build/mcp/generated/work_order_v1.d.ts +0 -0
- package/build/mcp/generated/work_order_v1.js +0 -0
- package/build/mcp/generated/zoekt_evidence_input.d.ts +0 -0
- package/build/mcp/generated/zoekt_evidence_input.js +0 -0
- package/build/mcp/generated/zoekt_evidence_output.d.ts +2 -2
- package/build/mcp/generated/zoekt_evidence_output.js +0 -0
- package/build/mcp/hive-bridge/client.d.ts +19 -0
- package/build/mcp/hive-bridge/client.js +40 -0
- package/build/mcp/hive-bridge/index.d.ts +9 -0
- package/build/mcp/hive-bridge/index.js +9 -0
- package/build/mcp/hive-bridge/tools/file_list.d.ts +31 -0
- package/build/mcp/hive-bridge/tools/file_list.js +35 -0
- package/build/mcp/hive-bridge/tools/file_read.d.ts +31 -0
- package/build/mcp/hive-bridge/tools/file_read.js +35 -0
- package/build/mcp/hive-bridge/tools/index.d.ts +13 -0
- package/build/mcp/hive-bridge/tools/index.js +15 -0
- package/build/mcp/hive-bridge/tools/nodes.d.ts +19 -0
- package/build/mcp/hive-bridge/tools/nodes.js +30 -0
- package/build/mcp/hive-bridge/tools/run_command.d.ts +36 -0
- package/build/mcp/hive-bridge/tools/run_command.js +39 -0
- package/build/mcp/hive-bridge/tools/submit_job.d.ts +36 -0
- package/build/mcp/hive-bridge/tools/submit_job.js +40 -0
- package/build/mcp/index.d.ts +0 -0
- package/build/mcp/index.js +118 -55
- package/build/mcp/legacy_alias.d.ts +0 -0
- package/build/mcp/legacy_alias.js +0 -0
- package/build/mcp/mcp-logger.d.ts +13 -0
- package/build/mcp/mcp-logger.js +18 -0
- package/build/mcp/metrics/collector.d.ts +27 -0
- package/build/mcp/metrics/collector.js +19 -3
- package/build/mcp/metrics/index.d.ts +2 -1
- package/build/mcp/metrics/index.js +1 -1
- package/build/mcp/metrics/server.d.ts +0 -0
- package/build/mcp/metrics/server.js +8 -1
- package/build/mcp/metrics/types.d.ts +0 -0
- package/build/mcp/metrics/types.js +0 -0
- package/build/mcp/musu-bridge/client.d.ts +13 -0
- package/build/mcp/musu-bridge/client.js +53 -0
- package/build/mcp/musu-bridge/index.d.ts +9 -0
- package/build/mcp/musu-bridge/index.js +9 -0
- package/build/mcp/musu-bridge/tools/dispatch.d.ts +36 -0
- package/build/mcp/musu-bridge/tools/dispatch.js +38 -0
- package/build/mcp/musu-bridge/tools/fleet.d.ts +26 -0
- package/build/mcp/musu-bridge/tools/fleet.js +27 -0
- package/build/mcp/musu-bridge/tools/gateway.d.ts +19 -0
- package/build/mcp/musu-bridge/tools/gateway.js +21 -0
- package/build/mcp/musu-bridge/tools/index.d.ts +14 -0
- package/build/mcp/musu-bridge/tools/index.js +17 -0
- package/build/mcp/musu-bridge/tools/knowledge.d.ts +31 -0
- package/build/mcp/musu-bridge/tools/knowledge.js +33 -0
- package/build/mcp/musu-bridge/tools/run.d.ts +31 -0
- package/build/mcp/musu-bridge/tools/run.js +33 -0
- package/build/mcp/musu-bridge/tools/status.d.ts +19 -0
- package/build/mcp/musu-bridge/tools/status.js +21 -0
- package/build/mcp/packs/catalog.d.ts +23 -0
- package/build/mcp/packs/catalog.js +115 -0
- package/build/mcp/packs/index.d.ts +2 -0
- package/build/mcp/packs/index.js +2 -0
- package/build/mcp/packs/resolver.d.ts +9 -0
- package/build/mcp/packs/resolver.js +38 -0
- package/build/mcp/path-utils.d.ts +0 -0
- package/build/mcp/path-utils.js +0 -0
- package/build/mcp/policy/context.d.ts +7 -0
- package/build/mcp/policy/context.js +8 -0
- package/build/mcp/policy/index.d.ts +0 -0
- package/build/mcp/policy/index.js +0 -0
- package/build/mcp/policy/loader.d.ts +0 -0
- package/build/mcp/policy/loader.js +0 -0
- package/build/mcp/policy/requirements.d.ts +16 -0
- package/build/mcp/policy/requirements.js +19 -0
- package/build/mcp/policy/schema.d.ts +70 -70
- package/build/mcp/policy/schema.js +0 -0
- package/build/mcp/policy/unified.d.ts +14 -0
- package/build/mcp/policy/unified.js +148 -0
- package/build/mcp/preprocess.d.ts +0 -0
- package/build/mcp/preprocess.js +0 -0
- package/build/mcp/profile-config.d.ts +18 -3
- package/build/mcp/profile-config.js +107 -57
- package/build/mcp/progress.d.ts +14 -0
- package/build/mcp/progress.js +39 -0
- package/build/mcp/prompts/agent_personas.d.ts +9 -0
- package/build/mcp/prompts/agent_personas.js +140 -0
- package/build/mcp/prompts/prime_persona.d.ts +11 -0
- package/build/mcp/prompts/prime_persona.js +92 -0
- package/build/mcp/prompts/vibe.d.ts +2 -0
- package/build/mcp/prompts/vibe.js +62 -0
- package/build/mcp/recipe/catalog.d.ts +3 -0
- package/build/mcp/recipe/catalog.js +30 -0
- package/build/mcp/recipe/index.d.ts +4 -0
- package/build/mcp/recipe/index.js +3 -0
- package/build/mcp/recipe/renderer.d.ts +2 -0
- package/build/mcp/recipe/renderer.js +138 -0
- package/build/mcp/recipe/types.d.ts +98 -0
- package/build/mcp/recipe/types.js +42 -0
- package/build/mcp/resources/vibe.d.ts +2 -0
- package/build/mcp/resources/vibe.js +104 -0
- package/build/mcp/router/artifacts.d.ts +2 -2
- package/build/mcp/router/artifacts.js +11 -11
- package/build/mcp/router/decide.d.ts +0 -0
- package/build/mcp/router/decide.js +0 -0
- package/build/mcp/router/index.d.ts +0 -0
- package/build/mcp/router/index.js +0 -0
- package/build/mcp/router/rules.d.ts +2 -2
- package/build/mcp/router/rules.js +7 -7
- package/build/mcp/router/types.d.ts +0 -0
- package/build/mcp/router/types.js +0 -0
- package/build/mcp/run-retention.d.ts +0 -0
- package/build/mcp/run-retention.js +10 -10
- package/build/mcp/runtime/engine_http_client.d.ts +20 -0
- package/build/mcp/runtime/engine_http_client.js +66 -0
- package/build/mcp/runtime/helper_commands.d.ts +0 -0
- package/build/mcp/runtime/helper_commands.js +0 -0
- package/build/mcp/runtime/helper_invoker.d.ts +1 -1
- package/build/mcp/runtime/helper_invoker.js +168 -14
- package/build/mcp/runtime/helper_resolver.d.ts +10 -1
- package/build/mcp/runtime/helper_resolver.js +64 -16
- package/build/mcp/runtime/index.d.ts +3 -1
- package/build/mcp/runtime/index.js +3 -1
- package/build/mcp/runtime/vpm_back_client.d.ts +53 -0
- package/build/mcp/runtime/vpm_back_client.js +34 -0
- package/build/mcp/security/input-validator.d.ts +0 -0
- package/build/mcp/security/input-validator.js +0 -0
- package/build/mcp/security/path-policy.d.ts +0 -0
- package/build/mcp/security/path-policy.js +0 -0
- package/build/mcp/security/sandbox.d.ts +9 -6
- package/build/mcp/security/sandbox.js +72 -101
- package/build/mcp/skills/deps.d.ts +11 -0
- package/build/mcp/skills/deps.js +21 -0
- package/build/mcp/skills/lazy.d.ts +14 -0
- package/build/mcp/skills/lazy.js +48 -0
- package/build/mcp/tool-handler-registry.d.ts +28 -0
- package/build/mcp/tool-handler-registry.js +36 -0
- package/build/mcp/tool-registry.d.ts +4 -1
- package/build/mcp/tool-registry.js +323 -44
- package/build/mcp/tools/agents.d.ts +173 -0
- package/build/mcp/tools/agents.js +303 -0
- package/build/mcp/tools/bitnet/api.d.ts +166 -0
- package/build/mcp/tools/bitnet/api.js +519 -0
- package/build/mcp/tools/bitnet/context.d.ts +4 -0
- package/build/mcp/tools/bitnet/context.js +62 -0
- package/build/mcp/tools/bitnet/git.d.ts +1 -0
- package/build/mcp/tools/bitnet/git.js +10 -0
- package/build/mcp/tools/bitnet/index.d.ts +10 -491
- package/build/mcp/tools/bitnet/index.js +11 -746
- package/build/mcp/tools/bitnet/rules.d.ts +4 -0
- package/build/mcp/tools/bitnet/rules.js +175 -0
- package/build/mcp/tools/bitnet/schemas.d.ts +450 -0
- package/build/mcp/tools/bitnet/schemas.js +147 -0
- package/build/mcp/tools/bitnet/scout_diagnosis.d.ts +34 -0
- package/build/mcp/tools/bitnet/scout_diagnosis.js +82 -0
- package/build/mcp/tools/bitnet/trace_store.d.ts +9 -0
- package/build/mcp/tools/bitnet/trace_store.js +91 -0
- package/build/mcp/tools/bitnet/types.d.ts +44 -0
- package/build/mcp/tools/bitnet/types.js +15 -0
- package/build/mcp/tools/shared/boundary_errors.d.ts +33 -0
- package/build/mcp/tools/shared/boundary_errors.js +41 -0
- package/build/mcp/tools/shared/tier_facade.d.ts +55 -0
- package/build/mcp/tools/shared/tier_facade.js +91 -0
- package/build/mcp/tools/templates/apply.d.ts +122 -0
- package/build/mcp/tools/templates/apply.js +173 -0
- package/build/mcp/tools/templates/catalog.d.ts +12 -0
- package/build/mcp/tools/templates/catalog.js +132 -0
- package/build/mcp/tools/templates/detail.d.ts +51 -0
- package/build/mcp/tools/templates/detail.js +58 -0
- package/build/mcp/tools/templates/helpers.d.ts +52 -0
- package/build/mcp/tools/templates/helpers.js +247 -0
- package/build/mcp/tools/templates/index.d.ts +15 -0
- package/build/mcp/tools/templates/index.js +15 -0
- package/build/mcp/tools/templates/list.d.ts +41 -0
- package/build/mcp/tools/templates/list.js +69 -0
- package/build/mcp/tools/templates/run_maintenance.d.ts +68 -0
- package/build/mcp/tools/templates/run_maintenance.js +120 -0
- package/build/mcp/tools/templates/run_recover.d.ts +87 -0
- package/build/mcp/tools/templates/run_recover.js +261 -0
- package/build/mcp/tools/templates/run_start.d.ts +144 -0
- package/build/mcp/tools/templates/run_start.js +140 -0
- package/build/mcp/tools/templates/run_status.d.ts +103 -0
- package/build/mcp/tools/templates/run_status.js +120 -0
- package/build/mcp/tools/templates/screenshot.d.ts +10 -0
- package/build/mcp/tools/templates/screenshot.js +104 -0
- package/build/mcp/tools/templates/types.d.ts +163 -0
- package/build/mcp/tools/templates/types.js +5 -0
- package/build/mcp/tools/templates/validate.d.ts +5 -0
- package/build/mcp/tools/templates/validate.js +82 -0
- package/build/mcp/tools/templates/validate_tool.d.ts +49 -0
- package/build/mcp/tools/templates/validate_tool.js +77 -0
- package/build/mcp/tools/vibe_pm/agent.d.ts +60 -0
- package/build/mcp/tools/vibe_pm/agent.js +973 -0
- package/build/mcp/tools/vibe_pm/ask-queue/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/ask-queue/index.js +0 -0
- package/build/mcp/tools/vibe_pm/ask-queue/loader.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/ask-queue/loader.js +0 -0
- package/build/mcp/tools/vibe_pm/ask-queue/transformer.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/ask-queue/transformer.js +0 -0
- package/build/mcp/tools/vibe_pm/ask-queue/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/ask-queue/types.js +0 -0
- package/build/mcp/tools/vibe_pm/auto-init.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/auto-init.js +2 -1
- package/build/mcp/tools/vibe_pm/autopilot.d.ts +13 -2
- package/build/mcp/tools/vibe_pm/autopilot.js +72 -13
- package/build/mcp/tools/vibe_pm/bitnet-cache.d.ts +6 -7
- package/build/mcp/tools/vibe_pm/bitnet-cache.js +37 -37
- package/build/mcp/tools/vibe_pm/bitnet-ensure.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/bitnet-ensure.js +0 -0
- package/build/mcp/tools/vibe_pm/bitnet-hook-consumer.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/bitnet-hook-consumer.js +4 -3
- package/build/mcp/tools/vibe_pm/bitnet-runner.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/bitnet-runner.js +2 -5
- package/build/mcp/tools/vibe_pm/block_events.d.ts +37 -0
- package/build/mcp/tools/vibe_pm/block_events.js +86 -0
- package/build/mcp/tools/vibe_pm/block_search.d.ts +36 -0
- package/build/mcp/tools/vibe_pm/block_search.js +79 -0
- package/build/mcp/tools/vibe_pm/block_snapshot.d.ts +43 -0
- package/build/mcp/tools/vibe_pm/block_snapshot.js +167 -0
- package/build/mcp/tools/vibe_pm/briefing.d.ts +4 -2
- package/build/mcp/tools/vibe_pm/briefing.js +56 -33
- package/build/mcp/tools/vibe_pm/context.d.ts +1 -1
- package/build/mcp/tools/vibe_pm/context.js +60 -60
- package/build/mcp/tools/vibe_pm/create_work_order.d.ts +2 -2
- package/build/mcp/tools/vibe_pm/create_work_order.js +120 -69
- package/build/mcp/tools/vibe_pm/dashboard.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/dashboard.js +4 -4
- package/build/mcp/tools/vibe_pm/decision-history.d.ts +30 -0
- package/build/mcp/tools/vibe_pm/decision-history.js +58 -0
- package/build/mcp/tools/vibe_pm/decision-log.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/decision-log.js +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/animator.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/animator.js +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/annotations.d.ts +6 -0
- package/build/mcp/tools/vibe_pm/diagrams/annotations.js +102 -0
- package/build/mcp/tools/vibe_pm/diagrams/constants.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/constants.js +66 -66
- package/build/mcp/tools/vibe_pm/diagrams/gate_engine.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/gate_engine.js +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/generator.d.ts +8 -4
- package/build/mcp/tools/vibe_pm/diagrams/generator.js +53 -51
- package/build/mcp/tools/vibe_pm/diagrams/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/index.js +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/manifest.d.ts +5 -2
- package/build/mcp/tools/vibe_pm/diagrams/manifest.js +32 -22
- package/build/mcp/tools/vibe_pm/diagrams/mermaid_generator.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/mermaid_generator.js +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/renderer.d.ts +6 -2
- package/build/mcp/tools/vibe_pm/diagrams/renderer.js +127 -16
- package/build/mcp/tools/vibe_pm/diagrams/types.d.ts +35 -9
- package/build/mcp/tools/vibe_pm/diagrams/types.js +0 -0
- package/build/mcp/tools/vibe_pm/diagrams/unified_verdict.d.ts +24 -0
- package/build/mcp/tools/vibe_pm/diagrams/unified_verdict.js +61 -0
- package/build/mcp/tools/vibe_pm/dirty-scan.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/dirty-scan.js +0 -0
- package/build/mcp/tools/vibe_pm/docs_structure.d.ts +3 -3
- package/build/mcp/tools/vibe_pm/docs_structure.js +22 -20
- package/build/mcp/tools/vibe_pm/doctor.d.ts +26 -2
- package/build/mcp/tools/vibe_pm/doctor.js +290 -28
- package/build/mcp/tools/vibe_pm/engine-errors/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/engine-errors/index.js +0 -0
- package/build/mcp/tools/vibe_pm/engine-errors/normalizer.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/engine-errors/normalizer.js +0 -0
- package/build/mcp/tools/vibe_pm/engine-errors/patterns.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/engine-errors/patterns.js +0 -0
- package/build/mcp/tools/vibe_pm/engine-errors/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/engine-errors/types.js +0 -0
- package/build/mcp/tools/vibe_pm/facts/collector.d.ts +1 -1
- package/build/mcp/tools/vibe_pm/facts/collector.js +56 -56
- package/build/mcp/tools/vibe_pm/facts/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/facts/index.js +0 -0
- package/build/mcp/tools/vibe_pm/facts/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/facts/types.js +0 -0
- package/build/mcp/tools/vibe_pm/failure/classifier.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/failure/classifier.js +0 -0
- package/build/mcp/tools/vibe_pm/failure/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/failure/index.js +0 -0
- package/build/mcp/tools/vibe_pm/failure/loop_diagnose.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/failure/loop_diagnose.js +0 -0
- package/build/mcp/tools/vibe_pm/failure/tracker.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/failure/tracker.js +0 -0
- package/build/mcp/tools/vibe_pm/failure/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/failure/types.js +0 -0
- package/build/mcp/tools/vibe_pm/feature-flags.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/feature-flags.js +0 -0
- package/build/mcp/tools/vibe_pm/flow_policy.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/flow_policy.js +2 -0
- package/build/mcp/tools/vibe_pm/get_decision.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/get_decision.js +2 -1
- package/build/mcp/tools/vibe_pm/get_result.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/get_result.js +0 -0
- package/build/mcp/tools/vibe_pm/human_tools.d.ts +51 -0
- package/build/mcp/tools/vibe_pm/human_tools.js +280 -0
- package/build/mcp/tools/vibe_pm/index.d.ts +566 -245
- package/build/mcp/tools/vibe_pm/index.js +341 -727
- package/build/mcp/tools/vibe_pm/ingress.d.ts +4 -4
- package/build/mcp/tools/vibe_pm/ingress.js +73 -97
- package/build/mcp/tools/vibe_pm/init_docs.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/init_docs.js +2 -2
- package/build/mcp/tools/vibe_pm/inspect_code/cockpit.d.ts +12 -0
- package/build/mcp/tools/vibe_pm/inspect_code/cockpit.js +88 -0
- package/build/mcp/tools/vibe_pm/inspect_code/core.d.ts +16 -0
- package/build/mcp/tools/vibe_pm/inspect_code/core.js +612 -0
- package/build/mcp/tools/vibe_pm/inspect_code/helpers.d.ts +23 -0
- package/build/mcp/tools/vibe_pm/inspect_code/helpers.js +146 -0
- package/build/mcp/tools/vibe_pm/inspect_code/index.d.ts +4 -0
- package/build/mcp/tools/vibe_pm/inspect_code/index.js +4 -0
- package/build/mcp/tools/vibe_pm/inspect_code/tier.d.ts +38 -0
- package/build/mcp/tools/vibe_pm/inspect_code/tier.js +100 -0
- package/build/mcp/tools/vibe_pm/inspect_code/types.d.ts +30 -0
- package/build/mcp/tools/vibe_pm/inspect_code/types.js +4 -0
- package/build/mcp/tools/vibe_pm/intent_parser.d.ts +50 -0
- package/build/mcp/tools/vibe_pm/intent_parser.js +131 -0
- package/build/mcp/tools/vibe_pm/intent_status.d.ts +45 -0
- package/build/mcp/tools/vibe_pm/intent_status.js +64 -0
- package/build/mcp/tools/vibe_pm/knowledge_search.d.ts +22 -0
- package/build/mcp/tools/vibe_pm/knowledge_search.js +51 -0
- package/build/mcp/tools/vibe_pm/mapping/change_map.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/mapping/change_map.js +0 -0
- package/build/mcp/tools/vibe_pm/mapping/diff_scan.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/mapping/diff_scan.js +0 -0
- package/build/mcp/tools/vibe_pm/mapping/gate_judge.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/mapping/gate_judge.js +0 -0
- package/build/mcp/tools/vibe_pm/mapping/import_scan.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/mapping/import_scan.js +0 -0
- package/build/mcp/tools/vibe_pm/mapping/index.d.ts +1 -1
- package/build/mcp/tools/vibe_pm/mapping/index.js +1 -1
- package/build/mcp/tools/vibe_pm/mapping/orchestrator.d.ts +20 -7
- package/build/mcp/tools/vibe_pm/mapping/orchestrator.js +208 -61
- package/build/mcp/tools/vibe_pm/mapping/rebinder/evidence_collector.d.ts +35 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/evidence_collector.js +214 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/index.d.ts +10 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/index.js +9 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/pattern_detector.d.ts +38 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/pattern_detector.js +226 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/proposal_builder.d.ts +20 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/proposal_builder.js +246 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/rebinder.d.ts +24 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/rebinder.js +65 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/rebinder_types.d.ts +113 -0
- package/build/mcp/tools/vibe_pm/mapping/rebinder/rebinder_types.js +15 -0
- package/build/mcp/tools/vibe_pm/mapping/skeleton_patch.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/mapping/skeleton_patch.js +0 -0
- package/build/mcp/tools/vibe_pm/mapping/spec_map.d.ts +1 -1
- package/build/mcp/tools/vibe_pm/mapping/spec_map.js +10 -10
- package/build/mcp/tools/vibe_pm/mapping/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/mapping/types.js +0 -0
- package/build/mcp/tools/vibe_pm/memory.d.ts +2 -2
- package/build/mcp/tools/vibe_pm/memory.js +0 -0
- package/build/mcp/tools/vibe_pm/memory_backend.d.ts +6 -5
- package/build/mcp/tools/vibe_pm/memory_backend.js +62 -34
- package/build/mcp/tools/vibe_pm/memory_docs_root.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/memory_docs_root.js +0 -0
- package/build/mcp/tools/vibe_pm/memory_index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/memory_index.js +0 -0
- package/build/mcp/tools/vibe_pm/memory_index_embeddings.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/memory_index_embeddings.js +0 -0
- package/build/mcp/tools/vibe_pm/memory_index_hashvec.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/memory_index_hashvec.js +0 -0
- package/build/mcp/tools/vibe_pm/memory_index_lancedb.d.ts +38 -0
- package/build/mcp/tools/vibe_pm/memory_index_lancedb.js +125 -0
- package/build/mcp/tools/vibe_pm/memory_rerank.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/memory_rerank.js +0 -0
- package/build/mcp/tools/vibe_pm/memory_retrieve.d.ts +3 -3
- package/build/mcp/tools/vibe_pm/memory_retrieve.js +60 -44
- package/build/mcp/tools/vibe_pm/memory_status.d.ts +2 -2
- package/build/mcp/tools/vibe_pm/memory_status.js +39 -31
- package/build/mcp/tools/vibe_pm/memory_sync.d.ts +2 -2
- package/build/mcp/tools/vibe_pm/memory_sync.js +64 -40
- package/build/mcp/tools/vibe_pm/modules/fix_dependencies.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/modules/fix_dependencies.js +0 -0
- package/build/mcp/tools/vibe_pm/modules/fix_imports.d.ts +1 -1
- package/build/mcp/tools/vibe_pm/modules/fix_imports.js +80 -81
- package/build/mcp/tools/vibe_pm/modules/fix_lint.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/modules/fix_lint.js +0 -0
- package/build/mcp/tools/vibe_pm/modules/one_loop.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/modules/one_loop.js +0 -0
- package/build/mcp/tools/vibe_pm/navigation/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/navigation/index.js +0 -0
- package/build/mcp/tools/vibe_pm/navigation/resolver.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/navigation/resolver.js +0 -0
- package/build/mcp/tools/vibe_pm/navigation/rules.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/navigation/rules.js +0 -0
- package/build/mcp/tools/vibe_pm/navigation/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/navigation/types.js +0 -0
- package/build/mcp/tools/vibe_pm/nudge.d.ts +31 -0
- package/build/mcp/tools/vibe_pm/nudge.js +163 -0
- package/build/mcp/tools/vibe_pm/observer.d.ts +22 -9
- package/build/mcp/tools/vibe_pm/observer.js +161 -48
- package/build/mcp/tools/vibe_pm/phase.d.ts +2 -2
- package/build/mcp/tools/vibe_pm/phase.js +69 -63
- package/build/mcp/tools/vibe_pm/pm_language.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/pm_language.js +0 -0
- package/build/mcp/tools/vibe_pm/policy/config.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/policy/config.js +0 -0
- package/build/mcp/tools/vibe_pm/policy/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/policy/index.js +0 -0
- package/build/mcp/tools/vibe_pm/policy/recommender.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/policy/recommender.js +0 -0
- package/build/mcp/tools/vibe_pm/policy/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/policy/types.js +0 -0
- package/build/mcp/tools/vibe_pm/prime_tools.d.ts +160 -0
- package/build/mcp/tools/vibe_pm/prime_tools.js +381 -0
- package/build/mcp/tools/vibe_pm/ralph-loop-tools.d.ts +3 -1
- package/build/mcp/tools/vibe_pm/ralph-loop-tools.js +3 -3
- package/build/mcp/tools/vibe_pm/reexports.d.ts +27 -0
- package/build/mcp/tools/vibe_pm/reexports.js +14 -0
- package/build/mcp/tools/vibe_pm/scaffold.d.ts +6 -6
- package/build/mcp/tools/vibe_pm/scaffold.js +0 -0
- package/build/mcp/tools/vibe_pm/schema-adapter.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/schema-adapter.js +0 -0
- package/build/mcp/tools/vibe_pm/scorecard/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/scorecard/index.js +0 -0
- package/build/mcp/tools/vibe_pm/scorecard/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/scorecard/types.js +0 -0
- package/build/mcp/tools/vibe_pm/scorecard/writer.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/scorecard/writer.js +2 -1
- package/build/mcp/tools/vibe_pm/scout.d.ts +23 -0
- package/build/mcp/tools/vibe_pm/scout.js +224 -0
- package/build/mcp/tools/vibe_pm/setup.d.ts +3 -0
- package/build/mcp/tools/vibe_pm/setup.js +184 -34
- package/build/mcp/tools/vibe_pm/signals/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/signals/index.js +0 -0
- package/build/mcp/tools/vibe_pm/signals/logger.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/signals/logger.js +2 -1
- package/build/mcp/tools/vibe_pm/signals/rotation.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/signals/rotation.js +3 -2
- package/build/mcp/tools/vibe_pm/signals/types.d.ts +1 -1
- package/build/mcp/tools/vibe_pm/signals/types.js +2 -0
- package/build/mcp/tools/vibe_pm/stage-computer.d.ts +40 -0
- package/build/mcp/tools/vibe_pm/stage-computer.js +246 -0
- package/build/mcp/tools/vibe_pm/state-guesser.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/state-guesser.js +0 -0
- package/build/mcp/tools/vibe_pm/state-schema.d.ts +114 -5
- package/build/mcp/tools/vibe_pm/state-schema.js +40 -0
- package/build/mcp/tools/vibe_pm/state-store.d.ts +4 -1
- package/build/mcp/tools/vibe_pm/state-store.js +41 -3
- package/build/mcp/tools/vibe_pm/status.d.ts +1 -1
- package/build/mcp/tools/vibe_pm/status.js +104 -513
- package/build/mcp/tools/vibe_pm/status_logic.d.ts +31 -0
- package/build/mcp/tools/vibe_pm/status_logic.js +138 -0
- package/build/mcp/tools/vibe_pm/status_readers.d.ts +114 -0
- package/build/mcp/tools/vibe_pm/status_readers.js +455 -0
- package/build/mcp/tools/vibe_pm/status_types.d.ts +21 -0
- package/build/mcp/tools/vibe_pm/status_types.js +5 -0
- package/build/mcp/tools/vibe_pm/submit_decision.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/submit_decision.js +11 -2
- package/build/mcp/tools/vibe_pm/submit_task.d.ts +6 -6
- package/build/mcp/tools/vibe_pm/submit_task.js +0 -0
- package/build/mcp/tools/vibe_pm/system_control.d.ts +39 -0
- package/build/mcp/tools/vibe_pm/system_control.js +225 -0
- package/build/mcp/tools/vibe_pm/tool_descriptions.d.ts +1 -0
- package/build/mcp/tools/vibe_pm/tool_descriptions.js +31 -0
- package/build/mcp/tools/vibe_pm/tool_handler_factory.d.ts +84 -0
- package/build/mcp/tools/vibe_pm/tool_handler_factory.js +355 -0
- package/build/mcp/tools/vibe_pm/types/analysis.d.ts +154 -0
- package/build/mcp/tools/vibe_pm/types/analysis.js +37 -0
- package/build/mcp/tools/vibe_pm/types/common.d.ts +70 -0
- package/build/mcp/tools/vibe_pm/types/common.js +90 -0
- package/build/mcp/tools/vibe_pm/types/runtime.d.ts +447 -0
- package/build/mcp/tools/vibe_pm/types/runtime.js +3 -0
- package/build/mcp/tools/vibe_pm/types/schemas.d.ts +4003 -0
- package/build/mcp/tools/vibe_pm/types/schemas.js +111 -0
- package/build/mcp/tools/vibe_pm/types/workflow.d.ts +125 -0
- package/build/mcp/tools/vibe_pm/types/workflow.js +32 -0
- package/build/mcp/tools/vibe_pm/types.d.ts +5 -4649
- package/build/mcp/tools/vibe_pm/types.js +10 -376
- package/build/mcp/tools/vibe_pm/ui/index.d.ts +7 -4
- package/build/mcp/tools/vibe_pm/ui/index.js +12 -9
- package/build/mcp/tools/vibe_pm/ui/manifest.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/ui/manifest.js +0 -0
- package/build/mcp/tools/vibe_pm/ui/realtime_contract.d.ts +15 -0
- package/build/mcp/tools/vibe_pm/ui/realtime_contract.js +28 -0
- package/build/mcp/tools/vibe_pm/ui/types.d.ts +28 -3
- package/build/mcp/tools/vibe_pm/ui/types.js +0 -0
- package/build/mcp/tools/vibe_pm/ui/viewer_bundle.d.ts +1 -1
- package/build/mcp/tools/vibe_pm/ui/viewer_bundle.js +178 -23
- package/build/mcp/tools/vibe_pm/ui/webview_poc.d.ts +7 -0
- package/build/mcp/tools/vibe_pm/ui/webview_poc.js +59 -0
- package/build/mcp/tools/vibe_pm/ui/webview_provider.d.ts +13 -0
- package/build/mcp/tools/vibe_pm/ui/webview_provider.js +33 -0
- package/build/mcp/tools/vibe_pm/ux_fsm.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/ux_fsm.js +0 -0
- package/build/mcp/tools/vibe_pm/verdict/index.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/verdict/index.js +0 -0
- package/build/mcp/tools/vibe_pm/verdict/types.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/verdict/types.js +0 -0
- package/build/mcp/tools/vibe_pm/verdict/writer.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/verdict/writer.js +0 -0
- package/build/mcp/tools/vibe_pm/watcher.d.ts +0 -0
- package/build/mcp/tools/vibe_pm/watcher.js +3 -2
- package/build/mcp/tools/vibe_pm/worker_status.d.ts +2 -2
- package/build/mcp/tools/vibe_pm/worker_status.js +0 -0
- package/build/mcp/tools/vibe_pm/workspace_recipe.d.ts +73 -0
- package/build/mcp/tools/vibe_pm/workspace_recipe.js +65 -0
- package/build/mcp/transport/cli.d.ts +0 -0
- package/build/mcp/transport/cli.js +0 -0
- package/build/mcp/transport/handlers.d.ts +3 -2
- package/build/mcp/transport/handlers.js +47 -25
- package/build/mcp/transport/http.d.ts +10 -6
- package/build/mcp/transport/http.js +137 -31
- package/build/mcp/transport/index.d.ts +0 -0
- package/build/mcp/transport/index.js +0 -0
- package/build/mcp/transport/types.d.ts +0 -0
- package/build/mcp/transport/types.js +0 -0
- package/build/mcp/workspace-root.d.ts +0 -0
- package/build/mcp/workspace-root.js +0 -0
- package/build/native/block-writer-wrapper.d.ts +48 -0
- package/build/native/block-writer-wrapper.js +58 -0
- package/build/native/bloom-wrapper.d.ts +39 -0
- package/build/native/bloom-wrapper.js +120 -0
- package/build/native/index.d.ts +11 -0
- package/build/native/index.js +17 -0
- package/build/native/loader.d.ts +139 -0
- package/build/native/loader.js +116 -0
- package/build/native/merkle-wrapper.d.ts +47 -0
- package/build/native/merkle-wrapper.js +203 -0
- package/build/native/scout-wrapper.d.ts +70 -0
- package/build/native/scout-wrapper.js +166 -0
- package/build/native/utils-wrapper.d.ts +46 -0
- package/build/native/utils-wrapper.js +100 -0
- package/build/observability/otel.d.ts +71 -0
- package/build/observability/otel.js +124 -0
- package/build/offline-queue.d.ts +0 -0
- package/build/offline-queue.js +2 -1
- package/build/pool-manager/adapter.d.ts +0 -0
- package/build/pool-manager/adapter.js +0 -0
- package/build/pool-manager/bitnet-adapter.d.ts +3 -3
- package/build/pool-manager/bitnet-adapter.js +17 -30
- package/build/pool-manager/index.d.ts +4 -0
- package/build/pool-manager/index.js +5 -0
- package/build/pool-manager/mapper-adapter.d.ts +3 -3
- package/build/pool-manager/mapper-adapter.js +17 -30
- package/build/pool-manager/remote-auth.d.ts +18 -0
- package/build/pool-manager/remote-auth.js +36 -0
- package/build/pool-manager/remote-registry.d.ts +81 -0
- package/build/pool-manager/remote-registry.js +130 -0
- package/build/pool-manager/resource-monitor.d.ts +0 -0
- package/build/pool-manager/resource-monitor.js +0 -0
- package/build/pool-manager/rust-engine-adapter.d.ts +56 -0
- package/build/pool-manager/rust-engine-adapter.js +122 -0
- package/build/pool-manager/types.d.ts +1 -1
- package/build/pool-manager/types.js +0 -0
- package/build/pool-manager/unified-pool.d.ts +0 -0
- package/build/pool-manager/unified-pool.js +2 -1
- package/build/profile-config.d.ts +0 -0
- package/build/profile-config.js +0 -0
- package/build/protocol/index.d.ts +1 -0
- package/build/protocol/index.js +1 -0
- package/build/protocol/minp.d.ts +97 -0
- package/build/protocol/minp.js +103 -0
- package/build/report-generator.d.ts +0 -0
- package/build/report-generator.js +8 -8
- package/build/reporting/run_artifacts.d.ts +14 -0
- package/build/reporting/run_artifacts.js +44 -0
- package/build/review-history.d.ts +0 -0
- package/build/review-history.js +0 -0
- package/build/reviewer-ux-types.d.ts +0 -0
- package/build/reviewer-ux-types.js +0 -0
- package/build/scout/client.d.ts +17 -0
- package/build/scout/client.js +33 -0
- package/build/scout/index.d.ts +6 -0
- package/build/scout/index.js +5 -0
- package/build/scout/types.d.ts +41 -0
- package/build/scout/types.js +12 -0
- package/build/shared/http_client.d.ts +12 -0
- package/build/shared/http_client.js +21 -0
- package/build/shared/logger.d.ts +18 -0
- package/build/shared/logger.js +24 -0
- package/build/shared/process-guard.d.ts +14 -0
- package/build/shared/process-guard.js +31 -0
- package/build/skeleton-types.d.ts +0 -0
- package/build/skeleton-types.js +0 -0
- package/build/skill-loader.d.ts +0 -0
- package/build/skill-loader.js +3 -2
- package/build/spec-map.d.ts +0 -0
- package/build/spec-map.js +0 -0
- package/build/startup/index.d.ts +0 -0
- package/build/startup/index.js +0 -0
- package/build/startup/manager.d.ts +4 -0
- package/build/startup/manager.js +157 -46
- package/build/sync-manager.d.ts +1 -2
- package/build/sync-manager.js +0 -0
- package/build/sync-packet-builder.d.ts +10 -10
- package/build/sync-packet-builder.js +41 -55
- package/build/tensor/core.d.ts +13 -0
- package/build/tensor/core.js +129 -0
- package/build/tensor/feature_extractor.d.ts +26 -0
- package/build/tensor/feature_extractor.js +141 -0
- package/build/tensor/index.d.ts +6 -0
- package/build/tensor/index.js +5 -0
- package/build/tensor/loader.d.ts +20 -0
- package/build/tensor/loader.js +120 -0
- package/build/tensor/types.d.ts +56 -0
- package/build/tensor/types.js +19 -0
- package/build/tier/feature_gate.d.ts +16 -14
- package/build/tier/feature_gate.js +139 -119
- package/build/tier/index.d.ts +12 -40
- package/build/tier/index.js +14 -55
- package/build/tier/inference_factory.d.ts +28 -0
- package/build/tier/inference_factory.js +54 -0
- package/build/tier/policy_analysis.d.ts +3 -7
- package/build/tier/policy_analysis.js +104 -155
- package/build/tier/production_bridge.d.ts +52 -0
- package/build/tier/production_bridge.js +127 -0
- package/build/tier/scorecard.d.ts +4 -8
- package/build/tier/scorecard.js +59 -90
- package/build/utils/with_timeout.d.ts +1 -0
- package/build/utils/with_timeout.js +16 -0
- package/build/workers/base/autoscaler.d.ts +0 -0
- package/build/workers/base/autoscaler.js +0 -0
- package/build/workers/base/dashboard.d.ts +0 -0
- package/build/workers/base/dashboard.js +0 -0
- package/build/workers/base/health.d.ts +1 -0
- package/build/workers/base/health.js +31 -35
- package/build/workers/base/index.d.ts +0 -0
- package/build/workers/base/index.js +0 -0
- package/build/workers/base/metrics.d.ts +0 -0
- package/build/workers/base/metrics.js +0 -0
- package/build/workers/base/pool.d.ts +0 -0
- package/build/workers/base/pool.js +2 -1
- package/build/workers/base/queue.d.ts +26 -4
- package/build/workers/base/queue.js +50 -29
- package/build/workers/base/types.d.ts +0 -0
- package/build/workers/base/types.js +0 -0
- package/build/workers/base/worker.d.ts +0 -0
- package/build/workers/base/worker.js +34 -16
- package/build/workers/browser/index.d.ts +0 -0
- package/build/workers/browser/index.js +1 -1
- package/build/workers/build/index.d.ts +0 -0
- package/build/workers/build/index.js +0 -0
- package/build/workers/fs/index.d.ts +0 -0
- package/build/workers/fs/index.js +0 -0
- package/build/workers/index.d.ts +0 -0
- package/build/workers/index.js +3 -2
- package/build/workers/manager.d.ts +1 -0
- package/build/workers/manager.js +19 -9
- package/build/workers/model/index.d.ts +0 -0
- package/build/workers/model/index.js +0 -0
- package/build/workers/search/index.d.ts +4 -0
- package/build/workers/search/index.js +3 -2
- package/package.json +58 -7
- package/schemas/agent-catalog.v1.schema.json +114 -0
- package/schemas/autopilot_policy.v1.schema.json +90 -90
- package/schemas/banned_question_rules.v1.schema.json +0 -0
- package/schemas/bitnet_signal.v1.schema.json +112 -112
- package/schemas/catalog_tree.v1.schema.json +0 -0
- package/schemas/choice_card.v1.schema.json +0 -0
- package/schemas/ci_summary.v1.schema.json +0 -0
- package/schemas/clinic_result.v1.2.schema.json +0 -0
- package/schemas/encrypted_packet.v1.schema.json +0 -0
- package/schemas/handoff_packet.v1.schema.json +0 -0
- package/schemas/observer_event_map.v1.schema.json +89 -89
- package/schemas/result.v1.schema.json +0 -0
- package/schemas/skeleton_map_summary.v1.schema.json +0 -0
- package/schemas/spec_gate_result.v1.schema.json +0 -0
- package/schemas/spec_map.v1.schema.json +0 -0
- package/schemas/sync_packet.v1.schema.json +0 -0
- package/schemas/task.v1.schema.json +0 -0
- package/schemas/template-catalog.v1.1.schema.json +193 -0
- package/schemas/template-catalog.v1.schema.json +169 -0
- package/schemas/template-run.session.v1.schema.json +117 -0
- package/schemas/vibe_tool_status.schema.json +0 -0
- package/schemas/workflow-registry.v1.schema.json +107 -0
- package/scripts/build-artifacts.mjs +124 -124
- package/scripts/build-musu.sh +0 -0
- package/scripts/bundle-native.mjs +393 -0
- package/scripts/check-hotpath-di.mjs +77 -0
- package/scripts/check-hotpath-sync-io.mjs +90 -0
- package/scripts/check-musu.mjs +0 -0
- package/scripts/check-pr-scope.mjs +120 -120
- package/scripts/check-template-runner-contract.mjs +66 -0
- package/scripts/check-template-ui-contract-sync.mjs +166 -0
- package/scripts/clean-build.mjs +20 -20
- package/scripts/diagram-render-metrics-report.mjs +162 -0
- package/scripts/e2e-k8s-test.sh +0 -0
- package/scripts/e2e-podman-test.sh +91 -0
- package/scripts/ensure-exec.mjs +0 -0
- package/scripts/generate-checksums.sh +29 -0
- package/scripts/publish.sh +20 -0
- package/scripts/setup_infra.sh +160 -0
- package/scripts/sync-third-party-notices.mjs +18 -0
- package/scripts/test-mq-integration.mjs +81 -0
- package/scripts/test-musu-smoke.sh +136 -0
- package/scripts/test-smoke.mjs +24 -0
- package/scripts/validate-agents.ts +60 -0
- package/scripts/validate-doc-links.mjs +0 -0
- package/scripts/verify-release-chain.mjs +68 -0
- package/skills/SKILL_openclaw_actions_audit.md +44 -0
- package/skills/SKILL_openclaw_release_hardening.md +37 -0
- package/skills/SKILL_openclaw_shift_left_ci.md +58 -0
- package/skills/index.json +30 -0
- package/skills/skillpack.json +40 -0
- package/skills/skillpack.schema.json +0 -0
- package/templates/agents/cli-agent/Cargo.toml +10 -0
- package/templates/agents/cli-agent/manifest.json +14 -0
- package/templates/agents/cli-agent/src/main.rs +84 -0
- package/templates/agents/http-service/manifest.json +15 -0
- package/templates/agents/http-service/package.json +16 -0
- package/templates/agents/http-service/src/server.ts +60 -0
- package/templates/agents/mcp-tool/manifest.json +15 -0
- package/templates/agents/mcp-tool/package.json +17 -0
- package/templates/agents/mcp-tool/src/index.ts +84 -0
- package/templates/agents/worker-agent/Cargo.toml +11 -0
- package/templates/agents/worker-agent/manifest.json +14 -0
- package/templates/agents/worker-agent/src/main.rs +120 -0
- package/templates/docs-structure/README.md +41 -41
- 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 +0 -0
- package/build/dashboard/autostart.d.ts +0 -45
- package/build/dashboard/autostart.js +0 -121
- package/build/mcp/paths.d.ts +0 -29
- package/build/mcp/paths.js +0 -90
- package/build/mcp/runtime/musu_adapter.d.ts +0 -193
- package/build/mcp/runtime/musu_adapter.js +0 -373
- package/build/mcp/tools/vibe_pm/inspect_code.d.ts +0 -10
- package/build/mcp/tools/vibe_pm/inspect_code.js +0 -729
- package/build/mcp/tools.d.ts +0 -1
- package/build/mcp/tools.js +0 -11
- package/build/tier/trigger_facts_collector.js +0 -294
package/build/bin/vibe-ci.js
CHANGED
|
@@ -1,1558 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
/**
|
|
3
|
-
* Vibe CI CLI Wrapper
|
|
3
|
+
* Vibe CI CLI Wrapper
|
|
4
4
|
*
|
|
5
|
-
*
|
|
6
|
-
*
|
|
7
|
-
* Usage: vibe ci [options]
|
|
8
|
-
*
|
|
9
|
-
* Exit Codes:
|
|
10
|
-
* 0 = GO (머지 가능)
|
|
11
|
-
* 2 = FIX (수정 필요)
|
|
12
|
-
* 3 = BLOCK (차단)
|
|
13
|
-
* 1 = ERROR (인프라/엔진 오류)
|
|
5
|
+
* NOTE: The implementation lives under `src/ci/*`.
|
|
14
6
|
*/
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
import { fileURLToPath } from "node:url";
|
|
20
|
-
// ESM 모듈에서 __filename/__dirname 대체
|
|
21
|
-
const __filename = fileURLToPath(import.meta.url);
|
|
22
|
-
const __dirname = path.dirname(__filename);
|
|
23
|
-
import { LicenseManager } from "../license-manager.js";
|
|
24
|
-
import { SyncManager } from "../sync-manager.js";
|
|
25
|
-
import { renderViolationLinks, renderSummaryWithLink } from "../deep-link.js";
|
|
26
|
-
import { saveEvidenceReportFromRunDir, savePrCommentFromRunDir } from "../evidence-report.js";
|
|
27
|
-
import { writeHtmlReportFromCiSummarySafe } from "../report-generator.js";
|
|
28
|
-
import { TokenCache } from "../mcp/auth/token_cache.js";
|
|
29
|
-
import { loadSpecMapSafe, matchSpecMap } from "../spec-map.js";
|
|
30
|
-
import { minimatch } from "minimatch";
|
|
31
|
-
import { pathViolationMessage, readOnlyViolationMessage, iterationLimitMessage, scopeDriftMessage, missingWorkOrderMessage, missingDecisionMessage, } from "../correction-messages.js";
|
|
32
|
-
import { readDecisionLog } from "../decision-log-reader.js";
|
|
33
|
-
import { recordReviewHistory, getHotspotFiles, getRepeatCount } from "../review-history.js";
|
|
34
|
-
import { runDepsUpdate, formatDepsUpdate, checkDrift, formatDriftCheck, checkEnvironment, formatEnvCheck, buildEnvCheckStatus, buildDriftCheckStatus, buildVerificationStatus, renderToolStatus, renderPipelineStatus, } from "../deps/index.js";
|
|
35
|
-
import { bitnetCheck } from "../mcp/tools/bitnet/index.js";
|
|
36
|
-
import { runMappingPipeline, hasSpecMap, } from "../mcp/tools/vibe_pm/mapping/index.js";
|
|
37
|
-
import { ensureDirSync, getPmRunDir, getVibeDir, resolvePmRunDirForRead } from "../mcp/paths.js";
|
|
38
|
-
import { syncLocalRun, generateWorkspaceId, isDbSyncEnabled } from "../db_sync/index.js";
|
|
39
|
-
// ============================================================
|
|
40
|
-
// Exit Codes (SSOT)
|
|
41
|
-
// ============================================================
|
|
42
|
-
const EXIT_CODES = {
|
|
43
|
-
GO: 0,
|
|
44
|
-
FIX: 2,
|
|
45
|
-
BLOCK: 3,
|
|
46
|
-
ERROR: 1,
|
|
47
|
-
};
|
|
48
|
-
// ============================================================
|
|
49
|
-
// Argument Parser
|
|
50
|
-
// ============================================================
|
|
51
|
-
function parseArgs(args) {
|
|
52
|
-
const options = {
|
|
53
|
-
workspace: ".",
|
|
54
|
-
runId: null,
|
|
55
|
-
mode: "ci",
|
|
56
|
-
strict: false,
|
|
57
|
-
json: false,
|
|
58
|
-
noKce: false,
|
|
59
|
-
timeout: 300,
|
|
60
|
-
ciProvider: null,
|
|
61
|
-
prNumber: null,
|
|
62
|
-
commitSha: null,
|
|
63
|
-
branch: null,
|
|
64
|
-
};
|
|
65
|
-
for (let i = 0; i < args.length; i++) {
|
|
66
|
-
const arg = args[i];
|
|
67
|
-
const next = args[i + 1];
|
|
68
|
-
switch (arg) {
|
|
69
|
-
case "--workspace":
|
|
70
|
-
options.workspace = next || ".";
|
|
71
|
-
i++;
|
|
72
|
-
break;
|
|
73
|
-
case "--run-id":
|
|
74
|
-
options.runId = next || null;
|
|
75
|
-
i++;
|
|
76
|
-
break;
|
|
77
|
-
case "--mode":
|
|
78
|
-
options.mode = (next === "local" ? "local" : "ci");
|
|
79
|
-
i++;
|
|
80
|
-
break;
|
|
81
|
-
case "--strict":
|
|
82
|
-
options.strict = true;
|
|
83
|
-
break;
|
|
84
|
-
case "--json":
|
|
85
|
-
options.json = true;
|
|
86
|
-
break;
|
|
87
|
-
case "--no-kce":
|
|
88
|
-
options.noKce = true;
|
|
89
|
-
break;
|
|
90
|
-
case "--timeout":
|
|
91
|
-
options.timeout = parseInt(next || "300", 10);
|
|
92
|
-
i++;
|
|
93
|
-
break;
|
|
94
|
-
case "--ci-provider":
|
|
95
|
-
options.ciProvider = next || null;
|
|
96
|
-
i++;
|
|
97
|
-
break;
|
|
98
|
-
case "--pr-number":
|
|
99
|
-
options.prNumber = next || null;
|
|
100
|
-
i++;
|
|
101
|
-
break;
|
|
102
|
-
case "--commit-sha":
|
|
103
|
-
options.commitSha = next || null;
|
|
104
|
-
i++;
|
|
105
|
-
break;
|
|
106
|
-
case "--branch":
|
|
107
|
-
options.branch = next || null;
|
|
108
|
-
i++;
|
|
109
|
-
break;
|
|
110
|
-
case "--help":
|
|
111
|
-
case "-h":
|
|
112
|
-
printHelp();
|
|
113
|
-
process.exit(0);
|
|
114
|
-
}
|
|
115
|
-
}
|
|
116
|
-
return options;
|
|
117
|
-
}
|
|
118
|
-
function printHelp() {
|
|
119
|
-
console.log(`
|
|
120
|
-
Vibe CI - Single verification entry point for AI coding
|
|
121
|
-
|
|
122
|
-
Usage: vibe ci [options]
|
|
123
|
-
|
|
124
|
-
Options:
|
|
125
|
-
--workspace <path> Project root path (default: .)
|
|
126
|
-
--run-id <id> Run ID (auto-generated if not specified)
|
|
127
|
-
--mode <ci|local> Execution mode (default: ci)
|
|
128
|
-
--strict Return exit 2 even for FIX verdict
|
|
129
|
-
--json JSON output only
|
|
130
|
-
--no-kce Disable KCE
|
|
131
|
-
--timeout <seconds> Timeout (default: 300)
|
|
132
|
-
|
|
133
|
-
CI Metadata (Evidence only):
|
|
134
|
-
--ci-provider <name> CI provider (github|gitlab|bitbucket|generic)
|
|
135
|
-
--pr-number <num> PR number
|
|
136
|
-
--commit-sha <sha> Commit SHA
|
|
137
|
-
--branch <name> Branch name
|
|
138
|
-
|
|
139
|
-
Exit Codes:
|
|
140
|
-
0 = GO (ready to merge)
|
|
141
|
-
2 = FIX (needs revision)
|
|
142
|
-
3 = BLOCK (rejected)
|
|
143
|
-
1 = ERROR (infrastructure/engine error)
|
|
144
|
-
`);
|
|
145
|
-
}
|
|
146
|
-
// ============================================================
|
|
147
|
-
// Run ID Generator
|
|
148
|
-
// ============================================================
|
|
149
|
-
function generateRunId() {
|
|
150
|
-
const now = new Date();
|
|
151
|
-
const date = now.toISOString().slice(0, 10).replace(/-/g, "");
|
|
152
|
-
const time = now.toISOString().slice(11, 19).replace(/:/g, "");
|
|
153
|
-
const shortHash = crypto.randomBytes(3).toString("hex");
|
|
154
|
-
return `r_${date}_${time}_${shortHash}`;
|
|
155
|
-
}
|
|
156
|
-
// ============================================================
|
|
157
|
-
// Engine Locator
|
|
158
|
-
// ============================================================
|
|
159
|
-
function findEngine(name) {
|
|
160
|
-
const platform = process.platform === "win32" ? "win_x64" : "linux_x64";
|
|
161
|
-
const ext = process.platform === "win32" ? ".exe" : "";
|
|
162
|
-
const binaryName = name + ext;
|
|
163
|
-
// 1. 환경변수
|
|
164
|
-
const envPath = process.env[`VIBE_${name.toUpperCase().replace("-", "_")}_PATH`];
|
|
165
|
-
if (envPath && fs.existsSync(envPath))
|
|
166
|
-
return envPath;
|
|
167
|
-
// 2. 같은 디렉토리
|
|
168
|
-
const scriptDir = path.dirname(process.argv[1] || __filename);
|
|
169
|
-
const sameDirPath = path.join(scriptDir, binaryName);
|
|
170
|
-
if (fs.existsSync(sameDirPath))
|
|
171
|
-
return sameDirPath;
|
|
172
|
-
// 3. 패키지 루트의 bin 폴더 (build/bin/ → build/ → root/)
|
|
173
|
-
const packageRoot = path.join(scriptDir, "..", "..");
|
|
174
|
-
const binPath = path.join(packageRoot, "bin", `${name}_${platform}`, binaryName);
|
|
175
|
-
if (fs.existsSync(binPath))
|
|
176
|
-
return binPath;
|
|
177
|
-
// 4. cwd 기준 bin 폴더
|
|
178
|
-
const cwdBinPath = path.join(process.cwd(), "bin", `${name}_${platform}`, binaryName);
|
|
179
|
-
if (fs.existsSync(cwdBinPath))
|
|
180
|
-
return cwdBinPath;
|
|
181
|
-
// 5. PATH
|
|
182
|
-
const pathDirs = (process.env.PATH || "").split(path.delimiter);
|
|
183
|
-
for (const dir of pathDirs) {
|
|
184
|
-
const fullPath = path.join(dir, binaryName);
|
|
185
|
-
if (fs.existsSync(fullPath))
|
|
186
|
-
return fullPath;
|
|
187
|
-
}
|
|
188
|
-
return null;
|
|
189
|
-
}
|
|
190
|
-
// ============================================================
|
|
191
|
-
// Engine Runner
|
|
192
|
-
// ============================================================
|
|
193
|
-
async function runEngine(enginePath, args, options) {
|
|
194
|
-
return new Promise((resolve) => {
|
|
195
|
-
const proc = spawn(enginePath, args, {
|
|
196
|
-
cwd: options.cwd,
|
|
197
|
-
env: options.env ?? process.env,
|
|
198
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
199
|
-
timeout: options.timeout * 1000,
|
|
200
|
-
});
|
|
201
|
-
let stdout = "";
|
|
202
|
-
let stderr = "";
|
|
203
|
-
proc.stdout.on("data", (data) => { stdout += data.toString(); });
|
|
204
|
-
proc.stderr.on("data", (data) => { stderr += data.toString(); });
|
|
205
|
-
proc.on("close", (code) => {
|
|
206
|
-
resolve({ code: code ?? 1, stdout, stderr });
|
|
207
|
-
});
|
|
208
|
-
proc.on("error", (err) => {
|
|
209
|
-
stderr += err.message;
|
|
210
|
-
resolve({ code: 1, stdout, stderr });
|
|
211
|
-
});
|
|
212
|
-
});
|
|
213
|
-
}
|
|
214
|
-
// ============================================================
|
|
215
|
-
// Result Reader
|
|
216
|
-
// ============================================================
|
|
217
|
-
function readJsonFile(filePath) {
|
|
218
|
-
try {
|
|
219
|
-
if (!fs.existsSync(filePath))
|
|
220
|
-
return null;
|
|
221
|
-
const content = fs.readFileSync(filePath, "utf-8");
|
|
222
|
-
return JSON.parse(content);
|
|
223
|
-
}
|
|
224
|
-
catch {
|
|
225
|
-
return null;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
function getPreprocessSummary(workspace, runId) {
|
|
229
|
-
try {
|
|
230
|
-
const runDir = resolvePmRunDirForRead(workspace, runId);
|
|
231
|
-
if (!fs.existsSync(runDir))
|
|
232
|
-
return undefined;
|
|
233
|
-
const airlockDir = path.join(runDir, "airlock");
|
|
234
|
-
const chunksDir = path.join(runDir, "chunks");
|
|
235
|
-
const report = readJsonFile(path.join(airlockDir, "redaction_report.json"));
|
|
236
|
-
const decision = readJsonFile(path.join(airlockDir, "router_decision.json"));
|
|
237
|
-
const manifest = readJsonFile(path.join(chunksDir, "chunk_manifest.v1.json"));
|
|
238
|
-
const parts = [];
|
|
239
|
-
if ((report?.redacted_count ?? 0) > 0) {
|
|
240
|
-
parts.push(`마스킹 ${report?.redacted_count}건`);
|
|
241
|
-
}
|
|
242
|
-
if (decision?.route) {
|
|
243
|
-
const routeLabel = decision.route === "local_only"
|
|
244
|
-
? "로컬"
|
|
245
|
-
: decision.route === "local_then_cloud"
|
|
246
|
-
? "로컬→클라우드"
|
|
247
|
-
: "클라우드";
|
|
248
|
-
parts.push(`라우팅 ${routeLabel}`);
|
|
249
|
-
}
|
|
250
|
-
if (typeof manifest?.chunks?.length === "number") {
|
|
251
|
-
parts.push(`청크 ${manifest.chunks.length}개`);
|
|
252
|
-
}
|
|
253
|
-
return parts.length > 0 ? parts.join(" · ") : undefined;
|
|
254
|
-
}
|
|
255
|
-
catch {
|
|
256
|
-
return undefined;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
// ============================================================
|
|
260
|
-
// Skeleton Map Reader (FAIL-SAFE)
|
|
261
|
-
// ============================================================
|
|
262
|
-
function readSkeletonMapSummary(runsDir) {
|
|
263
|
-
const skeletonPath = path.join(runsDir, "ci", "skeleton_map_summary.json");
|
|
264
|
-
if (!fs.existsSync(skeletonPath)) {
|
|
265
|
-
return { status: "MISSING", data: null };
|
|
266
|
-
}
|
|
267
|
-
try {
|
|
268
|
-
const content = fs.readFileSync(skeletonPath, "utf-8");
|
|
269
|
-
const data = JSON.parse(content);
|
|
270
|
-
return { status: "PRESENT", data };
|
|
271
|
-
}
|
|
272
|
-
catch (err) {
|
|
273
|
-
return {
|
|
274
|
-
status: "ERROR",
|
|
275
|
-
data: null,
|
|
276
|
-
errorMessage: err instanceof Error ? err.message : "Unknown error",
|
|
277
|
-
};
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
function buildSkeletonField(result, runsDir) {
|
|
281
|
-
const artifactPath = result.status === "PRESENT"
|
|
282
|
-
? path.join(runsDir, "ci", "skeleton_map_summary.json")
|
|
283
|
-
: null;
|
|
284
|
-
return {
|
|
285
|
-
status: result.status,
|
|
286
|
-
artifact_path: artifactPath,
|
|
287
|
-
error_message: result.errorMessage,
|
|
288
|
-
saved_by_skeleton: result.data?.saved_by_skeleton,
|
|
289
|
-
focus: result.data?.focus ?? null,
|
|
290
|
-
};
|
|
291
|
-
}
|
|
292
|
-
// ============================================================
|
|
293
|
-
// Verdict Synthesizer
|
|
294
|
-
// ============================================================
|
|
295
|
-
function synthesizeVerdict(gate, clinic) {
|
|
296
|
-
// 필수 산출물 없음 → BLOCK
|
|
297
|
-
if (!gate || !clinic)
|
|
298
|
-
return "BLOCK";
|
|
299
|
-
// BLOCK > FIX > GO
|
|
300
|
-
if (gate.verdict === "BLOCK" || clinic.verdict === "BLOCK")
|
|
301
|
-
return "BLOCK";
|
|
302
|
-
if (gate.verdict === "FIX" || clinic.verdict === "FIX")
|
|
303
|
-
return "FIX";
|
|
304
|
-
return "GO";
|
|
305
|
-
}
|
|
306
|
-
function maxVerdict(a, b) {
|
|
307
|
-
if (a === "BLOCK" || b === "BLOCK")
|
|
308
|
-
return "BLOCK";
|
|
309
|
-
if (a === "FIX" || b === "FIX")
|
|
310
|
-
return "FIX";
|
|
311
|
-
return "GO";
|
|
312
|
-
}
|
|
313
|
-
function verdictFromCiViolations(vs) {
|
|
314
|
-
if (vs.some((v) => v.severity === "BLOCK"))
|
|
315
|
-
return "BLOCK";
|
|
316
|
-
if (vs.some((v) => v.severity === "FIX"))
|
|
317
|
-
return "FIX";
|
|
318
|
-
return "GO";
|
|
319
|
-
}
|
|
320
|
-
function toPosixPath(p) {
|
|
321
|
-
return p.replaceAll("\\", "/");
|
|
322
|
-
}
|
|
323
|
-
function uniqStrings(xs) {
|
|
324
|
-
const seen = new Set();
|
|
325
|
-
const out = [];
|
|
326
|
-
for (const x of xs) {
|
|
327
|
-
const k = x.trim();
|
|
328
|
-
if (!k)
|
|
329
|
-
continue;
|
|
330
|
-
if (seen.has(k))
|
|
331
|
-
continue;
|
|
332
|
-
seen.add(k);
|
|
333
|
-
out.push(k);
|
|
334
|
-
}
|
|
335
|
-
return out;
|
|
336
|
-
}
|
|
337
|
-
function getModifiedFiles(workspaceRoot) {
|
|
338
|
-
const env = (process.env.VIBE_MODIFIED_FILES || "").trim();
|
|
339
|
-
if (env) {
|
|
340
|
-
return uniqStrings(env.split(/[,\\n\\r]+/g).map((s) => toPosixPath(s.trim())));
|
|
341
|
-
}
|
|
342
|
-
const isGit = spawnSync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
343
|
-
cwd: workspaceRoot,
|
|
344
|
-
encoding: "utf8",
|
|
345
|
-
});
|
|
346
|
-
if (isGit.status !== 0)
|
|
347
|
-
return [];
|
|
348
|
-
const out = [];
|
|
349
|
-
const add = (args) => {
|
|
350
|
-
const r = spawnSync("git", args, { cwd: workspaceRoot, encoding: "utf8" });
|
|
351
|
-
if (r.status !== 0)
|
|
352
|
-
return;
|
|
353
|
-
const lines = String(r.stdout || "").split(/\r?\n/g).map((s) => s.trim()).filter(Boolean);
|
|
354
|
-
out.push(...lines.map(toPosixPath));
|
|
355
|
-
};
|
|
356
|
-
const base = (process.env.VIBE_DIFF_BASE || "").trim();
|
|
357
|
-
if (base) {
|
|
358
|
-
add(["diff", "--name-only", "--diff-filter=ACMRT", `${base}...HEAD`]);
|
|
359
|
-
}
|
|
360
|
-
else {
|
|
361
|
-
const baseRef = (process.env.GITHUB_BASE_REF || process.env.CI_MERGE_REQUEST_TARGET_BRANCH_NAME || "").trim();
|
|
362
|
-
if (baseRef) {
|
|
363
|
-
// best-effort fetch (FAIL-SAFE)
|
|
364
|
-
spawnSync("git", ["fetch", "--no-tags", "--depth", "200", "origin", baseRef], { cwd: workspaceRoot, encoding: "utf8" });
|
|
365
|
-
add(["diff", "--name-only", "--diff-filter=ACMRT", `origin/${baseRef}...HEAD`]);
|
|
366
|
-
}
|
|
367
|
-
}
|
|
368
|
-
// local unstaged/staged changes (local mode)
|
|
369
|
-
add(["diff", "--name-only", "--diff-filter=ACMRT", "--cached"]);
|
|
370
|
-
add(["diff", "--name-only", "--diff-filter=ACMRT"]);
|
|
371
|
-
// fallback: last commit
|
|
372
|
-
if (out.length === 0) {
|
|
373
|
-
add(["diff", "--name-only", "--diff-filter=ACMRT", "HEAD~1...HEAD"]);
|
|
374
|
-
}
|
|
375
|
-
return uniqStrings(out);
|
|
376
|
-
}
|
|
377
|
-
function parseNumstat(out) {
|
|
378
|
-
let files = 0;
|
|
379
|
-
let insertions = 0;
|
|
380
|
-
let deletions = 0;
|
|
381
|
-
for (const line of out.split(/\r?\n/g)) {
|
|
382
|
-
const t = line.trim();
|
|
383
|
-
if (!t)
|
|
384
|
-
continue;
|
|
385
|
-
const [a, d] = t.split(/\s+/g);
|
|
386
|
-
const ins = Number.parseInt(a ?? "", 10);
|
|
387
|
-
const del = Number.parseInt(d ?? "", 10);
|
|
388
|
-
if (!Number.isFinite(ins) || !Number.isFinite(del))
|
|
389
|
-
continue;
|
|
390
|
-
files += 1;
|
|
391
|
-
insertions += ins;
|
|
392
|
-
deletions += del;
|
|
393
|
-
}
|
|
394
|
-
return { files, insertions, deletions };
|
|
395
|
-
}
|
|
396
|
-
function getDiffStats(workspaceRoot) {
|
|
397
|
-
const isGit = spawnSync("git", ["rev-parse", "--is-inside-work-tree"], {
|
|
398
|
-
cwd: workspaceRoot,
|
|
399
|
-
encoding: "utf8",
|
|
400
|
-
});
|
|
401
|
-
if (isGit.status !== 0)
|
|
402
|
-
return { files: 0, insertions: 0, deletions: 0 };
|
|
403
|
-
const run = (args) => {
|
|
404
|
-
const r = spawnSync("git", args, { cwd: workspaceRoot, encoding: "utf8" });
|
|
405
|
-
if (r.status !== 0)
|
|
406
|
-
return "";
|
|
407
|
-
return String(r.stdout || "");
|
|
408
|
-
};
|
|
409
|
-
const base = (process.env.VIBE_DIFF_BASE || "").trim();
|
|
410
|
-
if (base) {
|
|
411
|
-
return parseNumstat(run(["diff", "--numstat", `${base}...HEAD`]));
|
|
412
|
-
}
|
|
413
|
-
const baseRef = (process.env.GITHUB_BASE_REF || process.env.CI_MERGE_REQUEST_TARGET_BRANCH_NAME || "").trim();
|
|
414
|
-
if (baseRef) {
|
|
415
|
-
spawnSync("git", ["fetch", "--no-tags", "--depth", "200", "origin", baseRef], { cwd: workspaceRoot, encoding: "utf8" });
|
|
416
|
-
return parseNumstat(run(["diff", "--numstat", `origin/${baseRef}...HEAD`]));
|
|
417
|
-
}
|
|
418
|
-
const staged = parseNumstat(run(["diff", "--numstat", "--cached"]));
|
|
419
|
-
const unstaged = parseNumstat(run(["diff", "--numstat"]));
|
|
420
|
-
const combined = {
|
|
421
|
-
files: Math.max(staged.files, unstaged.files),
|
|
422
|
-
insertions: staged.insertions + unstaged.insertions,
|
|
423
|
-
deletions: staged.deletions + unstaged.deletions,
|
|
424
|
-
};
|
|
425
|
-
if (combined.files > 0)
|
|
426
|
-
return combined;
|
|
427
|
-
return parseNumstat(run(["diff", "--numstat", "HEAD~1...HEAD"]));
|
|
428
|
-
}
|
|
429
|
-
function writeJsonAtomic(filePath, value) {
|
|
430
|
-
fs.mkdirSync(path.dirname(filePath), { recursive: true });
|
|
431
|
-
const tmp = `${filePath}.tmp`;
|
|
432
|
-
fs.writeFileSync(tmp, JSON.stringify(value, null, 2), "utf-8");
|
|
433
|
-
fs.renameSync(tmp, filePath);
|
|
434
|
-
}
|
|
435
|
-
function readWorkOrder(workspaceRoot) {
|
|
436
|
-
const p = path.join(workspaceRoot, ".vibe", "state", "current_work_order.json");
|
|
437
|
-
try {
|
|
438
|
-
if (!fs.existsSync(p))
|
|
439
|
-
return null;
|
|
440
|
-
const raw = JSON.parse(fs.readFileSync(p, "utf-8"));
|
|
441
|
-
if (!raw || typeof raw !== "object")
|
|
442
|
-
return null;
|
|
443
|
-
const o = raw;
|
|
444
|
-
const run_id = String(o.run_id ?? "").trim();
|
|
445
|
-
const created_at = String(o.created_at ?? "").trim();
|
|
446
|
-
if (!run_id || !created_at)
|
|
447
|
-
return null;
|
|
448
|
-
const scopeRaw = (o.scope && typeof o.scope === "object") ? o.scope : null;
|
|
449
|
-
const include = Array.isArray(scopeRaw?.include) ? scopeRaw.include.map(String).map((s) => s.trim()).filter(Boolean) : [];
|
|
450
|
-
const exclude = Array.isArray(scopeRaw?.exclude) ? scopeRaw.exclude.map(String).map((s) => s.trim()).filter(Boolean) : [];
|
|
451
|
-
const doNotTouch = Array.isArray(o.do_not_touch) ? o.do_not_touch.map(String).map((s) => s.trim()).filter(Boolean) : [];
|
|
452
|
-
const verifyCriteria = Array.isArray(o.verify_criteria) ? o.verify_criteria.map(String).map((s) => s.trim()).filter(Boolean) : [];
|
|
453
|
-
return {
|
|
454
|
-
run_id,
|
|
455
|
-
created_at,
|
|
456
|
-
topic: typeof o.topic === "string" ? o.topic : undefined,
|
|
457
|
-
scope: (include.length > 0 || exclude.length > 0) ? { include, exclude } : undefined,
|
|
458
|
-
do_not_touch: doNotTouch,
|
|
459
|
-
verify_criteria: verifyCriteria,
|
|
460
|
-
};
|
|
461
|
-
}
|
|
462
|
-
catch {
|
|
463
|
-
return null;
|
|
464
|
-
}
|
|
465
|
-
}
|
|
466
|
-
function matchesAnyGlobs(filePath, patterns) {
|
|
467
|
-
const p = toPosixPath(filePath);
|
|
468
|
-
return patterns.some((pat) => minimatch(p, toPosixPath(pat), { dot: true, matchBase: true }));
|
|
469
|
-
}
|
|
470
|
-
function buildSpecGateResult(params) {
|
|
471
|
-
const violations = [];
|
|
472
|
-
if (!params.hasDecisionEvidence) {
|
|
473
|
-
const msg = missingDecisionMessage();
|
|
474
|
-
violations.push({ id: msg.type, path: "project", msg: msg.userMessage });
|
|
475
|
-
}
|
|
476
|
-
if (!params.workOrder) {
|
|
477
|
-
const msg = missingWorkOrderMessage();
|
|
478
|
-
violations.push({ id: msg.type, path: "project", msg: msg.userMessage });
|
|
479
|
-
}
|
|
480
|
-
if (params.workOrder) {
|
|
481
|
-
const deny = uniqStrings([
|
|
482
|
-
...(params.workOrder.do_not_touch ?? []),
|
|
483
|
-
...(params.workOrder.scope?.exclude ?? []),
|
|
484
|
-
]);
|
|
485
|
-
const allow = uniqStrings(params.workOrder.scope?.include ?? []);
|
|
486
|
-
for (const f of params.modifiedFiles) {
|
|
487
|
-
if (deny.length > 0 && matchesAnyGlobs(f, deny)) {
|
|
488
|
-
const msg = pathViolationMessage(f, "RED", allow);
|
|
489
|
-
violations.push({ id: msg.type, path: f, msg: msg.userMessage });
|
|
490
|
-
}
|
|
491
|
-
}
|
|
492
|
-
if (allow.length > 0) {
|
|
493
|
-
const drifted = params.modifiedFiles.filter((f) => !matchesAnyGlobs(f, allow));
|
|
494
|
-
if (drifted.length > 0) {
|
|
495
|
-
const msg = scopeDriftMessage(drifted.slice(0, 20), allow);
|
|
496
|
-
violations.push({ id: msg.type, path: drifted[0] ?? "project", msg: msg.userMessage });
|
|
497
|
-
}
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
if (params.modifiedFiles.length > 50) {
|
|
501
|
-
violations.push({
|
|
502
|
-
id: "FILES_TOO_MANY",
|
|
503
|
-
path: "project",
|
|
504
|
-
msg: `Too many files changed: ${params.modifiedFiles.length} (> 50)`,
|
|
505
|
-
});
|
|
506
|
-
}
|
|
507
|
-
const lines = params.diff.insertions + params.diff.deletions;
|
|
508
|
-
if (lines > 2000) {
|
|
509
|
-
violations.push({
|
|
510
|
-
id: "LINES_TOO_MANY",
|
|
511
|
-
path: "project",
|
|
512
|
-
msg: `Large diff: ${lines} lines changed (> 2000)`,
|
|
513
|
-
});
|
|
514
|
-
}
|
|
515
|
-
let verdict = "GO";
|
|
516
|
-
if (violations.some((v) => v.id === "MISSING_DECISION" || v.id === "MISSING_WORK_ORDER" || v.id === "PATH_VIOLATION" || v.id === "FILES_TOO_MANY")) {
|
|
517
|
-
verdict = "BLOCK";
|
|
518
|
-
}
|
|
519
|
-
else if (violations.length > 0) {
|
|
520
|
-
verdict = "FIX";
|
|
521
|
-
}
|
|
522
|
-
const issue_counts = {
|
|
523
|
-
total: violations.length,
|
|
524
|
-
critical: violations.filter((v) => v.id === "MISSING_DECISION" || v.id === "MISSING_WORK_ORDER" || v.id === "PATH_VIOLATION" || v.id === "FILES_TOO_MANY").length,
|
|
525
|
-
high: violations.filter((v) => v.id === "SCOPE_DRIFT" || v.id === "LINES_TOO_MANY").length,
|
|
526
|
-
medium: 0,
|
|
527
|
-
low: 0,
|
|
528
|
-
};
|
|
529
|
-
const summary = verdict === "GO"
|
|
530
|
-
? "No spec gate issues detected"
|
|
531
|
-
: verdict === "BLOCK"
|
|
532
|
-
? "Spec gate blocked by policy violations"
|
|
533
|
-
: "Spec gate requires fixes";
|
|
534
|
-
return {
|
|
535
|
-
verdict,
|
|
536
|
-
summary,
|
|
537
|
-
exit_code: verdict === "GO" ? 0 : verdict === "FIX" ? 2 : 3,
|
|
538
|
-
evaluated_at: new Date().toISOString(),
|
|
539
|
-
issue_counts,
|
|
540
|
-
violations,
|
|
541
|
-
};
|
|
542
|
-
}
|
|
543
|
-
function detectNodeScripts(workspaceRoot) {
|
|
544
|
-
try {
|
|
545
|
-
const pkgPath = path.join(workspaceRoot, "package.json");
|
|
546
|
-
if (!fs.existsSync(pkgPath))
|
|
547
|
-
return { hasPackageJson: false, build: false, test: false };
|
|
548
|
-
const raw = JSON.parse(fs.readFileSync(pkgPath, "utf-8"));
|
|
549
|
-
if (!raw || typeof raw !== "object")
|
|
550
|
-
return { hasPackageJson: true, build: false, test: false };
|
|
551
|
-
const scripts = raw.scripts;
|
|
552
|
-
const build = !!(scripts && typeof scripts === "object" && typeof scripts.build === "string" && scripts.build.trim());
|
|
553
|
-
const test = !!(scripts && typeof scripts === "object" && typeof scripts.test === "string" && scripts.test.trim());
|
|
554
|
-
return { hasPackageJson: true, build, test };
|
|
555
|
-
}
|
|
556
|
-
catch {
|
|
557
|
-
return { hasPackageJson: true, build: false, test: false };
|
|
558
|
-
}
|
|
559
|
-
}
|
|
560
|
-
function getNpmCommand() {
|
|
561
|
-
return process.platform === "win32" ? "npm.cmd" : "npm";
|
|
562
|
-
}
|
|
563
|
-
function runVerificationCommand(workspaceRoot, cmd, args, timeoutSeconds) {
|
|
564
|
-
const r = spawnSync(cmd, args, {
|
|
565
|
-
cwd: workspaceRoot,
|
|
566
|
-
encoding: "utf8",
|
|
567
|
-
timeout: Math.max(1, timeoutSeconds) * 1000,
|
|
568
|
-
});
|
|
569
|
-
return {
|
|
570
|
-
ok: r.status === 0,
|
|
571
|
-
stdout: String(r.stdout || ""),
|
|
572
|
-
stderr: String(r.stderr || ""),
|
|
573
|
-
code: typeof r.status === "number" ? r.status : 1,
|
|
574
|
-
};
|
|
575
|
-
}
|
|
576
|
-
function buildClinicResult(params) {
|
|
577
|
-
const created_at = new Date().toISOString();
|
|
578
|
-
const lines_changed = params.diff.insertions + params.diff.deletions;
|
|
579
|
-
const evidenceRel = path.join("artifacts", "clinic_verification.log").replaceAll("\\", "/");
|
|
580
|
-
const evidenceAbs = path.join(getPmRunDir(params.workspaceRoot, params.runId), evidenceRel);
|
|
581
|
-
const scripts = detectNodeScripts(params.workspaceRoot);
|
|
582
|
-
const npmCmd = getNpmCommand();
|
|
583
|
-
const logs = [];
|
|
584
|
-
const reasons = [];
|
|
585
|
-
let buildStatus = "skipped";
|
|
586
|
-
let testsPassed = 0;
|
|
587
|
-
let testsFailed = 0;
|
|
588
|
-
if (!scripts.hasPackageJson) {
|
|
589
|
-
reasons.push({ id: "NO_COMMANDS", msg: "No package.json found; cannot auto-detect build/test commands", evidence_ref: evidenceRel });
|
|
590
|
-
fs.mkdirSync(path.dirname(evidenceAbs), { recursive: true });
|
|
591
|
-
fs.writeFileSync(evidenceAbs, "No package.json found.\n", "utf-8");
|
|
592
|
-
return {
|
|
593
|
-
schema_version: "clinic_result.v1.2",
|
|
594
|
-
tool: "clinic",
|
|
595
|
-
run_id: params.runId,
|
|
596
|
-
verdict: "FIX",
|
|
597
|
-
status: "FAILED",
|
|
598
|
-
iterations: 0,
|
|
599
|
-
lines_changed,
|
|
600
|
-
reason: "NO_COMMANDS",
|
|
601
|
-
evidence_path: evidenceRel,
|
|
602
|
-
summary: "No verification commands detected (package.json missing)",
|
|
603
|
-
reasons,
|
|
604
|
-
metrics: { tests: { passed: testsPassed, failed: testsFailed }, build: { status: buildStatus } },
|
|
605
|
-
policy: { max_iterations: 0, dry_run: true },
|
|
606
|
-
created_at,
|
|
607
|
-
};
|
|
608
|
-
}
|
|
609
|
-
if (!scripts.build && !scripts.test) {
|
|
610
|
-
reasons.push({ id: "NO_COMMANDS", msg: "No build/test scripts found in package.json", evidence_ref: evidenceRel });
|
|
611
|
-
fs.mkdirSync(path.dirname(evidenceAbs), { recursive: true });
|
|
612
|
-
fs.writeFileSync(evidenceAbs, "No build/test scripts found in package.json.\n", "utf-8");
|
|
613
|
-
return {
|
|
614
|
-
schema_version: "clinic_result.v1.2",
|
|
615
|
-
tool: "clinic",
|
|
616
|
-
run_id: params.runId,
|
|
617
|
-
verdict: "FIX",
|
|
618
|
-
status: "FAILED",
|
|
619
|
-
iterations: 0,
|
|
620
|
-
lines_changed,
|
|
621
|
-
reason: "NO_COMMANDS",
|
|
622
|
-
evidence_path: evidenceRel,
|
|
623
|
-
summary: "No verification commands detected (build/test scripts missing)",
|
|
624
|
-
reasons,
|
|
625
|
-
metrics: { tests: { passed: testsPassed, failed: testsFailed }, build: { status: buildStatus } },
|
|
626
|
-
policy: { max_iterations: 0, dry_run: true },
|
|
627
|
-
created_at,
|
|
628
|
-
};
|
|
629
|
-
}
|
|
630
|
-
if (scripts.build) {
|
|
631
|
-
const r = runVerificationCommand(params.workspaceRoot, npmCmd, ["run", "build", "--silent"], params.timeoutSeconds);
|
|
632
|
-
logs.push(`=== build ===\nexit=${r.code}\n${r.stdout}\n${r.stderr}\n`);
|
|
633
|
-
if (!r.ok) {
|
|
634
|
-
buildStatus = "fail";
|
|
635
|
-
reasons.push({ id: "BUILD_FAIL", msg: "Build command failed", evidence_ref: evidenceRel });
|
|
636
|
-
fs.mkdirSync(path.dirname(evidenceAbs), { recursive: true });
|
|
637
|
-
fs.writeFileSync(evidenceAbs, logs.join("\n"), "utf-8");
|
|
638
|
-
return {
|
|
639
|
-
schema_version: "clinic_result.v1.2",
|
|
640
|
-
tool: "clinic",
|
|
641
|
-
run_id: params.runId,
|
|
642
|
-
verdict: "BLOCK",
|
|
643
|
-
status: "FAILED",
|
|
644
|
-
iterations: 0,
|
|
645
|
-
lines_changed,
|
|
646
|
-
reason: "BUILD_FAIL",
|
|
647
|
-
evidence_path: evidenceRel,
|
|
648
|
-
summary: "Build failed",
|
|
649
|
-
reasons,
|
|
650
|
-
metrics: { tests: { passed: testsPassed, failed: testsFailed }, build: { status: buildStatus } },
|
|
651
|
-
policy: { max_iterations: 0, dry_run: true },
|
|
652
|
-
created_at,
|
|
653
|
-
};
|
|
654
|
-
}
|
|
655
|
-
buildStatus = "pass";
|
|
656
|
-
}
|
|
657
|
-
if (scripts.test) {
|
|
658
|
-
const r = runVerificationCommand(params.workspaceRoot, npmCmd, ["test", "--silent"], params.timeoutSeconds);
|
|
659
|
-
logs.push(`=== test ===\nexit=${r.code}\n${r.stdout}\n${r.stderr}\n`);
|
|
660
|
-
if (!r.ok) {
|
|
661
|
-
testsFailed = 1;
|
|
662
|
-
reasons.push({ id: "TEST_FAIL", msg: "Test command failed", evidence_ref: evidenceRel });
|
|
663
|
-
fs.mkdirSync(path.dirname(evidenceAbs), { recursive: true });
|
|
664
|
-
fs.writeFileSync(evidenceAbs, logs.join("\n"), "utf-8");
|
|
665
|
-
return {
|
|
666
|
-
schema_version: "clinic_result.v1.2",
|
|
667
|
-
tool: "clinic",
|
|
668
|
-
run_id: params.runId,
|
|
669
|
-
verdict: "FIX",
|
|
670
|
-
status: "FAILED",
|
|
671
|
-
iterations: 0,
|
|
672
|
-
lines_changed,
|
|
673
|
-
reason: "TEST_FAIL",
|
|
674
|
-
evidence_path: evidenceRel,
|
|
675
|
-
summary: "Tests failed",
|
|
676
|
-
reasons,
|
|
677
|
-
metrics: { tests: { passed: testsPassed, failed: testsFailed }, build: { status: buildStatus } },
|
|
678
|
-
policy: { max_iterations: 0, dry_run: true },
|
|
679
|
-
created_at,
|
|
680
|
-
};
|
|
681
|
-
}
|
|
682
|
-
testsPassed = 1;
|
|
683
|
-
}
|
|
684
|
-
fs.mkdirSync(path.dirname(evidenceAbs), { recursive: true });
|
|
685
|
-
fs.writeFileSync(evidenceAbs, logs.join("\n"), "utf-8");
|
|
686
|
-
return {
|
|
687
|
-
schema_version: "clinic_result.v1.2",
|
|
688
|
-
tool: "clinic",
|
|
689
|
-
run_id: params.runId,
|
|
690
|
-
verdict: "GO",
|
|
691
|
-
status: "SUCCESS",
|
|
692
|
-
iterations: 0,
|
|
693
|
-
lines_changed,
|
|
694
|
-
reason: null,
|
|
695
|
-
evidence_path: evidenceRel,
|
|
696
|
-
summary: "Build/tests passed",
|
|
697
|
-
reasons,
|
|
698
|
-
metrics: { tests: { passed: testsPassed, failed: testsFailed }, build: { status: buildStatus } },
|
|
699
|
-
policy: { max_iterations: 0, dry_run: true },
|
|
700
|
-
created_at,
|
|
701
|
-
};
|
|
702
|
-
}
|
|
703
|
-
function ensureGateAndClinicFiles(params) {
|
|
704
|
-
const runDir = getPmRunDir(params.workspaceRoot, params.runId);
|
|
705
|
-
fs.mkdirSync(runDir, { recursive: true });
|
|
706
|
-
const gatePath = path.join(runDir, "gate", "spec_gate_result.json");
|
|
707
|
-
const clinicPath = path.join(runDir, "clinic", "clinic_result.json");
|
|
708
|
-
const wantGate = params.targets?.gate ?? true;
|
|
709
|
-
const wantClinic = params.targets?.clinic ?? true;
|
|
710
|
-
const modifiedFiles = getModifiedFiles(params.workspaceRoot);
|
|
711
|
-
const diff = getDiffStats(params.workspaceRoot);
|
|
712
|
-
if (wantGate && !fs.existsSync(gatePath)) {
|
|
713
|
-
const decisionLog = readDecisionLog(params.workspaceRoot, params.runId);
|
|
714
|
-
const workOrder = readWorkOrder(params.workspaceRoot);
|
|
715
|
-
const gate = buildSpecGateResult({
|
|
716
|
-
workspaceRoot: params.workspaceRoot,
|
|
717
|
-
runId: params.runId,
|
|
718
|
-
modifiedFiles,
|
|
719
|
-
diff,
|
|
720
|
-
hasDecisionEvidence: decisionLog.length > 0,
|
|
721
|
-
workOrder,
|
|
722
|
-
});
|
|
723
|
-
const specMapInfo = loadSpecMapSafe(params.workspaceRoot);
|
|
724
|
-
if (specMapInfo && modifiedFiles.length > 0) {
|
|
725
|
-
const match = matchSpecMap(specMapInfo.specMap, modifiedFiles);
|
|
726
|
-
if (match.unmappedFiles.length > 0 && specMapInfo.specMap.unmapped_policy !== "GO") {
|
|
727
|
-
gate.violations = gate.violations ?? [];
|
|
728
|
-
gate.violations.push({
|
|
729
|
-
id: "SPEC_MAP_UNMAPPED",
|
|
730
|
-
path: "project",
|
|
731
|
-
msg: `spec_map unmapped files: ${match.unmappedFiles.slice(0, 5).join(", ")}${match.unmappedFiles.length > 5 ? "..." : ""}`,
|
|
732
|
-
});
|
|
733
|
-
gate.verdict = maxVerdict(gate.verdict, specMapInfo.specMap.unmapped_policy === "BLOCK" ? "BLOCK" : "FIX");
|
|
734
|
-
gate.exit_code = gate.verdict === "GO" ? 0 : gate.verdict === "FIX" ? 2 : 3;
|
|
735
|
-
}
|
|
736
|
-
}
|
|
737
|
-
writeJsonAtomic(gatePath, gate);
|
|
738
|
-
}
|
|
739
|
-
if (wantClinic && !fs.existsSync(clinicPath)) {
|
|
740
|
-
const clinic = buildClinicResult({
|
|
741
|
-
workspaceRoot: params.workspaceRoot,
|
|
742
|
-
runId: params.runId,
|
|
743
|
-
diff,
|
|
744
|
-
timeoutSeconds: params.timeoutSeconds,
|
|
745
|
-
});
|
|
746
|
-
writeJsonAtomic(clinicPath, clinic);
|
|
747
|
-
}
|
|
748
|
-
}
|
|
749
|
-
// ============================================================
|
|
750
|
-
// Output Renderer
|
|
751
|
-
// ============================================================
|
|
752
|
-
function renderOutput(summary, jsonMode, extras) {
|
|
753
|
-
if (jsonMode) {
|
|
754
|
-
console.log(JSON.stringify(summary, null, 2));
|
|
755
|
-
return;
|
|
756
|
-
}
|
|
757
|
-
const finalVerdict = summary.verdict.final;
|
|
758
|
-
const emoji = finalVerdict === "GO" ? "✅" : finalVerdict === "FIX" ? "⚠️" : "❌";
|
|
759
|
-
console.log(`\n${emoji} Vibe CI: ${finalVerdict}\n`);
|
|
760
|
-
console.log(`Run ID: ${summary.run_id}`);
|
|
761
|
-
console.log(`Timestamp: ${summary.timestamp}`);
|
|
762
|
-
console.log(`\nSpec Gate: ${summary.verdict.gate}`);
|
|
763
|
-
console.log(`\nCode Clinic: ${summary.verdict.clinic}`);
|
|
764
|
-
if (extras?.licenseMessage) {
|
|
765
|
-
const planIcon = extras.plan === "PRO" ? "💎" : "🆓";
|
|
766
|
-
console.log(`\n${planIcon} ${extras.licenseMessage}`);
|
|
767
|
-
}
|
|
768
|
-
// BitNet Advisory 출력
|
|
769
|
-
if (extras?.bitnet) {
|
|
770
|
-
const adv = extras.bitnet;
|
|
771
|
-
console.log(`\nBitNet Advisory:`);
|
|
772
|
-
console.log(` Trace ID: ${adv.trace_id}`);
|
|
773
|
-
if (adv.pre_check) {
|
|
774
|
-
const preEmoji = adv.pre_check.verdict === "GO" ? "✅" : adv.pre_check.verdict === "WARNING" ? "⚠️" : "❌";
|
|
775
|
-
console.log(` Pre-check: ${preEmoji} ${adv.pre_check.verdict}`);
|
|
776
|
-
}
|
|
777
|
-
if (adv.post_check) {
|
|
778
|
-
const postEmoji = adv.post_check.verdict === "GO" ? "✅" : adv.post_check.verdict === "WARNING" ? "⚠️" : "❌";
|
|
779
|
-
console.log(` Post-check: ${postEmoji} ${adv.post_check.verdict}`);
|
|
780
|
-
}
|
|
781
|
-
if (adv.next_actions.length > 0) {
|
|
782
|
-
console.log(` Recommended actions:`);
|
|
783
|
-
for (const action of adv.next_actions.slice(0, 3)) {
|
|
784
|
-
console.log(` - ${action}`);
|
|
785
|
-
}
|
|
786
|
-
}
|
|
787
|
-
if (adv.review_focus.length > 0) {
|
|
788
|
-
console.log(` Review focus:`);
|
|
789
|
-
for (const file of adv.review_focus.slice(0, 3)) {
|
|
790
|
-
console.log(` - ${file}`);
|
|
791
|
-
}
|
|
792
|
-
}
|
|
793
|
-
}
|
|
794
|
-
console.log("");
|
|
795
|
-
}
|
|
796
|
-
// ============================================================
|
|
797
|
-
// Deps Command Handler
|
|
798
|
-
// ============================================================
|
|
799
|
-
async function handleDepsCommand(args) {
|
|
800
|
-
const subcommand = args[0];
|
|
801
|
-
const workspace = path.resolve(".");
|
|
802
|
-
const jsonMode = args.includes("--json");
|
|
803
|
-
const uxMode = args.includes("--ux");
|
|
804
|
-
const lang = args.includes("--ko") ? "ko" : "en";
|
|
805
|
-
if (subcommand === "update") {
|
|
806
|
-
const skipVerify = args.includes("--skip-verify");
|
|
807
|
-
const dryRun = args.includes("--dry-run");
|
|
808
|
-
const result = await runDepsUpdate(workspace, { skipVerify, dryRun });
|
|
809
|
-
if (jsonMode) {
|
|
810
|
-
if (uxMode && result.verification) {
|
|
811
|
-
// Include ToolStatus format for verification
|
|
812
|
-
const verifyStatus = buildVerificationStatus(result.verification.steps, result.verification.verdict, result.verification.warning);
|
|
813
|
-
console.log(JSON.stringify({ ...result, verification_status: verifyStatus }, null, 2));
|
|
814
|
-
}
|
|
815
|
-
else {
|
|
816
|
-
console.log(JSON.stringify(result, null, 2));
|
|
817
|
-
}
|
|
818
|
-
}
|
|
819
|
-
else if (uxMode && result.verification) {
|
|
820
|
-
// UX-optimized output
|
|
821
|
-
const verifyStatus = buildVerificationStatus(result.verification.steps, result.verification.verdict, result.verification.warning);
|
|
822
|
-
console.log(renderToolStatus(verifyStatus, lang).join("\n"));
|
|
823
|
-
}
|
|
824
|
-
else {
|
|
825
|
-
// Legacy output
|
|
826
|
-
const output = formatDepsUpdate(result);
|
|
827
|
-
console.log(output.lines.join("\n"));
|
|
828
|
-
}
|
|
829
|
-
const exitCode = result.verdict === "GO" ? 0 : result.verdict === "FIX" ? 2 : 3;
|
|
830
|
-
process.exit(exitCode);
|
|
831
|
-
}
|
|
832
|
-
if (subcommand === "check") {
|
|
833
|
-
const result = checkDrift(workspace);
|
|
834
|
-
if (jsonMode) {
|
|
835
|
-
if (uxMode) {
|
|
836
|
-
const toolStatus = buildDriftCheckStatus(result);
|
|
837
|
-
console.log(JSON.stringify(toolStatus, null, 2));
|
|
838
|
-
}
|
|
839
|
-
else {
|
|
840
|
-
console.log(JSON.stringify(result, null, 2));
|
|
841
|
-
}
|
|
842
|
-
}
|
|
843
|
-
else if (uxMode) {
|
|
844
|
-
const toolStatus = buildDriftCheckStatus(result);
|
|
845
|
-
console.log(renderToolStatus(toolStatus, lang).join("\n"));
|
|
846
|
-
}
|
|
847
|
-
else {
|
|
848
|
-
const output = formatDriftCheck(result);
|
|
849
|
-
console.log(output.lines.join("\n"));
|
|
850
|
-
}
|
|
851
|
-
const exitCode = result.verdict === "GO" ? 0 : result.verdict === "FIX" ? 2 : 3;
|
|
852
|
-
process.exit(exitCode);
|
|
853
|
-
}
|
|
854
|
-
// Help
|
|
855
|
-
console.log(`
|
|
856
|
-
vibe deps - Dependency Management
|
|
857
|
-
|
|
858
|
-
Commands:
|
|
859
|
-
vibe deps update Update dependencies with verification
|
|
860
|
-
vibe deps check Check for dependency drift
|
|
861
|
-
|
|
862
|
-
Options:
|
|
863
|
-
--skip-verify Skip verification after update
|
|
864
|
-
--dry-run Show what would be updated
|
|
865
|
-
--json JSON output
|
|
866
|
-
--ux UX-optimized output (Template ID system)
|
|
867
|
-
--ko Korean labels (with --ux)
|
|
868
|
-
`);
|
|
869
|
-
process.exit(0);
|
|
870
|
-
}
|
|
871
|
-
// ============================================================
|
|
872
|
-
// Doctor Command Handler
|
|
873
|
-
// ============================================================
|
|
874
|
-
async function handleDoctorCommand(args) {
|
|
875
|
-
const subcommand = args[0];
|
|
876
|
-
const workspace = path.resolve(".");
|
|
877
|
-
const jsonMode = args.includes("--json");
|
|
878
|
-
const uxMode = args.includes("--ux");
|
|
879
|
-
const lang = args.includes("--ko") ? "ko" : "en";
|
|
880
|
-
if (subcommand === "env") {
|
|
881
|
-
const result = checkEnvironment(workspace);
|
|
882
|
-
if (jsonMode) {
|
|
883
|
-
// JSON with ToolStatus format
|
|
884
|
-
const toolStatus = buildEnvCheckStatus(result);
|
|
885
|
-
console.log(JSON.stringify(uxMode ? toolStatus : result, null, 2));
|
|
886
|
-
}
|
|
887
|
-
else if (uxMode) {
|
|
888
|
-
// UX-optimized output with Template ID system
|
|
889
|
-
const toolStatus = buildEnvCheckStatus(result);
|
|
890
|
-
console.log(renderToolStatus(toolStatus, lang).join("\n"));
|
|
891
|
-
}
|
|
892
|
-
else {
|
|
893
|
-
// Legacy output
|
|
894
|
-
const output = formatEnvCheck(result);
|
|
895
|
-
console.log(output.lines.join("\n"));
|
|
896
|
-
}
|
|
897
|
-
const exitCode = result.verdict === "GO" ? 0 : result.verdict === "FIX" ? 2 : 3;
|
|
898
|
-
process.exit(exitCode);
|
|
899
|
-
}
|
|
900
|
-
if (subcommand === "deps") {
|
|
901
|
-
// Combined deps check
|
|
902
|
-
const envResult = checkEnvironment(workspace);
|
|
903
|
-
const driftResult = checkDrift(workspace);
|
|
904
|
-
if (jsonMode) {
|
|
905
|
-
if (uxMode) {
|
|
906
|
-
// ToolStatus format for both
|
|
907
|
-
const envStatus = buildEnvCheckStatus(envResult);
|
|
908
|
-
const driftStatus = buildDriftCheckStatus(driftResult);
|
|
909
|
-
// Add dependency relationship
|
|
910
|
-
driftStatus.depends_on = ["env-check"];
|
|
911
|
-
console.log(JSON.stringify({ env: envStatus, drift: driftStatus }, null, 2));
|
|
912
|
-
}
|
|
913
|
-
else {
|
|
914
|
-
console.log(JSON.stringify({ env: envResult, drift: driftResult }, null, 2));
|
|
915
|
-
}
|
|
916
|
-
}
|
|
917
|
-
else if (uxMode) {
|
|
918
|
-
// Pipeline view with UX renderer
|
|
919
|
-
const envStatus = buildEnvCheckStatus(envResult);
|
|
920
|
-
const driftStatus = buildDriftCheckStatus(driftResult);
|
|
921
|
-
driftStatus.depends_on = ["env-check"];
|
|
922
|
-
console.log(renderPipelineStatus([envStatus, driftStatus], lang).join("\n"));
|
|
923
|
-
console.log("");
|
|
924
|
-
console.log("--- Details ---");
|
|
925
|
-
console.log("");
|
|
926
|
-
console.log(renderToolStatus(envStatus, lang).join("\n"));
|
|
927
|
-
console.log("");
|
|
928
|
-
console.log(renderToolStatus(driftStatus, lang).join("\n"));
|
|
929
|
-
}
|
|
930
|
-
else {
|
|
931
|
-
// Legacy output
|
|
932
|
-
const envOutput = formatEnvCheck(envResult);
|
|
933
|
-
const driftOutput = formatDriftCheck(driftResult);
|
|
934
|
-
console.log("=== Environment Check ===");
|
|
935
|
-
console.log(envOutput.lines.join("\n"));
|
|
936
|
-
console.log("\n=== Drift Check ===");
|
|
937
|
-
console.log(driftOutput.lines.join("\n"));
|
|
938
|
-
}
|
|
939
|
-
// Exit with worst verdict
|
|
940
|
-
const envCode = envResult.verdict === "GO" ? 0 : envResult.verdict === "FIX" ? 2 : 3;
|
|
941
|
-
const driftCode = driftResult.verdict === "GO" ? 0 : driftResult.verdict === "FIX" ? 2 : 3;
|
|
942
|
-
process.exit(Math.max(envCode, driftCode));
|
|
943
|
-
}
|
|
944
|
-
// Help
|
|
945
|
-
console.log(`
|
|
946
|
-
vibe doctor - Diagnostics
|
|
947
|
-
|
|
948
|
-
Commands:
|
|
949
|
-
vibe doctor env Check Node.js and package manager versions
|
|
950
|
-
vibe doctor deps Check dependencies (env + drift)
|
|
951
|
-
|
|
952
|
-
Options:
|
|
953
|
-
--json JSON output
|
|
954
|
-
--ux UX-optimized output (Template ID system)
|
|
955
|
-
--ko Korean labels (with --ux)
|
|
956
|
-
`);
|
|
957
|
-
process.exit(0);
|
|
958
|
-
}
|
|
959
|
-
// ============================================================
|
|
960
|
-
// Main
|
|
961
|
-
// ============================================================
|
|
962
|
-
async function main() {
|
|
963
|
-
const args = process.argv.slice(2);
|
|
964
|
-
// Fire-and-Forget: 이전 큐 플러시 (백그라운드)
|
|
965
|
-
void flushCloudSyncQueueInBackground();
|
|
966
|
-
// auth 서브커맨드 → vibe-auth 호출
|
|
967
|
-
if (args[0] === "auth") {
|
|
968
|
-
const authModule = await import("./vibe-auth.js");
|
|
969
|
-
return;
|
|
970
|
-
}
|
|
971
|
-
// deps 서브커맨드 처리
|
|
972
|
-
if (args[0] === "deps") {
|
|
973
|
-
await handleDepsCommand(args.slice(1));
|
|
974
|
-
return;
|
|
975
|
-
}
|
|
976
|
-
// doctor 서브커맨드 처리
|
|
977
|
-
if (args[0] === "doctor") {
|
|
978
|
-
await handleDoctorCommand(args.slice(1));
|
|
979
|
-
return;
|
|
980
|
-
}
|
|
981
|
-
// "ci" 서브커맨드 제거 (vibe ci → vibe)
|
|
982
|
-
// Subcommand (default: ci). `inspect` is an alias for `clinic`.
|
|
983
|
-
let subcommand = "ci";
|
|
984
|
-
if (args[0] === "ci" || args[0] === "gate" || args[0] === "clinic" || args[0] === "inspect") {
|
|
985
|
-
const raw = String(args.shift() ?? "").trim();
|
|
986
|
-
subcommand = raw === "inspect" ? "clinic" : raw;
|
|
987
|
-
}
|
|
988
|
-
const options = parseArgs(args);
|
|
989
|
-
// 1. Preflight
|
|
990
|
-
const workspace = path.resolve(options.workspace);
|
|
991
|
-
if (!fs.existsSync(workspace)) {
|
|
992
|
-
console.error(`ERROR: Workspace not found: ${workspace}`);
|
|
993
|
-
process.exit(EXIT_CODES.ERROR);
|
|
994
|
-
}
|
|
995
|
-
// 2. Run ID 결정
|
|
996
|
-
const runId = options.runId || generateRunId();
|
|
997
|
-
const pmRunDir = getPmRunDir(workspace, runId);
|
|
998
|
-
// 2.1. current_run_id.txt 갱신 (SSOT: `.vibe/runs/<run_id>` 증거 기반 워크플로우)
|
|
999
|
-
try {
|
|
1000
|
-
const stateDir = path.join(getVibeDir(workspace), "state");
|
|
1001
|
-
ensureDirSync(stateDir);
|
|
1002
|
-
fs.writeFileSync(path.join(stateDir, "current_run_id.txt"), `${runId}\n`, "utf-8");
|
|
1003
|
-
}
|
|
1004
|
-
catch {
|
|
1005
|
-
// ignore
|
|
1006
|
-
}
|
|
1007
|
-
// 3. 라이선스 로드 (FAIL-SAFE: 실패 시 FREE로 강등)
|
|
1008
|
-
// gate/clinic only mode (no engine, no reporting)
|
|
1009
|
-
if (subcommand === "gate") {
|
|
1010
|
-
ensureGateAndClinicFiles({
|
|
1011
|
-
workspaceRoot: workspace,
|
|
1012
|
-
runId,
|
|
1013
|
-
timeoutSeconds: options.timeout,
|
|
1014
|
-
targets: { gate: true, clinic: false },
|
|
1015
|
-
});
|
|
1016
|
-
const runDir = resolvePmRunDirForRead(workspace, runId);
|
|
1017
|
-
const gateOnly = readJsonFile(path.join(runDir, "gate", "spec_gate_result.json"));
|
|
1018
|
-
if (options.json) {
|
|
1019
|
-
console.log(JSON.stringify(gateOnly ?? { verdict: "BLOCK" }, null, 2));
|
|
1020
|
-
}
|
|
1021
|
-
else {
|
|
1022
|
-
console.log(gateOnly?.summary ?? `Spec Gate: ${gateOnly?.verdict ?? "BLOCK"}`);
|
|
1023
|
-
}
|
|
1024
|
-
process.exit(gateOnly?.verdict === "GO" ? 0 : gateOnly?.verdict === "FIX" ? 2 : 3);
|
|
1025
|
-
}
|
|
1026
|
-
if (subcommand === "clinic") {
|
|
1027
|
-
ensureGateAndClinicFiles({
|
|
1028
|
-
workspaceRoot: workspace,
|
|
1029
|
-
runId,
|
|
1030
|
-
timeoutSeconds: options.timeout,
|
|
1031
|
-
targets: { gate: false, clinic: true },
|
|
1032
|
-
});
|
|
1033
|
-
const runDir = resolvePmRunDirForRead(workspace, runId);
|
|
1034
|
-
const clinicOnly = readJsonFile(path.join(runDir, "clinic", "clinic_result.json"));
|
|
1035
|
-
if (options.json) {
|
|
1036
|
-
console.log(JSON.stringify(clinicOnly ?? { verdict: "BLOCK" }, null, 2));
|
|
1037
|
-
}
|
|
1038
|
-
else {
|
|
1039
|
-
console.log(clinicOnly?.summary ?? `Code Clinic: ${clinicOnly?.verdict ?? "BLOCK"}`);
|
|
1040
|
-
}
|
|
1041
|
-
process.exit(clinicOnly?.verdict === "GO" ? 0 : clinicOnly?.verdict === "FIX" ? 2 : 3);
|
|
1042
|
-
}
|
|
1043
|
-
const licenseManager = new LicenseManager();
|
|
1044
|
-
const entitlements = licenseManager.loadEntitlements();
|
|
1045
|
-
const engineEnvConfig = licenseManager.getEngineEnvConfig(entitlements);
|
|
1046
|
-
const licenseMessage = licenseManager.getStatusMessage(entitlements);
|
|
1047
|
-
// 4. Engine 찾기
|
|
1048
|
-
const vpmBackPath = findEngine("vpm-back");
|
|
1049
|
-
// NOTE: vpm-back is best-effort. If missing/incompatible, fall back to local evaluators.
|
|
1050
|
-
// 5. Engine 환경 변수 설정
|
|
1051
|
-
// 우선순위: CLI --no-kce > 라이선스 > 기본값
|
|
1052
|
-
const engineEnv = {
|
|
1053
|
-
...process.env,
|
|
1054
|
-
VIBE_NO_KCE: options.noKce ? "1" : engineEnvConfig.VIBE_NO_KCE,
|
|
1055
|
-
VIBE_CLINIC_MODE: engineEnvConfig.VIBE_CLINIC_MODE,
|
|
1056
|
-
VIBE_AUTO_FIX_ALLOWED: engineEnvConfig.VIBE_AUTO_FIX_ALLOWED,
|
|
1057
|
-
};
|
|
1058
|
-
// 6. Engine 호출
|
|
1059
|
-
const engineArgs = ["run", "--workspace", workspace, "--run-id", runId, "--out-dir", pmRunDir];
|
|
1060
|
-
if (options.mode === "ci")
|
|
1061
|
-
engineArgs.push("--ci");
|
|
1062
|
-
if (!options.json) {
|
|
1063
|
-
// 라이선스 상태 출력 (human mode)
|
|
1064
|
-
const planIcon = entitlements.planEffective === "PRO" ? "🔑" : "🆓";
|
|
1065
|
-
console.log(`${planIcon} ${licenseMessage}`);
|
|
1066
|
-
console.log("");
|
|
1067
|
-
}
|
|
1068
|
-
// ============================================================
|
|
1069
|
-
// BitNet Pre-check (AI Auditor Agent)
|
|
1070
|
-
// ============================================================
|
|
1071
|
-
let bitnetPreCheck = null;
|
|
1072
|
-
try {
|
|
1073
|
-
bitnetPreCheck = await bitnetCheck({ files: [], context: "" });
|
|
1074
|
-
if (!options.json && bitnetPreCheck.verdict !== "GO") {
|
|
1075
|
-
const emoji = bitnetPreCheck.verdict === "WARNING" ? "⚠️" : "❌";
|
|
1076
|
-
console.log(`${emoji} BitNet Pre-check: ${bitnetPreCheck.verdict}`);
|
|
1077
|
-
console.log(` ${bitnetPreCheck.reason}`);
|
|
1078
|
-
if (bitnetPreCheck.next_actions.length > 0) {
|
|
1079
|
-
console.log(` Recommended: ${bitnetPreCheck.next_actions[0]}`);
|
|
1080
|
-
}
|
|
1081
|
-
console.log("");
|
|
1082
|
-
}
|
|
1083
|
-
}
|
|
1084
|
-
catch {
|
|
1085
|
-
// BitNet 실패는 무시 (FAIL-SAFE)
|
|
1086
|
-
}
|
|
1087
|
-
if (vpmBackPath) {
|
|
1088
|
-
try {
|
|
1089
|
-
const result = await runEngine(vpmBackPath, engineArgs, {
|
|
1090
|
-
timeout: options.timeout,
|
|
1091
|
-
cwd: workspace,
|
|
1092
|
-
env: engineEnv,
|
|
1093
|
-
});
|
|
1094
|
-
if (result.code !== 0) {
|
|
1095
|
-
try {
|
|
1096
|
-
const runDir = getPmRunDir(workspace, runId);
|
|
1097
|
-
const logPath = path.join(runDir, "artifacts", "engine_stderr.log");
|
|
1098
|
-
fs.mkdirSync(path.dirname(logPath), { recursive: true });
|
|
1099
|
-
fs.writeFileSync(logPath, String(result.stderr || result.stdout || ""), "utf-8");
|
|
1100
|
-
}
|
|
1101
|
-
catch {
|
|
1102
|
-
// ignore
|
|
1103
|
-
}
|
|
1104
|
-
}
|
|
1105
|
-
}
|
|
1106
|
-
catch {
|
|
1107
|
-
// ignore (fallback below)
|
|
1108
|
-
}
|
|
1109
|
-
}
|
|
1110
|
-
// Ensure mandatory artifacts exist (FAIL-SAFE: generate locally if engine didn't produce them).
|
|
1111
|
-
ensureGateAndClinicFiles({ workspaceRoot: workspace, runId, timeoutSeconds: options.timeout });
|
|
1112
|
-
// 7. 결과 파일 읽기
|
|
1113
|
-
const runsDir = resolvePmRunDirForRead(workspace, runId);
|
|
1114
|
-
const gateResult = readJsonFile(path.join(runsDir, "gate", "spec_gate_result.json"));
|
|
1115
|
-
const clinicResult = readJsonFile(path.join(runsDir, "clinic", "clinic_result.json"));
|
|
1116
|
-
// 7.5. Skeleton Map 읽기 (FAIL-SAFE: 없어도 진행)
|
|
1117
|
-
const skeletonResult = readSkeletonMapSummary(runsDir);
|
|
1118
|
-
const skeletonField = buildSkeletonField(skeletonResult, runsDir);
|
|
1119
|
-
// 8. Verdict 합성
|
|
1120
|
-
const baseVerdict = synthesizeVerdict(gateResult, clinicResult);
|
|
1121
|
-
const violationBundle = extractViolations(gateResult, clinicResult);
|
|
1122
|
-
const ciViolations = violationBundle.ci;
|
|
1123
|
-
const syncViolations = violationBundle.sync;
|
|
1124
|
-
const gateVerdict = gateResult?.verdict ?? "BLOCK";
|
|
1125
|
-
const clinicVerdict = clinicResult?.verdict ?? "BLOCK";
|
|
1126
|
-
// 8.5. Reviewer UX 데이터 수집
|
|
1127
|
-
const decisionLog = readDecisionLog(workspace, runId);
|
|
1128
|
-
const hotspots = getHotspotFiles(workspace);
|
|
1129
|
-
// 8.5.5. Spec Map enforcement (FAIL-SAFE)
|
|
1130
|
-
try {
|
|
1131
|
-
const specMapInfo = loadSpecMapSafe(workspace);
|
|
1132
|
-
const modifiedFiles = getModifiedFiles(workspace);
|
|
1133
|
-
if (specMapInfo && modifiedFiles.length > 0) {
|
|
1134
|
-
const match = matchSpecMap(specMapInfo.specMap, modifiedFiles);
|
|
1135
|
-
const hasSpecRefs = decisionLog.some((e) => Array.isArray(e.spec_refs) && e.spec_refs.length > 0);
|
|
1136
|
-
if (match.matchedSpecIds.size > 0 && !hasSpecRefs) {
|
|
1137
|
-
const msg = missingDecisionMessage();
|
|
1138
|
-
const v = {
|
|
1139
|
-
type: msg.type,
|
|
1140
|
-
severity: msg.severity,
|
|
1141
|
-
title: msg.title,
|
|
1142
|
-
path: "project",
|
|
1143
|
-
userMessage: msg.userMessage,
|
|
1144
|
-
recovery_hint: msg.recovery,
|
|
1145
|
-
};
|
|
1146
|
-
ciViolations.push(v);
|
|
1147
|
-
syncViolations.push({
|
|
1148
|
-
type: v.type,
|
|
1149
|
-
severity: v.severity,
|
|
1150
|
-
title: v.title,
|
|
1151
|
-
path: v.path,
|
|
1152
|
-
userMessage: v.userMessage,
|
|
1153
|
-
recovery_hint: v.recovery_hint,
|
|
1154
|
-
detected_at: new Date().toISOString(),
|
|
1155
|
-
});
|
|
1156
|
-
}
|
|
1157
|
-
if (match.unmappedFiles.length > 0 && specMapInfo.specMap.unmapped_policy !== "GO") {
|
|
1158
|
-
const sev = specMapInfo.specMap.unmapped_policy === "BLOCK" ? "BLOCK" : "FIX";
|
|
1159
|
-
const v = {
|
|
1160
|
-
type: "SPEC_MAP_UNMAPPED",
|
|
1161
|
-
severity: sev,
|
|
1162
|
-
title: "⚠️ Unmapped Spec Map changes",
|
|
1163
|
-
path: "project",
|
|
1164
|
-
userMessage: `Found ${match.unmappedFiles.length} changed file(s) not mapped in spec_map.`,
|
|
1165
|
-
recovery_hint: `Add the file(s) (glob) to ${specMapInfo.pathRel}.`,
|
|
1166
|
-
};
|
|
1167
|
-
ciViolations.push(v);
|
|
1168
|
-
syncViolations.push({
|
|
1169
|
-
type: v.type,
|
|
1170
|
-
severity: v.severity,
|
|
1171
|
-
title: v.title,
|
|
1172
|
-
path: v.path,
|
|
1173
|
-
userMessage: v.userMessage,
|
|
1174
|
-
recovery_hint: v.recovery_hint,
|
|
1175
|
-
detected_at: new Date().toISOString(),
|
|
1176
|
-
});
|
|
1177
|
-
}
|
|
1178
|
-
}
|
|
1179
|
-
}
|
|
1180
|
-
catch {
|
|
1181
|
-
// ignore
|
|
1182
|
-
}
|
|
1183
|
-
// 8.5.6. Mapping Guard (소속 없는 변경 방지)
|
|
1184
|
-
let mappingResult = null;
|
|
1185
|
-
try {
|
|
1186
|
-
if (hasSpecMap(workspace)) {
|
|
1187
|
-
mappingResult = runMappingPipeline({
|
|
1188
|
-
workspaceRoot: workspace,
|
|
1189
|
-
run_id: runId,
|
|
1190
|
-
});
|
|
1191
|
-
// Map verdict violations to CI violations
|
|
1192
|
-
if (mappingResult.decision.verdict !== "GO") {
|
|
1193
|
-
for (const violation of mappingResult.changeMap.violations) {
|
|
1194
|
-
const sev = violation.severity === "BLOCK" ? "BLOCK" : "FIX";
|
|
1195
|
-
const v = {
|
|
1196
|
-
type: `MAPPING_${violation.code}`,
|
|
1197
|
-
severity: sev,
|
|
1198
|
-
title: violation.severity === "BLOCK" ? "🛑 Boundary violation" : "⚠️ Mapping required",
|
|
1199
|
-
path: violation.file ?? "project",
|
|
1200
|
-
userMessage: violation.detail,
|
|
1201
|
-
recovery_hint: mappingResult.decision.navigation?.[0] ?? "Check spec_map.v1.json or code ownership.",
|
|
1202
|
-
};
|
|
1203
|
-
ciViolations.push(v);
|
|
1204
|
-
syncViolations.push({
|
|
1205
|
-
type: v.type,
|
|
1206
|
-
severity: v.severity,
|
|
1207
|
-
title: v.title,
|
|
1208
|
-
path: v.path,
|
|
1209
|
-
userMessage: v.userMessage,
|
|
1210
|
-
recovery_hint: v.recovery_hint,
|
|
1211
|
-
detected_at: new Date().toISOString(),
|
|
1212
|
-
});
|
|
1213
|
-
}
|
|
1214
|
-
}
|
|
1215
|
-
}
|
|
1216
|
-
}
|
|
1217
|
-
catch {
|
|
1218
|
-
// Mapping Guard 실패는 무시 (FAIL-SAFE)
|
|
1219
|
-
}
|
|
1220
|
-
// 8.5.7. Repeat Risk (7일 내 동일 위반 3회+ → BLOCK)
|
|
1221
|
-
try {
|
|
1222
|
-
const seen = new Set();
|
|
1223
|
-
for (const v of ciViolations) {
|
|
1224
|
-
const key = `${v.path}::${v.type}`;
|
|
1225
|
-
if (seen.has(key))
|
|
1226
|
-
continue;
|
|
1227
|
-
seen.add(key);
|
|
1228
|
-
const prev = getRepeatCount(workspace, { path: v.path, type: v.type, runId });
|
|
1229
|
-
// prev >= 2 means this is 3rd+ occurrence including current
|
|
1230
|
-
if (prev >= 2) {
|
|
1231
|
-
const repeatV = {
|
|
1232
|
-
type: "ITERATION_LIMIT",
|
|
1233
|
-
severity: "BLOCK",
|
|
1234
|
-
title: "🛑 Repeated failure 3+ times",
|
|
1235
|
-
path: v.path,
|
|
1236
|
-
userMessage: `Same violation (${v.type}) occurred ${prev + 1} times in the last 7 days.`,
|
|
1237
|
-
recovery_hint: "Return to Decision phase and reconsider the design/approach.",
|
|
1238
|
-
};
|
|
1239
|
-
ciViolations.push(repeatV);
|
|
1240
|
-
syncViolations.push({
|
|
1241
|
-
type: repeatV.type,
|
|
1242
|
-
severity: repeatV.severity,
|
|
1243
|
-
title: repeatV.title,
|
|
1244
|
-
path: repeatV.path,
|
|
1245
|
-
userMessage: repeatV.userMessage,
|
|
1246
|
-
recovery_hint: repeatV.recovery_hint,
|
|
1247
|
-
detected_at: new Date().toISOString(),
|
|
1248
|
-
});
|
|
1249
|
-
}
|
|
1250
|
-
}
|
|
1251
|
-
}
|
|
1252
|
-
catch {
|
|
1253
|
-
// ignore
|
|
1254
|
-
}
|
|
1255
|
-
const verdict = maxVerdict(baseVerdict, verdictFromCiViolations(ciViolations));
|
|
1256
|
-
// 8.6. BitNet Post-check (AI Auditor Agent)
|
|
1257
|
-
let bitnetPostCheck = null;
|
|
1258
|
-
try {
|
|
1259
|
-
// Post-check with synthesized verdict context
|
|
1260
|
-
const contextInfo = `verdict: ${verdict}, gate: ${gateResult?.verdict}, clinic: ${clinicResult?.verdict}`;
|
|
1261
|
-
bitnetPostCheck = await bitnetCheck({ files: [], context: contextInfo });
|
|
1262
|
-
}
|
|
1263
|
-
catch {
|
|
1264
|
-
// BitNet 실패는 무시 (FAIL-SAFE)
|
|
1265
|
-
}
|
|
1266
|
-
// 8.7. Build BitNet Advisory
|
|
1267
|
-
let bitnetAdvisory;
|
|
1268
|
-
if (bitnetPreCheck || bitnetPostCheck) {
|
|
1269
|
-
const traceId = bitnetPostCheck?.trace_id || bitnetPreCheck?.trace_id || "";
|
|
1270
|
-
bitnetAdvisory = {
|
|
1271
|
-
trace_id: traceId,
|
|
1272
|
-
pre_check: bitnetPreCheck ? {
|
|
1273
|
-
verdict: bitnetPreCheck.verdict,
|
|
1274
|
-
risk_tags: bitnetPreCheck.risk_tags,
|
|
1275
|
-
reason: bitnetPreCheck.reason,
|
|
1276
|
-
} : null,
|
|
1277
|
-
post_check: bitnetPostCheck ? {
|
|
1278
|
-
verdict: bitnetPostCheck.verdict,
|
|
1279
|
-
risk_tags: bitnetPostCheck.risk_tags,
|
|
1280
|
-
reason: bitnetPostCheck.reason,
|
|
1281
|
-
} : null,
|
|
1282
|
-
next_actions: bitnetPostCheck?.next_actions || bitnetPreCheck?.next_actions || [],
|
|
1283
|
-
review_focus: bitnetPostCheck?.review_focus || bitnetPreCheck?.review_focus || [],
|
|
1284
|
-
};
|
|
1285
|
-
}
|
|
1286
|
-
// 9. Summary 생성
|
|
1287
|
-
const summary = {
|
|
1288
|
-
schema_version: "ci_summary.v1",
|
|
1289
|
-
run_id: runId,
|
|
1290
|
-
timestamp: new Date().toISOString(),
|
|
1291
|
-
verdict: {
|
|
1292
|
-
final: verdict,
|
|
1293
|
-
gate: gateVerdict,
|
|
1294
|
-
clinic: clinicVerdict,
|
|
1295
|
-
exit_code: EXIT_CODES[verdict],
|
|
1296
|
-
},
|
|
1297
|
-
violations: ciViolations.length > 0 ? ciViolations : undefined,
|
|
1298
|
-
metrics: {
|
|
1299
|
-
gate_issue_count: gateResult?.violations?.length ?? 0,
|
|
1300
|
-
ralph_iterations: clinicResult?.iterations ?? 0,
|
|
1301
|
-
lines_changed: clinicResult?.lines_changed ?? 0,
|
|
1302
|
-
},
|
|
1303
|
-
preprocess_summary: getPreprocessSummary(workspace, runId),
|
|
1304
|
-
skeleton: skeletonField,
|
|
1305
|
-
token_roi: {
|
|
1306
|
-
saved_by_skeleton: skeletonField.saved_by_skeleton ?? 0,
|
|
1307
|
-
},
|
|
1308
|
-
artifacts: {
|
|
1309
|
-
gate_result: "gate/spec_gate_result.json",
|
|
1310
|
-
clinic_result: "clinic/clinic_result.json",
|
|
1311
|
-
skeleton_map_summary: skeletonField.artifact_path ? "ci/skeleton_map_summary.json" : null,
|
|
1312
|
-
sync_packet: null,
|
|
1313
|
-
},
|
|
1314
|
-
};
|
|
1315
|
-
// 9.5. ci_summary.json 저장
|
|
1316
|
-
const ciSummaryDir = path.join(runsDir, "ci");
|
|
1317
|
-
const ciSummaryPath = path.join(ciSummaryDir, "ci_summary.json");
|
|
1318
|
-
try {
|
|
1319
|
-
fs.mkdirSync(ciSummaryDir, { recursive: true });
|
|
1320
|
-
fs.writeFileSync(ciSummaryPath, JSON.stringify(summary, null, 2));
|
|
1321
|
-
}
|
|
1322
|
-
catch {
|
|
1323
|
-
// ci_summary 저장 실패는 무시 (검증 결과에 영향 없음)
|
|
1324
|
-
}
|
|
1325
|
-
// 10. 출력
|
|
1326
|
-
// Derived artifacts (FAIL-SAFE)
|
|
1327
|
-
writeHtmlReportFromCiSummarySafe(ciSummaryPath, { projectRootAbs: workspace });
|
|
1328
|
-
try {
|
|
1329
|
-
saveEvidenceReportFromRunDir(runsDir, runId, {
|
|
1330
|
-
ci_provider: options.ciProvider ?? undefined,
|
|
1331
|
-
pr_number: options.prNumber ?? undefined,
|
|
1332
|
-
commit_sha: options.commitSha ?? undefined,
|
|
1333
|
-
branch: options.branch ?? undefined,
|
|
1334
|
-
});
|
|
1335
|
-
savePrCommentFromRunDir(runsDir, runId, {
|
|
1336
|
-
ci_provider: options.ciProvider ?? undefined,
|
|
1337
|
-
pr_number: options.prNumber ?? undefined,
|
|
1338
|
-
commit_sha: options.commitSha ?? undefined,
|
|
1339
|
-
branch: options.branch ?? undefined,
|
|
1340
|
-
}, skeletonField, decisionLog, hotspots);
|
|
1341
|
-
}
|
|
1342
|
-
catch {
|
|
1343
|
-
// ignore
|
|
1344
|
-
}
|
|
1345
|
-
renderOutput(summary, options.json, { plan: entitlements.planEffective, licenseMessage, bitnet: bitnetAdvisory });
|
|
1346
|
-
// 11. Deep Link 출력 (위반 사항 있을 경우)
|
|
1347
|
-
const violations = ciViolations;
|
|
1348
|
-
if (!options.json && violations.length > 0) {
|
|
1349
|
-
renderViolationLinks(violations, workspace);
|
|
1350
|
-
}
|
|
1351
|
-
// 12. Evidence Report 링크 표시
|
|
1352
|
-
const reportPath = path.join(runsDir, "ci", "evidence_report.md");
|
|
1353
|
-
if (!options.json && fs.existsSync(reportPath)) {
|
|
1354
|
-
renderSummaryWithLink(verdict, reportPath, violations.length);
|
|
1355
|
-
}
|
|
1356
|
-
// 13. Review History 기록 (FIX/BLOCK 시)
|
|
1357
|
-
if (verdict !== "GO" && violations.length > 0) {
|
|
1358
|
-
const violationPaths = violations
|
|
1359
|
-
.filter((v) => v.path && v.path !== "project")
|
|
1360
|
-
.map((v) => ({ path: v.path, type: v.type }));
|
|
1361
|
-
recordReviewHistory(workspace, runId, verdict, violationPaths);
|
|
1362
|
-
}
|
|
1363
|
-
// 14. Background Sync: SyncPacket 생성 및 큐잉 (PRO Only)
|
|
1364
|
-
if (entitlements.switches.cloudSync) {
|
|
1365
|
-
try {
|
|
1366
|
-
const token = await resolveCloudSyncToken();
|
|
1367
|
-
if (!token)
|
|
1368
|
-
throw new Error("cloud sync token missing");
|
|
1369
|
-
const syncManager = new SyncManager({
|
|
1370
|
-
authToken: token,
|
|
1371
|
-
endpoint: process.env.VIBE_CLOUD_SYNC_ENDPOINT || undefined,
|
|
1372
|
-
});
|
|
1373
|
-
const syncGate = {
|
|
1374
|
-
verdict: gateVerdict,
|
|
1375
|
-
issues: gateResult?.violations?.map((v) => ({
|
|
1376
|
-
type: v.id,
|
|
1377
|
-
severity: gateVerdict === "BLOCK" ? "BLOCK" : "FIX",
|
|
1378
|
-
message: v.msg,
|
|
1379
|
-
path: v.path,
|
|
1380
|
-
})),
|
|
1381
|
-
};
|
|
1382
|
-
const syncClinic = {
|
|
1383
|
-
verdict: clinicVerdict,
|
|
1384
|
-
status: clinicResult?.status ?? (clinicVerdict === "GO" ? "SUCCESS" : clinicVerdict === "FIX" ? "FAILED" : "ESCALATED"),
|
|
1385
|
-
ralph_iterations: clinicResult?.iterations ?? 0,
|
|
1386
|
-
lines_changed: clinicResult?.lines_changed ?? 0,
|
|
1387
|
-
};
|
|
1388
|
-
await syncManager.queueRun({ runId, gateResult: syncGate, clinicResult: syncClinic, violations: syncViolations }, token);
|
|
1389
|
-
// fire-and-forget flush
|
|
1390
|
-
syncManager.flush().catch(() => { });
|
|
1391
|
-
}
|
|
1392
|
-
catch {
|
|
1393
|
-
// Sync 실패는 무시 (Fire-and-Forget)
|
|
1394
|
-
}
|
|
1395
|
-
}
|
|
1396
|
-
// 15. DB Sync (best-effort, P0-1: rail 고정 = 'local')
|
|
1397
|
-
if (isDbSyncEnabled()) {
|
|
1398
|
-
try {
|
|
1399
|
-
const wsId = generateWorkspaceId(workspace);
|
|
1400
|
-
await syncLocalRun({
|
|
1401
|
-
rail: "local",
|
|
1402
|
-
workspaceId: wsId,
|
|
1403
|
-
runId: runId,
|
|
1404
|
-
runDir: runsDir,
|
|
1405
|
-
});
|
|
1406
|
-
}
|
|
1407
|
-
catch (err) {
|
|
1408
|
-
// sync 실패해도 CI 결과는 유지 (best-effort)
|
|
1409
|
-
if (!options.json) {
|
|
1410
|
-
console.warn(`[db_sync] sync failed: ${err instanceof Error ? err.message : String(err)}`);
|
|
1411
|
-
}
|
|
1412
|
-
}
|
|
1413
|
-
}
|
|
1414
|
-
// 16. Exit
|
|
1415
|
-
process.exit(EXIT_CODES[verdict]);
|
|
1416
|
-
}
|
|
1417
|
-
// ============================================================
|
|
1418
|
-
// CI Provider Detection
|
|
1419
|
-
// ============================================================
|
|
1420
|
-
function detectCiProvider() {
|
|
1421
|
-
if (process.env.GITHUB_ACTIONS)
|
|
1422
|
-
return "github";
|
|
1423
|
-
if (process.env.GITLAB_CI)
|
|
1424
|
-
return "gitlab";
|
|
1425
|
-
if (process.env.BITBUCKET_BUILD_NUMBER)
|
|
1426
|
-
return "bitbucket";
|
|
1427
|
-
if (process.env.JENKINS_URL)
|
|
1428
|
-
return "jenkins";
|
|
1429
|
-
if (process.env.CI)
|
|
1430
|
-
return "generic";
|
|
1431
|
-
return undefined;
|
|
1432
|
-
}
|
|
1433
|
-
// ============================================================
|
|
1434
|
-
// Cloud Sync (FAIL-SAFE)
|
|
1435
|
-
// ============================================================
|
|
1436
|
-
async function resolveCloudSyncToken() {
|
|
1437
|
-
const env = (process.env.VIBE_CLOUD_SYNC_TOKEN || "").trim();
|
|
1438
|
-
if (env)
|
|
1439
|
-
return env;
|
|
1440
|
-
try {
|
|
1441
|
-
const cached = await new TokenCache().get();
|
|
1442
|
-
return cached?.token ?? null;
|
|
1443
|
-
}
|
|
1444
|
-
catch {
|
|
1445
|
-
return null;
|
|
1446
|
-
}
|
|
1447
|
-
}
|
|
1448
|
-
async function flushCloudSyncQueueInBackground() {
|
|
1449
|
-
try {
|
|
1450
|
-
const token = await resolveCloudSyncToken();
|
|
1451
|
-
if (!token)
|
|
1452
|
-
return;
|
|
1453
|
-
const syncManager = new SyncManager({
|
|
1454
|
-
authToken: token,
|
|
1455
|
-
endpoint: process.env.VIBE_CLOUD_SYNC_ENDPOINT || undefined,
|
|
1456
|
-
});
|
|
1457
|
-
await syncManager.flush();
|
|
1458
|
-
}
|
|
1459
|
-
catch {
|
|
1460
|
-
// ignore
|
|
1461
|
-
}
|
|
1462
|
-
}
|
|
1463
|
-
// ============================================================
|
|
1464
|
-
// Violation Extractor
|
|
1465
|
-
// ============================================================
|
|
1466
|
-
function extractViolations(gate, clinic) {
|
|
1467
|
-
const ciViolations = [];
|
|
1468
|
-
const syncViolations = [];
|
|
1469
|
-
const now = new Date().toISOString();
|
|
1470
|
-
const knownTypes = new Set([
|
|
1471
|
-
"PATH_VIOLATION",
|
|
1472
|
-
"READ_ONLY_VIOLATION",
|
|
1473
|
-
"COMMAND_SAFETY",
|
|
1474
|
-
"LICENSE_RESTRICTION",
|
|
1475
|
-
"ITERATION_LIMIT",
|
|
1476
|
-
"SCOPE_DRIFT",
|
|
1477
|
-
"MISSING_WORK_ORDER",
|
|
1478
|
-
"MISSING_DECISION",
|
|
1479
|
-
]);
|
|
1480
|
-
function clampTitle(v) {
|
|
1481
|
-
const s = (v || "").trim();
|
|
1482
|
-
if (s.length <= 100)
|
|
1483
|
-
return s || "Violation";
|
|
1484
|
-
return s.slice(0, 97) + "...";
|
|
1485
|
-
}
|
|
1486
|
-
function buildCorrection(type, ctx) {
|
|
1487
|
-
if (!knownTypes.has(type))
|
|
1488
|
-
return null;
|
|
1489
|
-
const t = type;
|
|
1490
|
-
const attemptedPath = ctx.path ?? "project";
|
|
1491
|
-
const allowPaths = ctx.clinic?.policy?.allow_paths ?? [];
|
|
1492
|
-
const maxIterations = ctx.clinic?.policy?.max_iterations ?? 10;
|
|
1493
|
-
const currentIter = ctx.clinic?.iterations ?? maxIterations;
|
|
1494
|
-
switch (t) {
|
|
1495
|
-
case "PATH_VIOLATION":
|
|
1496
|
-
return pathViolationMessage(attemptedPath, "RED", allowPaths);
|
|
1497
|
-
case "READ_ONLY_VIOLATION":
|
|
1498
|
-
return readOnlyViolationMessage(attemptedPath);
|
|
1499
|
-
case "ITERATION_LIMIT":
|
|
1500
|
-
return iterationLimitMessage(currentIter, maxIterations);
|
|
1501
|
-
case "SCOPE_DRIFT":
|
|
1502
|
-
return scopeDriftMessage([attemptedPath], allowPaths);
|
|
1503
|
-
case "MISSING_WORK_ORDER":
|
|
1504
|
-
return missingWorkOrderMessage();
|
|
1505
|
-
case "MISSING_DECISION":
|
|
1506
|
-
return missingDecisionMessage();
|
|
1507
|
-
default:
|
|
1508
|
-
return null;
|
|
1509
|
-
}
|
|
1510
|
-
}
|
|
1511
|
-
function push(base) {
|
|
1512
|
-
ciViolations.push(base);
|
|
1513
|
-
syncViolations.push({
|
|
1514
|
-
type: base.type,
|
|
1515
|
-
severity: base.severity,
|
|
1516
|
-
title: base.title,
|
|
1517
|
-
path: base.path,
|
|
1518
|
-
userMessage: base.userMessage,
|
|
1519
|
-
recovery_hint: base.recovery_hint,
|
|
1520
|
-
detected_at: now,
|
|
1521
|
-
...(typeof base.line === "number" ? { line: base.line } : {}),
|
|
1522
|
-
});
|
|
1523
|
-
}
|
|
1524
|
-
// Gate 위반 추출
|
|
1525
|
-
for (const v of gate?.violations ?? []) {
|
|
1526
|
-
const type = (v.id || "UNKNOWN").trim();
|
|
1527
|
-
const p = (v.path || "project").trim();
|
|
1528
|
-
const corr = buildCorrection(type, { path: p, clinic: clinic ?? undefined });
|
|
1529
|
-
push({
|
|
1530
|
-
type,
|
|
1531
|
-
severity: corr?.severity ?? (gate?.verdict === "BLOCK" ? "BLOCK" : "FIX"),
|
|
1532
|
-
title: clampTitle(corr?.title ?? v.msg ?? type),
|
|
1533
|
-
path: p,
|
|
1534
|
-
userMessage: corr?.userMessage ?? v.msg,
|
|
1535
|
-
recovery_hint: corr?.recovery ?? undefined,
|
|
1536
|
-
});
|
|
1537
|
-
}
|
|
1538
|
-
// Clinic 위반 추출
|
|
1539
|
-
for (const r of clinic?.reasons ?? []) {
|
|
1540
|
-
const type = (r.id || "UNKNOWN").trim();
|
|
1541
|
-
const p = (r.path || "project").trim();
|
|
1542
|
-
const corr = buildCorrection(type, { path: p, clinic: clinic ?? undefined });
|
|
1543
|
-
push({
|
|
1544
|
-
type,
|
|
1545
|
-
severity: corr?.severity ?? (clinic?.verdict === "BLOCK" ? "BLOCK" : "FIX"),
|
|
1546
|
-
title: clampTitle(corr?.title ?? r.msg ?? type),
|
|
1547
|
-
path: p,
|
|
1548
|
-
line: typeof r.line === "number" ? r.line : undefined,
|
|
1549
|
-
userMessage: corr?.userMessage ?? r.msg,
|
|
1550
|
-
recovery_hint: corr?.recovery ?? undefined,
|
|
1551
|
-
});
|
|
1552
|
-
}
|
|
1553
|
-
return { ci: ciViolations, sync: syncViolations };
|
|
1554
|
-
}
|
|
1555
|
-
main().catch((err) => {
|
|
1556
|
-
console.error("ERROR:", err.message);
|
|
7
|
+
import { main, EXIT_CODES } from '../ci/pipeline.js';
|
|
8
|
+
main().catch(err => {
|
|
9
|
+
const msg = err instanceof Error ? err.message : String(err);
|
|
10
|
+
console.error('ERROR:', msg);
|
|
1557
11
|
process.exit(EXIT_CODES.ERROR);
|
|
1558
12
|
});
|