@oxygen-agent/cli 1.1013.59 → 1.1013.73

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.1013.59
37
+ Version: 1.1013.73
package/dist/index.js CHANGED
@@ -18416,7 +18416,7 @@ Examples:
18416
18416
  });
18417
18417
  })))
18418
18418
  .addCommand(new Command("update")
18419
- .description("Update a sending mailbox's rich-content profile: the From display name and/or the HTML signature appended to its sends. Pass an empty string ('') to clear a field. Consumes no Oxygen credits. <mailbox> accepts a mailbox id or email address.")
18419
+ .description("Update a sending mailbox's rich-content profile: the From display name and/or the HTML signature appended to its sends. An email that already contains the signature gets no second copy. Pass an empty string ('') to clear a field. Consumes no Oxygen credits. <mailbox> accepts a mailbox id or email address.")
18420
18420
  .argument("<mailbox>", "Mailbox id or email address.")
18421
18421
  .option("--display-name <name>", "From display name (e.g. \"Ada from Acme\"). Pass '' to clear it.")
18422
18422
  .option("--signature-html <html>", "HTML signature appended to every send from this mailbox. Pass '' to clear it.")
@@ -21092,10 +21092,20 @@ async function uploadCopilotAttachment(sessionId, filePath) {
21092
21092
  }
21093
21093
  const controller = new AbortController();
21094
21094
  const timer = setTimeout(() => controller.abort(), 300_000);
21095
+ // Content-Type is bound into the storage signature. Older tickets omit the
21096
+ // SDK's binary default; newer tickets supply every required upload header.
21097
+ const uploadHeaders = { "content-type": "application/octet-stream" };
21098
+ if (isRecord(upload.headers)) {
21099
+ for (const [name, value] of Object.entries(upload.headers)) {
21100
+ if (typeof value === "string")
21101
+ uploadHeaders[name] = value;
21102
+ }
21103
+ }
21095
21104
  let putResponse;
21096
21105
  try {
21097
21106
  putResponse = await fetch(uploadUrl, {
21098
21107
  method: "PUT",
21108
+ headers: uploadHeaders,
21099
21109
  body: new Uint8Array(fileBuffer),
21100
21110
  signal: controller.signal,
21101
21111
  });
@@ -224,8 +224,10 @@ export declare function redactManagedModelIds<T>(value: T, options?: {
224
224
  */
225
225
  export declare function hostedAiDefaultModels(useCase: HostedAiUseCase): Record<HostedAiLevel, string>;
226
226
  /**
227
- * Whether the hosted copilot is enabled for this environment. FAIL CLOSED: only
228
- * the exact strings "1" or "true" (case-insensitive, trimmed) enable it;
229
- * anything else — unset, "", "0", "false" — leaves it off.
227
+ * Staff dev experiment: only the authoritative selfhost-dev deployment and an
228
+ * explicit enable flag can run Copilot. NODE_ENV and request hosts cannot open
229
+ * it; production and shadow remain closed even with an enabled flag.
230
230
  */
231
231
  export declare function isCopilotEnabled(env?: Record<string, string | undefined>): boolean;
232
+ /** Historical cost reconciliation may settle receipts without running Copilot. */
233
+ export declare function isCopilotAccountingEnabled(env?: Record<string, string | undefined>): boolean;
@@ -579,11 +579,17 @@ export function hostedAiDefaultModels(useCase) {
579
579
  };
580
580
  }
581
581
  /**
582
- * Whether the hosted copilot is enabled for this environment. FAIL CLOSED: only
583
- * the exact strings "1" or "true" (case-insensitive, trimmed) enable it;
584
- * anything else — unset, "", "0", "false" — leaves it off.
582
+ * Staff dev experiment: only the authoritative selfhost-dev deployment and an
583
+ * explicit enable flag can run Copilot. NODE_ENV and request hosts cannot open
584
+ * it; production and shadow remain closed even with an enabled flag.
585
585
  */
586
586
  export function isCopilotEnabled(env = process.env) {
587
+ if (env.OXYGEN_DEPLOY_ENV?.trim().toLowerCase() !== "selfhost-dev")
588
+ return false;
589
+ return isCopilotAccountingEnabled(env);
590
+ }
591
+ /** Historical cost reconciliation may settle receipts without running Copilot. */
592
+ export function isCopilotAccountingEnabled(env = process.env) {
587
593
  const raw = env.OXYGEN_COPILOT_ENABLED;
588
594
  if (typeof raw !== "string")
589
595
  return false;
@@ -0,0 +1,2 @@
1
+ /** Staff authorization uses configured email domains, never a workspace role. */
2
+ export declare function isStaffEmail(email: string | null | undefined, env?: Record<string, string | undefined>): boolean;
@@ -0,0 +1,12 @@
1
+ /** Staff authorization uses configured email domains, never a workspace role. */
2
+ export function isStaffEmail(email, env = process.env) {
3
+ if (!email)
4
+ return false;
5
+ const at = email.lastIndexOf("@");
6
+ if (at <= 0)
7
+ return false;
8
+ const domain = email.slice(at + 1).toLowerCase();
9
+ return (env.OXYGEN_STAFF_EMAIL_DOMAINS ?? "")
10
+ .split(",")
11
+ .some((entry) => entry.trim().toLowerCase() === domain && domain.length > 0);
12
+ }
@@ -1 +1 @@
1
- export declare const OXYGEN_BUILD_VERSION = "1.1013.59";
1
+ export declare const OXYGEN_BUILD_VERSION = "1.1013.73";
@@ -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.1013.59";
2
+ export const OXYGEN_BUILD_VERSION = "1.1013.73";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@oxygen-agent/cli",
3
- "version": "1.1013.59",
3
+ "version": "1.1013.73",
4
4
  "private": false,
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",