@looprun-ai/core 0.1.2 → 0.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/dist/guards.d.ts +92 -15
- package/dist/guards.d.ts.map +1 -1
- package/dist/guards.js +145 -38
- package/dist/guards.js.map +1 -1
- package/dist/index.d.ts +7 -6
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/dist/model-params.d.ts +16 -0
- package/dist/model-params.d.ts.map +1 -1
- package/dist/model-params.js +14 -0
- package/dist/model-params.js.map +1 -1
- package/dist/runtime/ledger.d.ts +10 -1
- package/dist/runtime/ledger.d.ts.map +1 -1
- package/dist/runtime/ledger.js +2 -1
- package/dist/runtime/ledger.js.map +1 -1
- package/dist/runtime/turn.d.ts +74 -2
- package/dist/runtime/turn.d.ts.map +1 -1
- package/dist/runtime/turn.js +112 -0
- package/dist/runtime/turn.js.map +1 -1
- package/dist/spec.d.ts +77 -10
- package/dist/spec.d.ts.map +1 -1
- package/dist/spec.js +62 -51
- package/dist/spec.js.map +1 -1
- package/package.json +1 -1
package/dist/spec.js
CHANGED
|
@@ -8,17 +8,21 @@
|
|
|
8
8
|
* postTool → recorded via `afterToolCall`
|
|
9
9
|
* onReply → runtime finalization (bounded no-tools redrive; exhaustion ⇒ a deterministic
|
|
10
10
|
* guard-authored closure)
|
|
11
|
-
* controls → maxSteps (stop condition) · terminal (reply-only policy) · directives ·
|
|
12
|
-
* exhaustionReply
|
|
11
|
+
* controls → maxSteps (stop condition) · terminal (reply-only policy) · directives · chains ·
|
|
12
|
+
* escalate · sampling · exhaustionReply
|
|
13
13
|
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
14
|
+
* ONE class, `AgentSpecBase` (the former Minimal/Base/Full ladder is collapsed — a spec is a spec).
|
|
15
|
+
* Its constructor auto-installs, layer-tagged and addressable, exactly:
|
|
16
|
+
* - ALWAYS the invariants EVERY agent carries: noDuplicateCall (preTool, id `minimal:noDuplicateCall`)
|
|
17
|
+
* + emptyReply (onReply, id `minimal:emptyReply`);
|
|
18
|
+
* - IFF `destructiveTools` is non-empty, the destructive-safety protocol on those tools:
|
|
19
|
+
* confirmFirst (id `base:confirmFirst`) + destructiveThrottle (id `base:destructiveThrottle`).
|
|
20
|
+
* Per-tool schema guards (argRequired/argFormat) are now AUTHORED explicitly by the spec — there is no
|
|
21
|
+
* auto-schema layer. The `minimal:`/`base:` id namespaces are retained (load-bearing for resolveBindings
|
|
22
|
+
* layer ordering + trunk prose order). resolveBindings sorts each hook agent → full → base → minimal so
|
|
23
|
+
* an agent correction always wins.
|
|
20
24
|
*/
|
|
21
|
-
import {
|
|
25
|
+
import { confirmFirst, destructiveThrottle, emptyReply, noDuplicateCall, noFalseFailureClaim } from './guards.js';
|
|
22
26
|
const TERMINAL_TOOLS = ['replyToUser', 'askUser'];
|
|
23
27
|
const LAYER_ORDER = { agent: 0, full: 1, base: 2, minimal: 3 };
|
|
24
28
|
export function resolveBindings(bindings, tool) {
|
|
@@ -35,7 +39,15 @@ export function resolveMutators(bindings) {
|
|
|
35
39
|
.sort((a, b) => LAYER_ORDER[a.layer] - LAYER_ORDER[b.layer])
|
|
36
40
|
.map((b) => b.mutator);
|
|
37
41
|
}
|
|
38
|
-
|
|
42
|
+
/**
|
|
43
|
+
* The ONE AgentSpec class (no Minimal/Base/Full ladder). Its constructor always installs the universal
|
|
44
|
+
* invariants (noDuplicateCall + emptyReply, + noFalseFailureClaim iff `cfg.lexicon` provides its regex)
|
|
45
|
+
* and, iff `destructiveTools` is non-empty, the destructive-safety protocol (confirmFirst +
|
|
46
|
+
* destructiveThrottle) on those tools — confirmFirst keyed per-tool by `cfg.confirmMechanism`. Ids and
|
|
47
|
+
* install order are byte-stable (`minimal:*` then `base:*`) so the layer-sorted trunk prose and
|
|
48
|
+
* resolveBindings order are unchanged from the former ladder.
|
|
49
|
+
*/
|
|
50
|
+
export class AgentSpecBase {
|
|
39
51
|
id;
|
|
40
52
|
mode;
|
|
41
53
|
persona;
|
|
@@ -46,6 +58,8 @@ export class AgentSpecMinimal {
|
|
|
46
58
|
behavior;
|
|
47
59
|
theme;
|
|
48
60
|
destructiveTools;
|
|
61
|
+
confirmMechanism;
|
|
62
|
+
lexicon;
|
|
49
63
|
toolSchemas;
|
|
50
64
|
seq = 0;
|
|
51
65
|
constructor(cfg) {
|
|
@@ -77,18 +91,56 @@ export class AgentSpecMinimal {
|
|
|
77
91
|
...(cfg.directives?.length ? { directives: [...cfg.directives] } : {}),
|
|
78
92
|
...(cfg.escalate ? { escalate: cfg.escalate } : {}),
|
|
79
93
|
...(cfg.exhaustionReply ? { exhaustionReply: cfg.exhaustionReply } : {}),
|
|
94
|
+
...(cfg.sampling ? { sampling: cfg.sampling } : {}),
|
|
95
|
+
...(cfg.chains?.length ? { chains: [...cfg.chains] } : {}),
|
|
80
96
|
};
|
|
81
97
|
this.behavior = [...(cfg.behavior ?? [])];
|
|
82
98
|
if (cfg.theme)
|
|
83
99
|
this.theme = cfg.theme;
|
|
84
100
|
this.destructiveTools = [...(cfg.destructiveTools ?? [])];
|
|
101
|
+
this.confirmMechanism = { ...(cfg.confirmMechanism ?? {}) };
|
|
102
|
+
this.lexicon = { ...(cfg.lexicon ?? {}) };
|
|
85
103
|
this.toolSchemas = cfg.toolSchemas ?? {};
|
|
104
|
+
// Install order is load-bearing (byte-stable trunk): universal invariants first, destructive layer
|
|
105
|
+
// second — same as the former AgentSpecMinimal → AgentSpecBase super()/installBase() flow.
|
|
86
106
|
this.installMinimal();
|
|
107
|
+
this.installBase();
|
|
87
108
|
}
|
|
88
109
|
installMinimal() {
|
|
89
110
|
this.addGuard('preTool', 'any', noDuplicateCall(), { layer: 'minimal', id: 'minimal:noDuplicateCall' });
|
|
111
|
+
// ALWAYS-ON reply-honesty invariant — auto-installed IFF the bundle injects its false-failure lexicon
|
|
112
|
+
// (auto-iff-provided keeps a spec that ships no lexicon byte-stable). Ordered BEFORE emptyReply so the
|
|
113
|
+
// resolved onReply tail is `… , minimal:noFalseFailureClaim, minimal:emptyReply` (the same relative
|
|
114
|
+
// position the agent-layer install formerly held, just under a stable minimal id).
|
|
115
|
+
if (this.lexicon.falseFailureClaimRe) {
|
|
116
|
+
this.addGuard('onReply', 'any', noFalseFailureClaim({ claimRe: this.lexicon.falseFailureClaimRe }), { layer: 'minimal', id: 'minimal:noFalseFailureClaim' });
|
|
117
|
+
}
|
|
90
118
|
this.addGuard('onReply', 'any', emptyReply(), { layer: 'minimal', id: 'minimal:emptyReply' });
|
|
91
119
|
}
|
|
120
|
+
/** Iff the spec declares destructiveTools: the confirm-first + throttle protocol on exactly those tools
|
|
121
|
+
* (validated ⊆ surface). The confirm MECHANISM is per-tool (`cfg.confirmMechanism`, default `'arg'`):
|
|
122
|
+
* the tools are partitioned so each mechanism renders its OWN prose under its own base id — arg-flag
|
|
123
|
+
* tools → `base:confirmFirst`, prior-ask tools → `base:confirmFirstPriorAsk` — while `destructiveThrottle`
|
|
124
|
+
* covers ALL of them. A no-op when the list is empty — every non-destructive spec is clean. */
|
|
125
|
+
installBase() {
|
|
126
|
+
const destructive = this.destructiveTools;
|
|
127
|
+
if (!destructive.length)
|
|
128
|
+
return;
|
|
129
|
+
const missing = destructive.filter((t) => !this.surface.tools.includes(t));
|
|
130
|
+
if (missing.length) {
|
|
131
|
+
throw new Error(`AgentSpec "${this.id}": destructiveTools not in the tool surface: ${missing.join(', ')}.`);
|
|
132
|
+
}
|
|
133
|
+
const mechOf = (t) => this.confirmMechanism[t] ?? 'arg';
|
|
134
|
+
const argTools = destructive.filter((t) => mechOf(t) === 'arg');
|
|
135
|
+
const priorAskTools = destructive.filter((t) => mechOf(t) === 'prior-ask');
|
|
136
|
+
if (argTools.length) {
|
|
137
|
+
this.addGuard('preTool', argTools, confirmFirst(), { layer: 'base', id: 'base:confirmFirst' });
|
|
138
|
+
}
|
|
139
|
+
if (priorAskTools.length) {
|
|
140
|
+
this.addGuard('preTool', priorAskTools, confirmFirst({ mechanism: 'prior-ask', askRe: this.lexicon.confirmAskRe }), { layer: 'base', id: 'base:confirmFirstPriorAsk' });
|
|
141
|
+
}
|
|
142
|
+
this.addGuard('preTool', destructive, destructiveThrottle(destructive), { layer: 'base', id: 'base:destructiveThrottle' });
|
|
143
|
+
}
|
|
92
144
|
addGuard(hook, target, guard, opts) {
|
|
93
145
|
if (hook === 'preTool' && (guard.dim === 'behavior' || guard.dim === 'output')) {
|
|
94
146
|
throw new Error(`AgentSpec "${this.id}": a '${guard.dim}'-dim guard (${guard.kind}) cannot be a preTool gate — use onReply/postTool.`);
|
|
@@ -124,45 +176,4 @@ export class AgentSpecMinimal {
|
|
|
124
176
|
return this;
|
|
125
177
|
}
|
|
126
178
|
}
|
|
127
|
-
export class AgentSpecBase extends AgentSpecMinimal {
|
|
128
|
-
constructor(cfg) {
|
|
129
|
-
super(cfg);
|
|
130
|
-
this.installBase();
|
|
131
|
-
}
|
|
132
|
-
installBase() {
|
|
133
|
-
const destructive = this.destructiveTools;
|
|
134
|
-
if (!destructive.length)
|
|
135
|
-
return;
|
|
136
|
-
const missing = destructive.filter((t) => !this.surface.tools.includes(t));
|
|
137
|
-
if (missing.length) {
|
|
138
|
-
throw new Error(`AgentSpec "${this.id}": destructiveTools not in the tool surface: ${missing.join(', ')}.`);
|
|
139
|
-
}
|
|
140
|
-
this.addGuard('preTool', destructive, confirmFirst(), { layer: 'base', id: 'base:confirmFirst' });
|
|
141
|
-
this.addGuard('preTool', destructive, destructiveThrottle(destructive), { layer: 'base', id: 'base:destructiveThrottle' });
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
export class AgentSpecFull extends AgentSpecBase {
|
|
145
|
-
constructor(cfg) {
|
|
146
|
-
super(cfg);
|
|
147
|
-
this.installFull();
|
|
148
|
-
}
|
|
149
|
-
installFull() {
|
|
150
|
-
for (const tool of this.surface.tools) {
|
|
151
|
-
const s = this.toolSchemas[tool];
|
|
152
|
-
if (!s)
|
|
153
|
-
continue;
|
|
154
|
-
for (const field of s.required ?? []) {
|
|
155
|
-
this.addGuard('preTool', [tool], argRequired(field), { layer: 'full', id: `full:argRequired:${tool}.${field}` });
|
|
156
|
-
}
|
|
157
|
-
for (const [field, prop] of Object.entries(s.properties ?? {})) {
|
|
158
|
-
if (!prop.pattern)
|
|
159
|
-
continue;
|
|
160
|
-
try {
|
|
161
|
-
this.addGuard('preTool', [tool], argFormat(field, prop.pattern), { layer: 'full', id: `full:argFormat:${tool}.${field}` });
|
|
162
|
-
}
|
|
163
|
-
catch { /* a malformed pattern degrades one guard, not the import */ }
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
179
|
//# sourceMappingURL=spec.js.map
|
package/dist/spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"spec.js","sourceRoot":"","sources":["../src/spec.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AACH,OAAO,EAAE,YAAY,EAAE,mBAAmB,EAAE,UAAU,EAAE,eAAe,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAsHlH,MAAM,cAAc,GAAG,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC;AAClD,MAAM,WAAW,GAA0B,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,CAAC,EAAE,CAAC;AAEtF,MAAM,UAAU,eAAe,CAAC,QAAoC,EAAE,IAAa;IACjF,OAAO,CAAC,QAAQ,IAAI,EAAE,CAAC;SACpB,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,QAAQ,IAAI,CAAC,IAAI,KAAK,SAA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IAAI,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,IAAI,CAAC;IACd,CAAC;CACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@looprun-ai/core",
|
|
3
|
-
"version": "0.1
|
|
3
|
+
"version": "0.2.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "looprun core: the AgentSpec governance layer for LLM agents — typed deterministic guards (prose+check pairing), the byte-stable scoped trunk renderer, and the backend-agnostic governed-turn machine. Framework-free: zero runtime dependencies; backends (@looprun-ai/mastra, …) supply the loop.",
|
|
6
6
|
"keywords": [
|