@oxygen-agent/cli 1.1014.1874 → 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.
- package/README.md +1 -1
- package/dist/auto-update.d.ts +1 -1
- package/dist/auto-update.js +3 -3
- package/dist/cli-install.d.ts +65 -0
- package/dist/cli-install.js +165 -0
- package/dist/commands/billing.js +1 -1
- package/dist/commands/managed-inboxes.js +6 -2
- package/dist/commands/sequences.js +1 -1
- package/dist/commands/subscriptions.js +7 -5
- package/dist/update.d.ts +4 -57
- package/dist/update.js +17 -163
- package/node_modules/@oxygen/shared/dist/billing.d.ts +5 -1
- package/node_modules/@oxygen/shared/dist/billing.js +5 -1
- package/node_modules/@oxygen/shared/dist/capability-discovery-skill-audiences.generated.d.ts +30 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-skill-audiences.generated.js +33 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-skills.d.ts +39 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-skills.js +86 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-types.d.ts +93 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery-types.js +1 -0
- package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +12 -258
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +123 -3700
- package/node_modules/@oxygen/shared/dist/capability-intents/agency-directory.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agency-directory.rules.js +5 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agents.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agents.js +53 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agents.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/agents.rules.js +25 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.d.ts +31 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.js +70 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/billing-and-budgets.rules.js +85 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.d.ts +9 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.js +54 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.rules.js +28 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-integrations.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-integrations.rules.js +23 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.d.ts +43 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.js +90 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-linkedin.rules.js +58 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-whatsapp.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/connected-whatsapp.rules.js +14 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/geo.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/geo.rules.js +9 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/index.generated.d.ts +365 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/index.generated.js +90 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.d.ts +20 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.js +37 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/knowledge-graph.rules.js +43 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.d.ts +4 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.js +26 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/linkedin-public-research.rules.js +42 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/messages.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/messages.js +16 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/messages.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/messages.rules.js +68 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/normalize.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/normalize.js +4 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.js +23 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/platform-operations.rules.js +25 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/posts.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/posts.js +12 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/posts.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/posts.rules.js +20 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/publishing.d.ts +86 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/publishing.js +135 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/publishing.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/publishing.rules.js +89 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.d.ts +7 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.js +85 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/read-inspection.rules.js +28 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/recipes.d.ts +7 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/recipes.js +73 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/recipes.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/recipes.rules.js +36 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/records.d.ts +86 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/records.js +240 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/records.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/records.rules.js +71 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.d.ts +27 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.js +67 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.rules.js +115 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sequences.d.ts +71 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sequences.js +150 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sequences.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sequences.rules.js +149 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/signals.d.ts +42 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/signals.js +42 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/signals.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/signals.rules.js +47 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.d.ts +60 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.js +94 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/sourcing-and-provider-tools.rules.js +94 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tables.d.ts +196 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tables.js +394 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tables.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tables.rules.js +384 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tags.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/tags.rules.js +5 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/visual-rendering.rules.js +8 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workflows.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workflows.js +20 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workflows.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workflows.rules.js +90 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.d.ts +59 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.js +121 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.rules.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-intents/workspace-access.rules.js +58 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/ads.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/ads.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/agency-directory.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/agency-directory.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/agents.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/agents.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/billing-and-budgets.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/billing-and-budgets.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.js +39 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-integrations.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-integrations.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-linkedin.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-linkedin.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-whatsapp.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/connected-whatsapp.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/dashboards.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/dashboards.js +28 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/discovery-and-skills.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/discovery-and-skills.js +22 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/geo.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/geo.js +13 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/index.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/index.js +64 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/knowledge-graph.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/knowledge-graph.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/linkedin-public-research.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/linkedin-public-research.js +18 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/messages.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/messages.js +21 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/observability.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/observability.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/onboarding-and-copilot.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/onboarding-and-copilot.js +23 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/platform-operations.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/platform-operations.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/posts.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/posts.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/publishing.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/publishing.js +20 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/recipes.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/recipes.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/records.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/records.js +20 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sending-infrastructure.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sending-infrastructure.js +42 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sequences.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sequences.js +32 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/signals.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/signals.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sourcing-and-provider-tools.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/sourcing-and-provider-tools.js +21 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/support-and-feedback.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/support-and-feedback.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/tables.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/tables.js +34 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/tags.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/tags.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/visual-rendering.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/workflows.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/workflows.js +17 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/workspace-access.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/capability-routes/workspace-access.js +26 -0
- package/node_modules/@oxygen/shared/dist/contracts/connectors.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/customer-operations.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/operations/agent-sessions.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/agent-sessions.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/browser.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/browser.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/clay-migration.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/clay-migration.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/connectors.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/connectors.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/geo.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/geo.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/guided-activation.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/guided-activation.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/index.generated.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/index.generated.js +26 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/reply-oxygent.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/reply-oxygent.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/sender-limits.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/sender-limits.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/table-feed-update.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/table-feed-update.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/teammates.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/teammates.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-pages.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-pages.js +2 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-skills.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations/workspace-skills.js +1 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/contracts/operations.js +7 -15
- package/node_modules/@oxygen/shared/dist/contracts/sender-limits.js +1 -0
- package/node_modules/@oxygen/shared/dist/diagnostic-storage-lock.js +33 -22
- package/node_modules/@oxygen/shared/dist/diagnostics.js +11 -8
- package/node_modules/@oxygen/shared/dist/first-month-offer-window.d.ts +3 -0
- package/node_modules/@oxygen/shared/dist/first-month-offer.d.ts +15 -7
- package/node_modules/@oxygen/shared/dist/first-month-offer.js +23 -9
- package/node_modules/@oxygen/shared/dist/guided-activation.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/listed-website-platforms.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/listed-website-platforms.js +23 -1
- package/node_modules/@oxygen/shared/dist/log.d.ts +4 -0
- package/node_modules/@oxygen/shared/dist/log.js +4 -0
- package/node_modules/@oxygen/shared/dist/onboarding-leads.d.ts +67 -0
- package/node_modules/@oxygen/shared/dist/onboarding-leads.js +78 -0
- package/node_modules/@oxygen/shared/dist/onboarding-research.d.ts +19 -0
- package/node_modules/@oxygen/shared/dist/onboarding-research.js +33 -0
- package/node_modules/@oxygen/shared/dist/otlp-log-sink.js +20 -0
- package/node_modules/@oxygen/shared/dist/plan-capabilities.js +1 -1
- package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +2 -2
- package/node_modules/@oxygen/shared/dist/plan-limits.js +6 -7
- package/node_modules/@oxygen/shared/dist/sending-domain-faults.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/sending-domain-faults.js +1 -1
- package/node_modules/@oxygen/shared/dist/tenant-migration-names.d.ts +5 -0
- package/node_modules/@oxygen/shared/dist/tenant-migration-names.js +8 -0
- package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
- package/node_modules/@oxygen/workflows/dist/graph/lint.d.ts +1 -1
- package/node_modules/@oxygen/workflows/dist/graph/lint.js +4 -3
- package/node_modules/@oxygen/workflows/dist/index.d.ts +2 -59
- package/node_modules/@oxygen/workflows/dist/index.js +4 -904
- package/node_modules/@oxygen/workflows/dist/manifest-validation.d.ts +75 -0
- package/node_modules/@oxygen/workflows/dist/manifest-validation.js +903 -0
- package/package.json +1 -1
|
@@ -1,580 +1,81 @@
|
|
|
1
|
+
import { isPublicCapabilitySkill } from "./capability-discovery-skills.js";
|
|
2
|
+
import { CAPABILITY_INTENT_RULES } from "./capability-intents/index.generated.js";
|
|
3
|
+
import { normalizeIntent } from "./capability-intents/normalize.js";
|
|
4
|
+
import { withRecordBrief } from "./capability-intents/records.js";
|
|
5
|
+
import { isCompanySourcingIntent, sourcingPlaybookFor } from "./capability-intents/sourcing-and-provider-tools.js";
|
|
6
|
+
import { CAPABILITY_ROUTE_DEFINITIONS } from "./capability-routes/index.js";
|
|
1
7
|
import { findEnrichmentIntentByAlias } from "./enrichment-intents.js";
|
|
2
8
|
import { networkMiningEnabled } from "./network-mining.js";
|
|
3
9
|
import { nativeChatEnabled, withNativeChatDiscovery } from "./native-chat-discovery.js";
|
|
4
10
|
import { RECIPE_PRIMITIVES } from "./recipes.js";
|
|
5
11
|
import { matchSkillPlay } from "./skill-play-routing.js";
|
|
6
12
|
export { matchSkillPlay, SKILL_PLAY_TRIGGERS } from "./skill-play-routing.js";
|
|
13
|
+
export { OXYGEN_PRODUCT_SKILL_AUDIENCES, PRODUCT_SKILL_READ_INLINE_CHARS, RETIRED_PRODUCT_SKILLS, canReadProductSkillInstructions, isPublicCapabilitySkill, readProductSkillInstructionResult, } from "./capability-discovery-skills.js";
|
|
14
|
+
// Each card's MCP call factories live beside its intent rules (see the
|
|
15
|
+
// generated index for the contract).
|
|
16
|
+
export { CAPABILITY_ROUTE_MCP_CALLS } from "./capability-intents/index.generated.js";
|
|
17
|
+
export { POST_DRAFT_COMMAND, PUBLISHING_FIRST_COMMENT_COMMAND } from "./capability-intents/publishing.js";
|
|
18
|
+
export { withRecordBrief } from "./capability-intents/records.js";
|
|
19
|
+
export { SEQUENCE_SENDING_SCHEDULE_COMMAND, SEQUENCE_UNSUBSCRIBE_COMMAND } from "./capability-intents/sequences.js";
|
|
20
|
+
export { SIGNAL_CAPTURE_COMMAND } from "./capability-intents/signals.js";
|
|
21
|
+
export { COMPANY_URL_RECOVERY_COMMAND, LOCAL_BUSINESS_SCRAPE_COMMAND } from "./capability-intents/sourcing-and-provider-tools.js";
|
|
22
|
+
export { COMPANY_PAGE_FOLLOWERS_COMMAND, ROW_CLASSIFICATION_COMMAND, ROW_FAN_OUT_COMMAND } from "./capability-intents/tables.js";
|
|
23
|
+
/**
|
|
24
|
+
* Cards in ascending `order`. Each card lives in its own file under
|
|
25
|
+
* `capability-routes/`, gathered by the generated index; the order field, not the
|
|
26
|
+
* file name, decides the position, because scoring keeps the first card on a tie.
|
|
27
|
+
*/
|
|
28
|
+
function orderedCapabilityRoutes(definitions) {
|
|
29
|
+
const ordered = [...definitions].sort((left, right) => left.order - right.order);
|
|
30
|
+
for (const [index, current] of ordered.entries()) {
|
|
31
|
+
const previous = ordered[index - 1];
|
|
32
|
+
if (previous && previous.order === current.order) {
|
|
33
|
+
throw new Error(`Capability routes ${previous.card.id} and ${current.card.id} share order ${current.order}; give each a unique order.`);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return ordered.map((definition) => definition.card);
|
|
37
|
+
}
|
|
7
38
|
// One compact semantic index covers every top-level /api/cli endpoint section.
|
|
8
39
|
// It is navigation, never execution: live schemas, prices, readiness, and
|
|
9
40
|
// approval enforcement remain on the exact command/tool selected from here.
|
|
10
|
-
export const OXYGEN_CAPABILITY_ROUTES =
|
|
11
|
-
{
|
|
12
|
-
id: "geo", layer: "Data", primitive: "geo", posture: "mixed",
|
|
13
|
-
owns: "GEO / AEO AI-search tracking: buyer prompts, consumer answers, citations, competitive visibility, customer chat evidence and optimization experiments. Experimental staff/dev access.",
|
|
14
|
-
notFor: "Direct model API benchmarks, automatic public edits, autonomous publishing or personalized chat attribution.",
|
|
15
|
-
execution: "Staff in dev workspaces only. Preview consumer collection and cost, start within the $10 shared pilot cap, inspect answers and citations, then record reviewed changes and compare later samples. Reads never collect or spend.",
|
|
16
|
-
gatewayTools: ["oxygen_geo_projects_list", "oxygen_geo_engines_list", "oxygen_geo_analytics_get", "oxygen_geo_runs_preview"],
|
|
17
|
-
gatewayCommands: ["geo projects list", "geo engines list", "geo analytics get", "geo runs preview"],
|
|
18
|
-
endpointSections: ["geo"], skills: ["oxygen-geo"],
|
|
19
|
-
intentTerms: ["GEO", "AEO", "answer engine optimization", "generative engine optimization", "AI search visibility", "AI answer visibility", "AI visibility", "consumer AI answers", "answer engines", "brand visibility", "brand citations", "chatgpt mentions", "citation gaps"],
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
id: "visual-rendering",
|
|
23
|
-
layer: "Action",
|
|
24
|
-
primitive: null,
|
|
25
|
-
owns: "Agent-authored GTM infographics and carousel pages: editable HTML/CSS/SVG sources, isolated PNG/PDF rendering, actual visual inspection, revisions and downloads.",
|
|
26
|
-
notFor: "A separate product primitive, arbitrary package execution, image generation providers, motion/video, or publishing.",
|
|
27
|
-
execution: "Save source in workspace files; preview the exact rendering scope, start it (rendering is free), poll the durable job, inspect its PNG pixels, revise and export. Renderer availability is checked by preview.",
|
|
28
|
-
posture: "workspace_write",
|
|
29
|
-
gatewayTools: ["oxygen_visual_source_create", "oxygen_visual_render_preview", "oxygen_visual_render_get", "oxygen_visual_image_view"],
|
|
30
|
-
gatewayCommands: ["visuals source-create", "visuals render-preview", "visuals render-get", "visuals download"],
|
|
31
|
-
skills: ["oxygen-linkedin-content", "oxygen-knowledge"],
|
|
32
|
-
endpointSections: ["visuals"],
|
|
33
|
-
intentTerms: ["infographic", "gtm flow image", "render html", "visual design", "carousel pages", "svg", "png", "pdf export", "graphic designer"],
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
id: "workspace-access",
|
|
37
|
-
layer: "Control",
|
|
38
|
-
primitive: null,
|
|
39
|
-
owns: "Authentication, CLI identities, API keys, sessions, organizations, active-workspace selection, connected apps (ChatGPT, Claude, Codex…) with the default workspace each one works in and the OXYGEN events each one is subscribed to, and which web-app sidebar pages each person hides from their own sidebar in a workspace (Settings → Customise).",
|
|
40
|
-
notFor: "Workspace GTM data, provider credentials, execution inside a primitive, or access control: a hidden sidebar page stays reachable by URL.",
|
|
41
|
-
execution: "Resolve identity and select the hosted workspace before operating its primitives. Each app connected with OAuth keeps its own default workspace: `connectors list` shows them and `connectors set` changes one app only; orgs select changes only the app or CLI that calls it. What OXYGEN sends an app (its event subscriptions, such as ChatGPT watching for classified replies, and every delivery with its outcome, never content): `connectors events get <app>`; `connectors events revoke <app> --subscription <id|all>` stops them for good. While an app holds event subscriptions, its paid calls are capped by its rolling 24-hour credit ceiling: the plan default, or `connectors set <app> --credit-ceiling <credits>` (above the default also needs --approve-above-default); `connectors get <app>` shows the ceiling and what it spent. Sidebar pages (Settings → Customise) are per person and per workspace: `settings pages list` (oxygen_settings_pages_get) shows each page and whether you hid it; `settings pages set --hide <pages>`, `--show <pages>` or `--show-all` (oxygen_settings_pages_update) changes only your own sidebar, never a teammate's. Nothing is deleted.",
|
|
42
|
-
posture: "mixed",
|
|
43
|
-
gatewayTools: [
|
|
44
|
-
"oxygen_whoami",
|
|
45
|
-
"oxygen_orgs_list",
|
|
46
|
-
"oxygen_orgs_select",
|
|
47
|
-
"oxygen_connector_list",
|
|
48
|
-
"oxygen_connector_update",
|
|
49
|
-
"oxygen_connector_events_get",
|
|
50
|
-
"oxygen_connector_events_revoke",
|
|
51
|
-
],
|
|
52
|
-
gatewayCommands: ["whoami", "orgs list", "orgs select", "connectors list", "connectors set", "connectors events get", "connectors events revoke"],
|
|
53
|
-
skills: ["oxygen-quickstart"],
|
|
54
|
-
// `mcp`: the host-driven MCP Events routes an OAuth connection's subscriptions go through (ADR 0030 §2).
|
|
55
|
-
endpointSections: ["api-keys", "auth", "connectors", "login-requests", "mcp", "orgs", "sessions", "settings", "whoami"],
|
|
56
|
-
intentTerms: ["login", "authenticate", "identity", "who am i", "workspace", "organization", "org", "api key", "session", "switch workspace", "connected app", "connected apps", "default workspace", "sidebar", "navigation", "hidden pages", "page visibility", "workspace settings", "organisation settings", "organization settings"],
|
|
57
|
-
},
|
|
58
|
-
{
|
|
59
|
-
id: "discovery-and-skills",
|
|
60
|
-
layer: "Control",
|
|
61
|
-
primitive: null,
|
|
62
|
-
owns: "Bounded capability, command, provider-operation, Recipe, and product-skill discovery, plus INSTANCE discovery — what this workspace actually holds — with exact hydration on demand.",
|
|
63
|
-
notFor: "Executing GTM work or loading full manifests and schemas before a capability is selected.",
|
|
64
|
-
execution: "Search by outcome, choose the owner, then hydrate one exact command, MCP schema, provider descriptor, or skill. For instance discovery, read the map and then the primitive that owns the row.",
|
|
65
|
-
posture: "read_only",
|
|
66
|
-
gatewayTools: ["oxygen_capabilities_search", "oxygen_skills_get", "oxygen_tools_search", "oxygen_recipes_list", "oxygen_workspace_map"],
|
|
67
|
-
gatewayCommands: ["capabilities search", "commands search", "skills search", "tools search", "recipes list", "workspace map"],
|
|
68
|
-
skills: ["oxygen-quickstart", "oxygen-gtm"],
|
|
69
|
-
// `workspace` (the map) belongs here rather than beside `home`: capability
|
|
70
|
-
// discovery answers what OXYGEN can do and instance discovery answers what THIS
|
|
71
|
-
// workspace holds, and they are the same act — bounded, read-only, hydrate one
|
|
72
|
-
// thing on demand. `home` stayed on the onboarding card because the standup is a
|
|
73
|
-
// first-run surface; the map is not.
|
|
74
|
-
endpointSections: ["skills", "workspace"],
|
|
75
|
-
intentTerms: ["discover", "discovery", "capability", "capabilities", "command", "commands", "skill", "skills", "which tool", "how do i", "what do i have", "what is in my workspace", "workspace map"],
|
|
76
|
-
},
|
|
77
|
-
{
|
|
78
|
-
id: "onboarding-and-copilot",
|
|
79
|
-
layer: "Control",
|
|
80
|
-
primitive: null,
|
|
81
|
-
owns: "First-run setup, GTM diagnosis and planning, and interactive Workspace Copilot sessions over the shared primitive contracts.",
|
|
82
|
-
notFor: "Recurring deterministic automation or standing adaptive jobs; use Workflows or Agents.",
|
|
83
|
-
execution: "Use existing onboarding context to understand the user goal and GTM bottleneck, recommend a useful next improvement, and guide its native implementation when selected. For a diagnosis or a GTM plan, assess the workspace, agree the binding constraint, and design a custom motion run as a capped pilot.",
|
|
84
|
-
posture: "mixed",
|
|
85
|
-
gatewayTools: ["oxygen_whoami", "oxygen_recipes_list", "oxygen_blueprints_list", "oxygen_context_resolve", "oxygen_copilot_start"],
|
|
86
|
-
gatewayCommands: ["whoami", "context resolve", "recipes list", "blueprints list", "copilot start"],
|
|
87
|
-
skills: ["oxygen-onboarding", "oxygen-gtm-consultant", "oxygen-quickstart", "oxygen-gtm"],
|
|
88
|
-
// `activation` remains an exact legacy API family for saved clients, but it
|
|
89
|
-
// has no recommended gateway and is not an intent term or first-touch path.
|
|
90
|
-
endpointSections: ["activation", "copilot", "home", "onboarding"],
|
|
91
|
-
// "next step" alone is deliberately absent: it is a phrase every primitive's
|
|
92
|
-
// users say ("next step of this workflow run"), and a 6-point multi-word hit
|
|
93
|
-
// would drag those queries here. The terms kept are the ones only a founder
|
|
94
|
-
// asking where they are in setup actually types.
|
|
95
|
-
intentTerms: ["onboard", "onboarding", "first run", "first day", "setup oxygen", "copilot", "assistant", "guided", "where am i", "next step in setup", "what do i do next", "gtm consultant", "gtm planning", "improve our gtm operation", "gtm review", "pipeline is flat", "go-to-market plan"],
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
id: "billing-and-budgets",
|
|
99
|
-
layer: "Control",
|
|
100
|
-
primitive: null,
|
|
101
|
-
owns: "Credits, customer credit prices, plan state, usage receipts, subscriptions, and standing budget policies.",
|
|
102
|
-
notFor: "Authorizing a specific provider call or external write; that action still needs its own preview and approval.",
|
|
103
|
-
execution: "Read billing state or set a hosted budget policy; exact action ceilings remain primitive-owned.",
|
|
104
|
-
posture: "mixed",
|
|
105
|
-
gatewayTools: ["oxygen_billing_balance", "oxygen_billing_usage", "oxygen_billing_audit", "oxygen_billing_estimate", "oxygen_budget_list", "oxygen_customer_credit_prices"],
|
|
106
|
-
gatewayCommands: ["billing balance", "billing usage", "billing audit", "billing estimate", "budget list", "billing invoices", "pricing customer-credit-prices"],
|
|
107
|
-
skills: ["oxygen-gtm", "oxygen-diagnostics"],
|
|
108
|
-
endpointSections: ["billing", "budget", "limits", "pricing"],
|
|
109
|
-
intentTerms: ["billing", "credits", "credit balance", "customer credit prices", "credit price catalog", "usage", "spend", "cost", "cost estimate", "monthly cost", "budget", "subscription", "invoice", "vat", "vat number", "tax id", "cancel plan", "change plan", "upgrade", "downgrade", "subscription plans", "annual plan", "yearly commitment", "yearly saving", "annual discount", "retention offer", "cancellation reason", "winback discount", "partner bonus", "partner credits", "partner_bonus", "partners2026", "coupon", "promotion", "promo code", "discount"],
|
|
110
|
-
},
|
|
111
|
-
{
|
|
112
|
-
id: "support-and-feedback",
|
|
113
|
-
layer: "Control",
|
|
114
|
-
primitive: null,
|
|
115
|
-
owns: "Customer support conversations, structured tickets, product feedback, transcript-backed reports, and Thread follow-up.",
|
|
116
|
-
notFor: "Primitive run diagnosis when no support report is needed; inspect Observability first.",
|
|
117
|
-
execution: "Start or continue a hosted support conversation, optionally file structured metadata, and return its deep link; never send a customer reply automatically.",
|
|
118
|
-
posture: "workspace_write",
|
|
119
|
-
gatewayTools: ["oxygen_feedback", "oxygen_support_ticket_create", "oxygen_support_tickets_list", "oxygen_chat_threads_list", "oxygen_chat_channel", "oxygen_chat_thread_get", "oxygen_chat_thread_create", "oxygen_chat_thread_reply", "oxygen_chat_file_upload", "oxygen_chat_file_get", "oxygen_chat_thread_read"],
|
|
120
|
-
gatewayCommands: ["feedback", "support chat", "support file", "support list", "chat threads list", "chat channel", "chat threads get", "chat threads create", "chat threads reply", "chat files upload", "chat files get", "chat threads read"],
|
|
121
|
-
skills: ["oxygen-feedback"],
|
|
122
|
-
endpointSections: ["feedback", "support", "chat"],
|
|
123
|
-
intentTerms: ["support", "feedback", "bug report", "feature request", "report issue", "ticket", "complaint", "support chat", "support thread", "chat attachment"],
|
|
124
|
-
},
|
|
125
|
-
{
|
|
126
|
-
id: "platform-operations",
|
|
127
|
-
layer: "Control",
|
|
128
|
-
primitive: null,
|
|
129
|
-
owns: "Workspace queue health, failed jobs, queue recovery, and workspace database status, attach, migrations, read-only SQL and retired cost-policy controls.",
|
|
130
|
-
notFor: "Customer run timelines or approvals (Observability), Table grid queries (Tables), and external Supabase imports (Integrations).",
|
|
131
|
-
execution: "Inspect the active workspace's queue and database status; repair stale queue state or provision its database through the native scoped controls.",
|
|
132
|
-
posture: "mixed",
|
|
133
|
-
gatewayTools: ["oxygen_worker_queue_stats", "oxygen_worker_failures", "oxygen_workspace_queue_repair", "oxygen_workspace_database_status", "oxygen_workspace_database_provision"],
|
|
134
|
-
gatewayCommands: ["worker queue-stats", "worker failures", "worker repair", "db status", "db provision"],
|
|
135
|
-
skills: ["oxygen-diagnostics"],
|
|
136
|
-
endpointSections: ["db", "worker"],
|
|
137
|
-
intentTerms: ["worker", "queue", "queue repair", "database", "database hosting", "db status", "stuck jobs", "operations"],
|
|
138
|
-
},
|
|
139
|
-
{
|
|
140
|
-
// Control-layer interaction state, deliberately NOT a sixteenth primitive
|
|
141
|
-
// (ADR 0020): a comment or an approval request is state ABOUT a GTM
|
|
142
|
-
// artifact, and the hard gate is honored by the owning primitive's own
|
|
143
|
-
// route. `primitive: null` is what keeps the fifteen-primitive assertion
|
|
144
|
-
// in OXYGEN_PRIMITIVE_ROUTES true.
|
|
145
|
-
id: "collaboration",
|
|
146
|
-
layer: "Control",
|
|
147
|
-
primitive: null,
|
|
148
|
-
owns: "Threaded internal comments on any workspace object, second-party approval requests, the opt-in gate that blocks a live action until approved, and the restricted client role.",
|
|
149
|
-
notFor: "Public comments on a published post (Posts/Publishing), the artifact itself, or a run's own approval card — those belong to their owning primitive.",
|
|
150
|
-
execution: "Comment or request a decision on a subject reference (`<kind>:<id>`); an admin arms the gate, and the owning primitive refuses its live path until an approval lands.",
|
|
151
|
-
posture: "workspace_write",
|
|
152
|
-
gatewayTools: ["oxygen_approvals_inbox", "oxygen_approvals_request", "oxygen_approvals_decide", "oxygen_comments_add", "oxygen_comments_list", "oxygen_approvals_gate_set"],
|
|
153
|
-
gatewayCommands: ["approvals inbox", "approvals request", "approvals decide", "comments add", "comments list", "approvals gate set"],
|
|
154
|
-
skills: ["oxygen-collaboration"],
|
|
155
|
-
endpointSections: ["collab"],
|
|
156
|
-
intentTerms: [
|
|
157
|
-
"collaboration",
|
|
158
|
-
"comment thread",
|
|
159
|
-
"internal comment",
|
|
160
|
-
"leave a comment",
|
|
161
|
-
"sign off",
|
|
162
|
-
"signoff",
|
|
163
|
-
"approval request",
|
|
164
|
-
"request approval",
|
|
165
|
-
"approval gate",
|
|
166
|
-
"client approval",
|
|
167
|
-
"client review",
|
|
168
|
-
"client login",
|
|
169
|
-
"client role",
|
|
170
|
-
"go no go",
|
|
171
|
-
"waiting on me",
|
|
172
|
-
],
|
|
173
|
-
negativeTerms: ["public comment", "linkedin comment", "post comment"],
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
id: "agency-directory",
|
|
177
|
-
layer: "Control",
|
|
178
|
-
primitive: null,
|
|
179
|
-
owns: "The current organization profile and publication state in the public OXYGEN agency directory.",
|
|
180
|
-
notFor: "CRM company records, workspace membership, or outbound campaigns.",
|
|
181
|
-
execution: "Read, update, publish, or unpublish the hosted directory listing. Read partner-bonus eligibility and timing without credit grants with billing summary (oxygen_billing_summary). Application: /docs/workspace/agency-directory. Partner benefits: /docs/safety/billing#agency-partner-bonus. Skill instructions require the applicable workspace entitlement.",
|
|
182
|
-
posture: "workspace_write",
|
|
183
|
-
gatewayTools: ["oxygen_directory_get", "oxygen_billing_summary", "oxygen_directory_update", "oxygen_directory_publish"],
|
|
184
|
-
gatewayCommands: ["directory get", "billing summary", "directory update", "directory publish"],
|
|
185
|
-
skills: ["oxygen-agency-directory"],
|
|
186
|
-
endpointSections: ["directory"],
|
|
187
|
-
intentTerms: ["agency directory", "agency listing", "directory profile", "publish agency", "partner listing"],
|
|
188
|
-
},
|
|
189
|
-
{
|
|
190
|
-
id: "knowledge-graph",
|
|
191
|
-
layer: "Knowledge",
|
|
192
|
-
primitive: "knowledge-graph",
|
|
193
|
-
owns: "Durable workspace context: company, ICP, positioning, offers, rubrics, prompts, and linked wiki pages.",
|
|
194
|
-
notFor: "Working row sets, campaign execution, or local chat memory.",
|
|
195
|
-
execution: "Read and write the hosted workspace Knowledge Graph; canonical changes remain proposal-gated.",
|
|
196
|
-
posture: "workspace_write",
|
|
197
|
-
gatewayTools: ["oxygen_knowledge_search", "oxygen_knowledge_index", "oxygen_knowledge_page_get"],
|
|
198
|
-
gatewayCommands: ["knowledge search", "knowledge index", "knowledge page get"],
|
|
199
|
-
skills: ["oxygen-knowledge"],
|
|
200
|
-
endpointSections: ["context", "knowledge"],
|
|
201
|
-
intentTerms: ["knowledge", "wiki", "context", "icp", "ideal customer", "positioning", "offer", "rubric", "brand", "voice", "company profile", "github", "obsidian", "vault", "repository sync", "markdown import"],
|
|
202
|
-
},
|
|
203
|
-
{
|
|
204
|
-
id: "recipes",
|
|
205
|
-
layer: "Knowledge",
|
|
206
|
-
primitive: "recipes",
|
|
207
|
-
owns: "Versioned advisory playbooks that teach when and why to run proven GTM motions through native primitives.",
|
|
208
|
-
notFor: "A hidden runtime, mandatory bundle, or replacement for hosted Workflows.",
|
|
209
|
-
execution: "Browse the Recipe, apply its kit (ordered Blueprint stages, one approval, 0 credits, workflows disabled), then run the play through native primitives.",
|
|
210
|
-
posture: "workspace_write",
|
|
211
|
-
gatewayTools: ["oxygen_recipes_list", "oxygen_recipes_get"],
|
|
212
|
-
gatewayCommands: ["recipes list", "recipes show", "recipes apply", "recipes install"],
|
|
213
|
-
skills: ["oxygen-recipes", "oxygen-gtm-consultant"],
|
|
214
|
-
endpointSections: ["blueprints", "recipes", "templates"],
|
|
215
|
-
intentTerms: ["recipe", "playbook", "proven play", "activation play", "setup play", "journey", "day 1", "day 7", "day 30", "blueprint", "template", "what should i do", "inbound led outbound", "engagers into a sequence", "warm outbound from my posts", "whole motion", "end to end motion", "kit"],
|
|
216
|
-
},
|
|
217
|
-
{
|
|
218
|
-
id: "records",
|
|
219
|
-
layer: "Data",
|
|
220
|
-
primitive: "records",
|
|
221
|
-
owns: "Canonical companies, people, deals, identities, relationships, activities, notes, tasks (reminders), files, merges, and CRM sync state.",
|
|
222
|
-
notFor: "Disposable sourcing, enrichment, or scoring work; use Tables before promotion.",
|
|
223
|
-
execution: "Operate the hosted native CRM and preserve field/relationship provenance. For an object inventory, `crm objects` supplies each backing Table; `tables preview <table> --fields <field-key> --summary-only` returns its exact total row count at 0 credits. Choose an existing column key from the object description for both counts and row lists (Companies: name; People: full_name). That total includes sample rows; native CRM reads mark seeded samples `_sample: true`; an absent marker means the record is not a seeded sample. Importing FROM a connected CRM lands here via `crm sync import <provider> --object <object>` (HubSpot contacts|companies, Attio people|companies, Pipedrive persons|organizations|deals), which pulls the whole object and has no list/segment filter. To import ONE HubSpot saved list or ONE Pipedrive saved filter into a new table the user can filter and enrich — optionally suppressing a do-not-contact list/filter first — use `tables hubspot import` or `tables pipedrive import` instead. Open work across the workspace is one read: `crm tasks list`.",
|
|
224
|
-
posture: "workspace_write",
|
|
225
|
-
gatewayTools: ["oxygen_crm_record_search", "oxygen_crm_record_get"],
|
|
226
|
-
gatewayCommands: ["crm search", "crm get", "crm describe", "crm tasks list", "crm notes list"],
|
|
227
|
-
skills: ["oxygen-crm"],
|
|
228
|
-
endpointSections: ["crm"],
|
|
229
|
-
// "reminder"/"to-do"/"open tasks" routed to workspace-access before these
|
|
230
|
-
// terms existed (blind acceptance, 2026-09-22): the customer's phrasing for
|
|
231
|
-
// the Tasks read has to land on the primitive that owns it.
|
|
232
|
-
intentTerms: ["record", "records", "crm", "company record", "contact", "person record", "deal", "timeline", "merge", "relationship", "note", "notes", "task", "tasks", "reminder", "reminders", "to-do", "open tasks", "follow-up", "attachment", "files on a record"],
|
|
233
|
-
},
|
|
234
|
-
{
|
|
235
|
-
id: "tables",
|
|
236
|
-
layer: "Data",
|
|
237
|
-
primitive: "tables",
|
|
238
|
-
owns: "Typed working datasets, rows, formulas, AI/tool/waterfall columns, reusable Functions with isolated drafts and published versions, cell state, projects, and run provenance.",
|
|
239
|
-
notFor: "Canonical CRM truth: use Records via oxygen_crm_objects_list, oxygen_crm_record_get or oxygen_crm_record_search. Not message cadence or an off-platform spreadsheet runtime.",
|
|
240
|
-
execution: "Create and run work in hosted OXYGEN Tables; validate a small sample before bounded paid runs. To see what a table's own columns can be enriched with and what each costs per row before adding anything, run `tools search --for-table <table>` (MCP oxygen_tools_search with for_table): free, it returns priced suggestions with the exact add command. For standard person or company enrichment, `columns add <table> --preset person_enrich|company_enrich` (MCP oxygen_columns_add with preset) adds the maintained bundle in one call before any hand-built tool column. Person questions over that bundle's profile payload (skill set, grad school, location, job fit, current company) and person appearance research (events, keynotes, podcasts, GitHub profile) are `columns catalog --category people` templates, added with `columns add <table> --prompt-key <key> --input <name>=<column>`. For a company fact OXYGEN already knows how to research (founders, parent company, funding, cloud provider, offers demos, industry, NAICS, HQ, LinkedIn/Crunchbase page lookups) or a page extraction, `columns catalog` lists the ready-made template and `columns add <table> --prompt-key <key> --input <name>=<column>` (MCP oxygen_columns_add with prompt_key) adds it with no prompt to write. For ICP tiers, read the saved profile with `knowledge page get icp`, then add native Classify Score: `columns add <table> --label 'ICP fit' --score 'low,medium,high' --prompt '<ICP criteria using {{evidence_column}} tokens>' --grounding workspace`. It costs 0.075 credits/row; preview with `columns run --dry-run`. `columns catalog --family classification --json` puts Classify in `data.native`; `data.entries` holds separate prompt templates that can cost more.",
|
|
241
|
-
posture: "mixed",
|
|
242
|
-
gatewayTools: ["oxygen_tables_create", "oxygen_tools_search", "oxygen_columns_add", "oxygen_columns_catalog", "oxygen_enrich_column_preview", "oxygen_tables_link_bulk", "oxygen_callables_manage", "oxygen_tables_records_import"],
|
|
243
|
-
gatewayCommands: ["tables create", "tools search", "columns add", "columns catalog", "enrich-column preview", "tables link", "functions list", "functions draft", "tables records import"],
|
|
244
|
-
skills: ["oxygen-tables", "oxygen-enrichment", "oxygen-table-tidy", "oxygen-diagnostics", "oxygen-clay-migration", "oxygen-signals"],
|
|
245
|
-
endpointSections: ["action-columns", "callables", "functions", "columns", "company-enrichment", "enrich-column", "enrichment", "migrations", "projects", "supabase", "table-action-items", "table-action-runs", "table-ingestion-runs", "tables"],
|
|
246
|
-
// "link"/"join"/"connect"/"relate" route here for `tables link`. Added after a
|
|
247
|
-
// blind user eval asked for exactly "link two tables" and was routed to
|
|
248
|
-
// `tables create` / `columns add` / `enrich-column preview` — none of which
|
|
249
|
-
// do it. The agent only found the right command by grepping the raw 25k-line
|
|
250
|
-
// command manifest, which is not a discovery path a customer has.
|
|
251
|
-
// "hubspot list" / "saved segment" / "list import" route here for
|
|
252
|
-
// `tables hubspot import`. Added after the 2026-09-21 blind ACCEPTANCE run:
|
|
253
|
-
// the capability shipped that same day, the agent searched "import hubspot
|
|
254
|
-
// contacts", was routed to `records`, read `crm sync import --help`, found
|
|
255
|
-
// no --list flag, and reported segment-scoped import as a MISSING native
|
|
256
|
-
// capability. The records execution text now names the table lane too,
|
|
257
|
-
// because that is where this phrasing legitimately lands.
|
|
258
|
-
// "founders" / "parent company" / "cloud provider" / "company research" route
|
|
259
|
-
// here for `columns catalog`. Added after the 2026-09-16 blind baseline asked
|
|
260
|
-
// `capabilities search "founders of a company"` and got `route: null` with a
|
|
261
|
-
// generic sourcing pointer, then hand-wrote four research prompts for
|
|
262
|
-
// questions the template catalog now answers by key.
|
|
263
|
-
intentTerms: ["table", "spreadsheet", "rows", "column", "columns", "dataset", "csv", "import", "hubspot list", "hubspot segment", "pipedrive filter", "pipedrive", "saved list", "saved segment", "saved filter", "crm segment", "list import", "segment import", "filter import", "import a segment", "import a list", "import a filter", "enrich", "enrichment", "waterfall", "score", "formula", "ai column", "lookup", "link", "link tables", "join", "connect", "relate", "relationship", "function", "functions", "reusable function", "function draft", "function version", "callable", "column template", "skill set", "grad school", "podcast appearance", "keynote", "github profile", "job fit", "founders", "parent company", "subsidiaries", "cloud provider", "company research", "research question", "research column", "web research", "template catalog", "ready-made", "offers demos", "naics", "cost per row", "price per row", "what can i enrich", "enrichment cost", "credits per row", "flatten", "explode", "json array", "array cell"],
|
|
264
|
-
},
|
|
265
|
-
{
|
|
266
|
-
id: "messages",
|
|
267
|
-
layer: "Data",
|
|
268
|
-
primitive: "messages",
|
|
269
|
-
owns: "One-to-one message facts, imported mailbox history, conversations, direct email, inbox drafts, and replies in existing channel threads.",
|
|
270
|
-
notFor: "Net-new LinkedIn initiation, cadence, enrollment, sender rotation, or reply-stop programs; those belong to Sequences.",
|
|
271
|
-
execution: "Read conversations and imported email summaries in Unibox. Inspect mailboxes sync for Gmail/Microsoft 365 history and included CRM analysis progress. Preview and approve direct email or existing-thread replies; every sent fact stays in Messages.",
|
|
272
|
-
posture: "external_write",
|
|
273
|
-
gatewayTools: ["oxygen_inbox_send", "oxygen_email_send", "oxygen_messages_query", "oxygen_unibox_metadata"],
|
|
274
|
-
gatewayCommands: ["inbox send", "email send", "messages query", "unibox metadata"],
|
|
275
|
-
skills: ["oxygen-unibox"],
|
|
276
|
-
endpointSections: ["email", "inbox", "message-reviews", "messages", "unibox"],
|
|
277
|
-
// "inbox view" / "default view" / "conversations by sender" route here for
|
|
278
|
-
// `inbox views`. Added after the 2026-10-05 blind acceptance: asked to save a
|
|
279
|
-
// filtered inbox as the team's view, `capabilities search` recommended
|
|
280
|
-
// `inbox send` first and the agent found the views commands only by name.
|
|
281
|
-
intentTerms: ["message", "messages", "reply", "email", "inbox", "unibox", "inbox metadata", "conversation", "thread", "direct email", "draft reply", "one off", "email history", "mail history", "analyze emails", "email crm", "inbox view", "unibox view", "saved inbox view", "default inbox view", "conversations by sender", "sender filter"],
|
|
282
|
-
},
|
|
283
|
-
{
|
|
284
|
-
id: "posts",
|
|
285
|
-
layer: "Data",
|
|
286
|
-
primitive: "posts",
|
|
287
|
-
owns: "Broadcast post artifacts, author/channel identity, provider IDs, comments, reactions, and performance history.",
|
|
288
|
-
notFor: "One-to-one conversations, delivery scheduling, or generic public LinkedIn provider search.",
|
|
289
|
-
execution: "Read hosted posts and their comments or performance. For queued scheduling and review use Publishing. oxygen_posts_create is a direct LinkedIn publish: preview first, then approved=true publishes immediately outside the Publishing approval queue.",
|
|
290
|
-
posture: "workspace_write",
|
|
291
|
-
gatewayTools: ["oxygen_publishing_comments", "oxygen_publishing_analytics", "oxygen_posts_get", "oxygen_posts_create"],
|
|
292
|
-
gatewayCommands: ["publishing comments list", "publishing analytics summary", "posts get", "posts create"],
|
|
293
|
-
skills: ["oxygen-publishing"],
|
|
294
|
-
endpointSections: [],
|
|
295
|
-
intentTerms: ["post artifact", "social post", "post comments", "public comments", "unanswered comments", "comments needing reply", "owned posts", "published posts", "post reactions", "post performance", "content performance", "posting analytics", "broadcast content"],
|
|
296
|
-
},
|
|
297
|
-
{
|
|
298
|
-
id: "signals",
|
|
299
|
-
layer: "Data",
|
|
300
|
-
primitive: "signals",
|
|
301
|
-
owns: "Durable typed pulse, engagement, and product events resolved onto records.",
|
|
302
|
-
notFor: "Message bodies, post artifacts, or ad-hoc provider webhooks as private automation state.",
|
|
303
|
-
execution: "Read the hosted signal stream and type registry; tag a registered type with tags attach. Feed subscriptions, Sequences, or Workflows. A visit or view the user reports goes on the person with oxygen_crm_activity_log (activity_type website_visit, direction inbound, live), after creating a missing person with oxygen_crm_record_assert (free, no approval); oxygen_crm_signal_record is for a provider webhook.",
|
|
304
|
-
posture: "workspace_write",
|
|
305
|
-
gatewayTools: ["oxygen_signals_list", "oxygen_signals_leads_today", "oxygen_signals_registry", "oxygen_tags_attach"],
|
|
306
|
-
gatewayCommands: ["signals list", "signals leads-today", "signals registry", "tags attach"],
|
|
307
|
-
skills: ["oxygen-signals"],
|
|
308
|
-
endpointSections: ["signals", "signup-leads"],
|
|
309
|
-
intentTerms: ["signal", "signals", "signal type", "tag signal", "intent", "website visit", "job change", "fundraising", "warm leads", "engager", "follower", "viewer"],
|
|
310
|
-
},
|
|
311
|
-
{
|
|
312
|
-
id: "dashboards",
|
|
313
|
-
layer: "Data",
|
|
314
|
-
primitive: "dashboards",
|
|
315
|
-
owns: "The curated funnel, channel, spend and needs-action reporting, PLUS the workspace's own saved dashboards: named pages of chart / view / iframe / rich-text / code / live-source widgets over tables and CRM objects.",
|
|
316
|
-
notFor: "Arbitrary BI modeling or a separate analytics store. Outreach volume and replies are not chartable yet — group a table or a CRM object, or read the curated funnel with `dashboards summary`.",
|
|
317
|
-
execution: "Compute hosted curated views over Records, Messages, Signals, Sequences and runs; store and serve user-defined dashboards from ox_dashboards.",
|
|
318
|
-
// Was `read_only` until v1.1002.0, which is when a workspace could first SAVE a
|
|
319
|
-
// dashboard. A blind user eval (2026-09-21) caught the drift the expensive way:
|
|
320
|
-
// the agent asked this router for "dashboard", was told read_only and
|
|
321
|
-
// "not for BI modeling", and only found the eight mutating commands by
|
|
322
|
-
// separately searching the command index. This record is step 4 of the CLI's
|
|
323
|
-
// own quickstart, so a stale posture here routes users away from what shipped.
|
|
324
|
-
// `mixed`, not workspace_write: this capability now spans a read (summary,
|
|
325
|
-
// widget data), a workspace write (dashboards, tabs, widgets) AND one
|
|
326
|
-
// external-reach spending call (a live_source refresh calls its bound
|
|
327
|
-
// provider). "read_write" is not a member of CapabilityPosture -- inventing
|
|
328
|
-
// it is what broke the shared build on the first attempt.
|
|
329
|
-
posture: "mixed",
|
|
330
|
-
gatewayTools: ["oxygen_dashboard_summary", "oxygen_dashboards_list", "oxygen_dashboards_create", "oxygen_dashboards_widget_kinds", "oxygen_dashboards_widget_add", "oxygen_dashboards_widget_data"],
|
|
331
|
-
gatewayCommands: ["dashboards summary", "dashboards list", "dashboards create", "dashboards widgets kinds", "dashboards widgets add", "dashboards widgets data"],
|
|
332
|
-
skills: ["oxygen-gtm"],
|
|
333
|
-
endpointSections: ["dashboards"],
|
|
334
|
-
intentTerms: ["dashboard", "report", "reporting", "funnel", "metrics", "kpi", "performance", "pipeline summary", "save", "saved dashboard", "custom dashboard", "widget", "chart", "weekly report", "monday", "come back to"],
|
|
335
|
-
},
|
|
336
|
-
{
|
|
337
|
-
id: "ads",
|
|
338
|
-
layer: "Data",
|
|
339
|
-
primitive: "ads",
|
|
340
|
-
owns: "Competitor ad intelligence and saved search definitions; owned-audience activation is a roadmap boundary.",
|
|
341
|
-
notFor: "Organic Posts, Publishing, or claiming unshipped audience activation.",
|
|
342
|
-
execution: "Save a reusable Ads search definition for free; running the hosted ad-intelligence provider operation uses the normal paid-read gate. Guide: /docs/data/ads.",
|
|
343
|
-
posture: "paid_read",
|
|
344
|
-
gatewayTools: ["oxygen_ads_searches", "oxygen_adyntel_ads_search", "oxygen_tools_search"],
|
|
345
|
-
gatewayCommands: ["ads searches list", "ads searches save", "tools search"],
|
|
346
|
-
skills: ["oxygen-signals"],
|
|
347
|
-
endpointSections: ["ads"],
|
|
348
|
-
intentTerms: ["ad", "ads", "advertising", "ad creative", "competitor ads", "ad intelligence", "meta ads", "linkedin ads", "saved ads search", "reusable ads search"],
|
|
349
|
-
},
|
|
350
|
-
{
|
|
351
|
-
id: "tags",
|
|
352
|
-
layer: "Data",
|
|
353
|
-
primitive: "tags",
|
|
354
|
-
owns: "The normalized cross-primitive label vocabulary and campaign handle.",
|
|
355
|
-
notFor: "A campaign entity, private per-surface labels, or arbitrary execution state.",
|
|
356
|
-
execution: "Read or mutate tags through the hosted union surface; rename is preview-first. For saved Ads searches, save a definition with oxygen_ads_searches (CLI: ads searches save), then attach or read its tags here. Guide: /docs/workspace/tags.",
|
|
357
|
-
posture: "workspace_write",
|
|
358
|
-
gatewayTools: ["oxygen_tags_list", "oxygen_tags_get", "oxygen_tags_attach", "oxygen_tags_rename"],
|
|
359
|
-
gatewayCommands: ["tags list", "tags get", "tags attach", "tags rename"],
|
|
360
|
-
skills: ["oxygen-gtm"],
|
|
361
|
-
endpointSections: ["tags"],
|
|
362
|
-
intentTerms: ["tag", "tags", "label", "labels", "campaign handle", "grouping", "organize campaign"],
|
|
363
|
-
},
|
|
364
|
-
{
|
|
365
|
-
id: "sequences",
|
|
366
|
-
layer: "Action",
|
|
367
|
-
primitive: "sequences",
|
|
368
|
-
owns: "Net-new LinkedIn outreach plus versioned multichannel programs, cadence, enrollment, sender limits, suppression, reply-stop, pausing a company when someone there replies, and dispatch.",
|
|
369
|
-
notFor: "A reply in an existing conversation or a direct one-off email; use Messages. Not for general deterministic automation.",
|
|
370
|
-
// The external-campaign sentence exists because a 2026-09-16 blind user asked
|
|
371
|
-
// to "push table rows to smartlead campaign", landed here, read the native
|
|
372
|
-
// email track's "Only 'instantly' is supported" and concluded Smartlead was
|
|
373
|
-
// unreachable. The governed path for a campaign the customer already runs
|
|
374
|
-
// elsewhere is `sequences push-external`; it is not a Sequence.
|
|
375
|
-
execution: "Use the one-step gateway for new LinkedIn initiation or create/enroll/start a hosted campaign with bounded send authority. Native email sends through connected Google/Microsoft mailboxes, including Microsoft SMTP transport. To push table rows into an existing Smartlead, Instantly, lemlist or HeyReach campaign you already run, use `sequences push-external` (dry_run preview, then --approved). To stop a company's other leads when one of them replies, set `--company-reply-pause` on the campaign (choose the reply categories); to pause or resume a company on demand, e.g. from a workflow when a meeting is booked, use `sequences pause-company` / `resume-company`. A pause is resumable; a company do-not-contact entry is a permanent block on every campaign. Step copy takes lead columns as {{column}} and the sending person's name as {{sender_first_name}}, {{sender_last_name}} or {{sender_full_name}} (email adds {{sender_email}}), with no table column.",
|
|
376
|
-
posture: "external_write",
|
|
377
|
-
gatewayTools: ["oxygen_sequences_send", "oxygen_sequences_create", "oxygen_sequences_enroll", "oxygen_sequences_start", "oxygen_sequences_list", "oxygen_sequences_update", "oxygen_sequences_get", "oxygen_sequences_push_external", "oxygen_sequences_company_pause"],
|
|
378
|
-
gatewayCommands: ["sequences send", "sequences create", "sequences enroll", "sequences start", "sequences list", "sequences update", "sequences get", "sequences push-external", "sequences pause-company"],
|
|
379
|
-
skills: ["oxygen-sequencer"],
|
|
380
|
-
endpointSections: ["email-assets", "email-documents", "senders", "sequencer", "sequences", "spintax", "subscriptions", "suppressions", "voice"],
|
|
381
|
-
// "sender identity", "sender profile" and "phone number" are here because a
|
|
382
|
-
// blind-user eval (2026-08-09) asked for "our sender identity" and got routed
|
|
383
|
-
// to workspace-access — "identity" matched the AUTH sense. The nouns a user
|
|
384
|
-
// reaches for when naming a sending identity or the dialing pool have to land
|
|
385
|
-
// on the group that actually owns `senders profiles` and `voice numbers`.
|
|
386
|
-
// The sign-off terms are here because a 2026-09-29 blind user searched
|
|
387
|
-
// "preview rendered message per sender sign-off variable" and landed on
|
|
388
|
-
// collaboration; the {{sender_*}} copy variables live on sequence steps.
|
|
389
|
-
// A/B tests are Sequence step variants: "pause a losing A/B variant" ranked
|
|
390
|
-
// Table-run pauses first (2026-10-10 parity audit).
|
|
391
|
-
intentTerms: ["withdraw invitation on timeout", "withdraw unanswered invite", "withdraw_on_timeout", "a/b test", "a/b variant", "ab test", "split test", "auto-winner", "winning variant", "losing variant", "sequence", "campaign", "cadence", "enroll", "outreach", "linkedin message", "linkedin dm", "nurture", "follow up", "sender rotation", "stop on reply", "company replied", "pause company", "pause outreach to a company", "stop outreach to a company", "stop emailing a company", "colleagues", "do not contact a company", "sender identity", "sending identity", "sender profile", "phone number", "dialing", "dialer", "call", "cold call", "smartlead", "instantly", "lemlist", "heyreach", "external sequencer", "push to campaign", "push rows to campaign", "add leads to campaign", "sign-off", "sign off", "signature", "sender name", "sender first name", "sender variable", "sender_first_name"],
|
|
392
|
-
},
|
|
393
|
-
{
|
|
394
|
-
id: "publishing",
|
|
395
|
-
layer: "Action",
|
|
396
|
-
primitive: "publishing",
|
|
397
|
-
owns: "Approval-gated scheduling, dispatch, retries, review, and attempt provenance for broadcast Posts.",
|
|
398
|
-
notFor: "One-to-one messaging, outreach campaigns, or general automation.",
|
|
399
|
-
execution: "Create a scheduled Publishing post, review it, then explicitly approve to release the hosted publisher. oxygen_posts_create instead publishes directly to LinkedIn after its own preview and approved=true; it does not enter this queue.",
|
|
400
|
-
posture: "external_write",
|
|
401
|
-
gatewayTools: ["oxygen_publishing_posts_create", "oxygen_publishing_posts_list", "oxygen_publishing_posts_approve", "oxygen_ugc_get"],
|
|
402
|
-
gatewayCommands: ["publishing posts create", "publishing posts list", "publishing posts approve", "ugc programs list", "ugc programs duplicate", "ugc programs archive"],
|
|
403
|
-
skills: ["oxygen-publishing", "oxygen-linkedin-content", "oxygen-ugc"],
|
|
404
|
-
endpointSections: ["publishing", "ugc"],
|
|
405
|
-
// "remove program" / "delete program" landed on route: null in a blind eval
|
|
406
|
-
// (2026-09-10); a program is a UGC noun here, and its lifecycle verbs must
|
|
407
|
-
// resolve to the group that owns `ugc programs archive|delete|duplicate`.
|
|
408
|
-
intentTerms: ["publish", "publishing", "schedule post", "content calendar", "posting calendar", "approve post", "social publishing", "video cover", "video thumbnail", "cover image", "post preview", "ugc", "creator program", "user generated content", "creator voice", "sponsored creator", "ugc program", "archive program", "delete program", "remove program", "duplicate program", "copy program", "write posts", "write a post", "post ideas", "content pillars", "hook", "linkedin content"],
|
|
409
|
-
},
|
|
410
|
-
{
|
|
411
|
-
id: "workflows",
|
|
412
|
-
layer: "Action",
|
|
413
|
-
primitive: "workflows",
|
|
414
|
-
owns: "Deterministic hosted automation definitions, versions, triggers, branching, retries, approvals, modes, and durable runs.",
|
|
415
|
-
notFor: "Local cron, client-side execution, adaptive Agent goals, or outreach cadence already owned by Sequences.",
|
|
416
|
-
execution: "Author locally if useful, then schema/lint/apply and call the Workflow on OXYGEN workers; outbound uses internal oxygen.sequence_enroll against an already active bounded Sequence. Start from the graph schema's examples[0] (oxygen_workflows_schema subject graph): a minimal valid manifest whose tool node adds a Table row with oxygen_table_rows_insert. To change existing rows, a tool node runs oxygen_tables_query with filters, a loop goes over steps.<node>.output.rows (body edge source_handle loop_body, plus an edge back to the loop), and the body calls oxygen_rows_update with row_id loop.each.item._row_id and values. A fixed change on a schedule stays a Workflow: draft and lint it rather than offering a formula column instead; a routine is for checks that need judgment. A cron time is in the person's time zone: set trigger.timezone, and ask for it in your first question when you do not know it. To find why a definition fails, lint it as written first. Saving without running is apply with publish false and workflow and trigger status disabled. If apply is refused, nothing was saved: say so once, never call it saved or a draft in OXYGEN, and never offer another way around the refusal (such as writing the rows directly). Then say in plain words what it would do once saved, and include the full manifest below that: show its manifest every time, since it exists only in your reply.",
|
|
417
|
-
posture: "mixed",
|
|
418
|
-
gatewayTools: ["oxygen_workflows_schema", "oxygen_workflows_lint", "oxygen_workflows_apply", "oxygen_workflows_call", "oxygen_workflows_tail"],
|
|
419
|
-
gatewayCommands: ["workflows schema", "workflows lint", "workflows apply", "workflows call", "workflows tail"],
|
|
420
|
-
skills: ["oxygen-workflow-authoring"],
|
|
421
|
-
endpointSections: ["workflows"],
|
|
422
|
-
intentTerms: ["workflow", "automation", "automate", "webhook", "cron", "trigger", "branch", "retry", "orchestrate", "scheduled job", "deterministic graph"],
|
|
423
|
-
},
|
|
424
|
-
{
|
|
425
|
-
id: "agents",
|
|
426
|
-
layer: "Action",
|
|
427
|
-
primitive: "agents",
|
|
428
|
-
owns: "Adaptive governed worker definitions, versions, authorization, context, triggers, threads, checkpoints, inference, and first-class runs.",
|
|
429
|
-
notFor: "A known deterministic graph that belongs in Workflows or an opaque uploaded runtime.",
|
|
430
|
-
execution: "Publish and run a governed Agent with explicit tool authority and bounded spend. Members can create ongoing sessions: draft, exact resource scope, per-run and rolling 24-hour caps, preview/activate, continuing conversation and bounded self-scheduling. Inspect agent session templates; pause/resume preserves history. Where admitted, Oxygents (AI teammates) default to Workspace: one ongoing chat shared by everyone with access. Choose visibility personal when creating one for creator-only access; an API key acts as its issuing person. Home stays Workspace. Owners change visibility with confirm_visibility: publishing shares all existing history; Personal keeps history but removes others' future access and cannot retract what they saw. Collaborators use the shared chat; managers also change its profile and access. everyone off restricts Workspace access to its owner and named people, with workspace administrators retaining management access; it does not make it Personal. Group chats hold up to six Oxygents and optional teammates; messages go to the Oxygents mentioned or addressed.",
|
|
431
|
-
posture: "mixed",
|
|
432
|
-
gatewayTools: ["oxygen_agent_list", "oxygen_agent_create", "oxygen_agent_run"],
|
|
433
|
-
gatewayCommands: ["agent list", "agent create", "agent run"],
|
|
434
|
-
skills: ["oxygen-gtm"],
|
|
435
|
-
endpointSections: ["agent", "notetaker", "teammates", "teammate-groups"],
|
|
436
|
-
intentTerms: ["agent", "teammate", "oxygent", "ai teammate", "adaptive", "goal directed", "autonomous", "persistent thread", "checkpoint", "standing job", "notetaker", "ongoing worker", "ongoing session", "watch a campaign", "watch one campaign", "campaign monitor", "remember earlier reviews", "rolling daily", "long horizon", "long session"],
|
|
437
|
-
},
|
|
438
|
-
{
|
|
439
|
-
id: "observability",
|
|
440
|
-
layer: "Action",
|
|
441
|
-
primitive: "observability",
|
|
442
|
-
owns: "The cross-primitive read lens for runs, timelines, approvals, costs, failures, retries, and outputs.",
|
|
443
|
-
notFor: "Operational infrastructure logs or a second execution engine.",
|
|
444
|
-
execution: "Inspect hosted run state and decide pending approvals through native read/control surfaces.",
|
|
445
|
-
posture: "read_only",
|
|
446
|
-
gatewayTools: ["oxygen_observability_runs", "oxygen_observability_approvals", "oxygen_observability_events"],
|
|
447
|
-
gatewayCommands: ["observability runs", "observability approvals", "observability events"],
|
|
448
|
-
skills: ["oxygen-diagnostics"],
|
|
449
|
-
endpointSections: ["observability", "runs"],
|
|
450
|
-
intentTerms: ["observability", "run", "runs", "failure", "failed", "retry", "provenance", "cost", "approval", "what is running"],
|
|
451
|
-
},
|
|
452
|
-
{
|
|
453
|
-
id: "sourcing-and-provider-tools",
|
|
454
|
-
layer: "External",
|
|
455
|
-
primitive: null,
|
|
456
|
-
owns: "Company/people sourcing, one-shot contact finding, provider-operation discovery, and durable search plans feeding Tables.",
|
|
457
|
-
notFor: "Enriching rows that already exist; use native table columns and waterfalls. Not for raw provider selection when a native gateway exists.",
|
|
458
|
-
execution: "Plan or preview the hosted search, then run with an explicit scope and credit ceiling; hydrate one provider descriptor only when needed.",
|
|
459
|
-
posture: "paid_read",
|
|
460
|
-
gatewayTools: ["oxygen_companies_search_plan", "oxygen_people_search_plan", "oxygen_tools_search", "oxygen_find_company"],
|
|
461
|
-
gatewayCommands: ["companies search plan", "people search plan", "tools search", "find company"],
|
|
462
|
-
skills: ["oxygen-sourcing", "oxygen-enrichment"],
|
|
463
|
-
endpointSections: ["companies", "find", "lead-sourcing", "people", "search", "sourcing", "tools", "verify"],
|
|
464
|
-
// Contacts at accounts are a people search: "merge two lists then find
|
|
465
|
-
// contacts" scored Records on "merge"/"contact", and "who we should reach at
|
|
466
|
-
// each company ... cost" scored Billing on "cost".
|
|
467
|
-
intentTerms: ["find companies", "find people", "source leads", "build a list", "tam", "prospect", "provider", "tool catalog", "find email", "find phone", "local businesses", "local business", "google maps", "storefronts", "find contacts", "contacts per account", "contacts per company", "contacts at each", "reach at each", "people at each"],
|
|
468
|
-
negativeTerms: ["in my crm", "in our crm", "in the crm", "existing contacts"],
|
|
469
|
-
},
|
|
470
|
-
{
|
|
471
|
-
id: "linkedin-public-research",
|
|
472
|
-
layer: "External",
|
|
473
|
-
primitive: null,
|
|
474
|
-
owns: "Cookieless public or third-party LinkedIn profiles, companies, posts, search, reactions, comments, and engagers through native scraper operations.",
|
|
475
|
-
notFor: "The workspace account network/inbox or any LinkedIn write; those require the connected LinkedIn surface.",
|
|
476
|
-
execution: "For a known post's engagers, preview the durable engagement harvest; for other reads, search `scraper.*`, hydrate one descriptor, and run without a connected-account quota.",
|
|
477
|
-
posture: "paid_read",
|
|
478
|
-
gatewayTools: ["oxygen_tools_search", "oxygen_tools_get"],
|
|
479
|
-
gatewayCommands: ["tools search", "tools get"],
|
|
480
|
-
skills: ["oxygen-signals"],
|
|
481
|
-
endpointSections: [],
|
|
482
|
-
intentTerms: ["public linkedin", "third party linkedin", "linkedin profile", "linkedin company", "linkedin post", "linkedin comments", "linkedin reactions", "linkedin engagers", "harvest", "cookieless"],
|
|
483
|
-
negativeTerms: ["my linkedin", "our linkedin", "own linkedin", "connected account", "inbox", "send", "invite", "publish"],
|
|
484
|
-
},
|
|
485
|
-
{
|
|
486
|
-
id: "connected-integrations",
|
|
487
|
-
layer: "External",
|
|
488
|
-
primitive: null,
|
|
489
|
-
owns: "Connected SaaS accounts, OAuth/BYOK readiness, custom integration manifests, and provider actions that lack a native primitive gateway.",
|
|
490
|
-
notFor: "Recreating native Tables, Messages, Sequences, Publishing, or Workflows through a generic provider action.",
|
|
491
|
-
execution: "For provider API keys, inspect the connect schema and omit credentials for setup requirements with no provider call or storage. Submitting credentials creates or replaces the connection immediately. Cloudflare account selection uses top-level account_id; BounceBan validates before storage. Provider actions keep their exact write/spend gate.",
|
|
492
|
-
posture: "mixed",
|
|
493
|
-
gatewayTools: ["oxygen_integrations_list", "oxygen_integrations_connect", "oxygen_integrations_list_actions"],
|
|
494
|
-
gatewayCommands: ["integrations list", "integrations connect", "custom-integrations list"],
|
|
495
|
-
skills: ["oxygen-custom-http", "oxygen-tables", "oxygen-gtm"],
|
|
496
|
-
endpointSections: ["custom-integrations", "integrations"],
|
|
497
|
-
intentTerms: ["integration", "integrations", "connect provider", "oauth", "byok", "bring your own key", "provider key", "provider connection", "custom http", "custom integration", "connection readiness"],
|
|
498
|
-
},
|
|
499
|
-
{
|
|
500
|
-
id: "sending-infrastructure",
|
|
501
|
-
layer: "External",
|
|
502
|
-
primitive: null,
|
|
503
|
-
owns: "Sending domains, managed/BYOK mailboxes, customer Gmail/Microsoft 365 connections, mail history controls, warmup, deliverability, egress IPs, and infrastructure health.",
|
|
504
|
-
notFor: "Writing campaign copy or sending outside a Sequence/Message owner.",
|
|
505
|
-
execution: "Inspect or provision hosted sending infrastructure with explicit recurring-cost and external-write approval. Connect existing Gmail or Microsoft 365/Exchange Online mailboxes using mailboxes connect-oauth --vendor composio where enabled; 100 credits/month per mailbox includes mail history and CRM analysis. Read progress with oxygen_mailboxes_sync_status (CLI: mailboxes sync without --action); control it with oxygen_mailboxes_sync. Read oxygen-email-infra for history coverage and CRM rules.",
|
|
506
|
-
posture: "mixed",
|
|
507
|
-
gatewayTools: ["oxygen_mailboxes_list", "oxygen_mailboxes_connect_oauth", "oxygen_mailboxes_sync_status", "oxygen_mailboxes_sync", "oxygen_domains_list", "oxygen_mailboxes_health"],
|
|
508
|
-
gatewayCommands: ["mailboxes list", "mailboxes connect-oauth", "mailboxes sync", "domains list", "mailboxes health"],
|
|
509
|
-
skills: ["oxygen-email-infra", "oxygen-deliverability", "oxygen-sequencer"],
|
|
510
|
-
endpointSections: ["deliverability", "domains", "egress", "mailboxes", "managed-inboxes"],
|
|
511
|
-
intentTerms: [
|
|
512
|
-
"mailbox",
|
|
513
|
-
"mailboxes",
|
|
514
|
-
"gmail",
|
|
515
|
-
"microsoft 365",
|
|
516
|
-
"exchange online",
|
|
517
|
-
"outlook",
|
|
518
|
-
"connect inbox",
|
|
519
|
-
"mailbox history",
|
|
520
|
-
"sending domain",
|
|
521
|
-
"dns",
|
|
522
|
-
"warmup",
|
|
523
|
-
"deliverability",
|
|
524
|
-
"placement",
|
|
525
|
-
"egress ip",
|
|
526
|
-
"email infrastructure",
|
|
527
|
-
"managed inbox",
|
|
528
|
-
"avatar",
|
|
529
|
-
"profile picture",
|
|
530
|
-
"profile photo",
|
|
531
|
-
"headshot",
|
|
532
|
-
"hosted picture",
|
|
533
|
-
"hosted image",
|
|
534
|
-
"mailbox picture",
|
|
535
|
-
"mailbox photo",
|
|
536
|
-
],
|
|
537
|
-
},
|
|
538
|
-
{
|
|
539
|
-
id: "connected-linkedin",
|
|
540
|
-
layer: "External",
|
|
541
|
-
primitive: null,
|
|
542
|
-
owns: "The workspace LinkedIn account network/private data — everyone you are connected to and everyone who follows you, captured into one self-refreshing 'LinkedIn Network' table — relationship context such as mutual connections, and connected-account writes used by Signals, Messages, Sequences, and Publishing.",
|
|
543
|
-
notFor: "Ordinary public or third-party LinkedIn research; use the cookieless native scraper.",
|
|
544
|
-
execution: "To put your own network in a table — connections and followers, one row per person with a Relationship column, kept current in the background — run `oxygen linkedin network setup --json` (add --account <ref> for one account; `oxygen linkedin network status` reports the pace and each account's state, `oxygen linkedin network pause` switches it off). Open connection requests — received and sent, on every connected account, in one table that marks each one accepted or no_longer_pending when it disappears — are `oxygen linkedin invitations setup --json` (`status` and `pause` beside it). Profile viewers are the same per account: `oxygen viewers import --account <ref>` switches one on, `oxygen viewers pause --account <ref>` off, and `oxygen viewers status` lists every account's state and `viewed_account` (whose profile each person viewed). `oxygen viewers enrichment --on` enriches each NEW viewer's full profile automatically at the per-person price `viewers status` quotes (existing viewers never). It is free, read-only on the account, and paced under its own daily read budget. For mutual/shared connection counts, resolve the connected account with `oxygen senders list --json`, inspect `oxygen tools get linkedin.users_get --json`, then run `oxygen tools run linkedin.users_get --input-json '{\"identifier\":\"<profile-url>\",\"account_id\":\"<connected-account-id>\",\"notify\":false}' --mode live --json`. This read is non-notifying and no-bill. An unavailable count is explicit and never means zero; retrying the same account/profile pair is not expected to reveal a provider-hidden count. Otherwise use the owning primitive gateway; the connected account provides identity and transport, not a competing product runtime.",
|
|
545
|
-
posture: "mixed",
|
|
546
|
-
gatewayTools: ["oxygen_linkedin_network_setup", "oxygen_linkedin_invitations_setup", "oxygen_senders_list", "oxygen_linkedin_connections_import", "oxygen_inbox_list"],
|
|
547
|
-
gatewayCommands: ["linkedin network setup", "linkedin invitations setup", "senders list", "connections import", "inbox list"],
|
|
548
|
-
skills: ["oxygen-signals", "oxygen-sequencer", "oxygen-unibox"],
|
|
549
|
-
endpointSections: ["linkedin"],
|
|
550
|
-
intentTerms: ["my linkedin", "our linkedin", "own linkedin", "connected linkedin", "connections", "mutual connections", "shared connections", "connections in common", "followers", "my network", "whole network", "linkedin network", "connections and followers", "profile viewers", "sales navigator", "recruiter", "linkedin inbox", "working hours", "sending hours", "linkedin limits"],
|
|
551
|
-
},
|
|
552
|
-
{
|
|
553
|
-
id: "connected-whatsapp",
|
|
554
|
-
layer: "External",
|
|
555
|
-
primitive: null,
|
|
556
|
-
owns: "Connected WhatsApp accounts, account limits, warm existing-thread sends, and transport beneath Messages/Sequences.",
|
|
557
|
-
notFor: "A generic chat executor: replies belong to Messages and cold/multistep outreach belongs to Sequences.",
|
|
558
|
-
execution: "Inspect the connected account, then route reply or initiation intent to the owning native primitive.",
|
|
559
|
-
posture: "external_write",
|
|
560
|
-
gatewayTools: ["oxygen_whatsapp_accounts_list", "oxygen_inbox_send", "oxygen_sequences_create"],
|
|
561
|
-
gatewayCommands: ["whatsapp accounts", "inbox send", "sequences create"],
|
|
562
|
-
skills: ["oxygen-unibox", "oxygen-sequencer"],
|
|
563
|
-
endpointSections: ["whatsapp"],
|
|
564
|
-
intentTerms: ["whatsapp", "whatsapp account", "whatsapp reply", "whatsapp outreach", "warm send"],
|
|
565
|
-
},
|
|
566
|
-
];
|
|
41
|
+
export const OXYGEN_CAPABILITY_ROUTES = orderedCapabilityRoutes(CAPABILITY_ROUTE_DEFINITIONS);
|
|
567
42
|
export const OXYGEN_PRIMITIVE_ROUTES = OXYGEN_CAPABILITY_ROUTES
|
|
568
43
|
.filter((card) => card.primitive !== null);
|
|
569
44
|
const ROUTE_BY_ID = new Map(OXYGEN_CAPABILITY_ROUTES.map((card) => [card.id, card]));
|
|
570
45
|
/** Cards a catalogue row may decorate: the data surfaces, never sequences/posts/billing. */
|
|
571
46
|
const CATALOGUE_CARD_IDS = new Set(["tables", "sourcing-and-provider-tools", "signals"]);
|
|
572
47
|
const ROUTE_BY_PRIMITIVE = new Map(OXYGEN_PRIMITIVE_ROUTES.map((card) => [card.primitive, card]));
|
|
48
|
+
const CARDS = {
|
|
49
|
+
byId: (id) => ROUTE_BY_ID.get(id),
|
|
50
|
+
byPrimitive: (primitive) => ROUTE_BY_PRIMITIVE.get(primitive),
|
|
51
|
+
};
|
|
573
52
|
const NORMALIZED_PRIMITIVES = [...RECIPE_PRIMITIVES].sort();
|
|
574
53
|
const NORMALIZED_ROUTE_PRIMITIVES = OXYGEN_PRIMITIVE_ROUTES.map((card) => card.primitive).sort();
|
|
575
54
|
if (NORMALIZED_PRIMITIVES.join("|") !== NORMALIZED_ROUTE_PRIMITIVES.join("|")) {
|
|
576
55
|
throw new Error("OXYGEN capability routes must cover the shared fifteen-primitive catalog exactly.");
|
|
577
56
|
}
|
|
57
|
+
/**
|
|
58
|
+
* One list of intent rules in ascending `order`, gathered from every
|
|
59
|
+
* `capability-intents/<owner>.rules.ts`. The first rule that answers wins, so
|
|
60
|
+
* two rules may never share an order.
|
|
61
|
+
*/
|
|
62
|
+
function orderedRules(kind, lists) {
|
|
63
|
+
const ordered = lists.flatMap((list) => list ?? []).sort((left, right) => left.order - right.order);
|
|
64
|
+
for (const [index, current] of ordered.entries()) {
|
|
65
|
+
if (!Number.isInteger(current.order) || current.order <= 0) {
|
|
66
|
+
throw new Error(`Capability intent ${kind} rule order ${current.order} must be a positive integer.`);
|
|
67
|
+
}
|
|
68
|
+
if (ordered[index - 1]?.order === current.order) {
|
|
69
|
+
throw new Error(`Capability intent ${kind} rules share order ${current.order}; give each a unique order.`);
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
return ordered;
|
|
73
|
+
}
|
|
74
|
+
const PRE_ROUTE_RULES = orderedRules("preRoutes", CAPABILITY_INTENT_RULES.map((rules) => rules.preRoutes));
|
|
75
|
+
const EXPLICIT_RULES = orderedRules("explicit", CAPABILITY_INTENT_RULES.map((rules) => rules.explicit));
|
|
76
|
+
const RECOMMENDATION_RULES = orderedRules("recommendations", CAPABILITY_INTENT_RULES.map((rules) => rules.recommendations));
|
|
77
|
+
const CARD_VIEW_RULES = orderedRules("cardViews", CAPABILITY_INTENT_RULES.map((rules) => rules.cardViews));
|
|
78
|
+
const SKILL_RULES = orderedRules("skills", CAPABILITY_INTENT_RULES.map((rules) => rules.skills));
|
|
578
79
|
/** Server env where one exists; a browser bundle has no process and serves no gated tool. */
|
|
579
80
|
function runtimeEnv() {
|
|
580
81
|
return typeof process === "undefined" ? {} : process.env;
|
|
@@ -597,46 +98,10 @@ export function inferCapabilityRoute(query) {
|
|
|
597
98
|
const normalized = normalizeIntent(query);
|
|
598
99
|
if (!normalized)
|
|
599
100
|
return null;
|
|
600
|
-
|
|
601
|
-
const
|
|
602
|
-
if (
|
|
603
|
-
|
|
604
|
-
const tools = removal ? ["oxygen_custom_integrations_remove", "oxygen_custom_integrations_list"] : ["oxygen_custom_integrations_list", "oxygen_custom_integrations_apply", "oxygen_custom_integration_connect"];
|
|
605
|
-
const commands = removal ? ["custom-integrations remove", "custom-integrations list"] : ["custom-integrations list", "custom-integrations apply", "custom-integrations connect"];
|
|
606
|
-
return {
|
|
607
|
-
card: { ...integrations, gatewayTools: tools, gatewayCommands: commands, skills: ["oxygen-custom-http"], execution: removal ? "Preview the exact custom HTTP connection and tools, then approve the returned plan_hash. Caller definitions and history remain, but bound callers stop working; provider-side key revocation is separate." : "Read oxygen-custom-http for the manifest schema and auth types. Apply registers catalog tools without a provider call; connect stores credentials separately. Preview a tool request before approved live execution." },
|
|
608
|
-
recommendedTools: tools,
|
|
609
|
-
recommendedCommands: commands,
|
|
610
|
-
};
|
|
611
|
-
}
|
|
612
|
-
}
|
|
613
|
-
if (/\b(mailbox(?:es)?|inbox(?:es)?)\b/.test(normalized) && /\b(standby|reserve|replacement|replace|burn(?:ed|t)?)\b/.test(normalized)) {
|
|
614
|
-
const campaign = /\b(campaign|sequence|cadence)\b/.test(normalized);
|
|
615
|
-
const card = ROUTE_BY_ID.get(campaign ? "sequences" : "sending-infrastructure") ?? ROUTE_BY_PRIMITIVE.get("sequences");
|
|
616
|
-
if (card)
|
|
617
|
-
return {
|
|
618
|
-
card,
|
|
619
|
-
recommendedTools: campaign ? ["oxygen_sequences_standby_get", "oxygen_sequences_standby_set", "oxygen_mailboxes_standby_pool"] : ["oxygen_mailboxes_standby_pool", "oxygen_mailboxes_standby_get", "oxygen_mailboxes_standby_set", "oxygen_mailboxes_standby_policy"],
|
|
620
|
-
recommendedCommands: campaign ? ["sequences standby get", "sequences standby set", "mailboxes standby pool"] : ["mailboxes standby pool", "mailboxes standby get", "mailboxes standby set", "mailboxes standby policy"],
|
|
621
|
-
};
|
|
622
|
-
}
|
|
623
|
-
// A complete audience play starts from its Recipe and the shared audience
|
|
624
|
-
// guide; onboarding consults on open-ended goals and never routes this ask.
|
|
625
|
-
// Its source nouns otherwise select a one-shot post search or follower order.
|
|
626
|
-
if (isLinkedInAudienceCampaignIntent(query)) {
|
|
627
|
-
const recipes = ROUTE_BY_ID.get("recipes");
|
|
628
|
-
if (recipes)
|
|
629
|
-
return {
|
|
630
|
-
card: {
|
|
631
|
-
...recipes,
|
|
632
|
-
execution: "Read the inbound-led-outbound Recipe and pick its source (your posts, a competitor's or creator's posts, a topic, your profile viewers, or your followers and connections), resolve current company/ICP context, then read the oxygen-signals file references/audience-campaigns.md. Preserve the exact source, attribution, qualification rule/version and object IDs. Prepare a bounded native audience campaign for email, LinkedIn DM/connection requests or WhatsApp. Keep capture, standing qualification, router and Sequence disabled until their own approval and credit scope; the shared guide owns execution.",
|
|
633
|
-
skills: ["oxygen-recipes", "oxygen-signals"],
|
|
634
|
-
},
|
|
635
|
-
recommendedTools: ["oxygen_recipes_list", "oxygen_recipes_get", "oxygen_context_resolve"],
|
|
636
|
-
recommendedCommands: ["recipes list", "recipes show", "context resolve"],
|
|
637
|
-
exactCommand: `oxygen recipes show ${AUDIENCE_PLAY_SLUG} --json`,
|
|
638
|
-
exactMcpCall: { tool: "oxygen_recipes_get", arguments: { slug: AUDIENCE_PLAY_SLUG } },
|
|
639
|
-
};
|
|
101
|
+
for (const rule of PRE_ROUTE_RULES) {
|
|
102
|
+
const route = rule.route(normalized, query, CARDS);
|
|
103
|
+
if (route)
|
|
104
|
+
return route;
|
|
640
105
|
}
|
|
641
106
|
const explicit = explicitCapabilityIntent(normalized);
|
|
642
107
|
const catalogRow = findEnrichmentIntentByAlias(normalized);
|
|
@@ -667,19 +132,6 @@ export function inferCapabilityRoute(query) {
|
|
|
667
132
|
: {}),
|
|
668
133
|
}, networkMiningEnabled(runtimeEnv())), play);
|
|
669
134
|
}
|
|
670
|
-
/**
|
|
671
|
-
* Contacts at accounts has no play of its own: oxygen-sourcing's SKILL.md sends
|
|
672
|
-
* "merging sources, setting contacts per account" to its playbook reference,
|
|
673
|
-
* so the route points there (2026-10-22 suite: the merge-then-contacts case
|
|
674
|
-
* missed two contacts per account and the second-source rule without it).
|
|
675
|
-
* Contacts already in the CRM stay with Records.
|
|
676
|
-
*/
|
|
677
|
-
function sourcingPlaybookFor(query) {
|
|
678
|
-
return /\b(find contacts|contacts (per|at each) (account|company)|reach at each|people at each)\b/.test(query)
|
|
679
|
-
&& !/\b(crm|existing contacts)\b/.test(query)
|
|
680
|
-
? { skill: "oxygen-sourcing", slug: "playbook", file: "references/playbook.md" }
|
|
681
|
-
: null;
|
|
682
|
-
}
|
|
683
135
|
/** The play rides only on a card that lists its skill, and that skill is named first. */
|
|
684
136
|
function withSkillPlay(route, play) {
|
|
685
137
|
if (!play || !route.card.skills.includes(play.skill))
|
|
@@ -741,108 +193,16 @@ function catalogueRecommendations(row, card) {
|
|
|
741
193
|
exactMcpCall,
|
|
742
194
|
};
|
|
743
195
|
}
|
|
196
|
+
/** The catalogue row's `enrichment catalog --intent <id>` as an MCP call. */
|
|
197
|
+
export function catalogueIntentMcpCall(intentId) {
|
|
198
|
+
return { tool: "oxygen_enrichment_catalog", arguments: { intent: intentId } };
|
|
199
|
+
}
|
|
744
200
|
export function inferPrimitiveRoute(query) {
|
|
745
201
|
const route = inferCapabilityRoute(query);
|
|
746
202
|
if (!route || route.card.primitive === null)
|
|
747
203
|
return null;
|
|
748
204
|
return route;
|
|
749
205
|
}
|
|
750
|
-
/**
|
|
751
|
-
* Skills OXYGEN once served and has retired (2026-10-04: plays are inspiration
|
|
752
|
-
* read through the recipes API, never skills, and visual design is taught by
|
|
753
|
-
* its commands' own help; LinkedIn marketing split into the Publishing and
|
|
754
|
-
* Signals feature skills, with its account-safety rules in the sequencer's
|
|
755
|
-
* LinkedIn reference). The manifest no longer serves them, so nothing new
|
|
756
|
-
* can install, attach or advertise them; their audience below stays so an Agent
|
|
757
|
-
* version or Copilot session that already pinned one keeps its snapshot.
|
|
758
|
-
*/
|
|
759
|
-
export const RETIRED_PRODUCT_SKILLS = Object.freeze(["oxygen-playbooks", "oxygen-visual-design", "oxygen-linkedin-marketing"]);
|
|
760
|
-
/** Current hosted instruction audiences, shared by discovery and Agent snapshots. */
|
|
761
|
-
export const OXYGEN_PRODUCT_SKILL_AUDIENCES = Object.freeze({
|
|
762
|
-
"oxygen-reply-oxygent": "internal_dev",
|
|
763
|
-
"oxygen-geo": "internal_dev",
|
|
764
|
-
"oxygen-onboarding": "workspace",
|
|
765
|
-
"oxygen-gtm-consultant": "workspace",
|
|
766
|
-
"oxygen-gtm": "workspace",
|
|
767
|
-
"oxygen-tables": "workspace",
|
|
768
|
-
"oxygen-enrichment": "workspace",
|
|
769
|
-
"oxygen-sourcing": "workspace",
|
|
770
|
-
"oxygen-crm": "workspace",
|
|
771
|
-
"oxygen-recipes": "workspace",
|
|
772
|
-
"oxygen-agency-directory": "agency_partner",
|
|
773
|
-
"oxygen-collaboration": "workspace",
|
|
774
|
-
"oxygen-quickstart": "workspace",
|
|
775
|
-
"oxygen-workflow-authoring": "workspace",
|
|
776
|
-
"oxygen-knowledge": "workspace",
|
|
777
|
-
"oxygen-unibox": "workspace",
|
|
778
|
-
"oxygen-email-infra": "workspace",
|
|
779
|
-
"oxygen-deliverability": "workspace",
|
|
780
|
-
"oxygen-sequencer": "workspace",
|
|
781
|
-
"oxygen-publishing": "workspace",
|
|
782
|
-
"oxygen-linkedin-content": "workspace",
|
|
783
|
-
"oxygen-signals": "workspace",
|
|
784
|
-
"oxygen-table-tidy": "workspace",
|
|
785
|
-
"oxygen-diagnostics": "workspace",
|
|
786
|
-
"oxygen-feedback": "workspace",
|
|
787
|
-
"oxygen-clay-migration": "workspace",
|
|
788
|
-
"oxygen-ugc": "workspace",
|
|
789
|
-
"oxygen-custom-http": "workspace",
|
|
790
|
-
// Retired (RETIRED_PRODUCT_SKILLS): readable for existing pins, never served.
|
|
791
|
-
"oxygen-playbooks": "workspace",
|
|
792
|
-
"oxygen-visual-design": "workspace",
|
|
793
|
-
"oxygen-linkedin-marketing": "workspace",
|
|
794
|
-
});
|
|
795
|
-
export function canReadProductSkillInstructions(name, entitlements) {
|
|
796
|
-
if (entitlements.authenticated !== true)
|
|
797
|
-
return false;
|
|
798
|
-
const audience = Object.hasOwn(OXYGEN_PRODUCT_SKILL_AUDIENCES, name)
|
|
799
|
-
? OXYGEN_PRODUCT_SKILL_AUDIENCES[name]
|
|
800
|
-
: undefined;
|
|
801
|
-
return audience === "workspace" || (audience === "internal_dev" && entitlements.internalDev === true) || (audience === "agency_partner" && entitlements.agencyPartner);
|
|
802
|
-
}
|
|
803
|
-
/** Identify hosted instruction bodies by native tool lineage, never by user prose. */
|
|
804
|
-
export function readProductSkillInstructionResult(capabilityName, result) {
|
|
805
|
-
if (capabilityName !== "oxygen_skills_get")
|
|
806
|
-
return null;
|
|
807
|
-
const pending = [result];
|
|
808
|
-
for (let i = 0; i < pending.length && i < 24; i += 1) {
|
|
809
|
-
let value = pending[i];
|
|
810
|
-
if (typeof value === "string") {
|
|
811
|
-
try {
|
|
812
|
-
value = JSON.parse(value);
|
|
813
|
-
}
|
|
814
|
-
catch {
|
|
815
|
-
continue;
|
|
816
|
-
}
|
|
817
|
-
}
|
|
818
|
-
if (value === null || typeof value !== "object" || Array.isArray(value))
|
|
819
|
-
continue;
|
|
820
|
-
const envelope = value;
|
|
821
|
-
if (envelope.ok === false || envelope.isError === true || envelope.status === "error")
|
|
822
|
-
continue;
|
|
823
|
-
if (typeof envelope.content === "string") {
|
|
824
|
-
const name = typeof envelope.name === "string" ? envelope.name : "";
|
|
825
|
-
return { slug: Object.hasOwn(OXYGEN_PRODUCT_SKILL_AUDIENCES, name) ? name : null };
|
|
826
|
-
}
|
|
827
|
-
for (const key of ["result", "data", "structuredContent", "structured"]) {
|
|
828
|
-
if (envelope[key] !== undefined)
|
|
829
|
-
pending.push(envelope[key]);
|
|
830
|
-
}
|
|
831
|
-
if (Array.isArray(envelope.content)) {
|
|
832
|
-
for (const block of envelope.content) {
|
|
833
|
-
if (block && typeof block === "object" && block.type === "text" && typeof block.text === "string")
|
|
834
|
-
pending.push(block.text);
|
|
835
|
-
}
|
|
836
|
-
}
|
|
837
|
-
}
|
|
838
|
-
return null;
|
|
839
|
-
}
|
|
840
|
-
/** Public action cards never advertise invite-only, retired or unknown skill instructions. */
|
|
841
|
-
export function isPublicCapabilitySkill(name) {
|
|
842
|
-
return Object.hasOwn(OXYGEN_PRODUCT_SKILL_AUDIENCES, name)
|
|
843
|
-
&& OXYGEN_PRODUCT_SKILL_AUDIENCES[name] === "workspace"
|
|
844
|
-
&& !RETIRED_PRODUCT_SKILLS.includes(name);
|
|
845
|
-
}
|
|
846
206
|
export function serializeCapabilityRoute(route, surfaceOrOptions = "cli", options = {}) {
|
|
847
207
|
const surface = typeof surfaceOrOptions === "string" ? surfaceOrOptions : "cli";
|
|
848
208
|
const visibleSkills = typeof surfaceOrOptions === "string" ? options.visibleSkills : surfaceOrOptions.visibleSkills;
|
|
@@ -899,1791 +259,78 @@ export function serializeCapabilityRoute(route, surfaceOrOptions = "cli", option
|
|
|
899
259
|
},
|
|
900
260
|
};
|
|
901
261
|
}
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
const AUDIENCE_PLAY_SLUGS = [
|
|
909
|
-
AUDIENCE_PLAY_SLUG,
|
|
910
|
-
"own-post-engagers",
|
|
911
|
-
"competitor-post-engagers",
|
|
912
|
-
"creator-post-engagers",
|
|
913
|
-
"keyword-post-engagers",
|
|
914
|
-
"company-page-followers",
|
|
915
|
-
"own-profile-followers",
|
|
916
|
-
];
|
|
917
|
-
/** Whole audience acquisition/outreach; individual reads and runtime controls keep their owners. */
|
|
918
|
-
function isLinkedInAudienceCampaignIntent(rawQuery) {
|
|
919
|
-
const query = normalizeIntent(rawQuery);
|
|
920
|
-
// Match exact Recipe slugs before punctuation normalization makes a slug
|
|
921
|
-
// indistinguishable from a plain company-page follower research request.
|
|
922
|
-
const canonicalPlay = new RegExp(`\\b(?:${AUDIENCE_PLAY_SLUGS.join("|")})\\b`, "i").exec(rawQuery);
|
|
923
|
-
if (canonicalPlay?.[0].toLowerCase() === rawQuery.trim().toLowerCase())
|
|
924
|
-
return true;
|
|
925
|
-
if (!/\blinkedin\b/.test(query) && !canonicalPlay)
|
|
926
|
-
return false;
|
|
927
|
-
// Audience nouns can be the subject of a local read/control operation. Only
|
|
928
|
-
// explicit acquisition/setup language may turn such a request into a play.
|
|
929
|
-
const acquisition = /\b(build|prepare|create|start|launch|scrape|capture|collect)\b|\bset up\b/.test(query);
|
|
930
|
-
if (!acquisition && /\b(show|list|read|inspect|verify|validate|label|classify|tag|rank|grade|score|rename|update|change|edit|delete|remove|clear|export|import)\b/.test(query))
|
|
931
|
-
return false;
|
|
932
|
-
if (/\boxygen_\w+\b/i.test(rawQuery)
|
|
933
|
-
|| isUgcIntent(query)
|
|
934
|
-
|| isWorkspacePagesIntent(query) || isWorkspaceSettingsIntent(query)
|
|
935
|
-
|| isPublishingPostIntent(query) || isFirstCommentIntent(query)
|
|
936
|
-
|| isPostCoverOrPreviewIntent(query) || isFailedPostIntent(query)
|
|
937
|
-
|| isOwnedPostCommentIntent(query) || isSecondPartyDecisionIntent(query)
|
|
938
|
-
|| tableReadRecommendation(query) || tableMaintenanceRecommendation(query)
|
|
939
|
-
|| isSequenceScheduleIntent(query) || isSequenceUnsubscribeIntent(query) || isSequenceInvitationTimeoutIntent(query)
|
|
940
|
-
|| isSenderProfileIntent(query) || isSenderCopyVariableIntent(query)
|
|
941
|
-
|| isLinkedInAccountLimitsIntent(query)
|
|
942
|
-
|| /\b(workflows?|sequences?|cadences?|webhook|cron|event trigger|branching|retries)\b/.test(query)
|
|
943
|
-
|| /\b(status|pause|resume|disable|enable|logs?|tail|price|pricing|order)\b/.test(query)
|
|
944
|
-
|| /\b(known|this|single|one) posts?\b|linkedin\.com\/(?:posts\/|feed\/update\/)/.test(query)
|
|
945
|
-
|| /\b(one|single) (?:of them|person|recipient)\b/.test(query))
|
|
946
|
-
return false;
|
|
947
|
-
if (canonicalPlay)
|
|
948
|
-
return true;
|
|
949
|
-
const audienceFromSources = /\baudience\b/.test(query) && /\b(from|using|sources?|based on)\b/.test(query);
|
|
950
|
-
if (audienceFromSources && /\b(posts?|creators?|keywords?|profiles?|followers?)\b/.test(query))
|
|
951
|
-
return true;
|
|
952
|
-
const engagement = /\bposts?\b/.test(query) && /\b(engagers?|engaged|engagement|reactors?|reacting|reactions?|commenters?|commenting)\b/.test(query);
|
|
953
|
-
const followers = /\bfollowers?\b/.test(query);
|
|
954
|
-
if (!engagement && !followers)
|
|
955
|
-
return false;
|
|
956
|
-
const outreach = /\b(campaigns?|outreach|warm outbound|inbound led outbound)\b/.test(query)
|
|
957
|
-
|| /\b(?:cold )?(email|dm|whatsapp|invite) (?:them|the (?:engagers|followers|audience))\b/.test(query)
|
|
958
|
-
|| /\b(send|start)\b.{0,35}\b(emails?|dms?|connection requests?|invitations?|whatsapp messages?)\b/.test(query);
|
|
959
|
-
const namedPlay = /\b(recipes?|playbooks?|plays?|whole motion|complete motion|end to end motion)\b/.test(query);
|
|
960
|
-
return outreach || namedPlay;
|
|
961
|
-
}
|
|
962
|
-
/**
|
|
963
|
-
* "LinkedIn posts about X" / "posts mentioning Y" / "monitor LinkedIn posts by
|
|
964
|
-
* keyword" is keyword post search, a Signals source with all-of / any-of /
|
|
965
|
-
* exclude rules. A blind user eval (2026-09-23) asked exactly this and was
|
|
966
|
-
* routed to Workflows, never learning `signals search --family linkedin_posts`
|
|
967
|
-
* exists. Posts FROM named profiles stay with the Profile Watcher, and the
|
|
968
|
-
* workspace's own posts stay with Posts. The free preview leads: it shows real
|
|
969
|
-
* posts, with the AI filter applied, before a table exists.
|
|
970
|
-
*/
|
|
971
|
-
const LINKEDIN_KEYWORD_POST_COMMAND = 'oxygen signals search preview --family linkedin_posts --keywords "<any of>" --all-keywords "<all of>" --exclude-keywords "<none of>" --ai-filter "<posts to keep>" --json';
|
|
972
|
-
/**
|
|
973
|
-
* Running (or joining) a creator program is UGC, which lives on the Publishing
|
|
974
|
-
* card. Checked before the LinkedIn keyword-post rule: "a creator program where
|
|
975
|
-
* LinkedIn creators post about my product" is not a keyword search (2026-09-29
|
|
976
|
-
* baselines routed it to Signals, and "creator program" to post tools).
|
|
977
|
-
*/
|
|
978
|
-
function isUgcProgramIntent(query) {
|
|
979
|
-
return /\b(ugc|user[- ]generated content|creator programs?|ambassador programs?|brand ambassadors?)\b/.test(query)
|
|
980
|
-
|| /\b(invite|recruit|onboard|sponsor)\w*\b.{0,30}\bcreators?\b/.test(query)
|
|
981
|
-
|| /\bcreators?\b.{0,40}\bpost\w*\b.{0,20}\babout (my|our)\b/.test(query);
|
|
982
|
-
}
|
|
983
|
-
/** The creator's side of a program: find one, apply, or accept an invitation. */
|
|
984
|
-
function isUgcCreatorSideIntent(query) {
|
|
985
|
-
return /\b(join|apply|applying|find|discover|browse|accept)\w*\b.{0,30}\b(creator|ugc|ambassador) programs?\b/.test(query);
|
|
986
|
-
}
|
|
987
|
-
/** The lifecycle verb of an operator's program ask ("archive program", "delete my creator program"), or null. */
|
|
988
|
-
function ugcProgramLifecycleVerb(query) {
|
|
989
|
-
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;
|
|
990
|
-
}
|
|
991
|
-
/** The `ugc programs` leaf and MCP tool per lifecycle verb; delete previews first and names archive when refused. */
|
|
992
|
-
const UGC_PROGRAM_LIFECYCLE = {
|
|
993
|
-
archive: ["ugc programs archive", "oxygen_ugc_program_update"],
|
|
994
|
-
restore: ["ugc programs restore", "oxygen_ugc_program_update"],
|
|
995
|
-
delete: ["ugc programs delete", "oxygen_ugc_program_delete"],
|
|
996
|
-
remove: ["ugc programs delete", "oxygen_ugc_program_delete"],
|
|
997
|
-
duplicate: ["ugc programs duplicate", "oxygen_ugc_program_duplicate"],
|
|
998
|
-
copy: ["ugc programs duplicate", "oxygen_ugc_program_duplicate"],
|
|
999
|
-
clone: ["ugc programs duplicate", "oxygen_ugc_program_duplicate"],
|
|
1000
|
-
};
|
|
1001
|
-
/**
|
|
1002
|
-
* A creator's own writing voice: `ugc voice import` learns it from their LinkedIn
|
|
1003
|
-
* history (the web's "Learn your writing voice") and `ugc voice save` keeps what
|
|
1004
|
-
* they write themselves. Only an ask that names the creator context routes here:
|
|
1005
|
-
* "learn my writing voice from my LinkedIn messages" is just as likely the
|
|
1006
|
-
* workspace voice `knowledge synthesize --kind voice` learns from sent LinkedIn and
|
|
1007
|
-
* WhatsApp messages, and brand voice stays with the Knowledge Graph.
|
|
1008
|
-
*/
|
|
1009
|
-
function isUgcVoiceIntent(query) {
|
|
1010
|
-
return /\bcreators?'?s? voice\b/.test(query)
|
|
1011
|
-
|| (/\bvoice\b/.test(query) && /\b(creator|ugc|ambassador)s?\b/.test(query) && !/\bbrand voice\b/.test(query));
|
|
1012
|
-
}
|
|
1013
|
-
/**
|
|
1014
|
-
* Who approves a creator's post. It is the creator, or the program organizer when
|
|
1015
|
-
* the creator delegated approval; a brand can never require its own approval of
|
|
1016
|
-
* creator posts (Philipp, 2026-09-29).
|
|
1017
|
-
* The MCP acceptance run's "brand approval of creator post before publish" routed
|
|
1018
|
-
* to the Knowledge Graph, so the rule it needed never reached it. Only an
|
|
1019
|
-
* approval word next to a creator's post counts: "find LinkedIn creator posts
|
|
1020
|
-
* about AI" stays a keyword post search.
|
|
1021
|
-
*/
|
|
1022
|
-
function isUgcPostApprovalIntent(query) {
|
|
1023
|
-
return /\b(?:approv\w*|review\w*|sign[- ]?off)\b.{0,40}\b(?:creator|ugc|ambassador)s?'?\s+posts?\b/.test(query)
|
|
1024
|
-
|| /\b(?:creator|ugc|ambassador)s?'?\s+posts?\b.{0,40}\b(?:approv\w*|review\w*|sign[- ]?off)\b/.test(query)
|
|
1025
|
-
|| /\bbrand (?:approval|review)\b.{0,40}\b(?:creators?|ugc|ambassadors?)\b/.test(query);
|
|
1026
|
-
}
|
|
1027
|
-
function isUgcIntent(query) {
|
|
1028
|
-
return isUgcProgramIntent(query) || isUgcCreatorSideIntent(query) || isUgcVoiceIntent(query)
|
|
1029
|
-
|| isUgcPostApprovalIntent(query) || ugcProgramLifecycleVerb(query) !== null;
|
|
1030
|
-
}
|
|
1031
|
-
/**
|
|
1032
|
-
* UGC is Publishing's creator-program subpage (OXYGEN_PRODUCT.md § UGC programs): a
|
|
1033
|
-
* creator-program ask keeps the publishing id, primitive, endpoint sections and
|
|
1034
|
-
* gateways, but must not read Publishing's post-scheduler ownership back (UGC E2E pass, 2026-09-29).
|
|
1035
|
-
*/
|
|
1036
|
-
const UGC_ROUTE_VIEW = {
|
|
1037
|
-
owns: "UGC creator programs: brand programs, creator invitations and applications, participations, creator voice, program post drafts and approvals, sponsorship, results, and bounded amplification.",
|
|
1038
|
-
notFor: "Scheduling the workspace's own posts, one-to-one messaging, outreach campaigns, or keyword post search.",
|
|
1039
|
-
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.",
|
|
1040
|
-
posture: "mixed",
|
|
1041
|
-
skills: ["oxygen-ugc", "oxygen-publishing"],
|
|
1042
|
-
};
|
|
1043
|
-
/** Saved CRM preset configuration is a Records read, not an enrichment run. */
|
|
1044
|
-
function isCrmEnrichmentConfigurationRead(query) {
|
|
1045
|
-
if (!/\bcrm\b/.test(query) || !/\benrich\w*\b/.test(query))
|
|
1046
|
-
return false;
|
|
1047
|
-
// Remove only local negated execution restrictions. A later positive verb
|
|
1048
|
-
// ("read, do not change this, then enable...") still rejects this read view.
|
|
1049
|
-
const intent = query.replace(/\bnot a provider run\b/g, "")
|
|
1050
|
-
.replace(/\b(?:do not|don't|without)\s+(?:any\s+)?(?:chang(?:e|ing)|runn?ing|run|enabl(?:e|ing)|disabl(?:e|ing)|configur(?:e|ing)|send(?:ing)?|sync(?:ing)?)\b/g, "");
|
|
1051
|
-
if (/\b(tables?|columns?|workflows?|agents?|functions?|callables?|providers?|hubspot|sync|deals?|custom|fields?|values?|history|failed|items?)\b/.test(intent))
|
|
1052
|
-
return false;
|
|
1053
|
-
if (/\b(enable|disable|set|configure|change|run|running|backfill|send|create|start|execute|apply)\b/.test(intent))
|
|
1054
|
-
return false;
|
|
1055
|
-
return /\b(configur(?:ation|ed)|settings?|presets?|auto(?:matic)?|armed|enabled|backlog)\b/.test(intent)
|
|
1056
|
-
&& /\b(read|inspect|list|show|view|what|which|how many|current|existing|already)\b/.test(intent);
|
|
1057
|
-
}
|
|
1058
|
-
function crmEnrichmentReadRecommendation(query) {
|
|
1059
|
-
const omitCounts = /\b(?:skip|omit|leave)\b.{0,45}\bcounts?\b|\bwithout\b.{0,45}\b(?:counts?|scanning historical records)\b/.test(query);
|
|
1060
|
-
return {
|
|
1061
|
-
tools: ["oxygen_crm_enrichment"], commands: ["crm enrichment list"],
|
|
1062
|
-
exactCommand: `oxygen crm enrichment list${omitCounts ? " --no-backfill" : ""} --projection summary --json`,
|
|
1063
|
-
exactMcpCall: { tool: "oxygen_crm_enrichment", arguments: { action: "list", ...(omitCounts ? { backfill: false } : {}), projection: "summary" } },
|
|
1064
|
-
};
|
|
1065
|
-
}
|
|
1066
|
-
/** Stored communications linked to one CRM record use its bounded native read. */
|
|
1067
|
-
function crmConnectionsReadRecommendation(query) {
|
|
1068
|
-
if (!/\b(?:crm|records?)\b/.test(query)
|
|
1069
|
-
|| !/\b(?:conversations?|sequences?|communications?)\b/.test(query)
|
|
1070
|
-
|| !/\b(?:connected|linked|links|associated|belongs?)\b/.test(query)
|
|
1071
|
-
|| !/\b(?:read|show|list|inspect|view)\b/.test(query)
|
|
1072
|
-
|| isHostedWorkflowIntent(query)
|
|
1073
|
-
|| /\b(?:send\w*|repl(?:y|ies|ied|ying)|draft\w*|compos\w*|enroll\w*|launch\w*|creat\w*|schedul\w*|edit\w*|updat\w*|chang\w*|delet\w*|remov\w*|merg\w*|attach\w*|complet\w*|finish\w*|prepar\w*|reserv\w*|renam\w*|archiv\w*|assign\w*|cancel\w*|set(?:s|ting)?|add\w*|appl(?:y|ies|ied|ying)|clear\w*|tables?|workflows?|agents?|providers?|sync\w*|import\w*)\b/.test(query))
|
|
1074
|
-
return null;
|
|
1075
|
-
return {
|
|
1076
|
-
tools: ["oxygen_crm_record_connections"], commands: ["crm connections"],
|
|
1077
|
-
execution: "Read stored conversations and Sequence links for one CRM record with oxygen_crm_record_connections. Request projection=compact and a max_chars window; conversation_limit and sequence_limit bound the recent links. hasMore includes older or omitted links; this read has no cursor for older links and does not sync Messages, contact anyone or spend credits.",
|
|
1078
|
-
};
|
|
1079
|
-
}
|
|
1080
|
-
/**
|
|
1081
|
-
* "Tell me everything about this person" is a stored-Records read. Before this
|
|
1082
|
-
* rule it matched no card, and lexical search ranked a write tool
|
|
1083
|
-
* (oxygen_profile_viewers_enrichment) first. Every recommended tool is free.
|
|
1084
|
-
*/
|
|
1085
|
-
function recordDossierReadRecommendation(query) {
|
|
1086
|
-
const recordNoun = "(?:person|people|lead|leads|contact|contacts|prospect|prospects|account|accounts|customer|buyer|record|company|someone)";
|
|
1087
|
-
const subject = new RegExp(`\\b(?:this|that|the|my|our|a|one)\\s+(?:${recordNoun})\\b`).test(query)
|
|
1088
|
-
|| /\b(?:them|him|her|they)\b/.test(query)
|
|
1089
|
-
|| /\b(?:know|knows|have|has|got)\s+(?:about|on)\s+(?!our\b|my\b|the\b|us\b)[a-z]+(?:\s+[a-z]+)?\s*\??$/.test(query)
|
|
1090
|
-
|| /\b(?:call|meeting|chat)\s+with\s+[a-z]+(?:\s+[a-z]+)?\s*\??$/.test(query);
|
|
1091
|
-
// "profile, timeline, notes, conversations, meetings": several facets of one record at once.
|
|
1092
|
-
const facets = query.match(/\b(?:profile|timeline|activity|notes?|signals?|conversations?|messages|sequences?|meetings?|calls?|tasks?|related|connections?)\b/g) ?? [];
|
|
1093
|
-
const enumerated = new Set(facets.map((facet) => facet.replace(/s$/, ""))).size >= 3
|
|
1094
|
-
&& new RegExp(`\\b(?:${recordNoun})\\b`).test(query);
|
|
1095
|
-
const dossier = enumerated
|
|
1096
|
-
|| /\beverything\s+(?:about|on|we\s+(?:know|have))\b/.test(query)
|
|
1097
|
-
|| /\beverything\b.{0,40}\b(?:knows?|has|have|stores?|stored)\b(?:.{0,12}\b(?:about|on)\b)?/.test(query)
|
|
1098
|
-
|| /\bwhat\s+(?:do|does|did)\s+(?:we|i|you|oxygen|the\s+workspace)\s+(?:already\s+)?know\b/.test(query)
|
|
1099
|
-
|| /\ball\s+(?:the\s+)?(?:info|information|data|details|context)\s+(?:on|about|for)\b/.test(query)
|
|
1100
|
-
|| /\bfull\s+(?:picture|story|history|context)\b/.test(query)
|
|
1101
|
-
|| /\b(?:prep|prepare)\s+(?:me\s+)?for\s+(?:a\s+|my\s+|the\s+)?(?:call|meeting|chat)\s+with\b/.test(query)
|
|
1102
|
-
|| /\b(?:full|complete|quick|short)?\s*(?:brief|briefing|dossier|background|profile|summary|overview)\s+(?:on|of|for|about)\b/.test(query)
|
|
1103
|
-
|| /\b(?:summari[sz]e|brief me on|tell me about|catch me up on|background on)\b/.test(query);
|
|
1104
|
-
if (!subject && !enumerated)
|
|
1105
|
-
return null;
|
|
1106
|
-
if (!dossier)
|
|
1107
|
-
return null;
|
|
1108
|
-
if (isHostedWorkflowIntent(query)
|
|
1109
|
-
|| /\b(?:send\w*|repl(?:y|ies)|draft\w*|writ\w*|enroll\w*|enrich\w*|find (?:their |the |a )?(?:email|phone|mobile)|scrape\w*|creat\w*|updat\w*|edit\w*|merg\w*|delet\w*|remov\w*|import\w*|sync\w*|tag\w*)\b/.test(query))
|
|
1110
|
-
return null;
|
|
1111
|
-
// Naming another primitive's object is a different owner, unless the ask
|
|
1112
|
-
// enumerates one record's facets ("its notes, conversations, sequences").
|
|
1113
|
-
if (!enumerated && /\b(?:icp|ideal customer|positioning|offers?|brand|voice|meetings?|calls? (?:transcript|recording)s?|tables?|rows?|columns?|spreadsheets?|workflows?|agents?|sequences?|campaigns?|dashboards?|reports?|billing|credits?)\b/.test(query))
|
|
1114
|
-
return null;
|
|
1115
|
-
return {
|
|
1116
|
-
tools: [
|
|
1117
|
-
"oxygen_crm_record_search", "oxygen_crm_record_get", "oxygen_crm_record_timeline",
|
|
1118
|
-
"oxygen_crm_record_connections", "oxygen_crm_notes_list", "oxygen_crm_record_related",
|
|
1119
|
-
],
|
|
1120
|
-
commands: ["crm search", "crm get", "crm activity timeline", "crm connections", "crm notes list", "crm related"],
|
|
1121
|
-
execution: "Read what the workspace already stores about one record: resolve it with search (a name, email, domain or LinkedIn URL), then get its fields and identities, its timeline (signals, calls, meetings, notes), connected conversations and Sequences, notes and related records. Every read is free and contacts no one. Finding missing contact data or enriching is a separate paid action. External MCP uses oxygen_capabilities_read for unlisted reads; built-in agents invoke the native tools.",
|
|
1122
|
-
};
|
|
1123
|
-
}
|
|
1124
|
-
const RECORD_DOSSIER_FIRST_COMMANDS = ["crm search", "crm get", "crm activity timeline"];
|
|
1125
|
-
const RECORD_BRIEF_TOOL = "oxygen_crm_record_brief";
|
|
1126
|
-
const RECORD_BRIEF_COMMAND = "crm brief";
|
|
1127
|
-
const RECORD_BRIEF_EXECUTION_PREFIX = `Start with ${RECORD_BRIEF_COMMAND} (${RECORD_BRIEF_TOOL}): one free read of everything stored about the record. It takes the row id, an identity or the exact name, so no search comes first, and each cut section names the read for its rest; use the reads below only for those. `;
|
|
1128
|
-
/**
|
|
1129
|
-
* Put the Network Mining record brief first on a record-dossier route where the
|
|
1130
|
-
* host serves it, and take it off where it does not. The shared router decides
|
|
1131
|
-
* by `networkMiningEnabled` in its own process; the CLI decides again by its
|
|
1132
|
-
* API host, because its local environment says nothing about the server's.
|
|
1133
|
-
* Idempotent; any other route is returned unchanged.
|
|
1134
|
-
*/
|
|
1135
|
-
export function withRecordBrief(route, served) {
|
|
1136
|
-
if (route.card.id !== "records")
|
|
1137
|
-
return route;
|
|
1138
|
-
const briefed = route.recommendedTools[0] === RECORD_BRIEF_TOOL;
|
|
1139
|
-
if (!served) {
|
|
1140
|
-
if (!briefed)
|
|
1141
|
-
return route;
|
|
1142
|
-
return {
|
|
1143
|
-
...route,
|
|
1144
|
-
card: { ...route.card, execution: route.card.execution.replace(RECORD_BRIEF_EXECUTION_PREFIX, "") },
|
|
1145
|
-
recommendedTools: route.recommendedTools.slice(1),
|
|
1146
|
-
recommendedCommands: route.recommendedCommands.filter((command) => command !== RECORD_BRIEF_COMMAND),
|
|
1147
|
-
};
|
|
262
|
+
/** The card an explicit ask owns: the first explicit rule that names one. */
|
|
263
|
+
function explicitCapabilityIntent(query) {
|
|
264
|
+
for (const rule of EXPLICIT_RULES) {
|
|
265
|
+
const id = rule.route(query);
|
|
266
|
+
if (id !== null)
|
|
267
|
+
return ROUTE_BY_ID.get(id) ?? null;
|
|
1148
268
|
}
|
|
1149
|
-
if (briefed || !RECORD_DOSSIER_FIRST_COMMANDS.every((command, index) => route.recommendedCommands[index] === command))
|
|
1150
|
-
return route;
|
|
1151
|
-
return {
|
|
1152
|
-
...route,
|
|
1153
|
-
card: { ...route.card, execution: `${RECORD_BRIEF_EXECUTION_PREFIX}${route.card.execution}` },
|
|
1154
|
-
recommendedTools: [RECORD_BRIEF_TOOL, ...route.recommendedTools],
|
|
1155
|
-
recommendedCommands: [RECORD_BRIEF_COMMAND, ...route.recommendedCommands],
|
|
1156
|
-
};
|
|
1157
|
-
}
|
|
1158
|
-
/** Record-file lifecycle asks outrank the generic workspace label vocabulary. */
|
|
1159
|
-
function crmFileUploadRecommendation(query) {
|
|
1160
|
-
// Literal filenames and record identities are values, not competing owners:
|
|
1161
|
-
// mailbox.csv or sarah@acme.com must not turn a record upload into mail work.
|
|
1162
|
-
const intent = query
|
|
1163
|
-
.replace(/\b[^\s@]+@[^\s@]+\b/g, "identity")
|
|
1164
|
-
.replace(/\b(?:file ?name|filename|named|label)\s+(["'])[^"']*\1/g, "value")
|
|
1165
|
-
.replace(/\b(?:file ?name|filename|named)\s+\S+/g, "value")
|
|
1166
|
-
.replace(/\S+\.[a-z0-9]{1,12}\b/g, "value");
|
|
1167
|
-
if (!/\b(?:crm|records?)\b/.test(intent)
|
|
1168
|
-
|| !/\b(?:files?|attachments?|uploads?|uploaded)\b/.test(intent))
|
|
1169
|
-
return null;
|
|
1170
|
-
if (isHostedWorkflowIntent(intent)
|
|
1171
|
-
|| /\b(?:tags?|tagging|classif\w*|categori[sz]\w*|tables?|spreadsheets?|datasets?|worksheets?|columns?|copilot|sessions?|workflows?|agents?|functions?|callables?|recurring|mailboxes?|inbox|messages?|knowledge|wiki|repositories|repository|skills?|logos?|branding|avatars?|hubspot|attio|pipedrive|salesforce)\b/.test(intent)
|
|
1172
|
-
|| /\b(?:send|reply|compose)\b/.test(intent)
|
|
1173
|
-
|| /\b(?:email|e mail)\s+attachments?\b/.test(intent))
|
|
1174
|
-
return null;
|
|
1175
|
-
const complete = /\b(?:finish|complete|confirm)\b/.test(intent)
|
|
1176
|
-
&& /\b(?:uploads?|uploaded|prepared|reserved)\b/.test(intent);
|
|
1177
|
-
const list = /\b(?:list|show|inspect|view)\b/.test(intent);
|
|
1178
|
-
if (list && !complete && /\b(?:pending|prepared|reserved|incomplete)\b/.test(intent))
|
|
1179
|
-
return null;
|
|
1180
|
-
const prepare = /\b(?:prepare|reserve|attach)\b/.test(intent);
|
|
1181
|
-
const boundary = "A record-local label names this attachment; it is separate from workspace Tags and the stored filename. Preparing or completing writes workspace state under the existing authorization; discovery does not approve a write.";
|
|
1182
|
-
if (complete)
|
|
1183
|
-
return {
|
|
1184
|
-
tools: ["oxygen_crm_files_upload_complete", "oxygen_crm_files_upload_prepare", "oxygen_crm_files_list"],
|
|
1185
|
-
commands: ["crm files complete-upload", "crm files prepare-upload", "crm files list"],
|
|
1186
|
-
execution: `Hydrate oxygen_crm_files_upload_complete to confirm a prepared upload after its exact bytes were PUT; completion verifies the reserved file before attaching. List the record's files to inspect existing attachments. ${boundary}`,
|
|
1187
|
-
};
|
|
1188
|
-
if (prepare || (!list && /\bupload\b/.test(intent)))
|
|
1189
|
-
return {
|
|
1190
|
-
tools: ["oxygen_crm_files_upload_prepare", "oxygen_crm_files_upload_complete", "oxygen_crm_files_list"],
|
|
1191
|
-
commands: ["crm files prepare-upload", "crm files complete-upload", "crm files list"],
|
|
1192
|
-
execution: `Hydrate oxygen_crm_files_upload_prepare to reserve an exact filename, byte length and SHA-256. Preparation does not attach; upload the declared bytes before completing. ${boundary}`,
|
|
1193
|
-
};
|
|
1194
|
-
if (list)
|
|
1195
|
-
return {
|
|
1196
|
-
tools: ["oxygen_crm_files_list"],
|
|
1197
|
-
commands: ["crm files list"],
|
|
1198
|
-
execution: `List the record's attached originals with oxygen_crm_files_list; this does not list pending upload reservations. ${boundary}`,
|
|
1199
|
-
};
|
|
1200
|
-
return null;
|
|
1201
|
-
}
|
|
1202
|
-
/** Stored inspections precede similarly named execution and review queues. */
|
|
1203
|
-
function readInspectionRecommendation(query) {
|
|
1204
|
-
const positive = query.replace(/\b(?:do not|don't)\b(?:(?!\b(?:but|then)\b)[^.;])*/g, "");
|
|
1205
|
-
const documentation = positive.replace(/\b(?:would|could|how to)\s+(?:review|create|approve|schedule|publish)(?:\s+(?:and|or)\s+(?:review|create|approve|schedule|publish))*/g, "hypothetical action");
|
|
1206
|
-
const action = /\b(?:but|then)\s+(?:please\s+)?(?:creat\w*|updat\w*|edit\w*|delet\w*|cancel\w*|approv\w*|schedul\w*|publish\w*|sav\w*|enabl\w*|appl\w*|send\w*|clear\w*|set|add)\b/.test(query);
|
|
1207
|
-
if (action)
|
|
1208
|
-
return null;
|
|
1209
|
-
const stored = positive.replace(/\bwithout\s+(?:changing|approving|rejecting|publishing|running|executing|refreshing)\b(?:\s+(?:widget\s+)?data\b)?/g, "");
|
|
1210
|
-
// A daily cap is context for an inbox inspection, not a recurring job or a
|
|
1211
|
-
// request to change its volume. Keep explicit writes and other owners intact.
|
|
1212
|
-
const mailboxInspection = stored.replace(/\bdaily (?:(?:campaign|sending|email) )?(?:limits?|caps?)\b/g, "sending limit");
|
|
1213
|
-
if (/\b(?:mailbox(?:es)?|inbox(?:es)?|email accounts?|email senders?)\b/.test(stored)
|
|
1214
|
-
&& /\b(?:health|reputation|rejections?|bounc\w*|deliverability|dsn|ndr)\b/.test(stored)
|
|
1215
|
-
&& !isHostedWorkflowIntent(mailboxInspection)
|
|
1216
|
-
&& !isSecondPartyDecisionIntent(stored)
|
|
1217
|
-
&& !/\b(?:linkedin|whatsapp|sequences?|campaigns?|tables?|columns?|crm|posts?|messages?|conversations?|threads?|dns|spf|dkim|dmarc|verify|verification|create|write|edit|update|change|delete|remove|archive|save|approve|reject|publish|run|running|execute|send|refresh|launch|enable|disable|apply|import|sync|schedule|enroll|add|set|pause|resume|test)\b/.test(mailboxInspection))
|
|
1218
|
-
return {
|
|
1219
|
-
capabilityId: "sending-infrastructure",
|
|
1220
|
-
tools: ["oxygen_mailboxes_health", "oxygen_mailboxes_get", "oxygen_mailboxes_deliverability_evidence"],
|
|
1221
|
-
commands: ["mailboxes health", "mailboxes get", "mailboxes deliverability evidence"],
|
|
1222
|
-
execution: "Read stored reputation, measurement freshness and seven-day rejection/send evidence with oxygen_mailboxes_health. Its mailboxes selector accepts inbox ids or addresses and defaults to full evidence; fleet totals and coverage stay unfiltered. CLI: mailboxes health --mailboxes <id-or-address> --json. Read oxygen_mailboxes_get for today's effective cap; deliverability evidence adds stored placement and domain checks. These reads cost 0 credits and do not sync providers or change settings. External MCP uses oxygen_capabilities_read; hydrate the selected tool's schema before calling.",
|
|
1223
|
-
};
|
|
1224
|
-
// A trigger diagnosis needs the live definition, not run tailing or a call.
|
|
1225
|
-
// Keep execution, authoring and run-history requests with their own owners.
|
|
1226
|
-
if (/\bworkflows?\b/.test(stored)
|
|
1227
|
-
&& /\b(?:get|read|inspect|show|diagnose|details)\b/.test(stored)
|
|
1228
|
-
&& !/\b(?:runs?|tail|logs?|templates?|blueprints?|recipes?|schemas?|knowledge|wiki|messages?|inbox|dashboards?|functions?|create|build|author|design|write|edit|update|change|delete|remove|archive|save|approve|reject|publish|running|execute|call|cancel|retry|resume|pause|restore|reset|duplicate|copy|materialize|send|refresh|launch|enable|disable|apply|import|sync|schedule|enroll|add|set)\b/.test(stored))
|
|
1229
|
-
return {
|
|
1230
|
-
capabilityId: "workflows",
|
|
1231
|
-
tools: ["oxygen_workflows_get", "oxygen_workflows_revisions", "oxygen_workflows_runs"],
|
|
1232
|
-
commands: ["workflows get", "workflows revisions", "workflows runs"],
|
|
1233
|
-
execution: "Read the named Workflow's live trigger status and scheduler_last_error_code with oxygen_workflows_get; revisions show authored definitions and runs show execution history. A stored refusal explains the current block, not when platform policy changed. External MCP uses oxygen_capabilities_read. Inspect before separately approving enable or execution; discovery grants no standing authority or credit spend.",
|
|
1234
|
-
};
|
|
1235
|
-
const storedOnly = !isHostedWorkflowIntent(stored) && !isSecondPartyDecisionIntent(stored)
|
|
1236
|
-
&& !/\b(?:create|write|edit|update|change|delete|remove|archive|save|approve|reject|publish|run|running|execute|send|refresh|launch|enable|disable|apply|materialize|import|sync|schedule|enroll|add|set)\b/.test(stored);
|
|
1237
|
-
// The connector BEFORE's explicit Knowledge requests were claimed by the
|
|
1238
|
-
// generic message-review rule. Captured patches live in Knowledge proposals.
|
|
1239
|
-
if (storedOnly && /\b(?:knowledge|wiki|canonical[ -]copy)\b/.test(stored)
|
|
1240
|
-
&& !/\b(?:message reviews?|inbox messages?|reply drafts?|conversations?)\b/.test(stored)
|
|
1241
|
-
&& /\b(?:proposals?|captured(?: page)? changes?|(?:pending|awaiting|waiting)\b[^.;]{0,60}\breview)\b/.test(stored)
|
|
1242
|
-
&& /\b(?:list|read|show|get|inspect|view|review|pending|awaiting|waiting|queue)\b/.test(stored))
|
|
1243
|
-
return {
|
|
1244
|
-
capabilityId: "knowledge-graph",
|
|
1245
|
-
tools: ["oxygen_knowledge_proposals_list"],
|
|
1246
|
-
commands: ["knowledge proposals"],
|
|
1247
|
-
execution: "Read pending Knowledge changes with oxygen_knowledge_proposals_list (status=open), including their exact captured patch and target revision. These are Knowledge proposals; message reviews and page revision history have separate owners. External MCP uses oxygen_capabilities_read; built-in agents invoke the native tool. Inspect the returned proposal before a separately approved decision. An empty result contains no change to inspect; do not invent one or claim unreported pagination.",
|
|
1248
|
-
};
|
|
1249
|
-
if (storedOnly && /\bdashboards?\b/.test(stored)
|
|
1250
|
-
&& /\b(?:saved|stored|existing|user[ -]defined)\b/.test(stored)
|
|
1251
|
-
&& /\b(?:get|read|show|inspect|view|describe)\b/.test(stored)
|
|
1252
|
-
&& /\b(?:definitions?|configurations?|settings|setup|tabs?|widgets?)\b/.test(stored)
|
|
1253
|
-
&& !/\b(?:data|live|analytics|metrics|funnel|summary)\b/.test(stored))
|
|
1254
|
-
return {
|
|
1255
|
-
capabilityId: "dashboards",
|
|
1256
|
-
tools: ["oxygen_dashboards_list", "oxygen_dashboards_get"],
|
|
1257
|
-
commands: ["dashboards list", "dashboards get"],
|
|
1258
|
-
execution: "Read saved Dashboard names with oxygen_dashboards_list, then oxygen_dashboards_get for one exact saved definition, tabs and widget configuration. External MCP uses oxygen_capabilities_read; built-in agents invoke the native tools. Reading the saved setup does not execute or refresh widget data. Curated funnel reports, widget data and Dashboard authoring have separate operations.",
|
|
1259
|
-
};
|
|
1260
|
-
if (/^\s*(?:show|explain|describe|read|inspect)\b/.test(query)
|
|
1261
|
-
&& /\bposts?\b/.test(query) && /\b(?:linkedin|publishing)\b/.test(query)
|
|
1262
|
-
&& /\b(?:how|process|paths?)\b/.test(query) && /\b(?:review|approval|approve)\b/.test(query)
|
|
1263
|
-
&& /\b(?:do not|don't)\b[^.;]{0,120}\b(?:create|approve|schedule|publish)\b/.test(query)
|
|
1264
|
-
&& !/\b(?:creat\w*|updat\w*|edit\w*|delet\w*|cancel\w*|approv(?:e|es|ing)|schedul\w*|publish(?:es)?|send\w*|clear\w*|set|add)\b/.test(documentation)
|
|
1265
|
-
&& !/\b(?:workflows?|agents?|tables?|crm|knowledge|comments?|scrape\w*|search|find)\b/.test(positive))
|
|
1266
|
-
return {
|
|
1267
|
-
capabilityId: "publishing",
|
|
1268
|
-
tools: ["oxygen_publishing_posts_list", "oxygen_publishing_posts_get"],
|
|
1269
|
-
commands: ["publishing posts list", "publishing posts get"],
|
|
1270
|
-
execution: "Read stored Publishing posts and their approval state first. Hydrate list/get; approval_status=needs_approval selects the review queue. Inspect create/update/approve schemas to explain scheduling or immediate-publication paths without executing them. Schema discovery grants no approval to create, approve, schedule or publish a post.",
|
|
1271
|
-
};
|
|
1272
|
-
if (/\bfolders?\b/.test(query) && /\b(?:shared|reference|knowledge)\b/.test(query)
|
|
1273
|
-
&& /\b(?:names?|show|list|read|inspect)\b/.test(query)
|
|
1274
|
-
&& isRecurringCompanyMonitoringIntent(query) && /\b(?:first step|plan|inspect)\b/.test(query)
|
|
1275
|
-
&& /\b(?:do not|don't)\b[^.;]{0,120}\b(?:save|spend)\b/.test(query)
|
|
1276
|
-
&& !/\b(?:creat\w*|writ\w*|edit\w*|updat\w*|delet\w*|cancel\w*|sav\w*|enabl\w*|appl\w*|launch\w*|send\w*|import\w*|sync\w*|clear\w*|set|add|tables?|copilot|mailboxes?|crm)\b/.test(positive))
|
|
1277
|
-
return {
|
|
1278
|
-
capabilityId: "knowledge-graph",
|
|
1279
|
-
tools: ["oxygen_knowledge_folders_list", "oxygen_blueprints_list"],
|
|
1280
|
-
commands: ["knowledge folders list", "blueprints list"],
|
|
1281
|
-
execution: "Read workspace folder names with oxygen_knowledge_folders_list; the registry includes empty folders. Report them as workspace metadata: this native contract has no per-folder sharing or ownership fields. truncated qualifies incomplete page lists. For the separate recurring company-monitoring first step, inspect oxygen_blueprints_list with a narrow query and describe a matching definition. Workflows own recurring execution; discovery does not save or enable automation and grants no provider spend or write approval.",
|
|
1282
|
-
};
|
|
1283
|
-
return null;
|
|
1284
|
-
}
|
|
1285
|
-
/** CRM backfills and account projections use native Records repair owners. */
|
|
1286
|
-
function crmMaintenanceRecommendation(query) {
|
|
1287
|
-
if (isHostedWorkflowIntent(query)
|
|
1288
|
-
|| /\b(workflows?|agents?|functions?|callables?|recurring)\b/.test(query)
|
|
1289
|
-
|| isSecondPartyDecisionIntent(query)
|
|
1290
|
-
|| isTableMaintenanceIntent(query))
|
|
1291
|
-
return null;
|
|
1292
|
-
if (/\bcrm\b/.test(query) && /\benrich\w*\b/.test(query)
|
|
1293
|
-
&& !/\b(run|running|execute|paid)\b/.test(query)
|
|
1294
|
-
&& /\b(backfill|missing|empty|blank|unfilled)\b/.test(query))
|
|
1295
|
-
return {
|
|
1296
|
-
tools: ["oxygen_crm_enrichment"],
|
|
1297
|
-
commands: ["crm enrichment backfill", "crm enrichment list"],
|
|
1298
|
-
execution: "Inspect the configured companies/people enrichments and preview one bounded backfill batch. A blank field does not prove enrichment never ran. oxygen_crm_enrichment action=backfill uses oxygen_capabilities_call even for its free preview. Paid live batches require approval for the exact object, batch scope and max_credits; retain existing values and read the run outcome before another batch.",
|
|
1299
|
-
};
|
|
1300
|
-
if (/\b(open deal|account stage|lifecycle stage)\b/.test(query)
|
|
1301
|
-
|| (/\bcrm\b/.test(query) && /\bdeal stage\b/.test(query)))
|
|
1302
|
-
return {
|
|
1303
|
-
tools: ["oxygen_crm_rollup", "oxygen_crm_record_get"],
|
|
1304
|
-
commands: ["crm rollup", "crm get"],
|
|
1305
|
-
execution: "Open Deal is the most advanced open deal stage; it is blank when none remain. Account Stage is the company lifecycle derived from people and deals, with a separate human override. Inspect the records; oxygen_crm_rollup previews the selected company scope for 0 credits without provider calls. include_lifecycle adds Account Stage; live applies the reviewed repair only after approval. MCP uses oxygen_capabilities_call.",
|
|
1306
|
-
};
|
|
1307
269
|
return null;
|
|
1308
270
|
}
|
|
1309
|
-
|
|
1310
|
-
|
|
1311
|
-
|
|
1312
|
-
|
|
1313
|
-
|
|
1314
|
-
|
|
1315
|
-
|
|
1316
|
-
return
|
|
1317
|
-
&& !/\b(apply|redeem|remove|change|cancel|upgrade|downgrade|switch)\b/.test(query);
|
|
271
|
+
/** The chosen card's recommendations: the first rule that answers, else its gateways. */
|
|
272
|
+
function recommendationsFor(card, query) {
|
|
273
|
+
for (const rule of RECOMMENDATION_RULES) {
|
|
274
|
+
const recommendation = rule.recommend(card, query);
|
|
275
|
+
if (recommendation)
|
|
276
|
+
return recommendation;
|
|
277
|
+
}
|
|
278
|
+
return { tools: [...card.gatewayTools], commands: [...card.gatewayCommands] };
|
|
1318
279
|
}
|
|
1319
|
-
/** The card a route reports:
|
|
280
|
+
/** The card a route reports: each matching view in order, until one is done. */
|
|
1320
281
|
function routeCardFor(card, query) {
|
|
1321
|
-
const
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
282
|
+
for (const rule of CARD_VIEW_RULES) {
|
|
283
|
+
const view = rule.view(card, query);
|
|
284
|
+
if (!view)
|
|
285
|
+
continue;
|
|
286
|
+
card = view.card;
|
|
287
|
+
if (view.done && !view.preferSkill)
|
|
288
|
+
return card;
|
|
289
|
+
if (view.done)
|
|
290
|
+
break;
|
|
1326
291
|
}
|
|
1327
|
-
|
|
1328
|
-
if (placementGuide)
|
|
1329
|
-
card = { ...card, posture: "read_only", execution: placementGuide.execution };
|
|
1330
|
-
const lookup = card.id === "tables" ? linkedinUrlFindingRecommendation(query) : null;
|
|
1331
|
-
if (lookup)
|
|
1332
|
-
card = { ...card, execution: lookup.execution };
|
|
1333
|
-
const pageResearch = card.id === "sourcing-and-provider-tools" ? pageScrapingRecommendation(query) : null;
|
|
1334
|
-
if (pageResearch)
|
|
1335
|
-
card = { ...card, execution: pageResearch.execution };
|
|
1336
|
-
const collaboration = card.id === "collaboration" ? collaborationRecommendation(query) : null;
|
|
1337
|
-
if (collaboration)
|
|
1338
|
-
card = { ...card, execution: collaboration.execution, posture: collaboration.posture };
|
|
1339
|
-
const crmConnections = card.id === "records" ? crmConnectionsReadRecommendation(query) : null;
|
|
1340
|
-
if (crmConnections)
|
|
1341
|
-
return { ...card, posture: "read_only", execution: crmConnections.execution };
|
|
1342
|
-
const dossier = card.id === "records" ? recordDossierReadRecommendation(query) : null;
|
|
1343
|
-
if (dossier)
|
|
1344
|
-
return { ...card, posture: "read_only", execution: dossier.execution };
|
|
1345
|
-
const crmFileUpload = card.id === "records" ? crmFileUploadRecommendation(query) : null;
|
|
1346
|
-
if (crmFileUpload)
|
|
1347
|
-
return { ...card, execution: crmFileUpload.execution };
|
|
1348
|
-
if (card.id === "records" && isCrmEnrichmentConfigurationRead(query))
|
|
1349
|
-
return { ...card, ...CRM_ENRICHMENT_READ_VIEW };
|
|
1350
|
-
const crmMaintenance = card.id === "records" ? crmMaintenanceRecommendation(query) : null;
|
|
1351
|
-
if (crmMaintenance)
|
|
1352
|
-
card = { ...card, execution: crmMaintenance.execution };
|
|
1353
|
-
const feed = card.primitive === "tables" ? tableFeedRecommendation(query) : null;
|
|
1354
|
-
if (feed)
|
|
1355
|
-
return { ...card, execution: feed.execution };
|
|
1356
|
-
if (card.primitive === "publishing" && isUgcIntent(query))
|
|
1357
|
-
return { ...card, ...UGC_ROUTE_VIEW };
|
|
1358
|
-
if (card.primitive === "publishing" && isPostDraftIntent(query))
|
|
1359
|
-
return { ...card, execution: POST_DRAFT_EXECUTION };
|
|
1360
|
-
if (card.primitive === "signals" && isSignalCaptureIntent(query))
|
|
1361
|
-
return { ...card, execution: SIGNAL_CAPTURE_EXECUTION, skills: ["oxygen-signals", "oxygen-crm"] };
|
|
1362
|
-
const contactFind = card.id === "sourcing-and-provider-tools" ? oneShotContactFindingRecommendation(query) : null;
|
|
1363
|
-
if (contactFind)
|
|
1364
|
-
card = { ...card, execution: contactFind.execution };
|
|
1365
|
-
const crmSample = card.id === "records" ? crmSampleRecordRecommendation(query) : null;
|
|
1366
|
-
if (crmSample)
|
|
1367
|
-
return { ...card, execution: crmSample.execution };
|
|
1368
|
-
const crmContactRead = card.id === "records" ? storedCrmContactReadRecommendation(query) : null;
|
|
1369
|
-
if (crmContactRead)
|
|
1370
|
-
card = { ...card, posture: "read_only", execution: crmContactRead.execution };
|
|
1371
|
-
const replyDraftRead = card.primitive === "messages" ? storedReplyDraftReadRecommendation(query) : null;
|
|
1372
|
-
if (replyDraftRead)
|
|
1373
|
-
card = { ...card, posture: "read_only", execution: replyDraftRead.execution };
|
|
1374
|
-
const providerRead = card.id === "billing-and-budgets" ? providerPolicyReadRecommendation(query) : null;
|
|
1375
|
-
if (providerRead)
|
|
1376
|
-
card = { ...card, posture: "read_only", execution: providerRead.execution };
|
|
1377
|
-
const spendRead = card.id === "billing-and-budgets" && !providerRead ? spendBreakdownRecommendation(query) : null;
|
|
1378
|
-
if (spendRead)
|
|
1379
|
-
card = { ...card, posture: "mixed", execution: spendRead.execution };
|
|
1380
|
-
if (card.id === "billing-and-budgets" && isPartnerBonusReadIntent(query))
|
|
1381
|
-
card = {
|
|
1382
|
-
...card, posture: "read_only",
|
|
1383
|
-
execution: "Read partner_bonus eligibility, amount, conditions and timing with billing summary (oxygen_billing_summary), without grants or expiry. Captured coupon evidence is conditional and dated; a future bonus still requires a fresh Stripe check. Balance and usage can reconcile credits. Publication and plan changes need separate approval.",
|
|
1384
|
-
};
|
|
1385
|
-
if (card.id === "billing-and-budgets" && isSeatTransitionReadIntent(query))
|
|
1386
|
-
card = {
|
|
1387
|
-
...card, posture: "read_only",
|
|
1388
|
-
execution: "Read sending_seats with billing summary (oxygen_billing_summary), using the saved wallet without grants or expiry. It reports retired status, held-seat period-end meaning, channel capacity, current reservation prices and snapshot eligibility. Coverage of a specific account and its first future debit may remain unknown. A connection rechecks eligibility; this read reserves nothing.",
|
|
1389
|
-
};
|
|
1390
|
-
const blockRead = card.primitive === "sequences" ? sendingBlockReadRecommendation(query) : null;
|
|
1391
|
-
if (blockRead)
|
|
1392
|
-
card = { ...card, posture: "read_only", execution: blockRead.execution };
|
|
1393
|
-
if (card.primitive === "sequences" && !blockRead && isSpintaxIntent(query))
|
|
1394
|
-
card = {
|
|
1395
|
-
...card, posture: "paid_read",
|
|
1396
|
-
execution: "Generate wording variations with the native Spintax owner; sending is separate. Hydrate oxygen_spintax_generate. External MCP uses oxygen_capabilities_call, including its explicit free mode=dry_run preview; built-in agents invoke the native capability under their current policy. Omitted mode is live and costs 3 credits. After preview, live requires approval of the exact text with approved=true and max_credits>=3. Failed generation refunds the reservation.",
|
|
1397
|
-
};
|
|
1398
|
-
if (card.id === "knowledge-graph" && isCanonicalCopyReadIntent(query))
|
|
1399
|
-
card = { ...card, posture: "read_only", execution: CANONICAL_COPY_READ_EXECUTION };
|
|
1400
|
-
else if (card.id === "knowledge-graph" && isWorkspaceVoiceIntent(query))
|
|
1401
|
-
card = { ...card, execution: WORKSPACE_VOICE_EXECUTION };
|
|
1402
|
-
if (card.primitive === "agents" && isAdaptiveWatchIntent(query))
|
|
1403
|
-
card = { ...card, execution: ADAPTIVE_WATCH_EXECUTION };
|
|
1404
|
-
if (card.primitive === "workflows" && isRecurringCompanyMonitoringIntent(query))
|
|
1405
|
-
card = {
|
|
1406
|
-
...card,
|
|
1407
|
-
execution: "Workflows own recurring execution. Inspect oxygen_blueprints_list, describe and preflight before authoring; a matching Blueprint is not guaranteed. Retain canonical company identities and facts in Records, and time-stamped observations in Signals. Use oxygen_crm_objects_list and oxygen_signals_list to inspect those destinations. Do not apply or enable automation before the required approval and credit scope.",
|
|
1408
|
-
};
|
|
1409
|
-
if (card.primitive === "tables" && isTableCapacityReadIntent(query))
|
|
1410
|
-
card = {
|
|
1411
|
-
...card,
|
|
1412
|
-
execution: "Read oxygen_limits_show with section=capacity for largest_table and largest_table_rows. Counts cover all registered workspace Tables, including CRM and archived Tables, and are available only when row_usage_reconciled is true; pending counts are unknown. Use the returned table reference with oxygen_tables_query and a small limit for sample rows. Planned capacity is not current headroom.",
|
|
1413
|
-
};
|
|
1414
|
-
if (card.primitive === "tables" && isFunctionIntent(query))
|
|
1415
|
-
card = {
|
|
1416
|
-
...card,
|
|
1417
|
-
execution: "List, describe or inspect Function runs without executing. Draft edits are isolated; publish requires the inspected draft hash and changes future invocations. Bind adds a caller column for free; columns run previews cost before a bounded approved run. External MCP uses oxygen_capabilities_read for oxygen_callables_manage operation=list/list_functions/describe/runs; other operations use oxygen_capabilities_call. Built-in agents invoke the native tool under their existing policy.",
|
|
1418
|
-
};
|
|
1419
|
-
if (card.primitive === "tables" && isPlainTableIntent(query))
|
|
1420
|
-
card = {
|
|
1421
|
-
...card,
|
|
1422
|
-
execution: "Create a workspace-private Table or inspect its schema and rows. Manual rows, column labels, visibility and member favorites cost 0 credits. Change only the display label with columns update (oxygen_columns_update); columns rename (oxygen_columns_rename) requires a new stable key. Favorite one table or folder with tables favorite (oxygen_tables_favorite), then read tables favorites (oxygen_tables_favorites). For tidy guidance, read oxygen-table-tidy with skills get (oxygen_skills_get); tables tidy-suggest (oxygen_tables_tidy_suggest) analyzes without changes. Read the owning schema, apply the requested scope, then describe or query the Table to verify it.",
|
|
1423
|
-
};
|
|
1424
|
-
if (card.primitive === "tables" && isTableInventoryIntent(query))
|
|
1425
|
-
card = {
|
|
1426
|
-
...card,
|
|
1427
|
-
posture: "read_only",
|
|
1428
|
-
execution: "List or count this workspace's Tables with tables list (oxygen_tables_list): `total` counts every Table the filters cover, while each page holds a window (MCP 50) with nextCursor for the rest. Archived Tables are excluded unless include_archived; narrow by project, tag or a name query. Free.",
|
|
1429
|
-
};
|
|
1430
|
-
const recordsCopy = card.primitive === "tables" ? recordsTableImportRecommendation(query) : null;
|
|
1431
|
-
if (recordsCopy)
|
|
1432
|
-
card = { ...card, posture: "workspace_write", execution: recordsCopy.execution };
|
|
1433
|
-
const maintenance = card.primitive === "tables" ? tableMaintenanceRecommendation(query) : null;
|
|
1434
|
-
if (maintenance)
|
|
1435
|
-
card = { ...card, execution: maintenance.execution };
|
|
1436
|
-
const structure = card.primitive === "tables" && !maintenance ? tableStructureRecommendation(query) : null;
|
|
1437
|
-
if (structure)
|
|
1438
|
-
card = { ...card, posture: "workspace_write", execution: structure.execution };
|
|
1439
|
-
const read = card.primitive === "tables" ? tableReadRecommendation(query) : null;
|
|
1440
|
-
if (read)
|
|
1441
|
-
card = { ...card, execution: read.execution };
|
|
1442
|
-
const removal = card.primitive === "tables" ? tableRowRemovalRecommendation(query) : null;
|
|
1443
|
-
if (removal)
|
|
1444
|
-
card = { ...card, posture: "workspace_write", execution: removal.execution };
|
|
1445
|
-
const insert = card.primitive === "tables" ? tableRowInsertRecommendation(query) : null;
|
|
1446
|
-
if (insert)
|
|
1447
|
-
card = { ...card, posture: "workspace_write", execution: insert.execution };
|
|
1448
|
-
const update = card.primitive === "tables" ? tableRowUpdateRecommendation(query) : null;
|
|
1449
|
-
if (update)
|
|
1450
|
-
card = { ...card, posture: "workspace_write", execution: update.execution };
|
|
1451
|
-
const sent = card.id === "connected-linkedin" ? sentLinkedInInvitationReadRecommendation(query) : null;
|
|
1452
|
-
if (sent)
|
|
1453
|
-
card = { ...card, execution: sent.execution };
|
|
1454
|
-
const database = card.id === "platform-operations" ? databaseRecommendation(query) : null;
|
|
1455
|
-
if (database)
|
|
1456
|
-
card = { ...card,
|
|
1457
|
-
owns: "Active-workspace PostgreSQL hosting, attachment, migrations, read-only SQL and retired cost-policy status.",
|
|
1458
|
-
notFor: "Provider credentials, enrichment, workspace billing, or staff-wide database operations.",
|
|
1459
|
-
execution: database.execution,
|
|
1460
|
-
};
|
|
1461
|
-
if (card.id === "tables" && isClayMigrationIntent(query))
|
|
1462
|
-
card = {
|
|
1463
|
-
...card,
|
|
1464
|
-
posture: "workspace_write",
|
|
1465
|
-
execution: "Start oxygen_clay_migration action=connect for browser sign-in; keep its migration_id for discovery, bounded source reads, table transfers, rebuild checkpoints and coverage reports. Read oxygen-clay-migration for the native reconstruction procedure. Create destination objects through their Oxygen tools, retain source outputs and report export limitations. Imported behavior stays inactive until separately approved. External MCP uses oxygen_capabilities_call.",
|
|
1466
|
-
};
|
|
1467
|
-
const specializedSkill = preferredSkillForIntent(card, query);
|
|
1468
|
-
return specializedSkill ? { ...card, skills: [specializedSkill, ...card.skills.filter((skill) => skill !== specializedSkill)] } : card;
|
|
292
|
+
return withPreferredSkill(card, query);
|
|
1469
293
|
}
|
|
1470
294
|
/** Search surfaces share the selected skill owner; a general router is fallback. */
|
|
1471
|
-
function
|
|
1472
|
-
|
|
1473
|
-
|
|
1474
|
-
|
|
1475
|
-
|
|
1476
|
-
return "oxygen-clay-migration";
|
|
1477
|
-
if (isTableMaintenanceIntent(query))
|
|
1478
|
-
return "oxygen-table-tidy";
|
|
1479
|
-
if (/\b(stuck|failed|failure|trace|provenance|diagnos\w*)\b/.test(query))
|
|
1480
|
-
return "oxygen-diagnostics";
|
|
1481
|
-
if (isLinkedInProfileWatcherIntent(query))
|
|
1482
|
-
return "oxygen-signals";
|
|
295
|
+
function withPreferredSkill(card, query) {
|
|
296
|
+
for (const rule of SKILL_RULES) {
|
|
297
|
+
const skill = rule.skill(card, query);
|
|
298
|
+
if (skill)
|
|
299
|
+
return { ...card, skills: [skill, ...card.skills.filter((name) => name !== skill)] };
|
|
1483
300
|
}
|
|
1484
|
-
|
|
1485
|
-
// teaches (`find email`, `find phone`); list building stays with sourcing.
|
|
1486
|
-
if (card.id === "sourcing-and-provider-tools" && oneShotContactFindingRecommendation(query))
|
|
1487
|
-
return "oxygen-enrichment";
|
|
1488
|
-
if (card.id === "billing-and-budgets" && /\b(explain|why|reduce|increas\w*|burn|spent)\b/.test(query))
|
|
1489
|
-
return "oxygen-diagnostics";
|
|
1490
|
-
if (card.id === "sending-infrastructure" && /\b(bounc\w*|health|reputation|rejections?|placement|deliverability|spam)\b/.test(query))
|
|
1491
|
-
return "oxygen-deliverability";
|
|
1492
|
-
if (["signals", "linkedin-public-research"].includes(card.id) && /\blinkedin\b/.test(query))
|
|
1493
|
-
return "oxygen-signals";
|
|
1494
|
-
return null;
|
|
1495
|
-
}
|
|
1496
|
-
function isClayMigrationIntent(query) {
|
|
1497
|
-
return /\bclay\b/.test(query) && /\b(import|export|migrat\w*|mov\w*|transfer|bring|rebuild)\b/.test(query);
|
|
1498
|
-
}
|
|
1499
|
-
function isTableMaintenanceIntent(query) {
|
|
1500
|
-
return /\b(tables?|columns?|folders?)\b/.test(query)
|
|
1501
|
-
&& !/\b(functions?|callables?|campaigns?|tags?|workflows?|agents?)\b/.test(query)
|
|
1502
|
-
&& (/\b(tidy|tidying|cleanup|clean up|reorder|formatting|duplicates?|favou?rites?|unfavou?rite|star|unstar)\b/.test(query)
|
|
1503
|
-
|| (/\bcolumns?\b/.test(query) && /\b(hide|hidden|rename|renaming|label|key)\b/.test(query)));
|
|
1504
|
-
}
|
|
1505
|
-
function isPlainTableIntent(query) {
|
|
1506
|
-
if (isTableCapacityReadIntent(query))
|
|
1507
|
-
return false;
|
|
1508
|
-
return isTableMaintenanceIntent(query) || (/\btable\b/.test(query)
|
|
1509
|
-
&& /\b(create|manual|sample|private)\b/.test(query)
|
|
1510
|
-
&& !/\b(enrich\w*|classif\w*|research|prompt|sourc\w*|import|linkedin|function|callable)\b/.test(query));
|
|
1511
|
-
}
|
|
1512
|
-
function isFunctionIntent(query) {
|
|
1513
|
-
return /\b(functions?|callables?)\b/.test(query) && !/\bformula functions?\b/.test(query);
|
|
1514
|
-
}
|
|
1515
|
-
function isLinkedInKeywordPostIntent(query) {
|
|
1516
|
-
return /\blinkedin\b/.test(query)
|
|
1517
|
-
&& /\b(posts?|posting)\b/.test(query)
|
|
1518
|
-
&& /\b(keywords?|about|mention\w*|topics?|niche|talk\w* about|viral|trending)\b/.test(query)
|
|
1519
|
-
&& !/\bprofiles?\b/.test(query)
|
|
1520
|
-
&& !/\b(my|our) (own )?posts?\b/.test(query);
|
|
1521
|
-
}
|
|
1522
|
-
function isLinkedInProfileWatcherIntent(query) {
|
|
1523
|
-
return /\blinkedin\b/.test(query)
|
|
1524
|
-
&& /\bprofiles?\b/.test(query)
|
|
1525
|
-
&& /\b(watcher|watch|watching|monitor|monitoring|daily|every day|recurring)\b/.test(query)
|
|
1526
|
-
&& (/\b(engagers?|engaging|engagement|reactions?|comments?|posts?)\b/.test(query) || /\bprofile watcher\b/.test(query))
|
|
1527
|
-
&& !isNetNewLinkedInInitiation(query);
|
|
1528
|
-
}
|
|
1529
|
-
/**
|
|
1530
|
-
* "My LinkedIn connections and followers as a table" is the connected account's
|
|
1531
|
-
* own network, not a Tables question. Without this the phrase "into a table"
|
|
1532
|
-
* routed a blind user to the generic Tables card, which never names
|
|
1533
|
-
* `linkedin network setup` (blind eval, 2026-09-22).
|
|
1534
|
-
*/
|
|
1535
|
-
function isOwnLinkedInNetworkIntent(query) {
|
|
1536
|
-
if (!/\blinkedin\b/.test(query))
|
|
1537
|
-
return false;
|
|
1538
|
-
if (/\b(mutual|shared|in common|public|third party|cookieless|post engagers?)\b/.test(query))
|
|
1539
|
-
return false;
|
|
1540
|
-
const ownNetwork = /\b(my|our|own|whole|entire|existing) (linkedin )?(network|connections|followers)\b/.test(query)
|
|
1541
|
-
|| /\b(everyone|everybody|people) (i am|i'm|we are|we're) connected (to|with)\b/.test(query)
|
|
1542
|
-
|| /\blinkedin network\b/.test(query);
|
|
1543
|
-
const bothHalves = /\bconnections?\b/.test(query) && /\bfollowers?\b/.test(query);
|
|
1544
|
-
return (ownNetwork || bothHalves) && !isNetNewLinkedInInitiation(query);
|
|
1545
|
-
}
|
|
1546
|
-
/**
|
|
1547
|
-
* The workspace's own voice. `knowledge synthesize --kind voice` learns a writing
|
|
1548
|
-
* voice from the workspace's SENT LinkedIn and WhatsApp messages; brand voice is a
|
|
1549
|
-
* wiki page. "learn my writing voice from my LinkedIn history" scored higher on
|
|
1550
|
-
* the connected-LinkedIn card ("my linkedin") and was offered `linkedin network
|
|
1551
|
-
* setup` (UGC E2E pass, 2026-09-29, OXP-1.15.12). A creator's voice is UGC and is
|
|
1552
|
-
* claimed first (isUgcVoiceIntent); phone voice (numbers, calls) never matches.
|
|
1553
|
-
* The blind baseline also searched "writing style" and "voice learn".
|
|
1554
|
-
*/
|
|
1555
|
-
/**
|
|
1556
|
-
* Which voice, brand or positioning AI copy uses right now: a free read of the pinned
|
|
1557
|
-
* canonical doc. A blind operator searched "current canonical voice", got the wiki
|
|
1558
|
-
* search tools, and concluded no such read existed; "which voice does AI copy use"
|
|
1559
|
-
* read as "copy my voice" and was sent to paid synthesis (OXP-1.4.18).
|
|
1560
|
-
*/
|
|
1561
|
-
function isCanonicalCopyReadIntent(query) {
|
|
1562
|
-
if (/\b(?:learn\w*|synthesi[sz]\w*|generat\w*|creat\w*|writ\w*|set|pin|unpin|chang\w*|edit\w*|updat\w*|approv\w*|propos\w*|import\w*|calls?|phone|numbers?|creators?|ugc)\b/.test(query))
|
|
1563
|
-
return false;
|
|
1564
|
-
const copyType = /\b(?:voice|brand|positioning)\b/;
|
|
1565
|
-
if (!copyType.test(query))
|
|
1566
|
-
return false;
|
|
1567
|
-
return /\b(?:canonical|pinned|current|active|live)\b/.test(query)
|
|
1568
|
-
|| /\b(?:ai|generated) copy\b/.test(query)
|
|
1569
|
-
|| /\bwhich\b.{0,20}\b(?:voice|brand|positioning)\b/.test(query);
|
|
1570
|
-
}
|
|
1571
|
-
const CANONICAL_COPY_READ_EXECUTION = "Read the canonical copy AI uses with `oxygen context canonical get --type <voice|brand|positioning> --json` (MCP: oxygen_context_canonical_get), a free read. present=false means none is pinned, and grounding_when_absent says what AI copy uses instead. Pinning one (knowledge page pin) files a proposal a human approves.";
|
|
1572
|
-
function isWorkspaceVoiceIntent(query) {
|
|
1573
|
-
if (/\b(?:calls?|calling|dial\w*|phone|softphone|voicemail|numbers?)\b/.test(query))
|
|
1574
|
-
return false;
|
|
1575
|
-
return /\b(?:writing (?:voice|style)|brand voice|tone of voice|voice guide|(?:my|our) (?:own )?voice|(?:write|sound)s? like (?:me|us))\b/.test(query)
|
|
1576
|
-
|| /\b(?:learn|capture|mimic|copy|match)\w*\b.{0,30}\bvoice\b/.test(query)
|
|
1577
|
-
|| /\bvoice\b.{0,30}\b(?:learn|capture|mimic|copy|match)\w*\b/.test(query);
|
|
1578
|
-
}
|
|
1579
|
-
const WORKSPACE_VOICE_EXECUTION = "A writing voice is learned from the workspace's own sent LinkedIn and WhatsApp messages: `oxygen knowledge synthesize --kind voice --json` (MCP: oxygen_context_synthesize with kind voice) runs one low-cost AI call, priced as one low-reasoning AI column cell, the preview included, and reports credits_used; to save the guide a preview showed, pass its body back with --approved --body (no new AI call) at 0 credits, because --approved alone synthesizes and charges again. Saving files a pin proposal: the guide becomes the canonical voice, which grounds message, reply, sequence and post drafts and AI columns, only once a human approves that proposal (oxygen knowledge proposals approve <id>; MCP oxygen_knowledge_proposal_decide). It reads sent messages only, not posts, emails or web pages. Brand voice and tone live in wiki pages (knowledge search). A creator's voice in a UGC program is `ugc voice import`. When the user already has the guide's text, no synthesis is needed: save it with `knowledge page upsert --type voice` and request the pin with `knowledge page pin` (MCP oxygen_knowledge_page_upsert with canonical: true), both 0 credits. Which voice AI copy uses now: `context canonical get --type voice` (MCP oxygen_context_canonical_get). To hard-cap a synthesis run, pass `--max-credits <n>` (MCP max_credits): a higher estimate is refused before the AI call, with nothing charged.";
|
|
1580
|
-
/** One schedule for every channel of a Sequence, the same as Launch's Sending schedule. */
|
|
1581
|
-
export const SEQUENCE_SENDING_SCHEDULE_COMMAND = "oxygen sequences update <sequence> --schedule-timezone <IANA zone> --schedule-days mon-fri --schedule-hours-start 09:00 --schedule-hours-end 17:00 --json";
|
|
1582
|
-
/** Launch's unsubscribe switch: the visible link and the one-click headers together. */
|
|
1583
|
-
export const SEQUENCE_UNSUBSCRIBE_COMMAND = "oxygen sequences update <sequence> --include-unsubscribe --json";
|
|
1584
|
-
const SEQUENCE_REPLY_TO_STOP_COMMAND = 'oxygen sequences update <sequence> --reply-to-stop-text "Reply STOP to opt out." --json';
|
|
1585
|
-
/**
|
|
1586
|
-
* Every exact CLI command a route hands out, as the MCP tool call that sends the
|
|
1587
|
-
* same request. The MCP surface serves these in place of the command: an MCP
|
|
1588
|
-
* agent handed a CLI command had to translate it (blind user eval, 2026-09-29).
|
|
1589
|
-
* Each was traced to the same `/api/cli/*` request as its command; the
|
|
1590
|
-
* mcp-server test proves every tool exists and declares every argument.
|
|
1591
|
-
* Factories, so a caller can edit the object it gets.
|
|
1592
|
-
*/
|
|
1593
|
-
export const CAPABILITY_ROUTE_MCP_CALLS = {
|
|
1594
|
-
connectionPrices: () => ({ tool: "oxygen_billing_commitments", arguments: { view: "connection-prices" } }),
|
|
1595
|
-
connectedAppsList: () => ({ tool: "oxygen_connector_list", arguments: {} }),
|
|
1596
|
-
connectedAppEvents: () => ({ tool: "oxygen_connector_events_get", arguments: { connection: "<app>" } }),
|
|
1597
|
-
workspacePagesList: () => ({ tool: "oxygen_settings_pages_get", arguments: {} }),
|
|
1598
|
-
functionsList: () => ({ tool: "oxygen_callables_manage", arguments: { operation: "list_functions" } }),
|
|
1599
|
-
functionsDescribe: () => ({ tool: "oxygen_callables_manage", arguments: { operation: "describe", function: "<function>" } }),
|
|
1600
|
-
functionsRuns: () => ({ tool: "oxygen_callables_manage", arguments: { operation: "runs", function: "<function>" } }),
|
|
1601
|
-
sequenceSendingSchedule: () => ({
|
|
1602
|
-
tool: "oxygen_sequences_update",
|
|
1603
|
-
arguments: { sequence: "<sequence>", sending_schedule: { timezone: "<IANA zone>", days: [1, 2, 3, 4, 5], start: "09:00", end: "17:00" } },
|
|
1604
|
-
}),
|
|
1605
|
-
sequenceUnsubscribe: () => ({ tool: "oxygen_sequences_update", arguments: { sequence: "<sequence>", include_unsubscribe: true } }),
|
|
1606
|
-
sequenceReplyToStop: () => ({ tool: "oxygen_sequences_update", arguments: { sequence: "<sequence>", reply_to_stop_text: "Reply STOP to opt out." } }),
|
|
1607
|
-
ugcProgramCreate: () => ({ tool: "oxygen_ugc_program_create", arguments: { product_url: "<your product site>" } }),
|
|
1608
|
-
// The first comment rides in `content`, as the CLI's --first-comment does.
|
|
1609
|
-
publishingPostDraft: () => ({
|
|
1610
|
-
tool: "oxygen_publishing_posts_create",
|
|
1611
|
-
arguments: { content_text: "<post>", publish_at: "<iso>", status: "draft" },
|
|
1612
|
-
}),
|
|
1613
|
-
signalCapture: () => ({
|
|
1614
|
-
tool: "oxygen_crm_activity_log",
|
|
1615
|
-
arguments: { object: "people", row_id: "<person rowId or email>", activity_type: "website_visit", direction: "inbound", summary: "<what they viewed>", occurred_at: "<iso>", mode: "live" },
|
|
1616
|
-
}),
|
|
1617
|
-
publishingFirstComment: () => ({
|
|
1618
|
-
tool: "oxygen_publishing_posts_create",
|
|
1619
|
-
arguments: { content_text: "<post>", publish_at: "<iso>", sender_account_id: "<sender_id>", content: { first_comment: "<comment, e.g. the link>" } },
|
|
1620
|
-
}),
|
|
1621
|
-
companyUrlRecovery: () => ({
|
|
1622
|
-
tool: "oxygen_companies_search_plan",
|
|
1623
|
-
arguments: { prompt: "Find the websites for these companies: <company names>", source_intent: "url_recovery" },
|
|
1624
|
-
}),
|
|
1625
|
-
// `records` is a number the tool drops when it is not one; 1000 is its default.
|
|
1626
|
-
companyPageFollowers: () => ({
|
|
1627
|
-
tool: "oxygen_tables_followers",
|
|
1628
|
-
arguments: { action: "preview", company_url: "<linkedin company page URL>", records: 1000 },
|
|
1629
|
-
}),
|
|
1630
|
-
localBusinessScrape: () => ({
|
|
1631
|
-
tool: "oxygen_companies_search_preview",
|
|
1632
|
-
arguments: { action: "preview", source: "google_maps", filters: { q: "<category> in <city, region>" } },
|
|
1633
|
-
}),
|
|
1634
|
-
// Like the CLI command, it leaves the LinkedIn risk acknowledgement to the user.
|
|
1635
|
-
senderConnect: () => ({ tool: "oxygen_senders_connect", arguments: { country: "<cc>" } }),
|
|
1636
|
-
rowClassification: () => ({ tool: "oxygen_columns_catalog", arguments: { family: "classification" } }),
|
|
1637
|
-
rowFanOut: () => ({
|
|
1638
|
-
tool: "oxygen_tables_send",
|
|
1639
|
-
arguments: {
|
|
1640
|
-
source: "<source table>",
|
|
1641
|
-
target: "<target table>",
|
|
1642
|
-
flatten: { column: "<column holding the array>", path: "<path to the array>" },
|
|
1643
|
-
mapping: [{ target: "<target column>", source: { type: "column", key: "$element" }, path: "<field in each element>" }],
|
|
1644
|
-
dry_run: true,
|
|
1645
|
-
},
|
|
1646
|
-
}),
|
|
1647
|
-
// The tool has no `family`: it always searches linkedin_posts, which the API reads as the same source.
|
|
1648
|
-
linkedinKeywordPosts: () => ({
|
|
1649
|
-
tool: "oxygen_signals_search_preview",
|
|
1650
|
-
arguments: {
|
|
1651
|
-
action: "preview",
|
|
1652
|
-
filters: { keywords: ["<any of>"], all_keywords: ["<all of>"], exclude_keywords: ["<none of>"], ai_filter: "<posts to keep>" },
|
|
1653
|
-
},
|
|
1654
|
-
}),
|
|
1655
|
-
};
|
|
1656
|
-
/** The catalogue row's `enrichment catalog --intent <id>` as an MCP call. */
|
|
1657
|
-
export function catalogueIntentMcpCall(intentId) {
|
|
1658
|
-
return { tool: "oxygen_enrichment_catalog", arguments: { intent: intentId } };
|
|
1659
|
-
}
|
|
1660
|
-
// A Sequence's sending schedule or send window. Workflow language still wins
|
|
1661
|
-
// ("a workflow that changes the send window nightly" is automation), and
|
|
1662
|
-
// "sending hours" stays with the connected account's working hours.
|
|
1663
|
-
// Where each enrolled lead stands: its next message time, what holds it, why it
|
|
1664
|
-
// stopped. Both 2026-10-06 collateral acceptance operators searched for this
|
|
1665
|
-
// ("why is a lead stuck in a LinkedIn campaign, next message time") and got only
|
|
1666
|
-
// create/enroll/start, never the read that answers it.
|
|
1667
|
-
function isSequenceLeadProgressIntent(query) {
|
|
1668
|
-
return /\b(?:next (?:message|step|send)|stuck|blocked|held|per[- ]lead (?:status|progress)|why (?:\w+ )?(?:stopped|failed))\b/.test(query);
|
|
1669
|
-
}
|
|
1670
|
-
function isSequenceInvitationTimeoutIntent(query) {
|
|
1671
|
-
if (/\b(?:workflow|automation|automate|webhook|cron)\b/.test(query))
|
|
1672
|
-
return false;
|
|
1673
|
-
if (/\bwithdraw on timeout\b/.test(query))
|
|
1674
|
-
return true;
|
|
1675
|
-
return /\b(?:withdraw\w*|cancel\w*)\b/.test(query)
|
|
1676
|
-
&& /\b(?:invitations?|invites?|connection requests?)\b/.test(query)
|
|
1677
|
-
&& /\b(?:timeouts?|time out|expires?|expired|expiry|unanswered|unaccepted)\b/.test(query);
|
|
1678
|
-
}
|
|
1679
|
-
function isSequenceScheduleIntent(query) {
|
|
1680
|
-
return /\bsend(?:ing)? (?:schedule|window)s?\b/.test(query)
|
|
1681
|
-
&& !/\b(workflow|automation|automate|webhook|cron)\b/.test(query);
|
|
1682
|
-
}
|
|
1683
|
-
// How much campaign email one inbox may send: its daily campaign limit and the
|
|
1684
|
-
// ramp-up that climbs to it. The 2026-10-01 MCP baseline searched "mailbox
|
|
1685
|
-
// sending settings warmup ramp daily limit" and was routed to Workflows (bare
|
|
1686
|
-
// "daily" reads as a schedule); "ramp up a new inbox" went to Messages. LinkedIn,
|
|
1687
|
-
// WhatsApp and call limits keep their own owners, and provider warm-up without
|
|
1688
|
-
// campaign volume words keeps the card's warm-up path.
|
|
1689
|
-
function isMailboxVolumeIntent(query) {
|
|
1690
|
-
if (/\b(linkedin|whatsapp|calls?|dial\w*|voice)\b/.test(query))
|
|
1691
|
-
return false;
|
|
1692
|
-
const inbox = /\b(mailbox\w*|inbox(?:es)?|email accounts?|sending accounts?|sender accounts?)\b/.test(query);
|
|
1693
|
-
const volume = /\b(ramp\w*|daily (?:campaign )?(?:limit|cap)s?|sending limits?|send limits?|(?:emails?|sends?) (?:per|a) day|volume)\b/.test(query);
|
|
1694
|
-
return inbox && volume;
|
|
1695
|
-
}
|
|
1696
|
-
function isSequenceReplyToStopIntent(query) {
|
|
1697
|
-
if (/\b(workflow|automation|automate|webhook|cron|lists?|import\w*|suppress\w*|block ?list|blocklist|do not contact|dnc|conversations?|threads?)\b/.test(query))
|
|
1698
|
-
return false;
|
|
1699
|
-
const footer = /\bfooter\b/.test(query) || /\breply to stop text\b/.test(query);
|
|
1700
|
-
const sequenceSetting = /\b(sequences?|campaigns?)\b/.test(query) && /\b(text|wording|line|setting)\b/.test(query);
|
|
1701
|
-
return (footer || sequenceSetting) && (/\breply (?:to )?stop\b/.test(query)
|
|
1702
|
-
|| /\bopt out\b/.test(query) && /\b(text|wording|line|footer)\b/.test(query));
|
|
1703
|
-
}
|
|
1704
|
-
// The unsubscribe option on a Sequence's emails, not the list of people who
|
|
1705
|
-
// opted out: a list, import or do-not-contact ask stays with suppressions.
|
|
1706
|
-
function isSequenceUnsubscribeIntent(query) {
|
|
1707
|
-
return /\bunsubscribe\b/.test(query)
|
|
1708
|
-
&& !/\b(workflow|automation|automate|webhook|cron)\b/.test(query)
|
|
1709
|
-
&& !/\b(unsubscribed|lists?|import\w*|suppress\w*|block ?list|blocklist|do not contact|dnc)\b/.test(query);
|
|
1710
|
-
}
|
|
1711
|
-
/** A post's first comment is set with the post; `publishing posts update` takes the same flag. */
|
|
1712
|
-
export const POST_DRAFT_COMMAND = 'oxygen publishing posts create --draft --publish-at <iso> --text "<post>" --json';
|
|
1713
|
-
export const SIGNAL_CAPTURE_COMMAND = 'oxygen crm activity log people <rowId or email> --type website_visit --direction inbound --summary "<what they viewed>" --live --json';
|
|
1714
|
-
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';
|
|
1715
|
-
/**
|
|
1716
|
-
* The comment OXYGEN posts right after a post goes out ("put the link in the first
|
|
1717
|
-
* comment") is part of the post, not a reply to one. The 2026-09-29 baselines found
|
|
1718
|
-
* no flag, guessed `content.first_comment`, and searched in vain.
|
|
1719
|
-
*/
|
|
1720
|
-
function isFirstCommentIntent(query) {
|
|
1721
|
-
return /\bfirst comments?\b/.test(query)
|
|
1722
|
-
&& !/\b(repl(?:y|ies|ied)|respond\w*|answer\w*)\b/.test(query)
|
|
1723
|
-
// Reading comments people left is owned-post comment work, not setting one.
|
|
1724
|
-
&& !/\b(show|list|read|see|view|who|whose)\b/.test(query);
|
|
1725
|
-
}
|
|
1726
|
-
export const COMPANY_PAGE_FOLLOWERS_COMMAND = "oxygen tables followers check --company <linkedin company page URL> --records <n> --json";
|
|
1727
|
-
/**
|
|
1728
|
-
* "The people who follow HubSpot on LinkedIn" / "a competitor's followers" is a
|
|
1729
|
-
* vendor order of a company page's audience (`tables followers`), not the
|
|
1730
|
-
* workspace's own network and not a signal. The Signals card claims the bare
|
|
1731
|
-
* word "follower", so without this a blind user (2026-09-24) got only
|
|
1732
|
-
* `signals *` from `commands search "company followers"` and priced the order
|
|
1733
|
-
* through raw `tools run` instead. The own-network ask stays with its owner.
|
|
1734
|
-
*/
|
|
1735
|
-
function isCompanyPageFollowersIntent(query) {
|
|
1736
|
-
const followers = /\bfollowers?\b/.test(query) || /\b(who|that) follows?\b/.test(query);
|
|
1737
|
-
if (!followers || isOwnLinkedInNetworkIntent(query))
|
|
1738
|
-
return false;
|
|
1739
|
-
if (/\bfollows? (me|us)\b/.test(query) || /\b(my|our) (own )?(linkedin )?followers\b/.test(query))
|
|
1740
|
-
return false;
|
|
1741
|
-
return /\b(compan(y|ies)|competitors?|pages?|brands?|organi[sz]ations?)\b/.test(query)
|
|
1742
|
-
|| (/\blinkedin\b/.test(query) && /\bfollows? (?!me\b|us\b)[a-z0-9]/.test(query));
|
|
301
|
+
return card;
|
|
1743
302
|
}
|
|
1744
303
|
/**
|
|
1745
|
-
*
|
|
1746
|
-
*
|
|
1747
|
-
*
|
|
304
|
+
* Does `term` occur in `query` starting on a word boundary?
|
|
305
|
+
*
|
|
306
|
+
* A plain `query.includes(term)` is what sent "enrich these le**ad**s" and
|
|
307
|
+
* "build me a spre**ad**sheet" to the competitor-ad-intelligence card, and
|
|
308
|
+
* "our i**deal** customer" to CRM Records: a short term matches inside any
|
|
309
|
+
* longer word that happens to contain its letters, and nothing else scores, so
|
|
310
|
+
* the wrong card wins outright rather than narrowly.
|
|
311
|
+
*
|
|
312
|
+
* Only the START of the match is anchored, deliberately. Requiring a boundary at
|
|
313
|
+
* BOTH ends looks stricter and is wrong here, because the cards do not list
|
|
314
|
+
* their own plurals consistently — `sequence`, `workflow`, `table`, `agent` and
|
|
315
|
+
* `campaign` have no plural term beside them — so whole-word matching silently
|
|
316
|
+
* stops routing "sequences", "workflows" and "tables", which are the phrasings
|
|
317
|
+
* people actually type. Anchoring the head keeps every plural and inflection
|
|
318
|
+
* working while refusing the mid-word accidents, and it is the same
|
|
319
|
+
* word-boundary treatment v1.915.0 applied to the Tables guard this scorer sits
|
|
320
|
+
* behind.
|
|
1748
321
|
*/
|
|
1749
|
-
function
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
return false;
|
|
1755
|
-
return /\b(connection|invitation|invite|connect) requests?\b/.test(query)
|
|
1756
|
-
|| /\b(pending|open|unanswered|outstanding|received|sent) (linkedin )?(invitations?|invites?)\b/.test(query);
|
|
1757
|
-
}
|
|
1758
|
-
/** One live sent-invitation page, separate from recurring capture and writes. */
|
|
1759
|
-
function sentLinkedInInvitationReadRecommendation(query) {
|
|
1760
|
-
if (!/\blinkedin\b/.test(query) || !/\b(invitations?|invites?|connection requests?)\b/.test(query)
|
|
1761
|
-
|| !/\b(sent|outgoing)\b/.test(query)
|
|
1762
|
-
|| /\b(incoming|received|mixed|tables?|workflows?|agents?|functions?|crm|mailbox\w*|setup|capture|monitor\w*|sync|recurring|schedule\w*|cron|send|sending|enroll|withdraw\w*|cancel|accept|decline|sequences?|outreach|cadence|research|third party|public)\b/.test(query))
|
|
1763
|
-
return null;
|
|
1764
|
-
if (!/\b(read|list|show|inspect|review|resume|next page|cursor|pagination)\b/.test(query)
|
|
1765
|
-
&& !/\b(cli|command line|native command)\b/.test(query))
|
|
1766
|
-
return null;
|
|
1767
|
-
return {
|
|
1768
|
-
tools: ["oxygen_linkedin_invites_sent", "oxygen_senders_list"],
|
|
1769
|
-
commands: ["linkedin invitations list", "senders list"],
|
|
1770
|
-
execution: "Read one live, free pending-sent invitation page with oxygen_linkedin_invites_sent via oxygen_capabilities_read; CLI twin: oxygen linkedin invitations list --account <ref> --limit <n> --cursor <token> --json. Resolve the sender with oxygen_senders_list. Resume invitations.cursor unchanged with the same account; a full v2 page can need one empty final page. No provider writes or credits. Recurring received/sent capture is linkedin invitations setup; withdrawal is a separate external action.",
|
|
1771
|
-
};
|
|
1772
|
-
}
|
|
1773
|
-
/** Workspace chat assistants are Oxygents; external app workspace selection stays separate. */
|
|
1774
|
-
function isOxygentChatIntent(query) {
|
|
1775
|
-
if (isWorkspacePagesIntent(query) || isSecondPartyDecisionIntent(query))
|
|
1776
|
-
return false;
|
|
1777
|
-
if (/\boxygents?\b/.test(query))
|
|
1778
|
-
return true;
|
|
1779
|
-
if (/\b(chatgpt|claude|codex|oauth|mcp|connectors?|connected apps?)\b/.test(query))
|
|
1780
|
-
return false;
|
|
1781
|
-
const conversation = /\b(chats?|conversations?|histor(?:y|ies))\b/.test(query);
|
|
1782
|
-
const assistantAudience = /\b(?:agents?|assistants?|teammates?)(?:'s)? visibility\b/.test(query)
|
|
1783
|
-
|| /\bvisibility (?:of|for) (?:(?:my|our|the|an?) )?(?:ai )?(?:agents?|assistants?|teammates?)\b/.test(query)
|
|
1784
|
-
// An audience phrase ends here or introduces a relative clause.
|
|
1785
|
-
// Trailing inputs such as "workspace email enrichment" keep their owner.
|
|
1786
|
-
|| /\b(?:assistants?|teammates?) for (?:(?:my|our|the|a) )?(?:(?:personal|private) use|(?:shared|team) workspace(?=$|[,.!?;:)]| (?:that|which|where|with)\b))\b/.test(query)
|
|
1787
|
-
|| /\b(?:private|personal|shared) (?:ai )?(?:agents?|assistants?|teammates?|chats?|conversations?)\b/.test(query);
|
|
1788
|
-
// "Run my private agent only once" is execution, not creator-only access.
|
|
1789
|
-
// An execution request changes owner only when it also names a visibility edit.
|
|
1790
|
-
if (/\bagents?\b/.test(query) && /\b(?:run|execut\w*)\b/.test(query)
|
|
1791
|
-
&& !(assistantAudience && /\bvisibility\b/.test(query) && /\b(?:chang\w*|updat\w*|configur\w*|set)\b/.test(query)))
|
|
1792
|
-
return false;
|
|
1793
|
-
if (/\bai (?:agents? )?(?:assistants?|teammates?)\b/.test(query)) {
|
|
1794
|
-
return (conversation || assistantAudience) && (!/\b(?:run|execut\w*)\b/.test(query) || assistantAudience);
|
|
322
|
+
function matchesIntentTerm(query, term) {
|
|
323
|
+
for (let at = query.indexOf(term); at >= 0; at = query.indexOf(term, at + 1)) {
|
|
324
|
+
const preceding = at === 0 ? "" : query[at - 1] ?? "";
|
|
325
|
+
if (!/[a-z0-9]/.test(preceding))
|
|
326
|
+
return true;
|
|
1795
327
|
}
|
|
1796
|
-
|
|
1797
|
-
// Keep ordinary run requests and private input data on the Agent gateway.
|
|
1798
|
-
if (/\bagents?\b/.test(query) && assistantAudience
|
|
1799
|
-
&& /\b(?:visibility|only|creat\w*|make|new|privacy|configur\w*|settings?)\b/.test(query))
|
|
1800
|
-
return true;
|
|
1801
|
-
// Human membership asks must not re-enter Oxygent mutations through the
|
|
1802
|
-
// generic fallback after the user-facing routine router excludes them.
|
|
1803
|
-
// Explicit Oxygent/AI teammate access above keeps its native owner.
|
|
1804
|
-
if (/\b(?:invite|members?|membership|permissions?|roles?|human|colleague|coworker)\b/.test(query))
|
|
1805
|
-
return false;
|
|
1806
|
-
return /\b(?:assistants?|teammates?)\b/.test(query)
|
|
1807
|
-
&& /\b(chats?|conversations?|histor(?:y|ies)|visibility)\b/.test(query)
|
|
1808
|
-
&& /\b(shared|private|personal|workspace|team|visibility)\b/.test(query);
|
|
1809
|
-
}
|
|
1810
|
-
/**
|
|
1811
|
-
* The apps a person connected with OAuth and where each one works: "make
|
|
1812
|
-
* ChatGPT always use workspace X", "default workspace for my Claude
|
|
1813
|
-
* connection", "list my connected apps". Both blind baselines (2026-09-30)
|
|
1814
|
-
* searched exactly this and got only `orgs select`, which changes the calling
|
|
1815
|
-
* app or CLI and never another app; "connection" alone also pulled in the
|
|
1816
|
-
* LinkedIn connections card.
|
|
1817
|
-
*/
|
|
1818
|
-
function isConnectedAppsIntent(query) {
|
|
1819
|
-
if (/\bconnected apps?\b/.test(query))
|
|
1820
|
-
return true;
|
|
1821
|
-
// The command group's own noun. Tables' "connect" term prefix-matches it, so
|
|
1822
|
-
// `commands search connectors` returned no `connectors` command at all
|
|
1823
|
-
// (CLI acceptance judge, 2026-09-30). Bare noun only: a provider's connector
|
|
1824
|
-
// ("hubspot connector") is never claimed here.
|
|
1825
|
-
if (/^(?:(?:list|show|see|my|our|all|the|mcp|app|apps|ai|oauth)\s+)*connectors?$/.test(query))
|
|
1826
|
-
return true;
|
|
1827
|
-
const connection = /\b(oauth (?:apps?|clients?|connections?|grants?)|mcp (?:clients?|connections?|connectors?))\b/.test(query);
|
|
1828
|
-
const app = connection || /\b(chatgpt|claude|codex|ai (?:apps?|assistants?|clients?))\b/.test(query);
|
|
1829
|
-
if (!app)
|
|
1830
|
-
return false;
|
|
1831
|
-
// An app name alone is not enough ("make Claude always use my brand voice"):
|
|
1832
|
-
// the ask must be about which workspace it works in, or list the connections.
|
|
1833
|
-
const workspaceChoice = /\b(workspaces?|organi[sz]ations?|orgs?)\b/.test(query)
|
|
1834
|
-
&& /\b(default|always|without asking|which|per (?:app|connection|client))\b/.test(query);
|
|
1835
|
-
return workspaceChoice || (connection && /\b(list|show|see|which|my)\b/.test(query));
|
|
1836
|
-
}
|
|
1837
|
-
/**
|
|
1838
|
-
* What OXYGEN sends a connected app (MCP Events, ADR 0030 §10): "what is
|
|
1839
|
-
* ChatGPT subscribed to", "what did OXYGEN send it", "stop it". Both blind
|
|
1840
|
-
* baselines of 2026-09-30 (OXP-11.5.22) searched exactly these words — connector
|
|
1841
|
-
* event subscriptions, deliveries, webhook, notifications, push — and were
|
|
1842
|
-
* handed the inbound provider-webhook tools instead. A billing subscription or a
|
|
1843
|
-
* provider's events ("hubspot webhook") never matches.
|
|
1844
|
-
*/
|
|
1845
|
-
function isConnectedAppEventsIntent(query) {
|
|
1846
|
-
if (/\b(plans?|billing|invoices?|credits?|upgrade|downgrade|stripe|pricing|price)\b/.test(query))
|
|
1847
|
-
return false;
|
|
1848
|
-
if (/\b(hubspot|slack|gmail|calendly|cal\.?com|salesforce|pipedrive|zapier|integrations?|providers?|workflows?|triggers?)\b/.test(query))
|
|
1849
|
-
return false;
|
|
1850
|
-
const app = /\b(chatgpt|claude|codex|connected apps?|connectors?|connections?|apps?|ai (?:assistants?|clients?)|mcp)\b/.test(query);
|
|
1851
|
-
const events = /\b(subscri\w*|events?|webhooks?|notif\w*|push(?:es|ed)?|deliver(?:y|ies|ed)?|sen[dt]s?)\b/.test(query);
|
|
1852
|
-
if (!app || !events)
|
|
1853
|
-
return false;
|
|
1854
|
-
// "send a LinkedIn message from my app" is outreach, not what OXYGEN sends the app.
|
|
1855
|
-
return !/\b(linkedin|email|emails|whatsapp|message|messages|sequence|sequences|campaign|outreach|post|posts)\b/.test(query);
|
|
1856
|
-
}
|
|
1857
|
-
/**
|
|
1858
|
-
* What a connected app may spend (ADR 0030 §11): "how much can ChatGPT spend on
|
|
1859
|
-
* its own in a day", "cap it at 300 credits". Both blind baselines of
|
|
1860
|
-
* 2026-09-30 (OXP-11.5.23) searched for a per-connection daily credit limit and
|
|
1861
|
-
* found only workspace budgets. A sender's or channel's daily limit is not this.
|
|
1862
|
-
*/
|
|
1863
|
-
function isConnectedAppSpendIntent(query) {
|
|
1864
|
-
const app = /\b(chatgpt|claude|codex|connected apps?|connectors?|connections?|per[- ]connection|mcp)\b/.test(query);
|
|
1865
|
-
const spend = /\b(spend\w*|credits?|budgets?|ceilings?|caps?|capped|limits?)\b/.test(query);
|
|
1866
|
-
if (!app || !spend)
|
|
1867
|
-
return false;
|
|
1868
|
-
return !/\b(linkedin|senders?|mailbox(?:es)?|sequences?|email|emails|whatsapp|warm\s?up|invites?|rate)\b/.test(query);
|
|
1869
|
-
}
|
|
1870
|
-
/**
|
|
1871
|
-
* The web app's sidebar pages a person hides from their own sidebar (Settings →
|
|
1872
|
-
* Customise, `settings pages`). Both blind baselines of 2026-09-30 searched
|
|
1873
|
-
* "hide navigation pages sidebar", "customise pages", "pages visibility", "nav
|
|
1874
|
-
* items" and "workspace navigation hidden pages unibox publishing workflows",
|
|
1875
|
-
* and were routed to workspace access, Publishing or nowhere. A sidebar or
|
|
1876
|
-
* navigation noun is enough on its own; "pages" plus a hide/show word is not
|
|
1877
|
-
* when the pages are wiki, LinkedIn, web, PDF or result pages.
|
|
1878
|
-
*/
|
|
1879
|
-
function isWorkspacePagesIntent(query) {
|
|
1880
|
-
// A row, column or cell is content inside a page, and Sales Nav is LinkedIn.
|
|
1881
|
-
if (/\bsales ?nav/.test(query) || /\b(rows?|columns?|cells?|filters?|duplicates?)\b/.test(query))
|
|
1882
|
-
return false;
|
|
1883
|
-
const navigation = /\b(side ?bars?|side ?nav\w*|side ?menus?|nav ?bars?|nav|navigation|left (?:menu|nav\w*|rail|panel)|main menu)\b/.test(query);
|
|
1884
|
-
const visibility = /\b(hid(?:e|es|den|ing)|unhide|visib\w*|invisible)\b/.test(query);
|
|
1885
|
-
const showInNavigation = /\bshow(?:s|n|ing)?\b/.test(query)
|
|
1886
|
-
&& /\b(?:in|on|from|to)\s+(?:the |our |my |this )?(?:side ?bar|side ?nav\w*|navigation|nav|left (?:menu|nav\w*|rail|panel))\b/.test(query);
|
|
1887
|
-
// Explicit sidebar visibility may name the page's primitive: hide Knowledge
|
|
1888
|
-
// from the sidebar or show Tables in navigation still means Customise.
|
|
1889
|
-
if (navigation && (visibility || showInNavigation))
|
|
1890
|
-
return true;
|
|
1891
|
-
if (/\bmenu items?\b/.test(query) && /\b(hid(?:e|es|den|ing)|unhide|show(?:s|n|ing)?|visib\w*)\b/.test(query))
|
|
1892
|
-
return true;
|
|
1893
|
-
// Sidebar page names with a hide verb and a personal scope ("hide Unibox and
|
|
1894
|
-
// Workflows only for me") name the sidebar, not those pages' data; both
|
|
1895
|
-
// personal-sidebar acceptance runs (2026-10-02) found this routed to Messages.
|
|
1896
|
-
if (/\b(unibox|workflows|publishing|sequencer|tables|crm|analytics|knowledge)\b/.test(query)
|
|
1897
|
-
&& /\b(hid(?:e|es|den|ing)|unhide)\b/.test(query)
|
|
1898
|
-
&& /\b(for me|only me|just me|myself|my own|personally)\b/.test(query)
|
|
1899
|
-
&& !/\b(messages?|emails?|threads?|conversations?|repl(?:y|ies)|contacts?|leads?|runs?)\b/.test(query))
|
|
1900
|
-
return true;
|
|
1901
|
-
// Content and navigation within a primitive keep that primitive's owner.
|
|
1902
|
-
// Check this before generic "customize pages" or a navigation noun.
|
|
1903
|
-
if (/\b(wiki|knowledge|linkedin|compan(?:y|ies)|tables?|landing|web ?pages?|websites?|carousels?|pdfs?|paginat\w*|next page|per page|page size|results?|dashboards?)\b/.test(query))
|
|
1904
|
-
return false;
|
|
1905
|
-
if (navigation)
|
|
1906
|
-
return true;
|
|
1907
|
-
if (/\bcustomi[sz](?:e|es|ed|ing|ation)\b/.test(query) && /\b(pages?|menus?)\b/.test(query))
|
|
1908
|
-
return true;
|
|
1909
|
-
if (/^customi[sz]e$|\bsettings?\W{1,5}customi[sz]e\b/.test(query))
|
|
1910
|
-
return true;
|
|
1911
|
-
return /\bpages?\b/.test(query) && /\b(hid(?:e|es|den|ing)|unhide|show(?:s|n|ing)?|visib\w*|invisible)\b/.test(query);
|
|
1912
|
-
}
|
|
1913
|
-
/**
|
|
1914
|
-
* "Organisation settings" (the web's own name for /settings), "workspace
|
|
1915
|
-
* settings", "org settings": the CLI and MCP half of those settings is the
|
|
1916
|
-
* sidebar pages pair. A settings ask that names its own owner (billing, API
|
|
1917
|
-
* keys, members, a connected app, a provider) keeps that owner.
|
|
1918
|
-
*/
|
|
1919
|
-
function isWorkspaceSettingsIntent(query) {
|
|
1920
|
-
if (/\b(billing|plans?|credits?|invoices?|api keys?|members?|invit\w*|seats?|roles?|connected apps?|connectors?|chatgpt|claude|codex|integrations?|providers?|mailbox(?:es)?|senders?|sequences?|linkedin)\b/.test(query))
|
|
1921
|
-
return false;
|
|
1922
|
-
return /\b(workspace|organi[sz]ations?|orgs?|team)\s+settings?\b/.test(query)
|
|
1923
|
-
|| /\bsettings?\s+(?:for|of)\s+(?:the |my |our |this )?(workspace|organi[sz]ation|org|team)\b/.test(query);
|
|
1924
|
-
}
|
|
1925
|
-
/**
|
|
1926
|
-
* "How many tables do I have?", "list my tables": the workspace's own table
|
|
1927
|
-
* inventory, which `tables list` answers with its `total`. Live on dev
|
|
1928
|
-
* (2026-10-10), "How many tables are in this workspace?" routed to
|
|
1929
|
-
* workspace-access on its "workspace" term, and the Tables card led with
|
|
1930
|
-
* creation and enrichment, so a Copilot turn searched three times before it
|
|
1931
|
-
* found the list.
|
|
1932
|
-
*/
|
|
1933
|
-
function isTableInventoryIntent(query) {
|
|
1934
|
-
if (!/\btables\b/.test(query))
|
|
1935
|
-
return false;
|
|
1936
|
-
if (/\b(create|add|new|build|make|import\w*|enrich\w*|delete|remove|rename|archive|duplicate|copy|link|join|merge|rows?|columns?|cells?|largest|biggest|sizes?|favou?rites?|starred|webhooks?|feeds?|functions?|callables?|views?|crm|records?|agents?|workflows?|sequences?|limits?|plan|allow\w*|quota|capacity|teammates?)\b/.test(query))
|
|
1937
|
-
return false;
|
|
1938
|
-
return /\b(how many|count|number of|list|show|which|what)\b/.test(query);
|
|
1939
|
-
}
|
|
1940
|
-
function isTableCapacityReadIntent(query) {
|
|
1941
|
-
if (/\b(monitor|watch|workflow|automate|automation|increase|resize|upgrade)\b/.test(query))
|
|
1942
|
-
return false;
|
|
1943
|
-
return /\b(largest|biggest) tables?\b/.test(query)
|
|
1944
|
-
|| /\btables?\b.{0,30}\b(sizes?|row counts?)\b/.test(query)
|
|
1945
|
-
|| /\b(sizes?|row counts?)\b.{0,30}\btables?\b/.test(query);
|
|
1946
|
-
}
|
|
1947
|
-
function isCompanySourcingIntent(query) {
|
|
1948
|
-
if (/\b(enrich\w*|existing|these|those|rows?|columns?|verify|verification|emails?|phones?|contacts?|people|persons?)\b/.test(query))
|
|
1949
|
-
return false;
|
|
1950
|
-
return /\b(companies|businesses|firms|company search|company sourcing)\b/.test(query)
|
|
1951
|
-
&& /\b(search|plan|find|source|sourcing|discover|build|tam|prospect)\b/.test(query);
|
|
1952
|
-
}
|
|
1953
|
-
/** Scoped row deletion keeps creation and enrichment out of its discovery path. */
|
|
1954
|
-
function tableRowRemovalRecommendation(query) {
|
|
1955
|
-
if (!/\brows?\b/.test(query) || !/\b(delete|remove)\b/.test(query)
|
|
1956
|
-
|| /\b(workflows?|agents?|campaigns?|sequences?|columns?|functions?|callables?|crm|records?|views?|dedup\w*|duplicates?)\b/.test(query)
|
|
1957
|
-
|| isSecondPartyDecisionIntent(query))
|
|
1958
|
-
return null;
|
|
1959
|
-
return {
|
|
1960
|
-
tools: ["oxygen_table_rows_remove_selection", "oxygen_tables_query", "oxygen_table_rows_page"],
|
|
1961
|
-
commands: ["tables rows remove-selection", "tables query", "tables rows page"],
|
|
1962
|
-
execution: "Delete Table rows with tables rows remove-selection (oxygen_table_rows_remove_selection): the rows a readable filter tree matches (--filter-tree-json / filter_tree, the same tree tables query takes), exact row_ids, or an all_matching selection with search, sort, range and exclusions. Hydrate its schema first. Unreadable filter nodes and filters arrays are refused; unqualified all_matching deletes every row. This is permanent and costs 0 credits; to keep a restorable copy first, tables duplicate (oxygen_tables_duplicate, 0 credits). Read the matching rows before deletion and the survivors afterward; each removed row's values stay readable with rows history (oxygen_rows_history). Deleting rows does not stop campaign enrollment.",
|
|
1963
|
-
};
|
|
1964
|
-
}
|
|
1965
|
-
/**
|
|
1966
|
-
* Literal row values go in with the row-insert tool. Without this card "add rows"
|
|
1967
|
-
* ranked create, enrichment and the external Records import first (sweep 3).
|
|
1968
|
-
*/
|
|
1969
|
-
function tableRowInsertRecommendation(query) {
|
|
1970
|
-
if (!/\brows?\b/.test(query) || !/\b(add|adding|insert\w*|append\w*|put|enter|write)\b/.test(query)
|
|
1971
|
-
|| /\b(delete|remove|update|edit|change|set|mark|existing|import\w*|csv|crm|records?|enrich\w*|sync\w*|workflows?|agents?|campaigns?|sequences?|webhooks?|feeds?|functions?|callables?|cells?|dedup\w*|duplicates?)\b/.test(query)
|
|
1972
|
-
|| /\b(?:add|insert|new)\s+(?:an?\s+|the\s+)?(?:\w+\s+)?columns?\b/.test(query)
|
|
1973
|
-
|| isSecondPartyDecisionIntent(query))
|
|
1974
|
-
return null;
|
|
1975
|
-
return {
|
|
1976
|
-
tools: ["oxygen_table_rows_insert", "oxygen_tables_create", "oxygen_tables_query"],
|
|
1977
|
-
commands: ["tables rows insert", "tables create", "tables query"],
|
|
1978
|
-
execution: "Add literal rows with tables rows insert (oxygen_table_rows_insert): table plus rows, an array of {column_key: value} objects. tables create (oxygen_tables_create) makes the columns but takes no rows, so insert after it. Manual rows are a free internal write. Read the rows back with tables query (oxygen_tables_query).",
|
|
1979
|
-
};
|
|
328
|
+
return false;
|
|
1980
329
|
}
|
|
1981
330
|
/**
|
|
1982
|
-
*
|
|
1983
|
-
*
|
|
1984
|
-
*
|
|
1985
|
-
* the weekly Workflow it was asked for (System 1 routing case, 2026-10-22).
|
|
1986
|
-
*/
|
|
1987
|
-
function tableRowUpdateRecommendation(query) {
|
|
1988
|
-
if (!/\b(rows?|cells?)\b/.test(query)
|
|
1989
|
-
|| !(/\b(update\w*|edit\w*|chang\w*|sets?|setting|overwrit\w*|mark\w*)\b/.test(query) || /\bexisting (?:table )?rows?\b/.test(query))
|
|
1990
|
-
|| /\b(delete|remove|insert\w*|append\w*|import\w*|csv|crm|records?|enrich\w*|sync\w*|campaigns?|sequences?|functions?|callables?|dedup\w*|duplicates?|history|provenance|rerun|re-run|retry|columns? run|run columns?|formulas?)\b/.test(query)
|
|
1991
|
-
|| /\b(?:add|insert|new|create)\s+(?:an?\s+|the\s+)?(?:\w+\s+)?(?:columns?|rows?)\b/.test(query)
|
|
1992
|
-
|| isSecondPartyDecisionIntent(query))
|
|
1993
|
-
return null;
|
|
1994
|
-
return {
|
|
1995
|
-
tools: ["oxygen_rows_update", "oxygen_tables_query", "oxygen_rows_upsert"],
|
|
1996
|
-
commands: ["tables update", "tables query", "tables upsert"],
|
|
1997
|
-
execution: "Change values on existing rows with tables update (oxygen_rows_update): table, row_id and values as {column_key: value}, one row per call, a free internal write. Find the rows and their _row_id with tables query (oxygen_tables_query) and filters first; tables upsert (oxygen_rows_upsert) writes by a key column instead. In a Workflow, loop over the query's rows and call oxygen_rows_update with row_id loop.each.item._row_id. Read the rows back after writing.",
|
|
1998
|
-
};
|
|
1999
|
-
}
|
|
2000
|
-
/** Reads of grid values/state are separate from executing or resolving actions. */
|
|
2001
|
-
function tableReadRecommendation(query) {
|
|
2002
|
-
if (isFunctionIntent(query) || isSecondPartyDecisionIntent(query)
|
|
2003
|
-
|| /\b(workflows?|agents?|actions?|items?|retry|resolve|effects?|imports?|webhooks?|feeds?|enrich\w*|create|add|insert|upsert|update|delete|remove|rename|hide|archive|columns? run)\b/.test(query)
|
|
2004
|
-
|| /\b(run|execute|start|cancel)\s+(?:(?:the|my|these)\s+)?(?:columns?|table|enrichment)\b/.test(query))
|
|
2005
|
-
return null;
|
|
2006
|
-
// An explicit order over existing labels reads rows; it does not classify
|
|
2007
|
-
// them or create a rank column. The column-only wording also names Tables.
|
|
2008
|
-
if (/\b(tables?|rows?|columns?)\b/.test(query)
|
|
2009
|
-
&& /\b(sort(?:s|ed|ing)?|order(?:s|ed|ing)?|rank(?:s|ed|ing)?)\b/.test(query)
|
|
2010
|
-
&& /\b(custom|explicit)\b/.test(query)
|
|
2011
|
-
&& /\b(labels?|values?|priority|select|options?)\b/.test(query)
|
|
2012
|
-
&& !/\b(classif\w*|categori[sz]\w*|tag(?:ging)?|assign|set|change|edit|reorder\w*|mov(?:e|es|ed|ing)|sav(?:e|es|ed|ing)|configur(?:e|es|ed|ing)|calculat(?:e|es|ed|ing)|scor(?:e|es|ed|ing)|enroll\w*|send\w*|sequences?|campaigns?)\b/.test(query)
|
|
2013
|
-
&& !/\b(do not|don't|avoid|without)\s+(sort|order|rank)\w*\b/.test(query))
|
|
2014
|
-
return {
|
|
2015
|
-
tools: ["oxygen_tables_query", "oxygen_tables_describe"], commands: ["tables query", "tables describe"],
|
|
2016
|
-
execution: "Raw tables query supports sorts[].valueOrder (alias value_order) for an explicit label order. Inspect the Table's column keys and query schema first. Values are trimmed/lowercased and deduplicated; asc puts listed values first and unlisted/null last, desc reverses. Equal ranks follow later sorts; implicit creation-time and final row-ID tiebreaks mirror the leading direction. An empty list uses ordinary sorting. Keep the same sorts when following its cursor. format=grid rejects sorts; rows-page and saved-view sort formats have separate schemas. This read does not classify rows or run columns.",
|
|
2017
|
-
};
|
|
2018
|
-
if (!/\btables?\b/.test(query))
|
|
2019
|
-
return null;
|
|
2020
|
-
if (/\bcells?\b/.test(query) && /\b(history|changes?|provenance)\b/.test(query))
|
|
2021
|
-
return {
|
|
2022
|
-
tools: ["oxygen_tables_cell_history", "oxygen_tables_cell_inspect"], commands: ["cells history", "cells inspect"],
|
|
2023
|
-
execution: "Read one cell's recorded value changes with cells history; cells inspect adds its provider attempt timeline. These reads do not run columns or resolve an uncertain external effect.",
|
|
2024
|
-
};
|
|
2025
|
-
if (/\bcells?\b/.test(query) && /\b(provider|attempts?|timeline)\b/.test(query))
|
|
2026
|
-
return {
|
|
2027
|
-
tools: ["oxygen_tables_cell_inspect", "oxygen_tables_cell_history"], commands: ["cells inspect", "cells history"],
|
|
2028
|
-
execution: "Inspect one cell's final value and provider attempt timeline with cells inspect. Cell history reads recorded changes; neither executes a column or records a verified external outcome.",
|
|
2029
|
-
};
|
|
2030
|
-
if (isTableCapacityReadIntent(query) && !/\bgrid\b/.test(query))
|
|
2031
|
-
return null;
|
|
2032
|
-
if (!/\b(grid|preview|raw rows|fill rates?|next page|pagination|cursor)\b/.test(query)
|
|
2033
|
-
&& !(/\b(read|show|inspect|query)\b/.test(query) && /\brows?\b/.test(query)))
|
|
2034
|
-
return null;
|
|
2035
|
-
if (/\b(filtered?|filters?|sorts?|search|crm)\b/.test(query) && /\b(grid|counts?|registry)\b/.test(query))
|
|
2036
|
-
return {
|
|
2037
|
-
tools: ["oxygen_table_rows_page", "oxygen_tables_query", "oxygen_tables_preview"], commands: ["tables rows page", "tables query", "tables preview"],
|
|
2038
|
-
execution: "Use tables rows page for filtered/sorted/searchable grid cells and summarized run state, with CRM scope and count modes. exact counts matches; estimate uses reconciled registry only when unnarrowed, else exact. registry never counts and returns null for narrowed/unreconciled scope; skip returns no total (null). Cursor walks retain the same read scope; offset supports random access. Raw tables query supports its declared selectors; query format=grid refuses them.",
|
|
2039
|
-
};
|
|
2040
|
-
if (/\b(fill rates?|without row|summary only|summary_only)\b/.test(query)
|
|
2041
|
-
|| (/\bpreview\b/.test(query) && !/\bgrid\b/.test(query)))
|
|
2042
|
-
return {
|
|
2043
|
-
tools: ["oxygen_tables_preview", "oxygen_tables_query", "oxygen_table_fill_progress"], commands: ["tables preview", "tables query", "tables fill-progress"],
|
|
2044
|
-
execution: "Use tables preview for projected rows and whole-table fill stats; include_cell_states adds compact state and summary_only omits row JSON. rowCount is exact; summary.statsSampled labels sampled rates. Its cursor pages the MCP widget with a minimal plain receipt, not preview row/stat JSON. For data paging use tables query format=grid or tables rows page; fill-progress reads ingestion state. These reads do not run columns.",
|
|
2045
|
-
};
|
|
2046
|
-
return {
|
|
2047
|
-
tools: ["oxygen_tables_query", "oxygen_tables_preview", "oxygen_table_rows_page", "oxygen_table_fill_progress"], commands: ["tables query", "tables preview", "tables rows page", "tables fill-progress"],
|
|
2048
|
-
execution: "Use tables query for raw values, format=\"grid\" for cell previews and summarized run state, or tables preview for fill rates. Grid HTTP/CLI defaults 50 and caps 200; MCP defaults 50 and clamps supplied limits to 100. Follow grid.nextCursor with the same read scope; hasMore=false and nextCursor=null end the walk, without a snapshot. Grid refuses row_id, fields, filters/filterTree, search, sorts, formula_values and nonzero offset; system/widget flags do not change it. Without stats, first-page rowCountMode is registry if reconciled, else exact; cursor pages are skipped (rowCount=null). include_stats can replace rowCount with an exact whole-table count even on continuation; column rates may be sampled and unavailable stats are omitted. include_fill adds ingestion state only to an empty first page, distinct from fill rates. The native max_chars window can shorten a whole-row prefix or refuse an oversized first row/metadata. These reads do not run columns.",
|
|
2049
|
-
};
|
|
2050
|
-
}
|
|
2051
|
-
/** Native database work outranks generic workspace access and credit billing. */
|
|
2052
|
-
function databaseRecommendation(query) {
|
|
2053
|
-
if (!/\b(databases?|postgres(?:ql)?|db|sql)\b/.test(query)
|
|
2054
|
-
|| /\b(tables?|grid|external|import|workflows?|agents?|enrich\w*|providers?|integrations?|oauth|byok|mailbox\w*|crm|hubspot|salesforce|supabase)\b/.test(query))
|
|
2055
|
-
return null;
|
|
2056
|
-
const actions = [
|
|
2057
|
-
["oxygen_workspace_database_status", "db status"], ["oxygen_database_cost_policy", "db cost-policy"],
|
|
2058
|
-
["oxygen_database_query", "db query"], ["oxygen_database_attach", "db attach"],
|
|
2059
|
-
["oxygen_database_migrate", "db migrate"], ["oxygen_workspace_database_provision", "db provision"],
|
|
2060
|
-
["oxygen_database_cost_policy_reconcile", "db reconcile-cost-policy"],
|
|
2061
|
-
];
|
|
2062
|
-
const first = /\b(migrat\w*|rotate credentials)\b/.test(query) ? 4
|
|
2063
|
-
: /\b(attach|connect|connection)\b/.test(query) ? 3
|
|
2064
|
-
: /\b(query|sql|select|explain)\b/.test(query) ? 2
|
|
2065
|
-
: /\b(provision\w*)\b/.test(query) ? 5
|
|
2066
|
-
: /\breconcile\b/.test(query) ? 6
|
|
2067
|
-
: /\b(cost policy|cost controls?|sleep|suspend|reconcile)\b/.test(query) && !/\bstatus\b/.test(query) ? 1 : 0;
|
|
2068
|
-
const ordered = [actions[first], ...actions.filter((_, index) => index !== first)];
|
|
2069
|
-
return {
|
|
2070
|
-
tools: ordered.map(([tool]) => tool), commands: ordered.map(([, command]) => command),
|
|
2071
|
-
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.",
|
|
2072
|
-
};
|
|
2073
|
-
}
|
|
2074
|
-
/** Direct Table operations keep their native gateway ahead of general authoring.
|
|
2075
|
-
* Explicit Workflow triggers, mailbox imports and CRM attachments retain their owners. */
|
|
2076
|
-
function tableMaintenanceRecommendation(query) {
|
|
2077
|
-
if (isFunctionIntent(query) || isSecondPartyDecisionIntent(query)
|
|
2078
|
-
|| /\b(workflows?|agents?|campaigns?|tags?|mailbox\w*|crm|attachments?|chatgpt|connected apps?)\b/.test(query)
|
|
2079
|
-
|| (isTableMaintenanceIntent(query) && /\b(skills?|instructions?|guidance)\b/.test(query)))
|
|
2080
|
-
return null;
|
|
2081
|
-
const table = /\btables?\b/.test(query);
|
|
2082
|
-
const result = (tools, commands, execution) => ({ tools, commands, execution });
|
|
2083
|
-
if (/\b(favou?rites?|starred|star|unstar)\b/.test(query) && /\b(tables?|folders?)\b/.test(query)) {
|
|
2084
|
-
const mutate = !/\bstar unstar\b/.test(query) && (/\b(unstar|unfavou?rite)\b/.test(query) || (/\b(favou?rite|star)\b/.test(query) && !/\b(show|list|read|see|favorites|favourites|star unstar)\b/.test(query)));
|
|
2085
|
-
return result(mutate ? ["oxygen_tables_favorite", "oxygen_tables_favorites"] : ["oxygen_tables_favorites", "oxygen_tables_favorite"], mutate ? ["tables favorite", "tables favorites"] : ["tables favorites", "tables favorite"], "Read your member-specific Table/folder stars, then change exactly one table or folder with favorite=true or false. This costs 0 credits. Tool-catalog favorites are separate.");
|
|
2086
|
-
}
|
|
2087
|
-
if (table && /\b(webhooks?|inbound.*endpoint|push.*endpoint|endpoint.*(?:inbound|push))\b/.test(query)) {
|
|
2088
|
-
if (/\bdeliver\w*\b/.test(query))
|
|
2089
|
-
return result(["oxygen_table_webhook_deliveries", "oxygen_table_webhook_get"], ["tables webhook deliveries", "tables webhook get"], "Inspect this Table endpoint and its delivery ledger. A direct Table webhook lands rows; a Workflow webhook starts a published graph.");
|
|
2090
|
-
if (/\b(change|edit|update|rotat\w*|pause|disable|clear)\b/.test(query) && !/\bcreate\b/.test(query))
|
|
2091
|
-
return result(["oxygen_table_webhook_update", "oxygen_table_webhook_get"], ["tables webhook update", "tables webhook get"], "Inspect the endpoint, then update it by endpoint_id. auth_mode=secret rotates the secret and returns it once. auto_run is standing permission; delivery ceilings are explicit or plan-default. Preserve required authorization.");
|
|
2092
|
-
if (/\b(create|add|new|inbound)\b/.test(query) && !/\b(inspect|show|list|read)\b/.test(query))
|
|
2093
|
-
return result(["oxygen_table_webhook_create", "oxygen_table_webhooks_list"], ["tables webhook create", "tables webhook list"], "Create a direct inbound Table endpoint to insert or upsert rows. Inspect configured columns before setting auto_run: it is standing permission, with explicit or plan-default delivery ceilings. Workflows own graph triggers.");
|
|
2094
|
-
return result(["oxygen_table_webhooks_list", "oxygen_table_webhook_get", "oxygen_table_webhook_deliveries"], ["tables webhook list", "tables webhook get", "tables webhook deliveries"], "Inspect direct Table endpoints and their deliveries. Use oxygen_table_webhook_create/update for changes; auth_mode=secret rotates protection. Workflows own graph triggers.");
|
|
2095
|
-
}
|
|
2096
|
-
if (table && /\bfeeds?\b/.test(query)) {
|
|
2097
|
-
return /\b(bind|attach|create|new)\b/.test(query)
|
|
2098
|
-
? result(["oxygen_feeds_bind", "oxygen_feeds_list"], ["feeds bind", "feeds list"], "Bind the native Table feed: a declared-schema push source or scheduled provider pull. Inspect source, cadence and standing credit scope first; a pull feed is not an inbound webhook endpoint.")
|
|
2099
|
-
: result(["oxygen_feeds_list", "oxygen_feeds_get", "oxygen_feeds_update"], ["feeds list", "feeds get", "feeds update"], "Inspect the Table feed with feeds_get(include_route=true), then update it in place via oxygen_feeds_update (Signals pack/core write gateway) or feeds update. Preserve the full frozen request; source replacement resets its cursor. Scheduled replacements require one executable lane; fallbacks require no cadence. Native changed cadence or expanded paid source/cap authority can require renewed standing approval; configuration is free.");
|
|
2100
|
-
}
|
|
2101
|
-
const file = /\b(csv|jsonl?|xlsx|excel|spreadsheet|staged|uploaded|file)\b/.test(query)
|
|
2102
|
-
|| /\b(?:pending|stuck|abandoned) imports?\b|\bimports?\b.{0,30}\b(pending|stuck|recover\w*)\b/.test(query);
|
|
2103
|
-
if (file && /\b(import\w*|ingestion|upload\w*|preview|columns|sample|chunks)\b/.test(query)) {
|
|
2104
|
-
if (/\b(pending|leased|failed|recover|chunks)\b/.test(query))
|
|
2105
|
-
return result(/\b(chunks|items)\b/.test(query) ? ["oxygen_table_ingestions_items", "oxygen_table_ingestions_get"] : ["oxygen_table_ingestions_get", "oxygen_table_ingestions_items"], ["table-ingestions get", "table-ingestions items"], "Inspect the durable file ingestion and its chunks. Fix the cause before retry-failed; pending or leased chunks are not verified external outcomes. recover_pending polls existing BetterContact requests, not file imports.");
|
|
2106
|
-
if (/\b(url|https?)\b/.test(query))
|
|
2107
|
-
return result(["oxygen_tables_import_url"], ["tables import"], "Use the native public-file URL preview/import tool through the call gateway even for preview. Importing into an existing Table can fire its standing import auto-run; preview and new unarmed targets do not authorize later paid or external actions.");
|
|
2108
|
-
if (/\b(preview|inspect|columns|sample|sheet)\b/.test(query))
|
|
2109
|
-
return result(["oxygen_tables_import_preview", "oxygen_tables_import_staged"], ["tables import-preview", "tables import-staged"], "Inspect the owned staged file's worksheet, complete columns and sample before importing. Keep the selected sheet/mapping intact. Import into an existing Table can fire its standing import auto-run; preview grants no spend authority.");
|
|
2110
|
-
if (/\b(prepare|upload)\b/.test(query))
|
|
2111
|
-
return result(["oxygen_tables_import_upload", "oxygen_tables_import_preview", "oxygen_tables_import_staged"], ["tables import-upload", "tables import-preview", "tables import-staged"], "Prepare an organization-owned upload, transfer bytes to the returned presigned URL, then inspect and import that storage key. Preparing the upload creates no Table/run. Public URL imports use oxygen_tables_import_url.");
|
|
2112
|
-
return result(["oxygen_tables_import_staged", "oxygen_tables_import_preview"], ["tables import-staged", "tables import-preview"], "Import the inspected owned staged file with its selected worksheet/mapping. Existing targets can fire standing import auto-run; a new target has no pre-existing armed columns. Preserve exact authorization and downstream credit/effect guards.");
|
|
2113
|
-
}
|
|
2114
|
-
if (table && /\b(actions?|cells?|items?|runs?)\b/.test(query)) {
|
|
2115
|
-
if (/\b(verified|confirmed)\b/.test(query) && /\b(record|resolve)\b/.test(query) && !/\b(inspect|list|show|read)\b/.test(query))
|
|
2116
|
-
return /\bcells?\b/.test(query)
|
|
2117
|
-
? result(["oxygen_table_cells_resolve", "oxygen_table_runs_effect_unknown"], ["cells resolve", "table-runs effect-unknown"], "After verifying the external destination, record applied or not_applied by Table cell coordinates. This records an outcome without repeating the effect; retry remains a separate guarded action.")
|
|
2118
|
-
: result(["oxygen_table_action_item_resolve", "oxygen_table_runs_effect_unknown"], ["table-actions resolve", "table-runs effect-unknown"], "After verifying the external destination, record applied or not_applied by action item_id. This records an outcome without repeating the effect; retry remains a separate guarded action.");
|
|
2119
|
-
if (/\b(effect.*unknown|uncertain|verified outcome|blocked.*resolve)\b/.test(query))
|
|
2120
|
-
return result(["oxygen_table_runs_effect_unknown", "oxygen_table_runs_get", "oxygen_table_runs_items"], ["table-runs effect-unknown", "table-runs get", "table-runs items"], "Inspect exact effect-unknown items and verify the external destination. Only then record a verdict with oxygen_table_action_item_resolve by item_id or oxygen_table_cells_resolve by coordinates. Pending/failed items are not proof; retry is separate.");
|
|
2121
|
-
// Everything that ran on one Table (imports, column runs, writes) is the workspace run
|
|
2122
|
-
// ledger filtered by table; table-runs covers action runs only (blind CLI/MCP passes, 2026-10-05).
|
|
2123
|
-
if (/\b(every|all|already|ever|history|imports?|ingestions?|touched|anything|everything)\b/.test(query) && !/\b(failures?|failed|items?|cells?|effect)\b/.test(query))
|
|
2124
|
-
return result(["oxygen_runs_list", "oxygen_table_action_runs_list"], ["runs list", "table-runs list"], "List every recorded run of one Table, newest first, with `runs list --table <table>` (MCP oxygen_runs_list with table): imports, column runs and other writes. table-runs list covers column/action runs only.");
|
|
2125
|
-
return result(["oxygen_table_action_runs_list", "oxygen_table_runs_get", "oxygen_table_runs_items"], ["table-runs list", "table-runs get", "table-runs items"], "Find the Table's durable action run, then inspect its status and items. Pending, leased and failed are distinct from effect-unknown; do not record a verified verdict or retry an external effect without evidence.");
|
|
2126
|
-
}
|
|
2127
|
-
return null;
|
|
2128
|
-
}
|
|
2129
|
-
/**
|
|
2130
|
-
* Column structure the web's column editor and "Link to another table" own:
|
|
2131
|
-
* linking two tables, plain and choice field types with their options, and a
|
|
2132
|
-
* lookup or bind column's configuration. All of it was reachable from the CLI
|
|
2133
|
-
* and MCP, but generic table discovery ranked `tables create` first (2026-10-10:
|
|
2134
|
-
* "link two tables" put `tables relate` tenth, and the Copilot, asked for a
|
|
2135
|
-
* select column, decided the API had none). Sort, rank and order wording stays
|
|
2136
|
-
* with the value-order read above.
|
|
2137
|
-
*/
|
|
2138
|
-
function tableStructureRecommendation(query) {
|
|
2139
|
-
if (isFunctionIntent(query) || isSecondPartyDecisionIntent(query)
|
|
2140
|
-
|| /\b(workflows?|agents?|campaigns?|sequences?|crm|views?|kanban|sort\w*|order\w*|rank\w*|runs?|credits?)\b/.test(query))
|
|
2141
|
-
return null;
|
|
2142
|
-
const edits = /\b(change|edit|update|rename|recolou?r|replace|remove|delete|existing)\b/.test(query);
|
|
2143
|
-
const pair = (add, update) => {
|
|
2144
|
-
const [first, second] = edits ? [update, add] : [add, update];
|
|
2145
|
-
return { tools: [first[0], second[0]], commands: [first[1], second[1]] };
|
|
2146
|
-
};
|
|
2147
|
-
if (/\b(link\w*|connect\w*|relat\w*|join\w*)\b/.test(query)
|
|
2148
|
-
&& /\btables\b|\btable\b.{0,40}\btable\b|\blinked.records?\b|\blinked.record.columns?\b/.test(query))
|
|
2149
|
-
return {
|
|
2150
|
-
tools: ["oxygen_tables_relate", "oxygen_tables_link", "oxygen_tables_link_bulk", "oxygen_tables_relations"],
|
|
2151
|
-
commands: ["tables relate", "tables link", "tables relations list"],
|
|
2152
|
-
execution: "Link two Tables like the web's Link to another table: tables relate <table> --to <other> (oxygen_tables_relate) creates an empty linked-record column on BOTH tables; no matching values are needed and plain tables never become CRM objects. Then link rows one pair at a time with tables link <table> <row_id> --relation <slug> --target-row-id <id> (oxygen_tables_link), or by matching values with tables link <table> --to <other> (oxygen_tables_link_bulk: free preview, then approved). tables relations list|update|archive manages it. 0 credits.",
|
|
2153
|
-
};
|
|
2154
|
-
if (/\b(lookups?|look up|vlookup)\b/.test(query) && /\b(columns?|tables?)\b/.test(query))
|
|
2155
|
-
return {
|
|
2156
|
-
...pair(["oxygen_columns_add", "columns add"], ["oxygen_columns_update", "columns update"]),
|
|
2157
|
-
execution: "A lookup column reads another Table by a key: columns add <table> --lookup-table <source> --lookup-match <local>=<source_column> with --lookup-mode first-match|count|exists|aggregate, --lookup-return, --lookup-normalize, --lookup-order or --lookup-aggregate (MCP oxygen_columns_add kind lookup). Edit one with the same flags on columns update; they apply over the stored join, and the data type follows the mode. Free; reads resolve live. To link rows instead, tables relate.",
|
|
2158
|
-
};
|
|
2159
|
-
if (/\b(bind|binding)\b/.test(query) && /\bcolumns?\b/.test(query))
|
|
2160
|
-
return {
|
|
2161
|
-
...pair(["oxygen_columns_add", "columns add"], ["oxygen_columns_update", "columns update"]),
|
|
2162
|
-
execution: "A bind column resolves each row to a CRM record: columns add <table> --bind-object companies --bind-map domain=<column> (MCP kind bind, definition.object and inputMapping). columns update --bind-object/--bind-map/--bind-create edits it over the stored binding. Creating records on no match is a truth write that needs an approved run.",
|
|
2163
|
-
};
|
|
2164
|
-
if (/\b(columns?|fields?)\b/.test(query)
|
|
2165
|
-
&& /\b(select|single.select|multi.?select|dropdown|picklist|status|choices?|options?|checkbox|date|number|markdown)\b/.test(query))
|
|
2166
|
-
return {
|
|
2167
|
-
...pair(["oxygen_columns_add", "columns add"], ["oxygen_columns_update", "columns update"]),
|
|
2168
|
-
execution: "Add a plain field by its type, the web picker's names: columns add <table> --label <label> --type select|multi_select|status|text|number|checkbox|date|json|markdown|image, with --options \"A,B,C\" for a choice type (MCP oxygen_columns_add column.type, choices in definition.options). Replace a choice column's options with columns update --options (MCP options); cells store each value, so a rename is a new label on the same value. Setting a cell is a row write. 0 credits.",
|
|
2169
|
-
};
|
|
2170
|
-
return null;
|
|
2171
|
-
}
|
|
2172
|
-
/** Stored conversation drafts are Messages data, rather than worker queue health. */
|
|
2173
|
-
function storedReplyDraftReadRecommendation(query) {
|
|
2174
|
-
if (!/\bdrafts?\b/.test(query)
|
|
2175
|
-
|| !/\b(read|inspect|list|show|stored|retained|queue|history|historical)\b/.test(query)
|
|
2176
|
-
|| !/\b(conversations?|threads?|inbox|unibox|repl(?:y|ies)|whatsapp|email|linkedin)\b/.test(query)
|
|
2177
|
-
|| /\b(workers?|jobs?|workflows?|cron|repair|publishing|posts?|creators?|ugc|sequences?|campaigns?)\b/.test(query)
|
|
2178
|
-
|| /\b(approve|approving|send|sending|edit|editing|reject|rejecting|generate|generating|create|creating)\b/.test(query))
|
|
2179
|
-
return null;
|
|
2180
|
-
const whatsapp = /\bwhatsapp\b/.test(query);
|
|
2181
|
-
const otherChannel = /\b(email|linkedin)\b/.test(query);
|
|
2182
|
-
const tools = whatsapp && !otherChannel ? ["oxygen_whatsapp_drafts_list"]
|
|
2183
|
-
: otherChannel && !whatsapp ? ["oxygen_inbox_drafts_list"]
|
|
2184
|
-
: ["oxygen_inbox_drafts_list", "oxygen_whatsapp_drafts_list"];
|
|
2185
|
-
const commands = tools.map(tool => tool === "oxygen_whatsapp_drafts_list" ? "whatsapp drafts list" : "inbox drafts list");
|
|
2186
|
-
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." };
|
|
2187
|
-
}
|
|
2188
|
-
/**
|
|
2189
|
-
* Seeded sample records, and keeping one as real (OXP-6.3.14). In the
|
|
2190
|
-
* 2026-10-06 blind acceptance the records route answered "mark a sample deal as
|
|
2191
|
-
* a real deal" with search/get alone, and `commands search "sample"` ranked
|
|
2192
|
-
* `crm keep` third, behind `formulas validate` and `sequences start`. A sample
|
|
2193
|
-
* OF something (rows, a run, a batch, copy) is a test slice that other owners
|
|
2194
|
-
* keep; seed/demo/example name samples only beside data or records, so "seed
|
|
2195
|
-
* companies" and "demo deals" keep their sourcing and pipeline meanings.
|
|
2196
|
-
*/
|
|
2197
|
-
function crmSampleRecordRecommendation(query) {
|
|
2198
|
-
const record = /\b(records?|deals?|compan(?:y|ies)|contacts?|people|persons?|accounts?|ceos?|opportunit(?:y|ies))\b/;
|
|
2199
|
-
const named = /\b(?:crm|record) keep\b/.test(query);
|
|
2200
|
-
const slice = /\b(tables?|rows?|columns?|cells?|spreadsheets?|enrich\w*|runs?|batch(?:es)?|previews?|formulas?|sequences?|campaigns?|messages?|posts?|copy|templates?|prompts?|recipes?|workflows?|agents?)\b/.test(query)
|
|
2201
|
-
|| /\bsamples? (?:of|size|run|batch)\b|\b(?:small|random|test|representative) samples?\b/.test(query);
|
|
2202
|
-
const asReal = /\bas (?:an? )?real\b/.test(query) && record.test(query);
|
|
2203
|
-
const sample = (/\bsamples?\b/.test(query) && (/^samples?$/.test(query) || record.test(query) || /\b(data|pipeline|crm)\b/.test(query)))
|
|
2204
|
-
|| /\b(?:seed(?:ed)?|demo|example) (?:data|records?)\b/.test(query)
|
|
2205
|
-
|| /\bseeded (?:deals?|compan(?:y|ies)|contacts?|people|persons?|accounts?|pipeline)\b/.test(query)
|
|
2206
|
-
|| /\b(?:dummy|placeholder|fake) (?:data|records?|deals?|compan(?:y|ies)|contacts?|people|persons?|accounts?)\b/.test(query);
|
|
2207
|
-
if (!named && (slice || (!asReal && !sample)))
|
|
2208
|
-
return null;
|
|
2209
|
-
return {
|
|
2210
|
-
tools: ["oxygen_crm_record_keep", "oxygen_crm_pipeline", "oxygen_crm_record_search", "oxygen_crm_record_get"],
|
|
2211
|
-
commands: ["crm keep", "crm pipeline", "crm search", "crm get"],
|
|
2212
|
-
execution: "A new workspace's seeded companies, CEOs and deals read _sample: true (sample: true on suggest hits and crm pipeline deals); pipeline, dashboard and chart totals leave them out and say how many. Keep one as real only when the user says it is: crm keep <object> <record> takes a row id or an identity such as stripe.com. It is free and idempotent, has no undo, and keeps that record alone: a kept deal's company and contact stay samples until each is kept. MCP runs oxygen_crm_record_keep through oxygen_capabilities_call.",
|
|
2213
|
-
};
|
|
2214
|
-
}
|
|
2215
|
-
/** Inventory reads select existing Table fields and retain honest sample totals. */
|
|
2216
|
-
function crmInventoryRecommendation(query) {
|
|
2217
|
-
if (!/\b(crm|records?)\b/.test(query)
|
|
2218
|
-
|| !/\b(count|how many|inventory|list|enumerate|browse)\b/.test(query)
|
|
2219
|
-
|| /\b(enrich\w*|configur\w*|settings?|presets?|fields?|attributes?|identities|relationships?|tasks?|notes?|files?|sync|hubspot|attio|pipedrive|import|create|add|edit|update|delete|remove|merge|workflows?|agents?)\b/.test(query))
|
|
2220
|
-
return null;
|
|
2221
|
-
return { tools: ["oxygen_crm_objects_list", "oxygen_tables_preview", "oxygen_crm_record_get"], commands: ["crm objects", "tables preview", "crm get"] };
|
|
2222
|
-
}
|
|
2223
|
-
/** Saved contact facts belong to Records, regardless of email/phone channel words. */
|
|
2224
|
-
function storedCrmContactReadRecommendation(query) {
|
|
2225
|
-
if (!/\b(crm|records?)\b/.test(query)
|
|
2226
|
-
|| !/\b(read|show|get|find|lookup|look up|retrieve|inspect|view|describe)\b/.test(query)
|
|
2227
|
-
|| !/\b(emails?|phones?|mobile|contact details|contact information)\b/.test(query)
|
|
2228
|
-
|| /\b(send\w*|repl(?:y|ies)|messages?|inbox|threads?|drafts?|posts?|comments?|outreach|sequences?|campaigns?|dial\w*|call|create|add|edit|update|change|delete|remove|merge|import|sync|missing|new|enrich\w*|providers?|waterfall|verify|verification|validate|tables?|rows?|columns?|spreadsheet|dataset|workflows?|schedule\w*|recurring|cron)\b/.test(query))
|
|
2229
|
-
return null;
|
|
2230
|
-
return {
|
|
2231
|
-
tools: ["oxygen_crm_record_search", "oxygen_crm_record_get", "oxygen_crm_object_describe"],
|
|
2232
|
-
commands: ["crm search", "crm get", "crm describe"],
|
|
2233
|
-
execution: "Read saved Records; no lookup or send. Hydrate search/get schemas; mode=suggest finds partial names, records resolves identities. Get takes object + row_id; describe the object or one attribute for unknown field keys. External MCP uses oxygen_capabilities_read for these unlisted reads; built-in agents invoke the native tools. Missing contact enrichment and CRM writes are separate actions.",
|
|
2234
|
-
};
|
|
2235
|
-
}
|
|
2236
|
-
/** Finding contact details is a native lookup; channel words alone do not mean sending. */
|
|
2237
|
-
function oneShotContactFindingRecommendation(query) {
|
|
2238
|
-
if (/\b(send\w*|repl(?:y|ies)|messages?|inbox|threads?|drafts?|posts?|comments?|engagement|audiences?|followers?|outreach|sequences?|campaigns?|dial\w*|call|crm|records?|stored|saved|verify|verification|validate|deliverability|mailboxes?|warmup|accounts?|limits?|tables?|rows?|columns?|spreadsheet|dataset|enrich\w*|bulk|batch|workflows?|schedule\w*|recurring|weekly|daily|every|cron|workers?|jobs?|providers?|catalog|schemas?|metadata|pricing|personal|private|home|scrape\w*|public)\b/.test(query)
|
|
2239
|
-
|| /\bfind companies\b/.test(query))
|
|
2240
|
-
return null;
|
|
2241
|
-
const verb = /\b(find|lookup|look up|get|locate|obtain)\b/.exec(query);
|
|
2242
|
-
if (!verb)
|
|
2243
|
-
return null;
|
|
2244
|
-
const target = query.slice(verb.index + verb[0].length, verb.index + verb[0].length + 120);
|
|
2245
|
-
const email = /\bemails?\b/.test(target);
|
|
2246
|
-
const phone = /\bphones?\b|\bmobile numbers?\b/.test(target);
|
|
2247
|
-
if (!email && !phone)
|
|
2248
|
-
return null;
|
|
2249
|
-
return {
|
|
2250
|
-
tools: [...(email ? ["oxygen_find_email"] : []), ...(phone ? ["oxygen_find_phone"] : []), "oxygen_tools_search"],
|
|
2251
|
-
commands: [...(email ? ["find email"] : []), ...(phone ? ["find phone"] : []), "tools search"],
|
|
2252
|
-
execution: "Hydrate the selected native one-shot lookup schema. mode=dry_run previews its waterfall; live requires the user's approved exact scope and positive max_credits. readOnlyHint=false and openWorldHint=true still apply to previews. External MCP uses oxygen_capabilities_call for an unlisted lookup; built-in agents call the native capability under their existing policy. Free catalog metadata uses the read gateway. Sending and bulk Table enrichment have separate owners.",
|
|
2253
|
-
};
|
|
2254
|
-
}
|
|
2255
|
-
/** Native row-supply feeds belong to Tables; Signals is their registered MCP pack. */
|
|
2256
|
-
function tableFeedRecommendation(rawQuery) {
|
|
2257
|
-
// A pasted URL (e.g. linkedin.com/feed/update/...) names a resource, not a Table feed.
|
|
2258
|
-
const query = rawQuery.replace(/\bhttps?:\/\/\S+/g, " ");
|
|
2259
|
-
if (/\b(workflows?|agents?|rss|knowledge|mailbox\w*|crm|attachments?|webhooks?|inbound endpoints?|sequences?|publishing)\b/.test(query))
|
|
2260
|
-
return null;
|
|
2261
|
-
const explicit = /\bfeeds?\b/.test(query) && /\b(tables?|pull|cadence|refresh|saved search|source|filters?|credit|credits|caps?|update|bind)\b/.test(query);
|
|
2262
|
-
const saved = /\btables?\b/.test(query) && /\bsaved search\b/.test(query) && /\b(refill\w*|refresh\w*|scheduled|cadence)\b/.test(query);
|
|
2263
|
-
if (!explicit && !saved)
|
|
2264
|
-
return null;
|
|
2265
|
-
if (/\b(bind|attach|create|new)\b/.test(query))
|
|
2266
|
-
return { tools: ["oxygen_feeds_bind", "oxygen_feeds_list"], commands: ["feeds bind", "feeds list"], execution: "Bind the native Table row-supply feed. Inspect source, cadence and standing credit scope first; pull feeds are distinct from inbound webhook endpoints. Feed tools are executable through the core gateways or Signals pack." };
|
|
2267
|
-
return { tools: ["oxygen_feeds_list", "oxygen_feeds_get", "oxygen_feeds_update"], commands: ["feeds list", "feeds get", "feeds update"], execution: "Inspect the existing Table feed with feeds_get(include_route=true), then update it in place with oxygen_feeds_update (Signals pack or core write gateway). Preserve the complete frozen request; source replacement resets the cursor. Scheduled replacements require one executable lane; fallbacks require no cadence. Changed cadence, increased paid cap or replaced paid source can require renewed standing authorization. Configuration is free; future refreshes retain their approved cycle ceiling." };
|
|
2268
|
-
}
|
|
2269
|
-
/**
|
|
2270
|
-
* Records into a working Table (OXP-1.1.10): "turn my CRM view into a table
|
|
2271
|
-
* that stays current". External CRM imports keep their own lanes, and a Table
|
|
2272
|
-
* going INTO Records is promote, the other direction.
|
|
2273
|
-
*/
|
|
2274
|
-
function recordsTableImportRecommendation(query) {
|
|
2275
|
-
if (!/\b(crm|records?)\b/.test(query)
|
|
2276
|
-
|| !/\b(tables?|working copy|spreadsheet)\b/.test(query)
|
|
2277
|
-
|| !/\b(import\w*|cop(?:y|ies)|turn\w*|pull\w*|bring|sync\w*|mirror\w*|into)\b/.test(query)
|
|
2278
|
-
|| /\b(hubspot|attio|pipedrive|salesforce|csv|promot\w*|bind)\b/.test(query)
|
|
2279
|
-
|| /\b(tables?|rows?)\b.{0,40}\b(?:into|to)\s+(?:the\s+|my\s+|our\s+)?(?:crm|records)\b/.test(query))
|
|
2280
|
-
return null;
|
|
2281
|
-
return {
|
|
2282
|
-
tools: ["oxygen_tables_records_import", "oxygen_tables_records_sync", "oxygen_tables_records_status"],
|
|
2283
|
-
commands: ["tables records import", "tables records sync", "tables records status"],
|
|
2284
|
-
execution: "Copy a Records object or saved view into a new Table with oxygen_tables_records_import (dry_run first counts records and lists columns); refresh=sync with approved=true keeps it current on a schedule. One-way: the copy is free and Records never change, rows key on record_id, cells edited in the Table are kept, and records that leave the view stay as rows with in_records=false. Sync now or change the schedule with oxygen_tables_records_sync; read the last sync with oxygen_tables_records_status. Each scheduled sync bills one workflow step.",
|
|
2285
|
-
};
|
|
2286
|
-
}
|
|
2287
|
-
function providerPolicyReadRecommendation(query) {
|
|
2288
|
-
if (!/\bproviders?\b/.test(query)
|
|
2289
|
-
|| !/\b(limits?|request caps?|rate caps?|overrides?)\b/.test(query)
|
|
2290
|
-
|| /\b(set|setting|change|changing|update|updating|delete|deleting|remove|removing|clear|clearing|raise|raising|lower|lowering|reset|resetting|enrich\w*|find|search companies|send\w*|scrape\w*)\b/.test(query))
|
|
2291
|
-
return null;
|
|
2292
|
-
return {
|
|
2293
|
-
tools: ["oxygen_provider_limits_list"], commands: ["limits provider list"],
|
|
2294
|
-
execution: "Read saved provider request-limit overrides and the plan's BYOK daily default with its enforced or observe-only mode. Hydrate oxygen_provider_limits_list; external MCP uses oxygen_capabilities_read, built-in agents invoke the native capability. MCP pages are bounded; continue at paging.next_offset with the same provider filter. Reads cost 0 credits. Setting a policy or removing its exact selector is a separate approved admin/owner write; removing one does not clear other operation overrides.",
|
|
2295
|
-
};
|
|
2296
|
-
}
|
|
2297
|
-
/**
|
|
2298
|
-
* "Where did our credits go": the audit ranks spend areas with shares over the
|
|
2299
|
-
* whole window. Blind agents read the raw usage ledger or left for the docs to
|
|
2300
|
-
* find it (OXP-43.63, 2026-10-06). Balance, buying, pricing and budget asks
|
|
2301
|
-
* keep their own readers.
|
|
2302
|
-
*/
|
|
2303
|
-
function spendBreakdownRecommendation(query) {
|
|
2304
|
-
if (!/\b(credits?|spend|spent|spending)\b/.test(query)
|
|
2305
|
-
|| !/\b(where|went|breakdown|break down|broken down|by (?:category|provider|tool|model|source|run|workspace)|categor(?:y|ies)|areas?|biggest|largest|audit)\b/.test(query)
|
|
2306
|
-
|| /\b(left|remaining|balance|buy|purchase|top ?up|refill|invoices?|budgets?|limits?|caps?|estimate|prices?|pricing|plans?|subscription|cancel)\b/.test(query))
|
|
2307
|
-
return null;
|
|
2308
|
-
return {
|
|
2309
|
-
tools: ["oxygen_billing_audit", "oxygen_billing_usage"], commands: ["billing audit", "billing usage"],
|
|
2310
|
-
execution: "Read where managed credits went with oxygen_billing_audit: spend_by_category ranks each area's credits and share of managed_credits_spent, largest first, over the whole window; group_by provider, tool, model, run or workspace narrows it. Spent is reserved minus released in the window; it differs from captured (oxygen_billing_usage's managed_credits_used) because of holds at the window edges and adjustments to reserved credits, so do not attribute the whole gap to open holds. External MCP uses oxygen_capabilities_call; built-in agents invoke the native capability. Reports cost 0 credits; billing audit and billing usage may apply due plan grants or credit expiry.",
|
|
2311
|
-
};
|
|
2312
|
-
}
|
|
2313
|
-
function sendingBlockReadRecommendation(query) {
|
|
2314
|
-
if (!/\b(emails?|address(?:es)?|domains?)\b/.test(query)
|
|
2315
|
-
|| !/\b(suppressions?|sending blocks?|blocked)\b/.test(query)
|
|
2316
|
-
|| /\b(add|adding|import|importing|remove|removing|delete|deleting|clear|clearing|unblock|unblocking|send|sending now|reply|replies|inbox|unibox|dns|websites?)\b/.test(query))
|
|
2317
|
-
return null;
|
|
2318
|
-
const domain = /\bdomains?\b/.test(query);
|
|
2319
|
-
const address = /\baddress(?:es)?\b/.test(query) || !domain;
|
|
2320
|
-
return {
|
|
2321
|
-
tools: [...(address ? ["oxygen_suppressions_addresses_list"] : []), ...(domain ? ["oxygen_suppressed_domains_list"] : [])],
|
|
2322
|
-
commands: [...(address ? ["suppressions addresses"] : []), ...(domain ? ["suppressions domains"] : [])],
|
|
2323
|
-
execution: "Read the separate email-address and domain sending-block ledgers. Hydrate the selected native schemas; their reason enums differ. External MCP uses oxygen_capabilities_read; built-in agents invoke the native reads. MCP defaults to bounded summary pages with explicit omitted fields; continue at paging.next_offset with the same filters. Reads cost 0 credits. Removing exact approved keys is a separate write that can restore future sending eligibility; other suppression ledgers still apply and enrollments do not resume automatically.",
|
|
2324
|
-
};
|
|
2325
|
-
}
|
|
2326
|
-
function isSpintaxIntent(query) {
|
|
2327
|
-
// Copy variation belongs to the native spintax owner; campaign A/B stats and
|
|
2328
|
-
// unrelated physical variants keep their existing owners.
|
|
2329
|
-
if (/\bspintax\b/.test(query))
|
|
2330
|
-
return true;
|
|
2331
|
-
// Rendering copy that exists is sequences render, not new variations.
|
|
2332
|
-
if (/\b(posts?|publishing|ugc|visuals?|images?|videos?|scoreboard|stats|statistics|performance|winners?|render|preview)\b/.test(query))
|
|
2333
|
-
return false;
|
|
2334
|
-
return /\b(wording|copy|message|draft|subject(?: line)?)\b.{0,45}\b(variations?|variants?|paraphrase|rewrite)\b/.test(query)
|
|
2335
|
-
|| /\b(paraphrase|rewrite|variations?)\b.{0,45}\b(wording|copy|message|draft|subject(?: line)?)\b/.test(query);
|
|
2336
|
-
}
|
|
2337
|
-
function isSubscriptionRetentionIntent(query) {
|
|
2338
|
-
return /\b(retention offer|win[ -]?back discount|cancellation (?:reason|feedback)|written cancellation)\b/.test(query)
|
|
2339
|
-
|| /\b(stay|cancel|cancelling)\b/.test(query) && /\b(discount|next month|subscription reason)\b/.test(query);
|
|
2340
|
-
}
|
|
2341
|
-
function isWorkspaceSkillIntent(query) {
|
|
2342
|
-
return /\bskills?\b/.test(query) && /\b(create|author|write|upload|import|edit|update|archive|private|workspace|custom|own|reusable)\b/.test(query);
|
|
2343
|
-
}
|
|
2344
|
-
function explicitCapabilityIntent(query) {
|
|
2345
|
-
if (isClayMigrationIntent(query))
|
|
2346
|
-
return ROUTE_BY_ID.get("tables") ?? null;
|
|
2347
|
-
if (isWorkspaceSkillIntent(query))
|
|
2348
|
-
return ROUTE_BY_ID.get("knowledge-graph") ?? null;
|
|
2349
|
-
const readOnly = readInspectionRecommendation(query);
|
|
2350
|
-
if (readOnly)
|
|
2351
|
-
return ROUTE_BY_ID.get(readOnly.capabilityId) ?? null;
|
|
2352
|
-
if (isOxygentChatIntent(query))
|
|
2353
|
-
return ROUTE_BY_ID.get("agents") ?? null;
|
|
2354
|
-
// Values on existing Table rows, ahead of the sourcing rule whose "prospect"
|
|
2355
|
-
// claimed "set a value on rows where stage is prospect". Scheduled or tag
|
|
2356
|
-
// wording keeps its Workflow and Tags owners.
|
|
2357
|
-
if (tableRowUpdateRecommendation(query)
|
|
2358
|
-
&& !/\b(workflows?|agents?|routines?|automat\w*|schedul\w*|weekly|daily|nightly|hourly|every|cron|tags?|tagg\w*)\b/.test(query))
|
|
2359
|
-
return ROUTE_BY_ID.get("tables") ?? null;
|
|
2360
|
-
// Importing an AI answer is GEO evidence, rather than a Table file import.
|
|
2361
|
-
if (/\b(?:geo|aeo|ai (?:(?:search|answer) )?visibility|consumer ai answers?|answer engine optimization|generative engine optimization)\b/.test(query))
|
|
2362
|
-
return ROUTE_BY_ID.get("geo") ?? null;
|
|
2363
|
-
if (isSubscriptionRetentionIntent(query))
|
|
2364
|
-
return ROUTE_BY_ID.get("billing-and-budgets") ?? null;
|
|
2365
|
-
if (isSeatTransitionReadIntent(query))
|
|
2366
|
-
return ROUTE_BY_ID.get("billing-and-budgets") ?? null;
|
|
2367
|
-
if (isConnectionPriceIntent(query))
|
|
2368
|
-
return ROUTE_BY_ID.get("billing-and-budgets") ?? null;
|
|
2369
|
-
if (sentLinkedInInvitationReadRecommendation(query))
|
|
2370
|
-
return ROUTE_BY_ID.get("connected-linkedin") ?? null;
|
|
2371
|
-
if (isCrmEnrichmentConfigurationRead(query))
|
|
2372
|
-
return ROUTE_BY_ID.get("records") ?? null;
|
|
2373
|
-
if (crmConnectionsReadRecommendation(query))
|
|
2374
|
-
return ROUTE_BY_ID.get("records") ?? null;
|
|
2375
|
-
if (recordDossierReadRecommendation(query))
|
|
2376
|
-
return ROUTE_BY_ID.get("records") ?? null;
|
|
2377
|
-
if (crmFileUploadRecommendation(query))
|
|
2378
|
-
return ROUTE_BY_ID.get("records") ?? null;
|
|
2379
|
-
if (crmMaintenanceRecommendation(query))
|
|
2380
|
-
return ROUTE_BY_ID.get("records") ?? null;
|
|
2381
|
-
if (crmSampleRecordRecommendation(query))
|
|
2382
|
-
return ROUTE_BY_ID.get("records") ?? null;
|
|
2383
|
-
if (databaseRecommendation(query))
|
|
2384
|
-
return ROUTE_BY_ID.get("platform-operations") ?? null;
|
|
2385
|
-
if (oneShotContactFindingRecommendation(query))
|
|
2386
|
-
return ROUTE_BY_ID.get("sourcing-and-provider-tools") ?? null;
|
|
2387
|
-
if (storedCrmContactReadRecommendation(query))
|
|
2388
|
-
return ROUTE_BY_ID.get("records") ?? null;
|
|
2389
|
-
if (storedReplyDraftReadRecommendation(query))
|
|
2390
|
-
return ROUTE_BY_PRIMITIVE.get("messages") ?? null;
|
|
2391
|
-
if (tableFeedRecommendation(query))
|
|
2392
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2393
|
-
if (recordsTableImportRecommendation(query))
|
|
2394
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2395
|
-
if (providerPolicyReadRecommendation(query))
|
|
2396
|
-
return ROUTE_BY_ID.get("billing-and-budgets") ?? null;
|
|
2397
|
-
if (sendingBlockReadRecommendation(query))
|
|
2398
|
-
return ROUTE_BY_PRIMITIVE.get("sequences") ?? null;
|
|
2399
|
-
if (isSpintaxIntent(query))
|
|
2400
|
-
return ROUTE_BY_PRIMITIVE.get("sequences") ?? null;
|
|
2401
|
-
if (isConnectedAppsIntent(query) || isConnectedAppEventsIntent(query) || isConnectedAppSpendIntent(query)) {
|
|
2402
|
-
return ROUTE_BY_ID.get("workspace-access") ?? null;
|
|
2403
|
-
}
|
|
2404
|
-
if (spendBreakdownRecommendation(query))
|
|
2405
|
-
return ROUTE_BY_ID.get("billing-and-budgets") ?? null;
|
|
2406
|
-
// Ahead of every primitive rule: the pages a workspace hides are NAMED after
|
|
2407
|
-
// primitives ("hide Publishing and Workflows"), which those rules would claim.
|
|
2408
|
-
if (isWorkspacePagesIntent(query) || isWorkspaceSettingsIntent(query)) {
|
|
2409
|
-
return ROUTE_BY_ID.get("workspace-access") ?? null;
|
|
2410
|
-
}
|
|
2411
|
-
if (collaborationRecommendation(query))
|
|
2412
|
-
return ROUTE_BY_ID.get("collaboration") ?? null;
|
|
2413
|
-
if (/\btables?\b/.test(query) && isSecondPartyDecisionIntent(query))
|
|
2414
|
-
return ROUTE_BY_ID.get("collaboration") ?? null;
|
|
2415
|
-
if (tableReadRecommendation(query) || tableMaintenanceRecommendation(query))
|
|
2416
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2417
|
-
if (isTableInventoryIntent(query))
|
|
2418
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2419
|
-
if (/\btables?\b/.test(query) && /\b(navigation|nav|paging|pagination)\b/.test(query)) {
|
|
2420
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2421
|
-
}
|
|
2422
|
-
if (/\b(unibox|inbox)\b/.test(query) && /\b(metadata|taxonomy|filters)\b/.test(query)) {
|
|
2423
|
-
return ROUTE_BY_ID.get("messages") ?? null;
|
|
2424
|
-
}
|
|
2425
|
-
if (/\b(infographic|graphic designer|render html|carousel pages|visual design|gtm flow image)\b/.test(query))
|
|
2426
|
-
return ROUTE_BY_ID.get("visual-rendering") ?? null;
|
|
2427
|
-
if (isUgcIntent(query))
|
|
2428
|
-
return ROUTE_BY_PRIMITIVE.get("publishing") ?? null;
|
|
2429
|
-
if (isWorkspaceVoiceIntent(query))
|
|
2430
|
-
return ROUTE_BY_ID.get("knowledge-graph") ?? null;
|
|
2431
|
-
if (isSequenceInvitationTimeoutIntent(query))
|
|
2432
|
-
return ROUTE_BY_PRIMITIVE.get("sequences") ?? null;
|
|
2433
|
-
if (isOwnLinkedInNetworkIntent(query) || isOpenLinkedInRequestsIntent(query))
|
|
2434
|
-
return ROUTE_BY_ID.get("connected-linkedin") ?? null;
|
|
2435
|
-
if (isCompanyPageFollowersIntent(query))
|
|
2436
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2437
|
-
if (isTableCapacityReadIntent(query))
|
|
2438
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2439
|
-
// A whole-motion ask ("set up inbound-led outbound for my posts") is a
|
|
2440
|
-
// Recipe kit + playbook, not the connected-LinkedIn signals card that the
|
|
2441
|
-
// "my LinkedIn … engagers" rule below would otherwise claim. Resolve it first.
|
|
2442
|
-
if (isInboundLedOutboundIntent(query))
|
|
2443
|
-
return ROUTE_BY_PRIMITIVE.get("recipes") ?? null;
|
|
2444
|
-
// A unified sender profile is an owned Sequence identity, even when the ask
|
|
2445
|
-
// names every attached channel (LinkedIn + WhatsApp + email). Resolve this
|
|
2446
|
-
// before public LinkedIn research, whose generic "profile" wording would
|
|
2447
|
-
// otherwise route an account-readiness question to scraper tools.
|
|
2448
|
-
if (isSenderProfileIntent(query) || isSenderCopyVariableIntent(query)) {
|
|
2449
|
-
return ROUTE_BY_PRIMITIVE.get("sequences") ?? null;
|
|
2450
|
-
}
|
|
2451
|
-
if (isInboxAvatarIntent(query)) {
|
|
2452
|
-
return ROUTE_BY_ID.get("sending-infrastructure") ?? null;
|
|
2453
|
-
}
|
|
2454
|
-
if (isDomainDnsIntent(query) || isMailboxDeleteIntent(query) || isSendingDomainDeleteIntent(query)) {
|
|
2455
|
-
return ROUTE_BY_ID.get("sending-infrastructure") ?? null;
|
|
2456
|
-
}
|
|
2457
|
-
if (isMailboxOnboardingIntent(query) || isWarmupEnrollmentIntent(query)) {
|
|
2458
|
-
return ROUTE_BY_ID.get("sending-infrastructure") ?? null;
|
|
2459
|
-
}
|
|
2460
|
-
if (isLinkedInAccountConnectIntent(query))
|
|
2461
|
-
return ROUTE_BY_ID.get("connected-linkedin") ?? null;
|
|
2462
|
-
if (isLinkedInProfileWatcherIntent(query))
|
|
2463
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2464
|
-
// Profile viewers exist only as a connected account's data, and their capture
|
|
2465
|
-
// owns its own on/off, pause and automatic enrichment. "Automatically enrich
|
|
2466
|
-
// new profile viewers" reads as workflow language, but a hand-built workflow is
|
|
2467
|
-
// the wrong answer when `viewers enrichment --on` is the switch (2026-09-23
|
|
2468
|
-
// enrichment baseline).
|
|
2469
|
-
if (/\bprofile viewers?\b/.test(query))
|
|
2470
|
-
return ROUTE_BY_ID.get("connected-linkedin") ?? null;
|
|
2471
|
-
// Ahead of the keyword-post, workflow and owned-post-comment rules below, which
|
|
2472
|
-
// claimed "a first comment on my LinkedIn post" and "... automatically".
|
|
2473
|
-
if (isFirstCommentIntent(query))
|
|
2474
|
-
return ROUTE_BY_PRIMITIVE.get("publishing") ?? null;
|
|
2475
|
-
// Writing the workspace's own post is a Publishing draft, ahead of the keyword
|
|
2476
|
-
// post search ("a LinkedIn post about ...") and the public LinkedIn read owner,
|
|
2477
|
-
// which claimed "write a LinkedIn post and save it as a draft".
|
|
2478
|
-
if (isPostDraftIntent(query))
|
|
2479
|
-
return ROUTE_BY_PRIMITIVE.get("publishing") ?? null;
|
|
2480
|
-
// One event the user reports ("log that she visited our pricing page") is a
|
|
2481
|
-
// Signal on the person, not a CRM note or a table row.
|
|
2482
|
-
if (isSignalCaptureIntent(query))
|
|
2483
|
-
return ROUTE_BY_PRIMITIVE.get("signals") ?? null;
|
|
2484
|
-
// Publish/approve are writes even when the noun is a public LinkedIn post.
|
|
2485
|
-
// The 2026-09-30 connector baseline offered the cookieless read owner first.
|
|
2486
|
-
if (isPublishingPostIntent(query))
|
|
2487
|
-
return ROUTE_BY_PRIMITIVE.get("publishing") ?? null;
|
|
2488
|
-
if (isLinkedInKeywordPostIntent(query))
|
|
2489
|
-
return ROUTE_BY_ID.get("signals") ?? null;
|
|
2490
|
-
// 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
|
|
2491
|
-
// unlock path: the 2026-09-25 stuck-post baseline sent "publishing failed post
|
|
2492
|
-
// retry outcome uncertain" to Workflows and "why did my LinkedIn post fail to
|
|
2493
|
-
// publish" to the connected-account catalog.
|
|
2494
|
-
if (isFailedPostIntent(query))
|
|
2495
|
-
return ROUTE_BY_PRIMITIVE.get("publishing") ?? null;
|
|
2496
|
-
// When and how a Sequence sends: its sending schedule and its unsubscribe
|
|
2497
|
-
// option. Ahead of the workflow rule, whose bare "schedule" sent the 2026-09-29
|
|
2498
|
-
// unified-launch acceptance agent's "sending schedule" search to Workflows and
|
|
2499
|
-
// hid every Sequences command.
|
|
2500
|
-
if (isSequenceReplyToStopIntent(query) || isSequenceScheduleIntent(query) || isSequenceUnsubscribeIntent(query))
|
|
2501
|
-
return ROUTE_BY_PRIMITIVE.get("sequences") ?? null;
|
|
2502
|
-
if (isMailboxVolumeIntent(query) && !/\b(workflow|automation|automate|webhook|cron)\b/.test(query)) {
|
|
2503
|
-
return ROUTE_BY_ID.get("sending-infrastructure") ?? null;
|
|
2504
|
-
}
|
|
2505
|
-
if (isAdaptiveWatchIntent(query))
|
|
2506
|
-
return ROUTE_BY_PRIMITIVE.get("agents") ?? null;
|
|
2507
|
-
if (isHostedWorkflowIntent(query))
|
|
2508
|
-
return ROUTE_BY_PRIMITIVE.get("workflows") ?? null;
|
|
2509
|
-
if (placementGuideRecommendation(query))
|
|
2510
|
-
return ROUTE_BY_ID.get("sending-infrastructure") ?? null;
|
|
2511
|
-
if (isCompanySourcingIntent(query))
|
|
2512
|
-
return ROUTE_BY_ID.get("sourcing-and-provider-tools") ?? null;
|
|
2513
|
-
if (isOwnedPostCommentIntent(query))
|
|
2514
|
-
return ROUTE_BY_PRIMITIVE.get("posts") ?? null;
|
|
2515
|
-
// Asking a second party to decide is Collaboration even when the thing being
|
|
2516
|
-
// decided is a campaign, a table, or a post — the subject noun would
|
|
2517
|
-
// otherwise win outright ("campaign" is an explicit Sequences intent below,
|
|
2518
|
-
// and that is right for every ask that is not about the decision itself).
|
|
2519
|
-
// Deliberately narrow: bare "approve"/"approval" stays with the owning
|
|
2520
|
-
// primitive (a publishing approval, an Observability approval queue), and
|
|
2521
|
-
// this sits after the owned-post-comment check so a PUBLIC comment on a
|
|
2522
|
-
// published post still routes to Posts.
|
|
2523
|
-
if (isSecondPartyDecisionIntent(query))
|
|
2524
|
-
return ROUTE_BY_ID.get("collaboration") ?? null;
|
|
2525
|
-
// A mutual/shared-connection count is relationship context that only a
|
|
2526
|
-
// connected account can expose. Route it before the generic public-profile
|
|
2527
|
-
// rule, which otherwise sees "LinkedIn profile" and sends the user to the
|
|
2528
|
-
// cookieless research catalog that cannot answer this question.
|
|
2529
|
-
if (isMutualLinkedInConnectionsIntent(query)) {
|
|
2530
|
-
return ROUTE_BY_ID.get("connected-linkedin") ?? null;
|
|
2531
|
-
}
|
|
2532
|
-
// Authoring a post's video cover or previewing a draft is Publishing work even
|
|
2533
|
-
// when the ask says "LinkedIn post"; the public-read rule below otherwise sent
|
|
2534
|
-
// "choose video cover frame for linkedin post" to the paid cookieless research
|
|
2535
|
-
// catalog (blind acceptance run, 2026-09-24).
|
|
2536
|
-
if (isPostCoverOrPreviewIntent(query))
|
|
2537
|
-
return ROUTE_BY_PRIMITIVE.get("publishing") ?? null;
|
|
2538
|
-
// An X thread, poll, alt text or reply control is how an X post is authored, not
|
|
2539
|
-
// a conversation thread (Messages): the 2026-09-25 X-formats baseline routed
|
|
2540
|
-
// "thread" to Messages and "X poll post" nowhere.
|
|
2541
|
-
if (isXPostFormatIntent(query))
|
|
2542
|
-
return ROUTE_BY_PRIMITIVE.get("publishing") ?? null;
|
|
2543
|
-
// A deferred acquisition motion starts with the public-data owner. This keeps
|
|
2544
|
-
// "find/qualify now, contact later" from skipping straight to the final write
|
|
2545
|
-
// step; the recommendation still hands the eventual initiation to Sequences.
|
|
2546
|
-
if (isPublicLinkedInRead(query) && isDeferredLinkedInOutreach(query)) {
|
|
2547
|
-
return ROUTE_BY_ID.get("linkedin-public-research") ?? null;
|
|
2548
|
-
}
|
|
2549
|
-
// When one ask combines public LinkedIn research with initiating a new
|
|
2550
|
-
// conversation now, the external write owner wins. The Sequences
|
|
2551
|
-
// recommendation still exposes the native scraper discovery step for the
|
|
2552
|
-
// research input.
|
|
2553
|
-
if (isNetNewLinkedInInitiation(query))
|
|
2554
|
-
return ROUTE_BY_PRIMITIVE.get("sequences") ?? null;
|
|
2555
|
-
if (linkedinUrlFindingRecommendation(query))
|
|
2556
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2557
|
-
if (isPublicLinkedInRead(query))
|
|
2558
|
-
return ROUTE_BY_ID.get("linkedin-public-research") ?? null;
|
|
2559
|
-
if (/\b(my|our|own)\b.{0,40}\blinkedin\b.{0,40}\b(post )?engagers?\b/.test(query)) {
|
|
2560
|
-
return ROUTE_BY_PRIMITIVE.get("signals") ?? null;
|
|
2561
|
-
}
|
|
2562
|
-
// Grading addresses a row ALREADY holds — "verify these emails", "which are
|
|
2563
|
-
// safe to send", "catch-all or valid" — is Tables work (the Email verification
|
|
2564
|
-
// column: `columns add --capability verify_email`, previewed and run through
|
|
2565
|
-
// `enrich-column`), with `verify email` as the one-shot twin. Without this
|
|
2566
|
-
// rule the bare word "email" scored the Messages card, and a 2026-09-10 blind
|
|
2567
|
-
// user asking "verify email deliverability safe to send" was routed to
|
|
2568
|
-
// `email send`. Sits after the mailbox rules above so warm-up and sender
|
|
2569
|
-
// deliverability keep their owner, and after the scheduling rule so "every
|
|
2570
|
-
// Monday verify new signups" still lands on Workflows.
|
|
2571
|
-
if (isEmailVerificationIntent(query))
|
|
2572
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2573
|
-
// "verify these phone numbers" is a verification column on a table, not a
|
|
2574
|
-
// dialer action; without this the sequences card's call terms win.
|
|
2575
|
-
if (/\b(verify|validate|check)\b[^.]{0,40}\b(phone|mobile)\b/.test(query))
|
|
2576
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2577
|
-
if (/\b(recipe|playbook|proven play|what should i do)\b/.test(query)) {
|
|
2578
|
-
return ROUTE_BY_PRIMITIVE.get("recipes") ?? null;
|
|
2579
|
-
}
|
|
2580
|
-
if (/\btable\b.{0,24}\b(action |ingestion )?runs?\b/.test(query)) {
|
|
2581
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2582
|
-
}
|
|
2583
|
-
if (/\b(message )?reviews?\b/.test(query))
|
|
2584
|
-
return ROUTE_BY_PRIMITIVE.get("messages") ?? null;
|
|
2585
|
-
// Sorting each row into categories ("classify companies by industry with
|
|
2586
|
-
// confidence", "label every row as agency, SaaS or other") is a Tables
|
|
2587
|
-
// column, not a workspace Tag. Before this rule the 2026-09-25 blind baseline
|
|
2588
|
-
// got `route: null` for "classify companies by industry with confidence",
|
|
2589
|
-
// and the "label" wording fell to the Tags card below.
|
|
2590
|
-
if (isRowClassificationIntent(query))
|
|
2591
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2592
|
-
if (isRowFanOutIntent(query))
|
|
2593
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2594
|
-
if (isTableMaintenanceIntent(query))
|
|
2595
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2596
|
-
if (/\b(tag|tags|label|labels)\b/.test(query))
|
|
2597
|
-
return ROUTE_BY_PRIMITIVE.get("tags") ?? null;
|
|
2598
|
-
if (/\b(disposable|working)\b.{0,30}\b(list|dataset|table)\b|\b(prospect|sourcing) table\b/.test(query)) {
|
|
2599
|
-
return ROUTE_BY_PRIMITIVE.get("tables") ?? null;
|
|
2600
|
-
}
|
|
2601
|
-
if (/\bwhatsapp\b.{0,30}\b(account|connect|limits?|sync)\b/.test(query)) {
|
|
2602
|
-
return ROUTE_BY_ID.get("connected-whatsapp") ?? null;
|
|
2603
|
-
}
|
|
2604
|
-
const hasSequenceProgramIntent = /\b(sequence|campaign|cadence|enroll|nurture)\b/.test(query)
|
|
2605
|
-
|| /\b(day\s*\d+|days?\s+\d|multi[ -]step|rotate senders?|sender rotation|stop on reply|until (?:they )?reply)\b/.test(query);
|
|
2606
|
-
if (!isNetNewLinkedInInitiation(query)
|
|
2607
|
-
&& (/\b(one[ -]off|ad[ -]hoc|just once|reply once|single message|direct message|direct email|no cadence)\b/.test(query)
|
|
2608
|
-
|| (!hasSequenceProgramIntent
|
|
2609
|
-
&& /\b(reply|respond|follow up)\b.{0,30}\b(conversation|thread|email|linkedin|whatsapp|dm)\b/.test(query)))) {
|
|
2610
|
-
return ROUTE_BY_PRIMITIVE.get("messages") ?? null;
|
|
2611
|
-
}
|
|
2612
|
-
if (/\b(my|our|own|connected)\b.{0,40}\blinkedin\b|\b(sales navigator|salesnav|recruiter|profile viewers?|linkedin inbox)\b/.test(query)) {
|
|
2613
|
-
return ROUTE_BY_ID.get("connected-linkedin") ?? null;
|
|
2614
|
-
}
|
|
2615
|
-
if (/\b(publish|schedule|approve)\b.{0,24}\b(post|content)\b|\bcontent calendar\b/.test(query)) {
|
|
2616
|
-
return ROUTE_BY_PRIMITIVE.get("publishing") ?? null;
|
|
2617
|
-
}
|
|
2618
|
-
if (hasSequenceProgramIntent) {
|
|
2619
|
-
return ROUTE_BY_PRIMITIVE.get("sequences") ?? null;
|
|
2620
|
-
}
|
|
2621
|
-
// Existing reply handling is Messages even without a channel name. Keep this
|
|
2622
|
-
// after the explicit cadence/enrollment rules so reply-stop programs retain
|
|
2623
|
-
// Sequences. The onboarding baseline phrased this as "follow up on replies".
|
|
2624
|
-
if (/\b(follow up|triage|answer|handle)\b.{0,40}\breplies\b/.test(query)) {
|
|
2625
|
-
return ROUTE_BY_PRIMITIVE.get("messages") ?? null;
|
|
2626
|
-
}
|
|
2627
|
-
if (/\b(reply|respond)\b.{0,30}\b(conversation|thread|email|linkedin|whatsapp|dm)\b/.test(query)) {
|
|
2628
|
-
return ROUTE_BY_PRIMITIVE.get("messages") ?? null;
|
|
2629
|
-
}
|
|
2630
|
-
// Resolving websites / domains / LinkedIn pages for company NAMES the user
|
|
2631
|
-
// already holds is the companies-search `url_recovery` intent, not a fresh
|
|
2632
|
-
// sourcing search and not an enrichment column. A 2026-09-11 blind user
|
|
2633
|
-
// asking "get company website URL from company name" got NO route here
|
|
2634
|
-
// (null), never discovered `companies search plan`, and priced the whole
|
|
2635
|
-
// company_enrich preset instead.
|
|
2636
|
-
if (isCompanyUrlRecoveryIntent(query))
|
|
2637
|
-
return ROUTE_BY_ID.get("sourcing-and-provider-tools") ?? null;
|
|
2638
|
-
if (pageScrapingRecommendation(query))
|
|
2639
|
-
return ROUTE_BY_ID.get("sourcing-and-provider-tools") ?? null;
|
|
2640
|
-
if (/\bagency partners?\b/.test(query))
|
|
2641
|
-
return ROUTE_BY_ID.get("agency-directory") ?? null;
|
|
2642
|
-
// A category-plus-place ask ("dental practices in Austin", "local businesses",
|
|
2643
|
-
// "scrape Google Maps") is the companies-search `local` intent. A 2026-09-21
|
|
2644
|
-
// blind user typing "find local businesses like dental practices in a city"
|
|
2645
|
-
// got NO route and fell back to browsing every command group's --help.
|
|
2646
|
-
if (isLocalBusinessIntent(query))
|
|
2647
|
-
return ROUTE_BY_ID.get("sourcing-and-provider-tools") ?? null;
|
|
2648
|
-
if (/\b(find emails?|find phones?|find companies|find people|source (?:leads?|a list|companies|people)|build (?:me )?a list|tam|prospect)\b/.test(query)) {
|
|
2649
|
-
return ROUTE_BY_ID.get("sourcing-and-provider-tools") ?? null;
|
|
2650
|
-
}
|
|
2651
|
-
if (/\b(agent|adaptive|goal[ -]directed|persistent thread|checkpoint|standing job)\b/.test(query)) {
|
|
2652
|
-
return ROUTE_BY_PRIMITIVE.get("agents") ?? null;
|
|
2653
|
-
}
|
|
2654
|
-
return null;
|
|
2655
|
-
}
|
|
2656
|
-
/**
|
|
2657
|
-
* Does `term` occur in `query` starting on a word boundary?
|
|
2658
|
-
*
|
|
2659
|
-
* A plain `query.includes(term)` is what sent "enrich these le**ad**s" and
|
|
2660
|
-
* "build me a spre**ad**sheet" to the competitor-ad-intelligence card, and
|
|
2661
|
-
* "our i**deal** customer" to CRM Records: a short term matches inside any
|
|
2662
|
-
* longer word that happens to contain its letters, and nothing else scores, so
|
|
2663
|
-
* the wrong card wins outright rather than narrowly.
|
|
2664
|
-
*
|
|
2665
|
-
* Only the START of the match is anchored, deliberately. Requiring a boundary at
|
|
2666
|
-
* BOTH ends looks stricter and is wrong here, because the cards do not list
|
|
2667
|
-
* their own plurals consistently — `sequence`, `workflow`, `table`, `agent` and
|
|
2668
|
-
* `campaign` have no plural term beside them — so whole-word matching silently
|
|
2669
|
-
* stops routing "sequences", "workflows" and "tables", which are the phrasings
|
|
2670
|
-
* people actually type. Anchoring the head keeps every plural and inflection
|
|
2671
|
-
* working while refusing the mid-word accidents, and it is the same
|
|
2672
|
-
* word-boundary treatment v1.915.0 applied to the Tables guard this scorer sits
|
|
2673
|
-
* behind.
|
|
2674
|
-
*/
|
|
2675
|
-
function matchesIntentTerm(query, term) {
|
|
2676
|
-
for (let at = query.indexOf(term); at >= 0; at = query.indexOf(term, at + 1)) {
|
|
2677
|
-
const preceding = at === 0 ? "" : query[at - 1] ?? "";
|
|
2678
|
-
if (!/[a-z0-9]/.test(preceding))
|
|
2679
|
-
return true;
|
|
2680
|
-
}
|
|
2681
|
-
return false;
|
|
2682
|
-
}
|
|
2683
|
-
/**
|
|
2684
|
-
* A matched play's skill counts as one multi-word term for each card that names
|
|
2685
|
-
* it first: "cold email the whole market" matched the whole-market play, yet its
|
|
2686
|
-
* one card term ("email") picked Messages over Sequences.
|
|
331
|
+
* A matched play's skill counts as one multi-word term for each card that names
|
|
332
|
+
* it first: "cold email the whole market" matched the whole-market play, yet its
|
|
333
|
+
* one card term ("email") picked Messages over Sequences.
|
|
2687
334
|
*/
|
|
2688
335
|
const PLAY_SKILL_TERM_SCORE = 6;
|
|
2689
336
|
function highestScoringRoute(query, playSkill) {
|
|
@@ -2703,1227 +350,3 @@ function highestScoringRoute(query, playSkill) {
|
|
|
2703
350
|
}
|
|
2704
351
|
return best?.card ?? null;
|
|
2705
352
|
}
|
|
2706
|
-
/** The exact `companies search plan` invocation for the url_recovery intent. */
|
|
2707
|
-
export const COMPANY_URL_RECOVERY_COMMAND = 'oxygen companies search plan --prompt "Find the websites for these companies: <company names>" --source-intent url_recovery';
|
|
2708
|
-
/** The free native preview for Google Maps businesses; import follows its reviewed quote. */
|
|
2709
|
-
export const LOCAL_BUSINESS_SCRAPE_COMMAND = `oxygen companies search preview --source google_maps --filters-json '{"q":"<category> in <city, region>"}'`;
|
|
2710
|
-
/**
|
|
2711
|
-
* Storefronts and service businesses by category and place — the Scrape Google
|
|
2712
|
-
* Maps Businesses table source. Named business categories are the everyday
|
|
2713
|
-
* phrasing ("dentists in Austin"), so a short list of them is matched beside the
|
|
2714
|
-
* generic words; "near me" and "in/around <place>" carry the same meaning.
|
|
2715
|
-
*/
|
|
2716
|
-
function isLocalBusinessIntent(query) {
|
|
2717
|
-
return /\b(local business(?:es)?|google maps|maps listings?|storefronts?|near me|(?:dental|medical|law|veterinary) (?:practices?|offices?|clinics?)|dentists?|restaurants?|cafes?|coffee shops?|gyms?|salons?|plumbers?|electricians?|contractors?|hvac|auto repair|real estate agents?|businesses (?:in|near|around) [a-z])\b/.test(query);
|
|
2718
|
-
}
|
|
2719
|
-
/** Writing or saving the workspace's own post, or asking to post it: a Publishing draft. */
|
|
2720
|
-
function isPostDraftIntent(query) {
|
|
2721
|
-
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))
|
|
2722
|
-
return false;
|
|
2723
|
-
if (/\b(find|search|research|monitor|watch)\b/.test(query))
|
|
2724
|
-
return false;
|
|
2725
|
-
return (/\b(write|draft|drafts|drafted|compose|save|saved)\b/.test(query) && /\bposts?\b/.test(query))
|
|
2726
|
-
|| /\bpost (?:it|this|that)\b|\bpost (?:on|to) (?:linkedin|x|twitter)\b/.test(query);
|
|
2727
|
-
}
|
|
2728
|
-
/** Recording one reported event (a visit, a view) on a person: a Signal, logged on the Record. */
|
|
2729
|
-
function isSignalCaptureIntent(query) {
|
|
2730
|
-
return /\b(record|log|logs|logged|track|note|save|add|capture)\b/.test(query)
|
|
2731
|
-
&& /\b(visit(?:s|ed|or)?|viewed|profile views?|signals?)\b/.test(query)
|
|
2732
|
-
// Outreach wording ("set up an email follow-up ... add the people") is a
|
|
2733
|
-
// Sequence for signalled people, not one reported event.
|
|
2734
|
-
&& !/\b(list|show|read|which|who|rank|leads? to contact|registry|search|find|inbox|webhook|automat\w*|workflows?|sequences?|enrich\w*|tables?|columns?|feeds?|follow ups?|campaigns?|cadences?|outreach|emails)\b/.test(query);
|
|
2735
|
-
}
|
|
2736
|
-
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.";
|
|
2737
|
-
const SIGNAL_CAPTURE_EXECUTION = "Find the person with oxygen_crm_record_search; if there is no record, create it with oxygen_crm_record_assert (identity email, values full_name and company_domain when known; free, no card). Then log the event on that record with oxygen_crm_activity_log: row_id the rowId the assert or search returned (not object.id) or her email, activity_type website_visit (or profile_view, post_reaction, new_follower), direction inbound, occurred_at, a one-line summary such as the page viewed. It then shows in the Signals feed and on the person's timeline. Not a note or a table row; contacting nobody. End by saying it is recorded as a website-visit Signal and where it shows (the record's web_url); if a write is refused, say nothing was recorded.";
|
|
2738
|
-
function isPublishingPostIntent(query) {
|
|
2739
|
-
return /\b(posts?|publishing|content calendar)\b/.test(query)
|
|
2740
|
-
&& /\b(publish|publishing|schedule|scheduled|approve|approval)\b/.test(query)
|
|
2741
|
-
&& !/\b(workflow|automation|automate|webhook|cron)\b/.test(query)
|
|
2742
|
-
&& !(/\b(find|search|scrape|research)\b/.test(query) && /\b(about|mention|containing)\b/.test(query));
|
|
2743
|
-
}
|
|
2744
|
-
function recommendationsFor(card, query) {
|
|
2745
|
-
if (card.id === "agents" && isOxygentChatIntent(query)) {
|
|
2746
|
-
const continuing = /\b(continue|resume|talk)\b|\b(?:read|send|post)\b.*\b(?:chat|conversation|message)s?\b/.test(query);
|
|
2747
|
-
return {
|
|
2748
|
-
tools: ["oxygen_oxygents_create", "oxygen_oxygents_update", "oxygen_oxygents_access", ...(continuing ? ["oxygen_oxygents_get", "oxygen_oxygents_message"] : [])],
|
|
2749
|
-
commands: ["oxygents create", "oxygents update", "oxygents access", ...(continuing ? ["oxygents get", "oxygents message"] : [])],
|
|
2750
|
-
};
|
|
2751
|
-
}
|
|
2752
|
-
if (card.id === "billing-and-budgets" && isPartnerBonusReadIntent(query)) {
|
|
2753
|
-
return { tools: ["oxygen_billing_summary"], commands: ["billing summary"] };
|
|
2754
|
-
}
|
|
2755
|
-
if (card.id === "billing-and-budgets" && isSeatTransitionReadIntent(query)) {
|
|
2756
|
-
return { tools: ["oxygen_billing_summary"], commands: ["billing summary"] };
|
|
2757
|
-
}
|
|
2758
|
-
const readOnly = readInspectionRecommendation(query);
|
|
2759
|
-
if (readOnly?.capabilityId === card.id)
|
|
2760
|
-
return readOnly;
|
|
2761
|
-
const placementGuide = card.id === "sending-infrastructure" ? placementGuideRecommendation(query) : null;
|
|
2762
|
-
if (placementGuide)
|
|
2763
|
-
return placementGuide;
|
|
2764
|
-
const lookup = card.id === "tables" ? linkedinUrlFindingRecommendation(query) : null;
|
|
2765
|
-
if (lookup)
|
|
2766
|
-
return lookup;
|
|
2767
|
-
const pageResearch = card.id === "sourcing-and-provider-tools" ? pageScrapingRecommendation(query) : null;
|
|
2768
|
-
if (pageResearch)
|
|
2769
|
-
return pageResearch;
|
|
2770
|
-
const collaboration = card.id === "collaboration" ? collaborationRecommendation(query) : null;
|
|
2771
|
-
if (collaboration)
|
|
2772
|
-
return collaboration;
|
|
2773
|
-
if (card.id === "knowledge-graph" && isWorkspaceSkillIntent(query)) {
|
|
2774
|
-
return { tools: ["oxygen_workspace_skills_list", "oxygen_workspace_skills_create", "oxygen_workspace_skills_import", "oxygen_workspace_skills_get", "oxygen_workspace_skills_update", "oxygen_workspace_skills_archive"],
|
|
2775
|
-
commands: ["skills workspace list", "skills workspace create", "skills workspace import", "skills workspace get", "skills workspace update", "skills workspace archive"] };
|
|
2776
|
-
}
|
|
2777
|
-
const contactFind = card.id === "sourcing-and-provider-tools" ? oneShotContactFindingRecommendation(query) : null;
|
|
2778
|
-
if (contactFind)
|
|
2779
|
-
return contactFind;
|
|
2780
|
-
if (card.id === "knowledge-graph" && isCanonicalCopyReadIntent(query)) {
|
|
2781
|
-
return {
|
|
2782
|
-
tools: ["oxygen_context_canonical_get", "oxygen_knowledge_page_get", "oxygen_knowledge_search"],
|
|
2783
|
-
commands: ["context canonical get", "knowledge page get", "knowledge search"],
|
|
2784
|
-
};
|
|
2785
|
-
}
|
|
2786
|
-
const crmConnections = card.id === "records" ? crmConnectionsReadRecommendation(query) : null;
|
|
2787
|
-
if (crmConnections)
|
|
2788
|
-
return crmConnections;
|
|
2789
|
-
const dossier = card.id === "records" ? recordDossierReadRecommendation(query) : null;
|
|
2790
|
-
if (dossier)
|
|
2791
|
-
return dossier;
|
|
2792
|
-
const crmSample = card.id === "records" ? crmSampleRecordRecommendation(query) : null;
|
|
2793
|
-
const crmFileUpload = card.id === "records" ? crmFileUploadRecommendation(query) : null;
|
|
2794
|
-
if (crmFileUpload)
|
|
2795
|
-
return crmFileUpload;
|
|
2796
|
-
if (crmSample)
|
|
2797
|
-
return crmSample;
|
|
2798
|
-
const crmContactRead = card.id === "records" ? storedCrmContactReadRecommendation(query) : null;
|
|
2799
|
-
if (crmContactRead)
|
|
2800
|
-
return crmContactRead;
|
|
2801
|
-
const crmInventory = card.id === "records" ? crmInventoryRecommendation(query) : null;
|
|
2802
|
-
if (crmInventory)
|
|
2803
|
-
return crmInventory;
|
|
2804
|
-
const replyDraftRead = card.primitive === "messages" ? storedReplyDraftReadRecommendation(query) : null;
|
|
2805
|
-
if (replyDraftRead)
|
|
2806
|
-
return replyDraftRead;
|
|
2807
|
-
const providerRead = card.id === "billing-and-budgets" ? providerPolicyReadRecommendation(query) : null;
|
|
2808
|
-
if (providerRead)
|
|
2809
|
-
return providerRead;
|
|
2810
|
-
const spendRead = card.id === "billing-and-budgets" ? spendBreakdownRecommendation(query) : null;
|
|
2811
|
-
if (spendRead)
|
|
2812
|
-
return spendRead;
|
|
2813
|
-
if (card.id === "billing-and-budgets" && isSubscriptionRetentionIntent(query)) {
|
|
2814
|
-
return { tools: ["oxygen_billing_cancel"], commands: ["billing retention-offer", "billing cancel", "billing retain"] };
|
|
2815
|
-
}
|
|
2816
|
-
if (card.id === "billing-and-budgets" && isConnectionPriceIntent(query)) {
|
|
2817
|
-
return {
|
|
2818
|
-
tools: ["oxygen_billing_commitments"],
|
|
2819
|
-
commands: ["billing commitments"],
|
|
2820
|
-
exactCommand: "oxygen billing commitments --view connection-prices --json",
|
|
2821
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.connectionPrices(),
|
|
2822
|
-
};
|
|
2823
|
-
}
|
|
2824
|
-
const blockRead = card.primitive === "sequences" ? sendingBlockReadRecommendation(query) : null;
|
|
2825
|
-
if (blockRead)
|
|
2826
|
-
return blockRead;
|
|
2827
|
-
const sent = card.id === "connected-linkedin" ? sentLinkedInInvitationReadRecommendation(query) : null;
|
|
2828
|
-
if (sent)
|
|
2829
|
-
return sent;
|
|
2830
|
-
if (card.id === "records" && isCrmEnrichmentConfigurationRead(query))
|
|
2831
|
-
return crmEnrichmentReadRecommendation(query);
|
|
2832
|
-
const crmMaintenance = card.id === "records" ? crmMaintenanceRecommendation(query) : null;
|
|
2833
|
-
if (crmMaintenance)
|
|
2834
|
-
return crmMaintenance;
|
|
2835
|
-
const database = card.id === "platform-operations" ? databaseRecommendation(query) : null;
|
|
2836
|
-
if (database)
|
|
2837
|
-
return database;
|
|
2838
|
-
const feed = card.primitive === "tables" ? tableFeedRecommendation(query) : null;
|
|
2839
|
-
if (feed)
|
|
2840
|
-
return { tools: feed.tools, commands: feed.commands };
|
|
2841
|
-
const recordsCopy = card.primitive === "tables" ? recordsTableImportRecommendation(query) : null;
|
|
2842
|
-
if (recordsCopy)
|
|
2843
|
-
return { tools: recordsCopy.tools, commands: recordsCopy.commands };
|
|
2844
|
-
if (card.id === "billing-and-budgets" && /\b(credit prices|credit price catalog|customer credit)\b/.test(query)) {
|
|
2845
|
-
return { tools: ["oxygen_customer_credit_prices"], commands: ["pricing customer-credit-prices"] };
|
|
2846
|
-
}
|
|
2847
|
-
if (card.id === "billing-and-budgets" && /\b(plan|plans|annual|yearly|subscription)\b/.test(query)) {
|
|
2848
|
-
return { tools: ["oxygen_billing_balance", "oxygen_limits_show", "oxygen_billing_change_plan"], commands: ["billing balance", "limits show", "billing change"] };
|
|
2849
|
-
}
|
|
2850
|
-
if (card.id === "messages" && /\b(unibox|inbox)\b/.test(query) && /\b(metadata|taxonomy|filters|accounts|tags)\b/.test(query)) {
|
|
2851
|
-
return { tools: ["oxygen_unibox_metadata"], commands: ["unibox metadata"] };
|
|
2852
|
-
}
|
|
2853
|
-
// A program's lifecycle and a creator's voice are UGC work the Publishing card
|
|
2854
|
-
// also claims ("archive program", "creator voice"); before these they got the
|
|
2855
|
-
// post tools (UGC E2E pass, 2026-09-29).
|
|
2856
|
-
const lifecycle = card.primitive === "publishing" ? UGC_PROGRAM_LIFECYCLE[ugcProgramLifecycleVerb(query) ?? ""] : undefined;
|
|
2857
|
-
if (lifecycle)
|
|
2858
|
-
return { tools: [lifecycle[1], "oxygen_ugc_get"], commands: [lifecycle[0], "ugc programs list"] };
|
|
2859
|
-
if (card.primitive === "publishing" && isUgcCreatorSideIntent(query)) {
|
|
2860
|
-
return {
|
|
2861
|
-
tools: ["oxygen_ugc_get", "oxygen_ugc_application_create", "oxygen_ugc_invite_accept"],
|
|
2862
|
-
commands: ["ugc programs discover", "ugc programs apply", "ugc creators accept"],
|
|
2863
|
-
};
|
|
2864
|
-
}
|
|
2865
|
-
if (card.primitive === "publishing" && isUgcVoiceIntent(query)) {
|
|
2866
|
-
return {
|
|
2867
|
-
tools: ["oxygen_ugc_voice_import", "oxygen_ugc_voice_save", "oxygen_ugc_get"],
|
|
2868
|
-
commands: ["ugc voice import", "ugc voice save", "ugc voice get"],
|
|
2869
|
-
};
|
|
2870
|
-
}
|
|
2871
|
-
if (card.primitive === "publishing" && isUgcProgramIntent(query)) {
|
|
2872
|
-
return {
|
|
2873
|
-
tools: ["oxygen_ugc_program_create", "oxygen_ugc_invite_create", "oxygen_ugc_get"],
|
|
2874
|
-
commands: ["ugc programs create", "ugc creators invite", "ugc programs list"],
|
|
2875
|
-
exactCommand: "oxygen ugc programs create --product-url <your product site> --json",
|
|
2876
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.ugcProgramCreate(),
|
|
2877
|
-
};
|
|
2878
|
-
}
|
|
2879
|
-
if (card.primitive === "publishing" && isPostDraftIntent(query)) {
|
|
2880
|
-
return {
|
|
2881
|
-
tools: ["oxygen_knowledge_page_get", "oxygen_publishing_posts_create", "oxygen_publishing_posts_get"],
|
|
2882
|
-
commands: ["knowledge page get", "publishing posts create", "publishing posts get"],
|
|
2883
|
-
exactCommand: POST_DRAFT_COMMAND,
|
|
2884
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.publishingPostDraft(),
|
|
2885
|
-
};
|
|
2886
|
-
}
|
|
2887
|
-
if (card.primitive === "signals" && isSignalCaptureIntent(query)) {
|
|
2888
|
-
return {
|
|
2889
|
-
tools: ["oxygen_crm_record_search", "oxygen_crm_record_assert", "oxygen_crm_activity_log", "oxygen_signals_list"],
|
|
2890
|
-
commands: ["crm search", "crm assert", "crm activity log", "signals list"],
|
|
2891
|
-
exactCommand: SIGNAL_CAPTURE_COMMAND,
|
|
2892
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.signalCapture(),
|
|
2893
|
-
};
|
|
2894
|
-
}
|
|
2895
|
-
if (card.primitive === "publishing" && isFirstCommentIntent(query)) {
|
|
2896
|
-
return {
|
|
2897
|
-
tools: ["oxygen_publishing_posts_create", "oxygen_publishing_posts_update", "oxygen_publishing_posts_get"],
|
|
2898
|
-
commands: ["publishing posts create", "publishing posts update", "publishing posts get"],
|
|
2899
|
-
exactCommand: PUBLISHING_FIRST_COMMENT_COMMAND,
|
|
2900
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.publishingFirstComment(),
|
|
2901
|
-
};
|
|
2902
|
-
}
|
|
2903
|
-
if (card.id === "sourcing-and-provider-tools" && isCompanyUrlRecoveryIntent(query)) {
|
|
2904
|
-
return {
|
|
2905
|
-
tools: ["oxygen_companies_search_plan", "oxygen_companies_search_run"],
|
|
2906
|
-
commands: ["companies search plan", "companies search run"],
|
|
2907
|
-
exactCommand: COMPANY_URL_RECOVERY_COMMAND,
|
|
2908
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.companyUrlRecovery(),
|
|
2909
|
-
};
|
|
2910
|
-
}
|
|
2911
|
-
if (card.primitive === "tables" && isCompanyPageFollowersIntent(query)) {
|
|
2912
|
-
return {
|
|
2913
|
-
tools: ["oxygen_tables_followers", "oxygen_tables_sources"],
|
|
2914
|
-
commands: ["tables followers check", "tables followers order", "tables followers status", "tables sources"],
|
|
2915
|
-
exactCommand: COMPANY_PAGE_FOLLOWERS_COMMAND,
|
|
2916
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.companyPageFollowers(),
|
|
2917
|
-
};
|
|
2918
|
-
}
|
|
2919
|
-
if (card.id === "sourcing-and-provider-tools" && isLocalBusinessIntent(query)) {
|
|
2920
|
-
return {
|
|
2921
|
-
tools: ["oxygen_companies_search_preview", "oxygen_companies_search_run"],
|
|
2922
|
-
commands: ["companies search filters", "companies search preview", "companies search run"],
|
|
2923
|
-
exactCommand: LOCAL_BUSINESS_SCRAPE_COMMAND,
|
|
2924
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.localBusinessScrape(),
|
|
2925
|
-
};
|
|
2926
|
-
}
|
|
2927
|
-
if (card.id === "workspace-access" && isConnectedAppSpendIntent(query)) {
|
|
2928
|
-
return {
|
|
2929
|
-
tools: ["oxygen_connector_list", "oxygen_connector_update", "oxygen_limits_show"],
|
|
2930
|
-
commands: ["connectors get", "connectors set", "limits show"],
|
|
2931
|
-
exactCommand: "oxygen connectors get <app> --json",
|
|
2932
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.connectedAppsList(),
|
|
2933
|
-
};
|
|
2934
|
-
}
|
|
2935
|
-
if (card.id === "workspace-access" && isConnectedAppEventsIntent(query)) {
|
|
2936
|
-
return {
|
|
2937
|
-
tools: ["oxygen_connector_events_get", "oxygen_connector_events_revoke", "oxygen_connector_list"],
|
|
2938
|
-
commands: ["connectors events get", "connectors events revoke", "connectors list"],
|
|
2939
|
-
exactCommand: "oxygen connectors events get <app> --json",
|
|
2940
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.connectedAppEvents(),
|
|
2941
|
-
};
|
|
2942
|
-
}
|
|
2943
|
-
if (card.id === "workspace-access" && isConnectedAppsIntent(query)) {
|
|
2944
|
-
return {
|
|
2945
|
-
tools: ["oxygen_connector_list", "oxygen_connector_update"],
|
|
2946
|
-
commands: ["connectors list", "connectors set"],
|
|
2947
|
-
exactCommand: "oxygen connectors list --json",
|
|
2948
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.connectedAppsList(),
|
|
2949
|
-
};
|
|
2950
|
-
}
|
|
2951
|
-
if (card.id === "workspace-access" && isWorkspacePagesIntent(query)) {
|
|
2952
|
-
return {
|
|
2953
|
-
tools: ["oxygen_settings_pages_get", "oxygen_settings_pages_update"],
|
|
2954
|
-
commands: ["settings pages list", "settings pages set"],
|
|
2955
|
-
exactCommand: "oxygen settings pages list --json",
|
|
2956
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.workspacePagesList(),
|
|
2957
|
-
};
|
|
2958
|
-
}
|
|
2959
|
-
// A general settings ask: the pages pair is the settings CLI and MCP can change.
|
|
2960
|
-
if (card.id === "workspace-access" && isWorkspaceSettingsIntent(query)) {
|
|
2961
|
-
return {
|
|
2962
|
-
tools: ["oxygen_settings_pages_get", "oxygen_settings_pages_update", ...card.gatewayTools],
|
|
2963
|
-
commands: ["settings pages list", "settings pages set", ...card.gatewayCommands],
|
|
2964
|
-
};
|
|
2965
|
-
}
|
|
2966
|
-
// Contact enrichment keeps its own gateway even when the input mentions
|
|
2967
|
-
// company names or domains; those words do not make it account sourcing.
|
|
2968
|
-
if (card.id === "sourcing-and-provider-tools" && /\bfind (?:work )?emails?\b/.test(query))
|
|
2969
|
-
return {
|
|
2970
|
-
tools: ["oxygen_find_email", "oxygen_tools_search"], commands: ["find email", "tools search"],
|
|
2971
|
-
};
|
|
2972
|
-
if (card.id === "sourcing-and-provider-tools" && /\bfind (?:mobile )?phones?\b/.test(query))
|
|
2973
|
-
return {
|
|
2974
|
-
tools: ["oxygen_find_phone", "oxygen_tools_search"], commands: ["find phone", "tools search"],
|
|
2975
|
-
};
|
|
2976
|
-
if (card.id === "sourcing-and-provider-tools" && (isCompanySourcingIntent(query) || /\b(companies|company search|company sourcing)\b/.test(query))) {
|
|
2977
|
-
return {
|
|
2978
|
-
tools: ["oxygen_companies_search_plan", "oxygen_companies_search_preview", "oxygen_companies_search_run", ...(/\b(people|contacts)\b/.test(query) ? ["oxygen_people_search_plan"] : [])],
|
|
2979
|
-
commands: ["companies search plan", "companies search preview", "companies search run", ...(/\b(people|contacts)\b/.test(query) ? ["people search plan"] : [])],
|
|
2980
|
-
};
|
|
2981
|
-
}
|
|
2982
|
-
if (card.id === "sourcing-and-provider-tools" && /\b(people|contacts|personas?)\b/.test(query)) {
|
|
2983
|
-
return {
|
|
2984
|
-
tools: ["oxygen_people_search_plan", "oxygen_people_search_preview", "oxygen_people_search_run"],
|
|
2985
|
-
commands: ["people search plan", "people search preview", "people search run"],
|
|
2986
|
-
};
|
|
2987
|
-
}
|
|
2988
|
-
if (card.id === "connected-linkedin" && isLinkedInAccountConnectIntent(query)) {
|
|
2989
|
-
return {
|
|
2990
|
-
tools: ["oxygen_senders_connect", "oxygen_senders_list", "oxygen_billing_commitments"],
|
|
2991
|
-
commands: ["senders connect", "senders list", "billing commitments"],
|
|
2992
|
-
exactCommand: "oxygen senders connect --country <cc> --json",
|
|
2993
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.senderConnect(),
|
|
2994
|
-
};
|
|
2995
|
-
}
|
|
2996
|
-
if (card.id === "connected-linkedin" && isLinkedInAccountLimitsIntent(query)) {
|
|
2997
|
-
return {
|
|
2998
|
-
tools: ["oxygen_senders_limits_get", "oxygen_senders_limits_set", "oxygen_senders_list"],
|
|
2999
|
-
commands: ["senders limits get", "senders limits set", "senders list"],
|
|
3000
|
-
};
|
|
3001
|
-
}
|
|
3002
|
-
if (card.id === "connected-linkedin" && isMutualLinkedInConnectionsIntent(query)) {
|
|
3003
|
-
return {
|
|
3004
|
-
tools: ["oxygen_tools_get", "oxygen_tools_run_live", "oxygen_senders_list"],
|
|
3005
|
-
commands: ["tools get", "tools run", "senders list"],
|
|
3006
|
-
};
|
|
3007
|
-
}
|
|
3008
|
-
// Whole domains go with every inbox on them, so the domain path leads and the
|
|
3009
|
-
// selected-mailbox path (with --include-domains) follows.
|
|
3010
|
-
if (card.id === "sending-infrastructure" && isSendingDomainDeleteIntent(query)) {
|
|
3011
|
-
return {
|
|
3012
|
-
tools: ["oxygen_mailboxes_delete", "oxygen_domains_list", "oxygen_mailboxes_list"],
|
|
3013
|
-
commands: ["domains delete", "mailboxes delete", "domains list"],
|
|
3014
|
-
};
|
|
3015
|
-
}
|
|
3016
|
-
if (card.id === "sending-infrastructure" && isMailboxDeleteIntent(query)) {
|
|
3017
|
-
return {
|
|
3018
|
-
tools: [
|
|
3019
|
-
"oxygen_mailboxes_delete",
|
|
3020
|
-
"oxygen_mailboxes_compatibility",
|
|
3021
|
-
"oxygen_mailboxes_list",
|
|
3022
|
-
],
|
|
3023
|
-
commands: [
|
|
3024
|
-
"mailboxes delete",
|
|
3025
|
-
"mailboxes compatibility",
|
|
3026
|
-
"mailboxes list",
|
|
3027
|
-
],
|
|
3028
|
-
};
|
|
3029
|
-
}
|
|
3030
|
-
if (card.id === "sending-infrastructure" && isMailboxVolumeIntent(query)) {
|
|
3031
|
-
return {
|
|
3032
|
-
tools: ["oxygen_mailboxes_set_ramp", "oxygen_mailboxes_set_cap", "oxygen_mailboxes_get"],
|
|
3033
|
-
commands: ["mailboxes ramp set", "mailboxes cap set", "mailboxes get"],
|
|
3034
|
-
};
|
|
3035
|
-
}
|
|
3036
|
-
if (card.id === "sending-infrastructure" && isWarmupEnrollmentIntent(query)) {
|
|
3037
|
-
return {
|
|
3038
|
-
tools: ["oxygen_mailboxes_warmup_enable", "oxygen_mailboxes_compatibility", "oxygen_mailboxes_list"],
|
|
3039
|
-
commands: ["mailboxes warmup enable", "mailboxes compatibility", "mailboxes list"],
|
|
3040
|
-
};
|
|
3041
|
-
}
|
|
3042
|
-
if (card.id === "sending-infrastructure" && isMailboxOnboardingIntent(query)) {
|
|
3043
|
-
return {
|
|
3044
|
-
tools: [
|
|
3045
|
-
"oxygen_mailboxes_compatibility",
|
|
3046
|
-
"oxygen_mailboxes_import",
|
|
3047
|
-
"oxygen_mailboxes_connect_oauth",
|
|
3048
|
-
"oxygen_mailboxes_sync_status",
|
|
3049
|
-
"oxygen_mailboxes_sync",
|
|
3050
|
-
"oxygen_mailboxes_oauth_health",
|
|
3051
|
-
],
|
|
3052
|
-
commands: [
|
|
3053
|
-
"mailboxes compatibility",
|
|
3054
|
-
"mailboxes import",
|
|
3055
|
-
"mailboxes connect-oauth",
|
|
3056
|
-
"mailboxes sync",
|
|
3057
|
-
"mailboxes oauth-health",
|
|
3058
|
-
],
|
|
3059
|
-
};
|
|
3060
|
-
}
|
|
3061
|
-
if (card.id === "sending-infrastructure"
|
|
3062
|
-
&& isInboxAvatarIntent(query)) {
|
|
3063
|
-
return {
|
|
3064
|
-
tools: [],
|
|
3065
|
-
commands: ["managed-inboxes upload-avatar", "senders profiles set-photo"],
|
|
3066
|
-
};
|
|
3067
|
-
}
|
|
3068
|
-
if (card.primitive === "posts" && isOwnedPostCommentIntent(query)) {
|
|
3069
|
-
return {
|
|
3070
|
-
tools: ["oxygen_publishing_comments", "oxygen_publishing_analytics"],
|
|
3071
|
-
commands: [
|
|
3072
|
-
"publishing comments list",
|
|
3073
|
-
"publishing comments get",
|
|
3074
|
-
"publishing comments reply",
|
|
3075
|
-
"publishing analytics summary",
|
|
3076
|
-
],
|
|
3077
|
-
};
|
|
3078
|
-
}
|
|
3079
|
-
if (card.id === "linkedin-public-research" && isPublicLinkedInEngagerHarvest(query)) {
|
|
3080
|
-
const motion = isLinkedInEngagerMotion(query);
|
|
3081
|
-
return {
|
|
3082
|
-
tools: [
|
|
3083
|
-
...(motion ? ["oxygen_recipes_list"] : []),
|
|
3084
|
-
"oxygen_engagement_harvest",
|
|
3085
|
-
"oxygen_engagement_harvest_status",
|
|
3086
|
-
"oxygen_tools_search",
|
|
3087
|
-
"oxygen_tools_get",
|
|
3088
|
-
...(isDeferredLinkedInOutreach(query)
|
|
3089
|
-
? ["oxygen_sequences_send", "oxygen_sequences_list"]
|
|
3090
|
-
: []),
|
|
3091
|
-
],
|
|
3092
|
-
commands: [
|
|
3093
|
-
...(motion ? ["recipes list"] : []),
|
|
3094
|
-
"engagement harvest",
|
|
3095
|
-
"engagement status",
|
|
3096
|
-
"tools search",
|
|
3097
|
-
"tools get",
|
|
3098
|
-
...(isDeferredLinkedInOutreach(query)
|
|
3099
|
-
? ["sequences send", "sequences list"]
|
|
3100
|
-
: []),
|
|
3101
|
-
],
|
|
3102
|
-
};
|
|
3103
|
-
}
|
|
3104
|
-
if (card.primitive === "tables") {
|
|
3105
|
-
if (isClayMigrationIntent(query))
|
|
3106
|
-
return { tools: ["oxygen_clay_migration"], commands: ["clay migration"], exactCommand: "oxygen clay migration --action connect --json", exactMcpCall: { tool: "oxygen_clay_migration", arguments: { action: "connect" } } };
|
|
3107
|
-
const removal = tableRowRemovalRecommendation(query);
|
|
3108
|
-
if (removal)
|
|
3109
|
-
return removal;
|
|
3110
|
-
const insert = tableRowInsertRecommendation(query);
|
|
3111
|
-
if (insert)
|
|
3112
|
-
return insert;
|
|
3113
|
-
const update = tableRowUpdateRecommendation(query);
|
|
3114
|
-
if (update)
|
|
3115
|
-
return update;
|
|
3116
|
-
const read = tableReadRecommendation(query);
|
|
3117
|
-
if (read)
|
|
3118
|
-
return read;
|
|
3119
|
-
const maintenance = tableMaintenanceRecommendation(query);
|
|
3120
|
-
if (maintenance)
|
|
3121
|
-
return maintenance;
|
|
3122
|
-
if (isTableInventoryIntent(query))
|
|
3123
|
-
return {
|
|
3124
|
-
tools: ["oxygen_tables_list", "oxygen_workspace_map"],
|
|
3125
|
-
commands: ["tables list", "workspace map"],
|
|
3126
|
-
exactCommand: "oxygen tables list --json",
|
|
3127
|
-
exactMcpCall: { tool: "oxygen_tables_list", arguments: {} },
|
|
3128
|
-
};
|
|
3129
|
-
const structure = tableStructureRecommendation(query);
|
|
3130
|
-
if (structure)
|
|
3131
|
-
return structure;
|
|
3132
|
-
if (isTableCapacityReadIntent(query))
|
|
3133
|
-
return {
|
|
3134
|
-
tools: ["oxygen_limits_show", "oxygen_tables_query", "oxygen_tables_describe"],
|
|
3135
|
-
commands: ["limits show --section capacity", "tables query", "tables describe"],
|
|
3136
|
-
exactMcpCall: { tool: "oxygen_limits_show", arguments: { section: "capacity" } },
|
|
3137
|
-
};
|
|
3138
|
-
if (isFunctionIntent(query)) {
|
|
3139
|
-
if (/\b(?:list|show|read|see|my)\b.{0,30}\bfavou?rites?\b/.test(query))
|
|
3140
|
-
return {
|
|
3141
|
-
tools: ["oxygen_callables_manage"], commands: ["functions list", "functions describe"],
|
|
3142
|
-
exactMcpCall: { tool: "oxygen_callables_manage", arguments: { operation: "list_functions", filter: "favorites" } },
|
|
3143
|
-
};
|
|
3144
|
-
if (/\b(runs|invocations?|history)\b/.test(query))
|
|
3145
|
-
return {
|
|
3146
|
-
tools: ["oxygen_callables_manage"], commands: ["functions runs", "functions describe"],
|
|
3147
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.functionsRuns(),
|
|
3148
|
-
};
|
|
3149
|
-
const functionMutation = [
|
|
3150
|
-
[/\b(publish)\b/, "functions publish"],
|
|
3151
|
-
[/\b(bind|attach)\b/, "functions bind"],
|
|
3152
|
-
[/\b(rename)\b/, "functions rename"],
|
|
3153
|
-
[/\b(delete|remove)\b/, "functions delete"],
|
|
3154
|
-
[/\b(duplicate|copy)\b/, "functions duplicate"],
|
|
3155
|
-
[/\b(unfavorite|unfavourite)\b/, "functions unfavorite"],
|
|
3156
|
-
[/\b(favorite|favourite)\b/, "functions favorite"],
|
|
3157
|
-
[/\b(enable|disable)\b/, /\bdisable\b/.test(query) ? "functions disable" : "functions enable"],
|
|
3158
|
-
[/\b(create|save|edit)\b/, "functions draft"],
|
|
3159
|
-
];
|
|
3160
|
-
const mutation = functionMutation.find(([pattern]) => pattern.test(query));
|
|
3161
|
-
if (mutation)
|
|
3162
|
-
return {
|
|
3163
|
-
tools: ["oxygen_callables_manage"],
|
|
3164
|
-
commands: [/\bcreate\b/.test(query) ? "functions list" : "functions describe", mutation[1]],
|
|
3165
|
-
exactMcpCall: /\bcreate\b/.test(query) ? CAPABILITY_ROUTE_MCP_CALLS.functionsList() : CAPABILITY_ROUTE_MCP_CALLS.functionsDescribe(),
|
|
3166
|
-
};
|
|
3167
|
-
if (/\b(run|execute|invoke)\b/.test(query))
|
|
3168
|
-
return {
|
|
3169
|
-
tools: ["oxygen_callables_manage", "oxygen_columns_run"], commands: ["functions describe", "columns run"],
|
|
3170
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.functionsDescribe(),
|
|
3171
|
-
};
|
|
3172
|
-
if (/\b(describe|inspect|inputs?|outputs?|steps?|caps?|version|details?)\b/.test(query))
|
|
3173
|
-
return {
|
|
3174
|
-
tools: ["oxygen_callables_manage"], commands: ["functions describe", "functions runs"],
|
|
3175
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.functionsDescribe(),
|
|
3176
|
-
};
|
|
3177
|
-
return {
|
|
3178
|
-
tools: ["oxygen_callables_manage"], commands: ["functions list", "functions describe"],
|
|
3179
|
-
exactMcpCall: { ...CAPABILITY_ROUTE_MCP_CALLS.functionsList(), ...(/\b(favorites|favourites)\b/.test(query) ? { arguments: { operation: "list_functions", filter: "favorites" } } : {}) },
|
|
3180
|
-
};
|
|
3181
|
-
}
|
|
3182
|
-
if (isTableMaintenanceIntent(query)) {
|
|
3183
|
-
if (/\b(skills?|instructions?|guidance)\b/.test(query))
|
|
3184
|
-
return {
|
|
3185
|
-
tools: ["oxygen_skills_get", "oxygen_tables_tidy_suggest", "oxygen_tables_describe"],
|
|
3186
|
-
commands: ["skills get", "tables tidy-suggest", "tables describe"],
|
|
3187
|
-
exactCommand: "oxygen skills get oxygen-table-tidy --json",
|
|
3188
|
-
exactMcpCall: { tool: "oxygen_skills_get", arguments: { name: "oxygen-table-tidy" } },
|
|
3189
|
-
};
|
|
3190
|
-
if (/\b(favou?rites?|unfavou?rite|star|unstar)\b/.test(query)) {
|
|
3191
|
-
const read = /\b(list|read|show|see)\b/.test(query);
|
|
3192
|
-
return {
|
|
3193
|
-
tools: read ? ["oxygen_tables_favorites", "oxygen_tables_favorite"] : ["oxygen_tables_favorite", "oxygen_tables_favorites"],
|
|
3194
|
-
commands: read ? ["tables favorites", "tables favorite"] : ["tables favorite", "tables favorites"],
|
|
3195
|
-
};
|
|
3196
|
-
}
|
|
3197
|
-
if (/\bcolumns?\b/.test(query) && /\b(rename|renaming|label|key)\b/.test(query)) {
|
|
3198
|
-
const key = /\b(stable key|column key|snake case|rename key)\b/.test(query);
|
|
3199
|
-
return {
|
|
3200
|
-
tools: [key ? "oxygen_columns_rename" : "oxygen_columns_update", "oxygen_tables_describe"],
|
|
3201
|
-
commands: [key ? "columns rename" : "columns update", "tables describe"],
|
|
3202
|
-
};
|
|
3203
|
-
}
|
|
3204
|
-
return {
|
|
3205
|
-
tools: ["oxygen_tables_tidy_suggest", "oxygen_columns_update", "oxygen_tables_describe", "oxygen_skills_get"],
|
|
3206
|
-
commands: ["tables tidy-suggest", "columns update", "tables describe", "skills get"],
|
|
3207
|
-
};
|
|
3208
|
-
}
|
|
3209
|
-
if (isLinkedInProfileWatcherIntent(query)) {
|
|
3210
|
-
return {
|
|
3211
|
-
tools: ["oxygen_tables_watcher"],
|
|
3212
|
-
commands: ["tables watcher preview", "tables watcher create", "tables watcher get", "tables watcher update", "tables watcher pause", "tables watcher resume"],
|
|
3213
|
-
};
|
|
3214
|
-
}
|
|
3215
|
-
if (isRowFanOutIntent(query)) {
|
|
3216
|
-
// `tables send --flatten` writes one row per array element (free, durable).
|
|
3217
|
-
return {
|
|
3218
|
-
tools: ["oxygen_tables_send"],
|
|
3219
|
-
commands: ["tables send"],
|
|
3220
|
-
exactCommand: ROW_FAN_OUT_COMMAND,
|
|
3221
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.rowFanOut(),
|
|
3222
|
-
};
|
|
3223
|
-
}
|
|
3224
|
-
if (isRowClassificationIntent(query)) {
|
|
3225
|
-
// The classification list (free) names the template production has and,
|
|
3226
|
-
// where the deployment runs it, the native Classify column; any other
|
|
3227
|
-
// scheme is a prompt column (free to add). The run's dry run prices it,
|
|
3228
|
-
// and the labelled rows are filtered natively with `tables query`.
|
|
3229
|
-
return {
|
|
3230
|
-
tools: ["oxygen_columns_catalog", "oxygen_columns_add", "oxygen_columns_run", "oxygen_tables_query"],
|
|
3231
|
-
commands: ["columns catalog", "columns add", "columns run", "tables query"],
|
|
3232
|
-
exactCommand: ROW_CLASSIFICATION_COMMAND,
|
|
3233
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.rowClassification(),
|
|
3234
|
-
};
|
|
3235
|
-
}
|
|
3236
|
-
if (isCompanyResearchQuestionIntent(query)) {
|
|
3237
|
-
// A fact the template catalog already answers by key: list the keys first
|
|
3238
|
-
// (free), add the column by key (free), then price and run it. Ahead of
|
|
3239
|
-
// the bare "run" noun below, because "which cloud provider does it run
|
|
3240
|
-
// on" is a question about the company, not about a run.
|
|
3241
|
-
return {
|
|
3242
|
-
tools: ["oxygen_columns_catalog", "oxygen_columns_add", "oxygen_columns_run", "oxygen_tables_describe"],
|
|
3243
|
-
commands: ["columns catalog", "columns add", "columns run", "tables describe"],
|
|
3244
|
-
};
|
|
3245
|
-
}
|
|
3246
|
-
if (/\b(table )?(action )?runs?\b/.test(query)) {
|
|
3247
|
-
return {
|
|
3248
|
-
tools: ["oxygen_table_runs_get", "oxygen_table_runs_items", "oxygen_table_runs_wait", "oxygen_table_runs_retry_failed"],
|
|
3249
|
-
commands: ["table-runs get", "table-runs items", "table-runs wait", "table-runs retry-failed"],
|
|
3250
|
-
};
|
|
3251
|
-
}
|
|
3252
|
-
if (isEmailVerificationIntent(query)) {
|
|
3253
|
-
// Define-without-running first (0 credits), then the free preview that
|
|
3254
|
-
// prices it, then the approved run, then the one-shot for a handful of
|
|
3255
|
-
// addresses that never needed a table.
|
|
3256
|
-
return {
|
|
3257
|
-
tools: ["oxygen_columns_add", "oxygen_enrich_column_preview", "oxygen_enrich_column_run", "oxygen_verify_email"],
|
|
3258
|
-
commands: ["columns add", "enrich-column preview", "enrich-column run", "verify email"],
|
|
3259
|
-
};
|
|
3260
|
-
}
|
|
3261
|
-
if (/\b(waterfall|enrich|enrichment|work email|mobile phone)\b/.test(query)) {
|
|
3262
|
-
return {
|
|
3263
|
-
tools: ["oxygen_enrich_column_preview", "oxygen_columns_add", "oxygen_enrich_column_run", "oxygen_table_runs_get"],
|
|
3264
|
-
commands: ["enrich-column preview", "columns add", "enrich-column run", "table-runs get"],
|
|
3265
|
-
};
|
|
3266
|
-
}
|
|
3267
|
-
if (/\b(ai column|classif(?:y|ication)|extract(?:ion)?|scor(?:e|ing)|summari[sz](?:e|ation)|draft(?:ing)?|research)\b/.test(query)) {
|
|
3268
|
-
return {
|
|
3269
|
-
tools: ["oxygen_columns_add", "oxygen_columns_run", "oxygen_tables_describe", "oxygen_context_resolve"],
|
|
3270
|
-
commands: ["columns add", "columns run", "tables describe", "context resolve"],
|
|
3271
|
-
};
|
|
3272
|
-
}
|
|
3273
|
-
if (/\bformula|deterministic transform\b/.test(query)) {
|
|
3274
|
-
return {
|
|
3275
|
-
tools: ["oxygen_formulas_list", "oxygen_formulas_validate", "oxygen_columns_add"],
|
|
3276
|
-
commands: ["formulas list", "formulas validate", "columns add"],
|
|
3277
|
-
};
|
|
3278
|
-
}
|
|
3279
|
-
}
|
|
3280
|
-
if (card.primitive === "messages") {
|
|
3281
|
-
// A saved, shared or default inbox view is the views commands, never a send.
|
|
3282
|
-
// "view my inbox" stays a read; the noun needs "views" or a save/default/share word.
|
|
3283
|
-
if ((/\bviews\b/.test(query) && /\b(inbox|unibox)\b/.test(query))
|
|
3284
|
-
|| (/\bview\b/.test(query) && /\b(saved?|default|shared|team)\b/.test(query))) {
|
|
3285
|
-
return {
|
|
3286
|
-
tools: ["oxygen_inbox_views_list", "oxygen_inbox_view_create", "oxygen_inbox_view_update"],
|
|
3287
|
-
commands: ["inbox views list", "inbox views create", "inbox views update"],
|
|
3288
|
-
};
|
|
3289
|
-
}
|
|
3290
|
-
if (/\b(message )?reviews?\b/.test(query)) {
|
|
3291
|
-
return {
|
|
3292
|
-
tools: ["oxygen_reviews_list", "oxygen_reviews_next", "oxygen_reviews_decide"],
|
|
3293
|
-
commands: ["reviews list", "reviews next", "reviews decide"],
|
|
3294
|
-
};
|
|
3295
|
-
}
|
|
3296
|
-
const existingThread = /\b(reply|respond|conversation|thread|inbox|existing)\b/.test(query);
|
|
3297
|
-
if (/\bemail\b/.test(query) && !existingThread) {
|
|
3298
|
-
return {
|
|
3299
|
-
tools: ["oxygen_email_send", "oxygen_inbox_send", "oxygen_messages_query"],
|
|
3300
|
-
commands: ["email send", "inbox send", "messages query"],
|
|
3301
|
-
};
|
|
3302
|
-
}
|
|
3303
|
-
}
|
|
3304
|
-
if (card.primitive === "sequences") {
|
|
3305
|
-
if (isSpintaxIntent(query)) {
|
|
3306
|
-
return { tools: ["oxygen_spintax_generate"], commands: ["spintax generate"] };
|
|
3307
|
-
}
|
|
3308
|
-
if (isSequenceInvitationTimeoutIntent(query)) {
|
|
3309
|
-
return {
|
|
3310
|
-
tools: ["oxygen_sequences_update", "oxygen_sequences_get", "oxygen_sequences_create"],
|
|
3311
|
-
commands: ["sequences update", "sequences get", "sequences create"],
|
|
3312
|
-
};
|
|
3313
|
-
}
|
|
3314
|
-
if (isSequenceReplyToStopIntent(query)) {
|
|
3315
|
-
return {
|
|
3316
|
-
tools: ["oxygen_sequences_update", "oxygen_sequences_get"],
|
|
3317
|
-
commands: ["sequences update", "sequences get"],
|
|
3318
|
-
exactCommand: SEQUENCE_REPLY_TO_STOP_COMMAND,
|
|
3319
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.sequenceReplyToStop(),
|
|
3320
|
-
};
|
|
3321
|
-
}
|
|
3322
|
-
if (isSequenceScheduleIntent(query) || isSequenceUnsubscribeIntent(query)) {
|
|
3323
|
-
return {
|
|
3324
|
-
tools: ["oxygen_sequences_update", "oxygen_sequences_get"],
|
|
3325
|
-
commands: ["sequences update", "sequences get"],
|
|
3326
|
-
exactCommand: isSequenceScheduleIntent(query) ? SEQUENCE_SENDING_SCHEDULE_COMMAND : SEQUENCE_UNSUBSCRIBE_COMMAND,
|
|
3327
|
-
exactMcpCall: isSequenceScheduleIntent(query)
|
|
3328
|
-
? CAPABILITY_ROUTE_MCP_CALLS.sequenceSendingSchedule()
|
|
3329
|
-
: CAPABILITY_ROUTE_MCP_CALLS.sequenceUnsubscribe(),
|
|
3330
|
-
};
|
|
3331
|
-
}
|
|
3332
|
-
if (isSenderProfileIntent(query)) {
|
|
3333
|
-
return {
|
|
3334
|
-
tools: ["oxygen_senders_profiles_list", "oxygen_senders_profiles_get"],
|
|
3335
|
-
commands: ["senders profiles list", "senders profiles get"],
|
|
3336
|
-
};
|
|
3337
|
-
}
|
|
3338
|
-
if (isSequenceLeadProgressIntent(query)) {
|
|
3339
|
-
return {
|
|
3340
|
-
tools: ["oxygen_sequences_enrollments", "oxygen_sequences_stats", "oxygen_sequences_list"],
|
|
3341
|
-
commands: ["sequences enrollments", "sequences stats", "sequences list"],
|
|
3342
|
-
};
|
|
3343
|
-
}
|
|
3344
|
-
const edit = sequenceEditRecommendation(query);
|
|
3345
|
-
if (edit)
|
|
3346
|
-
return edit;
|
|
3347
|
-
if (isNetNewLinkedInInitiation(query)) {
|
|
3348
|
-
const publicResearch = isPublicLinkedInRead(query);
|
|
3349
|
-
const harvestEngagers = publicResearch && isPublicLinkedInEngagerHarvest(query);
|
|
3350
|
-
return {
|
|
3351
|
-
tools: [
|
|
3352
|
-
"oxygen_sequences_send",
|
|
3353
|
-
...(harvestEngagers
|
|
3354
|
-
? ["oxygen_engagement_harvest", "oxygen_engagement_harvest_status"]
|
|
3355
|
-
: publicResearch
|
|
3356
|
-
? ["oxygen_tools_search", "oxygen_tools_get"]
|
|
3357
|
-
: []),
|
|
3358
|
-
"oxygen_senders_list",
|
|
3359
|
-
"oxygen_sequences_list",
|
|
3360
|
-
],
|
|
3361
|
-
commands: [
|
|
3362
|
-
"sequences send",
|
|
3363
|
-
...(harvestEngagers
|
|
3364
|
-
? ["engagement harvest", "engagement status"]
|
|
3365
|
-
: publicResearch
|
|
3366
|
-
? ["tools search", "tools get"]
|
|
3367
|
-
: []),
|
|
3368
|
-
"senders list",
|
|
3369
|
-
"sequences list",
|
|
3370
|
-
],
|
|
3371
|
-
};
|
|
3372
|
-
}
|
|
3373
|
-
if (/\benroll/.test(query)) {
|
|
3374
|
-
return {
|
|
3375
|
-
tools: ["oxygen_sequences_enroll", "oxygen_sequences_create", "oxygen_sequences_start", "oxygen_sequences_list"],
|
|
3376
|
-
commands: ["sequences enroll", "sequences create", "sequences start", "sequences list"],
|
|
3377
|
-
};
|
|
3378
|
-
}
|
|
3379
|
-
if (/\b(start|launch|run|activate)\b/.test(query)) {
|
|
3380
|
-
return {
|
|
3381
|
-
tools: ["oxygen_sequences_start", "oxygen_sequences_list", "oxygen_sequences_create", "oxygen_sequences_enroll"],
|
|
3382
|
-
commands: ["sequences start", "sequences list", "sequences create", "sequences enroll"],
|
|
3383
|
-
};
|
|
3384
|
-
}
|
|
3385
|
-
return {
|
|
3386
|
-
tools: ["oxygen_sequences_create", "oxygen_sequences_enroll", "oxygen_sequences_start", "oxygen_sequences_list", "oxygen_sequences_send"],
|
|
3387
|
-
commands: ["sequences create", "sequences enroll", "sequences start", "sequences list", "sequences send"],
|
|
3388
|
-
};
|
|
3389
|
-
}
|
|
3390
|
-
if (card.primitive === "workflows") {
|
|
3391
|
-
if (isLinkedInEngagerMotion(query)) {
|
|
3392
|
-
return {
|
|
3393
|
-
tools: [
|
|
3394
|
-
"oxygen_recipes_list",
|
|
3395
|
-
"oxygen_blueprints_describe",
|
|
3396
|
-
"oxygen_blueprints_preflight",
|
|
3397
|
-
"oxygen_tools_get",
|
|
3398
|
-
"oxygen_sequences_list",
|
|
3399
|
-
],
|
|
3400
|
-
commands: [
|
|
3401
|
-
"recipes list",
|
|
3402
|
-
"blueprints describe",
|
|
3403
|
-
"blueprints preflight",
|
|
3404
|
-
"tools get",
|
|
3405
|
-
"sequences list",
|
|
3406
|
-
],
|
|
3407
|
-
};
|
|
3408
|
-
}
|
|
3409
|
-
// Inspect reusable bundles before authoring a new recurring monitor. This
|
|
3410
|
-
// does not assume a matching seed exists; list/describe/preflight establish
|
|
3411
|
-
// that. Existing run inspection still belongs to tail/list below.
|
|
3412
|
-
if (/\b(monitor|monitoring|watch|watching)\b/.test(query) && !/\b(existing|status|failed|failure|logs?|tail|cancel|pause|resume|disable|enable)\b/.test(query))
|
|
3413
|
-
return {
|
|
3414
|
-
tools: ["oxygen_blueprints_list", "oxygen_blueprints_describe", "oxygen_blueprints_preflight", "oxygen_workflows_schema", "oxygen_workflows_lint"],
|
|
3415
|
-
commands: ["blueprints list", "blueprints describe", "blueprints preflight", "workflows schema", "workflows lint"],
|
|
3416
|
-
};
|
|
3417
|
-
if (/\b(workflow )?templates?\b/.test(query)) {
|
|
3418
|
-
return {
|
|
3419
|
-
tools: ["oxygen_workflow_templates_search", "oxygen_workflow_templates_describe", "oxygen_workflow_templates_preflight", "oxygen_workflow_templates_apply"],
|
|
3420
|
-
commands: ["workflows templates search", "workflows templates describe", "workflows templates preflight", "workflows templates apply"],
|
|
3421
|
-
};
|
|
3422
|
-
}
|
|
3423
|
-
// A scheduled change to existing rows: the query and row-update tools the
|
|
3424
|
-
// graph's nodes call rank beside the authoring gateway.
|
|
3425
|
-
if (/\b(rows?|cells?)\b/.test(query) && /\b(updat\w*|edit\w*|chang\w*|sets?|setting|tag\w*|mark\w*|writ\w*)\b/.test(query)
|
|
3426
|
-
&& !/\b(insert\w*|add\w*|append\w*|new rows?|delete\w*|remove\w*)\b/.test(query))
|
|
3427
|
-
return {
|
|
3428
|
-
tools: ["oxygen_workflows_schema", "oxygen_workflows_lint", "oxygen_tables_query", "oxygen_rows_update", "oxygen_workflows_apply"],
|
|
3429
|
-
commands: ["workflows schema", "workflows lint", "tables query", "tables update", "workflows apply"],
|
|
3430
|
-
};
|
|
3431
|
-
if (isNetNewLinkedInInitiation(query) || /\b(outreach|sequence|enroll|message)\b/.test(query)) {
|
|
3432
|
-
return {
|
|
3433
|
-
tools: ["oxygen_workflows_schema", "oxygen_workflows_lint", "oxygen_workflows_apply", "oxygen_tools_get", "oxygen_sequences_list", "oxygen_sequences_start"],
|
|
3434
|
-
commands: ["workflows schema", "workflows lint", "workflows apply", "tools get", "sequences list", "sequences start"],
|
|
3435
|
-
};
|
|
3436
|
-
}
|
|
3437
|
-
if (/\b(tail|inspect|status|events?|failures?)\b/.test(query)) {
|
|
3438
|
-
return {
|
|
3439
|
-
tools: ["oxygen_workflows_tail", "oxygen_workflows_list", "oxygen_workflows_call"],
|
|
3440
|
-
commands: ["workflows tail", "workflows list", "workflows call"],
|
|
3441
|
-
};
|
|
3442
|
-
}
|
|
3443
|
-
if (/\b(run|call|execute)\b/.test(query) && !/\b(build|create|author|design|apply)\b/.test(query)) {
|
|
3444
|
-
return {
|
|
3445
|
-
tools: ["oxygen_workflows_call", "oxygen_workflows_tail", "oxygen_workflows_schema"],
|
|
3446
|
-
commands: ["workflows call", "workflows tail", "workflows schema"],
|
|
3447
|
-
};
|
|
3448
|
-
}
|
|
3449
|
-
}
|
|
3450
|
-
if (card.primitive === "signals" && isLinkedInKeywordPostIntent(query)) {
|
|
3451
|
-
return {
|
|
3452
|
-
tools: ["oxygen_signals_search_preview", "oxygen_signals_search_run"],
|
|
3453
|
-
commands: ["signals search preview", "signals search run"],
|
|
3454
|
-
exactCommand: LINKEDIN_KEYWORD_POST_COMMAND,
|
|
3455
|
-
exactMcpCall: CAPABILITY_ROUTE_MCP_CALLS.linkedinKeywordPosts(),
|
|
3456
|
-
};
|
|
3457
|
-
}
|
|
3458
|
-
if (card.primitive === "signals" && /\blinkedin\b.{0,40}\bengagers?\b/.test(query)) {
|
|
3459
|
-
return {
|
|
3460
|
-
tools: ["oxygen_engagement_list_engagers", "oxygen_signals_list", "oxygen_signals_leads_today"],
|
|
3461
|
-
commands: ["engagement engagers", "signals list", "signals leads-today"],
|
|
3462
|
-
};
|
|
3463
|
-
}
|
|
3464
|
-
if (card.id === "connected-whatsapp" && /\b(account|connect|limits?|sync)\b/.test(query)) {
|
|
3465
|
-
return {
|
|
3466
|
-
tools: ["oxygen_whatsapp_accounts_list", "oxygen_whatsapp_get", "oxygen_whatsapp_limits_get", "oxygen_whatsapp_connect"],
|
|
3467
|
-
commands: ["whatsapp accounts", "whatsapp get", "whatsapp limits get", "whatsapp connect"],
|
|
3468
|
-
};
|
|
3469
|
-
}
|
|
3470
|
-
// Brand voice is read from its wiki page; only a writing voice is synthesized.
|
|
3471
|
-
if (card.id === "knowledge-graph" && isWorkspaceVoiceIntent(query) && !/\bbrand voice\b/.test(query)) {
|
|
3472
|
-
return {
|
|
3473
|
-
tools: ["oxygen_context_synthesize", "oxygen_knowledge_search", "oxygen_knowledge_page_get"],
|
|
3474
|
-
commands: ["knowledge synthesize", "knowledge search", "knowledge page get"],
|
|
3475
|
-
};
|
|
3476
|
-
}
|
|
3477
|
-
return { tools: [...card.gatewayTools], commands: [...card.gatewayCommands] };
|
|
3478
|
-
}
|
|
3479
|
-
// An email-VERIFICATION ask names a grading verb next to the addresses, or the
|
|
3480
|
-
// addresses next to a grade. "check my emails" is deliberately not matched
|
|
3481
|
-
// (that is an inbox), and bare "deliverability" is left to the sending rail —
|
|
3482
|
-
// only "are these emails deliverable" counts. Bare "bounce" describes an
|
|
3483
|
-
// observed delivery failure too; require predictive wording or "bounce risk".
|
|
3484
|
-
function isEmailVerificationIntent(query) {
|
|
3485
|
-
const gradeThenAddress = /\b(verif(?:y|ied|ication)|validat(?:e|ed|ion)|grade|scrub|clean)\b.{0,40}\b(e ?mails?|email addresses|addresses)\b/;
|
|
3486
|
-
const addressThenGrade = /\b(e ?mails?|addresses)\b.{0,40}\b(verif(?:y|ied|ication)|validat(?:e|ed|ion)|valid|invalid|deliverable|(?:will|would|might) bounce|bounce risk|risky|safe to (?:send|email)|catch ?all|accept ?all)\b/;
|
|
3487
|
-
return gradeThenAddress.test(query) || addressThenGrade.test(query);
|
|
3488
|
-
}
|
|
3489
|
-
/**
|
|
3490
|
-
* The free list of classification columns. Production answers it with its one
|
|
3491
|
-
* classification template (B2B or B2C); a deployment that runs the native
|
|
3492
|
-
* Classify column lists that entry here too. Any other scheme is an AI prompt
|
|
3493
|
-
* column through `columns add`, which the route recommends next.
|
|
3494
|
-
*/
|
|
3495
|
-
export const ROW_CLASSIFICATION_COMMAND = "oxygen columns catalog --family classification";
|
|
3496
|
-
export const ROW_FAN_OUT_COMMAND = "oxygen tables send <source> <target> --flatten <column> --flatten-path <path> --mapping '[{\"target\":\"<column>\",\"source\":{\"type\":\"column\",\"key\":\"$element\"},\"path\":\"<field>\"}]' --dry-run";
|
|
3497
|
-
// "flatten the search results into one row per company", "explode this JSON array
|
|
3498
|
-
// into rows". Both MCP acceptance agents for OXP-1.39.2 (S26) reported no native way
|
|
3499
|
-
// to turn a search tool column's result array into rows, and two capability searches
|
|
3500
|
-
// never surfaced `tables send`, which does exactly that with --flatten.
|
|
3501
|
-
function isRowFanOutIntent(query) {
|
|
3502
|
-
return /\b(flatten|explode|unnest|fan[ -]?out)\b.{0,60}\b(rows?|arrays?|lists?|json|results?|cells?)\b/.test(query)
|
|
3503
|
-
|| /\b(arrays?|lists?|results?)\b.{0,40}\binto\b.{0,20}\bone row (?:per|for each)\b/.test(query)
|
|
3504
|
-
|| /\b(json array|array cell|list cell)\b.{0,40}\brows?\b/.test(query);
|
|
3505
|
-
}
|
|
3506
|
-
/** Nouns another primitive owns: a classify ask that names one keeps that owner. */
|
|
3507
|
-
const ROW_CLASSIFICATION_OTHER_OWNER = /\b(inbox|repl(?:y|ies)|conversations?|threads?|messages?|dms?|e-?mails?|bounces?|signals?|visitors?|workflows?|deals?|crm|records?|icp|knowledge|wiki|pages?|ads|dashboards?|metrics?|agents?|runs)\b/;
|
|
3508
|
-
/** What one table row is: the noun a per-row classification is about. */
|
|
3509
|
-
const ROW_CLASSIFICATION_ROW_NOUN = /\b(rows?|columns?|tables?|compan(?:y|ies)|accounts?|leads?|contacts?|domains?|people|persons?)\b/;
|
|
3510
|
-
/**
|
|
3511
|
-
* Put every row of a table into one of a few buckets: classify or categorize
|
|
3512
|
-
* rows, companies, accounts, leads, contacts, domains or people (or anything
|
|
3513
|
-
* "with confidence"), "label every row as …", or a yes/no question asked per
|
|
3514
|
-
* row. The verb alone is not enough: "classify my records", "categorize my
|
|
3515
|
-
* workflows" or "classify leads into ICP tiers" name the primitive that owns
|
|
3516
|
-
* them, and conversation triage ("classify my inbox replies") keeps Messages.
|
|
3517
|
-
* A bare "tag these contacts" stays with Tags.
|
|
3518
|
-
*/
|
|
3519
|
-
function isRowClassificationIntent(query) {
|
|
3520
|
-
if (ROW_CLASSIFICATION_OTHER_OWNER.test(query))
|
|
3521
|
-
return false;
|
|
3522
|
-
const classifyVerb = /\b(classif(?:y|ies|ied|ying|ication)|categori[sz](?:e|es|ed|ing|ation))\b/.test(query);
|
|
3523
|
-
return (classifyVerb && (ROW_CLASSIFICATION_ROW_NOUN.test(query) || /\bconfidence\b/.test(query)))
|
|
3524
|
-
|| /\blabel(?:s|led|ed|ling|ing)?\b.{0,40}\b(?:each|every|all|per)\s+(?:rows?|compan(?:y|ies)|accounts?|leads?|contacts?|domains?)\b/.test(query)
|
|
3525
|
-
|| /\blabel(?:s|led|ed|ling|ing)?\b.{0,80}\bconfidence\b/.test(query)
|
|
3526
|
-
|| /\byes(?: or |\/)no\b.{0,60}\b(?:each|every|per)\s+(?:rows?|compan(?:y|ies)|accounts?|leads?|contacts?)\b/.test(query)
|
|
3527
|
-
|| /\b(?:each|every|per)\s+(?:rows?|compan(?:y|ies)|accounts?|leads?|contacts?)\b.{0,60}\byes(?: or |\/)no\b/.test(query);
|
|
3528
|
-
}
|
|
3529
|
-
// "get company website URL from company name", "find the websites for this
|
|
3530
|
-
// list of company names", "recover domains for company names" — a URL-ish
|
|
3531
|
-
// noun, a company noun, a recovery verb, and the hint that the input is NAMES
|
|
3532
|
-
// or a LIST (or that URLs are MISSING). Every leg is required so a sourcing
|
|
3533
|
-
// ask ("find companies with a website in Germany") keeps its owner. LinkedIn
|
|
3534
|
-
// page recovery is deliberately left to the LinkedIn rules above it, which
|
|
3535
|
-
// already resolve company pages through the public-research catalog.
|
|
3536
|
-
/**
|
|
3537
|
-
* A company fact the template catalog answers by key — founders, parent company,
|
|
3538
|
-
* subsidiaries, cloud provider, NAICS, demos — and the "ready-made / template
|
|
3539
|
-
* catalog / research question" phrasing itself. Kept to nouns no other card
|
|
3540
|
-
* owns: "funding" alone belongs to Signals and "industry" alone to company
|
|
3541
|
-
* search, so both stay off this list.
|
|
3542
|
-
*/
|
|
3543
|
-
function isCompanyResearchQuestionIntent(query) {
|
|
3544
|
-
return /\b(founders?|founded by|parent compan(?:y|ies)|subsidiar(?:y|ies)|cloud provider|naics|column templates?|template catalog|ready[- ]made|research question|company research|offers? demos?|gives? demos?)\b/.test(query);
|
|
3545
|
-
}
|
|
3546
|
-
/** Supporting placement instructions belong to deliverability, even when the ask names an inbox. */
|
|
3547
|
-
function placementGuideRecommendation(query) {
|
|
3548
|
-
if (!/\bplacement(?:[- ]tests?)?\b/.test(query)
|
|
3549
|
-
|| !/\b(guidance|guide|instructions|supporting|read|docs?|documentation)\b/.test(query)
|
|
3550
|
-
|| /\b(run|send|create|connect|enable)\b/.test(query))
|
|
3551
|
-
return null;
|
|
3552
|
-
return {
|
|
3553
|
-
tools: ["oxygen_skills_get"],
|
|
3554
|
-
commands: ["skills get"],
|
|
3555
|
-
exactCommand: "oxygen skills get oxygen-deliverability --file references/placement.md --json",
|
|
3556
|
-
exactMcpCall: { tool: "oxygen_skills_get", arguments: { name: "oxygen-deliverability", file: "references/placement.md" } },
|
|
3557
|
-
execution: "Read oxygen-deliverability, references/placement.md for placement-test guidance and references/monitoring.md for inbox monitoring. Instruction reads do not run a test or enroll a mailbox. Keep the live preview, sender scope, credit ceiling and separate approvals for provider provisioning and test sends.",
|
|
3558
|
-
};
|
|
3559
|
-
}
|
|
3560
|
-
/** OXP-43.72: pricing qualifies the lookup or scrape, rather than changing its owner. */
|
|
3561
|
-
function linkedinUrlFindingRecommendation(query) {
|
|
3562
|
-
if (!/\blinkedin\b/.test(query) || !/\b(urls?|links?)\b/.test(query)
|
|
3563
|
-
|| !/\b(find|finding|lookup|look up|resolve|missing)\b/.test(query)
|
|
3564
|
-
|| /\b(scrape\w*|posts?|comments?|engagers?|followers?|connect|inbox|send\w*|publish\w*)\b/.test(query)
|
|
3565
|
-
|| /\bcompany pages?\b/.test(query))
|
|
3566
|
-
return null;
|
|
3567
|
-
return {
|
|
3568
|
-
tools: ["oxygen_tools_search", "oxygen_columns_add", "oxygen_enrich_column_preview"],
|
|
3569
|
-
commands: ["tools search", "columns add", "enrich-column preview"],
|
|
3570
|
-
exactCommand: "oxygen tools search find_linkedin_url --json",
|
|
3571
|
-
exactMcpCall: { tool: "oxygen_tools_search", arguments: { query: "find_linkedin_url" } },
|
|
3572
|
-
execution: "Inspect the native LinkedIn URL waterfall and current pricing with tools search find_linkedin_url. Read oxygen-enrichment and its references/linkedin-url.md. Add the linkedin_url capability to existing rows, then preview the exact row scope for free before an approved run with a credit ceiling. Known-profile scraping is a separate operation.",
|
|
3573
|
-
};
|
|
3574
|
-
}
|
|
3575
|
-
function pageScrapingRecommendation(query) {
|
|
3576
|
-
if (!/\b(scrap(?:e|ing)|crawl\w*|fetch|extract)\b/.test(query)
|
|
3577
|
-
|| !/\b(pages?|websites?|web ?sites?|web content|urls?)\b/.test(query)
|
|
3578
|
-
|| /\b(linkedin|emails?|phones?|crm|records?)\b/.test(query))
|
|
3579
|
-
return null;
|
|
3580
|
-
return {
|
|
3581
|
-
tools: ["oxygen_tools_search", "oxygen_tools_get"],
|
|
3582
|
-
commands: ["tools search", "tools get"],
|
|
3583
|
-
exactCommand: "oxygen tools search firecrawl --json",
|
|
3584
|
-
exactMcpCall: { tool: "oxygen_tools_search", arguments: { query: "firecrawl" } },
|
|
3585
|
-
execution: "Discover public-page operations with tools search firecrawl, then hydrate one exact tool and its pricing. Read oxygen-sourcing and provider-runbooks/firecrawl.md. Preview the selected URLs and price before execution; live scraping requires approval for the exact URL scope and credit ceiling. For durable per-row research, use native Tables research columns. Discovery does not run a scrape.",
|
|
3586
|
-
};
|
|
3587
|
-
}
|
|
3588
|
-
function isCompanyUrlRecoveryIntent(query) {
|
|
3589
|
-
const urlNoun = /\b(websites?|web ?sites?|website urls?|domains?|urls?|homepages?)\b/;
|
|
3590
|
-
const companyNoun = /\b(compan(?:y|ies)|accounts?|organi[sz]ations?|brands?|vendors?)\b/;
|
|
3591
|
-
const recover = /\b(recover|resolve|look ?up|lookup|missing|get|find|fill(?: in)?|add)\b/;
|
|
3592
|
-
const fromNames = /\b(names?|list|missing|these|those)\b/;
|
|
3593
|
-
// An email / phone / contact ask that merely MENTIONS domains is enrichment,
|
|
3594
|
-
// and a column / table ask is a Tables ask — both keep their owners.
|
|
3595
|
-
const otherOwner = /\b(e-?mails?|phones?|mobiles?|numbers?|contacts?|people|persons?|columns?|tables?|enrich\w*|verif\w*)\b/;
|
|
3596
|
-
return urlNoun.test(query) && companyNoun.test(query) && recover.test(query) && fromNames.test(query)
|
|
3597
|
-
&& !/\b(scrape|engagers?|comments?|reactions?|posts?)\b/.test(query)
|
|
3598
|
-
&& !otherOwner.test(query);
|
|
3599
|
-
}
|
|
3600
|
-
function isInboxAvatarIntent(query) {
|
|
3601
|
-
return /\b(avatar|profile (?:picture|photo)|headshot|hosted (?:picture|image)|mailbox (?:picture|photo))\b/.test(query);
|
|
3602
|
-
}
|
|
3603
|
-
/**
|
|
3604
|
-
* Changing a Sequence that exists: its copy rendered, a copy of it, its A/B
|
|
3605
|
-
* decisions, or its senders, caps, steps and settings. The 2026-10-10 parity
|
|
3606
|
-
* audit searched "change the sender of my sequence" and "remove the daily send
|
|
3607
|
-
* cap" and got create/enroll/start/list, never oxygen_sequences_update, which
|
|
3608
|
-
* reads as "the API cannot modify the sender".
|
|
3609
|
-
*/
|
|
3610
|
-
function sequenceEditRecommendation(query) {
|
|
3611
|
-
if (/\b(launch|go live)\b/.test(query))
|
|
3612
|
-
return null;
|
|
3613
|
-
if (/\b(render|preview|see|show|look)\b/.test(query) && /\b(copy|emails?|messages?|variants?|subjects?|body|bodies|notes?)\b/.test(query)) {
|
|
3614
|
-
return {
|
|
3615
|
-
tools: ["oxygen_sequences_render", "oxygen_sequences_variants", "oxygen_sequences_get"],
|
|
3616
|
-
commands: ["sequences render", "sequences variants", "sequences get"],
|
|
3617
|
-
};
|
|
3618
|
-
}
|
|
3619
|
-
if (/\b(duplicate|clone)\b/.test(query) || /\bcopy (?:of )?(?:a |the |my |this )?(?:running |live |started |active )?(?:sequence|campaign)\b/.test(query)) {
|
|
3620
|
-
return {
|
|
3621
|
-
tools: ["oxygen_sequences_duplicate", "oxygen_sequences_get", "oxygen_sequences_update"],
|
|
3622
|
-
commands: ["sequences duplicate", "sequences get", "sequences update"],
|
|
3623
|
-
};
|
|
3624
|
-
}
|
|
3625
|
-
if (/\b(variants?|a\/b|ab tests?|split tests?)\b/.test(query) && /\b(pause|activate|reactivate|reset|winner|winning|losing|loser|auto[- ]?optimi[sz]e|pick)\b/.test(query)) {
|
|
3626
|
-
return {
|
|
3627
|
-
tools: ["oxygen_sequences_variants_action", "oxygen_sequences_variants", "oxygen_sequences_update"],
|
|
3628
|
-
commands: ["sequences variants", "sequences update"],
|
|
3629
|
-
};
|
|
3630
|
-
}
|
|
3631
|
-
if (/\b(change|switch|swap|replace|remove|edit|update|set|clear|unset|turn (?:on|off)|raise|lower|increase|decrease|reduce)\b/.test(query)
|
|
3632
|
-
&& /\b(senders?|sending accounts?|accounts?|inbox(?:es)?|mailbox(?:es)?|caps?|limits?|daily|steps?|copy|variants?|delays?|waits?|settings?|tracking)\b/.test(query)) {
|
|
3633
|
-
return {
|
|
3634
|
-
tools: ["oxygen_sequences_update", "oxygen_sequences_get", "oxygen_senders_list"],
|
|
3635
|
-
commands: ["sequences update", "sequences get", "senders list"],
|
|
3636
|
-
};
|
|
3637
|
-
}
|
|
3638
|
-
return null;
|
|
3639
|
-
}
|
|
3640
|
-
function isSenderProfileIntent(query) {
|
|
3641
|
-
return /\b(?:sender|sending|unified)\s+(?:profiles?|identit(?:y|ies))\b/.test(query)
|
|
3642
|
-
|| (/\bprofiles?\b.{0,64}\b(?:linkedin|whatsapp|mailboxes?|inboxes?|email)\b/.test(query)
|
|
3643
|
-
&& /\b(?:sender|sending|unif(?:y|ied))\b/.test(query));
|
|
3644
|
-
}
|
|
3645
|
-
/**
|
|
3646
|
-
* Naming whoever sends a step inside its copy ({{sender_first_name}}, a sign-off
|
|
3647
|
-
* with the sender's name) is Sequence step copy. A 2026-09-29 blind user asked
|
|
3648
|
-
* "preview rendered message per sender sign-off variable" and was routed to
|
|
3649
|
-
* comments and approvals, and "sign every email with …" reads as a one-off
|
|
3650
|
-
* Message. A bare "sender name" stays out: renaming an inbox's From is not copy.
|
|
3651
|
-
*/
|
|
3652
|
-
function isSenderCopyVariableIntent(query) {
|
|
3653
|
-
return /\bsender (?:first|last|full) name\b/.test(query)
|
|
3654
|
-
|| /\bsign off (?:variable|with|per sender)\b|\bper sender sign off\b/.test(query)
|
|
3655
|
-
|| /\bsign (?:every|each|all) (?:emails?|messages?|dms?|notes?) with\b/.test(query);
|
|
3656
|
-
}
|
|
3657
|
-
/** Retired sending-seat questions need a stored read before any financial maintenance. */
|
|
3658
|
-
function isSeatTransitionReadIntent(query) {
|
|
3659
|
-
return /\b(sending seats?|seat subscriptions?|retired seats?|held seats?)\b/.test(query)
|
|
3660
|
-
&& !/\b(buy|purchase|set|increase|decrease|lower|reduce|cancel|connect|disconnect)\b/.test(query);
|
|
3661
|
-
}
|
|
3662
|
-
/** OXP-43.36: inspect recurring account prices before creating authorization. */
|
|
3663
|
-
function isConnectionPriceIntent(query) {
|
|
3664
|
-
if (!/\b(costs?|prices?|credits?|reser(?:ve[sd]?|vations?)|charges?|charged|fees?|pay|quote)\b/.test(query))
|
|
3665
|
-
return false;
|
|
3666
|
-
if (/\b(per (?:message|send|action|call)|scrap\w*|research|enrich\w*|public (?:profiles?|posts?))\b/.test(query))
|
|
3667
|
-
return false;
|
|
3668
|
-
// A whole mailbox onboarding motion can mention price alongside importing
|
|
3669
|
-
// history and syncing CRM. Keep that owner unless the ask isolates a quote.
|
|
3670
|
-
if (/\b(import|sync)\b/.test(query) && /\b(history|crm|unibox)\b/.test(query)
|
|
3671
|
-
&& !/\b(monthly|recurring|quote|before (?:consent|connect|authorization))\b/.test(query))
|
|
3672
|
-
return false;
|
|
3673
|
-
// Lookup, purchase and sending prices keep their own previews. Naming a
|
|
3674
|
-
// mailbox or a phone number alone does not make it an account connection.
|
|
3675
|
-
if (/\b(?:find|look ?up|lookup)\b/.test(query) && /\bphones?\b/.test(query))
|
|
3676
|
-
return false;
|
|
3677
|
-
if (/\b(?:warm ?up|deliverability|placement)\b/.test(query))
|
|
3678
|
-
return false;
|
|
3679
|
-
if (/\bmailbox(?:es)?\b/.test(query) && /\b(?:buy|purchase|order)\b/.test(query))
|
|
3680
|
-
return false;
|
|
3681
|
-
if (/\blinkedin\b/.test(query) && /\b(?:messages?|invites?|invitations?|connection requests?)\b/.test(query))
|
|
3682
|
-
return false;
|
|
3683
|
-
const accountContext = /\b(accounts?|connect(?:ing|ed|ion)?|reconnect|oauth|consent)\b/.test(query);
|
|
3684
|
-
return /\b(connected accounts?|account connections?|connection prices?)\b/.test(query)
|
|
3685
|
-
|| (/\b(linkedin|whatsapp|twitter|x)\b/.test(query)
|
|
3686
|
-
&& (accountContext || /\b(numbers?|seats?)\b/.test(query)))
|
|
3687
|
-
|| (/\bmailbox(?:es)?\b/.test(query) && accountContext);
|
|
3688
|
-
}
|
|
3689
|
-
/**
|
|
3690
|
-
* Connecting, or asking what it takes to connect, the workspace's own LinkedIn
|
|
3691
|
-
* sending account. The 2026-09-26 repricing baseline asked "connect a LinkedIn
|
|
3692
|
-
* account" and was sent to Tables, and "LinkedIn on a free workspace" to
|
|
3693
|
-
* workspace access; neither named `senders connect`, the one command that does
|
|
3694
|
-
* it. Sending, network, profile and post asks keep their own owners.
|
|
3695
|
-
*/
|
|
3696
|
-
function isLinkedInAccountConnectIntent(query) {
|
|
3697
|
-
// Exact native command discovery has no LinkedIn noun to score.
|
|
3698
|
-
if (/^(?:oxygen )?senders connect$/.test(query))
|
|
3699
|
-
return true;
|
|
3700
|
-
if (!/\b(linkedin|unipile)\b/.test(query))
|
|
3701
|
-
return false;
|
|
3702
|
-
if (/^(linkedin|unipile)( accounts?)?$/.test(query))
|
|
3703
|
-
return true;
|
|
3704
|
-
const authenticationUrl = /\b(?:authentication|authorization|oauth|auth)\b/.test(query)
|
|
3705
|
-
&& /\b(?:url|link)\b/.test(query)
|
|
3706
|
-
&& /\b(?:connect|reconnect|account|sender)\b/.test(query);
|
|
3707
|
-
if (/\burl\b/.test(query) && !authenticationUrl)
|
|
3708
|
-
return false;
|
|
3709
|
-
if (/\b(send|sending|enroll|sequence|campaign|cadence|messages?|dms?|invites?|invitations?|posts?|profiles?|network|connections|followers|viewers|limits|hours|ads?|scrape|research|company|companies|pac(?:e|ing)|spacing|spaced|spread|apart|throttl\w*)\b/.test(query))
|
|
3710
|
-
return false;
|
|
3711
|
-
return /\b(connect|reconnect|link|add|accounts?|senders?|seats?|free|plan)\b/.test(query);
|
|
3712
|
-
}
|
|
3713
|
-
/**
|
|
3714
|
-
* The connected account's hours, caps or pacing (`senders limits`). The
|
|
3715
|
-
* 2026-10-02 pacing acceptance asked "linkedin sender pacing connection requests
|
|
3716
|
-
* spread over day" and was sent to `senders connect` by the word "sender".
|
|
3717
|
-
*/
|
|
3718
|
-
function isLinkedInAccountLimitsIntent(query) {
|
|
3719
|
-
return /\b(working hours|sending hours|business hours|office hours|weekdays?|time ?zone|linkedin limits|daily limits?|pac(?:e|ing)|spacing|spaced|spread|apart|throttl\w*)\b/.test(query);
|
|
3720
|
-
}
|
|
3721
|
-
function isMutualLinkedInConnectionsIntent(query) {
|
|
3722
|
-
const linkedInContext = /\blinkedin\b|\bprofiles?\b/.test(query);
|
|
3723
|
-
const mutualContext = /\b(mutual|shared|in common)\b.{0,48}\b(connections?|relations?)\b/.test(query)
|
|
3724
|
-
|| /\b(connections?|relations?)\b.{0,48}\b(mutual|shared|in common)\b/.test(query);
|
|
3725
|
-
return linkedInContext && mutualContext;
|
|
3726
|
-
}
|
|
3727
|
-
function isWarmupEnrollmentIntent(query) {
|
|
3728
|
-
return /\b(warmup|warm-up|warm up)\b/.test(query)
|
|
3729
|
-
&& /\b(enroll\w*|enable|quote|price|cost)\b/.test(query);
|
|
3730
|
-
}
|
|
3731
|
-
function isMailboxOnboardingIntent(query) {
|
|
3732
|
-
const operation = /\b(import|migrat\w*|onboard|register|upload|bring|connect existing|add existing)\b/.test(query);
|
|
3733
|
-
const mailboxScope = /\b(mailbox(?:es)?|inbox(?:es)?|sender accounts?|email accounts?|sending pool)\b/.test(query);
|
|
3734
|
-
return operation && mailboxScope;
|
|
3735
|
-
}
|
|
3736
|
-
function isMailboxDeleteIntent(query) {
|
|
3737
|
-
const mailboxScope = /\b(mailbox(?:es)?|inbox(?:es)?|sender accounts?|email accounts?)\b/.test(query);
|
|
3738
|
-
const removal = /\b(delete|remove)\b/.test(query)
|
|
3739
|
-
|| /\bdisconnect\b.{0,24}\b(mailbox(?:es)?|inbox(?:es)?|sender accounts?|email accounts?)\b/.test(query);
|
|
3740
|
-
const scopedDetach = /\b(remove|disconnect)\b.{0,48}\b(mailbox(?:es)?|inbox(?:es)?|sender accounts?|email accounts?)\b.{0,24}\b(?:from|in|on)\b.{0,24}\b(sequence|campaign|cadence|sender profile)\b/.test(query);
|
|
3741
|
-
return mailboxScope && removal && !scopedDetach;
|
|
3742
|
-
}
|
|
3743
|
-
/**
|
|
3744
|
-
* Deleting the workspace's own SENDING domains ("delete my domains", "remove the
|
|
3745
|
-
* inboxes and their domains", "shut down our cold email domains"). `domains` is
|
|
3746
|
-
* also a data word, so the ask must mark the domains as the workspace's own or
|
|
3747
|
-
* as sending infrastructure, and a table/list/suppression context is excluded.
|
|
3748
|
-
*/
|
|
3749
|
-
function isDomainDnsIntent(query) {
|
|
3750
|
-
return /\b(dns|spf|dkim|dmarc)\b/.test(query)
|
|
3751
|
-
&& !/\b(tables?|columns?|rows?|crm|contacts?|leads?)\b/.test(query);
|
|
3752
|
-
}
|
|
3753
|
-
function isSendingDomainDeleteIntent(query) {
|
|
3754
|
-
if (!/\b(delete|remove|shut ?down|tear down|get rid of|decommission)\b/.test(query))
|
|
3755
|
-
return false;
|
|
3756
|
-
if (/\b(suppress\w*|block ?list|blocklist|do not contact|dnc|tables?|rows?|columns?|duplicates?|dedupe|list of|compan(?:y|ies)|leads?|contacts?)\b/.test(query))
|
|
3757
|
-
return false;
|
|
3758
|
-
// Detaching a sender from a sequence/campaign/profile is not deletion.
|
|
3759
|
-
if (/\b(?:from|in|on)\b.{0,24}\b(sequence|campaign|cadence|sender profile)\b/.test(query))
|
|
3760
|
-
return false;
|
|
3761
|
-
return /\b(my|our|their|these|those|all|sending|cold email|cold outreach|outbound|email|mailbox|inbox|managed)\s+(sending\s+)?domains?\b/.test(query)
|
|
3762
|
-
|| (/\bdomains?\b/.test(query) && /\b(mailbox(?:es)?|inbox(?:es)?)\b/.test(query));
|
|
3763
|
-
}
|
|
3764
|
-
// The composed inbound-led outbound motion: engagers → ICP gate → capped
|
|
3765
|
-
// sequence → CRM. Hyphens are already normalised to spaces by the caller.
|
|
3766
|
-
function isInboundLedOutboundIntent(query) {
|
|
3767
|
-
return /\binbound led outbound\b/.test(query)
|
|
3768
|
-
|| /\bengagers?\b.{0,40}\b(into|to) (a |my )?(sequence|pipeline)\b/.test(query)
|
|
3769
|
-
|| /\bwarm outbound\b.{0,40}\b(posts?|engagement)\b/.test(query)
|
|
3770
|
-
|| /\b(whole|end to end|complete) (gtm )?motion\b/.test(query);
|
|
3771
|
-
}
|
|
3772
|
-
function isNetNewLinkedInInitiation(query) {
|
|
3773
|
-
const mentionsLinkedIn = /\blinkedin\b|\bdm\b/.test(query);
|
|
3774
|
-
const startsConversation = /\b(send|message|dm|contact|reach out|initiate|start)\b/.test(query)
|
|
3775
|
-
|| /\bnew\b.{0,40}\bconversation\b/.test(query);
|
|
3776
|
-
if (!mentionsLinkedIn || !startsConversation)
|
|
3777
|
-
return false;
|
|
3778
|
-
// "Conversation" can describe either side of the boundary. New/start is an
|
|
3779
|
-
// initiation; reply/existing/thread/inbox is continuation state in Messages.
|
|
3780
|
-
if (/\b(reply|respond|existing|thread|inbox)\b/.test(query))
|
|
3781
|
-
return false;
|
|
3782
|
-
return !/\b(sequence|campaign|cadence|enroll|nurture|multi[ -]step|multi[ -]recipient|leads|contacts|recipients|audience|rotate senders?|stop on reply|day\s*\d+)\b/.test(query);
|
|
3783
|
-
}
|
|
3784
|
-
/** Recommendations point to the mounted native owners, without conferring their write authority. */
|
|
3785
|
-
function collaborationRecommendation(query) {
|
|
3786
|
-
const memberRead = { tools: ["oxygen_workspace_members_list"], commands: ["approvals client list"],
|
|
3787
|
-
execution: "Read workspace member roles, Clerk profiles and pending invitations. This does not invite anyone or change access. Free.", posture: "read_only" };
|
|
3788
|
-
const member = /\b(members?|memberships?)\b/.test(query);
|
|
3789
|
-
const workspace = /\b(workspace|organization|org)\b/.test(query);
|
|
3790
|
-
const clientRole = /\bclient (?:role|access|login)\b/.test(query);
|
|
3791
|
-
const roleWrite = /\b(set|change|grant|clear|remove|revoke|restrict|promote|demote)\b/.test(query);
|
|
3792
|
-
if (clientRole && roleWrite && !/\b(crm|records?|contacts?|companies|api|oauth)\b/.test(query)) {
|
|
3793
|
-
const clear = /\b(clear|remove|revoke)\b/.test(query);
|
|
3794
|
-
return { tools: ["oxygen_members_client_role_set", ...memberRead.tools], commands: [clear ? "approvals client revoke" : "approvals client grant", ...memberRead.commands],
|
|
3795
|
-
execution: "An admin can set or clear the restricted client overlay; a pending invite is checked in Clerk. This sends no invitation and does not change the Clerk workspace role. Free.", posture: "workspace_write" };
|
|
3796
|
-
}
|
|
3797
|
-
if (workspace && member && roleWrite && /\b(roles?|admin|administrator)\b/.test(query))
|
|
3798
|
-
return {
|
|
3799
|
-
tools: ["oxygen_members_workspace_role_set", ...memberRead.tools], commands: ["orgs member-role", ...memberRead.commands],
|
|
3800
|
-
execution: "An admin changes a member's workspace role in Clerk before Oxygen mirrors it. Self-role changes and the last administrator are protected; the client overlay is separate. Free.", posture: "workspace_write",
|
|
3801
|
-
};
|
|
3802
|
-
if (((workspace && member) || clientRole || /\bwho is in (?:my|our|this|the) workspace\b/.test(query))
|
|
3803
|
-
&& !/\b(invite|add|delete|cancel|enable|disable|set|change|grant|clear|remove|revoke|restrict|promote|demote)\b/.test(query))
|
|
3804
|
-
return memberRead;
|
|
3805
|
-
if (/\b(?:approval|launch|sign ?off) gates?\b/.test(query)) {
|
|
3806
|
-
const write = /\b(arm|set|enable|disable|require|change|turn)\b/.test(query);
|
|
3807
|
-
return { tools: write ? ["oxygen_approvals_gate_set", "oxygen_approval_gates_list"] : ["oxygen_approval_gates_list", "oxygen_approvals_gate_set"],
|
|
3808
|
-
commands: write ? ["approvals gate set", "approvals gate list"] : ["approvals gate list", "approvals gate set"],
|
|
3809
|
-
execution: write ? "An admin configures the approval gate; this grants no approval. Launch gates a sequence; signoff gates a table. The owning primitive enforces it. Free."
|
|
3810
|
-
: "Read configured approval gates and effective state for an exact subject. Reading a gate grants no approval. Free.", posture: write ? "workspace_write" : "read_only" };
|
|
3811
|
-
}
|
|
3812
|
-
if (/\bcomments?\b/.test(query) && /\b(internal|workspace|teammate|client)\b/.test(query)
|
|
3813
|
-
&& !/\b(linkedin|public|published|posts?|publishing)\b/.test(query)) {
|
|
3814
|
-
if (/\b(edit|update|correct)\b/.test(query))
|
|
3815
|
-
return { tools: ["oxygen_comments_edit", "oxygen_comments_list"], commands: ["comments edit", "comments list"],
|
|
3816
|
-
execution: "Edit your own internal workspace comment by comment id; the author check and edit time are enforced by its native owner. Free.", posture: "workspace_write" };
|
|
3817
|
-
if (/\b(delete|retract|remove)\b/.test(query))
|
|
3818
|
-
return { tools: ["oxygen_comments_delete", "oxygen_comments_list"], commands: ["comments delete", "comments list"],
|
|
3819
|
-
execution: "Retract your own internal comment by comment id. Its audit placeholder remains; this does not delete a public post comment. Free.", posture: "workspace_write" };
|
|
3820
|
-
}
|
|
3821
|
-
if (/\b(cancel|withdraw|retract)\b/.test(query) && /\b(?:approval|sign ?off) requests?\b/.test(query))
|
|
3822
|
-
return {
|
|
3823
|
-
tools: ["oxygen_approvals_cancel", "oxygen_approvals_list"], commands: ["approvals cancel", "approvals list"],
|
|
3824
|
-
execution: "Withdraw an approval request you created, by request id; this grants no approval. The requester check remains enforced by the native owner. Free.", posture: "workspace_write",
|
|
3825
|
-
};
|
|
3826
|
-
return null;
|
|
3827
|
-
}
|
|
3828
|
-
function isSecondPartyDecisionIntent(query) {
|
|
3829
|
-
const decisionLanguage = /\b(sign ?off|signoff|approval request|request approval|approval gate|go no go)\b/.test(query);
|
|
3830
|
-
const clientDecision = /\bclient\b.{0,20}\b(approv\w*|sign ?off|review|decide|decision|login|role)\b/.test(query)
|
|
3831
|
-
|| /\b(approv\w*|sign ?off|decision)\b.{0,20}\bfrom the client\b/.test(query);
|
|
3832
|
-
const teammateDecision = /\b(teammate|colleague|workspace member)\b.{0,25}\b(approv\w*|sign ?off|review|decid\w*)\b/.test(query);
|
|
3833
|
-
const internalThread = /\b(comment|comments|thread)\b/.test(query)
|
|
3834
|
-
&& /\b(internal|client|teammate|workspace member|discuss)\b/.test(query)
|
|
3835
|
-
&& !/\b(linkedin|public|published|post|posts|publishing)\b/.test(query);
|
|
3836
|
-
return decisionLanguage || clientDecision || teammateDecision || internalThread;
|
|
3837
|
-
}
|
|
3838
|
-
/** An X (Twitter) post format: thread, poll, alt text, who-can-reply, quote, photo tags. */
|
|
3839
|
-
function isXPostFormatIntent(query) {
|
|
3840
|
-
return /\b(x|twitter|tweets?)\b/.test(query)
|
|
3841
|
-
&& /\b(thread|poll|alt text|image descriptions?|reply settings?|who can reply|quote|photo tags?|tag (?:people|someone|accounts?) in)\b/.test(query);
|
|
3842
|
-
}
|
|
3843
|
-
/** A post's video cover (thumbnail) or a preview of a post being authored. Competitor ad creative stays with Ads. */
|
|
3844
|
-
function isFailedPostIntent(query) {
|
|
3845
|
-
if (/\b(ads?|competitors?|runs?|workflows?|sequences?|tables?|comments?)\b/.test(query))
|
|
3846
|
-
return false;
|
|
3847
|
-
return /\b(posts?|tweets?)\b/.test(query)
|
|
3848
|
-
&& /\b(fail(s|ed|ing|ure)?|stuck|locked|uncertain|refused|rejected|retry|reschedul\w*)\b/.test(query);
|
|
3849
|
-
}
|
|
3850
|
-
function isPostCoverOrPreviewIntent(query) {
|
|
3851
|
-
if (/\b(ads?|competitors?)\b/.test(query))
|
|
3852
|
-
return false;
|
|
3853
|
-
// A draft in an existing inbox conversation is a reply, not a post artifact.
|
|
3854
|
-
if (/\b(inbox|unibox|conversation)\b/.test(query) && !/\bposts?\b/.test(query))
|
|
3855
|
-
return false;
|
|
3856
|
-
return (/\b(cover|thumbnail)\b/.test(query) && /\b(post|video|draft)\b/.test(query))
|
|
3857
|
-
|| /\bpreview\b.{0,40}\b(post|draft)\b/.test(query);
|
|
3858
|
-
}
|
|
3859
|
-
function isOwnedPostCommentIntent(query) {
|
|
3860
|
-
// Community is the stored public-comment queue, including its coverage and
|
|
3861
|
-
// refresh state. Do not send this first-touch intent to paid public research.
|
|
3862
|
-
if (/\bcommunity\b/.test(query) && /\b(comments?|sync|coverage|freshness|queue|unanswered|replies)\b/.test(query))
|
|
3863
|
-
return true;
|
|
3864
|
-
if (!/\bcomments?\b/.test(query) || !/\b(linkedin|posts?|publishing)\b/.test(query))
|
|
3865
|
-
return false;
|
|
3866
|
-
const owned = /\b(my|our|own|owned)\b|\boxygen[ -]published\b|\bpublished through oxygen\b/.test(query);
|
|
3867
|
-
const operatorWork = /\b(needs?|needing|awaiting)\b.{0,20}\b(response|reply|answer)\b/.test(query)
|
|
3868
|
-
|| /\b(reply|respond|answer|triage|queue|unanswered|unreplied)\b/.test(query);
|
|
3869
|
-
return owned || operatorWork;
|
|
3870
|
-
}
|
|
3871
|
-
function isHostedWorkflowIntent(query) {
|
|
3872
|
-
const strongWorkflowLanguage = /\b(workflow|automation|automate|automatically|webhook|cron|event trigger|branching?|retr(?:y|ies)|orchestrat(?:e|ion)|scheduled job|deterministic graph)\b/.test(query)
|
|
3873
|
-
|| isRecurringCompanyMonitoringIntent(query);
|
|
3874
|
-
const cadenceLanguage = /\b(sequence|campaign|cadence|day\s*\d+|multi[ -]step|rotate senders?|sender rotation|stop on reply|until (?:they )?reply)\b/.test(query);
|
|
3875
|
-
const workflowMechanics = /\b(webhook|cron|event trigger|triggered by|branching?|retr(?:y|ies)|orchestrat(?:e|ion)|scheduled job|deterministic graph|automatically)\b/.test(query)
|
|
3876
|
-
|| /\bwhen\b.{0,50}\b(signs? up|created|updated|changes?|happens?|received)\b/.test(query);
|
|
3877
|
-
if (cadenceLanguage && !workflowMechanics)
|
|
3878
|
-
return false;
|
|
3879
|
-
if (strongWorkflowLanguage)
|
|
3880
|
-
return true;
|
|
3881
|
-
if (cadenceLanguage)
|
|
3882
|
-
return false;
|
|
3883
|
-
return /\b(nightly|hourly|daily|weekly|every (?:monday|tuesday|wednesday|thursday|friday|saturday|sunday|day|night|week|month))\b/.test(query)
|
|
3884
|
-
|| (/\bschedule(?:d)?\b/.test(query) && !/\bpost|content\b/.test(query));
|
|
3885
|
-
}
|
|
3886
|
-
/**
|
|
3887
|
-
* Watching items that change and working out what each one needs is an Agent's
|
|
3888
|
-
* judgment, not a Workflow's fixed rule: "keep an eye on open deals and suggest
|
|
3889
|
-
* what to do next for each" routed to Records reads, and the Oxygent proposed a
|
|
3890
|
-
* routine without saying why (System 1 routing case, 2026-10-22).
|
|
3891
|
-
*/
|
|
3892
|
-
function isAdaptiveWatchIntent(query) {
|
|
3893
|
-
if (/\b(workflows?|webhooks?|cron|deterministic|fixed rule|sequences?|campaigns?|posts?|mailbox\w*|deliverability|bounce\w*)\b/.test(query))
|
|
3894
|
-
return false;
|
|
3895
|
-
return /\b(keeps? an eye on|keeps? tabs on|keeps? track of|watch(?:es|ing)?|monitor(?:s|ing)?|look(?:s|ing)? after)\b/.test(query)
|
|
3896
|
-
&& /\b(suggest\w*|decid\w*|works? out|figures? out|recommend\w*|judg\w*|what to do|next steps?|next moves?)\b/.test(query)
|
|
3897
|
-
&& /\b(each|every|individual\w*|differently|deals?|pipeline|opportunit(?:y|ies)|accounts?)\b/.test(query);
|
|
3898
|
-
}
|
|
3899
|
-
const ADAPTIVE_WATCH_EXECUTION = "Watching items that change and deciding what fits each one is an Agent's job: each run looks at every item and works out what it needs, while a Workflow repeats one fixed rule. Tell the person that in one plain line. Set it up as an ongoing Agent session with per-run and rolling 24-hour credit caps; in an Oxygent chat, propose a routine and put that line in its why. Read the items first so the goal names real fields (for deals: stage, amount, last activity). Size the caps to one check, about 10 credits a run for reading a few dozen records and writing suggestions, and say so when that is above a limit the person gave. Suggestions stay inside OXYGEN (a task or a note); contacting anyone needs its own approval.";
|
|
3900
|
-
function isRecurringCompanyMonitoringIntent(query) {
|
|
3901
|
-
return /\b(companies|company|competitors?)\b/.test(query)
|
|
3902
|
-
&& /\b(monitor(?:ing)?|watch(?:ing|list)?|track(?:ing)?)\b/.test(query)
|
|
3903
|
-
&& /\b(recurring|periodic|repeat(?:ed|able)?|over time|new observations?)\b/.test(query);
|
|
3904
|
-
}
|
|
3905
|
-
function isPublicLinkedInRead(query) {
|
|
3906
|
-
if (!query.includes("linkedin"))
|
|
3907
|
-
return false;
|
|
3908
|
-
const disclaimsConnectedAccount = /\b(without|no|not using|does not require)\b.{0,24}\bconnected(?: linkedin)? account\b/.test(query);
|
|
3909
|
-
const connectedOwnership = !disclaimsConnectedAccount
|
|
3910
|
-
&& /\b(my|our|own|owned|connected|connections|followers|inbox|messages|recruiter|sales\s*navigator|salesnav|unipile|viewers?)\b/.test(query);
|
|
3911
|
-
if (connectedOwnership)
|
|
3912
|
-
return false;
|
|
3913
|
-
return /\b(comments?|companies|company|competitor|cookieless|engagers?|harvest|posts?|profiles?|public|reactions?|reactors?|scrape|scraper|search|third[ -]party)\b/.test(query);
|
|
3914
|
-
}
|
|
3915
|
-
function isPublicLinkedInEngagerHarvest(query) {
|
|
3916
|
-
return /\bpost\b/.test(query)
|
|
3917
|
-
&& /\b(engagers?|engaged|react(?:ors?|ing|ed|ions?)|commenters?|harvest)\b/.test(query);
|
|
3918
|
-
}
|
|
3919
|
-
function isDeferredLinkedInOutreach(query) {
|
|
3920
|
-
if (!isNetNewLinkedInInitiation(query))
|
|
3921
|
-
return false;
|
|
3922
|
-
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)
|
|
3923
|
-
|| /\bwithout\b.{0,30}\b(?:running|sending|contacting|messaging)\b.{0,20}\b(?:now|today)\b/.test(query)
|
|
3924
|
-
|| /\b(?:do not|don t|not)\b.{0,20}\b(?:run|send|contact|message)\b.{0,20}\b(?:now|today)\b/.test(query);
|
|
3925
|
-
}
|
|
3926
|
-
function isLinkedInEngagerMotion(query) {
|
|
3927
|
-
return isPublicLinkedInEngagerHarvest(query)
|
|
3928
|
-
&& /\b(competitor|daily|repeatable|monitor|motion|qualif(?:y|ied)|workflow|later|eventually)\b/.test(query);
|
|
3929
|
-
}
|