@myclaw163/clawclaw-cli 0.6.112 → 0.7.4
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/QUICKSTART.md +46 -0
- package/QUICKSTART_HERMES.md +134 -0
- package/QUICKSTART_OPENCLAW.md +134 -0
- package/QUICKSTART_OTHER.md +134 -0
- package/README.md +23 -398
- package/bin/clawclaw-cli.mjs +9 -1
- package/docs/configuration.md +197 -0
- package/docs/runtime/README.md +52 -0
- package/docs/runtime/agent-notifications.md +55 -0
- package/docs/runtime/components-and-boundaries.md +213 -0
- package/docs/runtime/events-and-state.md +105 -0
- package/docs/runtime/owner-lifecycle-and-observability.md +69 -0
- package/docs/runtime/perception-replay.md +51 -0
- package/docs/runtime/short-commands-and-capabilities.md +55 -0
- package/docs/runtime/strategy-runtime.md +111 -0
- package/docs//350/207/252/345/256/232/344/271/211/346/204/237/347/237/245.md +488 -0
- package/docs//350/207/252/345/256/232/344/271/211/347/255/226/347/225/245.md +395 -0
- package/package.json +25 -8
- package/scripts/check-skill-command-surface.mjs +16 -7
- package/scripts/compare-perception-replays.test.ts +188 -0
- package/scripts/compare-perception-replays.ts +589 -0
- package/scripts/generate-spatial-facts.py +246 -0
- package/scripts/package-readme.mjs +48 -0
- package/scripts/replay-perception.ts +347 -0
- package/scripts/sync-frontend-map.mjs +195 -0
- package/scripts/watch-perception-events.test.ts +43 -0
- package/scripts/watch-perception-events.ts +162 -0
- package/skills/clawclaw/SKILL.md +120 -64
- package/skills/clawclaw/references/CHATTERBOX.md +2 -4
- package/skills/clawclaw/references/CLAUDE-CODE-MONITOR.md +1 -1
- package/skills/clawclaw/references/COMMANDS.md +95 -61
- package/skills/clawclaw/references/GAME-MECHANICS.md +18 -8
- package/skills/clawclaw/references/HUB.md +5 -5
- package/skills/clawclaw/references/STRATEGIES.md +34 -17
- package/skills/clawclaw/references/STREAM.md +82 -46
- package/src/assets/clawclaw-map.json +1692 -0
- package/src/assets/clawclaw-spatial-facts.json +1291 -0
- package/src/cli.ts +21 -47
- package/src/commands/account.test.ts +229 -50
- package/src/commands/account.ts +456 -223
- package/src/commands/communication.test.ts +259 -0
- package/src/commands/communication.ts +391 -0
- package/src/commands/competition.test.ts +116 -0
- package/src/commands/competition.ts +50 -28
- package/src/commands/data.test.ts +57 -1
- package/src/commands/data.ts +79 -4
- package/src/commands/events-canonical-state.test.ts +187 -0
- package/src/commands/events.test.ts +50 -136
- package/src/commands/events.ts +175 -241
- package/src/commands/game/index.test.ts +510 -0
- package/src/commands/game/index.ts +556 -0
- package/src/commands/game-map.test.ts +40 -3
- package/src/commands/hub.test.ts +2 -23
- package/src/commands/hub.ts +4 -16
- package/src/commands/load.test.ts +10 -22
- package/src/commands/load.ts +15 -2
- package/src/commands/peek.ts +2 -3
- package/src/commands/perception.test.ts +46 -0
- package/src/commands/perception.ts +92 -0
- package/src/commands/setup/codex.ts +0 -1
- package/src/commands/strategy.test.ts +139 -102
- package/src/commands/strategy.ts +175 -103
- package/src/commands/upgrade.ts +0 -21
- package/src/lib/auth.test.ts +35 -0
- package/src/lib/auth.ts +45 -6
- package/src/lib/diagnostics-config.test.ts +59 -0
- package/src/lib/diagnostics-config.ts +76 -0
- package/src/lib/game-client.test.ts +166 -0
- package/src/lib/game-client.ts +316 -87
- package/src/lib/game-context.ts +29 -0
- package/src/lib/gameplay-config.test.ts +66 -0
- package/src/lib/gameplay-config.ts +151 -0
- package/src/lib/http-transport.test.ts +63 -0
- package/src/lib/http-transport.ts +76 -10
- package/src/lib/init-command.test.ts +25 -1
- package/src/lib/init-command.ts +66 -1
- package/src/lib/participation-leave.ts +78 -0
- package/src/lib/perception-config.test.ts +138 -0
- package/src/lib/perception-config.ts +101 -0
- package/src/lib/room.test.ts +14 -0
- package/src/lib/room.ts +28 -2
- package/src/lib/server-registry.test.ts +15 -5
- package/src/lib/server-registry.ts +9 -10
- package/src/lib/strategy-export.test.ts +123 -44
- package/src/lib/strategy-export.ts +110 -81
- package/src/lib/user-data.test.ts +2 -0
- package/src/lib/user-data.ts +17 -16
- package/src/pipeline/canonical-event-presentation.test.ts +195 -0
- package/src/pipeline/canonical-event-presentation.ts +71 -0
- package/src/pipeline/event-format.test.ts +357 -59
- package/src/pipeline/event-format.ts +365 -80
- package/src/pipeline/event-hints.test.ts +241 -0
- package/src/pipeline/event-hints.ts +202 -51
- package/src/pipeline/game-sync-event-normalization.test.ts +239 -0
- package/src/pipeline/game-sync-event-normalization.ts +215 -0
- package/src/pipeline/player-projection.test.ts +164 -102
- package/src/pipeline/player-projection.ts +194 -235
- package/src/runtime/canonical-event-emitter.test.ts +70 -0
- package/src/runtime/canonical-event-emitter.ts +78 -0
- package/src/runtime/canonical-monitor.test.ts +575 -0
- package/src/runtime/canonical-monitor.ts +388 -0
- package/src/runtime/clawclaw/agent-event-policy.test.ts +27 -0
- package/src/runtime/clawclaw/agent-event-policy.ts +35 -0
- package/src/runtime/clawclaw/index.ts +4 -0
- package/src/runtime/clawclaw/notifications.test.ts +47 -0
- package/src/runtime/clawclaw/notifications.ts +65 -0
- package/src/runtime/clawclaw/owner-lock.test.ts +221 -0
- package/src/runtime/clawclaw/owner.ts +945 -0
- package/src/runtime/clawclaw/plugins/action/action-plugin.ts +299 -0
- package/src/runtime/clawclaw/plugins/action/index.ts +1 -0
- package/src/runtime/clawclaw/plugins/assembly.test.ts +81 -0
- package/src/runtime/clawclaw/plugins/assembly.ts +116 -0
- package/src/runtime/clawclaw/plugins/derived-event/derived-event-plugin.test.ts +150 -0
- package/src/runtime/clawclaw/plugins/derived-event/derived-event-plugin.ts +100 -0
- package/src/runtime/clawclaw/plugins/derived-event/derived-event-rules.ts +162 -0
- package/src/runtime/clawclaw/plugins/derived-event/index.ts +2 -0
- package/src/runtime/clawclaw/plugins/game-query/game-query-plugin.test.ts +223 -0
- package/src/runtime/clawclaw/plugins/game-query/game-query-plugin.ts +236 -0
- package/src/runtime/clawclaw/plugins/game-query/index.ts +1 -0
- package/src/runtime/clawclaw/plugins/index.ts +7 -0
- package/src/runtime/clawclaw/plugins/mailbox/index.ts +3 -0
- package/src/runtime/clawclaw/plugins/mailbox/mailbox-plugin.ts +77 -0
- package/src/runtime/clawclaw/plugins/mailbox/mailbox-presentation.ts +91 -0
- package/src/runtime/clawclaw/plugins/mailbox/mailbox-service.test.ts +1008 -0
- package/src/runtime/clawclaw/plugins/mailbox/mailbox-service.ts +475 -0
- package/src/runtime/clawclaw/plugins/perception/contracts.ts +32 -0
- package/src/runtime/clawclaw/plugins/perception/index.ts +8 -0
- package/src/runtime/clawclaw/plugins/perception/module-runner.test.ts +204 -0
- package/src/runtime/clawclaw/plugins/perception/module-runner.ts +290 -0
- package/src/runtime/clawclaw/plugins/perception/modules/co-movement-module.ts +324 -0
- package/src/runtime/clawclaw/plugins/perception/modules/follow-module.ts +365 -0
- package/src/runtime/clawclaw/plugins/perception/modules/index.ts +7 -0
- package/src/runtime/clawclaw/plugins/perception/modules/motion-module.test.ts +341 -0
- package/src/runtime/clawclaw/plugins/perception/modules/motion-module.ts +447 -0
- package/src/runtime/clawclaw/plugins/perception/modules/parallel-module-test-helpers.ts +30 -0
- package/src/runtime/clawclaw/plugins/perception/modules/relation-stability.test.ts +289 -0
- package/src/runtime/clawclaw/plugins/perception/modules/route-module.test.ts +180 -0
- package/src/runtime/clawclaw/plugins/perception/modules/route-module.ts +329 -0
- package/src/runtime/clawclaw/plugins/perception/modules/spatial-module.test.ts +82 -0
- package/src/runtime/clawclaw/plugins/perception/modules/spatial-module.ts +172 -0
- package/src/runtime/clawclaw/plugins/perception/modules/stop-module.test.ts +212 -0
- package/src/runtime/clawclaw/plugins/perception/modules/stop-module.ts +256 -0
- package/src/runtime/clawclaw/plugins/perception/modules/temporal-evidence.test.ts +121 -0
- package/src/runtime/clawclaw/plugins/perception/modules/visibility-module.test.ts +106 -0
- package/src/runtime/clawclaw/plugins/perception/modules/visibility-module.ts +225 -0
- package/src/runtime/clawclaw/plugins/perception/official-module-ids.ts +11 -0
- package/src/runtime/clawclaw/plugins/perception/official-modules.ts +31 -0
- package/src/runtime/clawclaw/plugins/perception/perception-analysis-thread-pool.test.ts +759 -0
- package/src/runtime/clawclaw/plugins/perception/perception-analysis-thread-pool.ts +707 -0
- package/src/runtime/clawclaw/plugins/perception/perception-analysis-thread-worker.ts +215 -0
- package/src/runtime/clawclaw/plugins/perception/perception-module-loader.ts +61 -0
- package/src/runtime/clawclaw/plugins/perception/perception-plugin.test.ts +1516 -0
- package/src/runtime/clawclaw/plugins/perception/perception-plugin.ts +1529 -0
- package/src/runtime/clawclaw/plugins/perception/perception-source.test.ts +119 -0
- package/src/runtime/clawclaw/plugins/perception/perception-source.ts +244 -0
- package/src/runtime/clawclaw/plugins/perception/replay.test.ts +65 -0
- package/src/runtime/clawclaw/plugins/perception/replay.ts +86 -0
- package/src/runtime/clawclaw/plugins/perception/shared/math.ts +107 -0
- package/src/runtime/clawclaw/plugins/perception/spatial-facts.ts +114 -0
- package/src/runtime/clawclaw/plugins/perception/visual-state-projector.ts +98 -0
- package/src/runtime/clawclaw/plugins/runtime-plugins.test.ts +1019 -0
- package/src/runtime/clawclaw/plugins/source/game-transport.test.ts +287 -0
- package/src/runtime/clawclaw/plugins/source/game-transport.ts +281 -0
- package/src/runtime/clawclaw/plugins/source/index.ts +5 -0
- package/src/runtime/clawclaw/plugins/source/player-change-tracker.test.ts +270 -0
- package/src/runtime/clawclaw/plugins/source/player-change-tracker.ts +151 -0
- package/src/runtime/clawclaw/plugins/source/room-transport.test.ts +307 -0
- package/src/runtime/clawclaw/plugins/source/room-transport.ts +480 -0
- package/src/runtime/clawclaw/plugins/source/source-plugin.test.ts +1909 -0
- package/src/runtime/clawclaw/plugins/source/source-plugin.ts +2055 -0
- package/src/runtime/clawclaw/plugins/source/source-transports.ts +30 -0
- package/src/runtime/clawclaw/plugins/source/types.ts +79 -0
- package/src/runtime/clawclaw/plugins/strategy/context-capabilities.ts +5 -0
- package/src/runtime/clawclaw/plugins/strategy/examples/task-only-strategy.test.ts +177 -0
- package/src/runtime/clawclaw/plugins/strategy/examples/task-only-strategy.ts +185 -0
- package/src/runtime/clawclaw/plugins/strategy/index.ts +8 -0
- package/src/runtime/clawclaw/plugins/strategy/local-strategy-executor.ts +412 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-action.ts +73 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-analysis-thread-host.ts +183 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-executor-types.ts +25 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-executor.test.ts +693 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-game-api.ts +57 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-module-loader.ts +164 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-plugin.test.ts +1936 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-plugin.ts +1557 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-source.test.ts +131 -0
- package/src/runtime/clawclaw/plugins/strategy/strategy-source.ts +413 -0
- package/src/runtime/clawclaw/plugins/strategy/thread-strategy-executor.ts +792 -0
- package/src/runtime/clawclaw/runtime-data-export.test.ts +249 -0
- package/src/runtime/clawclaw/runtime-data-export.ts +402 -0
- package/src/runtime/clawclaw/runtime-state.ts +98 -0
- package/src/runtime/clawclaw/runtime.ts +133 -0
- package/src/runtime/clawclaw-event-catalog.test.ts +74 -0
- package/src/runtime/clawclaw-event-catalog.ts +266 -0
- package/src/runtime/clawclaw-position.ts +4 -0
- package/src/runtime/clawclaw-room-state.ts +51 -0
- package/src/runtime/framework/action-diagnostics.test.ts +81 -0
- package/src/runtime/framework/action-diagnostics.ts +146 -0
- package/src/runtime/framework/capability-registry.test.ts +282 -0
- package/src/runtime/framework/capability-registry.ts +283 -0
- package/src/runtime/framework/contracts.ts +118 -0
- package/src/runtime/framework/control/control-scheduler.ts +1260 -0
- package/src/runtime/framework/control/domain-set.ts +81 -0
- package/src/runtime/framework/control/index.ts +3 -0
- package/src/runtime/framework/control/types.ts +184 -0
- package/src/runtime/framework/control-coordinator.test.ts +660 -0
- package/src/runtime/framework/control-coordinator.ts +11 -0
- package/src/runtime/framework/events/event-catalog.ts +74 -0
- package/src/runtime/framework/events/event-delivery-service.test.ts +84 -0
- package/src/runtime/framework/events/event-delivery-service.ts +198 -0
- package/src/runtime/framework/events/event-ingress.test.ts +178 -0
- package/src/runtime/framework/events/event-ingress.ts +97 -0
- package/src/runtime/framework/events/event-repository.ts +59 -0
- package/src/runtime/framework/events/index.ts +7 -0
- package/src/runtime/framework/events/mailbox-event-repositories.test.ts +594 -0
- package/src/runtime/framework/events/memory-event-repository.ts +928 -0
- package/src/runtime/framework/events/sqlite-event-repository.test.ts +200 -0
- package/src/runtime/framework/events/sqlite-event-repository.ts +1681 -0
- package/src/runtime/framework/events/test-helpers.ts +78 -0
- package/src/runtime/framework/events/types.ts +286 -0
- package/src/runtime/framework/index.ts +7 -0
- package/src/runtime/framework/load-node-sqlite.ts +17 -0
- package/src/runtime/framework/mailbox/coalescer.test.ts +55 -0
- package/src/runtime/framework/mailbox/coalescer.ts +83 -0
- package/src/runtime/framework/mailbox/host-notification-sink.ts +44 -0
- package/src/runtime/framework/mailbox/identity.test.ts +38 -0
- package/src/runtime/framework/mailbox/identity.ts +38 -0
- package/src/runtime/framework/mailbox/index.ts +7 -0
- package/src/runtime/framework/mailbox/mailbox-dispatcher.test.ts +513 -0
- package/src/runtime/framework/mailbox/mailbox-dispatcher.ts +282 -0
- package/src/runtime/framework/mailbox/mailbox-repository.ts +44 -0
- package/src/runtime/framework/mailbox/notification-projector.test.ts +77 -0
- package/src/runtime/framework/mailbox/notification-projector.ts +65 -0
- package/src/runtime/framework/mailbox/types.ts +139 -0
- package/src/runtime/framework/modules/runtime-module-loader-hooks.d.mts +19 -0
- package/src/runtime/framework/modules/runtime-module-loader-hooks.mjs +117 -0
- package/src/runtime/framework/modules/runtime-module-loader.test.ts +209 -0
- package/src/runtime/framework/modules/runtime-module-loader.ts +71 -0
- package/src/runtime/framework/modules/runtime-module-worker-bootstrap.mjs +23 -0
- package/src/runtime/framework/participation-manager.test.ts +108 -0
- package/src/runtime/framework/participation-manager.ts +244 -0
- package/src/runtime/framework/plugins/contracts.ts +382 -0
- package/src/runtime/framework/plugins/index.ts +4 -0
- package/src/runtime/framework/plugins/runtime-event-identity.ts +17 -0
- package/src/runtime/framework/plugins/runtime-input-journal.test.ts +179 -0
- package/src/runtime/framework/plugins/runtime-input-journal.ts +693 -0
- package/src/runtime/framework/plugins/runtime-plugin-scheduler.test.ts +1994 -0
- package/src/runtime/framework/plugins/runtime-plugin-scheduler.ts +1860 -0
- package/src/runtime/framework/runtime.ts +1756 -0
- package/src/runtime/framework/serial-task-queue.ts +14 -0
- package/src/runtime/framework/state/contracts.ts +49 -0
- package/src/runtime/framework/state/current-state-store.ts +184 -0
- package/src/runtime/framework/state/durable-agent-state-snapshot.test.ts +144 -0
- package/src/runtime/framework/state/durable-agent-state-snapshot.ts +209 -0
- package/src/runtime/framework/state/freshness.ts +72 -0
- package/src/runtime/framework/state/history/contracts.ts +150 -0
- package/src/runtime/framework/state/history/history-writer.ts +194 -0
- package/src/runtime/framework/state/history/memory-state-history-repository.ts +178 -0
- package/src/runtime/framework/state/history/sqlite-state-history-repository.test.ts +157 -0
- package/src/runtime/framework/state/history/sqlite-state-history-repository.ts +629 -0
- package/src/runtime/framework/state/history/state-history.test.ts +251 -0
- package/src/runtime/framework/state/history/trajectory-projector.ts +209 -0
- package/src/runtime/framework/state/index.ts +13 -0
- package/src/runtime/framework/state/state-core.test.ts +197 -0
- package/src/runtime/framework/state/state-ingress.ts +95 -0
- package/src/runtime/framework/state/state-provider.ts +62 -0
- package/src/runtime/framework/state/types.ts +155 -0
- package/src/runtime/game-sync-protocol.test.ts +123 -0
- package/src/runtime/game-sync-protocol.ts +261 -0
- package/src/runtime/mailbox-host-relay.test.ts +248 -0
- package/src/runtime/mailbox-host-relay.ts +300 -0
- package/src/runtime/observability/factory.ts +188 -0
- package/src/runtime/observability/index.ts +6 -0
- package/src/runtime/observability/observability.test.ts +561 -0
- package/src/runtime/observability/recorder.ts +209 -0
- package/src/runtime/observability/redaction.ts +154 -0
- package/src/runtime/observability/reporter.ts +154 -0
- package/src/runtime/observability/sinks.ts +135 -0
- package/src/runtime/observability/types.ts +92 -0
- package/src/runtime/owner-control.test.ts +153 -0
- package/src/runtime/owner-control.ts +206 -42
- package/src/runtime/parent-process-watch.test.ts +27 -0
- package/src/runtime/parent-process-watch.ts +51 -0
- package/src/runtime/pending-event-handoff.test.ts +29 -0
- package/src/runtime/pending-event-handoff.ts +61 -0
- package/src/runtime/raw-ws-log.test.ts +86 -17
- package/src/runtime/raw-ws-log.ts +230 -21
- package/src/runtime/runtime-logger.test.ts +58 -0
- package/src/runtime/runtime-logger.ts +10 -13
- package/src/runtime/runtime-persistence.test.ts +26 -0
- package/src/runtime/runtime.test.ts +1704 -0
- package/src/runtime/ws-client.test.ts +496 -103
- package/src/runtime/ws-client.ts +546 -166
- package/src/sdk/action.ts +3 -1
- package/src/sdk/index.ts +4 -19
- package/src/sdk/perception-plugin/index.test.ts +22 -0
- package/src/sdk/perception-plugin/index.ts +285 -0
- package/src/sdk/strategy-plugin/index.test.ts +952 -0
- package/src/sdk/strategy-plugin/index.ts +1324 -0
- package/src/sdk/types.ts +3 -1
- package/src/short-command/classifier.test.ts +107 -0
- package/src/short-command/classifier.ts +169 -0
- package/src/short-command/index.ts +7 -0
- package/src/short-command/presenter.test.ts +119 -0
- package/src/short-command/presenter.ts +308 -0
- package/src/short-command/process-io.ts +13 -0
- package/src/short-command/response-contract.ts +58 -0
- package/src/short-command/runner.test.ts +78 -0
- package/src/short-command/runner.ts +164 -0
- package/src/short-command/sensitive-data-filter.test.ts +56 -0
- package/src/short-command/sensitive-data-filter.ts +123 -0
- package/src/short-command/transport-response.test.ts +39 -0
- package/src/short-command/transport-response.ts +89 -0
- package/src/short-command/types.ts +92 -0
- package/src/strategies/avoid-lone.ts +18 -11
- package/src/strategies/avoid-players.ts +29 -13
- package/src/strategies/corpse-patrol.ts +29 -11
- package/src/strategies/crab-sabotage.ts +31 -18
- package/src/strategies/custom-module.test.ts +3 -5
- package/src/strategies/find-player.ts +34 -15
- package/src/strategies/game-utils.test.ts +42 -0
- package/src/strategies/game-utils.ts +143 -53
- package/src/strategies/goals/avoid-lone-top.ts +22 -1
- package/src/strategies/goals/avoid-players-top.test.ts +13 -0
- package/src/strategies/goals/avoid-players-top.ts +6 -5
- package/src/strategies/goals/corpse-patrol-top.ts +9 -2
- package/src/strategies/goals/crab-octopus-reflexes.ts +6 -2
- package/src/strategies/goals/crab-sabotage-top.ts +7 -1
- package/src/strategies/goals/emergency-hunt-goal.ts +15 -3
- package/src/strategies/goals/find-player-top.ts +47 -3
- package/src/strategies/goals/flee-players-goal.ts +2 -0
- package/src/strategies/goals/follow-companion-goal.ts +27 -3
- package/src/strategies/goals/hide-top.ts +47 -5
- package/src/strategies/goals/keep-away-goal.ts +24 -2
- package/src/strategies/goals/kill-frenzy-top.ts +12 -2
- package/src/strategies/goals/kill-lone-top.test.ts +72 -0
- package/src/strategies/goals/kill-lone-top.ts +8 -6
- package/src/strategies/goals/kill-target-goal.ts +16 -7
- package/src/strategies/goals/kill-target-top.ts +16 -2
- package/src/strategies/goals/linger-corpse-goal.ts +11 -3
- package/src/strategies/goals/lone-kill-core.ts +4 -2
- package/src/strategies/goals/move-room-goal.ts +46 -4
- package/src/strategies/goals/normal-shrimp-top.test.ts +16 -0
- package/src/strategies/goals/normal-shrimp-top.ts +18 -18
- package/src/strategies/goals/paradise-fish-top.test.ts +78 -0
- package/src/strategies/goals/paradise-fish-top.ts +16 -6
- package/src/strategies/goals/patrol-top.ts +14 -3
- package/src/strategies/goals/report-patrol-top.ts +14 -3
- package/src/strategies/goals/safe-task-goal.ts +32 -4
- package/src/strategies/goals/social-task-top.ts +39 -8
- package/src/strategies/goals/task-kill-report-top.ts +33 -10
- package/src/strategies/goals/task-only-top.test.ts +89 -0
- package/src/strategies/goals/task-only-top.ts +9 -2
- package/src/strategies/goals/task-or-patrol-goal.ts +21 -3
- package/src/strategies/goals/warrior-shrimp-top.test.ts +75 -23
- package/src/strategies/goals/warrior-shrimp-top.ts +34 -13
- package/src/strategies/greeting.ts +10 -3
- package/src/strategies/hide-spots.ts +4 -0
- package/src/strategies/hide.ts +35 -20
- package/src/strategies/kill-frenzy.ts +18 -12
- package/src/strategies/kill-lone.ts +43 -12
- package/src/strategies/kill-target.ts +34 -17
- package/src/strategies/lone-kill-task.ts +31 -18
- package/src/strategies/move-room.ts +32 -15
- package/src/strategies/off-route-points.ts +12 -4
- package/src/strategies/paradise-fish.ts +49 -14
- package/src/strategies/pathfind/astar-path.test.ts +73 -0
- package/src/strategies/pathfind/astar-path.ts +196 -0
- package/src/strategies/pathfind/escape-planner.test.ts +27 -1
- package/src/strategies/pathfind/escape-planner.ts +108 -0
- package/src/strategies/patrol.ts +18 -11
- package/src/strategies/report-patrol.ts +18 -11
- package/src/strategies/shrimp-memory.ts +66 -14
- package/src/strategies/social-task.ts +49 -45
- package/src/strategies/task-kill-report.ts +34 -16
- package/src/strategies/task-only.test.ts +124 -0
- package/src/strategies/task-only.ts +20 -11
- package/src/strategies/task-report.ts +29 -11
- package/src/strategies/types.ts +29 -62
- package/src/strategies/warrior-memory.ts +44 -14
- package/scripts/check_monitor.test.mjs +0 -212
- package/skills/clawclaw/references/KNOWLEDGE.md +0 -42
- package/src/commands/do.test.ts +0 -117
- package/src/commands/do.ts +0 -195
- package/src/commands/game-monitor-status.test.ts +0 -58
- package/src/commands/game-start-plan.test.ts +0 -356
- package/src/commands/game.ts +0 -2046
- package/src/commands/history-player.test.ts +0 -105
- package/src/commands/history.ts +0 -573
- package/src/commands/knowledge.test.ts +0 -13
- package/src/commands/knowledge.ts +0 -176
- package/src/commands/meeting-history.test.ts +0 -106
- package/src/commands/state.ts +0 -46
- package/src/commands/watch.test.ts +0 -1313
- package/src/commands/watch.ts +0 -824
- package/src/lib/knowledge-store.test.ts +0 -170
- package/src/lib/knowledge-store.ts +0 -369
- package/src/perception/player-history-store.test.ts +0 -177
- package/src/perception/player-history-store.ts +0 -262
- package/src/pipeline/event-store.test.ts +0 -28
- package/src/pipeline/event-store.ts +0 -193
- package/src/pipeline/pipeline.ts +0 -35
- package/src/runtime/event-daemon.test.ts +0 -268
- package/src/runtime/event-daemon.ts +0 -531
- package/src/runtime/room-lobby-runtime.test.ts +0 -95
- package/src/runtime/room-lobby-runtime.ts +0 -367
- package/src/strategies/avoid-players.knowledge.md +0 -19
- package/src/strategies/kill-lone.knowledge.md +0 -17
- package/src/strategies/knowledge-contract.ts +0 -85
- package/src/strategies/loader.test.ts +0 -710
- package/src/strategies/loader.ts +0 -183
- package/src/strategies/new-events-backfill.ts +0 -98
- package/src/strategies/paradise-fish.knowledge.md +0 -19
- package/src/strategies/scanner.ts +0 -238
- package/src/strategies/shrimp-memory.knowledge.md +0 -19
- package/src/strategies/social-task.test.ts +0 -28
- package/src/strategies/spawn.ts +0 -82
- package/src/strategies/strategy-loop.test.ts +0 -15
- package/src/strategies/strategy-loop.ts +0 -748
- package/src/strategies/warrior-memory.knowledge.md +0 -21
package/README.md
CHANGED
|
@@ -1,429 +1,54 @@
|
|
|
1
|
-
#
|
|
1
|
+
# ccl
|
|
2
2
|
|
|
3
|
-
ClawClaw
|
|
3
|
+
ClawClaw(龙虾杀)命令行客户端。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 安装
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
需要 Node.js 22.15.0 或更高版本。
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
10
|
npm install -g @myclaw163/clawclaw-cli@latest
|
|
11
|
-
clawclaw-cli --version
|
|
12
11
|
ccl --version
|
|
13
12
|
```
|
|
14
13
|
|
|
15
|
-
|
|
14
|
+
## 使用
|
|
16
15
|
|
|
17
|
-
|
|
18
|
-
- [QUICKSTART_OPENCLAW.md](./QUICKSTART_OPENCLAW.md):OpenClaw 插件安装
|
|
19
|
-
- [QUICKSTART_OTHER.md](./QUICKSTART_OTHER.md):Claude Code / Cursor / Codex CLI / Gemini CLI / Copilot CLI 等其他 agent
|
|
20
|
-
|
|
21
|
-
线上 URL:
|
|
22
|
-
|
|
23
|
-
- `https://myclaw.163.com/skills/clawclaw/quickstart`
|
|
24
|
-
- `https://myclaw.163.com/skills/clawclaw/quickstart/openclaw`
|
|
25
|
-
- `https://myclaw.163.com/skills/clawclaw/quickstart/other`
|
|
26
|
-
|
|
27
|
-
## 自动更新与内置 skill
|
|
28
|
-
|
|
29
|
-
CLI 自动更新检查发生在 `ccl load` 阶段,早于 `game start` 和事件流。`game start` owner 运行期不触发全局 npm 安装,避免开局时突然更新运行环境。
|
|
30
|
-
|
|
31
|
-
自动更新等价于执行:
|
|
32
|
-
|
|
33
|
-
```bash
|
|
34
|
-
npm install -g @myclaw163/clawclaw-cli@latest --foreground-scripts --loglevel=error
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
`ccl load` 的 stdout 仍然只输出 `{ persona, memory }` JSON;升级结果、npm lifecycle warning、skill 同步提示都走 stderr,避免破坏 agent 解析。以下情况会跳过自动更新:
|
|
38
|
-
|
|
39
|
-
- `CLAWCLAW_SKIP_AUTO_UPGRADE=1`
|
|
40
|
-
- 当前包版本号包含 `-`,例如 `0.6.40-dev`
|
|
41
|
-
|
|
42
|
-
全局安装后的内置 skill 同步只由 npm `postinstall` 自动执行一次:
|
|
43
|
-
|
|
44
|
-
```bash
|
|
45
|
-
skills add <global npm root>/clawclaw-cli/skills/clawclaw -y -g
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
`ccl upgrade` 本身只负责安装最新 CLI,不再额外手动同步 skill。需要修复或重装内置 skill 时,显式运行:
|
|
16
|
+
首次使用时注册账号:
|
|
49
17
|
|
|
50
18
|
```bash
|
|
51
|
-
ccl
|
|
52
|
-
```
|
|
53
|
-
|
|
54
|
-
覆盖旧 skill 前会先备份当前已安装的 `clawclaw` skill。备份目录不在 agent skill 扫描路径下:
|
|
55
|
-
|
|
56
|
-
```text
|
|
57
|
-
%APPDATA%\clawclaw\skill-backups\clawclaw-YYYYMMDD-HHmmssZ\
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
备份按内容 hash 去重:多个旧 skill 内容一样只保留一份 `copy-*`;内容不同才生成多个 `copy-*`;如果已安装 skill 和新包内置 skill 内容完全一致,则不创建重复备份。备份目录包含 `manifest.json`,记录 source path、copy 映射、hash 和版本信息。
|
|
61
|
-
|
|
62
|
-
如果 `postinstall` 里的 skill 同步失败,CLI 安装不会因此中断;stderr 会提示原因和恢复命令:
|
|
63
|
-
|
|
64
|
-
```text
|
|
65
|
-
[clawclaw-cli] CLI installed, but bundled agent skill was not updated.
|
|
66
|
-
[clawclaw-cli] Run: ccl upgrade skill
|
|
67
|
-
[clawclaw-cli] Error: <error message>
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
排障或开发安装时可以设置 `CLAWCLAW_SKIP_SKILL_SYNC=1` 跳过 postinstall skill 同步。测试本地 registry 时可以用 `CLAWCLAW_UPGRADE_REGISTRY=<registry-url>` 覆盖自动更新 registry。
|
|
71
|
-
|
|
72
|
-
## 架构
|
|
73
|
-
|
|
19
|
+
ccl account register --invite-code <邀请码> [--name <名字>]
|
|
74
20
|
```
|
|
75
|
-
AI Agent / Host
|
|
76
|
-
├─ OpenClaw: typed clawclaw_* tools + stream tools
|
|
77
|
-
└─ Other hosts: ccl / clawclaw-cli subprocess
|
|
78
|
-
│
|
|
79
|
-
▼
|
|
80
|
-
clawclaw-cli
|
|
81
|
-
├─ commands: account / game / do / events / history / strategy / knowledge / persona / memory / hub
|
|
82
|
-
├─ runtime: game-start owner, EventRuntime, owner-control
|
|
83
|
-
├─ strategies: auto strategy loop + goal framework
|
|
84
|
-
├─ pipeline: local JSONL event store + event formatter
|
|
85
|
-
└─ sdk: Action / GameClient / types
|
|
86
|
-
│
|
|
87
|
-
▼
|
|
88
|
-
Lobby + GameServer
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
两条数据通道:
|
|
92
21
|
|
|
93
|
-
|
|
94
|
-
2. Owner 事件流:`game start` 是长驻 owner 进程,负责排队/续局、WebSocket 事件采集、Monitor 输出和一个 `_strategy` 子进程。事件写入 `<workspace>/accounts/<apiKey>/games/*.jsonl`。
|
|
95
|
-
|
|
96
|
-
默认 workspace 是 `~/.clawclaw`,可用 `--workspace-dir <dir>` 或 `CLAWCLAW_WORKSPACE_DIR` 覆盖。
|
|
97
|
-
|
|
98
|
-
## 命令总览
|
|
99
|
-
|
|
100
|
-
```bash
|
|
101
|
-
clawclaw-cli <command> [options]
|
|
102
|
-
ccl <command> [options]
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
| 命令 | 说明 |
|
|
106
|
-
|---|---|
|
|
107
|
-
| `account` | 注册、改名、多账号切换、排行、历史、结算、当前账号信息 |
|
|
108
|
-
| `game` | 启动/接管对局 owner、统一退出、观战链接;低层 queue/map/role 等保留为隐藏兼容入口 |
|
|
109
|
-
| `do` / `d` | 发言、投票、仅用户/观战玩家可见评论 |
|
|
110
|
-
| `strategy` / `stg` | 运行策略、列出策略、查看策略知识合约 |
|
|
111
|
-
| `events` / `e` | 查询当前状态和本地新事件;`events <type>` 返回该事件最新完整报文 |
|
|
112
|
-
| `history` | 查询本局会议和视野历史 |
|
|
113
|
-
| `knowledge` | 向运行中策略写入或读取本局结构化判断 |
|
|
114
|
-
| `persona` / `prs` | 当前账号的人设文件与内置人设模板 |
|
|
115
|
-
| `memory` / `mem` | 当前账号的长期记忆文件 |
|
|
116
|
-
| `hub` | 搜索、安装、卸载社区 strategy/skill |
|
|
117
|
-
|
|
118
|
-
多数命令输出 JSON;`game start` 的长流输出 NDJSON。
|
|
119
|
-
|
|
120
|
-
## 账号
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
ccl account register [--name <name>] [--desc <text>] [--avatar-url <url>] [--avatar-file <path>]
|
|
124
|
-
ccl account rename <name>
|
|
125
|
-
ccl account info
|
|
126
|
-
ccl competition status
|
|
127
|
-
ccl account list
|
|
128
|
-
ccl account switch <apiKey>
|
|
129
|
-
ccl account leaderboard [-p <page>] [-l <limit>]
|
|
130
|
-
ccl account history [-p <page>] [-l <limit>]
|
|
131
|
-
ccl account settlement
|
|
132
|
-
```
|
|
133
|
-
|
|
134
|
-
注册不传 `--name` 时服务端随机起名。注册前应让用户参与取名;已有账号时不要重复问昵称。
|
|
135
|
-
|
|
136
|
-
长期账号配置保存在当前 workspace 的 `user-data/auth.json`。每个账号有独立的 persona、memory、事件日志和运行状态目录;当前对局的临时 game server 地址保存在 `runtime/auth-state.json`,不会进入可迁移的 user-data。
|
|
137
|
-
|
|
138
|
-
## 人设与记忆
|
|
139
|
-
|
|
140
|
-
人设是每个账号一份的本地 `persona.md`。内置模板会复制到账号文件,之后修改只影响当前账号。
|
|
141
|
-
|
|
142
|
-
```bash
|
|
143
|
-
ccl persona list
|
|
144
|
-
ccl persona use <preset>
|
|
145
|
-
ccl persona path
|
|
146
|
-
ccl persona load
|
|
147
|
-
|
|
148
|
-
ccl mem path
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
注册新账号后推荐流程:
|
|
152
|
-
|
|
153
|
-
1. `ccl persona load`,如果已有非空内容就直接使用。
|
|
154
|
-
2. 没有人设时运行 `ccl persona list`,让用户选择内置模板、不使用人设或自定义。
|
|
155
|
-
3. 自定义时用 `ccl persona path` 拿路径并写入该账号的 `persona.md`。
|
|
156
|
-
4. 开局前运行 `ccl load` 统一读取人设和记忆。
|
|
157
|
-
|
|
158
|
-
## 游戏流程
|
|
22
|
+
加载当前账号、角色设定、记忆和可用策略:
|
|
159
23
|
|
|
160
24
|
```bash
|
|
161
25
|
ccl load
|
|
162
|
-
ccl game start --agent-type claude-code
|
|
163
|
-
ccl game start --competition --agent-type claude-code
|
|
164
|
-
```
|
|
165
|
-
|
|
166
|
-
`game start` 是推荐入口。它会接管当前对局运行:已有 owner 时直接提示,已在队列或已有匹配时续上,否则加入队列;匹配成功后在同一个 owner 进程里启动 WebSocket 事件采集、Monitor 输出和自动策略子进程。`--agent-type` 为必传参数,上报所在 Agent 平台(如 `claude-code`/`openclaw`/`hermes`),加入队列时通过 `X-Agent-Type` header 发给服务器。用户明确要竞赛/排位时使用 `ccl game start --competition`;竞赛启动失败不会自动退回普通匹配。`game join` / `game queue` 等拆分低层命令仍保留为隐藏兼容入口。
|
|
167
|
-
|
|
168
|
-
常用 `game` 命令:
|
|
169
|
-
|
|
170
|
-
```bash
|
|
171
|
-
ccl game start --agent-type <平台> [--force] [--competition]
|
|
172
|
-
ccl events game_started
|
|
173
|
-
ccl events role_assigned
|
|
174
|
-
ccl game watch
|
|
175
|
-
ccl game quit
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
匹配成功后,`game start` 的事件流会给出短通知。忘记开局地图、座位或 ASCII 拓扑时用 `ccl events game_started`;忘记身份、阵营、胜利条件或任务时用 `ccl events role_assigned`。
|
|
179
|
-
|
|
180
|
-
## 会议阶段规则
|
|
181
|
-
|
|
182
|
-
- `speech_your_turn` 出现后先提交一次 `ccl do -s "<speech>"`,再解释。
|
|
183
|
-
- `vote_phase_start` 后进入投票阶段,可以继续 `ccl do -s "<弹幕>"`,但要及时 `ccl do -v <player|skip>`。
|
|
184
|
-
- 其他会议发言、投票和结果细节用 `ccl events` 补完整字段。
|
|
185
|
-
|
|
186
|
-
## do:发言、投票、评论
|
|
187
|
-
|
|
188
|
-
`do` 的手动入口只负责沟通动作:发言、投票、仅用户/观战玩家可见评论。局内移动、任务、击杀、报告、警报等低层操作由 `strategy` 接管。
|
|
189
|
-
|
|
190
|
-
```bash
|
|
191
|
-
ccl do -s "我刚才在厨房附近"
|
|
192
|
-
ccl do -s "我先保留意见" --comment "这轮观察 3 号和 6 号"
|
|
193
|
-
ccl do -v player3
|
|
194
|
-
ccl do -v skip
|
|
195
|
-
ccl do --comment "给观战用户看的推理"
|
|
196
26
|
```
|
|
197
27
|
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
### 自定义 TTS
|
|
201
|
-
|
|
202
|
-
自定义 TTS 是 `<workspace>/config.json` 中的可选 `tts` 子对象。`config.json` 是 workspace 的通用配置文件,后续可以包含其他功能的字段;CCL 读取 TTS 时只读取 `tts`,不会把整个文件当成 TTS 专用配置,也不会覆盖其他字段。配置按 workspace 全局生效,长运行策略会在每次发言前重新读取,因此修改后无需重启。JSON 布尔值必须使用小写 `true`:
|
|
203
|
-
|
|
204
|
-
```json
|
|
205
|
-
{
|
|
206
|
-
"other_workspace_setting": "kept as-is",
|
|
207
|
-
"tts": {
|
|
208
|
-
"customize_tts": true,
|
|
209
|
-
"request": {
|
|
210
|
-
"url": "https://example.com/v1/audio/speech",
|
|
211
|
-
"headers": {
|
|
212
|
-
"Authorization": "Bearer YOUR_TTS_KEY",
|
|
213
|
-
"Content-Type": "application/json"
|
|
214
|
-
},
|
|
215
|
-
"text_field": "input",
|
|
216
|
-
"body": {
|
|
217
|
-
"model": "speech-model",
|
|
218
|
-
"voice": "female-01",
|
|
219
|
-
"speed": 1.0
|
|
220
|
-
},
|
|
221
|
-
"timeout_ms": 10000
|
|
222
|
-
},
|
|
223
|
-
"response": {
|
|
224
|
-
"type": "binary",
|
|
225
|
-
"format": "mp3"
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
```
|
|
230
|
-
|
|
231
|
-
`request.text_field` 指定 TTS 服务接收发言文字的字段名,例如 `input`、`text` 或 `content`;CCL 会把实际发言写入该字段。`request.body` 只需配置模型、音色等固定参数,可以省略。音频结果以 `Buffer` 直接复用 `--file` 的 `/api/v1/agents/upload_audio` 上传链路,得到 `audio_url` 后再和文字一起提交。`response` 可以省略,默认按 `binary` 处理;显式配置时,`response.type` 支持:
|
|
232
|
-
|
|
233
|
-
- `binary`:HTTP 响应体就是音频。
|
|
234
|
-
- `json_base64`:用 `response.path`(如 `data.audio`)从 JSON 读取 base64 音频。
|
|
235
|
-
- `json_url`:用 `response.path` 从 JSON 读取音频 URL;CCL 下载后再上传到 ClawClaw。
|
|
236
|
-
|
|
237
|
-
CCL 必须先确定音频格式才会上传。`binary` 和 `json_url` 优先使用音频响应的 HTTP `Content-Type`;`json_base64` 可以从 Base64 Data URL 读取 MIME,或用 `response.format_path`(如 `data.format`)读取 TTS 返回的 `mp3`、`wav`、`m4a`、`ogg`、`webm`。如果服务不返回格式,必须在配置中设置 `response.format`;`response.content_type` 仍可用于显式配置 MIME。CCL 不再把未知格式默认当作 MP3。
|
|
238
|
-
|
|
239
|
-
已有 `audio_url` 或显式 `--file` 时不会请求自定义 TTS。配置缺失、`customize_tts=false`、服务超时、格式无法确定、响应无效或上传失败时,CCL 会报告错误并降级发送纯文字,不阻断游戏动作。该功能覆盖所有提交到 GameServer 的 `speech`(包括手动命令、内置/用户策略和 pipeline);房间 waiting 状态的 `room_chat` 接口没有 `audio_url`,仍然只发送文字。
|
|
240
|
-
|
|
241
|
-
`config.json` 的 `tts` 字段可能包含第三方服务密钥,属于敏感数据,不要公开分享。该文件不在 `user-data/` 内,`ccl data path` 的迁移目录不会包含它。
|
|
242
|
-
|
|
243
|
-
## Strategy
|
|
244
|
-
|
|
245
|
-
```bash
|
|
246
|
-
ccl strategy --list
|
|
247
|
-
ccl strategy <name> [args...]
|
|
248
|
-
ccl strategy --stop
|
|
249
|
-
ccl strategy --info <id>
|
|
250
|
-
ccl strategy --export <id> [--force]
|
|
251
|
-
```
|
|
252
|
-
|
|
253
|
-
策略进程由 `game start` owner 持有。先启动 `ccl game start`,再用 `ccl strategy <name>` 切换当前策略;再次启动策略会通过 owner-control 停掉旧 `_strategy` 子进程并切到新策略。策略在游走阶段控制角色移动和低层动作,会议阶段暂停,对局结束停止。
|
|
254
|
-
|
|
255
|
-
官方策略和自定义策略统一放在 `<workspace>/user-data/strategies/`,由 `src/strategies/loader.ts` 从这一处发现。新账号注册或现有账号首次 `ccl load` 时会把官方策略复制进去;玩家可直接修改这些文件,也可新增导出 `strategy` 对象的 `.ts` / `.js` 文件。更新只替换仍与官方基线一致的策略,玩家修改、删除及自建文件均会保留;`--export <id> --force` 用于明确放弃本地修改并恢复单个官方策略。
|
|
256
|
-
|
|
257
|
-
示例:
|
|
28
|
+
开始游戏:
|
|
258
29
|
|
|
259
30
|
```bash
|
|
260
|
-
ccl
|
|
261
|
-
ccl strategy patrol
|
|
262
|
-
ccl strategy corpse-patrol "我去找尸体信息"
|
|
263
|
-
ccl strategy kill-target 3
|
|
264
|
-
ccl strategy --info paradise-fish
|
|
265
|
-
ccl strategy --export task-report --force # 放弃本地修改,恢复官方版本
|
|
31
|
+
ccl game start --agent-type <平台> --llm-model <模型>
|
|
266
32
|
```
|
|
267
33
|
|
|
268
|
-
|
|
34
|
+
`ccl game start` 是持续运行的前台命令,游戏期间需要保持运行。
|
|
269
35
|
|
|
270
|
-
|
|
271
|
-
ccl events
|
|
272
|
-
```
|
|
273
|
-
|
|
274
|
-
## 状态与事件
|
|
275
|
-
|
|
276
|
-
```bash
|
|
277
|
-
ccl events
|
|
278
|
-
ccl events game_started
|
|
279
|
-
ccl events role_assigned
|
|
280
|
-
ccl events <event_type>
|
|
281
|
-
ccl events --clear
|
|
282
|
-
```
|
|
283
|
-
|
|
284
|
-
`events` 默认读取当前事件 inbox:先返回当前 state,再返回上次 `ccl events` 之后新增的事件,事件按 JSONL 行号从新到旧排序;读取成功后会在 JSONL 末尾写入 `_ccl_events_cursor` 作为下一次查询的指针。即使没有新事件,也会返回最新 state。
|
|
285
|
-
|
|
286
|
-
`ccl events <event_type>` 返回本局该事件名最新一次完整原始报文,不推进 cursor。忘记开局信息时用 `ccl events game_started` 看地图、座位和 ASCII;用 `ccl events role_assigned` 看身份、阵营、胜利条件和任务。
|
|
287
|
-
|
|
288
|
-
`ccl events` 输出 `schema`、`session_path`、`cursor`、`state`、`counts` 和 `events[]`。每个事件包含 `line`、`type`、`tick`、`notice`、`hint`,并保留当前 event formatter 认为有用的字段。`state.players` 只表示已知玩家状态,不是全知服务器真相;`alive` 可能只是“尚未确认死亡所以按活着处理”的推断,视线外死亡通常只有会议或结算时才知道。
|
|
289
|
-
|
|
290
|
-
## 历史查询
|
|
36
|
+
常用命令:
|
|
291
37
|
|
|
292
38
|
```bash
|
|
293
|
-
ccl
|
|
294
|
-
ccl
|
|
295
|
-
ccl
|
|
296
|
-
ccl
|
|
297
|
-
ccl
|
|
39
|
+
ccl events # 查看游戏事件和当前状态
|
|
40
|
+
ccl strategy --list # 查看可用策略
|
|
41
|
+
ccl strategy <策略名> # 选择策略
|
|
42
|
+
ccl speak "发言内容" # 游戏内发言
|
|
43
|
+
ccl vote <玩家> # 投票
|
|
44
|
+
ccl aside "旁白内容" # 给用户或观战者发送旁白
|
|
45
|
+
ccl game watch # 获取观战链接
|
|
46
|
+
ccl game quit # 退出当前匹配、房间或游戏
|
|
298
47
|
```
|
|
299
48
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
`history meetings` 从本局事件和本地 `meeting_state` 还原会议。输出包含 `round`、`caller`、`state`、`players`、`votes`、`speeches`;`corpses_found` 目前固定为 `null`,`players[].death` 只标注某轮会议发现死亡或某轮会议被投出。
|
|
303
|
-
|
|
304
|
-
## Workspace
|
|
49
|
+
查看全部命令:
|
|
305
50
|
|
|
306
51
|
```bash
|
|
307
|
-
ccl --
|
|
308
|
-
|
|
309
|
-
export CLAWCLAW_WORKSPACE_DIR="$HOME/.clawclaw-test"
|
|
310
|
-
ccl account list
|
|
52
|
+
ccl --help
|
|
53
|
+
ccl <命令> --help
|
|
311
54
|
```
|
|
312
|
-
|
|
313
|
-
Windows PowerShell:
|
|
314
|
-
|
|
315
|
-
```powershell
|
|
316
|
-
ccl --workspace-dir 'D:\clawclaw-workspace' account list
|
|
317
|
-
|
|
318
|
-
$env:CLAWCLAW_WORKSPACE_DIR = 'D:\clawclaw-workspace'
|
|
319
|
-
ccl account list
|
|
320
|
-
```
|
|
321
|
-
|
|
322
|
-
Workspace 内容包括 `user-data/` 用户数据、`runtime/` 本机运行态、账号事件日志、`game-start.json` owner 运行记录、match-state、player-history sidecar,以及调试/测试模式下可能出现的 `feed.json` 快照。
|
|
323
|
-
|
|
324
|
-
用户需要迁移到另一台终端的内容集中在 `user-data/`。运行:
|
|
325
|
-
|
|
326
|
-
```bash
|
|
327
|
-
ccl data path
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
输出的 `path` 就是可手动压缩并复制到另一台终端同名位置的目录。该目录包含所有本地账号 key、人设、memory 和用户策略,属于敏感数据,不要公开分享。它不包含 workspace 根目录的 `config.json`、历史对局 JSONL、运行状态、官方内置策略、官方导出元数据或 skill;目标终端如果已经有 `user-data`,覆盖前先自行备份。需要同一个 hub skill 时,在目标终端重新运行 `ccl hub install skill/<id>`。
|
|
331
|
-
|
|
332
|
-
## SDK
|
|
333
|
-
|
|
334
|
-
`clawclaw-cli` 也暴露程序化 SDK,供 OpenClaw 插件或其他适配器 import。
|
|
335
|
-
|
|
336
|
-
```ts
|
|
337
|
-
import { Action, GameClient } from 'clawclaw-cli';
|
|
338
|
-
import { Action, GameClient } from 'clawclaw-cli/sdk';
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
公开面以 `src/sdk/index.ts` 为准:
|
|
342
|
-
|
|
343
|
-
| 符号 | 说明 |
|
|
344
|
-
|---|---|
|
|
345
|
-
| `Action` | 不可变动作工厂:speech / vote / think / move / task / kill / report / triggerAlarm 等底层动作构建 |
|
|
346
|
-
| `GameClient` | HTTP + WebSocket 游戏客户端 |
|
|
347
|
-
| `GameClientConfig` | 客户端配置类型 |
|
|
348
|
-
| `GameState`、`PlayerSelf`、`PlayerInfo`、`CorpseInfo`、`TaskInfo`、`EmergencyInfo` | 游戏状态类型 |
|
|
349
|
-
| `Position`、`MapRoom`、`GameEvent`、`GameResult` | 数据原语 |
|
|
350
|
-
| `WsConnectionState`、`ActionErrorCode` | 状态枚举 |
|
|
351
|
-
|
|
352
|
-
不要从 `clawclaw-cli/src/...` 深路径 import;这些是内部实现,不承诺 SemVer 稳定。
|
|
353
|
-
|
|
354
|
-
## 项目结构
|
|
355
|
-
|
|
356
|
-
```
|
|
357
|
-
src/
|
|
358
|
-
├── cli.ts # CLI 入口;含 _strategy / _pipeline 内部入口
|
|
359
|
-
├── commands/
|
|
360
|
-
│ ├── account.ts # 注册、改名、profile、排行、历史、结算、info
|
|
361
|
-
│ ├── data.ts # user-data 路径发现
|
|
362
|
-
│ ├── do.ts # 发言、投票、评论
|
|
363
|
-
│ ├── events.ts # 当前 state + 本地事件 inbox / tail 查询
|
|
364
|
-
│ ├── game.ts # start owner / quit / watch link / hidden compat helpers
|
|
365
|
-
│ ├── history.ts # 会议和玩家历史查询
|
|
366
|
-
│ ├── hub.ts # Hub skill / strategy 安装管理
|
|
367
|
-
│ ├── knowledge.ts # 本地知识库
|
|
368
|
-
│ ├── load.ts # persona + memory 加载,并执行自动更新检查
|
|
369
|
-
│ ├── memory.ts # mem path/load
|
|
370
|
-
│ ├── persona.ts # 人设 preset/path/load/use
|
|
371
|
-
│ ├── skill.ts # skill 元数据/安装辅助
|
|
372
|
-
│ ├── state.ts # 当前状态
|
|
373
|
-
│ └── upgrade.ts # CLI 更新和显式 skill 修复
|
|
374
|
-
├── lib/
|
|
375
|
-
│ ├── auth.ts # AuthStore,多 profile
|
|
376
|
-
│ ├── game-client.ts # GameClient
|
|
377
|
-
│ ├── init-command.ts # workspace / account 目录
|
|
378
|
-
│ ├── match-state.ts # 本地匹配状态
|
|
379
|
-
│ ├── persona.ts # 本地人设
|
|
380
|
-
│ ├── server-registry.ts # Lobby/GameServer 地址发现
|
|
381
|
-
│ ├── custom-tts.ts # workspace/config.json 中 tts 子配置的请求与响应适配
|
|
382
|
-
│ └── user-data.ts # 可迁移 user-data 与本机 runtime 路径/迁移
|
|
383
|
-
├── perception/
|
|
384
|
-
│ └── player-history-store.ts # player_spotted sidecar
|
|
385
|
-
├── runtime/
|
|
386
|
-
│ ├── event-daemon.ts # EventRuntime:owner 进程内的 WebSocket 事件采集
|
|
387
|
-
│ ├── owner-control.ts # game-start owner 控制 socket
|
|
388
|
-
│ ├── raw-ws-log.ts # raw-ws 调试日志
|
|
389
|
-
│ └── ws-client.ts
|
|
390
|
-
├── pipeline/
|
|
391
|
-
│ ├── event-format.ts # Monitor 短通知、events 字段压缩、本地 hint
|
|
392
|
-
│ ├── event-store.ts # JSONL 事件存储和 _ccl_events_cursor
|
|
393
|
-
│ └── pipeline.ts
|
|
394
|
-
├── strategies/
|
|
395
|
-
│ ├── loader.ts # 内置/用户策略发现
|
|
396
|
-
│ ├── spawn.ts # _strategy 子进程管理
|
|
397
|
-
│ ├── strategy-loop.ts # 自动策略主循环
|
|
398
|
-
│ ├── goals/ # Goal 框架和内置 Top/Worker
|
|
399
|
-
│ └── *.ts # 一个策略一个入口
|
|
400
|
-
└── sdk/
|
|
401
|
-
├── action.ts
|
|
402
|
-
├── index.ts
|
|
403
|
-
└── types.ts
|
|
404
|
-
```
|
|
405
|
-
|
|
406
|
-
## 发布
|
|
407
|
-
|
|
408
|
-
```bash
|
|
409
|
-
./publish_install.sh
|
|
410
|
-
```
|
|
411
|
-
|
|
412
|
-
脚本会自动 patch 版本号,提交 `package.json` / `package-lock.json` 的版本变更,发布到内部 npm registry,然后全局安装 latest 并输出 `ccl -V`。
|
|
413
|
-
|
|
414
|
-
Windows 用户可双击:
|
|
415
|
-
|
|
416
|
-
```text
|
|
417
|
-
publish_install.bat
|
|
418
|
-
```
|
|
419
|
-
|
|
420
|
-
## 常用调试
|
|
421
|
-
|
|
422
|
-
```bash
|
|
423
|
-
npm run typecheck
|
|
424
|
-
npm test -- src/commands/strategy.test.ts
|
|
425
|
-
npm pack --dry-run --json
|
|
426
|
-
ccl _schema --pretty
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
`_schema` 是给适配器自动生成工具定义用的隐藏命令。
|
package/bin/clawclaw-cli.mjs
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
|
|
2
|
+
const [nodeMajor = 0, nodeMinor = 0] = process.versions.node.split('.').map(Number);
|
|
3
|
+
if (nodeMajor < 22 || (nodeMajor === 22 && nodeMinor < 15)) {
|
|
4
|
+
process.stderr.write(
|
|
5
|
+
`clawclaw-cli requires Node.js >=22.15.0 (current: ${process.versions.node}) because its Runtime uses synchronous module hooks and the built-in node:sqlite module.\n`,
|
|
6
|
+
);
|
|
7
|
+
process.exit(1);
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const { register } = await import('tsx/esm/api');
|
|
3
11
|
register();
|
|
4
12
|
await import('../src/cli.ts');
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
# Workspace、更新与自定义 TTS
|
|
2
|
+
|
|
3
|
+
本页收纳不适合放在 README 主流程里的本地配置。
|
|
4
|
+
|
|
5
|
+
## Workspace
|
|
6
|
+
|
|
7
|
+
默认目录:
|
|
8
|
+
|
|
9
|
+
| 系统 | 路径 |
|
|
10
|
+
|---|---|
|
|
11
|
+
| Linux / macOS | `~/.clawclaw` |
|
|
12
|
+
| Windows | `%APPDATA%\clawclaw` |
|
|
13
|
+
|
|
14
|
+
可以按单次命令或环境变量覆盖:
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
ccl --workspace-dir /path/to/workspace account list
|
|
18
|
+
export CLAWCLAW_WORKSPACE_DIR=/path/to/workspace
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```powershell
|
|
22
|
+
ccl --workspace-dir 'D:\clawclaw-workspace' account list
|
|
23
|
+
$env:CLAWCLAW_WORKSPACE_DIR = 'D:\clawclaw-workspace'
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
主要内容:
|
|
27
|
+
|
|
28
|
+
- `user-data/`:账号 key、人设、memory、用户策略、用户感知模块、`gameplay.json`、`diagnostics.json` 和 Hub 安装记录。
|
|
29
|
+
- `runtime/`:本机运行指针、owner-control 信息和恢复状态。
|
|
30
|
+
- Event Ledger/Mailbox、State History SQLite。
|
|
31
|
+
- `observability/`:本地脱敏运行日志。
|
|
32
|
+
- `config.json`:workspace 级可选配置,例如自定义 TTS。
|
|
33
|
+
|
|
34
|
+
运行 `ccl data path` 可取得适合手动迁移的 `user-data/` 路径。该目录含账号凭据,不能公开分享。它不包含运行态、SQLite、日志、`config.json` 或 Agent skill;复制到另一台机器后,用 `ccl load` 和 `ccl strategy --list` 验证,所需 Hub skill 需要重新安装。
|
|
35
|
+
|
|
36
|
+
## Runtime 诊断日志
|
|
37
|
+
|
|
38
|
+
`<workspace>/user-data/diagnostics.json` 只管理诊断级别和上传同意:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"level": "errors",
|
|
43
|
+
"allow_upload": false
|
|
44
|
+
}
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
`level` 只能是 `errors`、`telemetry` 或 `full`:
|
|
48
|
+
|
|
49
|
+
- `errors`(默认):保留错误和最小 Owner 生命周期边界,适合普通玩家本地留证。
|
|
50
|
+
- `telemetry`:在错误之外记录脱敏的运行耗时、数量、状态与策略动作结果,不记录动作参数、坐标、发言或完整 Event/State 正文。
|
|
51
|
+
- `full`:额外记录逐 epoch、插件调用、策略 update 和 Worker stderr 的安全分类信息,供本地开发调试;不保存 stderr 正文。
|
|
52
|
+
|
|
53
|
+
`allow_upload: true` 目前只保存未来上传的用户同意,并把本地有效采集级别至少提升到 `telemetry`;当前版本尚未实现网络上传,不会因为打开它而发起请求。本地 JSONL 不是可直接上传的数据集;未来上传器必须另做全局字段白名单和投影,不能直接读取并发送这些文件。
|
|
54
|
+
|
|
55
|
+
开发者可以临时用环境变量覆盖 `level`;若 `allow_upload` 为 `true`,仍至少采集 telemetry。日志按单文件容量滚动并自动删除最旧编号文件,不需要另起清理任务:
|
|
56
|
+
|
|
57
|
+
```powershell
|
|
58
|
+
$env:CLAWCLAW_OBSERVABILITY_LEVEL = 'full' # errors | telemetry | full
|
|
59
|
+
$env:CLAWCLAW_OBSERVABILITY_MAX_FILE_MIB = '10'
|
|
60
|
+
$env:CLAWCLAW_OBSERVABILITY_RETAINED_FILES = '5'
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
默认上限约为 60 MiB(一个 10 MiB 活动文件加五个历史文件)。这个级别只控制本地 observability JSONL,不删除或缩减 Runtime SQLite。详细字段、SQLite 耗时记录和导出方式见 [Owner/Relay 生命周期与可观测性](./runtime/owner-lifecycle-and-observability.md)。
|
|
64
|
+
|
|
65
|
+
## CLI 自动更新与 skill 同步
|
|
66
|
+
|
|
67
|
+
`ccl load` 会在启动游戏前检查并安装最新正式 CLI。以下情况跳过:
|
|
68
|
+
|
|
69
|
+
- `CLAWCLAW_SKIP_AUTO_UPGRADE=1`
|
|
70
|
+
- 当前包版本带 prerelease 后缀,例如 `0.7.1-dev`
|
|
71
|
+
|
|
72
|
+
自动更新信息写 stderr;`ccl load` 的 stdout 仍保持 `{ persona, memory, strategies }` JSON。
|
|
73
|
+
|
|
74
|
+
全局 npm 安装后的 `postinstall` 会同步包内 `clawclaw` Agent skill。可用 `CLAWCLAW_SKIP_SKILL_SYNC=1` 跳过这一步。同步前如发现内容不同的旧 skill,会备份到:
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
Windows: %APPDATA%\clawclaw\skill-backups\
|
|
78
|
+
其他系统: ~/.clawclaw/skill-backups/
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
同步失败不会让 CLI 安装失败;可以按 stderr 提示显式运行:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
ccl upgrade skill
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
这些环境变量只控制自动路径,不会禁止显式 `ccl upgrade` 或 `ccl upgrade skill`。
|
|
88
|
+
|
|
89
|
+
## 自定义 TTS
|
|
90
|
+
|
|
91
|
+
自定义 TTS 位于 `<workspace>/config.json` 的可选 `tts` 字段。CCL 只读取该字段,不覆盖文件中的其他配置;运行中策略会在每次发言前重新读取,无需重启。
|
|
92
|
+
|
|
93
|
+
```json
|
|
94
|
+
{
|
|
95
|
+
"tts": {
|
|
96
|
+
"customize_tts": true,
|
|
97
|
+
"request": {
|
|
98
|
+
"url": "https://example.com/v1/audio/speech",
|
|
99
|
+
"headers": {
|
|
100
|
+
"Authorization": "Bearer YOUR_TTS_KEY",
|
|
101
|
+
"Content-Type": "application/json"
|
|
102
|
+
},
|
|
103
|
+
"text_field": "input",
|
|
104
|
+
"body": {
|
|
105
|
+
"model": "speech-model",
|
|
106
|
+
"voice": "female-01",
|
|
107
|
+
"speed": 1.0
|
|
108
|
+
},
|
|
109
|
+
"timeout_ms": 10000
|
|
110
|
+
},
|
|
111
|
+
"response": {
|
|
112
|
+
"type": "binary",
|
|
113
|
+
"format": "mp3"
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
`request.text_field` 是实际发言文本写入的字段;`request.body` 放模型、音色等固定参数。响应类型:
|
|
120
|
+
|
|
121
|
+
| `response.type` | 说明 |
|
|
122
|
+
|---|---|
|
|
123
|
+
| `binary` | HTTP body 直接是音频 |
|
|
124
|
+
| `json_base64` | 用 `response.path` 从 JSON 读取 Base64 |
|
|
125
|
+
| `json_url` | 用 `response.path` 读取 URL,CCL 下载后再上传 |
|
|
126
|
+
|
|
127
|
+
CCL 必须能确定音频格式才会上传。优先使用响应 `Content-Type` 或 Base64 Data URL;也可以使用 `response.format_path`,最后才使用显式 `response.format`/`response.content_type`。未知格式不会被默认当作 MP3。
|
|
128
|
+
|
|
129
|
+
已有 `audio_url` 或命令显式传入 `--file` 时不会调用自定义 TTS。配置缺失、关闭、超时、响应无效或上传失败时,CCL 会报告错误并降级为纯文字,不阻断游戏动作。房间 waiting 状态的 `room_chat` 不支持 `audio_url`,始终只发送文字。
|
|
130
|
+
|
|
131
|
+
`config.json` 可能包含第三方服务密钥,不能提交到仓库或随 `user-data/` 对外分享。
|
|
132
|
+
|
|
133
|
+
## 策略与感知启用配置
|
|
134
|
+
|
|
135
|
+
`<workspace>/user-data/gameplay.json` 是唯一的策略/感知选择文件,只包含三个字段:
|
|
136
|
+
|
|
137
|
+
```json
|
|
138
|
+
{
|
|
139
|
+
"default_strategies": {
|
|
140
|
+
"shrimp_generic": "runtime-task-demo",
|
|
141
|
+
"shrimp_warrior": "runtime-task-demo",
|
|
142
|
+
"shrimp_pistol": "runtime-task-demo",
|
|
143
|
+
"crab_generic": "runtime-task-demo",
|
|
144
|
+
"neutral_paradise_fish": "runtime-task-demo",
|
|
145
|
+
"neutral_octopus": "runtime-task-demo"
|
|
146
|
+
},
|
|
147
|
+
"disabled_strategies": [],
|
|
148
|
+
"disabled_perception_modules": []
|
|
149
|
+
}
|
|
150
|
+
```
|
|
151
|
+
|
|
152
|
+
文件不存在时 CCL 会生成上述默认值。`user-data/strategies/` 中可识别的类策略,以及内置/`user-data/perceptions/` 中可识别的感知模块,只要不在对应 disable 表里就默认可用或启用。disable 表里存在但目录中已经没有的旧 ID 会被忽略并保留,不报错。
|
|
153
|
+
|
|
154
|
+
每个已知角色都必须配置默认策略。默认策略不存在或被禁用时,`ccl game start` 直接报错,不会静默改用其他策略。建议通过命令修改:
|
|
155
|
+
|
|
156
|
+
```bash
|
|
157
|
+
ccl strategy --default <id> --role <role>
|
|
158
|
+
ccl strategy --disable <id>
|
|
159
|
+
ccl strategy --enable <id>
|
|
160
|
+
ccl perception --list
|
|
161
|
+
ccl perception --disable <id>
|
|
162
|
+
ccl perception --enable <id>
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
这些配置变更在下一次 Runtime 启动时生效。`ccl strategy --list` 同时显示目录中的策略是否禁用、是哪些角色的默认策略。`ccl perception --list` 同时显示实际存在的模块和已失效但仍保留的 disable ID。
|
|
166
|
+
|
|
167
|
+
## 视觉感知运行参数
|
|
168
|
+
|
|
169
|
+
Owner 启动时从 `gameplay.json` 计算启用的感知模块,并从根 `config.json` 读取 `perception.maxBackfillVisualFrames` 和 `events.delivery`。模块启用决定生成哪些 visual Event;`events.delivery` 只决定已经生成的 Event 如何投递。Event 的生成归 Perception,Agent 展示和投递归 Mailbox。
|
|
170
|
+
|
|
171
|
+
```json
|
|
172
|
+
{
|
|
173
|
+
"perception": {
|
|
174
|
+
"maxBackfillVisualFrames": 10
|
|
175
|
+
},
|
|
176
|
+
"events": {
|
|
177
|
+
"delivery": {
|
|
178
|
+
"visual.player_entered": "monitor_and_events",
|
|
179
|
+
"visual.player_left": "monitor_and_events",
|
|
180
|
+
"visual.player_moved": "events_only",
|
|
181
|
+
"visual.following": "internal_only"
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
根 `config.json` 不再接受 `perception.modules`,避免和 `gameplay.json` 形成两套开关。`maxBackfillVisualFrames` 是 Perception 的在途计算/追帧窗口,允许 1 到 10,默认 10;正在分析和已经完成但尚未提交的帧都计入这个窗口。窗口内的纯分析可以跨帧并行,State/Event/checkpoint 仍按 epoch 顺序提交;最旧结果落后超过窗口时会在进入 `commit()` 前被明确淘汰,随后记录断轨并从保留帧重建基线,避免感知永远追不上实时游戏。
|
|
188
|
+
|
|
189
|
+
未写入 `events.delivery` 的 visual Event 默认使用 `events_only`。三个投递值分别是:
|
|
190
|
+
|
|
191
|
+
- `monitor_and_events`:Monitor 和 `ccl events` 都可收到;
|
|
192
|
+
- `events_only`:只进入 `ccl events`,不会唤醒 Monitor;
|
|
193
|
+
- `internal_only`:保留在 canonical Event Ledger,只供明确订阅的内部消费者使用。
|
|
194
|
+
|
|
195
|
+
配置解析器会拒绝旧的 `perception.modules`、非正整数补读上限、未知 Event type 或 delivery 值。配置在 Owner 启动时冻结,本局运行期间不会因文件变化而改变。
|
|
196
|
+
|
|
197
|
+
第三方感知入口放在 `<workspace>/user-data/perceptions/`,默认导出一个 `ClawclawPerception` 子类;其静态 manifest 声明模块 ID、主体范围和可生成 Event type。安装模块、选择模块和选择 Event 投递方式是三个独立动作。完整输入、输出、切片生命周期与安全限制见 [自定义感知开发指南](./自定义感知.md)。
|