@10et/cli 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +79 -0
- package/clawdbot-plugin/clawdbot.plugin.json +20 -0
- package/clawdbot-plugin/index.js +555 -0
- package/clawdbot-plugin/index.ts +582 -0
- package/clawdbot-skill/README.md +328 -0
- package/clawdbot-skill/SKILL.md +59 -0
- package/clawdbot-skill/index.ts +683 -0
- package/clawdbot-skill/package.json +28 -0
- package/clawdbot-skill/skill.json +19 -0
- package/dist/commands/agent.d.ts +7 -0
- package/dist/commands/agent.d.ts.map +1 -0
- package/dist/commands/agent.js +170 -0
- package/dist/commands/agent.js.map +1 -0
- package/dist/commands/agents.d.ts +5 -0
- package/dist/commands/agents.d.ts.map +1 -0
- package/dist/commands/agents.js +400 -0
- package/dist/commands/agents.js.map +1 -0
- package/dist/commands/ci-setup.d.ts +5 -0
- package/dist/commands/ci-setup.d.ts.map +1 -0
- package/dist/commands/ci-setup.js +82 -0
- package/dist/commands/ci-setup.js.map +1 -0
- package/dist/commands/clawdbot.d.ts +11 -0
- package/dist/commands/clawdbot.d.ts.map +1 -0
- package/dist/commands/clawdbot.js +215 -0
- package/dist/commands/clawdbot.js.map +1 -0
- package/dist/commands/context-hub.d.ts +22 -0
- package/dist/commands/context-hub.d.ts.map +1 -0
- package/dist/commands/context-hub.js +3505 -0
- package/dist/commands/context-hub.js.map +1 -0
- package/dist/commands/deploy.d.ts +5 -0
- package/dist/commands/deploy.d.ts.map +1 -0
- package/dist/commands/deploy.js +371 -0
- package/dist/commands/deploy.js.map +1 -0
- package/dist/commands/digest.d.ts +12 -0
- package/dist/commands/digest.d.ts.map +1 -0
- package/dist/commands/digest.js +128 -0
- package/dist/commands/digest.js.map +1 -0
- package/dist/commands/doctor.d.ts +8 -0
- package/dist/commands/doctor.d.ts.map +1 -0
- package/dist/commands/doctor.js +265 -0
- package/dist/commands/doctor.js.map +1 -0
- package/dist/commands/eval.d.ts +46 -0
- package/dist/commands/eval.d.ts.map +1 -0
- package/dist/commands/eval.js +427 -0
- package/dist/commands/eval.js.map +1 -0
- package/dist/commands/feedback.d.ts +2 -0
- package/dist/commands/feedback.d.ts.map +1 -0
- package/dist/commands/feedback.js +179 -0
- package/dist/commands/feedback.js.map +1 -0
- package/dist/commands/findings.d.ts +13 -0
- package/dist/commands/findings.d.ts.map +1 -0
- package/dist/commands/findings.js +203 -0
- package/dist/commands/findings.js.map +1 -0
- package/dist/commands/flows.d.ts +10 -0
- package/dist/commands/flows.d.ts.map +1 -0
- package/dist/commands/flows.js +423 -0
- package/dist/commands/flows.js.map +1 -0
- package/dist/commands/gtm-process-update.d.ts +10 -0
- package/dist/commands/gtm-process-update.d.ts.map +1 -0
- package/dist/commands/gtm-process-update.js +101 -0
- package/dist/commands/gtm-process-update.js.map +1 -0
- package/dist/commands/hooks.d.ts +13 -0
- package/dist/commands/hooks.d.ts.map +1 -0
- package/dist/commands/hooks.js +304 -0
- package/dist/commands/hooks.js.map +1 -0
- package/dist/commands/hud.d.ts +4 -0
- package/dist/commands/hud.d.ts.map +1 -0
- package/dist/commands/hud.js +300 -0
- package/dist/commands/hud.js.map +1 -0
- package/dist/commands/ide.d.ts +28 -0
- package/dist/commands/ide.d.ts.map +1 -0
- package/dist/commands/ide.js +628 -0
- package/dist/commands/ide.js.map +1 -0
- package/dist/commands/improve.d.ts +11 -0
- package/dist/commands/improve.d.ts.map +1 -0
- package/dist/commands/improve.js +77 -0
- package/dist/commands/improve.js.map +1 -0
- package/dist/commands/init-from-service.d.ts +15 -0
- package/dist/commands/init-from-service.d.ts.map +1 -0
- package/dist/commands/init-from-service.js +540 -0
- package/dist/commands/init-from-service.js.map +1 -0
- package/dist/commands/init.d.ts +15 -0
- package/dist/commands/init.d.ts.map +1 -0
- package/dist/commands/init.js +940 -0
- package/dist/commands/init.js.map +1 -0
- package/dist/commands/kanban.d.ts +34 -0
- package/dist/commands/kanban.d.ts.map +1 -0
- package/dist/commands/kanban.js +225 -0
- package/dist/commands/kanban.js.map +1 -0
- package/dist/commands/linear.d.ts +41 -0
- package/dist/commands/linear.d.ts.map +1 -0
- package/dist/commands/linear.js +740 -0
- package/dist/commands/linear.js.map +1 -0
- package/dist/commands/login.d.ts +12 -0
- package/dist/commands/login.d.ts.map +1 -0
- package/dist/commands/login.js +780 -0
- package/dist/commands/login.js.map +1 -0
- package/dist/commands/memory.d.ts +38 -0
- package/dist/commands/memory.d.ts.map +1 -0
- package/dist/commands/memory.js +229 -0
- package/dist/commands/memory.js.map +1 -0
- package/dist/commands/migrate-services.d.ts +8 -0
- package/dist/commands/migrate-services.d.ts.map +1 -0
- package/dist/commands/migrate-services.js +182 -0
- package/dist/commands/migrate-services.js.map +1 -0
- package/dist/commands/migrate-tenet.d.ts +25 -0
- package/dist/commands/migrate-tenet.d.ts.map +1 -0
- package/dist/commands/migrate-tenet.js +252 -0
- package/dist/commands/migrate-tenet.js.map +1 -0
- package/dist/commands/onboard.d.ts +24 -0
- package/dist/commands/onboard.d.ts.map +1 -0
- package/dist/commands/onboard.js +873 -0
- package/dist/commands/onboard.js.map +1 -0
- package/dist/commands/openclaw.d.ts +59 -0
- package/dist/commands/openclaw.d.ts.map +1 -0
- package/dist/commands/openclaw.js +775 -0
- package/dist/commands/openclaw.js.map +1 -0
- package/dist/commands/orchestrate.d.ts +14 -0
- package/dist/commands/orchestrate.d.ts.map +1 -0
- package/dist/commands/orchestrate.js +270 -0
- package/dist/commands/orchestrate.js.map +1 -0
- package/dist/commands/organize.d.ts +16 -0
- package/dist/commands/organize.d.ts.map +1 -0
- package/dist/commands/organize.js +334 -0
- package/dist/commands/organize.js.map +1 -0
- package/dist/commands/peter.d.ts +21 -0
- package/dist/commands/peter.d.ts.map +1 -0
- package/dist/commands/peter.js +2778 -0
- package/dist/commands/peter.js.map +1 -0
- package/dist/commands/pi-fleet.d.ts +18 -0
- package/dist/commands/pi-fleet.d.ts.map +1 -0
- package/dist/commands/pi-fleet.js +382 -0
- package/dist/commands/pi-fleet.js.map +1 -0
- package/dist/commands/pi.d.ts +25 -0
- package/dist/commands/pi.d.ts.map +1 -0
- package/dist/commands/pi.js +218 -0
- package/dist/commands/pi.js.map +1 -0
- package/dist/commands/pivot.d.ts +28 -0
- package/dist/commands/pivot.d.ts.map +1 -0
- package/dist/commands/pivot.js +216 -0
- package/dist/commands/pivot.js.map +1 -0
- package/dist/commands/portfolio.d.ts +11 -0
- package/dist/commands/portfolio.d.ts.map +1 -0
- package/dist/commands/portfolio.js +239 -0
- package/dist/commands/portfolio.js.map +1 -0
- package/dist/commands/predict.d.ts +25 -0
- package/dist/commands/predict.d.ts.map +1 -0
- package/dist/commands/predict.js +234 -0
- package/dist/commands/predict.js.map +1 -0
- package/dist/commands/profile.d.ts +46 -0
- package/dist/commands/profile.d.ts.map +1 -0
- package/dist/commands/profile.js +498 -0
- package/dist/commands/profile.js.map +1 -0
- package/dist/commands/ralph.d.ts +11 -0
- package/dist/commands/ralph.d.ts.map +1 -0
- package/dist/commands/ralph.js +102 -0
- package/dist/commands/ralph.js.map +1 -0
- package/dist/commands/repair.d.ts +7 -0
- package/dist/commands/repair.d.ts.map +1 -0
- package/dist/commands/repair.js +356 -0
- package/dist/commands/repair.js.map +1 -0
- package/dist/commands/scope.d.ts +8 -0
- package/dist/commands/scope.d.ts.map +1 -0
- package/dist/commands/scope.js +503 -0
- package/dist/commands/scope.js.map +1 -0
- package/dist/commands/service-agent.d.ts +16 -0
- package/dist/commands/service-agent.d.ts.map +1 -0
- package/dist/commands/service-agent.js +375 -0
- package/dist/commands/service-agent.js.map +1 -0
- package/dist/commands/service-manager.d.ts +12 -0
- package/dist/commands/service-manager.d.ts.map +1 -0
- package/dist/commands/service-manager.js +969 -0
- package/dist/commands/service-manager.js.map +1 -0
- package/dist/commands/service-validate.d.ts +12 -0
- package/dist/commands/service-validate.d.ts.map +1 -0
- package/dist/commands/service-validate.js +619 -0
- package/dist/commands/service-validate.js.map +1 -0
- package/dist/commands/services-create.d.ts +15 -0
- package/dist/commands/services-create.d.ts.map +1 -0
- package/dist/commands/services-create.js +1800 -0
- package/dist/commands/services-create.js.map +1 -0
- package/dist/commands/services-scan.d.ts +13 -0
- package/dist/commands/services-scan.d.ts.map +1 -0
- package/dist/commands/services-scan.js +251 -0
- package/dist/commands/services-scan.js.map +1 -0
- package/dist/commands/services-sync-agents.d.ts +23 -0
- package/dist/commands/services-sync-agents.d.ts.map +1 -0
- package/dist/commands/services-sync-agents.js +207 -0
- package/dist/commands/services-sync-agents.js.map +1 -0
- package/dist/commands/services.d.ts +19 -0
- package/dist/commands/services.d.ts.map +1 -0
- package/dist/commands/services.js +906 -0
- package/dist/commands/services.js.map +1 -0
- package/dist/commands/session.d.ts +7 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +597 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/setup.d.ts +12 -0
- package/dist/commands/setup.d.ts.map +1 -0
- package/dist/commands/setup.js +727 -0
- package/dist/commands/setup.js.map +1 -0
- package/dist/commands/skills.d.ts +31 -0
- package/dist/commands/skills.d.ts.map +1 -0
- package/dist/commands/skills.js +314 -0
- package/dist/commands/skills.js.map +1 -0
- package/dist/commands/start.d.ts +25 -0
- package/dist/commands/start.d.ts.map +1 -0
- package/dist/commands/start.js +251 -0
- package/dist/commands/start.js.map +1 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/status.d.ts.map +1 -0
- package/dist/commands/status.js +163 -0
- package/dist/commands/status.js.map +1 -0
- package/dist/commands/synopsis.d.ts +54 -0
- package/dist/commands/synopsis.d.ts.map +1 -0
- package/dist/commands/synopsis.js +277 -0
- package/dist/commands/synopsis.js.map +1 -0
- package/dist/commands/telemetry-monitor.d.ts +11 -0
- package/dist/commands/telemetry-monitor.d.ts.map +1 -0
- package/dist/commands/telemetry-monitor.js +224 -0
- package/dist/commands/telemetry-monitor.js.map +1 -0
- package/dist/commands/telemetry-test.d.ts +11 -0
- package/dist/commands/telemetry-test.d.ts.map +1 -0
- package/dist/commands/telemetry-test.js +67 -0
- package/dist/commands/telemetry-test.js.map +1 -0
- package/dist/commands/tenet-agents.d.ts +13 -0
- package/dist/commands/tenet-agents.d.ts.map +1 -0
- package/dist/commands/tenet-agents.js +191 -0
- package/dist/commands/tenet-agents.js.map +1 -0
- package/dist/commands/tenet-setup.d.ts +20 -0
- package/dist/commands/tenet-setup.d.ts.map +1 -0
- package/dist/commands/tenet-setup.js +135 -0
- package/dist/commands/tenet-setup.js.map +1 -0
- package/dist/commands/train.d.ts +51 -0
- package/dist/commands/train.d.ts.map +1 -0
- package/dist/commands/train.js +692 -0
- package/dist/commands/train.js.map +1 -0
- package/dist/commands/update.d.ts +12 -0
- package/dist/commands/update.d.ts.map +1 -0
- package/dist/commands/update.js +559 -0
- package/dist/commands/update.js.map +1 -0
- package/dist/commands/validate-settings.d.ts +37 -0
- package/dist/commands/validate-settings.d.ts.map +1 -0
- package/dist/commands/validate-settings.js +197 -0
- package/dist/commands/validate-settings.js.map +1 -0
- package/dist/commands/verify.d.ts +14 -0
- package/dist/commands/verify.d.ts.map +1 -0
- package/dist/commands/verify.js +304 -0
- package/dist/commands/verify.js.map +1 -0
- package/dist/commands/viz.d.ts +40 -0
- package/dist/commands/viz.d.ts.map +1 -0
- package/dist/commands/viz.js +877 -0
- package/dist/commands/viz.js.map +1 -0
- package/dist/commands/voice.d.ts +409 -0
- package/dist/commands/voice.d.ts.map +1 -0
- package/dist/commands/voice.js +4765 -0
- package/dist/commands/voice.js.map +1 -0
- package/dist/commands/whoami.d.ts +2 -0
- package/dist/commands/whoami.d.ts.map +1 -0
- package/dist/commands/whoami.js +24 -0
- package/dist/commands/whoami.js.map +1 -0
- package/dist/dashboard/index.d.ts +11 -0
- package/dist/dashboard/index.d.ts.map +1 -0
- package/dist/dashboard/index.js +70 -0
- package/dist/dashboard/index.js.map +1 -0
- package/dist/dashboard-static/assets/index-BVrmW-ZI.js +154 -0
- package/dist/dashboard-static/assets/index-DtruPD44.css +1 -0
- package/dist/dashboard-static/index.html +16 -0
- package/dist/index.d.ts +4 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +1707 -0
- package/dist/index.js.map +1 -0
- package/dist/lib/advanced-setup.d.ts +78 -0
- package/dist/lib/advanced-setup.d.ts.map +1 -0
- package/dist/lib/advanced-setup.js +433 -0
- package/dist/lib/advanced-setup.js.map +1 -0
- package/dist/lib/agent-config.d.ts +86 -0
- package/dist/lib/agent-config.d.ts.map +1 -0
- package/dist/lib/agent-config.js +281 -0
- package/dist/lib/agent-config.js.map +1 -0
- package/dist/lib/agent-generator.d.ts +36 -0
- package/dist/lib/agent-generator.d.ts.map +1 -0
- package/dist/lib/agent-generator.js +400 -0
- package/dist/lib/agent-generator.js.map +1 -0
- package/dist/lib/agent-guards.d.ts +67 -0
- package/dist/lib/agent-guards.d.ts.map +1 -0
- package/dist/lib/agent-guards.js +229 -0
- package/dist/lib/agent-guards.js.map +1 -0
- package/dist/lib/agent-manifest.d.ts +35 -0
- package/dist/lib/agent-manifest.d.ts.map +1 -0
- package/dist/lib/agent-manifest.js +75 -0
- package/dist/lib/agent-manifest.js.map +1 -0
- package/dist/lib/agent-runtime-api.d.ts +32 -0
- package/dist/lib/agent-runtime-api.d.ts.map +1 -0
- package/dist/lib/agent-runtime-api.js +270 -0
- package/dist/lib/agent-runtime-api.js.map +1 -0
- package/dist/lib/agent-session.d.ts +104 -0
- package/dist/lib/agent-session.d.ts.map +1 -0
- package/dist/lib/agent-session.js +954 -0
- package/dist/lib/agent-session.js.map +1 -0
- package/dist/lib/build-supervisor.d.ts +44 -0
- package/dist/lib/build-supervisor.d.ts.map +1 -0
- package/dist/lib/build-supervisor.js +79 -0
- package/dist/lib/build-supervisor.js.map +1 -0
- package/dist/lib/connectors/index.d.ts +19 -0
- package/dist/lib/connectors/index.d.ts.map +1 -0
- package/dist/lib/connectors/index.js +23 -0
- package/dist/lib/connectors/index.js.map +1 -0
- package/dist/lib/counterfactual-engine.d.ts +136 -0
- package/dist/lib/counterfactual-engine.d.ts.map +1 -0
- package/dist/lib/counterfactual-engine.js +417 -0
- package/dist/lib/counterfactual-engine.js.map +1 -0
- package/dist/lib/counterfactual-training-bridge.d.ts +114 -0
- package/dist/lib/counterfactual-training-bridge.d.ts.map +1 -0
- package/dist/lib/counterfactual-training-bridge.js +322 -0
- package/dist/lib/counterfactual-training-bridge.js.map +1 -0
- package/dist/lib/discovery-agent.d.ts +48 -0
- package/dist/lib/discovery-agent.d.ts.map +1 -0
- package/dist/lib/discovery-agent.js +111 -0
- package/dist/lib/discovery-agent.js.map +1 -0
- package/dist/lib/domain/engine.d.ts +11 -0
- package/dist/lib/domain/engine.d.ts.map +1 -0
- package/dist/lib/domain/engine.js +23 -0
- package/dist/lib/domain/engine.js.map +1 -0
- package/dist/lib/domain/index.d.ts +3 -0
- package/dist/lib/domain/index.d.ts.map +1 -0
- package/dist/lib/domain/index.js +3 -0
- package/dist/lib/domain/index.js.map +1 -0
- package/dist/lib/domain/template-loader.d.ts +9 -0
- package/dist/lib/domain/template-loader.d.ts.map +1 -0
- package/dist/lib/domain/template-loader.js +29 -0
- package/dist/lib/domain/template-loader.js.map +1 -0
- package/dist/lib/domain/types.d.ts +29 -0
- package/dist/lib/domain/types.d.ts.map +1 -0
- package/dist/lib/domain/types.js +2 -0
- package/dist/lib/domain/types.js.map +1 -0
- package/dist/lib/dynamics-model.d.ts +107 -0
- package/dist/lib/dynamics-model.d.ts.map +1 -0
- package/dist/lib/dynamics-model.js +363 -0
- package/dist/lib/dynamics-model.js.map +1 -0
- package/dist/lib/eval-snapshot.d.ts +47 -0
- package/dist/lib/eval-snapshot.d.ts.map +1 -0
- package/dist/lib/eval-snapshot.js +326 -0
- package/dist/lib/eval-snapshot.js.map +1 -0
- package/dist/lib/eval-store.d.ts +20 -0
- package/dist/lib/eval-store.d.ts.map +1 -0
- package/dist/lib/eval-store.js +209 -0
- package/dist/lib/eval-store.js.map +1 -0
- package/dist/lib/findings-engine.d.ts +51 -0
- package/dist/lib/findings-engine.d.ts.map +1 -0
- package/dist/lib/findings-engine.js +338 -0
- package/dist/lib/findings-engine.js.map +1 -0
- package/dist/lib/flow-engine.d.ts +57 -0
- package/dist/lib/flow-engine.d.ts.map +1 -0
- package/dist/lib/flow-engine.js +717 -0
- package/dist/lib/flow-engine.js.map +1 -0
- package/dist/lib/gtm-generator.d.ts +29 -0
- package/dist/lib/gtm-generator.d.ts.map +1 -0
- package/dist/lib/gtm-generator.js +250 -0
- package/dist/lib/gtm-generator.js.map +1 -0
- package/dist/lib/hook-transformer.d.ts +11 -0
- package/dist/lib/hook-transformer.d.ts.map +1 -0
- package/dist/lib/hook-transformer.js +74 -0
- package/dist/lib/hook-transformer.js.map +1 -0
- package/dist/lib/hub-client.d.ts +81 -0
- package/dist/lib/hub-client.d.ts.map +1 -0
- package/dist/lib/hub-client.js +73 -0
- package/dist/lib/hub-client.js.map +1 -0
- package/dist/lib/hub-health.d.ts +40 -0
- package/dist/lib/hub-health.d.ts.map +1 -0
- package/dist/lib/hub-health.js +101 -0
- package/dist/lib/hub-health.js.map +1 -0
- package/dist/lib/ide-panes.d.ts +58 -0
- package/dist/lib/ide-panes.d.ts.map +1 -0
- package/dist/lib/ide-panes.js +508 -0
- package/dist/lib/ide-panes.js.map +1 -0
- package/dist/lib/invariant-monitor.d.ts +54 -0
- package/dist/lib/invariant-monitor.d.ts.map +1 -0
- package/dist/lib/invariant-monitor.js +487 -0
- package/dist/lib/invariant-monitor.js.map +1 -0
- package/dist/lib/journal-analyzer.d.ts +71 -0
- package/dist/lib/journal-analyzer.d.ts.map +1 -0
- package/dist/lib/journal-analyzer.js +306 -0
- package/dist/lib/journal-analyzer.js.map +1 -0
- package/dist/lib/kanban-github.d.ts +81 -0
- package/dist/lib/kanban-github.d.ts.map +1 -0
- package/dist/lib/kanban-github.js +318 -0
- package/dist/lib/kanban-github.js.map +1 -0
- package/dist/lib/kanban.d.ts +131 -0
- package/dist/lib/kanban.d.ts.map +1 -0
- package/dist/lib/kanban.js +340 -0
- package/dist/lib/kanban.js.map +1 -0
- package/dist/lib/kuva.d.ts +45 -0
- package/dist/lib/kuva.d.ts.map +1 -0
- package/dist/lib/kuva.js +131 -0
- package/dist/lib/kuva.js.map +1 -0
- package/dist/lib/linear-client.d.ts +73 -0
- package/dist/lib/linear-client.d.ts.map +1 -0
- package/dist/lib/linear-client.js +112 -0
- package/dist/lib/linear-client.js.map +1 -0
- package/dist/lib/linear-id-map.d.ts +20 -0
- package/dist/lib/linear-id-map.d.ts.map +1 -0
- package/dist/lib/linear-id-map.js +59 -0
- package/dist/lib/linear-id-map.js.map +1 -0
- package/dist/lib/linear-kanban.d.ts +66 -0
- package/dist/lib/linear-kanban.d.ts.map +1 -0
- package/dist/lib/linear-kanban.js +175 -0
- package/dist/lib/linear-kanban.js.map +1 -0
- package/dist/lib/linear-webhook.d.ts +50 -0
- package/dist/lib/linear-webhook.d.ts.map +1 -0
- package/dist/lib/linear-webhook.js +92 -0
- package/dist/lib/linear-webhook.js.map +1 -0
- package/dist/lib/map-event-bus.d.ts +50 -0
- package/dist/lib/map-event-bus.d.ts.map +1 -0
- package/dist/lib/map-event-bus.js +366 -0
- package/dist/lib/map-event-bus.js.map +1 -0
- package/dist/lib/memory-db.d.ts +136 -0
- package/dist/lib/memory-db.d.ts.map +1 -0
- package/dist/lib/memory-db.js +429 -0
- package/dist/lib/memory-db.js.map +1 -0
- package/dist/lib/memory-indexer.d.ts +61 -0
- package/dist/lib/memory-indexer.d.ts.map +1 -0
- package/dist/lib/memory-indexer.js +418 -0
- package/dist/lib/memory-indexer.js.map +1 -0
- package/dist/lib/memory-search.d.ts +185 -0
- package/dist/lib/memory-search.d.ts.map +1 -0
- package/dist/lib/memory-search.js +678 -0
- package/dist/lib/memory-search.js.map +1 -0
- package/dist/lib/meta-orchestrator.d.ts +141 -0
- package/dist/lib/meta-orchestrator.d.ts.map +1 -0
- package/dist/lib/meta-orchestrator.js +552 -0
- package/dist/lib/meta-orchestrator.js.map +1 -0
- package/dist/lib/model-pricing.d.ts +11 -0
- package/dist/lib/model-pricing.d.ts.map +1 -0
- package/dist/lib/model-pricing.js +27 -0
- package/dist/lib/model-pricing.js.map +1 -0
- package/dist/lib/onboarding.d.ts +40 -0
- package/dist/lib/onboarding.d.ts.map +1 -0
- package/dist/lib/onboarding.js +213 -0
- package/dist/lib/onboarding.js.map +1 -0
- package/dist/lib/openclaw-registry.d.ts +48 -0
- package/dist/lib/openclaw-registry.d.ts.map +1 -0
- package/dist/lib/openclaw-registry.js +181 -0
- package/dist/lib/openclaw-registry.js.map +1 -0
- package/dist/lib/openclaw-sdk.d.ts +115 -0
- package/dist/lib/openclaw-sdk.d.ts.map +1 -0
- package/dist/lib/openclaw-sdk.js +220 -0
- package/dist/lib/openclaw-sdk.js.map +1 -0
- package/dist/lib/peer-agent-generator.d.ts +44 -0
- package/dist/lib/peer-agent-generator.d.ts.map +1 -0
- package/dist/lib/peer-agent-generator.js +310 -0
- package/dist/lib/peer-agent-generator.js.map +1 -0
- package/dist/lib/peter-parker-bridge.d.ts +70 -0
- package/dist/lib/peter-parker-bridge.d.ts.map +1 -0
- package/dist/lib/peter-parker-bridge.js +345 -0
- package/dist/lib/peter-parker-bridge.js.map +1 -0
- package/dist/lib/peter-parker-config.d.ts +13 -0
- package/dist/lib/peter-parker-config.d.ts.map +1 -0
- package/dist/lib/peter-parker-config.js +86 -0
- package/dist/lib/peter-parker-config.js.map +1 -0
- package/dist/lib/physical-world-model.d.ts +50 -0
- package/dist/lib/physical-world-model.d.ts.map +1 -0
- package/dist/lib/physical-world-model.js +251 -0
- package/dist/lib/physical-world-model.js.map +1 -0
- package/dist/lib/pi-sky/bridge.d.ts +55 -0
- package/dist/lib/pi-sky/bridge.d.ts.map +1 -0
- package/dist/lib/pi-sky/bridge.js +264 -0
- package/dist/lib/pi-sky/bridge.js.map +1 -0
- package/dist/lib/pi-sky/cost-monitor.d.ts +21 -0
- package/dist/lib/pi-sky/cost-monitor.d.ts.map +1 -0
- package/dist/lib/pi-sky/cost-monitor.js +126 -0
- package/dist/lib/pi-sky/cost-monitor.js.map +1 -0
- package/dist/lib/pi-sky/eval-sweep.d.ts +27 -0
- package/dist/lib/pi-sky/eval-sweep.d.ts.map +1 -0
- package/dist/lib/pi-sky/eval-sweep.js +141 -0
- package/dist/lib/pi-sky/eval-sweep.js.map +1 -0
- package/dist/lib/pi-sky/event-router.d.ts +32 -0
- package/dist/lib/pi-sky/event-router.d.ts.map +1 -0
- package/dist/lib/pi-sky/event-router.js +176 -0
- package/dist/lib/pi-sky/event-router.js.map +1 -0
- package/dist/lib/pi-sky/experiment.d.ts +9 -0
- package/dist/lib/pi-sky/experiment.d.ts.map +1 -0
- package/dist/lib/pi-sky/experiment.js +83 -0
- package/dist/lib/pi-sky/experiment.js.map +1 -0
- package/dist/lib/pi-sky/index.d.ts +16 -0
- package/dist/lib/pi-sky/index.d.ts.map +1 -0
- package/dist/lib/pi-sky/index.js +16 -0
- package/dist/lib/pi-sky/index.js.map +1 -0
- package/dist/lib/pi-sky/stratus-gate.d.ts +28 -0
- package/dist/lib/pi-sky/stratus-gate.d.ts.map +1 -0
- package/dist/lib/pi-sky/stratus-gate.js +61 -0
- package/dist/lib/pi-sky/stratus-gate.js.map +1 -0
- package/dist/lib/pi-sky/swarm.d.ts +28 -0
- package/dist/lib/pi-sky/swarm.d.ts.map +1 -0
- package/dist/lib/pi-sky/swarm.js +208 -0
- package/dist/lib/pi-sky/swarm.js.map +1 -0
- package/dist/lib/pi-sky/types.d.ts +139 -0
- package/dist/lib/pi-sky/types.d.ts.map +1 -0
- package/dist/lib/pi-sky/types.js +2 -0
- package/dist/lib/pi-sky/types.js.map +1 -0
- package/dist/lib/pi-sky/voice-bridge.d.ts +20 -0
- package/dist/lib/pi-sky/voice-bridge.d.ts.map +1 -0
- package/dist/lib/pi-sky/voice-bridge.js +91 -0
- package/dist/lib/pi-sky/voice-bridge.js.map +1 -0
- package/dist/lib/planning-loop.d.ts +157 -0
- package/dist/lib/planning-loop.d.ts.map +1 -0
- package/dist/lib/planning-loop.js +537 -0
- package/dist/lib/planning-loop.js.map +1 -0
- package/dist/lib/policy-head.d.ts +53 -0
- package/dist/lib/policy-head.d.ts.map +1 -0
- package/dist/lib/policy-head.js +400 -0
- package/dist/lib/policy-head.js.map +1 -0
- package/dist/lib/predictor.d.ts +109 -0
- package/dist/lib/predictor.d.ts.map +1 -0
- package/dist/lib/predictor.js +433 -0
- package/dist/lib/predictor.js.map +1 -0
- package/dist/lib/replay-buffer.d.ts +93 -0
- package/dist/lib/replay-buffer.d.ts.map +1 -0
- package/dist/lib/replay-buffer.js +302 -0
- package/dist/lib/replay-buffer.js.map +1 -0
- package/dist/lib/resource-optimizer-middleware.d.ts +39 -0
- package/dist/lib/resource-optimizer-middleware.d.ts.map +1 -0
- package/dist/lib/resource-optimizer-middleware.js +228 -0
- package/dist/lib/resource-optimizer-middleware.js.map +1 -0
- package/dist/lib/resource-optimizer.d.ts +71 -0
- package/dist/lib/resource-optimizer.d.ts.map +1 -0
- package/dist/lib/resource-optimizer.js +228 -0
- package/dist/lib/resource-optimizer.js.map +1 -0
- package/dist/lib/rewards/index.d.ts +14 -0
- package/dist/lib/rewards/index.d.ts.map +1 -0
- package/dist/lib/rewards/index.js +15 -0
- package/dist/lib/rewards/index.js.map +1 -0
- package/dist/lib/rl-manager.d.ts +74 -0
- package/dist/lib/rl-manager.d.ts.map +1 -0
- package/dist/lib/rl-manager.js +245 -0
- package/dist/lib/rl-manager.js.map +1 -0
- package/dist/lib/sentinel-rl.d.ts +97 -0
- package/dist/lib/sentinel-rl.d.ts.map +1 -0
- package/dist/lib/sentinel-rl.js +430 -0
- package/dist/lib/sentinel-rl.js.map +1 -0
- package/dist/lib/service-analyzer.d.ts +76 -0
- package/dist/lib/service-analyzer.d.ts.map +1 -0
- package/dist/lib/service-analyzer.js +704 -0
- package/dist/lib/service-analyzer.js.map +1 -0
- package/dist/lib/service-dependencies.d.ts +44 -0
- package/dist/lib/service-dependencies.d.ts.map +1 -0
- package/dist/lib/service-dependencies.js +314 -0
- package/dist/lib/service-dependencies.js.map +1 -0
- package/dist/lib/service-detector.d.ts +61 -0
- package/dist/lib/service-detector.d.ts.map +1 -0
- package/dist/lib/service-detector.js +541 -0
- package/dist/lib/service-detector.js.map +1 -0
- package/dist/lib/service-gtm.d.ts +208 -0
- package/dist/lib/service-gtm.d.ts.map +1 -0
- package/dist/lib/service-gtm.js +1006 -0
- package/dist/lib/service-gtm.js.map +1 -0
- package/dist/lib/service-mcp-base.d.ts +103 -0
- package/dist/lib/service-mcp-base.d.ts.map +1 -0
- package/dist/lib/service-mcp-base.js +263 -0
- package/dist/lib/service-mcp-base.js.map +1 -0
- package/dist/lib/service-questionnaire.d.ts +11 -0
- package/dist/lib/service-questionnaire.d.ts.map +1 -0
- package/dist/lib/service-questionnaire.js +89 -0
- package/dist/lib/service-questionnaire.js.map +1 -0
- package/dist/lib/service-utils.d.ts +103 -0
- package/dist/lib/service-utils.d.ts.map +1 -0
- package/dist/lib/service-utils.js +385 -0
- package/dist/lib/service-utils.js.map +1 -0
- package/dist/lib/session-lock.d.ts +61 -0
- package/dist/lib/session-lock.d.ts.map +1 -0
- package/dist/lib/session-lock.js +438 -0
- package/dist/lib/session-lock.js.map +1 -0
- package/dist/lib/setup/agent-generator.d.ts +25 -0
- package/dist/lib/setup/agent-generator.d.ts.map +1 -0
- package/dist/lib/setup/agent-generator.js +444 -0
- package/dist/lib/setup/agent-generator.js.map +1 -0
- package/dist/lib/setup/context-analyzer.d.ts +16 -0
- package/dist/lib/setup/context-analyzer.d.ts.map +1 -0
- package/dist/lib/setup/context-analyzer.js +112 -0
- package/dist/lib/setup/context-analyzer.js.map +1 -0
- package/dist/lib/setup/doc-auditor.d.ts +54 -0
- package/dist/lib/setup/doc-auditor.d.ts.map +1 -0
- package/dist/lib/setup/doc-auditor.js +629 -0
- package/dist/lib/setup/doc-auditor.js.map +1 -0
- package/dist/lib/setup/domain-generator.d.ts +7 -0
- package/dist/lib/setup/domain-generator.d.ts.map +1 -0
- package/dist/lib/setup/domain-generator.js +58 -0
- package/dist/lib/setup/domain-generator.js.map +1 -0
- package/dist/lib/setup/flow-generator.d.ts +10 -0
- package/dist/lib/setup/flow-generator.d.ts.map +1 -0
- package/dist/lib/setup/flow-generator.js +113 -0
- package/dist/lib/setup/flow-generator.js.map +1 -0
- package/dist/lib/setup/invariant-bridge.d.ts +91 -0
- package/dist/lib/setup/invariant-bridge.d.ts.map +1 -0
- package/dist/lib/setup/invariant-bridge.js +384 -0
- package/dist/lib/setup/invariant-bridge.js.map +1 -0
- package/dist/lib/setup/smart-eval-generator.d.ts +38 -0
- package/dist/lib/setup/smart-eval-generator.d.ts.map +1 -0
- package/dist/lib/setup/smart-eval-generator.js +378 -0
- package/dist/lib/setup/smart-eval-generator.js.map +1 -0
- package/dist/lib/setup/smart-recommender.d.ts +63 -0
- package/dist/lib/setup/smart-recommender.d.ts.map +1 -0
- package/dist/lib/setup/smart-recommender.js +329 -0
- package/dist/lib/setup/smart-recommender.js.map +1 -0
- package/dist/lib/setup/spec-generator.d.ts +99 -0
- package/dist/lib/setup/spec-generator.d.ts.map +1 -0
- package/dist/lib/setup/spec-generator.js +784 -0
- package/dist/lib/setup/spec-generator.js.map +1 -0
- package/dist/lib/setup/starter-intelligence.d.ts +25 -0
- package/dist/lib/setup/starter-intelligence.d.ts.map +1 -0
- package/dist/lib/setup/starter-intelligence.js +309 -0
- package/dist/lib/setup/starter-intelligence.js.map +1 -0
- package/dist/lib/setup/violation-agent-generator.d.ts +32 -0
- package/dist/lib/setup/violation-agent-generator.d.ts.map +1 -0
- package/dist/lib/setup/violation-agent-generator.js +255 -0
- package/dist/lib/setup/violation-agent-generator.js.map +1 -0
- package/dist/lib/skill-generator.d.ts +21 -0
- package/dist/lib/skill-generator.d.ts.map +1 -0
- package/dist/lib/skill-generator.js +253 -0
- package/dist/lib/skill-generator.js.map +1 -0
- package/dist/lib/state-capture.d.ts +36 -0
- package/dist/lib/state-capture.d.ts.map +1 -0
- package/dist/lib/state-capture.js +541 -0
- package/dist/lib/state-capture.js.map +1 -0
- package/dist/lib/stealth-onboarding.d.ts +40 -0
- package/dist/lib/stealth-onboarding.d.ts.map +1 -0
- package/dist/lib/stealth-onboarding.js +213 -0
- package/dist/lib/stealth-onboarding.js.map +1 -0
- package/dist/lib/storage/cloud.d.ts +27 -0
- package/dist/lib/storage/cloud.d.ts.map +1 -0
- package/dist/lib/storage/cloud.js +75 -0
- package/dist/lib/storage/cloud.js.map +1 -0
- package/dist/lib/storage/index.d.ts +15 -0
- package/dist/lib/storage/index.d.ts.map +1 -0
- package/dist/lib/storage/index.js +15 -0
- package/dist/lib/storage/index.js.map +1 -0
- package/dist/lib/storage/interface.d.ts +56 -0
- package/dist/lib/storage/interface.d.ts.map +1 -0
- package/dist/lib/storage/interface.js +2 -0
- package/dist/lib/storage/interface.js.map +1 -0
- package/dist/lib/storage/local.d.ts +26 -0
- package/dist/lib/storage/local.d.ts.map +1 -0
- package/dist/lib/storage/local.js +164 -0
- package/dist/lib/storage/local.js.map +1 -0
- package/dist/lib/stratus-client.d.ts +178 -0
- package/dist/lib/stratus-client.d.ts.map +1 -0
- package/dist/lib/stratus-client.js +739 -0
- package/dist/lib/stratus-client.js.map +1 -0
- package/dist/lib/stratus-rollout-test.d.ts +10 -0
- package/dist/lib/stratus-rollout-test.d.ts.map +1 -0
- package/dist/lib/stratus-rollout-test.js +412 -0
- package/dist/lib/stratus-rollout-test.js.map +1 -0
- package/dist/lib/surface-agent.d.ts +78 -0
- package/dist/lib/surface-agent.d.ts.map +1 -0
- package/dist/lib/surface-agent.js +105 -0
- package/dist/lib/surface-agent.js.map +1 -0
- package/dist/lib/surface-coordination-example.d.ts +30 -0
- package/dist/lib/surface-coordination-example.d.ts.map +1 -0
- package/dist/lib/surface-coordination-example.js +164 -0
- package/dist/lib/surface-coordination-example.js.map +1 -0
- package/dist/lib/telemetry/physical-world-collector.d.ts +15 -0
- package/dist/lib/telemetry/physical-world-collector.d.ts.map +1 -0
- package/dist/lib/telemetry/physical-world-collector.js +177 -0
- package/dist/lib/telemetry/physical-world-collector.js.map +1 -0
- package/dist/lib/telemetry/training-bridge.d.ts +51 -0
- package/dist/lib/telemetry/training-bridge.d.ts.map +1 -0
- package/dist/lib/telemetry/training-bridge.js +185 -0
- package/dist/lib/telemetry/training-bridge.js.map +1 -0
- package/dist/lib/telemetry-agent-v2.d.ts +128 -0
- package/dist/lib/telemetry-agent-v2.d.ts.map +1 -0
- package/dist/lib/telemetry-agent-v2.js +1043 -0
- package/dist/lib/telemetry-agent-v2.js.map +1 -0
- package/dist/lib/telemetry-agent.d.ts +57 -0
- package/dist/lib/telemetry-agent.d.ts.map +1 -0
- package/dist/lib/telemetry-agent.js +289 -0
- package/dist/lib/telemetry-agent.js.map +1 -0
- package/dist/lib/telemetry-digest.d.ts +10 -0
- package/dist/lib/telemetry-digest.d.ts.map +1 -0
- package/dist/lib/telemetry-digest.js +381 -0
- package/dist/lib/telemetry-digest.js.map +1 -0
- package/dist/lib/telemetry.d.ts +37 -0
- package/dist/lib/telemetry.d.ts.map +1 -0
- package/dist/lib/telemetry.js +376 -0
- package/dist/lib/telemetry.js.map +1 -0
- package/dist/lib/tenet-board-agent.d.ts +52 -0
- package/dist/lib/tenet-board-agent.d.ts.map +1 -0
- package/dist/lib/tenet-board-agent.js +226 -0
- package/dist/lib/tenet-board-agent.js.map +1 -0
- package/dist/lib/tenet-ide-agent.d.ts +40 -0
- package/dist/lib/tenet-ide-agent.d.ts.map +1 -0
- package/dist/lib/tenet-ide-agent.js +199 -0
- package/dist/lib/tenet-ide-agent.js.map +1 -0
- package/dist/lib/text-preprocessing.d.ts +83 -0
- package/dist/lib/text-preprocessing.d.ts.map +1 -0
- package/dist/lib/text-preprocessing.js +261 -0
- package/dist/lib/text-preprocessing.js.map +1 -0
- package/dist/lib/tool-schemas.d.ts +35 -0
- package/dist/lib/tool-schemas.d.ts.map +1 -0
- package/dist/lib/tool-schemas.js +246 -0
- package/dist/lib/tool-schemas.js.map +1 -0
- package/dist/lib/training-buffer.d.ts +86 -0
- package/dist/lib/training-buffer.d.ts.map +1 -0
- package/dist/lib/training-buffer.js +139 -0
- package/dist/lib/training-buffer.js.map +1 -0
- package/dist/lib/training-tuples.d.ts +33 -0
- package/dist/lib/training-tuples.d.ts.map +1 -0
- package/dist/lib/training-tuples.js +273 -0
- package/dist/lib/training-tuples.js.map +1 -0
- package/dist/lib/trajectory-loader.d.ts +82 -0
- package/dist/lib/trajectory-loader.d.ts.map +1 -0
- package/dist/lib/trajectory-loader.js +406 -0
- package/dist/lib/trajectory-loader.js.map +1 -0
- package/dist/lib/tuple-miner.d.ts +30 -0
- package/dist/lib/tuple-miner.d.ts.map +1 -0
- package/dist/lib/tuple-miner.js +427 -0
- package/dist/lib/tuple-miner.js.map +1 -0
- package/dist/lib/vm-backend.d.ts +72 -0
- package/dist/lib/vm-backend.d.ts.map +1 -0
- package/dist/lib/vm-backend.js +175 -0
- package/dist/lib/vm-backend.js.map +1 -0
- package/dist/lib/workspace/backend.d.ts +53 -0
- package/dist/lib/workspace/backend.d.ts.map +1 -0
- package/dist/lib/workspace/backend.js +37 -0
- package/dist/lib/workspace/backend.js.map +1 -0
- package/dist/lib/workspace/cmux-adapter.d.ts +46 -0
- package/dist/lib/workspace/cmux-adapter.d.ts.map +1 -0
- package/dist/lib/workspace/cmux-adapter.js +261 -0
- package/dist/lib/workspace/cmux-adapter.js.map +1 -0
- package/dist/lib/workspace/data-pipeline.d.ts +35 -0
- package/dist/lib/workspace/data-pipeline.d.ts.map +1 -0
- package/dist/lib/workspace/data-pipeline.js +494 -0
- package/dist/lib/workspace/data-pipeline.js.map +1 -0
- package/dist/lib/workspace/engine.d.ts +65 -0
- package/dist/lib/workspace/engine.d.ts.map +1 -0
- package/dist/lib/workspace/engine.js +407 -0
- package/dist/lib/workspace/engine.js.map +1 -0
- package/dist/lib/workspace/notifications.d.ts +14 -0
- package/dist/lib/workspace/notifications.d.ts.map +1 -0
- package/dist/lib/workspace/notifications.js +41 -0
- package/dist/lib/workspace/notifications.js.map +1 -0
- package/dist/lib/workspace/sidebar-runner.d.ts +13 -0
- package/dist/lib/workspace/sidebar-runner.d.ts.map +1 -0
- package/dist/lib/workspace/sidebar-runner.js +419 -0
- package/dist/lib/workspace/sidebar-runner.js.map +1 -0
- package/dist/lib/workspace/surface-registry.d.ts +49 -0
- package/dist/lib/workspace/surface-registry.d.ts.map +1 -0
- package/dist/lib/workspace/surface-registry.js +225 -0
- package/dist/lib/workspace/surface-registry.js.map +1 -0
- package/dist/lib/workspace/surface-type.d.ts +153 -0
- package/dist/lib/workspace/surface-type.d.ts.map +1 -0
- package/dist/lib/workspace/surface-type.js +9 -0
- package/dist/lib/workspace/surface-type.js.map +1 -0
- package/dist/lib/workspace/surfaces/agent-overview.d.ts +16 -0
- package/dist/lib/workspace/surfaces/agent-overview.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/agent-overview.js +116 -0
- package/dist/lib/workspace/surfaces/agent-overview.js.map +1 -0
- package/dist/lib/workspace/surfaces/agent.d.ts +16 -0
- package/dist/lib/workspace/surfaces/agent.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/agent.js +112 -0
- package/dist/lib/workspace/surfaces/agent.js.map +1 -0
- package/dist/lib/workspace/surfaces/claude.d.ts +15 -0
- package/dist/lib/workspace/surfaces/claude.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/claude.js +23 -0
- package/dist/lib/workspace/surfaces/claude.js.map +1 -0
- package/dist/lib/workspace/surfaces/dashboard.d.ts +21 -0
- package/dist/lib/workspace/surfaces/dashboard.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/dashboard.js +32 -0
- package/dist/lib/workspace/surfaces/dashboard.js.map +1 -0
- package/dist/lib/workspace/surfaces/eval.d.ts +15 -0
- package/dist/lib/workspace/surfaces/eval.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/eval.js +42 -0
- package/dist/lib/workspace/surfaces/eval.js.map +1 -0
- package/dist/lib/workspace/surfaces/event-stream.d.ts +16 -0
- package/dist/lib/workspace/surfaces/event-stream.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/event-stream.js +40 -0
- package/dist/lib/workspace/surfaces/event-stream.js.map +1 -0
- package/dist/lib/workspace/surfaces/flow.d.ts +16 -0
- package/dist/lib/workspace/surfaces/flow.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/flow.js +49 -0
- package/dist/lib/workspace/surfaces/flow.js.map +1 -0
- package/dist/lib/workspace/surfaces/index.d.ts +19 -0
- package/dist/lib/workspace/surfaces/index.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/index.js +19 -0
- package/dist/lib/workspace/surfaces/index.js.map +1 -0
- package/dist/lib/workspace/surfaces/kanban.d.ts +15 -0
- package/dist/lib/workspace/surfaces/kanban.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/kanban.js +43 -0
- package/dist/lib/workspace/surfaces/kanban.js.map +1 -0
- package/dist/lib/workspace/surfaces/physical-world.d.ts +15 -0
- package/dist/lib/workspace/surfaces/physical-world.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/physical-world.js +37 -0
- package/dist/lib/workspace/surfaces/physical-world.js.map +1 -0
- package/dist/lib/workspace/surfaces/portfolio.d.ts +16 -0
- package/dist/lib/workspace/surfaces/portfolio.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/portfolio.js +102 -0
- package/dist/lib/workspace/surfaces/portfolio.js.map +1 -0
- package/dist/lib/workspace/surfaces/service.d.ts +16 -0
- package/dist/lib/workspace/surfaces/service.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/service.js +45 -0
- package/dist/lib/workspace/surfaces/service.js.map +1 -0
- package/dist/lib/workspace/surfaces/shell.d.ts +15 -0
- package/dist/lib/workspace/surfaces/shell.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/shell.js +19 -0
- package/dist/lib/workspace/surfaces/shell.js.map +1 -0
- package/dist/lib/workspace/surfaces/sidebar.d.ts +22 -0
- package/dist/lib/workspace/surfaces/sidebar.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/sidebar.js +94 -0
- package/dist/lib/workspace/surfaces/sidebar.js.map +1 -0
- package/dist/lib/workspace/surfaces/telemetry.d.ts +16 -0
- package/dist/lib/workspace/surfaces/telemetry.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/telemetry.js +48 -0
- package/dist/lib/workspace/surfaces/telemetry.js.map +1 -0
- package/dist/lib/workspace/surfaces/topology.d.ts +15 -0
- package/dist/lib/workspace/surfaces/topology.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/topology.js +19 -0
- package/dist/lib/workspace/surfaces/topology.js.map +1 -0
- package/dist/lib/workspace/surfaces/training.d.ts +16 -0
- package/dist/lib/workspace/surfaces/training.d.ts.map +1 -0
- package/dist/lib/workspace/surfaces/training.js +22 -0
- package/dist/lib/workspace/surfaces/training.js.map +1 -0
- package/dist/lib/workspace/tmux-adapter.d.ts +30 -0
- package/dist/lib/workspace/tmux-adapter.d.ts.map +1 -0
- package/dist/lib/workspace/tmux-adapter.js +137 -0
- package/dist/lib/workspace/tmux-adapter.js.map +1 -0
- package/dist/lib/workspace/tmux-sidebar.d.ts +14 -0
- package/dist/lib/workspace/tmux-sidebar.d.ts.map +1 -0
- package/dist/lib/workspace/tmux-sidebar.js +230 -0
- package/dist/lib/workspace/tmux-sidebar.js.map +1 -0
- package/dist/lib/world-model-store.d.ts +172 -0
- package/dist/lib/world-model-store.d.ts.map +1 -0
- package/dist/lib/world-model-store.js +487 -0
- package/dist/lib/world-model-store.js.map +1 -0
- package/dist/mcp/context-hub-mcp.d.ts +11 -0
- package/dist/mcp/context-hub-mcp.d.ts.map +1 -0
- package/dist/mcp/context-hub-mcp.js +797 -0
- package/dist/mcp/context-hub-mcp.js.map +1 -0
- package/dist/mcp/service-mcp-server.d.ts +12 -0
- package/dist/mcp/service-mcp-server.d.ts.map +1 -0
- package/dist/mcp/service-mcp-server.js +434 -0
- package/dist/mcp/service-mcp-server.js.map +1 -0
- package/dist/mcp/service-peer-mcp.d.ts +36 -0
- package/dist/mcp/service-peer-mcp.d.ts.map +1 -0
- package/dist/mcp/service-peer-mcp.js +220 -0
- package/dist/mcp/service-peer-mcp.js.map +1 -0
- package/dist/mcp/service-registry-mcp.d.ts +13 -0
- package/dist/mcp/service-registry-mcp.d.ts.map +1 -0
- package/dist/mcp/service-registry-mcp.js +330 -0
- package/dist/mcp/service-registry-mcp.js.map +1 -0
- package/dist/telegram/voice.d.ts +146 -0
- package/dist/telegram/voice.d.ts.map +1 -0
- package/dist/telegram/voice.js +351 -0
- package/dist/telegram/voice.js.map +1 -0
- package/dist/types/eval.d.ts +18 -0
- package/dist/types/eval.d.ts.map +1 -0
- package/dist/types/eval.js +5 -0
- package/dist/types/eval.js.map +1 -0
- package/dist/types/flows.d.ts +72 -0
- package/dist/types/flows.d.ts.map +1 -0
- package/dist/types/flows.js +10 -0
- package/dist/types/flows.js.map +1 -0
- package/dist/types/ide.d.ts +49 -0
- package/dist/types/ide.d.ts.map +1 -0
- package/dist/types/ide.js +5 -0
- package/dist/types/ide.js.map +1 -0
- package/dist/types/journal.d.ts +133 -0
- package/dist/types/journal.d.ts.map +1 -0
- package/dist/types/journal.js +59 -0
- package/dist/types/journal.js.map +1 -0
- package/dist/types/map.d.ts +42 -0
- package/dist/types/map.d.ts.map +1 -0
- package/dist/types/map.js +39 -0
- package/dist/types/map.js.map +1 -0
- package/dist/types/physical-world-model.d.ts +65 -0
- package/dist/types/physical-world-model.d.ts.map +1 -0
- package/dist/types/physical-world-model.js +43 -0
- package/dist/types/physical-world-model.js.map +1 -0
- package/dist/types/platform-digest.d.ts +228 -0
- package/dist/types/platform-digest.d.ts.map +1 -0
- package/dist/types/platform-digest.js +5 -0
- package/dist/types/platform-digest.js.map +1 -0
- package/dist/types/skills.d.ts +44 -0
- package/dist/types/skills.d.ts.map +1 -0
- package/dist/types/skills.js +5 -0
- package/dist/types/skills.js.map +1 -0
- package/dist/types/telemetry-digest.d.ts +75 -0
- package/dist/types/telemetry-digest.d.ts.map +1 -0
- package/dist/types/telemetry-digest.js +5 -0
- package/dist/types/telemetry-digest.js.map +1 -0
- package/dist/types/telemetry.d.ts +107 -0
- package/dist/types/telemetry.d.ts.map +1 -0
- package/dist/types/telemetry.js +5 -0
- package/dist/types/telemetry.js.map +1 -0
- package/dist/types/world-model.d.ts +478 -0
- package/dist/types/world-model.d.ts.map +1 -0
- package/dist/types/world-model.js +87 -0
- package/dist/types/world-model.js.map +1 -0
- package/dist/ui/banner.d.ts +18 -0
- package/dist/ui/banner.d.ts.map +1 -0
- package/dist/ui/banner.js +323 -0
- package/dist/ui/banner.js.map +1 -0
- package/dist/ui/context-hub-logs.d.ts +10 -0
- package/dist/ui/context-hub-logs.d.ts.map +1 -0
- package/dist/ui/context-hub-logs.js +175 -0
- package/dist/ui/context-hub-logs.js.map +1 -0
- package/dist/ui/event-dashboard.d.ts +12 -0
- package/dist/ui/event-dashboard.d.ts.map +1 -0
- package/dist/ui/event-dashboard.js +342 -0
- package/dist/ui/event-dashboard.js.map +1 -0
- package/dist/ui/index.d.ts +8 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +8 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/prompts.d.ts +52 -0
- package/dist/ui/prompts.d.ts.map +1 -0
- package/dist/ui/prompts.js +72 -0
- package/dist/ui/prompts.js.map +1 -0
- package/dist/ui/service-dashboard.d.ts +11 -0
- package/dist/ui/service-dashboard.d.ts.map +1 -0
- package/dist/ui/service-dashboard.js +357 -0
- package/dist/ui/service-dashboard.js.map +1 -0
- package/dist/ui/services-manager.d.ts +11 -0
- package/dist/ui/services-manager.d.ts.map +1 -0
- package/dist/ui/services-manager.js +507 -0
- package/dist/ui/services-manager.js.map +1 -0
- package/dist/ui/theme.d.ts +82 -0
- package/dist/ui/theme.d.ts.map +1 -0
- package/dist/ui/theme.js +142 -0
- package/dist/ui/theme.js.map +1 -0
- package/dist/utils/auth-guard.d.ts +66 -0
- package/dist/utils/auth-guard.d.ts.map +1 -0
- package/dist/utils/auth-guard.js +347 -0
- package/dist/utils/auth-guard.js.map +1 -0
- package/dist/utils/auth-status.d.ts +21 -0
- package/dist/utils/auth-status.d.ts.map +1 -0
- package/dist/utils/auth-status.js +53 -0
- package/dist/utils/auth-status.js.map +1 -0
- package/dist/utils/claude-md-generator.d.ts +10 -0
- package/dist/utils/claude-md-generator.d.ts.map +1 -0
- package/dist/utils/claude-md-generator.js +215 -0
- package/dist/utils/claude-md-generator.js.map +1 -0
- package/dist/utils/context-hub-port.d.ts +33 -0
- package/dist/utils/context-hub-port.d.ts.map +1 -0
- package/dist/utils/context-hub-port.js +118 -0
- package/dist/utils/context-hub-port.js.map +1 -0
- package/dist/utils/ensure-context-hub.d.ts +20 -0
- package/dist/utils/ensure-context-hub.d.ts.map +1 -0
- package/dist/utils/ensure-context-hub.js +66 -0
- package/dist/utils/ensure-context-hub.js.map +1 -0
- package/dist/utils/ensure-project.d.ts +12 -0
- package/dist/utils/ensure-project.d.ts.map +1 -0
- package/dist/utils/ensure-project.js +81 -0
- package/dist/utils/ensure-project.js.map +1 -0
- package/dist/utils/git.d.ts +73 -0
- package/dist/utils/git.d.ts.map +1 -0
- package/dist/utils/git.js +222 -0
- package/dist/utils/git.js.map +1 -0
- package/dist/utils/github-auth.d.ts +54 -0
- package/dist/utils/github-auth.d.ts.map +1 -0
- package/dist/utils/github-auth.js +376 -0
- package/dist/utils/github-auth.js.map +1 -0
- package/dist/utils/github-repo.d.ts +30 -0
- package/dist/utils/github-repo.d.ts.map +1 -0
- package/dist/utils/github-repo.js +219 -0
- package/dist/utils/github-repo.js.map +1 -0
- package/dist/utils/jfl-config.d.ts +30 -0
- package/dist/utils/jfl-config.d.ts.map +1 -0
- package/dist/utils/jfl-config.js +153 -0
- package/dist/utils/jfl-config.js.map +1 -0
- package/dist/utils/jfl-migration.d.ts +29 -0
- package/dist/utils/jfl-migration.d.ts.map +1 -0
- package/dist/utils/jfl-migration.js +142 -0
- package/dist/utils/jfl-migration.js.map +1 -0
- package/dist/utils/jfl-paths.d.ts +71 -0
- package/dist/utils/jfl-paths.d.ts.map +1 -0
- package/dist/utils/jfl-paths.js +157 -0
- package/dist/utils/jfl-paths.js.map +1 -0
- package/dist/utils/platform-auth.d.ts +81 -0
- package/dist/utils/platform-auth.d.ts.map +1 -0
- package/dist/utils/platform-auth.js +192 -0
- package/dist/utils/platform-auth.js.map +1 -0
- package/dist/utils/project-config.d.ts +43 -0
- package/dist/utils/project-config.d.ts.map +1 -0
- package/dist/utils/project-config.js +97 -0
- package/dist/utils/project-config.js.map +1 -0
- package/dist/utils/provenance.d.ts +65 -0
- package/dist/utils/provenance.d.ts.map +1 -0
- package/dist/utils/provenance.js +213 -0
- package/dist/utils/provenance.js.map +1 -0
- package/dist/utils/settings-validator.d.ts +74 -0
- package/dist/utils/settings-validator.d.ts.map +1 -0
- package/dist/utils/settings-validator.js +241 -0
- package/dist/utils/settings-validator.js.map +1 -0
- package/dist/utils/skill-registry.d.ts +49 -0
- package/dist/utils/skill-registry.d.ts.map +1 -0
- package/dist/utils/skill-registry.js +192 -0
- package/dist/utils/skill-registry.js.map +1 -0
- package/dist/utils/tenet-env.d.ts +34 -0
- package/dist/utils/tenet-env.d.ts.map +1 -0
- package/dist/utils/tenet-env.js +42 -0
- package/dist/utils/tenet-env.js.map +1 -0
- package/dist/utils/wallet.d.ts +62 -0
- package/dist/utils/wallet.d.ts.map +1 -0
- package/dist/utils/wallet.js +253 -0
- package/dist/utils/wallet.js.map +1 -0
- package/dist/utils/x402-client.d.ts +86 -0
- package/dist/utils/x402-client.d.ts.map +1 -0
- package/dist/utils/x402-client.js +266 -0
- package/dist/utils/x402-client.js.map +1 -0
- package/package.json +105 -0
- package/packages/pi/AGENTS.md +112 -0
- package/packages/pi/assets/boot.mp3 +0 -0
- package/packages/pi/dist/agent-grid.d.ts +24 -0
- package/packages/pi/dist/agent-grid.d.ts.map +1 -0
- package/packages/pi/dist/agent-grid.js +162 -0
- package/packages/pi/dist/agent-grid.js.map +1 -0
- package/packages/pi/dist/agent-names.d.ts +43 -0
- package/packages/pi/dist/agent-names.d.ts.map +1 -0
- package/packages/pi/dist/agent-names.js +156 -0
- package/packages/pi/dist/agent-names.js.map +1 -0
- package/packages/pi/dist/autoresearch.d.ts +15 -0
- package/packages/pi/dist/autoresearch.d.ts.map +1 -0
- package/packages/pi/dist/autoresearch.js +372 -0
- package/packages/pi/dist/autoresearch.js.map +1 -0
- package/packages/pi/dist/bookmarks.d.ts +15 -0
- package/packages/pi/dist/bookmarks.d.ts.map +1 -0
- package/packages/pi/dist/bookmarks.js +77 -0
- package/packages/pi/dist/bookmarks.js.map +1 -0
- package/packages/pi/dist/context.d.ts +17 -0
- package/packages/pi/dist/context.d.ts.map +1 -0
- package/packages/pi/dist/context.js +152 -0
- package/packages/pi/dist/context.js.map +1 -0
- package/packages/pi/dist/crm-tool.d.ts +12 -0
- package/packages/pi/dist/crm-tool.d.ts.map +1 -0
- package/packages/pi/dist/crm-tool.js +58 -0
- package/packages/pi/dist/crm-tool.js.map +1 -0
- package/packages/pi/dist/eval-tool.d.ts +11 -0
- package/packages/pi/dist/eval-tool.d.ts.map +1 -0
- package/packages/pi/dist/eval-tool.js +188 -0
- package/packages/pi/dist/eval-tool.js.map +1 -0
- package/packages/pi/dist/eval.d.ts +12 -0
- package/packages/pi/dist/eval.d.ts.map +1 -0
- package/packages/pi/dist/eval.js +43 -0
- package/packages/pi/dist/eval.js.map +1 -0
- package/packages/pi/dist/footer.d.ts +20 -0
- package/packages/pi/dist/footer.d.ts.map +1 -0
- package/packages/pi/dist/footer.js +222 -0
- package/packages/pi/dist/footer.js.map +1 -0
- package/packages/pi/dist/header.d.ts +17 -0
- package/packages/pi/dist/header.d.ts.map +1 -0
- package/packages/pi/dist/header.js +156 -0
- package/packages/pi/dist/header.js.map +1 -0
- package/packages/pi/dist/hub-resolver.d.ts +11 -0
- package/packages/pi/dist/hub-resolver.d.ts.map +1 -0
- package/packages/pi/dist/hub-resolver.js +58 -0
- package/packages/pi/dist/hub-resolver.js.map +1 -0
- package/packages/pi/dist/hub-tools.d.ts +14 -0
- package/packages/pi/dist/hub-tools.d.ts.map +1 -0
- package/packages/pi/dist/hub-tools.js +266 -0
- package/packages/pi/dist/hub-tools.js.map +1 -0
- package/packages/pi/dist/hud-tool.d.ts +17 -0
- package/packages/pi/dist/hud-tool.d.ts.map +1 -0
- package/packages/pi/dist/hud-tool.js +297 -0
- package/packages/pi/dist/hud-tool.js.map +1 -0
- package/packages/pi/dist/index.d.ts +12 -0
- package/packages/pi/dist/index.d.ts.map +1 -0
- package/packages/pi/dist/index.js +556 -0
- package/packages/pi/dist/index.js.map +1 -0
- package/packages/pi/dist/jfl-resolve.d.ts +29 -0
- package/packages/pi/dist/jfl-resolve.d.ts.map +1 -0
- package/packages/pi/dist/jfl-resolve.js +89 -0
- package/packages/pi/dist/jfl-resolve.js.map +1 -0
- package/packages/pi/dist/journal.d.ts +23 -0
- package/packages/pi/dist/journal.d.ts.map +1 -0
- package/packages/pi/dist/journal.js +250 -0
- package/packages/pi/dist/journal.js.map +1 -0
- package/packages/pi/dist/map-bridge.d.ts +20 -0
- package/packages/pi/dist/map-bridge.d.ts.map +1 -0
- package/packages/pi/dist/map-bridge.js +181 -0
- package/packages/pi/dist/map-bridge.js.map +1 -0
- package/packages/pi/dist/memory-tool.d.ts +11 -0
- package/packages/pi/dist/memory-tool.d.ts.map +1 -0
- package/packages/pi/dist/memory-tool.js +162 -0
- package/packages/pi/dist/memory-tool.js.map +1 -0
- package/packages/pi/dist/notifications.d.ts +15 -0
- package/packages/pi/dist/notifications.d.ts.map +1 -0
- package/packages/pi/dist/notifications.js +65 -0
- package/packages/pi/dist/notifications.js.map +1 -0
- package/packages/pi/dist/onboarding-v1.d.ts +15 -0
- package/packages/pi/dist/onboarding-v1.d.ts.map +1 -0
- package/packages/pi/dist/onboarding-v1.js +417 -0
- package/packages/pi/dist/onboarding-v1.js.map +1 -0
- package/packages/pi/dist/onboarding-v2.d.ts +18 -0
- package/packages/pi/dist/onboarding-v2.d.ts.map +1 -0
- package/packages/pi/dist/onboarding-v2.js +402 -0
- package/packages/pi/dist/onboarding-v2.js.map +1 -0
- package/packages/pi/dist/onboarding-v3.d.ts +13 -0
- package/packages/pi/dist/onboarding-v3.d.ts.map +1 -0
- package/packages/pi/dist/onboarding-v3.js +581 -0
- package/packages/pi/dist/onboarding-v3.js.map +1 -0
- package/packages/pi/dist/peter-parker.d.ts +12 -0
- package/packages/pi/dist/peter-parker.d.ts.map +1 -0
- package/packages/pi/dist/peter-parker.js +162 -0
- package/packages/pi/dist/peter-parker.js.map +1 -0
- package/packages/pi/dist/pivot-tool.d.ts +11 -0
- package/packages/pi/dist/pivot-tool.d.ts.map +1 -0
- package/packages/pi/dist/pivot-tool.js +56 -0
- package/packages/pi/dist/pivot-tool.js.map +1 -0
- package/packages/pi/dist/policy-head-tool.d.ts +15 -0
- package/packages/pi/dist/policy-head-tool.d.ts.map +1 -0
- package/packages/pi/dist/policy-head-tool.js +220 -0
- package/packages/pi/dist/policy-head-tool.js.map +1 -0
- package/packages/pi/dist/portfolio-bridge.d.ts +12 -0
- package/packages/pi/dist/portfolio-bridge.d.ts.map +1 -0
- package/packages/pi/dist/portfolio-bridge.js +81 -0
- package/packages/pi/dist/portfolio-bridge.js.map +1 -0
- package/packages/pi/dist/service-skills.d.ts +15 -0
- package/packages/pi/dist/service-skills.d.ts.map +1 -0
- package/packages/pi/dist/service-skills.js +198 -0
- package/packages/pi/dist/service-skills.js.map +1 -0
- package/packages/pi/dist/session.d.ts +28 -0
- package/packages/pi/dist/session.d.ts.map +1 -0
- package/packages/pi/dist/session.js +649 -0
- package/packages/pi/dist/session.js.map +1 -0
- package/packages/pi/dist/shortcuts.d.ts +11 -0
- package/packages/pi/dist/shortcuts.d.ts.map +1 -0
- package/packages/pi/dist/shortcuts.js +231 -0
- package/packages/pi/dist/shortcuts.js.map +1 -0
- package/packages/pi/dist/startup-briefing.d.ts +13 -0
- package/packages/pi/dist/startup-briefing.d.ts.map +1 -0
- package/packages/pi/dist/startup-briefing.js +432 -0
- package/packages/pi/dist/startup-briefing.js.map +1 -0
- package/packages/pi/dist/stratus-bridge.d.ts +14 -0
- package/packages/pi/dist/stratus-bridge.d.ts.map +1 -0
- package/packages/pi/dist/stratus-bridge.js +104 -0
- package/packages/pi/dist/stratus-bridge.js.map +1 -0
- package/packages/pi/dist/subway-mesh.d.ts +88 -0
- package/packages/pi/dist/subway-mesh.d.ts.map +1 -0
- package/packages/pi/dist/subway-mesh.js +813 -0
- package/packages/pi/dist/subway-mesh.js.map +1 -0
- package/packages/pi/dist/synopsis-tool.d.ts +12 -0
- package/packages/pi/dist/synopsis-tool.d.ts.map +1 -0
- package/packages/pi/dist/synopsis-tool.js +84 -0
- package/packages/pi/dist/synopsis-tool.js.map +1 -0
- package/packages/pi/dist/tool-renderers.d.ts +55 -0
- package/packages/pi/dist/tool-renderers.d.ts.map +1 -0
- package/packages/pi/dist/tool-renderers.js +349 -0
- package/packages/pi/dist/tool-renderers.js.map +1 -0
- package/packages/pi/dist/training-buffer-tool.d.ts +16 -0
- package/packages/pi/dist/training-buffer-tool.d.ts.map +1 -0
- package/packages/pi/dist/training-buffer-tool.js +319 -0
- package/packages/pi/dist/training-buffer-tool.js.map +1 -0
- package/packages/pi/dist/types.d.ts +195 -0
- package/packages/pi/dist/types.d.ts.map +1 -0
- package/packages/pi/dist/types.js +11 -0
- package/packages/pi/dist/types.js.map +1 -0
- package/packages/pi/extensions/agent-grid.ts +191 -0
- package/packages/pi/extensions/agent-names.ts +178 -0
- package/packages/pi/extensions/autoresearch.ts +428 -0
- package/packages/pi/extensions/bookmarks.ts +85 -0
- package/packages/pi/extensions/context.ts +158 -0
- package/packages/pi/extensions/crm-tool.ts +61 -0
- package/packages/pi/extensions/eval-tool.ts +224 -0
- package/packages/pi/extensions/eval.ts +61 -0
- package/packages/pi/extensions/footer.ts +239 -0
- package/packages/pi/extensions/header.ts +171 -0
- package/packages/pi/extensions/hub-resolver.ts +63 -0
- package/packages/pi/extensions/hub-tools.ts +267 -0
- package/packages/pi/extensions/hud-tool.ts +294 -0
- package/packages/pi/extensions/index.ts +601 -0
- package/packages/pi/extensions/jfl-resolve.ts +98 -0
- package/packages/pi/extensions/journal.ts +309 -0
- package/packages/pi/extensions/map-bridge.ts +209 -0
- package/packages/pi/extensions/memory-tool.ts +170 -0
- package/packages/pi/extensions/notifications.ts +73 -0
- package/packages/pi/extensions/onboarding-v1.ts +455 -0
- package/packages/pi/extensions/onboarding-v2.ts +374 -0
- package/packages/pi/extensions/onboarding-v3.ts +686 -0
- package/packages/pi/extensions/peter-parker.ts +203 -0
- package/packages/pi/extensions/pivot-tool.ts +59 -0
- package/packages/pi/extensions/policy-head-tool.ts +277 -0
- package/packages/pi/extensions/portfolio-bridge.ts +89 -0
- package/packages/pi/extensions/service-skills.ts +219 -0
- package/packages/pi/extensions/session.ts +684 -0
- package/packages/pi/extensions/shortcuts.ts +259 -0
- package/packages/pi/extensions/startup-briefing.ts +482 -0
- package/packages/pi/extensions/stratus-bridge.ts +116 -0
- package/packages/pi/extensions/subway-mesh.ts +893 -0
- package/packages/pi/extensions/synopsis-tool.ts +88 -0
- package/packages/pi/extensions/tool-renderers.ts +366 -0
- package/packages/pi/extensions/training-buffer-tool.ts +376 -0
- package/packages/pi/extensions/types.ts +169 -0
- package/packages/pi/package-lock.json +346 -0
- package/packages/pi/package.json +42 -0
- package/packages/pi/skills/agent-browser/SKILL.md +116 -0
- package/packages/pi/skills/brand-architect/SKILL.md +240 -0
- package/packages/pi/skills/brand-architect/config.yaml +137 -0
- package/packages/pi/skills/campaign-hud/config.yaml +112 -0
- package/packages/pi/skills/content-creator/SKILL.md +294 -0
- package/packages/pi/skills/context/SKILL.md +65 -0
- package/packages/pi/skills/debug/MULTI_AGENT.md +360 -0
- package/packages/pi/skills/debug/SKILL.md +554 -0
- package/packages/pi/skills/end/SKILL.md +1790 -0
- package/packages/pi/skills/eval/SKILL.md +75 -0
- package/packages/pi/skills/fly-deploy/SKILL.md +676 -0
- package/packages/pi/skills/founder-video/SKILL.md +467 -0
- package/packages/pi/skills/hud/SKILL.md +160 -0
- package/packages/pi/skills/orchestrate/SKILL.md +74 -0
- package/packages/pi/skills/pi-agents/SKILL.md +78 -0
- package/packages/pi/skills/pivot/SKILL.md +91 -0
- package/packages/pi/skills/react-best-practices/AGENTS.md +2249 -0
- package/packages/pi/skills/react-best-practices/README.md +123 -0
- package/packages/pi/skills/react-best-practices/SKILL.md +125 -0
- package/packages/pi/skills/react-best-practices/metadata.json +15 -0
- package/packages/pi/skills/react-best-practices/rules/_sections.md +46 -0
- package/packages/pi/skills/react-best-practices/rules/_template.md +28 -0
- package/packages/pi/skills/react-best-practices/rules/advanced-event-handler-refs.md +55 -0
- package/packages/pi/skills/react-best-practices/rules/advanced-use-latest.md +49 -0
- package/packages/pi/skills/react-best-practices/rules/async-api-routes.md +38 -0
- package/packages/pi/skills/react-best-practices/rules/async-defer-await.md +80 -0
- package/packages/pi/skills/react-best-practices/rules/async-dependencies.md +36 -0
- package/packages/pi/skills/react-best-practices/rules/async-parallel.md +28 -0
- package/packages/pi/skills/react-best-practices/rules/async-suspense-boundaries.md +99 -0
- package/packages/pi/skills/react-best-practices/rules/bundle-barrel-imports.md +59 -0
- package/packages/pi/skills/react-best-practices/rules/bundle-conditional.md +31 -0
- package/packages/pi/skills/react-best-practices/rules/bundle-defer-third-party.md +49 -0
- package/packages/pi/skills/react-best-practices/rules/bundle-dynamic-imports.md +35 -0
- package/packages/pi/skills/react-best-practices/rules/bundle-preload.md +50 -0
- package/packages/pi/skills/react-best-practices/rules/client-event-listeners.md +74 -0
- package/packages/pi/skills/react-best-practices/rules/client-swr-dedup.md +56 -0
- package/packages/pi/skills/react-best-practices/rules/js-batch-dom-css.md +82 -0
- package/packages/pi/skills/react-best-practices/rules/js-cache-function-results.md +80 -0
- package/packages/pi/skills/react-best-practices/rules/js-cache-property-access.md +28 -0
- package/packages/pi/skills/react-best-practices/rules/js-cache-storage.md +70 -0
- package/packages/pi/skills/react-best-practices/rules/js-combine-iterations.md +32 -0
- package/packages/pi/skills/react-best-practices/rules/js-early-exit.md +50 -0
- package/packages/pi/skills/react-best-practices/rules/js-hoist-regexp.md +45 -0
- package/packages/pi/skills/react-best-practices/rules/js-index-maps.md +37 -0
- package/packages/pi/skills/react-best-practices/rules/js-length-check-first.md +49 -0
- package/packages/pi/skills/react-best-practices/rules/js-min-max-loop.md +82 -0
- package/packages/pi/skills/react-best-practices/rules/js-set-map-lookups.md +24 -0
- package/packages/pi/skills/react-best-practices/rules/js-tosorted-immutable.md +57 -0
- package/packages/pi/skills/react-best-practices/rules/rendering-activity.md +26 -0
- package/packages/pi/skills/react-best-practices/rules/rendering-animate-svg-wrapper.md +47 -0
- package/packages/pi/skills/react-best-practices/rules/rendering-conditional-render.md +40 -0
- package/packages/pi/skills/react-best-practices/rules/rendering-content-visibility.md +38 -0
- package/packages/pi/skills/react-best-practices/rules/rendering-hoist-jsx.md +46 -0
- package/packages/pi/skills/react-best-practices/rules/rendering-hydration-no-flicker.md +82 -0
- package/packages/pi/skills/react-best-practices/rules/rendering-svg-precision.md +28 -0
- package/packages/pi/skills/react-best-practices/rules/rerender-defer-reads.md +39 -0
- package/packages/pi/skills/react-best-practices/rules/rerender-dependencies.md +45 -0
- package/packages/pi/skills/react-best-practices/rules/rerender-derived-state.md +29 -0
- package/packages/pi/skills/react-best-practices/rules/rerender-functional-setstate.md +74 -0
- package/packages/pi/skills/react-best-practices/rules/rerender-lazy-state-init.md +58 -0
- package/packages/pi/skills/react-best-practices/rules/rerender-memo.md +44 -0
- package/packages/pi/skills/react-best-practices/rules/rerender-transitions.md +40 -0
- package/packages/pi/skills/react-best-practices/rules/server-after-nonblocking.md +73 -0
- package/packages/pi/skills/react-best-practices/rules/server-cache-lru.md +41 -0
- package/packages/pi/skills/react-best-practices/rules/server-cache-react.md +26 -0
- package/packages/pi/skills/react-best-practices/rules/server-parallel-fetching.md +79 -0
- package/packages/pi/skills/react-best-practices/rules/server-serialization.md +38 -0
- package/packages/pi/skills/remotion-best-practices/SKILL.md +43 -0
- package/packages/pi/skills/remotion-best-practices/rules/3d.md +86 -0
- package/packages/pi/skills/remotion-best-practices/rules/animations.md +29 -0
- package/packages/pi/skills/remotion-best-practices/rules/assets/charts-bar-chart.tsx +173 -0
- package/packages/pi/skills/remotion-best-practices/rules/assets/text-animations-typewriter.tsx +100 -0
- package/packages/pi/skills/remotion-best-practices/rules/assets/text-animations-word-highlight.tsx +108 -0
- package/packages/pi/skills/remotion-best-practices/rules/assets.md +78 -0
- package/packages/pi/skills/remotion-best-practices/rules/audio.md +172 -0
- package/packages/pi/skills/remotion-best-practices/rules/calculate-metadata.md +104 -0
- package/packages/pi/skills/remotion-best-practices/rules/can-decode.md +75 -0
- package/packages/pi/skills/remotion-best-practices/rules/charts.md +58 -0
- package/packages/pi/skills/remotion-best-practices/rules/compositions.md +146 -0
- package/packages/pi/skills/remotion-best-practices/rules/display-captions.md +126 -0
- package/packages/pi/skills/remotion-best-practices/rules/extract-frames.md +229 -0
- package/packages/pi/skills/remotion-best-practices/rules/fonts.md +152 -0
- package/packages/pi/skills/remotion-best-practices/rules/get-audio-duration.md +58 -0
- package/packages/pi/skills/remotion-best-practices/rules/get-video-dimensions.md +68 -0
- package/packages/pi/skills/remotion-best-practices/rules/get-video-duration.md +58 -0
- package/packages/pi/skills/remotion-best-practices/rules/gifs.md +138 -0
- package/packages/pi/skills/remotion-best-practices/rules/images.md +130 -0
- package/packages/pi/skills/remotion-best-practices/rules/import-srt-captions.md +67 -0
- package/packages/pi/skills/remotion-best-practices/rules/lottie.md +68 -0
- package/packages/pi/skills/remotion-best-practices/rules/measuring-dom-nodes.md +35 -0
- package/packages/pi/skills/remotion-best-practices/rules/measuring-text.md +143 -0
- package/packages/pi/skills/remotion-best-practices/rules/sequencing.md +106 -0
- package/packages/pi/skills/remotion-best-practices/rules/tailwind.md +11 -0
- package/packages/pi/skills/remotion-best-practices/rules/text-animations.md +20 -0
- package/packages/pi/skills/remotion-best-practices/rules/timing.md +179 -0
- package/packages/pi/skills/remotion-best-practices/rules/transcribe-captions.md +19 -0
- package/packages/pi/skills/remotion-best-practices/rules/transitions.md +122 -0
- package/packages/pi/skills/remotion-best-practices/rules/trimming.md +53 -0
- package/packages/pi/skills/remotion-best-practices/rules/videos.md +171 -0
- package/packages/pi/skills/search/SKILL.md +220 -0
- package/packages/pi/skills/spec/SKILL.md +377 -0
- package/packages/pi/skills/startup/SKILL.md +315 -0
- package/packages/pi/skills/subway-browser/SKILL.md +292 -0
- package/packages/pi/skills/viz/SKILL.md +204 -0
- package/packages/pi/skills/web-architect/SKILL.md +309 -0
- package/packages/pi/skills/x-algorithm/SKILL.md +305 -0
- package/packages/pi/teams/dev-team.yaml +63 -0
- package/packages/pi/teams/gtm-team.yaml +79 -0
- package/packages/pi/themes/jfl.theme.json +76 -0
- package/packages/pi/tsconfig.json +21 -0
- package/scripts/__pycache__/train-policy-head.cpython-314.pyc +0 -0
- package/scripts/collect-tuples.sh +124 -0
- package/scripts/commit-gtm.sh +56 -0
- package/scripts/commit-product.sh +68 -0
- package/scripts/context-query.sh +45 -0
- package/scripts/destroy-fleet.sh +37 -0
- package/scripts/generate-changesets.sh +113 -0
- package/scripts/jfl-ide.sh +48 -0
- package/scripts/migrate-to-branch-sessions.sh +201 -0
- package/scripts/postinstall.js +146 -0
- package/scripts/pp-branch-pr.sh +133 -0
- package/scripts/pp-branch-pr.sh.bak +115 -0
- package/scripts/session/auto-commit.sh +297 -0
- package/scripts/session/fix-tracked-logs.sh +97 -0
- package/scripts/session/jfl-doctor.sh +707 -0
- package/scripts/session/session-cleanup.sh +292 -0
- package/scripts/session/session-end.sh +198 -0
- package/scripts/session/session-init.sh +356 -0
- package/scripts/session/session-init.sh.backup +292 -0
- package/scripts/session/session-sync.sh +192 -0
- package/scripts/session/test-context-preservation.sh +160 -0
- package/scripts/session/test-critical-infrastructure.sh +293 -0
- package/scripts/session/test-experience-level.sh +336 -0
- package/scripts/session/test-session-cleanup.sh +268 -0
- package/scripts/session/test-session-sync.sh +320 -0
- package/scripts/setup-branch-protection.sh +106 -0
- package/scripts/spawn-fleet.sh +144 -0
- package/scripts/telemetry-dashboard.sh +44 -0
- package/scripts/test-map-eventbus.sh +357 -0
- package/scripts/test-onboarding.sh +121 -0
- package/scripts/test-planning-loop-e2e.ts +181 -0
- package/scripts/test-server-inference.ts +49 -0
- package/scripts/test-state-sensitivity.ts +32 -0
- package/scripts/train/requirements.txt +5 -0
- package/scripts/train/train-policy-head.py +477 -0
- package/scripts/train/v2/__pycache__/dataset.cpython-314.pyc +0 -0
- package/scripts/train/v2/__pycache__/eval.cpython-314.pyc +0 -0
- package/scripts/train/v2/__pycache__/generate_data.cpython-314.pyc +0 -0
- package/scripts/train/v2/__pycache__/infer.cpython-314.pyc +0 -0
- package/scripts/train/v2/__pycache__/model.cpython-314.pyc +0 -0
- package/scripts/train/v2/__pycache__/precompute.cpython-314.pyc +0 -0
- package/scripts/train/v2/__pycache__/train.cpython-314.pyc +0 -0
- package/scripts/train/v2/__pycache__/transform_buffer.cpython-314.pyc +0 -0
- package/scripts/train/v2/__pycache__/validate_data.cpython-314.pyc +0 -0
- package/scripts/train/v2/benchmark.py +661 -0
- package/scripts/train/v2/dataset.py +81 -0
- package/scripts/train/v2/domain.json +66 -0
- package/scripts/train/v2/eval.py +196 -0
- package/scripts/train/v2/generate_balanced.py +439 -0
- package/scripts/train/v2/generate_data.py +219 -0
- package/scripts/train/v2/generate_hard_negatives.py +219 -0
- package/scripts/train/v2/infer.py +301 -0
- package/scripts/train/v2/infer_server.py +224 -0
- package/scripts/train/v2/model.py +112 -0
- package/scripts/train/v2/online_train.py +576 -0
- package/scripts/train/v2/precompute.py +150 -0
- package/scripts/train/v2/train.py +302 -0
- package/scripts/train/v2/transform_buffer.py +227 -0
- package/scripts/train/v2/validate_data.py +115 -0
- package/scripts/train-policy-head.py +434 -0
- package/scripts/vm-swarm/README.md +301 -0
- package/scripts/vm-swarm/collect-tuples.sh +331 -0
- package/scripts/vm-swarm/create-base-template.sh +339 -0
- package/scripts/vm-swarm/kill-fleet.sh +204 -0
- package/scripts/vm-swarm/monitor-fleet.sh +346 -0
- package/scripts/vm-swarm/spawn-fleet.sh +304 -0
- package/scripts/voice-start.sh +156 -0
- package/scripts/voice-stop.sh +33 -0
- package/scripts/where-am-i.sh +78 -0
- package/templates/QUICKSTART_SKILL_TO_PRODUCT.md +242 -0
- package/templates/brand/BRAND_BRIEF.md +124 -0
- package/templates/brand/BRAND_DECISIONS.md +168 -0
- package/templates/brand/BRAND_GUIDELINES.md +251 -0
- package/templates/brand/VOICE_AND_TONE.md +146 -0
- package/templates/brand/global.css +240 -0
- package/templates/collaboration/CONTRIBUTOR.md +74 -0
- package/templates/collaboration/CRM.md +97 -0
- package/templates/collaboration/TASKS.md +83 -0
- package/templates/dating/FUNNEL.md +29 -0
- package/templates/dating/REWARDS.md +24 -0
- package/templates/dating/SIGNALS.md +18 -0
- package/templates/dating/anti_patterns.md +23 -0
- package/templates/dating/connectors/index.md +16 -0
- package/templates/dating/modes.md +21 -0
- package/templates/dating/psychology.md +18 -0
- package/templates/default/README.md +19 -0
- package/templates/service-agent/.claude/settings.json +32 -0
- package/templates/service-agent/CLAUDE.md +334 -0
- package/templates/service-agent/knowledge/ARCHITECTURE.md +115 -0
- package/templates/service-agent/knowledge/DEPLOYMENT.md +199 -0
- package/templates/service-agent/knowledge/RUNBOOK.md +412 -0
- package/templates/service-agent/knowledge/SERVICE_SPEC.md +77 -0
- package/templates/service-mcp-template.js +325 -0
- package/templates/strategic/NARRATIVE.md +114 -0
- package/templates/strategic/ROADMAP.md +128 -0
- package/templates/strategic/THESIS.md +108 -0
- package/templates/strategic/VISION.md +74 -0
|
@@ -0,0 +1,684 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* JFL Session Extension
|
|
3
|
+
*
|
|
4
|
+
* Pi-native session lifecycle via Context Hub API.
|
|
5
|
+
* Calls POST /api/session/init on start and POST /api/session/end on shutdown.
|
|
6
|
+
* Hub handles sync, doctor, branch creation — single source of truth.
|
|
7
|
+
* Pi only manages the auto-commit daemon locally (needs a detached process).
|
|
8
|
+
*
|
|
9
|
+
* AGENT MODE: When JFL_AGENT_MODE=1 or --print is used (PP agent runs),
|
|
10
|
+
* skip ALL session branching. PP agents work in isolated /tmp worktrees —
|
|
11
|
+
* they must NOT touch the main repo's git state.
|
|
12
|
+
*
|
|
13
|
+
* @purpose Pi session lifecycle — Hub API for init/end, local auto-commit daemon
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { execSync, spawn, exec } from "child_process"
|
|
17
|
+
import { promisify } from "util"
|
|
18
|
+
import { existsSync, readFileSync, writeFileSync, unlinkSync, statSync } from "fs"
|
|
19
|
+
import { join } from "path"
|
|
20
|
+
import type { PiContext, JflConfig } from "./types.js"
|
|
21
|
+
import { hubUrl, authToken } from "./map-bridge.js"
|
|
22
|
+
|
|
23
|
+
const execAsync = promisify(exec)
|
|
24
|
+
|
|
25
|
+
let autoCommitProcess: ReturnType<typeof spawn> | null = null
|
|
26
|
+
let sessionBranch = ""
|
|
27
|
+
let isAgentMode = false
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Detect if we're running in agent/ephemeral mode where session branching
|
|
31
|
+
* should be completely skipped. This happens when:
|
|
32
|
+
* - JFL_AGENT_MODE=1 env var is set (PP agent runs)
|
|
33
|
+
* - PI_PRINT_MODE=1 (set by Pi core in --print mode)
|
|
34
|
+
* - Process was spawned by PP (JFL_PP_SPAWNED=1)
|
|
35
|
+
*/
|
|
36
|
+
function detectAgentMode(): boolean {
|
|
37
|
+
return (
|
|
38
|
+
process.env.JFL_AGENT_MODE === "1" ||
|
|
39
|
+
process.env.JFL_PP_SPAWNED === "1" ||
|
|
40
|
+
process.env.PI_PRINT_MODE === "1" ||
|
|
41
|
+
process.argv.includes("--print") ||
|
|
42
|
+
process.argv.includes("-p")
|
|
43
|
+
)
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Get working branch from .jfl/config.json or default to "main"
|
|
48
|
+
*/
|
|
49
|
+
function getWorkingBranch(root: string): string {
|
|
50
|
+
const configPath = join(root, ".jfl", "config.json")
|
|
51
|
+
if (existsSync(configPath)) {
|
|
52
|
+
try {
|
|
53
|
+
const cfg = JSON.parse(readFileSync(configPath, "utf-8"))
|
|
54
|
+
if (cfg.working_branch) return cfg.working_branch
|
|
55
|
+
} catch {}
|
|
56
|
+
}
|
|
57
|
+
return "main"
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Merge a stale session branch to the working branch.
|
|
62
|
+
* Called during onInit when we find ourselves on an old session branch,
|
|
63
|
+
* to prevent data loss from abandoned branches.
|
|
64
|
+
*
|
|
65
|
+
* Returns true if merge succeeded (or branch had no unique work).
|
|
66
|
+
*/
|
|
67
|
+
function mergeStaleSessionBranch(
|
|
68
|
+
root: string,
|
|
69
|
+
staleBranch: string,
|
|
70
|
+
workingBranch: string,
|
|
71
|
+
ctx: { log: (msg: string, level?: "debug" | "info" | "warn" | "error") => void; ui: { notify: (msg: string, opts?: any) => void } },
|
|
72
|
+
): boolean {
|
|
73
|
+
try {
|
|
74
|
+
// Check if the stale branch has any commits not in working branch
|
|
75
|
+
const uniqueCommits = execSync(
|
|
76
|
+
`git log --oneline "${workingBranch}".."${staleBranch}" 2>/dev/null | wc -l`,
|
|
77
|
+
{ cwd: root, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] },
|
|
78
|
+
).trim()
|
|
79
|
+
|
|
80
|
+
if (uniqueCommits === "0") {
|
|
81
|
+
// No unique work — safe to just switch away
|
|
82
|
+
ctx.log(`Stale branch ${staleBranch} has no unique commits, switching to ${workingBranch}`, "debug")
|
|
83
|
+
return true
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
ctx.log(`Stale branch ${staleBranch} has ${uniqueCommits} unique commits — merging to ${workingBranch}`, "info")
|
|
87
|
+
ctx.ui.notify(`⚠ Recovering ${uniqueCommits} commits from stale session ${staleBranch}`, { level: "warn" })
|
|
88
|
+
|
|
89
|
+
// Commit any dirty state first
|
|
90
|
+
try {
|
|
91
|
+
const status = execSync("git status --porcelain", { cwd: root, encoding: "utf-8", timeout: 5000, stdio: ["pipe", "pipe", "pipe"] }).trim()
|
|
92
|
+
if (status) {
|
|
93
|
+
execSync("git add -A && git commit -m 'auto: save before stale branch merge' --no-verify", {
|
|
94
|
+
cwd: root, timeout: 10000, stdio: ["pipe", "pipe", "pipe"],
|
|
95
|
+
})
|
|
96
|
+
}
|
|
97
|
+
} catch {}
|
|
98
|
+
|
|
99
|
+
// Switch to working branch
|
|
100
|
+
execSync(`git checkout "${workingBranch}"`, { cwd: root, timeout: 10000, stdio: ["pipe", "pipe", "pipe"] })
|
|
101
|
+
|
|
102
|
+
// Merge stale branch with auto-resolve for .jfl conflicts
|
|
103
|
+
try {
|
|
104
|
+
execSync(`git merge "${staleBranch}" --no-edit -X ours`, { cwd: root, timeout: 15000, stdio: ["pipe", "pipe", "pipe"] })
|
|
105
|
+
ctx.ui.notify(`✓ Recovered stale session ${staleBranch} → ${workingBranch}`, { level: "info" })
|
|
106
|
+
|
|
107
|
+
// Clean up the stale branch
|
|
108
|
+
try {
|
|
109
|
+
execSync(`git branch -d "${staleBranch}"`, { cwd: root, timeout: 5000, stdio: ["pipe", "pipe", "pipe"] })
|
|
110
|
+
} catch {}
|
|
111
|
+
|
|
112
|
+
return true
|
|
113
|
+
} catch (err) {
|
|
114
|
+
const msg = err instanceof Error ? err.message : String(err)
|
|
115
|
+
if (msg.includes("CONFLICT") || msg.includes("conflict")) {
|
|
116
|
+
// Abort merge, stay on working branch, leave stale branch for manual resolution
|
|
117
|
+
try { execSync("git merge --abort", { cwd: root, timeout: 5000, stdio: ["pipe", "pipe", "pipe"] }) } catch {}
|
|
118
|
+
ctx.ui.notify(`⚠ Merge conflict recovering ${staleBranch} — branch preserved for manual merge`, { level: "warn" })
|
|
119
|
+
return true // Still switch to working branch, just don't delete the old one
|
|
120
|
+
}
|
|
121
|
+
throw err
|
|
122
|
+
}
|
|
123
|
+
} catch (err) {
|
|
124
|
+
ctx.log(`Failed to merge stale branch ${staleBranch}: ${err}`, "warn")
|
|
125
|
+
return false
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Acquire a file lock for session init to prevent concurrent sessions
|
|
131
|
+
* from racing on branch creation. Returns a release function.
|
|
132
|
+
*/
|
|
133
|
+
function acquireSessionLock(root: string): () => void {
|
|
134
|
+
const lockFile = join(root, ".jfl", ".session-init.lock")
|
|
135
|
+
const maxWait = 15000
|
|
136
|
+
const start = Date.now()
|
|
137
|
+
|
|
138
|
+
// Wait for existing lock to release
|
|
139
|
+
while (existsSync(lockFile) && Date.now() - start < maxWait) {
|
|
140
|
+
try {
|
|
141
|
+
const stat = statSync(lockFile)
|
|
142
|
+
// Stale lock (older than 30s) — break it
|
|
143
|
+
if (Date.now() - stat.mtimeMs > 30000) {
|
|
144
|
+
try { unlinkSync(lockFile) } catch {}
|
|
145
|
+
break
|
|
146
|
+
}
|
|
147
|
+
} catch { break }
|
|
148
|
+
// Busy-wait (sync context, can't await)
|
|
149
|
+
execSync("sleep 0.2", { stdio: "ignore" })
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
// Acquire
|
|
153
|
+
try {
|
|
154
|
+
writeFileSync(lockFile, `${process.pid}:${Date.now()}`)
|
|
155
|
+
} catch {}
|
|
156
|
+
|
|
157
|
+
return () => { try { unlinkSync(lockFile) } catch {} }
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Create a session branch locally without the Hub.
|
|
162
|
+
* Parity with scripts/session/session-init.sh:
|
|
163
|
+
* 1. Acquire file lock to prevent concurrent session races
|
|
164
|
+
* 2. If on a stale session branch, MERGE it first (prevent data loss!)
|
|
165
|
+
* 3. Commit or stash remaining dirty state
|
|
166
|
+
* 4. Create new session branch from clean base
|
|
167
|
+
* 5. Pop stash if needed
|
|
168
|
+
* 6. Release lock
|
|
169
|
+
*/
|
|
170
|
+
function createSessionBranchLocally(root: string, ctx: { log: (msg: string, level?: "debug" | "info" | "warn" | "error") => void; ui: { notify: (msg: string, opts?: any) => void } }): string {
|
|
171
|
+
// Acquire lock to prevent concurrent session init races
|
|
172
|
+
const releaseLock = acquireSessionLock(root)
|
|
173
|
+
|
|
174
|
+
try {
|
|
175
|
+
return _createSessionBranchLocally(root, ctx)
|
|
176
|
+
} finally {
|
|
177
|
+
releaseLock()
|
|
178
|
+
}
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
function _createSessionBranchLocally(root: string, ctx: { log: (msg: string, level?: "debug" | "info" | "warn" | "error") => void; ui: { notify: (msg: string, opts?: any) => void } }): string {
|
|
182
|
+
// Generate session branch name
|
|
183
|
+
const user = (() => {
|
|
184
|
+
try {
|
|
185
|
+
return execSync("git config user.name", { cwd: root, stdio: ["pipe", "pipe", "pipe"] })
|
|
186
|
+
.toString().trim().replace(/\s+/g, "-").toLowerCase().replace(/[^a-z0-9-]/g, "").slice(0, 30) || "user"
|
|
187
|
+
} catch { return "user" }
|
|
188
|
+
})()
|
|
189
|
+
const now = new Date()
|
|
190
|
+
const dateStr = now.toISOString().slice(0, 10).replace(/-/g, "")
|
|
191
|
+
const timeStr = now.toISOString().slice(11, 16).replace(":", "")
|
|
192
|
+
const randomId = Math.random().toString(16).slice(2, 8)
|
|
193
|
+
const branchName = `session-${user}-${dateStr}-${timeStr}-${randomId}`
|
|
194
|
+
|
|
195
|
+
const workingBranch = getWorkingBranch(root)
|
|
196
|
+
|
|
197
|
+
// Step 1: If on a stale session branch, MERGE it to working branch first
|
|
198
|
+
const currentBranch = getCurrentBranch(root)
|
|
199
|
+
if (currentBranch.startsWith("session-")) {
|
|
200
|
+
ctx.log(`Found stale session branch ${currentBranch} — merging before creating new session`, "info")
|
|
201
|
+
mergeStaleSessionBranch(root, currentBranch, workingBranch, ctx)
|
|
202
|
+
// After merge, we should be on workingBranch
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
// Step 2: Commit or stash dirty state so checkout doesn't fail
|
|
206
|
+
let stashed = false
|
|
207
|
+
try {
|
|
208
|
+
const status = execSync("git status --porcelain", { cwd: root, timeout: 5000, encoding: "utf-8", stdio: ["pipe", "pipe", "pipe"] }).trim()
|
|
209
|
+
if (status) {
|
|
210
|
+
try {
|
|
211
|
+
execSync("git add -A && git commit -m 'auto: session-init save' --no-verify", { cwd: root, timeout: 10000, stdio: ["pipe", "pipe", "pipe"] })
|
|
212
|
+
} catch {
|
|
213
|
+
// Commit failed — stash instead
|
|
214
|
+
try {
|
|
215
|
+
execSync("git stash push -m 'jfl-session-init-stash' --include-untracked", { cwd: root, timeout: 10000, stdio: ["pipe", "pipe", "pipe"] })
|
|
216
|
+
stashed = true
|
|
217
|
+
} catch {}
|
|
218
|
+
}
|
|
219
|
+
}
|
|
220
|
+
} catch {}
|
|
221
|
+
|
|
222
|
+
// Step 3: Ensure we're on working branch before creating session branch
|
|
223
|
+
const nowBranch = getCurrentBranch(root)
|
|
224
|
+
if (nowBranch !== workingBranch) {
|
|
225
|
+
try {
|
|
226
|
+
execSync(`git checkout "${workingBranch}"`, { cwd: root, timeout: 10000, stdio: ["pipe", "pipe", "pipe"] })
|
|
227
|
+
} catch {
|
|
228
|
+
ctx.log(`Could not switch to ${workingBranch} — branching from ${nowBranch}`, "warn")
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
// Step 4: Create new session branch
|
|
233
|
+
let finalBranch = branchName
|
|
234
|
+
try {
|
|
235
|
+
execSync(`git checkout -b "${branchName}"`, { cwd: root, stdio: ["pipe", "pipe", "pipe"] })
|
|
236
|
+
ctx.ui.notify(`Session branch: ${branchName}`, { level: "info" })
|
|
237
|
+
} catch {
|
|
238
|
+
// Branch name collision — retry with longer ID
|
|
239
|
+
const fallbackId = Math.random().toString(16).slice(2, 14)
|
|
240
|
+
const fallbackBranch = `session-${user}-${dateStr}-${timeStr}-${fallbackId}`
|
|
241
|
+
try {
|
|
242
|
+
execSync(`git checkout -b "${fallbackBranch}"`, { cwd: root, stdio: ["pipe", "pipe", "pipe"] })
|
|
243
|
+
finalBranch = fallbackBranch
|
|
244
|
+
} catch {
|
|
245
|
+
// Give up — use current branch
|
|
246
|
+
finalBranch = getCurrentBranch(root)
|
|
247
|
+
ctx.log(`Could not create session branch — using ${finalBranch}`, "warn")
|
|
248
|
+
ctx.ui.notify(`Branch creation failed — using ${finalBranch}`, { level: "warn" })
|
|
249
|
+
}
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
// Step 5: Pop stash if we stashed
|
|
253
|
+
if (stashed) {
|
|
254
|
+
try {
|
|
255
|
+
execSync("git stash pop", { cwd: root, timeout: 10000, stdio: ["pipe", "pipe", "pipe"] })
|
|
256
|
+
} catch {
|
|
257
|
+
ctx.log("Could not pop stash — run 'git stash pop' manually", "warn")
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
|
|
261
|
+
// Save session info
|
|
262
|
+
try {
|
|
263
|
+
const jflDir = join(root, ".jfl")
|
|
264
|
+
writeFileSync(join(jflDir, "current-session-branch.txt"), finalBranch)
|
|
265
|
+
} catch {}
|
|
266
|
+
|
|
267
|
+
return finalBranch
|
|
268
|
+
}
|
|
269
|
+
|
|
270
|
+
function findScript(root: string, scriptName: string): string | null {
|
|
271
|
+
const candidates = [
|
|
272
|
+
join(root, "scripts", "session", scriptName),
|
|
273
|
+
join(root, "scripts", scriptName),
|
|
274
|
+
]
|
|
275
|
+
for (const candidate of candidates) {
|
|
276
|
+
if (existsSync(candidate)) return candidate
|
|
277
|
+
}
|
|
278
|
+
return null
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
export async function setupSession(ctx: PiContext, _config: JflConfig): Promise<void> {
|
|
282
|
+
const root = ctx.session.projectRoot
|
|
283
|
+
|
|
284
|
+
// ── Agent mode detection ─────────────────────────────────────────────
|
|
285
|
+
// PP agents work in isolated /tmp worktrees. They must NOT create session
|
|
286
|
+
// branches or do any git operations in the main repo.
|
|
287
|
+
isAgentMode = detectAgentMode()
|
|
288
|
+
if (isAgentMode) {
|
|
289
|
+
sessionBranch = getCurrentBranch(root)
|
|
290
|
+
ctx.log(`Agent mode detected — skipping session branching (on ${sessionBranch})`, "info")
|
|
291
|
+
return
|
|
292
|
+
}
|
|
293
|
+
|
|
294
|
+
// ── Delegate to session-init.sh ──────────────────────────────────────
|
|
295
|
+
// The shell script is the source of truth for session initialization.
|
|
296
|
+
// It handles: sync, doctor, crash recovery, concurrent session detection,
|
|
297
|
+
// worktree creation (when multiple sessions), direct branch mode (single
|
|
298
|
+
// session), and auto-commit startup. We parse its output for the branch
|
|
299
|
+
// name and worktree path.
|
|
300
|
+
const sessionInitScript = findScript(root, "session-init.sh")
|
|
301
|
+
|
|
302
|
+
if (sessionInitScript) {
|
|
303
|
+
try {
|
|
304
|
+
const output = execSync(`bash "${sessionInitScript}"`, {
|
|
305
|
+
cwd: root,
|
|
306
|
+
timeout: 60000,
|
|
307
|
+
encoding: "utf-8",
|
|
308
|
+
stdio: ["pipe", "pipe", "pipe"],
|
|
309
|
+
env: { ...process.env, JFL_REPO_DIR: root },
|
|
310
|
+
})
|
|
311
|
+
|
|
312
|
+
ctx.log(`session-init.sh output:\n${output}`, "debug")
|
|
313
|
+
|
|
314
|
+
// Parse branch from saved file (most reliable)
|
|
315
|
+
try {
|
|
316
|
+
sessionBranch = readFileSync(join(root, ".jfl", "current-session-branch.txt"), "utf-8").trim()
|
|
317
|
+
} catch {
|
|
318
|
+
// Fallback: parse from git
|
|
319
|
+
sessionBranch = getCurrentBranch(root)
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
// Check if worktree was created
|
|
323
|
+
try {
|
|
324
|
+
const worktreePath = readFileSync(join(root, ".jfl", "current-worktree.txt"), "utf-8").trim()
|
|
325
|
+
if (worktreePath && worktreePath !== "direct" && existsSync(worktreePath)) {
|
|
326
|
+
ctx.log(`Session using worktree: ${worktreePath}`, "info")
|
|
327
|
+
ctx.ui.notify(`Session in worktree: ${worktreePath}`, { level: "info" })
|
|
328
|
+
}
|
|
329
|
+
} catch {}
|
|
330
|
+
|
|
331
|
+
// Log any warnings from output
|
|
332
|
+
const lines = output.split("\n")
|
|
333
|
+
for (const line of lines) {
|
|
334
|
+
if (line.includes("⚠") || line.includes("WARNING")) {
|
|
335
|
+
ctx.log(line.trim(), "warn")
|
|
336
|
+
}
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
ctx.ui.notify(`Session branch: ${sessionBranch}`, { level: "info" })
|
|
340
|
+
} catch (err) {
|
|
341
|
+
const msg = err instanceof Error ? err.message : String(err)
|
|
342
|
+
ctx.log(`session-init.sh failed: ${msg}`, "warn")
|
|
343
|
+
ctx.ui.notify(`Session init script failed — falling back to local branch`, { level: "warn" })
|
|
344
|
+
|
|
345
|
+
// Fallback: create branch locally (old behavior)
|
|
346
|
+
sessionBranch = createSessionBranchLocally(root, ctx)
|
|
347
|
+
}
|
|
348
|
+
} else {
|
|
349
|
+
// No session-init.sh found — use Hub API or local fallback
|
|
350
|
+
ctx.log("No session-init.sh found — using Hub API", "debug")
|
|
351
|
+
|
|
352
|
+
try {
|
|
353
|
+
const resp = await fetch(`${hubUrl}/api/session/init`, {
|
|
354
|
+
method: "POST",
|
|
355
|
+
headers: {
|
|
356
|
+
"Content-Type": "application/json",
|
|
357
|
+
...(authToken ? { Authorization: `Bearer ${authToken}` } : {}),
|
|
358
|
+
},
|
|
359
|
+
body: JSON.stringify({ runtime: "pi" }),
|
|
360
|
+
signal: AbortSignal.timeout(30000),
|
|
361
|
+
})
|
|
362
|
+
|
|
363
|
+
if (resp.ok) {
|
|
364
|
+
const data = await resp.json() as { branch?: string; syncOk?: boolean; warnings?: string[]; doctor?: { errors: number; warnings: number } }
|
|
365
|
+
if (data.warnings?.length) {
|
|
366
|
+
for (const w of data.warnings) ctx.log(w, "warn")
|
|
367
|
+
}
|
|
368
|
+
if (data.doctor?.errors) {
|
|
369
|
+
ctx.ui.notify(`Doctor: ${data.doctor.errors} errors`, { level: "warn" })
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
const hubBranch = data.branch ?? ""
|
|
373
|
+
if (hubBranch.startsWith("session-")) {
|
|
374
|
+
sessionBranch = hubBranch
|
|
375
|
+
ctx.log(`Session init via Hub: branch=${sessionBranch}, sync=${data.syncOk}`, "debug")
|
|
376
|
+
} else {
|
|
377
|
+
ctx.log(`Hub returned non-session branch "${hubBranch}" — creating locally`, "warn")
|
|
378
|
+
sessionBranch = createSessionBranchLocally(root, ctx)
|
|
379
|
+
}
|
|
380
|
+
} else {
|
|
381
|
+
sessionBranch = createSessionBranchLocally(root, ctx)
|
|
382
|
+
}
|
|
383
|
+
} catch (err) {
|
|
384
|
+
const msg = err instanceof Error ? err.message : String(err)
|
|
385
|
+
ctx.log(`Hub unavailable: ${msg}`, "warn")
|
|
386
|
+
sessionBranch = createSessionBranchLocally(root, ctx)
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
// Ensure Hub is running (async, don't block session start)
|
|
391
|
+
try {
|
|
392
|
+
fetch(`${hubUrl}/health`, { signal: AbortSignal.timeout(3000) })
|
|
393
|
+
.catch(() => {
|
|
394
|
+
// Hub not running — try to start it
|
|
395
|
+
const hubScript = findScript(root, "context-hub-ensure.sh")
|
|
396
|
+
if (hubScript) {
|
|
397
|
+
spawn("bash", [hubScript], { cwd: root, detached: true, stdio: "ignore" }).unref()
|
|
398
|
+
}
|
|
399
|
+
})
|
|
400
|
+
} catch {}
|
|
401
|
+
|
|
402
|
+
// Start auto-commit daemon if session-init.sh didn't already
|
|
403
|
+
// (check for running process via PID file)
|
|
404
|
+
const pidFile = join(root, ".jfl", "auto-commit.pid")
|
|
405
|
+
let autoCommitRunning = false
|
|
406
|
+
if (existsSync(pidFile)) {
|
|
407
|
+
try {
|
|
408
|
+
const pid = parseInt(readFileSync(pidFile, "utf-8").trim())
|
|
409
|
+
if (pid > 0) {
|
|
410
|
+
process.kill(pid, 0) // Check if alive (throws if dead)
|
|
411
|
+
autoCommitRunning = true
|
|
412
|
+
}
|
|
413
|
+
} catch {}
|
|
414
|
+
}
|
|
415
|
+
|
|
416
|
+
if (!autoCommitRunning) {
|
|
417
|
+
const autoCommitScript = findScript(root, "auto-commit.sh")
|
|
418
|
+
if (autoCommitScript) {
|
|
419
|
+
autoCommitProcess = spawn("bash", [autoCommitScript, "start", "120"], {
|
|
420
|
+
cwd: root,
|
|
421
|
+
detached: true,
|
|
422
|
+
stdio: "ignore",
|
|
423
|
+
})
|
|
424
|
+
autoCommitProcess.unref()
|
|
425
|
+
ctx.log("Auto-commit daemon started (120s interval)", "debug")
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
ctx.emit("hook:session-start", {
|
|
430
|
+
session: ctx.session.id,
|
|
431
|
+
branch: sessionBranch,
|
|
432
|
+
projectRoot: root,
|
|
433
|
+
ts: new Date().toISOString(),
|
|
434
|
+
})
|
|
435
|
+
}
|
|
436
|
+
|
|
437
|
+
export function getSessionBranch(): string {
|
|
438
|
+
return sessionBranch
|
|
439
|
+
}
|
|
440
|
+
|
|
441
|
+
export async function pivot(ctx: PiContext, summary?: string): Promise<{
|
|
442
|
+
ok: boolean
|
|
443
|
+
pivotNumber: number
|
|
444
|
+
committed: boolean
|
|
445
|
+
commitHash: string | null
|
|
446
|
+
filesChanged: number
|
|
447
|
+
indexed: boolean
|
|
448
|
+
}> {
|
|
449
|
+
const root = ctx.session.projectRoot
|
|
450
|
+
|
|
451
|
+
try {
|
|
452
|
+
const resp = await fetch(`${hubUrl}/api/session/pivot`, {
|
|
453
|
+
method: "POST",
|
|
454
|
+
headers: {
|
|
455
|
+
"Content-Type": "application/json",
|
|
456
|
+
...(authToken ? { Authorization: `Bearer ${authToken}` } : {}),
|
|
457
|
+
},
|
|
458
|
+
body: JSON.stringify({ summary }),
|
|
459
|
+
signal: AbortSignal.timeout(30000),
|
|
460
|
+
})
|
|
461
|
+
|
|
462
|
+
if (resp.ok) {
|
|
463
|
+
const data = await resp.json() as any
|
|
464
|
+
ctx.emit("hook:session-pivot", {
|
|
465
|
+
session: ctx.session.id,
|
|
466
|
+
branch: sessionBranch,
|
|
467
|
+
pivotNumber: data.pivotNumber,
|
|
468
|
+
summary: summary || "",
|
|
469
|
+
ts: new Date().toISOString(),
|
|
470
|
+
})
|
|
471
|
+
ctx.log(`Pivot #${data.pivotNumber} via Hub`, "debug")
|
|
472
|
+
return data
|
|
473
|
+
}
|
|
474
|
+
} catch {
|
|
475
|
+
ctx.log("Hub unavailable for pivot, falling back to CLI", "debug")
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Fallback: shell out to jfl pivot
|
|
479
|
+
try {
|
|
480
|
+
const result = execSync(
|
|
481
|
+
`jfl pivot --json${summary ? ` --summary "${summary.replace(/"/g, '\\"')}"` : ""}`,
|
|
482
|
+
{ cwd: root, encoding: "utf-8", timeout: 30000, stdio: ["pipe", "pipe", "pipe"] },
|
|
483
|
+
)
|
|
484
|
+
const parsed = JSON.parse(result)
|
|
485
|
+
ctx.emit("hook:session-pivot", {
|
|
486
|
+
session: ctx.session.id,
|
|
487
|
+
branch: sessionBranch,
|
|
488
|
+
pivotNumber: parsed.pivotNumber,
|
|
489
|
+
summary: summary || "",
|
|
490
|
+
ts: new Date().toISOString(),
|
|
491
|
+
})
|
|
492
|
+
return parsed
|
|
493
|
+
} catch (err) {
|
|
494
|
+
ctx.log(`Pivot fallback failed: ${err}`, "warn")
|
|
495
|
+
return { ok: false, pivotNumber: 0, committed: false, commitHash: null, filesChanged: 0, indexed: false }
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
export async function onShutdown(ctx: PiContext): Promise<void> {
|
|
500
|
+
const root = ctx.session.projectRoot
|
|
501
|
+
const branch = getSessionBranch() || getCurrentBranch(root)
|
|
502
|
+
const t0 = Date.now()
|
|
503
|
+
|
|
504
|
+
ctx.ui.notify("Ending session…", { level: "info" })
|
|
505
|
+
|
|
506
|
+
// ── Agent mode: skip all git operations ──────────────────────────────
|
|
507
|
+
if (isAgentMode) {
|
|
508
|
+
ctx.log("Agent mode — skipping session cleanup (no branching was done)", "debug")
|
|
509
|
+
ctx.emit("hook:session-end", { session: ctx.session.id, branch, ts: new Date().toISOString() })
|
|
510
|
+
return
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
// ── PHASE 1: Fire non-blocking tasks immediately ─────────────────────
|
|
514
|
+
// These run in parallel with the sequential git ops below.
|
|
515
|
+
// Using async I/O so they actually progress while git work happens.
|
|
516
|
+
|
|
517
|
+
// 1a. Hub API end (fire-and-forget, 5s cap)
|
|
518
|
+
const hubP = fetch(`${hubUrl}/api/session/end`, {
|
|
519
|
+
method: "POST",
|
|
520
|
+
headers: {
|
|
521
|
+
"Content-Type": "application/json",
|
|
522
|
+
...(authToken ? { Authorization: `Bearer ${authToken}` } : {}),
|
|
523
|
+
},
|
|
524
|
+
body: JSON.stringify({ runtime: "pi" }),
|
|
525
|
+
signal: AbortSignal.timeout(5000),
|
|
526
|
+
}).then(() => { ctx.log("Hub session closed", "debug") })
|
|
527
|
+
.catch(() => { ctx.log("Hub session end failed", "debug") })
|
|
528
|
+
|
|
529
|
+
// 1b. Synopsis generation (read-only, safe to run during git ops)
|
|
530
|
+
const synopsisP = execAsync("jfl synopsis 4 2>/dev/null || true", { cwd: root, timeout: 10000 })
|
|
531
|
+
.then(r => r.stdout.trim())
|
|
532
|
+
.catch(() => "")
|
|
533
|
+
|
|
534
|
+
// 1c. Memory indexing (read-only index build, safe to run in parallel)
|
|
535
|
+
const memoryP = execAsync("jfl memory-index 2>/dev/null || true", { cwd: root, timeout: 15000 })
|
|
536
|
+
.then(() => { ctx.log("Memory indexed", "debug") })
|
|
537
|
+
.catch(() => { ctx.log("Memory index skipped", "debug") })
|
|
538
|
+
|
|
539
|
+
// ── PHASE 2: Sequential git ops (critical path) ─────────────────────
|
|
540
|
+
// These MUST be ordered: commit → merge → push
|
|
541
|
+
// Using async exec so parallel tasks can progress between steps.
|
|
542
|
+
|
|
543
|
+
// 2a. Journal check
|
|
544
|
+
const journalPath = join(root, ".jfl", "journal", `${branch}.jsonl`)
|
|
545
|
+
const hasJournal = existsSync(journalPath) && readFileSync(journalPath, "utf-8").trim().length > 0
|
|
546
|
+
if (!hasJournal) {
|
|
547
|
+
ctx.ui.notify(
|
|
548
|
+
"⚠️ No journal entry for this session. Context will be lost.\n" +
|
|
549
|
+
` File: .jfl/journal/${branch}.jsonl`,
|
|
550
|
+
{ level: "warn" }
|
|
551
|
+
)
|
|
552
|
+
}
|
|
553
|
+
|
|
554
|
+
// 2b. Kill auto-commit daemon
|
|
555
|
+
if (autoCommitProcess) {
|
|
556
|
+
try { autoCommitProcess.kill() } catch {}
|
|
557
|
+
autoCommitProcess = null
|
|
558
|
+
}
|
|
559
|
+
|
|
560
|
+
// 2c. Auto-commit any uncommitted changes (async — doesn't block event loop)
|
|
561
|
+
try {
|
|
562
|
+
const status = (await execAsync("git status --porcelain", { cwd: root, timeout: 3000 })).stdout.trim()
|
|
563
|
+
if (status) {
|
|
564
|
+
await execAsync("git add -A && git commit -m 'auto: session-end save' --no-verify", { cwd: root, timeout: 5000 })
|
|
565
|
+
ctx.ui.notify(" ✓ Changes saved", { level: "info" })
|
|
566
|
+
}
|
|
567
|
+
} catch {}
|
|
568
|
+
|
|
569
|
+
// 2d. Merge session branch
|
|
570
|
+
let mergeOk = false
|
|
571
|
+
let workingBranch = "main"
|
|
572
|
+
|
|
573
|
+
if (branch.startsWith("session-")) {
|
|
574
|
+
try {
|
|
575
|
+
workingBranch = getWorkingBranch(root)
|
|
576
|
+
|
|
577
|
+
// Remove stale lock files
|
|
578
|
+
const lockFile = join(root, ".git", "index.lock")
|
|
579
|
+
if (existsSync(lockFile)) {
|
|
580
|
+
try { unlinkSync(lockFile) } catch {}
|
|
581
|
+
}
|
|
582
|
+
|
|
583
|
+
// Ensure we're on our session branch
|
|
584
|
+
const currentGitBranch = getCurrentBranch(root)
|
|
585
|
+
if (currentGitBranch !== branch) {
|
|
586
|
+
try {
|
|
587
|
+
await execAsync(`git checkout "${branch}"`, { cwd: root, timeout: 10000 })
|
|
588
|
+
ctx.log(`Recovered session branch from ${currentGitBranch}`, "info")
|
|
589
|
+
} catch {
|
|
590
|
+
ctx.log(`Cannot checkout ${branch} — attempting merge anyway`, "warn")
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
|
|
594
|
+
// Commit any remaining dirty state
|
|
595
|
+
try {
|
|
596
|
+
await execAsync("git add -A && git commit -m 'session: auto-commit before merge' --no-verify", { cwd: root, timeout: 10000 })
|
|
597
|
+
} catch {} // OK if nothing to commit
|
|
598
|
+
|
|
599
|
+
// Merge session into working branch (skip session branch push — we'll push working branch after merge)
|
|
600
|
+
await execAsync(`git checkout "${workingBranch}"`, { cwd: root, timeout: 5000 })
|
|
601
|
+
await execAsync(`git merge "${branch}" --no-edit`, { cwd: root, timeout: 10000 })
|
|
602
|
+
ctx.ui.notify(` ✓ Merged → ${workingBranch}`, { level: "info" })
|
|
603
|
+
mergeOk = true
|
|
604
|
+
|
|
605
|
+
// Delete local session branch immediately (fast, no network)
|
|
606
|
+
try {
|
|
607
|
+
await execAsync(`git branch -d "${branch}"`, { cwd: root, timeout: 5000 })
|
|
608
|
+
} catch {}
|
|
609
|
+
|
|
610
|
+
} catch (err) {
|
|
611
|
+
const msg = err instanceof Error ? err.message : String(err)
|
|
612
|
+
if (msg.includes("CONFLICT") || msg.includes("conflict")) {
|
|
613
|
+
ctx.ui.notify(` ⚠ Merge conflict — branch ${branch} preserved`, { level: "warn" })
|
|
614
|
+
try { await execAsync(`git checkout "${branch}"`, { cwd: root, timeout: 5000 }) } catch {}
|
|
615
|
+
} else {
|
|
616
|
+
ctx.ui.notify(` ⚠ Merge failed: ${msg.slice(0, 100)}`, { level: "warn" })
|
|
617
|
+
try { await execAsync(`git checkout "${branch}"`, { cwd: root, timeout: 5000 }) } catch {}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
// ── PHASE 3: Parallel push + cleanup + collect ───────────────────────
|
|
623
|
+
// Push and remote cleanup are network I/O — run them in parallel with
|
|
624
|
+
// synopsis/memory collection. Single git push command does both push +
|
|
625
|
+
// remote branch delete to avoid lock contention.
|
|
626
|
+
|
|
627
|
+
const pushP = (async () => {
|
|
628
|
+
if (!mergeOk) return
|
|
629
|
+
try {
|
|
630
|
+
// Single push: update working branch AND delete remote session branch
|
|
631
|
+
// This avoids two separate network round-trips and git lock contention
|
|
632
|
+
await execAsync(
|
|
633
|
+
`git push origin "${workingBranch}" ":${branch}" 2>/dev/null || git push origin "${workingBranch}" 2>/dev/null || true`,
|
|
634
|
+
{ cwd: root, timeout: 20000 }
|
|
635
|
+
)
|
|
636
|
+
ctx.ui.notify(" ✓ Pushed & cleaned up remote", { level: "info" })
|
|
637
|
+
} catch {
|
|
638
|
+
ctx.log("Push failed — run manually: git push", "warn")
|
|
639
|
+
}
|
|
640
|
+
})()
|
|
641
|
+
|
|
642
|
+
// ── PHASE 4: Await all parallel work ─────────────────────────────────
|
|
643
|
+
const [, synopsisResult] = await Promise.allSettled([hubP, synopsisP, memoryP, pushP])
|
|
644
|
+
|
|
645
|
+
// Show synopsis if we got one
|
|
646
|
+
if (synopsisResult.status === "fulfilled" && synopsisResult.value) {
|
|
647
|
+
const lines = (synopsisResult.value as string).split("\n")
|
|
648
|
+
// Show condensed version — first 20 lines max
|
|
649
|
+
const condensed = lines.slice(0, 20).join("\n")
|
|
650
|
+
if (condensed.trim()) {
|
|
651
|
+
ctx.ui.notify(`\n${condensed}`, { level: "info" })
|
|
652
|
+
}
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
const elapsed = ((Date.now() - t0) / 1000).toFixed(1)
|
|
656
|
+
ctx.ui.notify(`✓ Session ended (${elapsed}s)`, { level: "info" })
|
|
657
|
+
|
|
658
|
+
// ── Fallback cleanup script for non-session branches ─────────────────
|
|
659
|
+
if (!branch.startsWith("session-")) {
|
|
660
|
+
const cleanupScript = findScript(root, "session-cleanup.sh")
|
|
661
|
+
if (cleanupScript) {
|
|
662
|
+
try { await execAsync(`bash "${cleanupScript}"`, { cwd: root, timeout: 10000 }) } catch {}
|
|
663
|
+
}
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
ctx.emit("hook:session-end", {
|
|
667
|
+
session: ctx.session.id,
|
|
668
|
+
branch,
|
|
669
|
+
ts: new Date().toISOString(),
|
|
670
|
+
})
|
|
671
|
+
}
|
|
672
|
+
|
|
673
|
+
export function getCurrentBranch(root: string): string {
|
|
674
|
+
try {
|
|
675
|
+
return execSync("git branch --show-current", { cwd: root }).toString().trim()
|
|
676
|
+
} catch {
|
|
677
|
+
try {
|
|
678
|
+
const saved = readFileSync(join(root, ".jfl", "current-session-branch.txt"), "utf-8").trim()
|
|
679
|
+
return saved
|
|
680
|
+
} catch {
|
|
681
|
+
return "main"
|
|
682
|
+
}
|
|
683
|
+
}
|
|
684
|
+
}
|