dsh-engramory 1.5.0 → 1.5.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.
- package/README.en.md +1 -1
- package/README.md +1 -1
- package/client.js +1 -1
- package/index.js +31 -6
- package/package.json +4 -2
package/README.en.md
CHANGED
|
@@ -47,7 +47,7 @@ dsh plugin --profile <name> add dsh-engramory
|
|
|
47
47
|
To uninstall, use `remove` instead of `add`.
|
|
48
48
|
|
|
49
49
|
**Name the version to upgrade**, as in `dsh plugin --profile <name> add
|
|
50
|
-
dsh-engramory@1.5.
|
|
50
|
+
dsh-engramory@1.5.2`: by name alone, pnpm 11 (the desktop app's own included) by default
|
|
51
51
|
installs only a version published at least 24 hours ago. The desktop app's Plugins page has no *Update*
|
|
52
52
|
for a plugin from outside dsh: uninstall it, search for `dsh-engramory@<version>` and
|
|
53
53
|
install that, then quit dsh from the tray and open it again. Your memory and settings stay.
|
package/README.md
CHANGED
|
@@ -26,7 +26,7 @@ dsh plugin --profile <名字> add dsh-engramory
|
|
|
26
26
|
|
|
27
27
|
卸载把 `add` 换成 `remove`。
|
|
28
28
|
|
|
29
|
-
**升级要写上版本号**,比如 `dsh plugin --profile <名字> add dsh-engramory@1.5.
|
|
29
|
+
**升级要写上版本号**,比如 `dsh plugin --profile <名字> add dsh-engramory@1.5.2`:只写名字时,pnpm 11(桌面版自带的也是)默认只装发布满 24 小时的版本。桌面版的插件页对第三方插件没有「更新」按钮:先卸载,再搜 `dsh-engramory@<版本>` 安装,装完从托盘退出 dsh 再打开。记忆库和设置都会保留。记忆页底部的「检查更新」能查到最新版本号,并列出这几步。
|
|
30
30
|
|
|
31
31
|
兼容的 dsh 版本见 [`package.json`](https://github.com/tinqiao-oss/engramory/blob/master/adapters/dsh/plugin/package.json) 里的 `dsh.compatibility.dshReleases`,没列出的版本未经验证。
|
|
32
32
|
|
package/client.js
CHANGED
|
@@ -39,7 +39,7 @@ window.__ModuleLoader__.load({
|
|
|
39
39
|
/** How often the page looks again at a move it did not start, while one is under way. */
|
|
40
40
|
const MOVE_FOLLOW_MS = 2000
|
|
41
41
|
/** This plugin's version, for the feedback footer; a test keeps it equal to package.json's. */
|
|
42
|
-
const VERSION = '1.5.
|
|
42
|
+
const VERSION = '1.5.2'
|
|
43
43
|
/** Where feedback goes: a new issue on the repository, or the project's mailbox. Opening
|
|
44
44
|
* the link is the browser's (the desktop app hands it to the system's); the footer submits
|
|
45
45
|
* nothing by itself. */
|
package/index.js
CHANGED
|
@@ -667,13 +667,24 @@ function settingsRoutes(ctx, config, fiber) {
|
|
|
667
667
|
function ownEntry(editor, fiber) {
|
|
668
668
|
try {
|
|
669
669
|
if (fiber === undefined || typeof editor?.entries !== 'function') return undefined
|
|
670
|
-
const mine = editor.entries().filter((entry) => entry?.fiber
|
|
670
|
+
const mine = editor.entries().filter((entry) => holds(entry?.fiber, fiber))
|
|
671
671
|
return mine.length === 1 ? mine[0] : undefined
|
|
672
672
|
} catch {
|
|
673
673
|
return undefined
|
|
674
674
|
}
|
|
675
675
|
}
|
|
676
676
|
|
|
677
|
+
/**
|
|
678
|
+
* Whether what a row keeps as its fiber is `fiber`. A row keeps either the fiber itself
|
|
679
|
+
* (dsh 0.2.1's loader, cordis-plugin-loader 1.0.6, unwraps it) or what cordis' `plugin()`
|
|
680
|
+
* hands back (dsh 0.2.2-alpha.3 and 0.2.2-rc.1, loader 1.0.7-alpha.2 and 1.1.0): an object
|
|
681
|
+
* made with the fiber as its prototype, so that it can be awaited. Its `ctx.fiber` is the
|
|
682
|
+
* fiber, which is how 1.0.6 unwraps it.
|
|
683
|
+
*/
|
|
684
|
+
function holds(held, fiber) {
|
|
685
|
+
return held !== undefined && held !== null && (held === fiber || held.ctx?.fiber === fiber)
|
|
686
|
+
}
|
|
687
|
+
|
|
677
688
|
/** The settings the page edits, read the way apply() reads them. */
|
|
678
689
|
function editableSettings(raw) {
|
|
679
690
|
const config = raw !== null && typeof raw === 'object' ? raw : {}
|
|
@@ -1485,8 +1496,9 @@ async function fileIn(store, name, archived) {
|
|
|
1485
1496
|
* so a restored older log reads the same. Two carry text without an author, and only the
|
|
1486
1497
|
* owner can send either on that dsh (it grants a caller other than the owner nothing):
|
|
1487
1498
|
* an answer to the agent's question (`user-question-reply`) and a scheduled prompt
|
|
1488
|
-
* (`schedule`). `webhook`, input from outside, is left out.
|
|
1489
|
-
*
|
|
1499
|
+
* (`schedule`). `webhook`, input from outside, is left out. dsh 0.2.2-rc.1 adds one,
|
|
1500
|
+
* `action-cards` (ACTION_CARD_NOTICE). A kind not named here — a later dsh's, or any
|
|
1501
|
+
* plugin's — is someone else's unless its source says otherwise.
|
|
1490
1502
|
*/
|
|
1491
1503
|
const INERT_PRODUCERS = new Set([
|
|
1492
1504
|
'runtime-context', 'system-prompt', 'time-context', 'tmux-context', 'working-directory',
|
|
@@ -1498,6 +1510,17 @@ const INERT_PRODUCERS = new Set([
|
|
|
1498
1510
|
'dsh-session-title-llm', 'hooks-codex', 'hooks-claude-code', 'model', 'tool',
|
|
1499
1511
|
])
|
|
1500
1512
|
|
|
1513
|
+
/**
|
|
1514
|
+
* dsh 0.2.2-rc.1's `action-cards` messages (dsh-action-cards, in the optional personalized
|
|
1515
|
+
* recommendations bundle): what became of the cards the agent proposed, sent as a notice
|
|
1516
|
+
* (`form: 'notice'`) before the agent's next step. Its text is dsh's own preamble and the
|
|
1517
|
+
* cards' receipts — a card's title, the agent's own, and what each kind reports, such as a
|
|
1518
|
+
* place the owner typed — none of it written by an outsider: on that dsh only the owner
|
|
1519
|
+
* decides a card (`actionCards/act` is granted to no one else). Only the notice is nobody's;
|
|
1520
|
+
* any other form of the kind is someone else's, until a later dsh is read again.
|
|
1521
|
+
*/
|
|
1522
|
+
const ACTION_CARD_NOTICE = 'action-cards'
|
|
1523
|
+
|
|
1501
1524
|
/**
|
|
1502
1525
|
* Who wrote one user message, by the source dsh stamps on it (a message queued in
|
|
1503
1526
|
* `agent/inbox/spliced` or committed in `user/message`):
|
|
@@ -1513,7 +1536,7 @@ const INERT_PRODUCERS = new Set([
|
|
|
1513
1536
|
* cannot be read. Anyone in a group, the owner included: a `speaker` whose
|
|
1514
1537
|
* `chat` is set to anything but 'private' ('group' is the standard) — the whole
|
|
1515
1538
|
* group reads the reply, even before anyone else there has spoken;
|
|
1516
|
-
* undefined nobody: dsh's own producers (INERT_PRODUCERS) and a plugin's own message
|
|
1539
|
+
* undefined nobody: dsh's own producers (INERT_PRODUCERS, ACTION_CARD_NOTICE) and a plugin's own message
|
|
1517
1540
|
* declared `speaker: { role: 'none' }` — a report or a reminder no outsider
|
|
1518
1541
|
* wrote. These decide nothing. (SPEAKERS also lets through two bare `user`
|
|
1519
1542
|
* messages dsh writes itself.)
|
|
@@ -1530,6 +1553,7 @@ function speakerOf(source) {
|
|
|
1530
1553
|
return typeof source.rpcId === 'string' && typeof source.clientTimeZone === 'string' &&
|
|
1531
1554
|
source.principal === undefined ? 'owner' : 'other'
|
|
1532
1555
|
}
|
|
1556
|
+
if (kind === ACTION_CARD_NOTICE) return source.form === 'notice' ? undefined : 'other'
|
|
1533
1557
|
return typeof kind === 'string' && INERT_PRODUCERS.has(kind) ? undefined : 'other'
|
|
1534
1558
|
}
|
|
1535
1559
|
|
|
@@ -1633,8 +1657,9 @@ const SPEAKERS = {
|
|
|
1633
1657
|
// Bumped whenever the state's fields or the fold change, so dsh refolds a session from its
|
|
1634
1658
|
// log rather than seed it from a checkpoint the fold no longer means (2: pre-release shapes;
|
|
1635
1659
|
// 3: a message in a group chat is someone else's, the owner's included; 4: dsh 0.1's own
|
|
1636
|
-
// `{ kind: 'plugin' }` messages are nobody's, no longer an outsider's
|
|
1637
|
-
|
|
1660
|
+
// `{ kind: 'plugin' }` messages are nobody's, no longer an outsider's; 5: dsh 0.2.2's
|
|
1661
|
+
// `action-cards` notices are nobody's, no longer an outsider's, ACTION_CARD_NOTICE).
|
|
1662
|
+
stateVersion: 5,
|
|
1638
1663
|
// dsh only calls `parse`, on a checkpoint before folding on from it; no zod needed.
|
|
1639
1664
|
stateSchema: {
|
|
1640
1665
|
parse(value) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dsh-engramory",
|
|
3
|
-
"version": "1.5.
|
|
3
|
+
"version": "1.5.2",
|
|
4
4
|
"description": "DeepSeek Harness 的长期记忆插件:AI 记住的东西存成普通 markdown 文件,自动带上记忆索引(变了才再带),索引有大小上限。",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"dsh-plugin",
|
|
@@ -39,7 +39,9 @@
|
|
|
39
39
|
"0.2.1-rc.3": "compatible",
|
|
40
40
|
"0.2.1-rc.4": "compatible",
|
|
41
41
|
"0.2.1-rc.5": "compatible",
|
|
42
|
-
"0.2.2-alpha.2": "compatible"
|
|
42
|
+
"0.2.2-alpha.2": "compatible",
|
|
43
|
+
"0.2.2-alpha.3": "compatible",
|
|
44
|
+
"0.2.2-rc.1": "compatible"
|
|
43
45
|
}
|
|
44
46
|
}
|
|
45
47
|
},
|