dsh-mop 0.1.4 → 0.2.0
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/README.md +2 -4
- package/client.js +1157 -295
- package/index.js +21 -6
- package/lib/clean.mjs +19 -16
- package/lib/routes.mjs +16 -4
- package/lib/store.mjs +43 -15
- package/package.json +9 -3
- package/client.de.js +0 -39
- package/client.en.js +0 -39
- package/client.es.js +0 -39
- package/client.fr.js +0 -39
- package/client.ja.js +0 -39
- package/client.pt.js +0 -39
- package/client.ru.js +0 -39
- package/client.zh.js +0 -39
- package/lib/release-session.mjs +0 -30
package/client.zh.js
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
/** dsh-mop 的中文界面文案。键名与 client.en.js 保持一致,缺的键会回退到英文。 */
|
|
2
|
-
window.__ModuleLoader__.load({
|
|
3
|
-
id: 'dsh-mop',
|
|
4
|
-
chunk: 'client.zh.js',
|
|
5
|
-
factory() {
|
|
6
|
-
return {
|
|
7
|
-
messages: {
|
|
8
|
-
'tabs.residue': '残留',
|
|
9
|
-
'selection.summary': '已选 {n} 个 · {size}',
|
|
10
|
-
'search.placeholder': '搜索{section}',
|
|
11
|
-
'confirm.purge.description': '删除后无法恢复',
|
|
12
|
-
'archive.scheduleDeletion': '发往此会话的活动自动化任务及其已保存的运行记录将被删除。',
|
|
13
|
-
'error.notArchived': '只能删除已归档的会话',
|
|
14
|
-
'error.workspaceProtected': '工作区受保护',
|
|
15
|
-
'protection.label': '受保护',
|
|
16
|
-
'reference.schedule': '关联了计划任务',
|
|
17
|
-
'residue.registeredCache': '还有工作区注册',
|
|
18
|
-
'residue.orphanCache': '无对应会话的缓存',
|
|
19
|
-
'residue.ghostRegistry': '无对应会话的注册',
|
|
20
|
-
'residue.sessionDirectory': '未识别会话目录',
|
|
21
|
-
'residue.emptyProject': '空会话目录',
|
|
22
|
-
'confirm.tasks.description': '所选任务及其保存的运行记录将被删除',
|
|
23
|
-
'error.schedule_changed': '任务已变化,请刷新后重试',
|
|
24
|
-
'error.session_resident': '会话仍在使用中',
|
|
25
|
-
'error.purge_busy': '会话正在清理,请稍后重试',
|
|
26
|
-
'error.workspace_unavailable': '无法检查工作区注册',
|
|
27
|
-
'error.workspace_filtered': '工作区含其他隐藏注册,无法单独移除',
|
|
28
|
-
'error.unsupported_storage': '无法确认会话日志位置',
|
|
29
|
-
'error.historical_format': '会话日志需要迁移后才能删除',
|
|
30
|
-
'error.historical_parent': '请先打开父会话完成迁移',
|
|
31
|
-
'error.unsafe_path': '无法确认文件路径',
|
|
32
|
-
'error.unknown_artifact': '会话目录包含未识别文件',
|
|
33
|
-
'error.session_changed': '会话状态已变化,请重试',
|
|
34
|
-
'error.cache_unavailable': '投影缓存服务不可用',
|
|
35
|
-
'error.residue_changed': '残留已变化,请刷新后重试',
|
|
36
|
-
},
|
|
37
|
-
};
|
|
38
|
-
},
|
|
39
|
-
});
|
package/lib/release-session.mjs
DELETED
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
import { reject } from './errors.mjs';
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* DSH rc.5 keeps the owning AgentHandle private. Its agent-loop installs an
|
|
5
|
-
* ordered Cordis effect that owns the same teardown. Match both the effect's
|
|
6
|
-
* label and the exact child scope identity before invoking its disposer.
|
|
7
|
-
*/
|
|
8
|
-
export async function releaseResidentSession(ctx, id) {
|
|
9
|
-
const agent = ctx.get('agents')?.get(id);
|
|
10
|
-
const session = ctx.get('sessions')?.get(id);
|
|
11
|
-
if (!agent && !session) return;
|
|
12
|
-
if (!agent || agent.status !== 'idle' || (session && agent.session !== session)) reject('session_resident');
|
|
13
|
-
|
|
14
|
-
const rawDispose = agent.scope?.rawDispose;
|
|
15
|
-
const disposables = agent.loopCtx?.fiber?._disposables;
|
|
16
|
-
if (typeof rawDispose !== 'function' || !disposables || typeof disposables[Symbol.iterator] !== 'function') reject('session_resident');
|
|
17
|
-
const candidates = [];
|
|
18
|
-
for (const symbol of Object.getOwnPropertySymbols(rawDispose)) {
|
|
19
|
-
const scopeEffect = rawDispose[symbol];
|
|
20
|
-
if (!scopeEffect || typeof scopeEffect !== 'object') continue;
|
|
21
|
-
for (const dispose of disposables) {
|
|
22
|
-
const effect = dispose?.[symbol];
|
|
23
|
-
if (typeof dispose === 'function' && effect?.label === `agentLoop.scope(${id})`
|
|
24
|
-
&& Array.isArray(effect.children) && effect.children.includes(scopeEffect)) candidates.push(dispose);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
if (candidates.length !== 1 || ctx.get('agents')?.get(id) !== agent) reject('session_resident');
|
|
28
|
-
await candidates[0]();
|
|
29
|
-
if (ctx.get('agents')?.get(id) || ctx.get('sessions')?.get(id)) reject('session_resident');
|
|
30
|
-
}
|