@aigne/core 0.4.211-beta.2 → 1.0.0

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 (99) hide show
  1. package/lib/cjs/agent.js +18 -11
  2. package/lib/cjs/constants.js +5 -5
  3. package/lib/cjs/definitions/data-type-schema.js +12 -11
  4. package/lib/cjs/definitions/memory.js +3 -1
  5. package/lib/cjs/function-agent.js +5 -6
  6. package/lib/cjs/function-runner.js +13 -13
  7. package/lib/cjs/llm-agent.js +16 -15
  8. package/lib/cjs/llm-decision-agent.js +15 -13
  9. package/lib/cjs/llm-model.js +11 -11
  10. package/lib/cjs/local-function-agent.js +3 -3
  11. package/lib/cjs/memorable.js +3 -3
  12. package/lib/cjs/open-api-agent.js +4 -4
  13. package/lib/cjs/pipeline-agent.js +26 -17
  14. package/lib/cjs/runnable.js +2 -2
  15. package/lib/cjs/utils/fetch-open-api.js +9 -8
  16. package/lib/cjs/utils/fetch.js +3 -2
  17. package/lib/cjs/utils/is-non-nullable.js +1 -4
  18. package/lib/cjs/utils/message-utils.js +23 -16
  19. package/lib/cjs/utils/mustache-utils.js +2 -5
  20. package/lib/cjs/utils/open-api-parameter.js +19 -22
  21. package/lib/cjs/utils/stream-utils.js +6 -5
  22. package/lib/cjs/utils/structured-output-schema.js +10 -9
  23. package/lib/esm/agent.js +20 -10
  24. package/lib/esm/constants.js +5 -5
  25. package/lib/esm/definitions/data-type-schema.js +14 -13
  26. package/lib/esm/definitions/memory.js +5 -3
  27. package/lib/esm/function-agent.js +11 -12
  28. package/lib/esm/function-runner.js +15 -15
  29. package/lib/esm/index.js +18 -18
  30. package/lib/esm/llm-agent.js +26 -25
  31. package/lib/esm/llm-decision-agent.js +22 -20
  32. package/lib/esm/llm-model.js +13 -13
  33. package/lib/esm/local-function-agent.js +9 -9
  34. package/lib/esm/memorable.js +6 -6
  35. package/lib/esm/open-api-agent.js +11 -11
  36. package/lib/esm/pipeline-agent.js +35 -23
  37. package/lib/esm/runnable.js +3 -3
  38. package/lib/esm/utils/fetch-open-api.js +11 -9
  39. package/lib/esm/utils/fetch.js +3 -2
  40. package/lib/esm/utils/index.js +10 -10
  41. package/lib/esm/utils/is-non-nullable.js +1 -1
  42. package/lib/esm/utils/message-utils.js +26 -16
  43. package/lib/esm/utils/mustache-utils.js +2 -2
  44. package/lib/esm/utils/open-api-parameter.js +21 -21
  45. package/lib/esm/utils/stream-utils.js +7 -6
  46. package/lib/esm/utils/structured-output-schema.js +12 -8
  47. package/lib/types/agent.d.ts +3 -3
  48. package/lib/types/context.d.ts +2 -2
  49. package/lib/types/definitions/data-type-schema.d.ts +14 -14
  50. package/lib/types/definitions/data-type.d.ts +8 -8
  51. package/lib/types/definitions/memory.d.ts +5 -5
  52. package/lib/types/definitions/open-api.d.ts +9 -9
  53. package/lib/types/function-agent.d.ts +9 -9
  54. package/lib/types/function-runner.d.ts +4 -4
  55. package/lib/types/index.d.ts +18 -18
  56. package/lib/types/llm-agent.d.ts +12 -12
  57. package/lib/types/llm-decision-agent.d.ts +20 -20
  58. package/lib/types/llm-model.d.ts +12 -12
  59. package/lib/types/local-function-agent.d.ts +14 -16
  60. package/lib/types/memorable.d.ts +51 -51
  61. package/lib/types/open-api-agent.d.ts +12 -12
  62. package/lib/types/pipeline-agent.d.ts +14 -14
  63. package/lib/types/runnable.d.ts +5 -5
  64. package/lib/types/utils/fetch-open-api.d.ts +2 -2
  65. package/lib/types/utils/index.d.ts +10 -10
  66. package/lib/types/utils/message-utils.d.ts +4 -4
  67. package/lib/types/utils/open-api-parameter.d.ts +3 -3
  68. package/lib/types/utils/runnable-type.d.ts +1 -1
  69. package/lib/types/utils/stream-utils.d.ts +1 -1
  70. package/lib/types/utils/structured-output-schema.d.ts +2 -2
  71. package/package.json +11 -10
  72. package/tsconfig.json +3 -1
  73. package/lib/cjs/api-agent.js +0 -70
  74. package/lib/cjs/data-type-schema.js +0 -46
  75. package/lib/cjs/data-type.js +0 -2
  76. package/lib/cjs/definitions/api-parameter.js +0 -10
  77. package/lib/cjs/memory.js +0 -32
  78. package/lib/cjs/tsconfig.tsbuildinfo +0 -1
  79. package/lib/cjs/utils/fetch-api.js +0 -35
  80. package/lib/cjs/utils/flatten-openapi.js +0 -14
  81. package/lib/cjs/utils/format-parameter.js +0 -126
  82. package/lib/esm/api-agent.js +0 -67
  83. package/lib/esm/data-type-schema.js +0 -43
  84. package/lib/esm/data-type.js +0 -1
  85. package/lib/esm/definitions/api-parameter.js +0 -7
  86. package/lib/esm/memory.js +0 -27
  87. package/lib/esm/tsconfig.tsbuildinfo +0 -1
  88. package/lib/esm/utils/fetch-api.js +0 -31
  89. package/lib/esm/utils/flatten-openapi.js +0 -11
  90. package/lib/esm/utils/format-parameter.js +0 -116
  91. package/lib/types/api-agent.d.ts +0 -53
  92. package/lib/types/data-type-schema.d.ts +0 -46
  93. package/lib/types/data-type.d.ts +0 -32
  94. package/lib/types/definitions/api-parameter.d.ts +0 -55
  95. package/lib/types/memory.d.ts +0 -184
  96. package/lib/types/tsconfig.tsbuildinfo +0 -1
  97. package/lib/types/utils/fetch-api.d.ts +0 -3
  98. package/lib/types/utils/flatten-openapi.d.ts +0 -25
  99. package/lib/types/utils/format-parameter.d.ts +0 -6
@@ -1,3 +0,0 @@
1
- import { FetchRequest } from '../definitions/api-parameter';
2
- export declare const fetchApi: (request: FetchRequest) => Promise<any>;
3
- export default fetchApi;
@@ -1,25 +0,0 @@
1
- export declare function flattenApiStructure(apiStructure: {
2
- paths: {
3
- [key: string]: {
4
- [key: string]: {
5
- 'x-id': string;
6
- 'x-did': string;
7
- 'x-path': string;
8
- 'x-method': string;
9
- type: string;
10
- summary?: string;
11
- description?: string;
12
- };
13
- };
14
- };
15
- }): {
16
- id: string;
17
- type: string;
18
- url?: string;
19
- name?: string;
20
- did?: string;
21
- path: string;
22
- method: string;
23
- summary?: string;
24
- description?: string;
25
- }[];
@@ -1,6 +0,0 @@
1
- import { API, AuthConfig, AuthResult, FetchRequest, ParametersResult } from '../definitions/api-parameter';
2
- import { RunnableDefinition } from '../runnable';
3
- export declare function getAuthParams(auth?: AuthConfig): AuthResult;
4
- export declare function processParameters(api: API, inputs: RunnableDefinition['inputs'], input: Record<string, any>): ParametersResult;
5
- export declare function mergeParameters(parameters: AuthResult, authParams: AuthResult): AuthResult;
6
- export declare const formatRequest: (api: API, inputs: RunnableDefinition["inputs"], input: Record<string, any>) => FetchRequest;