@arvo-tools/agentic 1.1.1 → 1.2.1
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 +212 -12
- package/dist/Agent/agentLoop.d.ts +4 -0
- package/dist/Agent/agentLoop.d.ts.map +1 -1
- package/dist/Agent/agentLoop.js +148 -56
- package/dist/Agent/agentLoop.js.map +1 -1
- package/dist/Agent/index.d.ts +39 -41
- package/dist/Agent/index.d.ts.map +1 -1
- package/dist/Agent/index.js +143 -93
- package/dist/Agent/index.js.map +1 -1
- package/dist/Agent/stream/schema.d.ts +156 -0
- package/dist/Agent/stream/schema.d.ts.map +1 -1
- package/dist/Agent/stream/schema.js +34 -0
- package/dist/Agent/stream/schema.js.map +1 -1
- package/dist/Agent/types.d.ts +128 -16
- package/dist/Agent/types.d.ts.map +1 -1
- package/dist/SimplePermissionManager/contract.d.ts +35 -0
- package/dist/SimplePermissionManager/contract.d.ts.map +1 -0
- package/dist/SimplePermissionManager/contract.js +34 -0
- package/dist/SimplePermissionManager/contract.js.map +1 -0
- package/dist/SimplePermissionManager/index.d.ts +144 -0
- package/dist/SimplePermissionManager/index.d.ts.map +1 -0
- package/dist/SimplePermissionManager/index.js +256 -0
- package/dist/SimplePermissionManager/index.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces.permission.manager.d.ts +191 -0
- package/dist/interfaces.permission.manager.d.ts.map +1 -0
- package/dist/interfaces.permission.manager.js +3 -0
- package/dist/interfaces.permission.manager.js.map +1 -0
- package/package.json +1 -1
package/dist/Agent/index.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type { AgentInternalTool } from '../AgentTool/types.js';
|
|
2
2
|
import type { AgentMessage, AgentServiceContract, AnyArvoOrchestratorContract, CreateArvoAgentParam } from './types.js';
|
|
3
3
|
export type AgentState = {
|
|
4
|
+
initEventAccessControl: string | null;
|
|
4
5
|
currentSubject: string;
|
|
5
6
|
system: string | null;
|
|
6
7
|
messages: AgentMessage[];
|
|
@@ -21,69 +22,66 @@ export type AgentState = {
|
|
|
21
22
|
/**
|
|
22
23
|
* Creates a fully-featured AI Agent implemented as an Arvo Resumable Event Handler.
|
|
23
24
|
*
|
|
24
|
-
* This factory transforms a
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
* 3. **Arvo Services**: Other Event Handlers in your Arvo distributed system (Async/Distributed tools).
|
|
25
|
+
* This factory transforms a Large Language Model into a stateful, event-driven participant
|
|
26
|
+
* in your Arvo system. The resulting agent operates on a start-stop-resume execution model,
|
|
27
|
+
* consuming zero resources between event processing cycles while maintaining conversation
|
|
28
|
+
* state in persistent memory.
|
|
29
29
|
*
|
|
30
30
|
* @remarks
|
|
31
|
-
*
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
*
|
|
39
|
-
*
|
|
31
|
+
* The agent operates on a start-stop-resume execution model where it receives an event, invokes
|
|
32
|
+
* the LLM with available tools (internal Typescript functions, MCP external sources, or Arvo services),
|
|
33
|
+
* and either continues immediately for synchronous tools or suspends execution for service calls
|
|
34
|
+
* until responses arrive. When the LLM requests multiple tools simultaneously, priority-based orchestration
|
|
35
|
+
* ensures only the highest-priority batch executes (enabling "human-approval-first" patterns), while contract
|
|
36
|
+
* versioning enforces that you provide complete handler implementations for all defined versions
|
|
37
|
+
* (enabling safe evolution of prompts, models, and output schemas across v1, v2, etc.). The optional permission
|
|
38
|
+
* manager adds deterministic authorization outside the LLM's control—blocked tools trigger permission request events,
|
|
39
|
+
* the agent suspends until external approval, then retries with updated permissions, creating a security layer
|
|
40
|
+
* immune to prompt injection.
|
|
41
|
+
|
|
42
|
+
* @param param - Configuration object defining the agent's contracts, tools, memory backend,
|
|
43
|
+
* LLM integration, and version-specific behavior handlers.
|
|
40
44
|
*
|
|
41
|
-
*
|
|
42
|
-
*
|
|
43
|
-
* If your `self` contract defines versions `'1.0.0'` and `'2.0.0'`, you must
|
|
44
|
-
* provide specific `context` (A context builder function which runs at init of the agent
|
|
45
|
-
* execution and is reponsible for building the context of the agent i.e. system promot
|
|
46
|
-
* and messages list, both are optional) and `output` builder, which takes the LLM output
|
|
47
|
-
* and converts it into yor contract compliant structure,for *all* versions
|
|
48
|
-
* in the `handler` parameter.
|
|
49
|
-
*
|
|
50
|
-
* This allows you to:
|
|
51
|
-
* - Safely evolve prompt engineering strategies (e.g., v1 uses GPT-3.5, v2 uses GPT-4).
|
|
52
|
-
* - Run different tests on Agent behavior within the same deployment.
|
|
53
|
-
* - Retire old Agent behaviors gradually without breaking existing clients.
|
|
54
|
-
*
|
|
55
|
-
* @param param - Configuration object for the Agent.
|
|
56
|
-
*
|
|
57
|
-
* @returns An `ArvoResumable` instance specialised to run as an AI Agent.
|
|
45
|
+
* @returns An ArvoResumable instance that participates in the event fabric as a standard
|
|
46
|
+
* event handler, compatible with any Arvo broker implementation.
|
|
58
47
|
*
|
|
59
48
|
* @example
|
|
60
49
|
* ```typescript
|
|
61
50
|
* export const supportAgent = ({ memory }) => createArvoAgent({
|
|
62
51
|
* contracts: {
|
|
63
|
-
* self: supportAgentContract,
|
|
52
|
+
* self: supportAgentContract,
|
|
64
53
|
* services: {
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
54
|
+
* billing: {
|
|
55
|
+
* contract: billingServiceContract.version('1.0.0'),
|
|
56
|
+
* priority: 0
|
|
57
|
+
* },
|
|
58
|
+
* humanApproval: {
|
|
59
|
+
* contract: approvalContract.version('1.0.0'),
|
|
60
|
+
* domains: ['human.interaction'],
|
|
61
|
+
* priority: 100 // Executes before billing calls
|
|
62
|
+
* }
|
|
68
63
|
* }
|
|
69
64
|
* },
|
|
70
65
|
* tools: {
|
|
71
|
-
* // The Agent can execute this immediately in-memory
|
|
72
66
|
* checkTime: createAgentTool({
|
|
73
67
|
* name: 'check_time',
|
|
74
|
-
* description: '
|
|
68
|
+
* description: 'Returns current server time in ISO format',
|
|
75
69
|
* input: z.object({}),
|
|
76
70
|
* output: z.object({ time: z.string() }),
|
|
77
71
|
* fn: async () => ({ time: new Date().toISOString() })
|
|
78
72
|
* })
|
|
79
73
|
* },
|
|
80
74
|
* llm: openaiLLMIntegration(new OpenAI(), { model: 'gpt-4o' }),
|
|
81
|
-
* memory: memory,
|
|
75
|
+
* memory: memory,
|
|
76
|
+
* permissionManager: new ToolPermissionManager(),
|
|
82
77
|
* handler: {
|
|
83
78
|
* '1.0.0': {
|
|
84
|
-
*
|
|
79
|
+
* permissionPolicy: async ({ services }) => [
|
|
80
|
+
* services.billing.name // Require permission for billing calls
|
|
81
|
+
* ],
|
|
85
82
|
* context: AgentDefaults.CONTEXT_BUILDER(async ({ tools }) =>
|
|
86
|
-
* `You are a support agent
|
|
83
|
+
* `You are a support agent with access to billing data via ${tools.services.billing.name}.
|
|
84
|
+
* You must request approval via ${tools.services.humanApproval.name} before accessing billing.`
|
|
87
85
|
* ),
|
|
88
86
|
* output: AgentDefaults.OUTPUT_BUILDER
|
|
89
87
|
* }
|
|
@@ -91,5 +89,5 @@ export type AgentState = {
|
|
|
91
89
|
* });
|
|
92
90
|
* ```
|
|
93
91
|
*/
|
|
94
|
-
export declare const createArvoAgent: <TSelfContract extends AnyArvoOrchestratorContract, TServiceContract extends Record<string, AgentServiceContract>, TTools extends Record<string, AgentInternalTool>>({ contracts, memory, handler, llm, mcp, maxToolInteractions, llmResponseType, tools, onStream, }: CreateArvoAgentParam<TSelfContract, TServiceContract, TTools>) => import("arvo-event-handler").ArvoResumable<AgentState, TSelfContract, { [K in keyof TServiceContract & string]: TServiceContract[K]["contract"]; }>;
|
|
92
|
+
export declare const createArvoAgent: <TSelfContract extends AnyArvoOrchestratorContract, TServiceContract extends Record<string, AgentServiceContract>, TTools extends Record<string, AgentInternalTool>>({ contracts, memory, handler, llm, mcp, maxToolInteractions, llmResponseType, tools, onStream, permissionManager, }: CreateArvoAgentParam<TSelfContract, TServiceContract, TTools>) => import("arvo-event-handler").ArvoResumable<AgentState, TSelfContract, { [K in keyof TServiceContract & string]: TServiceContract[K]["contract"]; }>;
|
|
95
93
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Agent/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/Agent/index.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAM/D,OAAO,KAAK,EACV,YAAY,EACZ,oBAAoB,EACpB,2BAA2B,EAC3B,oBAAoB,EACrB,MAAM,YAAY,CAAC;AAOpB,MAAM,MAAM,UAAU,GAAG;IACvB,sBAAsB,EAAE,MAAM,GAAG,IAAI,CAAC;IACtC,cAAc,EAAE,MAAM,CAAC;IACvB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,QAAQ,EAAE,YAAY,EAAE,CAAC;IACzB,gBAAgB,EAAE;QAChB,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC;KACjB,CAAC;IACF,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,CAAA;KAAE,CAAC,CAAC;IAC1F,mBAAmB,EAAE,MAAM,CAAC;IAC5B,eAAe,EAAE;QACf,MAAM,EAAE,MAAM,CAAC;QACf,UAAU,EAAE,MAAM,CAAC;KACpB,CAAC;CACH,CAAC;AAEF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AACH,eAAO,MAAM,eAAe,GAC1B,aAAa,SAAS,2BAA2B,EACjD,gBAAgB,SAAS,MAAM,CAAC,MAAM,EAAE,oBAAoB,CAAC,EAC7D,MAAM,SAAS,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,EAChD,qHAWC,oBAAoB,CAAC,aAAa,EAAE,gBAAgB,EAAE,MAAM,CAAC,8EAGtD,CAAC,yEA2TV,CAAC"}
|
package/dist/Agent/index.js
CHANGED
|
@@ -104,69 +104,66 @@ var utils_js_2 = require("./utils.js");
|
|
|
104
104
|
/**
|
|
105
105
|
* Creates a fully-featured AI Agent implemented as an Arvo Resumable Event Handler.
|
|
106
106
|
*
|
|
107
|
-
* This factory transforms a
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
*
|
|
111
|
-
* 3. **Arvo Services**: Other Event Handlers in your Arvo distributed system (Async/Distributed tools).
|
|
107
|
+
* This factory transforms a Large Language Model into a stateful, event-driven participant
|
|
108
|
+
* in your Arvo system. The resulting agent operates on a start-stop-resume execution model,
|
|
109
|
+
* consuming zero resources between event processing cycles while maintaining conversation
|
|
110
|
+
* state in persistent memory.
|
|
112
111
|
*
|
|
113
112
|
* @remarks
|
|
114
|
-
*
|
|
115
|
-
*
|
|
116
|
-
*
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
120
|
-
*
|
|
121
|
-
*
|
|
122
|
-
*
|
|
113
|
+
* The agent operates on a start-stop-resume execution model where it receives an event, invokes
|
|
114
|
+
* the LLM with available tools (internal Typescript functions, MCP external sources, or Arvo services),
|
|
115
|
+
* and either continues immediately for synchronous tools or suspends execution for service calls
|
|
116
|
+
* until responses arrive. When the LLM requests multiple tools simultaneously, priority-based orchestration
|
|
117
|
+
* ensures only the highest-priority batch executes (enabling "human-approval-first" patterns), while contract
|
|
118
|
+
* versioning enforces that you provide complete handler implementations for all defined versions
|
|
119
|
+
* (enabling safe evolution of prompts, models, and output schemas across v1, v2, etc.). The optional permission
|
|
120
|
+
* manager adds deterministic authorization outside the LLM's control—blocked tools trigger permission request events,
|
|
121
|
+
* the agent suspends until external approval, then retries with updated permissions, creating a security layer
|
|
122
|
+
* immune to prompt injection.
|
|
123
|
+
|
|
124
|
+
* @param param - Configuration object defining the agent's contracts, tools, memory backend,
|
|
125
|
+
* LLM integration, and version-specific behavior handlers.
|
|
123
126
|
*
|
|
124
|
-
*
|
|
125
|
-
*
|
|
126
|
-
* If your `self` contract defines versions `'1.0.0'` and `'2.0.0'`, you must
|
|
127
|
-
* provide specific `context` (A context builder function which runs at init of the agent
|
|
128
|
-
* execution and is reponsible for building the context of the agent i.e. system promot
|
|
129
|
-
* and messages list, both are optional) and `output` builder, which takes the LLM output
|
|
130
|
-
* and converts it into yor contract compliant structure,for *all* versions
|
|
131
|
-
* in the `handler` parameter.
|
|
132
|
-
*
|
|
133
|
-
* This allows you to:
|
|
134
|
-
* - Safely evolve prompt engineering strategies (e.g., v1 uses GPT-3.5, v2 uses GPT-4).
|
|
135
|
-
* - Run different tests on Agent behavior within the same deployment.
|
|
136
|
-
* - Retire old Agent behaviors gradually without breaking existing clients.
|
|
137
|
-
*
|
|
138
|
-
* @param param - Configuration object for the Agent.
|
|
139
|
-
*
|
|
140
|
-
* @returns An `ArvoResumable` instance specialised to run as an AI Agent.
|
|
127
|
+
* @returns An ArvoResumable instance that participates in the event fabric as a standard
|
|
128
|
+
* event handler, compatible with any Arvo broker implementation.
|
|
141
129
|
*
|
|
142
130
|
* @example
|
|
143
131
|
* ```typescript
|
|
144
132
|
* export const supportAgent = ({ memory }) => createArvoAgent({
|
|
145
133
|
* contracts: {
|
|
146
|
-
* self: supportAgentContract,
|
|
134
|
+
* self: supportAgentContract,
|
|
147
135
|
* services: {
|
|
148
|
-
*
|
|
149
|
-
*
|
|
150
|
-
*
|
|
136
|
+
* billing: {
|
|
137
|
+
* contract: billingServiceContract.version('1.0.0'),
|
|
138
|
+
* priority: 0
|
|
139
|
+
* },
|
|
140
|
+
* humanApproval: {
|
|
141
|
+
* contract: approvalContract.version('1.0.0'),
|
|
142
|
+
* domains: ['human.interaction'],
|
|
143
|
+
* priority: 100 // Executes before billing calls
|
|
144
|
+
* }
|
|
151
145
|
* }
|
|
152
146
|
* },
|
|
153
147
|
* tools: {
|
|
154
|
-
* // The Agent can execute this immediately in-memory
|
|
155
148
|
* checkTime: createAgentTool({
|
|
156
149
|
* name: 'check_time',
|
|
157
|
-
* description: '
|
|
150
|
+
* description: 'Returns current server time in ISO format',
|
|
158
151
|
* input: z.object({}),
|
|
159
152
|
* output: z.object({ time: z.string() }),
|
|
160
153
|
* fn: async () => ({ time: new Date().toISOString() })
|
|
161
154
|
* })
|
|
162
155
|
* },
|
|
163
156
|
* llm: openaiLLMIntegration(new OpenAI(), { model: 'gpt-4o' }),
|
|
164
|
-
* memory: memory,
|
|
157
|
+
* memory: memory,
|
|
158
|
+
* permissionManager: new ToolPermissionManager(),
|
|
165
159
|
* handler: {
|
|
166
160
|
* '1.0.0': {
|
|
167
|
-
*
|
|
161
|
+
* permissionPolicy: async ({ services }) => [
|
|
162
|
+
* services.billing.name // Require permission for billing calls
|
|
163
|
+
* ],
|
|
168
164
|
* context: AgentDefaults.CONTEXT_BUILDER(async ({ tools }) =>
|
|
169
|
-
* `You are a support agent
|
|
165
|
+
* `You are a support agent with access to billing data via ${tools.services.billing.name}.
|
|
166
|
+
* You must request approval via ${tools.services.humanApproval.name} before accessing billing.`
|
|
170
167
|
* ),
|
|
171
168
|
* output: AgentDefaults.OUTPUT_BUILDER
|
|
172
169
|
* }
|
|
@@ -175,7 +172,8 @@ var utils_js_2 = require("./utils.js");
|
|
|
175
172
|
* ```
|
|
176
173
|
*/
|
|
177
174
|
var createArvoAgent = function (_a) {
|
|
178
|
-
var
|
|
175
|
+
var _b;
|
|
176
|
+
var contracts = _a.contracts, memory = _a.memory, handler = _a.handler, llm = _a.llm, mcp = _a.mcp, _c = _a.maxToolInteractions, maxToolInteractions = _c === void 0 ? 5 : _c, _d = _a.llmResponseType, llmResponseType = _d === void 0 ? 'text' : _d, tools = _a.tools, onStream = _a.onStream, permissionManager = _a.permissionManager;
|
|
179
177
|
var serviceContracts = Object.fromEntries(Object.entries(contracts.services).map(function (_a) {
|
|
180
178
|
var _b = __read(_a, 2), key = _b[0], contract = _b[1].contract;
|
|
181
179
|
return [key, contract];
|
|
@@ -186,7 +184,7 @@ var createArvoAgent = function (_a) {
|
|
|
186
184
|
return (0, arvo_event_handler_1.createArvoResumable)({
|
|
187
185
|
contracts: {
|
|
188
186
|
self: contracts.self,
|
|
189
|
-
services: serviceContracts,
|
|
187
|
+
services: __assign(__assign({}, serviceContracts), (permissionManager ? (_b = {}, _b[(0, uuid_1.v4)()] = permissionManager.contract, _b) : {})),
|
|
190
188
|
},
|
|
191
189
|
memory: memory,
|
|
192
190
|
types: {
|
|
@@ -196,12 +194,12 @@ var createArvoAgent = function (_a) {
|
|
|
196
194
|
handler: Object.fromEntries(Object.keys(contracts.self.versions).map(function (ver) { return [
|
|
197
195
|
ver,
|
|
198
196
|
(function (_a) { return __awaiter(void 0, [_a], void 0, function (_b) {
|
|
199
|
-
var otelInfo, agentEventStreamer, contextBuilder, outputBuilder, thisVersionLlmIntegration, versionLlmResponseType, selfVersionedContract, outputFormat, serviceTools, mcpTools, internalTools, toolInteraction, _c, parentSubject$$, inputData, llmContext, response_1, resumableContextToPersist_1, resumedContext, messages, _d, _e, _f, toolUseId, data, response_2, resumableContextToPersist_2;
|
|
200
|
-
var e_1,
|
|
201
|
-
var
|
|
197
|
+
var otelInfo, agentEventStreamer, contextBuilder, outputBuilder, thisVersionLlmIntegration, versionLlmResponseType, selfVersionedContract, outputFormat, permissionManagerContext, serviceTools, mcpTools, internalTools, permissionPolicy, toolInteraction, _c, parentSubject$$, inputData, llmContext, response_1, resumableContextToPersist_1, resumedContext, messages, _d, _e, _f, toolUseId, _g, type, data, response_2, resumableContextToPersist_2;
|
|
198
|
+
var e_1, _h;
|
|
199
|
+
var _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15;
|
|
202
200
|
var span = _b.span, input = _b.input, context = _b.context, service = _b.service;
|
|
203
|
-
return __generator(this, function (
|
|
204
|
-
switch (
|
|
201
|
+
return __generator(this, function (_16) {
|
|
202
|
+
switch (_16.label) {
|
|
205
203
|
case 0:
|
|
206
204
|
otelInfo = {
|
|
207
205
|
span: span,
|
|
@@ -225,28 +223,40 @@ var createArvoAgent = function (_a) {
|
|
|
225
223
|
(0, arvo_core_1.exceptionToSpan)(e, span);
|
|
226
224
|
}
|
|
227
225
|
};
|
|
228
|
-
|
|
226
|
+
_16.label = 1;
|
|
229
227
|
case 1:
|
|
230
|
-
|
|
231
|
-
contextBuilder = (
|
|
232
|
-
outputBuilder = (
|
|
233
|
-
thisVersionLlmIntegration = (
|
|
234
|
-
versionLlmResponseType = (
|
|
228
|
+
_16.trys.push([1, , 12, 14]);
|
|
229
|
+
contextBuilder = (_j = handler[ver]) === null || _j === void 0 ? void 0 : _j.context;
|
|
230
|
+
outputBuilder = (_k = handler[ver]) === null || _k === void 0 ? void 0 : _k.output;
|
|
231
|
+
thisVersionLlmIntegration = (_m = (_l = handler[ver]) === null || _l === void 0 ? void 0 : _l.llm) !== null && _m !== void 0 ? _m : llm;
|
|
232
|
+
versionLlmResponseType = (_p = (_o = handler[ver]) === null || _o === void 0 ? void 0 : _o.llmResponseType) !== null && _p !== void 0 ? _p : llmResponseType;
|
|
235
233
|
selfVersionedContract = contracts.self.version(ver);
|
|
236
234
|
outputFormat = selfVersionedContract.emits[selfVersionedContract.metadata.completeEventType];
|
|
235
|
+
permissionManagerContext = {
|
|
236
|
+
subject: (_r = (_q = context === null || context === void 0 ? void 0 : context.currentSubject) !== null && _q !== void 0 ? _q : input === null || input === void 0 ? void 0 : input.subject) !== null && _r !== void 0 ? _r : 'unknown',
|
|
237
|
+
accesscontrol: (_t = (_s = context === null || context === void 0 ? void 0 : context.initEventAccessControl) !== null && _s !== void 0 ? _s : input === null || input === void 0 ? void 0 : input.accesscontrol) !== null && _t !== void 0 ? _t : null,
|
|
238
|
+
name: contracts.self.type,
|
|
239
|
+
};
|
|
237
240
|
return [4 /*yield*/, (mcp === null || mcp === void 0 ? void 0 : mcp.connect({ otelInfo: otelInfo }))];
|
|
238
241
|
case 2:
|
|
239
|
-
|
|
242
|
+
_16.sent();
|
|
240
243
|
serviceTools = (0, utils_js_2.generateServiceToolDefinitions)(contracts.services);
|
|
241
244
|
return [4 /*yield*/, (0, utils_js_2.generateMcpToolDefinitions)(mcp !== null && mcp !== void 0 ? mcp : null, { otelInfo: otelInfo })];
|
|
242
245
|
case 3:
|
|
243
|
-
mcpTools =
|
|
246
|
+
mcpTools = _16.sent();
|
|
244
247
|
internalTools = (0, utils_js_2.generateAgentInternalToolDefinitions)(tools !== null && tools !== void 0 ? tools : {});
|
|
245
|
-
|
|
248
|
+
return [4 /*yield*/, ((_v = (_u = handler[ver]) === null || _u === void 0 ? void 0 : _u.explicityPermissionRequired) === null || _v === void 0 ? void 0 : _v.call(_u, {
|
|
249
|
+
services: serviceTools,
|
|
250
|
+
mcp: mcpTools,
|
|
251
|
+
tools: internalTools,
|
|
252
|
+
}))];
|
|
253
|
+
case 4:
|
|
254
|
+
permissionPolicy = (_w = (_16.sent())) !== null && _w !== void 0 ? _w : [];
|
|
255
|
+
toolInteraction = (_x = context === null || context === void 0 ? void 0 : context.toolInteractions) !== null && _x !== void 0 ? _x : {
|
|
246
256
|
max: maxToolInteractions,
|
|
247
257
|
current: 0,
|
|
248
258
|
};
|
|
249
|
-
if (!input) return [3 /*break*/,
|
|
259
|
+
if (!input) return [3 /*break*/, 7];
|
|
250
260
|
_c = input.data, parentSubject$$ = _c.parentSubject$$, inputData = __rest(_c, ["parentSubject$$"]);
|
|
251
261
|
return [4 /*yield*/, contextBuilder({
|
|
252
262
|
lifecycle: 'init',
|
|
@@ -255,12 +265,13 @@ var createArvoAgent = function (_a) {
|
|
|
255
265
|
span: span,
|
|
256
266
|
selfContract: selfVersionedContract,
|
|
257
267
|
})];
|
|
258
|
-
case
|
|
259
|
-
llmContext = (
|
|
268
|
+
case 5:
|
|
269
|
+
llmContext = (_y = (_16.sent())) !== null && _y !== void 0 ? _y : null;
|
|
260
270
|
return [4 /*yield*/, (0, agentLoop_js_1.agentLoop)({
|
|
271
|
+
permissionManagerContext: permissionManagerContext,
|
|
261
272
|
initLifecycle: 'init',
|
|
262
|
-
system: (
|
|
263
|
-
messages: (((
|
|
273
|
+
system: (_z = llmContext === null || llmContext === void 0 ? void 0 : llmContext.system) !== null && _z !== void 0 ? _z : null,
|
|
274
|
+
messages: (((_0 = llmContext === null || llmContext === void 0 ? void 0 : llmContext.messages) === null || _0 === void 0 ? void 0 : _0.length)
|
|
264
275
|
? llmContext.messages
|
|
265
276
|
: [
|
|
266
277
|
{
|
|
@@ -282,15 +293,18 @@ var createArvoAgent = function (_a) {
|
|
|
282
293
|
prompt: 0,
|
|
283
294
|
completion: 0,
|
|
284
295
|
},
|
|
296
|
+
permissionManager: permissionManager !== null && permissionManager !== void 0 ? permissionManager : null,
|
|
297
|
+
permissionPolicy: permissionPolicy,
|
|
285
298
|
}, { otelInfo: otelInfo })];
|
|
286
|
-
case
|
|
287
|
-
response_1 =
|
|
299
|
+
case 6:
|
|
300
|
+
response_1 = _16.sent();
|
|
288
301
|
resumableContextToPersist_1 = {
|
|
302
|
+
initEventAccessControl: (_1 = input.accesscontrol) !== null && _1 !== void 0 ? _1 : null,
|
|
289
303
|
currentSubject: input.subject,
|
|
290
|
-
system: (
|
|
304
|
+
system: (_2 = llmContext === null || llmContext === void 0 ? void 0 : llmContext.system) !== null && _2 !== void 0 ? _2 : null,
|
|
291
305
|
messages: response_1.messages,
|
|
292
306
|
toolInteractions: response_1.toolInteractions,
|
|
293
|
-
awaitingToolCalls: Object.fromEntries(((
|
|
307
|
+
awaitingToolCalls: Object.fromEntries(((_3 = response_1.toolCalls) !== null && _3 !== void 0 ? _3 : []).map(function (item) { return [
|
|
294
308
|
item.toolUseId,
|
|
295
309
|
{ type: item.name, data: null },
|
|
296
310
|
]; })),
|
|
@@ -300,35 +314,63 @@ var createArvoAgent = function (_a) {
|
|
|
300
314
|
if (response_1.toolCalls) {
|
|
301
315
|
return [2 /*return*/, {
|
|
302
316
|
context: resumableContextToPersist_1,
|
|
303
|
-
services: response_1.toolCalls.map(function (item) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
317
|
+
services: response_1.toolCalls.map(function (item) {
|
|
318
|
+
var _a;
|
|
319
|
+
return ({
|
|
320
|
+
id: { deduplication: 'DEVELOPER_MANAGED', value: item.toolUseId },
|
|
321
|
+
type: item.name,
|
|
322
|
+
data: __assign(__assign({}, item.input), { parentSubject$$: resumableContextToPersist_1.currentSubject }),
|
|
323
|
+
domain: (permissionManager === null || permissionManager === void 0 ? void 0 : permissionManager.contract.accepts.type) === item.name
|
|
324
|
+
? ((_a = permissionManager.domains) !== null && _a !== void 0 ? _a : undefined)
|
|
325
|
+
: serviceTypeToDomainMap[item.name],
|
|
326
|
+
executionunits: response_1.executionUnits,
|
|
327
|
+
});
|
|
328
|
+
}),
|
|
310
329
|
}];
|
|
311
330
|
}
|
|
312
331
|
return [2 /*return*/, {
|
|
313
332
|
context: resumableContextToPersist_1,
|
|
314
333
|
output: __assign({ __executionunits: response_1.executionUnits }, response_1.output),
|
|
315
334
|
}];
|
|
316
|
-
case
|
|
335
|
+
case 7:
|
|
317
336
|
if (!context) {
|
|
318
337
|
throw new Error('Context is not properly set. Faulty initialization');
|
|
319
338
|
}
|
|
320
339
|
resumedContext = __assign({}, context);
|
|
321
|
-
if ((service === null || service === void 0 ? void 0 : service.parentid) && resumedContext.awaitingToolCalls[service.parentid])
|
|
322
|
-
|
|
323
|
-
|
|
340
|
+
if (!((service === null || service === void 0 ? void 0 : service.parentid) && resumedContext.awaitingToolCalls[service.parentid])) return [3 /*break*/, 10];
|
|
341
|
+
// biome-ignore lint/style/noNonNullAssertion: It cannot be null. The if clause does already
|
|
342
|
+
resumedContext.awaitingToolCalls[service.parentid].data = service.data;
|
|
343
|
+
if (!(service.type === ((_6 = (_5 = (_4 = permissionManager === null || permissionManager === void 0 ? void 0 : permissionManager.contract) === null || _4 === void 0 ? void 0 : _4.emitList) === null || _5 === void 0 ? void 0 : _5[0]) === null || _6 === void 0 ? void 0 : _6.type))) return [3 /*break*/, 9];
|
|
344
|
+
return [4 /*yield*/, (permissionManager === null || permissionManager === void 0 ? void 0 : permissionManager.set(permissionManagerContext,
|
|
345
|
+
// biome-ignore lint/suspicious/noExplicitAny: Type casting here is weird
|
|
346
|
+
service, { otelInfo: otelInfo }))];
|
|
347
|
+
case 8:
|
|
348
|
+
_16.sent();
|
|
349
|
+
_16.label = 9;
|
|
350
|
+
case 9:
|
|
351
|
+
if (service.type === ((_8 = (_7 = permissionManager === null || permissionManager === void 0 ? void 0 : permissionManager.contract) === null || _7 === void 0 ? void 0 : _7.systemError) === null || _8 === void 0 ? void 0 : _8.type)) {
|
|
352
|
+
throw new Error((0, arvo_core_1.cleanString)("\n [Critical] The agent's attempt to request permission via ".concat((_10 = (_9 = permissionManager === null || permissionManager === void 0 ? void 0 : permissionManager.contract) === null || _9 === void 0 ? void 0 : _9.accepts) === null || _10 === void 0 ? void 0 : _10.type, "\n failed with error: ").concat(JSON.stringify(service.data), "\n ")));
|
|
324
353
|
}
|
|
354
|
+
_16.label = 10;
|
|
355
|
+
case 10:
|
|
325
356
|
if (Object.values(resumedContext.awaitingToolCalls).some(function (item) { return item.data === null; })) {
|
|
326
357
|
return [2 /*return*/, { context: resumedContext }];
|
|
327
358
|
}
|
|
328
359
|
messages = __spreadArray([], __read(resumedContext.messages), false);
|
|
329
360
|
try {
|
|
330
361
|
for (_d = __values(Object.entries(resumedContext.awaitingToolCalls)), _e = _d.next(); !_e.done; _e = _d.next()) {
|
|
331
|
-
_f = __read(_e.value, 2), toolUseId = _f[0],
|
|
362
|
+
_f = __read(_e.value, 2), toolUseId = _f[0], _g = _f[1], type = _g.type, data = _g.data;
|
|
363
|
+
if (type === ((_12 = (_11 = permissionManager === null || permissionManager === void 0 ? void 0 : permissionManager.contract) === null || _11 === void 0 ? void 0 : _11.accepts) === null || _12 === void 0 ? void 0 : _12.type)) {
|
|
364
|
+
messages.push({
|
|
365
|
+
role: 'user',
|
|
366
|
+
content: {
|
|
367
|
+
type: 'text',
|
|
368
|
+
content: "The response of the permission request. ".concat(JSON.stringify(data !== null && data !== void 0 ? data : {})),
|
|
369
|
+
},
|
|
370
|
+
seenCount: 0,
|
|
371
|
+
});
|
|
372
|
+
continue;
|
|
373
|
+
}
|
|
332
374
|
messages.push({
|
|
333
375
|
role: 'user',
|
|
334
376
|
content: {
|
|
@@ -343,13 +385,14 @@ var createArvoAgent = function (_a) {
|
|
|
343
385
|
catch (e_1_1) { e_1 = { error: e_1_1 }; }
|
|
344
386
|
finally {
|
|
345
387
|
try {
|
|
346
|
-
if (_e && !_e.done && (
|
|
388
|
+
if (_e && !_e.done && (_h = _d.return)) _h.call(_d);
|
|
347
389
|
}
|
|
348
390
|
finally { if (e_1) throw e_1.error; }
|
|
349
391
|
}
|
|
350
392
|
return [4 /*yield*/, (0, agentLoop_js_1.agentLoop)({
|
|
393
|
+
permissionManagerContext: permissionManagerContext,
|
|
351
394
|
initLifecycle: 'tool_result',
|
|
352
|
-
system: (
|
|
395
|
+
system: (_13 = resumedContext.system) !== null && _13 !== void 0 ? _13 : null,
|
|
353
396
|
messages: messages,
|
|
354
397
|
tools: Object.values(__assign(__assign(__assign({}, mcpTools), serviceTools), internalTools)),
|
|
355
398
|
outputFormat: outputFormat,
|
|
@@ -361,34 +404,41 @@ var createArvoAgent = function (_a) {
|
|
|
361
404
|
currentTotalExecutionUnits: resumedContext.totalExecutionUnits,
|
|
362
405
|
onStream: agentEventStreamer,
|
|
363
406
|
currentTotalUsageTokens: resumedContext.totalTokenUsage,
|
|
407
|
+
permissionManager: permissionManager !== null && permissionManager !== void 0 ? permissionManager : null,
|
|
408
|
+
permissionPolicy: permissionPolicy,
|
|
364
409
|
}, { otelInfo: otelInfo })];
|
|
365
|
-
case
|
|
366
|
-
response_2 =
|
|
367
|
-
resumableContextToPersist_2 = __assign(__assign({}, resumedContext), { messages: response_2.messages, toolInteractions: response_2.toolInteractions, awaitingToolCalls: Object.fromEntries(((
|
|
410
|
+
case 11:
|
|
411
|
+
response_2 = _16.sent();
|
|
412
|
+
resumableContextToPersist_2 = __assign(__assign({}, resumedContext), { messages: response_2.messages, toolInteractions: response_2.toolInteractions, awaitingToolCalls: Object.fromEntries(((_14 = response_2.toolCalls) !== null && _14 !== void 0 ? _14 : []).map(function (item) { return [
|
|
368
413
|
item.toolUseId,
|
|
369
414
|
{ type: item.name, data: null },
|
|
370
415
|
]; })), totalExecutionUnits: response_2.executionUnits, totalTokenUsage: response_2.tokenUsage });
|
|
371
416
|
if (response_2.toolCalls) {
|
|
372
417
|
return [2 /*return*/, {
|
|
373
418
|
context: resumableContextToPersist_2,
|
|
374
|
-
services: response_2.toolCalls.map(function (item) {
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
419
|
+
services: response_2.toolCalls.map(function (item) {
|
|
420
|
+
var _a;
|
|
421
|
+
return ({
|
|
422
|
+
id: { deduplication: 'DEVELOPER_MANAGED', value: item.toolUseId },
|
|
423
|
+
type: item.name,
|
|
424
|
+
data: __assign(__assign({}, item.input), { parentSubject$$: resumableContextToPersist_2.currentSubject }),
|
|
425
|
+
domain: (permissionManager === null || permissionManager === void 0 ? void 0 : permissionManager.contract.accepts.type) === item.name
|
|
426
|
+
? ((_a = permissionManager.domains) !== null && _a !== void 0 ? _a : undefined)
|
|
427
|
+
: serviceTypeToDomainMap[item.name],
|
|
428
|
+
executionunits: response_2.executionUnits,
|
|
429
|
+
});
|
|
430
|
+
}),
|
|
381
431
|
}];
|
|
382
432
|
}
|
|
383
433
|
return [2 /*return*/, {
|
|
384
434
|
context: resumableContextToPersist_2,
|
|
385
435
|
output: __assign({ __executionunits: response_2.executionUnits }, response_2.output),
|
|
386
436
|
}];
|
|
387
|
-
case
|
|
388
|
-
case
|
|
389
|
-
|
|
437
|
+
case 12: return [4 /*yield*/, ((_15 = mcp === null || mcp === void 0 ? void 0 : mcp.disconnect({ otelInfo: otelInfo })) === null || _15 === void 0 ? void 0 : _15.catch(console.error))];
|
|
438
|
+
case 13:
|
|
439
|
+
_16.sent();
|
|
390
440
|
return [7 /*endfinally*/];
|
|
391
|
-
case
|
|
441
|
+
case 14: return [2 /*return*/];
|
|
392
442
|
}
|
|
393
443
|
});
|
|
394
444
|
}); }),
|
package/dist/Agent/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/Agent/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAKmB;AACnB,yDAI4B;AAC5B,6BAA0B;AAG1B,+CAA2C;AAE3C,8CAAoD;AAOpD,uCAIoB;AAkBpB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACI,IAAM,eAAe,GAAG,UAI7B,EAU8D;QAT9D,SAAS,eAAA,EACT,MAAM,YAAA,EACN,OAAO,aAAA,EACP,GAAG,SAAA,EACH,GAAG,SAAA,EACH,2BAAuB,EAAvB,mBAAmB,mBAAG,CAAC,KAAA,EACvB,uBAAwB,EAAxB,eAAe,mBAAG,MAAM,KAAA,EACxB,KAAK,WAAA,EACL,QAAQ,cAAA;IAER,IAAM,gBAAgB,GAAG,MAAM,CAAC,WAAW,CACzC,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC,GA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