@livx.cc/agentx 0.99.122 → 0.99.124

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,15 +1,15 @@
1
- import { c as AgentOptions, H as Hooks, v as RunResult, i as Decider, b as Agent, o as PermissionPolicy, G as Gender, L as LineKind, C as ChannelMode, w as SecondChannelOptions, S as SecondChannel } from './secondChannel-BddfVzTp.js';
2
- export { A as ADVISE_LIMIT, a as AdvisorSetup, d as ChatFragment, e as ChatUsage, f as Classification, g as Classifier, h as CompactResult, D as DEFAULT_MUTATING, j as Decision, M as ModelRouter, k as ModelRouterOptions, P as PLANNER_BLOCKED, l as PLANNER_REFUSAL, m as PLAN_FIRST, n as PermissionOptions, p as PermissionRule, q as PreToolUseDecision, R as ReasoningEffort, r as RecordingHooks, s as RecordingLifecycle, t as RouteDecision, u as RouterState, T as Tier, x as ToolUse, y as ToolUseMeta, W as WRITE_TOOLS, z as advisorFor, B as advisorPrompt, E as claudeCodeDisallowedTools, F as composeHooks, I as delegatePrompt, J as delegateTools, K as delegateWorkerFor, N as estimateTokens, O as jevAvailable, Q as jevClassifier, U as makeAdvisor, V as meterWorkers, X as pickTier, Y as planMode, Z as reasoningToChatFragment } from './secondChannel-BddfVzTp.js';
1
+ import { c as AgentOptions, H as Hooks, x as RunResult, k as Decider, b as Agent, q as PermissionPolicy, G as Gender, L as LineKind, d as ChannelMode, y as SecondChannelOptions, S as SecondChannel } from './secondChannel-GFT69ax4.js';
2
+ export { A as ADVISE_LIMIT, a as AdvisorSetup, C as CC_WRITE_TOOLS, e as ChatFragment, f as ChatUsage, g as Classification, h as Classifier, i as CompactResult, j as ContextFileSpec, D as DEFAULT_MUTATING, l as Decision, M as ModelRouter, m as ModelRouterOptions, P as PLANNER_BLOCKED, n as PLANNER_REFUSAL, o as PLAN_FIRST, p as PermissionOptions, r as PermissionRule, s as PreToolUseDecision, R as ReasoningEffort, t as RecordingHooks, u as RecordingLifecycle, v as RouteDecision, w as RouterState, T as Tier, z as ToolUse, B as ToolUseMeta, W as WRITE_TOOLS, E as advisorFor, F as advisorPrompt, I as ccModeOptions, J as claudeCodeDisallowedTools, K as composeHooks, N as delegatePrompt, O as delegateTools, Q as delegateWorkerFor, U as estimateTokens, V as jevAvailable, X as jevClassifier, Y as loadContextFiles, Z as loadInstructions, _ as makeAdvisor, $ as meterWorkers, a0 as pickTier, a1 as planMode, a2 as plannerBlocks, a3 as reasoningToChatFragment } from './secondChannel-GFT69ax4.js';
3
3
  export { MODEL_ALIASES, ModelSwitch, ResolveModelSwitchOpts, latestClaude, 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';
6
6
  import { BodDB } from '@bod.ee/db';
7
- import { A as AgentTool, C as ChatLike, a as ChatOptions, b as ChatResponse, r as ToolCall, H as HostBridge, U as UserQuestion, o as MessageContent } from './tools-DZHZIyxh.js';
8
- export { c as ContentPart, d as HostEvent, I as IMAGE_ELIDE_STUB, e as IMAGE_REF_SCHEME, f as ImageRef, J as JobCtx, g as JobHandle, h as JobInfo, i as JobKind, j as JobNotice, k as JobRegistry, l as JobRegistryOptions, n as JobTrackOptions, M as Message, m as RegistryJobStatus, R as Role, S as SandboxJobRegistry, p as StreamChunk, T as TodoItem, q as Tool, s as ToolContext, t as bashTool, u as clearImageRefs, v as contentBytes, w as contentText, x as defaultTools, y as editTool, z as elideImages, B as elideInlineImages, D as elideStaleImages, E as exitSessionTool, F as expandImagesForSend, G as formatJobNotice, K as imagePart, L as imageRefPart, N as imageRefResult, O as makeContext, P as makeJobTools, Q as messageHasImage, V as messageHasImageRef, W as messageHasInlineImage, X as mintImageRef, Y as parseImageRef, Z as readTool, _ as remintImageRefs, $ as sendBytes, a0 as sendBytesPer, a1 as toWireTools, a2 as todoWriteTool, a3 as toolImageRef, a4 as toolRegistry, a5 as toolsByName } from './tools-DZHZIyxh.js';
7
+ import { A as AgentTool, C as ChatLike, a as ChatOptions, b as ChatResponse, r as ToolCall, H as HostBridge, U as UserQuestion, o as MessageContent } from './tools-DwfeF8VQ.js';
8
+ export { c as ContentPart, d as HostEvent, I as IMAGE_ELIDE_STUB, e as IMAGE_REF_SCHEME, f as ImageRef, J as JobCtx, g as JobHandle, h as JobInfo, i as JobKind, j as JobNotice, k as JobRegistry, l as JobRegistryOptions, n as JobTrackOptions, M as Message, m as RegistryJobStatus, R as Role, S as SandboxJobRegistry, p as StreamChunk, T as TodoItem, q as Tool, s as ToolContext, t as bashTool, u as clearImageRefs, v as contentBytes, w as contentText, x as defaultTools, y as editTool, z as elideImages, B as elideInlineImages, D as elideStaleImages, E as exitSessionTool, F as expandImagesForSend, G as formatJobNotice, K as imagePart, L as imageRefPart, N as imageRefResult, O as makeContext, P as makeJobTools, Q as messageHasImage, V as messageHasImageRef, W as messageHasInlineImage, X as mintImageRef, Y as parseImageRef, Z as readTool, _ as remintImageRefs, $ as sendBytes, a0 as sendBytesPer, a1 as toWireTools, a2 as todoWriteTool, a3 as toolImageRef, a4 as toolRegistry, a5 as toolsByName } from './tools-DwfeF8VQ.js';
9
9
  import { ShellJobRegistry } from './tools.shell.js';
10
10
  import { SpokenSplitter } from '@bod.ee/voice';
11
11
  export { AudioSink, AudioSource, AuthProvider, CartesiaTTS, CartesiaTTSOptions, STT_SAMPLE_RATE, SonioxSTT, SonioxSTTOptions, SttLike, TTS_SAMPLE_RATE, TtsLike, VoiceEngine, VoiceEngineOptions, VoiceState, resolveAuth } from '@bod.ee/voice';
12
- export { M as McpCall, a as McpImage, b as McpRoute, c as McpRouteResolver, d as McpToolResult, e as McpToolSearchOptions, f as McpToolSpec, g as MountedMcpLike, h as buildMcpCatalog, m as makeLazyMcpToolSearch, i as makeMcpToolSearch, j as makeMcpToolSearchFromMounted, k as mcpToolToAgentTool, l as mcpToolsToAgentTools } from './mcp-CUo-9LUe.js';
12
+ export { M as McpCall, a as McpImage, b as McpRoute, c as McpRouteResolver, d as McpToolResult, e as McpToolSearchOptions, f as McpToolSpec, g as MountedMcpLike, h as buildMcpCatalog, m as makeLazyMcpToolSearch, i as makeMcpToolSearch, j as makeMcpToolSearchFromMounted, k as mcpToolToAgentTool, l as mcpToolsToAgentTools } from './mcp-DZhcLur2.js';
13
13
  import * as libx_js_src_modules_log from 'libx.js/src/modules/log';
14
14
  export { log } from 'libx.js/src/modules/log';
15
15
 
@@ -175,6 +175,8 @@ declare class JailOptions {
175
175
  deny: string[];
176
176
  /** Globs readable but not writable/deletable (the pinned constitution). */
177
177
  readonly: string[];
178
+ /** Appended to readonly-violation errors (e.g. "edit it via the kb tool instead"). */
179
+ readonlyHint?: string;
178
180
  /** If set, only paths matching these globs are accessible at all. */
179
181
  confineTo?: string[];
180
182
  /** Audit hook fired on every blocked operation (drives the circuit breaker). */
@@ -753,8 +755,12 @@ declare function expandCommand(fs: IFilesystem, cmd: CommandInfo, args: string):
753
755
  /** Scan `dir`(s) for `<dir>/<name>.md` command templates (first dir wins on duplicate names). */
754
756
  declare function scanCommands(fs: IFilesystem, dir: string | string[]): Promise<CommandInfo[]>;
755
757
  declare function loadCommands(fs: IFilesystem, dir: string | string[], opts?: {
758
+ /** @deprecated no-op — the catalog is full + task-independent (stable prompt prefix). */
756
759
  relevanceHint?: string;
760
+ /** @deprecated no-op — use `budgetBytes`. */
757
761
  max?: number;
762
+ /** Catalog byte budget (default 6000); over it descriptions trim, names never drop. */
763
+ budgetBytes?: number;
758
764
  sibling?: SiblingResolver;
759
765
  }): Promise<{
760
766
  commands: CommandInfo[];
@@ -779,8 +785,12 @@ interface SkillInfo {
779
785
  /** Scan `dir`(s) for `<dir>/<id>/SKILL.md` entries (first dir wins on duplicate ids). */
780
786
  declare function scanSkills(fs: IFilesystem, dir: string | string[]): Promise<SkillInfo[]>;
781
787
  declare function loadSkills(fs: IFilesystem, dir: string | string[], opts?: {
788
+ /** @deprecated no-op — the catalog is full + task-independent (stable prompt prefix). */
782
789
  relevanceHint?: string;
790
+ /** @deprecated no-op — use `budgetBytes`. */
783
791
  max?: number;
792
+ /** Catalog byte budget (default 6000); over it descriptions trim, names never drop. */
793
+ budgetBytes?: number;
784
794
  sibling?: SiblingResolver;
785
795
  }): Promise<{
786
796
  skills: SkillInfo[];
@@ -827,8 +837,12 @@ declare const VOICE_MEMORY_PROMPT: string;
827
837
  * memory mechanism therefore works in node, a browser tab, or on edge.
828
838
  */
829
839
  interface LoadMemoryOpts {
840
+ /** @deprecated no-op — the index is full + task-independent (stable prompt prefix). */
830
841
  relevanceHint?: string;
842
+ /** @deprecated no-op — use `budgetBytes`. */
831
843
  max?: number;
844
+ /** Index byte budget (default 6000); over it hooks trim, slugs never drop. */
845
+ budgetBytes?: number;
832
846
  /** Max Remember calls per session (default 25). Prevents runaway memory writes. */
833
847
  maxWritesPerSession?: number;
834
848
  /** Called after each successful memory write (auditing, UI indicators). */
@@ -901,14 +915,30 @@ interface ReflectOptions {
901
915
  }
902
916
  declare function reflectOnRun(o: ReflectOptions): Promise<string | null>;
903
917
 
918
+ /** One catalog row: a loadable thing (skill, command, memory) the model can pull by name. */
919
+ interface CatalogEntry {
920
+ name: string;
921
+ description?: string;
922
+ path?: string;
923
+ }
924
+ interface CatalogOptions {
925
+ /** Heading line (e.g. `## Skills …`). */
926
+ title: string;
927
+ /** Closing line (how to load an entry). */
928
+ footer?: string;
929
+ /** Max UTF-8 bytes for the whole block (default 6000). Names are never dropped, so a huge set may exceed it. */
930
+ budgetBytes?: number;
931
+ /** Prefix shown before each name (e.g. `/` for commands). */
932
+ namePrefix?: string;
933
+ }
934
+ declare const DEFAULT_CATALOG_BUDGET = 6000;
904
935
  /**
905
- * Walk the VFS directory tree from `/` down, collecting instruction files
906
- * (AGENT.md, AGENTS.md, CLAUDE.md, .claude/<name>) at each level.
907
- * Merges all found files general-first → specific-last (mirrors Claude Code's
908
- * hierarchical CLAUDE.md discovery). First matching filename per directory wins
909
- * (no duplicates from the same level). Edge-portable: works over any IFilesystem.
936
+ * Render a full, stable catalog: every entry as `- **name** — desc (\`path\`)`.
937
+ * Over `budgetBytes`, descriptions are trimmed evenly (one shared max length), then — if even
938
+ * empty descriptions don't fit — names only. Never drops a name; output depends only on the
939
+ * entries (no task hint), so the prompt prefix stays byte-identical across turns/tasks.
910
940
  */
911
- declare function loadInstructions(fs: IFilesystem, names?: string[]): Promise<string>;
941
+ declare function formatCatalog(entries: CatalogEntry[], opts: CatalogOptions): string;
912
942
 
913
943
  type OverlapVerdict = 'keep' | 'cut';
914
944
 
@@ -1852,4 +1882,4 @@ declare function exitWorktree(): {
1852
1882
  reason?: string;
1853
1883
  } | null;
1854
1884
 
1855
- export { Agent, type AgentDef, AgentOptions, AgentTool, type AskOptions, type Attempt, BodDbFilesystem, type CallMetric, ChatLike, ChatOptions, ChatResponse, type CommandInfo, ConsoleHostBridge, DEFAULT_DENY, DEFAULT_MAX_DEPTH, DEFAULT_SKIP_DIRS, DuplexAgent, DuplexAgentOptions, type DuplexTaskStatus, FakeAIClient, type FileScanOptions, type FillKind, type GateDrop, type GateTurn, Hooks, HostBridge, JailOptions, JailedFilesystem, type LessonOptions, LessonOptionsDefaults, type LoadMemoryOpts, MEMORY_PROMPT, type MainEvent, MessageContent, type Mount, MountFilesystem, NodeDiskFilesystem, OverlayFilesystem, PROGRESS_TEMPLATES, PermissionPolicy, Progress, ProgressOptions, type ReflectOptions, RunResult, SCRATCH_DIR, type ScheduledJob, type ScheduledJobSnapshot, Scheduler, type SchedulerOptions, Scratch, type ScratchOptions, ScriptedHostBridge, type SiblingResolver, type SkillInfo, type TaskRecord, type TaskToolOptions, ToolCall, type ToolSpec, type Trigger, type TriggerCron, type TriggerInterval, type TriggerOneOff, TurnGate, TurnGateOptions, UserQuestion, VOICE_MEMORY_PROMPT, VOICE_SYSTEM_PROMPT, VoiceCall, VoiceCallOptions, type WebFetchOptions, type WebSearchOptions, type WorkerTier, type WorktreeInfo, type WorktreeSession, applyEditsTool, askUserQuestionTool, checkpointTool, checkpointTools, cleanupWorktree, compileSynthesizedTool, cronMatches, decodeDdgUrl, diskAgentOptions, endsMidPhrase, enterWorktree, exitWorktree, expandCommand, expandEntry, expandTemplate, findGitRoot, forComponent, forgetFact, fullAgentOptions, getOrCreateWorktree, getWorktreeSession, globTool, grepTool, htmlToText, idfWeights, isClosing, lessonCapture, loadAgents, loadCommands, loadInstructions, loadMemory, loadSkills, makeAskTool, makeGlobTool, makeGrepTool, makeScheduleTools, makeTaskBatchTool, makeTaskTool, makeWebFetchTool, makeWebSearchAnthropicTool, makeWebSearchTool, mkdirp, multiEditTool, nextCronAfter, parseCron, parseDdgHtml, raceAttempts, reflectOnRun, relevanceScore, repoIndex, repoMapTool, rollbackTool, sandboxAgentOptions, scanCommands, scanSkills, slugify, tokenize, toolCall, topByRelevance, validateToolCode, validateWorktreeSlug, webFetchTool, webSearchAnthropicTool, webSearchTool, worktreeBranchName, writeFact, writeTool };
1885
+ export { Agent, type AgentDef, AgentOptions, AgentTool, type AskOptions, type Attempt, BodDbFilesystem, type CallMetric, type CatalogEntry, type CatalogOptions, ChatLike, ChatOptions, ChatResponse, type CommandInfo, ConsoleHostBridge, DEFAULT_CATALOG_BUDGET, DEFAULT_DENY, DEFAULT_MAX_DEPTH, DEFAULT_SKIP_DIRS, DuplexAgent, DuplexAgentOptions, type DuplexTaskStatus, FakeAIClient, type FileScanOptions, type FillKind, type GateDrop, type GateTurn, Hooks, HostBridge, JailOptions, JailedFilesystem, type LessonOptions, LessonOptionsDefaults, type LoadMemoryOpts, MEMORY_PROMPT, type MainEvent, MessageContent, type Mount, MountFilesystem, NodeDiskFilesystem, OverlayFilesystem, PROGRESS_TEMPLATES, PermissionPolicy, Progress, ProgressOptions, type ReflectOptions, RunResult, SCRATCH_DIR, type ScheduledJob, type ScheduledJobSnapshot, Scheduler, type SchedulerOptions, Scratch, type ScratchOptions, ScriptedHostBridge, type SiblingResolver, type SkillInfo, type TaskRecord, type TaskToolOptions, ToolCall, type ToolSpec, type Trigger, type TriggerCron, type TriggerInterval, type TriggerOneOff, TurnGate, TurnGateOptions, UserQuestion, VOICE_MEMORY_PROMPT, VOICE_SYSTEM_PROMPT, VoiceCall, VoiceCallOptions, type WebFetchOptions, type WebSearchOptions, type WorkerTier, type WorktreeInfo, type WorktreeSession, applyEditsTool, askUserQuestionTool, checkpointTool, checkpointTools, cleanupWorktree, compileSynthesizedTool, cronMatches, decodeDdgUrl, diskAgentOptions, endsMidPhrase, enterWorktree, exitWorktree, expandCommand, expandEntry, expandTemplate, findGitRoot, forComponent, forgetFact, formatCatalog, fullAgentOptions, getOrCreateWorktree, getWorktreeSession, globTool, grepTool, htmlToText, idfWeights, isClosing, lessonCapture, loadAgents, loadCommands, loadMemory, loadSkills, makeAskTool, makeGlobTool, makeGrepTool, makeScheduleTools, makeTaskBatchTool, makeTaskTool, makeWebFetchTool, makeWebSearchAnthropicTool, makeWebSearchTool, mkdirp, multiEditTool, nextCronAfter, parseCron, parseDdgHtml, raceAttempts, reflectOnRun, relevanceScore, repoIndex, repoMapTool, rollbackTool, sandboxAgentOptions, scanCommands, scanSkills, slugify, tokenize, toolCall, topByRelevance, validateToolCode, validateWorktreeSlug, webFetchTool, webSearchAnthropicTool, webSearchTool, worktreeBranchName, writeFact, writeTool };