@kafca/agentdock 0.1.8 → 0.1.10
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/renderer/assets/index-B67E3Ah_.js +487 -0
- package/dist/renderer/assets/index-DrLbJPYN.css +11 -0
- package/dist/renderer/index.html +2 -2
- package/dist-electron/electron/local-core-refactor.test.js +47 -0
- package/dist-electron/services/local-ai-core/src/gateway/local-core-lark-gateway.js +3 -0
- package/dist-electron/services/local-ai-core/src/gateway/local-core-weixin-gateway.js +12 -0
- package/dist-electron/src/pages/Threads/thread-chat-model.js +28 -3
- package/dist-electron/src/pages/Threads/thread-chat-permission.test.js +62 -0
- package/package.json +5 -1
- package/dist/renderer/assets/index-CLWJyO0E.css +0 -11
- package/dist/renderer/assets/index-oT33r-V6.js +0 -482
- package/dist-electron/services/local-ai-core/src/plugins/builtin/runtime-capabilities-plugin.js +0 -62
- package/dist-electron/src/pages/Threads/thread-chat-model.test.js +0 -76
package/dist-electron/services/local-ai-core/src/plugins/builtin/runtime-capabilities-plugin.js
DELETED
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.runtimeCapabilitiesPlugin = void 0;
|
|
4
|
-
const desktop_js_1 = require("../../../../../shared/desktop.js");
|
|
5
|
-
exports.runtimeCapabilitiesPlugin = {
|
|
6
|
-
manifest: {
|
|
7
|
-
id: 'builtin.runtime-capabilities',
|
|
8
|
-
kind: 'composite',
|
|
9
|
-
version: '0.1.0',
|
|
10
|
-
provides: [
|
|
11
|
-
'agent:opencode',
|
|
12
|
-
'agent:codex',
|
|
13
|
-
'agent:claudecode',
|
|
14
|
-
'agent:cursor',
|
|
15
|
-
'agent:gemini',
|
|
16
|
-
'agent:qoder',
|
|
17
|
-
'agent:iflow',
|
|
18
|
-
`agent:${desktop_js_1.LOCALCORE_ACP_AGENT_TYPE}`,
|
|
19
|
-
'channel:localcore-lark',
|
|
20
|
-
`channel:${desktop_js_1.LOCALCORE_ACP_AGENT_TYPE}`,
|
|
21
|
-
'knowledge:ai-vector',
|
|
22
|
-
'scheduler:cron',
|
|
23
|
-
],
|
|
24
|
-
},
|
|
25
|
-
capabilities: {
|
|
26
|
-
agents: desktop_js_1.DESKTOP_AGENT_TYPE_OPTIONS.map((agentType) => ({
|
|
27
|
-
id: `agent.${agentType}`,
|
|
28
|
-
agentType,
|
|
29
|
-
displayName: agentType,
|
|
30
|
-
})),
|
|
31
|
-
channels: [
|
|
32
|
-
{
|
|
33
|
-
id: 'channel.localcore-lark',
|
|
34
|
-
platform: 'lark',
|
|
35
|
-
routeType: 'lark_chat',
|
|
36
|
-
displayName: 'LocalCore Lark',
|
|
37
|
-
},
|
|
38
|
-
{
|
|
39
|
-
id: `channel.${desktop_js_1.LOCALCORE_ACP_AGENT_TYPE}`,
|
|
40
|
-
platform: desktop_js_1.LOCALCORE_ACP_AGENT_TYPE,
|
|
41
|
-
displayName: 'LocalCore ACP',
|
|
42
|
-
},
|
|
43
|
-
],
|
|
44
|
-
knowledge: [
|
|
45
|
-
{
|
|
46
|
-
id: 'knowledge.ai-vector',
|
|
47
|
-
sourceType: 'ai-vector',
|
|
48
|
-
enabled: true,
|
|
49
|
-
displayName: 'AI Vector Knowledge',
|
|
50
|
-
},
|
|
51
|
-
],
|
|
52
|
-
schedulers: [
|
|
53
|
-
{
|
|
54
|
-
id: 'scheduler.cron',
|
|
55
|
-
triggerTypes: ['cron', 'once'],
|
|
56
|
-
deliveryPlatforms: ['lark'],
|
|
57
|
-
enabled: true,
|
|
58
|
-
displayName: 'Cron Scheduler',
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
},
|
|
62
|
-
};
|
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const node_test_1 = __importDefault(require("node:test"));
|
|
7
|
-
const strict_1 = __importDefault(require("node:assert/strict"));
|
|
8
|
-
const thread_chat_model_1 = require("./thread-chat-model");
|
|
9
|
-
function createPermissionActions() {
|
|
10
|
-
return [[
|
|
11
|
-
{ text: 'Allow', data: 'allow' },
|
|
12
|
-
{ text: 'Deny', data: 'deny' },
|
|
13
|
-
]];
|
|
14
|
-
}
|
|
15
|
-
function createMessage(overrides) {
|
|
16
|
-
return {
|
|
17
|
-
id: 'message',
|
|
18
|
-
role: 'assistant',
|
|
19
|
-
content: 'Permission required',
|
|
20
|
-
order: 0,
|
|
21
|
-
...overrides,
|
|
22
|
-
};
|
|
23
|
-
}
|
|
24
|
-
(0, node_test_1.default)('getLatestInteractivePermissionMessage returns the latest actionable permission prompt', () => {
|
|
25
|
-
const messages = [
|
|
26
|
-
createMessage({
|
|
27
|
-
id: 'older-permission',
|
|
28
|
-
order: 1,
|
|
29
|
-
actionMode: 'permission',
|
|
30
|
-
actionInteractive: true,
|
|
31
|
-
actions: createPermissionActions(),
|
|
32
|
-
}),
|
|
33
|
-
createMessage({
|
|
34
|
-
id: 'generic-buttons',
|
|
35
|
-
order: 2,
|
|
36
|
-
actionMode: 'generic',
|
|
37
|
-
actionInteractive: true,
|
|
38
|
-
actions: createPermissionActions(),
|
|
39
|
-
}),
|
|
40
|
-
createMessage({
|
|
41
|
-
id: 'latest-permission',
|
|
42
|
-
order: 3,
|
|
43
|
-
actionMode: 'permission',
|
|
44
|
-
actionInteractive: true,
|
|
45
|
-
actions: createPermissionActions(),
|
|
46
|
-
}),
|
|
47
|
-
];
|
|
48
|
-
const prompt = (0, thread_chat_model_1.getLatestInteractivePermissionMessage)(messages);
|
|
49
|
-
strict_1.default.ok(prompt);
|
|
50
|
-
strict_1.default.equal(prompt.id, 'latest-permission');
|
|
51
|
-
});
|
|
52
|
-
(0, node_test_1.default)('getLatestInteractivePermissionMessage ignores submitted or non-interactive prompts', () => {
|
|
53
|
-
const messages = [
|
|
54
|
-
createMessage({
|
|
55
|
-
id: 'submitted-permission',
|
|
56
|
-
order: 1,
|
|
57
|
-
actionMode: 'permission',
|
|
58
|
-
actionInteractive: true,
|
|
59
|
-
actions: [],
|
|
60
|
-
actionStatus: 'Permission sent',
|
|
61
|
-
}),
|
|
62
|
-
createMessage({
|
|
63
|
-
id: 'unsupported-permission',
|
|
64
|
-
order: 2,
|
|
65
|
-
actionMode: 'permission',
|
|
66
|
-
actionInteractive: false,
|
|
67
|
-
actions: createPermissionActions(),
|
|
68
|
-
}),
|
|
69
|
-
];
|
|
70
|
-
strict_1.default.equal((0, thread_chat_model_1.getLatestInteractivePermissionMessage)(messages), undefined);
|
|
71
|
-
});
|
|
72
|
-
(0, node_test_1.default)('taskStateAfterTypingStop keeps awaiting_permission prompts visible', () => {
|
|
73
|
-
strict_1.default.equal((0, thread_chat_model_1.taskStateAfterTypingStop)('awaiting_permission'), 'awaiting_permission');
|
|
74
|
-
strict_1.default.equal((0, thread_chat_model_1.taskStateAfterTypingStop)('running'), 'idle');
|
|
75
|
-
strict_1.default.equal((0, thread_chat_model_1.taskStateAfterTypingStop)('permission_submitted'), 'idle');
|
|
76
|
-
});
|