@0xmaxma/claude-gateway 2.0.5 → 2.0.7
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/README.md +14 -1
- package/dist/agent/builtin-commands.js +5 -5
- package/dist/agent/builtin-commands.js.map +1 -1
- package/dist/agent/command-help.d.ts +9 -0
- package/dist/agent/command-help.d.ts.map +1 -0
- package/dist/agent/command-help.js +50 -0
- package/dist/agent/command-help.js.map +1 -0
- package/dist/agent/dreaming/index.d.ts +6 -3
- package/dist/agent/dreaming/index.d.ts.map +1 -1
- package/dist/agent/dreaming/index.js +21 -1
- package/dist/agent/dreaming/index.js.map +1 -1
- package/dist/agent/knowledge/reflection.d.ts +7 -4
- package/dist/agent/knowledge/reflection.d.ts.map +1 -1
- package/dist/agent/knowledge/reflection.js +19 -1
- package/dist/agent/knowledge/reflection.js.map +1 -1
- package/dist/agent/runner.d.ts +51 -3
- package/dist/agent/runner.d.ts.map +1 -1
- package/dist/agent/runner.js +228 -107
- package/dist/agent/runner.js.map +1 -1
- package/dist/agent/session-compaction-scheduler.d.ts +22 -0
- package/dist/agent/session-compaction-scheduler.d.ts.map +1 -0
- package/dist/agent/session-compaction-scheduler.js +40 -0
- package/dist/agent/session-compaction-scheduler.js.map +1 -0
- package/dist/agent/session-confirmations.d.ts +12 -0
- package/dist/agent/session-confirmations.d.ts.map +1 -0
- package/dist/agent/session-confirmations.js +43 -0
- package/dist/agent/session-confirmations.js.map +1 -0
- package/dist/agent/session-status.d.ts +7 -0
- package/dist/agent/session-status.d.ts.map +1 -0
- package/dist/agent/session-status.js +16 -0
- package/dist/agent/session-status.js.map +1 -0
- package/dist/agent/skill-learning/index.d.ts +5 -1
- package/dist/agent/skill-learning/index.d.ts.map +1 -1
- package/dist/agent/skill-learning/index.js +23 -1
- package/dist/agent/skill-learning/index.js.map +1 -1
- package/dist/agent/skill-learning/notifier.d.ts +2 -1
- package/dist/agent/skill-learning/notifier.d.ts.map +1 -1
- package/dist/agent/skill-learning/notifier.js +1 -0
- package/dist/agent/skill-learning/notifier.js.map +1 -1
- package/dist/api/apps-router.d.ts.map +1 -1
- package/dist/api/apps-router.js +1 -3
- package/dist/api/apps-router.js.map +1 -1
- package/dist/api/cron-router.d.ts +1 -1
- package/dist/api/cron-router.d.ts.map +1 -1
- package/dist/api/cron-router.js +4 -4
- package/dist/api/cron-router.js.map +1 -1
- package/dist/api/dashboard-processes.d.ts +86 -0
- package/dist/api/dashboard-processes.d.ts.map +1 -0
- package/dist/api/dashboard-processes.js +155 -0
- package/dist/api/dashboard-processes.js.map +1 -0
- package/dist/api/dashboard-sessions.d.ts +15 -0
- package/dist/api/dashboard-sessions.d.ts.map +1 -0
- package/dist/api/dashboard-sessions.js +66 -0
- package/dist/api/dashboard-sessions.js.map +1 -0
- package/dist/api/gateway-router.d.ts +3 -4
- package/dist/api/gateway-router.d.ts.map +1 -1
- package/dist/api/gateway-router.js +177 -66
- package/dist/api/gateway-router.js.map +1 -1
- package/dist/api/memory-activity.d.ts +18 -0
- package/dist/api/memory-activity.d.ts.map +1 -0
- package/dist/api/memory-activity.js +97 -0
- package/dist/api/memory-activity.js.map +1 -0
- package/dist/api/oauth-connectors-router.d.ts +1 -1
- package/dist/api/oauth-connectors-router.d.ts.map +1 -1
- package/dist/api/oauth-connectors-router.js +11 -21
- package/dist/api/oauth-connectors-router.js.map +1 -1
- package/dist/api/router.d.ts +1 -1
- package/dist/api/router.d.ts.map +1 -1
- package/dist/api/router.js +3 -9
- package/dist/api/router.js.map +1 -1
- package/dist/api/share-router.d.ts +1 -1
- package/dist/api/share-router.d.ts.map +1 -1
- package/dist/api/share-router.js +1 -1
- package/dist/api/share-router.js.map +1 -1
- package/dist/api/slack-webhook-router.js +1 -1
- package/dist/api/slack-webhook-router.js.map +1 -1
- package/dist/api/voice-router.d.ts +1 -0
- package/dist/api/voice-router.d.ts.map +1 -1
- package/dist/api/voice-router.js +7 -0
- package/dist/api/voice-router.js.map +1 -1
- package/dist/apps/agent-container-migration.d.ts +2 -0
- package/dist/apps/agent-container-migration.d.ts.map +1 -1
- package/dist/apps/agent-container-migration.js +59 -2
- package/dist/apps/agent-container-migration.js.map +1 -1
- package/dist/apps/agent-manager.d.ts +4 -2
- package/dist/apps/agent-manager.d.ts.map +1 -1
- package/dist/apps/agent-manager.js +39 -3
- package/dist/apps/agent-manager.js.map +1 -1
- package/dist/apps/installer.d.ts +4 -3
- package/dist/apps/installer.d.ts.map +1 -1
- package/dist/apps/installer.js +8 -4
- package/dist/apps/installer.js.map +1 -1
- package/dist/build-provenance.json +8 -0
- package/dist/cli/args.js +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/commands/app.d.ts.map +1 -1
- package/dist/cli/commands/app.js +39 -3
- package/dist/cli/commands/app.js.map +1 -1
- package/dist/cli/commands/doctor.d.ts.map +1 -1
- package/dist/cli/commands/doctor.js +6 -2
- package/dist/cli/commands/doctor.js.map +1 -1
- package/dist/cli/commands/safemode.d.ts +2 -0
- package/dist/cli/commands/safemode.d.ts.map +1 -0
- package/dist/cli/commands/safemode.js +279 -0
- package/dist/cli/commands/safemode.js.map +1 -0
- package/dist/cli/dependencies.d.ts +2 -0
- package/dist/cli/dependencies.d.ts.map +1 -1
- package/dist/cli/dependencies.js +81 -0
- package/dist/cli/dependencies.js.map +1 -1
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +11 -1
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/manager.d.ts.map +1 -1
- package/dist/cli/manager.js +4 -1
- package/dist/cli/manager.js.map +1 -1
- package/dist/config/agent-lifecycle.d.ts +26 -0
- package/dist/config/agent-lifecycle.d.ts.map +1 -0
- package/dist/config/agent-lifecycle.js +63 -0
- package/dist/config/agent-lifecycle.js.map +1 -0
- package/dist/config/loader.d.ts.map +1 -1
- package/dist/config/loader.js +11 -0
- package/dist/config/loader.js.map +1 -1
- package/dist/config/reload-policy.d.ts +9 -0
- package/dist/config/reload-policy.d.ts.map +1 -0
- package/dist/config/reload-policy.js +62 -0
- package/dist/config/reload-policy.js.map +1 -0
- package/dist/config/watcher.d.ts +3 -2
- package/dist/config/watcher.d.ts.map +1 -1
- package/dist/config/watcher.js +34 -51
- package/dist/config/watcher.js.map +1 -1
- package/dist/cron/tool-schemas.d.ts +296 -0
- package/dist/cron/tool-schemas.d.ts.map +1 -0
- package/dist/cron/tool-schemas.js +122 -0
- package/dist/cron/tool-schemas.js.map +1 -0
- package/dist/index.js +141 -158
- package/dist/index.js.map +1 -1
- package/dist/orchestration/agent-tool-schemas.js +5 -5
- package/dist/orchestration/agent-tool-schemas.js.map +1 -1
- package/dist/orchestration/background-work.d.ts +9 -0
- package/dist/orchestration/background-work.d.ts.map +1 -0
- package/dist/orchestration/background-work.js +49 -0
- package/dist/orchestration/background-work.js.map +1 -0
- package/dist/orchestration/bridge.d.ts +6 -15
- package/dist/orchestration/bridge.d.ts.map +1 -1
- package/dist/orchestration/bridge.js +67 -32
- package/dist/orchestration/bridge.js.map +1 -1
- package/dist/orchestration/capabilities.d.ts.map +1 -1
- package/dist/orchestration/capabilities.js +18 -10
- package/dist/orchestration/capabilities.js.map +1 -1
- package/dist/orchestration/capacity.d.ts +3 -2
- package/dist/orchestration/capacity.d.ts.map +1 -1
- package/dist/orchestration/capacity.js +7 -0
- package/dist/orchestration/capacity.js.map +1 -1
- package/dist/orchestration/channel-controls.d.ts.map +1 -1
- package/dist/orchestration/channel-controls.js +3 -2
- package/dist/orchestration/channel-controls.js.map +1 -1
- package/dist/orchestration/cli-skills.d.ts +5 -0
- package/dist/orchestration/cli-skills.d.ts.map +1 -1
- package/dist/orchestration/compact-measurements.d.ts +21 -0
- package/dist/orchestration/compact-measurements.d.ts.map +1 -0
- package/dist/orchestration/compact-measurements.js +62 -0
- package/dist/orchestration/compact-measurements.js.map +1 -0
- package/dist/orchestration/config.d.ts +4 -0
- package/dist/orchestration/config.d.ts.map +1 -1
- package/dist/orchestration/config.js +1 -1
- package/dist/orchestration/config.js.map +1 -1
- package/dist/orchestration/container-tool-schemas.d.ts +37 -0
- package/dist/orchestration/container-tool-schemas.d.ts.map +1 -0
- package/dist/orchestration/container-tool-schemas.js +27 -0
- package/dist/orchestration/container-tool-schemas.js.map +1 -0
- package/dist/orchestration/container.d.ts.map +1 -1
- package/dist/orchestration/container.js +7 -0
- package/dist/orchestration/container.js.map +1 -1
- package/dist/orchestration/context-delivery.d.ts +32 -0
- package/dist/orchestration/context-delivery.d.ts.map +1 -0
- package/dist/orchestration/context-delivery.js +101 -0
- package/dist/orchestration/context-delivery.js.map +1 -0
- package/dist/orchestration/conversation-intake.d.ts +10 -6
- package/dist/orchestration/conversation-intake.d.ts.map +1 -1
- package/dist/orchestration/conversation-intake.js +22 -8
- package/dist/orchestration/conversation-intake.js.map +1 -1
- package/dist/orchestration/dashboard-charts.d.ts +32 -0
- package/dist/orchestration/dashboard-charts.d.ts.map +1 -0
- package/dist/orchestration/dashboard-charts.js +77 -0
- package/dist/orchestration/dashboard-charts.js.map +1 -0
- package/dist/orchestration/dashboard-reader-worker.js +28 -10
- package/dist/orchestration/dashboard-reader-worker.js.map +1 -1
- package/dist/orchestration/dashboard-reader.d.ts +1 -1
- package/dist/orchestration/dashboard-reader.d.ts.map +1 -1
- package/dist/orchestration/dashboard-reader.js +2 -2
- package/dist/orchestration/dashboard-reader.js.map +1 -1
- package/dist/orchestration/decision-context.d.ts +1 -1
- package/dist/orchestration/decision-context.d.ts.map +1 -1
- package/dist/orchestration/decision-context.js +3 -3
- package/dist/orchestration/decision-context.js.map +1 -1
- package/dist/orchestration/gateway-tasks/controller.d.ts +29 -0
- package/dist/orchestration/gateway-tasks/controller.d.ts.map +1 -0
- package/dist/orchestration/gateway-tasks/controller.js +139 -0
- package/dist/orchestration/gateway-tasks/controller.js.map +1 -0
- package/dist/orchestration/gateway-tasks/safemode.d.ts +19 -0
- package/dist/orchestration/gateway-tasks/safemode.d.ts.map +1 -0
- package/dist/orchestration/gateway-tasks/safemode.js +128 -0
- package/dist/orchestration/gateway-tasks/safemode.js.map +1 -0
- package/dist/orchestration/mutation-recovery.d.ts +3 -2
- package/dist/orchestration/mutation-recovery.d.ts.map +1 -1
- package/dist/orchestration/mutation-recovery.js +8 -0
- package/dist/orchestration/mutation-recovery.js.map +1 -1
- package/dist/orchestration/native-compact.d.ts +4 -1
- package/dist/orchestration/native-compact.d.ts.map +1 -1
- package/dist/orchestration/native-compact.js +6 -2
- package/dist/orchestration/native-compact.js.map +1 -1
- package/dist/orchestration/process-turn.d.ts +12 -2
- package/dist/orchestration/process-turn.d.ts.map +1 -1
- package/dist/orchestration/process-turn.js +48 -8
- package/dist/orchestration/process-turn.js.map +1 -1
- package/dist/orchestration/recovery.d.ts.map +1 -1
- package/dist/orchestration/recovery.js +4 -2
- package/dist/orchestration/recovery.js.map +1 -1
- package/dist/orchestration/runtime.d.ts +23 -1
- package/dist/orchestration/runtime.d.ts.map +1 -1
- package/dist/orchestration/runtime.js +191 -21
- package/dist/orchestration/runtime.js.map +1 -1
- package/dist/orchestration/session-compaction.d.ts +59 -0
- package/dist/orchestration/session-compaction.d.ts.map +1 -0
- package/dist/orchestration/session-compaction.js +212 -0
- package/dist/orchestration/session-compaction.js.map +1 -0
- package/dist/orchestration/skills.d.ts +2 -0
- package/dist/orchestration/skills.d.ts.map +1 -1
- package/dist/orchestration/skills.js +4 -3
- package/dist/orchestration/skills.js.map +1 -1
- package/dist/orchestration/task-controls.d.ts +12 -0
- package/dist/orchestration/task-controls.d.ts.map +1 -1
- package/dist/orchestration/task-controls.js +3 -1
- package/dist/orchestration/task-controls.js.map +1 -1
- package/dist/orchestration/tasks/driver.d.ts.map +1 -1
- package/dist/orchestration/tasks/driver.js +100 -13
- package/dist/orchestration/tasks/driver.js.map +1 -1
- package/dist/orchestration/tasks/pool.d.ts +2 -0
- package/dist/orchestration/tasks/pool.d.ts.map +1 -1
- package/dist/orchestration/tasks/pool.js +4 -0
- package/dist/orchestration/tasks/pool.js.map +1 -1
- package/dist/orchestration/tasks/scheduler.d.ts.map +1 -1
- package/dist/orchestration/tasks/scheduler.js +4 -0
- package/dist/orchestration/tasks/scheduler.js.map +1 -1
- package/dist/orchestration/tasks/service.d.ts +4 -0
- package/dist/orchestration/tasks/service.d.ts.map +1 -1
- package/dist/orchestration/tasks/service.js +38 -8
- package/dist/orchestration/tasks/service.js.map +1 -1
- package/dist/orchestration/token-ledger.d.ts +8 -0
- package/dist/orchestration/token-ledger.d.ts.map +1 -1
- package/dist/orchestration/token-ledger.js +7 -2
- package/dist/orchestration/token-ledger.js.map +1 -1
- package/dist/orchestration/token-usage.d.ts +3 -0
- package/dist/orchestration/token-usage.d.ts.map +1 -1
- package/dist/orchestration/token-usage.js +12 -3
- package/dist/orchestration/token-usage.js.map +1 -1
- package/dist/orchestration/types.d.ts +19 -1
- package/dist/orchestration/types.d.ts.map +1 -1
- package/dist/orchestration/types.js.map +1 -1
- package/dist/orchestration/worker-crons.d.ts +5 -0
- package/dist/orchestration/worker-crons.d.ts.map +1 -0
- package/dist/orchestration/worker-crons.js +84 -0
- package/dist/orchestration/worker-crons.js.map +1 -0
- package/dist/orchestration/worker-harness.d.ts +15 -0
- package/dist/orchestration/worker-harness.d.ts.map +1 -0
- package/dist/orchestration/worker-harness.js +72 -0
- package/dist/orchestration/worker-harness.js.map +1 -0
- package/dist/safemode/config.d.ts +7 -0
- package/dist/safemode/config.d.ts.map +1 -0
- package/dist/safemode/config.js +67 -0
- package/dist/safemode/config.js.map +1 -0
- package/dist/safemode/context.d.ts +7 -0
- package/dist/safemode/context.d.ts.map +1 -0
- package/dist/safemode/context.js +397 -0
- package/dist/safemode/context.js.map +1 -0
- package/dist/safemode/external-owners.d.ts +19 -0
- package/dist/safemode/external-owners.d.ts.map +1 -0
- package/dist/safemode/external-owners.js +229 -0
- package/dist/safemode/external-owners.js.map +1 -0
- package/dist/safemode/native.d.ts +38 -0
- package/dist/safemode/native.d.ts.map +1 -0
- package/dist/safemode/native.js +220 -0
- package/dist/safemode/native.js.map +1 -0
- package/dist/safemode/params.d.ts +10 -0
- package/dist/safemode/params.d.ts.map +1 -0
- package/dist/safemode/params.js +86 -0
- package/dist/safemode/params.js.map +1 -0
- package/dist/safemode/provenance.d.ts +45 -0
- package/dist/safemode/provenance.d.ts.map +1 -0
- package/dist/safemode/provenance.js +153 -0
- package/dist/safemode/provenance.js.map +1 -0
- package/dist/safemode/runner.d.ts +17 -0
- package/dist/safemode/runner.d.ts.map +1 -0
- package/dist/safemode/runner.js +398 -0
- package/dist/safemode/runner.js.map +1 -0
- package/dist/safemode/store.d.ts +56 -0
- package/dist/safemode/store.d.ts.map +1 -0
- package/dist/safemode/store.js +451 -0
- package/dist/safemode/store.js.map +1 -0
- package/dist/session/codex-auth.d.ts +37 -0
- package/dist/session/codex-auth.d.ts.map +1 -0
- package/dist/session/codex-auth.js +266 -0
- package/dist/session/codex-auth.js.map +1 -0
- package/dist/session/codex-container-runtime.d.ts +15 -0
- package/dist/session/codex-container-runtime.d.ts.map +1 -0
- package/dist/session/codex-container-runtime.js +85 -0
- package/dist/session/codex-container-runtime.js.map +1 -0
- package/dist/session/codex-context-defaults.json +5 -0
- package/dist/session/codex-context.d.ts +13 -0
- package/dist/session/codex-context.d.ts.map +1 -0
- package/dist/session/codex-context.js +27 -0
- package/dist/session/codex-context.js.map +1 -0
- package/dist/session/codex-extension-discovery.d.ts +21 -0
- package/dist/session/codex-extension-discovery.d.ts.map +1 -0
- package/dist/session/codex-extension-discovery.js +132 -0
- package/dist/session/codex-extension-discovery.js.map +1 -0
- package/dist/session/codex-native-mcp-client.d.ts +37 -0
- package/dist/session/codex-native-mcp-client.d.ts.map +1 -0
- package/dist/session/codex-native-mcp-client.js +164 -0
- package/dist/session/codex-native-mcp-client.js.map +1 -0
- package/dist/session/codex-policy.d.ts +6 -0
- package/dist/session/codex-policy.d.ts.map +1 -0
- package/dist/session/codex-policy.js +17 -0
- package/dist/session/codex-policy.js.map +1 -0
- package/dist/session/codex-process.d.ts +114 -0
- package/dist/session/codex-process.d.ts.map +1 -0
- package/dist/session/codex-process.js +759 -0
- package/dist/session/codex-process.js.map +1 -0
- package/dist/session/codex-runtime.d.ts +20 -0
- package/dist/session/codex-runtime.d.ts.map +1 -0
- package/dist/session/codex-runtime.js +182 -0
- package/dist/session/codex-runtime.js.map +1 -0
- package/dist/session/codex-tool-capture.d.ts +35 -0
- package/dist/session/codex-tool-capture.d.ts.map +1 -0
- package/dist/session/codex-tool-capture.js +178 -0
- package/dist/session/codex-tool-capture.js.map +1 -0
- package/dist/session/container-connectors.d.ts +10 -0
- package/dist/session/container-connectors.d.ts.map +1 -0
- package/dist/session/container-connectors.js +41 -0
- package/dist/session/container-connectors.js.map +1 -0
- package/dist/session/container-extensions.d.ts +4 -0
- package/dist/session/container-extensions.d.ts.map +1 -0
- package/dist/session/container-extensions.js +45 -0
- package/dist/session/container-extensions.js.map +1 -0
- package/dist/session/managed-connectors.d.ts +16 -0
- package/dist/session/managed-connectors.d.ts.map +1 -0
- package/dist/session/managed-connectors.js +25 -0
- package/dist/session/managed-connectors.js.map +1 -0
- package/dist/session/process-diagnostics.d.ts +14 -0
- package/dist/session/process-diagnostics.d.ts.map +1 -0
- package/dist/session/process-diagnostics.js +39 -0
- package/dist/session/process-diagnostics.js.map +1 -0
- package/dist/session/process.d.ts +4 -0
- package/dist/session/process.d.ts.map +1 -1
- package/dist/session/process.js +21 -16
- package/dist/session/process.js.map +1 -1
- package/dist/session/request-tool-capture.d.ts +1 -1
- package/dist/session/request-tool-capture.d.ts.map +1 -1
- package/dist/session/runtime-profile.d.ts +8 -0
- package/dist/session/runtime-profile.d.ts.map +1 -1
- package/dist/session/runtime-profile.js +3 -2
- package/dist/session/runtime-profile.js.map +1 -1
- package/dist/session/worker-environment.d.ts +5 -0
- package/dist/session/worker-environment.d.ts.map +1 -0
- package/dist/session/worker-environment.js +27 -0
- package/dist/session/worker-environment.js.map +1 -0
- package/dist/session/worker-extensions.d.ts +20 -0
- package/dist/session/worker-extensions.d.ts.map +1 -0
- package/dist/session/worker-extensions.js +322 -0
- package/dist/session/worker-extensions.js.map +1 -0
- package/dist/skills/loader.d.ts +2 -0
- package/dist/skills/loader.d.ts.map +1 -1
- package/dist/skills/loader.js.map +1 -1
- package/dist/types.d.ts +33 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/ui/codex-context.d.ts +4 -0
- package/dist/ui/codex-context.d.ts.map +1 -0
- package/dist/ui/codex-context.js +15 -0
- package/dist/ui/codex-context.js.map +1 -0
- package/dist/ui/dashboard-charts.d.ts +3 -0
- package/dist/ui/dashboard-charts.d.ts.map +1 -0
- package/dist/ui/dashboard-charts.js +130 -0
- package/dist/ui/dashboard-charts.js.map +1 -0
- package/dist/ui/dashboard-client.d.ts.map +1 -1
- package/dist/ui/dashboard-client.js +20 -21
- package/dist/ui/dashboard-client.js.map +1 -1
- package/dist/ui/dashboard-controls.d.ts +4 -0
- package/dist/ui/dashboard-controls.d.ts.map +1 -0
- package/dist/ui/dashboard-controls.js +27 -0
- package/dist/ui/dashboard-controls.js.map +1 -0
- package/dist/ui/dashboard-presentation.d.ts +4 -1
- package/dist/ui/dashboard-presentation.d.ts.map +1 -1
- package/dist/ui/dashboard-presentation.js +13 -7
- package/dist/ui/dashboard-presentation.js.map +1 -1
- package/dist/ui/dashboard-range.d.ts +3 -3
- package/dist/ui/dashboard-range.d.ts.map +1 -1
- package/dist/ui/dashboard-range.js +21 -5
- package/dist/ui/dashboard-range.js.map +1 -1
- package/dist/ui/dashboard-theme.d.ts +3 -1
- package/dist/ui/dashboard-theme.d.ts.map +1 -1
- package/dist/ui/dashboard-theme.js +80 -3
- package/dist/ui/dashboard-theme.js.map +1 -1
- package/dist/ui/memory-activity.d.ts +4 -0
- package/dist/ui/memory-activity.d.ts.map +1 -0
- package/dist/ui/memory-activity.js +115 -0
- package/dist/ui/memory-activity.js.map +1 -0
- package/dist/ui/token-report-client.d.ts +1 -1
- package/dist/ui/token-report-client.d.ts.map +1 -1
- package/dist/ui/token-report-client.js +1 -1
- package/dist/ui/token-report.d.ts +4 -0
- package/dist/ui/token-report.d.ts.map +1 -1
- package/dist/ui/token-report.js +38 -23
- package/dist/ui/token-report.js.map +1 -1
- package/dist/ui/web-ui.d.ts +1 -1
- package/dist/ui/web-ui.d.ts.map +1 -1
- package/dist/ui/web-ui.js +68 -370
- package/dist/ui/web-ui.js.map +1 -1
- package/mcp/capability-catalog.ts +2 -0
- package/mcp/extension-catalog.ts +18 -0
- package/mcp/lazy-connector.ts +4 -2
- package/mcp/lazy-tools.test.ts +29 -0
- package/mcp/modules.ts +1 -0
- package/mcp/server.ts +2 -2
- package/mcp/tools/cron/module.ts +8 -114
- package/mcp/tools/discord/commands.ts +4 -1
- package/mcp/tools/safemode/module.test.ts +29 -0
- package/mcp/tools/telegram/receiver-server.ts +33 -39
- package/mcp/tools/telegram/session-browser.ts +10 -0
- package/mcp/tools/telegram/task-detail.ts +2 -1
- package/package.json +3 -2
- package/scripts/orchestration/audit-codex-context.cjs +83 -0
- package/scripts/orchestration/benchmark-worker-harnesses.cjs +112 -0
- package/scripts/orchestration/smoke-codex-extensions.ts +29 -0
- package/scripts/orchestration/smoke-codex-worker.cjs +166 -0
- package/scripts/orchestration/smoke-safemode-codex.cjs +66 -0
package/dist/ui/web-ui.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.generateDashboardHtml = generateDashboardHtml;
|
|
4
4
|
exports.generateLoginHtml = generateLoginHtml;
|
|
5
|
+
const dashboard_charts_1 = require("./dashboard-charts");
|
|
6
|
+
const dashboard_controls_1 = require("./dashboard-controls");
|
|
7
|
+
const memory_activity_1 = require("./memory-activity");
|
|
5
8
|
const dashboard_range_1 = require("./dashboard-range");
|
|
6
9
|
const dashboard_theme_1 = require("./dashboard-theme");
|
|
7
10
|
const dashboard_client_1 = require("./dashboard-client");
|
|
@@ -9,7 +12,7 @@ const dashboard_client_1 = require("./dashboard-client");
|
|
|
9
12
|
* Generates a self-contained HTML dashboard page for the gateway status UI.
|
|
10
13
|
* No external dependencies except xterm.js CDN for PTY viewer.
|
|
11
14
|
*/
|
|
12
|
-
function generateDashboardHtml() {
|
|
15
|
+
function generateDashboardHtml(timezone = 'UTC') {
|
|
13
16
|
return `<!DOCTYPE html>
|
|
14
17
|
<html lang="en" data-theme="light">
|
|
15
18
|
<head>
|
|
@@ -300,48 +303,6 @@ function generateDashboardHtml() {
|
|
|
300
303
|
position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
|
|
301
304
|
color: #718096; font-size: 0.9rem; text-align: center; padding: 20px; pointer-events: none;
|
|
302
305
|
}
|
|
303
|
-
/* --- Nightly dreaming report --- */
|
|
304
|
-
.dreams-list { display: flex; flex-direction: column; gap: 12px; padding: 4px 2px 20px; }
|
|
305
|
-
.dreams-empty { color: #718096; font-size: 0.9rem; text-align: center; padding: 40px 20px; }
|
|
306
|
-
.dream-run {
|
|
307
|
-
background: #131a2b; border: 1px solid #222c40; border-radius: 8px; padding: 12px 14px;
|
|
308
|
-
}
|
|
309
|
-
.dream-run-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
|
|
310
|
-
.dream-run-head .agent { color: #63b3ed; font-weight: 600; }
|
|
311
|
-
.dream-run-head .when { color: #718096; font-size: 0.78rem; font-family: monospace; }
|
|
312
|
-
.dream-badge { border-radius: 4px; padding: 1px 7px; font-size: 0.7rem; font-weight: 600; }
|
|
313
|
-
.dream-badge.auto { background: #22543d; color: #9ae6b4; border: 1px solid #2f855a; }
|
|
314
|
-
.dream-badge.propose { background: #2a4365; color: #90cdf4; border: 1px solid #2b6cb0; }
|
|
315
|
-
.dream-badge.outcome { background: #2d3748; color: #cbd5e0; border: 1px solid #4a5568; }
|
|
316
|
-
.dream-summary { color: #cbd5e0; font-size: 0.86rem; margin: 4px 0 8px; }
|
|
317
|
-
.dream-meta { color: #718096; font-size: 0.75rem; margin-top: 8px; }
|
|
318
|
-
.dream-props { display: flex; flex-direction: column; gap: 6px; }
|
|
319
|
-
.dream-prop {
|
|
320
|
-
background: #0e1420; border: 1px solid #1e2740; border-radius: 6px; padding: 7px 9px; font-size: 0.82rem;
|
|
321
|
-
}
|
|
322
|
-
.dream-prop .op { font-weight: 600; text-transform: uppercase; font-size: 0.7rem; margin-right: 6px; }
|
|
323
|
-
.dream-prop .op.add { color: #68d391; } .dream-prop .op.replace { color: #f6ad55; } .dream-prop .op.remove { color: #fc8181; }
|
|
324
|
-
.dream-prop .file { color: #90cdf4; font-family: monospace; font-size: 0.76rem; }
|
|
325
|
-
.dream-prop .score { color: #718096; font-size: 0.72rem; float: right; }
|
|
326
|
-
.dream-prop .reason { color: #a0aec0; margin-top: 3px; }
|
|
327
|
-
.dream-prop .content { color: #cbd5e0; margin-top: 5px; white-space: pre-wrap; word-break: break-word;
|
|
328
|
-
background: #070a12; border-radius: 4px; padding: 6px 8px; font-size: 0.78rem; max-height: 140px; overflow: auto; }
|
|
329
|
-
.dream-prop .anchor { color: #f6ad55; font-family: monospace; font-size: 0.72rem; margin-top: 3px; }
|
|
330
|
-
.dream-prop.accepted { border-color: #2f855a; }
|
|
331
|
-
.dream-prop-actions { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
|
|
332
|
-
.dream-accept-btn { background: #22543d; color: #9ae6b4; border: 1px solid #2f855a; border-radius: 4px;
|
|
333
|
-
padding: 2px 10px; font-size: 0.74rem; font-weight: 600; cursor: pointer; }
|
|
334
|
-
.dream-accept-btn:hover { background: #276749; }
|
|
335
|
-
.dream-accept-btn:disabled { opacity: 0.55; cursor: default; }
|
|
336
|
-
.prop-status { font-size: 0.72rem; font-weight: 600; }
|
|
337
|
-
.prop-status.applied { color: #9ae6b4; }
|
|
338
|
-
.prop-status.applied-auto { color: #68d391; }
|
|
339
|
-
.prop-status.pending { color: #90cdf4; }
|
|
340
|
-
.prop-status.failed { color: #fc8181; }
|
|
341
|
-
.dream-accept-all { background: #22543d; color: #9ae6b4; border: 1px solid #2f855a; border-radius: 4px;
|
|
342
|
-
padding: 1px 9px; font-size: 0.7rem; font-weight: 600; cursor: pointer; }
|
|
343
|
-
.dream-accept-all:hover { background: #276749; }
|
|
344
|
-
.dream-accept-all:disabled { opacity: 0.55; cursor: default; }
|
|
345
306
|
/* Note detail — full-width card below the graph. Shows the whole file. */
|
|
346
307
|
.kb-note {
|
|
347
308
|
margin-top: 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
|
|
@@ -409,10 +370,10 @@ function generateDashboardHtml() {
|
|
|
409
370
|
${dashboard_theme_1.dashboardTheme}
|
|
410
371
|
</style>
|
|
411
372
|
${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.dataset.sidebarCollapsed=localStorage.getItem("gateway-sidebar-collapsed")==="true"?"true":"false";}catch{}</script></head>
|
|
412
|
-
<body><div class="layout"><aside class="sidebar" id="dashboard-sidebar"><div class="brand row" id="sidebar-brand" role="button" tabindex="0" aria-label="Collapse sidebar" aria-expanded="true" aria-controls="dashboard-sidebar"><div class="brandmark">✳</div><div>Claude Gateway<small>OPERATIONS CONSOLE</small></div></div><div class="navlabel">WORKSPACE</div><nav class="tabs" aria-label="Main navigation"><button class="tab active" id="tab-overview" data-view="view-overview"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 3h7v7H3zM14 3h7v4h-7zM14 11h7v10h-7zM3 14h7v7H3z"/></svg>Overview</button><button class="tab " id="tab-sessions" data-view="view-sessions"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M21 11a8 8 0 0 1-8 8H6l-4 3 1-7a8 8 0 1 1 18-4Z"/></svg>Conversations</button><button class="tab " id="tab-tasks" data-view="view-tasks"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 5h12M9 12h12M9 19h12M3 5l1 1 2-3M3 12l1 1 2-3M3 19l1 1 2-3"/></svg>Tasks</button><button class="tab " id="tab-usage" data-view="view-usage"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 20V10m8 10V4m8 16v-7"/></svg>Usage & tokens</button><button class="tab " id="tab-kb" data-view="view-kb"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 3h7v18H4zM14 3h7v18h-7zM7 7h1m9 0h1"/></svg>Knowledge base</button><button class="tab " id="tab-dreams" data-view="view-dreams"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 15A9 9 0 0 1 9 4 9 9 0 1 0 20 15Z"/></svg>Nightly dreaming</button><button class="tab " id="tab-system" data-view="view-system"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 4h18v6H3zM3 14h18v6H3zM6 7h1M6 17h1"/></svg>System</button></nav><div class="sidebarfoot"><div class="instance">Claude Gateway<br><span id="gateway-version"></span></div></div></aside><div class="main"><header class="topbar"><div class="row"><button id="dash-menu" class="mobilemenu" aria-label="Collapse sidebar" aria-expanded="true" aria-controls="dashboard-sidebar" title="Collapse sidebar"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16"/></svg></button><h1 id="dash-current-view">Overview</h1></div><div id="top-right"><span id="refresh-indicator">Connecting…</span
|
|
413
|
-
<div id="view-overview" class="view"><div class="heading" style="margin-top:24px"><div class="eyebrow">ONE WORKSPACE. EVERY CONVERSATION.</div><h1>Good work, <span class="gradient-title">in motion.</span></h1><p>Your agents, ongoing work, and what needs your attention.</p></div><div class="dash-grid" id="overview-stats"></div
|
|
414
|
-
<div class="dash-filter"><input id="dash-search" type="search" aria-label="Filter displayed sessions" placeholder="Filter this page by session, chat or model…">${(0, dashboard_range_1.rangeButtons)("dash-scope", "24h")}<select id="dash-agent-filter" aria-label="Filter agent"><option value="">All agents</option></select></div><div class="dash-pager"><span data-dash-page></span><div class="row"><button data-dash-prev disabled>← Previous</button><button data-dash-next disabled>Next →</button></div></div>
|
|
415
|
-
<div id="view-tasks" class="view" style="display:none"><h2>Tasks
|
|
373
|
+
<body><div class="layout"><aside class="sidebar" id="dashboard-sidebar"><div class="brand row" id="sidebar-brand" role="button" tabindex="0" aria-label="Collapse sidebar" aria-expanded="true" aria-controls="dashboard-sidebar"><div class="brandmark" aria-hidden="true">✳</div><div>Claude Gateway<small>OPERATIONS CONSOLE</small></div></div><div class="navlabel">WORKSPACE</div><nav class="tabs" aria-label="Main navigation"><button class="tab active" id="tab-overview" data-view="view-overview"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 3h7v7H3zM14 3h7v4h-7zM14 11h7v10h-7zM3 14h7v7H3z"/></svg>Overview</button><button class="tab " id="tab-sessions" data-view="view-sessions"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M21 11a8 8 0 0 1-8 8H6l-4 3 1-7a8 8 0 1 1 18-4Z"/></svg>Conversations</button><button class="tab " id="tab-tasks" data-view="view-tasks"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M9 5h12M9 12h12M9 19h12M3 5l1 1 2-3M3 12l1 1 2-3M3 19l1 1 2-3"/></svg>Tasks</button><button class="tab " id="tab-usage" data-view="view-usage"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 20V10m8 10V4m8 16v-7"/></svg>Usage & tokens</button><button class="tab " id="tab-kb" data-view="view-kb"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M4 3h7v18H4zM14 3h7v18h-7zM7 7h1m9 0h1"/></svg>Knowledge base</button><button class="tab " id="tab-dreams" data-view="view-dreams"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M20 15A9 9 0 0 1 9 4 9 9 0 1 0 20 15Z"/></svg>Nightly dreaming</button><button class="tab " id="tab-system" data-view="view-system"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><path d="M3 4h18v6H3zM3 14h18v6H3zM6 7h1M6 17h1"/></svg>System</button></nav><div class="sidebarfoot"><div class="instance">Claude Gateway<br><span id="gateway-version"></span></div></div></aside><div class="main"><header class="topbar"><div class="row"><button id="dash-menu" class="mobilemenu" aria-label="Collapse sidebar" aria-expanded="true" aria-controls="dashboard-sidebar" title="Collapse sidebar"><svg class="icon" viewBox="0 0 24 24" aria-hidden="true"><rect x="3" y="4" width="18" height="16" rx="2"/><path d="M9 4v16"/></svg></button><h1 id="dash-current-view">Overview</h1></div><div id="top-right"><span id="refresh-indicator">Connecting…</span>${(0, dashboard_controls_1.themeButtonHtml)('dash-theme')}<button id="logout-btn">Logout</button></div></header><main class="shell-content"><div class="meta">Uptime: <span id="uptime">—</span> · Started: <span id="started-at">—</span> · Updated: <span id="last-updated">—</span></div>
|
|
374
|
+
<div id="view-overview" class="view"><div class="heading" style="margin-top:24px"><div class="eyebrow">ONE WORKSPACE. EVERY CONVERSATION.</div><h1>Good work, <span class="gradient-title">in motion.</span></h1><p>Your agents, ongoing work, and what needs your attention.</p></div><div class="dash-grid" id="overview-stats"></div>${(0, dashboard_charts_1.dashboardChartsHtml)(timezone)}<section class="dash-panel" id="overview-attention-panel" hidden><h2>Needs your attention</h2><p class="live-note">Inspect the task here, then reply to your agent in the original chat.</p><div class="dash-mini-list" id="overview-attention"></div></section><section class="dash-panel"><h2>Agents</h2><div class="agents-bar" id="agents-bar"></div></section><section class="dash-panel"><h2>Active & recent work</h2><div id="overview-tasks"></div></section></div>
|
|
375
|
+
<div class="dash-filter turn-filters"><input id="dash-search" type="search" aria-label="Filter displayed sessions" placeholder="Filter this page by session, chat or model…">${(0, dashboard_range_1.rangeButtons)("dash-scope", "24h", timezone)}<select id="dash-agent-filter" aria-label="Filter agent"><option value="">All agents</option></select></div><div class="dash-pager"><span data-dash-page></span><div class="row"><button data-dash-prev disabled>← Previous</button><button data-dash-next disabled>Next →</button></div></div>
|
|
376
|
+
<div id="view-tasks" class="view" style="display:none"><h2>Tasks</h2><p id="tasks-scope" class="live-note"></p><div id="task-results"></div></div><div id="view-usage" class="view" style="display:none"><h2>Usage & tokens</h2><p class="live-note">Session totals include every recorded attempt, including retries. Missing measurements are shown as —. Open a report for input, cache write, cache read, output and per-turn details.</p><div id="usage-results"></div></div>
|
|
416
377
|
<div id="view-system" class="view" style="display:none">
|
|
417
378
|
<h2>Processes</h2>
|
|
418
379
|
<div class="proc-tree" id="proc-tree">Loading...</div>
|
|
@@ -478,15 +439,7 @@ ${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.datas
|
|
|
478
439
|
|
|
479
440
|
<!-- Nightly dreaming — the memory-consolidation audit trail (.dreaming/) per agent. -->
|
|
480
441
|
<div id="view-dreams" class="view" style="display:none;">
|
|
481
|
-
|
|
482
|
-
<button id="dreams-refresh" title="Reload the dreaming audit trail">↻ Refresh</button>
|
|
483
|
-
<label id="dreams-agent-wrap">Agent
|
|
484
|
-
<select id="dreams-agent"><option value="">All agents</option></select>
|
|
485
|
-
</label>
|
|
486
|
-
<span id="dreams-stats"></span>
|
|
487
|
-
</div>
|
|
488
|
-
<div id="dreams-list" class="dreams-list"></div>
|
|
489
|
-
<div id="dreams-empty" class="dreams-empty" style="display:none;"></div>
|
|
442
|
+
${memory_activity_1.memoryActivityHtml}
|
|
490
443
|
</div><!-- /view-dreams -->
|
|
491
444
|
|
|
492
445
|
<div id="error-msg" class="error" style="display:none;" role="status"></div><footer class="footer">Claude Gateway · Admin dashboard</footer></main></div></div><div id="dash-drawer-back" class="dash-drawer-back"><section id="dash-drawer" class="dash-drawer" role="dialog" aria-modal="true" aria-label="Recorded session and task details" tabindex="-1"></section></div>
|
|
@@ -494,6 +447,7 @@ ${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.datas
|
|
|
494
447
|
<script src="https://cdn.jsdelivr.net/npm/@xterm/xterm@6.0.0/lib/xterm.min.js"
|
|
495
448
|
integrity="sha384-pELe6ZHtFxFcuYBq3gMkqvmnNIqUWnAYjBG5gThqQQCjWp8PJ/65MLK4lMIfEK1e" crossorigin="anonymous"></script>
|
|
496
449
|
<script>
|
|
450
|
+
const dashboardTimezone = ${JSON.stringify(timezone).replace(/</g, '\\u003c')};
|
|
497
451
|
// Auth is carried by the HttpOnly 'dash_session' cookie the browser sends
|
|
498
452
|
// automatically on every same-origin request — no token is embedded in the
|
|
499
453
|
// page (nothing for view-source/XSS to steal). If any read returns 401 the
|
|
@@ -520,7 +474,7 @@ ${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.datas
|
|
|
520
474
|
if (!ts) return '<span class="ts">—</span>';
|
|
521
475
|
try {
|
|
522
476
|
const d = new Date(ts);
|
|
523
|
-
return '<span class="ts">' + d.toLocaleString('en-US', {
|
|
477
|
+
return '<span class="ts">' + d.toLocaleString('en-US', {timeZone:dashboardTimezone,
|
|
524
478
|
year: 'numeric', month: 'numeric', day: 'numeric',
|
|
525
479
|
hour: 'numeric', minute: '2-digit', second: '2-digit', hour12: true
|
|
526
480
|
}) + '</span>';
|
|
@@ -875,11 +829,11 @@ ${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.datas
|
|
|
875
829
|
|
|
876
830
|
// Format a context-window token count compactly: 1234 -> "1.2k", 45000 -> "45k".
|
|
877
831
|
// Full value is kept in the tooltip. 0/unknown renders as a dash.
|
|
878
|
-
function toolInventory(loaded, used, contextTools) {
|
|
832
|
+
function toolInventory(loaded, used, contextTools, harness) {
|
|
879
833
|
function list(label, names) {
|
|
880
834
|
return '<div title="'+(Array.isArray(names)?escHtml(names.join(', ')||'None'):'Not recorded')+'">'+label+': '+(Array.isArray(names)?compactNumber(names.length):'—')+'</div>';
|
|
881
835
|
}
|
|
882
|
-
return list('Loaded', contextTools)+list('Used', used);
|
|
836
|
+
return list('Loaded', contextTools)+list('Used', Array.isArray(used)?used.map(name=>harness==='codex'&&name==='Bash'?'Shell':name):used);
|
|
883
837
|
}
|
|
884
838
|
|
|
885
839
|
function fmtRecordedTokens(n) {
|
|
@@ -896,8 +850,8 @@ ${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.datas
|
|
|
896
850
|
function applyDashboardSnapshot(data) {
|
|
897
851
|
document.getElementById('uptime').textContent = fmtUptime(data.uptime || 0);
|
|
898
852
|
document.getElementById('started-at').textContent = data.startedAt
|
|
899
|
-
? new Date(data.startedAt).toLocaleString() : '\\u2014';
|
|
900
|
-
document.getElementById('last-updated').textContent = new Date().toLocaleTimeString();
|
|
853
|
+
? new Date(data.startedAt).toLocaleString('en-GB',{timeZone:dashboardTimezone}) : '\\u2014';
|
|
854
|
+
document.getElementById('last-updated').textContent = new Date().toLocaleTimeString('en-GB',{timeZone:dashboardTimezone});
|
|
901
855
|
if (data.version) document.getElementById('gateway-version').textContent = 'v' + data.version;
|
|
902
856
|
document.getElementById('error-msg').style.display = 'none';
|
|
903
857
|
|
|
@@ -945,145 +899,66 @@ ${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.datas
|
|
|
945
899
|
try {
|
|
946
900
|
const res = await fetch(apiUrl('/processes'));
|
|
947
901
|
if (res.status === 401) { onUnauthorized(); return; }
|
|
948
|
-
if (!res.ok)
|
|
902
|
+
if (!res.ok) throw new Error('Process inspection unavailable (HTTP '+res.status+')');
|
|
949
903
|
const data = await res.json();
|
|
950
|
-
renderProcessTree(data.processes || [], data.numCpus || 1);
|
|
904
|
+
renderProcessTree(data.processes || [], data.numCpus || 1, data.containers || [], data.warnings || []);
|
|
951
905
|
} catch(e) {
|
|
952
906
|
document.getElementById('proc-tree').textContent = 'Error: ' + e.message;
|
|
953
907
|
}
|
|
954
908
|
}
|
|
955
909
|
|
|
956
|
-
function renderProcessTree(procs, numCpus) {
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
const
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
972
|
-
|
|
973
|
-
|
|
974
|
-
|
|
975
|
-
|
|
976
|
-
|
|
977
|
-
|
|
978
|
-
: totalMemMb.toFixed(0) + ' MB';
|
|
979
|
-
|
|
980
|
-
function cat(p) {
|
|
981
|
-
const a = p.args;
|
|
982
|
-
if (a.includes('node') && (a.includes('dist/index') || a.includes('dist/entry'))) return 'orchestrator';
|
|
983
|
-
if (a.includes('claude-pty-shell')) return 'pty';
|
|
984
|
-
if (a.includes('bun') && a.includes('mcp/server')) return 'mcp';
|
|
985
|
-
if (a.includes('bun') && a.includes('telegram') && a.includes('receiver')) return 'telegram';
|
|
986
|
-
if (a.includes('bun') && a.includes('discord') && a.includes('receiver')) return 'discord';
|
|
987
|
-
if (a.includes('--mcp-config') && (a.includes('--session-id') || a.includes('--print'))) {
|
|
988
|
-
if (a.includes('--session-id')) {
|
|
989
|
-
const parent = pidMap[p.ppid];
|
|
990
|
-
return (parent && cat(parent) === 'pty') ? 'claude-pty' : 'claude-headless';
|
|
991
|
-
}
|
|
992
|
-
return 'claude-headless';
|
|
910
|
+
function renderProcessTree(procs, numCpus, containers, warnings) {
|
|
911
|
+
const unique = Array.from(new Map(procs.map(p=>[p.pid,p])).values());
|
|
912
|
+
const memory = kb => kb >= 1048576 ? (kb/1048576).toFixed(2)+' GB' : (kb/1024).toFixed(0)+' MB';
|
|
913
|
+
const resources = rows => 'CPU '+(rows.reduce((s,p)=>s+(Number(p.cpu)||0),0)/numCpus).toFixed(1)+'% · MEM '+memory(rows.reduce((s,p)=>s+(Number(p.rssKb)||0),0));
|
|
914
|
+
const lines = ['<span class="proc-summary">∑ '+unique.length+' procs · '+resources(unique)+'</span>',
|
|
915
|
+
'<span class="ts">CPU: lifetime average, normalized across cores · MEM: summed RSS</span>',''];
|
|
916
|
+
const label = p => [p.group==='container' ? p.role : '',p.agentId,p.harness === 'codex' ? 'Codex' : p.harness === 'claude' ? 'Claude Code' : '',p.name,p.mode,p.model].filter(Boolean).map(escHtml).join(' · ');
|
|
917
|
+
function processRows(rows) {
|
|
918
|
+
const ids = new Set(rows.map(p=>p.pid));
|
|
919
|
+
const children = new Map();
|
|
920
|
+
rows.forEach(p=>{if(!children.has(p.ppid))children.set(p.ppid,[]);children.get(p.ppid).push(p);});
|
|
921
|
+
const printed = new Set();
|
|
922
|
+
function print(p,depth) {
|
|
923
|
+
if(printed.has(p.pid))return;
|
|
924
|
+
printed.add(p.pid);
|
|
925
|
+
const prefix = ' '.repeat(Math.min(depth,6)+1);
|
|
926
|
+
const root = p.pid === p.rootPid;
|
|
927
|
+
lines.push(prefix+(depth?'└─ ':'')+'PID '+p.pid+(p.group==='container'?' · Container PID '+(p.containerPid||'—'):'')+' '+escHtml(p.command)+' · '+resources([p]));
|
|
928
|
+
if(root && label(p))lines.push(prefix+' '+label(p));
|
|
929
|
+
if(root && p.sessionId)lines.push(prefix+' Session '+escHtml(p.sessionId));
|
|
930
|
+
if(root && p.taskId)lines.push(prefix+' Task '+escHtml(p.taskId)+(p.title?' · '+escHtml(p.title):''));
|
|
931
|
+
(children.get(p.pid)||[]).forEach(child=>print(child,depth+1));
|
|
993
932
|
}
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
// Show full command lines (no truncation) — text wraps inside the box.
|
|
998
|
-
function full(args) {
|
|
999
|
-
return escHtml(args);
|
|
1000
|
-
}
|
|
1001
|
-
|
|
1002
|
-
function sessionId(args) {
|
|
1003
|
-
const m = args.match(/--session-id\\s+(\\S+)/);
|
|
1004
|
-
return m ? escHtml(m[1]) : '?';
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
|
-
function agentName(args) {
|
|
1008
|
-
const m = args.match(/agents\\/([^/]+)\\/workspace/);
|
|
1009
|
-
return m ? m[1] : '?';
|
|
933
|
+
rows.filter(p=>!ids.has(p.ppid)).forEach(p=>print(p,0));
|
|
934
|
+
rows.forEach(p=>print(p,0));
|
|
935
|
+
if(!rows.length)lines.push(' <span class="ts">— none —</span>');
|
|
1010
936
|
}
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
lines.push(
|
|
1015
|
-
'<span class="proc-summary">' +
|
|
1016
|
-
'\\u2211 ' + procs.length + ' procs' +
|
|
1017
|
-
' \\u00b7 CPU ' + totalCpu.toFixed(1) + '%' +
|
|
1018
|
-
' \\u00b7 MEM ' + memStr +
|
|
1019
|
-
'</span>'
|
|
1020
|
-
);
|
|
1021
|
-
lines.push('');
|
|
1022
|
-
const orchestrator = procs.find(function(p) { return cat(p) === 'orchestrator'; });
|
|
1023
|
-
const ptys = procs.filter(function(p) { return cat(p) === 'pty'; });
|
|
1024
|
-
const headless = procs.filter(function(p) { return cat(p) === 'claude-headless'; });
|
|
1025
|
-
const telegramReceivers = procs.filter(function(p) { return cat(p) === 'telegram'; });
|
|
1026
|
-
const discordReceivers = procs.filter(function(p) { return cat(p) === 'discord'; });
|
|
1027
|
-
const mcpServers = procs.filter(function(p) { return cat(p) === 'mcp'; });
|
|
1028
|
-
|
|
1029
|
-
const gatewayPids = new Set(procs.map(function(p) { return p.pid; }));
|
|
1030
|
-
const orphans = procs.filter(function(p) {
|
|
1031
|
-
const c = cat(p);
|
|
1032
|
-
return (c === 'claude-pty' || c === 'claude-headless' || c === 'pty' || c === 'mcp')
|
|
1033
|
-
&& !gatewayPids.has(p.ppid)
|
|
1034
|
-
&& p.pid !== (orchestrator && orchestrator.pid);
|
|
1035
|
-
});
|
|
1036
|
-
|
|
1037
|
-
if (orchestrator) {
|
|
1038
|
-
lines.push('<span class="proc-orchestrator">Orchestrator</span>');
|
|
1039
|
-
lines.push(' PID ' + orchestrator.pid + ' <span class="proc-orchestrator">' + full(orchestrator.args) + '</span>');
|
|
1040
|
-
lines.push('');
|
|
1041
|
-
}
|
|
1042
|
-
|
|
1043
|
-
const sessionCount = ptys.length + headless.length;
|
|
1044
|
-
lines.push('<span class="proc-label">Sessions (' + sessionCount + ')</span>');
|
|
1045
|
-
|
|
1046
|
-
ptys.forEach(function(pty) {
|
|
1047
|
-
const agent = agentName(pty.args);
|
|
1048
|
-
lines.push(' PID ' + pty.pid + ' <span class="proc-pty">wrap-shell</span> [' + agent + ']');
|
|
1049
|
-
const claudeChild = procs.find(function(p) { return p.ppid === pty.pid && cat(p) === 'claude-pty'; });
|
|
1050
|
-
if (claudeChild) {
|
|
1051
|
-
lines.push(' \\u2514\\u2500 PID ' + claudeChild.pid + ' <span class="proc-claude">claude ' + sessionId(claudeChild.args) + '</span>');
|
|
1052
|
-
const mcp = mcpServers.find(function(p) { return p.ppid === claudeChild.pid; });
|
|
1053
|
-
if (mcp) {
|
|
1054
|
-
lines.push(' \\u2514\\u2500 PID ' + mcp.pid + ' <span class="proc-mcp">mcp</span>');
|
|
1055
|
-
}
|
|
1056
|
-
}
|
|
937
|
+
[['gateway','Gateway'],['agent','Agents'],['worker','Workers']].forEach(pair=>{
|
|
938
|
+
const rows=unique.filter(p=>p.group===pair[0]);
|
|
939
|
+
lines.push('<span class="proc-label">'+pair[1]+'</span>');processRows(rows);lines.push('');
|
|
1057
940
|
});
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
const
|
|
1061
|
-
lines.push('
|
|
1062
|
-
|
|
1063
|
-
if (
|
|
1064
|
-
|
|
1065
|
-
|
|
941
|
+
lines.push('<span class="proc-label">App containers</span>');
|
|
942
|
+
containers.forEach(c=>{
|
|
943
|
+
const rows=unique.filter(p=>p.group==='container'&&p.container===c.name);
|
|
944
|
+
lines.push(' '+escHtml(c.name)+' · '+escHtml(c.state)+' · '+(c.error?'CPU — · MEM —':resources(rows)));
|
|
945
|
+
lines.push(' Agents: '+c.agentIds.map(escHtml).join(', '));
|
|
946
|
+
if(c.id)lines.push(' Container '+escHtml(c.id));
|
|
947
|
+
if(c.error)lines.push(' <span class="ts">'+escHtml(c.error)+'</span>');
|
|
948
|
+
processRows(rows);
|
|
1066
949
|
});
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
if
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
lines.push('<span class="
|
|
1078
|
-
|
|
1079
|
-
orphans.forEach(function(p) {
|
|
1080
|
-
lines.push(' \\u26a0 PID ' + p.pid + ' <span class="proc-orphan">' + full(p.args) + '</span>');
|
|
1081
|
-
});
|
|
1082
|
-
} else {
|
|
1083
|
-
lines.push(' <span class="ts">none \\u2705</span>');
|
|
1084
|
-
}
|
|
1085
|
-
|
|
1086
|
-
document.getElementById('proc-tree').innerHTML = lines.join('\\n');
|
|
950
|
+
if(!containers.length)lines.push(' <span class="ts">— none —</span>');
|
|
951
|
+
lines.push('','<span class="proc-label">Safemode</span>');
|
|
952
|
+
processRows(unique.filter(p=>p.group==='safemode'));
|
|
953
|
+
lines.push('','<span class="proc-label">Receivers</span>');
|
|
954
|
+
const receivers=unique.filter(p=>p.group==='receiver');
|
|
955
|
+
['telegram','discord'].forEach(name=>{const count=receivers.filter(p=>p.receiver===name).length;if(count)lines.push(' '+name[0].toUpperCase()+name.slice(1)+' ×'+count);});
|
|
956
|
+
if(!receivers.length)lines.push(' <span class="ts">— none —</span>');
|
|
957
|
+
lines.push('','<span class="proc-label">Orphans</span>');
|
|
958
|
+
const orphans=unique.filter(p=>p.group==='orphan');
|
|
959
|
+
if(orphans.length)processRows(orphans);else lines.push(' <span class="ts">none</span>');
|
|
960
|
+
warnings.forEach(w=>lines.push('<span class="ts">'+escHtml(w)+'</span>'));
|
|
961
|
+
document.getElementById('proc-tree').innerHTML=lines.join('\\n');
|
|
1087
962
|
}
|
|
1088
963
|
|
|
1089
964
|
// Logout — revoke the session cookie server-side, then land on the login page.
|
|
@@ -1094,6 +969,7 @@ ${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.datas
|
|
|
1094
969
|
window.location.reload();
|
|
1095
970
|
});
|
|
1096
971
|
|
|
972
|
+
${dashboard_controls_1.dashboardControlsClient}
|
|
1097
973
|
${dashboard_client_1.dashboardClient}
|
|
1098
974
|
refresh();
|
|
1099
975
|
connectDashboardStream();
|
|
@@ -1806,185 +1682,7 @@ ${dashboard_theme_1.dashboardFontLink}<script>try{document.documentElement.datas
|
|
|
1806
1682
|
})();
|
|
1807
1683
|
</script>
|
|
1808
1684
|
|
|
1809
|
-
<script id="kb-dreams">
|
|
1810
|
-
// Nightly dreaming report renderer. Fetches /knowledge/dreams (parsed audit
|
|
1811
|
-
// trail across all agents), renders a newest-first timeline with per-run
|
|
1812
|
-
// proposals, and an agent filter. All text goes through textContent (no HTML
|
|
1813
|
-
// injection). Uses the global apiUrl/onUnauthorized helpers.
|
|
1814
|
-
(function(){
|
|
1815
|
-
var listEl = document.getElementById('dreams-list');
|
|
1816
|
-
var emptyEl = document.getElementById('dreams-empty');
|
|
1817
|
-
var statsEl = document.getElementById('dreams-stats');
|
|
1818
|
-
var agentSel = document.getElementById('dreams-agent');
|
|
1819
|
-
var refreshBtn = document.getElementById('dreams-refresh');
|
|
1820
|
-
var allRuns = [];
|
|
1821
|
-
var loaded = false;
|
|
1822
|
-
// Notice to show once, after the next render (a reload overwrites statsEl,
|
|
1823
|
-
// so an accept result set directly on statsEl would be lost immediately).
|
|
1824
|
-
var pendingNotice = '';
|
|
1825
|
-
|
|
1826
|
-
function el(tag, cls, text){
|
|
1827
|
-
var e = document.createElement(tag);
|
|
1828
|
-
if (cls) e.className = cls;
|
|
1829
|
-
if (text != null) e.textContent = text;
|
|
1830
|
-
return e;
|
|
1831
|
-
}
|
|
1832
|
-
|
|
1833
|
-
// Apply one or more proposals of a run to the agent's memory via the K4
|
|
1834
|
-
// applier. indexes === null ⇒ accept every pending proposal in the run.
|
|
1835
|
-
function acceptDreams(agent, ts, indexes, btn){
|
|
1836
|
-
var origText = btn ? btn.textContent : '';
|
|
1837
|
-
if (btn){ btn.disabled = true; btn.textContent = 'Applying…'; }
|
|
1838
|
-
var payload = { agentId: agent, ts: ts };
|
|
1839
|
-
if (indexes) payload.indexes = indexes;
|
|
1840
|
-
fetch(apiUrl('/knowledge/dreams/apply'), {
|
|
1841
|
-
method: 'POST',
|
|
1842
|
-
headers: { 'Content-Type': 'application/json' },
|
|
1843
|
-
body: JSON.stringify(payload)
|
|
1844
|
-
}).then(function(res){
|
|
1845
|
-
if (res.status === 401){ onUnauthorized(); return null; }
|
|
1846
|
-
return res.json().then(function(data){ return { ok: res.ok, data: data || {} }; });
|
|
1847
|
-
}).then(function(r){
|
|
1848
|
-
if (!r) return;
|
|
1849
|
-
if (!r.ok){
|
|
1850
|
-
if (btn){ btn.disabled = false; btn.textContent = origText || 'Accept'; }
|
|
1851
|
-
statsEl.textContent = 'Apply failed: ' + (r.data.error || 'error');
|
|
1852
|
-
return;
|
|
1853
|
-
}
|
|
1854
|
-
// Reload so applied proposals show ✓ and any anchor-stale skips stay
|
|
1855
|
-
// pending; the memory files themselves were already updated on disk.
|
|
1856
|
-
// The message is stashed in pendingNotice because loadDreams → render
|
|
1857
|
-
// rewrites statsEl.
|
|
1858
|
-
pendingNotice = 'Applied ' + (r.data.applied || 0)
|
|
1859
|
-
+ (r.data.skipped ? ', skipped ' + r.data.skipped + ' (anchor changed / net-negative)' : '')
|
|
1860
|
-
+ (r.data.alreadyAccepted ? ', ' + r.data.alreadyAccepted + ' already applied' : '');
|
|
1861
|
-
loadDreams(true);
|
|
1862
|
-
}).catch(function(e){
|
|
1863
|
-
if (btn){ btn.disabled = false; btn.textContent = origText || 'Accept'; }
|
|
1864
|
-
statsEl.textContent = 'Apply error: ' + e.message;
|
|
1865
|
-
});
|
|
1866
|
-
}
|
|
1867
|
-
|
|
1868
|
-
function renderRun(run){
|
|
1869
|
-
var box = el('div', 'dream-run');
|
|
1870
|
-
var head = el('div', 'dream-run-head');
|
|
1871
|
-
if (run.agent) { var agentEl=el('span'); agentEl.innerHTML=agentBadge(run.agent); head.appendChild(agentEl); }
|
|
1872
|
-
var modeCls = run.mode === 'auto' ? 'auto' : 'propose';
|
|
1873
|
-
head.appendChild(el('span', 'dream-badge ' + modeCls, run.mode));
|
|
1874
|
-
head.appendChild(el('span', 'dream-badge outcome', run.outcome));
|
|
1875
|
-
head.appendChild(el('span', 'when', new Date(run.iso).toLocaleString()));
|
|
1876
|
-
|
|
1877
|
-
// Pending = a propose-run proposal not yet manually accepted. Accept-all
|
|
1878
|
-
// shows only when there is something to apply.
|
|
1879
|
-
var pending = (run.proposals || []).filter(function(p){ return run.mode !== 'auto' && !p.accepted; });
|
|
1880
|
-
if (pending.length){
|
|
1881
|
-
var allBtn = el('button', 'dream-accept-all', 'Accept all (' + pending.length + ')');
|
|
1882
|
-
allBtn.title = 'Apply every pending proposal in this run to memory';
|
|
1883
|
-
allBtn.addEventListener('click', function(){
|
|
1884
|
-
acceptDreams(run.agent, run.ts, pending.map(function(p){ return p.index; }), allBtn);
|
|
1885
|
-
});
|
|
1886
|
-
head.appendChild(allBtn);
|
|
1887
|
-
}
|
|
1888
|
-
box.appendChild(head);
|
|
1889
|
-
|
|
1890
|
-
if (run.summary) box.appendChild(el('div', 'dream-summary', run.summary));
|
|
1891
|
-
|
|
1892
|
-
if (run.proposals && run.proposals.length){
|
|
1893
|
-
var props = el('div', 'dream-props');
|
|
1894
|
-
run.proposals.forEach(function(p){
|
|
1895
|
-
var pe = el('div', 'dream-prop' + (p.accepted ? ' accepted' : ''));
|
|
1896
|
-
var top = el('div');
|
|
1897
|
-
top.appendChild(el('span', 'op ' + (p.op || ''), p.op || '?'));
|
|
1898
|
-
top.appendChild(el('span', 'file', p.file || ''));
|
|
1899
|
-
top.appendChild(el('span', 'score', 'score ' + (p.score != null ? p.score : '?') + ' · recall ' + (p.recallCount != null ? p.recallCount : '?')));
|
|
1900
|
-
pe.appendChild(top);
|
|
1901
|
-
if (p.reason) pe.appendChild(el('div', 'reason', p.reason));
|
|
1902
|
-
if (p.target) pe.appendChild(el('div', 'anchor', 'anchor: ' + p.target));
|
|
1903
|
-
if (p.content) pe.appendChild(el('div', 'content', p.content));
|
|
1904
|
-
|
|
1905
|
-
// Per-proposal status + accept action.
|
|
1906
|
-
var actions = el('div', 'dream-prop-actions');
|
|
1907
|
-
if (p.accepted){
|
|
1908
|
-
actions.appendChild(el('span', 'prop-status applied', '✓ applied'));
|
|
1909
|
-
} else if (run.mode === 'auto'){
|
|
1910
|
-
actions.appendChild(el('span', 'prop-status applied-auto', '✓ applied (auto)'));
|
|
1911
|
-
} else {
|
|
1912
|
-
actions.appendChild(el('span', 'prop-status pending', 'pending'));
|
|
1913
|
-
var accBtn = el('button', 'dream-accept-btn', 'Accept');
|
|
1914
|
-
accBtn.title = 'Apply this proposal to ' + (p.file || 'memory');
|
|
1915
|
-
accBtn.addEventListener('click', function(){
|
|
1916
|
-
acceptDreams(run.agent, run.ts, [p.index], accBtn);
|
|
1917
|
-
});
|
|
1918
|
-
actions.appendChild(accBtn);
|
|
1919
|
-
}
|
|
1920
|
-
pe.appendChild(actions);
|
|
1921
|
-
props.appendChild(pe);
|
|
1922
|
-
});
|
|
1923
|
-
box.appendChild(props);
|
|
1924
|
-
}
|
|
1925
|
-
|
|
1926
|
-
var applied = (run.applied != null) ? (', applied ' + run.applied) : '';
|
|
1927
|
-
box.appendChild(el('div', 'dream-meta', 'tokens ' + compactNumber(run.tokens||0) + ' · sessions ' + compactNumber(run.sessions||0) + applied));
|
|
1928
|
-
return box;
|
|
1929
|
-
}
|
|
1930
|
-
|
|
1931
|
-
function render(){
|
|
1932
|
-
var filter = agentSel ? agentSel.value : '';
|
|
1933
|
-
var runs = filter ? allRuns.filter(function(r){ return r.agent === filter; }) : allRuns;
|
|
1934
|
-
runs=runs.filter(function(r){return Date.parse(r.iso)>=dashboardSince(dashboardScope);}).sort(function(a,b){return Date.parse(b.iso)-Date.parse(a.iso);});
|
|
1935
|
-
listEl.textContent = '';
|
|
1936
|
-
if (!runs.length){
|
|
1937
|
-
emptyEl.textContent = allRuns.length ? 'No dream runs for this agent.' : 'No dream runs yet. The nightly dreaming pass writes here after it first runs (auto or propose mode).';
|
|
1938
|
-
emptyEl.style.display = '';
|
|
1939
|
-
statsEl.textContent = '';
|
|
1940
|
-
return;
|
|
1941
|
-
}
|
|
1942
|
-
emptyEl.style.display = 'none';
|
|
1943
|
-
var pendingTotal = 0;
|
|
1944
|
-
runs.forEach(function(r){
|
|
1945
|
-
if (r.mode === 'auto') return;
|
|
1946
|
-
(r.proposals || []).forEach(function(p){ if (!p.accepted) pendingTotal++; });
|
|
1947
|
-
});
|
|
1948
|
-
statsEl.textContent = compactNumber(runs.length) + ' run' + (runs.length === 1 ? '' : 's')
|
|
1949
|
-
+ (pendingTotal ? ' · ' + compactNumber(pendingTotal) + ' pending' : '');
|
|
1950
|
-
if (pendingNotice){
|
|
1951
|
-
statsEl.textContent += ' — ' + pendingNotice;
|
|
1952
|
-
pendingNotice = '';
|
|
1953
|
-
}
|
|
1954
|
-
runs.forEach(function(r){ listEl.appendChild(renderRun(r)); });
|
|
1955
|
-
}
|
|
1956
|
-
|
|
1957
|
-
function loadDreams(force){
|
|
1958
|
-
if (loaded && !force) return;
|
|
1959
|
-
loaded = true;
|
|
1960
|
-
statsEl.textContent = 'Loading…';
|
|
1961
|
-
fetch(apiUrl('/knowledge/dreams'), { headers: { 'Accept': 'application/json' } }).then(function(res){
|
|
1962
|
-
if (res.status === 401) { onUnauthorized(); return null; }
|
|
1963
|
-
if (!res.ok) throw new Error('HTTP ' + res.status);
|
|
1964
|
-
return res.json();
|
|
1965
|
-
}).then(function(data){
|
|
1966
|
-
if (!data) return;
|
|
1967
|
-
allRuns = data.runs || [];
|
|
1968
|
-
// Populate the agent filter, preserving the current pick.
|
|
1969
|
-
if (agentSel){
|
|
1970
|
-
var prev = agentSel.value;
|
|
1971
|
-
agentSel.textContent = '';
|
|
1972
|
-
agentSel.appendChild(el('option', null, 'All agents')); agentSel.lastChild.value = '';
|
|
1973
|
-
(data.agents || []).forEach(function(a){ var o = el('option', null, a); o.value = a; agentSel.appendChild(o); });
|
|
1974
|
-
agentSel.value = prev; if (agentSel.value !== prev) agentSel.value = '';
|
|
1975
|
-
}
|
|
1976
|
-
render();
|
|
1977
|
-
}).catch(function(err){
|
|
1978
|
-
statsEl.textContent = ''; emptyEl.textContent = 'Failed to load dreams: ' + err.message; emptyEl.style.display = '';
|
|
1979
|
-
});
|
|
1980
|
-
}
|
|
1981
|
-
|
|
1982
|
-
if (agentSel) agentSel.addEventListener('change', render);
|
|
1983
|
-
if (refreshBtn) refreshBtn.addEventListener('click', function(){ loadDreams(true); });
|
|
1984
|
-
// Exposed so the tab switcher (in the kb-graph script) can lazy-load on first open.
|
|
1985
|
-
window.__loadDreams = loadDreams;
|
|
1986
|
-
})();
|
|
1987
|
-
</script>
|
|
1685
|
+
<script id="kb-dreams">${memory_activity_1.memoryActivityClient}</script>
|
|
1988
1686
|
</body>
|
|
1989
1687
|
</html>`;
|
|
1990
1688
|
}
|
|
@@ -2046,7 +1744,7 @@ function generateLoginHtml(disabledReason = '') {
|
|
|
2046
1744
|
</style>
|
|
2047
1745
|
${dashboard_theme_1.dashboardFontLink}</head>
|
|
2048
1746
|
<body>
|
|
2049
|
-
<main class="login-layout"><section class="login-intro"><div class="brand row" style="padding:0"><div class="brandmark">✳</div>Claude Gateway</div><div><h2>Your agents.<br>Your workspace.</h2><p class="login-description">A clear view of conversations, worker activity and token usage. All in one place.</p></div><p>Orchestration · Voice · Multi-channel</p></section><section class="login-card">${bodyInner}<p class="login-caption">Admin access only. Your key is exchanged for a secure session cookie and is not saved in browser storage.</p></section></main>
|
|
1747
|
+
<main class="login-layout"><section class="login-intro"><div class="brand row" style="padding:0"><div class="brandmark" aria-hidden="true">✳</div>Claude Gateway</div><div><h2>Your agents.<br>Your workspace.</h2><p class="login-description">A clear view of conversations, worker activity and token usage. All in one place.</p></div><p>Orchestration · Voice · Multi-channel</p></section><section class="login-card">${bodyInner}<p class="login-caption">Admin access only. Your key is exchanged for a secure session cookie and is not saved in browser storage.</p></section></main>
|
|
2050
1748
|
<script>
|
|
2051
1749
|
function basePath() {
|
|
2052
1750
|
var p = window.location.pathname;
|
package/dist/ui/web-ui.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"web-ui.js","sourceRoot":"","sources":["../../src/ui/web-ui.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"web-ui.js","sourceRoot":"","sources":["../../src/ui/web-ui.ts"],"names":[],"mappings":";;AAUA,sDAyoDC;AAQD,8CA6FC;AAxvDD,yDAAyD;AACzD,6DAAgF;AAChF,uDAA6E;AAC7E,uDAAiD;AACjD,uDAAsE;AACtE,yDAAqD;AACrD;;;GAGG;AACH,SAAgB,qBAAqB,CAAC,QAAQ,GAAG,KAAK;IACpD,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAkWL,gCAAc;;EAEhB,mCAAiB;i2EAC80E,IAAA,oCAAe,EAAC,YAAY,CAAC;0UACpjE,IAAA,sCAAmB,EAAC,QAAQ,CAAC;+KACxL,IAAA,8BAAY,EAAC,YAAY,EAAC,KAAK,EAAC,QAAQ,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MAmElN,oCAAkB;;;;;;;;gCAQQ,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,SAAS,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0gB3E,4CAAuB;MACvB,kCAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAwsBM,sCAAoB;;QAEvC,CAAC;AACT,CAAC;AAED;;;;;GAKG;AACH,SAAgB,iBAAiB,CAAC,cAAc,GAAG,EAAE;IACnD,MAAM,UAAU,GAAG,cAAc;SAC9B,OAAO,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,OAAO,CAAC,IAAI,EAAE,QAAQ,CAAC,CAAC;IAC9F,+EAA+E;IAC/E,8EAA8E;IAC9E,MAAM,SAAS,GAAG,UAAU;QAC1B,CAAC,CAAC;uBACiB,UAAU,QAAQ;QACrC,CAAC,CAAC;;;;;;;YAOM,CAAC;IACX,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA+BH,gCAAc;;;EAGlB,mCAAiB;;iaAE8Y,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAwCla,CAAC;AACT,CAAC"}
|
|
@@ -27,12 +27,14 @@ const input = JSON.parse(Buffer.concat(chunks).toString());
|
|
|
27
27
|
const profileKeys = [
|
|
28
28
|
'GATEWAY_ORCHESTRATION_ROLE',
|
|
29
29
|
'GATEWAY_ORCHESTRATION_MEDIA',
|
|
30
|
+
'GATEWAY_ORCHESTRATION_CRON',
|
|
30
31
|
'GATEWAY_ORCHESTRATION_TICKET_FILE',
|
|
31
32
|
];
|
|
32
33
|
const original = profileKeys.map((key) => process.env[key]);
|
|
33
34
|
Object.assign(process.env, {
|
|
34
35
|
GATEWAY_ORCHESTRATION_ROLE: 'worker',
|
|
35
36
|
GATEWAY_ORCHESTRATION_MEDIA: 'true',
|
|
37
|
+
GATEWAY_ORCHESTRATION_CRON: 'true',
|
|
36
38
|
GATEWAY_ORCHESTRATION_TICKET_FILE: '/capability-discovery-no-execution',
|
|
37
39
|
});
|
|
38
40
|
const worker = new Set(
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// This entry is bundled for Node and evaluated only inside the selected app.
|
|
2
|
+
// Reuse the host file reader so scope/enablement/resource rules cannot drift.
|
|
3
|
+
import { readFileSync } from 'fs';
|
|
4
|
+
import { readClaudeExtensions, mergeCodexExtensions, addUnambiguousSkillAliases } from '../dist/session/worker-extensions.js';
|
|
5
|
+
|
|
6
|
+
const result = readClaudeExtensions(process.argv[1] || '/workspace', { ...process.env, HOME: process.argv[2] || process.env.HOME });
|
|
7
|
+
const native = (globalThis as any).__gatewayNativeExtensions;
|
|
8
|
+
if (native) mergeCodexExtensions(result, native);
|
|
9
|
+
for (const name of Object.keys(result.servers)) if (name.startsWith('codex_')) delete result.servers[name];
|
|
10
|
+
let size = 0;
|
|
11
|
+
for (const skill of result.skills) {
|
|
12
|
+
skill.content = readFileSync(skill.filePath, 'utf8');
|
|
13
|
+
size += Buffer.byteLength(skill.content);
|
|
14
|
+
if (size > 8 * 1024 * 1024) throw new Error('CONTAINER_EXTENSION_CATALOG_TOO_LARGE');
|
|
15
|
+
skill.fileScope = 'container';
|
|
16
|
+
}
|
|
17
|
+
addUnambiguousSkillAliases(result.skills);
|
|
18
|
+
process.stdout.write(JSON.stringify(result));
|