@noodleseed/one 0.152.0 → 0.154.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.
Files changed (375) hide show
  1. package/dist/agent-product-skill-state.d.ts +2 -2
  2. package/dist/agent-product-skill-state.d.ts.map +1 -1
  3. package/dist/agent-product-skill-state.js.map +1 -1
  4. package/dist/agent-skills-state.d.ts +2 -2
  5. package/dist/agent-skills-state.d.ts.map +1 -1
  6. package/dist/agent-skills-state.js +1 -1
  7. package/dist/agent-skills-state.js.map +1 -1
  8. package/dist/agents.d.ts +2 -3
  9. package/dist/agents.d.ts.map +1 -1
  10. package/dist/agents.js.map +1 -1
  11. package/dist/checklist.d.ts +2 -1
  12. package/dist/checklist.d.ts.map +1 -1
  13. package/dist/commands/app-purge-reconciliation-args.d.ts +28 -0
  14. package/dist/commands/app-purge-reconciliation-args.d.ts.map +1 -0
  15. package/dist/commands/app-purge-reconciliation-args.js +124 -0
  16. package/dist/commands/app-purge-reconciliation-args.js.map +1 -0
  17. package/dist/commands/app-purge-reconciliation-files.d.ts +8 -0
  18. package/dist/commands/app-purge-reconciliation-files.d.ts.map +1 -0
  19. package/dist/commands/app-purge-reconciliation-files.js +109 -0
  20. package/dist/commands/app-purge-reconciliation-files.js.map +1 -0
  21. package/dist/commands/app-purge-reconciliation-ops.d.ts +3 -0
  22. package/dist/commands/app-purge-reconciliation-ops.d.ts.map +1 -0
  23. package/dist/commands/app-purge-reconciliation-ops.js +190 -0
  24. package/dist/commands/app-purge-reconciliation-ops.js.map +1 -0
  25. package/dist/commands/apps-ops.d.ts +0 -4
  26. package/dist/commands/apps-ops.d.ts.map +1 -1
  27. package/dist/commands/apps-ops.js +3 -3
  28. package/dist/commands/apps-ops.js.map +1 -1
  29. package/dist/commands/auth-ops.d.ts +0 -14
  30. package/dist/commands/auth-ops.d.ts.map +1 -1
  31. package/dist/commands/auth-ops.js +1 -1
  32. package/dist/commands/auth-ops.js.map +1 -1
  33. package/dist/commands/author-loop.d.ts +0 -2
  34. package/dist/commands/author-loop.d.ts.map +1 -1
  35. package/dist/commands/author-loop.js +2 -2
  36. package/dist/commands/author-loop.js.map +1 -1
  37. package/dist/commands/billing-ops.d.ts.map +1 -1
  38. package/dist/commands/billing-ops.js +7 -0
  39. package/dist/commands/billing-ops.js.map +1 -1
  40. package/dist/commands/billing-org-transfer-files.d.ts +12 -0
  41. package/dist/commands/billing-org-transfer-files.d.ts.map +1 -0
  42. package/dist/commands/billing-org-transfer-files.js +112 -0
  43. package/dist/commands/billing-org-transfer-files.js.map +1 -0
  44. package/dist/commands/billing-org-transfer-ops.d.ts +4 -0
  45. package/dist/commands/billing-org-transfer-ops.d.ts.map +1 -0
  46. package/dist/commands/billing-org-transfer-ops.js +534 -0
  47. package/dist/commands/billing-org-transfer-ops.js.map +1 -0
  48. package/dist/commands/catalog.d.ts +1 -7
  49. package/dist/commands/catalog.d.ts.map +1 -1
  50. package/dist/commands/catalog.js +3 -3
  51. package/dist/commands/catalog.js.map +1 -1
  52. package/dist/commands/config-values.d.ts +1 -47
  53. package/dist/commands/config-values.d.ts.map +1 -1
  54. package/dist/commands/config-values.js +11 -11
  55. package/dist/commands/config-values.js.map +1 -1
  56. package/dist/commands/connect-oauth.d.ts +0 -1
  57. package/dist/commands/connect-oauth.d.ts.map +1 -1
  58. package/dist/commands/connect-oauth.js +1 -1
  59. package/dist/commands/connect-oauth.js.map +1 -1
  60. package/dist/commands/connect.d.ts +0 -1
  61. package/dist/commands/connect.d.ts.map +1 -1
  62. package/dist/commands/connect.js +1 -1
  63. package/dist/commands/connect.js.map +1 -1
  64. package/dist/commands/customer-auth-smoke.d.ts +2 -1
  65. package/dist/commands/customer-auth-smoke.d.ts.map +1 -1
  66. package/dist/commands/customer-auth-smoke.js +3 -2
  67. package/dist/commands/customer-auth-smoke.js.map +1 -1
  68. package/dist/commands/deploy-ops.d.ts +0 -9
  69. package/dist/commands/deploy-ops.d.ts.map +1 -1
  70. package/dist/commands/deploy-ops.js +3 -4
  71. package/dist/commands/deploy-ops.js.map +1 -1
  72. package/dist/commands/deploy-resume.d.ts +0 -1
  73. package/dist/commands/deploy-resume.d.ts.map +1 -1
  74. package/dist/commands/deploy-resume.js +1 -1
  75. package/dist/commands/deploy-resume.js.map +1 -1
  76. package/dist/commands/deploy-version-resolution.d.ts +0 -2
  77. package/dist/commands/deploy-version-resolution.d.ts.map +1 -1
  78. package/dist/commands/deploy-version-resolution.js +1 -1
  79. package/dist/commands/deploy-version-resolution.js.map +1 -1
  80. package/dist/commands/deployments-ops.d.ts +0 -2
  81. package/dist/commands/deployments-ops.d.ts.map +1 -1
  82. package/dist/commands/deployments-ops.js +2 -2
  83. package/dist/commands/deployments-ops.js.map +1 -1
  84. package/dist/commands/envs-ops.d.ts +0 -3
  85. package/dist/commands/envs-ops.d.ts.map +1 -1
  86. package/dist/commands/envs-ops.js +3 -3
  87. package/dist/commands/envs-ops.js.map +1 -1
  88. package/dist/commands/feedback-ops.d.ts +0 -8
  89. package/dist/commands/feedback-ops.d.ts.map +1 -1
  90. package/dist/commands/feedback-ops.js +1 -1
  91. package/dist/commands/feedback-ops.js.map +1 -1
  92. package/dist/commands/github-ops.d.ts +0 -2
  93. package/dist/commands/github-ops.d.ts.map +1 -1
  94. package/dist/commands/github-ops.js +2 -2
  95. package/dist/commands/github-ops.js.map +1 -1
  96. package/dist/commands/mcp-apps.d.ts +0 -1
  97. package/dist/commands/mcp-apps.d.ts.map +1 -1
  98. package/dist/commands/org-admin.d.ts +0 -17
  99. package/dist/commands/org-admin.d.ts.map +1 -1
  100. package/dist/commands/org-admin.js +1 -2
  101. package/dist/commands/org-admin.js.map +1 -1
  102. package/dist/commands/output.d.ts +3 -12
  103. package/dist/commands/output.d.ts.map +1 -1
  104. package/dist/commands/output.js.map +1 -1
  105. package/dist/commands/platform-account-reset-files.d.ts +0 -3
  106. package/dist/commands/platform-account-reset-files.d.ts.map +1 -1
  107. package/dist/commands/platform-account-reset-files.js +1 -1
  108. package/dist/commands/platform-account-reset-files.js.map +1 -1
  109. package/dist/commands/platform-auth-rollout-acceleration-files.d.ts +0 -3
  110. package/dist/commands/platform-auth-rollout-acceleration-files.d.ts.map +1 -1
  111. package/dist/commands/platform-auth-rollout-acceleration-files.js +1 -1
  112. package/dist/commands/platform-auth-rollout-acceleration-files.js.map +1 -1
  113. package/dist/commands/project-setup.d.ts +0 -1
  114. package/dist/commands/project-setup.d.ts.map +1 -1
  115. package/dist/commands/project-setup.js +1 -1
  116. package/dist/commands/project-setup.js.map +1 -1
  117. package/dist/commands/resource-shared.d.ts +0 -6
  118. package/dist/commands/resource-shared.d.ts.map +1 -1
  119. package/dist/commands/resource-shared.js +1 -1
  120. package/dist/commands/resource-shared.js.map +1 -1
  121. package/dist/commands/service-ops.d.ts.map +1 -1
  122. package/dist/commands/service-ops.js +4 -1
  123. package/dist/commands/service-ops.js.map +1 -1
  124. package/dist/commands/session.d.ts +3 -13
  125. package/dist/commands/session.d.ts.map +1 -1
  126. package/dist/commands/session.js +2 -2
  127. package/dist/commands/session.js.map +1 -1
  128. package/dist/commands/target-picker.d.ts +0 -2
  129. package/dist/commands/target-picker.d.ts.map +1 -1
  130. package/dist/commands/target-picker.js +1 -1
  131. package/dist/commands/target-picker.js.map +1 -1
  132. package/dist/commands/update-ops.d.ts +0 -8
  133. package/dist/commands/update-ops.d.ts.map +1 -1
  134. package/dist/commands/update-ops.js +1 -1
  135. package/dist/commands/update-ops.js.map +1 -1
  136. package/dist/control-plane.d.ts +1 -1
  137. package/dist/control-plane.d.ts.map +1 -1
  138. package/dist/control-plane.js.map +1 -1
  139. package/dist/deploy.d.ts +0 -12
  140. package/dist/deploy.d.ts.map +1 -1
  141. package/dist/deploy.js +2 -2
  142. package/dist/deploy.js.map +1 -1
  143. package/dist/dev.d.ts.map +1 -1
  144. package/dist/dev.js +2 -3
  145. package/dist/dev.js.map +1 -1
  146. package/dist/devtools-auth-session.d.ts +0 -1
  147. package/dist/devtools-auth-session.d.ts.map +1 -1
  148. package/dist/devtools-auth-session.js.map +1 -1
  149. package/dist/devtools-chat.d.ts +1 -1
  150. package/dist/devtools-chat.d.ts.map +1 -1
  151. package/dist/devtools-chat.js.map +1 -1
  152. package/dist/devtools-delegated-exchange-state.d.ts +1 -1
  153. package/dist/devtools-delegated-exchange-state.d.ts.map +1 -1
  154. package/dist/devtools-design-contract.d.ts +3 -3
  155. package/dist/devtools-design-contract.d.ts.map +1 -1
  156. package/dist/devtools-design-contract.js +1 -1
  157. package/dist/devtools-design-contract.js.map +1 -1
  158. package/dist/devtools-preview.d.ts +1 -1
  159. package/dist/devtools-preview.d.ts.map +1 -1
  160. package/dist/devtools-rpc-forwarder.d.ts +2 -1
  161. package/dist/devtools-rpc-forwarder.d.ts.map +1 -1
  162. package/dist/devtools-rpc-forwarder.js +11 -12
  163. package/dist/devtools-rpc-forwarder.js.map +1 -1
  164. package/dist/gradient.d.ts +0 -3
  165. package/dist/gradient.d.ts.map +1 -1
  166. package/dist/gradient.js +1 -3
  167. package/dist/gradient.js.map +1 -1
  168. package/dist/local-compile.d.ts +2 -1
  169. package/dist/local-compile.d.ts.map +1 -1
  170. package/dist/local-target.d.ts +2 -1
  171. package/dist/local-target.d.ts.map +1 -1
  172. package/dist/node-version.d.ts +0 -2
  173. package/dist/node-version.d.ts.map +1 -1
  174. package/dist/node-version.js +2 -2
  175. package/dist/node-version.js.map +1 -1
  176. package/dist/plugin-mode/build-readiness-tools.d.ts +5 -4
  177. package/dist/plugin-mode/build-readiness-tools.d.ts.map +1 -1
  178. package/dist/plugin-mode/plugin-operation-contract.d.ts +0 -35
  179. package/dist/plugin-mode/plugin-operation-contract.d.ts.map +1 -1
  180. package/dist/plugin-mode/plugin-operation-contract.js +1 -1
  181. package/dist/plugin-mode/plugin-operation-contract.js.map +1 -1
  182. package/dist/project-entrypoint.d.ts +2 -1
  183. package/dist/project-entrypoint.d.ts.map +1 -1
  184. package/dist/project.d.ts +3 -3
  185. package/dist/project.d.ts.map +1 -1
  186. package/dist/project.js.map +1 -1
  187. package/dist/skills-update.d.ts +0 -1
  188. package/dist/skills-update.d.ts.map +1 -1
  189. package/dist/skills-update.js +1 -1
  190. package/dist/skills-update.js.map +1 -1
  191. package/dist/status.d.ts +0 -9
  192. package/dist/status.d.ts.map +1 -1
  193. package/dist/status.js +0 -16
  194. package/dist/status.js.map +1 -1
  195. package/dist/update-binary.d.ts +3 -2
  196. package/dist/update-binary.d.ts.map +1 -1
  197. package/dist/update-check.d.ts +0 -3
  198. package/dist/update-check.d.ts.map +1 -1
  199. package/dist/update-check.js +1 -1
  200. package/dist/update-check.js.map +1 -1
  201. package/dist/validate.d.ts +2 -1
  202. package/dist/validate.d.ts.map +1 -1
  203. package/node_modules/@noodle-borg/agent-kit/dist/generated/example-files.js +5 -3
  204. package/node_modules/@noodle-borg/agent-kit/dist/plugin-bootstrap-skill.d.ts +0 -2
  205. package/node_modules/@noodle-borg/agent-kit/dist/plugin-bootstrap-skill.js +1 -1
  206. package/node_modules/@noodle-borg/agent-kit/dist/plugin-bundle.d.ts +1 -1
  207. package/node_modules/@noodle-borg/agent-kit/dist/skill-content.js +5 -5
  208. package/node_modules/@noodle-borg/agent-kit/dist/skill-router.d.ts +2 -3
  209. package/node_modules/@noodle-borg/agent-kit/dist/skill-router.js +1 -1
  210. package/node_modules/@noodle-borg/agent-kit/package.json +1 -1
  211. package/node_modules/@noodle-borg/agent-packaging/dist/host-package-assets.js +1 -1
  212. package/node_modules/@noodle-borg/assistant-gateway/dist/assistant-configuration.js +2 -1
  213. package/node_modules/@noodle-borg/assistant-gateway/package.json +1 -1
  214. package/node_modules/@noodle-borg/authoring/dist/assistant.d.ts +2 -1
  215. package/node_modules/@noodle-borg/authoring/dist/connections.d.ts +0 -2
  216. package/node_modules/@noodle-borg/authoring/dist/connections.js +1 -1
  217. package/node_modules/@noodle-borg/authoring/dist/load-authored.js +2 -2
  218. package/node_modules/@noodle-borg/authoring/dist/react/bridge.d.ts +3 -2
  219. package/node_modules/@noodle-borg/authoring/dist/react/form-components.d.ts +0 -8
  220. package/node_modules/@noodle-borg/authoring/dist/react/form-components.js +2 -4
  221. package/node_modules/@noodle-borg/authoring/dist/react/hooks.d.ts +2 -2
  222. package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-account.js +96 -0
  223. package/node_modules/@noodle-borg/cli-catalog/dist/catalog-data-billing.js +116 -1
  224. package/node_modules/@noodle-borg/compiler/dist/artifact/types.d.ts +11 -11
  225. package/node_modules/@noodle-borg/compiler/dist/compile.d.ts +0 -1
  226. package/node_modules/@noodle-borg/compiler/dist/fulfilment-structural.d.ts +1 -1
  227. package/node_modules/@noodle-borg/compiler/dist/manifest/expression.d.ts +14 -14
  228. package/node_modules/@noodle-borg/compiler/dist/manifest/naming.d.ts +0 -2
  229. package/node_modules/@noodle-borg/compiler/dist/manifest/naming.js +1 -1
  230. package/node_modules/@noodle-borg/compiler/dist/manifest/website-projection.d.ts +2 -1
  231. package/node_modules/@noodle-borg/compiler/package.json +1 -4
  232. package/node_modules/@noodle-borg/connector-defs/dist/credential-profiles.js +1 -1
  233. package/node_modules/@noodle-borg/connector-defs/dist/schema.d.ts +0 -6
  234. package/node_modules/@noodle-borg/connector-http/dist/http-connector.d.ts +2 -2
  235. package/node_modules/@noodle-borg/connector-http/dist/http-response.d.ts +2 -1
  236. package/node_modules/@noodle-borg/connector-http/dist/mcp/config.js +1 -1
  237. package/node_modules/@noodle-borg/control-plane/dist/app-purge-reconciliation-port.d.ts +25 -0
  238. package/node_modules/@noodle-borg/control-plane/dist/app-purge-reconciliation-port.js +10 -0
  239. package/node_modules/@noodle-borg/control-plane/dist/deploy-auth.d.ts +0 -1
  240. package/node_modules/@noodle-borg/control-plane/dist/portable.d.ts +1 -0
  241. package/node_modules/@noodle-borg/control-plane/dist/portable.js +1 -0
  242. package/node_modules/@noodle-borg/control-plane/package.json +3 -1
  243. package/node_modules/@noodle-borg/developer-mcp/dist/widgets/shared.js +1 -1
  244. package/node_modules/@noodle-borg/knowledge-operations/dist/crawl-lifecycle.d.ts +2 -1
  245. package/node_modules/@noodle-borg/knowledge-operations/package.json +1 -2
  246. package/node_modules/@noodle-borg/observability/dist/request-events-postgres.js +3 -1
  247. package/node_modules/@noodle-borg/plugin-distribution/dist/openai-submission-render.js +1 -1
  248. package/node_modules/@noodle-borg/protocol/dist/index.d.ts +1 -1
  249. package/node_modules/@noodle-borg/protocol/dist/index.js +1 -1
  250. package/node_modules/@noodle-borg/protocol/dist/interaction-envelope.js +2 -2
  251. package/node_modules/@noodle-borg/protocol/dist/jsonrpc.d.ts +1 -1
  252. package/node_modules/@noodle-borg/protocol/dist/jsonrpc.js +1 -1
  253. package/node_modules/@noodle-borg/protocol/dist/mapping.d.ts +4 -6
  254. package/node_modules/@noodle-borg/protocol/dist/mapping.js +1 -1
  255. package/node_modules/@noodle-borg/protocol/dist/observation.d.ts +0 -9
  256. package/node_modules/@noodle-borg/protocol/dist/observation.js +1 -1
  257. package/node_modules/@noodle-borg/protocol/dist/v2/handler.d.ts +2 -1
  258. package/node_modules/@noodle-borg/protocol/dist/v2/versions.d.ts +4 -0
  259. package/node_modules/@noodle-borg/protocol/dist/v2/versions.js +2 -0
  260. package/node_modules/@noodle-borg/protocol/dist/widget/domain-projection.d.ts +2 -1
  261. package/node_modules/@noodle-borg/protocol/package.json +0 -1
  262. package/node_modules/@noodle-borg/runtime/dist/broker/types.d.ts +2 -2
  263. package/node_modules/@noodle-borg/service/dist/app-package-snapshot.d.ts +1 -2
  264. package/node_modules/@noodle-borg/service/dist/app-package-snapshot.js +1 -2
  265. package/node_modules/@noodle-borg/service/dist/archive-preflight.js +1 -1
  266. package/node_modules/@noodle-borg/service/dist/assets.js +1 -1
  267. package/node_modules/@noodle-borg/service/dist/assistant-bindings.js +2 -2
  268. package/node_modules/@noodle-borg/service/dist/client-compatibility.js +1 -2
  269. package/node_modules/@noodle-borg/service/dist/developer-mcp/mount.js +2 -2
  270. package/node_modules/@noodle-borg/service/dist/external-credential-exchange.d.ts +0 -1
  271. package/node_modules/@noodle-borg/service/dist/external-credential-exchange.js +1 -1
  272. package/node_modules/@noodle-borg/service/dist/http-util.js +1 -72
  273. package/node_modules/@noodle-borg/service/dist/managed-config-expressions.d.ts +0 -1
  274. package/node_modules/@noodle-borg/service/dist/managed-config-expressions.js +1 -1
  275. package/node_modules/@noodle-borg/service/dist/oauth/customer-bridge.js +1 -1
  276. package/node_modules/@noodle-borg/service/dist/oauth/developer-grant.js +2 -2
  277. package/node_modules/@noodle-borg/service/dist/observability-runtime.js +2 -3
  278. package/node_modules/@noodle-borg/service/dist/registry-targets.js +3 -3
  279. package/node_modules/@noodle-borg/service/dist/routes/access-mode.js +0 -4
  280. package/node_modules/@noodle-borg/service/dist/routes/access.js +1 -1
  281. package/node_modules/@noodle-borg/service/dist/routes/alerts.js +3 -2
  282. package/node_modules/@noodle-borg/service/dist/routes/analytics.js +2 -1
  283. package/node_modules/@noodle-borg/service/dist/routes/app-purge-reconciliation.js +72 -0
  284. package/node_modules/@noodle-borg/service/dist/routes/apps.js +1 -1
  285. package/node_modules/@noodle-borg/service/dist/routes/archive.js +2 -1
  286. package/node_modules/@noodle-borg/service/dist/routes/asset-control-plane.js +2 -1
  287. package/node_modules/@noodle-borg/service/dist/routes/assistant-appearance.js +2 -1
  288. package/node_modules/@noodle-borg/service/dist/routes/assistant-clients.js +2 -1
  289. package/node_modules/@noodle-borg/service/dist/routes/assistant-doctor.js +2 -1
  290. package/node_modules/@noodle-borg/service/dist/routes/assistant-elevation.js +1 -1
  291. package/node_modules/@noodle-borg/service/dist/routes/assistant-embeds.js +2 -1
  292. package/node_modules/@noodle-borg/service/dist/routes/assistant-interaction-replay.js +1 -1
  293. package/node_modules/@noodle-borg/service/dist/routes/assistant-interactions.js +1 -1
  294. package/node_modules/@noodle-borg/service/dist/routes/assistant-public-configuration.js +1 -1
  295. package/node_modules/@noodle-borg/service/dist/routes/assistant-public-session.js +1 -1
  296. package/node_modules/@noodle-borg/service/dist/routes/assistant-route-http.js +4 -3
  297. package/node_modules/@noodle-borg/service/dist/routes/assistant-sandbox.js +1 -1
  298. package/node_modules/@noodle-borg/service/dist/routes/assistant-suggestions.js +1 -1
  299. package/node_modules/@noodle-borg/service/dist/routes/assistant-usage.js +2 -1
  300. package/node_modules/@noodle-borg/service/dist/routes/assistant.js +2 -1
  301. package/node_modules/@noodle-borg/service/dist/routes/auth-discovery.js +2 -2
  302. package/node_modules/@noodle-borg/service/dist/routes/auth-doctor-live.js +1 -1
  303. package/node_modules/@noodle-borg/service/dist/routes/config-values-paths.js +1 -1
  304. package/node_modules/@noodle-borg/service/dist/routes/config-values.js +2 -1
  305. package/node_modules/@noodle-borg/service/dist/routes/control-plane.js +17 -5
  306. package/node_modules/@noodle-borg/service/dist/routes/deploy-preflight.js +1 -1
  307. package/node_modules/@noodle-borg/service/dist/routes/deployment-activation-response.js +1 -1
  308. package/node_modules/@noodle-borg/service/dist/routes/deployment-lock.js +1 -1
  309. package/node_modules/@noodle-borg/service/dist/routes/deployment-package.js +1 -1
  310. package/node_modules/@noodle-borg/service/dist/routes/deployments.js +1 -1
  311. package/node_modules/@noodle-borg/service/dist/routes/diagnostics.js +2 -1
  312. package/node_modules/@noodle-borg/service/dist/routes/environment-production.js +2 -1
  313. package/node_modules/@noodle-borg/service/dist/routes/envs.js +1 -1
  314. package/node_modules/@noodle-borg/service/dist/routes/google-workload-identity.js +1 -1
  315. package/node_modules/@noodle-borg/service/dist/routes/intent-capture.js +2 -1
  316. package/node_modules/@noodle-borg/service/dist/routes/logs.js +2 -1
  317. package/node_modules/@noodle-borg/service/dist/routes/openai-apps-challenge.js +1 -2
  318. package/node_modules/@noodle-borg/service/dist/routes/org-admin.js +2 -1
  319. package/node_modules/@noodle-borg/service/dist/routes/org-domains.js +2 -1
  320. package/node_modules/@noodle-borg/service/dist/routes/org-mcp-subdomain.js +1 -1
  321. package/node_modules/@noodle-borg/service/dist/routes/paths.js +0 -39
  322. package/node_modules/@noodle-borg/service/dist/routes/protected-resource-metadata.js +3 -3
  323. package/node_modules/@noodle-borg/service/dist/routes/rollback.js +2 -1
  324. package/node_modules/@noodle-borg/service/dist/routes/service-principals-dispatch.js +2 -3
  325. package/node_modules/@noodle-borg/service/dist/routes/service-principals.js +1 -1
  326. package/node_modules/@noodle-borg/service/dist/service-config.d.ts +3 -2
  327. package/node_modules/@noodle-borg/service/dist/service-config.js +1 -1
  328. package/node_modules/@noodle-borg/service/dist/service.js +29 -3
  329. package/node_modules/@noodle-borg/service/dist/store/alert-rules.js +1 -1
  330. package/node_modules/@noodle-borg/service/dist/store/audit.js +1 -1
  331. package/node_modules/@noodle-borg/service/dist/store/in-memory.js +4 -8
  332. package/node_modules/@noodle-borg/service/dist/store/json-file.js +6 -3
  333. package/node_modules/@noodle-borg/service/dist/store/records.js +21 -1
  334. package/node_modules/@noodle-borg/service/dist/store/validate.d.ts +1 -1
  335. package/node_modules/@noodle-borg/service/dist/store/validate.js +1 -1
  336. package/node_modules/@noodle-borg/service/dist/store.d.ts +5 -4
  337. package/node_modules/@noodle-borg/service/dist/store.js +1 -1
  338. package/node_modules/@noodle-borg/service/package.json +1 -1
  339. package/node_modules/@noodle-borg/transport-http/dist/client-identity.js +1 -1
  340. package/node_modules/@noodle-borg/transport-http/dist/handler.d.ts +1 -2
  341. package/node_modules/@noodle-borg/transport-http/dist/identity-authorization.d.ts +51 -0
  342. package/node_modules/@noodle-borg/transport-http/dist/identity-authorization.js +7 -7
  343. package/node_modules/@noodle-borg/transport-http/dist/index.d.ts +4 -2
  344. package/node_modules/@noodle-borg/transport-http/dist/index.js +3 -1
  345. package/node_modules/@noodle-borg/transport-http/dist/request-body.d.ts +29 -0
  346. package/node_modules/@noodle-borg/transport-http/dist/request-body.js +64 -0
  347. package/node_modules/@noodle-borg/transport-http/dist/responses.d.ts +28 -0
  348. package/node_modules/@noodle-borg/transport-http/dist/routing.d.ts +2 -4
  349. package/node_modules/@noodle-borg/transport-http/dist/routing.js +3 -3
  350. package/node_modules/@noodle-borg/transport-http/dist/serve-request.js +2 -13
  351. package/node_modules/@noodle-borg/transport-http/package.json +0 -1
  352. package/node_modules/@noodle-borg/wire-contracts/dist/app-purge-reconciliation.d.ts +177 -0
  353. package/node_modules/@noodle-borg/wire-contracts/dist/app-purge-reconciliation.js +189 -0
  354. package/node_modules/@noodle-borg/wire-contracts/dist/assistant.d.ts +1 -1
  355. package/node_modules/@noodle-borg/wire-contracts/dist/billing-org-transfer.d.ts +629 -0
  356. package/node_modules/@noodle-borg/wire-contracts/dist/billing-org-transfer.js +259 -0
  357. package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.d.ts +21 -0
  358. package/node_modules/@noodle-borg/wire-contracts/dist/control-plane.js +23 -0
  359. package/node_modules/@noodle-borg/wire-contracts/dist/index.d.ts +2 -0
  360. package/node_modules/@noodle-borg/wire-contracts/dist/index.js +2 -0
  361. package/node_modules/@noodle-borg/wire-contracts/dist/platform-account-reset.d.ts +4 -4
  362. package/node_modules/@noodleseed/assistant/package.json +2 -1
  363. package/package.json +2 -2
  364. package/dist/commands/catalog-data-billing.d.ts +0 -3
  365. package/dist/commands/catalog-data-billing.d.ts.map +0 -1
  366. package/dist/commands/catalog-data-billing.js +0 -3
  367. package/dist/commands/catalog-data-billing.js.map +0 -1
  368. package/dist/commands/catalog-data-policy.d.ts +0 -3
  369. package/dist/commands/catalog-data-policy.d.ts.map +0 -1
  370. package/dist/commands/catalog-data-policy.js +0 -3
  371. package/dist/commands/catalog-data-policy.js.map +0 -1
  372. package/node_modules/@noodle-borg/compiler/dist/artifact/catalog-emission.d.ts +0 -50
  373. package/node_modules/@noodle-borg/compiler/dist/context-compile.d.ts +0 -17
  374. package/node_modules/@noodle-borg/transport-http/dist/module-http.d.ts +0 -13
  375. package/node_modules/@noodle-borg/transport-http/dist/module-http.js +0 -28
@@ -1,5 +1,6 @@
1
+ import { sendJson } from '@noodle-borg/transport-http';
1
2
  import { inspectServiceDeployment } from '../developer-mcp/inspection.js';
2
- import { baseFromRequest, sendJson } from '../http-util.js';
3
+ import { baseFromRequest } from '../http-util.js';
3
4
  import { endpointUrlOptionsForOrg } from '../mcp-public-routing.js';
4
5
  import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
5
6
  export async function handleInspect(req, res, registry, gate, controlPlane, tenant, options) {
@@ -1,5 +1,6 @@
1
+ import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
1
2
  import { ProductionEnvironmentRequestSchema, ProductionEnvironmentResponseSchema, } from '@noodle-borg/wire-contracts';
2
- import { readJsonBody, sendForbidden, sendJson } from '../http-util.js';
3
+ import { sendForbidden } from '../http-util.js';
3
4
  import { sendContract } from './apps.js';
4
5
  import { authorizeControlPlane } from './control-plane.js';
5
6
  import { canManageMembers } from './org-admin.js';
@@ -1,5 +1,5 @@
1
+ import { sendJson } from '@noodle-borg/transport-http';
1
2
  import { EnvResponseSchema, EnvsListResponseSchema } from '@noodle-borg/wire-contracts';
2
- import { sendJson } from '../http-util.js';
3
3
  import { sendContract } from './apps.js';
4
4
  import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
5
5
  import { envWithEndpointUrl } from './endpoint-enrichment.js';
@@ -1,4 +1,4 @@
1
- import { sendJson } from '../http-util.js';
1
+ import { sendJson } from '@noodle-borg/transport-http';
2
2
  import { authorizeTenantControl } from './control-plane.js';
3
3
  export async function handleGoogleWorkloadIdentityDoctor(req, res, tenant, deps) {
4
4
  const identity = await authorizeTenantControl(req, res, deps.gate, deps.controlPlane, tenant.org);
@@ -1,4 +1,5 @@
1
- import { readJsonBody, sendForbidden, sendJson } from '../http-util.js';
1
+ import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
2
+ import { sendForbidden } from '../http-util.js';
2
3
  import { authorizeControlPlane, authorizeTenantControl } from './control-plane.js';
3
4
  import { canManageMembers } from './org-admin.js';
4
5
  const RETENTION_DAYS = 14;
@@ -1,4 +1,5 @@
1
- import { normalizedTimestamps, sendJson } from '../http-util.js';
1
+ import { sendJson } from '@noodle-borg/transport-http';
2
+ import { normalizedTimestamps } from '../http-util.js';
2
3
  import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
3
4
  /**
4
5
  * `GET /v1/orgs/{org}/apps/{app}/envs/{env}/logs` — the tenant-safe developer log surface (M3, ADR 0101).
@@ -1,6 +1,5 @@
1
1
  import { OPENAI_APPS_CHALLENGE_PATH } from '@noodle-borg/module';
2
- import { applySecurityHeaders, enforceHttps } from '@noodle-borg/transport-http';
3
- import { sendJson } from '../http-util.js';
2
+ import { applySecurityHeaders, enforceHttps, sendJson, } from '@noodle-borg/transport-http';
4
3
  import { trustedPublicOrgWellKnownFromRequest } from '../mcp-public-routing.js';
5
4
  export function handlePublicOpenAIAppsChallenge(req, res, options, tls, controlPlane) {
6
5
  applySecurityHeaders(res, tls);
@@ -1,7 +1,8 @@
1
1
  import { mcpSubdomainEndpointOptions } from '@noodle-borg/control-plane/portable';
2
2
  import { normalizePublicBaseDomain, OPENAI_APPS_CHALLENGE_PATH } from '@noodle-borg/module';
3
+ import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
3
4
  import { OrgSummarySchema } from '@noodle-borg/wire-contracts';
4
- import { readJsonBody, sendForbidden, sendJson } from '../http-util.js';
5
+ import { sendForbidden } from '../http-util.js';
5
6
  import { hashToken, randomToken } from '../oauth/tokens.js';
6
7
  import { validateOrgRole, } from '../store.js';
7
8
  import { authorizeControlPlane, authorizeTenantControl } from './control-plane.js';
@@ -1,4 +1,5 @@
1
- import { readJsonBody, sendForbidden, sendJson } from '../http-util.js';
1
+ import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
2
+ import { sendForbidden } from '../http-util.js';
2
3
  import { validateOrgMembershipDomain, } from '../store.js';
3
4
  import { authorizeControlPlane } from './control-plane.js';
4
5
  import { canManageMembers, canViewMembers, emitOrgAudit } from './org-admin.js';
@@ -1,7 +1,7 @@
1
1
  import { McpSubdomainCooldownError, McpSubdomainIdempotencyConflictError, McpSubdomainOwnerRequiredError, McpSubdomainUnavailableError, validateMcpSubdomain, } from '@noodle-borg/control-plane/portable';
2
2
  import { normalizePublicBaseDomain } from '@noodle-borg/module';
3
+ import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
3
4
  import { McpSubdomainMutationRequestSchema, McpSubdomainMutationResponseSchema, McpSubdomainSettingResponseSchema, } from '@noodle-borg/wire-contracts';
4
- import { readJsonBody, sendJson } from '../http-util.js';
5
5
  import { emitAuditMirrors } from '../store/audit.js';
6
6
  import { authorizeControlPlane } from './control-plane.js';
7
7
  const IDEMPOTENCY_KEY = /^[A-Za-z0-9._:-]{8,256}$/;
@@ -1,6 +1,5 @@
1
1
  import { isAlertRuleId } from '../store/alert-rules.js';
2
2
  import { DEPLOYMENT_ID_PATTERN, validateDomain, validateSlug, validateTenantRef, } from '../store.js';
3
- export { configRouteRef, parseConfigPath, } from './config-values-paths.js';
4
3
  function matchPath(pathname, pattern, decode) {
5
4
  const match = pattern.exec(pathname);
6
5
  if (!match)
@@ -208,44 +207,6 @@ export function parseTenantSessionPath(pathname) {
208
207
  export function parseTenantAssistantUsagePath(pathname) {
209
208
  return matchPath(pathname, /^\/v1\/orgs\/([^/]+)\/apps\/([^/]+)\/envs\/([^/]+)\/assistant\/usage$/, tenantRef);
210
209
  }
211
- /** Match `/v1/orgs/{org}/apps/{app}/github/connection` (GHD-1 repository connection, GET/POST/DELETE). */
212
- export function parseGithubConnectionPath(pathname) {
213
- return matchPath(pathname, /^\/v1\/orgs\/([^/]+)\/apps\/([^/]+)\/github\/connection$/, appRef);
214
- }
215
- /** Parse `/v1/orgs/{org}/apps/{app}/github/runs` (GHD-2, the deploy-runs read surface). */
216
- export function parseGithubRunsPath(pathname) {
217
- return matchPath(pathname, /^\/v1\/orgs\/([^/]+)\/apps\/([^/]+)\/github\/runs$/, appRef);
218
- }
219
- /** Match the fixed path `/v1/github/install-url` (GHD-1). */
220
- export function isGithubInstallUrlPath(pathname) {
221
- return pathname === '/v1/github/install-url';
222
- }
223
- /** Match the fixed path `/v1/github/installations/claim` (GHD-1). */
224
- export function isGithubInstallationClaimPath(pathname) {
225
- return pathname === '/v1/github/installations/claim';
226
- }
227
- /** Parse `/v1/github/runs/{runId}/status` (GHD-C1, the trusted runner's transition report). */
228
- export function parseGithubRunStatusPath(pathname) {
229
- const match = /^\/v1\/github\/runs\/([A-Za-z0-9_-]+)\/status$/.exec(pathname);
230
- return match ? match[1] : undefined;
231
- }
232
- /** Parse `/v1/github/runs/{runId}/claim` (GHD-C3, Cloud Run builder credential claim). */
233
- export function parseGithubRunClaimPath(pathname) {
234
- const match = /^\/v1\/github\/runs\/([A-Za-z0-9_-]+)\/claim$/.exec(pathname);
235
- return match ? match[1] : undefined;
236
- }
237
- /** Match the fixed path `/v1/github/webhook` (GHD-2, the GitHub App's webhook receiver). */
238
- export function isGithubWebhookPath(pathname) {
239
- return pathname === '/v1/github/webhook';
240
- }
241
- /** Match the fixed path `/v1/github/setup` (GHD-1.4, the GitHub App's configured Setup URL). */
242
- export function isGithubSetupPath(pathname) {
243
- return pathname === '/v1/github/setup';
244
- }
245
- /** Match the fixed path `/v1/github/installations/pending` (GHD-1.4, the CLI's install poll target). */
246
- export function isGithubInstallationPendingPath(pathname) {
247
- return pathname === '/v1/github/installations/pending';
248
- }
249
210
  export function parseTenantActionPath(pathname, action) {
250
211
  return matchPath(pathname, new RegExp(`^/v1/orgs/([^/]+)/apps/([^/]+)/envs/([^/]+)/${action}$`), tenantRef);
251
212
  }
@@ -1,12 +1,12 @@
1
1
  import { protectedResourceMetadata } from '@noodle-borg/auth';
2
2
  import { parseLegacyTenantMcpPath } from '@noodle-borg/module';
3
- import { applySecurityHeaders, enforceHttps } from '@noodle-borg/transport-http';
3
+ import { applySecurityHeaders, enforceHttps, sendJson, } from '@noodle-borg/transport-http';
4
4
  import { DEVELOPER_MCP_PATH, developerMcpScopes } from '../developer-mcp/mount.js';
5
- import { baseFromRequest, sendJson } from '../http-util.js';
5
+ import { baseFromRequest } from '../http-util.js';
6
6
  import { trustedMcpResourceFromRequest } from '../mcp-public-routing.js';
7
7
  import { authorizationMetadataForTenant } from '../registry-targets.js';
8
8
  /** Well-known prefix for OAuth 2.0 Protected Resource Metadata (RFC 9728). */
9
- export const PROTECTED_RESOURCE_METADATA_PREFIX = '/.well-known/oauth-protected-resource';
9
+ const PROTECTED_RESOURCE_METADATA_PREFIX = '/.well-known/oauth-protected-resource';
10
10
  export function dispatchProtectedResourceMetadata(req, res, url, registry, controlPlane, options, tls) {
11
11
  if (req.method !== 'GET' || !url.pathname.startsWith(PROTECTED_RESOURCE_METADATA_PREFIX)) {
12
12
  return false;
@@ -1,5 +1,6 @@
1
1
  import { rollbackDeploymentOperation } from '@noodle-borg/control-plane/portable';
2
- import { baseFromRequest, readJsonBody, sendForbidden, sendJson } from '../http-util.js';
2
+ import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
3
+ import { baseFromRequest, sendForbidden } from '../http-util.js';
3
4
  import { endpointUrlOptionsForOrg } from '../mcp-public-routing.js';
4
5
  import { authorizeTenantControl, developerGrantRouteAccess } from './control-plane.js';
5
6
  export async function handleRollback(req, res, registry, gate, controlPlane, audit, maxBody, tenant, options) {
@@ -1,5 +1,4 @@
1
- import { applySecurityHeaders, enforceHttps, } from '@noodle-borg/transport-http';
2
- import { sendJson } from '../http-util.js';
1
+ import { applySecurityHeaders, enforceHttps, sendJson, } from '@noodle-borg/transport-http';
3
2
  import { parseServicePrincipalPath } from './service-principal-paths.js';
4
3
  import { handleServicePrincipalRequest } from './service-principals.js';
5
4
  /** Bind the shared security front door when the optional service-principal runtime is configured. */
@@ -16,7 +15,7 @@ export function createServicePrincipalDispatcher(registry, runtime, deps) {
16
15
  });
17
16
  }
18
17
  /** Dispatch the exact service-principal route family before generic MCP/tenant fallback. */
19
- export function dispatchServicePrincipalRoutes(req, res, url, deps) {
18
+ function dispatchServicePrincipalRoutes(req, res, url, deps) {
20
19
  const path = parseServicePrincipalPath(url.pathname);
21
20
  if (path === undefined)
22
21
  return false;
@@ -1,4 +1,4 @@
1
- import { readJsonBody, sendJson } from '../http-util.js';
1
+ import { readJsonBody, sendJson } from '@noodle-borg/transport-http';
2
2
  import { createClientSecret, digestClientSecret } from '../oauth/service-principal-credentials.js';
3
3
  import { authorizeControlPlane } from './control-plane.js';
4
4
  import { createServicePrincipalCredentialSchema, createServicePrincipalGrantSchema, createServicePrincipalSchema, } from './service-principal-contracts.js';
@@ -60,8 +60,8 @@ export interface ObservabilityConfig {
60
60
  readonly maxEventsPerExecution?: number;
61
61
  };
62
62
  }
63
- export declare const AGENCY_ORG_TEMPLATES: readonly ["small-business", "mid-market", "enterprise"];
64
- export type AgencyOrgTemplate = (typeof AGENCY_ORG_TEMPLATES)[number];
63
+ declare const AGENCY_ORG_TEMPLATES: readonly ["small-business", "mid-market", "enterprise"];
64
+ type AgencyOrgTemplate = (typeof AGENCY_ORG_TEMPLATES)[number];
65
65
  export type ServiceConfigSource = {
66
66
  readonly kind: 'none';
67
67
  } | {
@@ -92,4 +92,5 @@ export declare function resolveServiceConfigSource(input: {
92
92
  readonly ok: false;
93
93
  readonly error: string;
94
94
  };
95
+ export {};
95
96
  //# sourceMappingURL=service-config.d.ts.map
@@ -2,7 +2,7 @@ import { existsSync } from 'node:fs';
2
2
  import { join } from 'node:path';
3
3
  import { CAPABILITY_NAMES, isServiceProfileName, SERVICE_PROFILE_NAMES, } from '@noodle-borg/capabilities';
4
4
  import { parse as parseYaml } from 'yaml';
5
- export const AGENCY_ORG_TEMPLATES = ['small-business', 'mid-market', 'enterprise'];
5
+ const AGENCY_ORG_TEMPLATES = ['small-business', 'mid-market', 'enterprise'];
6
6
  export function defineNoodleService(config) {
7
7
  return config;
8
8
  }
@@ -2,7 +2,7 @@ import { InMemoryAssistantAppearanceSettingsStore, InMemoryAssistantStore, } fro
2
2
  import { allowAllGate, InMemoryControlPlaneStore } from '@noodle-borg/control-plane/portable';
3
3
  import { dispatchKnowledgeRequest } from '@noodle-borg/knowledge-operations/portable';
4
4
  import { OPENAI_APPS_CHALLENGE_PATH } from '@noodle-borg/module';
5
- import { applySecurityHeaders, createMcpRouter, enforceHttps, noopLogger, } from '@noodle-borg/transport-http';
5
+ import { applySecurityHeaders, createMcpRouter, enforceHttps, noopLogger, sendJson, } from '@noodle-borg/transport-http';
6
6
  import { AnonymousConsumerLimiter, createAdmissionGate } from './admission.js';
7
7
  import { createArchivePreflight } from './archive-preflight.js';
8
8
  import { ArchiveSweeper, resolveArchiveRetentionDays } from './archive-sweeper.js';
@@ -13,7 +13,7 @@ import { rejectIncompatibleCli } from './client-compatibility.js';
13
13
  import { createDataPlaneMembershipAuthorizer } from './data-plane-membership.js';
14
14
  import { DEVELOPER_MCP_PATH, handleDeveloperMcpRequest } from './developer-mcp/mount.js';
15
15
  import { createDeveloperMcpMountOptions } from './developer-mcp/service-options.js';
16
- import { baseFromRequest, respondRouteError, sendJson } from './http-util.js';
16
+ import { baseFromRequest, respondRouteError } from './http-util.js';
17
17
  import { createMcpInvocationContextResolver } from './invocation-context.js';
18
18
  import { wireServiceKnowledge } from './knowledge-wiring.js';
19
19
  import * as mcp from './mcp-public-routing.js';
@@ -23,6 +23,7 @@ import { isAuthServerPath } from './oauth/paths.js';
23
23
  import { createIntentTargetResolver, createObservabilityDispatcher, createObservabilityStores, } from './observability-runtime.js';
24
24
  import { handleAccessUpdate } from './routes/access.js';
25
25
  import { dispatchAlertRoutes } from './routes/alerts-dispatch.js';
26
+ import { handleAppPurgeReconciliationRoute, } from './routes/app-purge-reconciliation.js';
26
27
  import { handleAppArchive, handleAppRestore } from './routes/archive.js';
27
28
  import { handleAssetPreflight } from './routes/asset-control-plane.js';
28
29
  import { dispatchAssistantRoutes } from './routes/assistant-dispatch.js';
@@ -233,6 +234,26 @@ export function createServiceHandler(registry, options = {}) {
233
234
  ...(advanced ? { modules: capabilityReport.modules } : {}),
234
235
  });
235
236
  }
237
+ const appPurgeReconciliationAction = url.pathname === '/v1/service/app-purge-reconciliation/preview'
238
+ ? 'preview'
239
+ : url.pathname === '/v1/service/app-purge-reconciliation/apply'
240
+ ? 'apply'
241
+ : undefined;
242
+ if (req.method === 'POST' && appPurgeReconciliationAction !== undefined) {
243
+ applySecurityHeaders(res, tls);
244
+ if (enforceHttps(req, res, tls))
245
+ return;
246
+ void handleAppPurgeReconciliationRoute(req, res, {
247
+ gate,
248
+ ...(options.appPurgeReconciliationOperator === undefined
249
+ ? {}
250
+ : { operator: options.appPurgeReconciliationOperator }),
251
+ releaseSha: buildInfo.gitSha,
252
+ maxBody,
253
+ ...(options.clock === undefined ? {} : { clock: options.clock }),
254
+ }, appPurgeReconciliationAction);
255
+ return;
256
+ }
236
257
  if (servicePrincipalDispatcher?.(req, res, url))
237
258
  return;
238
259
  if (dispatchAssistantRoutes(req, res, url, {
@@ -316,7 +337,12 @@ export function createServiceHandler(registry, options = {}) {
316
337
  applySecurityHeaders(res, tls);
317
338
  if (enforceHttps(req, res, tls))
318
339
  return;
319
- handleWhoami(req, res, gate, controlPlane, options).catch(() => {
340
+ const scopes = url.searchParams.getAll('scope');
341
+ if (scopes.length > 1 || (scopes.length === 1 && scopes[0] !== 'identity')) {
342
+ sendJson(res, 400, { error: 'invalid whoami scope' });
343
+ return;
344
+ }
345
+ handleWhoami(req, res, gate, controlPlane, options, scopes[0] === 'identity' ? 'identity' : undefined).catch(() => {
320
346
  if (!res.headersSent)
321
347
  sendJson(res, 500, { error: 'internal error' });
322
348
  });
@@ -34,7 +34,7 @@ export function isAlertRuleId(id) {
34
34
  * validation of the webhook URL (https-only, loopback carve-out, private-IP rejection) is the
35
35
  * route's job (`validateAlertWebhookUrl`); the store only rejects structurally broken values.
36
36
  */
37
- export function validateCreateAlertRuleInput(input) {
37
+ function validateCreateAlertRuleInput(input) {
38
38
  const orgSlug = validateSlug('org', input.orgSlug);
39
39
  const appSlug = validateSlug('app', input.appSlug);
40
40
  const environment = validateSlug('env', input.environment);
@@ -10,7 +10,7 @@ export { AUDIT_SCHEMA_VERSION, redactDetails } from '@noodle-borg/module';
10
10
  * to a marker, so a stray token-bearing object can never reach a stored row or a log line.
11
11
  */
12
12
  /** Build the canonical stored event from an input, stamping id, schema version, and timestamp. */
13
- export function toAuditEvent(input, id, createdAt) {
13
+ function toAuditEvent(input, id, createdAt) {
14
14
  const details = redactDetails(input.details);
15
15
  return {
16
16
  id,
@@ -3,7 +3,7 @@ import { assertSameAppPackageSnapshot, sanitizeDeployRecordAppPackageSnapshot, }
3
3
  import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAudienceBindings, findActiveCustomerAuthAudienceConflict, } from '../customer-auth-audience-binding.js';
4
4
  import { assertDeploymentActivationUnlocked, assertDeploymentAppendUnlocked, } from '../deployment-lock.js';
5
5
  import { defaultActiveRecord, sameDeploymentScope, sameTenantRecord, } from '../deployment-versioning.js';
6
- import { appArchivedAt, deploymentSummary, matchesDeploymentFilter, paginateAppSummaries, planAppArchive, planAppRestore, preserveDeploymentOwnerState, resolveActiveAccessUpdate, resolveProductionEnvironment, summarizeApps, summarizeEnvs, validateDeploymentListFilter, withoutArchiveStamp, } from './records.js';
6
+ import { appArchivedAt, deploymentSummary, matchesDeploymentFilter, paginateAppSummaries, planAppArchive, planAppRestore, planArchivedAppSweep, preserveDeploymentOwnerState, resolveActiveAccessUpdate, resolveProductionEnvironment, summarizeApps, summarizeEnvs, validateDeploymentListFilter, withoutArchiveStamp, } from './records.js';
7
7
  import { validateSlug, validateTenantRef } from './validate.js';
8
8
  /** In-memory store: keeps records in a Map. Used by tests and as an explicit, non-persistent option. */
9
9
  export class InMemoryArtifactStore {
@@ -165,13 +165,9 @@ export class InMemoryArtifactStore {
165
165
  return Promise.resolve(plan.result);
166
166
  }
167
167
  sweepArchived(before) {
168
- const deleted = [];
169
- for (const [id, record] of this.#records) {
170
- if (record.archivedAt !== undefined && record.archivedAt < before) {
171
- deleted.push(record);
172
- this.#records.delete(id);
173
- }
174
- }
168
+ const deleted = planArchivedAppSweep([...this.#records.values()], before);
169
+ for (const record of deleted)
170
+ this.#records.delete(record.deploymentId);
175
171
  return Promise.resolve(deleted);
176
172
  }
177
173
  async listApps(org, opts = {}) {
@@ -6,7 +6,7 @@ import { assertSameAppPackageSnapshot, sanitizeDeployRecordAppPackageSnapshot, }
6
6
  import { assertCustomerAuthRestorePrecondition, assertUniqueActiveCustomerAuthAudienceBindings, findActiveCustomerAuthAudienceConflict, } from '../customer-auth-audience-binding.js';
7
7
  import { assertDeploymentActivationUnlocked, assertDeploymentAppendUnlocked, } from '../deployment-lock.js';
8
8
  import { defaultActiveRecord, sameDeploymentScope, sameTenantRecord, } from '../deployment-versioning.js';
9
- import { appArchivedAt, deploymentSummary, matchesDeploymentFilter, paginateAppSummaries, planAppArchive, planAppRestore, preserveDeploymentOwnerState, resolveActiveAccessUpdate, resolveProductionEnvironment, summarizeApps, summarizeEnvs, validateDeploymentListFilter, withoutArchiveStamp, } from './records.js';
9
+ import { appArchivedAt, deploymentSummary, matchesDeploymentFilter, paginateAppSummaries, planAppArchive, planAppRestore, planArchivedAppSweep, preserveDeploymentOwnerState, resolveActiveAccessUpdate, resolveProductionEnvironment, summarizeApps, summarizeEnvs, validateDeploymentListFilter, withoutArchiveStamp, } from './records.js';
10
10
  import { DEPLOYMENT_ID_PATTERN, validateSlug, validateTenantRef } from './validate.js';
11
11
  /**
12
12
  * JSON-file store: one file per deployment at `<dataDir>/deployments/<deploymentId>.json`, written atomically
@@ -228,8 +228,11 @@ export class JsonFileArtifactStore {
228
228
  await Promise.all(plan.clear.map((record) => this.#writeRecord(withoutArchiveStamp(record))));
229
229
  return plan.result;
230
230
  }
231
- async sweepArchived(before) {
232
- const deleted = (await this.loadAll()).filter((record) => record.archivedAt !== undefined && record.archivedAt < before);
231
+ sweepArchived(before) {
232
+ return this.#serializeLifecycle(() => this.#sweepArchivedUnlocked(before));
233
+ }
234
+ async #sweepArchivedUnlocked(before) {
235
+ const deleted = planArchivedAppSweep(await this.loadAll(), before);
233
236
  await Promise.all(deleted.map((record) => rm(join(this.#dir, `${record.deploymentId}.json`), { force: true })));
234
237
  return deleted;
235
238
  }
@@ -101,6 +101,26 @@ export function planAppRestore(records) {
101
101
  const clear = records.filter((record) => record.archivedAt !== undefined);
102
102
  return { result: { restoredDeployments: clear.length }, clear };
103
103
  }
104
+ /** Plan a retention sweep: only delete an app when every deployment is archived before the cutoff. */
105
+ export function planArchivedAppSweep(records, before) {
106
+ const apps = new Map();
107
+ for (const record of records) {
108
+ let byApp = apps.get(record.orgSlug);
109
+ if (byApp === undefined) {
110
+ byApp = new Map();
111
+ apps.set(record.orgSlug, byApp);
112
+ }
113
+ const bucket = byApp.get(record.appSlug);
114
+ if (bucket === undefined)
115
+ byApp.set(record.appSlug, [record]);
116
+ else
117
+ bucket.push(record);
118
+ }
119
+ return [...apps.values()].flatMap((byApp) => [...byApp.values()].flatMap((appRecords) => appRecords.length > 0 &&
120
+ appRecords.every((record) => record.archivedAt !== undefined && record.archivedAt < before)
121
+ ? appRecords
122
+ : []));
123
+ }
104
124
  /** Strip the archive stamp from a record (exact-optional safe). */
105
125
  export function withoutArchiveStamp(record) {
106
126
  const { archivedAt: _cleared, ...rest } = record;
@@ -223,7 +243,7 @@ function compareAppSummaries(a, b) {
223
243
  return a.appSlug.localeCompare(b.appSlug);
224
244
  }
225
245
  /** Default + hard cap for a single `apps` list page (the route surfaces `truncated`, never drops silently). */
226
- export const DEFAULT_APPS_LIMIT = 200;
246
+ const DEFAULT_APPS_LIMIT = 200;
227
247
  /** Cap an already-sorted {@link AppSummary} list at `limit` (default {@link DEFAULT_APPS_LIMIT}). */
228
248
  export function paginateAppSummaries(apps, limit) {
229
249
  const safeLimit = limit ?? DEFAULT_APPS_LIMIT;
@@ -1,5 +1,5 @@
1
1
  import type { ConfigScope, TenantRef } from '../store.js';
2
- export { DOMAIN_PATTERN, isSystemOwnedOrgSlug, OPENAI_APPS_CHALLENGE_MAX_LENGTH, SLUG_PATTERN, validateDomain, validateMcpSubdomain, validateOpenAIAppsChallenge, validateOrgMembershipDomain, validateOrgRole, validateSignupAllowlistKind, validateSlug, validateUserOwnedOrgSlug, } from '@noodle-borg/control-plane/portable';
2
+ export { DOMAIN_PATTERN, SLUG_PATTERN, validateDomain, validateOrgMembershipDomain, validateOrgRole, validateSignupAllowlistKind, validateSlug, } from '@noodle-borg/control-plane/portable';
3
3
  /** Minted deployment id shape (`mintDeploymentId`): a slug plus a short hex suffix; safe as a filename. */
4
4
  export declare const DEPLOYMENT_ID_PATTERN: RegExp;
5
5
  export declare const CONFIG_NAME_PATTERN: RegExp;
@@ -4,7 +4,7 @@
4
4
  * import cycle through the store aggregate.
5
5
  */
6
6
  import { validateSlug } from '@noodle-borg/control-plane/portable';
7
- export { DOMAIN_PATTERN, isSystemOwnedOrgSlug, OPENAI_APPS_CHALLENGE_MAX_LENGTH, SLUG_PATTERN, validateDomain, validateMcpSubdomain, validateOpenAIAppsChallenge, validateOrgMembershipDomain, validateOrgRole, validateSignupAllowlistKind, validateSlug, validateUserOwnedOrgSlug, } from '@noodle-borg/control-plane/portable';
7
+ export { DOMAIN_PATTERN, SLUG_PATTERN, validateDomain, validateOrgMembershipDomain, validateOrgRole, validateSignupAllowlistKind, validateSlug, } from '@noodle-borg/control-plane/portable';
8
8
  /** Minted deployment id shape (`mintDeploymentId`): a slug plus a short hex suffix; safe as a filename. */
9
9
  export const DEPLOYMENT_ID_PATTERN = /^[a-z0-9-]+$/;
10
10
  export const CONFIG_NAME_PATTERN = /^[A-Za-z0-9_]+$/;
@@ -11,7 +11,7 @@ export { type ConfigScope, type ConfigStore, type ConfigValueMetadata, InMemoryC
11
11
  export type { ProductionEnvironmentChange } from './store/environment-production.js';
12
12
  export { InMemoryArtifactStore } from './store/in-memory.js';
13
13
  export { JsonFileArtifactStore } from './store/json-file.js';
14
- export { CONFIG_NAME_PATTERN, DEPLOYMENT_ID_PATTERN, DOMAIN_PATTERN, OPENAI_APPS_CHALLENGE_MAX_LENGTH, SLUG_PATTERN, validateConfigName, validateConfigScope, validateDomain, validateMcpSubdomain, validateOpenAIAppsChallenge, validateOrgMembershipDomain, validateOrgRole, validatePositiveInteger, validateSignupAllowlistKind, validateSlug, validateTenantRef, validateUserOwnedOrgSlug, } from './store/validate.js';
14
+ export { CONFIG_NAME_PATTERN, DEPLOYMENT_ID_PATTERN, DOMAIN_PATTERN, SLUG_PATTERN, validateConfigName, validateConfigScope, validateDomain, validateOrgMembershipDomain, validateOrgRole, validatePositiveInteger, validateSignupAllowlistKind, validateSlug, validateTenantRef, } from './store/validate.js';
15
15
  /**
16
16
  * Secret values at rest. The compiled runtime keeps plaintext tokens in memory (the broker), but the
17
17
  * *persisted* form is a tagged envelope. `aes-256-gcm` (Slice 26, ADR 0028) holds an AES-256-GCM
@@ -92,7 +92,7 @@ export interface TenantOidcAuthConfig {
92
92
  readonly claims?: TenantAuthClaimMap | undefined;
93
93
  readonly routing?: ArtifactCustomerAuthRouting | undefined;
94
94
  }
95
- export interface TenantFederatedOidcAuthConfig {
95
+ interface TenantFederatedOidcAuthConfig {
96
96
  readonly kind: 'federatedOidc';
97
97
  readonly issuers: readonly {
98
98
  readonly issuer: string;
@@ -318,8 +318,9 @@ export interface ArtifactStore {
318
318
  * App soft delete (ADR 0117). `getAppArchivedAt` reports the app's archived stamp (defined iff the
319
319
  * app has records and every record is stamped). `archiveApp` stamps every record for the app (all
320
320
  * environments/versions); `restoreApp` clears the stamps; both resolve `undefined` for an app with
321
- * no records. `sweepArchived` hard-deletes records archived strictly before `before` and returns
322
- * them so the caller can reclaim associated config and emit audit events.
321
+ * no records. `sweepArchived` hard-deletes a complete app only when every one of its records is archived
322
+ * strictly before `before`, returning every record from each deleted app so the caller can reclaim
323
+ * associated config and emit audit events.
323
324
  */
324
325
  getAppArchivedAt(org: string, app: string): Promise<string | undefined>;
325
326
  archiveApp(org: string, app: string, at: string): Promise<AppArchiveResult | undefined>;
@@ -4,5 +4,5 @@ export { InMemoryConfigStore, resolveConfigScope, scopeChain, } from './store/co
4
4
  // surface.
5
5
  export { InMemoryArtifactStore } from './store/in-memory.js';
6
6
  export { JsonFileArtifactStore } from './store/json-file.js';
7
- export { CONFIG_NAME_PATTERN, DEPLOYMENT_ID_PATTERN, DOMAIN_PATTERN, OPENAI_APPS_CHALLENGE_MAX_LENGTH, SLUG_PATTERN, validateConfigName, validateConfigScope, validateDomain, validateMcpSubdomain, validateOpenAIAppsChallenge, validateOrgMembershipDomain, validateOrgRole, validatePositiveInteger, validateSignupAllowlistKind, validateSlug, validateTenantRef, validateUserOwnedOrgSlug, } from './store/validate.js';
7
+ export { CONFIG_NAME_PATTERN, DEPLOYMENT_ID_PATTERN, DOMAIN_PATTERN, SLUG_PATTERN, validateConfigName, validateConfigScope, validateDomain, validateOrgMembershipDomain, validateOrgRole, validatePositiveInteger, validateSignupAllowlistKind, validateSlug, validateTenantRef, } from './store/validate.js';
8
8
  //# sourceMappingURL=store.js.map
@@ -39,7 +39,7 @@
39
39
  "dependencies": {
40
40
  "@modelcontextprotocol/sdk": "^1.29.0",
41
41
  "@noodle-borg/admission-limits": "0.0.0",
42
- "@noodle-borg/agent-kit": "0.91.0",
42
+ "@noodle-borg/agent-kit": "0.93.0",
43
43
  "@noodle-borg/app-package": "0.0.0",
44
44
  "@noodle-borg/assistant-gateway": "0.0.0",
45
45
  "@noodle-borg/auth": "0.0.0",
@@ -38,7 +38,7 @@ const KNOWN_UA_FAMILIES = [
38
38
  [/mozilla|chrome|safari|firefox|edg/i, 'browser'],
39
39
  ];
40
40
  /** Bound a wire-supplied client identity scalar: printable, trimmed, and length-capped. */
41
- export function boundedClientScalar(value, max) {
41
+ function boundedClientScalar(value, max) {
42
42
  if (value === undefined)
43
43
  return undefined;
44
44
  let cleaned = '';
@@ -1,6 +1,6 @@
1
1
  import type { IncomingMessage, ServerResponse } from 'node:http';
2
2
  import type { AccessMode, AdmissionGate, DataPlaneIdentityAuthorizer, IntentCaptureMode, IntentEventInput, OrgMembershipSource, OwnerTokenVerifier, RequestEventInput, TenantRouteRef } from '@noodle-borg/module';
3
- import { type ConfirmationNonceLedger, type ProtocolRequestContext, type RequestStateManager, type ServedArtifact } from '@noodle-borg/protocol';
3
+ import { type ConfirmationNonceLedger, type McpProtocolMode, type ProtocolRequestContext, type RequestStateManager, type ServedArtifact } from '@noodle-borg/protocol';
4
4
  import { type TlsPosture } from './front-door.js';
5
5
  import { type Logger } from './logging.js';
6
6
  import { type PublicTenantRouting } from './routing.js';
@@ -10,7 +10,6 @@ export type { AccessMode, AdmissionCategory, AdmissionContext, AdmissionDecision
10
10
  export type { PublicTenantRouting } from './routing.js';
11
11
  /** Origins allowed to call the endpoint: an explicit list, a predicate, or undefined (allow any). */
12
12
  export type OriginPolicy = readonly string[] | ((origin: string) => boolean);
13
- export type McpProtocolMode = 'dual' | 'legacy-only';
14
13
  /** Validated, bounded coordinates from one host request. Never identity or policy input. */
15
14
  export interface InvocationClientLocationHint {
16
15
  readonly latitude: number;
@@ -0,0 +1,51 @@
1
+ import type { IncomingMessage, ServerResponse } from 'node:http';
2
+ import type { AccessMode, DataPlaneIdentityAuthorizer, OrgMembershipSource, OwnerTokenVerifier } from '@noodle-borg/module';
3
+ import { type ProtocolRequestContext } from '@noodle-borg/protocol';
4
+ export interface IdentityAuthorizationOptions {
5
+ readonly accessMode: AccessMode | undefined;
6
+ readonly ownerSubject: string | undefined;
7
+ readonly org: string | undefined;
8
+ readonly orgMembershipSources: readonly OrgMembershipSource[] | undefined;
9
+ readonly verifyOwnerToken: OwnerTokenVerifier | undefined;
10
+ readonly authorizeDataPlaneIdentity: DataPlaneIdentityAuthorizer | undefined;
11
+ /** Whether to trust forwarded-proto when reconstructing the public resource/PRM URLs. */
12
+ readonly trustProxy: boolean;
13
+ /** Public resource URL supplied by a trusted edge for MCP-subdomain routes. */
14
+ readonly publicResourceUrl?: string;
15
+ }
16
+ /**
17
+ * Bounded identity-denial taxonomy retained by request analytics (#1309). Derived structurally at
18
+ * this seam — the token verifier stays opaque — and never carries token material or claims.
19
+ */
20
+ type IdentityDenialReason = 'missing_token' | 'verifier_unavailable' | 'token_rejected' | 'identity_not_customer' | 'owner_unconfigured' | 'owner_mismatch' | 'org_membership_denied';
21
+ export type IdentityAuthResult = {
22
+ readonly allow: true;
23
+ readonly caller?: NonNullable<ProtocolRequestContext['caller']>;
24
+ readonly customerIssuer?: string;
25
+ readonly customerRouting?: Readonly<Record<string, string>>;
26
+ readonly subject?: string;
27
+ } | {
28
+ readonly allow: false;
29
+ readonly reason: IdentityDenialReason;
30
+ };
31
+ /**
32
+ * Identity gate (OA-1/OA-3): require a verified token and authorize it against the deployment access mode.
33
+ * `allow: true` means the request may proceed, with caller and subject fields when available. `allow: false`
34
+ * means this function already wrote the denial response. Missing tokens and absent verifiers fail closed.
35
+ */
36
+ export declare function authorizeIdentityMode(req: IncomingMessage, res: ServerResponse, auth: IdentityAuthorizationOptions): Promise<IdentityAuthResult>;
37
+ /**
38
+ * Public endpoints stay anonymous unless a valid service-principal bearer is supplied. Invalid, human,
39
+ * and customer bearers retain the pre-existing public behavior and are ignored rather than challenged.
40
+ */
41
+ export declare function authorizePublicServiceMode(req: IncomingMessage, auth: IdentityAuthorizationOptions): Promise<IdentityAuthResult>;
42
+ export declare function authorizeMixedMode(req: IncomingMessage, res: ServerResponse, auth: IdentityAuthorizationOptions): Promise<IdentityAuthResult>;
43
+ export declare function isIdentityMode(mode: AccessMode | undefined): boolean;
44
+ /** The credential carried by one `Authorization` header value, or null when it is not a bearer. */
45
+ export declare function bearerToken(headerValue: string | undefined): string | null;
46
+ /** The canonical resource identifier (the tenant MCP URL) a token must be audience-bound to (RFC 8707). */
47
+ export declare function canonicalResourceUrl(req: IncomingMessage, auth: Pick<IdentityAuthorizationOptions, 'trustProxy' | 'publicResourceUrl'>): string;
48
+ /** The RFC 9728 protected-resource-metadata URL for this request (well-known prefix before the path). */
49
+ export declare function protectedResourceMetadataUrl(req: IncomingMessage, auth: IdentityAuthorizationOptions): string;
50
+ export {};
51
+ //# sourceMappingURL=identity-authorization.d.ts.map
@@ -8,7 +8,7 @@ import { header } from './request-capture.js';
8
8
  */
9
9
  export async function authorizeIdentityMode(req, res, auth) {
10
10
  const challenge = protectedResourceMetadataUrl(req, auth);
11
- const token = bearerToken(req);
11
+ const token = bearerToken(header(req, 'authorization'));
12
12
  if (token === null || auth.verifyOwnerToken === undefined) {
13
13
  sendUnauthorized(res, challenge);
14
14
  return { allow: false, reason: token === null ? 'missing_token' : 'verifier_unavailable' };
@@ -75,7 +75,7 @@ export async function authorizeIdentityMode(req, res, auth) {
75
75
  * and customer bearers retain the pre-existing public behavior and are ignored rather than challenged.
76
76
  */
77
77
  export async function authorizePublicServiceMode(req, auth) {
78
- const token = bearerToken(req);
78
+ const token = bearerToken(header(req, 'authorization'));
79
79
  if (token === null || auth.verifyOwnerToken === undefined)
80
80
  return { allow: true };
81
81
  const verification = await auth.verifyOwnerToken(token, canonicalResourceUrl(req, auth));
@@ -84,7 +84,7 @@ export async function authorizePublicServiceMode(req, auth) {
84
84
  : { allow: true };
85
85
  }
86
86
  export async function authorizeMixedMode(req, res, auth) {
87
- const token = bearerToken(req);
87
+ const token = bearerToken(header(req, 'authorization'));
88
88
  if (token === null)
89
89
  return { allow: true };
90
90
  const challenge = protectedResourceMetadataUrl(req, auth);
@@ -114,11 +114,11 @@ export function isIdentityMode(mode) {
114
114
  mode === 'authenticated' ||
115
115
  mode === 'customers');
116
116
  }
117
- function bearerToken(req) {
118
- const auth = header(req, 'authorization');
119
- if (!auth)
117
+ /** The credential carried by one `Authorization` header value, or null when it is not a bearer. */
118
+ export function bearerToken(headerValue) {
119
+ if (!headerValue)
120
120
  return null;
121
- const match = /^Bearer\s+(.+)$/i.exec(auth);
121
+ const match = /^Bearer\s+(.+)$/i.exec(headerValue);
122
122
  return match?.[1] ?? null;
123
123
  }
124
124
  /**
@@ -1,8 +1,10 @@
1
1
  export { applySecurityHeaders, effectiveProto, enforceHttps, type TlsPosture, } from './front-door.js';
2
- export { type AccessMode, type AdmissionCategory, type AdmissionContext, type AdmissionDecision, type AdmissionGate, createMcpHttpHandler, createMcpRouter, type DataPlaneAuthorizationResult, type DataPlaneIdentityAuthorizer, type HttpHandlerOptions, type InvocationClientHint, type InvocationClientLocationHint, type InvocationContextResolutionInput, type InvocationContextResolver, type McpProtocolMode, type OriginPolicy, type OwnerTokenVerifier, type ServedTarget, type ServerLookup, type TenantPreflight, type TenantRouteRef, } from './handler.js';
2
+ export { type AccessMode, type AdmissionCategory, type AdmissionContext, type AdmissionDecision, type AdmissionGate, createMcpHttpHandler, createMcpRouter, type DataPlaneAuthorizationResult, type DataPlaneIdentityAuthorizer, type HttpHandlerOptions, type InvocationClientHint, type InvocationClientLocationHint, type InvocationContextResolutionInput, type InvocationContextResolver, type OriginPolicy, type OwnerTokenVerifier, type ServedTarget, type ServerLookup, type TenantPreflight, type TenantRouteRef, } from './handler.js';
3
+ export { bearerToken } from './identity-authorization.js';
3
4
  export { createLogger, type LogFields, type Logger, type LoggerOptions, type LogLevel, type LogSink, noopLogger, stderrSink, stdoutSink, } from './logging.js';
4
- export { type ModuleJsonBodyResult, readModuleJsonBody, sendModuleJson, } from './module-http.js';
5
5
  export { resolveTrustedPublicOrg, resolveTrustedTenantMcpResource, type TrustedPublicOrg, type TrustedPublicRef, type TrustedPublicRouting, type TrustedTenantMcpResource, trustedPublicMcpRef, trustedPublicOrgWellKnownRef, } from './public-routing.js';
6
+ export { readBody, readDeployBody, readJsonBody } from './request-body.js';
7
+ export { sendJson } from './responses.js';
6
8
  export { type RunningServer, type ServeOptions, serveHttp } from './serve.js';
7
9
  export type { HostedToolAuthorizationObservation, HostedToolAuthorizationObserver, ServicePrincipalToolAuthorizationObservation, } from './service-principal-authorization.js';
8
10
  export { preflightServicePrincipalToolCall, sendServicePrincipalToolDenial, } from './service-principal-authorization.js';