@agent-native/creative-context 0.8.1 → 0.8.2-nightly-20260916144018
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labs.d.ts","sourceRoot":"","sources":["../../src/server/labs.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"labs.d.ts","sourceRoot":"","sources":["../../src/server/labs.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AAM7D,wBAAsB,6BAA6B,CACjD,SAAS,EAAE,MAAM,GAAG,SAAS,EAC7B,MAAM,SAAmC,GACxC,OAAO,CAAC,OAAO,CAAC,CAIlB;AAED,wBAAsB,+BAA+B,CACnD,SAAS,qBAAwB,GAChC,OAAO,CAAC,IAAI,CAAC,CAYf;AAcD,wBAAgB,0BAA0B,CACxC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,GACnC,MAAM,CAAC,MAAM,EAAE,WAAW,CAAC,CAS7B"}
|
package/dist/server/labs.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fail } from "@agent-native/core/action";
|
|
1
2
|
import { getUserLabs } from "@agent-native/core/labs/server";
|
|
2
3
|
import { getRequestUserEmail } from "@agent-native/core/server/request-context";
|
|
3
4
|
import { CREATIVE_CONTEXT_LIBRARY_LAB } from "../labs.js";
|
|
@@ -10,7 +11,10 @@ export async function isCreativeContextLabAvailable(userEmail, labKey = CREATIVE
|
|
|
10
11
|
}
|
|
11
12
|
export async function assertCreativeContextLabEnabled(userEmail = getRequestUserEmail()) {
|
|
12
13
|
if (!(await isCreativeContextLabAvailable(userEmail, getCreativeContext().labKey))) {
|
|
13
|
-
|
|
14
|
+
fail("Creative Context is disabled in Labs", {
|
|
15
|
+
errorCode: "creative_context_disabled",
|
|
16
|
+
statusCode: 404,
|
|
17
|
+
});
|
|
14
18
|
}
|
|
15
19
|
}
|
|
16
20
|
function gateCreativeContextAction(action) {
|
package/dist/server/labs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"labs.js","sourceRoot":"","sources":["../../src/server/labs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,SAA6B,EAC7B,MAAM,GAAG,4BAA4B,CAAC,GAAG;IAEzC,IAAI,CAAC,SAAS;QAAE,OAAO,KAAK,CAAC;IAC7B,MAAM,IAAI,GAAG,MAAM,WAAW,CAAC,SAAS,CAAC,CAAC;IAC1C,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,IAAI,CAAC;AAC/B,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,+BAA+B,CACnD,SAAS,GAAG,mBAAmB,EAAE;IAEjC,IACE,CAAC,CAAC,MAAM,6BAA6B,CACnC,SAAS,EACT,kBAAkB,EAAE,CAAC,MAAM,CAC5B,CAAC,EACF,CAAC;QACD,
|
|
1
|
+
{"version":3,"file":"labs.js","sourceRoot":"","sources":["../../src/server/labs.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,2BAA2B,CAAC;AACjD,OAAO,EAAE,WAAW,EAAE,MAAM,gCAAgC,CAAC;AAE7D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2CAA2C,CAAC;AAEhF,OAAO,EAAE,4BAA4B,EAAE,MAAM,YAAY,CAAC;AAC1D,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD,MAAM,CAAC,KAAK,UAAU,6BAA6B,CACjD,SAA6B,EAC7B,MAAM,GAAG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|
+
"version": "0.8.2-nightly-20260916144018",
|
|
4
4
|
"description": "Shared creative context ingestion, versioning, search, brand DNA, and context-pack primitives for agent-native apps.",
|
|
5
5
|
"homepage": "https://github.com/BuilderIO/agent-native#readme",
|
|
6
6
|
"bugs": {
|
|
@@ -58,12 +58,12 @@
|
|
|
58
58
|
"react-dom": "^19.2.7",
|
|
59
59
|
"typescript-7": "npm:typescript@^7.0.2",
|
|
60
60
|
"vitest": "^4.1.5",
|
|
61
|
-
"@agent-native/core": "0.181.
|
|
62
|
-
"@agent-native/toolkit": "0.20.
|
|
61
|
+
"@agent-native/core": "0.181.1-nightly-20260916144018",
|
|
62
|
+
"@agent-native/toolkit": "0.20.3-nightly-20260916144018"
|
|
63
63
|
},
|
|
64
64
|
"peerDependencies": {
|
|
65
|
-
"@agent-native/core": "
|
|
66
|
-
"@agent-native/toolkit": "
|
|
65
|
+
"@agent-native/core": "0.181.1-nightly-20260916144018",
|
|
66
|
+
"@agent-native/toolkit": "0.20.3-nightly-20260916144018",
|
|
67
67
|
"@tabler/icons-react": ">=3.41.1",
|
|
68
68
|
"@tanstack/react-query": ">=5.101.4",
|
|
69
69
|
"drizzle-orm": ">=0.45",
|
package/src/server/labs.spec.ts
CHANGED
|
@@ -69,7 +69,11 @@ describe("isCreativeContextLabAvailable", () => {
|
|
|
69
69
|
mocks.getUserLabs.mockResolvedValue({ "content.creative-context": false });
|
|
70
70
|
await expect(
|
|
71
71
|
assertCreativeContextLabEnabled("user@example.com"),
|
|
72
|
-
).rejects.
|
|
72
|
+
).rejects.toMatchObject({
|
|
73
|
+
message: "Creative Context is disabled in Labs",
|
|
74
|
+
errorCode: "creative_context_disabled",
|
|
75
|
+
statusCode: 404,
|
|
76
|
+
});
|
|
73
77
|
});
|
|
74
78
|
|
|
75
79
|
it("gates package actions with the configured app Lab", async () => {
|
package/src/server/labs.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { fail } from "@agent-native/core/action";
|
|
1
2
|
import { getUserLabs } from "@agent-native/core/labs/server";
|
|
2
3
|
import type { ActionEntry } from "@agent-native/core/server";
|
|
3
4
|
import { getRequestUserEmail } from "@agent-native/core/server/request-context";
|
|
@@ -23,7 +24,10 @@ export async function assertCreativeContextLabEnabled(
|
|
|
23
24
|
getCreativeContext().labKey,
|
|
24
25
|
))
|
|
25
26
|
) {
|
|
26
|
-
|
|
27
|
+
fail("Creative Context is disabled in Labs", {
|
|
28
|
+
errorCode: "creative_context_disabled",
|
|
29
|
+
statusCode: 404,
|
|
30
|
+
});
|
|
27
31
|
}
|
|
28
32
|
}
|
|
29
33
|
|