@jskit-ai/assistant-core 0.1.2 → 0.1.4

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,7 +1,7 @@
1
1
  export default Object.freeze({
2
2
  packageVersion: 1,
3
3
  packageId: "@jskit-ai/assistant-core",
4
- version: "0.1.2",
4
+ version: "0.1.4",
5
5
  kind: "runtime",
6
6
  description: "Reusable assistant client/server/shared primitives without surface-specific routes or settings ownership.",
7
7
  dependsOn: [
@@ -45,9 +45,9 @@ export default Object.freeze({
45
45
  mutations: {
46
46
  dependencies: {
47
47
  runtime: {
48
- "@jskit-ai/http-runtime": "0.1.25",
49
- "@jskit-ai/kernel": "0.1.26",
50
- "@jskit-ai/users-core": "0.1.36",
48
+ "@jskit-ai/http-runtime": "0.1.27",
49
+ "@jskit-ai/kernel": "0.1.28",
50
+ "@jskit-ai/users-core": "0.1.38",
51
51
  "@tanstack/vue-query": "^5.90.5",
52
52
  "dompurify": "^3.3.3",
53
53
  "marked": "^17.0.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jskit-ai/assistant-core",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "test": "node --test"
@@ -11,9 +11,9 @@
11
11
  "./shared": "./src/shared/index.js"
12
12
  },
13
13
  "dependencies": {
14
- "@jskit-ai/http-runtime": "0.1.25",
15
- "@jskit-ai/kernel": "0.1.26",
16
- "@jskit-ai/users-core": "0.1.36",
14
+ "@jskit-ai/http-runtime": "0.1.27",
15
+ "@jskit-ai/kernel": "0.1.28",
16
+ "@jskit-ai/users-core": "0.1.38",
17
17
  "@tanstack/vue-query": "^5.90.5",
18
18
  "dompurify": "^3.3.3",
19
19
  "marked": "^17.0.4",
@@ -244,7 +244,7 @@
244
244
  </template>
245
245
 
246
246
  <script setup>
247
- import { computed, nextTick, onActivated, onBeforeUnmount, onMounted, ref, shallowRef, watch } from "vue";
247
+ import { computed, nextTick, onActivated, onBeforeUnmount, onMounted, ref, shallowRef, unref, watch } from "vue";
248
248
  import { createComponentInteractionEmitter } from "@jskit-ai/kernel/client";
249
249
  import {
250
250
  normalizeObject,
@@ -434,7 +434,7 @@ function normalizeConversationStatus(value) {
434
434
  }
435
435
 
436
436
  const viewer = computed(() => {
437
- const source = normalizeObject(props.viewer);
437
+ const source = normalizeObject(unref(props.viewer));
438
438
  return {
439
439
  displayName: normalizeText(source.displayName) || "You",
440
440
  avatarUrl: normalizeText(source.avatarUrl)
@@ -0,0 +1,15 @@
1
+ import assert from "node:assert/strict";
2
+ import test from "node:test";
3
+ import { readFile } from "node:fs/promises";
4
+ import path from "node:path";
5
+
6
+ const packageRoot = new URL("../", import.meta.url);
7
+
8
+ async function readPackageFile(relativePath) {
9
+ return readFile(path.join(packageRoot.pathname, relativePath), "utf8");
10
+ }
11
+
12
+ test("AssistantClientElement unwraps viewer refs before reading avatar fields", async () => {
13
+ const source = await readPackageFile("src/client/components/AssistantClientElement.vue");
14
+ assert.match(source, /normalizeObject\(unref\(props\.viewer\)\)/);
15
+ });