@learncard/network-brain-client 2.5.42 → 2.5.44
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/dist/{brain-client.cjs.development.js → brain-client.cjs.development.cjs} +9 -14
- package/dist/brain-client.cjs.development.cjs.map +7 -0
- package/dist/{brain-client.cjs.production.min.js → brain-client.cjs.production.min.cjs} +3 -3
- package/dist/brain-client.cjs.production.min.cjs.map +7 -0
- package/dist/brain-client.esm.js +107 -110
- package/dist/brain-client.esm.js.map +3 -3
- package/dist/{index.js → index.cjs} +2 -2
- package/dist/index.d.cts +8 -0
- package/package.json +49 -31
- package/.env +0 -7
- package/CHANGELOG.md +0 -1602
- package/LICENSE +0 -21
- package/dist/brain-client.cjs.development.js.map +0 -7
- package/dist/brain-client.cjs.production.min.js.map +0 -7
- package/esbuild.mjs +0 -25
- package/project.json +0 -23
- package/scripts/.eslintrc +0 -10
- package/scripts/build.mjs +0 -76
- package/scripts/mixedEntypoint.js +0 -7
- package/tsconfig.json +0 -37
|
@@ -7,11 +7,7 @@ var __getProtoOf = Object.getPrototypeOf;
|
|
|
7
7
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
8
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
9
9
|
var __commonJS = (cb, mod) => function __require() {
|
|
10
|
-
|
|
11
|
-
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
12
|
-
} catch (e) {
|
|
13
|
-
throw mod = 0, e;
|
|
14
|
-
}
|
|
10
|
+
return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
15
11
|
};
|
|
16
12
|
var __export = (target, all) => {
|
|
17
13
|
for (var name in all)
|
|
@@ -47,11 +43,7 @@ var require_helpers_cjs_development = __commonJS({
|
|
|
47
43
|
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
48
44
|
var __name2 = /* @__PURE__ */ __name((target, value) => __defProp2(target, "name", { value, configurable: true }), "__name");
|
|
49
45
|
var __commonJS2 = /* @__PURE__ */ __name((cb, mod) => /* @__PURE__ */ __name(function __require() {
|
|
50
|
-
|
|
51
|
-
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
52
|
-
} catch (e) {
|
|
53
|
-
throw mod = 0, e;
|
|
54
|
-
}
|
|
46
|
+
return mod || (0, cb[__getOwnPropNames2(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
|
|
55
47
|
}, "__require"), "__commonJS");
|
|
56
48
|
var __export2 = /* @__PURE__ */ __name((target, all) => {
|
|
57
49
|
for (var name in all)
|
|
@@ -7595,7 +7587,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
7595
7587
|
var ef = i.object({ type: i.literal("check-credential"), templateAlias: i.string().optional(), boostUri: i.string().optional() }).refine((t) => !!t.templateAlias != !!t.boostUri, { message: "Exactly one of templateAlias or boostUri is required" });
|
|
7596
7588
|
var tf = i.object({ type: i.literal("check-issuance-status"), templateAlias: i.string().optional(), boostUri: i.string().optional(), recipient: i.string() }).refine((t) => !!t.templateAlias != !!t.boostUri, { message: "Exactly one of templateAlias or boostUri is required" });
|
|
7597
7589
|
var rf = i.object({ type: i.literal("get-template-recipients"), templateAlias: i.string().optional(), boostUri: i.string().optional(), limit: i.number().optional(), cursor: i.string().optional() }).refine((t) => !!t.templateAlias != !!t.boostUri, { message: "Exactly one of templateAlias or boostUri is required" });
|
|
7598
|
-
var nf = i.object({ type: i.literal("request-learner-context"), includeCredentials: i.boolean().optional().default(true), includePersonalData: i.boolean().optional().default(false), format: i.enum(["prompt", "structured"]).optional().default("prompt"), instructions: i.string().optional(), detailLevel: i.enum(["compact", "expanded"]).optional().default("compact") });
|
|
7590
|
+
var nf = i.object({ type: i.literal("request-learner-context"), includeCredentials: i.boolean().optional().default(true), includePersonalData: i.boolean().optional().default(false), format: i.enum(["prompt", "structured"]).optional().default("prompt"), instructions: i.string().optional(), detailLevel: i.enum(["compact", "expanded"]).optional().default("compact"), waitForSync: i.boolean().optional().default(false) });
|
|
7599
7591
|
var of = i.object({ occupations: i.array(i.string()).nullable(), careers: i.array(i.string()).nullable(), jobs: i.array(i.string()).nullable(), skills: i.array(i.string()).nullable(), fieldOfStudy: i.string().nullable() });
|
|
7600
7592
|
var af = i.object({ title: i.string().describe("Short, concise title for the learning session or credential"), summary: i.string().describe("Comprehensive summary of what happened during the session"), learned: i.array(i.string()).describe("Bullet points of key knowledge gained"), skills: i.array(i.object({ title: i.string().describe("Name of the skill category"), description: i.string().describe("Detailed description of what this skill category involves") })).describe("Categorized skills learned during the session"), nextSteps: i.array(i.object({ title: i.string().describe("Title of the suggested next step"), description: i.string().describe("Description explaining why this next step is recommended"), keywords: of.optional().describe("Optional taxonomy keywords for occupations/careers/jobs/skills/fieldOfStudy. Omit if not relevant.") })).describe("Recommended follow-up activities or learning modules"), reflections: i.array(i.object({ title: i.string().describe("Title of the reflection"), description: i.string().describe("Detailed description of what this reflection involves") })).describe("Reflections on the learning experience") });
|
|
7601
7593
|
var cf = i.object({ type: i.literal("send-ai-session-credential"), sessionTitle: i.string(), summaryData: af, metadata: i.record(i.string(), i.unknown()).optional() });
|
|
@@ -25411,7 +25403,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
25411
25403
|
includePersonalData: external_exports.boolean().optional().default(false),
|
|
25412
25404
|
format: external_exports.enum(["prompt", "structured"]).optional().default("prompt"),
|
|
25413
25405
|
instructions: external_exports.string().optional(),
|
|
25414
|
-
detailLevel: external_exports.enum(["compact", "expanded"]).optional().default("compact")
|
|
25406
|
+
detailLevel: external_exports.enum(["compact", "expanded"]).optional().default("compact"),
|
|
25407
|
+
waitForSync: external_exports.boolean().optional().default(false)
|
|
25415
25408
|
});
|
|
25416
25409
|
var SummaryCredentialKeywordValidator = external_exports.object({
|
|
25417
25410
|
occupations: external_exports.array(external_exports.string()).nullable(),
|
|
@@ -25681,7 +25674,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
25681
25674
|
const handle = getFilestackHandle(url);
|
|
25682
25675
|
try {
|
|
25683
25676
|
const data = await (await fetch(`https://www.filestackapi.com/api/file/${handle}/metadata`)).json();
|
|
25684
|
-
return data.mimetype;
|
|
25677
|
+
return data.mimetype ?? "";
|
|
25685
25678
|
} catch (error) {
|
|
25686
25679
|
console.error(error);
|
|
25687
25680
|
return "";
|
|
@@ -26472,7 +26465,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
|
|
|
26472
26465
|
if (!credential["@context"] || !Array.isArray(credential["@context"])) {
|
|
26473
26466
|
return false;
|
|
26474
26467
|
}
|
|
26475
|
-
return credential["@context"].
|
|
26468
|
+
return credential["@context"].some(
|
|
26469
|
+
(context) => context === "https://www.w3.org/ns/credentials/v2"
|
|
26470
|
+
);
|
|
26476
26471
|
}, "isVC2Format");
|
|
26477
26472
|
var unwrapBoostCredential = /* @__PURE__ */ __name2((vc) => {
|
|
26478
26473
|
if (vc?.type?.includes("CertifiedBoostCredential") && vc?.boostCredential) {
|