@oxygen-agent/cli 1.1047.23 → 1.1048.13

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 CHANGED
@@ -34,4 +34,4 @@ oxygen update
34
34
 
35
35
  For product documentation, visit https://oxygen-agent.com/docs. For support, visit https://oxygen-agent.com.
36
36
 
37
- Version: 1.1047.23
37
+ Version: 1.1048.13
@@ -804,12 +804,13 @@ function buildPublishingContentBody(options, update) {
804
804
  ...(readOption(options.stage) ? { stage_id: readOption(options.stage) } : {}),
805
805
  ...(plannedAt ? { planned_at: plannedAt } : {}),
806
806
  ...(options.clearPlannedAt ? { planned_at: null } : {}),
807
+ ...(options.tags !== undefined ? { tags: splitCommaList(options.tags) } : {}),
807
808
  };
808
809
  if (update && Object.keys(body).length === 0) {
809
- throw new OxygenError("invalid_request", "Pass --name, --notes, --notes-file, --stage, --planned-at or --clear-planned-at.", { exitCode: 2 });
810
+ throw new OxygenError("invalid_request", "Pass --name, --notes, --notes-file, --stage, --planned-at, --clear-planned-at or --tags.", { exitCode: 2 });
810
811
  }
811
- if (!update && !options.name?.trim() && !(typeof notes === "string" && notes.trim())) {
812
- throw new OxygenError("invalid_request", "Pass --name or --notes.", { exitCode: 2 });
812
+ if (!update && Object.keys(body).length === 0) {
813
+ throw new OxygenError("invalid_request", "Pass --name, --notes, --stage, --planned-at or --tags.", { exitCode: 2 });
813
814
  }
814
815
  return body;
815
816
  }
@@ -1571,7 +1572,7 @@ export function registerPublishingFamily(program, handleAsyncAction) {
1571
1572
  });
1572
1573
  })))
1573
1574
  .addCommand(new Command("content")
1574
- .description("Posts as whole pieces of content on the board: name, stage, notes and planned date, with or without channel posts yet.")
1575
+ .description("Posts as whole pieces of content on the board: name, stage, notes, planned date and tags, with or without channel posts yet.")
1575
1576
  .addCommand(new Command("list")
1576
1577
  .description("List posts on the board with their stage, notes and channel posts, newest first.")
1577
1578
  .option("--without-channels", "Only posts with no channel post yet (ideas and notes-only posts).")
@@ -1603,12 +1604,13 @@ export function registerPublishingFamily(program, handleAsyncAction) {
1603
1604
  .option("--notes-file <path>", "Read the notes from a local file.")
1604
1605
  .option("--stage <stage_id>", "A planning stage (`publishing stages list`); default the first one.")
1605
1606
  .option("--planned-at <iso>", "When it is planned to go out (for the calendar); scheduling happens per channel post.")
1607
+ .option("--tags <csv>", "Workspace tags; channel posts written for it start with them.")
1606
1608
  .option("--json", "Print a JSON envelope.")
1607
1609
  .action(async (options) => {
1608
1610
  await handleAsyncAction("publishing content create", options, () => requestOxygen("/api/cli/publishing/content", { method: "POST", body: buildPublishingContentBody(options, false) }));
1609
1611
  }))
1610
1612
  .addCommand(new Command("update")
1611
- .description("Change a post's name, notes, planned date or planning stage. A name also renames every channel post. Review, Scheduled, Published and Cancelled follow approval and publishing.")
1613
+ .description("Change a post's name, notes, planned date, planning stage or tags. A name renames, and tags retag, every channel post. Review, Scheduled, Published and Cancelled follow approval and publishing.")
1612
1614
  .argument("<post_id>", "Post id, or any of its channel post ids.")
1613
1615
  .option("--name <name>", "New name; an empty string clears it.")
1614
1616
  .option("--notes <text>", "Replace the notes; an empty string clears them.")
@@ -1616,6 +1618,7 @@ export function registerPublishingFamily(program, handleAsyncAction) {
1616
1618
  .option("--stage <stage_id>", "Move to this planning stage.")
1617
1619
  .option("--planned-at <iso>", "New planned date.")
1618
1620
  .option("--clear-planned-at", "Remove the planned date.")
1621
+ .option("--tags <csv>", "Replace the post's tags (every channel post's too); an empty string clears them.")
1619
1622
  .option("--json", "Print a JSON envelope.")
1620
1623
  .action(async (postId, options) => {
1621
1624
  await handleAsyncAction("publishing content update", options, () => requestOxygen(`/api/cli/publishing/content/${encodeURIComponent(postId)}`, { method: "PATCH", body: buildPublishingContentBody(options, true) }));
@@ -167,32 +167,49 @@ export function geoInsights(answers, brand, topicOf) {
167
167
  }
168
168
  // Names are proper nouns: count capitalized spellings in every answer, cited or not.
169
169
  // A label prose also uses as a lowercase word ("cold", "enrich") counts only with
170
- // its domain suffix ("Cold.app"), so a heading word is not a brand.
170
+ // its domain suffix ("Cold.app"), so a heading word is not a brand. One pass per
171
+ // answer matches every vendor label at once.
172
+ const byLabel = new Map();
171
173
  for (const vendor of vendors.values()) {
172
174
  const label = vendor.domain.split(".")[0];
173
175
  if (label.length < 4)
174
176
  continue;
175
- const suffix = vendor.domain.slice(label.length);
176
- const pattern = new RegExp(`(?<![\\p{L}\\p{N}.])(${label.replace(/[-]/g, "[- ]?")})(${suffix.replace(/\./g, "\\.")})?(?![\\p{L}\\p{N}])`, "giu");
177
+ const key = label.replace(/-/g, "").toLowerCase();
178
+ byLabel.set(key, [...(byLabel.get(key) ?? []), vendor]);
179
+ }
180
+ if (byLabel.size) {
181
+ const labels = [...new Set([...vendors.values()].map((v) => v.domain.split(".")[0]).filter((l) => l.length >= 4))]
182
+ .sort((x, y) => y.length - x.length)
183
+ .map((label) => label.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/-/g, "[- ]?"));
184
+ const pattern = new RegExp(`(?<![\\p{L}\\p{N}.])(${labels.join("|")})((?:\\.[a-z]{2,10})+)?(?![\\p{L}\\p{N}])`, "giu");
177
185
  for (const answer of samples)
178
186
  for (const match of answer.text.matchAll(pattern)) {
179
- if (!/^\p{Lu}/u.test(match[0])) {
180
- if (!match[2])
181
- vendor.lowercase++;
182
- continue;
187
+ const candidates = byLabel.get(match[1].replace(/[- ]/g, "").toLowerCase()) ?? [];
188
+ for (const vendor of candidates) {
189
+ const suffix = vendor.domain.slice(vendor.domain.split(".")[0].length);
190
+ const suffixed = match[2]?.toLowerCase() === suffix;
191
+ if (match[2] && !suffixed)
192
+ continue;
193
+ const spelling = suffixed ? match[0] : match[1];
194
+ if (!/^\p{Lu}/u.test(spelling)) {
195
+ if (!suffixed)
196
+ vendor.lowercase++;
197
+ continue;
198
+ }
199
+ vendor.mentioned.add(answer.id);
200
+ if (suffixed)
201
+ vendor.suffixed.add(answer.id);
202
+ vendor.spellings.set(spelling, (vendor.spellings.get(spelling) ?? 0) + 1);
183
203
  }
184
- vendor.mentioned.add(answer.id);
185
- if (match[2])
186
- vendor.suffixed.add(answer.id);
187
- vendor.spellings.set(match[0], (vendor.spellings.get(match[0]) ?? 0) + 1);
188
204
  }
205
+ }
206
+ for (const vendor of vendors.values())
189
207
  if (vendor.lowercase >= 3) {
190
208
  vendor.mentioned = vendor.suffixed;
191
209
  for (const spelling of vendor.spellings.keys())
192
210
  if (!spelling.includes("."))
193
211
  vendor.spellings.delete(spelling);
194
212
  }
195
- }
196
213
  const tracked = new Set(samples.flatMap((answer) => answer.mentions.map((mention) => mention.brand.toLowerCase())).concat(brand.toLowerCase()));
197
214
  return {
198
215
  headline: geoHeadline(samples, brand),
@@ -1,3 +1,3 @@
1
1
  export declare const OXYGEN_VERSION: string;
2
- export declare const OXYGEN_MINIMUM_CLI_VERSION = "1.1014.1341";
2
+ export declare const OXYGEN_MINIMUM_CLI_VERSION = "1.1014.1451";
3
3
  export declare const GEO_EXPORT_MINIMUM_CLI_VERSION = "1.1013.0";
@@ -1 +1 @@
1
- export declare const OXYGEN_BUILD_VERSION = "1.1047.23";
1
+ export declare const OXYGEN_BUILD_VERSION = "1.1048.13";
@@ -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.1047.23";
2
+ export const OXYGEN_BUILD_VERSION = "1.1048.13";
@@ -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.1014.1341";
52
+ export const OXYGEN_MINIMUM_CLI_VERSION = "1.1014.1451";
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";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxygen-agent/cli",
3
- "version": "1.1047.23",
3
+ "version": "1.1048.13",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",