@dsh-enhanced/personal-assistant 0.1.3

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/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 dsh-enhanced contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,37 @@
1
+ # @dsh-enhanced/personal-assistant
2
+
3
+ 个人助理四核心的纯 meta-bundle,一次安装以下独立包:
4
+
5
+ - `@dsh-enhanced/assistant-policy`
6
+ - `@dsh-enhanced/personal-memory`
7
+ - `@dsh-enhanced/personal-wiki`
8
+ - `@dsh-enhanced/assistant-automations`
9
+
10
+ 它不包含消息、飞书、凭据、heartbeat、事件触发或浏览器,也不新增第五个业务 service 或数据库。自己的唯一 Cordis 行只负责按生命周期顺序挂载四个核心 service。
11
+
12
+ ## 安装
13
+
14
+ ```sh
15
+ dsh plugin --profile web add @dsh-enhanced/personal-assistant
16
+ dsh --profile web --dump-config
17
+ ```
18
+
19
+ patch 会完整覆盖上游 `permission` 行,并挂载唯一的 `dsh-enhanced-personal-assistant` 业务行;后者再通过 Cordis 子插件生命周期依次启动 Policy、Memory、Wiki 和 Automations。不要在同一 profile 同时启用本 meta-bundle 与四个独立子 bundle,否则会重复提供同名 service。
20
+
21
+ ## 默认安全状态
22
+
23
+ - 原生 Permission selector 固定显示 `workspace-write`(请求批准)、`auto`(帮我批准)和 `danger-full-access`(完全访问)三项;前两项共享 `workspace-write + ask` 执行 bundle,但保留不同选择意图。没有用户层设置的新安装默认 `danger-full-access`。已有 `settings.yaml` 的 `permission.defaultPreset` 仍由 DSH Settings 用户层优先,不会被 bundle 强制覆盖。
24
+ - policy 默认写入一条 `dsh-enhanced-foreground-capability-*`:本机 Web/direct 的 foreground Agent 可访问 profile 已挂载的全部技能、工具与插件动作,后续动态挂载也无需逐项补 allow;它不会安装尚未安装的插件,也不授权 background 或飞书 external 身份。显式 deny、紧急停止、身份/预算检查仍优先。`budgets` 默认留空。
25
+ - automations scheduler 默认关闭;创建并审批 automation 后仍需由部署者显式启用 scheduler。
26
+ - Memory、Wiki、Policy、Automations 使用各自的 DSH home 私有路径和独立真源。
27
+ - meta 入口先等待 Policy 完成激活,再依次挂载 Memory、Wiki 与 Automations;真实 rc.8 启动不依赖同步构造或 YAML 行序碰巧成功。
28
+
29
+ 需要收紧时可添加显式 deny,或使用安装器的 `--agent-tools disable` 移除托管的 foreground grant;先在测试 profile 使用 `--dump-config` 检查最终 patch。
30
+
31
+ ## 权限与数据
32
+
33
+ meta-bundle 不引入一套独立于上游 Host 的 OS capability、网络 API、凭据、浏览器或安装脚本权限;四个子包的实际权限和数据边界分别见其 README。需要特别注意:为了符合本地默认完全控制的安装目标,没有用户层设置的新 session 会选择 `danger-full-access + never`,因此 Host sandbox 可不受限制地访问文件与网络,且工具调用不再逐次询问。这是有意启用的高风险默认值,而不是“安装能力不等于授权”的延伸含义;不需要完全控制时,请在原生 selector 中改回 `workspace-write` 或 `auto`。已有兼容的用户设置始终优先,安装器不会强制覆盖。
34
+
35
+ ## 兼容性
36
+
37
+ 子包均以 DeepSeek Harness `0.1.0-rc.8`(提交 `141eb6fef83422698aef7a981029e843e8161534`)为验证基线。参见[兼容性文档](../../docs/compatibility.md)。
@@ -0,0 +1,81 @@
1
+ - id: permission
2
+ name: '@deepseek-ai/dsh-permission-presets'
3
+ config:
4
+ presets:
5
+ workspace-write:
6
+ sandbox: workspace-write
7
+ approval: ask
8
+ name: 请求批准
9
+ auto:
10
+ sandbox: workspace-write
11
+ approval: ask
12
+ name: 帮我批准
13
+ danger-full-access:
14
+ sandbox: danger-full-access
15
+ approval: never
16
+ name: 完全访问权限
17
+ defaultPreset: danger-full-access
18
+
19
+ - insert:
20
+ - id: dsh-enhanced-personal-assistant
21
+ name: '@dsh-enhanced/personal-assistant'
22
+ config:
23
+ assistantPolicy:
24
+ databasePath: !!js dshHomePath('assistant-policy/policy.sqlite')
25
+ rules:
26
+ - id: dsh-enhanced-foreground-capability-*
27
+ effect: allow
28
+ subject:
29
+ kind: agent
30
+ id: '*'
31
+ workspace: '*'
32
+ actions:
33
+ - '*'
34
+ resource:
35
+ kind: '*'
36
+ id: '*'
37
+ context:
38
+ initiators:
39
+ - foreground
40
+ budgets: []
41
+ personalMemory:
42
+ databasePath: !!js dshHomePath('personal-memory/memory.sqlite')
43
+ approvalMode: delivery-required
44
+ maxContentBytes: 4096
45
+ maxRecordsPerIdentity: 1000
46
+ searchLimit: 20
47
+ snapshotLimit: 20
48
+ snapshotMaxBytes: 8192
49
+ snapshotMaxTokens: 2048
50
+ defaultProposalTtlMs: 900000
51
+ maxImportRecords: 100
52
+ reconcileIntervalMs: 15000
53
+ reconcileLimit: 50
54
+ personalWiki:
55
+ vaultRoot: !!js dshHomePath('personal-wiki/vault')
56
+ databasePath: !!js dshHomePath('personal-wiki/state.sqlite')
57
+ maxPageBytes: 1048576
58
+ searchLimit: 20
59
+ maxSnippetBytes: 2048
60
+ readMaxBytes: 8192
61
+ readMaxParagraphs: 40
62
+ lintLimit: 200
63
+ defaultProposalTtlMs: 900000
64
+ reconcileIntervalMs: 15000
65
+ reconcileLimit: 50
66
+ assistantAutomations:
67
+ databasePath: !!js dshHomePath('assistant-automations/state.sqlite')
68
+ runsPath: !!js dshHomePath('assistant-automations/runs')
69
+ schedulerEnabled: false
70
+ tickIntervalMs: 5000
71
+ dutyLeaseMs: 15000
72
+ taskLeaseMs: 30000
73
+ misfireGraceMs: 60000
74
+ maxCatchUp: 100
75
+ maxConcurrency: 1
76
+ maxArtifactBytes: 1048576
77
+ defaultProposalTtlMs: 900000
78
+ reconcileIntervalMs: 15000
79
+ reconcileLimit: 50
80
+ toolCapableProviders:
81
+ - deepseek-official
package/lib/index.d.ts ADDED
@@ -0,0 +1,18 @@
1
+ import type { Context } from '@deepseek-ai/cordis';
2
+ import Schema from '@deepseek-ai/schemastery';
3
+ import { type Config as AutomationsConfig } from '@dsh-enhanced/assistant-automations';
4
+ import { type Config as PolicyConfig } from '@dsh-enhanced/assistant-policy';
5
+ import { type Config as MemoryConfig } from '@dsh-enhanced/personal-memory';
6
+ import { type Config as WikiConfig } from '@dsh-enhanced/personal-wiki';
7
+ import { version } from './version.js';
8
+ export interface Config {
9
+ assistantPolicy: PolicyConfig;
10
+ personalMemory: MemoryConfig;
11
+ personalWiki: WikiConfig;
12
+ assistantAutomations: AutomationsConfig;
13
+ }
14
+ export declare const Config: Schema<Config>;
15
+ export declare const name = "dsh-enhanced-personal-assistant";
16
+ export { version };
17
+ export declare function apply(ctx: Context, input: Config): Promise<void>;
18
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAA;AAClD,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAC7C,OAAO,EAA+B,KAAK,MAAM,IAAI,iBAAiB,EAAE,MAAM,qCAAqC,CAAA;AACnH,OAAO,EAA0B,KAAK,MAAM,IAAI,YAAY,EAAE,MAAM,gCAAgC,CAAA;AACpG,OAAO,EAAyB,KAAK,MAAM,IAAI,YAAY,EAAE,MAAM,+BAA+B,CAAA;AAClG,OAAO,EAAuB,KAAK,MAAM,IAAI,UAAU,EAAE,MAAM,6BAA6B,CAAA;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAEtC,MAAM,WAAW,MAAM;IACrB,eAAe,EAAE,YAAY,CAAA;IAC7B,cAAc,EAAE,YAAY,CAAA;IAC5B,YAAY,EAAE,UAAU,CAAA;IACxB,oBAAoB,EAAE,iBAAiB,CAAA;CACxC;AAED,eAAO,MAAM,MAAM,EAKb,MAAM,CAAC,MAAM,CAAC,CAAA;AAEpB,eAAO,MAAM,IAAI,oCAAoC,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,wBAAsB,KAAK,CAAC,GAAG,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAMtE"}
package/lib/index.js ADDED
@@ -0,0 +1,22 @@
1
+ import Schema from '@deepseek-ai/schemastery';
2
+ import { AssistantAutomationsService } from '@dsh-enhanced/assistant-automations';
3
+ import { AssistantPolicyService } from '@dsh-enhanced/assistant-policy';
4
+ import { PersonalMemoryService } from '@dsh-enhanced/personal-memory';
5
+ import { PersonalWikiService } from '@dsh-enhanced/personal-wiki';
6
+ import { version } from './version.js';
7
+ export const Config = Schema.object({
8
+ assistantPolicy: AssistantPolicyService.Config.required(),
9
+ personalMemory: PersonalMemoryService.Config.required(),
10
+ personalWiki: PersonalWikiService.Config.required(),
11
+ assistantAutomations: AssistantAutomationsService.Config.required(),
12
+ });
13
+ export const name = 'dsh-enhanced-personal-assistant';
14
+ export { version };
15
+ export async function apply(ctx, input) {
16
+ const config = Config(input);
17
+ await ctx.plugin(AssistantPolicyService, config.assistantPolicy);
18
+ await ctx.plugin(PersonalMemoryService, config.personalMemory);
19
+ await ctx.plugin(PersonalWikiService, config.personalWiki);
20
+ await ctx.plugin(AssistantAutomationsService, config.assistantAutomations);
21
+ }
22
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,MAAM,MAAM,0BAA0B,CAAA;AAC7C,OAAO,EAAE,2BAA2B,EAAoC,MAAM,qCAAqC,CAAA;AACnH,OAAO,EAAE,sBAAsB,EAA+B,MAAM,gCAAgC,CAAA;AACpG,OAAO,EAAE,qBAAqB,EAA+B,MAAM,+BAA+B,CAAA;AAClG,OAAO,EAAE,mBAAmB,EAA6B,MAAM,6BAA6B,CAAA;AAC5F,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAA;AAStC,MAAM,CAAC,MAAM,MAAM,GAAG,MAAM,CAAC,MAAM,CAAC;IAClC,eAAe,EAAE,sBAAsB,CAAC,MAAM,CAAC,QAAQ,EAAE;IACzD,cAAc,EAAE,qBAAqB,CAAC,MAAM,CAAC,QAAQ,EAAE;IACvD,YAAY,EAAE,mBAAmB,CAAC,MAAM,CAAC,QAAQ,EAAE;IACnD,oBAAoB,EAAE,2BAA2B,CAAC,MAAM,CAAC,QAAQ,EAAE;CACpE,CAAmB,CAAA;AAEpB,MAAM,CAAC,MAAM,IAAI,GAAG,iCAAiC,CAAA;AACrD,OAAO,EAAE,OAAO,EAAE,CAAA;AAElB,MAAM,CAAC,KAAK,UAAU,KAAK,CAAC,GAAY,EAAE,KAAa;IACrD,MAAM,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,CAAA;IAC5B,MAAM,GAAG,CAAC,MAAM,CAAC,sBAAsB,EAAE,MAAM,CAAC,eAAe,CAAC,CAAA;IAChE,MAAM,GAAG,CAAC,MAAM,CAAC,qBAAqB,EAAE,MAAM,CAAC,cAAc,CAAC,CAAA;IAC9D,MAAM,GAAG,CAAC,MAAM,CAAC,mBAAmB,EAAE,MAAM,CAAC,YAAY,CAAC,CAAA;IAC1D,MAAM,GAAG,CAAC,MAAM,CAAC,2BAA2B,EAAE,MAAM,CAAC,oBAAoB,CAAC,CAAA;AAC5E,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare const version = "0.1.3";
2
+ //# sourceMappingURL=version.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,UAAU,CAAA"}
package/lib/version.js ADDED
@@ -0,0 +1,2 @@
1
+ export const version = '0.1.3';
2
+ //# sourceMappingURL=version.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAA"}
package/package.json ADDED
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "@dsh-enhanced/personal-assistant",
3
+ "version": "0.1.3",
4
+ "description": "A core-only meta-bundle for the DSH personal assistant policy, memory, Wiki, and automations plugins.",
5
+ "license": "MIT",
6
+ "type": "module",
7
+ "main": "./lib/index.js",
8
+ "types": "./lib/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./lib/index.d.ts",
12
+ "default": "./lib/index.js"
13
+ },
14
+ "./cordis.patch.yml": "./cordis.patch.yml",
15
+ "./package.json": "./package.json"
16
+ },
17
+ "files": [
18
+ "lib",
19
+ "cordis.patch.yml",
20
+ "README.md",
21
+ "LICENSE"
22
+ ],
23
+ "engines": {
24
+ "node": "^22.19.0 || >=24.0.0"
25
+ },
26
+ "publishConfig": {
27
+ "access": "public"
28
+ },
29
+ "repository": {
30
+ "type": "git",
31
+ "url": "git+https://github.com/22-ai-00/dsh-enhanced.git",
32
+ "directory": "plugins/personal-assistant"
33
+ },
34
+ "keywords": [
35
+ "deepseek",
36
+ "deepseek-harness",
37
+ "dsh-plugin"
38
+ ],
39
+ "dsh": {
40
+ "bundle": {
41
+ "patch": "./cordis.patch.yml"
42
+ }
43
+ },
44
+ "dependencies": {
45
+ "@deepseek-ai/schemastery": "3.18.1",
46
+ "@dsh-enhanced/assistant-automations": "0.1.3",
47
+ "@dsh-enhanced/assistant-policy": "0.1.3",
48
+ "@dsh-enhanced/personal-memory": "0.1.3",
49
+ "@dsh-enhanced/personal-wiki": "0.1.3"
50
+ },
51
+ "peerDependencies": {
52
+ "@deepseek-ai/cordis": "^4.0.1"
53
+ },
54
+ "peerDependenciesMeta": {
55
+ "@deepseek-ai/cordis": {
56
+ "optional": true
57
+ }
58
+ },
59
+ "devDependencies": {
60
+ "@deepseek-ai/cordis": "4.0.1",
61
+ "@types/node": "22.20.0",
62
+ "typescript": "6.0.3",
63
+ "vitest": "4.1.8"
64
+ },
65
+ "scripts": {
66
+ "build": "tsc -p tsconfig.build.json",
67
+ "test": "vitest run",
68
+ "typecheck": "tsc -p tsconfig.json --noEmit"
69
+ }
70
+ }