@oxygen-agent/cli 1.1014.1997 → 1.1014.2100
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/cli-output.js +12 -0
- package/dist/column-decision-options.js +1 -1
- package/dist/command-families/tables/bundle-format.d.ts +1 -1
- package/dist/command-families/tables/bundle-format.js +1 -1
- package/dist/command-families/tables/import-columns.js +1 -1
- package/dist/command-families/tables/import-upload.d.ts +1 -1
- package/dist/command-families/tables/import-values.js +1 -1
- package/dist/command-families/tables/imports.d.ts +1 -1
- package/dist/command-families/tables/imports.js +1 -1
- package/dist/command-families/tables/options.d.ts +1 -0
- package/dist/command-families/tables/register-automation.js +3 -1
- package/dist/command-families/tables/register-relations.js +1 -1
- package/dist/command-families/tables/row-selection.js +1 -1
- package/dist/command-support.d.ts +7 -0
- package/dist/command-support.js +25 -0
- package/dist/commands/billing.js +2 -2
- package/dist/commands/columns.js +1 -1
- package/dist/commands/enrich-column.js +1 -1
- package/dist/commands/mailboxes.js +1 -1
- package/dist/commands/observability.js +4 -4
- package/dist/commands/table-runs.js +11 -1
- package/dist/commands/tags.js +2 -2
- package/dist/commands/workflows.js +31 -10
- package/dist/deliverability-evidence-commands.js +1 -1
- package/dist/http-client.d.ts +1 -1
- package/dist/http-client.js +1 -1
- package/dist/streamed-file-import.d.ts +1 -1
- package/dist/streamed-file-import.js +1 -1
- package/node_modules/@oxygen/formula/dist/cross-row-function.d.ts +13 -0
- package/node_modules/@oxygen/formula/dist/cross-row-function.js +1 -0
- package/node_modules/@oxygen/formula/dist/{refactor-internals → cross-row-functions}/novelty-score.d.ts +2 -0
- package/node_modules/@oxygen/formula/dist/{refactor-internals → cross-row-functions}/novelty-score.js +1 -0
- package/node_modules/@oxygen/formula/dist/cross-row-functions.generated.d.ts +3 -0
- package/node_modules/@oxygen/formula/dist/cross-row-functions.generated.js +3 -0
- package/node_modules/@oxygen/formula/dist/evaluate.d.ts +12 -1
- package/node_modules/@oxygen/formula/dist/evaluate.js +28 -3
- package/node_modules/@oxygen/recipe-sdk/dist/index.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/agent-sessions.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/agent-sessions.js +1 -1
- package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/capability-discovery.js +2 -2
- package/node_modules/@oxygen/shared/dist/cell-format.js +2 -2
- package/node_modules/@oxygen/shared/dist/collab.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/geo.js +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/guided-activation.js +1 -1
- package/node_modules/@oxygen/shared/dist/copilot-access.js +1 -1
- package/node_modules/@oxygen/shared/dist/dnc-identities.js +1 -1
- package/node_modules/@oxygen/shared/dist/error-redaction.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/error-redaction.js +2 -2
- package/node_modules/@oxygen/shared/dist/esp-contract.d.ts +133 -0
- package/node_modules/@oxygen/shared/dist/esp-contract.js +121 -0
- package/node_modules/@oxygen/shared/dist/freemail-domains.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/freemail-domains.js +1 -1
- package/node_modules/@oxygen/shared/dist/{geo.js → geo/geo.js} +2 -2
- package/node_modules/@oxygen/shared/dist/index.d.ts +17 -16
- package/node_modules/@oxygen/shared/dist/index.js +18 -16
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.js +1 -1
- package/node_modules/@oxygen/shared/dist/langfuse.d.ts +5 -1
- package/node_modules/@oxygen/shared/dist/langfuse.js +25 -3
- package/node_modules/@oxygen/shared/dist/linkedin-connection-identity.js +1 -1
- package/node_modules/@oxygen/shared/dist/{email-deliverability-policy.d.ts → mailboxes/email-deliverability-policy.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{emailguard-placement-probe.js → mailboxes/emailguard-placement-probe.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{sending-domain-rollout.js → mailboxes/sending-domain-rollout.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{mailbox-standby-rollout.d.ts → mailboxes/standby-rollout.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{mailbox-standby-rollout.js → mailboxes/standby-rollout.js} +2 -2
- package/node_modules/@oxygen/shared/dist/{warmup-metrics.js → mailboxes/warmup-metrics.js} +1 -1
- package/node_modules/@oxygen/shared/dist/mcp-event-contract.js +1 -1
- package/node_modules/@oxygen/shared/dist/object-storage.js +1 -1
- package/node_modules/@oxygen/shared/dist/{guided-activation.d.ts → onboarding/guided-activation.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{guided-activation.js → onboarding/guided-activation.js} +2 -2
- package/node_modules/@oxygen/shared/dist/{guided-onboarding-company-context.d.ts → onboarding/guided-onboarding-company-context.d.ts} +6 -6
- package/node_modules/@oxygen/shared/dist/{guided-onboarding-company-context.js → onboarding/guided-onboarding-company-context.js} +2 -2
- package/node_modules/@oxygen/shared/dist/{signup-lead-payload.js → onboarding/signup-lead-payload.js} +2 -2
- package/node_modules/@oxygen/shared/dist/{signup-lead-webhook.js → onboarding/signup-lead-webhook.js} +2 -2
- package/node_modules/@oxygen/shared/dist/onboarding-leads.d.ts +4 -0
- package/node_modules/@oxygen/shared/dist/plan-band.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/plan-band.js +1 -1
- package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/plan-limits.js +3 -3
- package/node_modules/@oxygen/shared/dist/{social-post-metrics-core.d.ts → posts/metrics-core.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{social-post-metrics-linkedin.d.ts → posts/metrics-linkedin.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{social-post-metrics-linkedin.js → posts/metrics-linkedin.js} +2 -2
- package/node_modules/@oxygen/shared/dist/{social-post-metrics-series.d.ts → posts/metrics-series.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{social-post-metrics-series.js → posts/metrics-series.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{social-post-metrics-x.d.ts → posts/metrics-x.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{social-post-metrics-x.js → posts/metrics-x.js} +2 -2
- package/node_modules/@oxygen/shared/dist/{social-post-metrics.d.ts → posts/metrics.d.ts} +3 -3
- package/node_modules/@oxygen/shared/dist/{social-post-metrics.js → posts/metrics.js} +3 -3
- package/node_modules/@oxygen/shared/dist/recipient-provider.d.ts +2 -10
- package/node_modules/@oxygen/shared/dist/recipient-provider.js +1 -9
- package/node_modules/@oxygen/shared/dist/redis-endpoint-map.d.ts +10 -0
- package/node_modules/@oxygen/shared/dist/redis-endpoint-map.js +63 -0
- package/node_modules/@oxygen/shared/dist/repricing.js +1 -1
- package/node_modules/@oxygen/shared/dist/sending-limits.js +1 -1
- package/node_modules/@oxygen/shared/dist/sequence-internals/esp-policy.d.ts +2 -118
- package/node_modules/@oxygen/shared/dist/sequence-internals/esp-policy.js +2 -107
- package/node_modules/@oxygen/shared/dist/sequences.d.ts +0 -1
- package/node_modules/@oxygen/shared/dist/sequences.js +0 -2
- package/node_modules/@oxygen/shared/dist/{native-chat-discovery.d.ts → support/native-chat-discovery.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{native-chat-discovery.js → support/native-chat-discovery.js} +1 -1
- package/node_modules/@oxygen/shared/dist/suppression-entries.js +1 -1
- package/node_modules/@oxygen/shared/dist/table-field-types.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/table-field-types.js +2 -2
- package/node_modules/@oxygen/shared/dist/table-run-summary.js +1 -1
- package/node_modules/@oxygen/shared/dist/{table-capacity.d.ts → tables/capacity.d.ts} +2 -2
- package/node_modules/@oxygen/shared/dist/{table-capacity.js → tables/capacity.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{column-decision.js → tables/column-decision.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{column-output-fields.js → tables/column-output-fields.js} +4 -4
- package/node_modules/@oxygen/shared/dist/{enrichment-intents.d.ts → tables/enrichment-intents.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{file-import.js → tables/file-import.js} +2 -2
- package/node_modules/@oxygen/shared/dist/{tags.d.ts → tags/tags.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{tags.js → tags/tags.js} +1 -1
- package/node_modules/@oxygen/shared/dist/teammates.js +1 -1
- package/node_modules/@oxygen/shared/dist/{ugc-amplification-identity.js → ugc/amplification-identity.js} +1 -1
- package/node_modules/@oxygen/shared/dist/version.d.ts +1 -1
- 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/shared/dist/version.js +1 -1
- package/node_modules/@oxygen/shared/dist/workspace-event-catalog.js +1 -1
- package/node_modules/@oxygen/shared/dist/workspace-placement-bulk.d.ts +6 -0
- package/node_modules/@oxygen/shared/dist/workspace-placement-bulk.js +9 -2
- package/node_modules/@oxygen/shared/dist/workspace-placement-schedule.d.ts +44 -0
- package/node_modules/@oxygen/shared/dist/workspace-placement-schedule.js +90 -0
- package/node_modules/@oxygen/shared/dist/workspace-placement-view.d.ts +24 -0
- package/node_modules/@oxygen/shared/dist/workspace-placement-view.js +5 -4
- package/node_modules/@oxygen/shared/dist/workspace-placement.d.ts +4 -0
- package/node_modules/@oxygen/shared/dist/workspace-placement.js +8 -2
- package/node_modules/@oxygen/shared/package.json +0 -60
- package/node_modules/@oxygen/workflows/dist/cron.d.ts +42 -0
- package/node_modules/@oxygen/workflows/dist/cron.js +271 -0
- package/node_modules/@oxygen/workflows/dist/event-dispatch.d.ts +2 -1
- package/node_modules/@oxygen/workflows/dist/graph/condition.d.ts +3 -0
- package/node_modules/@oxygen/workflows/dist/graph/condition.js +19 -0
- package/node_modules/@oxygen/workflows/dist/graph/expression.d.ts +1 -2
- package/node_modules/@oxygen/workflows/dist/graph/expression.js +2 -19
- package/node_modules/@oxygen/workflows/dist/graph/types.d.ts +4 -3
- package/node_modules/@oxygen/workflows/dist/index.d.ts +8 -985
- package/node_modules/@oxygen/workflows/dist/index.js +8 -1221
- package/node_modules/@oxygen/workflows/dist/manifest-builders.d.ts +73 -0
- package/node_modules/@oxygen/workflows/dist/manifest-builders.js +102 -0
- package/node_modules/@oxygen/workflows/dist/manifest-guards.d.ts +16 -0
- package/node_modules/@oxygen/workflows/dist/manifest-guards.js +34 -0
- package/node_modules/@oxygen/workflows/dist/manifest-hash.d.ts +47 -0
- package/node_modules/@oxygen/workflows/dist/manifest-hash.js +102 -0
- package/node_modules/@oxygen/workflows/dist/manifest-lint.d.ts +17 -0
- package/node_modules/@oxygen/workflows/dist/manifest-lint.js +474 -0
- package/node_modules/@oxygen/workflows/dist/manifest-types.d.ts +256 -0
- package/node_modules/@oxygen/workflows/dist/manifest-types.js +9 -0
- package/node_modules/@oxygen/workflows/dist/pure-function.d.ts +17 -0
- package/node_modules/@oxygen/workflows/dist/pure-function.js +130 -0
- package/node_modules/@oxygen/workflows/dist/refactor-internals/condition-comparison.d.ts +1 -17
- package/node_modules/@oxygen/workflows/dist/refactor-internals/condition-comparison.js +1 -93
- package/node_modules/@oxygen/workflows/dist/refactor-internals/condition-pattern.d.ts +16 -0
- package/node_modules/@oxygen/workflows/dist/refactor-internals/condition-pattern.js +92 -0
- package/node_modules/@oxygen/workflows/dist/workflow-schemas.d.ts +545 -0
- package/node_modules/@oxygen/workflows/dist/workflow-schemas.js +135 -0
- package/node_modules/@oxygen/workflows/package.json +4 -0
- package/package.json +1 -1
- /package/node_modules/@oxygen/shared/dist/{geo.d.ts → geo/geo.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-blacklist.d.ts → mailboxes/deliverability-blacklist.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-blacklist.js → mailboxes/deliverability-blacklist.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-checks.d.ts → mailboxes/deliverability-checks.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-checks.js → mailboxes/deliverability-checks.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-evidence.d.ts → mailboxes/deliverability-evidence.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-evidence.js → mailboxes/deliverability-evidence.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-loop.d.ts → mailboxes/deliverability-loop.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-loop.js → mailboxes/deliverability-loop.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-surface.d.ts → mailboxes/deliverability-surface.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{deliverability-surface.js → mailboxes/deliverability-surface.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{domain-authentication.d.ts → mailboxes/domain-authentication.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{domain-authentication.js → mailboxes/domain-authentication.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-deliverability-policy.js → mailboxes/email-deliverability-policy.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-health-status.d.ts → mailboxes/email-health-status.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-health-status.js → mailboxes/email-health-status.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-health-summary.d.ts → mailboxes/email-health-summary.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-health-summary.js → mailboxes/email-health-summary.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{emailguard-placement-probe.d.ts → mailboxes/emailguard-placement-probe.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{microsoft-consent-url.d.ts → mailboxes/microsoft-consent-url.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{microsoft-consent-url.js → mailboxes/microsoft-consent-url.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{placement-copy.d.ts → mailboxes/placement-copy.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{placement-copy.js → mailboxes/placement-copy.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{placement-history.d.ts → mailboxes/placement-history.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{placement-history.js → mailboxes/placement-history.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{placement-report.d.ts → mailboxes/placement-report.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{placement-report.js → mailboxes/placement-report.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{received-authentication.d.ts → mailboxes/received-authentication.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{received-authentication.js → mailboxes/received-authentication.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sending-domain-rollout.d.ts → mailboxes/sending-domain-rollout.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{ses-identity-policy.d.ts → mailboxes/ses-identity-policy.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{ses-identity-policy.js → mailboxes/ses-identity-policy.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{mailbox-standby.d.ts → mailboxes/standby.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{mailbox-standby.js → mailboxes/standby.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{warmup-metrics.d.ts → mailboxes/warmup-metrics.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{attempt-provenance.d.ts → observability/attempt-provenance.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{attempt-provenance.js → observability/attempt-provenance.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{onboarding-first-leads.d.ts → onboarding/first-leads.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{onboarding-first-leads.js → onboarding/first-leads.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{future-signup-events.d.ts → onboarding/future-signup-events.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{future-signup-events.js → onboarding/future-signup-events.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{future-signup-lifecycle-projection.d.ts → onboarding/future-signup-lifecycle-projection.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{future-signup-lifecycle-projection.js → onboarding/future-signup-lifecycle-projection.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{guided-activation.fixture.d.ts → onboarding/guided-activation.fixture.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{guided-activation.fixture.js → onboarding/guided-activation.fixture.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{onboarding-plays.d.ts → onboarding/plays.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{onboarding-plays.js → onboarding/plays.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{onboarding-research.d.ts → onboarding/research.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{onboarding-research.js → onboarding/research.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{signup-lead-deliveries.d.ts → onboarding/signup-lead-deliveries.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{signup-lead-deliveries.js → onboarding/signup-lead-deliveries.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{signup-lead-payload.d.ts → onboarding/signup-lead-payload.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{signup-lead-webhook.d.ts → onboarding/signup-lead-webhook.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-mentions.d.ts → posts/linkedin-mentions.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-mentions.js → posts/linkedin-mentions.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-post-keywords.d.ts → posts/linkedin-post-keywords.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-post-keywords.js → posts/linkedin-post-keywords.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-post-url.d.ts → posts/linkedin-post-url.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-post-url.js → posts/linkedin-post-url.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{social-post-metrics-core.js → posts/metrics-core.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{native-chat.d.ts → support/native-chat.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{native-chat.js → support/native-chat.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{plain-support-events.d.ts → support/plain-support-events.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{plain-support-events.js → support/plain-support-events.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{column-decision.d.ts → tables/column-decision.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{column-output-fields.d.ts → tables/column-output-fields.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{column-types.d.ts → tables/column-types.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{column-types.js → tables/column-types.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{company-enrichment-fields.d.ts → tables/company-enrichment-fields.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{company-enrichment-fields.js → tables/company-enrichment-fields.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{enrichment-intents.js → tables/enrichment-intents.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{file-import.d.ts → tables/file-import.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{import-limits.d.ts → tables/import-limits.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{import-limits.js → tables/import-limits.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{table-limits.d.ts → tables/limits.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{table-limits.js → tables/limits.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-url.d.ts → tables/linkedin-url.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-url.js → tables/linkedin-url.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{select-options.d.ts → tables/select-options.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{select-options.js → tables/select-options.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{ugc-amplification-identity.d.ts → ugc/amplification-identity.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{ugc.d.ts → ugc/ugc.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{ugc.js → ugc/ugc.js} +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { placementScheduleSummary, placementProviderDirections } from "./workspace-placement-schedule.js";
|
|
1
2
|
import { CliHttpError } from "./cli-http-error.js";
|
|
2
3
|
import { placementReceiverLabel } from "./workspace-placement.js";
|
|
3
4
|
export function workspacePlacementView(input, webUrl) {
|
|
@@ -47,10 +48,10 @@ export function workspacePlacementView(input, webUrl) {
|
|
|
47
48
|
else if (out?.state === "read_blocked")
|
|
48
49
|
v.read_blocked++;
|
|
49
50
|
const state = out?.state ?? (input.deliveries?.[p.id]?.status === "sent" ? "awaiting_results" : input.deliveries?.[p.id]?.status ?? "pending");
|
|
50
|
-
return { ...workspacePlacementProbeMeta(p), state, status_label: workspacePlacementStateLabel(state), ...(input.deliveries?.[p.id] ? { delivery: input.deliveries[p.id] } : {}), ...(o ? { observation: p.receiver.network_id ? { ...o, receiver_message_id: "private" } : o } : {}) };
|
|
51
|
+
return { ...workspacePlacementProbeMeta(p), ...(input.deliveries?.[p.id]?.ready_at ? { scheduled_at: input.deliveries[p.id].ready_at } : {}), state, status_label: state === "pending" && input.plan.scheduling ? "Scheduled" : workspacePlacementStateLabel(state), ...(input.deliveries?.[p.id] ? { delivery: input.deliveries[p.id] } : {}), ...(o ? { observation: p.receiver.network_id ? { ...o, receiver_message_id: "private" } : o } : {}) };
|
|
51
52
|
});
|
|
52
53
|
const settled = input.plan.probes.filter(p => input.outcomes[p.id]).length;
|
|
53
|
-
return { id: input.id, provider: "internal", billing_mode: "internal", credits_used: 0, status: settled < probes.length ? "running" : probes.every(p => p.state === "observed") ? "completed" : "incomplete",
|
|
54
|
+
return { ...(input.plan.scheduling ? { provider_directions: placementProviderDirections(input.plan.probes), scheduling: input.plan.scheduling, schedule_summary: placementScheduleSummary(probes.filter(p => p.scheduled_at).map(p => ({ scheduled_at: p.scheduled_at }))) } : {}), id: input.id, provider: "internal", billing_mode: "internal", credits_used: 0, status: settled < probes.length ? "running" : probes.every(p => p.state === "observed") ? "completed" : "incomplete",
|
|
54
55
|
created_at: new Date(input.created_at).toISOString(), message_count: probes.length, variants: [...variants.values()], probes, plan_hash: input.plan.plan_hash, web_url: webUrl,
|
|
55
56
|
directional_note: "Observed placement in participating receiving accounts; not a campaign placement guarantee. Primary and Focused are separate provider classifications." };
|
|
56
57
|
}
|
|
@@ -65,7 +66,7 @@ function pageNumber(value, fallback, max, field) {
|
|
|
65
66
|
return value;
|
|
66
67
|
}
|
|
67
68
|
export function workspacePlacementProbeMeta(probe) {
|
|
68
|
-
return { id: probe.id, sender: probe.sender.address, sender_name: probe.sender.display_name ?? null, receiver: placementReceiverLabel(probe.receiver), receiver_provider: probe.receiver.provider, variant: probe.variant.key, subject: probe.variant.subject,
|
|
69
|
+
return { ...(probe.scheduled_at ? { scheduled_at: probe.scheduled_at } : {}), sender_provider: probe.sender.provider, id: probe.id, sender: probe.sender.address, sender_name: probe.sender.display_name ?? null, receiver: placementReceiverLabel(probe.receiver), receiver_provider: probe.receiver.provider, variant: probe.variant.key, subject: probe.variant.subject,
|
|
69
70
|
body_text_characters: Array.from(probe.variant.body_text).length, body_html_characters: Array.from(probe.variant.body_html ?? "").length };
|
|
70
71
|
}
|
|
71
72
|
export function workspacePlacementCopyPage(plan, input) {
|
|
@@ -98,5 +99,5 @@ export function workspacePlacementProbePage(probes, input, defaultLimit = 10) {
|
|
|
98
99
|
}
|
|
99
100
|
export function workspacePlacementPreviewPage(plan, input = {}) {
|
|
100
101
|
const { probes: _probes, ...metadata } = plan;
|
|
101
|
-
return { ...metadata, ...workspacePlacementProbePage(plan.probes.map(workspacePlacementProbeMeta), input, 5) };
|
|
102
|
+
return { ...metadata, ...(plan.scheduling ? { provider_directions: placementProviderDirections(plan.probes), schedule_summary: placementScheduleSummary(plan.probes.map(p => ({ scheduled_at: p.scheduled_at }))) } : {}), ...workspacePlacementProbePage(plan.probes.map(workspacePlacementProbeMeta), input, 5) };
|
|
102
103
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { type WorkspacePlacementSchedule } from "./workspace-placement-schedule.js";
|
|
1
2
|
export type WorkspacePlacementVariant = {
|
|
2
3
|
key: string;
|
|
3
4
|
subject: string;
|
|
@@ -27,6 +28,7 @@ export type WorkspacePlacementProbe = {
|
|
|
27
28
|
sender: WorkspacePlacementMailbox;
|
|
28
29
|
receiver: WorkspacePlacementMailbox;
|
|
29
30
|
variant: WorkspacePlacementVariant;
|
|
31
|
+
scheduled_at?: string;
|
|
30
32
|
};
|
|
31
33
|
export type WorkspacePlacementPlan = {
|
|
32
34
|
request_id: string;
|
|
@@ -37,6 +39,7 @@ export type WorkspacePlacementPlan = {
|
|
|
37
39
|
allow_paused_probe: boolean;
|
|
38
40
|
receiver_scope?: "workspace" | "network" | "staff";
|
|
39
41
|
staff?: StaffPlacementGrant;
|
|
42
|
+
scheduling?: WorkspacePlacementSchedule;
|
|
40
43
|
rendered_at?: string;
|
|
41
44
|
rendering?: {
|
|
42
45
|
tracking_opens: boolean;
|
|
@@ -61,6 +64,7 @@ export declare function buildWorkspacePlacementPlan(input: {
|
|
|
61
64
|
receivers: WorkspacePlacementMailbox[];
|
|
62
65
|
variants: WorkspacePlacementVariant[];
|
|
63
66
|
allowPausedProbe: boolean;
|
|
67
|
+
schedule?: boolean;
|
|
64
68
|
renderedAt?: string;
|
|
65
69
|
rendering?: WorkspacePlacementPlan["rendering"];
|
|
66
70
|
network?: boolean;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { WORKSPACE_PLACEMENT_SCHEDULE, planPlacementSlots } from "./workspace-placement-schedule.js";
|
|
1
2
|
import { createHash } from "node:crypto";
|
|
2
3
|
import { CliHttpError } from "./cli-http-error.js";
|
|
3
|
-
import { placementCopyIssue } from "./placement-copy.js";
|
|
4
|
+
import { placementCopyIssue } from "./mailboxes/placement-copy.js";
|
|
4
5
|
const UUID = /^[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}$/i;
|
|
5
6
|
export function workspacePlacementId(value) { return typeof value === "string" && UUID.test(value); }
|
|
6
7
|
function invalid(message) { throw new CliHttpError(400, "workspace_test_invalid", message); }
|
|
@@ -100,7 +101,12 @@ export function buildWorkspacePlacementPlan(input) {
|
|
|
100
101
|
}
|
|
101
102
|
if (!probes.length || probes.length > 50)
|
|
102
103
|
invalid("A workspace test must send between one and 50 messages after excluding self-sends.");
|
|
103
|
-
|
|
104
|
+
if (input.schedule && !input.network && !input.staff) {
|
|
105
|
+
const slots = new Map(planPlacementSlots(probes, new Date(input.renderedAt)).map(s => [s.id, s]));
|
|
106
|
+
for (const p of probes)
|
|
107
|
+
p.scheduled_at = slots.get(p.id).scheduled_at;
|
|
108
|
+
}
|
|
109
|
+
const plan = { ...(input.schedule && !input.network && !input.staff ? { scheduling: WORKSPACE_PLACEMENT_SCHEDULE } : {}), request_id: requestId, organization_id: organizationId, provider: "internal",
|
|
104
110
|
...(input.network ? { receiver_scope: "network" } : input.staff ? { receiver_scope: "staff", staff: input.staff } : {}), billing_mode: "internal", credits: 0, allow_paused_probe: input.allowPausedProbe,
|
|
105
111
|
...(input.renderedAt ? { rendered_at: input.renderedAt } : {}), ...(input.rendering ? { rendering: input.rendering } : {}),
|
|
106
112
|
probes, excluded_self_sends: excluded, message_count: probes.length };
|
|
@@ -26,16 +26,6 @@
|
|
|
26
26
|
"import": "./dist/directory.js",
|
|
27
27
|
"default": "./dist/directory.js"
|
|
28
28
|
},
|
|
29
|
-
"./file-import": {
|
|
30
|
-
"types": "./dist/file-import.d.ts",
|
|
31
|
-
"import": "./dist/file-import.js",
|
|
32
|
-
"default": "./dist/file-import.js"
|
|
33
|
-
},
|
|
34
|
-
"./import-limits": {
|
|
35
|
-
"types": "./dist/import-limits.d.ts",
|
|
36
|
-
"import": "./dist/import-limits.js",
|
|
37
|
-
"default": "./dist/import-limits.js"
|
|
38
|
-
},
|
|
39
29
|
"./inbox-avatar-url": {
|
|
40
30
|
"types": "./dist/inbox-avatar-url.d.ts",
|
|
41
31
|
"import": "./dist/inbox-avatar-url.js",
|
|
@@ -51,11 +41,6 @@
|
|
|
51
41
|
"import": "./dist/mailbox-import.js",
|
|
52
42
|
"default": "./dist/mailbox-import.js"
|
|
53
43
|
},
|
|
54
|
-
"./linkedin-url": {
|
|
55
|
-
"types": "./dist/linkedin-url.d.ts",
|
|
56
|
-
"import": "./dist/linkedin-url.js",
|
|
57
|
-
"default": "./dist/linkedin-url.js"
|
|
58
|
-
},
|
|
59
44
|
"./cell-format": {
|
|
60
45
|
"types": "./dist/cell-format.d.ts",
|
|
61
46
|
"import": "./dist/cell-format.js",
|
|
@@ -66,21 +51,11 @@
|
|
|
66
51
|
"import": "./dist/member-columns.js",
|
|
67
52
|
"default": "./dist/member-columns.js"
|
|
68
53
|
},
|
|
69
|
-
"./column-types": {
|
|
70
|
-
"types": "./dist/column-types.d.ts",
|
|
71
|
-
"import": "./dist/column-types.js",
|
|
72
|
-
"default": "./dist/column-types.js"
|
|
73
|
-
},
|
|
74
54
|
"./json-path": {
|
|
75
55
|
"types": "./dist/json-path.d.ts",
|
|
76
56
|
"import": "./dist/json-path.js",
|
|
77
57
|
"default": "./dist/json-path.js"
|
|
78
58
|
},
|
|
79
|
-
"./column-output-fields": {
|
|
80
|
-
"types": "./dist/column-output-fields.d.ts",
|
|
81
|
-
"import": "./dist/column-output-fields.js",
|
|
82
|
-
"default": "./dist/column-output-fields.js"
|
|
83
|
-
},
|
|
84
59
|
"./research-output-contract": {
|
|
85
60
|
"types": "./dist/research-output-contract.d.ts",
|
|
86
61
|
"import": "./dist/research-output-contract.js",
|
|
@@ -106,11 +81,6 @@
|
|
|
106
81
|
"import": "./dist/freemail-domains.js",
|
|
107
82
|
"default": "./dist/freemail-domains.js"
|
|
108
83
|
},
|
|
109
|
-
"./select-options": {
|
|
110
|
-
"types": "./dist/select-options.d.ts",
|
|
111
|
-
"import": "./dist/select-options.js",
|
|
112
|
-
"default": "./dist/select-options.js"
|
|
113
|
-
},
|
|
114
84
|
"./suppression-entries": {
|
|
115
85
|
"types": "./dist/suppression-entries.d.ts",
|
|
116
86
|
"import": "./dist/suppression-entries.js",
|
|
@@ -171,16 +141,6 @@
|
|
|
171
141
|
"import": "./dist/search-vocab.js",
|
|
172
142
|
"default": "./dist/search-vocab.js"
|
|
173
143
|
},
|
|
174
|
-
"./signup-lead-webhook": {
|
|
175
|
-
"types": "./dist/signup-lead-webhook.d.ts",
|
|
176
|
-
"import": "./dist/signup-lead-webhook.js",
|
|
177
|
-
"default": "./dist/signup-lead-webhook.js"
|
|
178
|
-
},
|
|
179
|
-
"./signup-lead-payload": {
|
|
180
|
-
"types": "./dist/signup-lead-payload.d.ts",
|
|
181
|
-
"import": "./dist/signup-lead-payload.js",
|
|
182
|
-
"default": "./dist/signup-lead-payload.js"
|
|
183
|
-
},
|
|
184
144
|
"./knowledge-constants": {
|
|
185
145
|
"types": "./dist/knowledge-constants.d.ts",
|
|
186
146
|
"import": "./dist/knowledge-constants.js",
|
|
@@ -237,11 +197,6 @@
|
|
|
237
197
|
"import": "./dist/sequences.js",
|
|
238
198
|
"default": "./dist/sequences.js"
|
|
239
199
|
},
|
|
240
|
-
"./tags": {
|
|
241
|
-
"types": "./dist/tags.d.ts",
|
|
242
|
-
"import": "./dist/tags.js",
|
|
243
|
-
"default": "./dist/tags.js"
|
|
244
|
-
},
|
|
245
200
|
"./collab": {
|
|
246
201
|
"types": "./dist/collab.d.ts",
|
|
247
202
|
"import": "./dist/collab.js",
|
|
@@ -267,21 +222,11 @@
|
|
|
267
222
|
"import": "./dist/workspace-file-storage.js",
|
|
268
223
|
"default": "./dist/workspace-file-storage.js"
|
|
269
224
|
},
|
|
270
|
-
"./company-enrichment-fields": {
|
|
271
|
-
"types": "./dist/company-enrichment-fields.d.ts",
|
|
272
|
-
"import": "./dist/company-enrichment-fields.js",
|
|
273
|
-
"default": "./dist/company-enrichment-fields.js"
|
|
274
|
-
},
|
|
275
225
|
"./*": {
|
|
276
226
|
"types": "./dist/*.d.ts",
|
|
277
227
|
"import": "./dist/*.js",
|
|
278
228
|
"default": "./dist/*.js"
|
|
279
229
|
},
|
|
280
|
-
"./enrichment-intents": {
|
|
281
|
-
"types": "./dist/enrichment-intents.d.ts",
|
|
282
|
-
"import": "./dist/enrichment-intents.js",
|
|
283
|
-
"default": "./dist/enrichment-intents.js"
|
|
284
|
-
},
|
|
285
230
|
"./decision-ledger": {
|
|
286
231
|
"types": "./dist/decision-ledger.d.ts",
|
|
287
232
|
"import": "./dist/decision-ledger.js",
|
|
@@ -301,11 +246,6 @@
|
|
|
301
246
|
"types": "./dist/provider-balance-signal.d.ts",
|
|
302
247
|
"import": "./dist/provider-balance-signal.js"
|
|
303
248
|
},
|
|
304
|
-
"./attempt-provenance": {
|
|
305
|
-
"types": "./dist/attempt-provenance.d.ts",
|
|
306
|
-
"import": "./dist/attempt-provenance.js",
|
|
307
|
-
"default": "./dist/attempt-provenance.js"
|
|
308
|
-
},
|
|
309
249
|
"./copilot-skills.generated": null
|
|
310
250
|
},
|
|
311
251
|
"dependencies": {}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
export declare function nextCronRunAfter(input: {
|
|
2
|
+
cron: string;
|
|
3
|
+
timezone?: string | null;
|
|
4
|
+
after?: Date;
|
|
5
|
+
}): Date;
|
|
6
|
+
/**
|
|
7
|
+
* The first slot of `cron` strictly after `after` that is also at least
|
|
8
|
+
* `minIntervalMinutes` after `lastFireAt`. This is how a plan's minimum cron
|
|
9
|
+
* interval (repricing 2026-09, decision L4.2) is enforced at fire time: a
|
|
10
|
+
* schedule that fires closer together than the plan allows keeps running, only
|
|
11
|
+
* slower, and is never deleted (proposal P-47). With no last fire or a minimum
|
|
12
|
+
* of one minute or less it is exactly `nextCronRunAfter`.
|
|
13
|
+
*/
|
|
14
|
+
export declare function nextCronRunAfterMinInterval(input: {
|
|
15
|
+
cron: string;
|
|
16
|
+
timezone?: string | null;
|
|
17
|
+
after: Date;
|
|
18
|
+
lastFireAt?: Date | null;
|
|
19
|
+
minIntervalMinutes?: number | null;
|
|
20
|
+
}): Date;
|
|
21
|
+
/**
|
|
22
|
+
* The smallest gap in minutes between two consecutive fires of `cron`, which is
|
|
23
|
+
* what a plan's minimum cron interval is checked against (repricing 2026-09,
|
|
24
|
+
* decision L4.2). It is the smallest gap, never the average: `0,5 9 * * *`
|
|
25
|
+
* fires once a day on average but twice five minutes apart, so its gap is 5.
|
|
26
|
+
*
|
|
27
|
+
* Gaps are measured in real time in `timezone`. A daylight-saving change can
|
|
28
|
+
* bring two fires closer than their wall-clock times suggest (01:55 and 03:05
|
|
29
|
+
* are ten minutes apart on the night the clock skips from 02:00 to 03:00, and
|
|
30
|
+
* a repeated hour can fire 01:45 and then 01:00 again), so the fires around
|
|
31
|
+
* each change in the coming year are simulated as well.
|
|
32
|
+
*
|
|
33
|
+
* Returns null when the schedule never fires twice within the scan (for
|
|
34
|
+
* example `0 9 29 2 *` fires once every few years and has no meaningful gap
|
|
35
|
+
* for a minimum to bind). Throws on an unparseable expression, like
|
|
36
|
+
* `nextCronRunAfter`.
|
|
37
|
+
*/
|
|
38
|
+
export declare function minCronGapMinutes(input: {
|
|
39
|
+
cron: string;
|
|
40
|
+
timezone?: string | null;
|
|
41
|
+
now?: Date;
|
|
42
|
+
}): number | null;
|
|
@@ -0,0 +1,271 @@
|
|
|
1
|
+
import { parseCronSchedule } from "./manifest-validation.js";
|
|
2
|
+
import { DEFAULT_WORKFLOW_CRON_TIMEZONE } from "./manifest-types.js";
|
|
3
|
+
/**
|
|
4
|
+
* Cron schedule arithmetic for workflow triggers: next run, minimum-interval runs and the smallest gap.
|
|
5
|
+
*/
|
|
6
|
+
// Lookahead window for the next cron run. Must exceed the largest gap a *valid*
|
|
7
|
+
// schedule can have, or legitimate sparse crons get falsely rejected: the worst
|
|
8
|
+
// case is "Feb 29" across a century boundary (e.g. 2096 → 2104, an ~8-year gap,
|
|
9
|
+
// since 2100 is not a leap year). The day-skipping scan below keeps even this
|
|
10
|
+
// wide window cheap (~one zonedDateParts call per non-matching day).
|
|
11
|
+
const MAX_CRON_LOOKAHEAD_DAYS = 366 * 8 + 2;
|
|
12
|
+
export function nextCronRunAfter(input) {
|
|
13
|
+
const schedule = parseCronSchedule(input.cron);
|
|
14
|
+
const timezone = input.timezone?.trim() || DEFAULT_WORKFLOW_CRON_TIMEZONE;
|
|
15
|
+
let candidate = roundUpToNextMinute(input.after ?? new Date());
|
|
16
|
+
const deadline = candidate.getTime() + MAX_CRON_LOOKAHEAD_DAYS * 24 * 60 * 60 * 1000;
|
|
17
|
+
while (candidate.getTime() <= deadline) {
|
|
18
|
+
const parts = zonedDateParts(candidate, timezone);
|
|
19
|
+
if (matchesCronSchedule(schedule, parts)) {
|
|
20
|
+
return candidate;
|
|
21
|
+
}
|
|
22
|
+
// If the calendar date itself can't match, no minute that day matches —
|
|
23
|
+
// jump to the next day instead of scanning all 1440 minutes. This keeps
|
|
24
|
+
// sparse schedules (e.g. "0 9 29 2 *") and unsatisfiable ones fast over the
|
|
25
|
+
// multi-year window. The jump targets ~00:00 of the next day, so a
|
|
26
|
+
// subsequently matching date is scanned from its start (no missed minutes).
|
|
27
|
+
if (!matchesCronDate(schedule, parts)) {
|
|
28
|
+
const minutesToNextDay = Math.max(1, 24 * 60 - (parts.hour * 60 + parts.minute));
|
|
29
|
+
let next = new Date(candidate.getTime() + minutesToNextDay * 60_000);
|
|
30
|
+
// minutesToNextDay is a LOCAL-clock count added to a UTC instant. On a
|
|
31
|
+
// spring-forward day the local day is < 24h, so the jump overshoots the
|
|
32
|
+
// next local midnight and lands at ~01:00 — skipping an early-of-day match
|
|
33
|
+
// (e.g. "0 0 …"), which can push the next run a full year out. If the jump
|
|
34
|
+
// crossed into the next local day but past midnight, pull it back to that
|
|
35
|
+
// midnight. (A fall-back day is > 24h: the jump undershoots and stays on
|
|
36
|
+
// the same date, which the next iteration advances — left as-is.)
|
|
37
|
+
const landed = zonedDateParts(next, timezone);
|
|
38
|
+
const intoNextLocalDay = landed.hour * 60 + landed.minute;
|
|
39
|
+
if (landed.dayOfMonth !== parts.dayOfMonth && intoNextLocalDay > 0) {
|
|
40
|
+
next = new Date(next.getTime() - intoNextLocalDay * 60_000);
|
|
41
|
+
}
|
|
42
|
+
candidate = next;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
candidate = new Date(candidate.getTime() + 60_000);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
throw new Error(`Cron expression has no matching run time in the next ${MAX_CRON_LOOKAHEAD_DAYS} days.`);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* The first slot of `cron` strictly after `after` that is also at least
|
|
52
|
+
* `minIntervalMinutes` after `lastFireAt`. This is how a plan's minimum cron
|
|
53
|
+
* interval (repricing 2026-09, decision L4.2) is enforced at fire time: a
|
|
54
|
+
* schedule that fires closer together than the plan allows keeps running, only
|
|
55
|
+
* slower, and is never deleted (proposal P-47). With no last fire or a minimum
|
|
56
|
+
* of one minute or less it is exactly `nextCronRunAfter`.
|
|
57
|
+
*/
|
|
58
|
+
export function nextCronRunAfterMinInterval(input) {
|
|
59
|
+
const minIntervalMs = Math.max(0, input.minIntervalMinutes ?? 0) * 60_000;
|
|
60
|
+
let after = input.after;
|
|
61
|
+
if (input.lastFireAt && minIntervalMs > 60_000) {
|
|
62
|
+
// One millisecond before the earliest allowed instant: nextCronRunAfter
|
|
63
|
+
// returns the first whole-minute slot strictly after it, so a slot exactly
|
|
64
|
+
// `minIntervalMinutes` after the last fire is allowed.
|
|
65
|
+
const earliestAllowed = input.lastFireAt.getTime() + minIntervalMs - 1;
|
|
66
|
+
if (earliestAllowed > after.getTime())
|
|
67
|
+
after = new Date(earliestAllowed);
|
|
68
|
+
}
|
|
69
|
+
return nextCronRunAfter({ cron: input.cron, timezone: input.timezone ?? null, after });
|
|
70
|
+
}
|
|
71
|
+
// How many calendar days minCronGapMinutes scans for two matching days in a
|
|
72
|
+
// row: two leap cycles, so a Feb 29 or a day-of-month/weekday coincidence is
|
|
73
|
+
// always seen.
|
|
74
|
+
const CRON_GAP_DAY_SCAN = 366 * 8 + 2;
|
|
75
|
+
// Real-time simulation around a daylight-saving change covers the day it falls
|
|
76
|
+
// in plus this many whole days either side (so the fire before a long gap that
|
|
77
|
+
// straddles the change is inside the window), and stops after this many fires.
|
|
78
|
+
const CRON_GAP_DST_WINDOW_DAYS = 1;
|
|
79
|
+
const CRON_GAP_DST_MAX_FIRES = 5_000;
|
|
80
|
+
/**
|
|
81
|
+
* The smallest gap in minutes between two consecutive fires of `cron`, which is
|
|
82
|
+
* what a plan's minimum cron interval is checked against (repricing 2026-09,
|
|
83
|
+
* decision L4.2). It is the smallest gap, never the average: `0,5 9 * * *`
|
|
84
|
+
* fires once a day on average but twice five minutes apart, so its gap is 5.
|
|
85
|
+
*
|
|
86
|
+
* Gaps are measured in real time in `timezone`. A daylight-saving change can
|
|
87
|
+
* bring two fires closer than their wall-clock times suggest (01:55 and 03:05
|
|
88
|
+
* are ten minutes apart on the night the clock skips from 02:00 to 03:00, and
|
|
89
|
+
* a repeated hour can fire 01:45 and then 01:00 again), so the fires around
|
|
90
|
+
* each change in the coming year are simulated as well.
|
|
91
|
+
*
|
|
92
|
+
* Returns null when the schedule never fires twice within the scan (for
|
|
93
|
+
* example `0 9 29 2 *` fires once every few years and has no meaningful gap
|
|
94
|
+
* for a minimum to bind). Throws on an unparseable expression, like
|
|
95
|
+
* `nextCronRunAfter`.
|
|
96
|
+
*/
|
|
97
|
+
export function minCronGapMinutes(input) {
|
|
98
|
+
const schedule = parseCronSchedule(input.cron);
|
|
99
|
+
const timezone = input.timezone?.trim() || DEFAULT_WORKFLOW_CRON_TIMEZONE;
|
|
100
|
+
const fireMinutes = [...schedule.hours]
|
|
101
|
+
.flatMap((hour) => [...schedule.minutes].map((minute) => hour * 60 + minute))
|
|
102
|
+
.sort((a, b) => a - b);
|
|
103
|
+
let gap = Number.POSITIVE_INFINITY;
|
|
104
|
+
for (let index = 1; index < fireMinutes.length; index += 1) {
|
|
105
|
+
gap = Math.min(gap, (fireMinutes[index] ?? 0) - (fireMinutes[index - 1] ?? 0));
|
|
106
|
+
}
|
|
107
|
+
const dayGap = smallestMatchingDayGap(schedule);
|
|
108
|
+
const firstFire = fireMinutes[0];
|
|
109
|
+
const lastFire = fireMinutes[fireMinutes.length - 1];
|
|
110
|
+
if (dayGap !== null && firstFire !== undefined && lastFire !== undefined) {
|
|
111
|
+
gap = Math.min(gap, dayGap * 24 * 60 + firstFire - lastFire);
|
|
112
|
+
}
|
|
113
|
+
// A one-minute gap is the floor of the cron grammar; daylight saving cannot
|
|
114
|
+
// bring two fires closer than that.
|
|
115
|
+
if (gap > 1) {
|
|
116
|
+
const dstGap = smallestGapAroundDaylightSavingChanges(input.cron, timezone, input.now ?? new Date());
|
|
117
|
+
if (dstGap !== null)
|
|
118
|
+
gap = Math.min(gap, dstGap);
|
|
119
|
+
}
|
|
120
|
+
return Number.isFinite(gap) ? gap : null;
|
|
121
|
+
}
|
|
122
|
+
/** Fewest days between two calendar days the schedule's date fields both match. */
|
|
123
|
+
function smallestMatchingDayGap(schedule) {
|
|
124
|
+
// Calendar arithmetic only (no timezone): day-of-month, month and weekday
|
|
125
|
+
// matching is the same on every clock. A fixed leap-year start covers every
|
|
126
|
+
// weekday/day-of-month combination within the scan.
|
|
127
|
+
const start = Date.UTC(2024, 0, 1);
|
|
128
|
+
let previousMatch = null;
|
|
129
|
+
let smallest = null;
|
|
130
|
+
for (let day = 0; day < CRON_GAP_DAY_SCAN; day += 1) {
|
|
131
|
+
const date = new Date(start + day * 24 * 60 * 60 * 1000);
|
|
132
|
+
const matches = matchesCronDate(schedule, {
|
|
133
|
+
minute: 0,
|
|
134
|
+
hour: 0,
|
|
135
|
+
dayOfMonth: date.getUTCDate(),
|
|
136
|
+
month: date.getUTCMonth() + 1,
|
|
137
|
+
dayOfWeek: date.getUTCDay(),
|
|
138
|
+
});
|
|
139
|
+
if (!matches)
|
|
140
|
+
continue;
|
|
141
|
+
if (previousMatch !== null) {
|
|
142
|
+
const gap = day - previousMatch;
|
|
143
|
+
smallest = smallest === null ? gap : Math.min(smallest, gap);
|
|
144
|
+
if (smallest === 1)
|
|
145
|
+
return 1;
|
|
146
|
+
}
|
|
147
|
+
previousMatch = day;
|
|
148
|
+
}
|
|
149
|
+
return smallest;
|
|
150
|
+
}
|
|
151
|
+
/**
|
|
152
|
+
* The smallest real-time gap between fires in the days around each
|
|
153
|
+
* daylight-saving change in the year after `now`; null when the zone has no
|
|
154
|
+
* change in that year or no two fires fall in any window.
|
|
155
|
+
*/
|
|
156
|
+
function smallestGapAroundDaylightSavingChanges(cron, timezone, now) {
|
|
157
|
+
const dayMs = 24 * 60 * 60 * 1000;
|
|
158
|
+
const start = Math.floor(now.getTime() / dayMs) * dayMs;
|
|
159
|
+
let smallest = null;
|
|
160
|
+
let previousOffset = zonedOffsetMinutes(new Date(start), timezone);
|
|
161
|
+
for (let day = 1; day <= 367; day += 1) {
|
|
162
|
+
const offset = zonedOffsetMinutes(new Date(start + day * dayMs), timezone);
|
|
163
|
+
if (offset === previousOffset)
|
|
164
|
+
continue;
|
|
165
|
+
previousOffset = offset;
|
|
166
|
+
const windowStart = new Date(start + (day - 1 - CRON_GAP_DST_WINDOW_DAYS) * dayMs);
|
|
167
|
+
const windowEnd = start + (day + CRON_GAP_DST_WINDOW_DAYS) * dayMs;
|
|
168
|
+
let fire = nextCronRunAfter({ cron, timezone, after: windowStart });
|
|
169
|
+
for (let fires = 0; fires < CRON_GAP_DST_MAX_FIRES && fire.getTime() <= windowEnd; fires += 1) {
|
|
170
|
+
const next = nextCronRunAfter({ cron, timezone, after: fire });
|
|
171
|
+
if (next.getTime() > windowEnd)
|
|
172
|
+
break;
|
|
173
|
+
const gap = Math.round((next.getTime() - fire.getTime()) / 60_000);
|
|
174
|
+
smallest = smallest === null ? gap : Math.min(smallest, gap);
|
|
175
|
+
fire = next;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
return smallest;
|
|
179
|
+
}
|
|
180
|
+
/** Minutes the zone's wall clock is ahead of UTC at `date`. */
|
|
181
|
+
function zonedOffsetMinutes(date, timezone) {
|
|
182
|
+
const formatter = getZonedFormatter(timezone);
|
|
183
|
+
const parts = new Map();
|
|
184
|
+
for (const part of formatter.formatToParts(date)) {
|
|
185
|
+
if (part.type !== "literal")
|
|
186
|
+
parts.set(part.type, part.value);
|
|
187
|
+
}
|
|
188
|
+
const wallClock = Date.UTC(Number(parts.get("year")), Number(parts.get("month")) - 1, Number(parts.get("day")), Number(parts.get("hour")), Number(parts.get("minute")));
|
|
189
|
+
const instant = Math.floor(date.getTime() / 60_000) * 60_000;
|
|
190
|
+
return Math.round((wallClock - instant) / 60_000);
|
|
191
|
+
}
|
|
192
|
+
const zonedFormatters = new Map();
|
|
193
|
+
// Date-only match (month + day-of-month/day-of-week), excluding hour/minute.
|
|
194
|
+
// Lets nextCronRunAfter skip whole non-matching days in one jump.
|
|
195
|
+
function matchesCronDate(schedule, parts) {
|
|
196
|
+
if (!schedule.months.has(parts.month))
|
|
197
|
+
return false;
|
|
198
|
+
const dayOfMonthMatches = schedule.daysOfMonth.has(parts.dayOfMonth);
|
|
199
|
+
const dayOfWeekMatches = schedule.daysOfWeek.has(parts.dayOfWeek);
|
|
200
|
+
if (schedule.dayOfMonthRestricted && schedule.dayOfWeekRestricted) {
|
|
201
|
+
return dayOfMonthMatches || dayOfWeekMatches;
|
|
202
|
+
}
|
|
203
|
+
return dayOfMonthMatches && dayOfWeekMatches;
|
|
204
|
+
}
|
|
205
|
+
function matchesCronSchedule(schedule, parts) {
|
|
206
|
+
if (!schedule.minutes.has(parts.minute))
|
|
207
|
+
return false;
|
|
208
|
+
if (!schedule.hours.has(parts.hour))
|
|
209
|
+
return false;
|
|
210
|
+
return matchesCronDate(schedule, parts);
|
|
211
|
+
}
|
|
212
|
+
function roundUpToNextMinute(value) {
|
|
213
|
+
const result = new Date(value.getTime());
|
|
214
|
+
result.setUTCSeconds(0, 0);
|
|
215
|
+
if (result.getTime() <= value.getTime()) {
|
|
216
|
+
result.setUTCMinutes(result.getUTCMinutes() + 1);
|
|
217
|
+
}
|
|
218
|
+
return result;
|
|
219
|
+
}
|
|
220
|
+
function zonedDateParts(date, timezone) {
|
|
221
|
+
const formatter = getZonedFormatter(timezone);
|
|
222
|
+
const parts = new Map();
|
|
223
|
+
for (const part of formatter.formatToParts(date)) {
|
|
224
|
+
if (part.type !== "literal")
|
|
225
|
+
parts.set(part.type, part.value);
|
|
226
|
+
}
|
|
227
|
+
return {
|
|
228
|
+
minute: Number(parts.get("minute")),
|
|
229
|
+
hour: Number(parts.get("hour")),
|
|
230
|
+
dayOfMonth: Number(parts.get("day")),
|
|
231
|
+
month: Number(parts.get("month")),
|
|
232
|
+
dayOfWeek: weekdayToNumber(parts.get("weekday") ?? ""),
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function getZonedFormatter(timezone) {
|
|
236
|
+
const cached = zonedFormatters.get(timezone);
|
|
237
|
+
if (cached)
|
|
238
|
+
return cached;
|
|
239
|
+
const formatter = new Intl.DateTimeFormat("en-US", {
|
|
240
|
+
timeZone: timezone,
|
|
241
|
+
weekday: "short",
|
|
242
|
+
year: "numeric",
|
|
243
|
+
month: "numeric",
|
|
244
|
+
day: "numeric",
|
|
245
|
+
hour: "numeric",
|
|
246
|
+
minute: "numeric",
|
|
247
|
+
hourCycle: "h23",
|
|
248
|
+
});
|
|
249
|
+
zonedFormatters.set(timezone, formatter);
|
|
250
|
+
return formatter;
|
|
251
|
+
}
|
|
252
|
+
function weekdayToNumber(value) {
|
|
253
|
+
switch (value.toLowerCase()) {
|
|
254
|
+
case "sun":
|
|
255
|
+
return 0;
|
|
256
|
+
case "mon":
|
|
257
|
+
return 1;
|
|
258
|
+
case "tue":
|
|
259
|
+
return 2;
|
|
260
|
+
case "wed":
|
|
261
|
+
return 3;
|
|
262
|
+
case "thu":
|
|
263
|
+
return 4;
|
|
264
|
+
case "fri":
|
|
265
|
+
return 5;
|
|
266
|
+
case "sat":
|
|
267
|
+
return 6;
|
|
268
|
+
default:
|
|
269
|
+
throw new Error(`Unsupported weekday '${value}'.`);
|
|
270
|
+
}
|
|
271
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import type { JsonSchema, JsonSchemaValidationIssue
|
|
1
|
+
import type { JsonSchema, JsonSchemaValidationIssue } from "./manifest-validation.js";
|
|
2
|
+
import type { WorkflowEventFilter } from "./manifest-types.js";
|
|
2
3
|
/**
|
|
3
4
|
* Read a dot-delimited path out of an event payload.
|
|
4
5
|
*
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
// Run-time condition evaluation for oxygen-workflows-v2, published as
|
|
2
|
+
// `@oxygen/workflows/condition` and deliberately NOT on the graph barrel: the
|
|
3
|
+
// worker scheduler is its only runtime caller, so an operator change reaches
|
|
4
|
+
// the scheduler instead of every importer of `@oxygen/workflows`. Browser-safe.
|
|
5
|
+
import { compareWorkflowConditionValues } from "../refactor-internals/condition-comparison.js";
|
|
6
|
+
import { resolveValueRef } from "./expression.js";
|
|
7
|
+
export function evaluateCondition(condition, scope) {
|
|
8
|
+
if (condition.type === "group") {
|
|
9
|
+
// An empty group is vacuous: `all` holds, `any` does not — the same identity
|
|
10
|
+
// Array.every / Array.some give, so no special case is needed at run time.
|
|
11
|
+
const result = condition.op === "all"
|
|
12
|
+
? condition.children.every((child) => evaluateCondition(child, scope))
|
|
13
|
+
: condition.children.some((child) => evaluateCondition(child, scope));
|
|
14
|
+
return condition.not === true ? !result : result;
|
|
15
|
+
}
|
|
16
|
+
const left = resolveValueRef(condition.left, scope);
|
|
17
|
+
const right = condition.right === undefined ? undefined : resolveValueRef(condition.right, scope);
|
|
18
|
+
return compareWorkflowConditionValues(left, condition.op, right);
|
|
19
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { compileConditionPattern } from "../refactor-internals/condition-
|
|
1
|
+
export { compileConditionPattern } from "../refactor-internals/condition-pattern.js";
|
|
2
2
|
import type { WorkflowCompareOp, WorkflowCondition, WorkflowValueCoercion, WorkflowValueRef } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* The data a v2 run exposes to its value refs.
|
|
@@ -77,7 +77,6 @@ export declare function resolveValueRef(ref: WorkflowValueRef, scope: WorkflowRu
|
|
|
77
77
|
* boundary so the failure names the mapped path before any provider executes.
|
|
78
78
|
*/
|
|
79
79
|
export declare function resolveRequiredValueRef(ref: WorkflowValueRef, scope: WorkflowRunScope): unknown;
|
|
80
|
-
export declare function evaluateCondition(condition: WorkflowCondition, scope: WorkflowRunScope): boolean;
|
|
81
80
|
/**
|
|
82
81
|
* Node ids a ref or condition reads, in first-seen order.
|
|
83
82
|
*
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// scheduler, the linter, and the visual editor's preview pane.
|
|
4
4
|
//
|
|
5
5
|
// This module must stay BROWSER-SAFE. Its only imports are @oxygen/formula (itself
|
|
6
|
-
// host-free and node-free), condition
|
|
6
|
+
// host-free and node-free), condition pattern compilation, and ./types.js — never ../index.js, which pulls
|
|
7
7
|
// node:vm and node:crypto.
|
|
8
8
|
//
|
|
9
9
|
// Two invariants hold everywhere below:
|
|
@@ -14,8 +14,7 @@
|
|
|
14
14
|
// only, and the segments that reach JavaScript object internals
|
|
15
15
|
// (__proto__ / constructor / prototype) are rejected outright.
|
|
16
16
|
import { analyzeFormulaDependencies, evaluateFormulaInScope, formulaExpressionError, isRecord, } from "@oxygen/formula";
|
|
17
|
-
|
|
18
|
-
export { compileConditionPattern } from "../refactor-internals/condition-comparison.js";
|
|
17
|
+
export { compileConditionPattern } from "../refactor-internals/condition-pattern.js";
|
|
19
18
|
/** A deterministic authoring/data error; retrying the same revision cannot repair it. */
|
|
20
19
|
export class WorkflowValueCoercionError extends Error {
|
|
21
20
|
coercion;
|
|
@@ -645,22 +644,6 @@ function isCoalescibleWorkflowFormulaPath(scope, identifier) {
|
|
|
645
644
|
return false;
|
|
646
645
|
}
|
|
647
646
|
// ---------------------------------------------------------------------------
|
|
648
|
-
// Conditions
|
|
649
|
-
// ---------------------------------------------------------------------------
|
|
650
|
-
export function evaluateCondition(condition, scope) {
|
|
651
|
-
if (condition.type === "group") {
|
|
652
|
-
// An empty group is vacuous: `all` holds, `any` does not — the same identity
|
|
653
|
-
// Array.every / Array.some give, so no special case is needed at run time.
|
|
654
|
-
const result = condition.op === "all"
|
|
655
|
-
? condition.children.every((child) => evaluateCondition(child, scope))
|
|
656
|
-
: condition.children.some((child) => evaluateCondition(child, scope));
|
|
657
|
-
return condition.not === true ? !result : result;
|
|
658
|
-
}
|
|
659
|
-
const left = resolveValueRef(condition.left, scope);
|
|
660
|
-
const right = condition.right === undefined ? undefined : resolveValueRef(condition.right, scope);
|
|
661
|
-
return compareWorkflowConditionValues(left, condition.op, right);
|
|
662
|
-
}
|
|
663
|
-
// ---------------------------------------------------------------------------
|
|
664
647
|
// Static analysis
|
|
665
648
|
// ---------------------------------------------------------------------------
|
|
666
649
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type {
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { JsonSchema, WorkflowStatus, WorkflowStepEffect } from "../manifest-validation.js";
|
|
2
|
+
import type { RecipeManifest, WorkflowMode, WorkflowTriggerManifest } from "../manifest-types.js";
|
|
3
|
+
export type WorkflowCompareOp = "eq" | "neq" | "gt" | "gte" | "lt" | "lte" | "contains" | "not_contains" | "starts_with" | "ends_with" | "is_empty" | "is_not_empty" | "in" | "not_in" | "matches";
|
|
4
4
|
export declare const WORKFLOW_GRAPH_MANIFEST_VERSION = 2;
|
|
5
5
|
export declare const WORKFLOW_GRAPH_COMPILER_VERSION = "oxygen-workflows-v2";
|
|
6
6
|
export declare const PORTABLE_WORKFLOW_DEFINITION_VERSION = 1;
|
|
@@ -490,3 +490,4 @@ export declare function isTriggerNode(node: WorkflowGraphNode): node is Workflow
|
|
|
490
490
|
export declare function isToolNode(node: WorkflowGraphNode): node is WorkflowGraphNodeOfKind<"tool">;
|
|
491
491
|
export declare function isSwitchNode(node: WorkflowGraphNode): node is WorkflowGraphNodeOfKind<"switch">;
|
|
492
492
|
export declare function isLoopNode(node: WorkflowGraphNode): node is WorkflowGraphNodeOfKind<"loop">;
|
|
493
|
+
export {};
|