@oxygen-agent/cli 1.1015.29 → 1.1017.21

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 (209) hide show
  1. package/README.md +1 -1
  2. package/dist/command-families/tables/automation.js +1 -1
  3. package/dist/command-families/tables/import-batches.js +1 -1
  4. package/dist/command-families/tables/import-values.js +1 -1
  5. package/dist/command-families/tables/register-reads.js +2 -2
  6. package/dist/command-manifest.js +9 -0
  7. package/dist/command-support.js +2 -2
  8. package/dist/commands/agent.js +2 -2
  9. package/dist/commands/billing.js +1 -1
  10. package/dist/commands/budget.js +1 -1
  11. package/dist/commands/columns.js +2 -2
  12. package/dist/commands/copilot.js +9 -3
  13. package/dist/commands/knowledge.js +3 -3
  14. package/dist/commands/table-runs.js +1 -1
  15. package/dist/commands/verify.js +1 -1
  16. package/dist/customer-operation-commands.js +1 -0
  17. package/dist/knowledge-mirror.js +1 -1
  18. package/dist/visual-commands.js +57 -8
  19. package/dist/workspace-skill-commands.d.ts +1 -1
  20. package/dist/workspace-skill-commands.js +1 -1
  21. package/node_modules/@oxygen/formula/dist/expression.d.ts +7 -0
  22. package/node_modules/@oxygen/formula/dist/expression.js +29 -1
  23. package/node_modules/@oxygen/formula/dist/formula-functions.d.ts +2 -0
  24. package/node_modules/@oxygen/formula/dist/formula-functions.js +6 -2
  25. package/node_modules/@oxygen/shared/dist/agents/reply-oxygent.js +1 -1
  26. package/node_modules/@oxygen/shared/dist/agents/sessions.js +2 -2
  27. package/node_modules/@oxygen/shared/dist/{billing.js → billing/billing.js} +4 -4
  28. package/node_modules/@oxygen/shared/dist/{credit-guidance.js → billing/credit-guidance.js} +1 -1
  29. package/node_modules/@oxygen/shared/dist/{billing-money.js → billing/money.js} +1 -1
  30. package/node_modules/@oxygen/shared/dist/{plan-band.d.ts → billing/plan-band.d.ts} +1 -1
  31. package/node_modules/@oxygen/shared/dist/{plan-band.js → billing/plan-band.js} +2 -2
  32. package/node_modules/@oxygen/shared/dist/{plan-limits.d.ts → billing/plan-limits.d.ts} +2 -2
  33. package/node_modules/@oxygen/shared/dist/{plan-limits.js → billing/plan-limits.js} +5 -5
  34. package/node_modules/@oxygen/shared/dist/{pricing-sheet.d.ts → billing/pricing-sheet.d.ts} +9 -9
  35. package/node_modules/@oxygen/shared/dist/{pricing-sheet.js → billing/pricing-sheet.js} +10 -10
  36. package/node_modules/@oxygen/shared/dist/{repricing.js → billing/repricing.js} +1 -1
  37. package/node_modules/@oxygen/shared/dist/{sending-seats.d.ts → billing/sending-seats.d.ts} +1 -1
  38. package/node_modules/@oxygen/shared/dist/{sending-seats.js → billing/sending-seats.js} +1 -1
  39. package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +2 -2
  40. package/node_modules/@oxygen/shared/dist/capability-discovery.js +3 -3
  41. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.d.ts +1 -1
  42. package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.js +3 -2
  43. package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.js +6 -6
  44. package/node_modules/@oxygen/shared/dist/contracts/browser-operations.js +1 -1
  45. package/node_modules/@oxygen/shared/dist/contracts/connectors.js +1 -1
  46. package/node_modules/@oxygen/shared/dist/contracts/copilot-sessions.d.ts +27 -0
  47. package/node_modules/@oxygen/shared/dist/contracts/copilot-sessions.js +13 -0
  48. package/node_modules/@oxygen/shared/dist/contracts/customer-operations.js +2 -1
  49. package/node_modules/@oxygen/shared/dist/contracts/knowledge-content-reads.js +1 -1
  50. package/node_modules/@oxygen/shared/dist/contracts/knowledge-proposal-reads.js +1 -1
  51. package/node_modules/@oxygen/shared/dist/contracts/limits-read.js +2 -2
  52. package/node_modules/@oxygen/shared/dist/contracts/table-query-raw.d.ts +10 -0
  53. package/node_modules/@oxygen/shared/dist/contracts/table-query-raw.js +15 -0
  54. package/node_modules/@oxygen/shared/dist/contracts/teammates.js +2 -2
  55. package/node_modules/@oxygen/shared/dist/{copilot-access.js → copilot/access.js} +2 -2
  56. package/node_modules/@oxygen/shared/dist/{copilot-journeys.js → copilot/journeys.js} +1 -1
  57. package/node_modules/@oxygen/shared/dist/{copilot-playbooks.d.ts → copilot/playbooks.d.ts} +1 -1
  58. package/node_modules/@oxygen/shared/dist/{copilot-playbooks.js → copilot/playbooks.js} +1 -1
  59. package/node_modules/@oxygen/shared/dist/copilot-journeys.generated.js +1 -1
  60. package/node_modules/@oxygen/shared/dist/copilot-playbooks.generated.js +1 -1
  61. package/node_modules/@oxygen/shared/dist/diagnostic-spool.js +10 -1
  62. package/node_modules/@oxygen/shared/dist/feature-gates.d.ts +2 -2
  63. package/node_modules/@oxygen/shared/dist/feature-gates.js +2 -2
  64. package/node_modules/@oxygen/shared/dist/hosted-ai.js +1 -1
  65. package/node_modules/@oxygen/shared/dist/index.d.ts +24 -24
  66. package/node_modules/@oxygen/shared/dist/index.js +24 -24
  67. package/node_modules/@oxygen/shared/dist/{knowledge-bases.js → knowledge/bases.js} +1 -1
  68. package/node_modules/@oxygen/shared/dist/{knowledge-bootstrap.d.ts → knowledge/bootstrap.d.ts} +8 -2
  69. package/node_modules/@oxygen/shared/dist/{knowledge-bootstrap.js → knowledge/bootstrap.js} +9 -3
  70. package/node_modules/@oxygen/shared/dist/{knowledge-links.js → knowledge/links.js} +1 -1
  71. package/node_modules/@oxygen/shared/dist/{knowledge-markdown.js → knowledge/markdown.js} +1 -1
  72. package/node_modules/@oxygen/shared/dist/{knowledge-repository.js → knowledge/repository.js} +1 -1
  73. package/node_modules/@oxygen/shared/dist/{knowledge-seed-content.d.ts → knowledge/seed-content.d.ts} +1 -1
  74. package/node_modules/@oxygen/shared/dist/{knowledge-vault-markdown.js → knowledge/vault-markdown.js} +1 -1
  75. package/node_modules/@oxygen/shared/dist/log-collapse.d.ts +1 -1
  76. package/node_modules/@oxygen/shared/dist/log-collapse.js +1 -1
  77. package/node_modules/@oxygen/shared/dist/mailboxes/freemail-domains.d.ts +1 -1
  78. package/node_modules/@oxygen/shared/dist/mailboxes/freemail-domains.js +1 -1
  79. package/node_modules/@oxygen/shared/dist/media-project.d.ts +34 -0
  80. package/node_modules/@oxygen/shared/dist/media-project.js +58 -0
  81. package/node_modules/@oxygen/shared/dist/onboarding/research.d.ts +25 -1
  82. package/node_modules/@oxygen/shared/dist/onboarding/research.js +27 -1
  83. package/node_modules/@oxygen/shared/dist/pricing-snapshot.generated.js +1 -1
  84. package/node_modules/@oxygen/shared/dist/{publishing-approval.js → publishing/approval.js} +1 -1
  85. package/node_modules/@oxygen/shared/dist/{skill-play-routing.js → recipes/skill-play-routing.js} +1 -1
  86. package/node_modules/@oxygen/shared/dist/{workspace-skills.js → recipes/workspace-skills.js} +2 -2
  87. package/node_modules/@oxygen/shared/dist/search-vocab.d.ts +1 -0
  88. package/node_modules/@oxygen/shared/dist/search-vocab.js +15 -2
  89. package/node_modules/@oxygen/shared/dist/sequences/linkedin-quota-denial.d.ts +1 -1
  90. package/node_modules/@oxygen/shared/dist/sequences/linkedin-quota-denial.js +1 -1
  91. package/node_modules/@oxygen/shared/dist/sequences/sending-limits.d.ts +1 -1
  92. package/node_modules/@oxygen/shared/dist/sequences/whatsapp-sender-limits.d.ts +1 -1
  93. package/node_modules/@oxygen/shared/dist/sequences/whatsapp-sender-limits.js +1 -1
  94. package/node_modules/@oxygen/shared/dist/{network-mining-approval.js → signals/network-mining-approval.js} +1 -1
  95. package/node_modules/@oxygen/shared/dist/{network-mining.js → signals/network-mining.js} +1 -1
  96. package/node_modules/@oxygen/shared/dist/skill-plays.generated.js +1 -1
  97. package/node_modules/@oxygen/shared/dist/spend-safety.d.ts +4 -4
  98. package/node_modules/@oxygen/shared/dist/spend-safety.js +1 -1
  99. package/node_modules/@oxygen/shared/dist/tables/capacity.d.ts +2 -2
  100. package/node_modules/@oxygen/shared/dist/tables/capacity.js +1 -1
  101. package/node_modules/@oxygen/shared/dist/{cell-format.js → tables/cell-format.js} +2 -2
  102. package/node_modules/@oxygen/shared/dist/{column-autofill.js → tables/column-autofill.js} +1 -1
  103. package/node_modules/@oxygen/shared/dist/tables/column-output-fields.js +1 -1
  104. package/node_modules/@oxygen/shared/dist/tables/company-enrichment-fields.js +1 -1
  105. package/node_modules/@oxygen/shared/dist/tables/enrichment-intents.d.ts +1 -1
  106. package/node_modules/@oxygen/shared/dist/tables/enrichment-intents.js +1 -1
  107. package/node_modules/@oxygen/shared/dist/{table-field-types.d.ts → tables/field-types.d.ts} +1 -1
  108. package/node_modules/@oxygen/shared/dist/{table-field-types.js → tables/field-types.js} +1 -1
  109. package/node_modules/@oxygen/shared/dist/{table-filter-operators.js → tables/filter-operators.js} +1 -1
  110. package/node_modules/@oxygen/shared/dist/tables/linkedin-payload-fields.d.ts +78 -0
  111. package/node_modules/@oxygen/shared/dist/tables/linkedin-payload-fields.js +182 -0
  112. package/node_modules/@oxygen/shared/dist/{research-findings.js → tables/research-findings.js} +1 -1
  113. package/node_modules/@oxygen/shared/dist/{research-output-contract.js → tables/research-output-contract.js} +1 -1
  114. package/node_modules/@oxygen/shared/dist/user-capability-routing.js +27 -0
  115. package/node_modules/@oxygen/shared/dist/version.d.ts +1 -1
  116. package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
  117. package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
  118. package/node_modules/@oxygen/shared/dist/version.js +1 -1
  119. package/node_modules/@oxygen/shared/dist/visual-render.d.ts +14 -3
  120. package/node_modules/@oxygen/shared/dist/visual-render.js +43 -2
  121. package/node_modules/@oxygen/shared/dist/workflows/workspace-event-catalog.js +3 -3
  122. package/node_modules/@oxygen/shared/dist/workspace-file-storage.d.ts +1 -1
  123. package/node_modules/@oxygen/shared/dist/workspace-file-storage.js +3 -2
  124. package/node_modules/@oxygen/shared/package.json +0 -65
  125. package/node_modules/@oxygen/workflows/dist/recipe-timestamp.d.ts +1 -1
  126. package/node_modules/@oxygen/workflows/dist/recipe-timestamp.js +1 -1
  127. package/package.json +1 -1
  128. /package/node_modules/@oxygen/shared/dist/{billing-anchors.d.ts → billing/anchors.d.ts} +0 -0
  129. /package/node_modules/@oxygen/shared/dist/{billing-anchors.js → billing/anchors.js} +0 -0
  130. /package/node_modules/@oxygen/shared/dist/{billing.d.ts → billing/billing.d.ts} +0 -0
  131. /package/node_modules/@oxygen/shared/dist/{budget-scopes.d.ts → billing/budget-scopes.d.ts} +0 -0
  132. /package/node_modules/@oxygen/shared/dist/{budget-scopes.js → billing/budget-scopes.js} +0 -0
  133. /package/node_modules/@oxygen/shared/dist/{byok-connect.d.ts → billing/byok-connect.d.ts} +0 -0
  134. /package/node_modules/@oxygen/shared/dist/{byok-connect.js → billing/byok-connect.js} +0 -0
  135. /package/node_modules/@oxygen/shared/dist/{cost-estimate-view.d.ts → billing/cost-estimate-view.d.ts} +0 -0
  136. /package/node_modules/@oxygen/shared/dist/{cost-estimate-view.js → billing/cost-estimate-view.js} +0 -0
  137. /package/node_modules/@oxygen/shared/dist/{cost-estimate.d.ts → billing/cost-estimate.d.ts} +0 -0
  138. /package/node_modules/@oxygen/shared/dist/{cost-estimate.js → billing/cost-estimate.js} +0 -0
  139. /package/node_modules/@oxygen/shared/dist/{credit-gate.d.ts → billing/credit-gate.d.ts} +0 -0
  140. /package/node_modules/@oxygen/shared/dist/{credit-gate.js → billing/credit-gate.js} +0 -0
  141. /package/node_modules/@oxygen/shared/dist/{credit-guidance.d.ts → billing/credit-guidance.d.ts} +0 -0
  142. /package/node_modules/@oxygen/shared/dist/{credit-topup-review.d.ts → billing/credit-topup-review.d.ts} +0 -0
  143. /package/node_modules/@oxygen/shared/dist/{credit-topup-review.js → billing/credit-topup-review.js} +0 -0
  144. /package/node_modules/@oxygen/shared/dist/{first-month-offer-window.d.ts → billing/first-month-offer-window.d.ts} +0 -0
  145. /package/node_modules/@oxygen/shared/dist/{first-month-offer-window.js → billing/first-month-offer-window.js} +0 -0
  146. /package/node_modules/@oxygen/shared/dist/{first-month-offer.d.ts → billing/first-month-offer.d.ts} +0 -0
  147. /package/node_modules/@oxygen/shared/dist/{first-month-offer.js → billing/first-month-offer.js} +0 -0
  148. /package/node_modules/@oxygen/shared/dist/{guided-trial-billing.d.ts → billing/guided-trial-billing.d.ts} +0 -0
  149. /package/node_modules/@oxygen/shared/dist/{guided-trial-billing.js → billing/guided-trial-billing.js} +0 -0
  150. /package/node_modules/@oxygen/shared/dist/{billing-money.d.ts → billing/money.d.ts} +0 -0
  151. /package/node_modules/@oxygen/shared/dist/{partner-coupon-bonus.d.ts → billing/partner-coupon-bonus.d.ts} +0 -0
  152. /package/node_modules/@oxygen/shared/dist/{partner-coupon-bonus.js → billing/partner-coupon-bonus.js} +0 -0
  153. /package/node_modules/@oxygen/shared/dist/{plan-capabilities.d.ts → billing/plan-capabilities.d.ts} +0 -0
  154. /package/node_modules/@oxygen/shared/dist/{plan-capabilities.js → billing/plan-capabilities.js} +0 -0
  155. /package/node_modules/@oxygen/shared/dist/{plan-limits-view.d.ts → billing/plan-limits-view.d.ts} +0 -0
  156. /package/node_modules/@oxygen/shared/dist/{plan-limits-view.js → billing/plan-limits-view.js} +0 -0
  157. /package/node_modules/@oxygen/shared/dist/{repricing.d.ts → billing/repricing.d.ts} +0 -0
  158. /package/node_modules/@oxygen/shared/dist/{sending-seat-capacity.d.ts → billing/sending-seat-capacity.d.ts} +0 -0
  159. /package/node_modules/@oxygen/shared/dist/{sending-seat-capacity.js → billing/sending-seat-capacity.js} +0 -0
  160. /package/node_modules/@oxygen/shared/dist/{stripe-price-catalog.d.ts → billing/stripe-price-catalog.d.ts} +0 -0
  161. /package/node_modules/@oxygen/shared/dist/{stripe-price-catalog.js → billing/stripe-price-catalog.js} +0 -0
  162. /package/node_modules/@oxygen/shared/dist/{stripe-subscription-kind.d.ts → billing/stripe-subscription-kind.d.ts} +0 -0
  163. /package/node_modules/@oxygen/shared/dist/{stripe-subscription-kind.js → billing/stripe-subscription-kind.js} +0 -0
  164. /package/node_modules/@oxygen/shared/dist/{copilot-access.d.ts → copilot/access.d.ts} +0 -0
  165. /package/node_modules/@oxygen/shared/dist/{copilot-errors.d.ts → copilot/errors.d.ts} +0 -0
  166. /package/node_modules/@oxygen/shared/dist/{copilot-errors.js → copilot/errors.js} +0 -0
  167. /package/node_modules/@oxygen/shared/dist/{copilot-journeys.d.ts → copilot/journeys.d.ts} +0 -0
  168. /package/node_modules/@oxygen/shared/dist/{copilot-plan.d.ts → copilot/plan.d.ts} +0 -0
  169. /package/node_modules/@oxygen/shared/dist/{copilot-plan.js → copilot/plan.js} +0 -0
  170. /package/node_modules/@oxygen/shared/dist/{copilot-questions.d.ts → copilot/questions.d.ts} +0 -0
  171. /package/node_modules/@oxygen/shared/dist/{copilot-questions.js → copilot/questions.js} +0 -0
  172. /package/node_modules/@oxygen/shared/dist/{knowledge-bases.d.ts → knowledge/bases.d.ts} +0 -0
  173. /package/node_modules/@oxygen/shared/dist/{knowledge-brain-draft.d.ts → knowledge/brain-draft.d.ts} +0 -0
  174. /package/node_modules/@oxygen/shared/dist/{knowledge-brain-draft.js → knowledge/brain-draft.js} +0 -0
  175. /package/node_modules/@oxygen/shared/dist/{knowledge-constants.d.ts → knowledge/constants.d.ts} +0 -0
  176. /package/node_modules/@oxygen/shared/dist/{knowledge-constants.js → knowledge/constants.js} +0 -0
  177. /package/node_modules/@oxygen/shared/dist/{knowledge-links.d.ts → knowledge/links.d.ts} +0 -0
  178. /package/node_modules/@oxygen/shared/dist/{knowledge-markdown.d.ts → knowledge/markdown.d.ts} +0 -0
  179. /package/node_modules/@oxygen/shared/dist/{knowledge-repository.d.ts → knowledge/repository.d.ts} +0 -0
  180. /package/node_modules/@oxygen/shared/dist/{knowledge-seed-content.js → knowledge/seed-content.js} +0 -0
  181. /package/node_modules/@oxygen/shared/dist/{knowledge-vault-markdown.d.ts → knowledge/vault-markdown.d.ts} +0 -0
  182. /package/node_modules/@oxygen/shared/dist/{publishing-approval.d.ts → publishing/approval.d.ts} +0 -0
  183. /package/node_modules/@oxygen/shared/dist/{publishing-limits.d.ts → publishing/limits.d.ts} +0 -0
  184. /package/node_modules/@oxygen/shared/dist/{publishing-limits.js → publishing/limits.js} +0 -0
  185. /package/node_modules/@oxygen/shared/dist/{skill-play-routing.d.ts → recipes/skill-play-routing.d.ts} +0 -0
  186. /package/node_modules/@oxygen/shared/dist/{workspace-skills.d.ts → recipes/workspace-skills.d.ts} +0 -0
  187. /package/node_modules/@oxygen/shared/dist/{network-mining-approval.d.ts → signals/network-mining-approval.d.ts} +0 -0
  188. /package/node_modules/@oxygen/shared/dist/{network-mining-signals.d.ts → signals/network-mining-signals.d.ts} +0 -0
  189. /package/node_modules/@oxygen/shared/dist/{network-mining-signals.js → signals/network-mining-signals.js} +0 -0
  190. /package/node_modules/@oxygen/shared/dist/{network-mining.d.ts → signals/network-mining.d.ts} +0 -0
  191. /package/node_modules/@oxygen/shared/dist/{cell-format.d.ts → tables/cell-format.d.ts} +0 -0
  192. /package/node_modules/@oxygen/shared/dist/{clay-migration-auth-state.d.ts → tables/clay-migration-auth-state.d.ts} +0 -0
  193. /package/node_modules/@oxygen/shared/dist/{clay-migration-auth-state.js → tables/clay-migration-auth-state.js} +0 -0
  194. /package/node_modules/@oxygen/shared/dist/{column-autofill.d.ts → tables/column-autofill.d.ts} +0 -0
  195. /package/node_modules/@oxygen/shared/dist/{column-operation.d.ts → tables/column-operation.d.ts} +0 -0
  196. /package/node_modules/@oxygen/shared/dist/{column-operation.js → tables/column-operation.js} +0 -0
  197. /package/node_modules/@oxygen/shared/dist/{email-verification-batch.d.ts → tables/email-verification-batch.d.ts} +0 -0
  198. /package/node_modules/@oxygen/shared/dist/{email-verification-batch.js → tables/email-verification-batch.js} +0 -0
  199. /package/node_modules/@oxygen/shared/dist/{table-filter-operators.d.ts → tables/filter-operators.d.ts} +0 -0
  200. /package/node_modules/@oxygen/shared/dist/{linkedin-countries.d.ts → tables/linkedin-countries.d.ts} +0 -0
  201. /package/node_modules/@oxygen/shared/dist/{linkedin-countries.js → tables/linkedin-countries.js} +0 -0
  202. /package/node_modules/@oxygen/shared/dist/{linkedin-country-timezones.d.ts → tables/linkedin-country-timezones.d.ts} +0 -0
  203. /package/node_modules/@oxygen/shared/dist/{linkedin-country-timezones.js → tables/linkedin-country-timezones.js} +0 -0
  204. /package/node_modules/@oxygen/shared/dist/{research-depth.d.ts → tables/research-depth.d.ts} +0 -0
  205. /package/node_modules/@oxygen/shared/dist/{research-depth.js → tables/research-depth.js} +0 -0
  206. /package/node_modules/@oxygen/shared/dist/{research-findings.d.ts → tables/research-findings.d.ts} +0 -0
  207. /package/node_modules/@oxygen/shared/dist/{research-output-contract.d.ts → tables/research-output-contract.d.ts} +0 -0
  208. /package/node_modules/@oxygen/shared/dist/{table-run-summary.d.ts → tables/run-summary.d.ts} +0 -0
  209. /package/node_modules/@oxygen/shared/dist/{table-run-summary.js → tables/run-summary.js} +0 -0
@@ -1,28 +1,28 @@
1
1
  export { OXYGEN_MINIMUM_CLI_VERSION, OXYGEN_VERSION, } from "./version.js";
2
2
  export { WORKFLOW_TRIGGER_AUTO_PAUSE_METADATA_KEYS, clearWorkflowTriggerAutoPauseMetadata, } from "./workflows/trigger-metadata.js";
3
3
  export { WORKFLOW_STATUS_CHANGE_METADATA_KEY, type WorkflowStatusChange, type WorkflowStatusChangeActor, type WorkflowStatusChangeSource, describeWorkflowStatusChange, formatWorkflowStatusChangeTimestamp, parseWorkflowStatusChange, readWorkflowStatusChange, } from "./workflows/status-change.js";
4
- export * from "./billing.js";
4
+ export * from "./billing/billing.js";
5
5
  export * from "./visual-render.js";
6
- export * from "./billing-anchors.js";
7
- export * from "./budget-scopes.js";
8
- export * from "./byok-connect.js";
6
+ export * from "./billing/anchors.js";
7
+ export * from "./billing/budget-scopes.js";
8
+ export * from "./billing/byok-connect.js";
9
9
  export * from "./capability-discovery.js";
10
10
  export * from "./user-capability-routing.js";
11
- export * from "./plan-capabilities.js";
12
- export * from "./plan-limits.js";
13
- export * from "./plan-band.js";
14
- export * from "./sending-seats.js";
15
- export * from "./sending-seat-capacity.js";
11
+ export * from "./billing/plan-capabilities.js";
12
+ export * from "./billing/plan-limits.js";
13
+ export * from "./billing/plan-band.js";
14
+ export * from "./billing/sending-seats.js";
15
+ export * from "./billing/sending-seat-capacity.js";
16
16
  export * from "./support/plain-support-events.js";
17
17
  export * from "./provider-balance-signal.js";
18
18
  export * from "./provider-funding-errors.js";
19
- export * from "./publishing-limits.js";
19
+ export * from "./publishing/limits.js";
20
20
  export * from "./spend-safety.js";
21
21
  export * from "./tables/company-enrichment-fields.js";
22
22
  export * from "./tables/enrichment-intents.js";
23
23
  export * from "./error-message.js";
24
24
  export * from "./sql-rows.js";
25
- export * from "./cell-format.js";
25
+ export * from "./tables/cell-format.js";
26
26
  export * from "./cli-envelope.js";
27
27
  export * from "./auth/cli-login-code.js";
28
28
  export * from "./cli-result.js";
@@ -30,11 +30,11 @@ export * from "./collab.js";
30
30
  export * from "./records/reply-events.js";
31
31
  export * from "./records/activity-events.js";
32
32
  export * from "./tables/column-types.js";
33
- export * from "./copilot-errors.js";
34
- export * from "./copilot-journeys.js";
35
- export * from "./copilot-playbooks.js";
36
- export * from "./copilot-plan.js";
37
- export * from "./credit-guidance.js";
33
+ export * from "./copilot/errors.js";
34
+ export * from "./copilot/journeys.js";
35
+ export * from "./copilot/playbooks.js";
36
+ export * from "./copilot/plan.js";
37
+ export * from "./billing/credit-guidance.js";
38
38
  export * from "./deploy-env.js";
39
39
  export * from "./marketing/directory.js";
40
40
  export * from "./sequences/email-dsn.js";
@@ -50,12 +50,12 @@ export * from "./product-analytics-environment.js";
50
50
  export * from "./product-analytics-events.js";
51
51
  export * from "./hosted-ai.js";
52
52
  export * from "./identifiers.js";
53
- export * from "./knowledge-constants.js";
54
- export * from "./knowledge-bootstrap.js";
55
- export * from "./knowledge-links.js";
56
- export * from "./knowledge-markdown.js";
57
- export * from "./knowledge-vault-markdown.js";
58
- export * from "./knowledge-seed-content.js";
53
+ export * from "./knowledge/constants.js";
54
+ export * from "./knowledge/bootstrap.js";
55
+ export * from "./knowledge/links.js";
56
+ export * from "./knowledge/markdown.js";
57
+ export * from "./knowledge/vault-markdown.js";
58
+ export * from "./knowledge/seed-content.js";
59
59
  export * from "./langfuse.js";
60
60
  export * from "./llm-usage.js";
61
61
  export * from "./posts/linkedin-mentions.js";
@@ -114,8 +114,8 @@ export * from "./agents/workspace-agents.js";
114
114
  export * from "./semver.js";
115
115
  export * from "./ugc/ugc.js";
116
116
  export * from "./ugc/amplification-identity.js";
117
- export * from "./knowledge-repository.js";
118
- export * from "./knowledge-bases.js";
117
+ export * from "./knowledge/repository.js";
118
+ export * from "./knowledge/bases.js";
119
119
  export * from "./external-write-policy.js";
120
120
  export * from "./cutover-freeze.js";
121
121
  export * from "./log-sink-selector.js";
@@ -1,28 +1,28 @@
1
1
  export { OXYGEN_MINIMUM_CLI_VERSION, OXYGEN_VERSION, } from "./version.js";
2
2
  export { WORKFLOW_TRIGGER_AUTO_PAUSE_METADATA_KEYS, clearWorkflowTriggerAutoPauseMetadata, } from "./workflows/trigger-metadata.js";
3
3
  export { WORKFLOW_STATUS_CHANGE_METADATA_KEY, describeWorkflowStatusChange, formatWorkflowStatusChangeTimestamp, parseWorkflowStatusChange, readWorkflowStatusChange, } from "./workflows/status-change.js";
4
- export * from "./billing.js";
4
+ export * from "./billing/billing.js";
5
5
  export * from "./visual-render.js";
6
- export * from "./billing-anchors.js";
7
- export * from "./budget-scopes.js";
8
- export * from "./byok-connect.js";
6
+ export * from "./billing/anchors.js";
7
+ export * from "./billing/budget-scopes.js";
8
+ export * from "./billing/byok-connect.js";
9
9
  export * from "./capability-discovery.js";
10
10
  export * from "./user-capability-routing.js";
11
- export * from "./plan-capabilities.js";
12
- export * from "./plan-limits.js";
13
- export * from "./plan-band.js";
14
- export * from "./sending-seats.js";
15
- export * from "./sending-seat-capacity.js";
11
+ export * from "./billing/plan-capabilities.js";
12
+ export * from "./billing/plan-limits.js";
13
+ export * from "./billing/plan-band.js";
14
+ export * from "./billing/sending-seats.js";
15
+ export * from "./billing/sending-seat-capacity.js";
16
16
  export * from "./support/plain-support-events.js";
17
17
  export * from "./provider-balance-signal.js";
18
18
  export * from "./provider-funding-errors.js";
19
- export * from "./publishing-limits.js";
19
+ export * from "./publishing/limits.js";
20
20
  export * from "./spend-safety.js";
21
21
  export * from "./tables/company-enrichment-fields.js";
22
22
  export * from "./tables/enrichment-intents.js";
23
23
  export * from "./error-message.js";
24
24
  export * from "./sql-rows.js";
25
- export * from "./cell-format.js";
25
+ export * from "./tables/cell-format.js";
26
26
  export * from "./cli-envelope.js";
27
27
  export * from "./auth/cli-login-code.js";
28
28
  export * from "./cli-result.js";
@@ -30,11 +30,11 @@ export * from "./collab.js";
30
30
  export * from "./records/reply-events.js";
31
31
  export * from "./records/activity-events.js";
32
32
  export * from "./tables/column-types.js";
33
- export * from "./copilot-errors.js";
34
- export * from "./copilot-journeys.js";
35
- export * from "./copilot-playbooks.js";
36
- export * from "./copilot-plan.js";
37
- export * from "./credit-guidance.js";
33
+ export * from "./copilot/errors.js";
34
+ export * from "./copilot/journeys.js";
35
+ export * from "./copilot/playbooks.js";
36
+ export * from "./copilot/plan.js";
37
+ export * from "./billing/credit-guidance.js";
38
38
  export * from "./deploy-env.js";
39
39
  export * from "./marketing/directory.js";
40
40
  export * from "./sequences/email-dsn.js";
@@ -50,12 +50,12 @@ export * from "./product-analytics-environment.js";
50
50
  export * from "./product-analytics-events.js";
51
51
  export * from "./hosted-ai.js";
52
52
  export * from "./identifiers.js";
53
- export * from "./knowledge-constants.js";
54
- export * from "./knowledge-bootstrap.js";
55
- export * from "./knowledge-links.js";
56
- export * from "./knowledge-markdown.js";
57
- export * from "./knowledge-vault-markdown.js";
58
- export * from "./knowledge-seed-content.js";
53
+ export * from "./knowledge/constants.js";
54
+ export * from "./knowledge/bootstrap.js";
55
+ export * from "./knowledge/links.js";
56
+ export * from "./knowledge/markdown.js";
57
+ export * from "./knowledge/vault-markdown.js";
58
+ export * from "./knowledge/seed-content.js";
59
59
  export * from "./langfuse.js";
60
60
  export * from "./llm-usage.js";
61
61
  export * from "./posts/linkedin-mentions.js";
@@ -126,8 +126,8 @@ export * from "./agents/workspace-agents.js";
126
126
  export * from "./semver.js";
127
127
  export * from "./ugc/ugc.js";
128
128
  export * from "./ugc/amplification-identity.js";
129
- export * from "./knowledge-repository.js";
130
- export * from "./knowledge-bases.js";
129
+ export * from "./knowledge/repository.js";
130
+ export * from "./knowledge/bases.js";
131
131
  export * from "./external-write-policy.js";
132
132
  export * from "./cutover-freeze.js";
133
133
  export * from "./log-sink-selector.js";
@@ -1,5 +1,5 @@
1
1
  import { parseDocument } from "yaml";
2
- import { readTrimmedString as stringValue } from "./type-guards.js";
2
+ import { readTrimmedString as stringValue } from "../type-guards.js";
3
3
  function record(value) {
4
4
  return value !== null && typeof value === "object" && !Array.isArray(value)
5
5
  ? value
@@ -54,7 +54,7 @@
54
54
  * Professional person evidence remains actor-scoped; ICP/offers are hypotheses.
55
55
  * The provider sub-cap covers every external research leg, including fallbacks.
56
56
  */
57
- import type { HostedAiLevel } from "./hosted-ai.js";
57
+ import type { HostedAiLevel } from "../hosted-ai.js";
58
58
  /**
59
59
  * Hard ceiling on managed credits ONE workspace bootstrap may spend, all phases.
60
60
  * 150 since 2026-10-18 (founder, current chat: "increase to at least 100 ... don't
@@ -282,7 +282,7 @@ export declare function readKnowledgeBootstrapConsent(metadata: unknown): Knowle
282
282
  * It sits beside the consent key for the same reason: the setup surface writes it and
283
283
  * the worker reads it, and two spellings of the key would silently drop a hint the
284
284
  * customer took the trouble to give us. The stored value is the canonical form
285
- * produced by `normalizeLinkedinCompanyUrl` (./sequences/dnc-identities.js) — normalize on the
285
+ * produced by `normalizeLinkedinCompanyUrl` (../sequences/dnc-identities.js) — normalize on the
286
286
  * way in AND on the way out, never trust the raw string, and never let a personal
287
287
  * `/in/` profile through: this is the COMPANY page, and researching a founder's
288
288
  * personal profile as if it were the company is exactly the confidently-wrong write
@@ -317,6 +317,12 @@ export declare function normalizeBootstrapCompanyLinkedinUrl(value: unknown): st
317
317
  * dead and the workspace is recoverable through the product.
318
318
  */
319
319
  export declare const KNOWLEDGE_BOOTSTRAP_STUCK_AFTER_MS: number;
320
+ /**
321
+ * Reason on a `running` marker the BullMQ projector held after its execution ended
322
+ * uncertain (tenant-db knowledge-bootstrap-worker.ts). No process owns or resumes it,
323
+ * so readers must not present it as research in progress.
324
+ */
325
+ export declare const KNOWLEDGE_BOOTSTRAP_HELD_FOR_RECOVERY_REASON = "worker_outcome_requires_recovery";
320
326
  /**
321
327
  * Idempotency-key prefix for the ledger row that hands an automatic pass's
322
328
  * credits back to the workspace (property 7 above). The key is
@@ -54,8 +54,8 @@
54
54
  * Professional person evidence remains actor-scoped; ICP/offers are hypotheses.
55
55
  * The provider sub-cap covers every external research leg, including fallbacks.
56
56
  */
57
- import { normalizeLinkedinCompanyUrl } from "./sequences/dnc-identities.js";
58
- import { normalizeLinkedinProfileUrl } from "./tables/linkedin-url.js";
57
+ import { normalizeLinkedinCompanyUrl } from "../sequences/dnc-identities.js";
58
+ import { normalizeLinkedinProfileUrl } from "../tables/linkedin-url.js";
59
59
  /**
60
60
  * Hard ceiling on managed credits ONE workspace bootstrap may spend, all phases.
61
61
  * 150 since 2026-10-18 (founder, current chat: "increase to at least 100 ... don't
@@ -254,7 +254,7 @@ function readGrant(raw) {
254
254
  * It sits beside the consent key for the same reason: the setup surface writes it and
255
255
  * the worker reads it, and two spellings of the key would silently drop a hint the
256
256
  * customer took the trouble to give us. The stored value is the canonical form
257
- * produced by `normalizeLinkedinCompanyUrl` (./sequences/dnc-identities.js) — normalize on the
257
+ * produced by `normalizeLinkedinCompanyUrl` (../sequences/dnc-identities.js) — normalize on the
258
258
  * way in AND on the way out, never trust the raw string, and never let a personal
259
259
  * `/in/` profile through: this is the COMPANY page, and researching a founder's
260
260
  * personal profile as if it were the company is exactly the confidently-wrong write
@@ -295,6 +295,12 @@ export function normalizeBootstrapCompanyLinkedinUrl(value) {
295
295
  * dead and the workspace is recoverable through the product.
296
296
  */
297
297
  export const KNOWLEDGE_BOOTSTRAP_STUCK_AFTER_MS = 60 * 60 * 1000;
298
+ /**
299
+ * Reason on a `running` marker the BullMQ projector held after its execution ended
300
+ * uncertain (tenant-db knowledge-bootstrap-worker.ts). No process owns or resumes it,
301
+ * so readers must not present it as research in progress.
302
+ */
303
+ export const KNOWLEDGE_BOOTSTRAP_HELD_FOR_RECOVERY_REASON = "worker_outcome_requires_recovery";
298
304
  /**
299
305
  * Idempotency-key prefix for the ledger row that hands an automatic pass's
300
306
  * credits back to the workspace (property 7 above). The key is
@@ -6,7 +6,7 @@
6
6
  // now delegates here — [[Target|alias]] and [[Target#heading]] both link to
7
7
  // Target. Links inside a connected repository resolve by vault path first
8
8
  // (resolveKnowledgeVaultLink), for the mounted file view and the graph alike.
9
- import { knowledgeLinkKey } from "./knowledge-constants.js";
9
+ import { knowledgeLinkKey } from "./constants.js";
10
10
  const WIKILINK_RE = /\[\[([^\]]+)\]\]/g;
11
11
  /**
12
12
  * Extract every [[wikilink]] from a markdown body, deduplicated by resolution
@@ -5,7 +5,7 @@
5
5
  // building (no node imports): safe for web bundles; hashing happens in the API
6
6
  // layer. The frontmatter is intentionally parseable by the simple line-based
7
7
  // parser in the vault component (key: value lines, tags as [a, b]).
8
- import { RESERVED_KNOWLEDGE_FRONTMATTER_KEYS } from "./knowledge-constants.js";
8
+ import { RESERVED_KNOWLEDGE_FRONTMATTER_KEYS } from "./constants.js";
9
9
  const RESERVED_KEYS = new Set(RESERVED_KNOWLEDGE_FRONTMATTER_KEYS);
10
10
  // Frontmatter values are single-line by contract: collapse whitespace runs
11
11
  // (including newlines) so the line-based parser can never be broken by content.
@@ -1,4 +1,4 @@
1
- import { OxygenError } from "./cli-result.js";
1
+ import { OxygenError } from "../cli-result.js";
2
2
  export const KNOWLEDGE_REPOSITORY_FILE_LIMIT = 25_000;
3
3
  export const KNOWLEDGE_REPOSITORY_POLL_MS = 5 * 60_000;
4
4
  export const KNOWLEDGE_REPOSITORY_IDLE_MS = 15_000;
@@ -1,4 +1,4 @@
1
- import type { KnowledgePageType, KnowledgePageStatus } from "./knowledge-constants.js";
1
+ import type { KnowledgePageType, KnowledgePageStatus } from "./constants.js";
2
2
  /** Monotonic scaffold cursor stored in knowledge_state.scaffold_version. Bump to ship a
3
3
  * new wave of starter pages (tag them with a higher minScaffoldVersion).
4
4
  * v1: the 9-page core. v2: twelve GTM stubs (voice/brand/messaging/objections, three
@@ -1,5 +1,5 @@
1
1
  import { isMap, parseDocument, stringify } from "yaml";
2
- import { OxygenError } from "./cli-result.js";
2
+ import { OxygenError } from "../cli-result.js";
3
3
  export const KNOWLEDGE_VAULT_MARKDOWN_MAX_BYTES = 1_500_000;
4
4
  export const KNOWLEDGE_VAULT_PATH_MAX_BYTES = 1_024;
5
5
  function invalid(message) {
@@ -134,7 +134,7 @@ export declare function createLogCollapser(options: LogCollapserOptions): LogCol
134
134
  * IS the point, use the collapser, which keeps `occurrences`/`suppressed`.
135
135
  *
136
136
  * Modelled on `claimThresholdLogSlot`
137
- * (packages/integrations/src/budget-policy.ts), including its accepted trade: at
137
+ * (packages/integrations/src/billing/budget-policy.ts), including its accepted trade: at
138
138
  * the bound the set is cleared wholesale rather than evicted one by one, so a key
139
139
  * that was already claimed can emit a second line in the same window. Bounded
140
140
  * memory beats exactly-once for a line that is idempotent to re-read.
@@ -223,7 +223,7 @@ const claimedSlots = new Set();
223
223
  * IS the point, use the collapser, which keeps `occurrences`/`suppressed`.
224
224
  *
225
225
  * Modelled on `claimThresholdLogSlot`
226
- * (packages/integrations/src/budget-policy.ts), including its accepted trade: at
226
+ * (packages/integrations/src/billing/budget-policy.ts), including its accepted trade: at
227
227
  * the bound the set is cleared wholesale rather than evicted one by one, so a key
228
228
  * that was already claimed can emit a second line in the same window. Bounded
229
229
  * memory beats exactly-once for a line that is idempotent to re-read.
@@ -22,7 +22,7 @@
22
22
  * tier is harmless here; a host wrongly OUT of it pauses strangers who merely
23
23
  * share a mail host — real, customer-visible damage.
24
24
  * 2. Company derivation from a person's email domain
25
- * (`deriveCompanyDomainFromEmail`, `packages/tenant-db/src/table-link-plan.ts`)
25
+ * (`deriveCompanyDomainFromEmail`, `packages/tenant-db/src/tables/link-plan.ts`)
26
26
  * drops freemail before offering a domain as a company join key. Here the
27
27
  * polarity REVERSES: a host wrongly OUT of this tier makes OXYGEN mint a company
28
28
  * record for a mail provider, so every @<host> person collapses onto one fake
@@ -22,7 +22,7 @@
22
22
  * tier is harmless here; a host wrongly OUT of it pauses strangers who merely
23
23
  * share a mail host — real, customer-visible damage.
24
24
  * 2. Company derivation from a person's email domain
25
- * (`deriveCompanyDomainFromEmail`, `packages/tenant-db/src/table-link-plan.ts`)
25
+ * (`deriveCompanyDomainFromEmail`, `packages/tenant-db/src/tables/link-plan.ts`)
26
26
  * drops freemail before offering a domain as a company join key. Here the
27
27
  * polarity REVERSES: a host wrongly OUT of this tier makes OXYGEN mint a company
28
28
  * record for a mail provider, so every @<host> person collapses onto one fake
@@ -0,0 +1,34 @@
1
+ /** Assets are immutable workspace files; paths belong to this render, never the host. */
2
+ export type MediaAssetBinding = {
3
+ file_id: string;
4
+ path: string;
5
+ };
6
+ export type MediaAssetSnapshot = MediaAssetBinding & {
7
+ sha256: string;
8
+ size_bytes: number;
9
+ mime_type: string;
10
+ };
11
+ export declare const MEDIA_PROJECT_LIMITS: Readonly<{
12
+ files: 64;
13
+ inputBytes: number;
14
+ }>;
15
+ export declare const MOTION_RENDER_LIMITS: Readonly<{
16
+ durationSeconds: 10;
17
+ frames: 300;
18
+ side: 1920;
19
+ framePixels: 2073600;
20
+ aggregatePixels: 622080000;
21
+ timeoutMs: 120000;
22
+ }>;
23
+ export declare function mediaAssetMimeType(path: string): string;
24
+ export declare function validateMediaAssetPath(value: unknown): string;
25
+ export declare function parseMediaAssetBindings(value: unknown): MediaAssetBinding[];
26
+ export declare function validateMotionGeometry(input: {
27
+ width: number;
28
+ height: number;
29
+ fps: unknown;
30
+ duration: unknown;
31
+ }): {
32
+ fps: number;
33
+ duration: number;
34
+ };
@@ -0,0 +1,58 @@
1
+ import { OxygenError } from "./cli-result.js";
2
+ export const MEDIA_PROJECT_LIMITS = Object.freeze({ files: 64, inputBytes: 100 * 1024 * 1024 });
3
+ export const MOTION_RENDER_LIMITS = Object.freeze({ durationSeconds: 10, frames: 300, side: 1920,
4
+ framePixels: 2_073_600, aggregatePixels: 622_080_000, timeoutMs: 120_000 });
5
+ const UUID = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
6
+ const TYPES = {
7
+ png: "image/png", jpg: "image/jpeg", jpeg: "image/jpeg", webp: "image/webp", svg: "image/svg+xml",
8
+ woff: "font/woff", woff2: "font/woff2", ttf: "font/ttf", otf: "font/otf",
9
+ mp4: "video/mp4", webm: "video/webm", mp3: "audio/mpeg", wav: "audio/wav", m4a: "audio/mp4",
10
+ css: "text/css", js: "text/javascript", json: "application/json", html: "text/html",
11
+ };
12
+ export function mediaAssetMimeType(path) {
13
+ const type = TYPES[path.split(".").at(-1)?.toLowerCase() ?? ""];
14
+ if (!type)
15
+ throw new OxygenError("media_asset_type_unsupported", "Use an image, font, audio, video, HTML, CSS, JavaScript or JSON asset.");
16
+ return type;
17
+ }
18
+ export function validateMediaAssetPath(value) {
19
+ if (typeof value !== "string" || value.length > 200 || !/^[A-Za-z0-9][A-Za-z0-9._/-]*$/.test(value)
20
+ || value.split("/").some((part) => !part || part === "." || part === ".." || part.startsWith("."))
21
+ || /^(?:index\.html|inter\.woff2|page-[0-9]+\.html|request\.json|node_modules|raw|validated|__oxygen)(?:\/|$)/i.test(value)) {
22
+ throw new OxygenError("media_asset_path_invalid", "Use a relative asset path without traversal, hidden files or reserved project names.");
23
+ }
24
+ mediaAssetMimeType(value);
25
+ return value;
26
+ }
27
+ export function parseMediaAssetBindings(value) {
28
+ if (value === undefined)
29
+ return [];
30
+ if (!Array.isArray(value) || value.length > MEDIA_PROJECT_LIMITS.files) {
31
+ throw new OxygenError("media_project_limit", "A media project supports at most 64 attached assets.");
32
+ }
33
+ const paths = new Set();
34
+ return value.map((item) => {
35
+ if (!item || typeof item !== "object" || Array.isArray(item))
36
+ throw new OxygenError("invalid_input", "Each asset needs file_id and path.");
37
+ const row = item;
38
+ if (typeof row.file_id !== "string" || !UUID.test(row.file_id))
39
+ throw new OxygenError("invalid_input", "Each asset needs a workspace file UUID.");
40
+ const path = validateMediaAssetPath(row.path);
41
+ if (paths.has(path.toLowerCase()))
42
+ throw new OxygenError("media_asset_path_conflict", "Asset paths must be unique, including case variants.");
43
+ paths.add(path.toLowerCase());
44
+ return { file_id: row.file_id, path };
45
+ });
46
+ }
47
+ export function validateMotionGeometry(input) {
48
+ const { width, height } = input;
49
+ const fps = input.fps ?? 24, duration = input.duration ?? 5;
50
+ if (!Number.isInteger(width) || !Number.isInteger(height) || width < 2 || height < 2 || width % 2 || height % 2
51
+ || width > MOTION_RENDER_LIMITS.side || height > MOTION_RENDER_LIMITS.side || width * height > MOTION_RENDER_LIMITS.framePixels
52
+ || (fps !== 24 && fps !== 30) || typeof duration !== "number" || !Number.isFinite(duration) || duration <= 0
53
+ || duration > MOTION_RENDER_LIMITS.durationSeconds || Math.ceil(duration * fps) > MOTION_RENDER_LIMITS.frames
54
+ || width * height * Math.ceil(duration * fps) > MOTION_RENDER_LIMITS.aggregatePixels) {
55
+ throw new OxygenError("motion_render_limit", "Use even dimensions up to 1920px and 1080p pixels, 24 or 30 fps, and at most 10 seconds / 300 frames.");
56
+ }
57
+ return { fps, duration };
58
+ }
@@ -36,6 +36,26 @@ export declare const ONBOARDING_RESEARCH_RUN_MAX_CREDITS = 500;
36
36
  export declare const ONBOARDING_RESEARCH_MAX_CREDITS_PER_CALL = 15;
37
37
  /** The onboarding turn's own and its sub-agents' inference, credited back once the turn settles. */
38
38
  export declare const ONBOARDING_RESEARCH_INFERENCE_MAX_CREDITS = 150;
39
+ /**
40
+ * Inference held back for each researcher still working once the allowance
41
+ * closes in: its wrap-up, which writes its pages, and its tool-less conclusion.
42
+ * On the first deeper dev run (2026-10-28) a page-writing call took 6 to 13
43
+ * credits and the whole turn 187, so without this the signup's own credits paid
44
+ * the 37 past the allowance.
45
+ */
46
+ export declare const ONBOARDING_RESEARCH_WRAP_UP_RESERVE_CREDITS = 12;
47
+ /** Held back for the onboarding turn's own calls after its researchers return. */
48
+ export declare const ONBOARDING_RESEARCH_PARENT_RESERVE_CREDITS = 6;
49
+ /**
50
+ * Whether the researchers wrap up now so the funded turn's inference stays
51
+ * inside ONBOARDING_RESEARCH_INFERENCE_MAX_CREDITS: what the turn has captured,
52
+ * plus a wrap-up for every researcher still working and the parent's answer,
53
+ * reaches the allowance. Researchers keep reading until then.
54
+ */
55
+ export declare function onboardingResearchInferenceSpent(input: {
56
+ capturedCredits: number;
57
+ activeResearchers: number;
58
+ }): boolean;
39
59
  /**
40
60
  * Eight areas at once (offer, ICP, plays, signals, competitors, company
41
61
  * LinkedIn, people, the signing-up person), each with room to search, read its
@@ -62,7 +82,11 @@ export declare const ONBOARDING_RESEARCH_SUBAGENT_LIMITS: {
62
82
  */
63
83
  export declare const ONBOARDING_RESEARCH_TOOL_IDS: readonly ["serper.search", "exa.search", "exa.contents", "exa.find_similar", "firecrawl.map", "firecrawl.scrape", "web.page_fetch", "scraper.linkedin_company", "scraper.linkedin_profile", "scraper.linkedin_profile_search", "scraper.linkedin_job_search", "blitzapi.employee_search", "blitzapi.person_profile_enrich", "blitzapi.company_profile_enrich", "predictleads.company_news_events", "predictleads.company_job_openings", "predictleads.company_similar_companies"];
64
84
  export declare function onboardingResearchToolAllowed(toolId: unknown): boolean;
65
- /** The hub pages the onboarding Oxygent itself writes; research links to them and never creates them. */
85
+ /**
86
+ * The hub pages the server writes before the research; each researcher links its
87
+ * pages to its area's hub and then rewrites that hub as the area's overview, over
88
+ * the revision it read. Research never creates them.
89
+ */
66
90
  export declare const ONBOARDING_RESEARCH_HUB_SLUGS: readonly ["company", "offers", "icp", "plays", "signals", "competitors", "team"];
67
91
  /** Knowledge page types a research sub-agent may not write: canonical voice and positioning stay proposal-gated. */
68
92
  export declare const ONBOARDING_RESEARCH_DENIED_PAGE_TYPES: readonly ["voice", "brand", "positioning", "message_playbook", "playbook"];
@@ -33,6 +33,28 @@ export const ONBOARDING_RESEARCH_RUN_MAX_CREDITS = 500;
33
33
  export const ONBOARDING_RESEARCH_MAX_CREDITS_PER_CALL = 15;
34
34
  /** The onboarding turn's own and its sub-agents' inference, credited back once the turn settles. */
35
35
  export const ONBOARDING_RESEARCH_INFERENCE_MAX_CREDITS = 150;
36
+ /**
37
+ * Inference held back for each researcher still working once the allowance
38
+ * closes in: its wrap-up, which writes its pages, and its tool-less conclusion.
39
+ * On the first deeper dev run (2026-10-28) a page-writing call took 6 to 13
40
+ * credits and the whole turn 187, so without this the signup's own credits paid
41
+ * the 37 past the allowance.
42
+ */
43
+ export const ONBOARDING_RESEARCH_WRAP_UP_RESERVE_CREDITS = 12;
44
+ /** Held back for the onboarding turn's own calls after its researchers return. */
45
+ export const ONBOARDING_RESEARCH_PARENT_RESERVE_CREDITS = 6;
46
+ /**
47
+ * Whether the researchers wrap up now so the funded turn's inference stays
48
+ * inside ONBOARDING_RESEARCH_INFERENCE_MAX_CREDITS: what the turn has captured,
49
+ * plus a wrap-up for every researcher still working and the parent's answer,
50
+ * reaches the allowance. Researchers keep reading until then.
51
+ */
52
+ export function onboardingResearchInferenceSpent(input) {
53
+ const captured = Number.isFinite(input.capturedCredits) ? Math.max(0, input.capturedCredits) : Number.POSITIVE_INFINITY;
54
+ const active = Number.isFinite(input.activeResearchers) ? Math.max(0, Math.floor(input.activeResearchers)) : 0;
55
+ return captured + active * ONBOARDING_RESEARCH_WRAP_UP_RESERVE_CREDITS + ONBOARDING_RESEARCH_PARENT_RESERVE_CREDITS
56
+ >= ONBOARDING_RESEARCH_INFERENCE_MAX_CREDITS;
57
+ }
36
58
  /**
37
59
  * Eight areas at once (offer, ICP, plays, signals, competitors, company
38
60
  * LinkedIn, people, the signing-up person), each with room to search, read its
@@ -79,7 +101,11 @@ export const ONBOARDING_RESEARCH_TOOL_IDS = [
79
101
  export function onboardingResearchToolAllowed(toolId) {
80
102
  return typeof toolId === "string" && ONBOARDING_RESEARCH_TOOL_IDS.includes(toolId);
81
103
  }
82
- /** The hub pages the onboarding Oxygent itself writes; research links to them and never creates them. */
104
+ /**
105
+ * The hub pages the server writes before the research; each researcher links its
106
+ * pages to its area's hub and then rewrites that hub as the area's overview, over
107
+ * the revision it read. Research never creates them.
108
+ */
83
109
  export const ONBOARDING_RESEARCH_HUB_SLUGS = ["company", "offers", "icp", "plays", "signals", "competitors", "team"];
84
110
  /** Knowledge page types a research sub-agent may not write: canonical voice and positioning stay proposal-gated. */
85
111
  export const ONBOARDING_RESEARCH_DENIED_PAGE_TYPES = ["voice", "brand", "positioning", "message_playbook", "playbook"];
@@ -35,7 +35,7 @@ export const COPILOT_CREDIT_MARKUP_MULTIPLIER = 5;
35
35
  // The connected-account reservations (LinkedIn, WhatsApp, X, phone number) carry
36
36
  // the 2026-09 repricing's NEW price. Until its effective-date switch the price in
37
37
  // force is lower; a surface that shows or charges one resolves it with
38
- // repricedChargeCredits (@oxygen/shared/repricing), never from this literal alone.
38
+ // repricedChargeCredits (@oxygen/shared/billing/repricing), never from this literal alone.
39
39
  export const LINKEDIN_ACCOUNT_CREDITS_PER_MONTH = 3_400;
40
40
  export const WHATSAPP_ACCOUNT_CREDITS_PER_MONTH = 3_400;
41
41
  export const X_ACCOUNT_CREDITS_PER_MONTH = 1_000;
@@ -1,4 +1,4 @@
1
- import { OxygenError } from "./cli-result.js";
1
+ import { OxygenError } from "../cli-result.js";
2
2
  export function readPublishingApprovalPolicy(metadata) {
3
3
  const value = metadata.publishing_approval;
4
4
  if (!value || typeof value !== "object" || Array.isArray(value))
@@ -1,4 +1,4 @@
1
- import { SKILL_PLAY_TRIGGERS_GENERATED } from "./skill-plays.generated.js";
1
+ import { SKILL_PLAY_TRIGGERS_GENERATED } from "../skill-plays.generated.js";
2
2
  export const SKILL_PLAY_TRIGGERS = SKILL_PLAY_TRIGGERS_GENERATED;
3
3
  const STOPWORDS = new Set([
4
4
  "a", "about", "across", "all", "an", "and", "any", "are", "as", "at", "be", "before", "by", "can", "d", "do", "does",
@@ -1,5 +1,5 @@
1
- import { OxygenError } from "./cli-result.js";
2
- import { parseKnowledgeVaultMarkdown } from "./knowledge-vault-markdown.js";
1
+ import { OxygenError } from "../cli-result.js";
2
+ import { parseKnowledgeVaultMarkdown } from "../knowledge/vault-markdown.js";
3
3
  export const WORKSPACE_SKILL_MAX_FILES = 50;
4
4
  export const WORKSPACE_SKILL_MAX_FILE_BYTES = 120_000;
5
5
  export const WORKSPACE_SKILL_MAX_BYTES = 1_000_000;
@@ -4,6 +4,7 @@ export declare function extractUrls(value: string): string[];
4
4
  export declare function extractDomains(value: string): string[];
5
5
  export declare function parseMoney(amount: string, unit?: string): number;
6
6
  export declare function regionDisplayName(code: string): string | null;
7
+ export declare function isCanonicalRegionCode(code: string): boolean;
7
8
  export declare const COUNTRY_NAME_TO_ISO: Map<string, string>;
8
9
  export declare const COUNTRY_ALIAS_TO_ISO: Record<string, string>;
9
10
  export declare const CITY_TO_ISO: Record<string, string>;
@@ -1,7 +1,7 @@
1
1
  // Shared search-planner vocabulary + stateless text helpers.
2
2
  //
3
3
  // Single source of truth for the constraint vocabulary and pure text helpers
4
- // consumed by the web search planners (apps/web/src/lib/company-search-plan.ts,
4
+ // consumed by the web search planners (apps/web/src/lib/tables/company-search-plan.ts,
5
5
  // people-search-plan.ts). Any other search classifier or compiler layers its
6
6
  // tuning deltas on top of these bases rather than re-listing vocabulary, so the
7
7
  // surfaces cannot silently drift (OXY-414).
@@ -46,6 +46,19 @@ export function regionDisplayName(code) {
46
46
  return null;
47
47
  }
48
48
  }
49
+ // Intl also names withdrawn codes after their successor (FX "France", UK "United Kingdom",
50
+ // SU "Russia", DD "Germany"); providers refuse them. Only a code that is its own canonical
51
+ // region subtag is an assigned country code.
52
+ export function isCanonicalRegionCode(code) {
53
+ if (!/^[A-Z]{2}$/.test(code))
54
+ return false;
55
+ try {
56
+ return Intl.getCanonicalLocales(`und-${code}`)[0] === `und-${code}`;
57
+ }
58
+ catch {
59
+ return false;
60
+ }
61
+ }
49
62
  // Lowercased country display name -> ISO code, generated from Intl region data at module load.
50
63
  export const COUNTRY_NAME_TO_ISO = (() => {
51
64
  const map = new Map();
@@ -53,7 +66,7 @@ export const COUNTRY_NAME_TO_ISO = (() => {
53
66
  for (let second = 65; second <= 90; second += 1) {
54
67
  const code = String.fromCharCode(first) + String.fromCharCode(second);
55
68
  const name = regionDisplayName(code);
56
- if (name)
69
+ if (name && isCanonicalRegionCode(code))
57
70
  map.set(name.toLowerCase(), code);
58
71
  }
59
72
  }
@@ -2,7 +2,7 @@
2
2
  * How a LinkedIn/WhatsApp quota denial is read by the background jobs that hit it.
3
3
  *
4
4
  * The denial itself is raised by the chokepoint in
5
- * packages/integrations/src/linkedin-quota.ts; this module is the consumer half,
5
+ * packages/integrations/src/sequences/linkedin-quota.ts; this module is the consumer half,
6
6
  * and it lives here because the consumers are spread across the worker, the web
7
7
  * app, and the integrations package — three copies of "is this a denial, and
8
8
  * until when" is exactly how the inbox sync and the publishing metrics sync ended
@@ -2,7 +2,7 @@
2
2
  * How a LinkedIn/WhatsApp quota denial is read by the background jobs that hit it.
3
3
  *
4
4
  * The denial itself is raised by the chokepoint in
5
- * packages/integrations/src/linkedin-quota.ts; this module is the consumer half,
5
+ * packages/integrations/src/sequences/linkedin-quota.ts; this module is the consumer half,
6
6
  * and it lives here because the consumers are spread across the worker, the web
7
7
  * app, and the integrations package — three copies of "is this a denial, and
8
8
  * until when" is exactly how the inbox sync and the publishing metrics sync ended
@@ -1,4 +1,4 @@
1
- import type { RepricingOptions } from "../repricing.js";
1
+ import type { RepricingOptions } from "../billing/repricing.js";
2
2
  /**
3
3
  * The daily cap a new mailbox gets when nobody names one. New mailboxes were
4
4
  * created at 18 a day before the repricing, so this is an increase and is live.