@a1hvdy/cc-openclaw 0.27.7 → 0.27.9

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.
Files changed (58) hide show
  1. package/dist/src/channels/adapter.d.ts +3 -2
  2. package/dist/src/channels/telegram-mirror/index.js +18 -6
  3. package/dist/src/channels/telegram-mirror/quota-reader.d.ts +2 -1
  4. package/dist/src/channels/telegram-mirror/soak-log.d.ts +4 -3
  5. package/dist/src/channels/telegram-mirror/state-machine.d.ts +2 -1
  6. package/dist/src/channels/telegram-mirror/sync-commands.d.ts +13 -2
  7. package/dist/src/channels/telegram-mirror/sync-commands.js +1 -1
  8. package/dist/src/command-router/index.d.ts +1 -1
  9. package/dist/src/command-router/launch-policy.d.ts +0 -6
  10. package/dist/src/command-router/launch-policy.js +7 -7
  11. package/dist/src/config/schema.d.ts +0 -16
  12. package/dist/src/constants.d.ts +0 -14
  13. package/dist/src/constants.js +0 -13
  14. package/dist/src/health/index.d.ts +1 -1
  15. package/dist/src/lib/auto-recovery.d.ts +0 -1
  16. package/dist/src/lib/auto-recovery.js +1 -1
  17. package/dist/src/lib/config.d.ts +0 -18
  18. package/dist/src/lib/config.js +0 -73
  19. package/dist/src/lib/debug-tap.d.ts +0 -2
  20. package/dist/src/lib/debug-tap.js +0 -12
  21. package/dist/src/lib/env-overrides.d.ts +0 -18
  22. package/dist/src/lib/env-overrides.js +0 -28
  23. package/dist/src/lib/error-formatter.d.ts +2 -1
  24. package/dist/src/lib/error-renderer.d.ts +1 -4
  25. package/dist/src/lib/error-renderer.js +0 -11
  26. package/dist/src/lib/status-tee-reader.d.ts +2 -1
  27. package/dist/src/lib/vendor-paths.d.ts +0 -4
  28. package/dist/src/lib/vendor-paths.js +2 -2
  29. package/dist/src/lifecycle/boot.d.ts +0 -11
  30. package/dist/src/lifecycle/boot.js +1 -1
  31. package/dist/src/logger.d.ts +0 -2
  32. package/dist/src/logger.js +0 -7
  33. package/dist/src/models.d.ts +2 -3
  34. package/dist/src/models.js +1 -1
  35. package/dist/src/observability/event-bus.d.ts +0 -10
  36. package/dist/src/observability/event-bus.js +0 -11
  37. package/dist/src/observability/perf-telemetry.d.ts +5 -6
  38. package/dist/src/observability/perf-telemetry.js +1 -1
  39. package/dist/src/patches/embedded-server-route.js +1 -1
  40. package/dist/src/patches/sysprompt-strip.d.ts +2 -2
  41. package/dist/src/patches/sysprompt-strip.js +2 -2
  42. package/dist/src/persistence/session-registry.d.ts +2 -1
  43. package/dist/src/session/persisted-sessions.d.ts +0 -2
  44. package/dist/src/session/persisted-sessions.js +2 -2
  45. package/dist/src/session-bootstrap/resume-registry.d.ts +0 -2
  46. package/dist/src/session-bootstrap/resume-registry.js +2 -2
  47. package/dist/src/session-bootstrap/sysprompt-strip.d.ts +0 -1
  48. package/dist/src/types/route.d.ts +0 -30
  49. package/dist/src/types/runtime-config.d.ts +1 -1
  50. package/dist/src/types/runtime-config.js +1 -1
  51. package/dist/src/types/sse.d.ts +0 -9
  52. package/dist/src/types/upstream.d.ts +0 -72
  53. package/dist/src/types/upstream.js +1 -22
  54. package/dist/src/types.d.ts +5 -22
  55. package/dist/src/types.js +1 -4
  56. package/package.json +1 -1
  57. package/dist/src/lib/index.d.ts +0 -7
  58. package/dist/src/lib/index.js +0 -10
@@ -10,7 +10,7 @@
10
10
  * If no fresh file exists (cold-boot, fetcher offline, >10min stale),
11
11
  * returns null. The /cc status panel renders "Plan: ?% (no data)" then.
12
12
  */
13
- export interface QuotaWindow {
13
+ interface QuotaWindow {
14
14
  usedPercent: number;
15
15
  resetsAt: number;
16
16
  }
@@ -26,3 +26,4 @@ export declare function readQuotaSnapshot(dir?: string): QuotaSnapshot | null;
26
26
  * Color emoji: 🟢 <60%, 🟡 60-85%, 🔴 >85%.
27
27
  */
28
28
  export declare function formatQuotaLine(snapshot: QuotaSnapshot | null): string;
29
+ export {};
@@ -1,7 +1,3 @@
1
- /** Package root — `<install>/extensions/cc-openclaw/`. */
2
- export declare const PACKAGE_ROOT: string;
3
- /** Engine library directory — points at compiled dist/src post-v0.7.0. */
4
- export declare const VENDOR_DIR: string;
5
1
  /**
6
2
  * Engine library file paths. Pre-v0.7.0 these pointed at `vendor/`; v0.7.0
7
3
  * consolidation repointed them at the canonical `dist/src/` build output.
@@ -21,9 +21,9 @@ import { dirname, join } from 'path';
21
21
  const __filename = fileURLToPath(import.meta.url);
22
22
  const __dirname = dirname(__filename);
23
23
  /** Package root — `<install>/extensions/cc-openclaw/`. */
24
- export const PACKAGE_ROOT = join(__dirname, '..', '..', '..');
24
+ const PACKAGE_ROOT = join(__dirname, '..', '..', '..');
25
25
  /** Engine library directory — points at compiled dist/src post-v0.7.0. */
26
- export const VENDOR_DIR = join(PACKAGE_ROOT, 'dist', 'src');
26
+ const VENDOR_DIR = join(PACKAGE_ROOT, 'dist', 'src');
27
27
  /**
28
28
  * Engine library file paths. Pre-v0.7.0 these pointed at `vendor/`; v0.7.0
29
29
  * consolidation repointed them at the canonical `dist/src/` build output.
@@ -46,14 +46,3 @@ export declare class Boot {
46
46
  run(): Promise<Config>;
47
47
  private runPhase;
48
48
  }
49
- export declare class BootPhaseError extends Error {
50
- readonly phase: BootPhase;
51
- readonly cause: Error;
52
- constructor(phase: BootPhase, cause: Error);
53
- /** True when the underlying error is a DriftError (phase 3 failure). */
54
- get isDrift(): boolean;
55
- /** True when the underlying error is a ConfigInvalid (phase 1 failure). */
56
- get isConfigInvalid(): boolean;
57
- /** Remediation message suitable for `cc-openclaw doctor` output. */
58
- remediation(): string;
59
- }
@@ -87,7 +87,7 @@ export class Boot {
87
87
  }
88
88
  }
89
89
  // ── BootPhaseError ────────────────────────────────────────────────────────────
90
- export class BootPhaseError extends Error {
90
+ class BootPhaseError extends Error {
91
91
  phase;
92
92
  cause;
93
93
  constructor(phase, cause) {
@@ -12,5 +12,3 @@ export interface Logger {
12
12
  }
13
13
  /** Create a console-backed logger with optional prefix and env-var level control. */
14
14
  export declare function createConsoleLogger(prefix?: string): Logger;
15
- /** No-op logger — useful in tests to suppress output. */
16
- export declare const nullLogger: Logger;
@@ -36,10 +36,3 @@ export function createConsoleLogger(prefix) {
36
36
  },
37
37
  };
38
38
  }
39
- /** No-op logger — useful in tests to suppress output. */
40
- export const nullLogger = {
41
- debug: () => { },
42
- info: () => { },
43
- warn: () => { },
44
- error: () => { },
45
- };
@@ -11,7 +11,7 @@ export interface ModelPricing {
11
11
  output: number;
12
12
  cached?: number;
13
13
  }
14
- export interface ModelDef {
14
+ interface ModelDef {
15
15
  /** Canonical model ID, e.g. 'claude-opus-4-6' */
16
16
  id: string;
17
17
  /** Which CLI engine to use */
@@ -27,8 +27,6 @@ export interface ModelDef {
27
27
  /** Context window size in tokens */
28
28
  contextWindow?: number;
29
29
  }
30
- /** Resolve a model string (id or alias) to its full definition. Returns undefined for unknown models. */
31
- export declare function lookupModel(idOrAlias: string): ModelDef | undefined;
32
30
  /** Resolve alias → canonical id. Returns the input unchanged if not an alias. */
33
31
  export declare function resolveAlias(alias: string): string;
34
32
  /** Resolve model string to engine + canonical model. Pattern fallback for unknown models. */
@@ -67,3 +65,4 @@ export declare function isClaudeModel(model: string): boolean;
67
65
  export declare function estimateTokens(text: string): number;
68
66
  /** Resolve a model string to its full definition. Throws for unknown models. */
69
67
  export declare function lookupModelStrict(idOrAlias: string): ModelDef;
68
+ export {};
@@ -164,7 +164,7 @@ for (const m of MODELS) {
164
164
  }
165
165
  // ─── Public API ──────────────────────────────────────────────────────────────
166
166
  /** Resolve a model string (id or alias) to its full definition. Returns undefined for unknown models. */
167
- export function lookupModel(idOrAlias) {
167
+ function lookupModel(idOrAlias) {
168
168
  return _byId.get(idOrAlias) || _byAlias.get(idOrAlias);
169
169
  }
170
170
  /** Resolve alias → canonical id. Returns the input unchanged if not an alias. */
@@ -10,16 +10,6 @@
10
10
  * Adding a new event requires only a type entry here — no subclass needed.
11
11
  */
12
12
  import type { Config } from '../config/schema.js';
13
- /**
14
- * EventBus payload-shape contract version. Bump on any breaking change to a
15
- * payload (rename, narrow type, remove key). Subscribers may ignore events
16
- * tagged with a version they don't understand.
17
- *
18
- * v0.13.0 introduces this constant. Adding new events to EventMap is NOT a
19
- * breaking change and does not require a bump; modifying an existing event's
20
- * payload shape IS breaking and requires a bump + migration plan.
21
- */
22
- export declare const EVENT_BUS_PROTOCOL_VERSION: "1";
23
13
  type SessionName = string & {
24
14
  readonly __brand: 'SessionName';
25
15
  };
@@ -9,17 +9,6 @@
9
9
  * EventMap keys use dot-notation: "session.started", "boot.ready", etc.
10
10
  * Adding a new event requires only a type entry here — no subclass needed.
11
11
  */
12
- // ── Protocol version ──────────────────────────────────────────────────────────
13
- /**
14
- * EventBus payload-shape contract version. Bump on any breaking change to a
15
- * payload (rename, narrow type, remove key). Subscribers may ignore events
16
- * tagged with a version they don't understand.
17
- *
18
- * v0.13.0 introduces this constant. Adding new events to EventMap is NOT a
19
- * breaking change and does not require a bump; modifying an existing event's
20
- * payload shape IS breaking and requires a bump + migration plan.
21
- */
22
- export const EVENT_BUS_PROTOCOL_VERSION = '1';
23
12
  // ── EventBus class ────────────────────────────────────────────────────────────
24
13
  export class EventBus {
25
14
  listeners = new Map();
@@ -26,26 +26,25 @@
26
26
  * directly; splitting would require operators to remember two paths and would
27
27
  * break the single `jq` pipeline. The `event` field makes filtering trivial.
28
28
  */
29
- export declare const PERF_TELEMETRY_PATH: string;
30
- export type PerfEventName = 'cache_check' | 'first_byte' | 'turn_end';
31
- export type CacheCheckCause = 'hit' | 'registry_empty' | 'hash_mismatch' | 'session_unknown' | 'disabled';
29
+ type PerfEventName = 'cache_check' | 'first_byte' | 'turn_end';
30
+ type CacheCheckCause = 'hit' | 'registry_empty' | 'hash_mismatch' | 'session_unknown' | 'disabled';
32
31
  interface PerfEventBase {
33
32
  event: PerfEventName;
34
33
  sessionKey?: string;
35
34
  }
36
- export interface CacheCheckEvent extends PerfEventBase {
35
+ interface CacheCheckEvent extends PerfEventBase {
37
36
  event: 'cache_check';
38
37
  outcome: 'hit' | 'miss';
39
38
  cause: CacheCheckCause;
40
39
  sysHash?: string;
41
40
  }
42
- export interface FirstByteEvent extends PerfEventBase {
41
+ interface FirstByteEvent extends PerfEventBase {
43
42
  event: 'first_byte';
44
43
  elapsed_ms: number;
45
44
  model?: string;
46
45
  tool_stream?: boolean;
47
46
  }
48
- export interface TurnEndEvent extends PerfEventBase {
47
+ interface TurnEndEvent extends PerfEventBase {
49
48
  event: 'turn_end';
50
49
  elapsed_ms: number;
51
50
  first_byte_ms?: number;
@@ -31,7 +31,7 @@ import { dirname, join } from 'node:path';
31
31
  import { homedir } from 'node:os';
32
32
  import { getPerfCacheTelemetryEnabled, isLogLevelDebug } from '../lib/config.js';
33
33
  const TELEMETRY_DIR = join(homedir(), '.openclaw', 'workspace', 'memory');
34
- export const PERF_TELEMETRY_PATH = join(TELEMETRY_DIR, 'sysprompt-cost.jsonl');
34
+ const PERF_TELEMETRY_PATH = join(TELEMETRY_DIR, 'sysprompt-cost.jsonl');
35
35
  function ensureDir(filePath) {
36
36
  const dir = dirname(filePath);
37
37
  if (!existsSync(dir))
@@ -53,7 +53,7 @@ export const embeddedServerRouteSpec = {
53
53
  install(_target) {
54
54
  // Drift-detection-only mode. Phase E#3 extracts the 9-step closure
55
55
  // from src/session-bootstrap/cwd-patch.ts:applyPatch and ports it
56
- // here (file budget: <200 LOC per INITIAL.md §NF2 — may require
56
+ // here (file budget: <200 LOC — may require
57
57
  // splitting some steps into helper modules).
58
58
  },
59
59
  uninstall(_target) {
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Pattern for Phase E#3:
9
9
  * 1. One file per logical patch under `src/patches/<id>.spec.ts`.
10
- * 2. File <200 LOC (INITIAL.md §NF2).
10
+ * 2. File <200 LOC.
11
11
  * 3. Exports a single `PatchSpec` instance as a named export.
12
12
  * 4. `resolve()` owns its upstream symbol lookup — no global target arg.
13
13
  * 5. `expectedShape` is sync, returns boolean; checks signature/props.
@@ -16,7 +16,7 @@
16
16
  * 8. A companion `tests/patches/<id>.test.ts` proves shape + mutation necessity.
17
17
  *
18
18
  * Functional source for sysprompt-strip lives at `src/lib/sysprompt-strip.ts`
19
- * (pure function, reused as-is per INITIAL.md §Reuse). The wrapper that
19
+ * (pure function, reused as-is). The wrapper that
20
20
  * registers it as a Claude Code prototype patch lives at
21
21
  * `src/session-bootstrap/sysprompt-strip.ts`. Phase E#3 converts that wrapper
22
22
  * into the structured PatchSpec form below.
@@ -7,7 +7,7 @@
7
7
  *
8
8
  * Pattern for Phase E#3:
9
9
  * 1. One file per logical patch under `src/patches/<id>.spec.ts`.
10
- * 2. File <200 LOC (INITIAL.md §NF2).
10
+ * 2. File <200 LOC.
11
11
  * 3. Exports a single `PatchSpec` instance as a named export.
12
12
  * 4. `resolve()` owns its upstream symbol lookup — no global target arg.
13
13
  * 5. `expectedShape` is sync, returns boolean; checks signature/props.
@@ -16,7 +16,7 @@
16
16
  * 8. A companion `tests/patches/<id>.test.ts` proves shape + mutation necessity.
17
17
  *
18
18
  * Functional source for sysprompt-strip lives at `src/lib/sysprompt-strip.ts`
19
- * (pure function, reused as-is per INITIAL.md §Reuse). The wrapper that
19
+ * (pure function, reused as-is). The wrapper that
20
20
  * registers it as a Claude Code prototype patch lives at
21
21
  * `src/session-bootstrap/sysprompt-strip.ts`. Phase E#3 converts that wrapper
22
22
  * into the structured PatchSpec form below.
@@ -28,7 +28,7 @@ export declare function asSessionName(s: string): SessionName;
28
28
  * - "session-only" → persist during session, delete on completion
29
29
  * - "never-persist" → never write to disk (e.g. ephemeral test sessions)
30
30
  */
31
- export type SkipPersistence = 'never' | 'session-only' | 'never-persist';
31
+ type SkipPersistence = 'never' | 'session-only' | 'never-persist';
32
32
  export interface SessionState {
33
33
  name: SessionName;
34
34
  pid?: number;
@@ -55,3 +55,4 @@ export declare class SessionRegistry {
55
55
  get size(): number;
56
56
  values(): IterableIterator<SessionState>;
57
57
  }
58
+ export {};
@@ -9,8 +9,6 @@
9
9
  */
10
10
  import type { EngineType } from '../types.js';
11
11
  import { type Logger } from '../logger.js';
12
- export declare const PERSIST_DIR: string;
13
- export declare const PERSIST_FILE: string;
14
12
  export interface PersistedSession {
15
13
  name: string;
16
14
  claudeSessionId: string;
@@ -12,8 +12,8 @@ import * as os from 'node:os';
12
12
  import * as path from 'node:path';
13
13
  import { createConsoleLogger } from '../logger.js';
14
14
  import { PERSIST_DISK_TTL_MS } from '../constants.js';
15
- export const PERSIST_DIR = path.join(os.homedir(), '.openclaw');
16
- export const PERSIST_FILE = path.join(PERSIST_DIR, 'claude-sessions.json');
15
+ const PERSIST_DIR = path.join(os.homedir(), '.openclaw');
16
+ const PERSIST_FILE = path.join(PERSIST_DIR, 'claude-sessions.json');
17
17
  /**
18
18
  * v0.27.4 (M4/M6) — resume-freshness gate. A persisted Claude session is
19
19
  * eligible for --resume only if its last activity is within `freshnessMs`.
@@ -9,8 +9,6 @@
9
9
  * Logger is passed explicitly so this module is fully self-contained — no
10
10
  * implicit module-level globals.
11
11
  */
12
- export declare const SAVVY_REGISTRY_PATH: string;
13
- export declare const CLAUDE_SESSIONS_PATH: string;
14
12
  interface ResumeLogger {
15
13
  info(msg: string): void;
16
14
  warn(msg: string): void;
@@ -15,8 +15,8 @@ import { join } from 'path';
15
15
  import { readJSONArraySafe } from '../lib/json-array.js';
16
16
  const HOME = homedir();
17
17
  const TAG = '[cc-openclaw/resume-registry]';
18
- export const SAVVY_REGISTRY_PATH = join(HOME, '.openclaw/savvy-resume-registry.json');
19
- export const CLAUDE_SESSIONS_PATH = join(HOME, '.openclaw/claude-sessions.json');
18
+ const SAVVY_REGISTRY_PATH = join(HOME, '.openclaw/savvy-resume-registry.json');
19
+ const CLAUDE_SESSIONS_PATH = join(HOME, '.openclaw/claude-sessions.json');
20
20
  /**
21
21
  * Seed claude-sessions.json from savvy-resume-registry.json on cold boot
22
22
  * (only when claude-sessions.json is empty or missing). One-shot recovery
@@ -15,7 +15,6 @@ export interface PluginApi {
15
15
  config?: Record<string, unknown>;
16
16
  }
17
17
  export { stripSysprompt, isStripEnabled } from '../lib/sysprompt-strip.js';
18
- export type { StripOptions, StripResult } from '../lib/sysprompt-strip.js';
19
18
  /**
20
19
  * Register sysprompt-strip's before_prompt_build hook.
21
20
  *
@@ -9,33 +9,3 @@
9
9
  * NOT consumed yet — Cluster A first commit establishes the vocabulary.
10
10
  */
11
11
  export type { OpenAIChatMessage, OpenAIChatCompletionRequest as RouteBody, OpenAIChatCompletionResponse as RouteResponse, OpenAIChatCompletionChunk as RouteStreamChunk, OpenAIToolCall, ParsedToolCalls, ExtractedMessage, AnthropicToolResultBlock, UserMessageBlock, } from '../openai-compat/openai-compat.js';
12
- /**
13
- * Headers cc-openclaw inspects on every `/v1/chat/completions` request.
14
- * `X-Session-Id` overrides the priority chain in `resolveSessionKey`.
15
- * `X-Session-Reset` forces `isNewConversation=true`.
16
- */
17
- export interface RouteHeaders {
18
- readonly 'x-session-id'?: string;
19
- readonly 'x-session-reset'?: string;
20
- readonly 'content-type'?: string;
21
- readonly authorization?: string;
22
- }
23
- /**
24
- * Query-string params consumed by the embedded server. Most endpoints
25
- * are JSON-body-driven; query is reserved for `/v1/sessions?cwd=…` style
26
- * filters and per-endpoint flags.
27
- */
28
- export type RouteQuery = Readonly<Record<string, string | undefined>>;
29
- /**
30
- * Parsed + validated route input. The shape Cluster B's `OpenAIBridge`
31
- * receives after the route-patch chain (cwd-patch.ts:582 — 9 transforms)
32
- * has run.
33
- */
34
- export interface ParsedRoute<TBody = unknown> {
35
- readonly path: string;
36
- readonly body: TBody;
37
- readonly headers: RouteHeaders;
38
- readonly query: RouteQuery;
39
- readonly sessionKey: string;
40
- readonly isNewConversation: boolean;
41
- }
@@ -42,7 +42,7 @@ export declare const RuntimeConfigSchema: z.ZodObject<{
42
42
  allowBuiltins: z.ZodDefault<z.ZodBoolean>;
43
43
  toolsPerMessage: z.ZodDefault<z.ZodBoolean>;
44
44
  /**
45
- * Native-tools allowList (Q1 resolution from INITIAL.md). Default at
45
+ * Native-tools allowList. Default at
46
46
  * v0.11.x matches the previously hardcoded `Set(['message.voice'])` in
47
47
  * `src/openai-compat/bridges/allowlist.ts` to preserve behavior. Override
48
48
  * via `CC_OPENCLAW_NATIVE_TOOLS_ALLOWLIST=` comma-separated. Expanded
@@ -59,7 +59,7 @@ export const RuntimeConfigSchema = z.object({
59
59
  allowBuiltins: z.boolean().default(false),
60
60
  toolsPerMessage: z.boolean().default(false),
61
61
  /**
62
- * Native-tools allowList (Q1 resolution from INITIAL.md). Default at
62
+ * Native-tools allowList. Default at
63
63
  * v0.11.x matches the previously hardcoded `Set(['message.voice'])` in
64
64
  * `src/openai-compat/bridges/allowlist.ts` to preserve behavior. Override
65
65
  * via `CC_OPENCLAW_NATIVE_TOOLS_ALLOWLIST=` comma-separated. Expanded
@@ -10,15 +10,6 @@
10
10
  */
11
11
  export type { OpenAIChatCompletionChunk as SseChunk, OpenAIToolCall, } from '../openai-compat/openai-compat.js';
12
12
  export type { AnthropicEvent, AnthropicMessage, MessageUsage, MessageDeltaBody, ContentBlockStart, ContentBlockDelta, ParsedEvent, CliStreamParser, } from '../openai-compat/cli-stream-parser.js';
13
- /**
14
- * OpenAI `finish_reason` values cc-openclaw emits after mapping from
15
- * Anthropic `stop_reason`:
16
- * end_turn / stop_sequence → 'stop'
17
- * tool_use → 'tool_calls'
18
- * max_tokens → 'length'
19
- * (cancelled / abort) → null (no finish_reason chunk)
20
- */
21
- export type FinishReason = 'stop' | 'tool_calls' | 'length' | null;
22
13
  /**
23
14
  * One delta in an OpenAI streaming chunk. Cluster B will tighten this when
24
15
  * `sse-translator.ts` is extracted into the typed boundary.
@@ -556,79 +556,7 @@ export declare const OpenClawConfigSchema: z.ZodObject<{
556
556
  commands: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
557
557
  }, z.ZodTypeAny, "passthrough">>;
558
558
  export type OpenClawConfig = z.infer<typeof OpenClawConfigSchema>;
559
- export declare const PluginManifestSchema: z.ZodObject<{
560
- id: z.ZodLiteral<"cc-openclaw">;
561
- enabledByDefault: z.ZodOptional<z.ZodBoolean>;
562
- activation: z.ZodOptional<z.ZodObject<{
563
- onStartup: z.ZodOptional<z.ZodBoolean>;
564
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
565
- onStartup: z.ZodOptional<z.ZodBoolean>;
566
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
567
- onStartup: z.ZodOptional<z.ZodBoolean>;
568
- }, z.ZodTypeAny, "passthrough">>>;
569
- configSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
570
- capabilities: z.ZodOptional<z.ZodObject<{
571
- childProcess: z.ZodOptional<z.ZodBoolean>;
572
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
573
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
574
- childProcess: z.ZodOptional<z.ZodBoolean>;
575
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
576
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
577
- childProcess: z.ZodOptional<z.ZodBoolean>;
578
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
579
- }, z.ZodTypeAny, "passthrough">>>;
580
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
581
- id: z.ZodLiteral<"cc-openclaw">;
582
- enabledByDefault: z.ZodOptional<z.ZodBoolean>;
583
- activation: z.ZodOptional<z.ZodObject<{
584
- onStartup: z.ZodOptional<z.ZodBoolean>;
585
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
586
- onStartup: z.ZodOptional<z.ZodBoolean>;
587
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
588
- onStartup: z.ZodOptional<z.ZodBoolean>;
589
- }, z.ZodTypeAny, "passthrough">>>;
590
- configSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
591
- capabilities: z.ZodOptional<z.ZodObject<{
592
- childProcess: z.ZodOptional<z.ZodBoolean>;
593
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
594
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
595
- childProcess: z.ZodOptional<z.ZodBoolean>;
596
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
597
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
598
- childProcess: z.ZodOptional<z.ZodBoolean>;
599
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
600
- }, z.ZodTypeAny, "passthrough">>>;
601
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
602
- id: z.ZodLiteral<"cc-openclaw">;
603
- enabledByDefault: z.ZodOptional<z.ZodBoolean>;
604
- activation: z.ZodOptional<z.ZodObject<{
605
- onStartup: z.ZodOptional<z.ZodBoolean>;
606
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
607
- onStartup: z.ZodOptional<z.ZodBoolean>;
608
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
609
- onStartup: z.ZodOptional<z.ZodBoolean>;
610
- }, z.ZodTypeAny, "passthrough">>>;
611
- configSchema: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
612
- capabilities: z.ZodOptional<z.ZodObject<{
613
- childProcess: z.ZodOptional<z.ZodBoolean>;
614
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
615
- }, "passthrough", z.ZodTypeAny, z.objectOutputType<{
616
- childProcess: z.ZodOptional<z.ZodBoolean>;
617
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
618
- }, z.ZodTypeAny, "passthrough">, z.objectInputType<{
619
- childProcess: z.ZodOptional<z.ZodBoolean>;
620
- networkAccess: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
621
- }, z.ZodTypeAny, "passthrough">>>;
622
- }, z.ZodTypeAny, "passthrough">>;
623
- export type PluginManifest = z.infer<typeof PluginManifestSchema>;
624
559
  type AgentEntry = z.infer<typeof AgentEntrySchema>;
625
- /**
626
- * Extract the agent list from either of the two `agents` shapes:
627
- * - direct array (legacy): `agents: [...]`
628
- * - container (canonical): `agents: { list: [...] }`
629
- * Returns `[]` when neither shape applies.
630
- */
631
- export declare function getAgentList(cfg: OpenClawConfig): ReadonlyArray<AgentEntry>;
632
560
  /**
633
561
  * Read the `agents.defaults.model.primary` (or top-level string) from an
634
562
  * OpenClaw config, normalizing the same two shapes `model` may take:
@@ -60,34 +60,13 @@ export const OpenClawConfigSchema = z
60
60
  commands: z.record(z.unknown()).optional(),
61
61
  })
62
62
  .passthrough();
63
- // ── openclaw.plugin.json (this plugin's own manifest) ────────────────────────
64
- export const PluginManifestSchema = z
65
- .object({
66
- id: z.literal('cc-openclaw'),
67
- enabledByDefault: z.boolean().optional(),
68
- activation: z
69
- .object({
70
- onStartup: z.boolean().optional(),
71
- })
72
- .passthrough()
73
- .optional(),
74
- configSchema: z.record(z.unknown()).optional(),
75
- capabilities: z
76
- .object({
77
- childProcess: z.boolean().optional(),
78
- networkAccess: z.array(z.string()).optional(),
79
- })
80
- .passthrough()
81
- .optional(),
82
- })
83
- .passthrough();
84
63
  /**
85
64
  * Extract the agent list from either of the two `agents` shapes:
86
65
  * - direct array (legacy): `agents: [...]`
87
66
  * - container (canonical): `agents: { list: [...] }`
88
67
  * Returns `[]` when neither shape applies.
89
68
  */
90
- export function getAgentList(cfg) {
69
+ function getAgentList(cfg) {
91
70
  const a = cfg.agents;
92
71
  if (!a)
93
72
  return [];
@@ -1,11 +1,9 @@
1
1
  /**
2
2
  * Shared types for openclaw-claude-code plugin
3
3
  */
4
- import type { ModelPricing, ProviderName, ModelDef } from './models.js';
5
- export type { ModelPricing, ProviderName, ModelDef };
6
- export { getModelPricing, overrideModelPricing, _resetPricingOverrides, getModelList, resolveAlias, resolveEngineAndModel, resolveProvider, getContextWindow, isGeminiModel, isClaudeModel, estimateTokens, lookupModelStrict, getAliases, } from './models.js';
7
- export declare const MODEL_ALIASES: Record<string, string>;
8
- export type PermissionMode = 'acceptEdits' | 'bypassPermissions' | 'default' | 'delegate' | 'dontAsk' | 'plan' | 'auto';
4
+ import type { ModelPricing } from './models.js';
5
+ export { getModelPricing, overrideModelPricing } from './models.js';
6
+ type PermissionMode = 'acceptEdits' | 'bypassPermissions' | 'default' | 'delegate' | 'dontAsk' | 'plan' | 'auto';
9
7
  export type EffortLevel = 'low' | 'medium' | 'high' | 'max' | 'auto';
10
8
  export type EngineType = 'claude' | 'codex' | 'gemini' | 'cursor' | 'custom';
11
9
  export interface CustomEngineConfig {
@@ -220,16 +218,6 @@ export interface HookConfig {
220
218
  onTurnComplete?: string;
221
219
  onStopFailure?: string;
222
220
  }
223
- export interface ActiveSession {
224
- config: SessionConfig;
225
- claudeSessionId?: string;
226
- created: string;
227
- stats: SessionStats;
228
- hooks: HookConfig;
229
- paused: boolean;
230
- busy: boolean;
231
- currentEffort?: EffortLevel;
232
- }
233
221
  export interface SendOptions {
234
222
  effort?: EffortLevel;
235
223
  plan?: boolean;
@@ -275,11 +263,6 @@ export interface SendResult {
275
263
  error?: string;
276
264
  events: StreamEvent[];
277
265
  }
278
- export interface GrepMatch {
279
- time: string;
280
- type: string;
281
- content: string;
282
- }
283
266
  export interface AgentInfo {
284
267
  name: string;
285
268
  file: string;
@@ -418,7 +401,7 @@ export interface UltrareviewResult {
418
401
  endTime?: string;
419
402
  error?: string;
420
403
  }
421
- export type CouncilEventType = 'session-start' | 'round-start' | 'agent-start' | 'agent-chunk' | 'agent-tool' | 'agent-complete' | 'round-end' | 'complete' | 'error';
404
+ type CouncilEventType = 'session-start' | 'round-start' | 'agent-start' | 'agent-chunk' | 'agent-tool' | 'agent-complete' | 'round-end' | 'complete' | 'error';
422
405
  export interface CouncilEvent {
423
406
  type: CouncilEventType;
424
407
  sessionId: string;
@@ -474,7 +457,7 @@ export interface CouncilSession {
474
457
  finalSummary?: string;
475
458
  compactContext?: string;
476
459
  }
477
- export type CouncilFileStatus = 'clean' | 'needs_rework' | 'redundant' | 'missing';
460
+ type CouncilFileStatus = 'clean' | 'needs_rework' | 'redundant' | 'missing';
478
461
  export interface CouncilChangedFile {
479
462
  file: string;
480
463
  status: CouncilFileStatus;
package/dist/src/types.js CHANGED
@@ -1,7 +1,4 @@
1
1
  /**
2
2
  * Shared types for openclaw-claude-code plugin
3
3
  */
4
- import { getAliases } from './models.js';
5
- export { getModelPricing, overrideModelPricing, _resetPricingOverrides, getModelList, resolveAlias, resolveEngineAndModel, resolveProvider, getContextWindow, isGeminiModel, isClaudeModel, estimateTokens, lookupModelStrict, getAliases, } from './models.js';
6
- // Backward compat: MODEL_ALIASES as a static object
7
- export const MODEL_ALIASES = getAliases();
4
+ export { getModelPricing, overrideModelPricing } from './models.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@a1hvdy/cc-openclaw",
3
- "version": "0.27.7",
3
+ "version": "0.27.9",
4
4
  "description": "A1xAI's Anthropic CLI bridge plugin for OpenClaw",
5
5
  "author": "@a1cy",
6
6
  "license": "MIT",
@@ -1,7 +0,0 @@
1
- export * from './register-guard.js';
2
- export { registerOnce } from './register-guard.js';
3
- export { stripSysprompt, isStripEnabled, type StripOptions, type StripResult } from './sysprompt-strip.js';
4
- export { isCacheParityEnabled, hashPrompt, recordAttachment, readRegistry, REGISTRY_PATH, type RegistryEntry, } from './cache-parity.js';
5
- export { selectEngine, isCcOpenclawEnabled, captureSessionRoute, ACTIVE_FLAG_ENV, ROUTE_FLAG_ENV, type Engine, type SessionRoute, } from './config-service.js';
6
- export { isTestMode, TEST_MODE_ENV, _setTestModeForTests } from './test-mode.js';
7
- export { getAggressiveStripEnabled, getCacheParityEnabled, getLogLevel, isLogLevelDebug, } from './config.js';
@@ -1,10 +0,0 @@
1
- export * from './register-guard.js';
2
- export { registerOnce } from './register-guard.js';
3
- export { stripSysprompt, isStripEnabled } from './sysprompt-strip.js';
4
- export { isCacheParityEnabled, hashPrompt, recordAttachment, readRegistry, REGISTRY_PATH, } from './cache-parity.js';
5
- // Engine routing — originally `./route-flag.js`; collapsed into
6
- // `./config-service.js` at Cluster A step 8. Same API, same semantics,
7
- // single source of truth.
8
- export { selectEngine, isCcOpenclawEnabled, captureSessionRoute, ACTIVE_FLAG_ENV, ROUTE_FLAG_ENV, } from './config-service.js';
9
- export { isTestMode, TEST_MODE_ENV, _setTestModeForTests } from './test-mode.js';
10
- export { getAggressiveStripEnabled, getCacheParityEnabled, getLogLevel, isLogLevelDebug, } from './config.js';