@a1hvdy/cc-openclaw 0.10.4 → 0.12.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/dist/src/channels/telegram/card-renderer.d.ts +63 -0
- package/dist/src/channels/telegram/card-renderer.js +149 -0
- package/dist/src/channels/telegram/card-renderer.js.map +1 -0
- package/dist/src/channels/telegram/event-reducer.js +3 -15
- package/dist/src/channels/telegram/event-reducer.js.map +1 -1
- package/dist/src/channels/telegram/format-helpers.d.ts +20 -0
- package/dist/src/channels/telegram/format-helpers.js +34 -0
- package/dist/src/channels/telegram/format-helpers.js.map +1 -0
- package/dist/src/channels/telegram/insight-formatter.d.ts +36 -0
- package/dist/src/channels/telegram/insight-formatter.js +36 -0
- package/dist/src/channels/telegram/insight-formatter.js.map +1 -0
- package/dist/src/channels/telegram/live-card.d.ts +7 -90
- package/dist/src/channels/telegram/live-card.js +25 -286
- package/dist/src/channels/telegram/live-card.js.map +1 -1
- package/dist/src/channels/telegram/logger.d.ts +10 -0
- package/dist/src/channels/telegram/logger.js +13 -0
- package/dist/src/channels/telegram/logger.js.map +1 -0
- package/dist/src/channels/telegram/result-preview.d.ts +12 -0
- package/dist/src/channels/telegram/result-preview.js +48 -0
- package/dist/src/channels/telegram/result-preview.js.map +1 -0
- package/dist/src/channels/telegram/throttle-controller.d.ts +54 -0
- package/dist/src/channels/telegram/throttle-controller.js +132 -0
- package/dist/src/channels/telegram/throttle-controller.js.map +1 -0
- package/dist/src/channels/telegram/tool-tracker.d.ts +1 -2
- package/dist/src/channels/telegram/tool-tracker.js +9 -51
- package/dist/src/channels/telegram/tool-tracker.js.map +1 -1
- package/dist/src/cli/checks/bridge-wiring.d.ts +14 -0
- package/dist/src/cli/checks/bridge-wiring.js +64 -0
- package/dist/src/cli/checks/bridge-wiring.js.map +1 -0
- package/dist/src/cli/checks/config-schema.d.ts +11 -0
- package/dist/src/cli/checks/config-schema.js +51 -0
- package/dist/src/cli/checks/config-schema.js.map +1 -0
- package/dist/src/cli/checks/critical-openclaw-json-keys.d.ts +21 -0
- package/dist/src/cli/checks/critical-openclaw-json-keys.js +106 -0
- package/dist/src/cli/checks/critical-openclaw-json-keys.js.map +1 -0
- package/dist/src/cli/checks/install-path.d.ts +11 -0
- package/dist/src/cli/checks/install-path.js +89 -0
- package/dist/src/cli/checks/install-path.js.map +1 -0
- package/dist/src/cli/checks/patch-scaffold.d.ts +17 -0
- package/dist/src/cli/checks/patch-scaffold.js +56 -0
- package/dist/src/cli/checks/patch-scaffold.js.map +1 -0
- package/dist/src/cli/doctor.d.ts +20 -0
- package/dist/src/cli/doctor.js +93 -0
- package/dist/src/cli/doctor.js.map +1 -0
- package/dist/src/cli/index.d.ts +8 -0
- package/dist/src/cli/index.js +39 -0
- package/dist/src/cli/index.js.map +1 -0
- package/dist/src/cli/migrate.d.ts +29 -0
- package/dist/src/cli/migrate.js +75 -0
- package/dist/src/cli/migrate.js.map +1 -0
- package/dist/src/command-router/cc-handler.js +35 -709
- package/dist/src/command-router/cc-handler.js.map +1 -1
- package/dist/src/command-router/launch-policy.d.ts +93 -0
- package/dist/src/command-router/launch-policy.js +323 -0
- package/dist/src/command-router/launch-policy.js.map +1 -0
- package/dist/src/command-router/resume-policy.d.ts +18 -0
- package/dist/src/command-router/resume-policy.js +236 -0
- package/dist/src/command-router/resume-policy.js.map +1 -0
- package/dist/src/command-router/turn-formatter.d.ts +19 -0
- package/dist/src/command-router/turn-formatter.js +144 -0
- package/dist/src/command-router/turn-formatter.js.map +1 -0
- package/dist/src/config/drift-detector.d.ts +28 -0
- package/dist/src/config/drift-detector.js +75 -0
- package/dist/src/config/drift-detector.js.map +1 -0
- package/dist/src/config/loader.d.ts +8 -0
- package/dist/src/config/loader.js +69 -0
- package/dist/src/config/loader.js.map +1 -0
- package/dist/src/config/schema.d.ts +188 -0
- package/dist/src/config/schema.js +98 -0
- package/dist/src/config/schema.js.map +1 -0
- package/dist/src/council/build-agent-prompt.d.ts +11 -0
- package/dist/src/council/build-agent-prompt.js +96 -0
- package/dist/src/council/build-agent-prompt.js.map +1 -0
- package/dist/src/council/cleanup-worktrees.d.ts +10 -0
- package/dist/src/council/cleanup-worktrees.js +22 -0
- package/dist/src/council/cleanup-worktrees.js.map +1 -0
- package/dist/src/council/council.js +15 -186
- package/dist/src/council/council.js.map +1 -1
- package/dist/src/council/system-prompt.d.ts +16 -0
- package/dist/src/council/system-prompt.js +40 -0
- package/dist/src/council/system-prompt.js.map +1 -0
- package/dist/src/council/write-worktree-claude-md.d.ts +10 -0
- package/dist/src/council/write-worktree-claude-md.js +41 -0
- package/dist/src/council/write-worktree-claude-md.js.map +1 -0
- package/dist/src/engines/persistent-custom-session.js +3 -8
- package/dist/src/engines/persistent-custom-session.js.map +1 -1
- package/dist/src/engines/resolve-bin.d.ts +14 -0
- package/dist/src/engines/resolve-bin.js +18 -0
- package/dist/src/engines/resolve-bin.js.map +1 -0
- package/dist/src/lib/config-service.js +8 -0
- package/dist/src/lib/config-service.js.map +1 -1
- package/dist/src/lib/debounce.d.ts +12 -0
- package/dist/src/lib/debounce.js +23 -0
- package/dist/src/lib/debounce.js.map +1 -0
- package/dist/src/lib/domain-error.d.ts +59 -0
- package/dist/src/lib/domain-error.js +79 -0
- package/dist/src/lib/domain-error.js.map +1 -0
- package/dist/src/lib/json-array.d.ts +10 -0
- package/dist/src/lib/json-array.js +23 -0
- package/dist/src/lib/json-array.js.map +1 -0
- package/dist/src/lib/safe-upstream-probes.d.ts +25 -0
- package/dist/src/lib/safe-upstream-probes.js +42 -0
- package/dist/src/lib/safe-upstream-probes.js.map +1 -0
- package/dist/src/lib/spawn-async.d.ts +18 -0
- package/dist/src/lib/spawn-async.js +47 -0
- package/dist/src/lib/spawn-async.js.map +1 -0
- package/dist/src/lib/stale-pid-files.d.ts +17 -0
- package/dist/src/lib/stale-pid-files.js +40 -0
- package/dist/src/lib/stale-pid-files.js.map +1 -0
- package/dist/src/lifecycle/boot.d.ts +59 -0
- package/dist/src/lifecycle/boot.js +132 -0
- package/dist/src/lifecycle/boot.js.map +1 -0
- package/dist/src/lifecycle/patch-manifest.d.ts +82 -0
- package/dist/src/lifecycle/patch-manifest.js +126 -0
- package/dist/src/lifecycle/patch-manifest.js.map +1 -0
- package/dist/src/lifecycle/phase-import-upstream.d.ts +12 -0
- package/dist/src/lifecycle/phase-import-upstream.js +18 -0
- package/dist/src/lifecycle/phase-import-upstream.js.map +1 -0
- package/dist/src/lifecycle/phase-install-patches.d.ts +12 -0
- package/dist/src/lifecycle/phase-install-patches.js +31 -0
- package/dist/src/lifecycle/phase-install-patches.js.map +1 -0
- package/dist/src/lifecycle/phase-schedule-jobs.d.ts +12 -0
- package/dist/src/lifecycle/phase-schedule-jobs.js +15 -0
- package/dist/src/lifecycle/phase-schedule-jobs.js.map +1 -0
- package/dist/src/lifecycle/phase-start-server.d.ts +11 -0
- package/dist/src/lifecycle/phase-start-server.js +11 -0
- package/dist/src/lifecycle/phase-start-server.js.map +1 -0
- package/dist/src/lifecycle/phase-validate-config.d.ts +9 -0
- package/dist/src/lifecycle/phase-validate-config.js +25 -0
- package/dist/src/lifecycle/phase-validate-config.js.map +1 -0
- package/dist/src/lifecycle/phase-validate-upstream.d.ts +11 -0
- package/dist/src/lifecycle/phase-validate-upstream.js +16 -0
- package/dist/src/lifecycle/phase-validate-upstream.js.map +1 -0
- package/dist/src/lifecycle/phase-wire-handlers.d.ts +12 -0
- package/dist/src/lifecycle/phase-wire-handlers.js +16 -0
- package/dist/src/lifecycle/phase-wire-handlers.js.map +1 -0
- package/dist/src/observability/event-bus.d.ts +65 -0
- package/dist/src/observability/event-bus.js +52 -0
- package/dist/src/observability/event-bus.js.map +1 -0
- package/dist/src/observability/get-event-bus.d.ts +25 -0
- package/dist/src/observability/get-event-bus.js +34 -0
- package/dist/src/observability/get-event-bus.js.map +1 -0
- package/dist/src/observability/observability-service.d.ts +19 -0
- package/dist/src/observability/observability-service.js +24 -0
- package/dist/src/observability/observability-service.js.map +1 -0
- package/dist/src/observability/subscribers/metrics.d.ts +11 -0
- package/dist/src/observability/subscribers/metrics.js +21 -0
- package/dist/src/observability/subscribers/metrics.js.map +1 -0
- package/dist/src/observability/subscribers/session-capture.d.ts +15 -0
- package/dist/src/observability/subscribers/session-capture.js +25 -0
- package/dist/src/observability/subscribers/session-capture.js.map +1 -0
- package/dist/src/openai-compat/bridges/allowlist.d.ts +19 -0
- package/dist/src/openai-compat/bridges/allowlist.js +28 -0
- package/dist/src/openai-compat/bridges/allowlist.js.map +1 -0
- package/dist/src/openai-compat/bridges/factory.d.ts +30 -0
- package/dist/src/openai-compat/bridges/factory.js +84 -0
- package/dist/src/openai-compat/bridges/factory.js.map +1 -0
- package/dist/src/openai-compat/bridges/media-bridge.d.ts +34 -0
- package/dist/src/openai-compat/bridges/media-bridge.js +20 -0
- package/dist/src/openai-compat/bridges/media-bridge.js.map +1 -0
- package/dist/src/openai-compat/bridges/openclaw-api-shim.d.ts +54 -0
- package/dist/src/openai-compat/bridges/openclaw-api-shim.js +45 -0
- package/dist/src/openai-compat/bridges/openclaw-api-shim.js.map +1 -0
- package/dist/src/openai-compat/bridges/openclaw-native-tools.d.ts +61 -0
- package/dist/src/openai-compat/bridges/openclaw-native-tools.js +171 -0
- package/dist/src/openai-compat/bridges/openclaw-native-tools.js.map +1 -0
- package/dist/src/openai-compat/bridges/openclaw-tool-registry.d.ts +26 -0
- package/dist/src/openai-compat/bridges/openclaw-tool-registry.js +38 -0
- package/dist/src/openai-compat/bridges/openclaw-tool-registry.js.map +1 -0
- package/dist/src/openai-compat/bridges/tts-media-bridge.d.ts +19 -0
- package/dist/src/openai-compat/bridges/tts-media-bridge.js +59 -0
- package/dist/src/openai-compat/bridges/tts-media-bridge.js.map +1 -0
- package/dist/src/openai-compat/openai-chunk-types.d.ts +35 -0
- package/dist/src/openai-compat/openai-chunk-types.js +9 -0
- package/dist/src/openai-compat/openai-chunk-types.js.map +1 -0
- package/dist/src/openai-compat/openai-compat.d.ts +2 -90
- package/dist/src/openai-compat/openai-compat.js +68 -68
- package/dist/src/openai-compat/openai-compat.js.map +1 -1
- package/dist/src/openai-compat/openai-types.d.ts +71 -0
- package/dist/src/openai-compat/openai-types.js +11 -0
- package/dist/src/openai-compat/openai-types.js.map +1 -0
- package/dist/src/openai-compat/parse-route-body.d.ts +24 -0
- package/dist/src/openai-compat/parse-route-body.js +45 -0
- package/dist/src/openai-compat/parse-route-body.js.map +1 -0
- package/dist/src/openai-compat/tts-rule.d.ts +20 -0
- package/dist/src/openai-compat/tts-rule.js +58 -0
- package/dist/src/openai-compat/tts-rule.js.map +1 -0
- package/dist/src/openai-compat/voice-recovery.js +0 -1
- package/dist/src/openai-compat/voice-recovery.js.map +1 -1
- package/dist/src/patches/cache-parity-registry.d.ts +20 -0
- package/dist/src/patches/cache-parity-registry.js +64 -0
- package/dist/src/patches/cache-parity-registry.js.map +1 -0
- package/dist/src/patches/claude-md-injection.d.ts +10 -0
- package/dist/src/patches/claude-md-injection.js +46 -0
- package/dist/src/patches/claude-md-injection.js.map +1 -0
- package/dist/src/patches/cwd-redirect.d.ts +10 -0
- package/dist/src/patches/cwd-redirect.js +51 -0
- package/dist/src/patches/cwd-redirect.js.map +1 -0
- package/dist/src/patches/embedded-server-route.d.ts +23 -0
- package/dist/src/patches/embedded-server-route.js +64 -0
- package/dist/src/patches/embedded-server-route.js.map +1 -0
- package/dist/src/patches/pricing-overrides.d.ts +10 -0
- package/dist/src/patches/pricing-overrides.js +55 -0
- package/dist/src/patches/pricing-overrides.js.map +1 -0
- package/dist/src/patches/resume-registry-restore.d.ts +11 -0
- package/dist/src/patches/resume-registry-restore.js +48 -0
- package/dist/src/patches/resume-registry-restore.js.map +1 -0
- package/dist/src/patches/session-pid-tracking.d.ts +10 -0
- package/dist/src/patches/session-pid-tracking.js +45 -0
- package/dist/src/patches/session-pid-tracking.js.map +1 -0
- package/dist/src/patches/sysprompt-strip.d.ts +46 -0
- package/dist/src/patches/sysprompt-strip.js +78 -0
- package/dist/src/patches/sysprompt-strip.js.map +1 -0
- package/dist/src/patches/sysprompt-strip.spec.d.ts +33 -0
- package/dist/src/patches/sysprompt-strip.spec.js +53 -0
- package/dist/src/patches/sysprompt-strip.spec.js.map +1 -0
- package/dist/src/patches/tools-restoration.d.ts +12 -0
- package/dist/src/patches/tools-restoration.js +43 -0
- package/dist/src/patches/tools-restoration.js.map +1 -0
- package/dist/src/persistence/migration-v0.d.ts +24 -0
- package/dist/src/persistence/migration-v0.js +142 -0
- package/dist/src/persistence/migration-v0.js.map +1 -0
- package/dist/src/persistence/session-registry.d.ts +57 -0
- package/dist/src/persistence/session-registry.js +58 -0
- package/dist/src/persistence/session-registry.js.map +1 -0
- package/dist/src/persistence/snapshot.d.ts +18 -0
- package/dist/src/persistence/snapshot.js +32 -0
- package/dist/src/persistence/snapshot.js.map +1 -0
- package/dist/src/persistence/wal.d.ts +17 -0
- package/dist/src/persistence/wal.js +32 -0
- package/dist/src/persistence/wal.js.map +1 -0
- package/dist/src/session/persisted-sessions.d.ts +26 -0
- package/dist/src/session/persisted-sessions.js +70 -0
- package/dist/src/session/persisted-sessions.js.map +1 -0
- package/dist/src/session/session-manager.d.ts +2 -11
- package/dist/src/session/session-manager.js +22 -66
- package/dist/src/session/session-manager.js.map +1 -1
- package/dist/src/session-bootstrap/boot-self-heal.d.ts +32 -0
- package/dist/src/session-bootstrap/boot-self-heal.js +54 -0
- package/dist/src/session-bootstrap/boot-self-heal.js.map +1 -0
- package/dist/src/session-bootstrap/cwd-patch.js +11 -87
- package/dist/src/session-bootstrap/cwd-patch.js.map +1 -1
- package/dist/src/session-bootstrap/resume-registry.d.ts +29 -0
- package/dist/src/session-bootstrap/resume-registry.js +58 -0
- package/dist/src/session-bootstrap/resume-registry.js.map +1 -0
- package/dist/src/session-bootstrap/session-hygiene.d.ts +23 -0
- package/dist/src/session-bootstrap/session-hygiene.js +41 -0
- package/dist/src/session-bootstrap/session-hygiene.js.map +1 -0
- package/dist/src/types/runtime-config.d.ts +11 -0
- package/dist/src/types/runtime-config.js +9 -0
- package/dist/src/types/runtime-config.js.map +1 -1
- package/dist/src/types/tool-bridge.d.ts +2 -1
- package/dist/src/types/tool-bridge.js +1 -0
- package/dist/src/types/tool-bridge.js.map +1 -1
- package/package.json +1 -1
- package/dist/scripts/bench/ab-harness.d.ts +0 -58
- package/dist/scripts/bench/ab-harness.d.ts.map +0 -1
- package/dist/scripts/bench/ab-harness.js +0 -78
- package/dist/scripts/bench/ab-harness.js.map +0 -1
- package/dist/src/channels/adapter.d.ts.map +0 -1
- package/dist/src/channels/telegram/completion-summary.d.ts.map +0 -1
- package/dist/src/channels/telegram/error-renderer.d.ts.map +0 -1
- package/dist/src/channels/telegram/event-reducer.d.ts.map +0 -1
- package/dist/src/channels/telegram/index.d.ts.map +0 -1
- package/dist/src/channels/telegram/injector.d.ts.map +0 -1
- package/dist/src/channels/telegram/live-card.d.ts.map +0 -1
- package/dist/src/channels/telegram/state-machine.d.ts.map +0 -1
- package/dist/src/channels/telegram/tool-tracker.d.ts.map +0 -1
- package/dist/src/command-router/cc-handler.d.ts.map +0 -1
- package/dist/src/command-router/index.d.ts.map +0 -1
- package/dist/src/constants.d.ts.map +0 -1
- package/dist/src/council/consensus.d.ts.map +0 -1
- package/dist/src/council/council.d.ts.map +0 -1
- package/dist/src/council/index.d.ts.map +0 -1
- package/dist/src/engines/base-oneshot-session.d.ts.map +0 -1
- package/dist/src/engines/index.d.ts.map +0 -1
- package/dist/src/engines/persistent-codex-session.d.ts.map +0 -1
- package/dist/src/engines/persistent-cursor-session.d.ts.map +0 -1
- package/dist/src/engines/persistent-custom-session.d.ts.map +0 -1
- package/dist/src/engines/persistent-gemini-session.d.ts.map +0 -1
- package/dist/src/engines/persistent-session.d.ts.map +0 -1
- package/dist/src/health/handler.d.ts.map +0 -1
- package/dist/src/health/index.d.ts.map +0 -1
- package/dist/src/index.d.ts.map +0 -1
- package/dist/src/lib/auto-recovery.d.ts.map +0 -1
- package/dist/src/lib/cache-parity.d.ts.map +0 -1
- package/dist/src/lib/circuit-breaker.d.ts.map +0 -1
- package/dist/src/lib/config.d.ts.map +0 -1
- package/dist/src/lib/drift-detector.d.ts.map +0 -1
- package/dist/src/lib/error-formatter.d.ts.map +0 -1
- package/dist/src/lib/heartbeat-workaround.d.ts.map +0 -1
- package/dist/src/lib/index.d.ts.map +0 -1
- package/dist/src/lib/register-guard.d.ts.map +0 -1
- package/dist/src/lib/route-flag.d.ts +0 -49
- package/dist/src/lib/route-flag.d.ts.map +0 -1
- package/dist/src/lib/route-flag.js +0 -52
- package/dist/src/lib/route-flag.js.map +0 -1
- package/dist/src/lib/sysprompt-strip.d.ts.map +0 -1
- package/dist/src/lib/telemetry.d.ts.map +0 -1
- package/dist/src/lib/test-mode.d.ts.map +0 -1
- package/dist/src/lib/vendor-paths.d.ts.map +0 -1
- package/dist/src/logger.d.ts.map +0 -1
- package/dist/src/mcp/bridge.d.ts.map +0 -1
- package/dist/src/mcp/index.d.ts.map +0 -1
- package/dist/src/models.d.ts.map +0 -1
- package/dist/src/openai-compat/cli-stream-parser.d.ts.map +0 -1
- package/dist/src/openai-compat/index.d.ts.map +0 -1
- package/dist/src/openai-compat/openai-compat.d.ts.map +0 -1
- package/dist/src/openai-compat/skill-resolver.d.ts.map +0 -1
- package/dist/src/openai-compat/sse-translator.d.ts.map +0 -1
- package/dist/src/proxy/anthropic-adapter.d.ts.map +0 -1
- package/dist/src/proxy/handler.d.ts.map +0 -1
- package/dist/src/proxy/index.d.ts.map +0 -1
- package/dist/src/proxy/schema-cleaner.d.ts.map +0 -1
- package/dist/src/proxy/thought-cache.d.ts.map +0 -1
- package/dist/src/session/embedded-server.d.ts.map +0 -1
- package/dist/src/session/inbox-manager.d.ts.map +0 -1
- package/dist/src/session/index.d.ts.map +0 -1
- package/dist/src/session/session-manager.d.ts.map +0 -1
- package/dist/src/session-bootstrap/cwd-patch.d.ts.map +0 -1
- package/dist/src/session-bootstrap/index.d.ts.map +0 -1
- package/dist/src/session-bootstrap/sysprompt-strip.d.ts.map +0 -1
- package/dist/src/session-bootstrap/think-conflict-resolver.d.ts.map +0 -1
- package/dist/src/types.d.ts.map +0 -1
- package/dist/src/validation.d.ts.map +0 -1
- package/dist/tests/_helpers/subprocess-mock.d.ts +0 -35
- package/dist/tests/_helpers/subprocess-mock.d.ts.map +0 -1
- package/dist/tests/_helpers/subprocess-mock.js +0 -136
- package/dist/tests/_helpers/subprocess-mock.js.map +0 -1
- package/dist/tests/auto-recovery.test.d.ts +0 -2
- package/dist/tests/auto-recovery.test.d.ts.map +0 -1
- package/dist/tests/auto-recovery.test.js +0 -185
- package/dist/tests/auto-recovery.test.js.map +0 -1
- package/dist/tests/bench-harness.test.d.ts +0 -2
- package/dist/tests/bench-harness.test.d.ts.map +0 -1
- package/dist/tests/bench-harness.test.js +0 -21
- package/dist/tests/bench-harness.test.js.map +0 -1
- package/dist/tests/cache-parity.test.d.ts +0 -2
- package/dist/tests/cache-parity.test.d.ts.map +0 -1
- package/dist/tests/cache-parity.test.js +0 -401
- package/dist/tests/cache-parity.test.js.map +0 -1
- package/dist/tests/command-router.test.d.ts +0 -2
- package/dist/tests/command-router.test.d.ts.map +0 -1
- package/dist/tests/command-router.test.js +0 -60
- package/dist/tests/command-router.test.js.map +0 -1
- package/dist/tests/council.test.d.ts +0 -2
- package/dist/tests/council.test.d.ts.map +0 -1
- package/dist/tests/council.test.js +0 -20
- package/dist/tests/council.test.js.map +0 -1
- package/dist/tests/drift-detector.test.d.ts +0 -2
- package/dist/tests/drift-detector.test.d.ts.map +0 -1
- package/dist/tests/drift-detector.test.js +0 -268
- package/dist/tests/drift-detector.test.js.map +0 -1
- package/dist/tests/eager-bootstrap-gating.test.d.ts +0 -9
- package/dist/tests/eager-bootstrap-gating.test.d.ts.map +0 -1
- package/dist/tests/eager-bootstrap-gating.test.js +0 -97
- package/dist/tests/eager-bootstrap-gating.test.js.map +0 -1
- package/dist/tests/engines.test.d.ts +0 -2
- package/dist/tests/engines.test.d.ts.map +0 -1
- package/dist/tests/engines.test.js +0 -8
- package/dist/tests/engines.test.js.map +0 -1
- package/dist/tests/error-formatter.test.d.ts +0 -2
- package/dist/tests/error-formatter.test.d.ts.map +0 -1
- package/dist/tests/error-formatter.test.js +0 -220
- package/dist/tests/error-formatter.test.js.map +0 -1
- package/dist/tests/health.test.d.ts +0 -2
- package/dist/tests/health.test.d.ts.map +0 -1
- package/dist/tests/health.test.js +0 -110
- package/dist/tests/health.test.js.map +0 -1
- package/dist/tests/heartbeat-workaround.test.d.ts +0 -2
- package/dist/tests/heartbeat-workaround.test.d.ts.map +0 -1
- package/dist/tests/heartbeat-workaround.test.js +0 -90
- package/dist/tests/heartbeat-workaround.test.js.map +0 -1
- package/dist/tests/index.test.d.ts +0 -2
- package/dist/tests/index.test.d.ts.map +0 -1
- package/dist/tests/index.test.js +0 -7
- package/dist/tests/index.test.js.map +0 -1
- package/dist/tests/lib-sysprompt-strip.test.d.ts +0 -2
- package/dist/tests/lib-sysprompt-strip.test.d.ts.map +0 -1
- package/dist/tests/lib-sysprompt-strip.test.js +0 -145
- package/dist/tests/lib-sysprompt-strip.test.js.map +0 -1
- package/dist/tests/listener-activation.test.d.ts +0 -2
- package/dist/tests/listener-activation.test.d.ts.map +0 -1
- package/dist/tests/listener-activation.test.js +0 -87
- package/dist/tests/listener-activation.test.js.map +0 -1
- package/dist/tests/mcp-bridge.test.d.ts +0 -2
- package/dist/tests/mcp-bridge.test.d.ts.map +0 -1
- package/dist/tests/mcp-bridge.test.js +0 -137
- package/dist/tests/mcp-bridge.test.js.map +0 -1
- package/dist/tests/openai-compat.test.d.ts +0 -2
- package/dist/tests/openai-compat.test.d.ts.map +0 -1
- package/dist/tests/openai-compat.test.js +0 -8
- package/dist/tests/openai-compat.test.js.map +0 -1
- package/dist/tests/proxy-heartbeat-integration.test.d.ts +0 -15
- package/dist/tests/proxy-heartbeat-integration.test.d.ts.map +0 -1
- package/dist/tests/proxy-heartbeat-integration.test.js +0 -122
- package/dist/tests/proxy-heartbeat-integration.test.js.map +0 -1
- package/dist/tests/proxy.test.d.ts +0 -2
- package/dist/tests/proxy.test.d.ts.map +0 -1
- package/dist/tests/proxy.test.js +0 -8
- package/dist/tests/proxy.test.js.map +0 -1
- package/dist/tests/register-guard-stacking.test.d.ts +0 -2
- package/dist/tests/register-guard-stacking.test.d.ts.map +0 -1
- package/dist/tests/register-guard-stacking.test.js +0 -61
- package/dist/tests/register-guard-stacking.test.js.map +0 -1
- package/dist/tests/register-guard.test.d.ts +0 -2
- package/dist/tests/register-guard.test.d.ts.map +0 -1
- package/dist/tests/register-guard.test.js +0 -129
- package/dist/tests/register-guard.test.js.map +0 -1
- package/dist/tests/route-flag-rollback.test.d.ts +0 -2
- package/dist/tests/route-flag-rollback.test.d.ts.map +0 -1
- package/dist/tests/route-flag-rollback.test.js +0 -70
- package/dist/tests/route-flag-rollback.test.js.map +0 -1
- package/dist/tests/route-flag.test.d.ts +0 -2
- package/dist/tests/route-flag.test.d.ts.map +0 -1
- package/dist/tests/route-flag.test.js +0 -101
- package/dist/tests/route-flag.test.js.map +0 -1
- package/dist/tests/session-bootstrap.test.d.ts +0 -2
- package/dist/tests/session-bootstrap.test.d.ts.map +0 -1
- package/dist/tests/session-bootstrap.test.js +0 -183
- package/dist/tests/session-bootstrap.test.js.map +0 -1
- package/dist/tests/session.test.d.ts +0 -2
- package/dist/tests/session.test.d.ts.map +0 -1
- package/dist/tests/session.test.js +0 -17
- package/dist/tests/session.test.js.map +0 -1
- package/dist/tests/state-machine.test.d.ts +0 -2
- package/dist/tests/state-machine.test.d.ts.map +0 -1
- package/dist/tests/state-machine.test.js +0 -133
- package/dist/tests/state-machine.test.js.map +0 -1
- package/dist/tests/streaming/cli-stream-parser.test.d.ts +0 -2
- package/dist/tests/streaming/cli-stream-parser.test.d.ts.map +0 -1
- package/dist/tests/streaming/cli-stream-parser.test.js +0 -233
- package/dist/tests/streaming/cli-stream-parser.test.js.map +0 -1
- package/dist/tests/streaming/feature-flag.test.d.ts +0 -14
- package/dist/tests/streaming/feature-flag.test.d.ts.map +0 -1
- package/dist/tests/streaming/feature-flag.test.js +0 -163
- package/dist/tests/streaming/feature-flag.test.js.map +0 -1
- package/dist/tests/streaming/no-tools-prompt.test.d.ts +0 -17
- package/dist/tests/streaming/no-tools-prompt.test.d.ts.map +0 -1
- package/dist/tests/streaming/no-tools-prompt.test.js +0 -229
- package/dist/tests/streaming/no-tools-prompt.test.js.map +0 -1
- package/dist/tests/streaming/skill-plus-tools.test.d.ts +0 -14
- package/dist/tests/streaming/skill-plus-tools.test.d.ts.map +0 -1
- package/dist/tests/streaming/skill-plus-tools.test.js +0 -234
- package/dist/tests/streaming/skill-plus-tools.test.js.map +0 -1
- package/dist/tests/streaming/sse-translator.test.d.ts +0 -2
- package/dist/tests/streaming/sse-translator.test.d.ts.map +0 -1
- package/dist/tests/streaming/sse-translator.test.js +0 -227
- package/dist/tests/streaming/sse-translator.test.js.map +0 -1
- package/dist/tests/streaming/tool-result-roundtrip.test.d.ts +0 -11
- package/dist/tests/streaming/tool-result-roundtrip.test.d.ts.map +0 -1
- package/dist/tests/streaming/tool-result-roundtrip.test.js +0 -215
- package/dist/tests/streaming/tool-result-roundtrip.test.js.map +0 -1
- package/dist/tests/streaming/tool-use-translation.test.d.ts +0 -10
- package/dist/tests/streaming/tool-use-translation.test.d.ts.map +0 -1
- package/dist/tests/streaming/tool-use-translation.test.js +0 -251
- package/dist/tests/streaming/tool-use-translation.test.js.map +0 -1
- package/dist/tests/telegram-bridge.test.d.ts +0 -2
- package/dist/tests/telegram-bridge.test.d.ts.map +0 -1
- package/dist/tests/telegram-bridge.test.js +0 -17
- package/dist/tests/telegram-bridge.test.js.map +0 -1
- package/dist/tests/telegram-injector.test.d.ts +0 -2
- package/dist/tests/telegram-injector.test.d.ts.map +0 -1
- package/dist/tests/telegram-injector.test.js +0 -74
- package/dist/tests/telegram-injector.test.js.map +0 -1
- package/dist/tests/telemetry.test.d.ts +0 -2
- package/dist/tests/telemetry.test.d.ts.map +0 -1
- package/dist/tests/telemetry.test.js +0 -405
- package/dist/tests/telemetry.test.js.map +0 -1
- package/dist/tests/test-mode.test.d.ts +0 -2
- package/dist/tests/test-mode.test.d.ts.map +0 -1
- package/dist/tests/test-mode.test.js +0 -39
- package/dist/tests/test-mode.test.js.map +0 -1
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConfigSchema — zod-validated configuration for cc-openclaw.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors PRP §3.2 G2 verbatim. Covers:
|
|
5
|
+
* - Top-level env-driven booleans (OPENCLAW_CC_OPENCLAW_ACTIVE, LISTENERS)
|
|
6
|
+
* - ccOpenclaw.* runtime knobs (native tools, watchdog timers, cache, TTS)
|
|
7
|
+
* - openclawJson.* fields cc-openclaw consumes from openclaw.json
|
|
8
|
+
*
|
|
9
|
+
* Q1 resolution: nativeTools.allowList defaults to the 5 approved tools.
|
|
10
|
+
* Q6 resolution: nativeTools.enabled defaults to true (v1.0.0-rc1 flip).
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
declare const NativeToolsSchema: z.ZodObject<{
|
|
14
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
15
|
+
/**
|
|
16
|
+
* Q1 — explicit allowlist, deny-by-default.
|
|
17
|
+
* NativeOpenClawToolsBridge.dispatch() throws DomainError.UnauthorizedTool on miss.
|
|
18
|
+
*/
|
|
19
|
+
allowList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
20
|
+
}, "strip", z.ZodTypeAny, {
|
|
21
|
+
enabled: boolean;
|
|
22
|
+
allowList: string[];
|
|
23
|
+
}, {
|
|
24
|
+
enabled?: boolean | undefined;
|
|
25
|
+
allowList?: string[] | undefined;
|
|
26
|
+
}>;
|
|
27
|
+
export declare const ConfigSchema: z.ZodObject<{
|
|
28
|
+
/**
|
|
29
|
+
* Master activation flag. Env: OPENCLAW_CC_OPENCLAW_ACTIVE.
|
|
30
|
+
* Missing on fresh laptops → silent gpt-5.4 fallback (BG7).
|
|
31
|
+
*/
|
|
32
|
+
openclawCcOpenclawActive: z.ZodDefault<z.ZodBoolean>;
|
|
33
|
+
/**
|
|
34
|
+
* Enables event-listener registration path. Env: OPENCLAW_CC_OPENCLAW_LISTENERS.
|
|
35
|
+
*/
|
|
36
|
+
openclawCcOpenclawListeners: z.ZodDefault<z.ZodBoolean>;
|
|
37
|
+
ccOpenclaw: z.ZodObject<{
|
|
38
|
+
nativeTools: z.ZodObject<{
|
|
39
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
40
|
+
/**
|
|
41
|
+
* Q1 — explicit allowlist, deny-by-default.
|
|
42
|
+
* NativeOpenClawToolsBridge.dispatch() throws DomainError.UnauthorizedTool on miss.
|
|
43
|
+
*/
|
|
44
|
+
allowList: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
45
|
+
}, "strip", z.ZodTypeAny, {
|
|
46
|
+
enabled: boolean;
|
|
47
|
+
allowList: string[];
|
|
48
|
+
}, {
|
|
49
|
+
enabled?: boolean | undefined;
|
|
50
|
+
allowList?: string[] | undefined;
|
|
51
|
+
}>;
|
|
52
|
+
/**
|
|
53
|
+
* Milliseconds before a stalled session subprocess is SIGTERMed.
|
|
54
|
+
* Env: CC_OPENCLAW_STALLED_KILL_MS. Default 180s per v0.10.0 watchdog.
|
|
55
|
+
*/
|
|
56
|
+
stalledKillMs: z.ZodDefault<z.ZodNumber>;
|
|
57
|
+
/**
|
|
58
|
+
* Maximum spawned subprocesses per 60s window before runaway-loop guard fires.
|
|
59
|
+
* Env: CC_OPENCLAW_LOOP_MAX_SUBPROCS. Range 2-20 per v0.10.1 watchdog.
|
|
60
|
+
*/
|
|
61
|
+
loopMaxSubprocs: z.ZodDefault<z.ZodNumber>;
|
|
62
|
+
/**
|
|
63
|
+
* Whether cache-parity Track B appendSystemPrompt + disk registry is active.
|
|
64
|
+
* Env: OPENCLAW_CACHE_PARITY.
|
|
65
|
+
*/
|
|
66
|
+
cacheParity: z.ZodDefault<z.ZodBoolean>;
|
|
67
|
+
/**
|
|
68
|
+
* TTS auto-injection mode. "tagged" = inject [[tts:text]] syntax rule only.
|
|
69
|
+
* Env: OPENCLAW_TTS_AUTO_MODE.
|
|
70
|
+
*/
|
|
71
|
+
ttsAutoMode: z.ZodDefault<z.ZodEnum<["off", "tagged", "always"]>>;
|
|
72
|
+
}, "strip", z.ZodTypeAny, {
|
|
73
|
+
nativeTools: {
|
|
74
|
+
enabled: boolean;
|
|
75
|
+
allowList: string[];
|
|
76
|
+
};
|
|
77
|
+
stalledKillMs: number;
|
|
78
|
+
loopMaxSubprocs: number;
|
|
79
|
+
cacheParity: boolean;
|
|
80
|
+
ttsAutoMode: "off" | "always" | "tagged";
|
|
81
|
+
}, {
|
|
82
|
+
nativeTools: {
|
|
83
|
+
enabled?: boolean | undefined;
|
|
84
|
+
allowList?: string[] | undefined;
|
|
85
|
+
};
|
|
86
|
+
stalledKillMs?: number | undefined;
|
|
87
|
+
loopMaxSubprocs?: number | undefined;
|
|
88
|
+
cacheParity?: boolean | undefined;
|
|
89
|
+
ttsAutoMode?: "off" | "always" | "tagged" | undefined;
|
|
90
|
+
}>;
|
|
91
|
+
openclawJson: z.ZodObject<{
|
|
92
|
+
/**
|
|
93
|
+
* fetchWithSsrFGuard timeout. Must be 900+ to survive multi-tool Telegram turns.
|
|
94
|
+
* Fix: feedback_cc_openclaw_provider_timeout.md
|
|
95
|
+
*/
|
|
96
|
+
timeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
97
|
+
messagesTts: z.ZodObject<{
|
|
98
|
+
/**
|
|
99
|
+
* Max ms before OpenClaw kills a TTS request. Schema cap 120 000 ms.
|
|
100
|
+
* Fix: feedback_openclaw_tts_timeout_chatterbox.md
|
|
101
|
+
*/
|
|
102
|
+
timeoutMs: z.ZodDefault<z.ZodNumber>;
|
|
103
|
+
/**
|
|
104
|
+
* Max characters sent to Chatterbox per synthesis call.
|
|
105
|
+
*/
|
|
106
|
+
maxTextLength: z.ZodDefault<z.ZodNumber>;
|
|
107
|
+
}, "strip", z.ZodTypeAny, {
|
|
108
|
+
timeoutMs: number;
|
|
109
|
+
maxTextLength: number;
|
|
110
|
+
}, {
|
|
111
|
+
timeoutMs?: number | undefined;
|
|
112
|
+
maxTextLength?: number | undefined;
|
|
113
|
+
}>;
|
|
114
|
+
/**
|
|
115
|
+
* Ordered fallback chain. Last element must be "openai-codex/gpt-5.4" per
|
|
116
|
+
* feedback_cc_openclaw_cross_engine_fallback.md.
|
|
117
|
+
*/
|
|
118
|
+
fallbackChain: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
119
|
+
/**
|
|
120
|
+
* OpenClaw plugins.allow list. Must include "cc-openclaw".
|
|
121
|
+
* feedback_openclaw_plugins_allow_trumps.md.
|
|
122
|
+
*/
|
|
123
|
+
pluginsAllow: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
124
|
+
}, "strip", z.ZodTypeAny, {
|
|
125
|
+
timeoutSeconds: number;
|
|
126
|
+
messagesTts: {
|
|
127
|
+
timeoutMs: number;
|
|
128
|
+
maxTextLength: number;
|
|
129
|
+
};
|
|
130
|
+
fallbackChain: string[];
|
|
131
|
+
pluginsAllow: string[];
|
|
132
|
+
}, {
|
|
133
|
+
messagesTts: {
|
|
134
|
+
timeoutMs?: number | undefined;
|
|
135
|
+
maxTextLength?: number | undefined;
|
|
136
|
+
};
|
|
137
|
+
timeoutSeconds?: number | undefined;
|
|
138
|
+
fallbackChain?: string[] | undefined;
|
|
139
|
+
pluginsAllow?: string[] | undefined;
|
|
140
|
+
}>;
|
|
141
|
+
}, "strip", z.ZodTypeAny, {
|
|
142
|
+
openclawCcOpenclawActive: boolean;
|
|
143
|
+
openclawCcOpenclawListeners: boolean;
|
|
144
|
+
ccOpenclaw: {
|
|
145
|
+
nativeTools: {
|
|
146
|
+
enabled: boolean;
|
|
147
|
+
allowList: string[];
|
|
148
|
+
};
|
|
149
|
+
stalledKillMs: number;
|
|
150
|
+
loopMaxSubprocs: number;
|
|
151
|
+
cacheParity: boolean;
|
|
152
|
+
ttsAutoMode: "off" | "always" | "tagged";
|
|
153
|
+
};
|
|
154
|
+
openclawJson: {
|
|
155
|
+
timeoutSeconds: number;
|
|
156
|
+
messagesTts: {
|
|
157
|
+
timeoutMs: number;
|
|
158
|
+
maxTextLength: number;
|
|
159
|
+
};
|
|
160
|
+
fallbackChain: string[];
|
|
161
|
+
pluginsAllow: string[];
|
|
162
|
+
};
|
|
163
|
+
}, {
|
|
164
|
+
ccOpenclaw: {
|
|
165
|
+
nativeTools: {
|
|
166
|
+
enabled?: boolean | undefined;
|
|
167
|
+
allowList?: string[] | undefined;
|
|
168
|
+
};
|
|
169
|
+
stalledKillMs?: number | undefined;
|
|
170
|
+
loopMaxSubprocs?: number | undefined;
|
|
171
|
+
cacheParity?: boolean | undefined;
|
|
172
|
+
ttsAutoMode?: "off" | "always" | "tagged" | undefined;
|
|
173
|
+
};
|
|
174
|
+
openclawJson: {
|
|
175
|
+
messagesTts: {
|
|
176
|
+
timeoutMs?: number | undefined;
|
|
177
|
+
maxTextLength?: number | undefined;
|
|
178
|
+
};
|
|
179
|
+
timeoutSeconds?: number | undefined;
|
|
180
|
+
fallbackChain?: string[] | undefined;
|
|
181
|
+
pluginsAllow?: string[] | undefined;
|
|
182
|
+
};
|
|
183
|
+
openclawCcOpenclawActive?: boolean | undefined;
|
|
184
|
+
openclawCcOpenclawListeners?: boolean | undefined;
|
|
185
|
+
}>;
|
|
186
|
+
export type Config = z.infer<typeof ConfigSchema>;
|
|
187
|
+
export type NativeToolsConfig = z.infer<typeof NativeToolsSchema>;
|
|
188
|
+
export {};
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ConfigSchema — zod-validated configuration for cc-openclaw.
|
|
3
|
+
*
|
|
4
|
+
* Mirrors PRP §3.2 G2 verbatim. Covers:
|
|
5
|
+
* - Top-level env-driven booleans (OPENCLAW_CC_OPENCLAW_ACTIVE, LISTENERS)
|
|
6
|
+
* - ccOpenclaw.* runtime knobs (native tools, watchdog timers, cache, TTS)
|
|
7
|
+
* - openclawJson.* fields cc-openclaw consumes from openclaw.json
|
|
8
|
+
*
|
|
9
|
+
* Q1 resolution: nativeTools.allowList defaults to the 5 approved tools.
|
|
10
|
+
* Q6 resolution: nativeTools.enabled defaults to true (v1.0.0-rc1 flip).
|
|
11
|
+
*/
|
|
12
|
+
import { z } from 'zod';
|
|
13
|
+
// ── Native-tools sub-schema ───────────────────────────────────────────────────
|
|
14
|
+
const NativeToolsSchema = z.object({
|
|
15
|
+
enabled: z.boolean().default(true),
|
|
16
|
+
/**
|
|
17
|
+
* Q1 — explicit allowlist, deny-by-default.
|
|
18
|
+
* NativeOpenClawToolsBridge.dispatch() throws DomainError.UnauthorizedTool on miss.
|
|
19
|
+
*/
|
|
20
|
+
allowList: z
|
|
21
|
+
.array(z.string())
|
|
22
|
+
.default([
|
|
23
|
+
'message.voice',
|
|
24
|
+
'message.image',
|
|
25
|
+
'memory.recall',
|
|
26
|
+
'memory.persist',
|
|
27
|
+
'sessions_spawn',
|
|
28
|
+
]),
|
|
29
|
+
});
|
|
30
|
+
// ── Runtime knobs sub-schema ──────────────────────────────────────────────────
|
|
31
|
+
const CcOpenclawSchema = z.object({
|
|
32
|
+
nativeTools: NativeToolsSchema,
|
|
33
|
+
/**
|
|
34
|
+
* Milliseconds before a stalled session subprocess is SIGTERMed.
|
|
35
|
+
* Env: CC_OPENCLAW_STALLED_KILL_MS. Default 180s per v0.10.0 watchdog.
|
|
36
|
+
*/
|
|
37
|
+
stalledKillMs: z.number().int().min(60_000).max(900_000).default(180_000),
|
|
38
|
+
/**
|
|
39
|
+
* Maximum spawned subprocesses per 60s window before runaway-loop guard fires.
|
|
40
|
+
* Env: CC_OPENCLAW_LOOP_MAX_SUBPROCS. Range 2-20 per v0.10.1 watchdog.
|
|
41
|
+
*/
|
|
42
|
+
loopMaxSubprocs: z.number().int().min(2).max(20).default(3),
|
|
43
|
+
/**
|
|
44
|
+
* Whether cache-parity Track B appendSystemPrompt + disk registry is active.
|
|
45
|
+
* Env: OPENCLAW_CACHE_PARITY.
|
|
46
|
+
*/
|
|
47
|
+
cacheParity: z.boolean().default(true),
|
|
48
|
+
/**
|
|
49
|
+
* TTS auto-injection mode. "tagged" = inject [[tts:text]] syntax rule only.
|
|
50
|
+
* Env: OPENCLAW_TTS_AUTO_MODE.
|
|
51
|
+
*/
|
|
52
|
+
ttsAutoMode: z.enum(['off', 'tagged', 'always']).default('tagged'),
|
|
53
|
+
});
|
|
54
|
+
// ── openclaw.json fields sub-schema ──────────────────────────────────────────
|
|
55
|
+
const MessagesTtsSchema = z.object({
|
|
56
|
+
/**
|
|
57
|
+
* Max ms before OpenClaw kills a TTS request. Schema cap 120 000 ms.
|
|
58
|
+
* Fix: feedback_openclaw_tts_timeout_chatterbox.md
|
|
59
|
+
*/
|
|
60
|
+
timeoutMs: z.number().int().min(30_000).max(120_000).default(120_000),
|
|
61
|
+
/**
|
|
62
|
+
* Max characters sent to Chatterbox per synthesis call.
|
|
63
|
+
*/
|
|
64
|
+
maxTextLength: z.number().int().min(50).max(500).default(200),
|
|
65
|
+
});
|
|
66
|
+
const OpenclawJsonSchema = z.object({
|
|
67
|
+
/**
|
|
68
|
+
* fetchWithSsrFGuard timeout. Must be 900+ to survive multi-tool Telegram turns.
|
|
69
|
+
* Fix: feedback_cc_openclaw_provider_timeout.md
|
|
70
|
+
*/
|
|
71
|
+
timeoutSeconds: z.number().int().min(120).max(3600).default(900),
|
|
72
|
+
messagesTts: MessagesTtsSchema,
|
|
73
|
+
/**
|
|
74
|
+
* Ordered fallback chain. Last element must be "openai-codex/gpt-5.4" per
|
|
75
|
+
* feedback_cc_openclaw_cross_engine_fallback.md.
|
|
76
|
+
*/
|
|
77
|
+
fallbackChain: z.array(z.string()).default([]),
|
|
78
|
+
/**
|
|
79
|
+
* OpenClaw plugins.allow list. Must include "cc-openclaw".
|
|
80
|
+
* feedback_openclaw_plugins_allow_trumps.md.
|
|
81
|
+
*/
|
|
82
|
+
pluginsAllow: z.array(z.string()).default([]),
|
|
83
|
+
});
|
|
84
|
+
// ── Root schema ───────────────────────────────────────────────────────────────
|
|
85
|
+
export const ConfigSchema = z.object({
|
|
86
|
+
/**
|
|
87
|
+
* Master activation flag. Env: OPENCLAW_CC_OPENCLAW_ACTIVE.
|
|
88
|
+
* Missing on fresh laptops → silent gpt-5.4 fallback (BG7).
|
|
89
|
+
*/
|
|
90
|
+
openclawCcOpenclawActive: z.boolean().default(false),
|
|
91
|
+
/**
|
|
92
|
+
* Enables event-listener registration path. Env: OPENCLAW_CC_OPENCLAW_LISTENERS.
|
|
93
|
+
*/
|
|
94
|
+
openclawCcOpenclawListeners: z.boolean().default(false),
|
|
95
|
+
ccOpenclaw: CcOpenclawSchema,
|
|
96
|
+
openclawJson: OpenclawJsonSchema,
|
|
97
|
+
});
|
|
98
|
+
//# sourceMappingURL=schema.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"schema.js","sourceRoot":"","sources":["../../../src/config/schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,iFAAiF;AAEjF,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC,OAAO,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IAClC;;;OAGG;IACH,SAAS,EAAE,CAAC;SACT,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;SACjB,OAAO,CAAC;QACP,eAAe;QACf,eAAe;QACf,eAAe;QACf,gBAAgB;QAChB,gBAAgB;KACjB,CAAC;CACL,CAAC,CAAC;AAEH,iFAAiF;AAEjF,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IAChC,WAAW,EAAE,iBAAiB;IAC9B;;;OAGG;IACH,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACzE;;;OAGG;IACH,eAAe,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IAC3D;;;OAGG;IACH,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,IAAI,CAAC;IACtC;;;OAGG;IACH,WAAW,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC;CACnE,CAAC,CAAC;AAEH,gFAAgF;AAEhF,MAAM,iBAAiB,GAAG,CAAC,CAAC,MAAM,CAAC;IACjC;;;OAGG;IACH,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC;IACrE;;OAEG;IACH,aAAa,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;CAC9D,CAAC,CAAC;AAEH,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IAClC;;;OAGG;IACH,cAAc,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IAChE,WAAW,EAAE,iBAAiB;IAC9B;;;OAGG;IACH,aAAa,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;IAC9C;;;OAGG;IACH,YAAY,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC,CAAC,OAAO,CAAC,EAAE,CAAC;CAC9C,CAAC,CAAC;AAEH,iFAAiF;AAEjF,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC;IACnC;;;OAGG;IACH,wBAAwB,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACpD;;OAEG;IACH,2BAA2B,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC;IACvD,UAAU,EAAE,gBAAgB;IAC5B,YAAY,EAAE,kBAAkB;CACjC,CAAC,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `buildAgentPrompt` — constructs the per-round, per-agent collaboration
|
|
3
|
+
* prompt for council session turns. Round 1 is planning-only; rounds 2+ are
|
|
4
|
+
* execution rounds with previous-round history prepended.
|
|
5
|
+
*
|
|
6
|
+
* Extracted from `council.ts` 2026-05-13 — pure string transformation,
|
|
7
|
+
* no I/O, no module state. Behavior preservation verified by existing
|
|
8
|
+
* council tests + replay-100-turns parity (when corpus grows).
|
|
9
|
+
*/
|
|
10
|
+
import type { AgentPersona, AgentResponse } from '../types.js';
|
|
11
|
+
export declare function buildAgentPrompt(agent: AgentPersona, task: string, round: number, previousResponses: AgentResponse[], allAgents: AgentPersona[]): string;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `buildAgentPrompt` — constructs the per-round, per-agent collaboration
|
|
3
|
+
* prompt for council session turns. Round 1 is planning-only; rounds 2+ are
|
|
4
|
+
* execution rounds with previous-round history prepended.
|
|
5
|
+
*
|
|
6
|
+
* Extracted from `council.ts` 2026-05-13 — pure string transformation,
|
|
7
|
+
* no I/O, no module state. Behavior preservation verified by existing
|
|
8
|
+
* council tests + replay-100-turns parity (when corpus grows).
|
|
9
|
+
*/
|
|
10
|
+
import { stripConsensusTags } from './consensus.js';
|
|
11
|
+
import { HISTORY_PREVIEW_CHARS } from '../constants.js';
|
|
12
|
+
export function buildAgentPrompt(agent, task, round, previousResponses, allAgents) {
|
|
13
|
+
const otherAgents = allAgents.filter((a) => a.name !== agent.name);
|
|
14
|
+
// Build history with tail-first truncation (preserve reports and votes)
|
|
15
|
+
let history = '';
|
|
16
|
+
// Filter out empty responses so they don't pollute the collaboration history
|
|
17
|
+
const substantiveResponses = previousResponses.filter((resp) => {
|
|
18
|
+
const stripped = resp.content.replace(/^\[Agent completed[^\]]*\]\s*/i, '').trim();
|
|
19
|
+
return stripped.length > 0;
|
|
20
|
+
});
|
|
21
|
+
if (substantiveResponses.length > 0) {
|
|
22
|
+
history = '\n\n## Previous Collaboration History\n\n';
|
|
23
|
+
let currentRound = 0;
|
|
24
|
+
for (const resp of substantiveResponses) {
|
|
25
|
+
if (resp.round !== currentRound) {
|
|
26
|
+
currentRound = resp.round;
|
|
27
|
+
history += `### Round ${currentRound}\n\n`;
|
|
28
|
+
}
|
|
29
|
+
const clean = stripConsensusTags(resp.content);
|
|
30
|
+
const preview = clean.length > HISTORY_PREVIEW_CHARS ? '...' + clean.slice(-HISTORY_PREVIEW_CHARS) : clean;
|
|
31
|
+
history += `**${resp.agent}** (${resp.consensus ? 'YES — agree to finish' : 'NO — continue'}):\n${preview}\n\n`;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (round === 1) {
|
|
35
|
+
return `# Round 1 — Planning Round
|
|
36
|
+
|
|
37
|
+
## Task
|
|
38
|
+
${task}
|
|
39
|
+
|
|
40
|
+
## Your Partners
|
|
41
|
+
${otherAgents.map((a) => `- ${a.emoji} ${a.name}`).join('\n')}
|
|
42
|
+
${history}
|
|
43
|
+
## Rules: Planning Only — No Code
|
|
44
|
+
|
|
45
|
+
This is Round 1, a **pure planning round**. All members work independently in parallel to create plan.md.
|
|
46
|
+
|
|
47
|
+
**What you must do (in order, complete quickly):**
|
|
48
|
+
1. \`git log --oneline -5\` to check current state
|
|
49
|
+
2. If the project is empty (only initial commit), **no research needed** — write the plan directly from the task description
|
|
50
|
+
3. If the project has existing code, quickly check the file structure in your workspace (one \`ls\` only), then write the plan
|
|
51
|
+
4. Create \`plan.md\` (with task checklist, phase breakdown, claim status) and merge into main
|
|
52
|
+
5. If another member's plan.md already exists on main, merge your improvements into it
|
|
53
|
+
|
|
54
|
+
**What you must never do:**
|
|
55
|
+
- Do not write any business code
|
|
56
|
+
- Do not repeatedly ls / glob / find to explore directories
|
|
57
|
+
- Do not read any files outside your workspace
|
|
58
|
+
- Do not spend more than 2-3 minutes on this round
|
|
59
|
+
|
|
60
|
+
## Consensus Vote
|
|
61
|
+
|
|
62
|
+
At the **end** of your response, you must vote:
|
|
63
|
+
- \`[CONSENSUS: NO]\` — normal for Round 1 (execution still needed after planning)
|
|
64
|
+
- \`[CONSENSUS: YES]\` — only if the task is extremely simple
|
|
65
|
+
|
|
66
|
+
Start writing plan.md now!`;
|
|
67
|
+
}
|
|
68
|
+
return `# Round ${round} — Execution Round
|
|
69
|
+
|
|
70
|
+
## Task
|
|
71
|
+
${task}
|
|
72
|
+
|
|
73
|
+
## Your Partners
|
|
74
|
+
${otherAgents.map((a) => `- ${a.emoji} ${a.name}`).join('\n')}
|
|
75
|
+
${history}
|
|
76
|
+
## Your Work
|
|
77
|
+
|
|
78
|
+
plan.md was created by all members in Round 1. Now execute according to plan:
|
|
79
|
+
|
|
80
|
+
1. **Check current state** — pull main, read plan.md, understand latest progress
|
|
81
|
+
2. **Claim and execute tasks** — pick unclaimed tasks from plan.md, write code, modify files, run tests
|
|
82
|
+
3. **Review others' work** — if other members have output, review and suggest improvements or fix directly
|
|
83
|
+
4. **Report results** — briefly describe what you did
|
|
84
|
+
|
|
85
|
+
## Consensus Vote
|
|
86
|
+
|
|
87
|
+
At the **end** of your response, you must vote (pick one):
|
|
88
|
+
|
|
89
|
+
- \`[CONSENSUS: YES]\` — task complete, quality meets standards, ready to finish
|
|
90
|
+
- \`[CONSENSUS: NO]\` — still work to do or issues to resolve
|
|
91
|
+
|
|
92
|
+
Collaboration ends **only when all members vote YES**.
|
|
93
|
+
|
|
94
|
+
Start working!`;
|
|
95
|
+
}
|
|
96
|
+
//# sourceMappingURL=build-agent-prompt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"build-agent-prompt.js","sourceRoot":"","sources":["../../../src/council/build-agent-prompt.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACpD,OAAO,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAExD,MAAM,UAAU,gBAAgB,CAC9B,KAAmB,EACnB,IAAY,EACZ,KAAa,EACb,iBAAkC,EAClC,SAAyB;IAEzB,MAAM,WAAW,GAAG,SAAS,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI,CAAC,CAAC;IAEnE,wEAAwE;IACxE,IAAI,OAAO,GAAG,EAAE,CAAC;IACjB,6EAA6E;IAC7E,MAAM,oBAAoB,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC,IAAI,EAAE,EAAE;QAC7D,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC,gCAAgC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,CAAC;QACnF,OAAO,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC;IAC7B,CAAC,CAAC,CAAC;IAEH,IAAI,oBAAoB,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACpC,OAAO,GAAG,2CAA2C,CAAC;QACtD,IAAI,YAAY,GAAG,CAAC,CAAC;QACrB,KAAK,MAAM,IAAI,IAAI,oBAAoB,EAAE,CAAC;YACxC,IAAI,IAAI,CAAC,KAAK,KAAK,YAAY,EAAE,CAAC;gBAChC,YAAY,GAAG,IAAI,CAAC,KAAK,CAAC;gBAC1B,OAAO,IAAI,aAAa,YAAY,MAAM,CAAC;YAC7C,CAAC;YACD,MAAM,KAAK,GAAG,kBAAkB,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YAC/C,MAAM,OAAO,GAAG,KAAK,CAAC,MAAM,GAAG,qBAAqB,CAAC,CAAC,CAAC,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC,CAAC,qBAAqB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;YAC3G,OAAO,IAAI,KAAK,IAAI,CAAC,KAAK,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,uBAAuB,CAAC,CAAC,CAAC,eAAe,OAAO,OAAO,MAAM,CAAC;QAClH,CAAC;IACH,CAAC;IAED,IAAI,KAAK,KAAK,CAAC,EAAE,CAAC;QAChB,OAAO;;;EAGT,IAAI;;;EAGJ,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;EAC3D,OAAO;;;;;;;;;;;;;;;;;;;;;;;;2BAwBkB,CAAC;IAC1B,CAAC;IAED,OAAO,WAAW,KAAK;;;EAGvB,IAAI;;;EAGJ,WAAW,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,IAAI,CAAC,CAAC,IAAI,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC;EAC3D,OAAO;;;;;;;;;;;;;;;;;;;eAmBM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort cleanup of already-created git worktrees when a batch
|
|
3
|
+
* creation fails.
|
|
4
|
+
*
|
|
5
|
+
* Extracted from `council.ts` 2026-05-13 as a bounded hot-path utility.
|
|
6
|
+
* Iterates the partial worktree map, force-removes each one via git, logs
|
|
7
|
+
* failures but never throws. Used in error paths only.
|
|
8
|
+
*/
|
|
9
|
+
import { type Logger } from '../logger.js';
|
|
10
|
+
export declare function cleanupCreatedWorktrees(worktreeMap: Map<string, string>, projectDir: string, logger?: Logger): Promise<void>;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Best-effort cleanup of already-created git worktrees when a batch
|
|
3
|
+
* creation fails.
|
|
4
|
+
*
|
|
5
|
+
* Extracted from `council.ts` 2026-05-13 as a bounded hot-path utility.
|
|
6
|
+
* Iterates the partial worktree map, force-removes each one via git, logs
|
|
7
|
+
* failures but never throws. Used in error paths only.
|
|
8
|
+
*/
|
|
9
|
+
import { createConsoleLogger } from '../logger.js';
|
|
10
|
+
import { GIT_CMD_TIMEOUT_MS } from '../constants.js';
|
|
11
|
+
import { spawnAsync } from '../lib/spawn-async.js';
|
|
12
|
+
export async function cleanupCreatedWorktrees(worktreeMap, projectDir, logger) {
|
|
13
|
+
const log = logger || createConsoleLogger('Council');
|
|
14
|
+
for (const [createdAgent, createdPath] of worktreeMap) {
|
|
15
|
+
await spawnAsync('git', ['-C', projectDir, 'worktree', 'remove', '--force', createdPath], {
|
|
16
|
+
timeout: GIT_CMD_TIMEOUT_MS,
|
|
17
|
+
}).catch((err) => {
|
|
18
|
+
log.error(`Failed to cleanup worktree for ${createdAgent}:`, err.message);
|
|
19
|
+
});
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=cleanup-worktrees.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"cleanup-worktrees.js","sourceRoot":"","sources":["../../../src/council/cleanup-worktrees.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAe,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAE,UAAU,EAAE,MAAM,uBAAuB,CAAC;AAEnD,MAAM,CAAC,KAAK,UAAU,uBAAuB,CAC3C,WAAgC,EAChC,UAAkB,EAClB,MAAe;IAEf,MAAM,GAAG,GAAG,MAAM,IAAI,mBAAmB,CAAC,SAAS,CAAC,CAAC;IACrD,KAAK,MAAM,CAAC,YAAY,EAAE,WAAW,CAAC,IAAI,WAAW,EAAE,CAAC;QACtD,MAAM,UAAU,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,CAAC,EAAE;YACxF,OAAO,EAAE,kBAAkB;SAC5B,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACf,GAAG,CAAC,KAAK,CAAC,kCAAkC,YAAY,GAAG,EAAG,GAAa,CAAC,OAAO,CAAC,CAAC;QACvF,CAAC,CAAC,CAAC;IACL,CAAC;AACH,CAAC"}
|