@things-factory/ai-assistant 10.1.192 → 10.1.198
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/dist-client/tsconfig.tsbuildinfo +1 -1
- package/dist-server/index.js +4 -0
- package/dist-server/index.js.map +1 -1
- package/dist-server/role-tasks.d.ts +2 -0
- package/dist-server/role-tasks.js +15 -0
- package/dist-server/role-tasks.js.map +1 -0
- package/dist-server/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
- package/server/index.ts +5 -0
- package/server/role-tasks.ts +14 -0
- package/test/translations.test.ts +2 -1
- package/translations/en.json +3 -1
- package/translations/es.json +3 -1
- package/translations/ja.json +3 -1
- package/translations/ko.json +3 -1
- package/translations/ms.json +3 -1
- package/translations/zh.json +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@things-factory/ai-assistant",
|
|
3
|
-
"version": "10.1.
|
|
3
|
+
"version": "10.1.198",
|
|
4
4
|
"main": "dist-server/index.js",
|
|
5
5
|
"things-factory": true,
|
|
6
6
|
"author": "heartyoh",
|
|
@@ -35,12 +35,12 @@
|
|
|
35
35
|
"@operato/shell": "^10.29.39",
|
|
36
36
|
"@operato/styles": "^10.0.0",
|
|
37
37
|
"@operato/utils": "^10.29.39",
|
|
38
|
-
"@things-factory/ai-client-base": "^10.1.
|
|
38
|
+
"@things-factory/ai-client-base": "^10.1.198",
|
|
39
39
|
"@things-factory/apptool-base": "^10.1.188",
|
|
40
|
-
"@things-factory/attachment-base": "^10.1.
|
|
41
|
-
"@things-factory/auth-base": "^10.1.
|
|
40
|
+
"@things-factory/attachment-base": "^10.1.198",
|
|
41
|
+
"@things-factory/auth-base": "^10.1.198",
|
|
42
42
|
"@things-factory/env": "^10.1.149",
|
|
43
|
-
"@things-factory/setting-base": "^10.1.
|
|
43
|
+
"@things-factory/setting-base": "^10.1.198",
|
|
44
44
|
"@things-factory/shell": "^10.1.188",
|
|
45
45
|
"dompurify": "^3.0.0",
|
|
46
46
|
"exceljs": "4.2.0",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"copyfiles": "^2.4.1",
|
|
56
56
|
"rimraf": "^5.0.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "68f884a78ca3a779c2b057ba5b8f6e03f477d701"
|
|
59
59
|
}
|
package/server/index.ts
CHANGED
|
@@ -29,3 +29,8 @@ export * from './service/index.js'
|
|
|
29
29
|
import './tool-registry-boot-report.js'
|
|
30
30
|
/* The site, an application's home and a board are named without an application's help (design/ai/screen-pattern.md §2-1). */
|
|
31
31
|
import './service/assistant-mode/fallback-subjects.js'
|
|
32
|
+
|
|
33
|
+
import { registerRoleTask } from '@things-factory/auth-base'
|
|
34
|
+
import { ROLE_TASKS } from './role-tasks.js'
|
|
35
|
+
|
|
36
|
+
for (const task of ROLE_TASKS) registerRoleTask(task)
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The work this module names, for the seats applications build (ADR-0139 decision 11).
|
|
3
|
+
*
|
|
4
|
+
* A task holds whole privileges: each opens everything its doors open, and the words under `task.<id>` in this
|
|
5
|
+
* module's translations say what that is. Seats are put together by applications (`RoleTemplate.tasks`).
|
|
6
|
+
*
|
|
7
|
+
* Data only - `server/index.ts` registers it - so an application's tests read it without starting the framework.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import type { RoleTask } from '@things-factory/auth-base'
|
|
11
|
+
|
|
12
|
+
export const ROLE_TASKS: RoleTask[] = [
|
|
13
|
+
{ id: 'ai-assistant.use', grants: [{ category: 'ai-assistant', axes: ['query', 'mutation'] }] }
|
|
14
|
+
]
|
|
@@ -72,8 +72,9 @@ describe('the keys belong to this package', () => {
|
|
|
72
72
|
expect(stale).toEqual([])
|
|
73
73
|
})
|
|
74
74
|
|
|
75
|
+
/* A task this package declares is worded as task.<id>, and its id begins with the package (ADR-0139 decision 11). */
|
|
75
76
|
it('every entry in en.json is an ai-assistant key', () => {
|
|
76
|
-
const wrongPrefix = Object.keys(locale('en')).filter(key => !key.startsWith('ai-assistant.'))
|
|
77
|
+
const wrongPrefix = Object.keys(locale('en')).filter(key => !key.startsWith('ai-assistant.') && !key.startsWith('task.ai-assistant.'))
|
|
77
78
|
expect(wrongPrefix).toEqual([])
|
|
78
79
|
})
|
|
79
80
|
})
|
package/translations/en.json
CHANGED
|
@@ -383,5 +383,7 @@
|
|
|
383
383
|
"ai-assistant.usage.output-tokens": "Output tokens",
|
|
384
384
|
"ai-assistant.usage.failures": "Failed",
|
|
385
385
|
"ai-assistant.usage.total": "Total",
|
|
386
|
-
"ai-assistant.text.send-to-people-notice": "This goes to the people in this conversation. The AI does not answer it."
|
|
386
|
+
"ai-assistant.text.send-to-people-notice": "This goes to the people in this conversation. The AI does not answer it.",
|
|
387
|
+
"task.ai-assistant.use.name": "Working with the AI assistant",
|
|
388
|
+
"task.ai-assistant.use.description": "Talks with the assistant. It reads only through the caller's own privileges."
|
|
387
389
|
}
|
package/translations/es.json
CHANGED
|
@@ -383,5 +383,7 @@
|
|
|
383
383
|
"ai-assistant.usage.output-tokens": "Tokens de salida",
|
|
384
384
|
"ai-assistant.usage.failures": "Fallidas",
|
|
385
385
|
"ai-assistant.usage.total": "Total",
|
|
386
|
-
"ai-assistant.text.send-to-people-notice": "Esto va a los participantes de esta conversación. La IA no responde."
|
|
386
|
+
"ai-assistant.text.send-to-people-notice": "Esto va a los participantes de esta conversación. La IA no responde.",
|
|
387
|
+
"task.ai-assistant.use.name": "Trabajar con el asistente de IA",
|
|
388
|
+
"task.ai-assistant.use.description": "Conversa con el asistente. Solo lee con los privilegios de quien lo llama."
|
|
387
389
|
}
|
package/translations/ja.json
CHANGED
|
@@ -383,5 +383,7 @@
|
|
|
383
383
|
"ai-assistant.usage.output-tokens": "出力トークン",
|
|
384
384
|
"ai-assistant.usage.failures": "失敗",
|
|
385
385
|
"ai-assistant.usage.total": "合計",
|
|
386
|
-
"ai-assistant.text.send-to-people-notice": "この会話の参加者に送ります。AI は応答しません。"
|
|
386
|
+
"ai-assistant.text.send-to-people-notice": "この会話の参加者に送ります。AI は応答しません。",
|
|
387
|
+
"task.ai-assistant.use.name": "AIアシスタント",
|
|
388
|
+
"task.ai-assistant.use.description": "AIアシスタントと対話する。アシスタントは呼び出した人の権限でのみ読む。"
|
|
387
389
|
}
|
package/translations/ko.json
CHANGED
|
@@ -383,5 +383,7 @@
|
|
|
383
383
|
"ai-assistant.usage.output-tokens": "출력 토큰",
|
|
384
384
|
"ai-assistant.usage.failures": "실패",
|
|
385
385
|
"ai-assistant.usage.total": "합계",
|
|
386
|
-
"ai-assistant.text.send-to-people-notice": "이 대화의 참여자에게 보냅니다. AI 는 답하지 않습니다."
|
|
386
|
+
"ai-assistant.text.send-to-people-notice": "이 대화의 참여자에게 보냅니다. AI 는 답하지 않습니다.",
|
|
387
|
+
"task.ai-assistant.use.name": "AI 도우미",
|
|
388
|
+
"task.ai-assistant.use.description": "AI 도우미와 대화한다. 도우미는 부른 사람의 권한으로만 읽는다."
|
|
387
389
|
}
|
package/translations/ms.json
CHANGED
|
@@ -383,5 +383,7 @@
|
|
|
383
383
|
"ai-assistant.usage.output-tokens": "Token output",
|
|
384
384
|
"ai-assistant.usage.failures": "Gagal",
|
|
385
385
|
"ai-assistant.usage.total": "Jumlah",
|
|
386
|
-
"ai-assistant.text.send-to-people-notice": "Ini dihantar kepada peserta perbualan ini. AI tidak menjawabnya."
|
|
386
|
+
"ai-assistant.text.send-to-people-notice": "Ini dihantar kepada peserta perbualan ini. AI tidak menjawabnya.",
|
|
387
|
+
"task.ai-assistant.use.name": "Menggunakan pembantu AI",
|
|
388
|
+
"task.ai-assistant.use.description": "Berbual dengan pembantu. Ia hanya membaca melalui keistimewaan pemanggil."
|
|
387
389
|
}
|
package/translations/zh.json
CHANGED
|
@@ -383,5 +383,7 @@
|
|
|
383
383
|
"ai-assistant.usage.output-tokens": "输出令牌",
|
|
384
384
|
"ai-assistant.usage.failures": "失败",
|
|
385
385
|
"ai-assistant.usage.total": "合计",
|
|
386
|
-
"ai-assistant.text.send-to-people-notice": "此消息发送给本会话的参与者,AI 不会回复。"
|
|
386
|
+
"ai-assistant.text.send-to-people-notice": "此消息发送给本会话的参与者,AI 不会回复。",
|
|
387
|
+
"task.ai-assistant.use.name": "使用 AI 助手",
|
|
388
|
+
"task.ai-assistant.use.description": "与 AI 助手对话。助手只以调用者的权限读取。"
|
|
387
389
|
}
|