@oxygen-agent/cli 1.936.1 → 1.982.3

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.
Files changed (71) hide show
  1. package/README.md +1 -1
  2. package/dist/admin-primary-providers-render.js +9 -1
  3. package/dist/cli-values.d.ts +14 -0
  4. package/dist/cli-values.js +26 -0
  5. package/dist/command-manifest.js +30 -2
  6. package/dist/functions-commands.js +13 -5
  7. package/dist/help.js +2 -0
  8. package/dist/index.js +1509 -290
  9. package/dist/knowledge-repository-commands.d.ts +6 -0
  10. package/dist/knowledge-repository-commands.js +198 -0
  11. package/dist/skills.js +20 -0
  12. package/dist/ugc-commands.js +470 -15
  13. package/node_modules/@oxygen/recipe-sdk/dist/index.d.ts +2 -0
  14. package/node_modules/@oxygen/shared/dist/byok-connect.d.ts +11 -6
  15. package/node_modules/@oxygen/shared/dist/byok-connect.js +14 -6
  16. package/node_modules/@oxygen/shared/dist/capability-discovery.d.ts +8 -0
  17. package/node_modules/@oxygen/shared/dist/capability-discovery.js +152 -20
  18. package/node_modules/@oxygen/shared/dist/copilot-errors.js +3 -0
  19. package/node_modules/@oxygen/shared/dist/copilot-journeys.d.ts +19 -1
  20. package/node_modules/@oxygen/shared/dist/copilot-journeys.generated.d.ts +19 -0
  21. package/node_modules/@oxygen/shared/dist/copilot-journeys.generated.js +26 -0
  22. package/node_modules/@oxygen/shared/dist/copilot-journeys.js +8 -41
  23. package/node_modules/@oxygen/shared/dist/email-dsn.d.ts +60 -0
  24. package/node_modules/@oxygen/shared/dist/email-dsn.js +120 -0
  25. package/node_modules/@oxygen/shared/dist/email-warmup-readiness.d.ts +64 -0
  26. package/node_modules/@oxygen/shared/dist/email-warmup-readiness.js +90 -0
  27. package/node_modules/@oxygen/shared/dist/inbox-avatar-url.d.ts +28 -0
  28. package/node_modules/@oxygen/shared/dist/inbox-avatar-url.js +57 -0
  29. package/node_modules/@oxygen/shared/dist/index.d.ts +10 -0
  30. package/node_modules/@oxygen/shared/dist/index.js +10 -0
  31. package/node_modules/@oxygen/shared/dist/knowledge-bases.d.ts +74 -0
  32. package/node_modules/@oxygen/shared/dist/knowledge-bases.js +456 -0
  33. package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.d.ts +56 -48
  34. package/node_modules/@oxygen/shared/dist/knowledge-bootstrap.js +50 -49
  35. package/node_modules/@oxygen/shared/dist/knowledge-repository.d.ts +22 -0
  36. package/node_modules/@oxygen/shared/dist/knowledge-repository.js +121 -0
  37. package/node_modules/@oxygen/shared/dist/knowledge-vault-markdown.d.ts +20 -0
  38. package/node_modules/@oxygen/shared/dist/knowledge-vault-markdown.js +155 -0
  39. package/node_modules/@oxygen/shared/dist/langfuse.d.ts +8 -3
  40. package/node_modules/@oxygen/shared/dist/langfuse.js +177 -130
  41. package/node_modules/@oxygen/shared/dist/llm-payload.d.ts +10 -0
  42. package/node_modules/@oxygen/shared/dist/llm-payload.js +54 -0
  43. package/node_modules/@oxygen/shared/dist/llm-usage.d.ts +11 -0
  44. package/node_modules/@oxygen/shared/dist/llm-usage.js +30 -0
  45. package/node_modules/@oxygen/shared/dist/mailbox-import.d.ts +10 -0
  46. package/node_modules/@oxygen/shared/dist/mailbox-import.js +53 -0
  47. package/node_modules/@oxygen/shared/dist/plan-limits.d.ts +8 -0
  48. package/node_modules/@oxygen/shared/dist/plan-limits.js +8 -0
  49. package/node_modules/@oxygen/shared/dist/pricing-sheet.d.ts +1 -1
  50. package/node_modules/@oxygen/shared/dist/pricing-sheet.js +1 -1
  51. package/node_modules/@oxygen/shared/dist/product-analytics-core.d.ts +98 -0
  52. package/node_modules/@oxygen/shared/dist/product-analytics-core.js +159 -0
  53. package/node_modules/@oxygen/shared/dist/product-analytics-environment.d.ts +18 -0
  54. package/node_modules/@oxygen/shared/dist/product-analytics-environment.js +46 -0
  55. package/node_modules/@oxygen/shared/dist/product-analytics-events.d.ts +116 -0
  56. package/node_modules/@oxygen/shared/dist/product-analytics-events.js +120 -0
  57. package/node_modules/@oxygen/shared/dist/recipes.d.ts +6 -0
  58. package/node_modules/@oxygen/shared/dist/recipes.js +23 -0
  59. package/node_modules/@oxygen/shared/dist/sequences.d.ts +126 -2
  60. package/node_modules/@oxygen/shared/dist/sequences.js +280 -4
  61. package/node_modules/@oxygen/shared/dist/ugc-amplification-identity.d.ts +2 -0
  62. package/node_modules/@oxygen/shared/dist/ugc-amplification-identity.js +24 -0
  63. package/node_modules/@oxygen/shared/dist/ugc.d.ts +29 -1
  64. package/node_modules/@oxygen/shared/dist/user-capability-routing.js +8 -1
  65. package/node_modules/@oxygen/shared/dist/version.d.ts +1 -1
  66. package/node_modules/@oxygen/shared/dist/version.js +3 -1
  67. package/node_modules/@oxygen/shared/dist/workspace-file-storage.d.ts +6 -2
  68. package/node_modules/@oxygen/shared/dist/workspace-file-storage.js +15 -4
  69. package/node_modules/@oxygen/shared/package.json +15 -0
  70. package/node_modules/@oxygen/workflows/dist/graph/lint.js +22 -0
  71. package/package.json +2 -1
@@ -5,6 +5,7 @@ import { OxygenError } from "./cli-result.js";
5
5
  import { resolveObjectStorageClient } from "./object-storage.js";
6
6
  export const WORKSPACE_VISUAL_SOURCE_MAX_BYTES = 1_500_000;
7
7
  export const WORKSPACE_VISUAL_BINARY_MAX_BYTES = 50 * 1024 * 1024;
8
+ export const WORKSPACE_OPAQUE_FILE_MAX_BYTES = 100 * 1024 * 1024;
8
9
  /** Platform abuse guard shared by every plan, not a storage entitlement. */
9
10
  export const WORKSPACE_RETAINED_FILES_MAX_BYTES = 1024 * 1024 * 1024;
10
11
  const STORAGE_TIMEOUT_MS = 60_000;
@@ -57,16 +58,26 @@ export function assertWorkspaceVisualBinary(bytes, mimeType) {
57
58
  export function workspaceFileSha256(bytes) {
58
59
  return createHash("sha256").update(bytes).digest("hex");
59
60
  }
61
+ /** Opaque vault attachments are downloaded as bytes, never rendered as active content. */
62
+ export function assertWorkspaceStoredFile(bytes, mimeType) {
63
+ if (mimeType === "application/octet-stream") {
64
+ if (bytes.byteLength > WORKSPACE_OPAQUE_FILE_MAX_BYTES)
65
+ throw new OxygenError("workspace_file_too_large", "File exceeds 100 MiB.");
66
+ return;
67
+ }
68
+ assertWorkspaceVisualBinary(bytes, mimeType);
69
+ }
60
70
  export async function readWorkspaceFileObject(input) {
61
71
  input.signal?.throwIfAborted();
62
72
  assertWorkspaceFileObjectKey(input);
63
- if (!Number.isSafeInteger(input.sizeBytes) || input.sizeBytes < 1 || input.sizeBytes > WORKSPACE_VISUAL_BINARY_MAX_BYTES || !/^[a-f0-9]{64}$/.test(input.sha256)) {
73
+ const maximumBytes = input.mimeType === "application/octet-stream" ? WORKSPACE_OPAQUE_FILE_MAX_BYTES : WORKSPACE_VISUAL_BINARY_MAX_BYTES;
74
+ if (!Number.isSafeInteger(input.sizeBytes) || input.sizeBytes < (input.mimeType === "application/octet-stream" ? 0 : 1) || input.sizeBytes > maximumBytes || !/^[a-f0-9]{64}$/.test(input.sha256)) {
64
75
  throw new OxygenError("workspace_file_integrity_failed", "File metadata failed integrity validation.");
65
76
  }
66
77
  const { client, bucket } = resolveObjectStorageClient();
67
78
  const signal = input.signal ? AbortSignal.any([input.signal, AbortSignal.timeout(STORAGE_TIMEOUT_MS)]) : AbortSignal.timeout(STORAGE_TIMEOUT_MS);
68
79
  const result = await client.send(new GetObjectCommand({
69
- Bucket: bucket, Key: input.storageKey, Range: `bytes=0-${input.sizeBytes}`,
80
+ Bucket: bucket, Key: input.storageKey, ...(input.sizeBytes > 0 ? { Range: `bytes=0-${input.sizeBytes}` } : {}),
70
81
  }), { abortSignal: signal });
71
82
  const body = result.Body;
72
83
  if (!body)
@@ -93,7 +104,7 @@ export async function readWorkspaceFileObject(input) {
93
104
  if (size !== input.sizeBytes || workspaceFileSha256(bytes) !== input.sha256 || result.ContentType?.split(";", 1)[0]?.trim().toLowerCase() !== input.mimeType) {
94
105
  throw new OxygenError("workspace_file_integrity_failed", "Stored file failed size, format or digest verification.");
95
106
  }
96
- assertWorkspaceVisualBinary(bytes, input.mimeType);
107
+ assertWorkspaceStoredFile(bytes, input.mimeType);
97
108
  return bytes;
98
109
  }
99
110
  finally {
@@ -104,7 +115,7 @@ export async function readWorkspaceFileObject(input) {
104
115
  /** Immutable PUT followed by bounded readback. A matching existing object is a safe retry. */
105
116
  export async function putWorkspaceFileObject(input) {
106
117
  input.signal?.throwIfAborted();
107
- assertWorkspaceVisualBinary(input.bytes, input.mimeType);
118
+ assertWorkspaceStoredFile(input.bytes, input.mimeType);
108
119
  const storageKey = buildWorkspaceFileObjectKey(input);
109
120
  const bytes = Buffer.from(input.bytes);
110
121
  const sha256 = workspaceFileSha256(bytes);
@@ -6,6 +6,11 @@
6
6
  "main": "./dist/index.js",
7
7
  "types": "./dist/index.d.ts",
8
8
  "exports": {
9
+ "./knowledge-vault-markdown": {
10
+ "types": "./dist/knowledge-vault-markdown.d.ts",
11
+ "import": "./dist/knowledge-vault-markdown.js",
12
+ "default": "./dist/knowledge-vault-markdown.js"
13
+ },
9
14
  "./vercel-sandbox-fetch": {
10
15
  "types": "./dist/vercel-sandbox-fetch.d.ts",
11
16
  "import": "./dist/vercel-sandbox-fetch.js",
@@ -31,6 +36,11 @@
31
36
  "import": "./dist/import-limits.js",
32
37
  "default": "./dist/import-limits.js"
33
38
  },
39
+ "./inbox-avatar-url": {
40
+ "types": "./dist/inbox-avatar-url.d.ts",
41
+ "import": "./dist/inbox-avatar-url.js",
42
+ "default": "./dist/inbox-avatar-url.js"
43
+ },
34
44
  "./image-sniff": {
35
45
  "types": "./dist/image-sniff.d.ts",
36
46
  "import": "./dist/image-sniff.js",
@@ -136,6 +146,11 @@
136
146
  "import": "./dist/knowledge-constants.js",
137
147
  "default": "./dist/knowledge-constants.js"
138
148
  },
149
+ "./knowledge-bases": {
150
+ "types": "./dist/knowledge-bases.d.ts",
151
+ "import": "./dist/knowledge-bases.js",
152
+ "default": "./dist/knowledge-bases.js"
153
+ },
139
154
  "./workflow-status-change": {
140
155
  "types": "./dist/workflow-status-change.d.ts",
141
156
  "import": "./dist/workflow-status-change.js",
@@ -232,6 +232,15 @@ value, add, scope, options) {
232
232
  }
233
233
  return sound;
234
234
  }
235
+ /**
236
+ * The character the graph host puts between a node id and its loop iteration
237
+ * path when it mints a node execution's persisted `step_id`
238
+ * (`${nodeId}#${iterationPath.join(".")}` — apps/worker
239
+ * workflow-graph-processor.ts `stepKey`). Declared here rather than imported so
240
+ * the linter stays a leaf of the worker, and pinned against the real producer
241
+ * by the `invalid_node_id_character` test.
242
+ */
243
+ const ITERATION_STEP_ID_SEPARATOR = "#";
235
244
  function lintNodeIdentity(node, path, seenIds, add) {
236
245
  let sound = true;
237
246
  if (!isNonEmptyString(node.id)) {
@@ -246,6 +255,19 @@ function lintNodeIdentity(node, path, seenIds, add) {
246
255
  add(`${path}.id`, "reserved_node_id", `Node id '${node.id}' is reserved (it collides with a JavaScript object key and would be dropped from node outputs). Choose another id.`);
247
256
  sound = false;
248
257
  }
258
+ else if (node.id.includes(ITERATION_STEP_ID_SEPARATOR)) {
259
+ // `#` is not a style rule — it is the runtime's own separator. A node
260
+ // execution's persisted identity is `<node id>#<iteration path>`
261
+ // (apps/worker workflow-graph-processor.ts `stepKey`, kept byte-identical to
262
+ // tenant-db's `step_id` convention), so a node literally named `a#1` shares a
263
+ // step_id with the second iteration of a loop body named `a`. The collision
264
+ // is silent and destructive: whichever row exists first is replayed as the
265
+ // other's completed output, so one of the two never runs and the run still
266
+ // reports success. Rejecting the character at authoring time is the only
267
+ // place this can be caught cheaply.
268
+ add(`${path}.id`, "invalid_node_id_character", `Node id '${node.id}' must not contain '${ITERATION_STEP_ID_SEPARATOR}' (it is reserved for loop iteration step ids, so '${node.id}' would collide with an iteration of another node). Choose another id.`);
269
+ sound = false;
270
+ }
249
271
  else if (seenIds.has(node.id)) {
250
272
  add(`${path}.id`, "duplicate_node_id", `Node id '${node.id}' is duplicated.`);
251
273
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxygen-agent/cli",
3
- "version": "1.936.1",
3
+ "version": "1.982.3",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",
@@ -43,6 +43,7 @@
43
43
  "esbuild": "0.27.7",
44
44
  "read-excel-file": "6.0.3",
45
45
  "typescript": "6.0.3",
46
+ "yaml": "2.9.0",
46
47
  "@oxygen/formula": "0.0.0",
47
48
  "@oxygen/recipe-sdk": "0.0.0",
48
49
  "@oxygen/shared": "0.0.0",