agentfootprint 9.85.0 → 9.86.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.
Files changed (163) hide show
  1. package/CHANGELOG.md +547 -24
  2. package/canonical-notes.json +1 -1
  3. package/dist/core/Agent.js +15 -4
  4. package/dist/core/Agent.js.map +1 -1
  5. package/dist/core/agent/AgentBuilder.js.map +1 -1
  6. package/dist/core/agent/buildAgentChart.js +5 -0
  7. package/dist/core/agent/buildAgentChart.js.map +1 -1
  8. package/dist/core/agent/buildDynamicAgentChart.js +22 -4
  9. package/dist/core/agent/buildDynamicAgentChart.js.map +1 -1
  10. package/dist/core/agent/buildToolRegistry.js +12 -1
  11. package/dist/core/agent/buildToolRegistry.js.map +1 -1
  12. package/dist/core/agent/coverage/ledger.js +8 -2
  13. package/dist/core/agent/coverage/ledger.js.map +1 -1
  14. package/dist/core/agent/selfCallNotice.js +20 -7
  15. package/dist/core/agent/selfCallNotice.js.map +1 -1
  16. package/dist/core/agent/skillBrains.js +3 -2
  17. package/dist/core/agent/skillBrains.js.map +1 -1
  18. package/dist/core/agent/stages/stepNudge.js +13 -4
  19. package/dist/core/agent/stages/stepNudge.js.map +1 -1
  20. package/dist/core/agent/stages/toolCalls.js +484 -64
  21. package/dist/core/agent/stages/toolCalls.js.map +1 -1
  22. package/dist/core/agent/stages/wrapUp.js +54 -6
  23. package/dist/core/agent/stages/wrapUp.js.map +1 -1
  24. package/dist/core/agent/window/currentRequest.js +4 -2
  25. package/dist/core/agent/window/currentRequest.js.map +1 -1
  26. package/dist/core/runbook/recording.js +3 -2
  27. package/dist/core/runbook/recording.js.map +1 -1
  28. package/dist/core/slots/buildToolsSlot.js +20 -4
  29. package/dist/core/slots/buildToolsSlot.js.map +1 -1
  30. package/dist/doors/skill-graph.js +4 -1
  31. package/dist/doors/skill-graph.js.map +1 -1
  32. package/dist/esm/core/Agent.js +15 -4
  33. package/dist/esm/core/Agent.js.map +1 -1
  34. package/dist/esm/core/agent/AgentBuilder.d.ts +2 -1
  35. package/dist/esm/core/agent/AgentBuilder.js.map +1 -1
  36. package/dist/esm/core/agent/buildAgentChart.js +5 -0
  37. package/dist/esm/core/agent/buildAgentChart.js.map +1 -1
  38. package/dist/esm/core/agent/buildDynamicAgentChart.js +22 -4
  39. package/dist/esm/core/agent/buildDynamicAgentChart.js.map +1 -1
  40. package/dist/esm/core/agent/buildToolRegistry.d.ts +20 -0
  41. package/dist/esm/core/agent/buildToolRegistry.js +12 -1
  42. package/dist/esm/core/agent/buildToolRegistry.js.map +1 -1
  43. package/dist/esm/core/agent/coverage/ledger.d.ts +5 -0
  44. package/dist/esm/core/agent/coverage/ledger.js +8 -2
  45. package/dist/esm/core/agent/coverage/ledger.js.map +1 -1
  46. package/dist/esm/core/agent/selfCallNotice.d.ts +20 -7
  47. package/dist/esm/core/agent/selfCallNotice.js +20 -7
  48. package/dist/esm/core/agent/selfCallNotice.js.map +1 -1
  49. package/dist/esm/core/agent/skillBrains.d.ts +12 -4
  50. package/dist/esm/core/agent/skillBrains.js +3 -2
  51. package/dist/esm/core/agent/skillBrains.js.map +1 -1
  52. package/dist/esm/core/agent/stages/stepNudge.d.ts +13 -4
  53. package/dist/esm/core/agent/stages/stepNudge.js +13 -4
  54. package/dist/esm/core/agent/stages/stepNudge.js.map +1 -1
  55. package/dist/esm/core/agent/stages/toolCalls.d.ts +185 -0
  56. package/dist/esm/core/agent/stages/toolCalls.js +480 -63
  57. package/dist/esm/core/agent/stages/toolCalls.js.map +1 -1
  58. package/dist/esm/core/agent/stages/wrapUp.d.ts +44 -2
  59. package/dist/esm/core/agent/stages/wrapUp.js +52 -5
  60. package/dist/esm/core/agent/stages/wrapUp.js.map +1 -1
  61. package/dist/esm/core/agent/types.d.ts +22 -4
  62. package/dist/esm/core/agent/window/currentRequest.d.ts +4 -2
  63. package/dist/esm/core/agent/window/currentRequest.js +4 -2
  64. package/dist/esm/core/agent/window/currentRequest.js.map +1 -1
  65. package/dist/esm/core/runbook/recording.js +3 -2
  66. package/dist/esm/core/runbook/recording.js.map +1 -1
  67. package/dist/esm/core/slots/buildToolsSlot.d.ts +1 -1
  68. package/dist/esm/core/slots/buildToolsSlot.js +20 -4
  69. package/dist/esm/core/slots/buildToolsSlot.js.map +1 -1
  70. package/dist/esm/doors/skill-graph.d.ts +1 -1
  71. package/dist/esm/doors/skill-graph.js +4 -1
  72. package/dist/esm/doors/skill-graph.js.map +1 -1
  73. package/dist/esm/events/payloads.d.ts +34 -2
  74. package/dist/esm/index.js +6 -5
  75. package/dist/esm/index.js.map +1 -1
  76. package/dist/esm/lib/injection-engine/index.d.ts +1 -1
  77. package/dist/esm/lib/injection-engine/index.js +4 -1
  78. package/dist/esm/lib/injection-engine/index.js.map +1 -1
  79. package/dist/esm/lib/injection-engine/skillGraph.d.ts +56 -0
  80. package/dist/esm/lib/injection-engine/skillGraph.js +29 -3
  81. package/dist/esm/lib/injection-engine/skillGraph.js.map +1 -1
  82. package/dist/esm/lib/injection-engine/skillSteps.d.ts +20 -1
  83. package/dist/esm/lib/injection-engine/skillSteps.js +28 -3
  84. package/dist/esm/lib/injection-engine/skillSteps.js.map +1 -1
  85. package/dist/esm/lib/injection-engine/skillToolDescriptors.d.ts +18 -0
  86. package/dist/esm/lib/injection-engine/skillToolDescriptors.js +103 -10
  87. package/dist/esm/lib/injection-engine/skillToolDescriptors.js.map +1 -1
  88. package/dist/esm/lib/injection-engine/types.d.ts +12 -10
  89. package/dist/esm/lib/injection-engine/types.js +5 -4
  90. package/dist/esm/lib/injection-engine/types.js.map +1 -1
  91. package/dist/esm/lib/saidByPerson.d.ts +48 -15
  92. package/dist/esm/lib/saidByPerson.js +52 -17
  93. package/dist/esm/lib/saidByPerson.js.map +1 -1
  94. package/dist/esm/lib/spokenIds.d.ts +52 -0
  95. package/dist/esm/lib/spokenIds.js +11 -0
  96. package/dist/esm/lib/spokenIds.js.map +1 -0
  97. package/dist/esm/lib/trace-toolpack/traceToolpack.js +33 -19
  98. package/dist/esm/lib/trace-toolpack/traceToolpack.js.map +1 -1
  99. package/dist/index.js +6 -5
  100. package/dist/index.js.map +1 -1
  101. package/dist/lib/injection-engine/index.js +5 -2
  102. package/dist/lib/injection-engine/index.js.map +1 -1
  103. package/dist/lib/injection-engine/skillGraph.js +31 -4
  104. package/dist/lib/injection-engine/skillGraph.js.map +1 -1
  105. package/dist/lib/injection-engine/skillSteps.js +28 -3
  106. package/dist/lib/injection-engine/skillSteps.js.map +1 -1
  107. package/dist/lib/injection-engine/skillToolDescriptors.js +103 -10
  108. package/dist/lib/injection-engine/skillToolDescriptors.js.map +1 -1
  109. package/dist/lib/injection-engine/types.js +5 -4
  110. package/dist/lib/injection-engine/types.js.map +1 -1
  111. package/dist/lib/saidByPerson.js +53 -18
  112. package/dist/lib/saidByPerson.js.map +1 -1
  113. package/dist/lib/spokenIds.js +15 -0
  114. package/dist/lib/spokenIds.js.map +1 -0
  115. package/dist/lib/trace-toolpack/traceToolpack.js +33 -19
  116. package/dist/lib/trace-toolpack/traceToolpack.js.map +1 -1
  117. package/dist/types/core/Agent.d.ts.map +1 -1
  118. package/dist/types/core/agent/AgentBuilder.d.ts +2 -1
  119. package/dist/types/core/agent/AgentBuilder.d.ts.map +1 -1
  120. package/dist/types/core/agent/buildAgentChart.d.ts.map +1 -1
  121. package/dist/types/core/agent/buildDynamicAgentChart.d.ts.map +1 -1
  122. package/dist/types/core/agent/buildToolRegistry.d.ts +20 -0
  123. package/dist/types/core/agent/buildToolRegistry.d.ts.map +1 -1
  124. package/dist/types/core/agent/coverage/ledger.d.ts +5 -0
  125. package/dist/types/core/agent/coverage/ledger.d.ts.map +1 -1
  126. package/dist/types/core/agent/selfCallNotice.d.ts +20 -7
  127. package/dist/types/core/agent/selfCallNotice.d.ts.map +1 -1
  128. package/dist/types/core/agent/skillBrains.d.ts +12 -4
  129. package/dist/types/core/agent/skillBrains.d.ts.map +1 -1
  130. package/dist/types/core/agent/stages/stepNudge.d.ts +13 -4
  131. package/dist/types/core/agent/stages/stepNudge.d.ts.map +1 -1
  132. package/dist/types/core/agent/stages/toolCalls.d.ts +185 -0
  133. package/dist/types/core/agent/stages/toolCalls.d.ts.map +1 -1
  134. package/dist/types/core/agent/stages/wrapUp.d.ts +44 -2
  135. package/dist/types/core/agent/stages/wrapUp.d.ts.map +1 -1
  136. package/dist/types/core/agent/types.d.ts +22 -4
  137. package/dist/types/core/agent/types.d.ts.map +1 -1
  138. package/dist/types/core/agent/window/currentRequest.d.ts +4 -2
  139. package/dist/types/core/agent/window/currentRequest.d.ts.map +1 -1
  140. package/dist/types/core/runbook/recording.d.ts.map +1 -1
  141. package/dist/types/core/slots/buildToolsSlot.d.ts +1 -1
  142. package/dist/types/core/slots/buildToolsSlot.d.ts.map +1 -1
  143. package/dist/types/doors/skill-graph.d.ts +1 -1
  144. package/dist/types/doors/skill-graph.d.ts.map +1 -1
  145. package/dist/types/events/payloads.d.ts +34 -2
  146. package/dist/types/events/payloads.d.ts.map +1 -1
  147. package/dist/types/index.d.ts.map +1 -1
  148. package/dist/types/lib/injection-engine/index.d.ts +1 -1
  149. package/dist/types/lib/injection-engine/index.d.ts.map +1 -1
  150. package/dist/types/lib/injection-engine/skillGraph.d.ts +56 -0
  151. package/dist/types/lib/injection-engine/skillGraph.d.ts.map +1 -1
  152. package/dist/types/lib/injection-engine/skillSteps.d.ts +20 -1
  153. package/dist/types/lib/injection-engine/skillSteps.d.ts.map +1 -1
  154. package/dist/types/lib/injection-engine/skillToolDescriptors.d.ts +18 -0
  155. package/dist/types/lib/injection-engine/skillToolDescriptors.d.ts.map +1 -1
  156. package/dist/types/lib/injection-engine/types.d.ts +12 -10
  157. package/dist/types/lib/injection-engine/types.d.ts.map +1 -1
  158. package/dist/types/lib/saidByPerson.d.ts +48 -15
  159. package/dist/types/lib/saidByPerson.d.ts.map +1 -1
  160. package/dist/types/lib/spokenIds.d.ts +53 -0
  161. package/dist/types/lib/spokenIds.d.ts.map +1 -0
  162. package/dist/types/lib/trace-toolpack/traceToolpack.d.ts.map +1 -1
  163. package/package.json +1 -1
@@ -20,7 +20,7 @@
20
20
  * into `history`, and then read by the model on call N+1 AND ON EVERY CALL
21
21
  * AFTER IT for the rest of the turn — including the out-of-budget WRAP-UP,
22
22
  * which `callLLM` serves with an EMPTY tool list under a user message saying
23
- * "Do not request tools".
23
+ * that no tools were offered on it.
24
24
  *
25
25
  * The consequence is the whole design: NO COMPOSE-TIME CHECK CAN MAKE A
26
26
  * FORWARD-LOOKING SENTENCE SAFE. A budget test, a posture test, a cursor test
@@ -44,7 +44,8 @@
44
44
  * open-skill offer ("These activate without moving you: gamma"), and the
45
45
  * budget clause that was added to gate them. Each was false somewhere:
46
46
  *
47
- * • the exhortation, on the wrap-up call, beside "Do not request tools";
47
+ * • the exhortation, on the wrap-up call, beside a frame reporting that no
48
+ * tools were offered on it;
48
49
  * • the move offer, on the wrap-up call (a hop is a tool call), under
49
50
  * `strictness: 'rails'` (every model hop refused) and under `'guard'` on a
50
51
  * decisively-routed turn (every hop not on an outstanding menu refused) —
@@ -82,11 +83,23 @@ export interface SelfSkillTools {
82
83
  * that cannot be established, which is not the same answer and must not be
83
84
  * reported as one.
84
85
  *
85
- * `undefined` means the notice says nothing about tools at all. It happens when
86
- * the tools slot composed no per-iteration list (`reactMode: 'classic'` caches
87
- * the slot, and `callLLM` falls back to its build-time schemas), or when the
88
- * cursor's skill is not in the active set. Silence is the only honest output
89
- * there: the alternative is a sentence naming tools the model may not have.
86
+ * `undefined` means the notice says nothing about tools at all, and there are
87
+ * exactly two ways to get it (9.86.0 — the previous note named a third that
88
+ * cannot happen). It happens when the cursor's skill is not in the ACTIVE set
89
+ * for that call, and when the wire key is absent from scope altogether.
90
+ *
91
+ * `reactMode: 'classic'` is NOT one of them, which is worth stating because the
92
+ * old note said it was: seed writes `scope.dynamicToolSchemas` from the
93
+ * build-time schemas at turn start (`stages/seed.ts`), so under classic the key
94
+ * is present and holds the list `callLLM` really sends — the notice would name
95
+ * the build-time list, correctly. (No self-call can arise there anyway:
96
+ * `.skillGraph()` is refused at build under classic, and only a graph gives the
97
+ * gate a cursor to compare against.) The grouped chart used to be a real third
98
+ * way — the Tools slot writes the key inside `sf-llm-call` and this gate reads
99
+ * it outside — until that boundary began bubbling it out.
100
+ *
101
+ * Silence is the only honest output in the two remaining cases: the
102
+ * alternative is a sentence naming tools the model may not have.
90
103
  *
91
104
  * The out-of-budget wrap-up is NOT one of these cases and must not be modelled
92
105
  * as one. Its empty tool list belongs to a LATER call; the wire read here is
@@ -20,7 +20,7 @@
20
20
  * into `history`, and then read by the model on call N+1 AND ON EVERY CALL
21
21
  * AFTER IT for the rest of the turn — including the out-of-budget WRAP-UP,
22
22
  * which `callLLM` serves with an EMPTY tool list under a user message saying
23
- * "Do not request tools".
23
+ * that no tools were offered on it.
24
24
  *
25
25
  * The consequence is the whole design: NO COMPOSE-TIME CHECK CAN MAKE A
26
26
  * FORWARD-LOOKING SENTENCE SAFE. A budget test, a posture test, a cursor test
@@ -44,7 +44,8 @@
44
44
  * open-skill offer ("These activate without moving you: gamma"), and the
45
45
  * budget clause that was added to gate them. Each was false somewhere:
46
46
  *
47
- * • the exhortation, on the wrap-up call, beside "Do not request tools";
47
+ * • the exhortation, on the wrap-up call, beside a frame reporting that no
48
+ * tools were offered on it;
48
49
  * • the move offer, on the wrap-up call (a hop is a tool call), under
49
50
  * `strictness: 'rails'` (every model hop refused) and under `'guard'` on a
50
51
  * decisively-routed turn (every hop not on an outstanding menu refused) —
@@ -73,11 +74,23 @@
73
74
  * that cannot be established, which is not the same answer and must not be
74
75
  * reported as one.
75
76
  *
76
- * `undefined` means the notice says nothing about tools at all. It happens when
77
- * the tools slot composed no per-iteration list (`reactMode: 'classic'` caches
78
- * the slot, and `callLLM` falls back to its build-time schemas), or when the
79
- * cursor's skill is not in the active set. Silence is the only honest output
80
- * there: the alternative is a sentence naming tools the model may not have.
77
+ * `undefined` means the notice says nothing about tools at all, and there are
78
+ * exactly two ways to get it (9.86.0 — the previous note named a third that
79
+ * cannot happen). It happens when the cursor's skill is not in the ACTIVE set
80
+ * for that call, and when the wire key is absent from scope altogether.
81
+ *
82
+ * `reactMode: 'classic'` is NOT one of them, which is worth stating because the
83
+ * old note said it was: seed writes `scope.dynamicToolSchemas` from the
84
+ * build-time schemas at turn start (`stages/seed.ts`), so under classic the key
85
+ * is present and holds the list `callLLM` really sends — the notice would name
86
+ * the build-time list, correctly. (No self-call can arise there anyway:
87
+ * `.skillGraph()` is refused at build under classic, and only a graph gives the
88
+ * gate a cursor to compare against.) The grouped chart used to be a real third
89
+ * way — the Tools slot writes the key inside `sf-llm-call` and this gate reads
90
+ * it outside — until that boundary began bubbling it out.
91
+ *
92
+ * Silence is the only honest output in the two remaining cases: the
93
+ * alternative is a sentence naming tools the model may not have.
81
94
  *
82
95
  * The out-of-budget wrap-up is NOT one of these cases and must not be modelled
83
96
  * as one. Its empty tool list belongs to a LATER call; the wire read here is
@@ -1 +1 @@
1
- {"version":3,"file":"selfCallNotice.js","sourceRoot":"","sources":["../../../../src/core/agent/selfCallNotice.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqEG;AAaH;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,cAAc,CAC5B,OAAe,EACf,gBAAwD,EACxD,IAA0C;IAE1C,IAAI,IAAI,KAAK,SAAS,IAAI,gBAAgB,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAC3E,MAAM,IAAI,GAAG,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,OAAO,CAAC,CAAC;IAC5D,IAAI,IAAI,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IACzC,MAAM,QAAQ,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,EAAE,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,E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,GACV,eAAe,OAAO,2DAA2D;QACjF,kFAAkF;QAClF,mBAAmB,UAAU,GAAG,UAAU,EAAE,CAAC;IAC/C,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IACjC,OAAO,IAAI,KAAK,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,OAAO,OAAO,IAAI,EAAE,CAAC;AAChE,CAAC"}
@@ -29,8 +29,9 @@
29
29
  * that disagrees with itself must not pick a silent winner.
30
30
  *
31
31
  * ESCALATE-ON-EVIDENCE. `escalation: { provider, model?, afterRefusals: N }`
32
- * — when the gate refuses N routing picks in ONE turn (`skill.rejected`,
33
- * reachability or posture — real recorded refusals, never vibes), the rest
32
+ * — when the gate refuses N routing picks in ONE turn (`skill.rejected` —
33
+ * reachability, posture, OR a self-call: all three refusal arms count, and
34
+ * they are real recorded refusals, never vibes), the rest
34
35
  * of the turn runs on the escalation brain, `skill.escalated` goes on the
35
36
  * record once, and the next turn's seed de-escalates. The loop the model is
36
37
  * flubbing gets the bigger brain until the turn resolves.
@@ -51,8 +52,15 @@ export interface ProviderChoice {
51
52
  }
52
53
  /** Escalate-on-evidence policy (see the module header). */
53
54
  export interface EscalationPolicy extends ProviderChoice {
54
- /** Gate refusals (`skill.rejected` — reachability OR posture) in ONE turn
55
- * that flip the rest of the turn onto this brain. Integer ≥ 1. */
55
+ /** Gate refusals (`skill.rejected`) in ONE turn that flip the rest of the
56
+ * turn onto this brain. Integer ≥ 1.
57
+ *
58
+ * ALL THREE refusal arms count — an unreachable pick, a pick a `strictness`
59
+ * posture declined, and a SELF-CALL (`read_skill` naming the cursor's own
60
+ * skill). The self-call arm composes a notice rather than a refusal, and it
61
+ * still counts here on purpose: what this budget measures is a model asking
62
+ * the graph where it stands instead of working, which is the same stuck loop
63
+ * whichever arm answered it. */
56
64
  readonly afterRefusals: number;
57
65
  }
58
66
  /** A brain as the fold stores it: `defineSkill({ model })` alone is legal
@@ -29,8 +29,9 @@
29
29
  * that disagrees with itself must not pick a silent winner.
30
30
  *
31
31
  * ESCALATE-ON-EVIDENCE. `escalation: { provider, model?, afterRefusals: N }`
32
- * — when the gate refuses N routing picks in ONE turn (`skill.rejected`,
33
- * reachability or posture — real recorded refusals, never vibes), the rest
32
+ * — when the gate refuses N routing picks in ONE turn (`skill.rejected` —
33
+ * reachability, posture, OR a self-call: all three refusal arms count, and
34
+ * they are real recorded refusals, never vibes), the rest
34
35
  * of the turn runs on the escalation brain, `skill.escalated` goes on the
35
36
  * record once, and the next turn's seed de-escalates. The loop the model is
36
37
  * flubbing gets the bigger brain until the turn resolves.
@@ -1 +1 @@
1
- {"version":3,"file":"skillBrains.js","sourceRoot":"","sources":["../../../../src/core/agent/skillBrains.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AAIH,OAAO,EAAE,uBAAuB,EAAE,MAAM,iCAAiC,CAAC;AA6D1E;;;0EAG0E;AAC1E,MAAM,UAAU,YAAY,CAAC,SAAoB;IAC/C,MAAM,IAAI,GAAG,SAAS,CAAC,QAAkE,CAAC;IAC1F,IAAI,IAAI,EAAE,QAAQ,KAAK,SAAS,IAAI,IAAI,EAAE,KAAK,KAAK,SAAS;QAAE,OAAO,SAAS,CAAC;IAChF,OAAO;QACL,oEAAoE;QACpE,GAAG,CAAC,IAAI,CAAC,QAAQ,KAAK,SAAS,IAAI,EAAE,QAAQ,EAAE,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC/D,GAAG,CAAC,IAAI,CAAC,KAAK,KAAK,SAAS,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,CAAC;KACvD,CAAC;AACJ,CAAC;AAoBD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,IAAyB;IACvD,MAAM,WAAW,GAAG,IAAI,GAAG,CAAyB,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,SAAS,IAAI,EAAE,CAAC,CAAC,CAAC;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aACpC,CAAC;YACF,aAAa,EAAE,WAAW,CAAC,IAAI,CAAC,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC;YAC3D,GAAG,EAAE,YAAY;SAClB;QACH,CAAC,CAAC,SAAS,CAAC;IAEd,OAAO,CAAC,YAAY,EAAE,SAAS,EAAE,EAAE;QACjC,uEAAuE;QACvE,sEAAsE;QACtE,IAAI,SAAS,IAAI,UAAU,KAAK,SAAS;YAAE,OAAO,UAAU,CAAC;QAC7D,IAAI,YAAY,KAAK,SAAS;YAAE,OAAO,SAAS,CAAC;QACjD,OAAO,OAAO,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;IACnC,CAAC,CAAC;AACJ,CAAC;AAED;;6EAE6E;AAC7E,MAAM,UAAU,oBAAoB,CAAC,IAMpC;IACC,MAAM,KAAK,GAAG,IAAI,CAAC,MAAM,KAAK,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IAC3F,MAAM,QAAQ,GAAG,KAAK,EAAE,QAAQ,EAAE,IAAI,IAAI,IAAI,CAAC,iBAAiB,CAAC;IACjE,MAAM,KAAK,GAAG,KAAK,EAAE,KAAK,IAAI,IAAI,CAAC,aAAa,IAAI,IAAI,CAAC,YAAY,CAAC;IACtE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,CAAC;AAC7B,CAAC"}
@@ -11,10 +11,19 @@
11
11
  *
12
12
  * What it appends is the conversation as it really went: the premature
13
13
  * answer as the assistant turn, then a `role: 'user'` teaching message
14
- * naming every unrun step and its note — "finish them, or say why you are
15
- * stopping". At most once per turn (`stepNudgeSpent`); the model stopping
16
- * AGAIN is honored (`steps_unfinished { action: 'accepted' }`, judged by
17
- * the decider) — a procedure is a declared order, never a forced march.
14
+ * naming every unrun step and its note. At most once per turn
15
+ * (`stepNudgeSpent`); the model stopping AGAIN is honored
16
+ * (`steps_unfinished { action: 'accepted' }`, judged by the decider) — a
17
+ * procedure is a declared order, never a forced march.
18
+ *
19
+ * That teaching message is written by `nudgeTeachingMessage` (skillSteps.ts
20
+ * owns every sentence about a procedure) and, since 9.86.0, opens with
21
+ * `STEP_NUDGE_FRAME_PREFIX` from the authorship registry. It has to: this
22
+ * stage puts it in `scope.history` under `role: 'user'`, where it looks like
23
+ * a person's turn to `isSaidByPerson` — and its body lists the skill id and
24
+ * the unrun steps' TOOL NAMES, which is precisely what a routing rule
25
+ * scanning history matches on. The opening is what tells the window's
26
+ * refusal engine and a rule author that nobody said it.
18
27
  *
19
28
  * Pure function apart from its plan closure — no Agent class state.
20
29
  */
@@ -11,10 +11,19 @@
11
11
  *
12
12
  * What it appends is the conversation as it really went: the premature
13
13
  * answer as the assistant turn, then a `role: 'user'` teaching message
14
- * naming every unrun step and its note — "finish them, or say why you are
15
- * stopping". At most once per turn (`stepNudgeSpent`); the model stopping
16
- * AGAIN is honored (`steps_unfinished { action: 'accepted' }`, judged by
17
- * the decider) — a procedure is a declared order, never a forced march.
14
+ * naming every unrun step and its note. At most once per turn
15
+ * (`stepNudgeSpent`); the model stopping AGAIN is honored
16
+ * (`steps_unfinished { action: 'accepted' }`, judged by the decider) — a
17
+ * procedure is a declared order, never a forced march.
18
+ *
19
+ * That teaching message is written by `nudgeTeachingMessage` (skillSteps.ts
20
+ * owns every sentence about a procedure) and, since 9.86.0, opens with
21
+ * `STEP_NUDGE_FRAME_PREFIX` from the authorship registry. It has to: this
22
+ * stage puts it in `scope.history` under `role: 'user'`, where it looks like
23
+ * a person's turn to `isSaidByPerson` — and its body lists the skill id and
24
+ * the unrun steps' TOOL NAMES, which is precisely what a routing rule
25
+ * scanning history matches on. The opening is what tells the window's
26
+ * refusal engine and a rule author that nobody said it.
18
27
  *
19
28
  * Pure function apart from its plan closure — no Agent class state.
20
29
  */
@@ -1 +1 @@
1
- {"version":3,"file":"stepNudge.js","sourceRoot":"","sources":["../../../../../src/core/agent/stages/step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AAmB,CAAC;QAC5C,MAAM,eAAe,GAAG,KAAK,CAAC,gBAA0B,CAAC;QACzD,MAAM,QAAQ,GAAG,oBAAoB,CAAC,GAAG,EAAE,IAAI,CAAC,CAAC;QAEjD,sEAAsE;QACtE,uEAAuE;QACvE,wEAAwE;QACxE,+BAA+B;QAC/B,MAAM,UAAU,GAAiB;YAC/B,GAAI,KAAK,CAAC,OAAiC;YAC3C,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,eAAe,EAAE;YAC/C,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,QAAQ,EAAE;SACpC,CAAC;QACF,KAAK,CAAC,OAAO,GAAG,UAAU,CAAC;QAE3B,mEAAmE;QACnE,oEAAoE;QACpE,YAAY;QACZ,KAAK,CAAC,cAAc,GAAG,IAAI,CAAC;QAE5B,SAAS,CAAC,KAAK,EAAE,uCAAuC,EAAE;YACxD,OAAO,EAAE,GAAG,CAAC,OAAO;YACpB,SAAS,EAAE,gBAAgB,CAAC,GAAG,EAAE,IAAI,CAAC;YACtC,KAAK,EAAE,GAAG,CAAC,KAAK;YAChB,MAAM,EAAE,QAAQ;YAChB,SAAS;SACV,CAAC,CAAC;QAEH,wEAAwE;QACxE,qEAAqE;QACrE,uEAAuE;QACvE,8DAA8D;QAC9D,SAAS,CAAC,KAAK,EAAE,oCAAoC,EAAE;YACrD,SAAS,EAAE,CAAC;YACZ,SAAS,EAAE,SAAS;YACpB,aAAa,EAAE,CAAC;YAChB,OAAO,EAAE,UAAU;SACpB,CAAC,CAAC;QAEH,wEAAwE;QACxE,iDAAiD;QACjD,KAAK,CAAC,SAAS,GAAG,SAAS,GAAG,CAAC,CAAC;IAClC,CAAC,CAAC;AACJ,CAAC"}
@@ -44,6 +44,9 @@
44
44
  */
45
45
  import type { PausableHandler, TypedScope } from 'footprintjs';
46
46
  import type { PermissionChecker } from '../../../adapters/types.js';
47
+ import { type TurnRoute } from '../../../lib/injection-engine/routingPolicy.js';
48
+ import { type SkillTargetClass } from '../../../lib/injection-engine/skillGraph.js';
49
+ import { type SpokenIds } from '../../../lib/spokenIds.js';
47
50
  import type { ToolProvider } from '../../../tool-providers/types.js';
48
51
  import type { CredentialProvider } from '../../../identity/types.js';
49
52
  import type { ArtifactStore } from '../../../artifacts/types.js';
@@ -114,6 +117,21 @@ export interface ToolCallsHandlerDeps {
114
117
  readonly integrityLedger?: {
115
118
  current: import('../../../integrity/disposition/ledger.js').DispositionLedger | undefined;
116
119
  };
120
+ /**
121
+ * WHICH SKILLS DECLARE EACH TOOL NAME (9.86.0) — tool name → the ids of the
122
+ * skills whose `inject.tools` carry it, from `buildToolRegistry`, the one
123
+ * place that already walks every skill's tool array.
124
+ *
125
+ * Read by `dispatchRoster` and by nothing else: a role that may not see a
126
+ * skill may not be told the names of the tools that skill brought. A name is
127
+ * unnameable only when EVERY declaring skill is hidden, so a tool two skills
128
+ * share survives one of them being hidden.
129
+ *
130
+ * Absent for an agent with no skill-carried tools — the map is built only
131
+ * when at least one skill declares one — and then the roster is the raw
132
+ * dispatch set, exactly as it was.
133
+ */
134
+ readonly toolDeclaringSkills?: ReadonlyMap<string, readonly string[]>;
117
135
  /** Optional external `.toolProvider()` for per-iteration dynamic
118
136
  * tools (skill-scoped, multi-tenant, etc.). Consulted only when
119
137
  * the static registry doesn't have the tool. */
@@ -395,4 +413,171 @@ export interface ToolCallsHandlerDeps {
395
413
  */
396
414
  readonly clearConsentOutstanding?: (service: string) => void;
397
415
  }
416
+ /**
417
+ * Is this `read_skill` target the cursor's own skill AND is that cursor
418
+ * MOUNTED — the one owner of "this call would change nothing" (9.86.0).
419
+ *
420
+ * ── WHY POSITION ALONE IS NOT THE ANSWER ────────────────────────────────
421
+ *
422
+ * `classifySkillTarget` answers a question about POSITION: is the target where
423
+ * the cursor stands? For most of the loop that settles it — the cursor's body
424
+ * is in that call's system prompt and its tools are on that call's wire, so
425
+ * asking to read it activates nothing, moves nothing and reveals nothing the
426
+ * request did not already carry.
427
+ *
428
+ * A PARKED map breaks that. Parking suppresses a map's contribution and leaves
429
+ * the cursor exactly where it was, so at a parked cursor the very same id is a
430
+ * RE-ENGAGEMENT: the gate admits it, the map engages, and the member's body and
431
+ * tools ride again on the next pass. That call moves something, which makes it
432
+ * a capability, which makes it the policy's question to answer.
433
+ *
434
+ * The dispatch gate has known this since 9.59.0 — it tests re-engagement BEFORE
435
+ * its self-call arm, which is this same fact written as two ordered arms. The
436
+ * `skill_read` permission gate, 480 lines upstream, has no arms to order: it
437
+ * asks one question and either spends the policy check or skips it, and it was
438
+ * asking `classifySkillTarget` alone. So a role whose checker hid a skill could
439
+ * have the model un-park and re-activate it. This function is the question that
440
+ * gate now asks, over the parked set `parkedNow` hands both of them.
441
+ *
442
+ * @example
443
+ * ```ts
444
+ * atMountedCursor({ cursor: 'audit', target: 'audit' }); // true — a stay
445
+ * atMountedCursor({ cursor: 'audit', target: 'audit', parked: new Set(['audit']) }); // false — a re-engagement
446
+ * atMountedCursor({ cursor: 'audit', target: 'billing' }); // false — a move
447
+ * ```
448
+ */
449
+ export declare function atMountedCursor(args: {
450
+ /** Where the cursor stands. `undefined` = cold start (nothing is a stay). */
451
+ readonly cursor?: string | undefined;
452
+ /** The id the model asked for. */
453
+ readonly target: string;
454
+ /** Members of every map the kernel holds PARKED — `parkedMemberIds`. */
455
+ readonly parked?: ReadonlySet<string> | undefined;
456
+ }): boolean;
457
+ /**
458
+ * What a call to a name nothing can dispatch gets back (9.86.0).
459
+ *
460
+ * `Unknown tool: X` was the whole sentence, on both dispatch doors, while
461
+ * `mcpServe` — the same library, one directory away — had been answering
462
+ * "Unknown tool 'rm_rf'. Served tools: echo, delete_account." for releases. The
463
+ * model that mistyped a name, or named one from a restored transcript, was told
464
+ * only that it was wrong, never what would have worked, and the cheapest repair
465
+ * (read the roster) was the one it could not make.
466
+ *
467
+ * The roster is the DISPATCH set — `registryByName` plus the provider cache —
468
+ * because that is the true statement about resolution: these are the names that
469
+ * answered to something. It is deliberately NOT the offer: the wire is narrowed
470
+ * by steps, parks and postures, and a held-out tool still dispatches by name, so
471
+ * an offer-shaped list would be a different (and here, false) claim.
472
+ *
473
+ * ── AND IT SAYS "RESOLVED", NOT "COULD BE DISPATCHED" ───────────────────
474
+ *
475
+ * The first draft said "Tools that could be dispatched on that call". Two gates
476
+ * sit between resolution and a tool running — the `tool_call` permission check
477
+ * and the middleware chain — so a name in this map can resolve and still be
478
+ * refused, and the sentence promised the model a dispatch the very next gate
479
+ * would decline. Neither gate is asked here: a `PermissionChecker` is a port
480
+ * (a hub call per name, with its own events and its own audit rows), and
481
+ * spending a whole permission sweep to phrase an error is a cost the sentence
482
+ * does not need. It reports what this map DID — resolve a name — and claims
483
+ * nothing about what would have happened next.
484
+ *
485
+ * The roster is role-filtered before it gets here (`dispatchRoster`), so a tool
486
+ * belonging to a skill the caller's policy hides is never named; and when the
487
+ * filter empties a stocked roster the clause is DROPPED, because "no tool name
488
+ * resolved" would be a denial of what the dispatch map is holding.
489
+ *
490
+ * Anchored past tense, like every other persistent result: "on that call" binds
491
+ * the roster to the finished call the result answers, so a later iteration that
492
+ * adds or drops a provider tool cannot make this sentence wrong. No exhortation
493
+ * — the model does not need to be told to try again.
494
+ *
495
+ * Exported for the producer registry, and used by BOTH dispatch doors so they
496
+ * cannot drift.
497
+ */
498
+ export declare function unknownToolResult(toolName: string, dispatchable: SpokenIds): string;
499
+ /**
500
+ * THE ONE COMPOSER of every `read_skill` refusal (9.86.0) — reachability,
501
+ * posture and tree, from one set of inputs.
502
+ *
503
+ * ── WHY ONE ─────────────────────────────────────────────────────────────
504
+ *
505
+ * There were two, and they disagreed. `skillRefusal` named "Reachable skills:
506
+ * beta" from the graph's raw hop set; `postureRefusal`, forty lines below it in
507
+ * the same gate, answered a model that took that offer up with "read_skill here
508
+ * reaches only the open skills: gamma". Same call, same turn, opposite claims —
509
+ * and the second one cost a refusal from the escalation budget to discover.
510
+ * Neither had heard of the role filter, so both could name a skill the caller's
511
+ * policy hides. One composer, handed the FILTERED sets and the posture that
512
+ * will judge the next pick, cannot contradict itself that way.
513
+ *
514
+ * ── THE TENSE DISCIPLINE (the law `selfCallNotice` is written against) ──
515
+ *
516
+ * A tool result is composed on iteration N and re-read by the model on every
517
+ * later call of the turn, including the tool-less wrap-up. So every clause here
518
+ * is a PAST fact about ONE named call — the call the model made `read_skill`
519
+ * on — anchored by the phrase "that call", never by deixis ("this turn", "the
520
+ * call you just made") and never by a forecast ("you can call", "pick one of
521
+ * these"). What the model may do NEXT is owned by the `read_skill` DESCRIPTION,
522
+ * which is recomposed for every single request and may therefore speak in the
523
+ * present. Two owners, one tense each, and they can no longer disagree.
524
+ *
525
+ * ── AND WHY IT NEVER NAMES A HOP THE POSTURE WOULD DECLINE ──────────────
526
+ *
527
+ * Under `'rails'` the model does not route at all; under `'guard'` it routes
528
+ * only from an outstanding menu. Naming hops there is an offer the very next
529
+ * arm of this gate refuses. So those arms name no hop: they say who DID route,
530
+ * and (when there are any) which open skills were admitted anyway — open skills
531
+ * never reach the posture arm, so that clause cannot be contradicted.
532
+ *
533
+ * ── AND WHY AN EMPTY LIST IS NEVER A DENIAL ─────────────────────────────
534
+ *
535
+ * Every set arrives as {@link SpokenIds}, which carries whether the UNFILTERED
536
+ * set held anything. That is the difference between "nothing was reachable" and
537
+ * "nothing reachable may be named", and this composer used to say the first
538
+ * when the second was true — over a graph that was routing the cursor the whole
539
+ * time. Where the filter empties a set, the clause is omitted. A model told the
540
+ * map is a dead end stops asking for the door it may not be shown.
541
+ *
542
+ * Exported so a producer registry can list it beside the other model-facing
543
+ * composers rather than re-deriving what it says.
544
+ */
545
+ export declare function composeReadSkillRefusal(args: {
546
+ /** The id the model asked for, verbatim. */
547
+ readonly requestedId: string;
548
+ /** Which class the target fell in — from `classifySkillTarget`, the one owner. */
549
+ readonly targetClass: SkillTargetClass;
550
+ /** Where the cursor stood when that call was made. */
551
+ readonly cursorId?: string;
552
+ /** Declared hops from that cursor, through the role filter — and carrying
553
+ * whether the graph held any, so a filtered-to-empty set omits its clause
554
+ * instead of denying the hops the graph is holding. */
555
+ readonly hops: SpokenIds;
556
+ /** Open skills, through the same filter. */
557
+ readonly openIds: SpokenIds;
558
+ /** The mounted graph is a decision `tree()` — no cursor to move. */
559
+ readonly isTree?: boolean;
560
+ /** The posture that declined a reachable hop, when one did (SG-C). */
561
+ readonly posture?: 'guard' | 'rails';
562
+ /** The menu that was outstanding when that call was made, through the same
563
+ * filter. Present only under `'guard'` with a menu the pick missed — and
564
+ * `held: true` with nothing named says a menu WAS outstanding and none of it
565
+ * may be named, which is a third sentence, not the no-menu one. */
566
+ readonly menuOffered?: SpokenIds;
567
+ /** How the turn's start was resolved — `TurnRoute.by` — for the
568
+ * `'guard'`-without-a-menu arm. Each value is a different past fact about
569
+ * the turn, and the arm says only the one it was handed (9.86.1): it used to
570
+ * append "Declared routes moved the cursor instead." to every no-menu
571
+ * refusal, which is false for a cursor carried over from the previous turn
572
+ * (`'continuity'`) and for a menu the model's own pick had resolved
573
+ * (`'menu'`), and unprovable for `'none'`. */
574
+ readonly turnStartedBy?: TurnRoute['by'];
575
+ /** A cursor EXISTED on that call and the role filter kept its id out of the
576
+ * sentence (9.86.1). `cursorId` is absent in two situations that need two
577
+ * different sentences: a cold start, where "the turn's start" is the true
578
+ * anchor, and a hidden cursor, where the skill is real and merely unnamed.
579
+ * The description already withholds a hidden cursor's name — pinned by
580
+ * `test/security/skill-visibility.test.ts` — and the refusal printed it raw. */
581
+ readonly cursorWithheld?: boolean;
582
+ }): string;
398
583
  export declare function buildToolCallsHandler(deps: ToolCallsHandlerDeps): PausableHandler<TypedScope<AgentState>>;