@adminforth/agent 3.5.2 → 3.5.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/README.md CHANGED
@@ -319,8 +319,8 @@ export const globalPlugins = [
319
319
  new AdminForthAgent({
320
320
  // The first mode is the default. Users can switch modes in the chat UI.
321
321
  modes: [
322
- { name: 'Balanced', completionAdapter: createCompletionAdapter('gpt-5.4-mini', 'medium') },
323
- { name: 'Fast', completionAdapter: createCompletionAdapter('gpt-5.4-mini', 'low') },
322
+ { name: 'Balanced', completionAdapter: createCompletionAdapter('gpt-6-luna', 'medium') },
323
+ { name: 'Fast', completionAdapter: createCompletionAdapter('gpt-6-luna', 'low') },
324
324
  { name: 'Smart Thinking', completionAdapter: createCompletionAdapter('gpt-5.4', 'high') },
325
325
  ],
326
326
  maxTokens: 10000,
@@ -17,7 +17,7 @@ export type AgentRuntimeOptions = {
17
17
  export declare class AgentRuntime {
18
18
  private readonly options;
19
19
  constructor(options: AgentRuntimeOptions);
20
- stream(input: AgentRuntimeRunInput): Promise<AsyncGenerator<["messages", [import("langchain").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>, Record<string, any>]] | ["updates", Record<string, Omit<import("langchain").BuiltInState<import("@langchain/core/messages").MessageStructure<import("langchain").ToolsToMessageToolSet<readonly (import("@langchain/core/tools").ClientTool | import("@langchain/core/tools").ServerTool)[] | readonly (import("@langchain/core/tools").ClientTool | import("@langchain/core/tools").ServerTool | import("langchain").DynamicStructuredTool<import("zod").ZodObject<{
20
+ stream(input: AgentRuntimeRunInput): Promise<AsyncGenerator<["updates", Record<string, Omit<import("langchain").BuiltInState<import("@langchain/core/messages").MessageStructure<import("langchain").ToolsToMessageToolSet<readonly (import("@langchain/core/tools").ClientTool | import("@langchain/core/tools").ServerTool)[] | readonly (import("@langchain/core/tools").ClientTool | import("@langchain/core/tools").ServerTool | import("langchain").DynamicStructuredTool<import("zod").ZodObject<{
21
21
  imageIds: import("zod").ZodArray<import("zod").ZodString>;
22
22
  keepImageIds: import("zod").ZodArray<import("zod").ZodString>;
23
23
  }, import("zod/v4/core").$strip>, {
@@ -26,7 +26,7 @@ export declare class AgentRuntime {
26
26
  }, {
27
27
  imageIds: string[];
28
28
  keepImageIds: string[];
29
- }, [string, import("../domain/imageAttachments.js").ViewImageArtifact], unknown, "view_image">)[]>>>, "jumpTo">>], void, any>>;
29
+ }, [string, import("../domain/imageAttachments.js").ViewImageArtifact], unknown, "view_image">)[]>>>, "jumpTo">>] | ["messages", [import("langchain").BaseMessage<import("@langchain/core/messages").MessageStructure<import("@langchain/core/messages").MessageToolSet>, import("@langchain/core/messages").MessageType>, Record<string, any>]], void, any>>;
30
30
  private getThreadState;
31
31
  /**
32
32
  * Read the pending human-in-the-loop interrupts persisted for a thread from the
@@ -3,6 +3,8 @@ const MARKDOWN_LINK_RE = /\[([^\]]+)]\(([^)]+)\)/g;
3
3
  const MARKDOWN_IMAGE_RE = /!\[([^\]]*)]\(([^)]+)\)/g;
4
4
  const HTML_TAG_RE = /<[^>]+>/g;
5
5
  const CODE_FENCE_RE = /```[\s\S]*?```/g;
6
+ // a markdown table row: a whole line between pipes
7
+ const MD_TABLE_ROW_RE = /^\s*\|.*\|\s*$/gm;
6
8
  const INLINE_CODE_RE = /`[^`]*`/g;
7
9
  const BRACKETED_META_RE = /\[(?:ref|link|url|source|sources?|debug|meta|data):[^\]]*]/gi;
8
10
  const MD_HEADING_LINE_RE = /^\s{0,3}#{1,6}\s+/gm;
@@ -14,6 +16,8 @@ const MD_ITALIC_RE = /(^|[^\\])(?:\*|_)([^\s].*?)(?:\*|_)/g;
14
16
  export function sanitizeSpeechText(input) {
15
17
  return input
16
18
  .replace(CODE_FENCE_RE, " ")
19
+ // tables stay in the chat, reading them cell by cell is long and costs audio tokens
20
+ .replace(MD_TABLE_ROW_RE, " ")
17
21
  .replace(MARKDOWN_IMAGE_RE, "$1")
18
22
  .replace(MARKDOWN_LINK_RE, "$1")
19
23
  .replace(URL_RE, " ")
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adminforth/agent",
3
- "version": "3.5.2",
3
+ "version": "3.5.4",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "type": "module",
@@ -46,8 +46,8 @@
46
46
  },
47
47
  "dependencies": {
48
48
  "@langchain/core": "1.2.20",
49
- "@langchain/langgraph": "1.2.8",
50
- "@langchain/langgraph-checkpoint": "1.0.1",
49
+ "@langchain/langgraph": "1.3.3",
50
+ "@langchain/langgraph-checkpoint": "1.0.4",
51
51
  "@modelcontextprotocol/client": "2.3.1",
52
52
  "langchain": "1.3.3",
53
53
  "multer": "^2.1.1",