@livx.cc/agentx 0.99.78 → 0.99.80

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { a as AgentOptions, H as Hooks, n as RunResult, A as Agent, g as PermissionPolicy } from './Agent-BBlKI8uD.js';
2
- export { C as ChatFragment, b as Classification, c as Classifier, d as CompactResult, D as DEFAULT_MUTATING, e as Decision, M as ModelRouter, f as ModelRouterOptions, P as PermissionOptions, h as PermissionRule, i as PreToolUseDecision, R as ReasoningEffort, j as RecordingHooks, k as RecordingLifecycle, l as RouteDecision, m as RouterState, T as Tier, o as ToolUse, p as ToolUseMeta, q as claudeCodeDisallowedTools, r as composeHooks, s as estimateTokens, t as jevAvailable, u as jevClassifier, v as pickTier, w as planMode, x as reasoningToChatFragment } from './Agent-BBlKI8uD.js';
1
+ import { a as AgentOptions, H as Hooks, n as RunResult, A as Agent, g as PermissionPolicy } from './Agent-BK-heHrw.js';
2
+ export { C as ChatFragment, b as Classification, c as Classifier, d as CompactResult, D as DEFAULT_MUTATING, e as Decision, M as ModelRouter, f as ModelRouterOptions, P as PermissionOptions, h as PermissionRule, i as PreToolUseDecision, R as ReasoningEffort, j as RecordingHooks, k as RecordingLifecycle, l as RouteDecision, m as RouterState, T as Tier, o as ToolUse, p as ToolUseMeta, q as claudeCodeDisallowedTools, r as composeHooks, s as estimateTokens, t as jevAvailable, u as jevClassifier, v as pickTier, w as planMode, x as reasoningToChatFragment } from './Agent-BK-heHrw.js';
3
3
  export { MODEL_ALIASES, ModelSwitch, ResolveModelSwitchOpts, modelShortLabel, resolveModelAlias, resolveModelSwitch } from './models.js';
4
4
  import { IFilesystem, FileMetadata } from '@livx.cc/wcli/core';
5
5
  export { CommandExecutor, FileMetadata, IFilesystem, IndexedDbFilesystem, MemFilesystem, registerHeadlessCommands } from '@livx.cc/wcli/core';
@@ -18,17 +18,32 @@ export { log } from 'libx.js/src/modules/log';
18
18
  * The VFS path space ('/...') maps under baseDir, so the same agent/tools/commands
19
19
  * run unchanged against disk or memory — complete mem↔disk interchangeability.
20
20
  * Semantics mirror MemFilesystem (throws on missing parent / existing dir / etc.).
21
+ *
22
+ * Windows (see hostPath.ts): incoming host paths (`C:\…`, backslashes) are translated to VFS form
23
+ * first, and a `baseDir` of '/' is the whole machine — `/c/…` is drive C:, '/' lists the drives.
24
+ * Name aliases that would let a path spell one name and open another (alternate data streams,
25
+ * trailing dots, device names, 8.3 short names) are refused, so name-based policy above this
26
+ * backend (the jail's denylist) sees the name that is actually opened.
21
27
  */
22
28
  declare class NodeDiskFilesystem implements IFilesystem {
23
29
  private baseDir;
24
30
  private cwd;
25
31
  private opts;
32
+ private readonly win;
33
+ /** Windows + baseDir '/': the VFS root is the machine (drives as first segment), not a directory. */
34
+ private readonly drives;
26
35
  constructor(baseDir: string, opts?: {
27
36
  denySymlinks?: boolean;
28
37
  });
29
38
  /** Ensure the root dir exists. */
30
39
  init(): Promise<void>;
31
40
  private real;
41
+ /** Windows machine root ('/' when baseDir is '/'): a synthetic directory listing the drives. */
42
+ private isDriveRoot;
43
+ /** Windows: refuse an 8.3 short name (`ENV~1` opens `.env`) — the only alias that needs the disk to
44
+ * detect. Only segments that look like one (`~<digit>`) cost a lookup: the OS's long name for that
45
+ * component must be the name that was asked for. */
46
+ private assertLongNames;
32
47
  private verified;
33
48
  private static VERIFY_TTL_MS;
34
49
  /** Throw if any existing component of `real` is a symlink (escape vector). */
@@ -57,6 +72,8 @@ declare class NodeDiskFilesystem implements IFilesystem {
57
72
  stat(path: string): Promise<FileMetadata>;
58
73
  isDirectory(path: string): Promise<boolean>;
59
74
  isFile(path: string): Promise<boolean>;
75
+ /** Windows machine root: the drive letters that are mounted (`/c`, `/d`, …). */
76
+ private listDrives;
60
77
  }
61
78
 
62
79
  /**
@@ -119,6 +136,8 @@ declare class JailedFilesystem implements IFilesystem {
119
136
  private roRe;
120
137
  private confineRe?;
121
138
  constructor(inner: IFilesystem, options?: Partial<JailOptions>);
139
+ /** Resolved VFS path — host-path syntax (Windows `C:\…`, backslashes) is normalized FIRST, so the
140
+ * deny/readonly/confine globs always match the path that is actually opened. */
122
141
  private abs;
123
142
  /** Throw if reading `path` is not permitted (denied or out of confinement). */
124
143
  private guardRead;
@@ -1133,6 +1152,11 @@ declare class DuplexAgent {
1133
1152
  /** Lazily resolved memory tools (async loadMemory runs in initMemory). */
1134
1153
  private memoryReady;
1135
1154
  constructor(options?: Partial<DuplexAgentOptions>);
1155
+ /** A claude-code/* reflex (the keyless stand-in when the fast model's provider has no key): Claude Code runs its own
1156
+ * tool loop and takes no host tool schemas, so the reflex's tools (Act/Think/Hold…) reach it through the in-process
1157
+ * `agentx` MCP bridge (ccBridge 'all', which needs a warm session), with Claude Code's OWN tools off (`tools: []`) and
1158
+ * no other MCP server — the reflex only talks and routes; real work still goes through Act and its policy. */
1159
+ private claudeCodeReflex;
1136
1160
  /** Resolve memory tools + inject index into voice system prompt (once). */
1137
1161
  private initMemory;
1138
1162
  /** Forward what the reflex's spoken-stream gates allow (text_delta → host/TTS; forwarded audio can't be unsent):
@@ -1197,6 +1221,7 @@ declare class DuplexAgent {
1197
1221
  * hosts/tests key on it. */
1198
1222
  private static readonly FALLBACK_ACKS;
1199
1223
  private static readonly FALLBACK_RETRY;
1224
+ private static readonly FALLBACK_ERROR;
1200
1225
  private static readonly FALLBACK_OWN;
1201
1226
  private lastFallback;
1202
1227
  /** One user turn: the voice agent streams the reply (and may Act/Think). Serialized with re-voice turns.