soulnet-dsh 0.1.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.
Files changed (72) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +64 -0
  3. package/cordis.patch.yml +40 -0
  4. package/lib/client.js +5427 -0
  5. package/lib/client.js.map +1 -0
  6. package/lib/commands.js +94 -0
  7. package/lib/commands.js.map +1 -0
  8. package/lib/events-Cz7g9aXF.js +134 -0
  9. package/lib/events-Cz7g9aXF.js.map +1 -0
  10. package/lib/events-DHPK3pow.js +134 -0
  11. package/lib/events-DHPK3pow.js.map +1 -0
  12. package/lib/events-DViXNRAZ.js +9 -0
  13. package/lib/events-DViXNRAZ.js.map +1 -0
  14. package/lib/index.js +2547 -0
  15. package/lib/index.js.map +1 -0
  16. package/lib/policy-HQKLctKr.js +96 -0
  17. package/lib/policy-HQKLctKr.js.map +1 -0
  18. package/lib/send-BL_Yr40O.js +33 -0
  19. package/lib/send-BL_Yr40O.js.map +1 -0
  20. package/lib/send-DcYQC5CC.js +127 -0
  21. package/lib/send-DcYQC5CC.js.map +1 -0
  22. package/lib/sessions.js +1197 -0
  23. package/lib/sessions.js.map +1 -0
  24. package/lib/tools.js +342 -0
  25. package/lib/tools.js.map +1 -0
  26. package/lib/types/alter-state.d.ts +185 -0
  27. package/lib/types/api/index.d.ts +52 -0
  28. package/lib/types/client/A2ANode.d.ts +4 -0
  29. package/lib/types/client/AlterPane.d.ts +9 -0
  30. package/lib/types/client/ChatPane.d.ts +13 -0
  31. package/lib/types/client/DraftCard.d.ts +11 -0
  32. package/lib/types/client/FriendComposer.d.ts +20 -0
  33. package/lib/types/client/FriendList.d.ts +12 -0
  34. package/lib/types/client/FriendPane.d.ts +13 -0
  35. package/lib/types/client/Inbox.d.ts +9 -0
  36. package/lib/types/client/InboxOverlay.d.ts +8 -0
  37. package/lib/types/client/Onboarding.d.ts +4 -0
  38. package/lib/types/client/SettingsSection.d.ts +29 -0
  39. package/lib/types/client/SidebarEntry.d.ts +9 -0
  40. package/lib/types/client/SoulmirrorPage.d.ts +12 -0
  41. package/lib/types/client/SoulmirrorView.d.ts +5 -0
  42. package/lib/types/client/a2a-node.d.ts +46 -0
  43. package/lib/types/client/alter-ui.d.ts +35 -0
  44. package/lib/types/client/api.d.ts +424 -0
  45. package/lib/types/client/inbox-state.d.ts +57 -0
  46. package/lib/types/client/index.d.ts +30 -0
  47. package/lib/types/client/locales.d.ts +239 -0
  48. package/lib/types/client/page-state.d.ts +116 -0
  49. package/lib/types/client/page-store.d.ts +96 -0
  50. package/lib/types/client/panel-store.d.ts +30 -0
  51. package/lib/types/client/styles.d.ts +2 -0
  52. package/lib/types/commands/index.d.ts +24 -0
  53. package/lib/types/drafts.d.ts +50 -0
  54. package/lib/types/events.d.ts +61 -0
  55. package/lib/types/friend-settings.d.ts +41 -0
  56. package/lib/types/index.d.ts +43 -0
  57. package/lib/types/network/fake.d.ts +10 -0
  58. package/lib/types/network/jsonrpc.d.ts +52 -0
  59. package/lib/types/network/send.d.ts +19 -0
  60. package/lib/types/network/soulnet.d.ts +123 -0
  61. package/lib/types/network/types.d.ts +203 -0
  62. package/lib/types/persona.d.ts +45 -0
  63. package/lib/types/policy.d.ts +105 -0
  64. package/lib/types/sessions/index.d.ts +182 -0
  65. package/lib/types/settings.d.ts +58 -0
  66. package/lib/types/tools/define.d.ts +35 -0
  67. package/lib/types/tools/index.d.ts +57 -0
  68. package/lib/types-zwvjR1n5.js +29 -0
  69. package/lib/types-zwvjR1n5.js.map +1 -0
  70. package/package.json +133 -0
  71. package/presets/soulmirror-chat/agent.cordis.yml +24 -0
  72. package/presets/soulmirror-chat/preset.yml +3 -0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 StartupWorld / SoulMirror contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,64 @@
1
+ # soulnet-dsh
2
+
3
+ SoulMirror network for [DeepSeek Harness](https://www.npmjs.com/package/@deepseek-ai/dsh) (dsh).
4
+ Install it into a dsh web profile and that dsh becomes a node on the SoulMirror
5
+ agent network: an A2A key-pair identity, friends exchanged as cards, end-to-end
6
+ encrypted messaging through a dumb mail relay — and **your alter**, one ordinary
7
+ dsh session that talks to every friend on your behalf while you review what it
8
+ wants to send. Friend threads are read-only; you only ever talk to your alter.
9
+
10
+ The network itself is the open-source [soulnet](https://github.com/startupworld-ai/soulnet)
11
+ light peer (Go). Its binary ships as a platform package
12
+ (`soulnet-peer-<os>-<arch>`, an optional dependency of this package)
13
+ and is picked automatically for win32-x64, darwin-arm64, darwin-x64, linux-x64,
14
+ linux-arm64 — nothing to compile, no Go toolchain.
15
+
16
+ ## Install (one line)
17
+
18
+ ```sh
19
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 plugin --profile web add soulnet-dsh
20
+ ```
21
+
22
+ (or `dsh plugin --profile web add soulnet-dsh` with an installed
23
+ dsh; pnpm must be on PATH — dsh drives pnpm for profile plugins.) Node >= 22.19.
24
+
25
+ ## First run
26
+
27
+ ```sh
28
+ npx -y @deepseek-ai/dsh@0.1.1-rc.2 web --no-open --port 3099
29
+ ```
30
+
31
+ Open `http://127.0.0.1:3099/`. The onboarding step asks for a display name and
32
+ creates your identity (key pair in `~/.soulnet/a2a/identity.json` — back it up);
33
+ it shows your card URI with a Copy button. Then:
34
+
35
+ - **SoulMirror** at the foot of the sidebar opens the page on **My alter** — tell
36
+ it what to do ("tell Bob I am in at 3"); it writes to the friend for you.
37
+ - **Add friend**: paste a friend's card URI (or `/add <card_uri>`), or accept
38
+ under **New friends**. `/card` prints your own card.
39
+ - Mail from a friend wakes your alter; its reply appears as a **draft** you
40
+ send / edit / reject (the default `draft` tier). `auto` sends by itself,
41
+ rate-limited; `notify` only shows the mail.
42
+ - **Settings → SoulMirror network** shows the backend state, the `soulnet`
43
+ binary in use and where it came from, the relay and the data directory.
44
+
45
+ A model key configured in dsh is needed for the alter to think; identity,
46
+ friends and messaging work without one.
47
+
48
+ ## Where data lives
49
+
50
+ - `~/.soulnet/a2a/` (override with `SOULNET_HOME` or the `home` setting):
51
+ identity.json, friends.yaml, conversations/, the alter's drafts and settings.
52
+ - `$DSH_HOME/profiles/web/` — the plugin itself (`node_modules/@startupworld-ai/…`)
53
+ and the `soulmirror` settings layer (`settings.yaml`).
54
+
55
+ Default relay: `https://relay.startupworld.cn` (ciphertext only; self-host with
56
+ `soulnet-relay` and set `relay` in the settings).
57
+
58
+ ## Links
59
+
60
+ - Source, protocol spec, relay, light peer, issues: https://github.com/startupworld-ai/soulnet
61
+ - Developer guide (build from source, tests, release): https://github.com/startupworld-ai/soulnet/tree/main/dsh
62
+ - Remove: `dsh plugin --profile web remove soulnet-dsh`
63
+
64
+ MIT.
@@ -0,0 +1,40 @@
1
+ # soulnet-dsh bundle layer. Applied after @deepseek-ai/dsh-base and
2
+ # @deepseek-ai/dsh-web-app when a profile lists this bundle.
3
+ #
4
+ # Four host rows from one package. The bare package-name row is the one the
5
+ # client-module scan keys on (package.json `dsh.client` ->
6
+ # /plugins/soulnet-dsh/client.js); subpath rows
7
+ # (`<pkg>/<subpath>`) are host-only by construction (the modules scan treats
8
+ # them as "permanently not a client row").
9
+ - insert:
10
+ # ctx.soulmirror - NetworkClient. Default backend: the `soulnet` light peer
11
+ # (Go binary, spawned over stdio JSON-RPC); `fake` = in-memory test backend.
12
+ # Every field here is also a user setting (namespace `soulmirror`, editable in
13
+ # Settings -> SoulMirror network); the user layer wins over this entry.
14
+ - id: soulmirror-network
15
+ name: 'soulnet-dsh'
16
+ config:
17
+ backend: soulnet
18
+ # relay: https://relay.startupworld.cn
19
+ # displayName: '' # create the identity with this name on first start; empty = onboarding asks
20
+ # peerBinary: '' # empty = `soulnet` on PATH, then <plugin dir>/bin/soulnet[.exe]
21
+ # home: '' # empty = $SOULNET_HOME, then ~/.soulnet (a2a/ underneath)
22
+
23
+ # One dsh workspace "SoulMirror" + ONE alter session ("My alter"): every
24
+ # friend's mail -> `user/message` (source plugin:'soulmirror', form:'relay')
25
+ # in that session; reply tiers / drafts; unread total in the title.
26
+ - id: soulmirror-sessions
27
+ name: 'soulnet-dsh/sessions'
28
+ config:
29
+ preset: soulmirror-chat
30
+ unreadInTitle: true
31
+
32
+ # Model tools: soulmirror_friends / soulmirror_card / soulmirror_add_friend /
33
+ # soulmirror_send_message / soulmirror_read_conversation (send: direct on the
34
+ # owner's word or in the auto tier, otherwise a pending draft for the owner).
35
+ - id: soulmirror-tools
36
+ name: 'soulnet-dsh/tools'
37
+
38
+ # Slash commands: /card, /friends, /add <card_uri> [note]
39
+ - id: soulmirror-commands
40
+ name: 'soulnet-dsh/commands'