dsh-reference-anything 0.3.0 → 0.3.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.
Files changed (109) hide show
  1. package/LICENSE +22 -22
  2. package/NOTICE.md +52 -25
  3. package/README.md +339 -286
  4. package/cordis.patch.yml +89 -18
  5. package/lib/client.js +13538 -591
  6. package/lib/contract.d.ts +155 -16
  7. package/lib/contract.js +68 -7
  8. package/lib/download-directory.d.ts +18 -0
  9. package/lib/download-directory.js +55 -0
  10. package/lib/errors.d.ts +4 -0
  11. package/lib/host.d.ts +96 -8
  12. package/lib/host.js +88 -19
  13. package/lib/index.d.ts +22 -2
  14. package/lib/index.js +57 -7
  15. package/lib/opencli.d.ts +5 -3
  16. package/lib/opencli.js +13 -6
  17. package/lib/openlist/host.d.ts +157 -0
  18. package/lib/openlist/host.js +873 -0
  19. package/lib/openlist/index.d.ts +84 -0
  20. package/lib/openlist/index.js +507 -0
  21. package/lib/render.d.ts +12 -7
  22. package/lib/render.js +27 -21
  23. package/lib/sources/cloud-drive/cache.d.ts +60 -0
  24. package/lib/sources/cloud-drive/cache.js +107 -0
  25. package/lib/sources/cloud-drive/index.d.ts +190 -0
  26. package/lib/sources/cloud-drive/index.js +526 -0
  27. package/lib/sources/cloud-drive/providers/http.d.ts +27 -0
  28. package/lib/sources/cloud-drive/providers/http.js +73 -0
  29. package/lib/sources/cloud-drive/providers/openlist.d.ts +59 -0
  30. package/lib/sources/cloud-drive/providers/openlist.js +535 -0
  31. package/lib/sources/cloud-drive/registry.d.ts +53 -0
  32. package/lib/sources/cloud-drive/registry.js +101 -0
  33. package/lib/sources/cloud-drive/types.d.ts +169 -0
  34. package/lib/sources/cloud-drive/types.js +17 -0
  35. package/lib/sources/file.d.ts +2 -0
  36. package/lib/sources/file.js +2 -0
  37. package/lib/sources/local-agent/adapters/claude-code.d.ts +16 -0
  38. package/lib/sources/local-agent/adapters/claude-code.js +171 -0
  39. package/lib/sources/local-agent/adapters/codex.d.ts +20 -0
  40. package/lib/sources/local-agent/adapters/codex.js +204 -0
  41. package/lib/sources/local-agent/adapters/cursor.d.ts +23 -0
  42. package/lib/sources/local-agent/adapters/cursor.js +121 -0
  43. package/lib/sources/local-agent/adapters/gemini-cli.d.ts +20 -0
  44. package/lib/sources/local-agent/adapters/gemini-cli.js +141 -0
  45. package/lib/sources/local-agent/adapters/grokbuild.d.ts +22 -0
  46. package/lib/sources/local-agent/adapters/grokbuild.js +76 -0
  47. package/lib/sources/local-agent/adapters/hermes.d.ts +19 -0
  48. package/lib/sources/local-agent/adapters/hermes.js +85 -0
  49. package/lib/sources/local-agent/adapters/kimi.d.ts +28 -0
  50. package/lib/sources/local-agent/adapters/kimi.js +261 -0
  51. package/lib/sources/local-agent/adapters/openclaw.d.ts +21 -0
  52. package/lib/sources/local-agent/adapters/openclaw.js +120 -0
  53. package/lib/sources/local-agent/adapters/opencode.d.ts +44 -0
  54. package/lib/sources/local-agent/adapters/opencode.js +236 -0
  55. package/lib/sources/local-agent/adapters/pi.d.ts +26 -0
  56. package/lib/sources/local-agent/adapters/pi.js +242 -0
  57. package/lib/sources/local-agent/adapters/qoder.d.ts +19 -0
  58. package/lib/sources/local-agent/adapters/qoder.js +93 -0
  59. package/lib/sources/local-agent/adapters/reasonix.d.ts +23 -0
  60. package/lib/sources/local-agent/adapters/reasonix.js +90 -0
  61. package/lib/sources/local-agent/adapters/shared.d.ts +163 -0
  62. package/lib/sources/local-agent/adapters/shared.js +415 -0
  63. package/lib/sources/local-agent/adapters/sqlite-shared.d.ts +92 -0
  64. package/lib/sources/local-agent/adapters/sqlite-shared.js +215 -0
  65. package/lib/sources/local-agent/adapters/zcode.d.ts +41 -0
  66. package/lib/sources/local-agent/adapters/zcode.js +159 -0
  67. package/lib/sources/local-agent/index.d.ts +222 -0
  68. package/lib/sources/local-agent/index.js +656 -0
  69. package/lib/sources/local-agent/page.d.ts +55 -0
  70. package/lib/sources/local-agent/page.js +83 -0
  71. package/lib/sources/local-agent/path.d.ts +8 -0
  72. package/lib/sources/local-agent/path.js +43 -0
  73. package/lib/sources/local-agent/registry.d.ts +68 -0
  74. package/lib/sources/local-agent/registry.js +116 -0
  75. package/lib/sources/local-agent/scan.d.ts +175 -0
  76. package/lib/sources/local-agent/scan.js +472 -0
  77. package/lib/sources/local-agent/sqlite.d.ts +45 -0
  78. package/lib/sources/local-agent/sqlite.js +113 -0
  79. package/lib/sources/local-agent/store.d.ts +93 -0
  80. package/lib/sources/local-agent/store.js +113 -0
  81. package/lib/sources/local-agent/types.d.ts +338 -0
  82. package/lib/sources/local-agent/types.js +20 -0
  83. package/lib/sources/web-chat/index.d.ts +5 -1
  84. package/lib/sources/web-chat/index.js +47 -8
  85. package/lib/store/spec.d.ts +50 -4
  86. package/lib/store/spec.js +2 -2
  87. package/lib/sync/index.d.ts +1 -0
  88. package/lib/sync/index.js +28 -8
  89. package/lib/tool.d.ts +5 -0
  90. package/lib/tool.js +418 -45
  91. package/lib/typert.js +13 -2
  92. package/lib/types.d.ts +28 -2
  93. package/lib/update.d.ts +6 -0
  94. package/lib/update.js +29 -1
  95. package/lib/web.js +5 -1
  96. package/lib/wire.d.ts +80 -9
  97. package/lib/wire.js +30 -4
  98. package/opencli-plugin/chatgpt.js +30 -27
  99. package/opencli-plugin/claude.js +12 -8
  100. package/opencli-plugin/common.js +266 -187
  101. package/opencli-plugin/deepseek.js +8 -5
  102. package/opencli-plugin/gemini.js +42 -38
  103. package/opencli-plugin/grok.js +22 -21
  104. package/opencli-plugin/kimi.js +34 -31
  105. package/opencli-plugin/opencli-plugin.json +6 -6
  106. package/opencli-plugin/package.json +8 -8
  107. package/package.json +182 -167
  108. package/lib/profile-mode.d.ts +0 -30
  109. package/lib/profile-mode.js +0 -90
package/cordis.patch.yml CHANGED
@@ -1,29 +1,29 @@
1
1
  # dsh-reference-anything — the layer this bundle contributes.
2
2
  #
3
3
  # A patch REPLACES a row's whole `config` rather than merging keys, so when you
4
- # override one of these in your profile's cordis.patch.yml, restate every key
5
- # the row needs.
6
- - id: ui-reference
7
- # Reference Anything re-registers Files and DSH sessions as two independent
8
- # sources over the same official Remotes. Disabling only this Client source
9
- # keeps the official file/session services and canonical mention semantics.
10
- disabled: true
11
-
12
- - insert:
13
- # The registry every source registers into.
4
+ # override one of these in your profile's cordis.patch.yml, restate every key
5
+ # the row needs.
6
+ - id: ui-reference
7
+ # Reference Anything re-registers Files and DSH sessions as two independent
8
+ # sources over the same official Remotes. Disabling only this Client source
9
+ # keeps the official file/session services and canonical mention semantics.
10
+ disabled: true
11
+
12
+ - insert:
13
+ # The registry every source registers into.
14
14
  - id: references
15
15
  name: 'dsh-reference-anything'
16
16
  config:
17
17
  listLimit: 20
18
18
 
19
- # Expands plugin-owned `@[label](dsh-ref:…)` mentions into untrusted
20
- # metadata on every surface. Native file and `dsh-session:` references stay
21
- # with DSH's official services. External transcripts are not prefetched;
22
- # the agent calls reference_read only when the current task needs one.
23
- - id: reference-mention
24
- name: 'dsh-reference-anything/reference'
25
- config:
26
- maxReferences: 3
19
+ # Expands plugin-owned `@[label](dsh-ref:…)` mentions into untrusted
20
+ # metadata on every surface. Native file and `dsh-session:` references stay
21
+ # with DSH's official services. External transcripts are not prefetched;
22
+ # the agent calls reference_read only when the current task needs one.
23
+ - id: reference-mention
24
+ name: 'dsh-reference-anything/reference'
25
+ config:
26
+ maxReferences: 3
27
27
 
28
28
  # Lets the model go looking on its own, and page backwards through a
29
29
  # conversation it has only seen the end of.
@@ -45,6 +45,11 @@
45
45
  timeoutMs: 60000
46
46
  maxStdoutBytes: 33554432
47
47
 
48
+ # Host-only OpenList lifecycle, credentials, and administration. This must
49
+ # start before the cloud-drive source and Remote that consume it.
50
+ - id: reference-openlist
51
+ name: 'dsh-reference-anything/openlist'
52
+
48
53
  # Host Remote used by the Web @Conversation source and settings panel.
49
54
  - id: reference-anything-web
50
55
  name: 'dsh-reference-anything/web'
@@ -59,3 +64,69 @@
59
64
  # a references/ directory; users may override it with absolute roots.
60
65
  roots: ['references']
61
66
  extensions: ['.json']
67
+
68
+ # Text files in the user's own cloud drives, listed by name and read a
69
+ # window at a time. Reading one needs a per-task grant: these are personal
70
+ # remote files, so the model may only open what its user named. Inert
71
+ # without a credential — a drive that has never been logged into simply
72
+ # reports unavailable, so the default is safe.
73
+ - id: reference-cloud-drive
74
+ name: 'dsh-reference-anything/cloud-drive'
75
+ config:
76
+ # OpenList is inert until a connection is configured in the Cloud
77
+ # drives settings section; no account secret is stored in this patch.
78
+ drives: ['openlist']
79
+ # Where OpenList listing starts when `roots` has no explicit entry.
80
+ # Keep it empty to show the OpenList root.
81
+ root: ''
82
+ # Optional OpenList root, for example {openlist: '/notes'}.
83
+ roots: {}
84
+ listTtlMs: 30000
85
+ # 64 KiB at 4000 characters a block is at most 17 blocks, which fits
86
+ # inside maxReadTurns — so an ordinary text file is returned whole,
87
+ # from its beginning. Raising this buys reach at the cost of a first
88
+ # page that lands at the end of the file.
89
+ maxReadBytes: 65536
90
+ maxReadTurns: 20
91
+ blockChars: 4000
92
+
93
+ # Transcripts other coding agents leave on disk, listed by title and read a
94
+ # window at a time. Reading one needs a per-task grant: these are other
95
+ # sessions' conversations, so the model may only open what its user named.
96
+ - id: reference-local-agent
97
+ name: 'dsh-reference-anything/local-agent'
98
+ config:
99
+ # Every format this package reads, at each agent's own default location
100
+ # under $HOME. An agent that is not installed simply has no directory,
101
+ # which is not an error. Ordered by how well the format is validated:
102
+ # the first two were built against real corpora, the rest from format
103
+ # documentation and synthetic fixtures. Drop the unvalidated ones from
104
+ # this list to run on the two that were measured.
105
+ agents: ['claude-code', 'codex', 'cursor', 'qoder', 'reasonix', 'openclaw',
106
+ 'kimi', 'grokbuild', 'hermes', 'gemini-cli', 'pi',
107
+ 'opencode', 'mimocode', 'zcode']
108
+ extraRoots: []
109
+ # The @ menu is a cross-project history picker; the per-Agent enable
110
+ # switches remain the explicit visibility boundary.
111
+ scope: 'all'
112
+ maxTranscripts: 200
113
+ maxReadTurns: 20
114
+ maxScanBytes: 33554432
115
+ headLines: 40
116
+ tailLines: 20
117
+ maxProbeBytes: 2097152
118
+ maxLineBytes: 1048576
119
+ directoryTtlMs: 5000
120
+ includeThinking: false
121
+ toolCalls: 'full'
122
+ includeSidechains: false
123
+ stripEnvironmentPreamble: true
124
+ # The last three formats keep every conversation in one SQLite database
125
+ # rather than a file apiece, so reading them needs `node:sqlite`. Set
126
+ # this to false and the driver is never imported at all: no root of
127
+ # those kinds is resolved, so no database is ever opened.
128
+ sqlite: true
129
+ # Most message rows to materialize from one database-backed session,
130
+ # counted from the newest. A database cannot be streamed the way a JSONL
131
+ # file can, so this is what bounds the memory a read costs.
132
+ maxSessionRecords: 2000