/** * @myclaw163/clawclaw-cli — Public SDK * ───────────────────────────────── * 此文件是 @myclaw163/clawclaw-cli 对外的**公开 API**入口,通过 `package.json` 的 * `exports` 字段同时暴露在 `@myclaw163/clawclaw-cli` 与 `@myclaw163/clawclaw-cli/sdk` 两个 sub-path。 * * 下游项目(适配器、MCP server、其他 agent 集成等)应当只 import 本文件 * 重新 export 的符号;凡是从 `@myclaw163/clawclaw-cli/src/...` 深路径直接 import 的, * 视为内部实现,**不在 SemVer 承诺范围内**,可能在任意 minor 版本变更。 * * 公开符号: * · Action — 不可变动作工厂(move/kill/speech/vote/...) * · GameClient — HTTP + WebSocket 游戏客户端 * · GameClientConfig — 客户端配置类型 * · GameState / GameSelf / KnownPlayer / VisiblePlayer / VisibleCorpse / * Position / GameEvent(与三个玩家模块共用的 GameSync v2 契约) * · MapRoom / GameResult / WsConnectionState / ActionErrorCode(客户端类型) * * 自定义模块的基类也可以从根入口导入;希望依赖更小的模块面时,从 * `strategy-plugin` 或 `perception-plugin` 导入。Strategy 使用 * `StrategyInput`;感知通过 `PerceptionModuleInput` 读取 `ObservationFrame` / `GameState` * 数据边界。包内 `src/...` 深路径仍不是公开 API。 * * 新增 / 删除本文件的 export 必须走 minor / major 版本号;字段语义变更同理。 */ export { Action } from './action.js'; export type { StrategyMemory, StrategyMemoryValue } from './strategy-memory.js'; export { getTaskAvailability, getAvailableTasks, isTaskAvailable, getTaskKind } from './task-availability.js'; export type { GameTaskAvailability, GameTaskKind } from './module-input/index.js'; export { GameClient } from '../lib/game-client.js'; export type { GameClientConfig } from '../lib/game-client.js'; export type { BehaviorInput, BehaviorScope, GameEvent, GameKiller, GamePlayerActivity, GameSelf, GameState, GameTask, GameEmergency, GameMeeting, GameOctopusTime, GameWinner, KnownPlayer, ObservationFrame, PlayerRef, Position, VisualCorpse, VisualObservation, VisualPlayer, VisualPosition, VisibleCorpse, VisiblePlayer, } from './module-input/index.js'; export type { BehaviorActivationLayer, BehaviorDecision, BehaviorEventProposal, BehaviorExecution, BehaviorFinish, BehaviorInputFieldSpec, BehaviorNormalizationApi, BehaviorPathQuery, BehaviorReadApi, BehaviorRuntimeDefaults, BehaviorStatus, ClawclawBehaviorClass, ClawclawBehaviorManifest, FiniteBehaviorDecision, GameAction, ObservedCorpse, ObservedPlayer, SpatialApi, SpatialPosition, SpatialRoom, } from './behavior-plugin/index.js'; export { BEHAVIOR_PLUGIN_API_VERSION, ClawclawBehavior, } from './behavior-plugin/index.js'; export type { ClawclawTriggerClass, ClawclawTriggerManifest, TriggerInput, TriggerMatch, TriggerReadApi, TriggerRearm, TriggerResetReason, } from './trigger-plugin/index.js'; export { ClawclawTrigger, MAX_TRIGGER_RUNTIME_MS, TRIGGER_PLUGIN_API_VERSION, } from './trigger-plugin/index.js'; export type { PerceptionModuleManifest, PerceptionModuleInput, PerceptionModuleResult, PerceptionModuleEvent, PerceptionModuleApi, ClawclawReactionManifest, ReactionBehaviorBinding, ReactionActivation, ReactionInput, ReactionResult, ClawclawPerceptionClass, ClawclawPerceptionEventMetadata, ClawclawPerceptionManifest, Direction, PerceptionAnalysisInput, PerceptionApi, PerceptionBoundary, PerceptionBoundaryKind, PerceptionEventProposal, PerceptionFrame, PerceptionMapRoom, PerceptionSpatialApi, PerceptionSubjectScope, Vec, } from './perception-plugin/index.js'; export { ClawclawReaction, ClawclawParallelPerception, ClawclawPerception, MOVE_MIN_PX, PERCEPTION_PLUGIN_API_VERSION, PERCEPTION_MODULE_API_VERSION, STEP_MOVE_MIN_PX, STILL_STEP_MAX_PX, TICK_MS, actorLabel, actorValue, angleDegrees, cosine, cross, direction, distance, dot, headingDirection, length, positionCopy, round1, timeRange, unit, vector, } from './perception-plugin/index.js'; export type { MapRoom, GameResult, WsConnectionState, ActionErrorCode, } from './types.js'; export { ClawclawStrategy, STRATEGY_PLUGIN_API_VERSION } from './strategy-plugin/index.js'; export type { StrategyActivationLayer, StrategyBooleanInputField, StrategyContinuation, StrategyDecide, StrategyDecision, StrategyDecisionAction, StrategyDecisionFrame, StrategyDecisionFrameStatus, StrategyDelegatedStrategyResult, StrategyDelegation, StrategyEnumInputField, StrategyEventProposal, StrategyExecution, StrategyFinish, StrategyInput, StrategyInputFieldSpec, StrategyNormalizationApi, StrategyNumberInputField, StrategyPathQuery, StrategyPlayerSeatInputField, StrategyPlayerSeatsInputField, StrategyReadApi, StrategyRuntimeDefaults, StrategyScope, StrategyStateMode, StrategyStatus, StrategyStringInputField, StrategyStringListInputField, StrategyTiming, ClawclawStrategyClass, ClawclawStrategyManifest, FiniteStrategyDecision, } from './strategy-plugin/index.js'; export type { PerceptionStrategyBinding, PerceptionStrategyActivation } from './perception-plugin/module.js';