@slopus/happy-agent-base 0.0.6 → 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 +49 -11
- package/dist/Agent.d.ts +24 -22
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +113 -111
- package/dist/Agent.js.map +1 -1
- package/dist/AgentBase.d.ts +18 -14
- package/dist/AgentBase.d.ts.map +1 -1
- package/dist/AgentBase.js +476 -122
- package/dist/AgentBase.js.map +1 -1
- package/dist/AgentBaseHooks.d.ts +41 -28
- 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 +9 -9
- package/dist/AgentConfig.d.ts.map +1 -1
- package/dist/AgentConfig.js +8 -8
- 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 +3 -3
- package/dist/AgentMetadata.js +3 -3
- 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} +2 -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 +7 -4
- 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 +12 -9
- package/dist/AgentRef.d.ts.map +1 -1
- package/dist/AgentRef.js +8 -8
- 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 +10 -7
- 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 +17 -14
- package/dist/AgentSystemLocal.d.ts.map +1 -1
- package/dist/AgentSystemLocal.js +120 -29
- package/dist/AgentSystemLocal.js.map +1 -1
- package/dist/AgentSystemRef.d.ts +9 -7
- package/dist/AgentSystemRef.d.ts.map +1 -1
- package/dist/AgentSystemRef.js +17 -4
- 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 +8 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/package.json +4 -3
- package/dist/AgentFeature.d.ts +0 -184
- 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,56 +1,56 @@
|
|
|
1
1
|
import { agentConfig } from "./AgentConfig.js";
|
|
2
2
|
import { AgentBase, } from "./AgentBase.js";
|
|
3
|
-
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";
|
|
4
4
|
/**
|
|
5
|
-
* A thin wrapper around `AgentBase` that assembles its behavior from
|
|
5
|
+
* A thin wrapper around `AgentBase` that assembles its behavior from modules. Each module
|
|
6
6
|
* implements any subset of the agent hooks on its own; the agent merges them into the singular
|
|
7
7
|
* private hooks its internal base runs with.
|
|
8
8
|
*
|
|
9
|
-
*
|
|
10
|
-
*
|
|
11
|
-
* 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
|
|
12
12
|
* its own actions. Correctness hooks are loud instead: instructions and tools concatenate in
|
|
13
|
-
*
|
|
13
|
+
* module order — extending the base state, which `AgentBase` puts first — and a failure there
|
|
14
14
|
* fails the turn rather than running with a wrong configuration. For a model change, every
|
|
15
|
-
*
|
|
15
|
+
* module observes the change, the first returned handoff wins, and a module failure during an
|
|
16
16
|
* incompatible change rejects the switch so the history survives.
|
|
17
17
|
*/
|
|
18
18
|
export class Agent {
|
|
19
19
|
/** The session this agent is a facade over; every operation delegates straight to it. */
|
|
20
20
|
#base;
|
|
21
|
-
/** The
|
|
22
|
-
#
|
|
21
|
+
/** The modules whose hooks were merged into the base, kept in the order they were given. */
|
|
22
|
+
#modules;
|
|
23
23
|
/**
|
|
24
|
-
* 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
|
|
25
25
|
* no storage.
|
|
26
26
|
*/
|
|
27
27
|
static async create(ctx, options) {
|
|
28
|
-
const {
|
|
29
|
-
return new Agent(await AgentBase.create(ctx, base),
|
|
28
|
+
const { modules, base } = split(options);
|
|
29
|
+
return new Agent(await AgentBase.create(ctx, base), modules);
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* An agent over an identity that may already have durable state, with that state's one
|
|
33
33
|
* externally meaningful fact — whether it has work left — read before it is handed back.
|
|
34
34
|
*/
|
|
35
35
|
static async load(ctx, options) {
|
|
36
|
-
const {
|
|
37
|
-
return new Agent(await AgentBase.load(ctx, base),
|
|
36
|
+
const { modules, base } = split(options);
|
|
37
|
+
return new Agent(await AgentBase.load(ctx, base), modules);
|
|
38
38
|
}
|
|
39
39
|
/**
|
|
40
40
|
* Load the agent and set it going again if it has work left, or answer with nothing when it
|
|
41
41
|
* has none — how an owner coming up carries on what an earlier process was in the middle of.
|
|
42
42
|
*/
|
|
43
43
|
static async loadActive(ctx, options) {
|
|
44
|
-
const {
|
|
44
|
+
const { modules, base } = split(options);
|
|
45
45
|
const loaded = await AgentBase.loadActive(ctx, base);
|
|
46
|
-
return loaded === undefined ? undefined : new Agent(loaded,
|
|
46
|
+
return loaded === undefined ? undefined : new Agent(loaded, modules);
|
|
47
47
|
}
|
|
48
48
|
/**
|
|
49
49
|
* Wrap an already-built base. Private, because an agent is made by `create` or by `load`,
|
|
50
50
|
* and which of the two the caller means is worth saying.
|
|
51
51
|
*/
|
|
52
|
-
constructor(base,
|
|
53
|
-
this.#
|
|
52
|
+
constructor(base, modules) {
|
|
53
|
+
this.#modules = modules;
|
|
54
54
|
this.#base = base;
|
|
55
55
|
}
|
|
56
56
|
/** The stable session identity this agent was created with. */
|
|
@@ -62,16 +62,16 @@ export class Agent {
|
|
|
62
62
|
return this.#base.active;
|
|
63
63
|
}
|
|
64
64
|
/**
|
|
65
|
-
* The
|
|
65
|
+
* The module this agent runs under `name`, when it has one. An individual module holds the
|
|
66
66
|
* state of the single agent it was built for, so this is how that agent's owner reaches what
|
|
67
|
-
* 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
|
|
68
68
|
* it is the collection's instance, serving every agent at once.
|
|
69
69
|
*/
|
|
70
|
-
|
|
71
|
-
return this.#
|
|
70
|
+
module(name) {
|
|
71
|
+
return this.#modules.find((module) => module.name === name);
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
|
-
* 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
|
|
75
75
|
* own contribution extends.
|
|
76
76
|
*/
|
|
77
77
|
get state() {
|
|
@@ -79,11 +79,11 @@ export class Agent {
|
|
|
79
79
|
}
|
|
80
80
|
/** Queue a user message that injects as soon as the current response and tool batch finish. */
|
|
81
81
|
async steer(ctx, message, options) {
|
|
82
|
-
await this.#base.steer(ctx, message, options);
|
|
82
|
+
return await this.#base.steer(ctx, message, options);
|
|
83
83
|
}
|
|
84
84
|
/** Queue a user message that injects only when the agent would otherwise stop. */
|
|
85
85
|
async send(ctx, message, options) {
|
|
86
|
-
await this.#base.send(ctx, message, options);
|
|
86
|
+
return await this.#base.send(ctx, message, options);
|
|
87
87
|
}
|
|
88
88
|
/** Shallow-merge fields into this agent's immutable metadata. */
|
|
89
89
|
async updateMetadata(ctx, update) {
|
|
@@ -118,75 +118,75 @@ export class Agent {
|
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
* Merge every
|
|
122
|
-
* 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
|
|
123
123
|
* for instructions and tools — stays in effect otherwise.
|
|
124
124
|
*/
|
|
125
125
|
/**
|
|
126
|
-
* Separate the
|
|
126
|
+
* Separate the modules from the options the base is built with, and merge their hooks into the
|
|
127
127
|
* one set the base observes the run through. Both factories need exactly this, and the merge has
|
|
128
128
|
* to happen before the base exists.
|
|
129
129
|
*/
|
|
130
130
|
function split(options) {
|
|
131
|
-
const {
|
|
132
|
-
const resolved =
|
|
131
|
+
const { modules, sharedKV, ...rest } = options;
|
|
132
|
+
const resolved = modules ?? [];
|
|
133
133
|
return {
|
|
134
|
-
|
|
135
|
-
base: { ...rest, hooks:
|
|
134
|
+
modules: resolved,
|
|
135
|
+
base: { ...rest, hooks: mergeModules(resolved, options, sharedKV) },
|
|
136
136
|
};
|
|
137
137
|
}
|
|
138
|
-
function
|
|
139
|
-
/** What one
|
|
140
|
-
const scopeOf = (ctx,
|
|
141
|
-
const withInstructions =
|
|
142
|
-
const withTools =
|
|
143
|
-
const withBeforeToolCall =
|
|
144
|
-
const withModelChanged =
|
|
145
|
-
const withEvents =
|
|
146
|
-
// Observing hooks fan out with per-
|
|
147
|
-
// 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.
|
|
148
148
|
const fanOut = (pick) => {
|
|
149
|
-
const implemented =
|
|
149
|
+
const implemented = modules.filter((module) => pick(module) !== undefined);
|
|
150
150
|
if (implemented.length === 0)
|
|
151
151
|
return undefined;
|
|
152
152
|
return async (ctx, ...args) => {
|
|
153
|
-
for (const
|
|
153
|
+
for (const module of implemented) {
|
|
154
154
|
try {
|
|
155
|
-
await pick(
|
|
155
|
+
await pick(module)?.(moduleCtx(ctx, module), scopeOf(ctx, module), ...args);
|
|
156
156
|
}
|
|
157
157
|
catch {
|
|
158
|
-
//
|
|
158
|
+
// Modules observe independently; one failing never silences the rest.
|
|
159
159
|
}
|
|
160
160
|
}
|
|
161
161
|
};
|
|
162
162
|
};
|
|
163
163
|
// Transactional hooks run in order inside one transaction, and a failure propagates: the
|
|
164
|
-
//
|
|
164
|
+
// modules here are writing alongside the fact being committed, so containing one module's
|
|
165
165
|
// failure would commit a conclusion the rest of the transaction contradicts.
|
|
166
166
|
const chain = (pick) => {
|
|
167
|
-
const implemented =
|
|
167
|
+
const implemented = modules.filter((module) => pick(module) !== undefined);
|
|
168
168
|
if (implemented.length === 0)
|
|
169
169
|
return undefined;
|
|
170
170
|
return async (ctx, ...args) => {
|
|
171
|
-
for (const
|
|
172
|
-
await pick(
|
|
171
|
+
for (const module of implemented) {
|
|
172
|
+
await pick(module)?.(moduleCtx(ctx, module), scopeOf(ctx, module), ...args);
|
|
173
173
|
}
|
|
174
174
|
};
|
|
175
175
|
};
|
|
176
|
-
// Action hooks concatenate what every
|
|
176
|
+
// Action hooks concatenate what every module asks for; a failing module loses only its
|
|
177
177
|
// own actions.
|
|
178
178
|
const collect = (pick) => {
|
|
179
|
-
const implemented =
|
|
179
|
+
const implemented = modules.filter((module) => pick(module) !== undefined);
|
|
180
180
|
if (implemented.length === 0)
|
|
181
181
|
return undefined;
|
|
182
182
|
return async (ctx, ...args) => {
|
|
183
183
|
const actions = [];
|
|
184
|
-
for (const
|
|
184
|
+
for (const module of implemented) {
|
|
185
185
|
try {
|
|
186
|
-
actions.push(...((await pick(
|
|
186
|
+
actions.push(...((await pick(module)?.(moduleCtx(ctx, module), scopeOf(ctx, module), ...args)) ?? []));
|
|
187
187
|
}
|
|
188
188
|
catch {
|
|
189
|
-
//
|
|
189
|
+
// Modules act independently; one failing never discards the rest.
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
192
|
return actions;
|
|
@@ -197,26 +197,26 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
197
197
|
? {}
|
|
198
198
|
: {
|
|
199
199
|
onEvent: (async (ctx, event) => {
|
|
200
|
-
for (const
|
|
200
|
+
for (const module of withEvents) {
|
|
201
201
|
try {
|
|
202
|
-
await
|
|
202
|
+
await module.onEvent?.(moduleCtx(ctx, module), scopeOf(ctx, module), event);
|
|
203
203
|
}
|
|
204
204
|
catch {
|
|
205
|
-
//
|
|
205
|
+
// Modules observe independently; one failing never silences
|
|
206
206
|
// the rest.
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
209
|
}),
|
|
210
210
|
}),
|
|
211
|
-
...spread("onEventTransact", chain((
|
|
211
|
+
...spread("onEventTransact", chain((module) => module.onEventTransact)),
|
|
212
212
|
...(withInstructions.length === 0
|
|
213
213
|
? {}
|
|
214
214
|
: {
|
|
215
|
-
// Correctness hook: a failing
|
|
215
|
+
// Correctness hook: a failing module propagates and fails the turn.
|
|
216
216
|
instructions: async (ctx) => {
|
|
217
217
|
const texts = [];
|
|
218
|
-
for (const
|
|
219
|
-
texts.push((await
|
|
218
|
+
for (const module of withInstructions) {
|
|
219
|
+
texts.push((await module.instructions?.(moduleCtx(ctx, module), scopeOf(ctx, module))) ?? "");
|
|
220
220
|
}
|
|
221
221
|
return texts.filter((text) => text.length > 0).join("\n\n");
|
|
222
222
|
},
|
|
@@ -224,34 +224,34 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
224
224
|
...(withTools.length === 0
|
|
225
225
|
? {}
|
|
226
226
|
: {
|
|
227
|
-
// Correctness hook: a failing
|
|
227
|
+
// Correctness hook: a failing module propagates and fails the turn; the
|
|
228
228
|
// base validates the merged list against duplicate names.
|
|
229
229
|
tools: async (ctx) => {
|
|
230
230
|
const tools = [];
|
|
231
|
-
for (const
|
|
232
|
-
tools.push(...((await
|
|
231
|
+
for (const module of withTools) {
|
|
232
|
+
tools.push(...((await module.tools?.(moduleCtx(ctx, module), scopeOf(ctx, module))) ?? []));
|
|
233
233
|
}
|
|
234
234
|
return tools;
|
|
235
235
|
},
|
|
236
236
|
}),
|
|
237
|
-
...spread("beforeToolCallTransact", chain((
|
|
237
|
+
...spread("beforeToolCallTransact", chain((module) => module.beforeToolCallTransact)),
|
|
238
238
|
...(withBeforeToolCall.length === 0
|
|
239
239
|
? {}
|
|
240
240
|
: {
|
|
241
|
-
// Correctness hook:
|
|
241
|
+
// Correctness hook: modules decide in array order, each seeing the call as the
|
|
242
242
|
// one before it left it, and a failure propagates to the base so it becomes
|
|
243
243
|
// this call's error result.
|
|
244
244
|
beforeToolCall: async (ctx, call) => {
|
|
245
245
|
let current = call;
|
|
246
|
-
// Nothing carries a mode into the next
|
|
247
|
-
// 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.
|
|
248
248
|
let permissionMode;
|
|
249
|
-
for (const
|
|
250
|
-
const decision = await
|
|
249
|
+
for (const module of withBeforeToolCall) {
|
|
250
|
+
const decision = await module.beforeToolCall?.(moduleCtx(ctx, module), scopeOf(ctx, module), current);
|
|
251
251
|
if (decision === undefined)
|
|
252
252
|
continue;
|
|
253
253
|
// An answer settles the call: there is no longer a run for the
|
|
254
|
-
//
|
|
254
|
+
// modules after it to have an opinion about.
|
|
255
255
|
if (decision.type === "answer")
|
|
256
256
|
return decision;
|
|
257
257
|
current = {
|
|
@@ -276,8 +276,8 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
276
276
|
};
|
|
277
277
|
},
|
|
278
278
|
}),
|
|
279
|
-
...spread("afterToolCall", fanOut((
|
|
280
|
-
...spread("afterToolCallTransact", chain((
|
|
279
|
+
...spread("afterToolCall", fanOut((module) => module.afterToolCall)),
|
|
280
|
+
...spread("afterToolCallTransact", chain((module) => module.afterToolCallTransact)),
|
|
281
281
|
...(withModelChanged.length === 0
|
|
282
282
|
? {}
|
|
283
283
|
: {
|
|
@@ -285,11 +285,11 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
285
285
|
let injected;
|
|
286
286
|
let failed = false;
|
|
287
287
|
let failure;
|
|
288
|
-
// Every
|
|
288
|
+
// Every module observes the change even when an earlier one fails;
|
|
289
289
|
// the first returned handoff wins.
|
|
290
|
-
for (const
|
|
290
|
+
for (const module of withModelChanged) {
|
|
291
291
|
try {
|
|
292
|
-
const message = await
|
|
292
|
+
const message = await module.modelChanged?.(moduleCtx(ctx, module), scopeOf(ctx, module), change);
|
|
293
293
|
injected ??= message;
|
|
294
294
|
}
|
|
295
295
|
catch (error) {
|
|
@@ -299,62 +299,64 @@ function mergeFeatures(features, options, sharedKV) {
|
|
|
299
299
|
}
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
// A failing
|
|
302
|
+
// A failing module during an incompatible change rejects the switch,
|
|
303
303
|
// preserving the history; on a compatible change it merely observed.
|
|
304
304
|
if (failed && change.wasReset)
|
|
305
305
|
throw failure;
|
|
306
306
|
return injected;
|
|
307
307
|
},
|
|
308
308
|
}),
|
|
309
|
-
...spread("messageAcceptedTransact", chain((
|
|
310
|
-
...spread("messageAccepted", fanOut((
|
|
311
|
-
...spread("permissionModeChangedTransact", chain((
|
|
312
|
-
...spread("permissionModeChanged", fanOut((
|
|
313
|
-
...spread("metadataChangedTransact", chain((
|
|
314
|
-
...spread("metadataChanged", fanOut((
|
|
315
|
-
...spread("beforeAgentLoopTransact", chain((
|
|
316
|
-
...spread("beforeAgentLoop", fanOut((
|
|
317
|
-
...spread("beforeTurnTransact", chain((
|
|
318
|
-
...spread("beforeTurn", collect((
|
|
319
|
-
...spread("beforeInferenceTransact", chain((
|
|
320
|
-
...spread("beforeInference", fanOut((
|
|
321
|
-
...spread("afterInferenceTransact", chain((
|
|
322
|
-
...spread("afterInference", fanOut((
|
|
323
|
-
...spread("afterTurnTransact", chain((
|
|
324
|
-
...spread("afterTurn", collect((
|
|
325
|
-
...spread("afterAgentLoopTransact", chain((
|
|
326
|
-
...spread("afterAgentLoop", collect((
|
|
327
|
-
...spread("afterAgentSettledTransact", chain((
|
|
328
|
-
...spread("afterAgentSettled", fanOut((
|
|
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)),
|
|
329
329
|
};
|
|
330
330
|
}
|
|
331
331
|
/**
|
|
332
|
-
* The context a
|
|
333
|
-
* 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
|
|
334
334
|
* does a tool one of them runs.
|
|
335
335
|
*/
|
|
336
|
-
function
|
|
336
|
+
function moduleCtx(ctx, module) {
|
|
337
337
|
const kv = agentKV(ctx);
|
|
338
338
|
const runKV = agentRunKV(ctx);
|
|
339
|
-
const scoped = kv === undefined ? ctx : withAgentKV(ctx, kv.scoped("
|
|
339
|
+
const scoped = kv === undefined ? ctx : withAgentKV(ctx, kv.scoped("module", module.name));
|
|
340
340
|
return runKV === undefined
|
|
341
341
|
? scoped
|
|
342
|
-
: withAgentRunKV(scoped, runKV.scoped("
|
|
342
|
+
: withAgentRunKV(scoped, runKV.scoped("module", module.name));
|
|
343
343
|
}
|
|
344
344
|
/**
|
|
345
|
-
* What a
|
|
345
|
+
* What a module's hook is handed alongside the context: the agent it is serving, and its own
|
|
346
346
|
* scope of each of the three stores. The selection comes from the context the agent derived for
|
|
347
347
|
* this call, so a hook always sees the model, effort, and tier the work is actually running on
|
|
348
348
|
* rather than the ones the agent was built with.
|
|
349
349
|
*/
|
|
350
|
-
function
|
|
350
|
+
function moduleScope(ctx, module, options, sharedKV) {
|
|
351
351
|
const kv = agentKV(ctx);
|
|
352
352
|
const runKV = agentRunKV(ctx);
|
|
353
|
-
|
|
354
|
-
|
|
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.`);
|
|
355
356
|
}
|
|
356
357
|
const provider = agentProvider(ctx) ?? options.provider;
|
|
357
358
|
return {
|
|
359
|
+
database: database,
|
|
358
360
|
agent: {
|
|
359
361
|
id: options.id,
|
|
360
362
|
metadata: agentConfig(ctx)?.metadata,
|
|
@@ -365,14 +367,14 @@ function featureScope(ctx, feature, options, sharedKV) {
|
|
|
365
367
|
tier: agentServiceTier(ctx) ?? options.serviceTier,
|
|
366
368
|
permissionMode: agentPermissionMode(ctx),
|
|
367
369
|
},
|
|
368
|
-
kv: kv.scoped("
|
|
369
|
-
sharedKV: sharedKV.scoped(
|
|
370
|
-
runKV: runKV.scoped("
|
|
370
|
+
kv: kv.scoped("module", module.name),
|
|
371
|
+
sharedKV: sharedKV.scoped(module.name),
|
|
372
|
+
runKV: runKV.scoped("module", module.name),
|
|
371
373
|
};
|
|
372
374
|
}
|
|
373
375
|
/**
|
|
374
376
|
* One optional entry to spread into the merged hooks: the key when a merged implementation
|
|
375
|
-
* 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.
|
|
376
378
|
*/
|
|
377
379
|
function spread(key, value) {
|
|
378
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,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAC/C,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;AA2B5B;;;;;;;;;;;;;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,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AAE,CAAC,GAAG,CAAC,EAAE,KAAK,EAA4B,CAAC;AAClF,CAAC"}
|
package/dist/AgentBase.d.ts
CHANGED
|
@@ -3,6 +3,7 @@ import { type Context } from "@steve.kite/stdlib";
|
|
|
3
3
|
import type { AgentBaseHooks } from "./AgentBaseHooks.js";
|
|
4
4
|
import type { AgentPersistence } from "./AgentPersistence.js";
|
|
5
5
|
import { type AgentMessageMetadata, type AgentMetadata } from "./AgentMetadata.js";
|
|
6
|
+
import type { AgentMessageAcceptance } from "./AgentMessageAcceptance.js";
|
|
6
7
|
import { type AgentPermissionMode } from "./AgentPermissionMode.js";
|
|
7
8
|
import type { AgentBaseState } from "./AgentBaseState.js";
|
|
8
9
|
import { AgentProviders } from "./AgentProviders.js";
|
|
@@ -16,7 +17,7 @@ export type AgentBaseQueueMode = "one-at-a-time" | "all";
|
|
|
16
17
|
export interface AgentBaseMessageOptions {
|
|
17
18
|
/** Stable cuid2 identity for idempotent delivery; generated when omitted. */
|
|
18
19
|
readonly id?: string;
|
|
19
|
-
/** Immutable
|
|
20
|
+
/** Immutable module-owned metadata that travels with this one message. */
|
|
20
21
|
readonly metadata?: AgentMessageMetadata;
|
|
21
22
|
/** The registry ID of the provider to switch to. */
|
|
22
23
|
readonly provider?: string;
|
|
@@ -36,7 +37,9 @@ export interface AgentBaseMessageOptions {
|
|
|
36
37
|
/**
|
|
37
38
|
* Whether an operation resolves once the agent has taken the request on, or once the agent has
|
|
38
39
|
* carried it out. Every operation that asks something of an agent accepts this, and every one of
|
|
39
|
-
* 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.
|
|
40
43
|
*
|
|
41
44
|
* The reason is re-entrancy. An agent does its work in one run loop, and while a hook or a tool
|
|
42
45
|
* runs, that loop is waiting for it — so code in that position that waits for its own agent waits
|
|
@@ -47,8 +50,9 @@ export interface AgentBaseMessageOptions {
|
|
|
47
50
|
*/
|
|
48
51
|
export interface AgentBaseAwaitOptions {
|
|
49
52
|
/**
|
|
50
|
-
* Wait for the operation to finish rather than for it to be accepted.
|
|
51
|
-
* 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.
|
|
52
56
|
*/
|
|
53
57
|
readonly await?: boolean;
|
|
54
58
|
}
|
|
@@ -62,7 +66,7 @@ export interface AgentBaseOptions {
|
|
|
62
66
|
readonly provider: string;
|
|
63
67
|
/** The append-only store the conversation, the queues, and the settings live in. */
|
|
64
68
|
readonly persistence: AgentPersistence;
|
|
65
|
-
/** 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. */
|
|
66
70
|
readonly hooks?: AgentBaseHooks;
|
|
67
71
|
/** Copied into the agent's own mutable `state`. */
|
|
68
72
|
readonly initialState?: Partial<AgentBaseState>;
|
|
@@ -165,7 +169,7 @@ export interface AgentBaseOptions {
|
|
|
165
169
|
* running under rather than being told.
|
|
166
170
|
*
|
|
167
171
|
* The loop enforces nothing. It has no idea what any particular tool touches, and a runtime that
|
|
168
|
-
* 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
|
|
169
173
|
* tools that do know; the loop's whole part is to carry the mode, make its changes durable, and
|
|
170
174
|
* report them.
|
|
171
175
|
*
|
|
@@ -291,19 +295,19 @@ export declare class AgentBase {
|
|
|
291
295
|
/**
|
|
292
296
|
* Queue a user message that injects as soon as the current assistant response and its tool
|
|
293
297
|
* batch finish; steering always takes precedence over sent messages. Returns once the message
|
|
294
|
-
* has been handed to the agent
|
|
295
|
-
*
|
|
296
|
-
*
|
|
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.
|
|
297
301
|
*/
|
|
298
|
-
steer(ctx: Context, message: SessionUserMessage, options?: AgentBaseMessageOptions & AgentBaseAwaitOptions): Promise<
|
|
302
|
+
steer(ctx: Context, message: SessionUserMessage, options?: AgentBaseMessageOptions & AgentBaseAwaitOptions): Promise<AgentMessageAcceptance>;
|
|
299
303
|
/**
|
|
300
304
|
* Queue a user message that waits until the agent would otherwise stop — no tool calls or
|
|
301
305
|
* steering remain — before injecting. Returns once the message has been handed to the agent,
|
|
302
|
-
*
|
|
303
|
-
*
|
|
304
|
-
* 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.
|
|
305
309
|
*/
|
|
306
|
-
send(ctx: Context, message: SessionUserMessage, options?: AgentBaseMessageOptions & AgentBaseAwaitOptions): Promise<
|
|
310
|
+
send(ctx: Context, message: SessionUserMessage, options?: AgentBaseMessageOptions & AgentBaseAwaitOptions): Promise<AgentMessageAcceptance>;
|
|
307
311
|
/**
|
|
308
312
|
* Shallow-merge fields into this agent's immutable metadata. The complete AgentConfig and
|
|
309
313
|
* transactional hook writes commit together; observing hooks run only after that commit.
|
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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