@agi-fans/oh-my-dsh 0.27.0 → 0.28.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/config/cordis.yml +37 -10
- package/lib/agent-behavior.d.ts +2 -0
- package/lib/agent-behavior.js +22 -0
- package/lib/composition.d.ts +1 -1
- package/lib/composition.js +1 -1
- package/lib/doctor.js +2 -1
- package/lib/exec-runtime.js +38 -8
- package/lib/profile.d.ts +10 -0
- package/lib/profile.js +97 -3
- package/package.json +13 -5
package/config/cordis.yml
CHANGED
|
@@ -66,17 +66,17 @@
|
|
|
66
66
|
fallbackMaxBytes: 80
|
|
67
67
|
maxTitleBytes: 120
|
|
68
68
|
|
|
69
|
-
# LLM title provider
|
|
70
|
-
#
|
|
71
|
-
#
|
|
72
|
-
#
|
|
69
|
+
# LLM title provider across user prompts — summarizes the first prompt and
|
|
70
|
+
# refreshes automatic titles only when later messages materially shift topic,
|
|
71
|
+
# leaving manual renames intact. maxOutputTokens matches dsh-base (4096) so
|
|
72
|
+
# reasoning models whose thinking tokens count against the cap do not truncate.
|
|
73
73
|
- id: session-title-llm
|
|
74
|
-
name: '@deepseek-ai/dsh-session-title-
|
|
74
|
+
name: '@deepseek-ai/dsh-session-title-all-prompts-llm'
|
|
75
75
|
config:
|
|
76
76
|
targetWords: 5
|
|
77
77
|
targetCjkCharacters: 10
|
|
78
78
|
maxInputBytes: 4096
|
|
79
|
-
maxOutputTokens:
|
|
79
|
+
maxOutputTokens: 4096
|
|
80
80
|
timeoutMs: 60000
|
|
81
81
|
|
|
82
82
|
- id: session-stats
|
|
@@ -173,6 +173,9 @@
|
|
|
173
173
|
config:
|
|
174
174
|
dshHome: !!js process.env.OMDSH_HOME || process.env.DSH_HOME || undefined
|
|
175
175
|
|
|
176
|
+
- id: tmux-context
|
|
177
|
+
name: '@agi-fans/dsh-tui/tmux-settings'
|
|
178
|
+
|
|
176
179
|
# User settings and credential sources (inherited env, managed
|
|
177
180
|
# .credentials.yaml, project/user .env) — the same rows the harness base
|
|
178
181
|
# mounts, so omdsh honors the user's existing model route and API key setup
|
|
@@ -492,6 +495,9 @@
|
|
|
492
495
|
- id: tool-present
|
|
493
496
|
name: '@deepseek-ai/dsh-tool-present'
|
|
494
497
|
|
|
498
|
+
- id: deliverable-file-references
|
|
499
|
+
name: '@deepseek-ai/dsh-deliverable-file-references'
|
|
500
|
+
|
|
495
501
|
# Hosted search and fetch avoid local fake-IP resolution and auxiliary model
|
|
496
502
|
# turns. Direct HTTP and Messages search remain selectable alternatives.
|
|
497
503
|
# The adapter projects public provider registrations for the settings list;
|
|
@@ -507,8 +513,6 @@
|
|
|
507
513
|
|
|
508
514
|
- id: web-deepseek-api
|
|
509
515
|
name: '@deepseek-ai/dsh-web-deepseek-api'
|
|
510
|
-
config:
|
|
511
|
-
apiKeyEnv: DEEPSEEK_API_KEY
|
|
512
516
|
|
|
513
517
|
- id: web-search-deepseek
|
|
514
518
|
name: '@deepseek-ai/dsh-web-search-deepseek'
|
|
@@ -526,6 +530,13 @@
|
|
|
526
530
|
fetch: true
|
|
527
531
|
searchTimeoutMs: 60000
|
|
528
532
|
|
|
533
|
+
# Live MCP server fleet managed through /mcp and Settings → Integrations,
|
|
534
|
+
# coexisting alongside static `.dsh/mcp.json` and `$OMDSH_HOME/mcp.json` rows.
|
|
535
|
+
- id: mcp-manager
|
|
536
|
+
name: '@deepseek-ai/dsh-mcp-manager'
|
|
537
|
+
inject:
|
|
538
|
+
- credentials
|
|
539
|
+
|
|
529
540
|
# MCP resources: the three shared list/read tools appear only for callers whose
|
|
530
541
|
# scope has a connected MCP server, so a profile with no `mcp.json` pays no
|
|
531
542
|
# catalog cost. Resource text enters the conversation; binary payloads stay
|
|
@@ -584,6 +595,16 @@
|
|
|
584
595
|
- id: subagent
|
|
585
596
|
name: '@deepseek-ai/dsh-subagent'
|
|
586
597
|
|
|
598
|
+
# Opt-in shared Compare-and-Set task board over the session's continuable
|
|
599
|
+
# subagent tree (`defaultEnabled: false`). Toggled per session via `/team`.
|
|
600
|
+
- id: agent-team
|
|
601
|
+
name: '@deepseek-ai/dsh-agent-team'
|
|
602
|
+
config:
|
|
603
|
+
maxTasks: 256
|
|
604
|
+
|
|
605
|
+
- id: tool-agent-team
|
|
606
|
+
name: '@deepseek-ai/dsh-tool-agent-team'
|
|
607
|
+
|
|
587
608
|
- id: btw
|
|
588
609
|
name: '@agi-fans/dsh-tui/btw'
|
|
589
610
|
config:
|
|
@@ -636,10 +657,13 @@
|
|
|
636
657
|
OMDSH_HOME: !!js process.env.OMDSH_HOME || process.env.DSH_HOME || undefined
|
|
637
658
|
DEEPSEEK_API_KEY: !!js process.env.DEEPSEEK_API_KEY || undefined
|
|
638
659
|
|
|
639
|
-
# One row
|
|
640
|
-
#
|
|
660
|
+
# One row registers send_message, wait_agent, and list_agents; model-initiated
|
|
661
|
+
# interrupt_agent stays off by default so human Ctrl+C owns subagent cancellation
|
|
662
|
+
# unless a profile or preset opts in.
|
|
641
663
|
- id: subagent-control
|
|
642
664
|
name: '@deepseek-ai/dsh-tool-subagent-control'
|
|
665
|
+
config:
|
|
666
|
+
interrupt: false
|
|
643
667
|
|
|
644
668
|
- id: tool-subagent
|
|
645
669
|
name: '@deepseek-ai/dsh-tool-subagent'
|
|
@@ -760,6 +784,9 @@
|
|
|
760
784
|
- id: tui-command-integrations
|
|
761
785
|
name: '@agi-fans/dsh-tui/command-integrations'
|
|
762
786
|
|
|
787
|
+
- id: tui-command-team
|
|
788
|
+
name: '@agi-fans/dsh-tui/command-team'
|
|
789
|
+
|
|
763
790
|
- id: tui-command-jobs
|
|
764
791
|
name: '@agi-fans/dsh-tui/command-jobs'
|
|
765
792
|
|
package/lib/agent-behavior.d.ts
CHANGED
|
@@ -35,3 +35,5 @@ export declare class AgentBehaviorPrompt {
|
|
|
35
35
|
variable(context: AssembleContext, current: AgentLanguage): string;
|
|
36
36
|
}
|
|
37
37
|
export declare function apply(ctx: Context, config: Config): void;
|
|
38
|
+
/** Seed `retainOnArchive: true` once when the optional worktree bundle activates live. */
|
|
39
|
+
export declare function seedWorktreeArchiveDefault(ctx: Context, home?: string): Promise<boolean>;
|
package/lib/agent-behavior.js
CHANGED
|
@@ -4,6 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
import z from '@deepseek-ai/schemastery';
|
|
6
6
|
import { resolveUiLanguage } from '@agi-fans/dsh-tui';
|
|
7
|
+
import { omdshHome } from "./config-paths.js";
|
|
8
|
+
import { hasBundleDefault, recordBundleDefault } from "./profile.js";
|
|
7
9
|
export const name = 'omdsh-agent-behavior';
|
|
8
10
|
export const inject = ['settings', 'systemPrompt'];
|
|
9
11
|
/** Profile entry id whose volatile config carries the language preference. */
|
|
@@ -74,5 +76,25 @@ export function apply(ctx, config) {
|
|
|
74
76
|
};
|
|
75
77
|
tuiCtx.effect(() => tuiCtx.tui.bindAgentBehaviorSettings?.(binding) ?? (() => { }), 'bind Agent behavior settings to TUI');
|
|
76
78
|
});
|
|
79
|
+
const worktreeServices = ['worktrees'];
|
|
80
|
+
ctx.inject(worktreeServices, (worktreeCtx) => {
|
|
81
|
+
void seedWorktreeArchiveDefault(worktreeCtx).catch(error => worktreeCtx.logger.warn(error));
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/** Seed `retainOnArchive: true` once when the optional worktree bundle activates live. */
|
|
85
|
+
export async function seedWorktreeArchiveDefault(ctx, home = omdshHome()) {
|
|
86
|
+
if (hasBundleDefault(home, 'worktree') || !ctx.settings.writable)
|
|
87
|
+
return false;
|
|
88
|
+
const section = ctx.settings.describe().find(row => String(row.ns) === 'worktree');
|
|
89
|
+
if (section === undefined)
|
|
90
|
+
return false;
|
|
91
|
+
const user = section.user;
|
|
92
|
+
if (typeof user === 'object' && user !== null && Object.hasOwn(user, 'retainOnArchive')) {
|
|
93
|
+
recordBundleDefault(home, 'worktree');
|
|
94
|
+
return false;
|
|
95
|
+
}
|
|
96
|
+
await ctx.settings.mutate('worktree', [{ op: 'set', path: ['retainOnArchive'], value: true }], section.revision);
|
|
97
|
+
recordBundleDefault(home, 'worktree');
|
|
98
|
+
return true;
|
|
77
99
|
}
|
|
78
100
|
//# sourceMappingURL=agent-behavior.js.map
|
package/lib/composition.d.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { type ConfigDumpLayer } from '@deepseek-ai/dsh-app-boot';
|
|
7
7
|
import type { LaunchEnvironmentSnapshot } from '@deepseek-ai/dsh-launch-environment';
|
|
8
|
-
export { homePatchPath, INSTALL_ANCHOR, NAME, PRODUCT_BUNDLE, PROFILE_NAME, PROFILE_PATCH_LABEL, } from './profile.ts';
|
|
8
|
+
export { AUTO_REVIEW_BUNDLE, DEFAULT_PROFILE_BUNDLES, homePatchPath, INSTALL_ANCHOR, NAME, PRODUCT_BUNDLE, PROFILE_NAME, PROFILE_PATCH_LABEL, WORKTREE_BUNDLE, } from './profile.ts';
|
|
9
9
|
/**
|
|
10
10
|
* Materialize the same inherited > project `.env` > home `.env` snapshot
|
|
11
11
|
* that live boot uses, so dump, plugin, and mount see one process environment.
|
package/lib/composition.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
*/
|
|
6
6
|
import { loadLayeredEnv, renderConfigDump, } from '@deepseek-ai/dsh-app-boot';
|
|
7
7
|
import { composeLaunch, NAME } from "./profile.js";
|
|
8
|
-
export { homePatchPath, INSTALL_ANCHOR, NAME, PRODUCT_BUNDLE, PROFILE_NAME, PROFILE_PATCH_LABEL, } from "./profile.js";
|
|
8
|
+
export { AUTO_REVIEW_BUNDLE, DEFAULT_PROFILE_BUNDLES, homePatchPath, INSTALL_ANCHOR, NAME, PRODUCT_BUNDLE, PROFILE_NAME, PROFILE_PATCH_LABEL, WORKTREE_BUNDLE, } from "./profile.js";
|
|
9
9
|
/**
|
|
10
10
|
* Materialize the same inherited > project `.env` > home `.env` snapshot
|
|
11
11
|
* that live boot uses, so dump, plugin, and mount see one process environment.
|
package/lib/doctor.js
CHANGED
|
@@ -6,7 +6,7 @@ import { bundlePatchPaths, composeEntries, createRuntimeResolution, evaluatePlug
|
|
|
6
6
|
import { CREDENTIALS_FILENAME, parseCredentialsDocument } from '@deepseek-ai/dsh-credentials-local';
|
|
7
7
|
import { imageProtocol } from '@agi-fans/dsh-tui';
|
|
8
8
|
import { omdshHome } from "./config-paths.js";
|
|
9
|
-
import { INSTALL_ANCHOR, NAME, PRODUCT_BUNDLE, PROFILE_NAME } from "./profile.js";
|
|
9
|
+
import { DEFAULT_PROFILE_BUNDLES, INSTALL_ANCHOR, NAME, PRODUCT_BUNDLE, PROFILE_NAME } from "./profile.js";
|
|
10
10
|
import { loadLspPatches } from "./lsp-config.js";
|
|
11
11
|
import { loadMcpPatches } from "./mcp-config.js";
|
|
12
12
|
function object(value) {
|
|
@@ -79,6 +79,7 @@ export async function runDoctor(options) {
|
|
|
79
79
|
let bundles = [];
|
|
80
80
|
let profileReadable = true;
|
|
81
81
|
if (!existsSync(join(dir, 'package.json'))) {
|
|
82
|
+
bundles = [...DEFAULT_PROFILE_BUNDLES];
|
|
82
83
|
add('profile', 'not-configured', 'Profile is not initialized; shipped defaults are inspected.', 'Start omdsh to initialize the Profile.');
|
|
83
84
|
}
|
|
84
85
|
else {
|
package/lib/exec-runtime.js
CHANGED
|
@@ -22,10 +22,33 @@ export async function executeAgent(ctx, request, output, signal) {
|
|
|
22
22
|
let text = '', resultError, requiresInput = false;
|
|
23
23
|
let terminalReason;
|
|
24
24
|
const owned = new Set();
|
|
25
|
+
const knownSessionIds = new Set();
|
|
25
26
|
const stopped = new AbortController();
|
|
26
27
|
const lifetime = AbortSignal.any([signal, stopped.signal]);
|
|
27
28
|
const off = [];
|
|
28
|
-
const
|
|
29
|
+
const isTreeMember = (agent) => {
|
|
30
|
+
if (root === undefined || agent === root)
|
|
31
|
+
return false;
|
|
32
|
+
try {
|
|
33
|
+
return ctx.get('subagents')?.rootOf(agent) === root;
|
|
34
|
+
}
|
|
35
|
+
catch {
|
|
36
|
+
return false;
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
const claim = (agent) => {
|
|
40
|
+
if (owned.has(agent))
|
|
41
|
+
return true;
|
|
42
|
+
const parentId = agent.session.header.parentSession;
|
|
43
|
+
if ((parentId !== undefined && (parentId === root?.id || knownSessionIds.has(String(parentId))))
|
|
44
|
+
|| isTreeMember(agent)) {
|
|
45
|
+
owned.add(agent);
|
|
46
|
+
knownSessionIds.add(String(agent.id));
|
|
47
|
+
return true;
|
|
48
|
+
}
|
|
49
|
+
return false;
|
|
50
|
+
};
|
|
51
|
+
const belongs = (agent) => claim(agent);
|
|
29
52
|
const cancel = () => { root?.cancel({ kind: 'user' }); };
|
|
30
53
|
lifetime.addEventListener('abort', cancel, { once: true });
|
|
31
54
|
const needInput = (kind, data) => {
|
|
@@ -34,13 +57,14 @@ export async function executeAgent(ctx, request, output, signal) {
|
|
|
34
57
|
stopped.abort(new Error('Execution requires human input.'));
|
|
35
58
|
};
|
|
36
59
|
off.push(ctx.on('agent/created', ({ agent }) => {
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
if (
|
|
60
|
+
claim(agent);
|
|
61
|
+
}));
|
|
62
|
+
off.push(ctx.on('subagent/start', (info) => {
|
|
63
|
+
if (!info.local)
|
|
41
64
|
return;
|
|
42
|
-
|
|
43
|
-
|
|
65
|
+
const child = agents.get(info.id);
|
|
66
|
+
if (child !== undefined)
|
|
67
|
+
claim(child);
|
|
44
68
|
}));
|
|
45
69
|
off.push(ctx.on('agent/disposed', ({ agent }) => { if (agent !== root)
|
|
46
70
|
owned.delete(agent); }));
|
|
@@ -53,7 +77,12 @@ export async function executeAgent(ctx, request, output, signal) {
|
|
|
53
77
|
resultError = failure(error);
|
|
54
78
|
}));
|
|
55
79
|
off.push(ctx.on('session/event', (session, event) => {
|
|
56
|
-
|
|
80
|
+
let owner = [...owned].find(agent => agent.session === session);
|
|
81
|
+
if (owner === undefined) {
|
|
82
|
+
const candidate = agents.get(session.id);
|
|
83
|
+
if (candidate?.session === session && claim(candidate))
|
|
84
|
+
owner = candidate;
|
|
85
|
+
}
|
|
57
86
|
if (owner === undefined)
|
|
58
87
|
return;
|
|
59
88
|
const identity = { sessionId: String(session.id), root: owner === root, eventSequence: event.seq, time: event.time };
|
|
@@ -96,6 +125,7 @@ export async function executeAgent(ctx, request, output, signal) {
|
|
|
96
125
|
const setup = async (agentCtx, agent) => {
|
|
97
126
|
root = agent;
|
|
98
127
|
owned.add(agent);
|
|
128
|
+
knownSessionIds.add(String(agent.id));
|
|
99
129
|
await configureAgentContext(agentCtx, agent);
|
|
100
130
|
};
|
|
101
131
|
if (request.resume !== undefined) {
|
package/lib/profile.d.ts
CHANGED
|
@@ -11,8 +11,18 @@ type PatchOptions = ConfigDumpLayer['patches'][number];
|
|
|
11
11
|
export declare const NAME = "omdsh";
|
|
12
12
|
export declare const PROFILE_NAME = "omdsh";
|
|
13
13
|
export declare const PRODUCT_BUNDLE = "@agi-fans/oh-my-dsh";
|
|
14
|
+
export declare const AUTO_REVIEW_BUNDLE = "@deepseek-ai/dsh-experimental-auto-review";
|
|
15
|
+
export declare const WORKTREE_BUNDLE = "@deepseek-ai/dsh-experimental-tool-worktree";
|
|
16
|
+
export declare const DEFAULT_PROFILE_BUNDLES: readonly ["@agi-fans/oh-my-dsh", "@deepseek-ai/dsh-experimental-auto-review", "@deepseek-ai/dsh-experimental-tool-worktree"];
|
|
14
17
|
export declare const PROFILE_ROOT_FILENAME = "cordis.yml";
|
|
15
18
|
export declare const PROFILE_PATCH_LABEL = "profiles/omdsh/cordis.patch.yml";
|
|
19
|
+
interface BundleDefaults {
|
|
20
|
+
readonly autoReviewBundle?: boolean;
|
|
21
|
+
readonly worktreeBundle?: boolean;
|
|
22
|
+
readonly worktree?: boolean;
|
|
23
|
+
}
|
|
24
|
+
export declare function hasBundleDefault(home: string, key: keyof BundleDefaults): boolean;
|
|
25
|
+
export declare function recordBundleDefault(home: string, key: keyof BundleDefaults): void;
|
|
16
26
|
/** Absolute path of this installation's package.json (src/ and lib/ both sit one level under apps/omdsh). */
|
|
17
27
|
export declare const INSTALL_ANCHOR: string;
|
|
18
28
|
/** Absolute path of the machine-local user patch layer. */
|
package/lib/profile.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
* Loader write-back can otherwise bake composed rows into it.
|
|
7
7
|
* @module @agi-fans/oh-my-dsh
|
|
8
8
|
*/
|
|
9
|
-
import { existsSync, writeFileSync } from 'node:fs';
|
|
9
|
+
import { existsSync, mkdirSync, readFileSync, writeFileSync } from 'node:fs';
|
|
10
10
|
import { join } from 'node:path';
|
|
11
11
|
import { fileURLToPath } from 'node:url';
|
|
12
12
|
import { initProfile, loadOptionalPatches, loadProfile, PROFILE_PATCH_FILENAME, readProfileManifest, resolveProfileDir, writeProfileManifest, } from '@deepseek-ai/dsh-app-boot';
|
|
@@ -16,8 +16,99 @@ import { loadMcpPatches } from "./mcp-config.js";
|
|
|
16
16
|
export const NAME = 'omdsh';
|
|
17
17
|
export const PROFILE_NAME = 'omdsh';
|
|
18
18
|
export const PRODUCT_BUNDLE = '@agi-fans/oh-my-dsh';
|
|
19
|
+
export const AUTO_REVIEW_BUNDLE = '@deepseek-ai/dsh-experimental-auto-review';
|
|
20
|
+
export const WORKTREE_BUNDLE = '@deepseek-ai/dsh-experimental-tool-worktree';
|
|
21
|
+
export const DEFAULT_PROFILE_BUNDLES = [
|
|
22
|
+
PRODUCT_BUNDLE,
|
|
23
|
+
AUTO_REVIEW_BUNDLE,
|
|
24
|
+
WORKTREE_BUNDLE,
|
|
25
|
+
];
|
|
19
26
|
export const PROFILE_ROOT_FILENAME = 'cordis.yml';
|
|
20
27
|
export const PROFILE_PATCH_LABEL = 'profiles/omdsh/cordis.patch.yml';
|
|
28
|
+
const SEEDED_BUNDLES = [
|
|
29
|
+
{ key: 'autoReviewBundle', bundle: AUTO_REVIEW_BUNDLE },
|
|
30
|
+
{ key: 'worktreeBundle', bundle: WORKTREE_BUNDLE },
|
|
31
|
+
];
|
|
32
|
+
const WORKTREE_RETENTION_PATCH = `- id: worktree\n name: '@deepseek-ai/dsh-experimental-worktree'\n config:\n retainOnArchive: true\n`;
|
|
33
|
+
function bundleDefaultsPath(home) {
|
|
34
|
+
return join(home, NAME, 'bundle-defaults.json');
|
|
35
|
+
}
|
|
36
|
+
function readBundleDefaults(home) {
|
|
37
|
+
const path = bundleDefaultsPath(home);
|
|
38
|
+
if (!existsSync(path))
|
|
39
|
+
return {};
|
|
40
|
+
try {
|
|
41
|
+
const parsed = JSON.parse(readFileSync(path, 'utf8'));
|
|
42
|
+
return typeof parsed === 'object' && parsed !== null && !Array.isArray(parsed)
|
|
43
|
+
? parsed
|
|
44
|
+
: {};
|
|
45
|
+
}
|
|
46
|
+
catch {
|
|
47
|
+
return {};
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export function hasBundleDefault(home, key) {
|
|
51
|
+
return readBundleDefaults(home)[key] === true;
|
|
52
|
+
}
|
|
53
|
+
function recordBundleDefaults(home, keys) {
|
|
54
|
+
if (keys.length === 0)
|
|
55
|
+
return;
|
|
56
|
+
const next = { ...readBundleDefaults(home) };
|
|
57
|
+
for (const key of keys)
|
|
58
|
+
next[key] = true;
|
|
59
|
+
mkdirSync(join(home, NAME), { recursive: true });
|
|
60
|
+
writeFileSync(bundleDefaultsPath(home), JSON.stringify(next, undefined, 2) + '\n');
|
|
61
|
+
}
|
|
62
|
+
export function recordBundleDefault(home, key) {
|
|
63
|
+
recordBundleDefaults(home, [key]);
|
|
64
|
+
}
|
|
65
|
+
/** Seed product defaults once for shipped bundles without overriding user edits. */
|
|
66
|
+
function seedOptionalBundleDefaults(home, dir) {
|
|
67
|
+
const defaults = readBundleDefaults(home);
|
|
68
|
+
let manifest = readProfileManifest(NAME, dir);
|
|
69
|
+
const missing = SEEDED_BUNDLES.filter(entry => defaults[entry.key] !== true);
|
|
70
|
+
if (missing.length > 0) {
|
|
71
|
+
const shippedSet = new Set(DEFAULT_PROFILE_BUNDLES);
|
|
72
|
+
const current = [...(manifest.dsh?.profile?.bundles ?? [PRODUCT_BUNDLE])];
|
|
73
|
+
const toInsert = missing.map(entry => entry.bundle).filter(bundle => !current.includes(bundle));
|
|
74
|
+
if (toInsert.length > 0) {
|
|
75
|
+
const wantedShipped = new Set([
|
|
76
|
+
PRODUCT_BUNDLE,
|
|
77
|
+
...current.filter(bundle => shippedSet.has(bundle)),
|
|
78
|
+
...toInsert,
|
|
79
|
+
]);
|
|
80
|
+
const next = [
|
|
81
|
+
...DEFAULT_PROFILE_BUNDLES.filter(bundle => wantedShipped.has(bundle)),
|
|
82
|
+
...current.filter(bundle => !shippedSet.has(bundle)),
|
|
83
|
+
];
|
|
84
|
+
manifest = {
|
|
85
|
+
...manifest,
|
|
86
|
+
dsh: { ...manifest.dsh, profile: { ...manifest.dsh?.profile, bundles: next } },
|
|
87
|
+
};
|
|
88
|
+
writeProfileManifest(dir, manifest);
|
|
89
|
+
}
|
|
90
|
+
recordBundleDefaults(home, missing.map(entry => entry.key));
|
|
91
|
+
}
|
|
92
|
+
if (!manifest.dsh?.profile?.bundles?.includes(WORKTREE_BUNDLE) || hasBundleDefault(home, 'worktree'))
|
|
93
|
+
return;
|
|
94
|
+
const patchPath = join(dir, PROFILE_PATCH_FILENAME);
|
|
95
|
+
const before = existsSync(patchPath) ? readFileSync(patchPath, 'utf8') : '';
|
|
96
|
+
const existing = loadOptionalPatches(NAME, patchPath);
|
|
97
|
+
if (existing?.some(patch => patch.id === 'worktree')) {
|
|
98
|
+
recordBundleDefault(home, 'worktree');
|
|
99
|
+
return;
|
|
100
|
+
}
|
|
101
|
+
if (existing === undefined || existing.length === 0) {
|
|
102
|
+
const comments = before.split('\n').filter(line => line.trimStart().startsWith('#')).join('\n');
|
|
103
|
+
writeFileSync(patchPath, `${comments === '' ? '' : `${comments}\n`}${WORKTREE_RETENTION_PATCH}`);
|
|
104
|
+
recordBundleDefault(home, 'worktree');
|
|
105
|
+
return;
|
|
106
|
+
}
|
|
107
|
+
if (!before.trimStart().startsWith('[')) {
|
|
108
|
+
writeFileSync(patchPath, `${before}${before.endsWith('\n') ? '' : '\n'}${WORKTREE_RETENTION_PATCH}`);
|
|
109
|
+
recordBundleDefault(home, 'worktree');
|
|
110
|
+
}
|
|
111
|
+
}
|
|
21
112
|
/** Absolute path of this installation's package.json (src/ and lib/ both sit one level under apps/omdsh). */
|
|
22
113
|
export const INSTALL_ANCHOR = fileURLToPath(new URL('../package.json', import.meta.url));
|
|
23
114
|
/** The empty root entry list every Profile tree patches over. */
|
|
@@ -52,7 +143,8 @@ export function ensureOmdshProfile(home) {
|
|
|
52
143
|
if (!existsSync(join(dir, 'package.json'))) {
|
|
53
144
|
// Only fresh profiles adopt Follow UI. An existing patch may predate its manifest.
|
|
54
145
|
const hasPatch = existsSync(join(dir, PROFILE_PATCH_FILENAME));
|
|
55
|
-
initProfile(dir, [
|
|
146
|
+
initProfile(dir, [...DEFAULT_PROFILE_BUNDLES]);
|
|
147
|
+
recordBundleDefaults(home, ['autoReviewBundle', 'worktreeBundle']);
|
|
56
148
|
if (!hasPatch)
|
|
57
149
|
writeFileSync(join(dir, PROFILE_PATCH_FILENAME), '# Response language for this profile; UI language is configured separately.\n- id: agent-behavior\n config:\n language: follow-ui\n');
|
|
58
150
|
}
|
|
@@ -65,7 +157,9 @@ export function ensureOmdshProfile(home) {
|
|
|
65
157
|
* resolved Profile after this function returns.
|
|
66
158
|
*/
|
|
67
159
|
export function prepareProfile(home, userLayer = true) {
|
|
68
|
-
ensureOmdshProfile(home);
|
|
160
|
+
const dir = ensureOmdshProfile(home);
|
|
161
|
+
if (userLayer)
|
|
162
|
+
seedOptionalBundleDefaults(home, dir);
|
|
69
163
|
const profile = loadProfile(NAME, PROFILE_NAME, INSTALL_ANCHOR, home, { userLayer });
|
|
70
164
|
writeFileSync(join(profile.dir, PROFILE_ROOT_FILENAME), PROFILE_ROOT_CONFIG);
|
|
71
165
|
return profile;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agi-fans/oh-my-dsh",
|
|
3
3
|
"description": "omdsh: a keyboard-first DeepSeek TUI coding agent on the DeepSeek Harness runtime",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.28.0",
|
|
5
5
|
"homepage": "https://omdsh.agi.fans/",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"omdsh",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
"@deepseek-ai/cordis-plugin-timer": "1.2.0",
|
|
73
73
|
"@deepseek-ai/dsh-agent": "0.2.2-rc.3",
|
|
74
74
|
"@deepseek-ai/dsh-agent-default-model": "0.2.2-rc.3",
|
|
75
|
+
"@deepseek-ai/dsh-agent-team": "0.2.2-rc.3",
|
|
75
76
|
"@deepseek-ai/dsh-tool-executor-native": "0.2.2-rc.3",
|
|
76
77
|
"@deepseek-ai/dsh-tool-executor-ptc": "0.2.2-rc.3",
|
|
77
78
|
"@deepseek-ai/dsh-agent-instructions": "0.2.2-rc.3",
|
|
@@ -85,7 +86,6 @@
|
|
|
85
86
|
"@deepseek-ai/dsh-bash-sandbox": "0.2.2-rc.3",
|
|
86
87
|
"@deepseek-ai/dsh-cmdline": "0.2.2-rc.3",
|
|
87
88
|
"@deepseek-ai/dsh-command-compact": "0.2.2-rc.3",
|
|
88
|
-
"@deepseek-ai/dsh-command-feedback": "0.2.2-rc.3",
|
|
89
89
|
"@deepseek-ai/dsh-command-goal": "0.2.2-rc.3",
|
|
90
90
|
"@deepseek-ai/dsh-commands": "0.2.2-rc.3",
|
|
91
91
|
"@deepseek-ai/dsh-compaction-basic": "0.2.2-rc.3",
|
|
@@ -96,6 +96,8 @@
|
|
|
96
96
|
"@deepseek-ai/dsh-credentials": "0.2.2-rc.3",
|
|
97
97
|
"@deepseek-ai/dsh-credentials-local": "0.2.2-rc.3",
|
|
98
98
|
"@deepseek-ai/dsh-deepseek-account": "0.2.2-rc.3",
|
|
99
|
+
"@deepseek-ai/dsh-deliverable-file-references": "0.2.2-rc.3",
|
|
100
|
+
"@deepseek-ai/dsh-experimental-auto-review": "0.2.2-rc.3",
|
|
99
101
|
"@deepseek-ai/dsh-experimental-tool-worktree": "0.2.2-rc.3",
|
|
100
102
|
"@deepseek-ai/dsh-file-reference": "0.2.2-rc.3",
|
|
101
103
|
"@deepseek-ai/dsh-file-reference-local": "0.2.2-rc.3",
|
|
@@ -118,8 +120,8 @@
|
|
|
118
120
|
"@deepseek-ai/dsh-lsp": "0.2.2-rc.3",
|
|
119
121
|
"@deepseek-ai/dsh-lsp-stdio": "0.2.2-rc.3",
|
|
120
122
|
"@deepseek-ai/dsh-mcp-client": "0.2.2-rc.3",
|
|
123
|
+
"@deepseek-ai/dsh-mcp-manager": "0.2.2-rc.3",
|
|
121
124
|
"@deepseek-ai/dsh-mcp-resources": "0.2.2-rc.3",
|
|
122
|
-
"@deepseek-ai/dsh-message-feedback": "0.2.2-rc.3",
|
|
123
125
|
"@deepseek-ai/dsh-output-retention": "0.2.2-rc.3",
|
|
124
126
|
"@deepseek-ai/dsh-permission-presets": "0.2.2-rc.3",
|
|
125
127
|
"@deepseek-ai/dsh-persona": "0.2.2-rc.3",
|
|
@@ -145,8 +147,10 @@
|
|
|
145
147
|
"@deepseek-ai/dsh-session-reference": "0.2.2-rc.3",
|
|
146
148
|
"@deepseek-ai/dsh-session-stats": "0.2.2-rc.3",
|
|
147
149
|
"@deepseek-ai/dsh-session-title": "0.2.2-rc.3",
|
|
148
|
-
"@deepseek-ai/dsh-session-title-
|
|
150
|
+
"@deepseek-ai/dsh-session-title-all-prompts-llm": "0.2.2-rc.3",
|
|
151
|
+
"@deepseek-ai/dsh-session-title-llm": "0.2.2-rc.3",
|
|
149
152
|
"@deepseek-ai/dsh-settings": "0.2.2-rc.3",
|
|
153
|
+
"@deepseek-ai/dsh-shell": "0.2.2-rc.3",
|
|
150
154
|
"@deepseek-ai/dsh-shell-env": "0.2.2-rc.3",
|
|
151
155
|
"@deepseek-ai/dsh-skill": "0.2.2-rc.3",
|
|
152
156
|
"@deepseek-ai/dsh-skill-filesystem": "0.2.2-rc.3",
|
|
@@ -169,7 +173,9 @@
|
|
|
169
173
|
"@deepseek-ai/dsh-terminal-bash": "0.2.2-rc.3",
|
|
170
174
|
"@deepseek-ai/dsh-time-context": "0.2.2-rc.3",
|
|
171
175
|
"@deepseek-ai/dsh-timeout": "0.2.2-rc.3",
|
|
176
|
+
"@deepseek-ai/dsh-tmux-context": "0.2.2-rc.3",
|
|
172
177
|
"@deepseek-ai/dsh-token-meter": "0.2.2-rc.3",
|
|
178
|
+
"@deepseek-ai/dsh-tool-agent-team": "0.2.2-rc.3",
|
|
173
179
|
"@deepseek-ai/dsh-tool-ask-user": "0.2.2-rc.3",
|
|
174
180
|
"@deepseek-ai/dsh-tool-bash": "0.2.2-rc.3",
|
|
175
181
|
"@deepseek-ai/dsh-tool-bash-persistent": "0.2.2-rc.3",
|
|
@@ -196,8 +202,10 @@
|
|
|
196
202
|
"@deepseek-ai/dsh-tool-workflow": "0.2.2-rc.3",
|
|
197
203
|
"@deepseek-ai/dsh-tool-working-directory": "0.2.2-rc.3",
|
|
198
204
|
"@deepseek-ai/dsh-tools": "0.2.2-rc.3",
|
|
205
|
+
"@deepseek-ai/dsh-typert-protocol": "0.2.2-rc.3",
|
|
199
206
|
"@deepseek-ai/dsh-user-approval": "0.2.2-rc.3",
|
|
200
207
|
"@deepseek-ai/dsh-user-questions": "0.2.2-rc.3",
|
|
208
|
+
"@deepseek-ai/dsh-util-values": "0.2.2-rc.3",
|
|
201
209
|
"@deepseek-ai/dsh-web": "0.2.2-rc.3",
|
|
202
210
|
"@deepseek-ai/dsh-web-deepseek-api": "0.2.2-rc.3",
|
|
203
211
|
"@deepseek-ai/dsh-web-fetch-http": "0.2.2-rc.3",
|
|
@@ -209,7 +217,7 @@
|
|
|
209
217
|
"@deepseek-ai/dsh-workspace-changes": "0.2.2-rc.3",
|
|
210
218
|
"@deepseek-ai/schemastery": "3.19.0",
|
|
211
219
|
"node-addon-require-builtin": "^0.1.9",
|
|
212
|
-
"@agi-fans/dsh-tui": "^0.
|
|
220
|
+
"@agi-fans/dsh-tui": "^0.28.0"
|
|
213
221
|
},
|
|
214
222
|
"peerDependencies": {
|
|
215
223
|
"@deepseek-ai/cordis": "~4.1.0"
|