@xrkseek/harness 0.5.10 → 0.5.11

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 (191) hide show
  1. package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts +4 -3
  2. package/node_modules/@xrkseek/core-agent-loop/dist/index.d.ts.map +1 -1
  3. package/node_modules/@xrkseek/core-agent-loop/dist/index.js +22 -60
  4. package/node_modules/@xrkseek/core-agent-loop/dist/index.js.map +1 -1
  5. package/node_modules/@xrkseek/core-agent-loop/dist/settle-batch.d.ts +11 -3
  6. package/node_modules/@xrkseek/core-agent-loop/dist/settle-batch.d.ts.map +1 -1
  7. package/node_modules/@xrkseek/core-agent-loop/dist/settle-batch.js +23 -8
  8. package/node_modules/@xrkseek/core-agent-loop/dist/settle-batch.js.map +1 -1
  9. package/node_modules/@xrkseek/core-session/dist/sqlite-store.d.ts.map +1 -1
  10. package/node_modules/@xrkseek/core-session/dist/sqlite-store.js +27 -1
  11. package/node_modules/@xrkseek/core-session/dist/sqlite-store.js.map +1 -1
  12. package/node_modules/@xrkseek/core-tools/dist/index.d.ts +1 -1
  13. package/node_modules/@xrkseek/core-tools/dist/index.d.ts.map +1 -1
  14. package/node_modules/@xrkseek/core-tools/dist/index.js +1 -1
  15. package/node_modules/@xrkseek/core-tools/dist/index.js.map +1 -1
  16. package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.d.ts +9 -0
  17. package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.d.ts.map +1 -1
  18. package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js +45 -18
  19. package/node_modules/@xrkseek/core-tools/dist/subagent-prompt.js.map +1 -1
  20. package/node_modules/@xrkseek/exec-fs/dist/index.d.ts +9 -1
  21. package/node_modules/@xrkseek/exec-fs/dist/index.d.ts.map +1 -1
  22. package/node_modules/@xrkseek/exec-fs/dist/index.js +18 -13
  23. package/node_modules/@xrkseek/exec-fs/dist/index.js.map +1 -1
  24. package/node_modules/@xrkseek/exec-fs/dist/paths.d.ts +11 -0
  25. package/node_modules/@xrkseek/exec-fs/dist/paths.d.ts.map +1 -1
  26. package/node_modules/@xrkseek/exec-fs/dist/paths.js +40 -0
  27. package/node_modules/@xrkseek/exec-fs/dist/paths.js.map +1 -1
  28. package/node_modules/@xrkseek/exec-memory/dist/index.d.ts +2 -2
  29. package/node_modules/@xrkseek/exec-memory/dist/index.d.ts.map +1 -1
  30. package/node_modules/@xrkseek/exec-memory/dist/index.js +2 -2
  31. package/node_modules/@xrkseek/exec-memory/dist/index.js.map +1 -1
  32. package/node_modules/@xrkseek/exec-memory/dist/store.d.ts +18 -0
  33. package/node_modules/@xrkseek/exec-memory/dist/store.d.ts.map +1 -1
  34. package/node_modules/@xrkseek/exec-memory/dist/store.js +108 -7
  35. package/node_modules/@xrkseek/exec-memory/dist/store.js.map +1 -1
  36. package/node_modules/@xrkseek/exec-memory/dist/tools.d.ts.map +1 -1
  37. package/node_modules/@xrkseek/exec-memory/dist/tools.js +17 -1
  38. package/node_modules/@xrkseek/exec-memory/dist/tools.js.map +1 -1
  39. package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts +2 -0
  40. package/node_modules/@xrkseek/exec-memory/dist/write-path.d.ts.map +1 -1
  41. package/node_modules/@xrkseek/exec-memory/dist/write-path.js +28 -3
  42. package/node_modules/@xrkseek/exec-memory/dist/write-path.js.map +1 -1
  43. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts +7 -4
  44. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.d.ts.map +1 -1
  45. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js +4 -0
  46. package/node_modules/@xrkseek/exec-sandbox/dist/resolve.js.map +1 -1
  47. package/node_modules/@xrkseek/exec-sandbox/dist/service.d.ts +7 -0
  48. package/node_modules/@xrkseek/exec-sandbox/dist/service.d.ts.map +1 -1
  49. package/node_modules/@xrkseek/exec-sandbox/dist/service.js +18 -8
  50. package/node_modules/@xrkseek/exec-sandbox/dist/service.js.map +1 -1
  51. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts +16 -0
  52. package/node_modules/@xrkseek/preset-harness/dist/preset.d.ts.map +1 -1
  53. package/node_modules/@xrkseek/preset-harness/dist/preset.js +13 -2
  54. package/node_modules/@xrkseek/preset-harness/dist/preset.js.map +1 -1
  55. package/node_modules/@xrkseek/preset-harness/dist/tsconfig.tsbuildinfo +1 -1
  56. package/node_modules/@xrkseek/preset-minimal/dist/tsconfig.tsbuildinfo +1 -1
  57. package/node_modules/@xrkseek/preset-server/dist/preset.d.ts.map +1 -1
  58. package/node_modules/@xrkseek/preset-server/dist/preset.js +4 -1
  59. package/node_modules/@xrkseek/preset-server/dist/preset.js.map +1 -1
  60. package/node_modules/@xrkseek/preset-server/dist/tsconfig.tsbuildinfo +1 -1
  61. package/node_modules/@xrkseek/server-face/dist/adapt/index.d.ts +1 -1
  62. package/node_modules/@xrkseek/server-face/dist/adapt/index.d.ts.map +1 -1
  63. package/node_modules/@xrkseek/server-face/dist/adapt/index.js +1 -1
  64. package/node_modules/@xrkseek/server-face/dist/adapt/index.js.map +1 -1
  65. package/node_modules/@xrkseek/server-face/dist/adapt/model-route.d.ts +5 -0
  66. package/node_modules/@xrkseek/server-face/dist/adapt/model-route.d.ts.map +1 -1
  67. package/node_modules/@xrkseek/server-face/dist/adapt/model-route.js +16 -0
  68. package/node_modules/@xrkseek/server-face/dist/adapt/model-route.js.map +1 -1
  69. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.d.ts +32 -0
  70. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.d.ts.map +1 -1
  71. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js +87 -0
  72. package/node_modules/@xrkseek/server-face/dist/adapt/subagent-notice.js.map +1 -1
  73. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts +102 -0
  74. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.d.ts.map +1 -0
  75. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js +495 -0
  76. package/node_modules/@xrkseek/server-face/dist/agent-roster-store.js.map +1 -0
  77. package/node_modules/@xrkseek/server-face/dist/agent-roster-tools.d.ts +12 -0
  78. package/node_modules/@xrkseek/server-face/dist/agent-roster-tools.d.ts.map +1 -0
  79. package/node_modules/@xrkseek/server-face/dist/agent-roster-tools.js +141 -0
  80. package/node_modules/@xrkseek/server-face/dist/agent-roster-tools.js.map +1 -0
  81. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.d.ts +6 -0
  82. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.d.ts.map +1 -1
  83. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js +61 -0
  84. package/node_modules/@xrkseek/server-face/dist/agent-team-roles.js.map +1 -1
  85. package/node_modules/@xrkseek/server-face/dist/capture-member-playbook.d.ts +6 -0
  86. package/node_modules/@xrkseek/server-face/dist/capture-member-playbook.d.ts.map +1 -0
  87. package/node_modules/@xrkseek/server-face/dist/capture-member-playbook.js +43 -0
  88. package/node_modules/@xrkseek/server-face/dist/capture-member-playbook.js.map +1 -0
  89. package/node_modules/@xrkseek/server-face/dist/context.d.ts +4 -0
  90. package/node_modules/@xrkseek/server-face/dist/context.d.ts.map +1 -1
  91. package/node_modules/@xrkseek/server-face/dist/dispatch.d.ts.map +1 -1
  92. package/node_modules/@xrkseek/server-face/dist/dispatch.js +19 -0
  93. package/node_modules/@xrkseek/server-face/dist/dispatch.js.map +1 -1
  94. package/node_modules/@xrkseek/server-face/dist/fork-cut.d.ts +3 -2
  95. package/node_modules/@xrkseek/server-face/dist/fork-cut.d.ts.map +1 -1
  96. package/node_modules/@xrkseek/server-face/dist/fork-cut.js +58 -20
  97. package/node_modules/@xrkseek/server-face/dist/fork-cut.js.map +1 -1
  98. package/node_modules/@xrkseek/server-face/dist/handlers/session.d.ts.map +1 -1
  99. package/node_modules/@xrkseek/server-face/dist/handlers/session.js +60 -20
  100. package/node_modules/@xrkseek/server-face/dist/handlers/session.js.map +1 -1
  101. package/node_modules/@xrkseek/server-face/dist/handlers/subagent.d.ts.map +1 -1
  102. package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js +5 -0
  103. package/node_modules/@xrkseek/server-face/dist/handlers/subagent.js.map +1 -1
  104. package/node_modules/@xrkseek/server-face/dist/handlers/team.d.ts +11 -0
  105. package/node_modules/@xrkseek/server-face/dist/handlers/team.d.ts.map +1 -0
  106. package/node_modules/@xrkseek/server-face/dist/handlers/team.js +268 -0
  107. package/node_modules/@xrkseek/server-face/dist/handlers/team.js.map +1 -0
  108. package/node_modules/@xrkseek/server-face/dist/index.d.ts +4 -0
  109. package/node_modules/@xrkseek/server-face/dist/index.d.ts.map +1 -1
  110. package/node_modules/@xrkseek/server-face/dist/index.js +4 -0
  111. package/node_modules/@xrkseek/server-face/dist/index.js.map +1 -1
  112. package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts +11 -1
  113. package/node_modules/@xrkseek/server-face/dist/model-catalog.d.ts.map +1 -1
  114. package/node_modules/@xrkseek/server-face/dist/model-catalog.js +27 -1
  115. package/node_modules/@xrkseek/server-face/dist/model-catalog.js.map +1 -1
  116. package/node_modules/@xrkseek/server-face/dist/presence-tools.d.ts.map +1 -1
  117. package/node_modules/@xrkseek/server-face/dist/presence-tools.js +15 -6
  118. package/node_modules/@xrkseek/server-face/dist/presence-tools.js.map +1 -1
  119. package/node_modules/@xrkseek/server-face/dist/presets-catalog.d.ts +16 -0
  120. package/node_modules/@xrkseek/server-face/dist/presets-catalog.d.ts.map +1 -1
  121. package/node_modules/@xrkseek/server-face/dist/presets-catalog.js +5 -0
  122. package/node_modules/@xrkseek/server-face/dist/presets-catalog.js.map +1 -1
  123. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.d.ts +8 -2
  124. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.d.ts.map +1 -1
  125. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.js +14 -12
  126. package/node_modules/@xrkseek/server-face/dist/projections/units/turn-outline.js.map +1 -1
  127. package/node_modules/@xrkseek/server-face/dist/runtime.d.ts.map +1 -1
  128. package/node_modules/@xrkseek/server-face/dist/runtime.js +19 -0
  129. package/node_modules/@xrkseek/server-face/dist/runtime.js.map +1 -1
  130. package/node_modules/@xrkseek/server-face/dist/session-model-store.d.ts +2 -0
  131. package/node_modules/@xrkseek/server-face/dist/session-model-store.d.ts.map +1 -1
  132. package/node_modules/@xrkseek/server-face/dist/session-model-store.js +14 -0
  133. package/node_modules/@xrkseek/server-face/dist/session-model-store.js.map +1 -1
  134. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts +13 -0
  135. package/node_modules/@xrkseek/server-face/dist/session-status.d.ts.map +1 -1
  136. package/node_modules/@xrkseek/server-face/dist/session-status.js +19 -2
  137. package/node_modules/@xrkseek/server-face/dist/session-status.js.map +1 -1
  138. package/node_modules/@xrkseek/server-face/dist/session-thread-publish.d.ts +17 -0
  139. package/node_modules/@xrkseek/server-face/dist/session-thread-publish.d.ts.map +1 -0
  140. package/node_modules/@xrkseek/server-face/dist/session-thread-publish.js +34 -0
  141. package/node_modules/@xrkseek/server-face/dist/session-thread-publish.js.map +1 -0
  142. package/node_modules/@xrkseek/server-face/dist/session-thread-store.d.ts +38 -0
  143. package/node_modules/@xrkseek/server-face/dist/session-thread-store.d.ts.map +1 -0
  144. package/node_modules/@xrkseek/server-face/dist/session-thread-store.js +207 -0
  145. package/node_modules/@xrkseek/server-face/dist/session-thread-store.js.map +1 -0
  146. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.d.ts +12 -0
  147. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.d.ts.map +1 -0
  148. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.js +223 -0
  149. package/node_modules/@xrkseek/server-face/dist/session-thread-tools.js.map +1 -0
  150. package/node_modules/@xrkseek/server-face/dist/settings-document.d.ts.map +1 -1
  151. package/node_modules/@xrkseek/server-face/dist/settings-document.js +10 -11
  152. package/node_modules/@xrkseek/server-face/dist/settings-document.js.map +1 -1
  153. package/node_modules/@xrkseek/server-face/dist/settings-schemas.d.ts.map +1 -1
  154. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js +5 -10
  155. package/node_modules/@xrkseek/server-face/dist/settings-schemas.js.map +1 -1
  156. package/node_modules/@xrkseek/server-face/dist/subagent-registry.d.ts +19 -0
  157. package/node_modules/@xrkseek/server-face/dist/subagent-registry.d.ts.map +1 -1
  158. package/node_modules/@xrkseek/server-face/dist/subagent-registry.js +47 -13
  159. package/node_modules/@xrkseek/server-face/dist/subagent-registry.js.map +1 -1
  160. package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts +21 -0
  161. package/node_modules/@xrkseek/server-face/dist/subagent-tools.d.ts.map +1 -1
  162. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js +148 -37
  163. package/node_modules/@xrkseek/server-face/dist/subagent-tools.js.map +1 -1
  164. package/node_modules/@xrkseek/server-face/dist/types.d.ts +9 -0
  165. package/node_modules/@xrkseek/server-face/dist/types.d.ts.map +1 -1
  166. package/node_modules/@xrkseek/server-face/dist/wire/paths.d.ts.map +1 -1
  167. package/node_modules/@xrkseek/server-face/dist/wire/paths.js +2 -0
  168. package/node_modules/@xrkseek/server-face/dist/wire/paths.js.map +1 -1
  169. package/node_modules/@xrkseek/server-face/dist/workspace-face.d.ts.map +1 -1
  170. package/node_modules/@xrkseek/server-face/dist/workspace-face.js +7 -0
  171. package/node_modules/@xrkseek/server-face/dist/workspace-face.js.map +1 -1
  172. package/node_modules/@xrkseek/server-host/dist/agent-cache.d.ts +5 -1
  173. package/node_modules/@xrkseek/server-host/dist/agent-cache.d.ts.map +1 -1
  174. package/node_modules/@xrkseek/server-host/dist/agent-cache.js +29 -3
  175. package/node_modules/@xrkseek/server-host/dist/agent-cache.js.map +1 -1
  176. package/node_modules/@xrkseek/server-host/dist/index.d.ts +21 -0
  177. package/node_modules/@xrkseek/server-host/dist/index.d.ts.map +1 -1
  178. package/node_modules/@xrkseek/server-host/dist/index.js +105 -8
  179. package/node_modules/@xrkseek/server-host/dist/index.js.map +1 -1
  180. package/node_modules/@xrkseek/server-http/dist/static.d.ts.map +1 -1
  181. package/node_modules/@xrkseek/server-http/dist/static.js +45 -5
  182. package/node_modules/@xrkseek/server-http/dist/static.js.map +1 -1
  183. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts +8 -0
  184. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.d.ts.map +1 -1
  185. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js +6 -2
  186. package/node_modules/@xrkseek/workspace/dist/ecosystem-instructions.js.map +1 -1
  187. package/node_modules/@xrkseek/workspace/dist/index.d.ts +16 -0
  188. package/node_modules/@xrkseek/workspace/dist/index.d.ts.map +1 -1
  189. package/node_modules/@xrkseek/workspace/dist/index.js +17 -8
  190. package/node_modules/@xrkseek/workspace/dist/index.js.map +1 -1
  191. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  export { EVENT_ISOMORPHISM, toFaceWireSessionEvent, toMuxSessionEvent, toWireHistoryEntry, wireNumericId, type FaceWireSessionEvent, type WireAdaptContext, type WireHistoryEntry, } from "./wire-event.js";
2
- export { assistantMessageSource, FACE_ASSISTANT_SOURCE_PLACEHOLDER, FACE_USAGE_ROUTE_PLACEHOLDER, providerModelKey, routeFromRequestHeader, type FaceModelRoute, } from "./model-route.js";
2
+ export { assistantMessageSource, FACE_ASSISTANT_SOURCE_PLACEHOLDER, FACE_USAGE_ROUTE_PLACEHOLDER, providerModelKey, routeFromRequestHeader, lastRequestHeaderSelection, type FaceModelRoute, } from "./model-route.js";
3
3
  export { FaceInboxWireMaps, FaceInboxWireProjector, type FaceInboxSplice, type FaceWireUserMessage, type InboxTarget, } from "./inbox-wire.js";
4
4
  export { FaceWireIdMaps } from "./wire-ids.js";
5
5
  export { presentToolView, collectToolCallArgs, collectToolCallArgsForPage, FaceToolArgMaps, faceToolLookup, type PresentToolLookup, type ToolCallPairing, type ToolEventView, } from "./tool-view.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,iCAAiC,EACjC,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,eAAe,EACf,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,aAAa,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/adapt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,EACb,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,gBAAgB,GACtB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,iCAAiC,EACjC,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,EAC1B,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,KAAK,eAAe,EACpB,KAAK,mBAAmB,EACxB,KAAK,WAAW,GACjB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,eAAe,EACf,cAAc,EACd,KAAK,iBAAiB,EACtB,KAAK,eAAe,EACpB,KAAK,aAAa,GACnB,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,EACxB,KAAK,cAAc,EACnB,KAAK,OAAO,EACZ,KAAK,aAAa,GACnB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC"}
@@ -1,5 +1,5 @@
1
1
  export { EVENT_ISOMORPHISM, toFaceWireSessionEvent, toMuxSessionEvent, toWireHistoryEntry, wireNumericId, } from "./wire-event.js";
2
- export { assistantMessageSource, FACE_ASSISTANT_SOURCE_PLACEHOLDER, FACE_USAGE_ROUTE_PLACEHOLDER, providerModelKey, routeFromRequestHeader, } from "./model-route.js";
2
+ export { assistantMessageSource, FACE_ASSISTANT_SOURCE_PLACEHOLDER, FACE_USAGE_ROUTE_PLACEHOLDER, providerModelKey, routeFromRequestHeader, lastRequestHeaderSelection, } from "./model-route.js";
3
3
  export { FaceInboxWireMaps, FaceInboxWireProjector, } from "./inbox-wire.js";
4
4
  export { FaceWireIdMaps } from "./wire-ids.js";
5
5
  export { presentToolView, collectToolCallArgs, collectToolCallArgsForPage, FaceToolArgMaps, faceToolLookup, } from "./tool-view.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,GAId,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,iCAAiC,EACjC,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,GAEvB,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,sBAAsB,GAIvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,eAAe,EACf,cAAc,GAIf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,GAIzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/adapt/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,iBAAiB,EACjB,sBAAsB,EACtB,iBAAiB,EACjB,kBAAkB,EAClB,aAAa,GAId,MAAM,iBAAiB,CAAC;AACzB,OAAO,EACL,sBAAsB,EACtB,iCAAiC,EACjC,4BAA4B,EAC5B,gBAAgB,EAChB,sBAAsB,EACtB,0BAA0B,GAE3B,MAAM,kBAAkB,CAAC;AAC1B,OAAO,EACL,iBAAiB,EACjB,sBAAsB,GAIvB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAC/C,OAAO,EACL,eAAe,EACf,mBAAmB,EACnB,0BAA0B,EAC1B,eAAe,EACf,cAAc,GAIf,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,QAAQ,EACR,yBAAyB,EACzB,kBAAkB,EAClB,wBAAwB,GAIzB,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,8BAA8B,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7F,OAAO,EACL,gBAAgB,EAChB,4BAA4B,GAC7B,MAAM,4BAA4B,CAAC"}
@@ -31,7 +31,12 @@ export declare function routeFromRequestHeader(event: {
31
31
  readonly config?: {
32
32
  readonly provider?: string;
33
33
  readonly model?: string;
34
+ readonly reasoningEffort?: string;
34
35
  };
35
36
  };
36
37
  }): FaceModelRoute | undefined;
38
+ /** Latest `request/header` route in a log prefix (ignores live Face maps). */
39
+ export declare function lastRequestHeaderSelection(events: readonly Parameters<typeof routeFromRequestHeader>[0][]): (FaceModelRoute & {
40
+ reasoningEffort?: string;
41
+ }) | undefined;
37
42
  //# sourceMappingURL=model-route.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-route.d.ts","sourceRoot":"","sources":["../../src/adapt/model-route.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,MAAM,WAAW,cAAc;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,2EAA2E;AAC3E,eAAO,MAAM,iCAAiC;;;;CAIpC,CAAC;AAEX,oEAAoE;AACpE,eAAO,MAAM,4BAA4B,EAAE,cAG1C,CAAC;AAEF;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,KAAK,CAAC,EAAE,cAAc,GAAG,IAAI,GAC5B;IACD,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAA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AE;YAChB,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;YAC3B,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;YACxB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;SACnC,CAAC;KACH,CAAC;CACH,GAAG,cAAc,GAAG,SAAS,CAM7B;AAED,8EAA8E;AAC9E,wBAAgB,0BAA0B,CACxC,MAAM,EAAE,SAAS,UAAU,CAAC,OAAO,sBAAsB,CAAC,CAAC,CAAC,CAAC,EAAE,GAC9D,CAAC,cAAc,GAAG;IAAE,eAAe,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,GAAG,SAAS,CAa7D"}
@@ -37,4 +37,20 @@ export function routeFromRequestHeader(event) {
37
37
  return undefined;
38
38
  return { provider, model };
39
39
  }
40
+ /** Latest `request/header` route in a log prefix (ignores live Face maps). */
41
+ export function lastRequestHeaderSelection(events) {
42
+ let last;
43
+ for (const event of events) {
44
+ const route = routeFromRequestHeader(event);
45
+ if (!route)
46
+ continue;
47
+ const effort = event.header?.config?.reasoningEffort?.trim();
48
+ last = {
49
+ provider: route.provider,
50
+ model: route.model,
51
+ ...(effort ? { reasoningEffort: effort } : {}),
52
+ };
53
+ }
54
+ return last;
55
+ }
40
56
  //# sourceMappingURL=model-route.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"model-route.js","sourceRoot":"","sources":["../../src/adapt/model-route.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAOH,2EAA2E;AAC3E,MAAM,CAAC,MAAM,iCAAiC,GAAG;IAC/C,IAAI,EAAE,OAAO;IACb,QAAQ,EAAE,KAAK;IACf,KAAK,EAAE,SAAS;CACR,CAAC;AAEX,oEAAoE;AACpE,MAAM,CAAC,MAAM,4BAA4B,GAAmB;IAC1D,QAAQ,EAAE,SAAS;IACnB,KAAK,EAAE,SAAS;CACjB,CAAC;AAEF;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CACpC,KAA6B;IAM7B,MAAM,QA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EAAE,KAAK,CAAC,QAAQ;YACxB,KAAK,EAAE,KAAK,CAAC,KAAK;YAClB,GAAG,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,eAAe,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/C,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -11,6 +11,38 @@ import type { FaceSubagentLink } from "../subagent-registry.js";
11
11
  export declare function lastAssistantBodyText(events: readonly SessionEvent[]): string;
12
12
  /** Latest `turn/end.reason` on the child log (undefined when still open). */
13
13
  export declare function lastTurnEndReason(events: readonly SessionEvent[]): TurnEndReason | undefined;
14
+ /**
15
+ * What the child's model request was doing when the parent gave up: mid
16
+ * provider retry (attempt n/max, code, backoff) or nothing at all. A parent
17
+ * reading only "timed out" cannot tell a rate-limited child from one wedged
18
+ * on a tool, and answers them differently. Undefined once the retry wait
19
+ * already elapsed — that is a completed retry, not a diagnosis.
20
+ */
21
+ export declare function lastModelRetryNotice(events: readonly SessionEvent[]): string | undefined;
22
+ export type ChildOutcomeKind = TurnEndReason["kind"] | "none";
23
+ export type ChildAbortCause = "user" | "parent" | "disposed" | "hook" | "legacy";
24
+ export interface ChildOutcome {
25
+ readonly kind: ChildOutcomeKind;
26
+ /** Set only for `kind: "aborted"` — who cut the turn off. */
27
+ readonly cause?: ChildAbortCause;
28
+ /** Ms since the child's last event; undefined for a session with no log. */
29
+ readonly quietMs?: number;
30
+ }
31
+ /**
32
+ * How a child's last turn ended, structurally. One source for both consumers:
33
+ * the model-facing `list_agents` row (see {@link formatChildOutcome}) and the
34
+ * catalog RPC the client renders.
35
+ */
36
+ export declare function describeChildOutcome(events: readonly SessionEvent[], now?: number): ChildOutcome;
37
+ /**
38
+ * How a child's last turn actually ended, plus how long it has been quiet.
39
+ *
40
+ * `activity: idle` alone cannot tell a finished child from one the parent's
41
+ * wait budget cut off — both read as "inactive" in the roster, so a parent
42
+ * reviewing its own tree reads a kill as a completion.
43
+ */
44
+ export declare function formatDescribedChildOutcome(outcome: ChildOutcome): string;
45
+ export declare function formatChildOutcome(events: readonly SessionEvent[], now?: number): string;
14
46
  /**
15
47
  * Parent inbox notice when a background (continuable) child drain goes idle.
16
48
  * Normal idle → "finished a turn". Abnormal `turn/end` (abort / error / …)
@@ -1 +1 @@
1
- {"version":3,"file":"subagent-notice.d.ts","sourceRoot":"","sources":["../../src/adapt/subagent-notice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,MAAM,CAyBR;AAED,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,aAAa,GAAG,SAAS,CAM3B;AAmBD;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAaR"}
1
+ {"version":3,"file":"subagent-notice.d.ts","sourceRoot":"","sources":["../../src/adapt/subagent-notice.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AACrE,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAC;AAEhE;;;;;;;GAOG;AACH,wBAAgB,qBAAqB,CACnC,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,MAAM,CAyBR;AAED,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAC/B,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,aAAa,GAAG,SAAS,CAM3B;AAED;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,YAAY,EAAE,GAC9B,MAAM,GAAG,SAAS,CAkBpB;AAmBD,MAAM,MAAM,gBAAgB,GAAG,aAAa,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;AAC9D,MAAM,MAAM,eAAe,GACvB,MAAM,GACN,QAAQ,GACR,UAAU,GACV,MAAM,GACN,QAAQ,CAAC;AAEb,MAAM,WAAW,YAAY;IAC3B,QAAQ,CAAC,IAAI,EAAE,gBAAgB,CAAC;IAChC,6DAA6D;IAC7D,QAAQ,CAAC,KAAK,CAAC,EAAE,eAAe,CAAC;IACjC,4EAA4E;IAC5E,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,GAAG,GAAE,MAAmB,GACvB,YAAY,CAqBd;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,OAAO,EAAE,YAAY,GAAG,MAAM,CAuBzE;AAED,wBAAgB,kBAAkB,CAChC,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,GAAG,GAAE,MAAmB,GACvB,MAAM,CAER;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,gBAAgB,EACtB,MAAM,EAAE,SAAS,YAAY,EAAE,EAC/B,UAAU,CAAC,EAAE,MAAM,GAClB,MAAM,CAaR"}
@@ -45,6 +45,34 @@ export function lastTurnEndReason(events) {
45
45
  }
46
46
  return undefined;
47
47
  }
48
+ /**
49
+ * What the child's model request was doing when the parent gave up: mid
50
+ * provider retry (attempt n/max, code, backoff) or nothing at all. A parent
51
+ * reading only "timed out" cannot tell a rate-limited child from one wedged
52
+ * on a tool, and answers them differently. Undefined once the retry wait
53
+ * already elapsed — that is a completed retry, not a diagnosis.
54
+ */
55
+ export function lastModelRetryNotice(events) {
56
+ for (let i = events.length - 1; i >= 0; i -= 1) {
57
+ const ev = events[i];
58
+ if (ev.type === "llm/retry-started")
59
+ return undefined;
60
+ if (ev.type !== "llm/retry")
61
+ continue;
62
+ const budget = ev.maxRetries !== undefined
63
+ ? `${ev.retry}/${ev.maxRetries}`
64
+ : `${ev.retry}`;
65
+ const status = ev.failure.status !== undefined
66
+ ? ` status ${ev.failure.status}`
67
+ : "";
68
+ const wait = Math.round(ev.delayMs / 1000);
69
+ const head = `Child was mid model-retry: attempt ${budget} (${ev.failure.code}${status})`;
70
+ const via = ev.provider !== undefined ? ` via ${ev.provider}` : "";
71
+ const backoff = wait >= 1 ? `, ${wait}s backoff` : `, ${ev.delayMs}ms backoff`;
72
+ return `${head}${via}${backoff}.`;
73
+ }
74
+ return undefined;
75
+ }
48
76
  function abnormalHeadDetail(reason) {
49
77
  if (reason.kind === "aborted") {
50
78
  const cause = reason.reason;
@@ -70,6 +98,65 @@ function abnormalHeadDetail(reason) {
70
98
  return "blocked";
71
99
  return undefined;
72
100
  }
101
+ /**
102
+ * How a child's last turn ended, structurally. One source for both consumers:
103
+ * the model-facing `list_agents` row (see {@link formatChildOutcome}) and the
104
+ * catalog RPC the client renders.
105
+ */
106
+ export function describeChildOutcome(events, now = Date.now()) {
107
+ const last = events[events.length - 1];
108
+ const quietMs = last ? Math.max(0, now - last.ts) : undefined;
109
+ const quiet = quietMs !== undefined ? { quietMs } : {};
110
+ const reason = lastTurnEndReason(events);
111
+ if (reason === undefined)
112
+ return { kind: "none", ...quiet };
113
+ if (reason.kind === "aborted") {
114
+ const cause = reason.reason;
115
+ return {
116
+ kind: "aborted",
117
+ cause: cause.kind === "user" ||
118
+ cause.kind === "parent" ||
119
+ cause.kind === "disposed" ||
120
+ cause.kind === "hook"
121
+ ? cause.kind
122
+ : "legacy",
123
+ ...quiet,
124
+ };
125
+ }
126
+ return { kind: reason.kind, ...quiet };
127
+ }
128
+ /**
129
+ * How a child's last turn actually ended, plus how long it has been quiet.
130
+ *
131
+ * `activity: idle` alone cannot tell a finished child from one the parent's
132
+ * wait budget cut off — both read as "inactive" in the roster, so a parent
133
+ * reviewing its own tree reads a kill as a completion.
134
+ */
135
+ export function formatDescribedChildOutcome(outcome) {
136
+ const { kind, cause, quietMs } = outcome;
137
+ const verdict = kind === "none"
138
+ ? "turn still open"
139
+ : kind === "aborted"
140
+ ? `aborted ${cause === "parent" ? "by parent" : cause === "user" ? "by user" : cause === "disposed" ? "(session disposed)" : cause === "hook" ? "(by hook)" : "(unknown source)"}`
141
+ : kind === "completed"
142
+ ? "finished"
143
+ : kind === "error"
144
+ ? "ended with error"
145
+ : kind === "interrupted"
146
+ ? "interrupted mid-turn"
147
+ : kind === "max-tokens"
148
+ ? "stopped at max tokens"
149
+ : "blocked";
150
+ const quiet = quietMs === undefined
151
+ ? "no events"
152
+ : quietMs < 90_000
153
+ ? `${Math.round(quietMs / 1000)}s ago`
154
+ : `${Math.round(quietMs / 60_000)}m ago`;
155
+ return `${verdict} · last event ${quiet}`;
156
+ }
157
+ export function formatChildOutcome(events, now = Date.now()) {
158
+ return formatDescribedChildOutcome(describeChildOutcome(events, now));
159
+ }
73
160
  /**
74
161
  * Parent inbox notice when a background (continuable) child drain goes idle.
75
162
  * Normal idle → "finished a turn". Abnormal `turn/end` (abort / error / …)
@@ -1 +1 @@
1
- {"version":3,"file":"subagent-notice.js","sourceRoot":"","sources":["../../src/adapt/subagent-notice.ts"],"names":[],"mappings":"AAGA;;;;;;;GAOG;AACH,MAAM,UAAU,qBAAqB,CACnC,MAA+B;IAE/B,KAAK,IAAI,CAAC,GAAG,MAAM,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC;QAC/C,MAAM,EAAE,GAAG,MAAM,CAAC,CAAC,CAAE,CAAC;QACtB,IAAI,EAAE,CAAC,IAAI,KAAK,mBAAmB,EAAE,CAAC;YACpC,MAAM,IAAI,GAAG,EAAE,CAAC,OAAO,CAAC,IAAI,EAAE,CAAC;YAC/B,IAAI,IA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C,CAAC;AAED,MAAM,UAAU,kBAAkB,CAChC,MAA+B,EAC/B,MAAc,IAAI,CAAC,GAAG,EAAE;IAExB,OAAO,2BAA2B,CAAC,oBAAoB,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,CAAC;AACxE,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,8BAA8B,CAC5C,IAAsB,EACtB,MAA+B,EAC/B,UAAmB;IAEnB,MAAM,UAAU,GAAG,iBAAiB,CAAC,MAAM,CAAC,CAAC;IAC7C,MAAM,QAAQ,GAAG,UAAU,CAAC,CAAC,CAAC,kBAAkB,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACzE,MAAM,IAAI,GAAG,QAAQ;QACnB,CAAC,CAAC,yBAAyB,IAAI,CAAC,cAAc,OAAO,IAAI,CAAC,KAAK,uBAAuB,QAAQ,IAAI;QAClG,CAAC,CAAC,yBAAyB,IAAI,CAAC,cAAc,OAAO,IAAI,CAAC,KAAK,oBAAoB,CAAC;IACtF,MAAM,OAAO,GAAG,CAAC,UAAU,KAAK,SAAS;QACvC,CAAC,CAAC,UAAU;QACZ,CAAC,CAAC,qBAAqB,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC;IAC1C,MAAM,MAAM,GACV,yEAAyE,CAAC;IAC5E,IAAI,CAAC,OAAO;QAAE,OAAO,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC;IACzC,OAAO,GAAG,IAAI,OAAO,OAAO,OAAO,MAAM,EAAE,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,102 @@
1
+ import { type AgentTeamSpawnRole } from "./agent-team-roles.js";
2
+ export declare const MEMBER_NAME_MAX = 40;
3
+ export declare const MEMBER_PLAYBOOK_MAX = 8000;
4
+ export declare const MEMBER_FACE_MAX = 80000;
5
+ export declare const MEMBER_BRIEF_MAX = 160;
6
+ export declare const GLOBAL_ROSTER_ID = "global";
7
+ export declare const MEMBER_SHAPES: readonly ["blob", "wedge", "gem", "squircle", "drop", "pill", "petal", "loaf", "heart", "star", "hex", "egg", "cloud", "shield"];
8
+ export declare const MEMBER_COLORS: readonly ["cream", "mist", "peach", "sage", "lilac", "slate", "coral", "butter", "mint", "sky", "rose", "cocoa", "honey", "ocean", "grape", "blush", "sand", "ink", "ice", "matcha"];
9
+ export declare const MEMBER_KITS: readonly ["none", "bow", "cap", "beanie", "visor", "specs", "specs-rect", "specs-cat", "specs-sun", "halo"];
10
+ export type MemberShape = (typeof MEMBER_SHAPES)[number];
11
+ export type MemberColor = (typeof MEMBER_COLORS)[number];
12
+ export type MemberKit = (typeof MEMBER_KITS)[number];
13
+ export type RosterScope = "global" | "workspace";
14
+ export type MemberInject = "subagent" | "minimal";
15
+ export interface MemberAppearance {
16
+ readonly shape: MemberShape;
17
+ readonly color: MemberColor;
18
+ /** Optional overlay kit (`none` omitted). Face sticker is separate. */
19
+ readonly kit?: Exclude<MemberKit, "none">;
20
+ /** Optional `data:image/...;base64,...` face sticker. */
21
+ readonly face?: string;
22
+ }
23
+ export interface MemberToolPolicy {
24
+ readonly mode: "allow" | "deny";
25
+ readonly names: readonly string[];
26
+ }
27
+ export interface AgentRosterMember {
28
+ readonly id: string;
29
+ readonly name: string;
30
+ readonly playbook: string;
31
+ readonly role: AgentTeamSpawnRole;
32
+ readonly appearance: MemberAppearance;
33
+ readonly brief: string;
34
+ readonly inject: MemberInject;
35
+ readonly tools?: MemberToolPolicy;
36
+ /** True for catalog examples that ship with the file. */
37
+ readonly seed?: true;
38
+ readonly updatedAt: number;
39
+ }
40
+ export type ListedRosterMember = AgentRosterMember & {
41
+ readonly scope: RosterScope;
42
+ };
43
+ /** Default allow-list for a file-only 干员 (release / inspect). */
44
+ export declare const MEMBER_FILE_TOOLS: readonly ["bash", "read", "grep", "glob"];
45
+ export declare function parseRosterScope(raw: unknown): RosterScope;
46
+ export declare function rosterRoot(productHome?: string): string;
47
+ export declare function parseMemberAppearance(raw: unknown, fallback: MemberAppearance): MemberAppearance;
48
+ export declare function parseMemberToolPolicy(raw: unknown): MemberToolPolicy | undefined;
49
+ export declare function parseMemberInject(raw: unknown, fallback: MemberInject): MemberInject;
50
+ /** Deny-only: a 干员 may weaken the parent preset, never add tools. */
51
+ export declare function applyRosterToolPolicy(tools: {
52
+ list(): readonly {
53
+ readonly name: string;
54
+ }[];
55
+ unregister(name: string): boolean;
56
+ }, role: AgentTeamSpawnRole | undefined, policy?: MemberToolPolicy): void;
57
+ export declare function rosterPublicFields(row: ListedRosterMember): {
58
+ tools?: MemberToolPolicy;
59
+ id: string;
60
+ name: string;
61
+ role: AgentTeamSpawnRole;
62
+ scope: RosterScope;
63
+ brief: string;
64
+ inject: MemberInject;
65
+ seed: boolean;
66
+ appearance: MemberAppearance;
67
+ };
68
+ export declare function formatRosterCatalog(members: readonly ListedRosterMember[]): string;
69
+ export declare function mergeGlobalSeedMembers(existing: readonly AgentRosterMember[], now?: number): {
70
+ readonly members: AgentRosterMember[];
71
+ readonly changed: boolean;
72
+ };
73
+ export declare function seedGlobalRosterMembers(now?: number): readonly AgentRosterMember[];
74
+ export declare class FaceAgentRosterStore {
75
+ private readonly productHome;
76
+ private readonly cache;
77
+ constructor(productHome?: string);
78
+ private emptyOrSeed;
79
+ private load;
80
+ private save;
81
+ list(workspaceId: string): readonly AgentRosterMember[];
82
+ /** Global members first, then workspace; same id → workspace wins. */
83
+ listVisible(workspaceId: string): readonly ListedRosterMember[];
84
+ get(workspaceId: string, memberId: string): ListedRosterMember | undefined;
85
+ upsert(workspaceId: string, input: {
86
+ readonly id?: string;
87
+ readonly name: string;
88
+ readonly playbook: string;
89
+ readonly role?: AgentTeamSpawnRole;
90
+ readonly appearance?: Partial<MemberAppearance> | null;
91
+ readonly brief?: string;
92
+ readonly inject?: MemberInject;
93
+ readonly tools?: MemberToolPolicy | null;
94
+ }): AgentRosterMember | undefined;
95
+ /**
96
+ * Write into global.json or the canvas file. Promoting to global drops a
97
+ * same-id workspace overlay so the global record is visible again.
98
+ */
99
+ upsertAtScope(canvasWorkspaceId: string, scope: RosterScope, input: Parameters<FaceAgentRosterStore["upsert"]>[1]): AgentRosterMember | undefined;
100
+ remove(workspaceId: string, memberId: string): boolean;
101
+ }
102
+ //# sourceMappingURL=agent-roster-store.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-roster-store.d.ts","sourceRoot":"","sources":["../src/agent-roster-store.ts"],"names":[],"mappings":"AAUA,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAG/B,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,mBAAmB,OAAQ,CAAC;AACzC,eAAO,MAAM,eAAe,QAAS,CAAC;AACtC,eAAO,MAAM,gBAAgB,MAAM,CAAC;AACpC,eAAO,MAAM,gBAAgB,WAAW,CAAC;AAEzC,eAAO,MAAM,aAAa,kIAehB,CAAC;AACX,eAAO,MAAM,aAAa,sLAqBhB,CAAC;AACX,eAAO,MAAM,WAAW,6GAWd,CAAC;AAEX,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AACzD,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,WAAW,CAAC,CAAC,MAAM,CAAC,CAAC;AACrD,MAAM,MAAM,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AACjD,MAAM,MAAM,YAAY,GAAG,UAAU,GAAG,SAAS,CAAC;AAElD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,uEAAuE;IACvE,QAAQ,CAAC,GAAG,CAAC,EAAE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;IAC1C,yDAAyD;IACzD,QAAQ,CAAC,IAAI,CAAC,EAAE,M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