@jskit-ai/assistant 0.1.35 → 0.1.38
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.descriptor.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export default Object.freeze({
|
|
2
2
|
packageVersion: 1,
|
|
3
3
|
packageId: "@jskit-ai/assistant",
|
|
4
|
-
version: "0.1.
|
|
4
|
+
version: "0.1.38",
|
|
5
5
|
kind: "generator",
|
|
6
6
|
description: "Generate an app-local assistant runtime and settings integration from explicit surface choices.",
|
|
7
7
|
options: {
|
|
@@ -177,13 +177,13 @@ export default Object.freeze({
|
|
|
177
177
|
dependencies: {
|
|
178
178
|
runtime: {
|
|
179
179
|
"@local/assistant": "file:packages/assistant",
|
|
180
|
-
"@jskit-ai/assistant-core": "0.1.
|
|
181
|
-
"@jskit-ai/database-runtime": "0.1.
|
|
182
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
183
|
-
"@jskit-ai/kernel": "0.1.
|
|
184
|
-
"@jskit-ai/shell-web": "0.1.
|
|
185
|
-
"@jskit-ai/users-core": "0.1.
|
|
186
|
-
"@jskit-ai/users-web": "0.1.
|
|
180
|
+
"@jskit-ai/assistant-core": "0.1.5",
|
|
181
|
+
"@jskit-ai/database-runtime": "0.1.29",
|
|
182
|
+
"@jskit-ai/http-runtime": "0.1.28",
|
|
183
|
+
"@jskit-ai/kernel": "0.1.29",
|
|
184
|
+
"@jskit-ai/shell-web": "0.1.28",
|
|
185
|
+
"@jskit-ai/users-core": "0.1.39",
|
|
186
|
+
"@jskit-ai/users-web": "0.1.44",
|
|
187
187
|
"@tanstack/vue-query": "^5.90.5",
|
|
188
188
|
"vuetify": "^4.0.0"
|
|
189
189
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/assistant",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.38",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -9,6 +9,6 @@
|
|
|
9
9
|
"./server/buildTemplateContext": "./src/server/buildTemplateContext.js"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"@jskit-ai/kernel": "0.1.
|
|
12
|
+
"@jskit-ai/kernel": "0.1.29"
|
|
13
13
|
}
|
|
14
14
|
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
1
|
export { default as AssistantSurfaceClientElement } from "./components/AssistantSurfaceClientElement.vue";
|
|
2
2
|
export { default as AssistantSettingsClientElement } from "./components/AssistantSettingsClientElement.vue";
|
|
3
|
+
export { AssistantClientProvider } from "./providers/AssistantClientProvider.js";
|
|
3
4
|
export { useAssistantRuntime } from "./composables/useAssistantRuntime.js";
|
|
@@ -11,8 +11,6 @@ import { actionIds } from "./actionIds.js";
|
|
|
11
11
|
|
|
12
12
|
const runtimeSurfaces = Object.freeze([assistantRuntimeConfig.runtimeSurfaceId]);
|
|
13
13
|
const settingsSurfaces = Object.freeze([assistantRuntimeConfig.settingsSurfaceId]);
|
|
14
|
-
const runtimeVisibility = assistantRuntimeConfig.runtimeSurfaceRequiresWorkspace ? "workspace" : "public";
|
|
15
|
-
const settingsVisibility = assistantRuntimeConfig.settingsSurfaceRequiresWorkspace ? "workspace" : "public";
|
|
16
14
|
|
|
17
15
|
const runtimeQueryInputValidator = assistantRuntimeConfig.runtimeSurfaceRequiresWorkspace
|
|
18
16
|
? [workspaceSlugParamsValidator, { query: assistantResource.operations.conversationsList.queryValidator }]
|
|
@@ -81,7 +79,6 @@ const assistantActions = Object.freeze([
|
|
|
81
79
|
require: "authenticated"
|
|
82
80
|
},
|
|
83
81
|
inputValidator: runtimeChatInputValidator,
|
|
84
|
-
visibility: runtimeVisibility,
|
|
85
82
|
idempotency: "optional",
|
|
86
83
|
audit: {
|
|
87
84
|
actionName: actionIds.chatStream
|
|
@@ -106,7 +103,6 @@ const assistantActions = Object.freeze([
|
|
|
106
103
|
},
|
|
107
104
|
inputValidator: runtimeQueryInputValidator,
|
|
108
105
|
outputValidator: assistantResource.operations.conversationsList.outputValidator,
|
|
109
|
-
visibility: runtimeVisibility,
|
|
110
106
|
idempotency: "none",
|
|
111
107
|
audit: {
|
|
112
108
|
actionName: actionIds.conversationsList
|
|
@@ -130,7 +126,6 @@ const assistantActions = Object.freeze([
|
|
|
130
126
|
},
|
|
131
127
|
inputValidator: runtimeMessagesInputValidator,
|
|
132
128
|
outputValidator: assistantResource.operations.conversationMessagesList.outputValidator,
|
|
133
|
-
visibility: runtimeVisibility,
|
|
134
129
|
idempotency: "none",
|
|
135
130
|
audit: {
|
|
136
131
|
actionName: actionIds.conversationMessagesList
|
|
@@ -152,7 +147,6 @@ const assistantActions = Object.freeze([
|
|
|
152
147
|
permission: settingsReadPermission,
|
|
153
148
|
inputValidator: settingsReadInputValidator,
|
|
154
149
|
outputValidator: assistantConfigResource.operations.view.outputValidator,
|
|
155
|
-
visibility: settingsVisibility,
|
|
156
150
|
idempotency: "none",
|
|
157
151
|
audit: {
|
|
158
152
|
actionName: actionIds.settingsRead
|
|
@@ -173,7 +167,6 @@ const assistantActions = Object.freeze([
|
|
|
173
167
|
permission: settingsUpdatePermission,
|
|
174
168
|
inputValidator: settingsUpdateInputValidator,
|
|
175
169
|
outputValidator: assistantConfigResource.operations.patch.outputValidator,
|
|
176
|
-
visibility: settingsVisibility,
|
|
177
170
|
idempotency: "optional",
|
|
178
171
|
audit: {
|
|
179
172
|
actionName: actionIds.settingsUpdate
|
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import assert from "node:assert/strict";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
2
4
|
import test from "node:test";
|
|
3
5
|
import descriptor from "../package.descriptor.mjs";
|
|
4
6
|
|
|
@@ -61,9 +63,20 @@ test("assistant descriptor targets runtime and settings placements through expli
|
|
|
61
63
|
|
|
62
64
|
test("assistant descriptor runtime deps use assistant-core and avoid workspace package coupling", () => {
|
|
63
65
|
const runtimeDeps = descriptor?.mutations?.dependencies?.runtime || {};
|
|
66
|
+
const assistantCorePackageJsonPath = path.resolve(
|
|
67
|
+
path.dirname(new URL(import.meta.url).pathname),
|
|
68
|
+
"..",
|
|
69
|
+
"..",
|
|
70
|
+
"assistant-core",
|
|
71
|
+
"package.json"
|
|
72
|
+
);
|
|
64
73
|
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
74
|
+
return readFile(assistantCorePackageJsonPath, "utf8").then((source) => {
|
|
75
|
+
const assistantCorePackageJson = JSON.parse(source);
|
|
76
|
+
|
|
77
|
+
assert.equal(runtimeDeps["@local/assistant"], "file:packages/assistant");
|
|
78
|
+
assert.equal(runtimeDeps["@jskit-ai/assistant-core"], assistantCorePackageJson.version);
|
|
79
|
+
assert.equal(Object.hasOwn(runtimeDeps, "@jskit-ai/workspaces-core"), false);
|
|
80
|
+
assert.equal(Object.hasOwn(runtimeDeps, "@jskit-ai/workspaces-web"), false);
|
|
81
|
+
});
|
|
69
82
|
});
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import assert from "node:assert/strict";
|
|
2
|
+
import { readFile } from "node:fs/promises";
|
|
3
|
+
import path from "node:path";
|
|
4
|
+
import test from "node:test";
|
|
5
|
+
|
|
6
|
+
const packageRoot = path.resolve(path.dirname(new URL(import.meta.url).pathname), "..");
|
|
7
|
+
|
|
8
|
+
async function readTemplateFile(relativePath) {
|
|
9
|
+
return readFile(path.join(packageRoot, relativePath), "utf8");
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
test("generated assistant client index exports the descriptor-declared client provider", async () => {
|
|
13
|
+
const source = await readTemplateFile("templates/src/local-package/client/index.js");
|
|
14
|
+
|
|
15
|
+
assert.match(source, /export \{ AssistantClientProvider \} from "\.\/providers\/AssistantClientProvider\.js";/);
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
test("generated assistant actions do not emit legacy action visibility fields", async () => {
|
|
19
|
+
const source = await readTemplateFile("templates/src/local-package/server/actions.js");
|
|
20
|
+
|
|
21
|
+
assert.doesNotMatch(source, /\bvisibility:/);
|
|
22
|
+
});
|