@slopus/happy-agent-base 0.0.4 → 0.0.6
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 +35 -1
- package/dist/Agent.d.ts +3 -0
- package/dist/Agent.d.ts.map +1 -1
- package/dist/Agent.js +56 -20
- package/dist/Agent.js.map +1 -1
- package/dist/AgentBase.d.ts +36 -0
- package/dist/AgentBase.d.ts.map +1 -1
- package/dist/AgentBase.js +376 -58
- package/dist/AgentBase.js.map +1 -1
- package/dist/AgentBaseHooks.d.ts +166 -20
- package/dist/AgentBaseHooks.d.ts.map +1 -1
- package/dist/AgentConfig.d.ts +12 -5
- package/dist/AgentConfig.d.ts.map +1 -1
- package/dist/AgentConfig.js +25 -5
- package/dist/AgentConfig.js.map +1 -1
- package/dist/AgentContexts.d.ts +19 -5
- package/dist/AgentContexts.d.ts.map +1 -1
- package/dist/AgentContexts.js +26 -6
- package/dist/AgentContexts.js.map +1 -1
- package/dist/AgentFeature.d.ts +48 -10
- package/dist/AgentFeature.d.ts.map +1 -1
- package/dist/AgentFeatureAction.d.ts +5 -0
- package/dist/AgentFeatureAction.d.ts.map +1 -1
- 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/AgentPermissionMode.d.ts +27 -0
- package/dist/AgentPermissionMode.d.ts.map +1 -0
- package/dist/AgentPermissionMode.js +48 -0
- package/dist/AgentPermissionMode.js.map +1 -0
- package/dist/AgentPersistence.d.ts +14 -4
- package/dist/AgentPersistence.d.ts.map +1 -1
- package/dist/AgentRef.d.ts +6 -1
- package/dist/AgentRef.d.ts.map +1 -1
- package/dist/AgentRef.js +8 -1
- package/dist/AgentRef.js.map +1 -1
- package/dist/AgentSystem.d.ts +26 -7
- package/dist/AgentSystem.d.ts.map +1 -1
- package/dist/AgentSystemLocal.d.ts +14 -8
- package/dist/AgentSystemLocal.d.ts.map +1 -1
- package/dist/AgentSystemLocal.js +108 -32
- package/dist/AgentSystemLocal.js.map +1 -1
- package/dist/AgentSystemRef.d.ts +14 -5
- package/dist/AgentSystemRef.d.ts.map +1 -1
- package/dist/AgentSystemRef.js +25 -6
- package/dist/AgentSystemRef.js.map +1 -1
- package/dist/index.d.ts +6 -4
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +5 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentSystemRef.d.ts","sourceRoot":"","sources":["../sources/AgentSystemRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAwB,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC/D,OAAO,KAAK,EAAE,
|
|
1
|
+
{"version":3,"file":"AgentSystemRef.d.ts","sourceRoot":"","sources":["../sources/AgentSystemRef.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oBAAoB,CAAC;AAElD,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAClD,OAAO,EAAwB,QAAQ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B,OAAO,CAAC,EAAE,uBAAuB,GAClC,OAAO,CAAC,IAAI,CAAC,CAKf;IAED;;;;OAIG;IACG,IAAI,CACN,GAAG,EAAE,OAAO,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,EAAE,kBAAkB,EAC3B,OAAO,CAAC,EAAE,uBAAuB,GAClC,OAAO,CAAC,IAAI,CAAC,CAKf;IAED,mEAAmE;IAC7D,OAAO,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAE1D;IAED,2FAA2F;IACrF,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAExD;CACJ"}
|
package/dist/AgentSystemRef.js
CHANGED
|
@@ -21,26 +21,45 @@ import { acceptanceIsWaitable, AgentRef } from "./AgentRef.js";
|
|
|
21
21
|
export class AgentSystemRef {
|
|
22
22
|
/** The collection this reference forwards every operation to without waiting on its loops. */
|
|
23
23
|
#system;
|
|
24
|
+
/** The agent this reference belongs to, or `null` for collection lifecycle code. */
|
|
25
|
+
agentId;
|
|
24
26
|
/** Wrap a collection as the deadlock-free reference given to code running inside it. */
|
|
25
|
-
constructor(system) {
|
|
27
|
+
constructor(system, agentId = null) {
|
|
26
28
|
this.#system = system;
|
|
29
|
+
this.agentId = agentId;
|
|
27
30
|
}
|
|
28
31
|
/** The models this collection offers its agents. */
|
|
29
32
|
get models() {
|
|
30
33
|
return this.#system.models;
|
|
31
34
|
}
|
|
32
|
-
/** Create an agent
|
|
33
|
-
async create(ctx, config,
|
|
34
|
-
|
|
35
|
+
/** Create an agent, inheriting this reference's agent as parent unless options override it. */
|
|
36
|
+
async create(ctx, config, options) {
|
|
37
|
+
const parent = options?.parent === undefined ? this.agentId : options.parent;
|
|
38
|
+
const agent = await this.#system.create(ctx, config, { ...options, parent });
|
|
39
|
+
return new AgentRef(agent, parent);
|
|
35
40
|
}
|
|
36
41
|
/** A reference to an existing agent; resolving one that was never created is an error. */
|
|
37
42
|
async resolve(ctx, agentId) {
|
|
38
|
-
|
|
43
|
+
const agent = await this.#system.resolve(ctx, agentId);
|
|
44
|
+
const parent = await this.#system.parentOf(ctx, agentId);
|
|
45
|
+
return new AgentRef(agent, parent);
|
|
39
46
|
}
|
|
40
|
-
/** The configuration an agent
|
|
47
|
+
/** The current configuration of an agent, or undefined when there is no such agent. */
|
|
41
48
|
async config(ctx, agentId) {
|
|
42
49
|
return await this.#system.config(ctx, agentId);
|
|
43
50
|
}
|
|
51
|
+
/** Shallow-merge fields into an agent's immutable metadata. */
|
|
52
|
+
async updateMetadata(ctx, agentId, update) {
|
|
53
|
+
await this.#system.updateMetadata(ctx, agentId, update);
|
|
54
|
+
}
|
|
55
|
+
/** The direct children of an agent, in durable key order. */
|
|
56
|
+
async childOf(ctx, agentId) {
|
|
57
|
+
return await this.#system.childOf(ctx, agentId);
|
|
58
|
+
}
|
|
59
|
+
/** The parent of an agent, or `null` when it is a root. */
|
|
60
|
+
async parentOf(ctx, agentId) {
|
|
61
|
+
return await this.#system.parentOf(ctx, agentId);
|
|
62
|
+
}
|
|
44
63
|
/**
|
|
45
64
|
* Queue a steered message. For another agent this resolves once the message is durably
|
|
46
65
|
* accepted and rejects when that write fails; for the caller's own agent it resolves as soon
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AgentSystemRef.js","sourceRoot":"","sources":["../sources/AgentSystemRef.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"AgentSystemRef.js","sourceRoot":"","sources":["../sources/AgentSystemRef.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG/D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,OAAO,cAAc;IACvB,8FAA8F;IACrF,OAAO,CAAc;IAC9B,oFAAoF;IAC3E,OAAO,CAAgB;IAEhC,wFAAwF;IACxF,YAAY,MAAmB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AC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;IACxD,CAAC;CACJ"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
/** Public surface of `@slopus/happy-agent-base`, re-exported by concern. */
|
|
2
2
|
export { Agent, type AgentOptions } from "./Agent.js";
|
|
3
3
|
export { type AgentSystem } from "./AgentSystem.js";
|
|
4
|
-
export { type AgentInitialContext } from "./AgentSystem.js";
|
|
4
|
+
export { type AgentCreateOptions, type AgentInitialContext } from "./AgentSystem.js";
|
|
5
5
|
export { AgentSystemLocal, type AgentSystemLocalOptions } from "./AgentSystemLocal.js";
|
|
6
6
|
export { AgentSystemRef } from "./AgentSystemRef.js";
|
|
7
7
|
export { AgentRef } from "./AgentRef.js";
|
|
8
8
|
export { agentSystem, withAgentSystem } from "./AgentSystemContext.js";
|
|
9
|
-
export { agentConfig, agentConfigSchema, agentFeatureConfig, agentEnvironment, agentEnvironmentSchema, agentFeatureConfigSchema, agentPlatformSchema, currentAgentEnvironment, withAgentConfig, type AgentConfig, type AgentEnvironment, type AgentFeatureConfig, type AgentPlatform, } from "./AgentConfig.js";
|
|
9
|
+
export { agentConfig, agentConfigSchema, agentFeatureConfig, agentMetadata, agentEnvironment, agentEnvironmentSchema, agentFeatureConfigSchema, agentPlatformSchema, currentAgentEnvironment, withAgentConfig, type AgentConfig, type AgentEnvironment, type AgentFeatureConfig, type AgentPlatform, } from "./AgentConfig.js";
|
|
10
|
+
export { agentMessageMetadataSchema, agentMetadataSchema, agentMetadataValueSchema, cuid2Schema, type AgentMessageMetadata, type AgentMetadata, type AgentMetadataChange, type AgentMetadataValue, } from "./AgentMetadata.js";
|
|
10
11
|
export { AgentStorage, type AgentStorageLock, type AgentStorageOptions } from "./AgentStorage.js";
|
|
11
12
|
export { type AgentModel } from "./AgentModel.js";
|
|
12
13
|
export { knownModels, type Model } from "./models.js";
|
|
13
14
|
export { AgentBase, type AgentBaseAwaitOptions, type AgentBaseMessageOptions, type AgentBaseOptions, type AgentBaseQueueMode, } from "./AgentBase.js";
|
|
14
|
-
export { agentEffort, agentId, agentKV, agentModel, agentProvider, agentRunKV, agentServiceTier, withAgentContext, withAgentKV, withAgentRunKV, } from "./AgentContexts.js";
|
|
15
|
+
export { agentEffort, agentId, agentKV, agentModel, agentPermissionMode, agentProvider, agentRunKV, agentServiceTier, withAgentContext, withAgentKV, withAgentPermissionMode, withAgentRunKV, } from "./AgentContexts.js";
|
|
16
|
+
export { agentPermissionModeLabel, agentPermissionModeSchema, isAgentPermissionMode, DEFAULT_AGENT_PERMISSION_MODE, type AgentPermissionMode, } from "./AgentPermissionMode.js";
|
|
15
17
|
export { agentTaskContext, taskContextBeforeToolCall, withAgentTaskContext, } from "./AgentTaskContext.js";
|
|
16
18
|
export { AgentKV } from "./AgentKV.js";
|
|
17
|
-
export { type AgentBaseHooks, type AgentBaseInference, type AgentBaseModelChange, type AgentBasePersistedEvent, type
|
|
19
|
+
export { type AgentBaseAcceptedMessage, type AgentBaseHooks, type AgentBaseInference, type AgentBaseModelChange, type AgentBasePermissionModeChange, type AgentBasePersistedEvent, type AgentBaseToolCall, type AgentBaseToolCallDecision, type AgentBaseToolOutcome, type AgentBaseTurn, type AgentBaseTurnStart, type MaybePromise, } from "./AgentBaseHooks.js";
|
|
18
20
|
export { type AgentPersistence, type AgentRecord } from "./AgentPersistence.js";
|
|
19
21
|
export { agentBasePendingStateOf, agentBaseStoreOwesWork, AGENT_BASE_PENDING_KEY, type AgentBasePendingStage, type AgentBasePendingState, } from "./AgentBasePending.js";
|
|
20
22
|
export { type AgentBaseState } from "./AgentBaseState.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../sources/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAG5E,OAAO,EAAE,KAAK,EAAE,KAAK,YAAY,EAAE,M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AAK,iBAAiB,GACzB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAGlE,OAAO,EACH,cAAc,EACd,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,GAC3B,MAAM,qBAAqB,CAAC;AAG7B,OAAO,EACH,eAAe,EACf,KAAK,SAAS,EACd,KAAK,sCAAsC,EAC3C,KAAK,gCAAgC,EACrC,KAAK,YAAY,GACpB,MAAM,gBAAgB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -7,15 +7,17 @@ export { AgentSystemLocal } from "./AgentSystemLocal.js";
|
|
|
7
7
|
export { AgentSystemRef } from "./AgentSystemRef.js";
|
|
8
8
|
export { AgentRef } from "./AgentRef.js";
|
|
9
9
|
export { agentSystem, withAgentSystem } from "./AgentSystemContext.js";
|
|
10
|
-
//
|
|
11
|
-
export { agentConfig, agentConfigSchema, agentFeatureConfig, agentEnvironment, agentEnvironmentSchema, agentFeatureConfigSchema, agentPlatformSchema, currentAgentEnvironment, withAgentConfig, } from "./AgentConfig.js";
|
|
10
|
+
// Agent configuration: fixed environment/settings, mergeable metadata, and its context carrier.
|
|
11
|
+
export { agentConfig, agentConfigSchema, agentFeatureConfig, agentMetadata, agentEnvironment, agentEnvironmentSchema, agentFeatureConfigSchema, agentPlatformSchema, currentAgentEnvironment, withAgentConfig, } from "./AgentConfig.js";
|
|
12
|
+
export { agentMessageMetadataSchema, agentMetadataSchema, agentMetadataValueSchema, cuid2Schema, } from "./AgentMetadata.js";
|
|
12
13
|
export { AgentStorage } from "./AgentStorage.js";
|
|
13
14
|
// Provider/model routing and the curated model catalog.
|
|
14
15
|
export {} from "./AgentModel.js";
|
|
15
16
|
export { knownModels } from "./models.js";
|
|
16
17
|
// The run loop itself: its context carriers, key-value store, hook contracts, and persistence.
|
|
17
18
|
export { AgentBase, } from "./AgentBase.js";
|
|
18
|
-
export { agentEffort, agentId, agentKV, agentModel, agentProvider, agentRunKV, agentServiceTier, withAgentContext, withAgentKV, withAgentRunKV, } from "./AgentContexts.js";
|
|
19
|
+
export { agentEffort, agentId, agentKV, agentModel, agentPermissionMode, agentProvider, agentRunKV, agentServiceTier, withAgentContext, withAgentKV, withAgentPermissionMode, withAgentRunKV, } from "./AgentContexts.js";
|
|
20
|
+
export { agentPermissionModeLabel, agentPermissionModeSchema, isAgentPermissionMode, DEFAULT_AGENT_PERMISSION_MODE, } from "./AgentPermissionMode.js";
|
|
19
21
|
export { agentTaskContext, taskContextBeforeToolCall, withAgentTaskContext, } from "./AgentTaskContext.js";
|
|
20
22
|
export { AgentKV } from "./AgentKV.js";
|
|
21
23
|
export {} from "./AgentBaseHooks.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../sources/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,8EAA8E;AAC9E,OAAO,EAAE,KAAK,EAAqB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAoB,MAAM,kBAAkB,CAAC;AACpD,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../sources/index.ts"],"names":[],"mappings":"AAAA,4EAA4E;AAE5E,8EAA8E;AAC9E,OAAO,EAAE,KAAK,EAAqB,MAAM,YAAY,CAAC;AACtD,OAAO,EAAoB,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAqD,MAAM,kBAAkB,CAAC;AACrF,OAAO,EAAE,gBAAgB,EAAgC,MAAM,uBAAuB,CAAC;AACvF,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AACzC,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAEvE,gGAAgG;AAChG,OAAO,EACH,WAAW,EACX,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,gBAAgB,EAChB,sBAAsB,E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