dsh-supermesh 0.0.0 → 0.0.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 +202 -202
- package/LICENSE.md +202 -202
- package/README.md +87 -95
- package/assets/prompts/orchestrator.md +62 -62
- package/assets/skills/supermesh-channel-feishu/SKILL.md +30 -30
- package/assets/skills/supermesh-channel-github/SKILL.md +36 -36
- package/dist/{channel-C_93wtiQ.js → channel-eDqcOvFj.js} +21 -2
- package/dist/client.cjs +269 -269
- package/dist/client.cjs.map +1 -1
- package/dist/index.js +28 -8
- package/dist/shell-Bj-vzt4e.js +1 -0
- package/package.json +107 -100
- package/src/main.css +8 -8
- package/dist/shell-6EeRyaxQ.js +0 -1
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as project, c as shell, d as singlet, f as setting, g as db, h as channelProxyEnvironment, i as archive, l as inbox, m as DSH_PLUGIN_HOME, n as server, o as worktree, p as defineService, r as worker$1, s as devops, t as channel, u as session } from "./channel-
|
|
1
|
+
import { a as project, c as shell, d as singlet, f as setting, g as db, h as channelProxyEnvironment, i as archive, l as inbox, m as DSH_PLUGIN_HOME, n as server, o as worktree, p as defineService, r as worker$1, s as devops, t as channel, u as session } from "./channel-eDqcOvFj.js";
|
|
2
2
|
import { existsSync, readFileSync } from "node:fs";
|
|
3
3
|
import { dirname, join, resolve } from "node:path";
|
|
4
4
|
import { fileURLToPath } from "node:url";
|
|
@@ -483,6 +483,15 @@ const resource$1 = defineService({
|
|
|
483
483
|
return null;
|
|
484
484
|
}
|
|
485
485
|
},
|
|
486
|
+
/**
|
|
487
|
+
* 仓库改名或转移后,GitHub 对旧全名仍返回 200,只是 full_name 变成新名。
|
|
488
|
+
* 返回新全名,未改名时返回 null;调用方必须跟随,否则采集会在 probe 阶段永久失败。
|
|
489
|
+
*/
|
|
490
|
+
renamed(configured, fullName) {
|
|
491
|
+
const canonical = resource$1.of(`https://github.com/${fullName}`);
|
|
492
|
+
if (!canonical) throw new GhError("invalid_response");
|
|
493
|
+
return canonical === configured ? null : canonical;
|
|
494
|
+
},
|
|
486
495
|
parse(value) {
|
|
487
496
|
const short = /^github:([^/:]+\/[^/:]+):(issue|pull):([1-9]\d*)$/.exec(value);
|
|
488
497
|
if (short) return {
|
|
@@ -864,6 +873,7 @@ const courier = defineService({
|
|
|
864
873
|
return singlet.immediate(`${port.channel}:exclusive:collect:${projectId}`, async () => {
|
|
865
874
|
const errors = [];
|
|
866
875
|
let scope;
|
|
876
|
+
let project;
|
|
867
877
|
const context = {
|
|
868
878
|
channel: port.channel,
|
|
869
879
|
projectId,
|
|
@@ -888,9 +898,9 @@ const courier = defineService({
|
|
|
888
898
|
}
|
|
889
899
|
};
|
|
890
900
|
try {
|
|
891
|
-
|
|
901
|
+
project = await port.project(projectId);
|
|
892
902
|
const environment = await port.probe(projectId, signal);
|
|
893
|
-
const resolved = await port.scope(project);
|
|
903
|
+
const resolved = await port.scope(await port.project(projectId));
|
|
894
904
|
if (!resolved) throw new ChannelError("unknown_repository");
|
|
895
905
|
scope = resolved;
|
|
896
906
|
const baseline = await courier.state(port.channel, scope, "baseline") ?? now();
|
|
@@ -903,7 +913,8 @@ const courier = defineService({
|
|
|
903
913
|
if (signal?.aborted) throw error;
|
|
904
914
|
errors.push(courier.failure(error, port.detail));
|
|
905
915
|
}
|
|
906
|
-
|
|
916
|
+
const status = scope ?? (project ? await port.scope(project).catch(() => null) : null);
|
|
917
|
+
if (port.status && status) await courier.record(port.channel, status, "collection_status", {
|
|
907
918
|
ok: !errors.length,
|
|
908
919
|
reasons: [...new Set(errors)],
|
|
909
920
|
collectedAt: now()
|
|
@@ -1033,7 +1044,8 @@ const binding$1 = defineService({ of(channel) {
|
|
|
1033
1044
|
project: (projectId) => channel.project(projectId),
|
|
1034
1045
|
probe: (projectId, signal) => channel.probe(projectId, signal),
|
|
1035
1046
|
collect: (context, signal) => channel.collectProject(context, signal),
|
|
1036
|
-
collectBranch: (projectId, branch, signal) => ci$1.branch(channel, projectId, branch, signal)
|
|
1047
|
+
collectBranch: (projectId, branch, signal) => ci$1.branch(channel, projectId, branch, signal),
|
|
1048
|
+
onFailure: (project, reason) => console.error(`[github:collect] ${project.name} ${project.remoteUrl} -> ${reason}`)
|
|
1037
1049
|
},
|
|
1038
1050
|
ingestor: {
|
|
1039
1051
|
channel: "github",
|
|
@@ -1276,16 +1288,24 @@ var GitHubChannel = class {
|
|
|
1276
1288
|
if (!bots.some((bot) => bot.name.toLowerCase() === login.toLowerCase())) throw new GhError("account_mismatch");
|
|
1277
1289
|
const repository = resource$1.of(project.remoteUrl);
|
|
1278
1290
|
const remote = record(await this.request(`repos/${repository}`, signal));
|
|
1279
|
-
|
|
1291
|
+
const canonical = resource$1.renamed(repository, text(remote.full_name)) ?? repository;
|
|
1292
|
+
if (canonical !== repository) {
|
|
1293
|
+
await db.project.setRemoteUrl(project.id, `https://github.com/${canonical}`, now());
|
|
1294
|
+
await db.sourceState.renameScope("github", repository, canonical, now());
|
|
1295
|
+
await courier.record("github", canonical, "repository_renamed", {
|
|
1296
|
+
from: repository,
|
|
1297
|
+
to: canonical
|
|
1298
|
+
});
|
|
1299
|
+
}
|
|
1280
1300
|
const result = {
|
|
1281
1301
|
providerId,
|
|
1282
1302
|
login,
|
|
1283
1303
|
repositoryId: identity(remote.id),
|
|
1284
1304
|
defaultBranch: typeof remote.default_branch === "string" ? remote.default_branch : null
|
|
1285
1305
|
};
|
|
1286
|
-
const previous = await courier.state("github",
|
|
1306
|
+
const previous = await courier.state("github", canonical, "verified_environment");
|
|
1287
1307
|
if (previous && (previous.providerId !== providerId || previous.repositoryId !== result.repositoryId)) throw new GhError("environment_identity_changed");
|
|
1288
|
-
await courier.record("github",
|
|
1308
|
+
await courier.record("github", canonical, "verified_environment", result);
|
|
1289
1309
|
return result;
|
|
1290
1310
|
}
|
|
1291
1311
|
async pages(path, signal) {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { c as shell } from "./channel-eDqcOvFj.js";
|
package/package.json
CHANGED
|
@@ -1,18 +1,27 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-supermesh",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
5
|
-
"
|
|
6
|
-
"description": "_description_",
|
|
4
|
+
"version": "0.0.3",
|
|
5
|
+
"description": "把 GitHub / GitLab 的 issue、PR 与评论变成任务,交给各自 worktree 里的 Worker 改代码、开 PR,再由上级代理验收收尾。",
|
|
7
6
|
"author": "Hairy <wwu710632@gmail.com>",
|
|
8
7
|
"license": "MIT",
|
|
9
|
-
"homepage": "https://github.com/
|
|
8
|
+
"homepage": "https://github.com/omdsh-dev/dsh-supermesh#readme",
|
|
10
9
|
"repository": {
|
|
11
10
|
"type": "git",
|
|
12
|
-
"url": "git+https://github.com/
|
|
11
|
+
"url": "git+https://github.com/omdsh-dev/dsh-supermesh.git"
|
|
13
12
|
},
|
|
14
|
-
"bugs": "https://github.com/
|
|
15
|
-
"keywords": [
|
|
13
|
+
"bugs": "https://github.com/omdsh-dev/dsh-supermesh/issues",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"dsh",
|
|
16
|
+
"deepseek",
|
|
17
|
+
"deepseek-harness",
|
|
18
|
+
"supermesh",
|
|
19
|
+
"superagent",
|
|
20
|
+
"orchestrator",
|
|
21
|
+
"github",
|
|
22
|
+
"gitlab",
|
|
23
|
+
"feishu"
|
|
24
|
+
],
|
|
16
25
|
"sideEffects": false,
|
|
17
26
|
"exports": {
|
|
18
27
|
".": "./dist/index.js",
|
|
@@ -51,23 +60,6 @@
|
|
|
51
60
|
},
|
|
52
61
|
"taiwind": "src/main.css"
|
|
53
62
|
},
|
|
54
|
-
"scripts": {
|
|
55
|
-
"genapi": "genapi",
|
|
56
|
-
"build": "tsdown",
|
|
57
|
-
"dev": "tsdown --watch",
|
|
58
|
-
"dev:dsh": "tsx scripts/dsh.ts",
|
|
59
|
-
"lint": "eslint",
|
|
60
|
-
"prepack": "nr build",
|
|
61
|
-
"release": "bumpp",
|
|
62
|
-
"start": "tsx src/index.ts",
|
|
63
|
-
"test": "vitest run --project unit --passWithNoTests",
|
|
64
|
-
"test:e2e": "vitest run --project e2e",
|
|
65
|
-
"typecheck": "tsc",
|
|
66
|
-
"prisma:generate": "prisma generate",
|
|
67
|
-
"prisma:migrate": "tsx scripts/migrate.ts",
|
|
68
|
-
"prepare:skills": "skills-npm && pnpx skills experimental_install",
|
|
69
|
-
"prepare": "git config core.hooksPath .githooks && simple-git-hooks && pnpm run prepare:skills"
|
|
70
|
-
},
|
|
71
63
|
"scripts-info": {
|
|
72
64
|
"build": "Build the library for publishing",
|
|
73
65
|
"dev": "Rebuild on change during development",
|
|
@@ -82,88 +74,103 @@
|
|
|
82
74
|
"prepare": "Set up git hooks and skills"
|
|
83
75
|
},
|
|
84
76
|
"dependencies": {
|
|
85
|
-
"@deepseek-ai/dsh-http-proxy": "
|
|
86
|
-
"@fileshed/kysely-node-sqlite": "
|
|
87
|
-
"@reause/core": "
|
|
88
|
-
"@tanstack/react-query": "
|
|
89
|
-
"croner": "
|
|
90
|
-
"dsh-h3": "
|
|
91
|
-
"dsh-taiwind": "
|
|
92
|
-
"h3": "
|
|
93
|
-
"kysely": "
|
|
94
|
-
"kysely-model": "
|
|
95
|
-
"react-if-lite": "
|
|
96
|
-
"recharts": "
|
|
97
|
-
"undici": "
|
|
98
|
-
"unstorage": "
|
|
77
|
+
"@deepseek-ai/dsh-http-proxy": "0.2.2-rc.2",
|
|
78
|
+
"@fileshed/kysely-node-sqlite": "^0.1.0",
|
|
79
|
+
"@reause/core": "^0.1.9",
|
|
80
|
+
"@tanstack/react-query": "^5.107.1",
|
|
81
|
+
"croner": "^11.0.0",
|
|
82
|
+
"dsh-h3": "^0.2.2",
|
|
83
|
+
"dsh-taiwind": "^0.3.3",
|
|
84
|
+
"h3": "^2.0.8",
|
|
85
|
+
"kysely": "^0.29.8",
|
|
86
|
+
"kysely-model": "^0.1.0",
|
|
87
|
+
"react-if-lite": "^0.1.0",
|
|
88
|
+
"recharts": "^3.10.1",
|
|
89
|
+
"undici": "8.11.2",
|
|
90
|
+
"unstorage": "2.0.0-beta.0"
|
|
99
91
|
},
|
|
100
92
|
"devDependencies": {
|
|
101
|
-
"@antfu/eslint-config": "
|
|
102
|
-
"@antfu/ni": "
|
|
103
|
-
"@deepseek-ai/cordis": "
|
|
104
|
-
"@deepseek-ai/cordis-plugin-include": "
|
|
105
|
-
"@deepseek-ai/cordis-plugin-loader": "
|
|
106
|
-
"@deepseek-ai/dsh-agent": "
|
|
107
|
-
"@deepseek-ai/dsh-agent-default-model": "
|
|
108
|
-
"@deepseek-ai/dsh-agent-preset": "
|
|
109
|
-
"@deepseek-ai/dsh-agent-preset-registry": "
|
|
110
|
-
"@deepseek-ai/dsh-api-session-controller": "
|
|
111
|
-
"@deepseek-ai/dsh-client-connection": "
|
|
112
|
-
"@deepseek-ai/dsh-client-locale": "
|
|
113
|
-
"@deepseek-ai/dsh-client-store": "
|
|
114
|
-
"@deepseek-ai/dsh-client-ui-chat": "
|
|
115
|
-
"@deepseek-ai/dsh-client-ui-conversation": "
|
|
116
|
-
"@deepseek-ai/dsh-client-ui-layout": "
|
|
117
|
-
"@deepseek-ai/dsh-client-ui-primitives": "
|
|
118
|
-
"@deepseek-ai/dsh-client-ui-renderer": "
|
|
119
|
-
"@deepseek-ai/dsh-client-ui-session": "
|
|
120
|
-
"@deepseek-ai/dsh-client-ui-settings": "
|
|
121
|
-
"@deepseek-ai/dsh-client-ui-sidebar": "
|
|
122
|
-
"@deepseek-ai/dsh-client-ui-slots": "
|
|
123
|
-
"@deepseek-ai/dsh-client-ui-workspace": "
|
|
124
|
-
"@deepseek-ai/dsh-credentials": "
|
|
125
|
-
"@deepseek-ai/dsh-host-webserver": "
|
|
126
|
-
"@deepseek-ai/dsh-llm": "
|
|
127
|
-
"@deepseek-ai/dsh-session": "
|
|
128
|
-
"@deepseek-ai/dsh-session-persistence": "
|
|
129
|
-
"@deepseek-ai/dsh-session-projection": "
|
|
130
|
-
"@deepseek-ai/dsh-session-query": "
|
|
131
|
-
"@deepseek-ai/dsh-skill-filesystem": "
|
|
132
|
-
"@deepseek-ai/dsh-tools": "
|
|
133
|
-
"@deepseek-ai/dsh-user-approval": "
|
|
134
|
-
"@deepseek-ai/dsh-util-values": "
|
|
135
|
-
"@deepseek-ai/dsh-workspace": "
|
|
136
|
-
"@genapi/core": "
|
|
137
|
-
"@genapi/pipeline": "
|
|
138
|
-
"@genapi/presets": "
|
|
139
|
-
"@rolldown/plugin-babel": "
|
|
140
|
-
"@types/node": "
|
|
141
|
-
"@types/react": "
|
|
142
|
-
"@vitejs/plugin-react": "
|
|
143
|
-
"@vitest/browser-playwright": "
|
|
144
|
-
"babel-plugin-react-compiler": "
|
|
145
|
-
"bumpp": "
|
|
146
|
-
"eslint": "
|
|
147
|
-
"nano-staged": "
|
|
148
|
-
"playwright": "
|
|
149
|
-
"prisma": "
|
|
150
|
-
"prisma-kysely": "
|
|
151
|
-
"publint": "
|
|
152
|
-
"react": "
|
|
153
|
-
"react-compiler-runtime": "
|
|
154
|
-
"simple-git-hooks": "
|
|
155
|
-
"skills-npm": "
|
|
156
|
-
"tinyexec": "
|
|
157
|
-
"tsdown": "
|
|
158
|
-
"tsx": "
|
|
159
|
-
"typescript": "
|
|
160
|
-
"vite": "
|
|
161
|
-
"vitest": "
|
|
93
|
+
"@antfu/eslint-config": "^9.1.0",
|
|
94
|
+
"@antfu/ni": "^30.2.0",
|
|
95
|
+
"@deepseek-ai/cordis": "4.0.5",
|
|
96
|
+
"@deepseek-ai/cordis-plugin-include": "1.0.10",
|
|
97
|
+
"@deepseek-ai/cordis-plugin-loader": "1.0.6",
|
|
98
|
+
"@deepseek-ai/dsh-agent": "0.2.2-rc.2",
|
|
99
|
+
"@deepseek-ai/dsh-agent-default-model": "0.2.2-rc.2",
|
|
100
|
+
"@deepseek-ai/dsh-agent-preset": "0.2.2-rc.2",
|
|
101
|
+
"@deepseek-ai/dsh-agent-preset-registry": "0.2.2-rc.2",
|
|
102
|
+
"@deepseek-ai/dsh-api-session-controller": "0.2.2-rc.2",
|
|
103
|
+
"@deepseek-ai/dsh-client-connection": "0.2.2-rc.2",
|
|
104
|
+
"@deepseek-ai/dsh-client-locale": "0.2.2-rc.2",
|
|
105
|
+
"@deepseek-ai/dsh-client-store": "0.2.2-rc.2",
|
|
106
|
+
"@deepseek-ai/dsh-client-ui-chat": "0.2.2-rc.2",
|
|
107
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.2.2-rc.2",
|
|
108
|
+
"@deepseek-ai/dsh-client-ui-layout": "0.2.2-rc.2",
|
|
109
|
+
"@deepseek-ai/dsh-client-ui-primitives": "0.2.2-rc.2",
|
|
110
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.2-rc.2",
|
|
111
|
+
"@deepseek-ai/dsh-client-ui-session": "0.2.2-rc.2",
|
|
112
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.2.2-rc.2",
|
|
113
|
+
"@deepseek-ai/dsh-client-ui-sidebar": "0.2.2-rc.2",
|
|
114
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.2.2-rc.2",
|
|
115
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.2.2-rc.2",
|
|
116
|
+
"@deepseek-ai/dsh-credentials": "0.0.1-rc.1",
|
|
117
|
+
"@deepseek-ai/dsh-host-webserver": "0.2.2-rc.2",
|
|
118
|
+
"@deepseek-ai/dsh-llm": "0.2.2-rc.2",
|
|
119
|
+
"@deepseek-ai/dsh-session": "0.2.2-rc.2",
|
|
120
|
+
"@deepseek-ai/dsh-session-persistence": "0.2.2-rc.2",
|
|
121
|
+
"@deepseek-ai/dsh-session-projection": "0.2.2-rc.2",
|
|
122
|
+
"@deepseek-ai/dsh-session-query": "0.0.1-rc.1",
|
|
123
|
+
"@deepseek-ai/dsh-skill-filesystem": "0.2.2-rc.2",
|
|
124
|
+
"@deepseek-ai/dsh-tools": "0.2.2-rc.2",
|
|
125
|
+
"@deepseek-ai/dsh-user-approval": "0.2.2-rc.2",
|
|
126
|
+
"@deepseek-ai/dsh-util-values": "0.2.2-rc.2",
|
|
127
|
+
"@deepseek-ai/dsh-workspace": "0.2.2-rc.2",
|
|
128
|
+
"@genapi/core": "^4.1.4",
|
|
129
|
+
"@genapi/pipeline": "^4.1.4",
|
|
130
|
+
"@genapi/presets": "^4.1.4",
|
|
131
|
+
"@rolldown/plugin-babel": "^0.3.1",
|
|
132
|
+
"@types/node": "^26.1.1",
|
|
133
|
+
"@types/react": "19.3.0",
|
|
134
|
+
"@vitejs/plugin-react": "^6.3.0",
|
|
135
|
+
"@vitest/browser-playwright": "^4.1.10",
|
|
136
|
+
"babel-plugin-react-compiler": "^1.0.0",
|
|
137
|
+
"bumpp": "^12.0.0",
|
|
138
|
+
"eslint": "^10.7.0",
|
|
139
|
+
"nano-staged": "^1.0.2",
|
|
140
|
+
"playwright": "^1.62.1",
|
|
141
|
+
"prisma": "7.10.1",
|
|
142
|
+
"prisma-kysely": "^3.2.1",
|
|
143
|
+
"publint": "^0.3.21",
|
|
144
|
+
"react": "18.3.1",
|
|
145
|
+
"react-compiler-runtime": "^1.0.0",
|
|
146
|
+
"simple-git-hooks": "^2.13.1",
|
|
147
|
+
"skills-npm": "^1.2.0",
|
|
148
|
+
"tinyexec": "^1.3.1",
|
|
149
|
+
"tsdown": "^0.23.7",
|
|
150
|
+
"tsx": "^4.23.1",
|
|
151
|
+
"typescript": "^6.0.3",
|
|
152
|
+
"vite": "^8.1.5",
|
|
153
|
+
"vitest": "^4.1.12"
|
|
162
154
|
},
|
|
163
155
|
"simple-git-hooks": {
|
|
164
156
|
"pre-commit": "pnpm i --frozen-lockfile --ignore-scripts --offline && pnpm run build && npx nano-staged"
|
|
165
157
|
},
|
|
166
158
|
"nano-staged": {
|
|
167
159
|
"*": "eslint --fix"
|
|
160
|
+
},
|
|
161
|
+
"scripts": {
|
|
162
|
+
"genapi": "genapi",
|
|
163
|
+
"build": "tsdown",
|
|
164
|
+
"dev": "tsdown --watch",
|
|
165
|
+
"dev:dsh": "tsx scripts/dsh.ts",
|
|
166
|
+
"lint": "eslint",
|
|
167
|
+
"release": "bumpp",
|
|
168
|
+
"start": "tsx src/index.ts",
|
|
169
|
+
"test": "vitest run --project unit --passWithNoTests",
|
|
170
|
+
"test:e2e": "vitest run --project e2e",
|
|
171
|
+
"typecheck": "tsc",
|
|
172
|
+
"prisma:generate": "prisma generate",
|
|
173
|
+
"prisma:migrate": "tsx scripts/migrate.ts",
|
|
174
|
+
"prepare:skills": "skills-npm && pnpx skills experimental_install"
|
|
168
175
|
}
|
|
169
|
-
}
|
|
176
|
+
}
|
package/src/main.css
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
@import "tailwindcss";
|
|
2
|
-
|
|
3
|
-
/*
|
|
4
|
-
* 预设选择下拉的高度上限(330px,超出滚动)。
|
|
5
|
-
*/
|
|
6
|
-
body:has([data-slot='conversation.hero.agentPreset'] [aria-haspopup='menu'][aria-expanded='true']) > [role='menu'] {
|
|
7
|
-
max-height: 330px;
|
|
8
|
-
}
|
|
1
|
+
@import "tailwindcss";
|
|
2
|
+
|
|
3
|
+
/*
|
|
4
|
+
* 预设选择下拉的高度上限(330px,超出滚动)。
|
|
5
|
+
*/
|
|
6
|
+
body:has([data-slot='conversation.hero.agentPreset'] [aria-haspopup='menu'][aria-expanded='true']) > [role='menu'] {
|
|
7
|
+
max-height: 330px;
|
|
8
|
+
}
|
package/dist/shell-6EeRyaxQ.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { c as shell } from "./channel-C_93wtiQ.js";
|