@agenticprimitives/orchestration 0.0.0-alpha.1 → 0.0.0-alpha.10

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.
Files changed (114) hide show
  1. package/README.md +2 -0
  2. package/dist/admission.d.ts +127 -0
  3. package/dist/admission.d.ts.map +1 -0
  4. package/dist/admission.js +355 -0
  5. package/dist/admission.js.map +1 -0
  6. package/dist/answer-quality.d.ts +80 -0
  7. package/dist/answer-quality.d.ts.map +1 -0
  8. package/dist/answer-quality.js +97 -0
  9. package/dist/answer-quality.js.map +1 -0
  10. package/dist/artifacts.d.ts +137 -0
  11. package/dist/artifacts.d.ts.map +1 -0
  12. package/dist/artifacts.js +232 -0
  13. package/dist/artifacts.js.map +1 -0
  14. package/dist/authority.d.ts +465 -0
  15. package/dist/authority.d.ts.map +1 -0
  16. package/dist/authority.js +2 -0
  17. package/dist/authority.js.map +1 -0
  18. package/dist/conformance.d.ts +66 -0
  19. package/dist/conformance.d.ts.map +1 -0
  20. package/dist/conformance.js +140 -0
  21. package/dist/conformance.js.map +1 -0
  22. package/dist/derivation.d.ts +21 -0
  23. package/dist/derivation.d.ts.map +1 -0
  24. package/dist/derivation.js +31 -0
  25. package/dist/derivation.js.map +1 -0
  26. package/dist/durable.d.ts +44 -0
  27. package/dist/durable.d.ts.map +1 -0
  28. package/dist/durable.js +15 -0
  29. package/dist/durable.js.map +1 -0
  30. package/dist/export-port.d.ts +13 -0
  31. package/dist/export-port.d.ts.map +1 -0
  32. package/dist/export-port.js +2 -0
  33. package/dist/export-port.js.map +1 -0
  34. package/dist/flow-trace.d.ts +105 -0
  35. package/dist/flow-trace.d.ts.map +1 -0
  36. package/dist/flow-trace.js +60 -0
  37. package/dist/flow-trace.js.map +1 -0
  38. package/dist/index.d.ts +37 -4
  39. package/dist/index.d.ts.map +1 -1
  40. package/dist/index.js +44 -3
  41. package/dist/index.js.map +1 -1
  42. package/dist/input.d.ts +165 -0
  43. package/dist/input.d.ts.map +1 -0
  44. package/dist/input.js +33 -0
  45. package/dist/input.js.map +1 -0
  46. package/dist/intent.d.ts +37 -0
  47. package/dist/intent.d.ts.map +1 -0
  48. package/dist/intent.js +46 -0
  49. package/dist/intent.js.map +1 -0
  50. package/dist/judgment.d.ts +131 -0
  51. package/dist/judgment.d.ts.map +1 -0
  52. package/dist/judgment.js +249 -0
  53. package/dist/judgment.js.map +1 -0
  54. package/dist/loop.d.ts +155 -6
  55. package/dist/loop.d.ts.map +1 -1
  56. package/dist/loop.js +905 -32
  57. package/dist/loop.js.map +1 -1
  58. package/dist/metrics.d.ts +35 -0
  59. package/dist/metrics.d.ts.map +1 -0
  60. package/dist/metrics.js +98 -0
  61. package/dist/metrics.js.map +1 -0
  62. package/dist/outcome.d.ts +223 -0
  63. package/dist/outcome.d.ts.map +1 -0
  64. package/dist/outcome.js +325 -0
  65. package/dist/outcome.js.map +1 -0
  66. package/dist/plan-digest.d.ts +6 -0
  67. package/dist/plan-digest.d.ts.map +1 -0
  68. package/dist/plan-digest.js +35 -0
  69. package/dist/plan-digest.js.map +1 -0
  70. package/dist/planner-wire.d.ts +11 -0
  71. package/dist/planner-wire.d.ts.map +1 -0
  72. package/dist/planner-wire.js +53 -0
  73. package/dist/planner-wire.js.map +1 -0
  74. package/dist/planner.d.ts +51 -0
  75. package/dist/planner.d.ts.map +1 -1
  76. package/dist/planner.js +74 -0
  77. package/dist/planner.js.map +1 -1
  78. package/dist/reconcile.d.ts +41 -0
  79. package/dist/reconcile.d.ts.map +1 -0
  80. package/dist/reconcile.js +20 -0
  81. package/dist/reconcile.js.map +1 -0
  82. package/dist/record.d.ts +238 -0
  83. package/dist/record.d.ts.map +1 -0
  84. package/dist/record.js +116 -0
  85. package/dist/record.js.map +1 -0
  86. package/dist/regression.d.ts +109 -0
  87. package/dist/regression.d.ts.map +1 -0
  88. package/dist/regression.js +97 -0
  89. package/dist/regression.js.map +1 -0
  90. package/dist/selection.d.ts +334 -0
  91. package/dist/selection.d.ts.map +1 -0
  92. package/dist/selection.js +481 -0
  93. package/dist/selection.js.map +1 -0
  94. package/dist/spans.d.ts +262 -0
  95. package/dist/spans.d.ts.map +1 -0
  96. package/dist/spans.js +589 -0
  97. package/dist/spans.js.map +1 -0
  98. package/dist/tool-invoker.d.ts +61 -3
  99. package/dist/tool-invoker.d.ts.map +1 -1
  100. package/dist/tool-invoker.js +26 -1
  101. package/dist/tool-invoker.js.map +1 -1
  102. package/dist/trace-context.d.ts +26 -0
  103. package/dist/trace-context.d.ts.map +1 -0
  104. package/dist/trace-context.js +59 -0
  105. package/dist/trace-context.js.map +1 -0
  106. package/dist/trace-facts.d.ts +84 -0
  107. package/dist/trace-facts.d.ts.map +1 -0
  108. package/dist/trace-facts.js +82 -0
  109. package/dist/trace-facts.js.map +1 -0
  110. package/dist/types.d.ts +253 -3
  111. package/dist/types.d.ts.map +1 -1
  112. package/dist/types.js +4 -0
  113. package/dist/types.js.map +1 -1
  114. package/package.json +19 -7
@@ -0,0 +1,249 @@
1
+ export const NOT_APPLICABLE = 'n/a';
2
+ /** The shape of a value — types and field names only, never a value. */
3
+ export function shapeOf(v, depth = 0) {
4
+ if (v === null)
5
+ return 'null';
6
+ if (Array.isArray(v))
7
+ return `array(${v.length})${v.length && depth < 2 ? `<${shapeOf(v[0], depth + 1)}>` : ''}`;
8
+ if (typeof v === 'object')
9
+ return depth < 2 ? `{${Object.keys(v).slice(0, 8).map((k) => `${k.length > 40 ? 'key' : k}:${shapeOf(v[k], depth + 1)}`).join(',')}}` : 'object';
10
+ return typeof v;
11
+ }
12
+ /** The outcomes a question admits, in order. */
13
+ export function outcomesOf(q) {
14
+ if (q.kind === 'yes-no')
15
+ return ['true', 'false'];
16
+ const base = [...(q.kind === 'scale' ? q.levels : q.options), ...(q.kind === 'choice' ? q.alsoOutcomes ?? [] : [])].map((o) => o.id);
17
+ return q.notApplicable !== undefined ? [...base, NOT_APPLICABLE] : base;
18
+ }
19
+ /** Normalise one raw distribution over a question's outcomes. Unknown keys and non-finite / negative values are
20
+ * dropped; an all-zero answer is unreadable (null). Deterministic tie-break by outcome order. */
21
+ export function answerOf(q, raw) {
22
+ if (!raw || typeof raw !== 'object')
23
+ return null;
24
+ const outcomes = outcomesOf(q);
25
+ const vals = outcomes.map((o) => { const v = raw[o]; return typeof v === 'number' && Number.isFinite(v) && v > 0 ? v : 0; });
26
+ const total = vals.reduce((s, v) => s + v, 0);
27
+ if (total <= 0)
28
+ return null;
29
+ const distribution = Object.fromEntries(outcomes.map((o, i) => [o, Number((vals[i] / total).toFixed(4))]));
30
+ const ranked = outcomes.map((o, i) => [o, vals[i] / total, i]).sort((a, b) => b[1] - a[1] || a[2] - b[2]);
31
+ const [top, p] = ranked[0];
32
+ const second = ranked[1]?.[1] ?? 0;
33
+ const out = { id: q.id, kind: q.kind, distribution, top, confidence: Number(p.toFixed(4)), lead: Number((p - second).toFixed(4)) };
34
+ if (q.kind === 'scale') {
35
+ const applicable = q.levels.map((l) => distribution[l.id] ?? 0);
36
+ const mass = applicable.reduce((s, v) => s + v, 0);
37
+ if (mass > 0)
38
+ out.expectedLevel = Number((applicable.reduce((s, v, i) => s + v * i, 0) / mass).toFixed(4));
39
+ }
40
+ return out;
41
+ }
42
+ /** Ask a decision model the questions about one state. A failed binding is `error`, never an answer (J8). */
43
+ export async function judgeQuestions(state, questions, port) {
44
+ const judgeId = { name: port.name, kind: port.kind };
45
+ let raw;
46
+ let received;
47
+ try {
48
+ ({ distributions: raw, received } = await port.decide(state, questions));
49
+ }
50
+ catch (e) {
51
+ return { judge: judgeId, answers: {}, unreadable: questions.map((q) => q.id), error: String(e?.message ?? e).slice(0, 300) };
52
+ }
53
+ const answers = {};
54
+ const unreadable = [];
55
+ for (const q of questions) {
56
+ const a = answerOf(q, raw?.[q.id]);
57
+ if (a)
58
+ answers[q.id] = a;
59
+ else
60
+ unreadable.push(q.id);
61
+ }
62
+ const shapes = unreadable.length && received ? Object.fromEntries(unreadable.filter((id) => received[id]).map((id) => [id, received[id]])) : {};
63
+ return { judge: judgeId, answers, unreadable, ...(Object.keys(shapes).length ? { received: shapes } : {}) };
64
+ }
65
+ export function applyDecisionRule(answer, rule) {
66
+ if (!answer)
67
+ return { decided: null, because: 'unreadable' };
68
+ if (answer.top === NOT_APPLICABLE)
69
+ return { decided: null, because: 'not-applicable' };
70
+ if (answer.confidence < rule.floor)
71
+ return { decided: null, because: 'below-floor' };
72
+ if (answer.lead < rule.margin)
73
+ return { decided: null, because: 'no-margin' };
74
+ return { decided: answer.top };
75
+ }
76
+ /** J10 — the explanation is COMPOSED from the numbers, never generated. */
77
+ export function explainAnswer(answer, label = (o) => o) {
78
+ const ranked = Object.entries(answer.distribution).sort((a, b) => b[1] - a[1]);
79
+ const pct = (v) => `${Math.round(v * 100)}%`;
80
+ const [top, p] = ranked[0];
81
+ const second = ranked[1];
82
+ return `${label(top)} at ${pct(p)}${second ? `, ahead of ${label(second[0])} at ${pct(second[1])}` : ''}.`;
83
+ }
84
+ // ── The structured-call binding ──────────────────────────────────────────────────────────────────────────────────
85
+ const PRIVATE_REASONING = 'Before the numbers, you may think in the `scratch` field: weigh what the request actually asks for '
86
+ + 'against each outcome. `scratch` is discarded unread — it is never shown or recorded; only the probabilities count. '
87
+ + 'Keep it under 120 words.';
88
+ const DECISION_SYSTEM = 'You are a decision model. You do not answer the request, explain, or write anything. For EACH question you are '
89
+ + 'given, assign a probability to EVERY outcome listed for it; each question\'s probabilities sum to 1. Use "n/a" '
90
+ + 'where it is offered and none of the other outcomes applies. An outcome you give 0 may be left out. Probabilities '
91
+ + 'should be calibrated: an outcome given '
92
+ + '0.8 should be right about 80% of the time. Report through the tool; its only fields are numbers.';
93
+ /** Render one question for the model (the outcomes are the enum the tool accepts). */
94
+ function renderQuestion(q) {
95
+ if (q.kind === 'yes-no')
96
+ return `[${q.id}] yes-no — "${q.statement}" — outcomes: true, false`;
97
+ const opts = [...(q.kind === 'scale' ? q.levels : q.options), ...(q.kind === 'choice' ? q.alsoOutcomes ?? [] : [])].map((o) => ` - ${o.id}: ${o.describe}`).join('\n');
98
+ const na = q.notApplicable !== undefined ? `\n - ${NOT_APPLICABLE}: ${q.notApplicable}` : '';
99
+ return `[${q.id}] ${q.kind}${q.kind === 'scale' ? ' (worst → best)' : ''} — ${q.question}\n outcomes:\n${opts}${na}`;
100
+ }
101
+ /**
102
+ * A decision model bound to one forced structured call. The tool's schema has, per question, an array of
103
+ * `{outcome, p}` with `outcome` an enum of that question's outcomes — and NOTHING ELSE: no reason, no text (J10).
104
+ * `name` is recorded on every judgment (J3); it should change whenever the prompt or the model changes (J5).
105
+ */
106
+ export function structuredCallDecisionModel(call, opts) {
107
+ return {
108
+ name: opts.name, kind: 'model',
109
+ async decide(state, questions) {
110
+ const properties = Object.fromEntries([
111
+ ...(opts.privateReasoning ? [['scratch', { type: 'string', description: 'Private working; discarded unread.' }]] : []),
112
+ ...questions.map((q) => [q.id, {
113
+ type: 'array', description: `The probability of each outcome of question ${q.id}.`,
114
+ items: { type: 'object', properties: { outcome: { type: 'string', enum: outcomesOf(q) }, p: { type: 'number', minimum: 0, maximum: 1 } }, required: ['outcome', 'p'] },
115
+ }])
116
+ ]);
117
+ const sys = opts.privateReasoning ? `${DECISION_SYSTEM} ${PRIVATE_REASONING}` : DECISION_SYSTEM;
118
+ const qs = questions.map(renderQuestion).join('\n\n');
119
+ const out = await call({
120
+ system: opts.stablePrefix ? `${sys}\n\nQuestions:\n${qs}` : sys,
121
+ messages: [{ role: 'user', content: opts.stablePrefix ? `State:\n${state}` : `State:\n${state}\n\nQuestions:\n${qs}` }],
122
+ tool: { name: 'decide', description: 'One probability per outcome, per question. Numbers only.', input_schema: { type: 'object', properties, required: questions.map((q) => q.id) } },
123
+ // Sized by the outcomes, not the questions: a model that lists every outcome (zeros included) of a 40-class
124
+ // question needs ~40 tokens per outcome, and a bound it runs out of returns no call at all.
125
+ maxTokens: opts.maxTokens ?? (opts.privateReasoning ? 500 : 300) + 40 * questions.reduce((n, q) => n + outcomesOf(q).length, 0),
126
+ });
127
+ const raw = {};
128
+ const received = {};
129
+ for (const q of questions) {
130
+ received[q.id] = out?.[q.id] === undefined ? `absent (top-level: ${shapeOf(out)})` : shapeOf(out[q.id]);
131
+ // Some hosts hand a nested array argument back as its JSON text; that is an encoding, not a different answer.
132
+ let rows = out?.[q.id];
133
+ if (typeof rows === 'string') {
134
+ try {
135
+ rows = JSON.parse(rows);
136
+ }
137
+ catch {
138
+ continue;
139
+ }
140
+ }
141
+ if (!Array.isArray(rows))
142
+ continue;
143
+ const d = {};
144
+ for (const r of rows)
145
+ if (typeof r?.outcome === 'string' && typeof r.p === 'number')
146
+ d[r.outcome] = Math.max(d[r.outcome] ?? 0, r.p);
147
+ raw[q.id] = d;
148
+ }
149
+ return { distributions: raw, received };
150
+ },
151
+ };
152
+ }
153
+ // ── Permutation-averaged judging (debiasing) ────────────────────────────────────────────────────────────────────────
154
+ // A judge reading options in a list is biased by their ORDER and by their LABELS (position bias; option-id bias). Each
155
+ // of K calls sees the choice options in a different order under neutral ids (`o1`, `o2`, …) and the yes-no questions in a
156
+ // different order under neutral ids; the answers are mapped back and the distributions AVERAGED. Averaging also turns K
157
+ // calls into a spread the consistency gate can read. The permutations are drawn from a seed derived from the state, so
158
+ // the same state is asked the same way every time (J5); what varies between repeats is the model, not the harness.
159
+ /** A small deterministic PRNG (mulberry32) seeded from a string. */
160
+ function seeded(seedText) {
161
+ let h = 2166136261;
162
+ for (let i = 0; i < seedText.length; i++) {
163
+ h ^= seedText.charCodeAt(i);
164
+ h = Math.imul(h, 16777619);
165
+ }
166
+ let a = h >>> 0;
167
+ return () => { a = (a + 0x6d2b79f5) >>> 0; let t = a; t = Math.imul(t ^ (t >>> 15), t | 1); t ^= t + Math.imul(t ^ (t >>> 7), t | 61); return ((t ^ (t >>> 14)) >>> 0) / 4294967296; };
168
+ }
169
+ function shuffled(xs, rnd) { const a = [...xs]; for (let i = a.length - 1; i > 0; i--) {
170
+ const j = Math.floor(rnd() * (i + 1));
171
+ [a[i], a[j]] = [a[j], a[i]];
172
+ } return a; }
173
+ export async function judgeQuestionsAveraged(state, questions, port, opts) {
174
+ const K = Math.max(1, Math.floor(opts.permutations));
175
+ const runs = await Promise.all(Array.from({ length: K }, async (_, k) => {
176
+ const rnd = seeded(`${k}\u0000${state}`);
177
+ const qMap = new Map(); // neutral question id → real
178
+ const oMap = new Map(); // real question id → (neutral option id → real)
179
+ const neutral = shuffled(questions, rnd).map((q, qi) => {
180
+ const nid = q.kind === 'yes-no' ? `q${qi + 1}` : q.id; // choice/scale keep their id (it names no option)
181
+ qMap.set(nid, q.id);
182
+ if (q.kind !== 'choice')
183
+ return { ...q, id: nid };
184
+ const back = new Map();
185
+ const options = shuffled(q.options, rnd).map((o, oi) => { const id = `o${oi + 1}`; back.set(id, o.id); return { id, describe: o.describe }; });
186
+ oMap.set(q.id, back);
187
+ return { ...q, id: nid, options };
188
+ });
189
+ const j = await judgeQuestions(state, neutral, port);
190
+ if (j.error !== undefined)
191
+ return { error: j.error };
192
+ const answers = {};
193
+ for (const [nid, a] of Object.entries(j.answers)) {
194
+ const real = qMap.get(nid);
195
+ const back = oMap.get(real);
196
+ answers[real] = Object.fromEntries(Object.entries(a.distribution).map(([o, v]) => [back?.get(o) ?? o, v]));
197
+ }
198
+ return { answers, received: j.received };
199
+ }));
200
+ const ok = runs.filter((r) => 'answers' in r);
201
+ const judgeId = { name: port.name, kind: port.kind };
202
+ if (!ok.length)
203
+ return { judge: judgeId, answers: {}, unreadable: questions.map((q) => q.id), error: runs[0].error, permutations: { asked: K, answered: 0 } };
204
+ const answers = {};
205
+ const unreadable = [];
206
+ for (const q of questions) {
207
+ const got = ok.map((r) => r.answers[q.id]).filter((d) => !!d);
208
+ if (!got.length) {
209
+ unreadable.push(q.id);
210
+ continue;
211
+ }
212
+ const mean = {};
213
+ for (const o of outcomesOf(q))
214
+ mean[o] = got.reduce((s, d) => s + (d[o] ?? 0), 0) / got.length;
215
+ const a = answerOf(q, mean);
216
+ if (a)
217
+ answers[q.id] = a;
218
+ else
219
+ unreadable.push(q.id);
220
+ }
221
+ const received = Object.assign({}, ...ok.map((r) => r.received ?? {}));
222
+ const shapes = unreadable.length ? Object.fromEntries(unreadable.filter((id) => received[id]).map((id) => [id, received[id]])) : {};
223
+ return { judge: judgeId, answers, unreadable, ...(Object.keys(shapes).length ? { received: shapes } : {}), permutations: { asked: K, answered: ok.length } };
224
+ }
225
+ const LETTER_SYSTEM = 'You are a decision model. Read the options and the state. Reply with exactly ONE capital letter: the '
226
+ + 'option that best answers the question for this state. No other text.';
227
+ export function logprobChoiceDecisionModel(choose, opts) {
228
+ return {
229
+ name: opts.name, kind: 'model',
230
+ async decide(state, questions) {
231
+ if (questions.length !== 1 || questions[0].kind !== 'choice')
232
+ throw new Error('the log-probability binding answers exactly one choice question per call');
233
+ const q = questions[0];
234
+ const outcomes = outcomesOf(q);
235
+ if (outcomes.length > 26)
236
+ throw new Error(`the log-probability binding offers at most 26 options (letters); this question has ${outcomes.length}`);
237
+ const letters = outcomes.map((_, i) => String.fromCharCode(65 + i));
238
+ const describe = (o) => (o === NOT_APPLICABLE ? q.notApplicable ?? 'none of these' : [...q.options, ...(q.alsoOutcomes ?? [])].find((x) => x.id === o)?.describe ?? o);
239
+ const system = `${LETTER_SYSTEM}\n\nQuestion: ${q.question}\nOptions:\n${outcomes.map((o, i) => `${letters[i]}. ${describe(o)}`).join('\n')}`;
240
+ const lp = await choose({ system, user: `State:\n${state}\n\nAnswer with one letter.`, letters });
241
+ const max = Math.max(...Object.values(lp));
242
+ const raw = {};
243
+ outcomes.forEach((o, i) => { const v = lp[letters[i]]; if (v !== undefined)
244
+ raw[o] = Math.exp(v - max); });
245
+ return { distributions: { [q.id]: raw } };
246
+ },
247
+ };
248
+ }
249
+ //# sourceMappingURL=judgment.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"judgment.js","sourceRoot":"","sources":["../src/judgment.ts"],"names":[],"mappings":"AAsBA,MAAM,CAAC,MAAM,cAAc,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AC,CAAC,CAAC,CAAC,CAAC;YAC5G,OAAO,EAAE,aAAa,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,GAAG,EAAE,EAAE,CAAC;QAC5C,CAAC;KACF,CAAC;AACJ,CAAC"}
package/dist/loop.d.ts CHANGED
@@ -1,6 +1,9 @@
1
- import type { Intent, RunResult, StepObservation, ToolSpec } from './types.js';
1
+ import type { Intent, Plan, PlanStep, RunResult, StepObservation, ToolSpec } from './types.js';
2
+ import { CONTINUE_STEP_ID } from './types.js';
2
3
  import type { Planner } from './planner.js';
3
- import type { ToolInvoker } from './tool-invoker.js';
4
+ import { type ToolInvoker } from './tool-invoker.js';
5
+ import { type SuppliedInputV1 } from './input.js';
6
+ import type { MandatePresentation, OrchestrationPorts, ResolvedStep, StepReceipt } from './authority.js';
4
7
  export interface RunIntentOpts {
5
8
  /** The injected planning port (deterministic default or the LLM adapter). */
6
9
  planner: Planner;
@@ -12,14 +15,160 @@ export interface RunIntentOpts {
12
15
  maxSteps?: number;
13
16
  /** How many times the loop re-plans after a step failure. Default 1 (one observe→re-plan cycle). */
14
17
  maxReplans?: number;
18
+ /** Spec 421 W1 — CONTINUATION: the planner may end a plan with `plan.continue` ("show me what these reads return, then
19
+ * I will plan the rest"); the loop then plans again from the SUCCESSFUL observations, through every gate a first plan
20
+ * passes. `max` bounds it per run (inside the step budget). Absent ⇒ off: the reserved step is not offered, and a plan
21
+ * naming it is refused as an unknown tool. */
22
+ continuation?: {
23
+ max: number;
24
+ };
15
25
  /** Optional observer for each executed step (telemetry; never authority). */
16
26
  onObserve?: (obs: StepObservation) => void;
27
+ /** Spec 374 §1 — WHICH STEPS ARE JUDGED ELSEWHERE. Returns the agent a step is routed to when its
28
+ * resolved subject is another agent (spec 366 R1), else null. Such a step presents no mandate HERE:
29
+ * the subject's agent judges it, and this run records the step as routed and holds what it answers. */
30
+ authorityJudgedElsewhere?: (step: ResolvedStep) => string | null;
31
+ /** Spec 350 — the authority ports. Required once any tool declares a capability. */
32
+ ports?: OrchestrationPorts;
33
+ /** Spec 350 — what the caller presented as its authority. Opaque here; the verifier reads it.
34
+ * Spec 358 W4 — MAY be a list (a keyring): a fanned-out plan needs a mandate per item, and a caller
35
+ * that has gathered several presents them together. With more than one, `selectPresentation` is
36
+ * REQUIRED — the loop never tries mandates against a step until one sticks (ADR-0013: selection is
37
+ * deterministic and separate from verification, which still judges exactly one mandate). */
38
+ presented?: MandatePresentation | MandatePresentation[] | null;
39
+ /** Choose WHICH presented mandate this step is judged under (match by payee, resource…). `null` means
40
+ * none fits — the step reports authority-required naming its own args, exactly as if nothing had been
41
+ * presented for it. Ignored when zero or one mandate is presented. */
42
+ selectPresentation?: (step: ResolvedStep, all: MandatePresentation[]) => MandatePresentation | null;
43
+ /** Spec 358 W4 — is this relation fan-out-able, and over at most how many items? The binding lives in
44
+ * the ontology package; injecting it keeps this loop domain-free. Absent ⇒ every forEach is refused. */
45
+ fanOut?: (relation: string) => {
46
+ maxItems: number;
47
+ } | null;
48
+ /** The run's reference — the A2A taskId when run inside `A2aTaskDO`. Defaults to a random id. */
49
+ runRef?: string;
50
+ /**
51
+ * Spec 370 P1 — RESUME FROM A CHECKPOINT. `plan` is the plan the run was admitted with (the planner is
52
+ * not asked again — the intent is the same intent, and a second plan for it would be a second run);
53
+ * `completed` are the steps that already ran, by stepRef, with what they returned and the receipt
54
+ * that recorded them.
55
+ *
56
+ * A completed step REPLAYS: its observation is taken as recorded, its result feeds `$ref`s exactly as
57
+ * it did, its receipt is carried, and neither the invoker nor the verifier is called — there is no new
58
+ * attempt to authorize (spec 362 §0.1, gate 4). Every step that has NOT run goes through the verifier
59
+ * as if for the first time: the checkpoint carries what happened, never permission for what has not.
60
+ * The plan is re-admitted regardless (admission is deterministic and reads only declarations).
61
+ */
62
+ resume?: {
63
+ plan: Plan;
64
+ completed: ReadonlyArray<{
65
+ stepRef: string;
66
+ result?: unknown;
67
+ receipt?: StepReceipt;
68
+ }>;
69
+ };
70
+ /** Spec 367 §5 — the execution binding for a resolved step, recorded on its receipt. */
71
+ bindingFor?: (step: ResolvedStep) => import('./authority.js').ExecutionBindingV1 | undefined;
72
+ /**
73
+ * Spec 360 — the playbook's declared consequences. A map keyed by capability id, OR a RESOLVER called
74
+ * per step.
75
+ *
76
+ * The resolver exists because an effect follows THE ACT, and the agent whose authority an act spends is
77
+ * not known until the step is resolved: a payment's receipt belongs to the treasury whose funds moved,
78
+ * not to whichever agent the person happened to be talking to. Passing a static map would tie every
79
+ * consequence to the addressee, which is the wrong agent for exactly the case the feature exists for.
80
+ *
81
+ * Either way the loop never reads INSIDE an effect — it obtains them and hands them to the sink.
82
+ */
83
+ declaredEffects?: Record<string, unknown[]> | ((capabilityId: string, step: ResolvedStep) => unknown[] | Promise<unknown[]>);
84
+ /** Spec 354 §4.5 — the playbook that admitted this run (canonical id + version + definition digest).
85
+ * Stamped onto every receipt so a run's receipt names WHICH procedure shaped it. Injected — the loop
86
+ * stays domain-free and never reads a vault. Absent ⇒ the bare harness; receipts carry no skillRef. */
87
+ skillRef?: {
88
+ skillId: string;
89
+ version: string;
90
+ commitment: string;
91
+ };
92
+ /** Spec 414 A1 — which SKILL.md contract a tool came from, as the compiled definition says (injected, like
93
+ * skillRef). Absent, or undefined for a tool ⇒ the receipt names no per-step skill. */
94
+ skillOf?: (toolId: string) => {
95
+ id: string;
96
+ version: string;
97
+ contractDigest: string;
98
+ } | undefined;
99
+ /**
100
+ * Spec 413 — ONE DECLARED RETRIEVAL STEP, run before the first plan (a playbook's `retrievalQueries`, the harness's
101
+ * wiring). It is a real step: `StepProposed` → `ToolInvoked` → a receipt at stepRef `retrieve`, so the trace shows it.
102
+ * Its observation joins the run's observations — what the ANSWER is composed from — and is kept OUT of every planner
103
+ * input, first plan and re-plan alike: retrieved passages ground what is said, never what is done, so they neither
104
+ * reach a prompt nor mark the run as having read untrusted content. Only an informational tool may be named (a
105
+ * retrieval that needed a mandate would not be retrieval); anything else is refused before anything runs. Skipped on
106
+ * resume (the checkpoint carries what happened). A failed or empty retrieval is recorded as such and the run goes on.
107
+ */
108
+ retrieval?: {
109
+ toolId: string;
110
+ args: Record<string, unknown>;
111
+ /** Spec 416 §4g — run the retrieval only when the PLAN needs it (evaluated after planning; the passages are never
112
+ * planner input, so nothing is lost by waiting). Absent ⇒ before the plan, always (spec 413 as written). */
113
+ onlyIf?: (plan: Plan) => boolean;
114
+ };
115
+ /** Unix-seconds clock, injected so receipts are deterministic in tests. */
116
+ now?: () => number;
117
+ /** What to do when a step needs a mandate and none was presented. `'throw'` (the default, unchanged)
118
+ * fails closed with `no_mandate_presented`. `'report'` returns `outcome: 'authority-required'` naming
119
+ * the step, so an Ask surface can tell the person what authority it would need instead of refusing —
120
+ * it grants nothing: the caller must come back with a mandate, which is then verified as always. */
121
+ onMissingMandate?: 'throw' | 'report';
122
+ /** Spec 418 §12 — a COMPARISON run holds its self-acting writes: the step is reached, its args normalised and resolved,
123
+ * and its receipt recorded as `skipped` ("dry run"), but the invoker is not called — so an experiment never changes the
124
+ * estate its cases assume, nor writes test data into a person's vault. Never set on a person's own run. */
125
+ dryRunSelfActs?: boolean;
126
+ /**
127
+ * Normalise a step's args before ANYTHING judges them — spec 350 §3.1.
128
+ *
129
+ * A planner writes what the person said: `payee: "alice2.treasury"`, `asset: "usdc"`. Those are correct
130
+ * English and cannot be verified against anything: an allowlist holds addresses. Normalising later (when
131
+ * a mandate is minted, say) fixes the display and leaves the RUN judging the words — which denied a
132
+ * payment whose mandate was correct, for a target that was never really wrong.
133
+ *
134
+ * So the substrate gets one place to turn the person's language into its own, ahead of the capability
135
+ * extraction, the verifier and the invoker alike. It may not change WHICH tool runs or WHAT it is
136
+ * allowed to do: resolving a name is reading an argument, not widening a grant.
137
+ */
138
+ normalizeArgs?: (input: {
139
+ toolId: string;
140
+ tool: ToolSpec;
141
+ args: Record<string, unknown>;
142
+ }) => Promise<Record<string, unknown>>;
143
+ /** Spec 376 W2 — a step's `executor` as the plan named it (a person's words, "runtime-c3s0.svc") turned into
144
+ * the agent's address in the asker's own tier, or a question when several answer to it. `undefined` ⇒ the
145
+ * step runs here. Called for every step that names one; may throw `InputRequired` like `normalizeArgs`. */
146
+ resolveExecutor?: (input: {
147
+ step: PlanStep;
148
+ tool: ToolSpec;
149
+ }) => Promise<string | undefined>;
150
+ /**
151
+ * Spec 363 W6 — the DECISIONS made while normalising this step, for its receipt.
152
+ *
153
+ * The loop does not decide anything: normalisation is where words become canonical values, and where a
154
+ * decision point answers instead of asking. So the caller that ran it is the one that knows, and this
155
+ * is how it says — a port, like every other thing the loop does not own.
156
+ */
157
+ decisionsFor?: (toolId: string, args: Record<string, unknown>) => ReadonlyArray<NonNullable<StepReceipt['decisions']>[number]>;
158
+ /** Spec 350 §3.4 — answers to prompts an earlier run of THIS intent raised (a resume). Handed to each
159
+ * tool by stepRef. A resume is a full re-run: every step passes the verifier again, and a step that
160
+ * already executed is re-invoked under the same idempotency key (an invoker makes it a no-op). */
161
+ supplied?: SuppliedInputV1[];
17
162
  }
163
+ /** Spec 413 — the stepRef of the declared pre-plan retrieval step. */
164
+ export declare const RETRIEVAL_STEP_REF = "retrieve";
18
165
  /**
19
- * Run an intent to a terminal result. Plans, executes the steps in order (threading `ref` results into later
20
- * args), observes, and re-plans (bounded) when a step throws. Returns `completed` with the last successful
21
- * step's result, or `failed` with the error. Fail-closed throughout: an unknown tool, an empty plan, no plan,
22
- * or an exhausted step budget all produce a `failed` RunResult (never a misleading empty success).
166
+ * The indices of the batch starting at `i`: the step and the consecutive steps after it that may run
167
+ * beside it (spec 370 P3). A step runs beside others only when its tool exercises no capability, it fans
168
+ * nothing out, no `after` edge points into the batch, none of its `$ref`s (or its `when`) name a result the
169
+ * batch produces, and it is not a replay (a replay is instant; keeping it alone keeps the order obvious).
23
170
  */
171
+ export { CONTINUE_STEP_ID };
172
+ export declare const CONTINUE_TOOL: ToolSpec;
24
173
  export declare function runIntent(intent: Intent, opts: RunIntentOpts): Promise<RunResult>;
25
174
  //# sourceMappingURL=loop.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../src/loop.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAkB,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAE/F,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAiB,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAEpE,MAAM,WAAW,aAAa;IAC5B,6EAA6E;IAC7E,OAAO,EAAE,OAAO,CAAC;IACjB,qFAAqF;IACrF,KAAK,EAAE,QAAQ,EAAE,CAAC;IAClB,kFAAkF;IAClF,MAAM,EAAE,WAAW,CAAC;IACpB,0EAA0E;IAC1E,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oGAAoG;IACpG,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6EAA6E;IAC7E,SAAS,CAAC,EAAE,CAAC,GAAG,EAAE,eAAe,KAAK,IAAI,CAAC;CAC5C;AAiDD;;;;;GAKG;AACH,wBAAsB,SAAS,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,aAAa,GAAG,OAAO,CAAC,SAAS,CAAC,CA6DvF"}
1
+ {"version":3,"file":"loop.d.ts","sourceRoot":"","sources":["../src/loop.ts"],"names":[],"mappings":"AAmBA,OAAO,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAC/F,OAAO,EAAE,gBAAgB,EAAsB,MAAM,YAAY,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAA8C,KAAK,WAAW,EAA0B,MAAM,mBAAmB,CAAC;AACzH,OAAO,EAA8C,KAAK,eAAe,EAAE,MAAM,YAAY,CAAC;AAE9F,OAAO,KAAK,EACwB,mBAAmB,E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