@sema-agent/mods-kernel 7.58.0 → 7.59.0
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 +3 -0
- package/dist/dispatch.js +2 -1
- package/dist/events.d.ts +1 -1
- package/dist/events.js +2 -2
- package/dist/registration.d.ts +1 -0
- package/dist/registration.js +3 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -29,6 +29,9 @@ package version; it moves only when the chain semantics, the registration form,
|
|
|
29
29
|
`side`) or the failure columns (failure, abort, pinned keys, an event's own budget ceiling, whether `$` may call it)
|
|
30
30
|
change — once per release, however many of them change in it.
|
|
31
31
|
|
|
32
|
+
`@sema-agent/core` does not depend on this package: it compiles the same source into its own build, so a process that
|
|
33
|
+
installs both holds two copies. This package is for a host that runs its own bus; the engine does not need it installed.
|
|
34
|
+
|
|
32
35
|
## Which side raises an event
|
|
33
36
|
|
|
34
37
|
Every name in `MOD_EVENT_TABLE` carries a `side` — `engine`, `surface` or `both`, the closed set `MOD_EVENT_SIDES` — and
|
package/dist/dispatch.js
CHANGED
|
@@ -584,7 +584,8 @@ function createBus(side, mounted, bottoms, entries, report, records, describe, i
|
|
|
584
584
|
if (caught !== undefined && "answer" in caught) {
|
|
585
585
|
if (failure.cause !== "violation" && failure.cause !== "reentry")
|
|
586
586
|
report(new Error(`${name}: ${event}: ${failure.reason}; its .catch answered`));
|
|
587
|
-
producers.
|
|
587
|
+
if (!(typeof caught.answer === "object" && caught.answer !== null && producers.has(caught.answer)))
|
|
588
|
+
producers.set(caught.answer, name);
|
|
588
589
|
traceOf(sink, i, name, h.reg.tier, "caught", ms);
|
|
589
590
|
return caught.answer;
|
|
590
591
|
}
|
package/dist/events.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export declare const KERNEL_CONTRACT_VERSION =
|
|
1
|
+
export declare const KERNEL_CONTRACT_VERSION = 5;
|
|
2
2
|
export declare const MOD_TIERS: readonly ["prepend", "user", "append", "builtin", "core"];
|
|
3
3
|
export type ModTier = (typeof MOD_TIERS)[number];
|
|
4
4
|
export type ModRegistrationTier = Exclude<ModTier, "builtin" | "core">;
|
package/dist/events.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export const KERNEL_CONTRACT_VERSION =
|
|
1
|
+
export const KERNEL_CONTRACT_VERSION = 5;
|
|
2
2
|
export const MOD_TIERS = Object.freeze(["prepend", "user", "append", "builtin", "core"]);
|
|
3
3
|
export const MOD_SEATS = Object.freeze(["deployment", "task"]);
|
|
4
4
|
export const MOD_EVENT_SIDES = Object.freeze(["engine", "surface", "both"]);
|
|
@@ -55,7 +55,7 @@ export const MOD_EVENT_TABLE = Object.freeze({
|
|
|
55
55
|
"classic.SessionEnd": engine(),
|
|
56
56
|
"classic.Stop": engine(station("skip", "immediate")),
|
|
57
57
|
"classic.StopFailure": engine(station("skip", "grace")),
|
|
58
|
-
"classic.SubagentStart": engine(),
|
|
58
|
+
"classic.SubagentStart": engine(station("skip", "immediate", ["agentId", "agentType"])),
|
|
59
59
|
"classic.SubagentStop": engine(station("skip", "immediate")),
|
|
60
60
|
"classic.PreCompact": engine(station("skip", "grace")),
|
|
61
61
|
"classic.PostCompact": engine(station("skip", "grace")),
|
package/dist/registration.d.ts
CHANGED
|
@@ -12,6 +12,7 @@ export interface ModOrigin {
|
|
|
12
12
|
readonly tier: ModTier;
|
|
13
13
|
}
|
|
14
14
|
export declare const ENGINE_ORIGIN: ModOrigin;
|
|
15
|
+
export declare function namedRegistration(registration: string | undefined): string | undefined;
|
|
15
16
|
export interface ModPluginFacts {
|
|
16
17
|
readonly name: string;
|
|
17
18
|
}
|
package/dist/registration.js
CHANGED
|
@@ -3,6 +3,9 @@ import { resolveModBudgetMs } from "./budget.js";
|
|
|
3
3
|
export const MODS_INVALID_CODE = "config.mods_invalid";
|
|
4
4
|
export const MODS_REGISTRATION_REFUSED_CODE = "mods.registration_refused";
|
|
5
5
|
export const ENGINE_ORIGIN = Object.freeze({ plugin: "engine", tier: "core" });
|
|
6
|
+
export function namedRegistration(registration) {
|
|
7
|
+
return registration === undefined || registration === ENGINE_ORIGIN.plugin ? undefined : registration;
|
|
8
|
+
}
|
|
6
9
|
export const MOD_TRACE_OUTCOMES = Object.freeze(["returned", "passed", "rejected", "caught", "expired", "kept", "skipped", "bypassed"]);
|
|
7
10
|
export function modsInvalid(message) {
|
|
8
11
|
return Object.assign(new Error(message), { code: MODS_INVALID_CODE });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sema-agent/mods-kernel",
|
|
3
|
-
"version": "7.
|
|
3
|
+
"version": "7.59.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "The sema mods kernel: one extension bus (registration, admission, chain, failure and budget law) shared by the engine and the shell. Zero dependencies.",
|
|
6
6
|
"type": "module",
|
|
@@ -31,5 +31,5 @@
|
|
|
31
31
|
"scripts": {
|
|
32
32
|
"build": "tsc -p tsconfig.json"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "66b1845c9644930fa7f43fd7c388316c3b060ee1"
|
|
35
35
|
}
|