@jskit-ai/assistant-runtime 0.1.230 → 0.1.232
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/assistant-runtime",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.232",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test --test-concurrency=1"
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
"./server": "./src/server/index.js"
|
|
13
13
|
},
|
|
14
14
|
"dependencies": {
|
|
15
|
-
"@jskit-ai/assistant-core": "0.1.
|
|
15
|
+
"@jskit-ai/assistant-core": "0.1.238",
|
|
16
16
|
"json-rest-schema": "^1.0.17"
|
|
17
17
|
},
|
|
18
18
|
"peerDependencies": {
|
|
@@ -52,8 +52,9 @@ and `assistantServer` in server config.
|
|
|
52
52
|
semantic placements, an AI integration and its server resolver for an `admin` surface.
|
|
53
53
|
Install `@jskit-ai/connectors-catalog` and `@jskit-ai/connectors-core` and register
|
|
54
54
|
`ApplicationAiFeature` in the ordinary server feature list. Set its application ID
|
|
55
|
-
and AI-use policy. The example
|
|
56
|
-
|
|
55
|
+
and AI-use policy. The example selects Z.AI's GLM-4.7-Flash with a regular Z.AI key
|
|
56
|
+
in `APP_AI_API_KEY`; choose the application's own provider, model and key.
|
|
57
|
+
Provider availability is independent of configuration. Adapt the complete files to the
|
|
57
58
|
application's existing config and placement registries.
|
|
58
59
|
|
|
59
60
|
## Variation points
|
|
@@ -23,10 +23,11 @@ test("assistant surface pattern keeps product config explicit and secrets extern
|
|
|
23
23
|
const { ApplicationAiFeature } = await import(new URL("src/ApplicationAiFeature.js", exampleRoot));
|
|
24
24
|
const { ai } = await ApplicationAiFeature.setup({ env: {} });
|
|
25
25
|
await assert.rejects(ai.resolve({ context: {}, integrationId: "assistant" }));
|
|
26
|
-
const
|
|
26
|
+
const keyed = (await ApplicationAiFeature.setup({ env: { APP_AI_API_KEY: "fixture-key" } })).ai;
|
|
27
|
+
const client = await createAssistantAiClientFactory({ appConfig: serverConfig, env: {}, aiConnections: keyed })
|
|
27
28
|
.resolveClient("admin", { context: { actor: { id: "fixture-user" } } });
|
|
28
29
|
assert.equal(client.enabled, true);
|
|
29
|
-
assert.equal(client.defaultModel, "
|
|
30
|
+
assert.equal(client.defaultModel, "glm-4.7-flash");
|
|
30
31
|
assert.doesNotMatch(JSON.stringify({ publicConfig, serverConfig }), /api[_-]?key|secret/iu);
|
|
31
32
|
assert.doesNotMatch(placementSource, /generator|scaffold|receipt|provenance/u);
|
|
32
33
|
|