@oxygen-agent/cli 1.1013.61 → 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 +1 -1
- package/dist/index.js +10 -0
- package/node_modules/@oxygen/shared/dist/hosted-ai.d.ts +5 -3
- package/node_modules/@oxygen/shared/dist/hosted-ai.js +9 -3
- package/node_modules/@oxygen/shared/dist/staff.d.ts +2 -0
- package/node_modules/@oxygen/shared/dist/staff.js +12 -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
package/dist/index.js
CHANGED
|
@@ -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
|
-
*
|
|
228
|
-
*
|
|
229
|
-
*
|
|
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
|
-
*
|
|
583
|
-
*
|
|
584
|
-
*
|
|
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,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.
|
|
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.
|
|
2
|
+
export const OXYGEN_BUILD_VERSION = "1.1013.73";
|