@jskit-ai/assistant-runtime 0.1.230 → 0.1.231

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.230",
3
+ "version": "0.1.231",
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.236",
15
+ "@jskit-ai/assistant-core": "0.1.237",
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 explicitly selects the catalogue's no-key model;
56
- provider availability is independent of configuration. Adapt the complete files to the
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
@@ -7,10 +7,11 @@
7
7
  "accountMode": "shared",
8
8
  "scopes": [],
9
9
  "settings": {
10
- "model": "opencode/big-pickle"
10
+ "model": "zai/glm-4.7-flash"
11
11
  },
12
12
  "authentication": {
13
- "method": "none"
13
+ "method": "api-key",
14
+ "secretRef": "env:APP_AI_API_KEY"
14
15
  }
15
16
  }
16
17
  }
@@ -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 client = await createAssistantAiClientFactory({ appConfig: serverConfig, env: {}, aiConnections: ai })
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, "big-pickle");
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