agentfootprint 9.23.0 → 9.24.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/dist/core/Agent.js +12 -0
- package/dist/core/Agent.js.map +1 -1
- package/dist/core/RunnerBase.js +8 -0
- package/dist/core/RunnerBase.js.map +1 -1
- package/dist/core/agent/middleware/ledger.js +1 -0
- package/dist/core/agent/middleware/ledger.js.map +1 -1
- package/dist/core/agent/middleware/outcomes.js +10 -2
- package/dist/core/agent/middleware/outcomes.js.map +1 -1
- package/dist/core/agent/stages/toolCalls.js +124 -0
- package/dist/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/core/askComponent.js +143 -0
- package/dist/core/askComponent.js.map +1 -0
- package/dist/core/checkin.js.map +1 -1
- package/dist/core/pause.js.map +1 -1
- package/dist/core/tools.js +16 -0
- package/dist/core/tools.js.map +1 -1
- package/dist/esm/core/Agent.js +12 -0
- package/dist/esm/core/Agent.js.map +1 -1
- package/dist/esm/core/RunnerBase.js +8 -0
- package/dist/esm/core/RunnerBase.js.map +1 -1
- package/dist/esm/core/agent/middleware/ledger.js +1 -0
- package/dist/esm/core/agent/middleware/ledger.js.map +1 -1
- package/dist/esm/core/agent/middleware/outcomes.js +10 -2
- package/dist/esm/core/agent/middleware/outcomes.js.map +1 -1
- package/dist/esm/core/agent/middleware/types.d.ts +14 -0
- package/dist/esm/core/agent/stages/toolCalls.js +124 -0
- package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
- package/dist/esm/core/agent/types.d.ts +1 -0
- package/dist/esm/core/askComponent.d.ts +121 -0
- package/dist/esm/core/askComponent.js +137 -0
- package/dist/esm/core/askComponent.js.map +1 -0
- package/dist/esm/core/checkin.d.ts +10 -0
- package/dist/esm/core/checkin.js.map +1 -1
- package/dist/esm/core/pause.d.ts +8 -0
- package/dist/esm/core/pause.js.map +1 -1
- package/dist/esm/core/tools.d.ts +16 -0
- package/dist/esm/core/tools.js +16 -0
- package/dist/esm/core/tools.js.map +1 -1
- package/dist/esm/events/payloads.d.ts +12 -0
- package/dist/esm/hosting/standingAgent.js +7 -0
- package/dist/esm/hosting/standingAgent.js.map +1 -1
- package/dist/esm/hosting/types.d.ts +20 -0
- package/dist/esm/hosting/types.js.map +1 -1
- package/dist/esm/index.d.ts +1 -0
- package/dist/esm/index.js +12 -0
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/recorders/core/CheckInRecorder.d.ts +3 -0
- package/dist/esm/recorders/core/CheckInRecorder.js +1 -0
- package/dist/esm/recorders/core/CheckInRecorder.js.map +1 -1
- package/dist/hosting/standingAgent.js +7 -0
- package/dist/hosting/standingAgent.js.map +1 -1
- package/dist/hosting/types.js.map +1 -1
- package/dist/index.js +18 -3
- package/dist/index.js.map +1 -1
- package/dist/recorders/core/CheckInRecorder.js +1 -0
- package/dist/recorders/core/CheckInRecorder.js.map +1 -1
- package/dist/types/core/Agent.d.ts.map +1 -1
- package/dist/types/core/RunnerBase.d.ts.map +1 -1
- package/dist/types/core/agent/middleware/ledger.d.ts.map +1 -1
- package/dist/types/core/agent/middleware/outcomes.d.ts.map +1 -1
- package/dist/types/core/agent/middleware/types.d.ts +14 -0
- package/dist/types/core/agent/middleware/types.d.ts.map +1 -1
- package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
- package/dist/types/core/agent/types.d.ts +1 -0
- package/dist/types/core/agent/types.d.ts.map +1 -1
- package/dist/types/core/askComponent.d.ts +122 -0
- package/dist/types/core/askComponent.d.ts.map +1 -0
- package/dist/types/core/checkin.d.ts +10 -0
- package/dist/types/core/checkin.d.ts.map +1 -1
- package/dist/types/core/pause.d.ts +8 -0
- package/dist/types/core/pause.d.ts.map +1 -1
- package/dist/types/core/tools.d.ts +16 -0
- package/dist/types/core/tools.d.ts.map +1 -1
- package/dist/types/events/payloads.d.ts +12 -0
- package/dist/types/events/payloads.d.ts.map +1 -1
- package/dist/types/hosting/standingAgent.d.ts.map +1 -1
- package/dist/types/hosting/types.d.ts +20 -0
- package/dist/types/hosting/types.d.ts.map +1 -1
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/recorders/core/CheckInRecorder.d.ts +3 -0
- package/dist/types/recorders/core/CheckInRecorder.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RunnerBase.js","sourceRoot":"","sources":["../../../src/core/RunnerBase.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AASH,OAAO,EAAE,eAAe,EAAE,MAAM,yBAAyB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,wBAAwB,CAAC;AAClE,OAAO,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAC;AAgBlD,OAAO,EACL,2BAA2B,EAC3B,kBAAkB,EAClB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAE,aAAa,EAAE,MAAM,4BAA4B,CAAC;AAC3D,OAAO,EACL,eAAe,GAGhB,MAAM,iDAAiD,CAAC;AACzD,OAAO,EACL,wBAAwB,GAGzB,MAAM,kDAAkD,CAAC;AAI1D,IAAI,SAAS,GAAG,CAAC,CAAC;AAElB;;GAEG;AACH,MAAM,UAAU,SAAS;IACvB,OAAO,OAAO,IAAI,CAAC,GAAG,EAAE,IAAI,EAAE,SAAS,EAAE,CAAC;AAC5C,CAAC;AAED,MAAM,OAAgB,UAAU;IACX,UAAU,GAAG,IAAI,eAAe,EAAE,CAAC;IACnC,iBAAiB,GAAuB,EAAE,CAAC;IAE9D;;;;;OAKG;IACO,YAAY,CAAgC;IAEtD;;;;;;;;;;;;;;;;;;;;OAoBG;IACK,KAAK,CAAwB;IAErC;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,eAAe;QACb,OAAO,IAAI,CAAC,YAAY,EAAE,WAAW,EAAE,CAAC;IAC1C,CAAC;IAED;;;;;;;;;;OAUG;IACH,WAAW;QACT,OAAO,IAAI,CAAC,eAAe,EAAE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,CAAC;AACH,CAAC"}
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
* transform is the only thing here that makes the trace and the wire
|
|
15
15
|
* disagree, so it is the only thing required to say why.
|
|
16
16
|
*/
|
|
17
|
+
import { assertAskComponent } from '../../askComponent.js';
|
|
17
18
|
export function allow(value, why) {
|
|
18
19
|
if (value === undefined) {
|
|
19
20
|
return typeof why === 'string' && why.length > 0 ? { kind: 'allow', why } : { kind: 'allow' };
|
|
@@ -59,8 +60,15 @@ export function ask(payload) {
|
|
|
59
60
|
typeof payload !== 'object' ||
|
|
60
61
|
typeof payload.question !== 'string' ||
|
|
61
62
|
payload.question.length === 0) {
|
|
62
|
-
throw new Error('ask(payload): expected { question, detail? } with a non-empty question.
|
|
63
|
-
'is what a person is shown when the run pauses.');
|
|
63
|
+
throw new Error('ask(payload): expected { question, detail?, component? } with a non-empty question. ' +
|
|
64
|
+
'The question is what a person is shown when the run pauses.');
|
|
65
|
+
}
|
|
66
|
+
// A malformed component fails HERE, in the middleware author's own stack —
|
|
67
|
+
// not as a raise-time refusal attributed to the tool call it happened to
|
|
68
|
+
// gate. Whether a `propsRef` RESOLVES is the dispatch loop's question (it
|
|
69
|
+
// has the store and the run's scope); the shape is this constructor's.
|
|
70
|
+
if (payload.component !== undefined) {
|
|
71
|
+
assertAskComponent(payload.component, 'ask(payload)');
|
|
64
72
|
}
|
|
65
73
|
return { kind: 'ask', payload };
|
|
66
74
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"outcomes.js","sourceRoot":"","sources":["../../../../../src/core/agent/middleware/outcomes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;
|
|
1
|
+
{"version":3,"file":"outcomes.js","sourceRoot":"","sources":["../../../../../src/core/agent/middleware/outcomes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAsB3D,MAAM,UAAU,KA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ACpC,kBAAkB,CAAC,OAAO,CAAC,SAAS,EAAE,cAAc,CAAC,CAAC;IACxD,CAAC;IACD,OAAO,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,CAAC;AAClC,CAAC"}
|
|
@@ -67,6 +67,7 @@
|
|
|
67
67
|
* pause machinery that already exists.
|
|
68
68
|
*/
|
|
69
69
|
import type { LLMMessage } from '../../../adapters/types.js';
|
|
70
|
+
import type { AskComponent } from '../../askComponent.js';
|
|
70
71
|
import type { MemoryIdentity } from '../../../memory/identity/types.js';
|
|
71
72
|
import type { LoopMoment } from '../moments.js';
|
|
72
73
|
/**
|
|
@@ -106,6 +107,13 @@ export interface AskPayload {
|
|
|
106
107
|
readonly question: string;
|
|
107
108
|
/** Anything else the answering UI should render. Never interpreted here. */
|
|
108
109
|
readonly detail?: unknown;
|
|
110
|
+
/**
|
|
111
|
+
* Which REGISTERED screen component collects the answer (9.24.0) — ids and
|
|
112
|
+
* props only, never markup. Small props inline; big props as an artifact
|
|
113
|
+
* ref (`propsRef`), validated to resolve at raise time. Absent → the prose
|
|
114
|
+
* `question`, exactly as before.
|
|
115
|
+
*/
|
|
116
|
+
readonly component?: AskComponent;
|
|
109
117
|
}
|
|
110
118
|
/**
|
|
111
119
|
* Everything a tool middleware may answer. Closed, and every arm has a
|
|
@@ -321,5 +329,11 @@ export interface MiddlewareDecision {
|
|
|
321
329
|
readonly before?: unknown;
|
|
322
330
|
/** The value after this middleware. Present only when `changed`. */
|
|
323
331
|
readonly after?: unknown;
|
|
332
|
+
/**
|
|
333
|
+
* The registered component that COLLECTED this decision (9.24.0). Present
|
|
334
|
+
* only on the resume-side rows of an `ask` that carried one — the trace
|
|
335
|
+
* then says which surface the person answered through. Never inferred.
|
|
336
|
+
*/
|
|
337
|
+
readonly componentId?: string;
|
|
324
338
|
}
|
|
325
339
|
export {};
|
|
@@ -55,6 +55,7 @@ import { PRESENT_TOOL_NAME, presentArtifact } from '../../../artifacts/present.j
|
|
|
55
55
|
import { placedResultKind, placedToolResult, } from '../../../artifacts/placement.js';
|
|
56
56
|
import { CONSENT_PAUSE_KEY, consentQuestion, modelRefusal } from '../../../identity/consent.js';
|
|
57
57
|
import { isPauseRequest, PauseAnswerRequiredError } from '../../pause.js';
|
|
58
|
+
import { assertAskComponent, InvalidAskComponentError, } from '../../askComponent.js';
|
|
58
59
|
import { shouldCheckIn, isCheckInDecision, checkInDeclined, } from '../../checkin.js';
|
|
59
60
|
import { runToolChain, runToolAfterChain } from '../middleware/runChain.js';
|
|
60
61
|
import { recordDecisions } from '../middleware/ledger.js';
|
|
@@ -785,6 +786,63 @@ export function buildToolCallsHandler(deps) {
|
|
|
785
786
|
...(verdict.resolved.length > 0 && { wanted: verdict.wanted }),
|
|
786
787
|
};
|
|
787
788
|
};
|
|
789
|
+
// ── Typed-HITL ask components at raise time (9.24.0) ───────────────────
|
|
790
|
+
// The ONE gatekeeper every component-carrying ask passes through before it
|
|
791
|
+
// is allowed to pause: `askHuman({ component })`, a middleware `ask`, and a
|
|
792
|
+
// tool's `checkInComponent` all land here. Shape first (the door the value
|
|
793
|
+
// arrived through is named in the refusal), then the `propsRef` questions
|
|
794
|
+
// only a raise site can answer — is there a store, and does the ref resolve
|
|
795
|
+
// in THIS run's scope. A dangling ref is refused at its source, loudly (the
|
|
796
|
+
// run fails with the teaching error), never handed to a screen to discover:
|
|
797
|
+
// a pause whose component cannot render is a question a person
|
|
798
|
+
// half-receives, and silently downgrading a consent gate to prose would be
|
|
799
|
+
// accepted-and-silently-wrong. Refusals + resolutions land on the record as
|
|
800
|
+
// `artifacts.refused { op: 'dispatch' }` / `artifacts.resolved` — the same
|
|
801
|
+
// facts a `wants` resolution files. Asks WITHOUT a component never reach
|
|
802
|
+
// this function: zero reads, zero events, byte-identical.
|
|
803
|
+
const assertComponentDeliverable = async (scope, toolName, component, door) => {
|
|
804
|
+
assertAskComponent(component, door);
|
|
805
|
+
const ref = component.propsRef;
|
|
806
|
+
if (ref === undefined)
|
|
807
|
+
return component;
|
|
808
|
+
const store = deps.artifactStore;
|
|
809
|
+
if (store === undefined) {
|
|
810
|
+
typedEmit(scope, 'agentfootprint.artifacts.refused', {
|
|
811
|
+
op: 'dispatch',
|
|
812
|
+
reason: 'no-store',
|
|
813
|
+
ref,
|
|
814
|
+
detail: `${door}: component.propsRef set but no artifact store is attached`,
|
|
815
|
+
tool: toolName,
|
|
816
|
+
});
|
|
817
|
+
throw new InvalidAskComponentError('no-store', door, `component.propsRef ('${ref}') is set but no artifact store is attached, so the ` +
|
|
818
|
+
`screen could never redeem it. Pass \`artifacts\` to Agent.create({ ..., artifacts }) ` +
|
|
819
|
+
`— inMemoryArtifacts(), fileArtifacts({ directory }) or sqliteArtifacts({ file }) — ` +
|
|
820
|
+
`or carry the payload inline as component.props.`, ref);
|
|
821
|
+
}
|
|
822
|
+
const meta = await store.head(runScopeOf(scope), ref);
|
|
823
|
+
if (meta === null) {
|
|
824
|
+
typedEmit(scope, 'agentfootprint.artifacts.refused', {
|
|
825
|
+
op: 'dispatch',
|
|
826
|
+
reason: 'missing-or-expired',
|
|
827
|
+
ref,
|
|
828
|
+
detail: `${door}: component.propsRef does not resolve in this run's scope`,
|
|
829
|
+
tool: toolName,
|
|
830
|
+
});
|
|
831
|
+
throw new InvalidAskComponentError('unresolved-ref', door, `component.propsRef ('${ref}') does not resolve in this run's artifact scope — ` +
|
|
832
|
+
`missing, expired, or minted under a different scope. Mint the props BEFORE raising ` +
|
|
833
|
+
`the ask (ctx.artifacts.put(...) in the same run) and pass the ref it returns; a ` +
|
|
834
|
+
`ref the screen cannot redeem must be refused here, at the source, not discovered ` +
|
|
835
|
+
`by the person answering.`, ref);
|
|
836
|
+
}
|
|
837
|
+
typedEmit(scope, 'agentfootprint.artifacts.resolved', {
|
|
838
|
+
ref: meta.ref,
|
|
839
|
+
via: 'head',
|
|
840
|
+
kind: meta.kind,
|
|
841
|
+
bytes: meta.bytes,
|
|
842
|
+
tool: toolName,
|
|
843
|
+
});
|
|
844
|
+
return component;
|
|
845
|
+
};
|
|
788
846
|
// ── The `present` tool's authoritative result (9.22.0, Leg 2) ──────────
|
|
789
847
|
// The skip_step pattern: the auto-attached placeholder ran; the stage —
|
|
790
848
|
// which owns the scope, the store and the emit channel — OVERWRITES its
|
|
@@ -1452,6 +1510,17 @@ export function buildToolCallsHandler(deps) {
|
|
|
1452
1510
|
result = chain.reason;
|
|
1453
1511
|
}
|
|
1454
1512
|
else if (chain.kind === 'ask') {
|
|
1513
|
+
// The typed half of the question (9.24.0), judged BEFORE anything
|
|
1514
|
+
// is committed: a component the screen could not render must
|
|
1515
|
+
// refuse here, at the source, not pause and be discovered. The
|
|
1516
|
+
// `ask()` constructor already checked the shape; a hand-built
|
|
1517
|
+
// outcome literal bypasses it, so the shape is re-asserted at
|
|
1518
|
+
// this boundary (cheap, idempotent) along with the propsRef
|
|
1519
|
+
// resolution only a raise site can judge. Asks without a
|
|
1520
|
+
// component skip all of it.
|
|
1521
|
+
const askComponent = chain.payload.component !== undefined
|
|
1522
|
+
? await assertComponentDeliverable(scope, tc.name, chain.payload.component, `ask middleware '${chain.middleware}'`)
|
|
1523
|
+
: undefined;
|
|
1455
1524
|
// Commit partial state so resume() finds history intact (the
|
|
1456
1525
|
// pauseHere / check-in path does the same). The TRANSFORMED args
|
|
1457
1526
|
// ride the checkpoint: a person approves what the chain produced,
|
|
@@ -1464,6 +1533,12 @@ export function buildToolCallsHandler(deps) {
|
|
|
1464
1533
|
scope.pausedAskArgs = chain.args;
|
|
1465
1534
|
scope.pausedAskIndex = chain.index;
|
|
1466
1535
|
scope.pausedAskMiddleware = chain.middleware;
|
|
1536
|
+
// Which surface will collect the decision — carried so the
|
|
1537
|
+
// resume-side ledger rows can say which component ANSWERED.
|
|
1538
|
+
// Written only when one exists: a component-less ask's
|
|
1539
|
+
// checkpoint stays byte-identical.
|
|
1540
|
+
if (askComponent !== undefined)
|
|
1541
|
+
scope.pausedComponentId = askComponent.componentId;
|
|
1467
1542
|
// A defined return value triggers the footprintjs pause; this
|
|
1468
1543
|
// object becomes the checkpoint's pauseData, and detectPause
|
|
1469
1544
|
// surfaces `pauseData.ask` as `outcome.ask`.
|
|
@@ -1544,6 +1619,13 @@ export function buildToolCallsHandler(deps) {
|
|
|
1544
1619
|
// path below (this `if` block is the ONLY thing the gate adds).
|
|
1545
1620
|
}
|
|
1546
1621
|
else {
|
|
1622
|
+
// The tool's declared decision component (9.24.0), judged BEFORE
|
|
1623
|
+
// the evidence pack is assembled — a gate that cannot be honored
|
|
1624
|
+
// as declared refuses before any work, and a dangling propsRef is
|
|
1625
|
+
// refused at this source rather than discovered by the screen.
|
|
1626
|
+
const gateComponent = tool.checkInComponent !== undefined
|
|
1627
|
+
? await assertComponentDeliverable(scope, tc.name, tool.checkInComponent, `tool '${tc.name}' checkInComponent`)
|
|
1628
|
+
: undefined;
|
|
1547
1629
|
const intent = scope.llmLatestContent ? String(scope.llmLatestContent) : undefined;
|
|
1548
1630
|
const evidence = await deps.checkIn.assembler({
|
|
1549
1631
|
tool: { name: tc.name, description: tool.schema.description },
|
|
@@ -1559,6 +1641,7 @@ export function buildToolCallsHandler(deps) {
|
|
|
1559
1641
|
args: callArgs,
|
|
1560
1642
|
...(intent !== undefined && { intent }),
|
|
1561
1643
|
evidence,
|
|
1644
|
+
...(gateComponent !== undefined && { component: gateComponent }),
|
|
1562
1645
|
};
|
|
1563
1646
|
typedEmit(scope, 'agentfootprint.checkin.request', {
|
|
1564
1647
|
toolName: tc.name,
|
|
@@ -1575,6 +1658,11 @@ export function buildToolCallsHandler(deps) {
|
|
|
1575
1658
|
scope.pausedToolStartMs = startMs;
|
|
1576
1659
|
scope.pausedCheckIn = true;
|
|
1577
1660
|
scope.pausedCheckInArgs = callArgs;
|
|
1661
|
+
// Which surface will collect the decision — read back on resume
|
|
1662
|
+
// so `checkin.decision` says which component ANSWERED. Written
|
|
1663
|
+
// only when one exists (byte-identical otherwise).
|
|
1664
|
+
if (gateComponent !== undefined)
|
|
1665
|
+
scope.pausedComponentId = gateComponent.componentId;
|
|
1578
1666
|
// Returning a defined value triggers the footprintjs pause; the
|
|
1579
1667
|
// returned object becomes the checkpoint's pauseData. detectPause
|
|
1580
1668
|
// surfaces `pauseData.checkIn` as `outcome.checkIn`.
|
|
@@ -1765,6 +1853,22 @@ export function buildToolCallsHandler(deps) {
|
|
|
1765
1853
|
}
|
|
1766
1854
|
catch (err) {
|
|
1767
1855
|
if (isPauseRequest(err)) {
|
|
1856
|
+
// The typed half of the question (9.24.0): a tool that raised
|
|
1857
|
+
// `askHuman({ question, component })` nominated a screen
|
|
1858
|
+
// component, and the nomination is judged HERE — the raise
|
|
1859
|
+
// site — before the pause is allowed to happen. The tool
|
|
1860
|
+
// usually minted `propsRef` via ctx.artifacts moments ago;
|
|
1861
|
+
// this validates the ref it chose to carry still resolves in
|
|
1862
|
+
// this run's scope, so the throw (which fails the run loudly,
|
|
1863
|
+
// naming the fix) lands in the author's lap and never in the
|
|
1864
|
+
// answering person's. Pauses without a component skip this
|
|
1865
|
+
// entirely — byte-identical.
|
|
1866
|
+
if (typeof err.data === 'object' && err.data !== null) {
|
|
1867
|
+
const rawComponent = err.data.component;
|
|
1868
|
+
if (rawComponent !== undefined) {
|
|
1869
|
+
await assertComponentDeliverable(scope, tc.name, rawComponent, `askHuman in tool '${tc.name}'`);
|
|
1870
|
+
}
|
|
1871
|
+
}
|
|
1768
1872
|
// A pause has NOT settled this call — it is waiting for a
|
|
1769
1873
|
// person, and the resources it opened are what the resume
|
|
1770
1874
|
// needs. No `'call'` teardown here, deliberately.
|
|
@@ -2103,6 +2207,10 @@ export function buildToolCallsHandler(deps) {
|
|
|
2103
2207
|
const args = (scope.pausedAskArgs ?? {});
|
|
2104
2208
|
const askIndex = (scope.pausedAskIndex ?? 0);
|
|
2105
2209
|
const askedBy = (scope.pausedAskMiddleware ?? 'middleware');
|
|
2210
|
+
// The registered component that COLLECTED this decision (9.24.0),
|
|
2211
|
+
// written at pause time only when the ask carried one — the ledger
|
|
2212
|
+
// rows below then say which surface the person answered through.
|
|
2213
|
+
const answeredVia = scope.pausedComponentId;
|
|
2106
2214
|
const decision = isCheckInDecision(input)
|
|
2107
2215
|
? input
|
|
2108
2216
|
: checkInDeclined({ by: 'unknown', note: 'resume input was not a CheckInDecision' });
|
|
@@ -2129,6 +2237,7 @@ export function buildToolCallsHandler(deps) {
|
|
|
2129
2237
|
outcome: 'deny',
|
|
2130
2238
|
changed: false,
|
|
2131
2239
|
why: `declined by ${decision.by}${decision.note ? `: ${decision.note}` : ''}`,
|
|
2240
|
+
...(answeredVia !== undefined && { componentId: answeredVia }),
|
|
2132
2241
|
},
|
|
2133
2242
|
]);
|
|
2134
2243
|
}
|
|
@@ -2144,6 +2253,7 @@ export function buildToolCallsHandler(deps) {
|
|
|
2144
2253
|
outcome: 'allow',
|
|
2145
2254
|
changed: false,
|
|
2146
2255
|
why: `approved by ${decision.by}${decision.note ? `: ${decision.note}` : ''}`,
|
|
2256
|
+
...(answeredVia !== undefined && { componentId: answeredVia }),
|
|
2147
2257
|
},
|
|
2148
2258
|
]);
|
|
2149
2259
|
// Continue the chain from the link AFTER the one that asked. Its
|
|
@@ -2333,6 +2443,11 @@ export function buildToolCallsHandler(deps) {
|
|
|
2333
2443
|
scope.pausedAskArgs = undefined;
|
|
2334
2444
|
scope.pausedAskIndex = undefined;
|
|
2335
2445
|
scope.pausedAskMiddleware = undefined;
|
|
2446
|
+
// Cleared ONLY when it was set: a later component-less pause in this
|
|
2447
|
+
// run must not inherit this ask's surface, and a run that never
|
|
2448
|
+
// carried one must not gain the key (byte-identical).
|
|
2449
|
+
if (answeredVia !== undefined)
|
|
2450
|
+
scope.pausedComponentId = undefined;
|
|
2336
2451
|
return;
|
|
2337
2452
|
}
|
|
2338
2453
|
// ── Check-in decision path ───────────────────────────────────────
|
|
@@ -2351,6 +2466,11 @@ export function buildToolCallsHandler(deps) {
|
|
|
2351
2466
|
const decision = isCheckInDecision(input)
|
|
2352
2467
|
? input
|
|
2353
2468
|
: checkInDeclined({ by: 'unknown', note: 'resume input was not a CheckInDecision' });
|
|
2469
|
+
// The registered component that COLLECTED this decision (9.24.0),
|
|
2470
|
+
// written at pause time only when the ask carried one. The decision
|
|
2471
|
+
// stays exactly what it was — a structured `CheckInDecision`, never
|
|
2472
|
+
// parsed from prose — and the record now says which surface asked.
|
|
2473
|
+
const answeredVia = scope.pausedComponentId;
|
|
2354
2474
|
typedEmit(scope, 'agentfootprint.checkin.decision', {
|
|
2355
2475
|
toolName,
|
|
2356
2476
|
toolCallId,
|
|
@@ -2358,6 +2478,7 @@ export function buildToolCallsHandler(deps) {
|
|
|
2358
2478
|
approved: decision.approved,
|
|
2359
2479
|
by: decision.by,
|
|
2360
2480
|
...(decision.note !== undefined && { note: decision.note }),
|
|
2481
|
+
...(answeredVia !== undefined && { componentId: answeredVia }),
|
|
2361
2482
|
});
|
|
2362
2483
|
let result;
|
|
2363
2484
|
/** What the model reads — see the ask path above. */
|
|
@@ -2455,6 +2576,9 @@ export function buildToolCallsHandler(deps) {
|
|
|
2455
2576
|
scope.pausedToolStartMs = 0;
|
|
2456
2577
|
scope.pausedCheckIn = false;
|
|
2457
2578
|
scope.pausedCheckInArgs = undefined;
|
|
2579
|
+
// Cleared ONLY when it was set — see the ask path's twin note.
|
|
2580
|
+
if (answeredVia !== undefined)
|
|
2581
|
+
scope.pausedComponentId = undefined;
|
|
2458
2582
|
return;
|
|
2459
2583
|
}
|
|
2460
2584
|
// ── Credential-consent decision path (8.6.0) ─────────────────────
|