@ai-setting/roy-agent-core 1.4.10 → 1.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/config/index.js +23 -0
  2. package/dist/env/agent/index.js +3035 -0
  3. package/dist/env/commands/index.js +1685 -0
  4. package/dist/env/debug/formatters/index.js +639 -0
  5. package/dist/env/debug/index.js +2300 -0
  6. package/dist/env/hook/index.js +273 -0
  7. package/dist/env/index.js +12591 -0
  8. package/dist/env/llm/index.js +2736 -0
  9. package/dist/env/log-trace/index.js +1779 -0
  10. package/dist/env/mcp/index.js +2173 -0
  11. package/dist/env/mcp/tool/index.js +1149 -0
  12. package/dist/env/memory/built-in/index.js +225 -0
  13. package/dist/env/memory/index.js +2171 -0
  14. package/dist/env/memory/plugin/index.js +1263 -0
  15. package/dist/env/prompt/index.js +2107 -0
  16. package/dist/env/session/index.js +3594 -0
  17. package/dist/env/session/storage/index.js +2049 -0
  18. package/dist/env/skill/index.js +1635 -0
  19. package/dist/env/skill/tool/index.js +114 -0
  20. package/dist/env/task/delegate/index.js +1844 -0
  21. package/dist/env/task/hooks/index.js +67 -0
  22. package/dist/env/task/index.js +3578 -0
  23. package/dist/env/task/plugins/index.js +1626 -0
  24. package/dist/env/task/storage/index.js +1464 -0
  25. package/dist/env/task/tools/index.js +344 -0
  26. package/dist/env/task/tools/operation/index.js +270 -0
  27. package/dist/env/tool/built-in/index.js +1151 -0
  28. package/dist/env/tool/index.js +2284 -0
  29. package/dist/env/workflow/decorators/index.js +449 -0
  30. package/dist/env/workflow/engine/index.js +4391 -0
  31. package/dist/env/workflow/index.js +6214 -0
  32. package/dist/env/workflow/nodes/index.js +650 -0
  33. package/dist/env/workflow/service/index.js +262 -0
  34. package/dist/env/workflow/storage/index.js +1236 -0
  35. package/dist/env/workflow/tools/index.js +1081 -0
  36. package/dist/env/workflow/types/index.js +479 -0
  37. package/dist/env/workflow/utils/index.js +1631 -0
  38. package/dist/index.js +15006 -14265
  39. package/package.json +2 -2
@@ -205,6 +205,17 @@ class HookManager {
205
205
  }
206
206
  // packages/core/src/env/hook/global-hook-manager.ts
207
207
  var globalHookManager = new HookManager;
208
+ var AgentHookPoints = {
209
+ BEFORE_START: "agent:before.start",
210
+ BEFORE_LLM: "agent:before.llm",
211
+ AFTER_LLM: "agent:after.llm",
212
+ BEFORE_TOOL: "agent:before.tool",
213
+ AFTER_TOOL: "agent:after.tool",
214
+ ON_ITERATION: "agent:on.iteration",
215
+ ON_THRESHOLD: "agent:on.threshold",
216
+ AFTER_COMPLETE: "agent:after.complete",
217
+ ON_ERROR: "agent:on.error"
218
+ };
208
219
  var LLMHookPoints = {
209
220
  BEFORE_INVOKE: "llm:before.invoke",
210
221
  AFTER_INVOKE: "llm:after.invoke",
@@ -235,6 +246,18 @@ function setupAliasHooks() {
235
246
  };
236
247
  }
237
248
  setupAliasHooks();
249
+ async function executeAgentHook(hookPoint, data, metadata = {}) {
250
+ await globalHookManager.execute(hookPoint, data, metadata);
251
+ }
252
+ async function executeAgentHookWithIntervention(hookPoint, data, metadata = {}) {
253
+ return globalHookManager.executeWithIntervention(hookPoint, data, metadata);
254
+ }
255
+ async function executeLLMHook(hookPoint, data, metadata = {}) {
256
+ await globalHookManager.execute(hookPoint, data, metadata);
257
+ }
258
+ async function executeToolHook(hookPoint, data, metadata = {}) {
259
+ await globalHookManager.execute(hookPoint, data, metadata);
260
+ }
238
261
  // packages/core/src/env/component.ts
239
262
  class BaseComponent {
240
263
  _status = "created";