@slopus/happy-agent-base 0.0.5 → 0.0.7
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 +62 -9
- package/dist/Agent.d.ts +27 -22
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +120 -110
- package/dist/Agent.js.map +1 -1
- package/dist/AgentBase.d.ts +27 -13
- package/dist/AgentBase.d.ts.map +1 -1
- package/dist/AgentBase.js +657 -151
- package/dist/AgentBase.js.map +1 -1
- package/dist/AgentBaseHooks.d.ts +58 -32
- package/dist/AgentBaseHooks.d.ts.map +1 -1
- package/dist/AgentBasePending.d.ts +6 -2
- package/dist/AgentBasePending.d.ts.map +1 -1
- package/dist/AgentBasePending.js +7 -0
- package/dist/AgentBasePending.js.map +1 -1
- package/dist/AgentConfig.d.ts +20 -13
- package/dist/AgentConfig.d.ts.map +1 -1
- package/dist/AgentConfig.js +32 -12
- package/dist/AgentConfig.js.map +1 -1
- package/dist/AgentContexts.d.ts +18 -1
- package/dist/AgentContexts.d.ts.map +1 -1
- package/dist/AgentContexts.js +24 -1
- package/dist/AgentContexts.js.map +1 -1
- package/dist/AgentDatabase.d.ts +35 -0
- package/dist/AgentDatabase.d.ts.map +1 -0
- package/dist/AgentDatabase.js +30 -0
- package/dist/AgentDatabase.js.map +1 -0
- package/dist/AgentKV.d.ts +19 -6
- package/dist/AgentKV.d.ts.map +1 -1
- package/dist/AgentKV.js +110 -43
- package/dist/AgentKV.js.map +1 -1
- package/dist/AgentMessageAcceptance.d.ts +14 -0
- package/dist/AgentMessageAcceptance.d.ts.map +1 -0
- package/dist/AgentMessageAcceptance.js +2 -0
- package/dist/AgentMessageAcceptance.js.map +1 -0
- package/dist/AgentMetadata.d.ts +37 -0
- package/dist/AgentMetadata.d.ts.map +1 -0
- package/dist/AgentMetadata.js +74 -0
- package/dist/AgentMetadata.js.map +1 -0
- package/dist/AgentModule.d.ts +209 -0
- package/dist/AgentModule.d.ts.map +1 -0
- package/dist/AgentModule.js +2 -0
- package/dist/AgentModule.js.map +1 -0
- package/dist/{AgentFeatureAction.d.ts → AgentModuleAction.d.ts} +7 -2
- package/dist/AgentModuleAction.d.ts.map +1 -0
- package/dist/AgentModuleAction.js +2 -0
- package/dist/AgentModuleAction.js.map +1 -0
- package/dist/AgentPermissionMode.d.ts +1 -1
- package/dist/AgentPermissionMode.js +1 -1
- package/dist/AgentPersistence.d.ts +20 -7
- package/dist/AgentPersistence.d.ts.map +1 -1
- package/dist/AgentPersistenceDrizzle.d.ts +31 -0
- package/dist/AgentPersistenceDrizzle.d.ts.map +1 -0
- package/dist/AgentPersistenceDrizzle.js +99 -0
- package/dist/AgentPersistenceDrizzle.js.map +1 -0
- package/dist/AgentRef.d.ts +17 -9
- package/dist/AgentRef.d.ts.map +1 -1
- package/dist/AgentRef.js +16 -9
- package/dist/AgentRef.js.map +1 -1
- package/dist/AgentStorage.d.ts +33 -13
- package/dist/AgentStorage.d.ts.map +1 -1
- package/dist/AgentStorage.js +174 -3
- package/dist/AgentStorage.js.map +1 -1
- package/dist/AgentSystem.d.ts +34 -12
- package/dist/AgentSystem.d.ts.map +1 -1
- package/dist/AgentSystemContext.d.ts +3 -3
- package/dist/AgentSystemContext.d.ts.map +1 -1
- package/dist/AgentSystemContext.js +4 -4
- package/dist/AgentSystemContext.js.map +1 -1
- package/dist/AgentSystemLocal.d.ts +30 -21
- package/dist/AgentSystemLocal.d.ts.map +1 -1
- package/dist/AgentSystemLocal.js +226 -59
- package/dist/AgentSystemLocal.js.map +1 -1
- package/dist/AgentSystemRef.d.ts +21 -10
- package/dist/AgentSystemRef.d.ts.map +1 -1
- package/dist/AgentSystemRef.js +41 -9
- package/dist/AgentSystemRef.js.map +1 -1
- package/dist/AgentTool.d.ts +16 -1
- package/dist/AgentTool.d.ts.map +1 -1
- package/dist/AgentTool.js.map +1 -1
- package/dist/index.d.ts +10 -7
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +9 -6
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/dist/AgentFeature.d.ts +0 -177
- package/dist/AgentFeature.d.ts.map +0 -1
- package/dist/AgentFeature.js +0 -2
- package/dist/AgentFeature.js.map +0 -1
- package/dist/AgentFeatureAction.d.ts.map +0 -1
- package/dist/AgentFeatureAction.js +0 -2
- package/dist/AgentFeatureAction.js.map +0 -1
package/dist/Agent.js
CHANGED
|
@@ -1,55 +1,56 @@
|
|
|
1
|
+
import { agentConfig } from "./AgentConfig.js";
|
|
1
2
|
import { AgentBase, } from "./AgentBase.js";
|
|
2
|
-
import { agentEffort, agentKV, agentModel, agentPermissionMode, agentProvider, agentRunKV, agentServiceTier, withAgentKV, withAgentRunKV, } from "./AgentContexts.js";
|
|
3
|
+
import { agentDatabase, agentEffort, agentKV, agentModel, agentPermissionMode, agentProvider, agentRunKV, agentServiceTier, withAgentKV, withAgentRunKV, } from "./AgentContexts.js";
|
|
3
4
|
/**
|
|
4
|
-
* A thin wrapper around `AgentBase` that assembles its behavior from
|
|
5
|
+
* A thin wrapper around `AgentBase` that assembles its behavior from modules. Each module
|
|
5
6
|
* implements any subset of the agent hooks on its own; the agent merges them into the singular
|
|
6
7
|
* private hooks its internal base runs with.
|
|
7
8
|
*
|
|
8
|
-
*
|
|
9
|
-
*
|
|
10
|
-
* others, and lifecycle actions concatenate across
|
|
9
|
+
* Modules are independent. Observing hooks — events and lifecycle brackets — fan out to every
|
|
10
|
+
* module in array order with per-module isolation, so one throwing module never silences the
|
|
11
|
+
* others, and lifecycle actions concatenate across modules with a failing module losing only
|
|
11
12
|
* its own actions. Correctness hooks are loud instead: instructions and tools concatenate in
|
|
12
|
-
*
|
|
13
|
+
* module order — extending the base state, which `AgentBase` puts first — and a failure there
|
|
13
14
|
* fails the turn rather than running with a wrong configuration. For a model change, every
|
|
14
|
-
*
|
|
15
|
+
* module observes the change, the first returned handoff wins, and a module failure during an
|
|
15
16
|
* incompatible change rejects the switch so the history survives.
|
|
16
17
|
*/
|
|
17
18
|
export class Agent {
|
|
18
19
|
/** The session this agent is a facade over; every operation delegates straight to it. */
|
|
19
20
|
#base;
|
|
20
|
-
/** The
|
|
21
|
-
#
|
|
21
|
+
/** The modules whose hooks were merged into the base, kept in the order they were given. */
|
|
22
|
+
#modules;
|
|
22
23
|
/**
|
|
23
|
-
* A new agent over a fresh identity, with its
|
|
24
|
+
* A new agent over a fresh identity, with its modules' hooks merged into one set. Touches
|
|
24
25
|
* no storage.
|
|
25
26
|
*/
|
|
26
27
|
static async create(ctx, options) {
|
|
27
|
-
const {
|
|
28
|
-
return new Agent(await AgentBase.create(ctx, base),
|
|
28
|
+
const { modules, base } = split(options);
|
|
29
|
+
return new Agent(await AgentBase.create(ctx, base), modules);
|
|
29
30
|
}
|
|
30
31
|
/**
|
|
31
32
|
* An agent over an identity that may already have durable state, with that state's one
|
|
32
33
|
* externally meaningful fact — whether it has work left — read before it is handed back.
|
|
33
34
|
*/
|
|
34
35
|
static async load(ctx, options) {
|
|
35
|
-
const {
|
|
36
|
-
return new Agent(await AgentBase.load(ctx, base),
|
|
36
|
+
const { modules, base } = split(options);
|
|
37
|
+
return new Agent(await AgentBase.load(ctx, base), modules);
|
|
37
38
|
}
|
|
38
39
|
/**
|
|
39
40
|
* Load the agent and set it going again if it has work left, or answer with nothing when it
|
|
40
41
|
* has none — how an owner coming up carries on what an earlier process was in the middle of.
|
|
41
42
|
*/
|
|
42
43
|
static async loadActive(ctx, options) {
|
|
43
|
-
const {
|
|
44
|
+
const { modules, base } = split(options);
|
|
44
45
|
const loaded = await AgentBase.loadActive(ctx, base);
|
|
45
|
-
return loaded === undefined ? undefined : new Agent(loaded,
|
|
46
|
+
return loaded === undefined ? undefined : new Agent(loaded, modules);
|
|
46
47
|
}
|
|
47
48
|
/**
|
|
48
49
|
* Wrap an already-built base. Private, because an agent is made by `create` or by `load`,
|
|
49
50
|
* and which of the two the caller means is worth saying.
|
|
50
51
|
*/
|
|
51
|
-
constructor(base,
|
|
52
|
-
this.#
|
|
52
|
+
constructor(base, modules) {
|
|
53
|
+
this.#modules = modules;
|
|
53
54
|
this.#base = base;
|
|
54
55
|
}
|
|
55
56
|
/** The stable session identity this agent was created with. */
|
|
@@ -61,16 +62,16 @@ export class Agent {
|
|
|
61
62
|
return this.#base.active;
|
|
62
63
|
}
|
|
63
64
|
/**
|
|
64
|
-
* The
|
|
65
|
+
* The module this agent runs under `name`, when it has one. An individual module holds the
|
|
65
66
|
* state of the single agent it was built for, so this is how that agent's owner reaches what
|
|
66
|
-
* belongs to it — a goal to pause, for instance. A shared
|
|
67
|
+
* belongs to it — a goal to pause, for instance. A shared module is answered here too, but
|
|
67
68
|
* it is the collection's instance, serving every agent at once.
|
|
68
69
|
*/
|
|
69
|
-
|
|
70
|
-
return this.#
|
|
70
|
+
module(name) {
|
|
71
|
+
return this.#modules.find((module) => module.name === name);
|
|
71
72
|
}
|
|
72
73
|
/**
|
|
73
|
-
* The base's mutable instructions and tools, which every inference reads and every
|
|
74
|
+
* The base's mutable instructions and tools, which every inference reads and every module's
|
|
74
75
|
* own contribution extends.
|
|
75
76
|
*/
|
|
76
77
|
get state() {
|
|
@@ -78,11 +79,15 @@ export class Agent {
|
|
|
78
79
|
}
|
|
79
80
|
/** Queue a user message that injects as soon as the current response and tool batch finish. */
|
|
80
81
|
async steer(ctx, message, options) {
|
|
81
|
-
await this.#base.steer(ctx, message, options);
|
|
82
|
+
return await this.#base.steer(ctx, message, options);
|
|
82
83
|
}
|
|
83
84
|
/** Queue a user message that injects only when the agent would otherwise stop. */
|
|
84
85
|
async send(ctx, message, options) {
|
|
85
|
-
await this.#base.send(ctx, message, options);
|
|
86
|
+
return await this.#base.send(ctx, message, options);
|
|
87
|
+
}
|
|
88
|
+
/** Shallow-merge fields into this agent's immutable metadata. */
|
|
89
|
+
async updateMetadata(ctx, update) {
|
|
90
|
+
await this.#base.updateMetadata(ctx, update);
|
|
86
91
|
}
|
|
87
92
|
/** Start the loop without a new message, continuing a turn an earlier run left unfinished. */
|
|
88
93
|
start() {
|
|
@@ -113,75 +118,75 @@ export class Agent {
|
|
|
113
118
|
}
|
|
114
119
|
}
|
|
115
120
|
/**
|
|
116
|
-
* Merge every
|
|
117
|
-
* when at least one
|
|
121
|
+
* Merge every module's hook implementations into one `AgentBaseHooks`. A hook is provided only
|
|
122
|
+
* when at least one module implements it, so the base's own behavior — the mutable state alone
|
|
118
123
|
* for instructions and tools — stays in effect otherwise.
|
|
119
124
|
*/
|
|
120
125
|
/**
|
|
121
|
-
* Separate the
|
|
126
|
+
* Separate the modules from the options the base is built with, and merge their hooks into the
|
|
122
127
|
* one set the base observes the run through. Both factories need exactly this, and the merge has
|
|
123
128
|
* to happen before the base exists.
|
|
124
129
|
*/
|
|
125
130
|
function split(options) {
|
|
126
|
-
const {
|
|
127
|
-
const resolved =
|
|
131
|
+
const { modules, sharedKV, ...rest } = options;
|
|
132
|
+
const resolved = modules ?? [];
|
|
128
133
|
return {
|
|
129
|
-
|
|
130
|
-
base: { ...rest, hooks:
|
|
134
|
+
modules: resolved,
|
|
135
|
+
base: { ...rest, hooks: mergeModules(resolved, options, sharedKV) },
|
|
131
136
|
};
|
|
132
137
|
}
|
|
133
|
-
function
|
|
134
|
-
/** What one
|
|
135
|
-
const scopeOf = (ctx,
|
|
136
|
-
const withInstructions =
|
|
137
|
-
const withTools =
|
|
138
|
-
const withBeforeToolCall =
|
|
139
|
-
const withModelChanged =
|
|
140
|
-
const withEvents =
|
|
141
|
-
// Observing hooks fan out with per-
|
|
142
|
-
// prevent the
|
|
138
|
+
function mergeModules(modules, options, sharedKV) {
|
|
139
|
+
/** What one module's hook is handed alongside the context, for this call. */
|
|
140
|
+
const scopeOf = (ctx, module) => moduleScope(ctx, module, options, sharedKV);
|
|
141
|
+
const withInstructions = modules.filter((module) => module.instructions !== undefined);
|
|
142
|
+
const withTools = modules.filter((module) => module.tools !== undefined);
|
|
143
|
+
const withBeforeToolCall = modules.filter((module) => module.beforeToolCall !== undefined);
|
|
144
|
+
const withModelChanged = modules.filter((module) => module.modelChanged !== undefined);
|
|
145
|
+
const withEvents = modules.filter((module) => module.onEvent !== undefined);
|
|
146
|
+
// Observing hooks fan out with per-module isolation: one throwing module must never
|
|
147
|
+
// prevent the modules after it from observing.
|
|
143
148
|
const fanOut = (pick) => {
|
|
144
|
-
const implemented =
|
|
149
|
+
const implemented = modules.filter((module) => pick(module) !== undefined);
|
|
145
150
|
if (implemented.length === 0)
|
|
146
151
|
return undefined;
|
|
147
152
|
return async (ctx, ...args) => {
|
|
148
|
-
for (const
|
|
153
|
+
for (const module of implemented) {
|
|
149
154
|
try {
|
|
150
|
-
await pick(
|
|
155
|
+
await pick(module)?.(moduleCtx(ctx, module), scopeOf(ctx, module), ...args);
|
|
151
156
|
}
|
|
152
157
|
catch {
|
|
153
|
-
//
|
|
158
|
+
// Modules observe independently; one failing never silences the rest.
|
|
154
159
|
}
|
|
155
160
|
}
|
|
156
161
|
};
|
|
157
162
|
};
|
|
158
163
|
// Transactional hooks run in order inside one transaction, and a failure propagates: the
|
|
159
|
-
//
|
|
164
|
+
// modules here are writing alongside the fact being committed, so containing one module's
|
|
160
165
|
// failure would commit a conclusion the rest of the transaction contradicts.
|
|
161
166
|
const chain = (pick) => {
|
|
162
|
-
const implemented =
|
|
167
|
+
const implemented = modules.filter((module) => pick(module) !== undefined);
|
|
163
168
|
if (implemented.length === 0)
|
|
164
169
|
return undefined;
|
|
165
170
|
return async (ctx, ...args) => {
|
|
166
|
-
for (const
|
|
167
|
-
await pick(
|
|
171
|
+
for (const module of implemented) {
|
|
172
|
+
await pick(module)?.(moduleCtx(ctx, module), scopeOf(ctx, module), ...args);
|
|
168
173
|
}
|
|
169
174
|
};
|
|
170
175
|
};
|
|
171
|
-
// Action hooks concatenate what every
|
|
176
|
+
// Action hooks concatenate what every module asks for; a failing module loses only its
|
|
172
177
|
// own actions.
|
|
173
178
|
const collect = (pick) => {
|
|
174
|
-
const implemented =
|
|
179
|
+
const implemented = modules.filter((module) => pick(module) !== undefined);
|
|
175
180
|
if (implemented.length === 0)
|
|
176
181
|
return undefined;
|
|
177
182
|
return async (ctx, ...args) => {
|
|
178
183
|
const actions = [];
|
|
179
|
-
for (const
|
|
184
|
+
for (const module of implemented) {
|
|
180
185
|
try {
|
|
181
|
-
actions.push(...((await pick(
|
|
186
|
+
actions.push(...((await pick(module)?.(moduleCtx(ctx, module), scopeOf(ctx, module), ...args)) ?? []));
|
|
182
187
|
}
|
|
183
188
|
catch {
|
|
184
|
-
//
|
|
189
|
+
// Modules act independently; one failing never discards the rest.
|
|
185
190
|
}
|
|
186
191
|
}
|
|
187
192
|
return actions;
|
|
@@ -191,27 +196,27 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
191
196
|
...(withEvents.length === 0
|
|
192
197
|
? {}
|
|
193
198
|
: {
|
|
194
|
-
onEvent: ((ctx, event) => {
|
|
195
|
-
for (const
|
|
199
|
+
onEvent: (async (ctx, event) => {
|
|
200
|
+
for (const module of withEvents) {
|
|
196
201
|
try {
|
|
197
|
-
|
|
202
|
+
await module.onEvent?.(moduleCtx(ctx, module), scopeOf(ctx, module), event);
|
|
198
203
|
}
|
|
199
204
|
catch {
|
|
200
|
-
//
|
|
205
|
+
// Modules observe independently; one failing never silences
|
|
201
206
|
// the rest.
|
|
202
207
|
}
|
|
203
208
|
}
|
|
204
209
|
}),
|
|
205
210
|
}),
|
|
206
|
-
...spread("onEventTransact", chain((
|
|
211
|
+
...spread("onEventTransact", chain((module) => module.onEventTransact)),
|
|
207
212
|
...(withInstructions.length === 0
|
|
208
213
|
? {}
|
|
209
214
|
: {
|
|
210
|
-
// Correctness hook: a failing
|
|
215
|
+
// Correctness hook: a failing module propagates and fails the turn.
|
|
211
216
|
instructions: async (ctx) => {
|
|
212
217
|
const texts = [];
|
|
213
|
-
for (const
|
|
214
|
-
texts.push((await
|
|
218
|
+
for (const module of withInstructions) {
|
|
219
|
+
texts.push((await module.instructions?.(moduleCtx(ctx, module), scopeOf(ctx, module))) ?? "");
|
|
215
220
|
}
|
|
216
221
|
return texts.filter((text) => text.length > 0).join("\n\n");
|
|
217
222
|
},
|
|
@@ -219,34 +224,34 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
219
224
|
...(withTools.length === 0
|
|
220
225
|
? {}
|
|
221
226
|
: {
|
|
222
|
-
// Correctness hook: a failing
|
|
227
|
+
// Correctness hook: a failing module propagates and fails the turn; the
|
|
223
228
|
// base validates the merged list against duplicate names.
|
|
224
229
|
tools: async (ctx) => {
|
|
225
230
|
const tools = [];
|
|
226
|
-
for (const
|
|
227
|
-
tools.push(...((await
|
|
231
|
+
for (const module of withTools) {
|
|
232
|
+
tools.push(...((await module.tools?.(moduleCtx(ctx, module), scopeOf(ctx, module))) ?? []));
|
|
228
233
|
}
|
|
229
234
|
return tools;
|
|
230
235
|
},
|
|
231
236
|
}),
|
|
232
|
-
...spread("beforeToolCallTransact", chain((
|
|
237
|
+
...spread("beforeToolCallTransact", chain((module) => module.beforeToolCallTransact)),
|
|
233
238
|
...(withBeforeToolCall.length === 0
|
|
234
239
|
? {}
|
|
235
240
|
: {
|
|
236
|
-
// Correctness hook:
|
|
241
|
+
// Correctness hook: modules decide in array order, each seeing the call as the
|
|
237
242
|
// one before it left it, and a failure propagates to the base so it becomes
|
|
238
243
|
// this call's error result.
|
|
239
244
|
beforeToolCall: async (ctx, call) => {
|
|
240
245
|
let current = call;
|
|
241
|
-
// Nothing carries a mode into the next
|
|
242
|
-
// last
|
|
246
|
+
// Nothing carries a mode into the next module's view of the call, so the
|
|
247
|
+
// last module to name one is the one that meant it about the run itself.
|
|
243
248
|
let permissionMode;
|
|
244
|
-
for (const
|
|
245
|
-
const decision = await
|
|
249
|
+
for (const module of withBeforeToolCall) {
|
|
250
|
+
const decision = await module.beforeToolCall?.(moduleCtx(ctx, module), scopeOf(ctx, module), current);
|
|
246
251
|
if (decision === undefined)
|
|
247
252
|
continue;
|
|
248
253
|
// An answer settles the call: there is no longer a run for the
|
|
249
|
-
//
|
|
254
|
+
// modules after it to have an opinion about.
|
|
250
255
|
if (decision.type === "answer")
|
|
251
256
|
return decision;
|
|
252
257
|
current = {
|
|
@@ -271,8 +276,8 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
271
276
|
};
|
|
272
277
|
},
|
|
273
278
|
}),
|
|
274
|
-
...spread("afterToolCall", fanOut((
|
|
275
|
-
...spread("afterToolCallTransact", chain((
|
|
279
|
+
...spread("afterToolCall", fanOut((module) => module.afterToolCall)),
|
|
280
|
+
...spread("afterToolCallTransact", chain((module) => module.afterToolCallTransact)),
|
|
276
281
|
...(withModelChanged.length === 0
|
|
277
282
|
? {}
|
|
278
283
|
: {
|
|
@@ -280,11 +285,11 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
280
285
|
let injected;
|
|
281
286
|
let failed = false;
|
|
282
287
|
let failure;
|
|
283
|
-
// Every
|
|
288
|
+
// Every module observes the change even when an earlier one fails;
|
|
284
289
|
// the first returned handoff wins.
|
|
285
|
-
for (const
|
|
290
|
+
for (const module of withModelChanged) {
|
|
286
291
|
try {
|
|
287
|
-
const message = await
|
|
292
|
+
const message = await module.modelChanged?.(moduleCtx(ctx, module), scopeOf(ctx, module), change);
|
|
288
293
|
injected ??= message;
|
|
289
294
|
}
|
|
290
295
|
catch (error) {
|
|
@@ -294,62 +299,67 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
294
299
|
}
|
|
295
300
|
}
|
|
296
301
|
}
|
|
297
|
-
// A failing
|
|
302
|
+
// A failing module during an incompatible change rejects the switch,
|
|
298
303
|
// preserving the history; on a compatible change it merely observed.
|
|
299
304
|
if (failed && change.wasReset)
|
|
300
305
|
throw failure;
|
|
301
306
|
return injected;
|
|
302
307
|
},
|
|
303
308
|
}),
|
|
304
|
-
...spread("messageAcceptedTransact", chain((
|
|
305
|
-
...spread("messageAccepted", fanOut((
|
|
306
|
-
...spread("permissionModeChangedTransact", chain((
|
|
307
|
-
...spread("permissionModeChanged", fanOut((
|
|
308
|
-
...spread("
|
|
309
|
-
...spread("
|
|
310
|
-
...spread("
|
|
311
|
-
...spread("
|
|
312
|
-
...spread("
|
|
313
|
-
...spread("
|
|
314
|
-
...spread("
|
|
315
|
-
...spread("
|
|
316
|
-
...spread("
|
|
317
|
-
...spread("
|
|
318
|
-
...spread("
|
|
319
|
-
...spread("
|
|
320
|
-
...spread("
|
|
321
|
-
...spread("
|
|
309
|
+
...spread("messageAcceptedTransact", chain((module) => module.messageAcceptedTransact)),
|
|
310
|
+
...spread("messageAccepted", fanOut((module) => module.messageAccepted)),
|
|
311
|
+
...spread("permissionModeChangedTransact", chain((module) => module.permissionModeChangedTransact)),
|
|
312
|
+
...spread("permissionModeChanged", fanOut((module) => module.permissionModeChanged)),
|
|
313
|
+
...spread("metadataChangedTransact", chain((module) => module.metadataChangedTransact)),
|
|
314
|
+
...spread("metadataChanged", fanOut((module) => module.metadataChanged)),
|
|
315
|
+
...spread("beforeAgentLoopTransact", chain((module) => module.beforeAgentLoopTransact)),
|
|
316
|
+
...spread("beforeAgentLoop", fanOut((module) => module.beforeAgentLoop)),
|
|
317
|
+
...spread("beforeTurnTransact", chain((module) => module.beforeTurnTransact)),
|
|
318
|
+
...spread("beforeTurn", collect((module) => module.beforeTurn)),
|
|
319
|
+
...spread("beforeInferenceTransact", chain((module) => module.beforeInferenceTransact)),
|
|
320
|
+
...spread("beforeInference", fanOut((module) => module.beforeInference)),
|
|
321
|
+
...spread("afterInferenceTransact", chain((module) => module.afterInferenceTransact)),
|
|
322
|
+
...spread("afterInference", fanOut((module) => module.afterInference)),
|
|
323
|
+
...spread("afterTurnTransact", chain((module) => module.afterTurnTransact)),
|
|
324
|
+
...spread("afterTurn", collect((module) => module.afterTurn)),
|
|
325
|
+
...spread("afterAgentLoopTransact", chain((module) => module.afterAgentLoopTransact)),
|
|
326
|
+
...spread("afterAgentLoop", collect((module) => module.afterAgentLoop)),
|
|
327
|
+
...spread("afterAgentSettledTransact", chain((module) => module.afterAgentSettledTransact)),
|
|
328
|
+
...spread("afterAgentSettled", fanOut((module) => module.afterAgentSettled)),
|
|
322
329
|
};
|
|
323
330
|
}
|
|
324
331
|
/**
|
|
325
|
-
* The context a
|
|
326
|
-
* to the
|
|
332
|
+
* The context a module's hooks run on: the agent's context with both key-value stores narrowed
|
|
333
|
+
* to the module's own name, so modules never see each other's persisted entries — and neither
|
|
327
334
|
* does a tool one of them runs.
|
|
328
335
|
*/
|
|
329
|
-
function
|
|
336
|
+
function moduleCtx(ctx, module) {
|
|
330
337
|
const kv = agentKV(ctx);
|
|
331
338
|
const runKV = agentRunKV(ctx);
|
|
332
|
-
const scoped = kv === undefined ? ctx : withAgentKV(ctx, kv.scoped("
|
|
339
|
+
const scoped = kv === undefined ? ctx : withAgentKV(ctx, kv.scoped("module", module.name));
|
|
333
340
|
return runKV === undefined
|
|
334
341
|
? scoped
|
|
335
|
-
: withAgentRunKV(scoped, runKV.scoped("
|
|
342
|
+
: withAgentRunKV(scoped, runKV.scoped("module", module.name));
|
|
336
343
|
}
|
|
337
344
|
/**
|
|
338
|
-
* What a
|
|
345
|
+
* What a module's hook is handed alongside the context: the agent it is serving, and its own
|
|
339
346
|
* scope of each of the three stores. The selection comes from the context the agent derived for
|
|
340
347
|
* this call, so a hook always sees the model, effort, and tier the work is actually running on
|
|
341
348
|
* rather than the ones the agent was built with.
|
|
342
349
|
*/
|
|
343
|
-
function
|
|
350
|
+
function moduleScope(ctx, module, options, sharedKV) {
|
|
344
351
|
const kv = agentKV(ctx);
|
|
345
352
|
const runKV = agentRunKV(ctx);
|
|
346
|
-
|
|
347
|
-
|
|
353
|
+
const database = agentDatabase(ctx);
|
|
354
|
+
if (kv === undefined || runKV === undefined || database === undefined) {
|
|
355
|
+
throw new Error(`The module "${module.name}" was called without its agent storage context.`);
|
|
348
356
|
}
|
|
349
357
|
const provider = agentProvider(ctx) ?? options.provider;
|
|
350
358
|
return {
|
|
359
|
+
database: database,
|
|
351
360
|
agent: {
|
|
352
361
|
id: options.id,
|
|
362
|
+
metadata: agentConfig(ctx)?.metadata,
|
|
353
363
|
provider,
|
|
354
364
|
providerKind: options.providers.typeOf(provider) ?? undefined,
|
|
355
365
|
model: agentModel(ctx) ?? options.model,
|
|
@@ -357,14 +367,14 @@ function featureScope(ctx, feature, options, sharedKV) {
|
|
|
357
367
|
tier: agentServiceTier(ctx) ?? options.serviceTier,
|
|
358
368
|
permissionMode: agentPermissionMode(ctx),
|
|
359
369
|
},
|
|
360
|
-
kv: kv.scoped("
|
|
361
|
-
sharedKV: sharedKV.scoped(
|
|
362
|
-
runKV: runKV.scoped("
|
|
370
|
+
kv: kv.scoped("module", module.name),
|
|
371
|
+
sharedKV: sharedKV.scoped(module.name),
|
|
372
|
+
runKV: runKV.scoped("module", module.name),
|
|
363
373
|
};
|
|
364
374
|
}
|
|
365
375
|
/**
|
|
366
376
|
* One optional entry to spread into the merged hooks: the key when a merged implementation
|
|
367
|
-
* exists, and nothing at all when no
|
|
377
|
+
* exists, and nothing at all when no module implemented it, so the base keeps its own behavior.
|
|
368
378
|
*/
|
|
369
379
|
function spread(key, value) {
|
|
370
380
|
return value === undefined ? {} : { [key]: value };
|
package/dist/Agent.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Agent.js","sourceRoot":"","sources":["../sources/Agent.ts"],"names":[],"mappings":"AAGA,OAAO,EACH,SAAS,GAIZ,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACH,WAAW,EACX,OAAO,EACP,UAAU,EACV,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,gBAAgB,EAChB,WAAW,EACX,cAAc,GACjB,MAAM,oBAAoB,CAAC;AA0B5B;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,KAAK;IACd,yFAAyF;IAChF,KAAK,CAAY;IAC1B,6FAA6F;IACpF,SAAS,CAAgC;IAElD;;;OAGG;IACH,MAAM,CAAC,KAAK,CAAC,MAAM,CACf,GAAY,EACZ,OAA2B;QAE3B,MAAM,EAAE,QAAQ,EAAE,IAAI,E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;YACd,QAAQ,EAAE,WAAW,CAAC,GAAG,CAAC,EAAE,QAAQ;YACpC,QAAQ;YACR,YAAY,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,SAAS;YAC7D,KAAK,EAAE,UAAU,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,KAAK;YACvC,MAAM,EAAE,WAAW,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,MAAM;YAC1C,IAAI,EAAE,gBAAgB,CAAC,GAAG,CAAC,IAAI,OAAO,CAAC,WAAW;YAClD,cAAc,EAAE,mBAAmB,CAAC,GAAG,CAAC;SAC3C;QACD,EAAE,EAAE,EAAE,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;QACpC,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC;QACtC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,IAAI,CAAC;KAC7C,CAAC;AACN,CAAC;AAED;;;GAGG;AACH,SAAS,MAAM,CACX,GAAQ,EACR,KAAwB;IAExB,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAE,EAAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAA4B,CAAC;AAClF,CAAC"}
|
package/dist/AgentBase.d.ts
CHANGED
|
@@ -2,6 +2,8 @@ import type { SessionReasoningEffort, SessionServiceTier, SessionUserMessage } f
|
|
|
2
2
|
import { type Context } from "@steve.kite/stdlib";
|
|
3
3
|
import type { AgentBaseHooks } from "./AgentBaseHooks.js";
|
|
4
4
|
import type { AgentPersistence } from "./AgentPersistence.js";
|
|
5
|
+
import { type AgentMessageMetadata, type AgentMetadata } from "./AgentMetadata.js";
|
|
6
|
+
import type { AgentMessageAcceptance } from "./AgentMessageAcceptance.js";
|
|
5
7
|
import { type AgentPermissionMode } from "./AgentPermissionMode.js";
|
|
6
8
|
import type { AgentBaseState } from "./AgentBaseState.js";
|
|
7
9
|
import { AgentProviders } from "./AgentProviders.js";
|
|
@@ -13,6 +15,10 @@ export type AgentBaseQueueMode = "one-at-a-time" | "all";
|
|
|
13
15
|
* though relying on that default is discouraged — prefer sending settings with the message.
|
|
14
16
|
*/
|
|
15
17
|
export interface AgentBaseMessageOptions {
|
|
18
|
+
/** Stable cuid2 identity for idempotent delivery; generated when omitted. */
|
|
19
|
+
readonly id?: string;
|
|
20
|
+
/** Immutable module-owned metadata that travels with this one message. */
|
|
21
|
+
readonly metadata?: AgentMessageMetadata;
|
|
16
22
|
/** The registry ID of the provider to switch to. */
|
|
17
23
|
readonly provider?: string;
|
|
18
24
|
/** The model to switch to; an incompatible one resets the conversation. */
|
|
@@ -31,7 +37,9 @@ export interface AgentBaseMessageOptions {
|
|
|
31
37
|
/**
|
|
32
38
|
* Whether an operation resolves once the agent has taken the request on, or once the agent has
|
|
33
39
|
* carried it out. Every operation that asks something of an agent accepts this, and every one of
|
|
34
|
-
* them
|
|
40
|
+
* most of them default to the first: asking is the operation, and waiting is opt-in. Message
|
|
41
|
+
* acceptance defaults to the durable result except inside the target's own loop, where waiting
|
|
42
|
+
* would deadlock.
|
|
35
43
|
*
|
|
36
44
|
* The reason is re-entrancy. An agent does its work in one run loop, and while a hook or a tool
|
|
37
45
|
* runs, that loop is waiting for it — so code in that position that waits for its own agent waits
|
|
@@ -42,8 +50,9 @@ export interface AgentBaseMessageOptions {
|
|
|
42
50
|
*/
|
|
43
51
|
export interface AgentBaseAwaitOptions {
|
|
44
52
|
/**
|
|
45
|
-
* Wait for the operation to finish rather than for it to be accepted.
|
|
46
|
-
* agent's own
|
|
53
|
+
* Wait for the operation to finish rather than for it to be accepted. Message delivery uses
|
|
54
|
+
* this to request the durable created/existing result. Refused from inside the agent's own
|
|
55
|
+
* run loop.
|
|
47
56
|
*/
|
|
48
57
|
readonly await?: boolean;
|
|
49
58
|
}
|
|
@@ -57,7 +66,7 @@ export interface AgentBaseOptions {
|
|
|
57
66
|
readonly provider: string;
|
|
58
67
|
/** The append-only store the conversation, the queues, and the settings live in. */
|
|
59
68
|
readonly persistence: AgentPersistence;
|
|
60
|
-
/** Observers and correctness hooks the run is assembled from; `Agent` merges
|
|
69
|
+
/** Observers and correctness hooks the run is assembled from; `Agent` merges modules here. */
|
|
61
70
|
readonly hooks?: AgentBaseHooks;
|
|
62
71
|
/** Copied into the agent's own mutable `state`. */
|
|
63
72
|
readonly initialState?: Partial<AgentBaseState>;
|
|
@@ -160,7 +169,7 @@ export interface AgentBaseOptions {
|
|
|
160
169
|
* running under rather than being told.
|
|
161
170
|
*
|
|
162
171
|
* The loop enforces nothing. It has no idea what any particular tool touches, and a runtime that
|
|
163
|
-
* guessed would be wrong about tools it has never seen. Enforcement belongs to the
|
|
172
|
+
* guessed would be wrong about tools it has never seen. Enforcement belongs to the modules and
|
|
164
173
|
* tools that do know; the loop's whole part is to carry the mode, make its changes durable, and
|
|
165
174
|
* report them.
|
|
166
175
|
*
|
|
@@ -286,19 +295,24 @@ export declare class AgentBase {
|
|
|
286
295
|
/**
|
|
287
296
|
* Queue a user message that injects as soon as the current assistant response and its tool
|
|
288
297
|
* batch finish; steering always takes precedence over sent messages. Returns once the message
|
|
289
|
-
* has been handed to the agent
|
|
290
|
-
*
|
|
291
|
-
*
|
|
298
|
+
* has been handed to the agent and returns its acceptance identity. Outside the target's own
|
|
299
|
+
* loop it waits for the durable created/existing result by default; a failed write rejects and
|
|
300
|
+
* keeps the message out of the conversation entirely.
|
|
292
301
|
*/
|
|
293
|
-
steer(ctx: Context, message: SessionUserMessage, options?: AgentBaseMessageOptions & AgentBaseAwaitOptions): Promise<
|
|
302
|
+
steer(ctx: Context, message: SessionUserMessage, options?: AgentBaseMessageOptions & AgentBaseAwaitOptions): Promise<AgentMessageAcceptance>;
|
|
294
303
|
/**
|
|
295
304
|
* Queue a user message that waits until the agent would otherwise stop — no tool calls or
|
|
296
305
|
* steering remain — before injecting. Returns once the message has been handed to the agent,
|
|
297
|
-
*
|
|
298
|
-
*
|
|
299
|
-
* of the conversation entirely.
|
|
306
|
+
* without waiting for the turn that answers it and returns its acceptance identity. Outside
|
|
307
|
+
* the target's own loop it waits for the durable created/existing result by default; a failed
|
|
308
|
+
* write rejects and keeps the message out of the conversation entirely.
|
|
300
309
|
*/
|
|
301
|
-
send(ctx: Context, message: SessionUserMessage, options?: AgentBaseMessageOptions & AgentBaseAwaitOptions): Promise<
|
|
310
|
+
send(ctx: Context, message: SessionUserMessage, options?: AgentBaseMessageOptions & AgentBaseAwaitOptions): Promise<AgentMessageAcceptance>;
|
|
311
|
+
/**
|
|
312
|
+
* Shallow-merge fields into this agent's immutable metadata. The complete AgentConfig and
|
|
313
|
+
* transactional hook writes commit together; observing hooks run only after that commit.
|
|
314
|
+
*/
|
|
315
|
+
updateMetadata(ctx: Context, update: AgentMetadata): Promise<void>;
|
|
302
316
|
/**
|
|
303
317
|
* Start the loop without a new message: load the durable state and, if a turn was cut off —
|
|
304
318
|
* queued messages, a dispatched tool batch without results, or an unanswered user or tool
|
package/dist/AgentBase.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentBase.d.ts","sourceRoot":"","sources":["../sources/AgentBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAMR,sBAAsB,EACtB,kBAAkB,EAKlB,kBAAkB,EACrB,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"AgentBase.d.ts","sourceRoot":"","sources":["../sources/AgentBase.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAMR,sBAAsB,EACtB,kBAAkB,EAKlB,kBAAkB,EACrB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EAOH,KAAK,OAAO,EACf,MAAM,oBAAoB,CAAC;AAsB5B,OAAO,KAAK,EAER,cAAc,EAQjB,MAAM,qBAAqB,CAAC;AAC7B,OAAO,KAAK,EAAE,gBAAgB,EAAe,MAAM,uBAAuB,CAAC;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