@aigne/core 1.72.0 → 1.74.0-beta
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 +11 -11
- package/dist/_virtual/rolldown_runtime.cjs +29 -0
- package/dist/agents/agent.cjs +874 -0
- package/dist/agents/agent.d.cts +967 -0
- package/dist/agents/agent.d.cts.map +1 -0
- package/dist/agents/agent.d.mts +967 -0
- package/dist/agents/agent.d.mts.map +1 -0
- package/dist/agents/agent.mjs +863 -0
- package/dist/agents/agent.mjs.map +1 -0
- package/dist/agents/ai-agent.cjs +524 -0
- package/dist/agents/ai-agent.d.cts +401 -0
- package/dist/agents/ai-agent.d.cts.map +1 -0
- package/dist/agents/ai-agent.d.mts +401 -0
- package/dist/agents/ai-agent.d.mts.map +1 -0
- package/dist/agents/ai-agent.mjs +519 -0
- package/dist/agents/ai-agent.mjs.map +1 -0
- package/dist/agents/chat-model.cjs +397 -0
- package/dist/agents/chat-model.d.cts +674 -0
- package/dist/agents/chat-model.d.cts.map +1 -0
- package/dist/agents/chat-model.d.mts +674 -0
- package/dist/agents/chat-model.d.mts.map +1 -0
- package/dist/agents/chat-model.mjs +391 -0
- package/dist/agents/chat-model.mjs.map +1 -0
- package/dist/agents/guide-rail-agent.cjs +17 -0
- package/dist/agents/guide-rail-agent.d.cts +67 -0
- package/dist/agents/guide-rail-agent.d.cts.map +1 -0
- package/dist/agents/guide-rail-agent.d.mts +67 -0
- package/dist/agents/guide-rail-agent.d.mts.map +1 -0
- package/dist/agents/guide-rail-agent.mjs +17 -0
- package/dist/agents/guide-rail-agent.mjs.map +1 -0
- package/dist/agents/image-agent.cjs +74 -0
- package/dist/agents/image-agent.d.cts +44 -0
- package/dist/agents/image-agent.d.cts.map +1 -0
- package/dist/agents/image-agent.d.mts +44 -0
- package/dist/agents/image-agent.d.mts.map +1 -0
- package/dist/agents/image-agent.mjs +72 -0
- package/dist/agents/image-agent.mjs.map +1 -0
- package/dist/agents/image-model.cjs +83 -0
- package/dist/agents/image-model.d.cts +276 -0
- package/dist/agents/image-model.d.cts.map +1 -0
- package/dist/agents/image-model.d.mts +276 -0
- package/dist/agents/image-model.d.mts.map +1 -0
- package/dist/agents/image-model.mjs +81 -0
- package/dist/agents/image-model.mjs.map +1 -0
- package/dist/agents/mcp-agent.cjs +307 -0
- package/dist/agents/mcp-agent.d.cts +235 -0
- package/dist/agents/mcp-agent.d.cts.map +1 -0
- package/dist/agents/mcp-agent.d.mts +235 -0
- package/dist/agents/mcp-agent.d.mts.map +1 -0
- package/dist/agents/mcp-agent.mjs +303 -0
- package/dist/agents/mcp-agent.mjs.map +1 -0
- package/dist/agents/model.cjs +143 -0
- package/dist/agents/model.d.cts +257 -0
- package/dist/agents/model.d.cts.map +1 -0
- package/dist/agents/model.d.mts +257 -0
- package/dist/agents/model.d.mts.map +1 -0
- package/dist/agents/model.mjs +136 -0
- package/dist/agents/model.mjs.map +1 -0
- package/dist/agents/team-agent.cjs +342 -0
- package/dist/agents/team-agent.d.cts +390 -0
- package/dist/agents/team-agent.d.cts.map +1 -0
- package/dist/agents/team-agent.d.mts +390 -0
- package/dist/agents/team-agent.d.mts.map +1 -0
- package/dist/agents/team-agent.mjs +339 -0
- package/dist/agents/team-agent.mjs.map +1 -0
- package/dist/agents/transform-agent.cjs +77 -0
- package/dist/agents/transform-agent.d.cts +99 -0
- package/dist/agents/transform-agent.d.cts.map +1 -0
- package/dist/agents/transform-agent.d.mts +99 -0
- package/dist/agents/transform-agent.d.mts.map +1 -0
- package/dist/agents/transform-agent.mjs +76 -0
- package/dist/agents/transform-agent.mjs.map +1 -0
- package/dist/agents/types.cjs +30 -0
- package/dist/agents/types.d.cts +34 -0
- package/dist/agents/types.d.cts.map +1 -0
- package/dist/agents/types.d.mts +34 -0
- package/dist/agents/types.d.mts.map +1 -0
- package/dist/agents/types.mjs +25 -0
- package/dist/agents/types.mjs.map +1 -0
- package/dist/agents/user-agent.cjs +87 -0
- package/dist/agents/user-agent.d.cts +32 -0
- package/dist/agents/user-agent.d.cts.map +1 -0
- package/dist/agents/user-agent.d.mts +32 -0
- package/dist/agents/user-agent.d.mts.map +1 -0
- package/dist/agents/user-agent.mjs +88 -0
- package/dist/agents/user-agent.mjs.map +1 -0
- package/dist/agents/video-model.cjs +66 -0
- package/dist/agents/video-model.d.cts +286 -0
- package/dist/agents/video-model.d.cts.map +1 -0
- package/dist/agents/video-model.d.mts +286 -0
- package/dist/agents/video-model.d.mts.map +1 -0
- package/dist/agents/video-model.mjs +64 -0
- package/dist/agents/video-model.mjs.map +1 -0
- package/dist/aigne/aigne.cjs +235 -0
- package/dist/aigne/aigne.d.cts +340 -0
- package/dist/aigne/aigne.d.cts.map +1 -0
- package/dist/aigne/aigne.d.mts +340 -0
- package/dist/aigne/aigne.d.mts.map +1 -0
- package/dist/aigne/aigne.mjs +235 -0
- package/dist/aigne/aigne.mjs.map +1 -0
- package/dist/aigne/context.cjs +377 -0
- package/dist/aigne/context.d.cts +226 -0
- package/dist/aigne/context.d.cts.map +1 -0
- package/dist/aigne/context.d.mts +226 -0
- package/dist/aigne/context.d.mts.map +1 -0
- package/dist/aigne/context.mjs +376 -0
- package/dist/aigne/context.mjs.map +1 -0
- package/dist/aigne/index.cjs +4 -0
- package/dist/aigne/index.d.mts +5 -0
- package/dist/aigne/index.mjs +6 -0
- package/dist/aigne/message-queue.cjs +102 -0
- package/dist/aigne/message-queue.d.cts +52 -0
- package/dist/aigne/message-queue.d.cts.map +1 -0
- package/dist/aigne/message-queue.d.mts +52 -0
- package/dist/aigne/message-queue.d.mts.map +1 -0
- package/dist/aigne/message-queue.mjs +99 -0
- package/dist/aigne/message-queue.mjs.map +1 -0
- package/dist/aigne/type.d.cts +32 -0
- package/dist/aigne/type.d.cts.map +1 -0
- package/dist/aigne/type.d.mts +32 -0
- package/dist/aigne/type.d.mts.map +1 -0
- package/dist/aigne/usage.cjs +29 -0
- package/dist/aigne/usage.d.cts +32 -0
- package/dist/aigne/usage.d.cts.map +1 -0
- package/dist/aigne/usage.d.mts +32 -0
- package/dist/aigne/usage.d.mts.map +1 -0
- package/dist/aigne/usage.mjs +28 -0
- package/dist/aigne/usage.mjs.map +1 -0
- package/dist/index.cjs +142 -0
- package/dist/index.d.cts +29 -0
- package/dist/index.d.mts +31 -0
- package/dist/index.mjs +31 -0
- package/dist/loader/agent-js.cjs +23 -0
- package/dist/loader/agent-js.d.cts +9 -0
- package/dist/loader/agent-js.d.cts.map +1 -0
- package/dist/loader/agent-js.d.mts +10 -0
- package/dist/loader/agent-js.d.mts.map +1 -0
- package/dist/loader/agent-js.mjs +23 -0
- package/dist/loader/agent-js.mjs.map +1 -0
- package/dist/loader/agent-yaml.cjs +109 -0
- package/dist/loader/agent-yaml.d.cts +87 -0
- package/dist/loader/agent-yaml.d.cts.map +1 -0
- package/dist/loader/agent-yaml.d.mts +87 -0
- package/dist/loader/agent-yaml.d.mts.map +1 -0
- package/dist/loader/agent-yaml.mjs +106 -0
- package/dist/loader/agent-yaml.mjs.map +1 -0
- package/dist/loader/agents.cjs +19 -0
- package/dist/loader/agents.d.cts +9 -0
- package/dist/loader/agents.d.cts.map +1 -0
- package/dist/loader/agents.d.mts +9 -0
- package/dist/loader/agents.d.mts.map +1 -0
- package/dist/loader/agents.mjs +20 -0
- package/dist/loader/agents.mjs.map +1 -0
- package/dist/loader/error.cjs +6 -0
- package/dist/loader/error.d.cts +5 -0
- package/dist/loader/error.d.cts.map +1 -0
- package/dist/loader/error.d.mts +5 -0
- package/dist/loader/error.d.mts.map +1 -0
- package/dist/loader/error.mjs +6 -0
- package/dist/loader/error.mjs.map +1 -0
- package/dist/loader/function-agent.cjs +9 -0
- package/dist/loader/function-agent.d.cts +7 -0
- package/dist/loader/function-agent.d.cts.map +1 -0
- package/dist/loader/function-agent.d.mts +7 -0
- package/dist/loader/function-agent.d.mts.map +1 -0
- package/dist/loader/function-agent.mjs +9 -0
- package/dist/loader/function-agent.mjs.map +1 -0
- package/dist/loader/index.cjs +233 -0
- package/dist/loader/index.d.cts +255 -0
- package/dist/loader/index.d.cts.map +1 -0
- package/dist/loader/index.d.mts +255 -0
- package/dist/loader/index.d.mts.map +1 -0
- package/dist/loader/index.mjs +228 -0
- package/dist/loader/index.mjs.map +1 -0
- package/dist/loader/schema.cjs +135 -0
- package/dist/loader/schema.d.cts +177 -0
- package/dist/loader/schema.d.cts.map +1 -0
- package/dist/loader/schema.d.mts +177 -0
- package/dist/loader/schema.d.mts.map +1 -0
- package/dist/loader/schema.mjs +127 -0
- package/dist/loader/schema.mjs.map +1 -0
- package/dist/memory/index.cjs +3 -0
- package/dist/memory/index.d.mts +3 -0
- package/dist/memory/index.mjs +5 -0
- package/dist/memory/memory.cjs +134 -0
- package/dist/memory/memory.d.cts +103 -0
- package/dist/memory/memory.d.cts.map +1 -0
- package/dist/memory/memory.d.mts +103 -0
- package/dist/memory/memory.d.mts.map +1 -0
- package/dist/memory/memory.mjs +133 -0
- package/dist/memory/memory.mjs.map +1 -0
- package/dist/memory/recorder.cjs +61 -0
- package/dist/memory/recorder.d.cts +98 -0
- package/dist/memory/recorder.d.cts.map +1 -0
- package/dist/memory/recorder.d.mts +98 -0
- package/dist/memory/recorder.d.mts.map +1 -0
- package/dist/memory/recorder.mjs +59 -0
- package/dist/memory/recorder.mjs.map +1 -0
- package/dist/memory/retriever.cjs +60 -0
- package/dist/memory/retriever.d.cts +111 -0
- package/dist/memory/retriever.d.cts.map +1 -0
- package/dist/memory/retriever.d.mts +111 -0
- package/dist/memory/retriever.d.mts.map +1 -0
- package/dist/memory/retriever.mjs +58 -0
- package/dist/memory/retriever.mjs.map +1 -0
- package/dist/prompt/agent-session.cjs +700 -0
- package/dist/prompt/agent-session.d.cts +167 -0
- package/dist/prompt/agent-session.d.cts.map +1 -0
- package/dist/prompt/agent-session.d.mts +167 -0
- package/dist/prompt/agent-session.d.mts.map +1 -0
- package/dist/prompt/agent-session.mjs +700 -0
- package/dist/prompt/agent-session.mjs.map +1 -0
- package/dist/prompt/compact/compactor.cjs +50 -0
- package/dist/prompt/compact/compactor.mjs +50 -0
- package/dist/prompt/compact/compactor.mjs.map +1 -0
- package/dist/prompt/compact/session-memory-extractor.cjs +137 -0
- package/dist/prompt/compact/session-memory-extractor.mjs +137 -0
- package/dist/prompt/compact/session-memory-extractor.mjs.map +1 -0
- package/dist/prompt/compact/types.cjs +59 -0
- package/dist/prompt/compact/types.d.cts +341 -0
- package/dist/prompt/compact/types.d.cts.map +1 -0
- package/dist/prompt/compact/types.d.mts +341 -0
- package/dist/prompt/compact/types.d.mts.map +1 -0
- package/dist/prompt/compact/types.mjs +49 -0
- package/dist/prompt/compact/types.mjs.map +1 -0
- package/dist/prompt/compact/user-memory-extractor.cjs +118 -0
- package/dist/prompt/compact/user-memory-extractor.mjs +118 -0
- package/dist/prompt/compact/user-memory-extractor.mjs.map +1 -0
- package/dist/prompt/context/afs/history.cjs +30 -0
- package/dist/prompt/context/afs/history.mjs +30 -0
- package/dist/prompt/context/afs/history.mjs.map +1 -0
- package/dist/prompt/context/afs/index.cjs +60 -0
- package/dist/prompt/context/afs/index.mjs +61 -0
- package/dist/prompt/context/afs/index.mjs.map +1 -0
- package/dist/prompt/context/index.cjs +18 -0
- package/dist/prompt/context/index.mjs +19 -0
- package/dist/prompt/context/index.mjs.map +1 -0
- package/dist/prompt/filters/index.cjs +22 -0
- package/dist/prompt/filters/index.mjs +21 -0
- package/dist/prompt/filters/index.mjs.map +1 -0
- package/dist/prompt/prompt-builder.cjs +291 -0
- package/dist/prompt/prompt-builder.d.cts +57 -0
- package/dist/prompt/prompt-builder.d.cts.map +1 -0
- package/dist/prompt/prompt-builder.d.mts +57 -0
- package/dist/prompt/prompt-builder.d.mts.map +1 -0
- package/dist/prompt/prompt-builder.mjs +291 -0
- package/dist/prompt/prompt-builder.mjs.map +1 -0
- package/dist/prompt/prompts/afs-builtin-prompt.cjs +12 -0
- package/dist/prompt/prompts/afs-builtin-prompt.mjs +13 -0
- package/dist/prompt/prompts/afs-builtin-prompt.mjs.map +1 -0
- package/dist/prompt/prompts/memory-message-template.cjs +10 -0
- package/dist/prompt/prompts/memory-message-template.mjs +10 -0
- package/dist/prompt/prompts/memory-message-template.mjs.map +1 -0
- package/dist/prompt/prompts/structured-stream-instructions.cjs +30 -0
- package/dist/prompt/prompts/structured-stream-instructions.mjs +30 -0
- package/dist/prompt/prompts/structured-stream-instructions.mjs.map +1 -0
- package/dist/prompt/skills/afs/agent-skill/agent-skill.cjs +66 -0
- package/dist/prompt/skills/afs/agent-skill/agent-skill.mjs +66 -0
- package/dist/prompt/skills/afs/agent-skill/agent-skill.mjs.map +1 -0
- package/dist/prompt/skills/afs/agent-skill/skill-loader.cjs +42 -0
- package/dist/prompt/skills/afs/agent-skill/skill-loader.mjs +41 -0
- package/dist/prompt/skills/afs/agent-skill/skill-loader.mjs.map +1 -0
- package/dist/prompt/skills/afs/base.cjs +9 -0
- package/dist/prompt/skills/afs/base.mjs +10 -0
- package/dist/prompt/skills/afs/base.mjs.map +1 -0
- package/dist/prompt/skills/afs/delete.cjs +50 -0
- package/dist/prompt/skills/afs/delete.mjs +50 -0
- package/dist/prompt/skills/afs/delete.mjs.map +1 -0
- package/dist/prompt/skills/afs/edit.cjs +92 -0
- package/dist/prompt/skills/afs/edit.mjs +92 -0
- package/dist/prompt/skills/afs/edit.mjs.map +1 -0
- package/dist/prompt/skills/afs/exec.cjs +36 -0
- package/dist/prompt/skills/afs/exec.mjs +36 -0
- package/dist/prompt/skills/afs/exec.mjs.map +1 -0
- package/dist/prompt/skills/afs/index.cjs +28 -0
- package/dist/prompt/skills/afs/index.mjs +29 -0
- package/dist/prompt/skills/afs/index.mjs.map +1 -0
- package/dist/prompt/skills/afs/list.cjs +69 -0
- package/dist/prompt/skills/afs/list.mjs +69 -0
- package/dist/prompt/skills/afs/list.mjs.map +1 -0
- package/dist/prompt/skills/afs/read.cjs +86 -0
- package/dist/prompt/skills/afs/read.mjs +86 -0
- package/dist/prompt/skills/afs/read.mjs.map +1 -0
- package/dist/prompt/skills/afs/rename.cjs +53 -0
- package/dist/prompt/skills/afs/rename.mjs +53 -0
- package/dist/prompt/skills/afs/rename.mjs.map +1 -0
- package/dist/prompt/skills/afs/search.cjs +63 -0
- package/dist/prompt/skills/afs/search.mjs +63 -0
- package/dist/prompt/skills/afs/search.mjs.map +1 -0
- package/dist/prompt/skills/afs/write.cjs +51 -0
- package/dist/prompt/skills/afs/write.mjs +51 -0
- package/dist/prompt/skills/afs/write.mjs.map +1 -0
- package/dist/prompt/template.cjs +229 -0
- package/dist/prompt/template.d.cts +247 -0
- package/dist/prompt/template.d.cts.map +1 -0
- package/dist/prompt/template.d.mts +247 -0
- package/dist/prompt/template.d.mts.map +1 -0
- package/dist/prompt/template.mjs +219 -0
- package/dist/prompt/template.mjs.map +1 -0
- package/dist/utils/agent-utils.cjs +49 -0
- package/dist/utils/agent-utils.d.cts +22 -0
- package/dist/utils/agent-utils.d.cts.map +1 -0
- package/dist/utils/agent-utils.d.mts +22 -0
- package/dist/utils/agent-utils.d.mts.map +1 -0
- package/dist/utils/agent-utils.mjs +46 -0
- package/dist/utils/agent-utils.mjs.map +1 -0
- package/dist/utils/camelize.cjs +34 -0
- package/dist/utils/camelize.d.cts +9 -0
- package/dist/utils/camelize.d.cts.map +1 -0
- package/dist/utils/camelize.d.mts +9 -0
- package/dist/utils/camelize.d.mts.map +1 -0
- package/dist/utils/camelize.mjs +33 -0
- package/dist/utils/camelize.mjs.map +1 -0
- package/dist/utils/event-stream.cjs +136 -0
- package/dist/utils/event-stream.d.cts +20 -0
- package/dist/utils/event-stream.d.cts.map +1 -0
- package/dist/utils/event-stream.d.mts +20 -0
- package/dist/utils/event-stream.d.mts.map +1 -0
- package/dist/utils/event-stream.mjs +133 -0
- package/dist/utils/event-stream.mjs.map +1 -0
- package/dist/utils/fetch.cjs +32 -0
- package/dist/utils/fetch.d.cts +8 -0
- package/dist/utils/fetch.d.cts.map +1 -0
- package/dist/utils/fetch.d.mts +8 -0
- package/dist/utils/fetch.d.mts.map +1 -0
- package/dist/utils/fetch.mjs +32 -0
- package/dist/utils/fetch.mjs.map +1 -0
- package/dist/utils/json-schema.cjs +107 -0
- package/dist/utils/json-schema.d.cts +20 -0
- package/dist/utils/json-schema.d.cts.map +1 -0
- package/dist/utils/json-schema.d.mts +20 -0
- package/dist/utils/json-schema.d.mts.map +1 -0
- package/dist/utils/json-schema.mjs +102 -0
- package/dist/utils/json-schema.mjs.map +1 -0
- package/dist/utils/json-utils.cjs +46 -0
- package/dist/utils/json-utils.d.cts +28 -0
- package/dist/utils/json-utils.d.cts.map +1 -0
- package/dist/utils/json-utils.d.mts +28 -0
- package/dist/utils/json-utils.d.mts.map +1 -0
- package/dist/utils/json-utils.mjs +44 -0
- package/dist/utils/json-utils.mjs.map +1 -0
- package/dist/utils/logger.cjs +72 -0
- package/dist/utils/logger.d.cts +41 -0
- package/dist/utils/logger.d.cts.map +1 -0
- package/dist/utils/logger.d.mts +41 -0
- package/dist/utils/logger.d.mts.map +1 -0
- package/dist/utils/logger.mjs +68 -0
- package/dist/utils/logger.mjs.map +1 -0
- package/dist/utils/mcp-utils.cjs +53 -0
- package/dist/utils/mcp-utils.d.cts +10 -0
- package/dist/utils/mcp-utils.d.cts.map +1 -0
- package/dist/utils/mcp-utils.d.mts +10 -0
- package/dist/utils/mcp-utils.d.mts.map +1 -0
- package/dist/utils/mcp-utils.mjs +51 -0
- package/dist/utils/mcp-utils.mjs.map +1 -0
- package/dist/utils/model-utils.cjs +12 -0
- package/dist/utils/model-utils.d.cts +8 -0
- package/dist/utils/model-utils.d.cts.map +1 -0
- package/dist/utils/model-utils.d.mts +8 -0
- package/dist/utils/model-utils.d.mts.map +1 -0
- package/dist/utils/model-utils.mjs +12 -0
- package/dist/utils/model-utils.mjs.map +1 -0
- package/dist/utils/promise.cjs +17 -0
- package/dist/utils/promise.d.cts +10 -0
- package/dist/utils/promise.d.cts.map +1 -0
- package/dist/utils/promise.d.mts +10 -0
- package/dist/utils/promise.d.mts.map +1 -0
- package/dist/utils/promise.mjs +17 -0
- package/dist/utils/promise.mjs.map +1 -0
- package/dist/utils/prompts.cjs +19 -0
- package/dist/utils/prompts.d.cts +6 -0
- package/dist/utils/prompts.d.cts.map +1 -0
- package/dist/utils/prompts.d.mts +6 -0
- package/dist/utils/prompts.d.mts.map +1 -0
- package/dist/utils/prompts.mjs +18 -0
- package/dist/utils/prompts.mjs.map +1 -0
- package/dist/utils/queue.cjs +273 -0
- package/dist/utils/queue.d.cts +60 -0
- package/dist/utils/queue.d.cts.map +1 -0
- package/dist/utils/queue.d.mts +60 -0
- package/dist/utils/queue.d.mts.map +1 -0
- package/dist/utils/queue.mjs +271 -0
- package/dist/utils/queue.mjs.map +1 -0
- package/dist/utils/role-utils.cjs +40 -0
- package/dist/utils/role-utils.d.cts +32 -0
- package/dist/utils/role-utils.d.cts.map +1 -0
- package/dist/utils/role-utils.d.mts +32 -0
- package/dist/utils/role-utils.d.mts.map +1 -0
- package/dist/utils/role-utils.mjs +38 -0
- package/dist/utils/role-utils.mjs.map +1 -0
- package/dist/utils/stream-polyfill.cjs +37 -0
- package/dist/utils/stream-polyfill.d.cts +1 -0
- package/dist/utils/stream-polyfill.d.mts +1 -0
- package/dist/utils/stream-polyfill.mjs +38 -0
- package/dist/utils/stream-polyfill.mjs.map +1 -0
- package/dist/utils/stream-utils.cjs +187 -0
- package/dist/utils/stream-utils.d.cts +30 -0
- package/dist/utils/stream-utils.d.cts.map +1 -0
- package/dist/utils/stream-utils.d.mts +30 -0
- package/dist/utils/stream-utils.d.mts.map +1 -0
- package/dist/utils/stream-utils.mjs +174 -0
- package/dist/utils/stream-utils.mjs.map +1 -0
- package/dist/utils/structured-stream-extractor.cjs +63 -0
- package/dist/utils/structured-stream-extractor.d.cts +23 -0
- package/dist/utils/structured-stream-extractor.d.cts.map +1 -0
- package/dist/utils/structured-stream-extractor.d.mts +23 -0
- package/dist/utils/structured-stream-extractor.d.mts.map +1 -0
- package/dist/utils/structured-stream-extractor.mjs +64 -0
- package/dist/utils/structured-stream-extractor.mjs.map +1 -0
- package/dist/utils/test/agent-response.cjs +16 -0
- package/dist/utils/test/agent-response.d.cts +12 -0
- package/dist/utils/test/agent-response.d.cts.map +1 -0
- package/dist/utils/test/agent-response.d.mts +13 -0
- package/dist/utils/test/agent-response.d.mts.map +1 -0
- package/dist/utils/test/agent-response.mjs +17 -0
- package/dist/utils/test/agent-response.mjs.map +1 -0
- package/dist/utils/test/openai-like-utils.cjs +73 -0
- package/dist/utils/test/openai-like-utils.d.cts +13 -0
- package/dist/utils/test/openai-like-utils.d.cts.map +1 -0
- package/dist/utils/test/openai-like-utils.d.mts +14 -0
- package/dist/utils/test/openai-like-utils.d.mts.map +1 -0
- package/dist/utils/test/openai-like-utils.mjs +68 -0
- package/dist/utils/test/openai-like-utils.mjs.map +1 -0
- package/dist/utils/token-estimator.cjs +57 -0
- package/dist/utils/token-estimator.d.cts +13 -0
- package/dist/utils/token-estimator.d.cts.map +1 -0
- package/dist/utils/token-estimator.d.mts +13 -0
- package/dist/utils/token-estimator.d.mts.map +1 -0
- package/dist/utils/token-estimator.mjs +57 -0
- package/dist/utils/token-estimator.mjs.map +1 -0
- package/dist/utils/type-utils.cjs +159 -0
- package/dist/utils/type-utils.d.cts +32 -0
- package/dist/utils/type-utils.d.cts.map +1 -0
- package/dist/utils/type-utils.d.mts +32 -0
- package/dist/utils/type-utils.d.mts.map +1 -0
- package/dist/utils/type-utils.mjs +141 -0
- package/dist/utils/type-utils.mjs.map +1 -0
- package/dist/utils/typed-event-emitter.cjs +0 -0
- package/dist/utils/typed-event-emitter.d.cts +13 -0
- package/dist/utils/typed-event-emitter.d.cts.map +1 -0
- package/dist/utils/typed-event-emitter.d.mts +13 -0
- package/dist/utils/typed-event-emitter.d.mts.map +1 -0
- package/dist/utils/typed-event-emitter.mjs +1 -0
- package/package.json +143 -62
- package/CHANGELOG.md +0 -2584
- package/lib/cjs/agents/agent.d.ts +0 -961
- package/lib/cjs/agents/agent.js +0 -961
- package/lib/cjs/agents/ai-agent.d.ts +0 -395
- package/lib/cjs/agents/ai-agent.js +0 -572
- package/lib/cjs/agents/chat-model.d.ts +0 -672
- package/lib/cjs/agents/chat-model.js +0 -457
- package/lib/cjs/agents/guide-rail-agent.d.ts +0 -62
- package/lib/cjs/agents/guide-rail-agent.js +0 -14
- package/lib/cjs/agents/image-agent.d.ts +0 -38
- package/lib/cjs/agents/image-agent.js +0 -71
- package/lib/cjs/agents/image-model.d.ts +0 -270
- package/lib/cjs/agents/image-model.js +0 -91
- package/lib/cjs/agents/mcp-agent.d.ts +0 -231
- package/lib/cjs/agents/mcp-agent.js +0 -366
- package/lib/cjs/agents/model.d.ts +0 -252
- package/lib/cjs/agents/model.js +0 -180
- package/lib/cjs/agents/team-agent.d.ts +0 -382
- package/lib/cjs/agents/team-agent.js +0 -386
- package/lib/cjs/agents/transform-agent.d.ts +0 -94
- package/lib/cjs/agents/transform-agent.js +0 -80
- package/lib/cjs/agents/types.d.ts +0 -31
- package/lib/cjs/agents/types.js +0 -40
- package/lib/cjs/agents/user-agent.d.ts +0 -27
- package/lib/cjs/agents/user-agent.js +0 -90
- package/lib/cjs/agents/video-model.d.ts +0 -280
- package/lib/cjs/agents/video-model.js +0 -67
- package/lib/cjs/aigne/aigne.d.ts +0 -335
- package/lib/cjs/aigne/aigne.js +0 -248
- package/lib/cjs/aigne/context.d.ts +0 -220
- package/lib/cjs/aigne/context.js +0 -423
- package/lib/cjs/aigne/index.d.ts +0 -4
- package/lib/cjs/aigne/index.js +0 -20
- package/lib/cjs/aigne/message-queue.d.ts +0 -48
- package/lib/cjs/aigne/message-queue.js +0 -109
- package/lib/cjs/aigne/type.d.ts +0 -26
- package/lib/cjs/aigne/type.js +0 -2
- package/lib/cjs/aigne/usage.d.ts +0 -28
- package/lib/cjs/aigne/usage.js +0 -34
- package/lib/cjs/index.d.ts +0 -21
- package/lib/cjs/index.js +0 -37
- package/lib/cjs/loader/agent-js.d.ts +0 -2
- package/lib/cjs/loader/agent-js.js +0 -21
- package/lib/cjs/loader/agent-yaml.d.ts +0 -78
- package/lib/cjs/loader/agent-yaml.js +0 -120
- package/lib/cjs/loader/agents.d.ts +0 -4
- package/lib/cjs/loader/agents.js +0 -17
- package/lib/cjs/loader/error.d.ts +0 -2
- package/lib/cjs/loader/error.js +0 -6
- package/lib/cjs/loader/function-agent.d.ts +0 -2
- package/lib/cjs/loader/function-agent.js +0 -7
- package/lib/cjs/loader/index.d.ts +0 -247
- package/lib/cjs/loader/index.js +0 -266
- package/lib/cjs/loader/schema.d.ts +0 -167
- package/lib/cjs/loader/schema.js +0 -162
- package/lib/cjs/memory/index.d.ts +0 -3
- package/lib/cjs/memory/index.js +0 -19
- package/lib/cjs/memory/memory.d.ts +0 -93
- package/lib/cjs/memory/memory.js +0 -147
- package/lib/cjs/memory/recorder.d.ts +0 -93
- package/lib/cjs/memory/recorder.js +0 -63
- package/lib/cjs/memory/retriever.d.ts +0 -106
- package/lib/cjs/memory/retriever.js +0 -60
- package/lib/cjs/package.json +0 -3
- package/lib/cjs/prompt/agent-session.d.ts +0 -163
- package/lib/cjs/prompt/agent-session.js +0 -1008
- package/lib/cjs/prompt/compact/compactor.d.ts +0 -7
- package/lib/cjs/prompt/compact/compactor.js +0 -52
- package/lib/cjs/prompt/compact/session-memory-extractor.d.ts +0 -7
- package/lib/cjs/prompt/compact/session-memory-extractor.js +0 -143
- package/lib/cjs/prompt/compact/types.d.ts +0 -336
- package/lib/cjs/prompt/compact/types.js +0 -53
- package/lib/cjs/prompt/compact/user-memory-extractor.d.ts +0 -7
- package/lib/cjs/prompt/compact/user-memory-extractor.js +0 -124
- package/lib/cjs/prompt/context/afs/history.d.ts +0 -9
- package/lib/cjs/prompt/context/afs/history.js +0 -33
- package/lib/cjs/prompt/context/afs/index.d.ts +0 -20
- package/lib/cjs/prompt/context/afs/index.js +0 -54
- package/lib/cjs/prompt/context/index.d.ts +0 -31
- package/lib/cjs/prompt/context/index.js +0 -18
- package/lib/cjs/prompt/filters/index.d.ts +0 -2
- package/lib/cjs/prompt/filters/index.js +0 -51
- package/lib/cjs/prompt/prompt-builder.d.ts +0 -50
- package/lib/cjs/prompt/prompt-builder.js +0 -352
- package/lib/cjs/prompt/prompts/afs-builtin-prompt.d.ts +0 -4
- package/lib/cjs/prompt/prompts/afs-builtin-prompt.js +0 -36
- package/lib/cjs/prompt/prompts/memory-message-template.d.ts +0 -1
- package/lib/cjs/prompt/prompts/memory-message-template.js +0 -8
- package/lib/cjs/prompt/prompts/structured-stream-instructions.d.ts +0 -7
- package/lib/cjs/prompt/prompts/structured-stream-instructions.js +0 -27
- package/lib/cjs/prompt/skills/afs/agent-skill/agent-skill.d.ts +0 -19
- package/lib/cjs/prompt/skills/afs/agent-skill/agent-skill.js +0 -69
- package/lib/cjs/prompt/skills/afs/agent-skill/skill-loader.d.ts +0 -12
- package/lib/cjs/prompt/skills/afs/agent-skill/skill-loader.js +0 -50
- package/lib/cjs/prompt/skills/afs/base.d.ts +0 -4
- package/lib/cjs/prompt/skills/afs/base.js +0 -8
- package/lib/cjs/prompt/skills/afs/delete.d.ts +0 -19
- package/lib/cjs/prompt/skills/afs/delete.js +0 -54
- package/lib/cjs/prompt/skills/afs/edit.d.ts +0 -24
- package/lib/cjs/prompt/skills/afs/edit.js +0 -124
- package/lib/cjs/prompt/skills/afs/exec.d.ts +0 -16
- package/lib/cjs/prompt/skills/afs/exec.js +0 -43
- package/lib/cjs/prompt/skills/afs/index.d.ts +0 -3
- package/lib/cjs/prompt/skills/afs/index.js +0 -26
- package/lib/cjs/prompt/skills/afs/list.d.ts +0 -24
- package/lib/cjs/prompt/skills/afs/list.js +0 -81
- package/lib/cjs/prompt/skills/afs/read.d.ts +0 -28
- package/lib/cjs/prompt/skills/afs/read.js +0 -105
- package/lib/cjs/prompt/skills/afs/rename.d.ts +0 -21
- package/lib/cjs/prompt/skills/afs/rename.js +0 -59
- package/lib/cjs/prompt/skills/afs/search.d.ts +0 -24
- package/lib/cjs/prompt/skills/afs/search.js +0 -71
- package/lib/cjs/prompt/skills/afs/write.d.ts +0 -20
- package/lib/cjs/prompt/skills/afs/write.js +0 -59
- package/lib/cjs/prompt/template.d.ts +0 -243
- package/lib/cjs/prompt/template.js +0 -265
- package/lib/cjs/utils/agent-utils.d.ts +0 -13
- package/lib/cjs/utils/agent-utils.js +0 -60
- package/lib/cjs/utils/camelize.d.ts +0 -7
- package/lib/cjs/utils/camelize.js +0 -38
- package/lib/cjs/utils/event-stream.d.ts +0 -15
- package/lib/cjs/utils/event-stream.js +0 -158
- package/lib/cjs/utils/fetch.d.ts +0 -4
- package/lib/cjs/utils/fetch.js +0 -36
- package/lib/cjs/utils/json-schema.d.ts +0 -15
- package/lib/cjs/utils/json-schema.js +0 -123
- package/lib/cjs/utils/json-utils.d.ts +0 -24
- package/lib/cjs/utils/json-utils.js +0 -48
- package/lib/cjs/utils/logger.d.ts +0 -39
- package/lib/cjs/utils/logger.js +0 -81
- package/lib/cjs/utils/mcp-utils.d.ts +0 -5
- package/lib/cjs/utils/mcp-utils.js +0 -52
- package/lib/cjs/utils/model-utils.d.ts +0 -3
- package/lib/cjs/utils/model-utils.js +0 -10
- package/lib/cjs/utils/promise.d.ts +0 -6
- package/lib/cjs/utils/promise.js +0 -12
- package/lib/cjs/utils/prompts.d.ts +0 -2
- package/lib/cjs/utils/prompts.js +0 -22
- package/lib/cjs/utils/queue.d.ts +0 -57
- package/lib/cjs/utils/queue.js +0 -318
- package/lib/cjs/utils/role-utils.d.ts +0 -31
- package/lib/cjs/utils/role-utils.js +0 -37
- package/lib/cjs/utils/stream-polyfill.d.ts +0 -1
- package/lib/cjs/utils/stream-polyfill.js +0 -38
- package/lib/cjs/utils/stream-utils.d.ts +0 -26
- package/lib/cjs/utils/stream-utils.js +0 -235
- package/lib/cjs/utils/structured-stream-extractor.d.ts +0 -14
- package/lib/cjs/utils/structured-stream-extractor.js +0 -68
- package/lib/cjs/utils/token-estimator.d.ts +0 -9
- package/lib/cjs/utils/token-estimator.js +0 -66
- package/lib/cjs/utils/type-utils.d.ts +0 -31
- package/lib/cjs/utils/type-utils.js +0 -202
- package/lib/cjs/utils/typed-event-emitter.d.ts +0 -10
- package/lib/cjs/utils/typed-event-emitter.js +0 -2
- package/lib/dts/agents/agent.d.ts +0 -961
- package/lib/dts/agents/ai-agent.d.ts +0 -395
- package/lib/dts/agents/chat-model.d.ts +0 -672
- package/lib/dts/agents/guide-rail-agent.d.ts +0 -62
- package/lib/dts/agents/image-agent.d.ts +0 -38
- package/lib/dts/agents/image-model.d.ts +0 -270
- package/lib/dts/agents/mcp-agent.d.ts +0 -231
- package/lib/dts/agents/model.d.ts +0 -252
- package/lib/dts/agents/team-agent.d.ts +0 -382
- package/lib/dts/agents/transform-agent.d.ts +0 -94
- package/lib/dts/agents/types.d.ts +0 -31
- package/lib/dts/agents/user-agent.d.ts +0 -27
- package/lib/dts/agents/video-model.d.ts +0 -280
- package/lib/dts/aigne/aigne.d.ts +0 -335
- package/lib/dts/aigne/context.d.ts +0 -220
- package/lib/dts/aigne/index.d.ts +0 -4
- package/lib/dts/aigne/message-queue.d.ts +0 -48
- package/lib/dts/aigne/type.d.ts +0 -26
- package/lib/dts/aigne/usage.d.ts +0 -28
- package/lib/dts/index.d.ts +0 -21
- package/lib/dts/loader/agent-js.d.ts +0 -2
- package/lib/dts/loader/agent-yaml.d.ts +0 -78
- package/lib/dts/loader/agents.d.ts +0 -4
- package/lib/dts/loader/error.d.ts +0 -2
- package/lib/dts/loader/function-agent.d.ts +0 -2
- package/lib/dts/loader/index.d.ts +0 -247
- package/lib/dts/loader/schema.d.ts +0 -167
- package/lib/dts/memory/index.d.ts +0 -3
- package/lib/dts/memory/memory.d.ts +0 -93
- package/lib/dts/memory/recorder.d.ts +0 -93
- package/lib/dts/memory/retriever.d.ts +0 -106
- package/lib/dts/prompt/agent-session.d.ts +0 -163
- package/lib/dts/prompt/compact/compactor.d.ts +0 -7
- package/lib/dts/prompt/compact/session-memory-extractor.d.ts +0 -7
- package/lib/dts/prompt/compact/types.d.ts +0 -336
- package/lib/dts/prompt/compact/user-memory-extractor.d.ts +0 -7
- package/lib/dts/prompt/context/afs/history.d.ts +0 -9
- package/lib/dts/prompt/context/afs/index.d.ts +0 -20
- package/lib/dts/prompt/context/index.d.ts +0 -31
- package/lib/dts/prompt/filters/index.d.ts +0 -2
- package/lib/dts/prompt/prompt-builder.d.ts +0 -50
- package/lib/dts/prompt/prompts/afs-builtin-prompt.d.ts +0 -4
- package/lib/dts/prompt/prompts/memory-message-template.d.ts +0 -1
- package/lib/dts/prompt/prompts/structured-stream-instructions.d.ts +0 -7
- package/lib/dts/prompt/skills/afs/agent-skill/agent-skill.d.ts +0 -19
- package/lib/dts/prompt/skills/afs/agent-skill/skill-loader.d.ts +0 -12
- package/lib/dts/prompt/skills/afs/base.d.ts +0 -4
- package/lib/dts/prompt/skills/afs/delete.d.ts +0 -19
- package/lib/dts/prompt/skills/afs/edit.d.ts +0 -24
- package/lib/dts/prompt/skills/afs/exec.d.ts +0 -16
- package/lib/dts/prompt/skills/afs/index.d.ts +0 -3
- package/lib/dts/prompt/skills/afs/list.d.ts +0 -24
- package/lib/dts/prompt/skills/afs/read.d.ts +0 -28
- package/lib/dts/prompt/skills/afs/rename.d.ts +0 -21
- package/lib/dts/prompt/skills/afs/search.d.ts +0 -24
- package/lib/dts/prompt/skills/afs/write.d.ts +0 -20
- package/lib/dts/prompt/template.d.ts +0 -243
- package/lib/dts/utils/agent-utils.d.ts +0 -13
- package/lib/dts/utils/camelize.d.ts +0 -7
- package/lib/dts/utils/event-stream.d.ts +0 -15
- package/lib/dts/utils/fetch.d.ts +0 -4
- package/lib/dts/utils/json-schema.d.ts +0 -15
- package/lib/dts/utils/json-utils.d.ts +0 -24
- package/lib/dts/utils/logger.d.ts +0 -39
- package/lib/dts/utils/mcp-utils.d.ts +0 -5
- package/lib/dts/utils/model-utils.d.ts +0 -3
- package/lib/dts/utils/promise.d.ts +0 -6
- package/lib/dts/utils/prompts.d.ts +0 -2
- package/lib/dts/utils/queue.d.ts +0 -57
- package/lib/dts/utils/role-utils.d.ts +0 -31
- package/lib/dts/utils/stream-polyfill.d.ts +0 -1
- package/lib/dts/utils/stream-utils.d.ts +0 -26
- package/lib/dts/utils/structured-stream-extractor.d.ts +0 -14
- package/lib/dts/utils/token-estimator.d.ts +0 -9
- package/lib/dts/utils/type-utils.d.ts +0 -31
- package/lib/dts/utils/typed-event-emitter.d.ts +0 -10
- package/lib/esm/agents/agent.d.ts +0 -961
- package/lib/esm/agents/agent.js +0 -911
- package/lib/esm/agents/ai-agent.d.ts +0 -395
- package/lib/esm/agents/ai-agent.js +0 -535
- package/lib/esm/agents/chat-model.d.ts +0 -672
- package/lib/esm/agents/chat-model.js +0 -419
- package/lib/esm/agents/guide-rail-agent.d.ts +0 -62
- package/lib/esm/agents/guide-rail-agent.js +0 -11
- package/lib/esm/agents/image-agent.d.ts +0 -38
- package/lib/esm/agents/image-agent.js +0 -64
- package/lib/esm/agents/image-model.d.ts +0 -270
- package/lib/esm/agents/image-model.js +0 -87
- package/lib/esm/agents/mcp-agent.d.ts +0 -231
- package/lib/esm/agents/mcp-agent.js +0 -325
- package/lib/esm/agents/model.d.ts +0 -252
- package/lib/esm/agents/model.js +0 -143
- package/lib/esm/agents/team-agent.d.ts +0 -382
- package/lib/esm/agents/team-agent.js +0 -346
- package/lib/esm/agents/transform-agent.d.ts +0 -94
- package/lib/esm/agents/transform-agent.js +0 -73
- package/lib/esm/agents/types.d.ts +0 -31
- package/lib/esm/agents/types.js +0 -30
- package/lib/esm/agents/user-agent.d.ts +0 -27
- package/lib/esm/agents/user-agent.js +0 -86
- package/lib/esm/agents/video-model.d.ts +0 -280
- package/lib/esm/agents/video-model.js +0 -63
- package/lib/esm/aigne/aigne.d.ts +0 -335
- package/lib/esm/aigne/aigne.js +0 -244
- package/lib/esm/aigne/context.d.ts +0 -220
- package/lib/esm/aigne/context.js +0 -416
- package/lib/esm/aigne/index.d.ts +0 -4
- package/lib/esm/aigne/index.js +0 -4
- package/lib/esm/aigne/message-queue.d.ts +0 -48
- package/lib/esm/aigne/message-queue.js +0 -104
- package/lib/esm/aigne/type.d.ts +0 -26
- package/lib/esm/aigne/type.js +0 -1
- package/lib/esm/aigne/usage.d.ts +0 -28
- package/lib/esm/aigne/usage.js +0 -30
- package/lib/esm/index.d.ts +0 -21
- package/lib/esm/index.js +0 -21
- package/lib/esm/loader/agent-js.d.ts +0 -2
- package/lib/esm/loader/agent-js.js +0 -18
- package/lib/esm/loader/agent-yaml.d.ts +0 -78
- package/lib/esm/loader/agent-yaml.js +0 -113
- package/lib/esm/loader/agents.d.ts +0 -4
- package/lib/esm/loader/agents.js +0 -14
- package/lib/esm/loader/error.d.ts +0 -2
- package/lib/esm/loader/error.js +0 -2
- package/lib/esm/loader/function-agent.d.ts +0 -2
- package/lib/esm/loader/function-agent.js +0 -4
- package/lib/esm/loader/index.d.ts +0 -247
- package/lib/esm/loader/index.js +0 -258
- package/lib/esm/loader/schema.d.ts +0 -167
- package/lib/esm/loader/schema.js +0 -153
- package/lib/esm/memory/index.d.ts +0 -3
- package/lib/esm/memory/index.js +0 -3
- package/lib/esm/memory/memory.d.ts +0 -93
- package/lib/esm/memory/memory.js +0 -142
- package/lib/esm/memory/recorder.d.ts +0 -93
- package/lib/esm/memory/recorder.js +0 -59
- package/lib/esm/memory/retriever.d.ts +0 -106
- package/lib/esm/memory/retriever.js +0 -56
- package/lib/esm/package.json +0 -3
- package/lib/esm/prompt/agent-session.d.ts +0 -163
- package/lib/esm/prompt/agent-session.js +0 -968
- package/lib/esm/prompt/compact/compactor.d.ts +0 -7
- package/lib/esm/prompt/compact/compactor.js +0 -48
- package/lib/esm/prompt/compact/session-memory-extractor.d.ts +0 -7
- package/lib/esm/prompt/compact/session-memory-extractor.js +0 -139
- package/lib/esm/prompt/compact/types.d.ts +0 -336
- package/lib/esm/prompt/compact/types.js +0 -50
- package/lib/esm/prompt/compact/user-memory-extractor.d.ts +0 -7
- package/lib/esm/prompt/compact/user-memory-extractor.js +0 -120
- package/lib/esm/prompt/context/afs/history.d.ts +0 -9
- package/lib/esm/prompt/context/afs/history.js +0 -30
- package/lib/esm/prompt/context/afs/index.d.ts +0 -20
- package/lib/esm/prompt/context/afs/index.js +0 -51
- package/lib/esm/prompt/context/index.d.ts +0 -31
- package/lib/esm/prompt/context/index.js +0 -15
- package/lib/esm/prompt/filters/index.d.ts +0 -2
- package/lib/esm/prompt/filters/index.js +0 -15
- package/lib/esm/prompt/prompt-builder.d.ts +0 -50
- package/lib/esm/prompt/prompt-builder.js +0 -348
- package/lib/esm/prompt/prompts/afs-builtin-prompt.d.ts +0 -4
- package/lib/esm/prompt/prompts/afs-builtin-prompt.js +0 -32
- package/lib/esm/prompt/prompts/memory-message-template.d.ts +0 -1
- package/lib/esm/prompt/prompts/memory-message-template.js +0 -5
- package/lib/esm/prompt/prompts/structured-stream-instructions.d.ts +0 -7
- package/lib/esm/prompt/prompts/structured-stream-instructions.js +0 -24
- package/lib/esm/prompt/skills/afs/agent-skill/agent-skill.d.ts +0 -19
- package/lib/esm/prompt/skills/afs/agent-skill/agent-skill.js +0 -65
- package/lib/esm/prompt/skills/afs/agent-skill/skill-loader.d.ts +0 -12
- package/lib/esm/prompt/skills/afs/agent-skill/skill-loader.js +0 -43
- package/lib/esm/prompt/skills/afs/base.d.ts +0 -4
- package/lib/esm/prompt/skills/afs/base.js +0 -4
- package/lib/esm/prompt/skills/afs/delete.d.ts +0 -19
- package/lib/esm/prompt/skills/afs/delete.js +0 -50
- package/lib/esm/prompt/skills/afs/edit.d.ts +0 -24
- package/lib/esm/prompt/skills/afs/edit.js +0 -120
- package/lib/esm/prompt/skills/afs/exec.d.ts +0 -16
- package/lib/esm/prompt/skills/afs/exec.js +0 -39
- package/lib/esm/prompt/skills/afs/index.d.ts +0 -3
- package/lib/esm/prompt/skills/afs/index.js +0 -23
- package/lib/esm/prompt/skills/afs/list.d.ts +0 -24
- package/lib/esm/prompt/skills/afs/list.js +0 -77
- package/lib/esm/prompt/skills/afs/read.d.ts +0 -28
- package/lib/esm/prompt/skills/afs/read.js +0 -101
- package/lib/esm/prompt/skills/afs/rename.d.ts +0 -21
- package/lib/esm/prompt/skills/afs/rename.js +0 -55
- package/lib/esm/prompt/skills/afs/search.d.ts +0 -24
- package/lib/esm/prompt/skills/afs/search.js +0 -67
- package/lib/esm/prompt/skills/afs/write.d.ts +0 -20
- package/lib/esm/prompt/skills/afs/write.js +0 -55
- package/lib/esm/prompt/template.d.ts +0 -243
- package/lib/esm/prompt/template.js +0 -249
- package/lib/esm/utils/agent-utils.d.ts +0 -13
- package/lib/esm/utils/agent-utils.js +0 -54
- package/lib/esm/utils/camelize.d.ts +0 -7
- package/lib/esm/utils/camelize.js +0 -34
- package/lib/esm/utils/event-stream.d.ts +0 -15
- package/lib/esm/utils/event-stream.js +0 -151
- package/lib/esm/utils/fetch.d.ts +0 -4
- package/lib/esm/utils/fetch.js +0 -33
- package/lib/esm/utils/json-schema.d.ts +0 -15
- package/lib/esm/utils/json-schema.js +0 -114
- package/lib/esm/utils/json-utils.d.ts +0 -24
- package/lib/esm/utils/json-utils.js +0 -41
- package/lib/esm/utils/logger.d.ts +0 -39
- package/lib/esm/utils/logger.js +0 -73
- package/lib/esm/utils/mcp-utils.d.ts +0 -5
- package/lib/esm/utils/mcp-utils.js +0 -47
- package/lib/esm/utils/model-utils.d.ts +0 -3
- package/lib/esm/utils/model-utils.js +0 -7
- package/lib/esm/utils/promise.d.ts +0 -6
- package/lib/esm/utils/promise.js +0 -9
- package/lib/esm/utils/prompts.d.ts +0 -2
- package/lib/esm/utils/prompts.js +0 -18
- package/lib/esm/utils/queue.d.ts +0 -57
- package/lib/esm/utils/queue.js +0 -315
- package/lib/esm/utils/role-utils.d.ts +0 -31
- package/lib/esm/utils/role-utils.js +0 -33
- package/lib/esm/utils/stream-polyfill.d.ts +0 -1
- package/lib/esm/utils/stream-polyfill.js +0 -37
- package/lib/esm/utils/stream-utils.d.ts +0 -26
- package/lib/esm/utils/stream-utils.js +0 -217
- package/lib/esm/utils/structured-stream-extractor.d.ts +0 -14
- package/lib/esm/utils/structured-stream-extractor.js +0 -64
- package/lib/esm/utils/token-estimator.d.ts +0 -9
- package/lib/esm/utils/token-estimator.js +0 -63
- package/lib/esm/utils/type-utils.d.ts +0 -31
- package/lib/esm/utils/type-utils.js +0 -181
- package/lib/esm/utils/typed-event-emitter.d.ts +0 -10
- package/lib/esm/utils/typed-event-emitter.js +0 -1
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
import type { AFSOptions } from "@aigne/afs";
|
|
2
|
-
import { type ZodType, z } from "zod";
|
|
3
|
-
import type { AgentHooks, TaskRenderMode } from "../agents/agent.js";
|
|
4
|
-
import type { LoadOptions } from "./index.js";
|
|
5
|
-
import { chatModelSchema, imageModelSchema } from "./schema.js";
|
|
6
|
-
export interface HooksSchema {
|
|
7
|
-
priority?: AgentHooks["priority"];
|
|
8
|
-
onStart?: NestAgentSchema;
|
|
9
|
-
onSuccess?: NestAgentSchema;
|
|
10
|
-
onError?: NestAgentSchema;
|
|
11
|
-
onEnd?: NestAgentSchema;
|
|
12
|
-
onSkillStart?: NestAgentSchema;
|
|
13
|
-
onSkillEnd?: NestAgentSchema;
|
|
14
|
-
onHandoff?: NestAgentSchema;
|
|
15
|
-
}
|
|
16
|
-
export type NestAgentSchema = string | {
|
|
17
|
-
url: string;
|
|
18
|
-
defaultInput?: Record<string, any>;
|
|
19
|
-
hooks?: HooksSchema | HooksSchema[];
|
|
20
|
-
} | AgentSchema;
|
|
21
|
-
export type AFSModuleSchema = string | {
|
|
22
|
-
module: string;
|
|
23
|
-
options?: Record<string, any>;
|
|
24
|
-
};
|
|
25
|
-
export interface AFSContextPresetSchema {
|
|
26
|
-
view?: string;
|
|
27
|
-
select?: {
|
|
28
|
-
agent: NestAgentSchema;
|
|
29
|
-
};
|
|
30
|
-
per?: {
|
|
31
|
-
agent: NestAgentSchema;
|
|
32
|
-
};
|
|
33
|
-
dedupe?: {
|
|
34
|
-
agent: NestAgentSchema;
|
|
35
|
-
};
|
|
36
|
-
}
|
|
37
|
-
export interface AFSContextSchema {
|
|
38
|
-
search?: {
|
|
39
|
-
presets?: Record<string, AFSContextPresetSchema>;
|
|
40
|
-
};
|
|
41
|
-
list?: {
|
|
42
|
-
presets?: Record<string, AFSContextPresetSchema>;
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
export interface AgentSchema {
|
|
46
|
-
type: string;
|
|
47
|
-
name?: string;
|
|
48
|
-
description?: string;
|
|
49
|
-
model?: z.infer<typeof chatModelSchema>;
|
|
50
|
-
imageModel?: z.infer<typeof imageModelSchema>;
|
|
51
|
-
taskTitle?: string;
|
|
52
|
-
taskRenderMode?: TaskRenderMode;
|
|
53
|
-
inputSchema?: ZodType<Record<string, any>>;
|
|
54
|
-
defaultInput?: Record<string, any>;
|
|
55
|
-
outputSchema?: ZodType<Record<string, any>>;
|
|
56
|
-
includeInputInOutput?: boolean;
|
|
57
|
-
skills?: NestAgentSchema[];
|
|
58
|
-
hooks?: HooksSchema | HooksSchema[];
|
|
59
|
-
memory?: boolean | {
|
|
60
|
-
provider: string;
|
|
61
|
-
subscribeTopic?: string[];
|
|
62
|
-
};
|
|
63
|
-
afs?: boolean | (Omit<AFSOptions, "modules" | "context"> & {
|
|
64
|
-
modules?: AFSModuleSchema[];
|
|
65
|
-
context?: AFSContextSchema;
|
|
66
|
-
});
|
|
67
|
-
shareAFS?: boolean;
|
|
68
|
-
[key: string]: unknown;
|
|
69
|
-
}
|
|
70
|
-
export declare function parseAgentFile(path: string, data: any, options: LoadOptions): Promise<AgentSchema>;
|
|
71
|
-
export declare function loadAgentFromYamlFile(path: string, options: LoadOptions): Promise<AgentSchema>;
|
|
72
|
-
export declare const getAgentSchema: ({ filepath }: {
|
|
73
|
-
filepath: string;
|
|
74
|
-
options?: LoadOptions;
|
|
75
|
-
}) => ZodType<AgentSchema, z.ZodTypeDef, AgentSchema>;
|
|
76
|
-
export declare const getNestAgentSchema: ({ filepath, }: {
|
|
77
|
-
filepath: string;
|
|
78
|
-
}) => ZodType<NestAgentSchema>;
|
|
@@ -1,247 +0,0 @@
|
|
|
1
|
-
import { AFS, type AFSModule } from "@aigne/afs";
|
|
2
|
-
import { type ZodType, z } from "zod";
|
|
3
|
-
import { Agent, type AgentOptions } from "../agents/agent.js";
|
|
4
|
-
import type { ChatModel } from "../agents/chat-model.js";
|
|
5
|
-
import type { ImageModel } from "../agents/image-model.js";
|
|
6
|
-
import type { AIGNEOptions } from "../aigne/aigne.js";
|
|
7
|
-
import type { MemoryAgent, MemoryAgentOptions } from "../memory/memory.js";
|
|
8
|
-
import { type PromiseOrValue } from "../utils/type-utils.js";
|
|
9
|
-
import { loadAgentFromYamlFile, type NestAgentSchema } from "./agent-yaml.js";
|
|
10
|
-
export interface LoadOptions {
|
|
11
|
-
memories?: {
|
|
12
|
-
new (parameters?: MemoryAgentOptions): MemoryAgent;
|
|
13
|
-
}[];
|
|
14
|
-
model?: ChatModel | ((model?: z.infer<typeof aigneFileSchema>["model"]) => PromiseOrValue<ChatModel | undefined>);
|
|
15
|
-
imageModel?: ImageModel | ((model?: z.infer<typeof aigneFileSchema>["imageModel"]) => PromiseOrValue<ImageModel | undefined>);
|
|
16
|
-
afs?: {
|
|
17
|
-
sharedAFS?: AFS;
|
|
18
|
-
availableModules?: {
|
|
19
|
-
module: string;
|
|
20
|
-
alias?: string[];
|
|
21
|
-
load: (options: {
|
|
22
|
-
filepath: string;
|
|
23
|
-
parsed?: object;
|
|
24
|
-
}) => PromiseOrValue<AFSModule>;
|
|
25
|
-
}[];
|
|
26
|
-
};
|
|
27
|
-
aigne?: z.infer<typeof aigneFileSchema>;
|
|
28
|
-
require?: (modulePath: string, options: {
|
|
29
|
-
parent?: string;
|
|
30
|
-
}) => Promise<any>;
|
|
31
|
-
}
|
|
32
|
-
export interface AgentLoadOptions extends LoadOptions {
|
|
33
|
-
loadNestAgent: (path: string, agent: NestAgentSchema, options: LoadOptions, agentOptions?: AgentOptions<any, any> & Record<string, unknown>) => Promise<Agent>;
|
|
34
|
-
}
|
|
35
|
-
export declare function load(path: string, options?: LoadOptions): Promise<AIGNEOptions>;
|
|
36
|
-
export declare function loadAgent(path: string, options: LoadOptions, agentOptions?: AgentOptions): Promise<Agent>;
|
|
37
|
-
export declare function loadNestAgent(path: string, agent: NestAgentSchema, options: LoadOptions, agentOptions?: AgentOptions<any, any> & Record<string, unknown>): Promise<Agent>;
|
|
38
|
-
export declare function parseAgent(path: string, agent: Awaited<ReturnType<typeof loadAgentFromYamlFile>>, options: LoadOptions, agentOptions?: AgentOptions): Promise<Agent>;
|
|
39
|
-
type CliAgent = string | {
|
|
40
|
-
url?: string;
|
|
41
|
-
name?: string;
|
|
42
|
-
alias?: string[];
|
|
43
|
-
description?: string;
|
|
44
|
-
agents?: CliAgent[];
|
|
45
|
-
};
|
|
46
|
-
declare const aigneFileSchema: z.ZodObject<{
|
|
47
|
-
name: ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
48
|
-
description: ZodType<string | undefined, z.ZodTypeDef, string | undefined>;
|
|
49
|
-
model: ZodType<z.objectInputType<{
|
|
50
|
-
model: ZodType<string | {
|
|
51
|
-
$get: string;
|
|
52
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
53
|
-
$get: string;
|
|
54
|
-
} | undefined>;
|
|
55
|
-
temperature: ZodType<number | {
|
|
56
|
-
$get: string;
|
|
57
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
58
|
-
$get: string;
|
|
59
|
-
} | undefined>;
|
|
60
|
-
topP: ZodType<number | {
|
|
61
|
-
$get: string;
|
|
62
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
63
|
-
$get: string;
|
|
64
|
-
} | undefined>;
|
|
65
|
-
frequencyPenalty: ZodType<number | {
|
|
66
|
-
$get: string;
|
|
67
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
68
|
-
$get: string;
|
|
69
|
-
} | undefined>;
|
|
70
|
-
presencePenalty: ZodType<number | {
|
|
71
|
-
$get: string;
|
|
72
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
73
|
-
$get: string;
|
|
74
|
-
} | undefined>;
|
|
75
|
-
thinkingEffort: ZodType<number | "high" | "low" | "medium" | "minimal" | {
|
|
76
|
-
$get: string;
|
|
77
|
-
} | undefined, z.ZodTypeDef, number | "high" | "low" | "medium" | "minimal" | {
|
|
78
|
-
$get: string;
|
|
79
|
-
} | undefined>;
|
|
80
|
-
}, z.ZodTypeAny, "passthrough"> | undefined, z.ZodTypeDef, z.objectInputType<{
|
|
81
|
-
model: ZodType<string | {
|
|
82
|
-
$get: string;
|
|
83
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
84
|
-
$get: string;
|
|
85
|
-
} | undefined>;
|
|
86
|
-
temperature: ZodType<number | {
|
|
87
|
-
$get: string;
|
|
88
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
89
|
-
$get: string;
|
|
90
|
-
} | undefined>;
|
|
91
|
-
topP: ZodType<number | {
|
|
92
|
-
$get: string;
|
|
93
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
94
|
-
$get: string;
|
|
95
|
-
} | undefined>;
|
|
96
|
-
frequencyPenalty: ZodType<number | {
|
|
97
|
-
$get: string;
|
|
98
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
99
|
-
$get: string;
|
|
100
|
-
} | undefined>;
|
|
101
|
-
presencePenalty: ZodType<number | {
|
|
102
|
-
$get: string;
|
|
103
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
104
|
-
$get: string;
|
|
105
|
-
} | undefined>;
|
|
106
|
-
thinkingEffort: ZodType<number | "high" | "low" | "medium" | "minimal" | {
|
|
107
|
-
$get: string;
|
|
108
|
-
} | undefined, z.ZodTypeDef, number | "high" | "low" | "medium" | "minimal" | {
|
|
109
|
-
$get: string;
|
|
110
|
-
} | undefined>;
|
|
111
|
-
}, z.ZodTypeAny, "passthrough"> | undefined>;
|
|
112
|
-
imageModel: ZodType<z.objectInputType<{
|
|
113
|
-
model: ZodType<string | {
|
|
114
|
-
$get: string;
|
|
115
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
116
|
-
$get: string;
|
|
117
|
-
} | undefined>;
|
|
118
|
-
}, z.ZodTypeAny, "passthrough"> | undefined, z.ZodTypeDef, z.objectInputType<{
|
|
119
|
-
model: ZodType<string | {
|
|
120
|
-
$get: string;
|
|
121
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
122
|
-
$get: string;
|
|
123
|
-
} | undefined>;
|
|
124
|
-
}, z.ZodTypeAny, "passthrough"> | undefined>;
|
|
125
|
-
agents: ZodType<string[] | undefined, z.ZodTypeDef, string[] | undefined>;
|
|
126
|
-
skills: ZodType<string[] | undefined, z.ZodTypeDef, string[] | undefined>;
|
|
127
|
-
mcpServer: ZodType<{
|
|
128
|
-
agents?: string[] | undefined;
|
|
129
|
-
} | undefined, z.ZodTypeDef, {
|
|
130
|
-
agents?: string[] | undefined;
|
|
131
|
-
} | undefined>;
|
|
132
|
-
cli: ZodType<{
|
|
133
|
-
agents?: CliAgent[] | undefined;
|
|
134
|
-
chat?: string | undefined;
|
|
135
|
-
} | undefined, z.ZodTypeDef, {
|
|
136
|
-
agents?: CliAgent[] | undefined;
|
|
137
|
-
chat?: string | undefined;
|
|
138
|
-
} | undefined>;
|
|
139
|
-
}, "strip", z.ZodTypeAny, {
|
|
140
|
-
model?: z.objectInputType<{
|
|
141
|
-
model: ZodType<string | {
|
|
142
|
-
$get: string;
|
|
143
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
144
|
-
$get: string;
|
|
145
|
-
} | undefined>;
|
|
146
|
-
temperature: ZodType<number | {
|
|
147
|
-
$get: string;
|
|
148
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
149
|
-
$get: string;
|
|
150
|
-
} | undefined>;
|
|
151
|
-
topP: ZodType<number | {
|
|
152
|
-
$get: string;
|
|
153
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
154
|
-
$get: string;
|
|
155
|
-
} | undefined>;
|
|
156
|
-
frequencyPenalty: ZodType<number | {
|
|
157
|
-
$get: string;
|
|
158
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
159
|
-
$get: string;
|
|
160
|
-
} | undefined>;
|
|
161
|
-
presencePenalty: ZodType<number | {
|
|
162
|
-
$get: string;
|
|
163
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
164
|
-
$get: string;
|
|
165
|
-
} | undefined>;
|
|
166
|
-
thinkingEffort: ZodType<number | "high" | "low" | "medium" | "minimal" | {
|
|
167
|
-
$get: string;
|
|
168
|
-
} | undefined, z.ZodTypeDef, number | "high" | "low" | "medium" | "minimal" | {
|
|
169
|
-
$get: string;
|
|
170
|
-
} | undefined>;
|
|
171
|
-
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
172
|
-
name?: string | undefined;
|
|
173
|
-
description?: string | undefined;
|
|
174
|
-
imageModel?: z.objectInputType<{
|
|
175
|
-
model: ZodType<string | {
|
|
176
|
-
$get: string;
|
|
177
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
178
|
-
$get: string;
|
|
179
|
-
} | undefined>;
|
|
180
|
-
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
181
|
-
skills?: string[] | undefined;
|
|
182
|
-
agents?: string[] | undefined;
|
|
183
|
-
mcpServer?: {
|
|
184
|
-
agents?: string[] | undefined;
|
|
185
|
-
} | undefined;
|
|
186
|
-
cli?: {
|
|
187
|
-
agents?: CliAgent[] | undefined;
|
|
188
|
-
chat?: string | undefined;
|
|
189
|
-
} | undefined;
|
|
190
|
-
}, {
|
|
191
|
-
model?: z.objectInputType<{
|
|
192
|
-
model: ZodType<string | {
|
|
193
|
-
$get: string;
|
|
194
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
195
|
-
$get: string;
|
|
196
|
-
} | undefined>;
|
|
197
|
-
temperature: ZodType<number | {
|
|
198
|
-
$get: string;
|
|
199
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
200
|
-
$get: string;
|
|
201
|
-
} | undefined>;
|
|
202
|
-
topP: ZodType<number | {
|
|
203
|
-
$get: string;
|
|
204
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
205
|
-
$get: string;
|
|
206
|
-
} | undefined>;
|
|
207
|
-
frequencyPenalty: ZodType<number | {
|
|
208
|
-
$get: string;
|
|
209
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
210
|
-
$get: string;
|
|
211
|
-
} | undefined>;
|
|
212
|
-
presencePenalty: ZodType<number | {
|
|
213
|
-
$get: string;
|
|
214
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
215
|
-
$get: string;
|
|
216
|
-
} | undefined>;
|
|
217
|
-
thinkingEffort: ZodType<number | "high" | "low" | "medium" | "minimal" | {
|
|
218
|
-
$get: string;
|
|
219
|
-
} | undefined, z.ZodTypeDef, number | "high" | "low" | "medium" | "minimal" | {
|
|
220
|
-
$get: string;
|
|
221
|
-
} | undefined>;
|
|
222
|
-
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
223
|
-
name?: string | undefined;
|
|
224
|
-
description?: string | undefined;
|
|
225
|
-
imageModel?: z.objectInputType<{
|
|
226
|
-
model: ZodType<string | {
|
|
227
|
-
$get: string;
|
|
228
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
229
|
-
$get: string;
|
|
230
|
-
} | undefined>;
|
|
231
|
-
}, z.ZodTypeAny, "passthrough"> | undefined;
|
|
232
|
-
skills?: string[] | undefined;
|
|
233
|
-
agents?: string[] | undefined;
|
|
234
|
-
mcpServer?: {
|
|
235
|
-
agents?: string[] | undefined;
|
|
236
|
-
} | undefined;
|
|
237
|
-
cli?: {
|
|
238
|
-
agents?: CliAgent[] | undefined;
|
|
239
|
-
chat?: string | undefined;
|
|
240
|
-
} | undefined;
|
|
241
|
-
}>;
|
|
242
|
-
export declare function loadAIGNEFile(path: string): Promise<{
|
|
243
|
-
aigne: z.infer<typeof aigneFileSchema>;
|
|
244
|
-
rootDir: string;
|
|
245
|
-
}>;
|
|
246
|
-
export declare function findAIGNEFile(path: string): Promise<string>;
|
|
247
|
-
export {};
|
|
@@ -1,167 +0,0 @@
|
|
|
1
|
-
import { type ZodType, z } from "zod";
|
|
2
|
-
import { type Role } from "../agents/chat-model.js";
|
|
3
|
-
import { PromptBuilder } from "../prompt/prompt-builder.js";
|
|
4
|
-
export declare const inputOutputSchema: ({ path }: {
|
|
5
|
-
path: string;
|
|
6
|
-
}) => z.ZodUnion<[ZodType<any, z.ZodTypeDef, any>, z.ZodEffects<z.ZodObject<{
|
|
7
|
-
type: z.ZodLiteral<"object">;
|
|
8
|
-
properties: z.ZodRecord<z.ZodString, z.ZodAny>;
|
|
9
|
-
required: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
10
|
-
additionalProperties: z.ZodOptional<z.ZodBoolean>;
|
|
11
|
-
}, "strip", z.ZodTypeAny, {
|
|
12
|
-
type: "object";
|
|
13
|
-
properties: Record<string, any>;
|
|
14
|
-
required?: string[] | undefined;
|
|
15
|
-
additionalProperties?: boolean | undefined;
|
|
16
|
-
}, {
|
|
17
|
-
type: "object";
|
|
18
|
-
properties: Record<string, any>;
|
|
19
|
-
required?: string[] | undefined;
|
|
20
|
-
additionalProperties?: boolean | undefined;
|
|
21
|
-
}>, any, {
|
|
22
|
-
type: "object";
|
|
23
|
-
properties: Record<string, any>;
|
|
24
|
-
required?: string[] | undefined;
|
|
25
|
-
additionalProperties?: boolean | undefined;
|
|
26
|
-
}>]>;
|
|
27
|
-
export declare const defaultInputSchema: z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodUnknown, z.ZodObject<{
|
|
28
|
-
$get: z.ZodString;
|
|
29
|
-
}, "strip", z.ZodTypeAny, {
|
|
30
|
-
$get: string;
|
|
31
|
-
}, {
|
|
32
|
-
$get: string;
|
|
33
|
-
}>]>>;
|
|
34
|
-
declare const chatModelObjectSchema: z.ZodObject<{
|
|
35
|
-
model: ZodType<string | {
|
|
36
|
-
$get: string;
|
|
37
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
38
|
-
$get: string;
|
|
39
|
-
} | undefined>;
|
|
40
|
-
temperature: ZodType<number | {
|
|
41
|
-
$get: string;
|
|
42
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
43
|
-
$get: string;
|
|
44
|
-
} | undefined>;
|
|
45
|
-
topP: ZodType<number | {
|
|
46
|
-
$get: string;
|
|
47
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
48
|
-
$get: string;
|
|
49
|
-
} | undefined>;
|
|
50
|
-
frequencyPenalty: ZodType<number | {
|
|
51
|
-
$get: string;
|
|
52
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
53
|
-
$get: string;
|
|
54
|
-
} | undefined>;
|
|
55
|
-
presencePenalty: ZodType<number | {
|
|
56
|
-
$get: string;
|
|
57
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
58
|
-
$get: string;
|
|
59
|
-
} | undefined>;
|
|
60
|
-
thinkingEffort: ZodType<number | "high" | "low" | "medium" | "minimal" | {
|
|
61
|
-
$get: string;
|
|
62
|
-
} | undefined, z.ZodTypeDef, number | "high" | "low" | "medium" | "minimal" | {
|
|
63
|
-
$get: string;
|
|
64
|
-
} | undefined>;
|
|
65
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
66
|
-
model: ZodType<string | {
|
|
67
|
-
$get: string;
|
|
68
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
69
|
-
$get: string;
|
|
70
|
-
} | undefined>;
|
|
71
|
-
temperature: ZodType<number | {
|
|
72
|
-
$get: string;
|
|
73
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
74
|
-
$get: string;
|
|
75
|
-
} | undefined>;
|
|
76
|
-
topP: ZodType<number | {
|
|
77
|
-
$get: string;
|
|
78
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
79
|
-
$get: string;
|
|
80
|
-
} | undefined>;
|
|
81
|
-
frequencyPenalty: ZodType<number | {
|
|
82
|
-
$get: string;
|
|
83
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
84
|
-
$get: string;
|
|
85
|
-
} | undefined>;
|
|
86
|
-
presencePenalty: ZodType<number | {
|
|
87
|
-
$get: string;
|
|
88
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
89
|
-
$get: string;
|
|
90
|
-
} | undefined>;
|
|
91
|
-
thinkingEffort: ZodType<number | "high" | "low" | "medium" | "minimal" | {
|
|
92
|
-
$get: string;
|
|
93
|
-
} | undefined, z.ZodTypeDef, number | "high" | "low" | "medium" | "minimal" | {
|
|
94
|
-
$get: string;
|
|
95
|
-
} | undefined>;
|
|
96
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
97
|
-
model: ZodType<string | {
|
|
98
|
-
$get: string;
|
|
99
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
100
|
-
$get: string;
|
|
101
|
-
} | undefined>;
|
|
102
|
-
temperature: ZodType<number | {
|
|
103
|
-
$get: string;
|
|
104
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
105
|
-
$get: string;
|
|
106
|
-
} | undefined>;
|
|
107
|
-
topP: ZodType<number | {
|
|
108
|
-
$get: string;
|
|
109
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
110
|
-
$get: string;
|
|
111
|
-
} | undefined>;
|
|
112
|
-
frequencyPenalty: ZodType<number | {
|
|
113
|
-
$get: string;
|
|
114
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
115
|
-
$get: string;
|
|
116
|
-
} | undefined>;
|
|
117
|
-
presencePenalty: ZodType<number | {
|
|
118
|
-
$get: string;
|
|
119
|
-
} | undefined, z.ZodTypeDef, number | {
|
|
120
|
-
$get: string;
|
|
121
|
-
} | undefined>;
|
|
122
|
-
thinkingEffort: ZodType<number | "high" | "low" | "medium" | "minimal" | {
|
|
123
|
-
$get: string;
|
|
124
|
-
} | undefined, z.ZodTypeDef, number | "high" | "low" | "medium" | "minimal" | {
|
|
125
|
-
$get: string;
|
|
126
|
-
} | undefined>;
|
|
127
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
128
|
-
export declare const chatModelSchema: typeof chatModelObjectSchema;
|
|
129
|
-
declare const imageModelObjectSchema: z.ZodObject<{
|
|
130
|
-
model: ZodType<string | {
|
|
131
|
-
$get: string;
|
|
132
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
133
|
-
$get: string;
|
|
134
|
-
} | undefined>;
|
|
135
|
-
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
|
|
136
|
-
model: ZodType<string | {
|
|
137
|
-
$get: string;
|
|
138
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
139
|
-
$get: string;
|
|
140
|
-
} | undefined>;
|
|
141
|
-
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
|
|
142
|
-
model: ZodType<string | {
|
|
143
|
-
$get: string;
|
|
144
|
-
} | undefined, z.ZodTypeDef, string | {
|
|
145
|
-
$get: string;
|
|
146
|
-
} | undefined>;
|
|
147
|
-
}, z.ZodTypeAny, "passthrough">>;
|
|
148
|
-
export declare const imageModelSchema: typeof imageModelObjectSchema;
|
|
149
|
-
export declare function optionalize<T>(schema: ZodType<T>): ZodType<T | undefined>;
|
|
150
|
-
export declare function camelizeSchema<T extends ZodType>(schema: T, { shallow }?: {
|
|
151
|
-
shallow?: boolean;
|
|
152
|
-
}): T;
|
|
153
|
-
export declare function preprocessSchema<T extends ZodType>(fn: (data: unknown) => unknown, schema: T): T;
|
|
154
|
-
export type Instructions = {
|
|
155
|
-
role: Exclude<Role, "tool">;
|
|
156
|
-
content: string;
|
|
157
|
-
path: string;
|
|
158
|
-
cacheControl?: {
|
|
159
|
-
type: "ephemeral";
|
|
160
|
-
ttl?: "5m" | "1h";
|
|
161
|
-
};
|
|
162
|
-
}[];
|
|
163
|
-
export declare const getInstructionsSchema: ({ filepath }: {
|
|
164
|
-
filepath: string;
|
|
165
|
-
}) => ZodType<Instructions>;
|
|
166
|
-
export declare function instructionsToPromptBuilder(instructions: Instructions | string): PromptBuilder;
|
|
167
|
-
export {};
|
|
@@ -1,93 +0,0 @@
|
|
|
1
|
-
import { Agent, type AgentInvokeOptions, type AgentOptions, type Message } from "../agents/agent.js";
|
|
2
|
-
import type { Context } from "../aigne/context.js";
|
|
3
|
-
import type { MessagePayload } from "../aigne/message-queue.js";
|
|
4
|
-
import { MemoryRecorder, type MemoryRecorderInput, type MemoryRecorderOptions, type MemoryRecorderOutput } from "./recorder.js";
|
|
5
|
-
import { MemoryRetriever, type MemoryRetrieverInput, type MemoryRetrieverOptions, type MemoryRetrieverOutput } from "./retriever.js";
|
|
6
|
-
export interface Memory {
|
|
7
|
-
id: string;
|
|
8
|
-
sessionId?: string | null;
|
|
9
|
-
content: unknown;
|
|
10
|
-
createdAt: string;
|
|
11
|
-
}
|
|
12
|
-
export declare const newMemoryId: () => string;
|
|
13
|
-
export interface MemoryAgentOptions extends Partial<Pick<MemoryAgent, "autoUpdate">>, Pick<AgentOptions, "subscribeTopic" | "skills"> {
|
|
14
|
-
recorder?: MemoryRecorder | MemoryRecorderOptions["process"] | MemoryRecorderOptions;
|
|
15
|
-
retriever?: MemoryRetriever | MemoryRetrieverOptions["process"] | MemoryRetrieverOptions;
|
|
16
|
-
}
|
|
17
|
-
/**
|
|
18
|
-
* A specialized agent responsible for managing, storing, and retrieving memories within the agent system.
|
|
19
|
-
*
|
|
20
|
-
* MemoryAgent serves as a bridge between application logic and memory storage/retrieval mechanisms.
|
|
21
|
-
* It delegates the actual memory operations to specialized recorder and retriever agents that
|
|
22
|
-
* are attached as skills. This agent doesn't directly process messages like other agents but
|
|
23
|
-
* instead provides memory management capabilities to the system.
|
|
24
|
-
*/
|
|
25
|
-
export declare class MemoryAgent extends Agent {
|
|
26
|
-
tag: string;
|
|
27
|
-
/**
|
|
28
|
-
* Creates a new MemoryAgent instance.
|
|
29
|
-
*/
|
|
30
|
-
constructor(options: MemoryAgentOptions);
|
|
31
|
-
private _retriever?;
|
|
32
|
-
/**
|
|
33
|
-
* Agent used for retrieving memories from storage.
|
|
34
|
-
*
|
|
35
|
-
* This retriever is automatically added to the agent's skills when set.
|
|
36
|
-
* Setting a new retriever will remove any previously set retriever from skills.
|
|
37
|
-
*/
|
|
38
|
-
get retriever(): MemoryRetriever | undefined;
|
|
39
|
-
set retriever(value: MemoryRetriever | undefined);
|
|
40
|
-
private _recorder?;
|
|
41
|
-
/**
|
|
42
|
-
* Agent used for recording and storing new memories.
|
|
43
|
-
*
|
|
44
|
-
* This recorder is automatically added to the agent's skills when set.
|
|
45
|
-
* Setting a new recorder will remove any previously set recorder from skills.
|
|
46
|
-
*/
|
|
47
|
-
get recorder(): MemoryRecorder | undefined;
|
|
48
|
-
set recorder(value: MemoryRecorder | undefined);
|
|
49
|
-
/**
|
|
50
|
-
* Controls whether to automatically update the memory when agent call completes.
|
|
51
|
-
*
|
|
52
|
-
* When true, the agent will automatically record any relevant information
|
|
53
|
-
* after completing operations, creating a history of interactions.
|
|
54
|
-
*/
|
|
55
|
-
autoUpdate?: boolean;
|
|
56
|
-
/**
|
|
57
|
-
* Indicates whether this agent can be directly called.
|
|
58
|
-
*
|
|
59
|
-
* MemoryAgent is designed to be used as a supporting component rather than
|
|
60
|
-
* being directly invoked for processing, so this returns false.
|
|
61
|
-
*/
|
|
62
|
-
get isCallable(): boolean;
|
|
63
|
-
/**
|
|
64
|
-
* The standard message processing method required by the Agent interface.
|
|
65
|
-
*
|
|
66
|
-
* MemoryAgent doesn't directly process messages like other agents, so this method
|
|
67
|
-
* throws an error when called. Use the specialized retrieve() and record() methods instead.
|
|
68
|
-
*/
|
|
69
|
-
process(_input: Message, _options: AgentInvokeOptions): Promise<Message>;
|
|
70
|
-
/**
|
|
71
|
-
* Retrieves memories based on the provided input criteria.
|
|
72
|
-
*
|
|
73
|
-
* Delegates the actual retrieval operation to the configured retriever agent.
|
|
74
|
-
*
|
|
75
|
-
* @param input - The retrieval parameters (can include search terms, limits, etc.)
|
|
76
|
-
* @param context - The execution context
|
|
77
|
-
* @returns A promise resolving to the retrieved memories
|
|
78
|
-
* @throws Error - If no retriever has been initialized
|
|
79
|
-
*/
|
|
80
|
-
retrieve(input: MemoryRetrieverInput, context: Context): Promise<MemoryRetrieverOutput>;
|
|
81
|
-
/**
|
|
82
|
-
* Records new memories based on the provided input content.
|
|
83
|
-
*
|
|
84
|
-
* Delegates the actual recording operation to the configured recorder agent.
|
|
85
|
-
*
|
|
86
|
-
* @param input - The content to be recorded as memories
|
|
87
|
-
* @param context - The execution context
|
|
88
|
-
* @returns A promise resolving to the recorded memories
|
|
89
|
-
* @throws Error - If no recorder has been initialized
|
|
90
|
-
*/
|
|
91
|
-
record(input: MemoryRecorderInput, context: Context): Promise<MemoryRecorderOutput>;
|
|
92
|
-
onMessage({ role, source, message, context }: MessagePayload): Promise<void>;
|
|
93
|
-
}
|