dsh-wecom-bot 0.2.1 → 0.4.2

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.
Files changed (50) hide show
  1. package/README.md +159 -54
  2. package/dist/client.js +1462 -613
  3. package/dist/host/bridge/commands.js +315 -48
  4. package/dist/host/bridge/commands.js.map +1 -1
  5. package/dist/host/bridge/directory.js +33 -10
  6. package/dist/host/bridge/directory.js.map +1 -1
  7. package/dist/host/bridge/format.js +23 -0
  8. package/dist/host/bridge/format.js.map +1 -1
  9. package/dist/host/bridge/index.js +219 -104
  10. package/dist/host/bridge/index.js.map +1 -1
  11. package/dist/host/bridge/interactions.js +2 -2
  12. package/dist/host/bridge/interactions.js.map +1 -1
  13. package/dist/host/bridge/notices.js +229 -46
  14. package/dist/host/bridge/notices.js.map +1 -1
  15. package/dist/host/bridge/outbox.js.map +1 -1
  16. package/dist/host/bridge/policy.js +16 -16
  17. package/dist/host/bridge/policy.js.map +1 -1
  18. package/dist/host/bridge/selection.js +1 -0
  19. package/dist/host/bridge/selection.js.map +1 -1
  20. package/dist/host/catalog.js +70 -7
  21. package/dist/host/catalog.js.map +1 -1
  22. package/dist/host/config.js +31 -12
  23. package/dist/host/config.js.map +1 -1
  24. package/dist/host/groups-view.js +308 -0
  25. package/dist/host/groups-view.js.map +1 -0
  26. package/dist/host/index.js +21 -11
  27. package/dist/host/index.js.map +1 -1
  28. package/dist/host/models.js +106 -0
  29. package/dist/host/models.js.map +1 -0
  30. package/dist/host/observation.js +53 -60
  31. package/dist/host/observation.js.map +1 -1
  32. package/dist/host/presets.js +49 -0
  33. package/dist/host/presets.js.map +1 -0
  34. package/dist/host/routes.js +76 -4
  35. package/dist/host/routes.js.map +1 -1
  36. package/dist/host/routing-store.js +349 -0
  37. package/dist/host/routing-store.js.map +1 -0
  38. package/dist/host/routing.js +71 -0
  39. package/dist/host/routing.js.map +1 -0
  40. package/dist/host/runtime.js +177 -7
  41. package/dist/host/runtime.js.map +1 -1
  42. package/dist/host/session-ops.js +100 -0
  43. package/dist/host/session-ops.js.map +1 -0
  44. package/dist/host/sessions.js +140 -0
  45. package/dist/host/sessions.js.map +1 -0
  46. package/dist/host/workspaces.js +154 -0
  47. package/dist/host/workspaces.js.map +1 -0
  48. package/dist/shared/protocol.js +23 -0
  49. package/dist/shared/protocol.js.map +1 -1
  50. package/package.json +2 -2
@@ -0,0 +1,154 @@
1
+ import { mkdir, realpath, stat } from 'node:fs/promises';
2
+ import { basename, join } from 'node:path';
3
+ import { PLUGIN_WORKSPACE_DIRECTORY, PLUGIN_WORKSPACE_TITLE, } from '../shared/protocol.js';
4
+ import { normalizePath } from './config.js';
5
+ export function createWorkspaceService(options) {
6
+ const cache = new Map();
7
+ function registry() {
8
+ const found = options.registry();
9
+ return found && typeof found.create === 'function' ? found : undefined;
10
+ }
11
+ /** Registered entity whose canonical path matches, if any. */
12
+ function registered(ref) {
13
+ const target = normalizePath(ref.path);
14
+ for (const workspace of registry()?.list() ?? []) {
15
+ if (normalizePath(workspace.path) === target) {
16
+ return {
17
+ id: String(workspace.id), path: workspace.path, title: workspace.title,
18
+ pluginOwned: normalizePath(workspace.path) === normalizePath(options.defaultPath),
19
+ registered: true,
20
+ };
21
+ }
22
+ }
23
+ return undefined;
24
+ }
25
+ async function existingDirectory(path) {
26
+ try {
27
+ return (await stat(path)).isDirectory();
28
+ }
29
+ catch {
30
+ return false;
31
+ }
32
+ }
33
+ async function canonical(path) {
34
+ try {
35
+ return await realpath(path);
36
+ }
37
+ catch {
38
+ return normalizePath(path);
39
+ }
40
+ }
41
+ function owned(path) {
42
+ return normalizePath(path) === normalizePath(options.defaultPath);
43
+ }
44
+ return {
45
+ defaultPath: () => options.defaultPath,
46
+ async resolve(path) {
47
+ const configured = normalizePath(path);
48
+ const pluginOwned = !configured;
49
+ const target = configured || options.defaultPath;
50
+ const cached = cache.get(target);
51
+ if (cached)
52
+ return cached;
53
+ if (pluginOwned) {
54
+ // The plugin owns this directory: it may not exist yet.
55
+ try {
56
+ await mkdir(target, { recursive: true, mode: 0o700 });
57
+ }
58
+ catch (error) {
59
+ throw new Error(`默认 Workspace 目录创建失败:${error instanceof Error ? error.message : String(error)}`);
60
+ }
61
+ }
62
+ else if (!(await existingDirectory(target))) {
63
+ throw new Error(`Workspace 目录不存在或不是目录:${target}`);
64
+ }
65
+ const canonicalPath = await canonical(target);
66
+ const already = registered({ path: canonicalPath });
67
+ if (already) {
68
+ const ref = { ...already, pluginOwned };
69
+ cache.set(target, ref);
70
+ return ref;
71
+ }
72
+ const found = registry();
73
+ if (!found) {
74
+ const ref = {
75
+ id: '', path: canonicalPath, title: pluginOwned ? PLUGIN_WORKSPACE_TITLE : basename(canonicalPath),
76
+ pluginOwned, registered: false,
77
+ };
78
+ cache.set(target, ref);
79
+ return ref;
80
+ }
81
+ try {
82
+ const workspace = await found.create(canonicalPath, pluginOwned ? PLUGIN_WORKSPACE_TITLE : undefined);
83
+ const ref = {
84
+ id: String(workspace.id), path: workspace.path, title: workspace.title,
85
+ pluginOwned, registered: true,
86
+ };
87
+ cache.set(target, ref);
88
+ return ref;
89
+ }
90
+ catch (error) {
91
+ throw new Error(`Workspace 注册失败(${canonicalPath}):${error instanceof Error ? error.message : String(error)}`);
92
+ }
93
+ },
94
+ async describe(path) {
95
+ const configured = normalizePath(path);
96
+ const target = configured || options.defaultPath;
97
+ const cached = cache.get(target);
98
+ if (cached)
99
+ return cached;
100
+ const already = registered({ path: target });
101
+ if (already) {
102
+ const ref = { ...already, pluginOwned: !configured || already.pluginOwned };
103
+ cache.set(target, ref);
104
+ return ref;
105
+ }
106
+ const canonicalPath = await canonical(target);
107
+ if (canonicalPath !== target) {
108
+ const byCanonical = registered({ path: canonicalPath });
109
+ if (byCanonical) {
110
+ const ref = { ...byCanonical, pluginOwned: !configured || byCanonical.pluginOwned };
111
+ cache.set(target, ref);
112
+ return ref;
113
+ }
114
+ }
115
+ if (!(await existingDirectory(canonicalPath))) {
116
+ if (!configured) {
117
+ // The plugin's own directory is created lazily; describe it as-is.
118
+ return { id: '', path: canonicalPath, title: PLUGIN_WORKSPACE_TITLE, pluginOwned: true, registered: false };
119
+ }
120
+ throw new Error(`Workspace 目录不存在或不是目录:${target}`);
121
+ }
122
+ return {
123
+ id: '', path: canonicalPath,
124
+ title: configured && basename(canonicalPath) ? basename(canonicalPath) : PLUGIN_WORKSPACE_TITLE,
125
+ pluginOwned: !configured, registered: false,
126
+ };
127
+ },
128
+ list() {
129
+ const found = registry();
130
+ if (!found)
131
+ return [];
132
+ // Archived Sessions keep their Workspace assignment but can never
133
+ // notify anybody, so the page counts and shows only live ones.
134
+ const archived = new Set(found.archivedSessionIds ?? []);
135
+ return found.list().map(workspace => {
136
+ const active = workspace.sessionIds.filter(id => !archived.has(id));
137
+ return {
138
+ id: String(workspace.id),
139
+ path: workspace.path,
140
+ title: workspace.title,
141
+ pluginOwned: owned(workspace.path),
142
+ sessionCount: active.length,
143
+ archivedSessionCount: workspace.sessionIds.length - active.length,
144
+ };
145
+ });
146
+ },
147
+ invalidate() { cache.clear(); },
148
+ };
149
+ }
150
+ /** Directory of the plugin's own Workspace below a plugin home directory. */
151
+ export function pluginWorkspacePath(pluginHome) {
152
+ return join(pluginHome, PLUGIN_WORKSPACE_DIRECTORY);
153
+ }
154
+ //# sourceMappingURL=workspaces.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workspaces.js","sourceRoot":"","sources":["../../src/host/workspaces.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AACzD,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACL,0BAA0B,EAAE,sBAAsB,GACnD,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAgD5C,MAAM,UAAU,sBAAsB,CAAC,OAAgC;IACrE,MAAM,KAAK,GAA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CAAC,CAAC;KAChC,CAAC;AACJ,CAAC;AAED,6EAA6E;AAC7E,MAAM,UAAU,mBAAmB,CAAC,UAAkB;IACpD,OAAO,IAAI,CAAC,UAAU,EAAE,0BAA0B,CAAC,CAAC;AACtD,CAAC"}
@@ -11,6 +11,29 @@ export const CONFIG_NAMESPACE = 'wecom-bot';
11
11
  export const DEFAULT_SECRET_REF = 'WECOM_BOT_SECRET';
12
12
  /** Authenticated Connection Fetch route; the browser reads it document-relative. */
13
13
  export const STATE_ROUTE = '/api/wecom-bot/state';
14
+ /** Authenticated Connection Fetch route that applies group/member edits. */
15
+ export const ROUTING_ROUTE = '/api/wecom-bot/routing';
14
16
  /** Directory below the DSH home that holds this plugin's own data. */
15
17
  export const PLUGIN_HOME_DIRECTORY = 'wecom-bot';
18
+ /** The plugin's own Workspace directory, below {@link PLUGIN_HOME_DIRECTORY}. */
19
+ export const PLUGIN_WORKSPACE_DIRECTORY = 'workspace';
20
+ /** Sidebar title of the plugin's own Workspace. */
21
+ export const PLUGIN_WORKSPACE_TITLE = '企业微信';
22
+ /**
23
+ * Persisted groups+bindings file version. The layout is named after the release
24
+ * line it belongs to (`0.4`) instead of counting every edit, so the number in
25
+ * `bindings.json` only moves when a new minor line changes the layout. A file of
26
+ * any other version is set aside instead of migrated — there is no earlier
27
+ * deployment to keep working.
28
+ */
29
+ export const ROUTING_VERSION = '0.4';
30
+ /** Upper bound on persisted members across all groups. */
31
+ export const MAX_BINDINGS = 500;
32
+ /** Upper bound on user groups. */
33
+ export const MAX_GROUPS = 20;
34
+ /** The built-in group that owns the plugin's default Workspace and model. */
35
+ export const DEFAULT_GROUP_ID = 'default';
36
+ export const DEFAULT_GROUP_NAME = '默认分组';
37
+ /** Longest accepted 备注 / group name, in characters. */
38
+ export const MAX_LABEL_CHARS = 60;
16
39
  //# sourceMappingURL=protocol.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"protocol.js","sourceRoot":"","sources":["../../src/shared/protocol.ts"],"names":[],"mappings":"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ACvD,MAAM,CAAC,MAAM,eAAe,GAAG,EAAE,CAAC"}
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "dsh-wecom-bot",
3
- "version": "0.2.1",
3
+ "version": "0.4.2",
4
4
  "type": "module",
5
5
  "packageManager": "pnpm@11.22.0",
6
- "description": "Bridge a WeCom (企业微信) smart bot to DeepSeek Harness Sessions: get notified when a Session finishes or needs input, and drive Sessions from WeCom chat.",
6
+ "description": "Bridge a WeCom (企业微信) smart bot to DeepSeek Harness: user groups own a Workspace, a model and an agent preset, members get their own Session, refused senders are told to ask an operator and wait in an authorization list on the plugin page, administrators can switch Sessions and select the Workspace their commands default to.",
7
7
  "license": "MIT",
8
8
  "icon": "./icon.svg",
9
9
  "main": "./dist/host/index.js",