@oxygen-agent/cli 1.1014.2213 → 1.1015.29
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/browser-login.js +1 -1
- package/dist/cli-output.js +1 -1
- package/dist/command-manifest.js +8 -0
- package/dist/command-support.js +1 -1
- package/dist/commands/admin.js +1 -1
- package/dist/commands/directory.js +1 -1
- package/dist/commands/domains.js +7 -3
- package/dist/commands/email-templates.js +1 -1
- package/dist/commands/mailboxes.js +1 -1
- package/dist/commands/posts.js +1 -1
- package/dist/commands/sequences.js +2 -2
- package/dist/commands/workflows.js +1 -1
- package/dist/sender-limits-flags.js +1 -1
- package/dist/sequence-start-at.js +1 -1
- package/dist/sequences-content-commands.js +1 -1
- package/dist/sequences-newsletter-commands.js +1 -1
- package/dist/sequences-test-send-command.js +1 -1
- package/node_modules/@oxygen/formula/dist/value-cleaners.d.ts +1 -1
- package/node_modules/@oxygen/formula/dist/value-cleaners.js +2 -2
- package/node_modules/@oxygen/shared/dist/{reply-oxygent.js → agents/reply-oxygent.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{agent-session-schedule.js → agents/session-schedule.js} +2 -2
- package/node_modules/@oxygen/shared/dist/{agent-sessions.d.ts → agents/sessions.d.ts} +3 -3
- package/node_modules/@oxygen/shared/dist/{agent-sessions.js → agents/sessions.js} +10 -10
- package/node_modules/@oxygen/shared/dist/{teammate-routines.d.ts → agents/teammate-routines.d.ts} +2 -2
- package/node_modules/@oxygen/shared/dist/{teammate-routines.js → agents/teammate-routines.js} +4 -4
- package/node_modules/@oxygen/shared/dist/{teammates.js → agents/teammates.js} +3 -3
- package/node_modules/@oxygen/shared/dist/billing.js +1 -1
- package/node_modules/@oxygen/shared/dist/capability-intents/sending-infrastructure.js +2 -0
- package/node_modules/@oxygen/shared/dist/company-url-identity.js +2 -2
- package/node_modules/@oxygen/shared/dist/contracts/sender-limits.js +1 -1
- package/node_modules/@oxygen/shared/dist/contracts/teammates.js +4 -4
- package/node_modules/@oxygen/shared/dist/diagnostic-spool.js +102 -14
- package/node_modules/@oxygen/shared/dist/feature-gates.d.ts +3 -3
- package/node_modules/@oxygen/shared/dist/feature-gates.js +3 -3
- package/node_modules/@oxygen/shared/dist/index.d.ts +28 -28
- package/node_modules/@oxygen/shared/dist/index.js +28 -28
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.js +2 -2
- package/node_modules/@oxygen/shared/dist/mailboxes/email-deliverability-policy.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/{mailbox-import.js → mailboxes/import.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{sending-domain-faults.d.ts → mailboxes/sending-domain-faults.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{sending-domain-faults.js → mailboxes/sending-domain-faults.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{listed-website-platforms.js → marketing/listed-website-platforms.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{newsletter-test-send.d.ts → marketing/newsletter-test-send.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{newsletter-test-send.js → marketing/newsletter-test-send.js} +1 -1
- package/node_modules/@oxygen/shared/dist/mcp-event-contract.js +2 -2
- package/node_modules/@oxygen/shared/dist/network-mining-approval.js +1 -1
- package/node_modules/@oxygen/shared/dist/onboarding/plays.d.ts +1 -0
- package/node_modules/@oxygen/shared/dist/onboarding/plays.js +13 -0
- package/node_modules/@oxygen/shared/dist/onboarding/research.d.ts +20 -12
- package/node_modules/@oxygen/shared/dist/onboarding/research.js +20 -12
- package/node_modules/@oxygen/shared/dist/onboarding/signup-lead-payload.js +1 -1
- package/node_modules/@oxygen/shared/dist/sequence-internals/esp-policy.js +1 -1
- package/node_modules/@oxygen/shared/dist/sequences/bulk-email-pacing.js +1 -1
- package/node_modules/@oxygen/shared/dist/{company-reply-pause.js → sequences/company-reply-pause.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{dnc-identities.js → sequences/dnc-identities.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{email-delivery.js → sequences/email-delivery.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{email-tracking-token.d.ts → sequences/email-tracking-token.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{email-tracking-token.js → sequences/email-tracking-token.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{email-unsubscribe-token.d.ts → sequences/email-unsubscribe-token.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{email-unsubscribe-token.js → sequences/email-unsubscribe-token.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{sequence-failures.js → sequences/failures.js} +3 -3
- package/node_modules/@oxygen/shared/dist/{sequence-hubspot-sync.d.ts → sequences/hubspot-sync.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{sequence-hubspot-sync.js → sequences/hubspot-sync.js} +1 -1
- package/node_modules/@oxygen/shared/dist/{linkedin-quota-denial.d.ts → sequences/linkedin-quota-denial.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{linkedin-quota-denial.js → sequences/linkedin-quota-denial.js} +3 -3
- package/node_modules/@oxygen/shared/dist/{linkedin-sequences.d.ts → sequences/linkedin-sequences.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{linkedin-sequences.js → sequences/linkedin-sequences.js} +1 -1
- package/node_modules/@oxygen/shared/dist/sequences/sending-limits.js +1 -1
- package/node_modules/@oxygen/shared/dist/sequences/sending-schedule.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/{sequences.d.ts → sequences/sequences.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{sequences.js → sequences/sequences.js} +3 -3
- package/node_modules/@oxygen/shared/dist/{suppression-entries.js → sequences/suppression-entries.js} +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/{workspace-event-catalog.d.ts → workflows/workspace-event-catalog.d.ts} +1 -1
- package/node_modules/@oxygen/shared/dist/{workspace-event-catalog.js → workflows/workspace-event-catalog.js} +9 -9
- package/node_modules/@oxygen/shared/package.json +0 -55
- package/package.json +1 -1
- /package/node_modules/@oxygen/shared/dist/{reply-oxygent.d.ts → agents/reply-oxygent.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{agent-session-schedule.d.ts → agents/session-schedule.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammate-groups.d.ts → agents/teammate-groups.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammate-groups.js → agents/teammate-groups.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammate-messages.d.ts → agents/teammate-messages.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammate-messages.js → agents/teammate-messages.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammate-notes.d.ts → agents/teammate-notes.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammate-notes.js → agents/teammate-notes.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammate-tasks.d.ts → agents/teammate-tasks.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammate-tasks.js → agents/teammate-tasks.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{teammates.d.ts → agents/teammates.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workspace-agents.d.ts → agents/workspace-agents.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workspace-agents.js → agents/workspace-agents.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{cli-login-code.d.ts → auth/cli-login-code.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{cli-login-code.js → auth/cli-login-code.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{signed-token.d.ts → auth/signed-token.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{signed-token.js → auth/signed-token.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{mailbox-egress-ownership.d.ts → mailboxes/egress-ownership.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{mailbox-egress-ownership.js → mailboxes/egress-ownership.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{egress-transport-readiness.d.ts → mailboxes/egress-transport-readiness.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{egress-transport-readiness.js → mailboxes/egress-transport-readiness.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-campaign-ramp.d.ts → mailboxes/email-campaign-ramp.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-campaign-ramp.js → mailboxes/email-campaign-ramp.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-infrastructure-policy.d.ts → mailboxes/email-infrastructure-policy.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-infrastructure-policy.js → mailboxes/email-infrastructure-policy.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{freemail-domains.d.ts → mailboxes/freemail-domains.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{freemail-domains.js → mailboxes/freemail-domains.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{mailbox-import.d.ts → mailboxes/import.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{directory.d.ts → marketing/directory.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{directory.js → marketing/directory.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{listed-website-platforms.d.ts → marketing/listed-website-platforms.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{newsletter-analytics.d.ts → marketing/newsletter-analytics.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{newsletter-analytics.js → marketing/newsletter-analytics.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{inbox-avatar-url.d.ts → messages/avatar-url.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{inbox-avatar-url.js → messages/avatar-url.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{conversation-lineage.d.ts → messages/conversation-lineage.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{conversation-lineage.js → messages/conversation-lineage.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-classification-scope.d.ts → messages/email-classification-scope.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-classification-scope.js → messages/email-classification-scope.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-message-deletion.d.ts → messages/linkedin-message-deletion.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{linkedin-message-deletion.js → messages/linkedin-message-deletion.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{call-outcomes.d.ts → sequences/call-outcomes.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{call-outcomes.js → sequences/call-outcomes.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{company-reply-pause.d.ts → sequences/company-reply-pause.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-crm-events.d.ts → sequences/crm-events.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-crm-events.js → sequences/crm-events.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{dial-guardrail-overrides.d.ts → sequences/dial-guardrail-overrides.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{dial-guardrail-overrides.js → sequences/dial-guardrail-overrides.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{dnc-identities.d.ts → sequences/dnc-identities.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{dnc-rules.d.ts → sequences/dnc-rules.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{dnc-rules.js → sequences/dnc-rules.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-delivery.d.ts → sequences/email-delivery.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-dsn.d.ts → sequences/email-dsn.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-dsn.js → sequences/email-dsn.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-hard-bounce.d.ts → sequences/email-hard-bounce.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{email-hard-bounce.js → sequences/email-hard-bounce.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-failures.d.ts → sequences/failures.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-lifecycle.d.ts → sequences/lifecycle.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-lifecycle.js → sequences/lifecycle.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{networks.d.ts → sequences/networks.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{networks.js → sequences/networks.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{suppression-entries.d.ts → sequences/suppression-entries.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-template.d.ts → sequences/template.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-template.js → sequences/template.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-terminal-events.d.ts → sequences/terminal-events.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{sequence-terminal-events.js → sequences/terminal-events.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workflow-mcp-tools.d.ts → workflows/mcp-tools.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workflow-mcp-tools.js → workflows/mcp-tools.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workflow-status-change.d.ts → workflows/status-change.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workflow-status-change.js → workflows/status-change.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workflow-trigger-label.d.ts → workflows/trigger-label.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workflow-trigger-label.js → workflows/trigger-label.js} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workflow-trigger-metadata.d.ts → workflows/trigger-metadata.d.ts} +0 -0
- /package/node_modules/@oxygen/shared/dist/{workflow-trigger-metadata.js → workflows/trigger-metadata.js} +0 -0
package/README.md
CHANGED
package/dist/browser-login.js
CHANGED
|
@@ -4,7 +4,7 @@ import { createServer } from "node:http";
|
|
|
4
4
|
import { hostname } from "node:os";
|
|
5
5
|
import { OXYGEN_VERSION } from "@oxygen/shared/version";
|
|
6
6
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
7
|
-
import { deriveCliLoginConfirmationCode } from "@oxygen/shared/cli-login-code";
|
|
7
|
+
import { deriveCliLoginConfirmationCode } from "@oxygen/shared/auth/cli-login-code";
|
|
8
8
|
import { sleep } from "@oxygen/shared/timing";
|
|
9
9
|
import { requestOxygen } from "./http-client.js";
|
|
10
10
|
import { readErrorMessage } from "./util.js";
|
package/dist/cli-output.js
CHANGED
|
@@ -6,7 +6,7 @@ import { formatMailboxRampNotice } from "./mailbox-ramp-notice.js";
|
|
|
6
6
|
import { formatSearchAiFilterTotalsNotice } from "./search-ai-filter-notice.js";
|
|
7
7
|
import { isRecord } from "./util.js";
|
|
8
8
|
import { exitCodeForOxygenError, OxygenError, success, toFailure } from "@oxygen/shared/cli-result";
|
|
9
|
-
import { renderLineageDigest } from "@oxygen/shared/conversation-lineage";
|
|
9
|
+
import { renderLineageDigest } from "@oxygen/shared/messages/conversation-lineage";
|
|
10
10
|
export function writeJson(value) {
|
|
11
11
|
process.stdout.write(serializeCliJson(value, process.argv.includes("--pretty")));
|
|
12
12
|
}
|
package/dist/command-manifest.js
CHANGED
|
@@ -202,6 +202,7 @@ const MUTATING_COMMANDS = new Set([
|
|
|
202
202
|
// zero-credit. Keep those exceptions exact so discovery never invents spend.
|
|
203
203
|
const ZERO_CREDIT_APPROVAL_COMMANDS = new Set([
|
|
204
204
|
"domains forwarding set",
|
|
205
|
+
"domains forwarding clear",
|
|
205
206
|
"domains web-presence set", "domains web-presence bulk", "domains web-presence check",
|
|
206
207
|
"domains web-presence reconcile", "domains web-presence defaults-set",
|
|
207
208
|
"domains web-presence destination-add", "domains web-presence destination-check",
|
|
@@ -298,6 +299,13 @@ const READ_ONLY_COMMANDS = new Set([
|
|
|
298
299
|
// invocation still previews, so machine-readable discovery must not imply that
|
|
299
300
|
// calling the command without its confirmation flag writes anything.
|
|
300
301
|
const PREVIEW_BY_DEFAULT_COMMANDS = new Set([
|
|
302
|
+
"domains forwarding set",
|
|
303
|
+
"domains forwarding clear",
|
|
304
|
+
"domains web-presence set",
|
|
305
|
+
"domains web-presence bulk",
|
|
306
|
+
"domains web-presence destination-add",
|
|
307
|
+
"domains web-presence destination-publish",
|
|
308
|
+
"domains web-presence destination-remove",
|
|
301
309
|
"custom-integrations remove",
|
|
302
310
|
// A bare call validates and names what would be sent; --approved submits.
|
|
303
311
|
"voice verification submit",
|
package/dist/command-support.js
CHANGED
|
@@ -12,7 +12,7 @@ import { formatCellForDisplay } from "@oxygen/shared/cell-format";
|
|
|
12
12
|
import { OxygenError, success } from "@oxygen/shared/cli-result";
|
|
13
13
|
import { COLLAB_SUBJECT_KINDS, SUBJECT_PATH_FORMS_PROSE, formatSubjectPath, parseSubjectPath, parseSubjectRef } from "@oxygen/shared/collab";
|
|
14
14
|
import { tableRunSummary } from "@oxygen/shared/table-run-summary";
|
|
15
|
-
import { describeWorkflowStatusChange, parseWorkflowStatusChange } from "@oxygen/shared/
|
|
15
|
+
import { describeWorkflowStatusChange, parseWorkflowStatusChange } from "@oxygen/shared/workflows/status-change";
|
|
16
16
|
import { createHash } from "node:crypto";
|
|
17
17
|
import { readFileSync } from "node:fs";
|
|
18
18
|
import { readFile } from "node:fs/promises";
|
package/dist/commands/admin.js
CHANGED
|
@@ -5,7 +5,7 @@ import { buildDirectoryProfileBody, readCsvOption, readPositiveInteger } from ".
|
|
|
5
5
|
import { requestOxygen } from "../http-client.js";
|
|
6
6
|
import { readOption } from "../util.js";
|
|
7
7
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
8
|
-
import { AGENCY_DIRECTORY_REGIONS, AGENCY_DIRECTORY_SERVICES } from "@oxygen/shared/directory";
|
|
8
|
+
import { AGENCY_DIRECTORY_REGIONS, AGENCY_DIRECTORY_SERVICES } from "@oxygen/shared/marketing/directory";
|
|
9
9
|
import { Command, Option } from "commander";
|
|
10
10
|
/** A --value for the pricing book: a number, true/false for a charge's active flag, or "none" for no plan limit. */
|
|
11
11
|
function readPriceBookValue(raw) {
|
|
@@ -2,7 +2,7 @@ import { buildDirectoryProfileBody } from "../command-support.js";
|
|
|
2
2
|
import { requestOxygen } from "../http-client.js";
|
|
3
3
|
import { readOption } from "../util.js";
|
|
4
4
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
5
|
-
import { AGENCY_DIRECTORY_REGIONS, AGENCY_DIRECTORY_SERVICES } from "@oxygen/shared/directory";
|
|
5
|
+
import { AGENCY_DIRECTORY_REGIONS, AGENCY_DIRECTORY_SERVICES } from "@oxygen/shared/marketing/directory";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { readFile } from "node:fs/promises";
|
|
8
8
|
import { basename, extname } from "node:path";
|
package/dist/commands/domains.js
CHANGED
|
@@ -14,14 +14,18 @@ function websiteCommands(handleAsyncAction) {
|
|
|
14
14
|
const command = new Command(action).description(`Read ${action === "get" ? "configured website and observed redirects" : action === "destinations" ? "website verification status and exact TXT records" : action}. Zero credits.`)
|
|
15
15
|
.option("--json", "Print a JSON envelope.");
|
|
16
16
|
if (action === "get")
|
|
17
|
-
command.argument("<domain>");
|
|
17
|
+
command.argument("<domain>", "Sending domain connected to this workspace.");
|
|
18
|
+
if (action === "health")
|
|
19
|
+
command.argument("[domain]", "Read one domain's saved health; omit for fleet totals and observations.");
|
|
18
20
|
if (action === "plan")
|
|
19
21
|
command.argument("<plan-id>");
|
|
20
22
|
command.action(async (...args) => {
|
|
21
|
-
const options = args[action === "get" || action === "plan" ? 1 : 0];
|
|
23
|
+
const options = args[action === "get" || action === "plan" || action === "health" ? 1 : 0];
|
|
22
24
|
const query = new URLSearchParams({ action });
|
|
23
25
|
if (action === "get")
|
|
24
26
|
query.set("domain", String(args[0]));
|
|
27
|
+
if (action === "health" && args[0] !== undefined)
|
|
28
|
+
query.set("domain", String(args[0]));
|
|
25
29
|
if (action === "plan")
|
|
26
30
|
query.set("plan_id", String(args[0]));
|
|
27
31
|
await handleAsyncAction(`domains web-presence ${action}`, options, () => requestOxygen(`/api/cli/domains/web-presence?${query}`));
|
|
@@ -59,7 +63,7 @@ function websiteCommands(handleAsyncAction) {
|
|
|
59
63
|
if (action === "reconcile")
|
|
60
64
|
command.requiredOption("--plan-id <id>", "Saved plan ID; never repeats its provider writes.");
|
|
61
65
|
if (action === "set")
|
|
62
|
-
command.argument("<domain>");
|
|
66
|
+
command.argument("<domain>", "Sending domain connected to this workspace.");
|
|
63
67
|
if (action.startsWith("destination"))
|
|
64
68
|
command.argument("<root>", "Destination root domain.");
|
|
65
69
|
command.action(async (...args) => {
|
|
@@ -2,7 +2,7 @@ import { requestOxygen } from "../http-client.js";
|
|
|
2
2
|
import { contentBody, readRevisionFlag, readSequence } from "../sequences-content-commands.js";
|
|
3
3
|
import { readOption } from "../util.js";
|
|
4
4
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
5
|
-
import { sequenceContentStep } from "@oxygen/shared/sequences";
|
|
5
|
+
import { sequenceContentStep } from "@oxygen/shared/sequences/sequences";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
async function saveTemplate(options) {
|
|
8
8
|
const fromDocument = readOption(options.fromDocument);
|
|
@@ -6,7 +6,7 @@ import { readOption } from "../util.js";
|
|
|
6
6
|
import { withDeliverabilityEvidenceCommands } from "../deliverability-evidence-commands.js";
|
|
7
7
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
8
8
|
import { inferRowsFileFormat, parseXlsxWorkbookBuffer } from "@oxygen/shared/tables/file-import";
|
|
9
|
-
import { MAILBOX_IMPORT_FILE_MAX_BYTES as SHARED_MAILBOX_IMPORT_FILE_MAX_BYTES, MAILBOX_IMPORT_ROW_LIMIT as SHARED_MAILBOX_IMPORT_ROW_LIMIT, normalizeMailboxImportFile as normalizeSharedMailboxImportFile, normalizeMailboxImportVendor as normalizeSharedMailboxImportVendor, normalizeMailboxWorkbookRows, parseMailboxImportText, summarizeMailboxImportValidation as summarizeSharedMailboxImportValidation } from "@oxygen/shared/
|
|
9
|
+
import { MAILBOX_IMPORT_FILE_MAX_BYTES as SHARED_MAILBOX_IMPORT_FILE_MAX_BYTES, MAILBOX_IMPORT_ROW_LIMIT as SHARED_MAILBOX_IMPORT_ROW_LIMIT, normalizeMailboxImportFile as normalizeSharedMailboxImportFile, normalizeMailboxImportVendor as normalizeSharedMailboxImportVendor, normalizeMailboxWorkbookRows, parseMailboxImportText, summarizeMailboxImportValidation as summarizeSharedMailboxImportValidation } from "@oxygen/shared/mailboxes/import";
|
|
10
10
|
import { Command, Option } from "commander";
|
|
11
11
|
import { formatMailboxFleetHealth, formatMailboxRoster } from "../mailbox-fleet-output.js";
|
|
12
12
|
import { readFileSync } from "node:fs";
|
package/dist/commands/posts.js
CHANGED
|
@@ -2,7 +2,7 @@ import { parseJsonArray, readFileIfPresent } from "../command-support.js";
|
|
|
2
2
|
import { requestOxygen } from "../http-client.js";
|
|
3
3
|
import { readOption } from "../util.js";
|
|
4
4
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
5
|
-
import { LINKEDIN_SENDER_LIMIT_DEFAULTS, LINKEDIN_SENDER_LIMIT_MAXIMUMS } from "@oxygen/shared/linkedin-sequences";
|
|
5
|
+
import { LINKEDIN_SENDER_LIMIT_DEFAULTS, LINKEDIN_SENDER_LIMIT_MAXIMUMS } from "@oxygen/shared/sequences/linkedin-sequences";
|
|
6
6
|
import { Command } from "commander";
|
|
7
7
|
import { readFileSync } from "node:fs";
|
|
8
8
|
import { resolve } from "node:path";
|
|
@@ -12,10 +12,10 @@ import { parseStartAtFlag } from "../sequence-start-at.js";
|
|
|
12
12
|
import { parseWorkingDaysOption } from "../sender-limits-flags.js";
|
|
13
13
|
import { isRecord, readOption } from "../util.js";
|
|
14
14
|
import { OxygenError, success } from "@oxygen/shared/cli-result";
|
|
15
|
-
import { COMPANY_REPLY_PAUSE_DEFAULT_STATUSES, COMPANY_REPLY_PAUSE_LEGACY_STATUSES, COMPANY_REPLY_PAUSE_STATUS_KEY_PATTERN } from "@oxygen/shared/company-reply-pause";
|
|
15
|
+
import { COMPANY_REPLY_PAUSE_DEFAULT_STATUSES, COMPANY_REPLY_PAUSE_LEGACY_STATUSES, COMPANY_REPLY_PAUSE_STATUS_KEY_PATTERN } from "@oxygen/shared/sequences/company-reply-pause";
|
|
16
16
|
import { SEQUENCE_ANALYTICS_READ_CONTRACT } from "@oxygen/shared/contracts/sequence-analytics-read";
|
|
17
17
|
import { SEQUENCE_LIST_PROJECTION_CONTRACT } from "@oxygen/shared/contracts/sequence-list";
|
|
18
|
-
import { SEQUENCE_LIFECYCLES, sequenceDisplayStatus } from "@oxygen/shared/
|
|
18
|
+
import { SEQUENCE_LIFECYCLES, sequenceDisplayStatus } from "@oxygen/shared/sequences/lifecycle";
|
|
19
19
|
import { Command, Option } from "commander";
|
|
20
20
|
import { readFileSync } from "node:fs";
|
|
21
21
|
import { resolve } from "node:path";
|
|
@@ -12,7 +12,7 @@ import { formatWorkflowPlanLimitNotices } from "../workflow-plan-limit-notices.j
|
|
|
12
12
|
import { WORKFLOW_RUN_LIST_FLAG_OVERLAY, readWorkflowRunListFlags } from "../workflow-run-list-flags.js";
|
|
13
13
|
import { OxygenError, success } from "@oxygen/shared/cli-result";
|
|
14
14
|
import { WORKFLOW_RUN_LIST_CONTRACT, workflowRunListQueryParams } from "@oxygen/shared/contracts/workflow-run-list";
|
|
15
|
-
import { MAX_MCP_TOOL_NAME_LENGTH, workflowMcpToolName } from "@oxygen/shared/
|
|
15
|
+
import { MAX_MCP_TOOL_NAME_LENGTH, workflowMcpToolName } from "@oxygen/shared/workflows/mcp-tools";
|
|
16
16
|
import { assertRecipeBundleSafe, assertPortableWorkflowDefinition, assertWorkflowGraphManifest, assertWorkflowManifest, buildRecipeManifest, compileWorkflowDefinition, isAnyWorkflowManifest, isRecipeManifest, isWorkflowDefinition, isWorkflowGraphManifest, isWorkflowManifest, hashPortableWorkflowGraphManifest, WORKFLOW_GRAPH_COMPILER_VERSION, WORKFLOW_GRAPH_MANIFEST_VERSION } from "@oxygen/workflows";
|
|
17
17
|
import { Command, Option } from "commander";
|
|
18
18
|
import { createHash, randomUUID } from "node:crypto";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// MCP tool and the route use too. This overlay only keeps the flag names and
|
|
4
4
|
// help text the command shipped with before the contract existed.
|
|
5
5
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
6
|
-
import { LINKEDIN_SENDER_LIMIT_DEFAULTS, LINKEDIN_SENDER_LIMIT_MAXIMUMS, linkedInSenderLimitCautionLevel, } from "@oxygen/shared/linkedin-sequences";
|
|
6
|
+
import { LINKEDIN_SENDER_LIMIT_DEFAULTS, LINKEDIN_SENDER_LIMIT_MAXIMUMS, linkedInSenderLimitCautionLevel, } from "@oxygen/shared/sequences/linkedin-sequences";
|
|
7
7
|
import { SENDER_LIMITS_PATCH_CONTRACT } from "@oxygen/shared/contracts/sender-limits";
|
|
8
8
|
import { WHATSAPP_SENDER_LIMIT_DEFAULTS, WHATSAPP_SENDER_LIMIT_KEYS, WHATSAPP_SENDER_LIMIT_MAXIMUMS, WHATSAPP_SENDER_LIMIT_NOTES, } from "@oxygen/shared/sequences/whatsapp-sender-limits";
|
|
9
9
|
import { readContractFlags } from "./contract-flags.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
2
|
-
import { parseSequenceStartAt } from "@oxygen/shared/
|
|
2
|
+
import { parseSequenceStartAt } from "@oxygen/shared/sequences/lifecycle";
|
|
3
3
|
const RELATIVE = /^in\s+(\d+)\s*(m|min|mins|minutes?|h|hr|hrs|hours?|d|days?)$/i;
|
|
4
4
|
const UNIT_MS = { m: 60_000, h: 3_600_000, d: 86_400_000 };
|
|
5
5
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { readFileSync } from "node:fs";
|
|
2
2
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
3
|
-
import { sequenceContentStep, withSequenceStepBodyDocument } from "@oxygen/shared/sequences";
|
|
3
|
+
import { sequenceContentStep, withSequenceStepBodyDocument } from "@oxygen/shared/sequences/sequences";
|
|
4
4
|
import { Command } from "commander";
|
|
5
5
|
import { parseJsonValue } from "./command-support.js";
|
|
6
6
|
import { requestOxygen } from "./http-client.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
2
|
-
import { NEWSLETTER_RECIPIENT_STATUSES, NEWSLETTER_TIMELINE_INTERVALS, isNewsletterRecipientStatus, isNewsletterTimelineInterval, } from "@oxygen/shared/newsletter-analytics";
|
|
2
|
+
import { NEWSLETTER_RECIPIENT_STATUSES, NEWSLETTER_TIMELINE_INTERVALS, isNewsletterRecipientStatus, isNewsletterTimelineInterval, } from "@oxygen/shared/marketing/newsletter-analytics";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { handleReadActionWithLens, renderTextTable } from "./command-support.js";
|
|
5
5
|
import { requestOxygen } from "./http-client.js";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { OxygenError } from "@oxygen/shared/cli-result";
|
|
2
|
-
import { NEWSLETTER_TEST_MAX_RECIPIENTS } from "@oxygen/shared/newsletter-test-send";
|
|
2
|
+
import { NEWSLETTER_TEST_MAX_RECIPIENTS } from "@oxygen/shared/marketing/newsletter-test-send";
|
|
3
3
|
import { Command } from "commander";
|
|
4
4
|
import { parseJsonValue } from "./command-support.js";
|
|
5
5
|
import { requestOxygen } from "./http-client.js";
|
|
@@ -54,7 +54,7 @@ export declare function cleanJobTitle(value: unknown): string | null;
|
|
|
54
54
|
export declare function splitDelimitedList(value: unknown, separator?: string | null): string[];
|
|
55
55
|
/**
|
|
56
56
|
* Consumer mailbox providers — a person, not a company domain. Re-exported from
|
|
57
|
-
* `@oxygen/shared/freemail-domains`, which is now the ONE list; this module used to
|
|
57
|
+
* `@oxygen/shared/mailboxes/freemail-domains`, which is now the ONE list; this module used to
|
|
58
58
|
* carry its own 101-entry copy and was the best-maintained of eight divergent forks.
|
|
59
59
|
* Its entries survive as the bulk of the shared broad tier.
|
|
60
60
|
*/
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* model. When a deterministic list is not enough, the paid verifier columns
|
|
10
10
|
* are the upgrade — these helpers are the free first pass.
|
|
11
11
|
*/
|
|
12
|
-
import { PERSONAL_EMAIL_DOMAINS } from "@oxygen/shared/freemail-domains";
|
|
12
|
+
import { PERSONAL_EMAIL_DOMAINS } from "@oxygen/shared/mailboxes/freemail-domains";
|
|
13
13
|
// ---------------------------------------------------------------------------
|
|
14
14
|
// Shared text helpers
|
|
15
15
|
// ---------------------------------------------------------------------------
|
|
@@ -282,7 +282,7 @@ export function splitDelimitedList(value, separator) {
|
|
|
282
282
|
// ---------------------------------------------------------------------------
|
|
283
283
|
/**
|
|
284
284
|
* Consumer mailbox providers — a person, not a company domain. Re-exported from
|
|
285
|
-
* `@oxygen/shared/freemail-domains`, which is now the ONE list; this module used to
|
|
285
|
+
* `@oxygen/shared/mailboxes/freemail-domains`, which is now the ONE list; this module used to
|
|
286
286
|
* carry its own 101-entry copy and was the best-maintained of eight divergent forks.
|
|
287
287
|
* Its entries survive as the bulk of the shared broad tier.
|
|
288
288
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { networkMiningEnabled } from "
|
|
1
|
+
import { networkMiningEnabled } from "../network-mining.js";
|
|
2
2
|
/** Dev reply testing: a model may prepare replies, but cannot approve a batch. */
|
|
3
3
|
export const REPLY_OXYGENT_TEMPLATE = "reply";
|
|
4
4
|
export const REPLY_BATCH_DEFAULT_SIZE = 10;
|
package/node_modules/@oxygen/shared/dist/{agent-session-schedule.js → agents/session-schedule.js}
RENAMED
|
@@ -5,8 +5,8 @@
|
|
|
5
5
|
// store, the web, the worker and a teammate's routine card all read it. Where
|
|
6
6
|
// the next cron time falls is the Workflows scheduler's answer
|
|
7
7
|
// (`nextCronRunAfter`), which this layer cannot import: hosts pass it in.
|
|
8
|
-
import { humanizeCronSchedule, isCronSyntax } from "
|
|
9
|
-
import { isValidTimeZone } from "
|
|
8
|
+
import { humanizeCronSchedule, isCronSyntax } from "../schedule-label.js";
|
|
9
|
+
import { isValidTimeZone } from "../zoned-time.js";
|
|
10
10
|
/** The fastest any session may wake, whichever kind of schedule it has. */
|
|
11
11
|
export const AGENT_SESSION_MIN_INTERVAL_MINUTES = 5;
|
|
12
12
|
const MAX_INTERVAL_MINUTES = 525_600;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { GuidedActivationRoutine } from "
|
|
2
|
-
import { type WorkspaceEventCatalogEntry } from "
|
|
3
|
-
import { type AgentSessionSchedule } from "./
|
|
1
|
+
import type { GuidedActivationRoutine } from "../onboarding/guided-activation.js";
|
|
2
|
+
import { type WorkspaceEventCatalogEntry } from "../workflows/workspace-event-catalog.js";
|
|
3
|
+
import { type AgentSessionSchedule } from "./session-schedule.js";
|
|
4
4
|
export type AgentSessionStatus = "draft" | "active" | "paused" | "budget_wait" | "completed" | "archived";
|
|
5
5
|
export type AgentSessionResources = {
|
|
6
6
|
sequences: string[];
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { agentsEnabled, agentsEnabledIn } from "
|
|
2
|
-
import { guidedActivationEnabled } from "
|
|
3
|
-
import { networkMiningEnabled } from "
|
|
4
|
-
import { validateContract } from "
|
|
5
|
-
import { GUIDED_ACTIVATION_SCAN_POLICY_CONTRACT } from "
|
|
6
|
-
import { isStaffEmail } from "
|
|
7
|
-
import { OxygenError } from "
|
|
8
|
-
import { RESEARCH_FINDING_ACTIVITY_TYPE } from "
|
|
9
|
-
import { servedWorkspaceEventCatalog, WORKSPACE_EVENT_CATALOG } from "
|
|
10
|
-
import { agentSessionScheduleProblem } from "./
|
|
1
|
+
import { agentsEnabled, agentsEnabledIn } from "../agents-enabled.js";
|
|
2
|
+
import { guidedActivationEnabled } from "../onboarding/guided-activation.js";
|
|
3
|
+
import { networkMiningEnabled } from "../network-mining.js";
|
|
4
|
+
import { validateContract } from "../contracts/schema.js";
|
|
5
|
+
import { GUIDED_ACTIVATION_SCAN_POLICY_CONTRACT } from "../contracts/guided-activation.js";
|
|
6
|
+
import { isStaffEmail } from "../staff.js";
|
|
7
|
+
import { OxygenError } from "../cli-result.js";
|
|
8
|
+
import { RESEARCH_FINDING_ACTIVITY_TYPE } from "../research-findings.js";
|
|
9
|
+
import { servedWorkspaceEventCatalog, WORKSPACE_EVENT_CATALOG } from "../workflows/workspace-event-catalog.js";
|
|
10
|
+
import { agentSessionScheduleProblem } from "./session-schedule.js";
|
|
11
11
|
/** The routine marker of a session's settings, or null for a general session. */
|
|
12
12
|
export function agentSessionTeammateRoutine(config) {
|
|
13
13
|
const marker = config.teammate_routine;
|
package/node_modules/@oxygen/shared/dist/{teammate-routines.d.ts → agents/teammate-routines.d.ts}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type AgentSessionConfig, type AgentSessionResources } from "./
|
|
2
|
-
import { type AgentSessionSchedule } from "./
|
|
1
|
+
import { type AgentSessionConfig, type AgentSessionResources } from "./sessions.js";
|
|
2
|
+
import { type AgentSessionSchedule } from "./session-schedule.js";
|
|
3
3
|
export declare const TEAMMATE_PROPOSE_ROUTINE_TOOL_NAME = "propose_routine";
|
|
4
4
|
/** The runtime tool a routine's run reports into its creator's chat with. */
|
|
5
5
|
export declare const TEAMMATE_ROUTINE_POST_UPDATE_TOOL_NAME = "post_update";
|
package/node_modules/@oxygen/shared/dist/{teammate-routines.js → agents/teammate-routines.js}
RENAMED
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
// one, the card that sets it up, and the routes that hold it. The proposal is
|
|
19
19
|
// kept in its wire shape (the tool's own input, plus an id), so what the tool
|
|
20
20
|
// stores is exactly what the projection reads back.
|
|
21
|
-
import { EMPTY_AGENT_SESSION_RESOURCES } from "./
|
|
22
|
-
import { describeAgentSessionSchedule } from "./
|
|
23
|
-
import { isCronSyntax } from "
|
|
24
|
-
import { isValidTimeZone } from "
|
|
21
|
+
import { EMPTY_AGENT_SESSION_RESOURCES } from "./sessions.js";
|
|
22
|
+
import { describeAgentSessionSchedule } from "./session-schedule.js";
|
|
23
|
+
import { isCronSyntax } from "../schedule-label.js";
|
|
24
|
+
import { isValidTimeZone } from "../zoned-time.js";
|
|
25
25
|
export const TEAMMATE_PROPOSE_ROUTINE_TOOL_NAME = "propose_routine";
|
|
26
26
|
/** The runtime tool a routine's run reports into its creator's chat with. */
|
|
27
27
|
export const TEAMMATE_ROUTINE_POST_UPDATE_TOOL_NAME = "post_update";
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { agentsEnabled, agentsEnabledIn } from "
|
|
2
|
-
import { guidedActivationEnabled } from "
|
|
3
|
-
import { isStaffEmail } from "
|
|
1
|
+
import { agentsEnabled, agentsEnabledIn } from "../agents-enabled.js";
|
|
2
|
+
import { guidedActivationEnabled } from "../onboarding/guided-activation.js";
|
|
3
|
+
import { isStaffEmail } from "../staff.js";
|
|
4
4
|
export function teammatesAudience(env = process.env) {
|
|
5
5
|
if (env.OXYGEN_DEPLOY_ENV !== "selfhost-dev" && env.OXYGEN_DEPLOY_ENV !== "selfhost-prod")
|
|
6
6
|
return "off";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CREDITS_PER_USD as SNAPSHOT_CREDITS_PER_USD, PRICING_PLAN_SNAPSHOT, MANAGED_INBOX_CREDITS_PER_MONTH as SNAPSHOT_MANAGED_MAILBOX_CREDITS_PER_MONTH, SENDING_MAILBOX_CREDITS_PER_MONTH as SNAPSHOT_SENDING_MAILBOX_CREDITS_PER_MONTH, SENDING_ENTRA_MAILBOX_CREDITS_PER_MONTH, } from "./pricing-snapshot.generated.js";
|
|
2
|
-
import { isEntraMailbox } from "./email-infrastructure-policy.js";
|
|
2
|
+
import { isEntraMailbox } from "./mailboxes/email-infrastructure-policy.js";
|
|
3
3
|
import { currentSubscriptionGrantSlice, dueSubscriptionGrantSlices, } from "./billing-anchors.js";
|
|
4
4
|
import { freeTierEntitlementEnabled } from "./plan-capabilities.js";
|
|
5
5
|
import { AUTOMATION_STEP_CREDITS_REPRICING, AUTOMATION_STEPS_COUNT_TOWARD_RUN_CAP_REPRICING, isRepricingInForce, BYOK_PLATFORM_FEE_REPRICING, OXYGEN_49_BYOK_REPRICING, repricedValue, TOPUP_RATE_REPRICING, } from "./repricing.js";
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
export function isDomainWebsiteIntent(query) {
|
|
2
|
+
if (query === "web presence")
|
|
3
|
+
return true;
|
|
2
4
|
return /\b(domains?|website|sending|destination)\b/.test(query)
|
|
3
5
|
&& /\b(mask(?:ing)?|neutral relay|web presence|web root|forwarding|captcha|tls|522|525|website (?:mode|defaults?|health))\b/.test(query);
|
|
4
6
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { normalizeCompanyDncDomain, normalizeLinkedinCompanyUrl } from "./dnc-identities.js";
|
|
2
|
-
import { isListedWebsitePlatform } from "./listed-website-platforms.js";
|
|
1
|
+
import { normalizeCompanyDncDomain, normalizeLinkedinCompanyUrl } from "./sequences/dnc-identities.js";
|
|
2
|
+
import { isListedWebsitePlatform } from "./marketing/listed-website-platforms.js";
|
|
3
3
|
/**
|
|
4
4
|
* The company a search-result URL identifies: the company's own site, a
|
|
5
5
|
* LinkedIn organization page, or nothing for a platform page that merely lists
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* the route accepts; the route's own validators (working-hours rules, warm-up
|
|
5
5
|
* date parsing) still run after the contract.
|
|
6
6
|
*/
|
|
7
|
-
import { LINKEDIN_SENDER_LIMIT_DEFAULTS, LINKEDIN_SENDER_LIMIT_KEYS, LINKEDIN_SENDER_LIMIT_MAXIMUMS, linkedInSenderLimitCautionLevel, } from "../linkedin-sequences.js";
|
|
7
|
+
import { LINKEDIN_SENDER_LIMIT_DEFAULTS, LINKEDIN_SENDER_LIMIT_KEYS, LINKEDIN_SENDER_LIMIT_MAXIMUMS, linkedInSenderLimitCautionLevel, } from "../sequences/linkedin-sequences.js";
|
|
8
8
|
import { arr, bool, enumOf, int, nullable, obj, str } from "./schema.js";
|
|
9
9
|
/** Short MCP-facing notes; the CLI carries its own longer help per flag. */
|
|
10
10
|
const LIMIT_NOTES = {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TEAMMATE_GROUP_MAX_MEMBERS, TEAMMATE_GROUP_MAX_PEOPLE, TEAMMATE_GROUP_MIN_MEMBERS, TEAMMATE_GROUP_TITLE_MAX_CHARS } from "../teammate-groups.js";
|
|
2
|
-
import { TEAMMATE_SLUG_PATTERN } from "../teammate-messages.js";
|
|
3
|
-
import { TEAMMATE_TASK_LIMITS } from "../teammate-tasks.js";
|
|
4
|
-
import { NEW_TEAMMATE_NAME, TEAMMATE_AVATAR_COLORS, TEAMMATE_AVATAR_KEYS, TEAMMATE_DESCRIPTION_MAX_CHARS, TEAMMATE_NAME_MAX_CHARS, TEAMMATE_SHARE_ROLES, } from "../teammates.js";
|
|
1
|
+
import { TEAMMATE_GROUP_MAX_MEMBERS, TEAMMATE_GROUP_MAX_PEOPLE, TEAMMATE_GROUP_MIN_MEMBERS, TEAMMATE_GROUP_TITLE_MAX_CHARS } from "../agents/teammate-groups.js";
|
|
2
|
+
import { TEAMMATE_SLUG_PATTERN } from "../agents/teammate-messages.js";
|
|
3
|
+
import { TEAMMATE_TASK_LIMITS } from "../agents/teammate-tasks.js";
|
|
4
|
+
import { NEW_TEAMMATE_NAME, TEAMMATE_AVATAR_COLORS, TEAMMATE_AVATAR_KEYS, TEAMMATE_DESCRIPTION_MAX_CHARS, TEAMMATE_NAME_MAX_CHARS, TEAMMATE_SHARE_ROLES, } from "../agents/teammates.js";
|
|
5
5
|
import { arr, bool, enumOf, int, obj, str } from "./schema.js";
|
|
6
6
|
/**
|
|
7
7
|
* AI teammates (ADR 0032), branded Oxygents: Agents with one ongoing chat,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { randomUUID } from "node:crypto";
|
|
2
|
-
import { mkdir, open, readFile, readdir, rename, stat, unlink, utimes, writeFile } from "node:fs/promises";
|
|
2
|
+
import { mkdir, open, opendir, readFile, readdir, rename, stat, unlink, utimes, writeFile } from "node:fs/promises";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { DIAGNOSTIC_MAX_BYTES, diagnosticId } from "./diagnostics.js";
|
|
5
5
|
import { acquireDiagnosticStorageLock } from "./diagnostic-storage-lock.js";
|
|
@@ -8,6 +8,12 @@ import { log } from "./log.js";
|
|
|
8
8
|
import { recordTelemetryCounter } from "./telemetry.js";
|
|
9
9
|
const admissions = new Map();
|
|
10
10
|
const RECEIPT_MAX_BYTES = 512;
|
|
11
|
+
/** The largest receipt any writer produces: two SHA-256 hex digests and a flag. */
|
|
12
|
+
const RECEIPT_BYTES = Buffer.byteLength(JSON.stringify({ sha256: "0".repeat(64), store: "0".repeat(64), published: false }));
|
|
13
|
+
/** Surveyed expiries confirmed under the mutex per inspection; the rest wait for the next one. */
|
|
14
|
+
const RECEIPT_EXPIRY_BATCH = 2_048;
|
|
15
|
+
const SPOOL_EXPIRY_MS = 72 * 60 * 60 * 1000;
|
|
16
|
+
const RECEIPT_NAME = /^[0-9a-f-]+\.receipt\.json$/;
|
|
11
17
|
/** A full scan bounds ledger drift (a crashed owner, a pre-ledger writer) and enforces expiry. */
|
|
12
18
|
const LEDGER_MAX_AGE_MS = 15_000;
|
|
13
19
|
/** This process's last full listing supplies retry candidates between scans. */
|
|
@@ -69,27 +75,41 @@ async function drainAdmissions(directory, queue) {
|
|
|
69
75
|
let published;
|
|
70
76
|
try {
|
|
71
77
|
// Bound actual cross-process contention, not local queue/inspection time (#5810).
|
|
72
|
-
release = await
|
|
73
|
-
|
|
74
|
-
throw new StorageFailure("lock", { code: "lock_timeout" });
|
|
75
|
-
const started = performance.now();
|
|
78
|
+
release = await lockAdmission(directory, 5_000);
|
|
79
|
+
let started = performance.now();
|
|
76
80
|
const reservedOnly = batch.every(admission => admission.progress && admission.reservation);
|
|
77
81
|
let files = queue.files ?? [];
|
|
78
82
|
let scanned = false;
|
|
83
|
+
let survey;
|
|
84
|
+
let receipts;
|
|
79
85
|
if (!reservedOnly) {
|
|
80
86
|
// A fresh shared ledger stands in for the full scan, which held this
|
|
81
87
|
// cross-process mutex ~1 s per batch at 24k retained files (2026-10-23).
|
|
82
|
-
const
|
|
88
|
+
const required = batch.reduce((sum, admission) => sum + admissionBytes(admission), 0);
|
|
89
|
+
let ledger = await readAdmissionLedger(directory, required);
|
|
90
|
+
if (!ledger) {
|
|
91
|
+
// Statting ~800k receipts held the mutex 6 s per scan (2026-10-28):
|
|
92
|
+
// survey them unlocked, then inspect within a fresh wait budget.
|
|
93
|
+
const owner = release;
|
|
94
|
+
release = null;
|
|
95
|
+
await owner();
|
|
96
|
+
survey = await surveyReceipts(directory);
|
|
97
|
+
release = await lockAdmission(directory, 5_000);
|
|
98
|
+
started = performance.now();
|
|
99
|
+
// Another replica may have inspected during the survey.
|
|
100
|
+
ledger = await readAdmissionLedger(directory, required);
|
|
101
|
+
}
|
|
83
102
|
if (ledger) {
|
|
84
103
|
queue.used = ledger.used;
|
|
85
104
|
queue.scannedAt = ledger.scanned_at;
|
|
86
105
|
queue.files = files = ledger.files;
|
|
87
106
|
}
|
|
88
107
|
else {
|
|
89
|
-
const inspected = await storageStage("inspect", () => inspectDiagnosticSpool(directory));
|
|
108
|
+
const inspected = await storageStage("inspect", () => inspectDiagnosticSpool(directory, survey));
|
|
90
109
|
queue.used = inspected.used;
|
|
91
110
|
queue.files = files = inspected.files;
|
|
92
111
|
queue.scannedAt = Date.now();
|
|
112
|
+
receipts = inspected.receipts;
|
|
93
113
|
scanned = true;
|
|
94
114
|
}
|
|
95
115
|
}
|
|
@@ -131,7 +151,8 @@ async function drainAdmissions(directory, queue) {
|
|
|
131
151
|
const waitMs = performance.now() - batch[0].enqueuedAt;
|
|
132
152
|
if (!reservedOnly && (scanned || waitMs >= 1_000))
|
|
133
153
|
log("info", "diagnostics.spool_admitted", { queue_role: diagnosticRole(), batch_records: batch.length, spool_files: files.length,
|
|
134
|
-
spool_bytes: queue.used, scan_ms: scanMs, admission_wait_ms: waitMs, inspection: scanned ? "scan" : "ledger"
|
|
154
|
+
spool_bytes: queue.used, scan_ms: scanMs, admission_wait_ms: waitMs, inspection: scanned ? "scan" : "ledger",
|
|
155
|
+
...(scanned ? { spool_receipts: receipts, survey_ms: survey?.ms ?? null } : {}) });
|
|
135
156
|
}
|
|
136
157
|
catch (error) {
|
|
137
158
|
for (const admission of batch)
|
|
@@ -156,6 +177,12 @@ async function drainAdmissions(directory, queue) {
|
|
|
156
177
|
admissions.delete(directory);
|
|
157
178
|
}
|
|
158
179
|
}
|
|
180
|
+
async function lockAdmission(directory, waitMs) {
|
|
181
|
+
const release = await storageStage("lock", () => acquireDiagnosticStorageLock(join(directory, ".admission.lock"), waitMs));
|
|
182
|
+
if (!release)
|
|
183
|
+
throw new StorageFailure("lock", { code: "lock_timeout" });
|
|
184
|
+
return release;
|
|
185
|
+
}
|
|
159
186
|
/** Include an upload receipt and its atomic replacement in admission. */
|
|
160
187
|
function admissionBytes(admission) {
|
|
161
188
|
return admission.reservation ? 0 : admission.progress ? RECEIPT_MAX_BYTES : admission.encoded.compressed.length + 2 * RECEIPT_MAX_BYTES;
|
|
@@ -273,7 +300,8 @@ export async function readUploadProgress(directory, id, storeFingerprint) {
|
|
|
273
300
|
}
|
|
274
301
|
async function writeUploadProgress(directory, record, progress, reservation) {
|
|
275
302
|
const bytes = Buffer.from(JSON.stringify(progress));
|
|
276
|
-
|
|
303
|
+
// Inspection counts receipts at this bound without statting them.
|
|
304
|
+
if (bytes.length > RECEIPT_BYTES)
|
|
277
305
|
throw new Error("Diagnostic upload receipt exceeds its bound");
|
|
278
306
|
if (reservation) {
|
|
279
307
|
// Caller owns the admission mutex. Exchange already-counted bytes for the
|
|
@@ -381,12 +409,19 @@ export async function retryDiagnosticSpool(directory, upload) {
|
|
|
381
409
|
({ files, reservation } = local.used === undefined ? { files: [] } : await reserveRetryBatch(directory, retained, local.used, local));
|
|
382
410
|
}
|
|
383
411
|
else {
|
|
412
|
+
// Each idle replica sweeps every 30 s: skip while admission is busy, and
|
|
413
|
+
// survey receipts between that probe and the inspection's own mutex hold.
|
|
414
|
+
const probe = await storageStage("lock", () => acquireDiagnosticStorageLock(join(directory, ".admission.lock")));
|
|
415
|
+
if (!probe)
|
|
416
|
+
return;
|
|
417
|
+
await probe();
|
|
418
|
+
const survey = await surveyReceipts(directory);
|
|
384
419
|
const admission = await storageStage("lock", () => acquireDiagnosticStorageLock(join(directory, ".admission.lock")));
|
|
385
420
|
if (!admission)
|
|
386
421
|
return;
|
|
387
422
|
try {
|
|
388
423
|
const scannedAt = Date.now();
|
|
389
|
-
const inspected = await storageStage("inspect", () => inspectDiagnosticSpool(directory));
|
|
424
|
+
const inspected = await storageStage("inspect", () => inspectDiagnosticSpool(directory, survey));
|
|
390
425
|
({ files, reservation } = await reserveRetryBatch(directory, inspected.files.slice(0, 20), inspected.used));
|
|
391
426
|
// Unreserved, any existing ledger still covers the spool; skip the extra mutex hold.
|
|
392
427
|
if (reservation)
|
|
@@ -425,11 +460,64 @@ export async function retryDiagnosticSpool(directory, upload) {
|
|
|
425
460
|
await release();
|
|
426
461
|
}
|
|
427
462
|
}
|
|
463
|
+
/**
|
|
464
|
+
* Stat receipts without the admission mutex. Every writer bounds a receipt to
|
|
465
|
+
* RECEIPT_BYTES and stamps its capture time, so the locked inspection counts a
|
|
466
|
+
* receipt at that bound (or its larger surveyed size) without a stat, and
|
|
467
|
+
* stats again only surveyed expiries before removing them. `opendir` streams
|
|
468
|
+
* the listing.
|
|
469
|
+
*/
|
|
470
|
+
async function surveyReceipts(directory) {
|
|
471
|
+
const started = performance.now();
|
|
472
|
+
const survey = { sizes: new Map(), expired: new Set(), ms: 0 };
|
|
473
|
+
const inspect = (names) => Promise.all(names.map(async (name) => {
|
|
474
|
+
const info = await stat(join(directory, name)).catch(error => { if (error?.code === "ENOENT")
|
|
475
|
+
return null; throw error; });
|
|
476
|
+
if (!info)
|
|
477
|
+
return;
|
|
478
|
+
if (Date.now() - info.mtimeMs >= SPOOL_EXPIRY_MS)
|
|
479
|
+
survey.expired.add(name);
|
|
480
|
+
if (info.size > RECEIPT_BYTES)
|
|
481
|
+
survey.sizes.set(name, info.size);
|
|
482
|
+
}));
|
|
483
|
+
try {
|
|
484
|
+
let batch = [];
|
|
485
|
+
for await (const entry of await opendir(directory, { bufferSize: 256 })) {
|
|
486
|
+
if (!RECEIPT_NAME.test(entry.name))
|
|
487
|
+
continue;
|
|
488
|
+
batch.push(entry.name);
|
|
489
|
+
if (batch.length === 64) {
|
|
490
|
+
await inspect(batch);
|
|
491
|
+
batch = [];
|
|
492
|
+
}
|
|
493
|
+
}
|
|
494
|
+
await inspect(batch);
|
|
495
|
+
}
|
|
496
|
+
catch {
|
|
497
|
+
return undefined;
|
|
498
|
+
} // The locked inspection then stats every receipt itself.
|
|
499
|
+
survey.ms = performance.now() - started;
|
|
500
|
+
return survey;
|
|
501
|
+
}
|
|
428
502
|
/** Caller holds admission lock; count retained bytes and expire actual filenames. */
|
|
429
|
-
async function inspectDiagnosticSpool(directory) {
|
|
503
|
+
async function inspectDiagnosticSpool(directory, survey) {
|
|
430
504
|
let used = 0;
|
|
505
|
+
let receipts = 0;
|
|
506
|
+
let confirmations = 0;
|
|
431
507
|
const retained = [];
|
|
432
|
-
const names =
|
|
508
|
+
const names = [];
|
|
509
|
+
for (const name of await readdir(directory)) {
|
|
510
|
+
if (RECEIPT_NAME.test(name)) {
|
|
511
|
+
receipts += 1;
|
|
512
|
+
if (survey && !(survey.expired.has(name) && confirmations++ < RECEIPT_EXPIRY_BATCH)) {
|
|
513
|
+
used += Math.max(RECEIPT_BYTES, survey.sizes.get(name) ?? 0);
|
|
514
|
+
continue;
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
else if (!/^[0-9a-f-]+\.json\.gz$/.test(name) && !/^[0-9a-f-]+(?:\.[0-9a-f-]+)?\.tmp$/.test(name))
|
|
518
|
+
continue;
|
|
519
|
+
names.push(name);
|
|
520
|
+
}
|
|
433
521
|
for (let offset = 0; offset < names.length; offset += 64) {
|
|
434
522
|
const inspected = await Promise.all(names.slice(offset, offset + 64).map(async (name) => {
|
|
435
523
|
const path = join(directory, name);
|
|
@@ -441,7 +529,7 @@ async function inspectDiagnosticSpool(directory) {
|
|
|
441
529
|
const record = /^[0-9a-f-]+\.json\.gz$/.test(name);
|
|
442
530
|
if (!info)
|
|
443
531
|
continue;
|
|
444
|
-
if (Date.now() - info.mtimeMs >=
|
|
532
|
+
if (Date.now() - info.mtimeMs >= SPOOL_EXPIRY_MS) {
|
|
445
533
|
const removed = await unlink(path).then(() => true).catch(error => { if (error?.code === "ENOENT")
|
|
446
534
|
return false; throw error; });
|
|
447
535
|
if (removed && !name.endsWith(".receipt.json") && !/^f\.[0-9a-f-]+\.tmp$/.test(name)) {
|
|
@@ -458,5 +546,5 @@ async function inspectDiagnosticSpool(directory) {
|
|
|
458
546
|
}
|
|
459
547
|
const files = retained.sort((a, b) => a.mtimeMs - b.mtimeMs || a.name.localeCompare(b.name)).map(file => file.name);
|
|
460
548
|
inspections.set(directory, { files, at: Date.now() });
|
|
461
|
-
return { used, files };
|
|
549
|
+
return { used, files, receipts };
|
|
462
550
|
}
|
|
@@ -53,7 +53,7 @@ export type FeatureGateResolution = {
|
|
|
53
53
|
* remote resolution would drag a flag client into the published CLI.
|
|
54
54
|
* - OXYGEN_TRIGGER_DEFAULT_CAPS — (b). Selects log-only vs enforce for the
|
|
55
55
|
* plan-tier default per-delivery ceiling on autonomous triggers
|
|
56
|
-
* (`apps/worker/src/
|
|
56
|
+
* (`apps/worker/src/workflows/spend-cap.ts`). Remote control over spend
|
|
57
57
|
* ENFORCEMENT means an outage can uncap autonomous credit spend everywhere.
|
|
58
58
|
* - OXYGEN_BYOK_DAILY_CAPS — (b). Same, for BYOK per-provider daily caps
|
|
59
59
|
* (`packages/providers/src/provider-fetch.ts`) — external money on the
|
|
@@ -69,8 +69,8 @@ export type FeatureGateResolution = {
|
|
|
69
69
|
* flag service being reachable — and "the flag service is unreachable" is exactly
|
|
70
70
|
* the kind of incident during which you least want the fleet to move.
|
|
71
71
|
* - OXYGEN_AGENTS_ENABLED — (b). Authorizes autonomous Agent run execution —
|
|
72
|
-
* tool authority AND credit spend (`apps/web/src/lib/
|
|
73
|
-
* `apps/worker/src/
|
|
72
|
+
* tool authority AND credit spend (`apps/web/src/lib/agents/runtime.ts`,
|
|
73
|
+
* `apps/worker/src/agents/cycle.ts`). Same class as publishing.
|
|
74
74
|
* - OXYGEN_AGENTS_WORKSPACE_IDS — (b). Which workspaces the "staff" stage of
|
|
75
75
|
* that execution may run in (`packages/shared/src/agents-enabled.ts`);
|
|
76
76
|
* production also requires its reviewed PRODUCTION_AGENT_WORKSPACE_IDS.
|