@oxygen-agent/cli 1.1014.1895 → 1.1014.1997

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 (239) hide show
  1. package/README.md +1 -1
  2. package/dist/auto-update.d.ts +1 -1
  3. package/dist/auto-update.js +3 -3
  4. package/dist/cli-install.d.ts +65 -0
  5. package/dist/cli-install.js +165 -0
  6. package/dist/commands/billing.js +1 -1
  7. package/dist/commands/managed-inboxes.js +6 -2
  8. package/dist/commands/sequences.js +1 -1
  9. package/dist/commands/subscriptions.js +7 -5
  10. package/dist/update.d.ts +4 -57
  11. package/dist/update.js +17 -163
  12. package/node_modules/@oxygen/shared/dist/billing.d.ts +5 -1
  13. package/node_modules/@oxygen/shared/dist/billing.js +5 -1
  14. package/node_modules/@oxygen/shared/dist/capability-discovery-skill-audiences.generated.d.ts +30 -0
  15. package/node_modules/@oxygen/shared/dist/capability-discovery-skill-audiences.generated.js +33 -0
  16. package/node_modules/@oxygen/shared/dist/capability-discovery-skills.d.ts +39 -0
  17. package/node_modules/@oxygen/shared/dist/capability-discovery-skills.js +86 -0
  18. package/node_modules/@oxygen/shared/dist/capability-discovery-types.d.ts +93 -0
  19. package/node_modules/@oxygen/shared/dist/capability-discovery-types.js +1 -0
  20. package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +12 -270
  21. package/node_modules/@oxygen/shared/dist/capability-discovery.js +123 -3712
  22. package/node_modules/@oxygen/shared/dist/capability-intents/agency-directory.rules.d.ts +2 -0
  23. package/node_modules/@oxygen/shared/dist/capability-intents/agency-directory.rules.js +5 -0
  24. package/node_modules/@oxygen/shared/dist/capability-intents/agents.d.ts +10 -0
  25. package/node_modules/@oxygen/shared/dist/capability-intents/agents.js +53 -0
  26. package/node_modules/@oxygen/shared/dist/capability-intents/agents.rules.d.ts +2 -0
  27. package/node_modules/@oxygen/shared/dist/capability-intents/agents.rules.js +25 -0
  28. package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.d.ts +31 -0
  29. package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.js +70 -0
  30. package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.rules.d.ts +2 -0
  31. package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.rules.js +85 -0
  32. package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.d.ts +9 -0
  33. package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.js +54 -0
  34. package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.rules.d.ts +2 -0
  35. package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.rules.js +28 -0
  36. package/node_modules/@oxygen/shared/dist/capability-intents/connected-integrations.rules.d.ts +2 -0
  37. package/node_modules/@oxygen/shared/dist/capability-intents/connected-integrations.rules.js +23 -0
  38. package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.d.ts +43 -0
  39. package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.js +90 -0
  40. package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.rules.d.ts +2 -0
  41. package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.rules.js +58 -0
  42. package/node_modules/@oxygen/shared/dist/capability-intents/connected-whatsapp.rules.d.ts +2 -0
  43. package/node_modules/@oxygen/shared/dist/capability-intents/connected-whatsapp.rules.js +14 -0
  44. package/node_modules/@oxygen/shared/dist/capability-intents/geo.rules.d.ts +2 -0
  45. package/node_modules/@oxygen/shared/dist/capability-intents/geo.rules.js +9 -0
  46. package/node_modules/@oxygen/shared/dist/capability-intents/index.generated.d.ts +365 -0
  47. package/node_modules/@oxygen/shared/dist/capability-intents/index.generated.js +90 -0
  48. package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.d.ts +20 -0
  49. package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.js +37 -0
  50. package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.rules.d.ts +2 -0
  51. package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.rules.js +43 -0
  52. package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.d.ts +4 -0
  53. package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.js +26 -0
  54. package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.rules.d.ts +2 -0
  55. package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.rules.js +42 -0
  56. package/node_modules/@oxygen/shared/dist/capability-intents/messages.d.ts +6 -0
  57. package/node_modules/@oxygen/shared/dist/capability-intents/messages.js +16 -0
  58. package/node_modules/@oxygen/shared/dist/capability-intents/messages.rules.d.ts +2 -0
  59. package/node_modules/@oxygen/shared/dist/capability-intents/messages.rules.js +68 -0
  60. package/node_modules/@oxygen/shared/dist/capability-intents/normalize.d.ts +2 -0
  61. package/node_modules/@oxygen/shared/dist/capability-intents/normalize.js +4 -0
  62. package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.d.ts +6 -0
  63. package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.js +23 -0
  64. package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.rules.d.ts +2 -0
  65. package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.rules.js +25 -0
  66. package/node_modules/@oxygen/shared/dist/capability-intents/posts.d.ts +1 -0
  67. package/node_modules/@oxygen/shared/dist/capability-intents/posts.js +12 -0
  68. package/node_modules/@oxygen/shared/dist/capability-intents/posts.rules.d.ts +2 -0
  69. package/node_modules/@oxygen/shared/dist/capability-intents/posts.rules.js +20 -0
  70. package/node_modules/@oxygen/shared/dist/capability-intents/publishing.d.ts +86 -0
  71. package/node_modules/@oxygen/shared/dist/capability-intents/publishing.js +135 -0
  72. package/node_modules/@oxygen/shared/dist/capability-intents/publishing.rules.d.ts +2 -0
  73. package/node_modules/@oxygen/shared/dist/capability-intents/publishing.rules.js +89 -0
  74. package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.d.ts +7 -0
  75. package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.js +85 -0
  76. package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.rules.d.ts +2 -0
  77. package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.rules.js +28 -0
  78. package/node_modules/@oxygen/shared/dist/capability-intents/recipes.d.ts +7 -0
  79. package/node_modules/@oxygen/shared/dist/capability-intents/recipes.js +73 -0
  80. package/node_modules/@oxygen/shared/dist/capability-intents/recipes.rules.d.ts +2 -0
  81. package/node_modules/@oxygen/shared/dist/capability-intents/recipes.rules.js +36 -0
  82. package/node_modules/@oxygen/shared/dist/capability-intents/records.d.ts +86 -0
  83. package/node_modules/@oxygen/shared/dist/capability-intents/records.js +240 -0
  84. package/node_modules/@oxygen/shared/dist/capability-intents/records.rules.d.ts +2 -0
  85. package/node_modules/@oxygen/shared/dist/capability-intents/records.rules.js +71 -0
  86. package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.d.ts +27 -0
  87. package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.js +67 -0
  88. package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.rules.d.ts +2 -0
  89. package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.rules.js +115 -0
  90. package/node_modules/@oxygen/shared/dist/capability-intents/sequences.d.ts +71 -0
  91. package/node_modules/@oxygen/shared/dist/capability-intents/sequences.js +150 -0
  92. package/node_modules/@oxygen/shared/dist/capability-intents/sequences.rules.d.ts +2 -0
  93. package/node_modules/@oxygen/shared/dist/capability-intents/sequences.rules.js +149 -0
  94. package/node_modules/@oxygen/shared/dist/capability-intents/signals.d.ts +42 -0
  95. package/node_modules/@oxygen/shared/dist/capability-intents/signals.js +42 -0
  96. package/node_modules/@oxygen/shared/dist/capability-intents/signals.rules.d.ts +2 -0
  97. package/node_modules/@oxygen/shared/dist/capability-intents/signals.rules.js +47 -0
  98. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.d.ts +60 -0
  99. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.js +94 -0
  100. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.rules.d.ts +2 -0
  101. package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.rules.js +94 -0
  102. package/node_modules/@oxygen/shared/dist/capability-intents/tables.d.ts +196 -0
  103. package/node_modules/@oxygen/shared/dist/capability-intents/tables.js +394 -0
  104. package/node_modules/@oxygen/shared/dist/capability-intents/tables.rules.d.ts +2 -0
  105. package/node_modules/@oxygen/shared/dist/capability-intents/tables.rules.js +384 -0
  106. package/node_modules/@oxygen/shared/dist/capability-intents/tags.rules.d.ts +2 -0
  107. package/node_modules/@oxygen/shared/dist/capability-intents/tags.rules.js +5 -0
  108. package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.d.ts +2 -0
  109. package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.js +8 -0
  110. package/node_modules/@oxygen/shared/dist/capability-intents/workflows.d.ts +2 -0
  111. package/node_modules/@oxygen/shared/dist/capability-intents/workflows.js +20 -0
  112. package/node_modules/@oxygen/shared/dist/capability-intents/workflows.rules.d.ts +2 -0
  113. package/node_modules/@oxygen/shared/dist/capability-intents/workflows.rules.js +90 -0
  114. package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.d.ts +59 -0
  115. package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.js +121 -0
  116. package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.rules.d.ts +2 -0
  117. package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.rules.js +58 -0
  118. package/node_modules/@oxygen/shared/dist/capability-routes/ads.d.ts +2 -0
  119. package/node_modules/@oxygen/shared/dist/capability-routes/ads.js +17 -0
  120. package/node_modules/@oxygen/shared/dist/capability-routes/agency-directory.d.ts +2 -0
  121. package/node_modules/@oxygen/shared/dist/capability-routes/agency-directory.js +17 -0
  122. package/node_modules/@oxygen/shared/dist/capability-routes/agents.d.ts +2 -0
  123. package/node_modules/@oxygen/shared/dist/capability-routes/agents.js +17 -0
  124. package/node_modules/@oxygen/shared/dist/capability-routes/billing-and-budgets.d.ts +2 -0
  125. package/node_modules/@oxygen/shared/dist/capability-routes/billing-and-budgets.js +17 -0
  126. package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.d.ts +2 -0
  127. package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.js +39 -0
  128. package/node_modules/@oxygen/shared/dist/capability-routes/connected-integrations.d.ts +2 -0
  129. package/node_modules/@oxygen/shared/dist/capability-routes/connected-integrations.js +17 -0
  130. package/node_modules/@oxygen/shared/dist/capability-routes/connected-linkedin.d.ts +2 -0
  131. package/node_modules/@oxygen/shared/dist/capability-routes/connected-linkedin.js +17 -0
  132. package/node_modules/@oxygen/shared/dist/capability-routes/connected-whatsapp.d.ts +2 -0
  133. package/node_modules/@oxygen/shared/dist/capability-routes/connected-whatsapp.js +17 -0
  134. package/node_modules/@oxygen/shared/dist/capability-routes/dashboards.d.ts +2 -0
  135. package/node_modules/@oxygen/shared/dist/capability-routes/dashboards.js +28 -0
  136. package/node_modules/@oxygen/shared/dist/capability-routes/discovery-and-skills.d.ts +2 -0
  137. package/node_modules/@oxygen/shared/dist/capability-routes/discovery-and-skills.js +22 -0
  138. package/node_modules/@oxygen/shared/dist/capability-routes/geo.d.ts +2 -0
  139. package/node_modules/@oxygen/shared/dist/capability-routes/geo.js +13 -0
  140. package/node_modules/@oxygen/shared/dist/capability-routes/index.d.ts +2 -0
  141. package/node_modules/@oxygen/shared/dist/capability-routes/index.js +64 -0
  142. package/node_modules/@oxygen/shared/dist/capability-routes/knowledge-graph.d.ts +2 -0
  143. package/node_modules/@oxygen/shared/dist/capability-routes/knowledge-graph.js +17 -0
  144. package/node_modules/@oxygen/shared/dist/capability-routes/linkedin-public-research.d.ts +2 -0
  145. package/node_modules/@oxygen/shared/dist/capability-routes/linkedin-public-research.js +18 -0
  146. package/node_modules/@oxygen/shared/dist/capability-routes/messages.d.ts +2 -0
  147. package/node_modules/@oxygen/shared/dist/capability-routes/messages.js +21 -0
  148. package/node_modules/@oxygen/shared/dist/capability-routes/observability.d.ts +2 -0
  149. package/node_modules/@oxygen/shared/dist/capability-routes/observability.js +17 -0
  150. package/node_modules/@oxygen/shared/dist/capability-routes/onboarding-and-copilot.d.ts +2 -0
  151. package/node_modules/@oxygen/shared/dist/capability-routes/onboarding-and-copilot.js +23 -0
  152. package/node_modules/@oxygen/shared/dist/capability-routes/platform-operations.d.ts +2 -0
  153. package/node_modules/@oxygen/shared/dist/capability-routes/platform-operations.js +17 -0
  154. package/node_modules/@oxygen/shared/dist/capability-routes/posts.d.ts +2 -0
  155. package/node_modules/@oxygen/shared/dist/capability-routes/posts.js +17 -0
  156. package/node_modules/@oxygen/shared/dist/capability-routes/publishing.d.ts +2 -0
  157. package/node_modules/@oxygen/shared/dist/capability-routes/publishing.js +20 -0
  158. package/node_modules/@oxygen/shared/dist/capability-routes/recipes.d.ts +2 -0
  159. package/node_modules/@oxygen/shared/dist/capability-routes/recipes.js +17 -0
  160. package/node_modules/@oxygen/shared/dist/capability-routes/records.d.ts +2 -0
  161. package/node_modules/@oxygen/shared/dist/capability-routes/records.js +20 -0
  162. package/node_modules/@oxygen/shared/dist/capability-routes/sending-infrastructure.d.ts +2 -0
  163. package/node_modules/@oxygen/shared/dist/capability-routes/sending-infrastructure.js +42 -0
  164. package/node_modules/@oxygen/shared/dist/capability-routes/sequences.d.ts +2 -0
  165. package/node_modules/@oxygen/shared/dist/capability-routes/sequences.js +32 -0
  166. package/node_modules/@oxygen/shared/dist/capability-routes/signals.d.ts +2 -0
  167. package/node_modules/@oxygen/shared/dist/capability-routes/signals.js +17 -0
  168. package/node_modules/@oxygen/shared/dist/capability-routes/sourcing-and-provider-tools.d.ts +2 -0
  169. package/node_modules/@oxygen/shared/dist/capability-routes/sourcing-and-provider-tools.js +21 -0
  170. package/node_modules/@oxygen/shared/dist/capability-routes/support-and-feedback.d.ts +2 -0
  171. package/node_modules/@oxygen/shared/dist/capability-routes/support-and-feedback.js +17 -0
  172. package/node_modules/@oxygen/shared/dist/capability-routes/tables.d.ts +2 -0
  173. package/node_modules/@oxygen/shared/dist/capability-routes/tables.js +34 -0
  174. package/node_modules/@oxygen/shared/dist/capability-routes/tags.d.ts +2 -0
  175. package/node_modules/@oxygen/shared/dist/capability-routes/tags.js +17 -0
  176. package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.d.ts +2 -0
  177. package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.js +17 -0
  178. package/node_modules/@oxygen/shared/dist/capability-routes/workflows.d.ts +2 -0
  179. package/node_modules/@oxygen/shared/dist/capability-routes/workflows.js +17 -0
  180. package/node_modules/@oxygen/shared/dist/capability-routes/workspace-access.d.ts +2 -0
  181. package/node_modules/@oxygen/shared/dist/capability-routes/workspace-access.js +26 -0
  182. package/node_modules/@oxygen/shared/dist/contracts/connectors.js +2 -0
  183. package/node_modules/@oxygen/shared/dist/contracts/customer-operations.d.ts +1 -1
  184. package/node_modules/@oxygen/shared/dist/contracts/operations/agent-sessions.d.ts +1 -0
  185. package/node_modules/@oxygen/shared/dist/contracts/operations/agent-sessions.js +1 -0
  186. package/node_modules/@oxygen/shared/dist/contracts/operations/browser.d.ts +1 -0
  187. package/node_modules/@oxygen/shared/dist/contracts/operations/browser.js +1 -0
  188. package/node_modules/@oxygen/shared/dist/contracts/operations/clay-migration.d.ts +2 -0
  189. package/node_modules/@oxygen/shared/dist/contracts/operations/clay-migration.js +2 -0
  190. package/node_modules/@oxygen/shared/dist/contracts/operations/connectors.d.ts +2 -0
  191. package/node_modules/@oxygen/shared/dist/contracts/operations/connectors.js +2 -0
  192. package/node_modules/@oxygen/shared/dist/contracts/operations/geo.d.ts +1 -0
  193. package/node_modules/@oxygen/shared/dist/contracts/operations/geo.js +1 -0
  194. package/node_modules/@oxygen/shared/dist/contracts/operations/guided-activation.d.ts +1 -0
  195. package/node_modules/@oxygen/shared/dist/contracts/operations/guided-activation.js +1 -0
  196. package/node_modules/@oxygen/shared/dist/contracts/operations/index.generated.d.ts +2 -0
  197. package/node_modules/@oxygen/shared/dist/contracts/operations/index.generated.js +26 -0
  198. package/node_modules/@oxygen/shared/dist/contracts/operations/reply-oxygent.d.ts +1 -0
  199. package/node_modules/@oxygen/shared/dist/contracts/operations/reply-oxygent.js +1 -0
  200. package/node_modules/@oxygen/shared/dist/contracts/operations/sender-limits.d.ts +2 -0
  201. package/node_modules/@oxygen/shared/dist/contracts/operations/sender-limits.js +2 -0
  202. package/node_modules/@oxygen/shared/dist/contracts/operations/table-feed-update.d.ts +2 -0
  203. package/node_modules/@oxygen/shared/dist/contracts/operations/table-feed-update.js +2 -0
  204. package/node_modules/@oxygen/shared/dist/contracts/operations/teammates.d.ts +1 -0
  205. package/node_modules/@oxygen/shared/dist/contracts/operations/teammates.js +1 -0
  206. package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-pages.d.ts +2 -0
  207. package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-pages.js +2 -0
  208. package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-skills.d.ts +1 -0
  209. package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-skills.js +1 -0
  210. package/node_modules/@oxygen/shared/dist/contracts/operations.d.ts +6 -0
  211. package/node_modules/@oxygen/shared/dist/contracts/operations.js +7 -15
  212. package/node_modules/@oxygen/shared/dist/contracts/sender-limits.js +1 -0
  213. package/node_modules/@oxygen/shared/dist/diagnostic-storage-lock.js +33 -22
  214. package/node_modules/@oxygen/shared/dist/diagnostics.js +11 -8
  215. package/node_modules/@oxygen/shared/dist/first-month-offer-window.d.ts +3 -0
  216. package/node_modules/@oxygen/shared/dist/first-month-offer.d.ts +15 -7
  217. package/node_modules/@oxygen/shared/dist/first-month-offer.js +23 -9
  218. package/node_modules/@oxygen/shared/dist/guided-activation.d.ts +2 -0
  219. package/node_modules/@oxygen/shared/dist/listed-website-platforms.d.ts +1 -1
  220. package/node_modules/@oxygen/shared/dist/listed-website-platforms.js +23 -1
  221. package/node_modules/@oxygen/shared/dist/onboarding-leads.d.ts +67 -0
  222. package/node_modules/@oxygen/shared/dist/onboarding-leads.js +78 -0
  223. package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +20 -0
  224. package/node_modules/@oxygen/shared/dist/plan-capabilities.js +1 -1
  225. package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +2 -2
  226. package/node_modules/@oxygen/shared/dist/plan-limits.js +6 -7
  227. package/node_modules/@oxygen/shared/dist/sending-domain-faults.d.ts +1 -1
  228. package/node_modules/@oxygen/shared/dist/sending-domain-faults.js +1 -1
  229. package/node_modules/@oxygen/shared/dist/tenant-migration-names.d.ts +5 -0
  230. package/node_modules/@oxygen/shared/dist/tenant-migration-names.js +8 -0
  231. package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
  232. package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
  233. package/node_modules/@oxygen/workflows/dist/graph/lint.d.ts +1 -1
  234. package/node_modules/@oxygen/workflows/dist/graph/lint.js +4 -3
  235. package/node_modules/@oxygen/workflows/dist/index.d.ts +2 -59
  236. package/node_modules/@oxygen/workflows/dist/index.js +4 -904
  237. package/node_modules/@oxygen/workflows/dist/manifest-validation.d.ts +75 -0
  238. package/node_modules/@oxygen/workflows/dist/manifest-validation.js +903 -0
  239. package/package.json +1 -1
@@ -0,0 +1,26 @@
1
+ import { isNetNewLinkedInInitiation } from "./sequences.js";
2
+ export function isPublicLinkedInRead(query) {
3
+ if (!query.includes("linkedin"))
4
+ return false;
5
+ const disclaimsConnectedAccount = /\b(without|no|not using|does not require)\b.{0,24}\bconnected(?: linkedin)? account\b/.test(query);
6
+ const connectedOwnership = !disclaimsConnectedAccount
7
+ && /\b(my|our|own|owned|connected|connections|followers|inbox|messages|recruiter|sales\s*navigator|salesnav|unipile|viewers?)\b/.test(query);
8
+ if (connectedOwnership)
9
+ return false;
10
+ return /\b(comments?|companies|company|competitor|cookieless|engagers?|harvest|posts?|profiles?|public|reactions?|reactors?|scrape|scraper|search|third[ -]party)\b/.test(query);
11
+ }
12
+ export function isPublicLinkedInEngagerHarvest(query) {
13
+ return /\bpost\b/.test(query)
14
+ && /\b(engagers?|engaged|react(?:ors?|ing|ed|ions?)|commenters?|harvest)\b/.test(query);
15
+ }
16
+ export function isDeferredLinkedInOutreach(query) {
17
+ if (!isNetNewLinkedInInitiation(query))
18
+ return false;
19
+ return /\b(later|eventually|after (?:they|we|i)? ?(?:are )?qualif(?:y|ied)|once (?:they|we|i)? ?(?:are )?qualif(?:y|ied)|prepare|ready)\b/.test(query)
20
+ || /\bwithout\b.{0,30}\b(?:running|sending|contacting|messaging)\b.{0,20}\b(?:now|today)\b/.test(query)
21
+ || /\b(?:do not|don t|not)\b.{0,20}\b(?:run|send|contact|message)\b.{0,20}\b(?:now|today)\b/.test(query);
22
+ }
23
+ export function isLinkedInEngagerMotion(query) {
24
+ return isPublicLinkedInEngagerHarvest(query)
25
+ && /\b(competitor|daily|repeatable|monitor|motion|qualif(?:y|ied)|workflow|later|eventually)\b/.test(query);
26
+ }
@@ -0,0 +1,2 @@
1
+ import type { CapabilityIntentRules } from "../capability-discovery-types.js";
2
+ export declare const rules: CapabilityIntentRules;
@@ -0,0 +1,42 @@
1
+ import { isDeferredLinkedInOutreach, isLinkedInEngagerMotion, isPublicLinkedInEngagerHarvest, isPublicLinkedInRead } from "./linkedin-public-research.js";
2
+ export const rules = {
3
+ explicit: [
4
+ // A deferred acquisition motion starts with the public-data owner. This keeps
5
+ // "find/qualify now, contact later" from skipping straight to the final write
6
+ // step; the recommendation still hands the eventual initiation to Sequences.
7
+ { order: 670, route: (query) => isPublicLinkedInRead(query) && isDeferredLinkedInOutreach(query) ? "linkedin-public-research" : null },
8
+ { order: 700, route: (query) => isPublicLinkedInRead(query) ? "linkedin-public-research" : null },
9
+ ],
10
+ recommendations: [
11
+ {
12
+ order: 620,
13
+ recommend: (card, query) => {
14
+ if (card.id !== "linkedin-public-research" || !isPublicLinkedInEngagerHarvest(query))
15
+ return null;
16
+ const motion = isLinkedInEngagerMotion(query);
17
+ return {
18
+ tools: [
19
+ ...(motion ? ["oxygen_recipes_list"] : []),
20
+ "oxygen_engagement_harvest",
21
+ "oxygen_engagement_harvest_status",
22
+ "oxygen_tools_search",
23
+ "oxygen_tools_get",
24
+ ...(isDeferredLinkedInOutreach(query)
25
+ ? ["oxygen_sequences_send", "oxygen_sequences_list"]
26
+ : []),
27
+ ],
28
+ commands: [
29
+ ...(motion ? ["recipes list"] : []),
30
+ "engagement harvest",
31
+ "engagement status",
32
+ "tools search",
33
+ "tools get",
34
+ ...(isDeferredLinkedInOutreach(query)
35
+ ? ["sequences send", "sequences list"]
36
+ : []),
37
+ ],
38
+ };
39
+ },
40
+ },
41
+ ],
42
+ };
@@ -0,0 +1,6 @@
1
+ /** Stored conversation drafts are Messages data, rather than worker queue health. */
2
+ export declare function storedReplyDraftReadRecommendation(query: string): {
3
+ tools: string[];
4
+ commands: string[];
5
+ execution: string;
6
+ } | null;
@@ -0,0 +1,16 @@
1
+ /** Stored conversation drafts are Messages data, rather than worker queue health. */
2
+ export function storedReplyDraftReadRecommendation(query) {
3
+ if (!/\bdrafts?\b/.test(query)
4
+ || !/\b(read|inspect|list|show|stored|retained|queue|history|historical)\b/.test(query)
5
+ || !/\b(conversations?|threads?|inbox|unibox|repl(?:y|ies)|whatsapp|email|linkedin)\b/.test(query)
6
+ || /\b(workers?|jobs?|workflows?|cron|repair|publishing|posts?|creators?|ugc|sequences?|campaigns?)\b/.test(query)
7
+ || /\b(approve|approving|send|sending|edit|editing|reject|rejecting|generate|generating|create|creating)\b/.test(query))
8
+ return null;
9
+ const whatsapp = /\bwhatsapp\b/.test(query);
10
+ const otherChannel = /\b(email|linkedin)\b/.test(query);
11
+ const tools = whatsapp && !otherChannel ? ["oxygen_whatsapp_drafts_list"]
12
+ : otherChannel && !whatsapp ? ["oxygen_inbox_drafts_list"]
13
+ : ["oxygen_inbox_drafts_list", "oxygen_whatsapp_drafts_list"];
14
+ const commands = tools.map(tool => tool === "oxygen_whatsapp_drafts_list" ? "whatsapp drafts list" : "inbox drafts list");
15
+ return { tools, commands, execution: "Hydrate the selected native draft-read schema. External MCP clients use oxygen_capabilities_read for an unlisted target; built-in agents invoke the native capability. oxygen_inbox_drafts_list covers email/LinkedIn; oxygen_whatsapp_drafts_list covers WhatsApp. When the channel is unknown, inspect both schemas before selecting. Filter by the native conversation and CSV status controls; personal composer drafts stay private. Historical states are current draft statuses, not a transition audit. Generation, edits, approval and sending are separate actions." };
16
+ }
@@ -0,0 +1,2 @@
1
+ import type { CapabilityIntentRules } from "../capability-discovery-types.js";
2
+ export declare const rules: CapabilityIntentRules;
@@ -0,0 +1,68 @@
1
+ import { storedReplyDraftReadRecommendation } from "./messages.js";
2
+ import { hasSequenceProgramIntent, isNetNewLinkedInInitiation } from "./sequences.js";
3
+ export const rules = {
4
+ explicit: [
5
+ { order: 200, route: (query) => storedReplyDraftReadRecommendation(query) ? "messages" : null },
6
+ { order: 340, route: (query) => /\b(unibox|inbox)\b/.test(query) && /\b(metadata|taxonomy|filters)\b/.test(query) ? "messages" : null },
7
+ { order: 760, route: (query) => /\b(message )?reviews?\b/.test(query) ? "messages" : null },
8
+ {
9
+ order: 830,
10
+ route: (query) => !isNetNewLinkedInInitiation(query)
11
+ && (/\b(one[ -]off|ad[ -]hoc|just once|reply once|single message|direct message|direct email|no cadence)\b/.test(query)
12
+ || (!hasSequenceProgramIntent(query)
13
+ && /\b(reply|respond|follow up)\b.{0,30}\b(conversation|thread|email|linkedin|whatsapp|dm)\b/.test(query))) ? "messages" : null,
14
+ },
15
+ // Existing reply handling is Messages even without a channel name. Keep this
16
+ // after the explicit cadence/enrollment rules so reply-stop programs retain
17
+ // Sequences. The onboarding baseline phrased this as "follow up on replies".
18
+ { order: 870, route: (query) => /\b(follow up|triage|answer|handle)\b.{0,40}\breplies\b/.test(query) ? "messages" : null },
19
+ { order: 880, route: (query) => /\b(reply|respond)\b.{0,30}\b(conversation|thread|email|linkedin|whatsapp|dm)\b/.test(query) ? "messages" : null },
20
+ ],
21
+ recommendations: [
22
+ { order: 180, recommend: (card, query) => card.primitive === "messages" ? storedReplyDraftReadRecommendation(query) : null },
23
+ {
24
+ order: 320,
25
+ recommend: (card, query) => card.id === "messages" && /\b(unibox|inbox)\b/.test(query) && /\b(metadata|taxonomy|filters|accounts|tags)\b/.test(query)
26
+ ? { tools: ["oxygen_unibox_metadata"], commands: ["unibox metadata"] } : null,
27
+ },
28
+ // A saved, shared or default inbox view is the views commands, never a send.
29
+ // "view my inbox" stays a read; the noun needs "views" or a save/default/share word.
30
+ {
31
+ order: 830,
32
+ recommend: (card, query) => card.primitive === "messages"
33
+ && ((/\bviews\b/.test(query) && /\b(inbox|unibox)\b/.test(query))
34
+ || (/\bview\b/.test(query) && /\b(saved?|default|shared|team)\b/.test(query))) ? {
35
+ tools: ["oxygen_inbox_views_list", "oxygen_inbox_view_create", "oxygen_inbox_view_update"],
36
+ commands: ["inbox views list", "inbox views create", "inbox views update"],
37
+ } : null,
38
+ },
39
+ {
40
+ order: 840,
41
+ recommend: (card, query) => card.primitive === "messages" && /\b(message )?reviews?\b/.test(query) ? {
42
+ tools: ["oxygen_reviews_list", "oxygen_reviews_next", "oxygen_reviews_decide"],
43
+ commands: ["reviews list", "reviews next", "reviews decide"],
44
+ } : null,
45
+ },
46
+ {
47
+ order: 850,
48
+ recommend: (card, query) => {
49
+ if (card.primitive !== "messages")
50
+ return null;
51
+ const existingThread = /\b(reply|respond|conversation|thread|inbox|existing)\b/.test(query);
52
+ return /\bemail\b/.test(query) && !existingThread ? {
53
+ tools: ["oxygen_email_send", "oxygen_inbox_send", "oxygen_messages_query"],
54
+ commands: ["email send", "inbox send", "messages query"],
55
+ } : null;
56
+ },
57
+ },
58
+ ],
59
+ cardViews: [
60
+ {
61
+ order: 180,
62
+ view: (card, query) => {
63
+ const replyDraftRead = card.primitive === "messages" ? storedReplyDraftReadRecommendation(query) : null;
64
+ return replyDraftRead ? { card: { ...card, posture: "read_only", execution: replyDraftRead.execution } } : null;
65
+ },
66
+ },
67
+ ],
68
+ };
@@ -0,0 +1,2 @@
1
+ /** Lowercase, `_`/`-` read as spaces, single spaces: the form intent rules read. */
2
+ export declare function normalizeIntent(query: string): string;
@@ -0,0 +1,4 @@
1
+ /** Lowercase, `_`/`-` read as spaces, single spaces: the form intent rules read. */
2
+ export function normalizeIntent(query) {
3
+ return query.toLowerCase().replace(/[_-]+/g, " ").replace(/\s+/g, " ").trim();
4
+ }
@@ -0,0 +1,6 @@
1
+ /** Native database work outranks generic workspace access and credit billing. */
2
+ export declare function databaseRecommendation(query: string): {
3
+ tools: string[];
4
+ commands: string[];
5
+ execution: string;
6
+ } | null;
@@ -0,0 +1,23 @@
1
+ /** Native database work outranks generic workspace access and credit billing. */
2
+ export function databaseRecommendation(query) {
3
+ if (!/\b(databases?|postgres(?:ql)?|db|sql)\b/.test(query)
4
+ || /\b(tables?|grid|external|import|workflows?|agents?|enrich\w*|providers?|integrations?|oauth|byok|mailbox\w*|crm|hubspot|salesforce|supabase)\b/.test(query))
5
+ return null;
6
+ const actions = [
7
+ ["oxygen_workspace_database_status", "db status"], ["oxygen_database_cost_policy", "db cost-policy"],
8
+ ["oxygen_database_query", "db query"], ["oxygen_database_attach", "db attach"],
9
+ ["oxygen_database_migrate", "db migrate"], ["oxygen_workspace_database_provision", "db provision"],
10
+ ["oxygen_database_cost_policy_reconcile", "db reconcile-cost-policy"],
11
+ ];
12
+ const first = /\b(migrat\w*|rotate credentials)\b/.test(query) ? 4
13
+ : /\b(attach|connect|connection)\b/.test(query) ? 3
14
+ : /\b(query|sql|select|explain)\b/.test(query) ? 2
15
+ : /\b(provision\w*)\b/.test(query) ? 5
16
+ : /\breconcile\b/.test(query) ? 6
17
+ : /\b(cost policy|cost controls?|sleep|suspend|reconcile)\b/.test(query) && !/\bstatus\b/.test(query) ? 1 : 0;
18
+ const ordered = [actions[first], ...actions.filter((_, index) => index !== first)];
19
+ return {
20
+ tools: ordered.map(([tool]) => tool), commands: ordered.map(([, command]) => command),
21
+ execution: "Inspect db status and db cost-policy for the active workspace. Hosting is included; Neon cost controls are retired, and reconcile-cost-policy is a compatibility no-op, not PostgreSQL sleep control. db query accepts one read-only SELECT/WITH/EXPLAIN statement: request a small max_rows (hard cap 1000). Writes are refused; truncated labels the returned row window, and it has no continuation cursor. Attach (database_url), migrate (optional rotate_credentials) and provision are immediate native writes with no preview or approved field. They preserve workspace identity/access; restricted clients can read status/cost/query but cannot configure. Built-in approval policy is separate from these HTTP fields.",
22
+ };
23
+ }
@@ -0,0 +1,2 @@
1
+ import type { CapabilityIntentRules } from "../capability-discovery-types.js";
2
+ export declare const rules: CapabilityIntentRules;
@@ -0,0 +1,25 @@
1
+ import { databaseRecommendation } from "./platform-operations.js";
2
+ export const rules = {
3
+ explicit: [
4
+ { order: 170, route: (query) => databaseRecommendation(query) ? "platform-operations" : null },
5
+ ],
6
+ recommendations: [
7
+ { order: 270, recommend: (card, query) => card.id === "platform-operations" ? databaseRecommendation(query) : null },
8
+ ],
9
+ cardViews: [
10
+ {
11
+ order: 400,
12
+ view: (card, query) => {
13
+ const database = card.id === "platform-operations" ? databaseRecommendation(query) : null;
14
+ return database ? {
15
+ card: {
16
+ ...card,
17
+ owns: "Active-workspace PostgreSQL hosting, attachment, migrations, read-only SQL and retired cost-policy status.",
18
+ notFor: "Provider credentials, enrichment, workspace billing, or staff-wide database operations.",
19
+ execution: database.execution,
20
+ },
21
+ } : null;
22
+ },
23
+ },
24
+ ],
25
+ };
@@ -0,0 +1 @@
1
+ export declare function isOwnedPostCommentIntent(query: string): boolean;
@@ -0,0 +1,12 @@
1
+ export function isOwnedPostCommentIntent(query) {
2
+ // Community is the stored public-comment queue, including its coverage and
3
+ // refresh state. Do not send this first-touch intent to paid public research.
4
+ if (/\bcommunity\b/.test(query) && /\b(comments?|sync|coverage|freshness|queue|unanswered|replies)\b/.test(query))
5
+ return true;
6
+ if (!/\bcomments?\b/.test(query) || !/\b(linkedin|posts?|publishing)\b/.test(query))
7
+ return false;
8
+ const owned = /\b(my|our|own|owned)\b|\boxygen[ -]published\b|\bpublished through oxygen\b/.test(query);
9
+ const operatorWork = /\b(needs?|needing|awaiting)\b.{0,20}\b(response|reply|answer)\b/.test(query)
10
+ || /\b(reply|respond|answer|triage|queue|unanswered|unreplied)\b/.test(query);
11
+ return owned || operatorWork;
12
+ }
@@ -0,0 +1,2 @@
1
+ import type { CapabilityIntentRules } from "../capability-discovery-types.js";
2
+ export declare const rules: CapabilityIntentRules;
@@ -0,0 +1,20 @@
1
+ import { isOwnedPostCommentIntent } from "./posts.js";
2
+ export const rules = {
3
+ explicit: [
4
+ { order: 620, route: (query) => isOwnedPostCommentIntent(query) ? "posts" : null },
5
+ ],
6
+ recommendations: [
7
+ {
8
+ order: 610,
9
+ recommend: (card, query) => card.primitive === "posts" && isOwnedPostCommentIntent(query) ? {
10
+ tools: ["oxygen_publishing_comments", "oxygen_publishing_analytics"],
11
+ commands: [
12
+ "publishing comments list",
13
+ "publishing comments get",
14
+ "publishing comments reply",
15
+ "publishing analytics summary",
16
+ ],
17
+ } : null,
18
+ },
19
+ ],
20
+ };
@@ -0,0 +1,86 @@
1
+ import type { CapabilityRouteCard } from "../capability-discovery-types.js";
2
+ /** This card's exact commands as MCP calls (see CAPABILITY_ROUTE_MCP_CALLS). */
3
+ export declare const mcpCalls: {
4
+ ugcProgramCreate: () => {
5
+ tool: string;
6
+ arguments: {
7
+ product_url: string;
8
+ };
9
+ };
10
+ publishingPostDraft: () => {
11
+ tool: string;
12
+ arguments: {
13
+ content_text: string;
14
+ publish_at: string;
15
+ status: string;
16
+ };
17
+ };
18
+ publishingFirstComment: () => {
19
+ tool: string;
20
+ arguments: {
21
+ content_text: string;
22
+ publish_at: string;
23
+ sender_account_id: string;
24
+ content: {
25
+ first_comment: string;
26
+ };
27
+ };
28
+ };
29
+ };
30
+ /**
31
+ * Running (or joining) a creator program is UGC, which lives on the Publishing
32
+ * card. Checked before the LinkedIn keyword-post rule: "a creator program where
33
+ * LinkedIn creators post about my product" is not a keyword search (2026-09-29
34
+ * baselines routed it to Signals, and "creator program" to post tools).
35
+ */
36
+ export declare function isUgcProgramIntent(query: string): boolean;
37
+ /** The creator's side of a program: find one, apply, or accept an invitation. */
38
+ export declare function isUgcCreatorSideIntent(query: string): boolean;
39
+ /** The lifecycle verb of an operator's program ask ("archive program", "delete my creator program"), or null. */
40
+ export declare function ugcProgramLifecycleVerb(query: string): string | null;
41
+ /** The `ugc programs` leaf and MCP tool per lifecycle verb; delete previews first and names archive when refused. */
42
+ export declare const UGC_PROGRAM_LIFECYCLE: Readonly<Record<string, readonly [command: string, tool: string]>>;
43
+ /**
44
+ * A creator's own writing voice: `ugc voice import` learns it from their LinkedIn
45
+ * history (the web's "Learn your writing voice") and `ugc voice save` keeps what
46
+ * they write themselves. Only an ask that names the creator context routes here:
47
+ * "learn my writing voice from my LinkedIn messages" is just as likely the
48
+ * workspace voice `knowledge synthesize --kind voice` learns from sent LinkedIn and
49
+ * WhatsApp messages, and brand voice stays with the Knowledge Graph.
50
+ */
51
+ export declare function isUgcVoiceIntent(query: string): boolean;
52
+ /**
53
+ * Who approves a creator's post. It is the creator, or the program organizer when
54
+ * the creator delegated approval; a brand can never require its own approval of
55
+ * creator posts (Philipp, 2026-09-29).
56
+ * The MCP acceptance run's "brand approval of creator post before publish" routed
57
+ * to the Knowledge Graph, so the rule it needed never reached it. Only an
58
+ * approval word next to a creator's post counts: "find LinkedIn creator posts
59
+ * about AI" stays a keyword post search.
60
+ */
61
+ export declare function isUgcPostApprovalIntent(query: string): boolean;
62
+ export declare function isUgcIntent(query: string): boolean;
63
+ /**
64
+ * UGC is Publishing's creator-program subpage (OXYGEN_PRODUCT.md § UGC programs): a
65
+ * creator-program ask keeps the publishing id, primitive, endpoint sections and
66
+ * gateways, but must not read Publishing's post-scheduler ownership back (UGC E2E pass, 2026-09-29).
67
+ */
68
+ export declare const UGC_ROUTE_VIEW: Pick<CapabilityRouteCard, "owns" | "notFor" | "execution" | "posture" | "skills">;
69
+ /** A post's first comment is set with the post; `publishing posts update` takes the same flag. */
70
+ export declare const POST_DRAFT_COMMAND = "oxygen publishing posts create --draft --publish-at <iso> --text \"<post>\" --json";
71
+ export declare const PUBLISHING_FIRST_COMMENT_COMMAND = "oxygen publishing posts create --publish-at <iso> --sender <sender_id> --text \"<post>\" --first-comment \"<comment, e.g. the link>\" --json";
72
+ /**
73
+ * The comment OXYGEN posts right after a post goes out ("put the link in the first
74
+ * comment") is part of the post, not a reply to one. The 2026-09-29 baselines found
75
+ * no flag, guessed `content.first_comment`, and searched in vain.
76
+ */
77
+ export declare function isFirstCommentIntent(query: string): boolean;
78
+ /** Writing or saving the workspace's own post, or asking to post it: a Publishing draft. */
79
+ export declare function isPostDraftIntent(query: string): boolean;
80
+ export declare const POST_DRAFT_EXECUTION = "Read the voice page first (oxygen_knowledge_page_get, slug voice) and use only numbers a page states. Save the post with oxygen_publishing_posts_create, status draft and no approved flag: it needs no sender, publishes nothing and opens in Publishing for review. A post written only in the reply is not saved. Publishing it is a separate oxygen_publishing_posts_approve after the user says yes; a missing connected sender is the one blocker to name. End by saying it is a draft, not live, with its web_url; if the save is refused, say the post exists only in this chat.";
81
+ export declare function isPublishingPostIntent(query: string): boolean;
82
+ /** An X (Twitter) post format: thread, poll, alt text, who-can-reply, quote, photo tags. */
83
+ export declare function isXPostFormatIntent(query: string): boolean;
84
+ export declare function isFailedPostIntent(query: string): boolean;
85
+ /** A post's video cover (thumbnail) or a preview of a post being authored. Competitor ad creative stays with Ads. */
86
+ export declare function isPostCoverOrPreviewIntent(query: string): boolean;
@@ -0,0 +1,135 @@
1
+ /** This card's exact commands as MCP calls (see CAPABILITY_ROUTE_MCP_CALLS). */
2
+ export const mcpCalls = {
3
+ ugcProgramCreate: () => ({ tool: "oxygen_ugc_program_create", arguments: { product_url: "<your product site>" } }),
4
+ // The first comment rides in `content`, as the CLI's --first-comment does.
5
+ publishingPostDraft: () => ({
6
+ tool: "oxygen_publishing_posts_create",
7
+ arguments: { content_text: "<post>", publish_at: "<iso>", status: "draft" },
8
+ }),
9
+ publishingFirstComment: () => ({
10
+ tool: "oxygen_publishing_posts_create",
11
+ arguments: { content_text: "<post>", publish_at: "<iso>", sender_account_id: "<sender_id>", content: { first_comment: "<comment, e.g. the link>" } },
12
+ }),
13
+ };
14
+ /**
15
+ * Running (or joining) a creator program is UGC, which lives on the Publishing
16
+ * card. Checked before the LinkedIn keyword-post rule: "a creator program where
17
+ * LinkedIn creators post about my product" is not a keyword search (2026-09-29
18
+ * baselines routed it to Signals, and "creator program" to post tools).
19
+ */
20
+ export function isUgcProgramIntent(query) {
21
+ return /\b(ugc|user[- ]generated content|creator programs?|ambassador programs?|brand ambassadors?)\b/.test(query)
22
+ || /\b(invite|recruit|onboard|sponsor)\w*\b.{0,30}\bcreators?\b/.test(query)
23
+ || /\bcreators?\b.{0,40}\bpost\w*\b.{0,20}\babout (my|our)\b/.test(query);
24
+ }
25
+ /** The creator's side of a program: find one, apply, or accept an invitation. */
26
+ export function isUgcCreatorSideIntent(query) {
27
+ return /\b(join|apply|applying|find|discover|browse|accept)\w*\b.{0,30}\b(creator|ugc|ambassador) programs?\b/.test(query);
28
+ }
29
+ /** The lifecycle verb of an operator's program ask ("archive program", "delete my creator program"), or null. */
30
+ export function ugcProgramLifecycleVerb(query) {
31
+ return /\b(archive|restore|delete|remove|duplicate|copy|clone) (?:(?:a|an|the|this|that|my|our|old|archived|creator|ugc|brand|ambassador) ){0,3}programs?\b/.exec(query)?.[1] ?? null;
32
+ }
33
+ /** The `ugc programs` leaf and MCP tool per lifecycle verb; delete previews first and names archive when refused. */
34
+ export const UGC_PROGRAM_LIFECYCLE = {
35
+ archive: ["ugc programs archive", "oxygen_ugc_program_update"],
36
+ restore: ["ugc programs restore", "oxygen_ugc_program_update"],
37
+ delete: ["ugc programs delete", "oxygen_ugc_program_delete"],
38
+ remove: ["ugc programs delete", "oxygen_ugc_program_delete"],
39
+ duplicate: ["ugc programs duplicate", "oxygen_ugc_program_duplicate"],
40
+ copy: ["ugc programs duplicate", "oxygen_ugc_program_duplicate"],
41
+ clone: ["ugc programs duplicate", "oxygen_ugc_program_duplicate"],
42
+ };
43
+ /**
44
+ * A creator's own writing voice: `ugc voice import` learns it from their LinkedIn
45
+ * history (the web's "Learn your writing voice") and `ugc voice save` keeps what
46
+ * they write themselves. Only an ask that names the creator context routes here:
47
+ * "learn my writing voice from my LinkedIn messages" is just as likely the
48
+ * workspace voice `knowledge synthesize --kind voice` learns from sent LinkedIn and
49
+ * WhatsApp messages, and brand voice stays with the Knowledge Graph.
50
+ */
51
+ export function isUgcVoiceIntent(query) {
52
+ return /\bcreators?'?s? voice\b/.test(query)
53
+ || (/\bvoice\b/.test(query) && /\b(creator|ugc|ambassador)s?\b/.test(query) && !/\bbrand voice\b/.test(query));
54
+ }
55
+ /**
56
+ * Who approves a creator's post. It is the creator, or the program organizer when
57
+ * the creator delegated approval; a brand can never require its own approval of
58
+ * creator posts (Philipp, 2026-09-29).
59
+ * The MCP acceptance run's "brand approval of creator post before publish" routed
60
+ * to the Knowledge Graph, so the rule it needed never reached it. Only an
61
+ * approval word next to a creator's post counts: "find LinkedIn creator posts
62
+ * about AI" stays a keyword post search.
63
+ */
64
+ export function isUgcPostApprovalIntent(query) {
65
+ return /\b(?:approv\w*|review\w*|sign[- ]?off)\b.{0,40}\b(?:creator|ugc|ambassador)s?'?\s+posts?\b/.test(query)
66
+ || /\b(?:creator|ugc|ambassador)s?'?\s+posts?\b.{0,40}\b(?:approv\w*|review\w*|sign[- ]?off)\b/.test(query)
67
+ || /\bbrand (?:approval|review)\b.{0,40}\b(?:creators?|ugc|ambassadors?)\b/.test(query);
68
+ }
69
+ export function isUgcIntent(query) {
70
+ return isUgcProgramIntent(query) || isUgcCreatorSideIntent(query) || isUgcVoiceIntent(query)
71
+ || isUgcPostApprovalIntent(query) || ugcProgramLifecycleVerb(query) !== null;
72
+ }
73
+ /**
74
+ * UGC is Publishing's creator-program subpage (OXYGEN_PRODUCT.md § UGC programs): a
75
+ * creator-program ask keeps the publishing id, primitive, endpoint sections and
76
+ * gateways, but must not read Publishing's post-scheduler ownership back (UGC E2E pass, 2026-09-29).
77
+ */
78
+ export const UGC_ROUTE_VIEW = {
79
+ owns: "UGC creator programs: brand programs, creator invitations and applications, participations, creator voice, program post drafts and approvals, sponsorship, results, and bounded amplification.",
80
+ notFor: "Scheduling the workspace's own posts, one-to-one messaging, outreach campaigns, or keyword post search.",
81
+ execution: "Brands create a program from its product URL and invite creators; creators apply or accept in their own workspace. A post publishes only after the creator approves its exact content, or the program organizer does when the creator delegated approval; brands cannot require approval. Paid drafts, voice imports and amplification preview first and need an approved credit ceiling.",
82
+ posture: "mixed",
83
+ skills: ["oxygen-ugc", "oxygen-publishing"],
84
+ };
85
+ /** A post's first comment is set with the post; `publishing posts update` takes the same flag. */
86
+ export const POST_DRAFT_COMMAND = 'oxygen publishing posts create --draft --publish-at <iso> --text "<post>" --json';
87
+ export const PUBLISHING_FIRST_COMMENT_COMMAND = 'oxygen publishing posts create --publish-at <iso> --sender <sender_id> --text "<post>" --first-comment "<comment, e.g. the link>" --json';
88
+ /**
89
+ * The comment OXYGEN posts right after a post goes out ("put the link in the first
90
+ * comment") is part of the post, not a reply to one. The 2026-09-29 baselines found
91
+ * no flag, guessed `content.first_comment`, and searched in vain.
92
+ */
93
+ export function isFirstCommentIntent(query) {
94
+ return /\bfirst comments?\b/.test(query)
95
+ && !/\b(repl(?:y|ies|ied)|respond\w*|answer\w*)\b/.test(query)
96
+ // Reading comments people left is owned-post comment work, not setting one.
97
+ && !/\b(show|list|read|see|view|who|whose)\b/.test(query);
98
+ }
99
+ /** Writing or saving the workspace's own post, or asking to post it: a Publishing draft. */
100
+ export function isPostDraftIntent(query) {
101
+ if (/\b(engagers?|engag(?:ed|ing|ement)|comments?|commenters?|react\w*|harvest|scrape|competitors?|creators?|repl(?:y|ies)|tables?|rows?|workflows?|automat\w*|sequences?|campaigns?)\b/.test(query))
102
+ return false;
103
+ if (/\b(find|search|research|monitor|watch)\b/.test(query))
104
+ return false;
105
+ return (/\b(write|draft|drafts|drafted|compose|save|saved)\b/.test(query) && /\bposts?\b/.test(query))
106
+ || /\bpost (?:it|this|that)\b|\bpost (?:on|to) (?:linkedin|x|twitter)\b/.test(query);
107
+ }
108
+ export const POST_DRAFT_EXECUTION = "Read the voice page first (oxygen_knowledge_page_get, slug voice) and use only numbers a page states. Save the post with oxygen_publishing_posts_create, status draft and no approved flag: it needs no sender, publishes nothing and opens in Publishing for review. A post written only in the reply is not saved. Publishing it is a separate oxygen_publishing_posts_approve after the user says yes; a missing connected sender is the one blocker to name. End by saying it is a draft, not live, with its web_url; if the save is refused, say the post exists only in this chat.";
109
+ export function isPublishingPostIntent(query) {
110
+ return /\b(posts?|publishing|content calendar)\b/.test(query)
111
+ && /\b(publish|publishing|schedule|scheduled|approve|approval)\b/.test(query)
112
+ && !/\b(workflow|automation|automate|webhook|cron)\b/.test(query)
113
+ && !(/\b(find|search|scrape|research)\b/.test(query) && /\b(about|mention|containing)\b/.test(query));
114
+ }
115
+ /** An X (Twitter) post format: thread, poll, alt text, who-can-reply, quote, photo tags. */
116
+ export function isXPostFormatIntent(query) {
117
+ return /\b(x|twitter|tweets?)\b/.test(query)
118
+ && /\b(thread|poll|alt text|image descriptions?|reply settings?|who can reply|quote|photo tags?|tag (?:people|someone|accounts?) in)\b/.test(query);
119
+ }
120
+ export function isFailedPostIntent(query) {
121
+ if (/\b(ads?|competitors?|runs?|workflows?|sequences?|tables?|comments?)\b/.test(query))
122
+ return false;
123
+ return /\b(posts?|tweets?)\b/.test(query)
124
+ && /\b(fail(s|ed|ing|ure)?|stuck|locked|uncertain|refused|rejected|retry|reschedul\w*)\b/.test(query);
125
+ }
126
+ /** A post's video cover (thumbnail) or a preview of a post being authored. Competitor ad creative stays with Ads. */
127
+ export function isPostCoverOrPreviewIntent(query) {
128
+ if (/\b(ads?|competitors?)\b/.test(query))
129
+ return false;
130
+ // A draft in an existing inbox conversation is a reply, not a post artifact.
131
+ if (/\b(inbox|unibox|conversation)\b/.test(query) && !/\bposts?\b/.test(query))
132
+ return false;
133
+ return (/\b(cover|thumbnail)\b/.test(query) && /\b(post|video|draft)\b/.test(query))
134
+ || /\bpreview\b.{0,40}\b(post|draft)\b/.test(query);
135
+ }
@@ -0,0 +1,2 @@
1
+ import type { CapabilityIntentRules } from "../capability-discovery-types.js";
2
+ export declare const rules: CapabilityIntentRules;
@@ -0,0 +1,89 @@
1
+ import { POST_DRAFT_COMMAND, POST_DRAFT_EXECUTION, PUBLISHING_FIRST_COMMENT_COMMAND, UGC_PROGRAM_LIFECYCLE, UGC_ROUTE_VIEW, isFailedPostIntent, isFirstCommentIntent, isPostCoverOrPreviewIntent, isPostDraftIntent, isPublishingPostIntent, isUgcCreatorSideIntent, isUgcIntent, isUgcProgramIntent, isUgcVoiceIntent, isXPostFormatIntent, mcpCalls, ugcProgramLifecycleVerb, } from "./publishing.js";
2
+ export const rules = {
3
+ explicit: [
4
+ { order: 360, route: (query) => isUgcIntent(query) ? "publishing" : null },
5
+ // Ahead of the keyword-post, workflow and owned-post-comment rules, which
6
+ // claimed "a first comment on my LinkedIn post" and "... automatically".
7
+ { order: 500, route: (query) => isFirstCommentIntent(query) ? "publishing" : null },
8
+ // Writing the workspace's own post is a Publishing draft, ahead of the keyword
9
+ // post search ("a LinkedIn post about ...") and the public LinkedIn read owner,
10
+ // which claimed "write a LinkedIn post and save it as a draft".
11
+ { order: 510, route: (query) => isPostDraftIntent(query) ? "publishing" : null },
12
+ // Publish/approve are writes even when the noun is a public LinkedIn post.
13
+ // The 2026-09-30 connector baseline offered the cookieless read owner first.
14
+ { order: 530, route: (query) => isPublishingPostIntent(query) ? "publishing" : null },
15
+ // Ahead of the workflow rule, whose "retry" would claim it. Why a post failed and how to get it out is Publishing's attempt ledger and
16
+ // unlock path: the 2026-09-25 stuck-post baseline sent "publishing failed post
17
+ // retry outcome uncertain" to Workflows and "why did my LinkedIn post fail to
18
+ // publish" to the connected-account catalog.
19
+ { order: 550, route: (query) => isFailedPostIntent(query) ? "publishing" : null },
20
+ // Authoring a post's video cover or previewing a draft is Publishing work even
21
+ // when the ask says "LinkedIn post"; the public-read rule otherwise sent
22
+ // "choose video cover frame for linkedin post" to the paid cookieless research
23
+ // catalog (blind acceptance run, 2026-09-24).
24
+ { order: 650, route: (query) => isPostCoverOrPreviewIntent(query) ? "publishing" : null },
25
+ // An X thread, poll, alt text or reply control is how an X post is authored, not
26
+ // a conversation thread (Messages): the 2026-09-25 X-formats baseline routed
27
+ // "thread" to Messages and "X poll post" nowhere.
28
+ { order: 660, route: (query) => isXPostFormatIntent(query) ? "publishing" : null },
29
+ { order: 850, route: (query) => /\b(publish|schedule|approve)\b.{0,24}\b(post|content)\b|\bcontent calendar\b/.test(query) ? "publishing" : null },
30
+ ],
31
+ recommendations: [
32
+ // A program's lifecycle and a creator's voice are UGC work the Publishing card
33
+ // also claims ("archive program", "creator voice"); before these they got the
34
+ // post tools (UGC E2E pass, 2026-09-29).
35
+ {
36
+ order: 330,
37
+ recommend: (card, query) => {
38
+ const lifecycle = card.primitive === "publishing" ? UGC_PROGRAM_LIFECYCLE[ugcProgramLifecycleVerb(query) ?? ""] : undefined;
39
+ return lifecycle ? { tools: [lifecycle[1], "oxygen_ugc_get"], commands: [lifecycle[0], "ugc programs list"] } : null;
40
+ },
41
+ },
42
+ {
43
+ order: 340,
44
+ recommend: (card, query) => card.primitive === "publishing" && isUgcCreatorSideIntent(query) ? {
45
+ tools: ["oxygen_ugc_get", "oxygen_ugc_application_create", "oxygen_ugc_invite_accept"],
46
+ commands: ["ugc programs discover", "ugc programs apply", "ugc creators accept"],
47
+ } : null,
48
+ },
49
+ {
50
+ order: 350,
51
+ recommend: (card, query) => card.primitive === "publishing" && isUgcVoiceIntent(query) ? {
52
+ tools: ["oxygen_ugc_voice_import", "oxygen_ugc_voice_save", "oxygen_ugc_get"],
53
+ commands: ["ugc voice import", "ugc voice save", "ugc voice get"],
54
+ } : null,
55
+ },
56
+ {
57
+ order: 360,
58
+ recommend: (card, query) => card.primitive === "publishing" && isUgcProgramIntent(query) ? {
59
+ tools: ["oxygen_ugc_program_create", "oxygen_ugc_invite_create", "oxygen_ugc_get"],
60
+ commands: ["ugc programs create", "ugc creators invite", "ugc programs list"],
61
+ exactCommand: "oxygen ugc programs create --product-url <your product site> --json",
62
+ exactMcpCall: mcpCalls.ugcProgramCreate(),
63
+ } : null,
64
+ },
65
+ {
66
+ order: 370,
67
+ recommend: (card, query) => card.primitive === "publishing" && isPostDraftIntent(query) ? {
68
+ tools: ["oxygen_knowledge_page_get", "oxygen_publishing_posts_create", "oxygen_publishing_posts_get"],
69
+ commands: ["knowledge page get", "publishing posts create", "publishing posts get"],
70
+ exactCommand: POST_DRAFT_COMMAND,
71
+ exactMcpCall: mcpCalls.publishingPostDraft(),
72
+ } : null,
73
+ },
74
+ {
75
+ order: 390,
76
+ recommend: (card, query) => card.primitive === "publishing" && isFirstCommentIntent(query) ? {
77
+ tools: ["oxygen_publishing_posts_create", "oxygen_publishing_posts_update", "oxygen_publishing_posts_get"],
78
+ commands: ["publishing posts create", "publishing posts update", "publishing posts get"],
79
+ exactCommand: PUBLISHING_FIRST_COMMENT_COMMAND,
80
+ exactMcpCall: mcpCalls.publishingFirstComment(),
81
+ } : null,
82
+ },
83
+ ],
84
+ cardViews: [
85
+ // UGC reports Publishing's creator-program view of the card.
86
+ { order: 120, view: (card, query) => card.primitive === "publishing" && isUgcIntent(query) ? { card: { ...card, ...UGC_ROUTE_VIEW }, done: true } : null },
87
+ { order: 130, view: (card, query) => card.primitive === "publishing" && isPostDraftIntent(query) ? { card: { ...card, execution: POST_DRAFT_EXECUTION }, done: true } : null },
88
+ ],
89
+ };
@@ -0,0 +1,7 @@
1
+ /** Stored inspections precede similarly named execution and review queues. */
2
+ export declare function readInspectionRecommendation(query: string): {
3
+ capabilityId: string;
4
+ tools: string[];
5
+ commands: string[];
6
+ execution: string;
7
+ } | null;