dsh-reference-anything 0.4.0-alpha.1 → 0.4.1
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 +24 -12
- package/lib/client.js +3 -6
- package/lib/index.js +1 -1
- package/lib/sources/local-agent/adapters/pi.js +5 -3
- package/lib/sources/local-agent/index.js +3 -1
- package/lib/sources/local-agent/scan.d.ts +9 -0
- package/lib/sources/local-agent/scan.js +72 -6
- package/lib/update.d.ts +2 -2
- package/lib/update.js +6 -3
- package/package.json +49 -49
package/README.md
CHANGED
|
@@ -14,7 +14,8 @@ One `@` for them all.
|
|
|
14
14
|
|
|
15
15
|
<!-- SHIELD GROUP -->
|
|
16
16
|
|
|
17
|
-
[![][
|
|
17
|
+
[![][stable-version-shield]][stable-version-link]
|
|
18
|
+
[![][alpha-version-shield]][alpha-version-link]
|
|
18
19
|
[![][typescript-shield]][typescript-link]
|
|
19
20
|
[![][dsh-plugin-shield]][repository-link]
|
|
20
21
|
<br/>
|
|
@@ -69,16 +70,16 @@ Type `@`, search across enabled sources, and insert the selected reference into
|
|
|
69
70
|
|
|
70
71
|
**The External conversations group** — and only that group — uses OpenCLI to reach AI chat sessions you are already logged into. By default it stores conversation titles locally and the agent fetches remote content on demand; an optional offline-mirror mode stores the latest complete bodies locally instead. **Local agent conversations need none of that**: those transcripts are already files on your own disk, so that group reads them directly, with no browser, no OpenCLI, and nothing mirrored.
|
|
71
72
|
|
|
72
|
-
> [!IMPORTANT]
|
|
73
|
-
> This version targets DSH `0.1.0-rc.8` or newer. It uses the native `@` trigger menu, official file/session Remotes, and the native Composer reference renderer.
|
|
74
|
-
> The `0.3.x` line remains on the current stable DSH SDK (`0.1.0-rc.8 ~ 0.1.1-rc.2`). Due to breaking changes, starting with version `v0.4.0-alpha.1`, development releases will target DSH `v0.1.2-alpha.1` or newer, use the npm `alpha` tag, and no longer support older DSH releases.
|
|
75
|
-
|
|
76
73
|
> [!NOTE]
|
|
77
74
|
> DSH is currently in Beta, so its underlying capabilities and interfaces may change as it evolves. This plugin will adapt alongside those changes. Because of some current DSH limitations, parts of the implementation may not yet be ideal; we will continue to follow DSH updates and improve the plugin over time. See the relevant sections below for specific limitations and usage notes.
|
|
78
75
|
|
|
79
76
|
## 📰 News
|
|
80
77
|
|
|
81
|
-
- **2026-
|
|
78
|
+
- **2026-09-25 · v0.4.1** — We're back!!🎉🎉 Improved local-agent session titles by reading Codex's own `session_index.jsonl` and added Pi/Codex title support. Restored the native DSH handling for `@` menu group headings to avoid translucent overlap and unnecessary custom blur rendering; bounded index reads to 16 MiB for predictable resource use.
|
|
79
|
+
|
|
80
|
+
- **2026-09-03 · v0.4.0** — **Compatibility: DSH `>=0.1.2-rc.1`.** Migrated Skills discovery to the DSH RC1 Skills Remote, restored historical reference grants through the RC1 Session snapshot API, and verified the plugin against DSH `0.1.2-rc.1`.
|
|
81
|
+
|
|
82
|
+
- **2026-08-28 · v0.3.3** — Improved dark-theme backgrounds for the reference menu and settings panels, added project screenshot metadata, and refreshed the documentation. This was the final release line targeting the current stable DeepSeek Harness SDK; `v0.4.0` migrated to DeepSeek Harness `v0.1.2-rc.1` under the npm `alpha` tag and does not support older DSH releases.
|
|
82
83
|
- **2026-08-25 · v0.3.2** — Added local-agent conversation references, with detected session counts and custom-folder support. Web AI sync can be age-limited; cloud drives now support folder browsing and quick download-folder access. Settings include update notes, and local-agent tool details stay concise unless expanded.
|
|
83
84
|
- **2026-08-20 · v0.3.0** — Completed the native DSH `@` integration: five independently configurable sources, official file/session Remotes, native Composer references with source logos, in-place expand/collapse and sync actions, and a one-click switch between Reference Anything and the official DSH `@` list. The legacy `dsh-file:` protocol and custom Composer interaction layer were removed.
|
|
84
85
|
|
|
@@ -107,7 +108,7 @@ Install the stable `0.3.x` line for the current stable DSH SDK:
|
|
|
107
108
|
dsh plugin --profile web add dsh-reference-anything@latest
|
|
108
109
|
```
|
|
109
110
|
|
|
110
|
-
|
|
111
|
+
Install `v0.4.1` on DSH `>=0.1.2-rc.1`:
|
|
111
112
|
|
|
112
113
|
```powershell
|
|
113
114
|
dsh plugin --profile web add dsh-reference-anything@alpha
|
|
@@ -115,12 +116,21 @@ dsh plugin --profile web add dsh-reference-anything@alpha
|
|
|
115
116
|
|
|
116
117
|
After the DSH alpha API stabilizes and the migration is verified, the `alpha` line will be promoted to `latest` and become the default installation.
|
|
117
118
|
|
|
118
|
-
|
|
119
|
+
To install the stable source locally with DSH `v0.1.0-rc.8 ~ v0.1.1-rc.2`:
|
|
120
|
+
|
|
121
|
+
```powershell
|
|
122
|
+
git switch main
|
|
123
|
+
pnpm install
|
|
124
|
+
npm run check
|
|
125
|
+
dsh plugin --profile web add .
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
To install the alpha source locally with DSH `v0.1.2-rc.1` or newer:
|
|
119
129
|
|
|
120
130
|
```powershell
|
|
121
|
-
|
|
131
|
+
git switch alpha
|
|
122
132
|
pnpm install
|
|
123
|
-
|
|
133
|
+
npm run check
|
|
124
134
|
dsh plugin --profile web add .
|
|
125
135
|
```
|
|
126
136
|
|
|
@@ -334,8 +344,10 @@ This project is licensed under the [MIT License](./LICENSE). Third-party copyrig
|
|
|
334
344
|
[typescript-link]: https://www.typescriptlang.org/
|
|
335
345
|
[typescript-shield]: https://img.shields.io/badge/TypeScript-3178C6?labelColor=black&logo=typescript&logoColor=white&style=flat-square
|
|
336
346
|
[dsh-plugin-shield]: https://img.shields.io/badge/DSH-plugin-ffffff?labelColor=black&style=flat-square
|
|
337
|
-
[
|
|
338
|
-
[
|
|
347
|
+
[stable-version-shield]: https://img.shields.io/github/package-json/v/Chael-Chael/dsh-reference-anything/main?color=369eff&label=stable&labelColor=black&style=flat-square
|
|
348
|
+
[stable-version-link]: https://github.com/Chael-Chael/dsh-reference-anything/tree/main
|
|
349
|
+
[alpha-version-shield]: https://img.shields.io/github/package-json/v/Chael-Chael/dsh-reference-anything/alpha?color=f59e0b&label=alpha&labelColor=black&style=flat-square
|
|
350
|
+
[alpha-version-link]: https://github.com/Chael-Chael/dsh-reference-anything/tree/alpha
|
|
339
351
|
[npm-downloads-shield]: https://img.shields.io/npm/dt/dsh-reference-anything?color=cb3837&label=downloads&labelColor=black&style=flat-square
|
|
340
352
|
[npm-package-link]: https://www.npmjs.com/package/dsh-reference-anything
|
|
341
353
|
[github-stars-link]: https://github.com/Chael-Chael/dsh-reference-anything/stargazers
|
package/lib/client.js
CHANGED
|
@@ -15236,7 +15236,7 @@ var REFERENCE_ANYTHING_REMOTE = {
|
|
|
15236
15236
|
descriptors: REFERENCE_ANYTHING_INVOCATIONS
|
|
15237
15237
|
};
|
|
15238
15238
|
|
|
15239
|
-
//
|
|
15239
|
+
// node_modules/.pnpm/@deepseek-ai+dsh-file-refer_daf56328ce92b9c97bd2707e03352fe0/node_modules/@deepseek-ai/dsh-file-reference/lib/types/grammar.js
|
|
15240
15240
|
function formatFileMention(candidate, preserveQuote) {
|
|
15241
15241
|
const path = candidate.kind === "directory" ? `${candidate.path}/` : candidate.path;
|
|
15242
15242
|
if (/[\u0000-\u001f\u007f-\u009f"]/u.test(path))
|
|
@@ -29617,8 +29617,6 @@ var css = `
|
|
|
29617
29617
|
caret, selection, wrapping, and message geometry. */
|
|
29618
29618
|
[data-composer-card] [role="listbox"]:has([role="presentation"][data-source]){box-sizing:border-box!important;width:100%!important;min-width:0!important;max-width:100%!important}
|
|
29619
29619
|
[data-trigger-menu]:has(> [role="listbox"] [role="presentation"][data-source]){border-radius:22px}
|
|
29620
|
-
[data-composer-card] [role="listbox"] [role="presentation"][data-source]{position:sticky;top:0;z-index:2;box-sizing:border-box;padding-top:6px!important;background:var(--dsw-specific-menu,var(--dsw-alias-background-primary,var(--dsw-alias-bg-layer-1,#fff)))}
|
|
29621
|
-
[data-composer-card] [role="listbox"] [role="presentation"][data-source]:not(:first-child){margin-top:8px}
|
|
29622
29620
|
[data-composer-card] [role="listbox"] [role="option"]{scroll-margin-block-start:30px;scroll-margin-block-end:4px}
|
|
29623
29621
|
[data-composer-card] [role="listbox"]>[data-dsh-ref-menu-settling]{overflow-anchor:none!important}
|
|
29624
29622
|
[data-composer-card] [role="listbox"]>[data-dsh-ref-menu-settling] [role="option"][aria-selected="false"]:hover{background:transparent!important}
|
|
@@ -30343,10 +30341,10 @@ var inject = [
|
|
|
30343
30341
|
"inputTriggers",
|
|
30344
30342
|
"remote",
|
|
30345
30343
|
"remote.commands",
|
|
30344
|
+
"remote.skills",
|
|
30346
30345
|
"remote.fileReferences",
|
|
30347
30346
|
"remote.sessionReferenceResolver",
|
|
30348
30347
|
"slots",
|
|
30349
|
-
"connection",
|
|
30350
30348
|
"locale",
|
|
30351
30349
|
"sessions",
|
|
30352
30350
|
"uiWorkspace"
|
|
@@ -30570,7 +30568,6 @@ function apply(ctx) {
|
|
|
30570
30568
|
const sessions = ctx.sessions;
|
|
30571
30569
|
const updateMenu = createPickerMenuUpdater(inputTriggers, sessions);
|
|
30572
30570
|
const guardMenuActions = createPickerMenuActionGuard(inputTriggers, sessions);
|
|
30573
|
-
const connection = ctx.get("connection");
|
|
30574
30571
|
let sourceDisposers = [];
|
|
30575
30572
|
let appliedPicker;
|
|
30576
30573
|
const registerSources = (picker) => {
|
|
@@ -30611,7 +30608,7 @@ function apply(ctx) {
|
|
|
30611
30608
|
return unwrap(await ctx.remote.commands.list(sessionId));
|
|
30612
30609
|
}, t, optionsFor("commands"))));
|
|
30613
30610
|
if (picker.skills.enabled) disposers.push(inputTriggers.registerSource(createSkillSource(async (sessionId, signal) => {
|
|
30614
|
-
const
|
|
30611
|
+
const result = await ctx.remote.skills.list({ sessionId }, signal);
|
|
30615
30612
|
if (!result.ok) throw new Error(`${result.error.code}: ${result.error.message}`);
|
|
30616
30613
|
return result.value.skills;
|
|
30617
30614
|
}, t, optionsFor("skills"))));
|
package/lib/index.js
CHANGED
|
@@ -111,7 +111,7 @@ export default class ReferenceRuntime extends Service {
|
|
|
111
111
|
assertSessionGranted(session, ref) {
|
|
112
112
|
const key = ReferenceRuntime.grantKey(ref);
|
|
113
113
|
if (session && !this.grants.get(String(session.id))?.has(key)) {
|
|
114
|
-
const mentioned = session.
|
|
114
|
+
const mentioned = session.snapshotEvents().some(event => {
|
|
115
115
|
if (event.type === 'user/message')
|
|
116
116
|
return ReferenceRuntime.contentMentions(event.data.content, key);
|
|
117
117
|
if (event.type === 'tool/result')
|
|
@@ -82,9 +82,11 @@ export const piAdapter = {
|
|
|
82
82
|
createdAt ??= parseTimestamp(record['timestamp']);
|
|
83
83
|
continue;
|
|
84
84
|
}
|
|
85
|
-
// A rename writes another `session_info`, so the newest one wins.
|
|
86
|
-
|
|
87
|
-
|
|
85
|
+
// A rename writes another `session_info`, so the newest one wins. Some
|
|
86
|
+
// Pi-compatible writers call the same field `title`.
|
|
87
|
+
if (record['type'] === 'session_info') {
|
|
88
|
+
named = stringField(record, 'name') ?? stringField(record, 'title') ?? named;
|
|
89
|
+
}
|
|
88
90
|
}
|
|
89
91
|
for (const line of headLines) {
|
|
90
92
|
const record = parseRecord(line);
|
|
@@ -643,7 +643,9 @@ function foldsToNothing(adapter, lines, options) {
|
|
|
643
643
|
return adapter.flush(state, options).length === 0;
|
|
644
644
|
}
|
|
645
645
|
function labelFor(descriptor, bookmark) {
|
|
646
|
-
|
|
646
|
+
// Some file-backed agents expose a title index beside the transcript. It is
|
|
647
|
+
// fresher than a persisted first-prompt bookmark and must win when present.
|
|
648
|
+
const title = descriptor.title?.trim() || bookmark?.title.trim() || '';
|
|
647
649
|
return title === '' ? basename(descriptor.relPath) : title;
|
|
648
650
|
}
|
|
649
651
|
/** The schema's own defaults, as a plain object. */
|
|
@@ -40,6 +40,15 @@ export interface TranscriptDescriptor {
|
|
|
40
40
|
readonly relPath: string;
|
|
41
41
|
readonly mtimeMs: number;
|
|
42
42
|
readonly size: number;
|
|
43
|
+
/**
|
|
44
|
+
* A title supplied by an index beside a file-backed transcript.
|
|
45
|
+
*
|
|
46
|
+
* Codex keeps its user-facing session title in `~/.codex/session_index.jsonl`,
|
|
47
|
+
* while the rollout itself only contains the opening prompt. This value is
|
|
48
|
+
* kept on the descriptor so a fresh index title can override an older
|
|
49
|
+
* first-prompt bookmark without changing the transcript adapter contract.
|
|
50
|
+
*/
|
|
51
|
+
readonly title?: string;
|
|
43
52
|
/**
|
|
44
53
|
* The session row, for a database-backed format only.
|
|
45
54
|
*
|
|
@@ -17,8 +17,8 @@
|
|
|
17
17
|
* @module dsh-reference-anything/local-agent/scan
|
|
18
18
|
*/
|
|
19
19
|
import { createReadStream } from 'node:fs';
|
|
20
|
-
import { open, readdir, stat } from 'node:fs/promises';
|
|
21
|
-
import { join, relative } from 'node:path';
|
|
20
|
+
import { open, readdir, readFile, stat } from 'node:fs/promises';
|
|
21
|
+
import { basename, join, relative, resolve } from 'node:path';
|
|
22
22
|
import { ReferenceAnythingError } from "../../errors.js";
|
|
23
23
|
import { withDatabase } from "./sqlite.js";
|
|
24
24
|
import { isQueryAdapter } from "./types.js";
|
|
@@ -26,6 +26,7 @@ import { isQueryAdapter } from "./types.js";
|
|
|
26
26
|
export const SESSION_SEPARATOR = '#';
|
|
27
27
|
/** Directory depth walked below each root. */
|
|
28
28
|
const MAX_DEPTH = 6;
|
|
29
|
+
const MAX_CODEX_TITLE_INDEX_BYTES = 16 * 1024 * 1024;
|
|
29
30
|
/** Probe windows, in bytes, tried in order until enough lines are recovered. */
|
|
30
31
|
const PROBE_STEPS = [32 * 1024, 256 * 1024, 2 * 1024 * 1024];
|
|
31
32
|
/** Chunk size for walking a large transcript backwards from its end. */
|
|
@@ -48,12 +49,15 @@ export async function listTranscripts(roots, adapters, maxTranscripts, signal) {
|
|
|
48
49
|
const adapter = adapters.get(root.kind);
|
|
49
50
|
if (adapter === undefined)
|
|
50
51
|
continue;
|
|
51
|
-
|
|
52
|
+
const titles = root.kind === 'codex' && !isQueryAdapter(adapter)
|
|
53
|
+
? await readCodexTitleIndex(root.path)
|
|
54
|
+
: undefined;
|
|
55
|
+
await walk(root, root.path, 0, adapter, found, signal, maxTranscripts, titles);
|
|
52
56
|
}
|
|
53
57
|
found.sort((left, right) => right.mtimeMs - left.mtimeMs);
|
|
54
58
|
return found.slice(0, maxTranscripts);
|
|
55
59
|
}
|
|
56
|
-
async function walk(root, dir, depth, adapter, found, signal, maxSessions = 200) {
|
|
60
|
+
async function walk(root, dir, depth, adapter, found, signal, maxSessions = 200, titles) {
|
|
57
61
|
signal?.throwIfAborted();
|
|
58
62
|
if (depth > MAX_DEPTH)
|
|
59
63
|
return;
|
|
@@ -63,7 +67,7 @@ async function walk(root, dir, depth, adapter, found, signal, maxSessions = 200)
|
|
|
63
67
|
for (const entry of entries) {
|
|
64
68
|
const path = join(dir, entry.name);
|
|
65
69
|
if (entry.isDirectory()) {
|
|
66
|
-
await walk(root, path, depth + 1, adapter, found, signal, maxSessions);
|
|
70
|
+
await walk(root, path, depth + 1, adapter, found, signal, maxSessions, titles);
|
|
67
71
|
continue;
|
|
68
72
|
}
|
|
69
73
|
if (!entry.isFile())
|
|
@@ -78,9 +82,71 @@ async function walk(root, dir, depth, adapter, found, signal, maxSessions = 200)
|
|
|
78
82
|
found.push(...await expandSessions(root.kind, path, relPath, stats.mtimeMs, stats.size, adapter, maxSessions));
|
|
79
83
|
continue;
|
|
80
84
|
}
|
|
81
|
-
found.push({
|
|
85
|
+
found.push({
|
|
86
|
+
kind: root.kind,
|
|
87
|
+
path,
|
|
88
|
+
relPath,
|
|
89
|
+
mtimeMs: stats.mtimeMs,
|
|
90
|
+
size: stats.size,
|
|
91
|
+
...titles === undefined ? {} : titleForCodexPath(path, titles),
|
|
92
|
+
});
|
|
82
93
|
}
|
|
83
94
|
}
|
|
95
|
+
/** Read the Codex title index once per configured sessions root. */
|
|
96
|
+
async function readCodexTitleIndex(sessionsRoot) {
|
|
97
|
+
const indexPath = resolve(sessionsRoot, '..', 'session_index.jsonl');
|
|
98
|
+
const indexStats = await stat(indexPath).catch(() => undefined);
|
|
99
|
+
// Keep discovery bounded; an unexpectedly large index must not turn a
|
|
100
|
+
// keystroke-triggered scan into an unbounded allocation.
|
|
101
|
+
if (indexStats === undefined || indexStats.size > MAX_CODEX_TITLE_INDEX_BYTES)
|
|
102
|
+
return undefined;
|
|
103
|
+
const raw = await readFile(indexPath, 'utf8').catch(() => undefined);
|
|
104
|
+
if (raw === undefined)
|
|
105
|
+
return undefined;
|
|
106
|
+
const byPath = new Map();
|
|
107
|
+
const bySessionId = new Map();
|
|
108
|
+
for (const line of raw.split(/\r?\n/u)) {
|
|
109
|
+
if (line.trim() === '')
|
|
110
|
+
continue;
|
|
111
|
+
let record;
|
|
112
|
+
try {
|
|
113
|
+
record = JSON.parse(line);
|
|
114
|
+
}
|
|
115
|
+
catch {
|
|
116
|
+
continue;
|
|
117
|
+
}
|
|
118
|
+
if (typeof record !== 'object' || record === null)
|
|
119
|
+
continue;
|
|
120
|
+
const row = record;
|
|
121
|
+
const title = typeof row['thread_name'] === 'string' ? row['thread_name'].trim() : '';
|
|
122
|
+
if (title === '')
|
|
123
|
+
continue;
|
|
124
|
+
const id = typeof row['id'] === 'string' ? row['id'].trim() : '';
|
|
125
|
+
if (id !== '')
|
|
126
|
+
bySessionId.set(id, title);
|
|
127
|
+
const rolloutPath = typeof row['rollout_path'] === 'string' ? row['rollout_path'].trim() : '';
|
|
128
|
+
if (rolloutPath !== '')
|
|
129
|
+
byPath.set(normalizeIndexedPath(rolloutPath), title);
|
|
130
|
+
}
|
|
131
|
+
return { byPath, bySessionId };
|
|
132
|
+
}
|
|
133
|
+
function titleForCodexPath(path, index) {
|
|
134
|
+
const direct = index.byPath.get(normalizeIndexedPath(path));
|
|
135
|
+
if (direct !== undefined)
|
|
136
|
+
return { title: direct };
|
|
137
|
+
const match = basename(path).match(/-([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})(?:_[^.]*)?\.jsonl$/iu);
|
|
138
|
+
const sessionId = match?.[1];
|
|
139
|
+
const title = sessionId === undefined ? undefined : index.bySessionId.get(sessionId);
|
|
140
|
+
return title === undefined ? {} : { title };
|
|
141
|
+
}
|
|
142
|
+
/** Normalize Windows paths from the index and from the active filesystem. */
|
|
143
|
+
function normalizeIndexedPath(path) {
|
|
144
|
+
return path
|
|
145
|
+
.replace(/^\\\\\?\\/u, '')
|
|
146
|
+
.replace(/[\\/]+/gu, '\\')
|
|
147
|
+
.replace(/\\$/u, '')
|
|
148
|
+
.toLocaleLowerCase();
|
|
149
|
+
}
|
|
84
150
|
/**
|
|
85
151
|
* Turn one database into a descriptor per conversation inside it.
|
|
86
152
|
*
|
package/lib/update.d.ts
CHANGED
|
@@ -17,7 +17,7 @@ export interface PackageUpdateResult {
|
|
|
17
17
|
interface UpdateManagerOptions {
|
|
18
18
|
packageRoot?: string;
|
|
19
19
|
dshHome?: string;
|
|
20
|
-
fetchLatest?: (signal?: AbortSignal) => Promise<string>;
|
|
20
|
+
fetchLatest?: (signal?: AbortSignal, tag?: string) => Promise<string>;
|
|
21
21
|
fetchReleaseNotes?: (version: string, signal?: AbortSignal) => Promise<Pick<PackageUpdateStatus, 'releaseNotes' | 'releaseUrl'>>;
|
|
22
22
|
install?: (profileDir: string, version: string, signal?: AbortSignal) => Promise<void>;
|
|
23
23
|
afterInstall?: (profileDir: string, version: string, signal?: AbortSignal) => Promise<void>;
|
|
@@ -41,7 +41,7 @@ export declare class PackageUpdateManager {
|
|
|
41
41
|
update(signal?: AbortSignal): Promise<PackageUpdateResult>;
|
|
42
42
|
private runCheck;
|
|
43
43
|
}
|
|
44
|
-
export declare function fetchLatestVersion(signal?: AbortSignal): Promise<string>;
|
|
44
|
+
export declare function fetchLatestVersion(signal?: AbortSignal, tag?: string): Promise<string>;
|
|
45
45
|
export declare function fetchGitHubReleaseNotes(version: string, signal?: AbortSignal): Promise<Pick<PackageUpdateStatus, 'releaseNotes' | 'releaseUrl'>>;
|
|
46
46
|
export declare function readPackageVersion(packageRoot?: string): Promise<string>;
|
|
47
47
|
/** Find the profile that owns this exact installed package, including pnpm links. */
|
package/lib/update.js
CHANGED
|
@@ -73,7 +73,8 @@ export class PackageUpdateManager {
|
|
|
73
73
|
let currentVersion = '0.0.0';
|
|
74
74
|
try {
|
|
75
75
|
currentVersion = await readPackageVersion(this.packageRoot);
|
|
76
|
-
const
|
|
76
|
+
const tag = currentVersion.split('-')[1]?.split('.')[0] ?? 'latest';
|
|
77
|
+
const latestVersion = await this.fetchLatest(signal, tag);
|
|
77
78
|
const updateAvailable = compareVersions(latestVersion, currentVersion) > 0;
|
|
78
79
|
let release = {};
|
|
79
80
|
try {
|
|
@@ -103,9 +104,11 @@ export class PackageUpdateManager {
|
|
|
103
104
|
}
|
|
104
105
|
}
|
|
105
106
|
}
|
|
106
|
-
export async function fetchLatestVersion(signal) {
|
|
107
|
+
export async function fetchLatestVersion(signal, tag = 'latest') {
|
|
108
|
+
if (!/^[0-9A-Za-z][0-9A-Za-z._-]*$/.test(tag))
|
|
109
|
+
throw new Error('refusing to request an invalid npm tag');
|
|
107
110
|
const timeout = AbortSignal.timeout(CHECK_TIMEOUT_MS);
|
|
108
|
-
const response = await fetch(NPM_LATEST_URL, {
|
|
111
|
+
const response = await fetch(NPM_LATEST_URL.replace(/latest$/, tag), {
|
|
109
112
|
// The registry's package metadata endpoint accepts the install-v1 media
|
|
110
113
|
// type, but its `/latest` dist-tag endpoint responds 406 to that same
|
|
111
114
|
// header. Request ordinary JSON because this endpoint returns one manifest.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-reference-anything",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.1",
|
|
4
4
|
"description": "Reference commands, skills, workspace files, DSH sessions, local agent transcripts, cloud-drive files, and mirrored web-chat conversations from one DeepSeek Harness @ menu",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"publishConfig": {
|
|
@@ -99,29 +99,29 @@
|
|
|
99
99
|
},
|
|
100
100
|
"peerDependencies": {
|
|
101
101
|
"@deepseek-ai/cordis": ">=4.0.1",
|
|
102
|
-
"@deepseek-ai/dsh-agent": ">=0.1.2-
|
|
103
|
-
"@deepseek-ai/dsh-api-remotes": ">=0.1.2-
|
|
104
|
-
"@deepseek-ai/dsh-attachment": ">=0.1.2-
|
|
105
|
-
"@deepseek-ai/dsh-client-connection": ">=0.1.2-
|
|
106
|
-
"@deepseek-ai/dsh-client-locale": ">=0.1.2-
|
|
107
|
-
"@deepseek-ai/dsh-api-session-controller": ">=0.1.2-
|
|
108
|
-
"@deepseek-ai/dsh-client-store": ">=0.1.2-
|
|
109
|
-
"@deepseek-ai/dsh-client-ui-conversation": ">=0.1.2-
|
|
110
|
-
"@deepseek-ai/dsh-client-ui-input-trigger": ">=0.1.2-
|
|
111
|
-
"@deepseek-ai/dsh-client-ui-renderer": ">=0.1.2-
|
|
112
|
-
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.2-
|
|
113
|
-
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.2-
|
|
114
|
-
"@deepseek-ai/dsh-client-ui-workspace": ">=0.1.2-
|
|
115
|
-
"@deepseek-ai/dsh-file-reference": ">=0.1.2-
|
|
116
|
-
"@deepseek-ai/dsh-llm": ">=0.1.2-
|
|
117
|
-
"@deepseek-ai/dsh-output-retention": ">=0.1.2-
|
|
118
|
-
"@deepseek-ai/dsh-session": ">=0.1.2-
|
|
119
|
-
"@deepseek-ai/dsh-session-reference": ">=0.1.2-
|
|
120
|
-
"@deepseek-ai/dsh-settings": ">=0.1.2-
|
|
121
|
-
"@deepseek-ai/dsh-storage-domain": ">=0.1.2-
|
|
122
|
-
"@deepseek-ai/dsh-tools": ">=0.1.2-
|
|
123
|
-
"@deepseek-ai/dsh-typert-protocol": ">=0.1.2-
|
|
124
|
-
"@deepseek-ai/dsh-typert-registry": ">=0.1.2-
|
|
102
|
+
"@deepseek-ai/dsh-agent": ">=0.1.2-rc.1",
|
|
103
|
+
"@deepseek-ai/dsh-api-remotes": ">=0.1.2-rc.1",
|
|
104
|
+
"@deepseek-ai/dsh-attachment": ">=0.1.2-rc.1",
|
|
105
|
+
"@deepseek-ai/dsh-client-connection": ">=0.1.2-rc.1",
|
|
106
|
+
"@deepseek-ai/dsh-client-locale": ">=0.1.2-rc.1",
|
|
107
|
+
"@deepseek-ai/dsh-api-session-controller": ">=0.1.2-rc.1",
|
|
108
|
+
"@deepseek-ai/dsh-client-store": ">=0.1.2-rc.1",
|
|
109
|
+
"@deepseek-ai/dsh-client-ui-conversation": ">=0.1.2-rc.1",
|
|
110
|
+
"@deepseek-ai/dsh-client-ui-input-trigger": ">=0.1.2-rc.1",
|
|
111
|
+
"@deepseek-ai/dsh-client-ui-renderer": ">=0.1.2-rc.1",
|
|
112
|
+
"@deepseek-ai/dsh-client-ui-settings": ">=0.1.2-rc.1",
|
|
113
|
+
"@deepseek-ai/dsh-client-ui-slots": ">=0.1.2-rc.1",
|
|
114
|
+
"@deepseek-ai/dsh-client-ui-workspace": ">=0.1.2-rc.1",
|
|
115
|
+
"@deepseek-ai/dsh-file-reference": ">=0.1.2-rc.1",
|
|
116
|
+
"@deepseek-ai/dsh-llm": ">=0.1.2-rc.1",
|
|
117
|
+
"@deepseek-ai/dsh-output-retention": ">=0.1.2-rc.1",
|
|
118
|
+
"@deepseek-ai/dsh-session": ">=0.1.2-rc.1",
|
|
119
|
+
"@deepseek-ai/dsh-session-reference": ">=0.1.2-rc.1",
|
|
120
|
+
"@deepseek-ai/dsh-settings": ">=0.1.2-rc.1",
|
|
121
|
+
"@deepseek-ai/dsh-storage-domain": ">=0.1.2-rc.1",
|
|
122
|
+
"@deepseek-ai/dsh-tools": ">=0.1.2-rc.1",
|
|
123
|
+
"@deepseek-ai/dsh-typert-protocol": ">=0.1.2-rc.1",
|
|
124
|
+
"@deepseek-ai/dsh-typert-registry": ">=0.1.2-rc.1",
|
|
125
125
|
"react": "^18.2.0"
|
|
126
126
|
},
|
|
127
127
|
"peerDependenciesMeta": {
|
|
@@ -179,31 +179,31 @@
|
|
|
179
179
|
},
|
|
180
180
|
"devDependencies": {
|
|
181
181
|
"@deepseek-ai/cordis": "^4.0.1",
|
|
182
|
-
"@deepseek-ai/dsh-agent": "
|
|
183
|
-
"@deepseek-ai/dsh-api-remotes": "
|
|
184
|
-
"@deepseek-ai/dsh-attachment": "
|
|
185
|
-
"@deepseek-ai/dsh-client-connection": "
|
|
186
|
-
"@deepseek-ai/dsh-client-locale": "
|
|
187
|
-
"@deepseek-ai/dsh-api-session-controller": "
|
|
188
|
-
"@deepseek-ai/dsh-client-store": "
|
|
189
|
-
"@deepseek-ai/dsh-client-ui-conversation": "
|
|
190
|
-
"@deepseek-ai/dsh-client-ui-input-trigger": "
|
|
191
|
-
"@deepseek-ai/dsh-client-ui-renderer": "
|
|
192
|
-
"@deepseek-ai/dsh-client-ui-settings": "
|
|
193
|
-
"@deepseek-ai/dsh-client-ui-slots": "
|
|
194
|
-
"@deepseek-ai/dsh-client-ui-workspace": "
|
|
195
|
-
"@deepseek-ai/dsh-file-reference": "
|
|
196
|
-
"@deepseek-ai/dsh-llm": "
|
|
197
|
-
"@deepseek-ai/dsh-output-retention": "
|
|
198
|
-
"@deepseek-ai/dsh-session": "
|
|
199
|
-
"@deepseek-ai/dsh-session-reference": "
|
|
200
|
-
"@deepseek-ai/dsh-settings": "
|
|
201
|
-
"@deepseek-ai/dsh-storage": "
|
|
202
|
-
"@deepseek-ai/dsh-storage-domain": "
|
|
203
|
-
"@deepseek-ai/dsh-system-prompt": "
|
|
204
|
-
"@deepseek-ai/dsh-tools": "
|
|
205
|
-
"@deepseek-ai/dsh-typert-protocol": "
|
|
206
|
-
"@deepseek-ai/dsh-typert-registry": "
|
|
182
|
+
"@deepseek-ai/dsh-agent": "0.1.2-rc.1",
|
|
183
|
+
"@deepseek-ai/dsh-api-remotes": "0.1.2-rc.1",
|
|
184
|
+
"@deepseek-ai/dsh-attachment": "0.1.2-rc.1",
|
|
185
|
+
"@deepseek-ai/dsh-client-connection": "0.1.2-rc.1",
|
|
186
|
+
"@deepseek-ai/dsh-client-locale": "0.1.2-rc.1",
|
|
187
|
+
"@deepseek-ai/dsh-api-session-controller": "0.1.2-rc.1",
|
|
188
|
+
"@deepseek-ai/dsh-client-store": "0.1.2-rc.1",
|
|
189
|
+
"@deepseek-ai/dsh-client-ui-conversation": "0.1.2-rc.1",
|
|
190
|
+
"@deepseek-ai/dsh-client-ui-input-trigger": "0.1.2-rc.1",
|
|
191
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.1.2-rc.1",
|
|
192
|
+
"@deepseek-ai/dsh-client-ui-settings": "0.1.2-rc.1",
|
|
193
|
+
"@deepseek-ai/dsh-client-ui-slots": "0.1.2-rc.1",
|
|
194
|
+
"@deepseek-ai/dsh-client-ui-workspace": "0.1.2-rc.1",
|
|
195
|
+
"@deepseek-ai/dsh-file-reference": "0.1.2-rc.1",
|
|
196
|
+
"@deepseek-ai/dsh-llm": "0.1.2-rc.1",
|
|
197
|
+
"@deepseek-ai/dsh-output-retention": "0.1.2-rc.1",
|
|
198
|
+
"@deepseek-ai/dsh-session": "0.1.2-rc.1",
|
|
199
|
+
"@deepseek-ai/dsh-session-reference": "0.1.2-rc.1",
|
|
200
|
+
"@deepseek-ai/dsh-settings": "0.1.2-rc.1",
|
|
201
|
+
"@deepseek-ai/dsh-storage": "0.1.2-rc.1",
|
|
202
|
+
"@deepseek-ai/dsh-storage-domain": "0.1.2-rc.1",
|
|
203
|
+
"@deepseek-ai/dsh-system-prompt": "0.1.2-rc.1",
|
|
204
|
+
"@deepseek-ai/dsh-tools": "0.1.2-rc.1",
|
|
205
|
+
"@deepseek-ai/dsh-typert-protocol": "0.1.2-rc.1",
|
|
206
|
+
"@deepseek-ai/dsh-typert-registry": "0.1.2-rc.1",
|
|
207
207
|
"@jackwener/opencli": "1.8.6",
|
|
208
208
|
"@types/node": "^22.20.1",
|
|
209
209
|
"@types/react": "^18.2.0",
|