@oxygen-agent/cli 1.1025.2 → 1.1026.33
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/node_modules/@oxygen/shared/dist/access/roles.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/access/roles.js +1 -1
- package/node_modules/@oxygen/shared/dist/capability-intents/collaboration.js +1 -1
- package/node_modules/@oxygen/shared/dist/capability-routes/collaboration.js +1 -1
- package/node_modules/@oxygen/shared/dist/geo/geo.d.ts +1 -1
- package/node_modules/@oxygen/shared/dist/geo/geo.js +13 -6
- package/node_modules/@oxygen/shared/dist/sequences/email-subscriptions.d.ts +10 -3
- package/node_modules/@oxygen/shared/dist/sequences/email-subscriptions.js +25 -7
- 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/workflows/dist/graph/lint.js +13 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -23,7 +23,7 @@ export declare const WORKSPACE_ROLES: readonly [{
|
|
|
23
23
|
}, {
|
|
24
24
|
readonly id: "rep";
|
|
25
25
|
readonly label: "Sales rep";
|
|
26
|
-
readonly summary: "Works their pipeline: finds and enriches leads, works the CRM and Unibox, adds leads to sequences
|
|
26
|
+
readonly summary: "Works their pipeline: finds and enriches leads, works the CRM and Unibox, adds leads to sequences, uses Copilot and Oxygents and builds dashboards. Doesn't build or set up anything else.";
|
|
27
27
|
readonly permissions: readonly ["self_service", "workspace.read", "collab.participate", "dashboards.edit", "credits.spend", "copilot.use", "research.run", "tables.work", "crm.edit", "messages.send", "sequences.enroll", "senders.connect"];
|
|
28
28
|
}, {
|
|
29
29
|
readonly id: "viewer";
|
|
@@ -49,7 +49,7 @@ export const WORKSPACE_ROLES = [
|
|
|
49
49
|
{
|
|
50
50
|
id: "rep",
|
|
51
51
|
label: "Sales rep",
|
|
52
|
-
summary: "Works their pipeline: finds and enriches leads, works the CRM and Unibox, adds leads to sequences
|
|
52
|
+
summary: "Works their pipeline: finds and enriches leads, works the CRM and Unibox, adds leads to sequences, uses Copilot and Oxygents and builds dashboards. Doesn't build or set up anything else.",
|
|
53
53
|
permissions: REP_PERMISSIONS,
|
|
54
54
|
},
|
|
55
55
|
{
|
|
@@ -15,7 +15,7 @@ export function collaborationRecommendation(query) {
|
|
|
15
15
|
if (workspace && member && roleWrite && /\b(roles?|admin|administrator)\b/.test(query))
|
|
16
16
|
return {
|
|
17
17
|
tools: ["oxygen_members_workspace_role_set", ...memberRead.tools], commands: ["orgs member-role", ...memberRead.commands],
|
|
18
|
-
execution: "An admin changes a member's workspace role in Clerk before Oxygen mirrors it. Self-role changes and the last administrator are protected;
|
|
18
|
+
execution: "An admin changes a member's workspace role in Clerk before Oxygen mirrors it. Self-role changes and the last administrator are protected; `members role` also sets sales rep, viewer and client. Free.", posture: "workspace_write",
|
|
19
19
|
};
|
|
20
20
|
if (((workspace && member) || clientRole || /\bwho is in (?:my|our|this|the) workspace\b/.test(query))
|
|
21
21
|
&& !/\b(invite|add|delete|cancel|enable|disable|set|change|grant|clear|remove|revoke|restrict|promote|demote)\b/.test(query))
|
|
@@ -9,7 +9,7 @@ export const route = {
|
|
|
9
9
|
id: "collaboration",
|
|
10
10
|
layer: "Control",
|
|
11
11
|
primitive: null,
|
|
12
|
-
owns: "Threaded internal comments on any workspace object, second-party approval requests, the opt-in gate that blocks a live action until approved, and
|
|
12
|
+
owns: "Threaded internal comments on any workspace object, second-party approval requests, the opt-in gate that blocks a live action until approved, and workspace roles (admin, member, sales rep, viewer, client).",
|
|
13
13
|
notFor: "Public comments on a published post (Posts/Publishing), the artifact itself, or a run's own approval card — those belong to their owning primitive.",
|
|
14
14
|
execution: "Comment or request a decision on a subject reference (`<kind>:<id>`); an admin arms the gate, and the owning primitive refuses its live path until an approval lands.",
|
|
15
15
|
posture: "workspace_write",
|
|
@@ -31,7 +31,7 @@ export type GeoPrompt = {
|
|
|
31
31
|
revision: number;
|
|
32
32
|
};
|
|
33
33
|
/** Raises when extraction rules change; older stored answers are re-derived on read. */
|
|
34
|
-
export declare const GEO_EXTRACTION_VERSION =
|
|
34
|
+
export declare const GEO_EXTRACTION_VERSION = 4;
|
|
35
35
|
export declare const GEO_DOMAIN_TYPES: readonly ["owned", "competitor", "corporate", "editorial", "institutional", "ugc", "reference", "other"];
|
|
36
36
|
export type GeoDomainType = (typeof GEO_DOMAIN_TYPES)[number];
|
|
37
37
|
export declare const GEO_PAGE_TYPES: readonly ["homepage", "category", "product", "listicle", "comparison", "profile", "alternative", "discussion", "how_to", "article", "other"];
|
|
@@ -10,7 +10,7 @@ export const GEO_ENGINES = [
|
|
|
10
10
|
"claude",
|
|
11
11
|
];
|
|
12
12
|
/** Raises when extraction rules change; older stored answers are re-derived on read. */
|
|
13
|
-
export const GEO_EXTRACTION_VERSION =
|
|
13
|
+
export const GEO_EXTRACTION_VERSION = 4;
|
|
14
14
|
export const GEO_DOMAIN_TYPES = [
|
|
15
15
|
"owned",
|
|
16
16
|
"competitor",
|
|
@@ -77,11 +77,17 @@ export function geoDomain(value) {
|
|
|
77
77
|
return null;
|
|
78
78
|
}
|
|
79
79
|
}
|
|
80
|
-
|
|
80
|
+
/**
|
|
81
|
+
* A name written with capitals matches only as written, so "Outreach" or
|
|
82
|
+
* "Close" is not the common word; an all-lowercase name ("lemlist") and every
|
|
83
|
+
* domain match in any case.
|
|
84
|
+
*/
|
|
85
|
+
function matchedTerm(text, term, kind = "name") {
|
|
81
86
|
const escaped = term.trim().replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
82
87
|
if (!escaped)
|
|
83
88
|
return -1;
|
|
84
|
-
const
|
|
89
|
+
const exactCase = kind === "name" && /\p{Lu}/u.test(term);
|
|
90
|
+
const match = new RegExp(`(^|[^\\p{L}\\p{N}])(${escaped})(?=$|[^\\p{L}\\p{N}])`, exactCase ? "u" : "iu").exec(text);
|
|
85
91
|
return match ? match.index + (match[1]?.length ?? 0) : -1;
|
|
86
92
|
}
|
|
87
93
|
function belongsTo(domain, subject) {
|
|
@@ -217,9 +223,10 @@ export function analyzeGeoAnswer(text, brand, competitors, urls, citedUrls = [])
|
|
|
217
223
|
});
|
|
218
224
|
const subjects = [brand, ...competitors];
|
|
219
225
|
const detected = subjects.map((subject) => {
|
|
220
|
-
const indices = [
|
|
221
|
-
.map((term) => matchedTerm(prose, term))
|
|
222
|
-
.
|
|
226
|
+
const indices = [
|
|
227
|
+
...[subject.name, ...subject.aliases].map((term) => matchedTerm(prose, term)),
|
|
228
|
+
...subject.domains.map((domain) => matchedTerm(prose, domain, "domain")),
|
|
229
|
+
].filter((index) => index >= 0);
|
|
223
230
|
const first = indices.length ? Math.min(...indices) : -1;
|
|
224
231
|
let rank = null;
|
|
225
232
|
for (const line of prose.split("\n")) {
|
|
@@ -93,11 +93,18 @@ export type EmailContactImportRow = {
|
|
|
93
93
|
};
|
|
94
94
|
/** Parse CSV text into rows of cells, honouring quoted fields ("" escapes, commas and newlines inside quotes). */
|
|
95
95
|
export declare function parseCsvCells(text: string): string[][];
|
|
96
|
+
/** A full name as first and last: "Last, First" at its comma, else the first word, then the rest. */
|
|
97
|
+
export declare function splitFullName(fullName: string): {
|
|
98
|
+
first: string;
|
|
99
|
+
last: string;
|
|
100
|
+
};
|
|
96
101
|
/**
|
|
97
102
|
* Contacts from a CSV with an email column (the shape `subscriptions export`
|
|
98
|
-
* writes): first_name and last_name go to the person
|
|
99
|
-
*
|
|
100
|
-
*
|
|
103
|
+
* writes): first_name and last_name go to the person (headers like "First
|
|
104
|
+
* Name" read the same; a file with only a name or full_name column has it split
|
|
105
|
+
* at its first space, or "Last, First" at its comma), every other non-reserved column is a candidate
|
|
106
|
+
* property, named in `propertyColumns` so a caller can keep only the
|
|
107
|
+
* workspace's real properties.
|
|
101
108
|
*/
|
|
102
109
|
export declare function parseContactsCsv(text: string): {
|
|
103
110
|
entries: EmailContactImportRow[];
|
|
@@ -118,7 +118,7 @@ export function isEmailContactPropertyType(value) {
|
|
|
118
118
|
}
|
|
119
119
|
/** Header names an import reads as the contact itself (or as export bookkeeping), never as a property. */
|
|
120
120
|
const CONTACT_CSV_RESERVED = new Set([
|
|
121
|
-
"email", "email_address", "e-mail", "person_id", "first_name", "last_name", "full_name",
|
|
121
|
+
"email", "email_address", "e-mail", "person_id", "first_name", "last_name", "full_name", "name",
|
|
122
122
|
"status", "source", "subscribed_at", "unsubscribed_at", "consent_at", "consent_source", "consent_basis",
|
|
123
123
|
"consent_notice_version", "consent_form_url",
|
|
124
124
|
]);
|
|
@@ -164,15 +164,30 @@ export function parseCsvCells(text) {
|
|
|
164
164
|
rows.push(row);
|
|
165
165
|
return rows;
|
|
166
166
|
}
|
|
167
|
+
/** A CSV header as a key: "First Name", "first-name" and "first_name" read alike. */
|
|
168
|
+
function csvHeaderKey(cell) {
|
|
169
|
+
const key = cell.trim().toLowerCase();
|
|
170
|
+
return key === "e-mail" ? key : key.replace(/[\s-]+/g, "_");
|
|
171
|
+
}
|
|
172
|
+
/** A full name as first and last: "Last, First" at its comma, else the first word, then the rest. */
|
|
173
|
+
export function splitFullName(fullName) {
|
|
174
|
+
const comma = fullName.indexOf(",");
|
|
175
|
+
if (comma >= 0)
|
|
176
|
+
return { first: fullName.slice(comma + 1).trim(), last: fullName.slice(0, comma).trim() };
|
|
177
|
+
const words = fullName.trim().split(/\s+/).filter(Boolean);
|
|
178
|
+
return { first: words[0] ?? "", last: words.slice(1).join(" ") };
|
|
179
|
+
}
|
|
167
180
|
/**
|
|
168
181
|
* Contacts from a CSV with an email column (the shape `subscriptions export`
|
|
169
|
-
* writes): first_name and last_name go to the person
|
|
170
|
-
*
|
|
171
|
-
*
|
|
182
|
+
* writes): first_name and last_name go to the person (headers like "First
|
|
183
|
+
* Name" read the same; a file with only a name or full_name column has it split
|
|
184
|
+
* at its first space, or "Last, First" at its comma), every other non-reserved column is a candidate
|
|
185
|
+
* property, named in `propertyColumns` so a caller can keep only the
|
|
186
|
+
* workspace's real properties.
|
|
172
187
|
*/
|
|
173
188
|
export function parseContactsCsv(text) {
|
|
174
189
|
const [headerRow = [], ...body] = parseCsvCells(text);
|
|
175
|
-
const header = headerRow.map(
|
|
190
|
+
const header = headerRow.map(csvHeaderKey);
|
|
176
191
|
const emailIndex = header.findIndex((cell) => cell === "email" || cell === "email_address" || cell === "e-mail");
|
|
177
192
|
if (emailIndex < 0) {
|
|
178
193
|
throw new EmailSubscriptionInputError("invalid_request", "file", "The CSV needs an email column in its header row.");
|
|
@@ -181,13 +196,16 @@ export function parseContactsCsv(text) {
|
|
|
181
196
|
const personIndex = at("person_id");
|
|
182
197
|
const firstIndex = at("first_name");
|
|
183
198
|
const lastIndex = at("last_name");
|
|
199
|
+
// Only a whole name: split it, unless the file names first or last itself.
|
|
200
|
+
const fullIndex = firstIndex < 0 && lastIndex < 0 ? (at("full_name") >= 0 ? at("full_name") : at("name")) : -1;
|
|
184
201
|
const propertyColumns = header.flatMap((cell, index) => (cell && !CONTACT_CSV_RESERVED.has(cell) ? [{ key: cell, index }] : []));
|
|
185
202
|
const entries = body.map((cells) => {
|
|
186
203
|
const properties = Object.fromEntries(propertyColumns.flatMap(({ key, index }) => (cells[index] ? [[key, cells[index]]] : [])));
|
|
187
204
|
const read = (index) => (index >= 0 && cells[index] ? cells[index] : undefined);
|
|
188
205
|
const personId = read(personIndex);
|
|
189
|
-
const
|
|
190
|
-
const
|
|
206
|
+
const split = splitFullName(read(fullIndex) ?? "");
|
|
207
|
+
const firstName = read(firstIndex) ?? (split.first || undefined);
|
|
208
|
+
const lastName = read(lastIndex) ?? (split.last || undefined);
|
|
191
209
|
return {
|
|
192
210
|
email: cells[emailIndex] ?? "",
|
|
193
211
|
...(personId ? { person_id: personId } : {}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const OXYGEN_BUILD_VERSION = "1.
|
|
1
|
+
export declare const OXYGEN_BUILD_VERSION = "1.1026.33";
|
|
@@ -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.
|
|
2
|
+
export const OXYGEN_BUILD_VERSION = "1.1026.33";
|
|
@@ -49,7 +49,7 @@ export const OXYGEN_VERSION = OXYGEN_BUILD_VERSION;
|
|
|
49
49
|
// Since 2026-09-28 the release-preparation step advances this literal to the
|
|
50
50
|
// highest CLI version published on npm for at least 30 days. It never lowers
|
|
51
51
|
// the floor. The source change lands on dev before the next production release.
|
|
52
|
-
export const OXYGEN_MINIMUM_CLI_VERSION = "1.1011.
|
|
52
|
+
export const OXYGEN_MINIMUM_CLI_VERSION = "1.1011.489";
|
|
53
53
|
// The internal GEO export first gains required pagination in this dev version.
|
|
54
54
|
// Earlier pilot clients would save a partial file without its continuation.
|
|
55
55
|
export const GEO_EXPORT_MINIMUM_CLI_VERSION = "1.1013.0";
|
|
@@ -1328,6 +1328,13 @@ value, path, add, scope) {
|
|
|
1328
1328
|
validateTemplatePaths(value.value, `${path}.value`, add, scope);
|
|
1329
1329
|
return;
|
|
1330
1330
|
case "ref":
|
|
1331
|
+
// A field the author has not picked yet is unfinished, not malformed: a
|
|
1332
|
+
// fresh loop's list starts empty. It keeps the draft saveable and blocks
|
|
1333
|
+
// only Publish (missing_value_ref is publish-only in the editor contract).
|
|
1334
|
+
if (typeof value.path === "string" && value.path.trim() === "") {
|
|
1335
|
+
add(`${path}.path`, "missing_value_ref", "Choose a value for this field.");
|
|
1336
|
+
return;
|
|
1337
|
+
}
|
|
1331
1338
|
if (!isNonEmptyString(value.path)) {
|
|
1332
1339
|
add(`${path}.path`, "invalid_value_ref", "Ref value ref requires a path.");
|
|
1333
1340
|
return;
|
|
@@ -1339,6 +1346,12 @@ value, path, add, scope) {
|
|
|
1339
1346
|
validateScopePath(value.path, `${path}.path`, add, scope);
|
|
1340
1347
|
return;
|
|
1341
1348
|
case "formula":
|
|
1349
|
+
// Same as an unpicked ref: switching a field to Formula is a step
|
|
1350
|
+
// towards writing one, not a corrupt manifest.
|
|
1351
|
+
if (typeof value.expression === "string" && value.expression.trim() === "") {
|
|
1352
|
+
add(`${path}.expression`, "missing_value_ref", "Write a formula for this field.");
|
|
1353
|
+
return;
|
|
1354
|
+
}
|
|
1342
1355
|
if (!isNonEmptyString(value.expression)) {
|
|
1343
1356
|
add(`${path}.expression`, "invalid_value_ref", "Formula value ref requires an expression.");
|
|
1344
1357
|
return;
|