@aigne/core 0.0.3 → 0.0.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.
Files changed (168) hide show
  1. package/lib/cjs/index.js +1 -1
  2. package/lib/cjs/types/index.js +2 -4
  3. package/lib/esm/index.js +1 -1
  4. package/lib/esm/types/index.js +2 -4
  5. package/lib/types/index.d.ts +1 -1
  6. package/lib/types/types/agent.d.ts +5 -0
  7. package/lib/types/types/index.d.ts +2 -4
  8. package/lib/types/types/runnable.d.ts +20 -0
  9. package/package.json +3 -4
  10. package/lib/cjs/assistant/generate-output.js +0 -101
  11. package/lib/cjs/assistant/select-agent.js +0 -76
  12. package/lib/cjs/assistant/type.js +0 -11
  13. package/lib/cjs/common/aid.js +0 -42
  14. package/lib/cjs/common/index.js +0 -238
  15. package/lib/cjs/common/resource-manager.js +0 -199
  16. package/lib/cjs/constants.js +0 -9
  17. package/lib/cjs/executor/agent.js +0 -10
  18. package/lib/cjs/executor/aigc.js +0 -28
  19. package/lib/cjs/executor/api.js +0 -64
  20. package/lib/cjs/executor/base.js +0 -676
  21. package/lib/cjs/executor/blocklet.js +0 -25
  22. package/lib/cjs/executor/call-agent.js +0 -105
  23. package/lib/cjs/executor/decision.js +0 -478
  24. package/lib/cjs/executor/image-blender.js +0 -32
  25. package/lib/cjs/executor/index.js +0 -81
  26. package/lib/cjs/executor/llm.js +0 -379
  27. package/lib/cjs/executor/logic.js +0 -167
  28. package/lib/cjs/libs/blocklet/vc.js +0 -92
  29. package/lib/cjs/libs/openapi/request/index.js +0 -24
  30. package/lib/cjs/libs/openapi/request/util.js +0 -146
  31. package/lib/cjs/libs/openapi/types/index.js +0 -17
  32. package/lib/cjs/libs/openapi/util/call.js +0 -15
  33. package/lib/cjs/libs/openapi/util/check-schema.js +0 -67
  34. package/lib/cjs/libs/openapi/util/convert-schema.js +0 -44
  35. package/lib/cjs/libs/openapi/util/flatten-open-api.js +0 -21
  36. package/lib/cjs/libs/openapi/util/get-open-api-i18n-text.js +0 -7
  37. package/lib/cjs/runtime/resource-blocklet.js +0 -5
  38. package/lib/cjs/runtime/runtime.js +0 -143
  39. package/lib/cjs/types/assistant/index.js +0 -31
  40. package/lib/cjs/types/assistant/mustache/ReadableMustache.js +0 -69
  41. package/lib/cjs/types/assistant/mustache/directive.js +0 -35
  42. package/lib/cjs/types/assistant/mustache/mustache.js +0 -688
  43. package/lib/cjs/types/resource/index.js +0 -47
  44. package/lib/cjs/types/resource/project.js +0 -35
  45. package/lib/cjs/types/runtime/error.js +0 -18
  46. package/lib/cjs/types/runtime/index.js +0 -37
  47. package/lib/cjs/types/runtime/runtime-resource-blocklet-state.js +0 -4
  48. package/lib/cjs/types/runtime/schema.js +0 -259
  49. package/lib/cjs/utils/cron-job.js +0 -48
  50. package/lib/cjs/utils/extract-metadata-transform.js +0 -58
  51. package/lib/cjs/utils/extract-metadata-transform.test.js +0 -61
  52. package/lib/cjs/utils/fs.js +0 -49
  53. package/lib/cjs/utils/get-blocklet-agent.js +0 -351
  54. package/lib/cjs/utils/geti.js +0 -37
  55. package/lib/cjs/utils/is-non-nullable.js +0 -20
  56. package/lib/cjs/utils/render-message.js +0 -23
  57. package/lib/cjs/utils/resolve-secret-inputs.js +0 -49
  58. package/lib/cjs/utils/retry.js +0 -19
  59. package/lib/cjs/utils/task-id.js +0 -7
  60. package/lib/cjs/utils/tool-calls-transform.js +0 -18
  61. package/lib/esm/assistant/generate-output.js +0 -91
  62. package/lib/esm/assistant/select-agent.js +0 -71
  63. package/lib/esm/assistant/type.js +0 -7
  64. package/lib/esm/common/aid.js +0 -38
  65. package/lib/esm/common/index.js +0 -232
  66. package/lib/esm/common/resource-manager.js +0 -192
  67. package/lib/esm/constants.js +0 -6
  68. package/lib/esm/executor/agent.js +0 -6
  69. package/lib/esm/executor/aigc.js +0 -24
  70. package/lib/esm/executor/api.js +0 -34
  71. package/lib/esm/executor/base.js +0 -668
  72. package/lib/esm/executor/blocklet.js +0 -21
  73. package/lib/esm/executor/call-agent.js +0 -98
  74. package/lib/esm/executor/decision.js +0 -471
  75. package/lib/esm/executor/image-blender.js +0 -25
  76. package/lib/esm/executor/index.js +0 -74
  77. package/lib/esm/executor/llm.js +0 -372
  78. package/lib/esm/executor/logic.js +0 -160
  79. package/lib/esm/libs/blocklet/vc.js +0 -85
  80. package/lib/esm/libs/openapi/request/index.js +0 -20
  81. package/lib/esm/libs/openapi/request/util.js +0 -136
  82. package/lib/esm/libs/openapi/types/index.js +0 -1
  83. package/lib/esm/libs/openapi/util/call.js +0 -8
  84. package/lib/esm/libs/openapi/util/check-schema.js +0 -62
  85. package/lib/esm/libs/openapi/util/convert-schema.js +0 -42
  86. package/lib/esm/libs/openapi/util/flatten-open-api.js +0 -19
  87. package/lib/esm/libs/openapi/util/get-open-api-i18n-text.js +0 -5
  88. package/lib/esm/runtime/resource-blocklet.js +0 -2
  89. package/lib/esm/runtime/runtime.js +0 -136
  90. package/lib/esm/types/assistant/index.js +0 -9
  91. package/lib/esm/types/assistant/mustache/ReadableMustache.js +0 -63
  92. package/lib/esm/types/assistant/mustache/directive.js +0 -29
  93. package/lib/esm/types/assistant/mustache/mustache.js +0 -686
  94. package/lib/esm/types/resource/index.js +0 -26
  95. package/lib/esm/types/resource/project.js +0 -29
  96. package/lib/esm/types/runtime/error.js +0 -14
  97. package/lib/esm/types/runtime/index.js +0 -20
  98. package/lib/esm/types/runtime/runtime-resource-blocklet-state.js +0 -1
  99. package/lib/esm/types/runtime/schema.js +0 -249
  100. package/lib/esm/utils/cron-job.js +0 -44
  101. package/lib/esm/utils/extract-metadata-transform.js +0 -54
  102. package/lib/esm/utils/extract-metadata-transform.test.js +0 -59
  103. package/lib/esm/utils/fs.js +0 -41
  104. package/lib/esm/utils/get-blocklet-agent.js +0 -344
  105. package/lib/esm/utils/geti.js +0 -30
  106. package/lib/esm/utils/is-non-nullable.js +0 -13
  107. package/lib/esm/utils/render-message.js +0 -20
  108. package/lib/esm/utils/resolve-secret-inputs.js +0 -46
  109. package/lib/esm/utils/retry.js +0 -16
  110. package/lib/esm/utils/task-id.js +0 -3
  111. package/lib/esm/utils/tool-calls-transform.js +0 -15
  112. package/lib/types/assistant/generate-output.d.ts +0 -29
  113. package/lib/types/assistant/select-agent.d.ts +0 -14
  114. package/lib/types/assistant/type.d.ts +0 -61
  115. package/lib/types/common/aid.d.ts +0 -18
  116. package/lib/types/common/index.d.ts +0 -7
  117. package/lib/types/common/resource-manager.d.ts +0 -88
  118. package/lib/types/constants.d.ts +0 -6
  119. package/lib/types/executor/agent.d.ts +0 -5
  120. package/lib/types/executor/aigc.d.ts +0 -9
  121. package/lib/types/executor/api.d.ts +0 -9
  122. package/lib/types/executor/base.d.ts +0 -209
  123. package/lib/types/executor/blocklet.d.ts +0 -9
  124. package/lib/types/executor/call-agent.d.ts +0 -12
  125. package/lib/types/executor/decision.d.ts +0 -20
  126. package/lib/types/executor/image-blender.d.ts +0 -9
  127. package/lib/types/executor/index.d.ts +0 -8
  128. package/lib/types/executor/llm.d.ts +0 -38
  129. package/lib/types/executor/logic.d.ts +0 -9
  130. package/lib/types/libs/blocklet/vc.d.ts +0 -17
  131. package/lib/types/libs/openapi/request/index.d.ts +0 -17
  132. package/lib/types/libs/openapi/request/util.d.ts +0 -40
  133. package/lib/types/libs/openapi/types/index.d.ts +0 -20
  134. package/lib/types/libs/openapi/util/call.d.ts +0 -2
  135. package/lib/types/libs/openapi/util/check-schema.d.ts +0 -3
  136. package/lib/types/libs/openapi/util/convert-schema.d.ts +0 -8
  137. package/lib/types/libs/openapi/util/flatten-open-api.d.ts +0 -3
  138. package/lib/types/libs/openapi/util/get-open-api-i18n-text.d.ts +0 -2
  139. package/lib/types/runtime/resource-blocklet.d.ts +0 -2
  140. package/lib/types/runtime/runtime.d.ts +0 -20
  141. package/lib/types/types/assistant/index.d.ts +0 -405
  142. package/lib/types/types/assistant/mustache/ReadableMustache.d.ts +0 -2
  143. package/lib/types/types/assistant/mustache/directive.d.ts +0 -6
  144. package/lib/types/types/assistant/mustache/mustache.d.ts +0 -2
  145. package/lib/types/types/common/index.d.ts +0 -45
  146. package/lib/types/types/resource/index.d.ts +0 -17
  147. package/lib/types/types/resource/project.d.ts +0 -41
  148. package/lib/types/types/runtime/agent.d.ts +0 -33
  149. package/lib/types/types/runtime/error.d.ts +0 -10
  150. package/lib/types/types/runtime/index.d.ts +0 -116
  151. package/lib/types/types/runtime/runtime-resource-blocklet-state.d.ts +0 -5
  152. package/lib/types/types/runtime/schema.d.ts +0 -110
  153. package/lib/types/utils/cron-job.d.ts +0 -22
  154. package/lib/types/utils/extract-metadata-transform.d.ts +0 -16
  155. package/lib/types/utils/extract-metadata-transform.test.d.ts +0 -1
  156. package/lib/types/utils/fs.d.ts +0 -9
  157. package/lib/types/utils/get-blocklet-agent.d.ts +0 -219
  158. package/lib/types/utils/geti.d.ts +0 -1
  159. package/lib/types/utils/is-non-nullable.d.ts +0 -2
  160. package/lib/types/utils/render-message.d.ts +0 -6
  161. package/lib/types/utils/resolve-secret-inputs.d.ts +0 -11
  162. package/lib/types/utils/retry.d.ts +0 -1
  163. package/lib/types/utils/task-id.d.ts +0 -1
  164. package/lib/types/utils/tool-calls-transform.d.ts +0 -2
  165. /package/lib/cjs/types/{runtime/agent.js → agent.js} +0 -0
  166. /package/lib/cjs/types/{common/index.js → runnable.js} +0 -0
  167. /package/lib/esm/types/{runtime/agent.js → agent.js} +0 -0
  168. /package/lib/esm/types/{common/index.js → runnable.js} +0 -0
@@ -1,88 +0,0 @@
1
- import { Assistant, ResourceProject, ResourceType } from '../types';
2
- export type ResourceProjectItem = ResourceProject & {
3
- blocklet: {
4
- did: string;
5
- };
6
- dir: string;
7
- agentMap: {
8
- [agentId: string]: Assistant;
9
- };
10
- };
11
- export type ResourceBlockletItem = {
12
- did: string;
13
- status?: number;
14
- projectMap: {
15
- [projectId: string]: ResourceProjectItem;
16
- };
17
- };
18
- export interface ResourceKnowledge {
19
- knowledge: any & {
20
- public?: boolean;
21
- };
22
- blockletDid: string;
23
- documents: any[];
24
- contents: any[];
25
- segments: any[];
26
- vectorsPath: string;
27
- uploadPath: string;
28
- sourcesPath: string;
29
- processedPath: string;
30
- logoPath: string;
31
- title: string;
32
- did: string;
33
- }
34
- export interface Resources {
35
- knowledge: {
36
- knowledgeList: ResourceKnowledge[];
37
- blockletMap: {
38
- [blockletDid: string]: {
39
- knowledgeMap: {
40
- [knowledgeId: string]: ResourceKnowledge;
41
- };
42
- };
43
- };
44
- };
45
- agents: {
46
- [type: string]: {
47
- projects: ResourceProjectItem[];
48
- blockletMap: {
49
- [blockletDid: string]: ResourceBlockletItem;
50
- };
51
- };
52
- };
53
- }
54
- export declare class ResourceManager {
55
- constructor({ wait, watch }?: {
56
- wait?: number;
57
- watch?: boolean;
58
- });
59
- private promise?;
60
- get resources(): Promise<Resources>;
61
- reload(): Promise<Resources>;
62
- getProjects({ blockletDid, type }: {
63
- blockletDid?: string;
64
- type: ResourceType;
65
- }): Promise<ResourceProjectItem[]>;
66
- getProject({ blockletDid, projectId, type, }: {
67
- blockletDid: string;
68
- projectId: string;
69
- type?: ResourceType | ResourceType[];
70
- }): Promise<ResourceProjectItem | undefined>;
71
- getAgent({ blockletDid, projectId, agentId, type, }: {
72
- blockletDid: string;
73
- projectId: string;
74
- agentId: string;
75
- type?: ResourceType | ResourceType[];
76
- }): Promise<{
77
- agent: Assistant;
78
- project: import("../types").ProjectSettings;
79
- blocklet: {
80
- did: string;
81
- };
82
- } | undefined>;
83
- getKnowledgeList(): Promise<ResourceKnowledge[]>;
84
- getKnowledge({ blockletDid, knowledgeId }: {
85
- blockletDid: string;
86
- knowledgeId: string;
87
- }): Promise<ResourceKnowledge>;
88
- }
@@ -1,6 +0,0 @@
1
- export declare const AIGNE_RUNTIME_COMPONENT_DID = "z2qaBP9SahqU2L2YA3ip7NecwKACMByTFuiJ2";
2
- export declare const AIGNE_COMPONENTS_COMPONENT_DID = "z2qa6fvjmjew4pWJyTsKaWFuNoMUMyXDh5A1D";
3
- export declare const AIGNE_RUNTIME_CUSTOM_COMPONENT_ID = "grc9q1cveub6pnl8";
4
- export declare const AIGNE_STUDIO_COMPONENT_DID = "z8iZpog7mcgcgBZzTiXJCWESvmnRrQmnd3XBB";
5
- export declare const NFT_BLENDER_COMPONENT_DID = "z8ia1ieY5KhEC4LMRETzS5nUwD7PvAND8qkfX";
6
- export declare const AIGNE_ISSUE_VC_PREFIX = "AIGNE";
@@ -1,5 +0,0 @@
1
- import { Agent } from '../types';
2
- import { AgentExecutorBase } from './base';
3
- export declare class AgentExecutor extends AgentExecutorBase<Agent> {
4
- process(): Promise<void>;
5
- }
@@ -1,9 +0,0 @@
1
- import { ImageAssistant } from '../types';
2
- import { AgentExecutorBase } from './base';
3
- export declare class AIGCAgentExecutor extends AgentExecutorBase<ImageAssistant> {
4
- process(): Promise<{
5
- $images: {
6
- url: string;
7
- }[];
8
- }>;
9
- }
@@ -1,9 +0,0 @@
1
- import { ApiAssistant } from '../types';
2
- import { AgentExecutorBase } from './base';
3
- export declare class APIAgentExecutor extends AgentExecutorBase<ApiAssistant> {
4
- process({ inputs }: {
5
- inputs: {
6
- [key: string]: any;
7
- };
8
- }): Promise<any>;
9
- }
@@ -1,209 +0,0 @@
1
- import { CallAI, CallAIImage, GetAgent, GetAgentResult, RunAssistantCallback } from '../assistant/type';
2
- import { issueVC } from '../libs/blocklet/vc';
3
- import type { DatasetObject } from '../libs/openapi/types';
4
- import { ProjectSettings, Variable, VariableScope } from '../types';
5
- import { renderMessage } from '../utils/render-message';
6
- export declare class ExecutorContext {
7
- constructor(options: Pick<ExecutorContext, 'entry' | 'getAgent' | 'callAI' | 'callAIImage' | 'callback' | 'getMemoryVariables' | 'user' | 'sessionId' | 'messageId' | 'clientTime' | 'executor' | 'entryProjectId' | 'queryCache' | 'setCache'>);
8
- entry: {
9
- blockletDid?: string;
10
- project: ProjectSettings;
11
- working?: boolean;
12
- appUrl?: string;
13
- };
14
- getAgent: GetAgent;
15
- callAI: CallAI;
16
- callAIImage: CallAIImage;
17
- queryCache: (options: {
18
- aid: string;
19
- cacheKey: string;
20
- }) => Promise<{
21
- inputs: {
22
- [key: string]: any;
23
- };
24
- outputs: {
25
- [key: string]: any;
26
- };
27
- } | null>;
28
- setCache: (options: {
29
- aid: string;
30
- cacheKey: string;
31
- inputs: {
32
- [key: string]: any;
33
- };
34
- outputs: {
35
- objects: any[];
36
- };
37
- }) => Promise<any>;
38
- callback: RunAssistantCallback;
39
- sessionId: string;
40
- messageId: string;
41
- clientTime: string;
42
- promise?: Promise<{
43
- agents: (GetAgentResult & {
44
- openApi: DatasetObject;
45
- })[];
46
- agentsMap: {
47
- [key: string]: GetAgentResult & {
48
- openApi: DatasetObject;
49
- };
50
- };
51
- openApis: DatasetObject[];
52
- }>;
53
- entryProjectId: string;
54
- user?: {
55
- id: string;
56
- did: string;
57
- role?: string;
58
- fullName?: string;
59
- provider?: string;
60
- walletOS?: string;
61
- isAdmin?: boolean;
62
- };
63
- getMemoryVariables: (options: {
64
- blockletDid?: string;
65
- projectId: string;
66
- projectRef?: string;
67
- working?: boolean;
68
- }) => Promise<Variable[]>;
69
- maxRetries: number;
70
- executor: <T extends GetAgentResult>(agent: T, options: AgentExecutorOptions) => AgentExecutorBase<T>;
71
- execute<T extends GetAgentResult>(agent: T, options: AgentExecutorOptions): Promise<any>;
72
- copy(options: Partial<ExecutorContext>): ExecutorContext;
73
- getBlockletAgent(agentId: string): Promise<{
74
- agent: GetAgentResult & {
75
- openApi: DatasetObject;
76
- };
77
- openApis: DatasetObject[];
78
- }>;
79
- }
80
- export interface AgentExecutorOptions {
81
- inputs?: {
82
- [key: string]: any;
83
- };
84
- taskId: string;
85
- parentTaskId?: string;
86
- variables?: {
87
- [key: string]: any;
88
- };
89
- }
90
- export declare abstract class AgentExecutorBase<T> {
91
- readonly context: ExecutorContext;
92
- readonly agent: GetAgentResult & T;
93
- readonly options: AgentExecutorOptions;
94
- constructor(context: ExecutorContext, agent: GetAgentResult & T, options: AgentExecutorOptions);
95
- abstract process(options: {
96
- inputs: {
97
- [key: string]: any;
98
- };
99
- }): Promise<any>;
100
- execute(): Promise<any>;
101
- private _finalInputs;
102
- private get finalInputs();
103
- private set finalInputs(value);
104
- private cacheKey;
105
- get globalContext(): {
106
- $sys: {
107
- sessionId: string;
108
- messageId: string;
109
- clientTime: string;
110
- user: {
111
- id: string;
112
- did: string;
113
- role?: string;
114
- fullName?: string;
115
- provider?: string;
116
- walletOS?: string;
117
- isAdmin?: boolean;
118
- } | undefined;
119
- env: Pick<{
120
- [key: string]: any;
121
- appId: string;
122
- appPid: string;
123
- appIds: string[];
124
- appName: string;
125
- appNameSlug: string;
126
- appDescription: string;
127
- appUrl: string;
128
- isComponent: boolean;
129
- dataDir: string;
130
- cacheDir: string;
131
- mode: string;
132
- tenantMode: string;
133
- appStorageEndpoint: string;
134
- serverVersion: string;
135
- languages: {
136
- code: string;
137
- name: string;
138
- }[];
139
- preferences: Record<string, any>;
140
- componentDid: string;
141
- initialized?: boolean;
142
- }, "appId" | "appName" | "appDescription" | "appUrl">;
143
- };
144
- $storage: {
145
- getItem(key: string, { scope, onlyOne }?: {
146
- scope?: VariableScope;
147
- onlyOne?: boolean;
148
- }): Promise<{
149
- id: string;
150
- key: string;
151
- data: any;
152
- scope: VariableScope;
153
- }[] | {
154
- id: string;
155
- key: string;
156
- data: any;
157
- scope: VariableScope;
158
- } | null>;
159
- setItem(key: string, value: any, { scope, onlyOne }?: {
160
- scope?: VariableScope;
161
- onlyOne?: boolean;
162
- }): Promise<{
163
- id: string;
164
- key: string;
165
- data: any;
166
- scope: VariableScope;
167
- }>;
168
- };
169
- $cache: {
170
- readonly key: string;
171
- getItem(key: string, { agentId }?: {
172
- agentId?: string;
173
- }): Promise<{
174
- inputs: {
175
- [key: string]: any;
176
- };
177
- outputs: {
178
- [key: string]: any;
179
- };
180
- } | null>;
181
- };
182
- $blocklet: {
183
- issueVC: (args: Omit<Parameters<typeof issueVC>[0], "userDid" | "project">) => Promise<{
184
- user: import("@abtnode/client").UserInfo;
185
- vc: object;
186
- }>;
187
- };
188
- };
189
- private prepareInputs;
190
- protected renderMessage: typeof renderMessage;
191
- protected validateOutputs({ inputs, outputs, partial, processCallAgentOutputs, }: {
192
- inputs?: {
193
- [key: string]: any;
194
- };
195
- outputs?: {
196
- [key: string]: any;
197
- };
198
- partial?: boolean;
199
- processCallAgentOutputs?: boolean;
200
- }): Promise<any>;
201
- private postProcessOutputs;
202
- private setMemory;
203
- private getMemory;
204
- hideSecretInputs(partial: {
205
- [key: string]: any;
206
- }, agent: GetAgentResult): {
207
- [x: string]: any;
208
- };
209
- }
@@ -1,9 +0,0 @@
1
- import { BlockletAgent } from '../types';
2
- import { AgentExecutorBase } from './base';
3
- export declare class BlockletAgentExecutor extends AgentExecutorBase<BlockletAgent> {
4
- process({ inputs }: {
5
- inputs: {
6
- [key: string]: any;
7
- };
8
- }): Promise<any>;
9
- }
@@ -1,12 +0,0 @@
1
- import { CallAssistant } from '../types';
2
- import { AgentExecutorBase } from './base';
3
- export declare class CallAgentExecutor extends AgentExecutorBase<CallAssistant> {
4
- private getCalledAgents;
5
- private getLastTextSteamAgentId;
6
- private getOutputVariables;
7
- process(options: {
8
- inputs: {
9
- [key: string]: any;
10
- };
11
- }): Promise<Partial<{}>>;
12
- }
@@ -1,20 +0,0 @@
1
- import { RouterAssistant } from '../types';
2
- import { AgentExecutorBase } from './base';
3
- export declare class DecisionAgentExecutor extends AgentExecutorBase<RouterAssistant> {
4
- process({ inputs }: {
5
- inputs: {
6
- [key: string]: any;
7
- };
8
- }): Promise<any>;
9
- processWithJsonLogic({ inputs }: {
10
- inputs: {
11
- [key: string]: any;
12
- };
13
- }): Promise<any>;
14
- processWithLLM({ inputs }: {
15
- inputs: {
16
- [key: string]: any;
17
- };
18
- }): Promise<any>;
19
- private getEnglishFunctionName;
20
- }
@@ -1,9 +0,0 @@
1
- import { ImageBlenderAssistant } from '../types';
2
- import { AgentExecutorBase } from './base';
3
- export declare class ImageBlenderAgentExecutor extends AgentExecutorBase<ImageBlenderAssistant> {
4
- process(): Promise<{
5
- $images: {
6
- url: string;
7
- }[];
8
- }>;
9
- }
@@ -1,8 +0,0 @@
1
- import { GetAgentResult } from '../assistant/type';
2
- import { AgentExecutorBase, AgentExecutorOptions, ExecutorContext } from './base';
3
- export declare class RuntimeExecutor extends AgentExecutorBase<GetAgentResult> {
4
- private parentAgent?;
5
- constructor(context: Omit<ConstructorParameters<typeof ExecutorContext>[0], 'executor'>, agent: GetAgentResult, options: AgentExecutorOptions, parentAgent?: GetAgentResult | undefined);
6
- process(): Promise<void>;
7
- execute(): Promise<any>;
8
- }
@@ -1,38 +0,0 @@
1
- import { GetAgentResult } from '../assistant/type';
2
- import { OutputVariable, PromptAssistant } from '../types';
3
- import { AgentExecutorBase } from './base';
4
- export declare class LLMAgentExecutor extends AgentExecutorBase<PromptAssistant> {
5
- private retryTimes;
6
- get modelInfo(): {
7
- model: string;
8
- temperature: number | undefined;
9
- topP: number | undefined;
10
- presencePenalty: number | undefined;
11
- frequencyPenalty: number | undefined;
12
- };
13
- private _executor;
14
- get executor(): Promise<{
15
- executor: GetAgentResult;
16
- inputValues?: {
17
- [key: string]: any;
18
- };
19
- } | undefined>;
20
- private _outputsInfo;
21
- get outputsInfo(): Promise<{
22
- outputs: OutputVariable[];
23
- schema: any;
24
- hasStreamingTextOutput: boolean;
25
- hasJsonOutputs: boolean;
26
- }>;
27
- private getMessages;
28
- process({ inputs }: {
29
- inputs: {
30
- [key: string]: any;
31
- };
32
- }): Promise<any>;
33
- private processWithOutJsonSchemaFormatSupport;
34
- private processWithJsonSchemaFormat;
35
- private callAIGetJsonOutput;
36
- private callAIGetTextStreamOutput;
37
- private callAIOrExecutor;
38
- }
@@ -1,9 +0,0 @@
1
- import { FunctionAssistant } from '../types';
2
- import { AgentExecutorBase } from './base';
3
- export declare class LogicAgentExecutor extends AgentExecutorBase<FunctionAssistant> {
4
- process({ inputs }: {
5
- inputs: {
6
- [key: string]: any;
7
- };
8
- }): Promise<any>;
9
- }
@@ -1,17 +0,0 @@
1
- import { UserInfo } from '@abtnode/client';
2
- import AuthService from '@blocklet/sdk/lib/service/auth';
3
- import type { ExecutorContext } from '../../executor/base';
4
- export declare const authService: AuthService;
5
- export declare function issueVC({ context: { entry }, userDid, name, title, description, reissue, displayUrl, notify, }: {
6
- context: ExecutorContext;
7
- userDid: string;
8
- name: string;
9
- title: string;
10
- description: string;
11
- reissue?: boolean;
12
- displayUrl?: string;
13
- notify?: boolean;
14
- }): Promise<{
15
- user: UserInfo;
16
- vc: object;
17
- }>;
@@ -1,17 +0,0 @@
1
- import { DatasetObject } from '../types';
2
- export interface User {
3
- did: string;
4
- }
5
- export declare const callBlockletApi: (pathItem: DatasetObject, data: {
6
- [key: string]: any;
7
- }, options?: {
8
- user?: User;
9
- params?: {
10
- [key: string]: any;
11
- };
12
- data?: {
13
- [key: string]: any;
14
- };
15
- }) => Promise<import("axios").AxiosResponse<any, {
16
- [key: string]: any;
17
- }>>;
@@ -1,40 +0,0 @@
1
- import { DatasetObject, RequestBodyObject } from '../types';
2
- export declare const getRequestConfig: (pathItem: DatasetObject, requestData: {
3
- [key: string]: any;
4
- }, options?: {
5
- params: {
6
- [key: string]: any;
7
- };
8
- data: {
9
- [key: string]: any;
10
- };
11
- }) => {
12
- url: string;
13
- method: string;
14
- headers: {
15
- [key: string]: any;
16
- };
17
- params: {
18
- [key: string]: any;
19
- };
20
- data: {
21
- [key: string]: any;
22
- };
23
- body: {
24
- [key: string]: any;
25
- };
26
- cookies: {
27
- [key: string]: any;
28
- };
29
- };
30
- export declare function extractRequestBodyParameters(requestBody?: RequestBodyObject): {
31
- name: string;
32
- value: any;
33
- description?: string;
34
- }[];
35
- export declare function getAllParameters(dataset: DatasetObject): {
36
- name: string;
37
- description?: string;
38
- type?: string;
39
- }[];
40
- export declare function getRequiredFields(dataset: DatasetObject): any[];
@@ -1,20 +0,0 @@
1
- import { ParameterObject, RequestBodyObject, ResponsesObject } from 'openapi3-ts/oas31';
2
- export * from 'openapi3-ts/oas31';
3
- export interface PathItemObject {
4
- path: string;
5
- method: string;
6
- summary?: string;
7
- description?: string;
8
- parameters?: ParameterObject[];
9
- requestBody?: RequestBodyObject;
10
- responses?: ResponsesObject;
11
- }
12
- export interface DatasetObject extends PathItemObject {
13
- id: string;
14
- type: string;
15
- url?: string;
16
- name?: string;
17
- did?: string;
18
- [key: `x-summary-${string}`]: string | undefined;
19
- [key: `x-description-${string}`]: string | undefined;
20
- }
@@ -1,2 +0,0 @@
1
- import { call as originalCall } from '@blocklet/sdk/lib/component';
2
- export declare const call: typeof originalCall;
@@ -1,3 +0,0 @@
1
- import Joi from 'joi';
2
- declare const _default: Joi.ObjectSchema<any>;
3
- export default _default;
@@ -1,8 +0,0 @@
1
- declare const convertSchemaToObject: (schema: any) => any[] | {
2
- [key: string]: any;
3
- } | {
4
- type: string;
5
- value: any;
6
- description?: string;
7
- };
8
- export default convertSchemaToObject;
@@ -1,3 +0,0 @@
1
- import { DatasetObject, OpenAPIObject } from '../types';
2
- declare function flattenApiStructure(apiStructure: OpenAPIObject): DatasetObject[];
3
- export default flattenApiStructure;
@@ -1,2 +0,0 @@
1
- declare const getOpenApiTextFromI18n: (data: any, key: string, locale: string) => any;
2
- export default getOpenApiTextFromI18n;
@@ -1,2 +0,0 @@
1
- import { ResourceManager } from '../common/resource-manager';
2
- export declare const resourceManager: ResourceManager;
@@ -1,20 +0,0 @@
1
- import { Agent, Variable } from '../types';
2
- export interface AIGNEProject {
3
- id: string;
4
- name?: string;
5
- description?: string;
6
- createdAt?: string;
7
- updatedAt?: string;
8
- createdBy?: string;
9
- updatedBy?: string;
10
- agents?: Agent[];
11
- memories?: Variable[];
12
- }
13
- export declare class AIGNERuntime {
14
- project: AIGNEProject;
15
- static load(options: {
16
- path: string;
17
- }): Promise<AIGNERuntime>;
18
- constructor(project: AIGNEProject);
19
- runAgent(agentId: string, inputs: object): Promise<any>;
20
- }