@oxygen-agent/cli 1.1014.2101 → 1.1014.2110
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/commands/sequences.js +1 -1
- package/node_modules/@oxygen/shared/dist/product-analytics-events.d.ts +3 -1
- package/node_modules/@oxygen/shared/dist/product-analytics-events.js +3 -1
- package/node_modules/@oxygen/shared/dist/sequences.d.ts +18 -0
- package/node_modules/@oxygen/shared/dist/sequences.js +72 -0
- package/node_modules/@oxygen/shared/dist/version.generated.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/version.generated.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1789,7 +1789,7 @@ export function registerSequencesFamily(program, handleAsyncAction) {
|
|
|
1789
1789
|
.option("--activation-id <id>", "Guided activation UUID; requires --activation-revision and --expected-revision.")
|
|
1790
1790
|
.option("--activation-revision <revision>", "Current guided activation revision; requires --activation-id and --expected-revision.")
|
|
1791
1791
|
.option("--name <name>", "New human-readable sequence name.")
|
|
1792
|
-
.option("--steps-file <path>", "Path to a JSON file: { \"steps\": [...] } replacing the journey. Once started (paused included),
|
|
1792
|
+
.option("--steps-file <path>", "Path to a JSON file: { \"steps\": [...] } replacing the journey. Once started (paused included), existing wait steps may change days/hours/jitter_hours/working_days and existing steps may change their wording (templates, subjects, invite notes, A/B variant copy; queued unsent messages take the new wording): same step IDs, kinds, order and variant count (zero a delay, never delete its step). Connection-wait timeout_days/on_timeout/withdraw_on_timeout are draft-only; duplicate to change them after start. Copy supports {{column}} interpolation; every step also takes {{sender_first_name}} / {{sender_last_name}} / {{sender_full_name}} for the person who sends it, and email adds {{sender_email}} (a same-named row column wins). A `branch` can also route on the lead's data with a contact leaf { has_contact: \"email\" | \"linkedin\" | \"phone\" } or a data leaf { has_column: \"<key>\" } (present:false for \"missing\").")
|
|
1793
1793
|
.option("--channels <list>", "Draft only: comma-separated channels: linkedin,email,whatsapp,call,crm.")
|
|
1794
1794
|
.option("--whatsapp-cold-initiate", "WhatsApp: allow cold-initiating new chats (no prior conversation). Required to start a WhatsApp sequence live (draft-editable).")
|
|
1795
1795
|
.option("--no-whatsapp-cold-initiate", "WhatsApp: stop allowing cold chats; a live WhatsApp start then refuses.")
|
|
@@ -37,7 +37,9 @@ export declare const PRODUCT_EVENTS: {
|
|
|
37
37
|
/**
|
|
38
38
|
* Activation (Philipp, 2026-10-20): the person sent a play's prompt in their
|
|
39
39
|
* onboarding chat, verified from the chat's turn when onboarding finishes.
|
|
40
|
-
*
|
|
40
|
+
* Since 2026-10-27 also a request they typed there after the proposed plays;
|
|
41
|
+
* `kind` is play or own_request. Once per (workspace, person), gated by
|
|
42
|
+
* `organizations.metadata.onboarding_play_sent`.
|
|
41
43
|
*/
|
|
42
44
|
readonly ONBOARDING_PLAY_SENT: "onboarding_play_sent";
|
|
43
45
|
/**
|
|
@@ -37,7 +37,9 @@ export const PRODUCT_EVENTS = {
|
|
|
37
37
|
/**
|
|
38
38
|
* Activation (Philipp, 2026-10-20): the person sent a play's prompt in their
|
|
39
39
|
* onboarding chat, verified from the chat's turn when onboarding finishes.
|
|
40
|
-
*
|
|
40
|
+
* Since 2026-10-27 also a request they typed there after the proposed plays;
|
|
41
|
+
* `kind` is play or own_request. Once per (workspace, person), gated by
|
|
42
|
+
* `organizations.metadata.onboarding_play_sent`.
|
|
41
43
|
*/
|
|
42
44
|
ONBOARDING_PLAY_SENT: "onboarding_play_sent",
|
|
43
45
|
/**
|
|
@@ -1012,6 +1012,24 @@ export declare function sequenceWaitStepReadyAt(step: SequenceWaitStep, enrollme
|
|
|
1012
1012
|
* to bypass, so its builder inserts and deletes waits freely.
|
|
1013
1013
|
*/
|
|
1014
1014
|
export declare function sequenceDefinitionsDifferOnlyInTiming(before: SequenceDefinition, after: SequenceDefinition): boolean;
|
|
1015
|
+
/**
|
|
1016
|
+
* Whether `after` differs from `before` only in wait timing and step wording
|
|
1017
|
+
* (templates, subjects, notes and their A/B variants). This is the edit a
|
|
1018
|
+
* started sequence accepts: the same steps in the same order and kinds, so every
|
|
1019
|
+
* enrollment's integer `current_step_index` still points at the step it meant
|
|
1020
|
+
* (see sequenceDefinitionsDifferOnlyInTiming), on the same channels. Changed
|
|
1021
|
+
* wording reaches queued actions through the dispatcher's copy replan
|
|
1022
|
+
* (sequenceStepCopyDigest).
|
|
1023
|
+
*/
|
|
1024
|
+
export declare function sequenceDefinitionsDifferOnlyInTimingOrCopy(before: SequenceDefinition, after: SequenceDefinition): boolean;
|
|
1025
|
+
/** Ids of the steps whose wording differs between two same-shaped definitions. */
|
|
1026
|
+
export declare function sequenceStepsWithChangedCopy(before: SequenceDefinition, after: SequenceDefinition): string[];
|
|
1027
|
+
/**
|
|
1028
|
+
* A short digest of a step's wording, stamped on each planned action. The
|
|
1029
|
+
* dispatcher compares it with the live step to find queued actions planned
|
|
1030
|
+
* before a copy edit. Not a security hash; it only has to change with the copy.
|
|
1031
|
+
*/
|
|
1032
|
+
export declare function sequenceStepCopyDigest(step: SequenceStep): string;
|
|
1015
1033
|
/**
|
|
1016
1034
|
* Render a sequence-copy template against a row's values. Delegates to the shared
|
|
1017
1035
|
* deterministic engine (sequence-template.ts): `{{column}}` substitution plus
|
|
@@ -2207,6 +2207,78 @@ export function sequenceDefinitionsDifferOnlyInTiming(before, after) {
|
|
|
2207
2207
|
return timingFree(oldStep) === timingFree(newStep);
|
|
2208
2208
|
});
|
|
2209
2209
|
}
|
|
2210
|
+
/** The wording fields of each step kind: what a started sequence may still edit. */
|
|
2211
|
+
const SEQUENCE_STEP_COPY_FIELDS = {
|
|
2212
|
+
invite: ["note_template"],
|
|
2213
|
+
message: ["template"],
|
|
2214
|
+
whatsapp_message: ["template"],
|
|
2215
|
+
inmail: ["subject_template", "template"],
|
|
2216
|
+
comment_post: ["text_template"],
|
|
2217
|
+
email_send: ["subject_template", "body_template", "body_html_template"],
|
|
2218
|
+
email_reply: ["body_template", "body_html_template"],
|
|
2219
|
+
};
|
|
2220
|
+
function withoutCopy(step) {
|
|
2221
|
+
const fields = { ...step };
|
|
2222
|
+
for (const key of SEQUENCE_STEP_COPY_FIELDS[step.kind] ?? [])
|
|
2223
|
+
delete fields[key];
|
|
2224
|
+
const variants = step.variants;
|
|
2225
|
+
// A/B variants carry only copy, so their number is what stays fixed: adding or
|
|
2226
|
+
// removing one moves live leads between arms of a running test.
|
|
2227
|
+
if (Array.isArray(variants))
|
|
2228
|
+
fields.variants = variants.length;
|
|
2229
|
+
// An email_send without a subject threads onto the previous email, so adding or
|
|
2230
|
+
// dropping the subject changes what the step does, not only what it says.
|
|
2231
|
+
if (step.kind === "email_send")
|
|
2232
|
+
fields.has_subject = Boolean(step.subject_template);
|
|
2233
|
+
return fields;
|
|
2234
|
+
}
|
|
2235
|
+
/**
|
|
2236
|
+
* Whether `after` differs from `before` only in wait timing and step wording
|
|
2237
|
+
* (templates, subjects, notes and their A/B variants). This is the edit a
|
|
2238
|
+
* started sequence accepts: the same steps in the same order and kinds, so every
|
|
2239
|
+
* enrollment's integer `current_step_index` still points at the step it meant
|
|
2240
|
+
* (see sequenceDefinitionsDifferOnlyInTiming), on the same channels. Changed
|
|
2241
|
+
* wording reaches queued actions through the dispatcher's copy replan
|
|
2242
|
+
* (sequenceStepCopyDigest).
|
|
2243
|
+
*/
|
|
2244
|
+
export function sequenceDefinitionsDifferOnlyInTimingOrCopy(before, after) {
|
|
2245
|
+
const oldSteps = Array.isArray(before?.steps) ? before.steps : [];
|
|
2246
|
+
const newSteps = Array.isArray(after?.steps) ? after.steps : [];
|
|
2247
|
+
return sequenceDefinitionsDifferOnlyInTiming({ ...before, steps: oldSteps.map((step) => withoutCopy(step)) }, { ...after, steps: newSteps.map((step) => withoutCopy(step)) });
|
|
2248
|
+
}
|
|
2249
|
+
/** Ids of the steps whose wording differs between two same-shaped definitions. */
|
|
2250
|
+
export function sequenceStepsWithChangedCopy(before, after) {
|
|
2251
|
+
const previous = new Map((before?.steps ?? []).map((step) => [step.id, step]));
|
|
2252
|
+
return (after?.steps ?? []).flatMap((step) => {
|
|
2253
|
+
const old = previous.get(step.id);
|
|
2254
|
+
return old && old.kind === step.kind && sequenceStepCopyDigest(old) !== sequenceStepCopyDigest(step) ? [step.id] : [];
|
|
2255
|
+
});
|
|
2256
|
+
}
|
|
2257
|
+
/**
|
|
2258
|
+
* A short digest of a step's wording, stamped on each planned action. The
|
|
2259
|
+
* dispatcher compares it with the live step to find queued actions planned
|
|
2260
|
+
* before a copy edit. Not a security hash; it only has to change with the copy.
|
|
2261
|
+
*/
|
|
2262
|
+
export function sequenceStepCopyDigest(step) {
|
|
2263
|
+
const copy = {};
|
|
2264
|
+
for (const key of SEQUENCE_STEP_COPY_FIELDS[step.kind] ?? [])
|
|
2265
|
+
copy[key] = step[key];
|
|
2266
|
+
const variants = step.variants;
|
|
2267
|
+
if (Array.isArray(variants))
|
|
2268
|
+
copy.variants = variants;
|
|
2269
|
+
// cyrb53: a fast 53-bit string hash, plenty to tell two versions of a step apart.
|
|
2270
|
+
const text = stableJson(copy);
|
|
2271
|
+
let h1 = 0xdeadbeef;
|
|
2272
|
+
let h2 = 0x41c6ce57;
|
|
2273
|
+
for (let index = 0; index < text.length; index += 1) {
|
|
2274
|
+
const code = text.charCodeAt(index);
|
|
2275
|
+
h1 = Math.imul(h1 ^ code, 2654435761);
|
|
2276
|
+
h2 = Math.imul(h2 ^ code, 1597334677);
|
|
2277
|
+
}
|
|
2278
|
+
h1 = Math.imul(h1 ^ (h1 >>> 16), 2246822507) ^ Math.imul(h2 ^ (h2 >>> 13), 3266489909);
|
|
2279
|
+
h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);
|
|
2280
|
+
return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(36);
|
|
2281
|
+
}
|
|
2210
2282
|
/**
|
|
2211
2283
|
* Render a sequence-copy template against a row's values. Delegates to the shared
|
|
2212
2284
|
* deterministic engine (sequence-template.ts): `{{column}}` substitution plus
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OXYGEN_BUILD_VERSION = "1.1014.
|
|
1
|
+
export declare const OXYGEN_BUILD_VERSION = "1.1014.2110";
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
// GENERATED by scripts/ci/version-stamp.mjs from VERSION + git history. Do not edit; do not commit.
|
|
2
|
-
export const OXYGEN_BUILD_VERSION = "1.1014.
|
|
2
|
+
export const OXYGEN_BUILD_VERSION = "1.1014.2110";
|