@crowdedkingdoms/crowdy-dsh 0.4.14 → 0.5.0-dev.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.
Files changed (83) hide show
  1. package/README.md +44 -7
  2. package/dist/dsh-web/BUILD.json +5 -5
  3. package/dist/dsh-web/preview/vfs-image.tar.gz +0 -0
  4. package/lib/bridge/client-service.js +33 -0
  5. package/lib/bridge/client-service.js.map +1 -0
  6. package/lib/bridge/client.js +20 -1
  7. package/lib/bridge/client.js.map +1 -1
  8. package/lib/bridge/index.js +33 -24
  9. package/lib/bridge/index.js.map +1 -1
  10. package/lib/bridge/protocol.js +30 -1
  11. package/lib/bridge/protocol.js.map +1 -1
  12. package/lib/crowdy/config.js +6 -0
  13. package/lib/crowdy/config.js.map +1 -1
  14. package/lib/crowdy/playbook.js +24 -0
  15. package/lib/crowdy/playbook.js.map +1 -0
  16. package/lib/crowdy/repo-paths.js +27 -0
  17. package/lib/crowdy/repo-paths.js.map +1 -0
  18. package/lib/crowdy/token.js +16 -0
  19. package/lib/crowdy/token.js.map +1 -0
  20. package/lib/fs/crowdy-file-system.js +4 -10
  21. package/lib/fs/crowdy-file-system.js.map +1 -1
  22. package/lib/fs/entry.js +22 -0
  23. package/lib/fs/entry.js.map +1 -0
  24. package/lib/fs/game-file-system.js +532 -0
  25. package/lib/fs/game-file-system.js.map +1 -0
  26. package/lib/fs/studio-fs.js +14 -0
  27. package/lib/fs/studio-fs.js.map +1 -0
  28. package/lib/index.js +2 -0
  29. package/lib/index.js.map +1 -1
  30. package/lib/search/search-tools.js +4 -5
  31. package/lib/search/search-tools.js.map +1 -1
  32. package/lib/skills/playbook.js +80 -0
  33. package/lib/skills/playbook.js.map +1 -0
  34. package/lib/tools/game.js +155 -0
  35. package/lib/tools/game.js.map +1 -0
  36. package/lib/tools/index.js +21 -12
  37. package/lib/tools/index.js.map +1 -1
  38. package/lib/types/bridge/client-service.d.ts +32 -0
  39. package/lib/types/bridge/client-service.d.ts.map +1 -0
  40. package/lib/types/bridge/client.d.ts +6 -0
  41. package/lib/types/bridge/client.d.ts.map +1 -1
  42. package/lib/types/bridge/index.d.ts +9 -13
  43. package/lib/types/bridge/index.d.ts.map +1 -1
  44. package/lib/types/bridge/protocol.d.ts +189 -2
  45. package/lib/types/bridge/protocol.d.ts.map +1 -1
  46. package/lib/types/crowdy/config.d.ts +7 -0
  47. package/lib/types/crowdy/config.d.ts.map +1 -1
  48. package/lib/types/crowdy/playbook.d.ts +13 -0
  49. package/lib/types/crowdy/playbook.d.ts.map +1 -0
  50. package/lib/types/crowdy/repo-paths.d.ts +15 -0
  51. package/lib/types/crowdy/repo-paths.d.ts.map +1 -0
  52. package/lib/types/crowdy/repo-paths.test.d.ts.map +1 -0
  53. package/lib/types/crowdy/token.d.ts +10 -0
  54. package/lib/types/crowdy/token.d.ts.map +1 -0
  55. package/lib/types/crowdy/token.test.d.ts.map +1 -0
  56. package/lib/types/fs/crowdy-file-system.d.ts +7 -2
  57. package/lib/types/fs/crowdy-file-system.d.ts.map +1 -1
  58. package/lib/types/fs/entry.d.ts +21 -0
  59. package/lib/types/fs/entry.d.ts.map +1 -0
  60. package/lib/types/fs/game-file-system.d.ts +107 -0
  61. package/lib/types/fs/game-file-system.d.ts.map +1 -0
  62. package/lib/types/fs/game-file-system.test.d.ts.map +1 -0
  63. package/lib/types/fs/studio-fs.d.ts +42 -0
  64. package/lib/types/fs/studio-fs.d.ts.map +1 -0
  65. package/lib/types/index.d.ts +3 -0
  66. package/lib/types/index.d.ts.map +1 -1
  67. package/lib/types/search/search-tools.d.ts.map +1 -1
  68. package/lib/types/skills/playbook.d.ts +25 -0
  69. package/lib/types/skills/playbook.d.ts.map +1 -0
  70. package/lib/types/skills/playbook.test.d.ts.map +1 -0
  71. package/lib/types/tools/game.d.ts +25 -0
  72. package/lib/types/tools/game.d.ts.map +1 -0
  73. package/lib/types/tools/game.test.d.ts.map +1 -0
  74. package/lib/types/tools/index.d.ts +5 -0
  75. package/lib/types/tools/index.d.ts.map +1 -1
  76. package/lib/vendor/crowdyjs-sdk.js +50 -10
  77. package/lib/vendor/crowdyjs-sdk.version.json +1 -1
  78. package/package.json +25 -9
  79. package/presets/crowdy/agent.cordis.yml +1 -0
  80. package/presets/crowdy-game/agent.cordis.yml +143 -0
  81. package/presets/crowdy-game/preset.yml +3 -0
  82. package/profile/crowdy-node.patch.yml +3 -0
  83. package/profile/crowdy-web.patch.yml +10 -3
@@ -0,0 +1,143 @@
1
+ # The `crowdy-game` agent preset: the game editor. Its filesystem is the draft
2
+ # of the bound game repository, which the page owns (`ctx.fs` is the game
3
+ # backend when the boot says `studioMode: game`; settings.yaml then makes this
4
+ # preset the default). Nothing here names a game: what a particular game
5
+ # wants is its own STUDIO.md and the skills its playbook lists.
6
+ #
7
+ # Left out, as in the `crowdy` preset, and for the same reasons: tool-bash /
8
+ # tool-pwsh (no shell), tool-fs-search (spawns ripgrep), tool-jobs and
9
+ # skill-filesystem (walk local disks), tool-web, delegation. Also left out:
10
+ # the mod build tools (draft_test, deploy_live, grid programs) and the
11
+ # crowdy-compute-sdk index, which belong to mods.
12
+
13
+ # ── identity ────────────────────────────────────────────────────────────────
14
+
15
+ - id: persona
16
+ name: '@deepseek-ai/dsh-persona'
17
+ config:
18
+ suffix: The game repository draft is mounted at {{cwd}}.
19
+ prefix: >-
20
+ You are the Crowdy Studio agent, powered by the {{model}} model. You help
21
+ a player build their game: the files mounted at `{{cwd}}` are the game's
22
+ own repository, as a draft that only this player sees.
23
+
24
+
25
+ Read a file before you change it. A write changes the draft, never
26
+ GitHub. The player's world reloads what the game can preview from the
27
+ draft; call `preview_status` after a change to see whether it took, and
28
+ fix what it reports before you say it works.
29
+
30
+
31
+ Nothing reaches the repository until the player asks you to commit. Then
32
+ call `commit_game_files` with a message that says what changed; the
33
+ player approves it here and confirms it on the page. Never commit on your
34
+ own initiative.
35
+
36
+
37
+ You have no shell: you cannot install packages, run builds or tests,
38
+ start servers or deploy. When a change needs one of those, say exactly
39
+ what the player should run and stop. Do not invent command output.
40
+
41
+
42
+ The game's own guidance comes first: its STUDIO.md, when it has one, is
43
+ in your instructions, and its skills are in the skill catalog. Load the
44
+ skill that matches before you change that part of the game, and read the
45
+ playbook pages it names with `read_playbook`. `captures/` and `context/`
46
+ hold screenshots and observations the page shares; they are not part of
47
+ the repository. Keep edits small and explain what you changed in one or
48
+ two sentences.
49
+
50
+ # The game's dock guidance, not its developer notes: a repository's AGENTS.md
51
+ # is written for an agent with a shell and a checkout, which this one is not.
52
+ - id: agent-instructions
53
+ name: '@deepseek-ai/dsh-agent-instructions'
54
+ config:
55
+ maxBytes: 32768
56
+ instructionFileCandidates: [STUDIO.md]
57
+ localInstructionFileCandidates: []
58
+
59
+ # ── files, search, page tools ───────────────────────────────────────────────
60
+
61
+ - id: tool-fs
62
+ name: '@deepseek-ai/dsh-tool-fs'
63
+
64
+ - id: tool-fs-search-crowdy
65
+ name: '@crowdedkingdoms/crowdy-dsh/search'
66
+ config:
67
+ globMaxResults: 100
68
+ grepMaxMatches: 250
69
+ grepMaxLineBytes: 2000
70
+
71
+ # The page tools the game editor shares with the mod editor.
72
+ - id: crowdy-tools
73
+ name: '@crowdedkingdoms/crowdy-dsh/tools'
74
+ config:
75
+ screenshotTimeoutMs: 15000
76
+ autoScreenshot: false
77
+ only: [screenshot, game_observe, client_logs]
78
+
79
+ # commit_game_files, preview_status, read_playbook.
80
+ - id: crowdy-game-tools
81
+ name: '@crowdedkingdoms/crowdy-dsh/game-tools'
82
+ config:
83
+ commitTimeoutMs: 180000
84
+
85
+ # The skills the game's playbook lists, loaded through the page.
86
+ - id: crowdy-playbook-skills
87
+ name: '@crowdedkingdoms/crowdy-dsh/playbook-skills'
88
+
89
+ - id: tool-skill
90
+ name: '@deepseek-ai/dsh-tool-skill'
91
+
92
+ # ── plan mode ───────────────────────────────────────────────────────────────
93
+
94
+ - id: planning
95
+ name: cordis:group
96
+ group: true
97
+ isolate:
98
+ planMode: true
99
+ config:
100
+ - id: plan-mode
101
+ name: '@deepseek-ai/dsh-plan-mode'
102
+ config:
103
+ section: |
104
+ You are in plan mode. Stay in plan mode until exit_plan_mode succeeds or the player switches the session mode. Imperative language to implement changes means plan the implementation, not execute it.
105
+
106
+ Explore first: read the game's files, its STUDIO.md and the skill that matches the task, so the plan follows the game's own structure. Do not write files and do not commit while planning.
107
+
108
+ When ready, call exit_plan_mode with the complete plan markdown, starting with a # title, as the only and final tool call in that response.
109
+
110
+ # ── compaction ──────────────────────────────────────────────────────────────
111
+
112
+ - id: compaction
113
+ name: cordis:group
114
+ group: true
115
+ isolate:
116
+ compaction: true
117
+ toolResultPruner: true
118
+ config:
119
+ - id: compaction-basic
120
+ name: '@deepseek-ai/dsh-compaction-basic'
121
+
122
+ - id: command-compact
123
+ name: '@deepseek-ai/dsh-command-compact'
124
+
125
+ - id: tool-result-pruner
126
+ name: '@deepseek-ai/dsh-compaction-tool-result-pruner'
127
+ config:
128
+ thresholdChars: 8192
129
+ headChars: 4096
130
+ tailChars: 1024
131
+
132
+ # ── remaining model-facing rows ─────────────────────────────────────────────
133
+
134
+ - id: tool-ask-user
135
+ name: '@deepseek-ai/dsh-tool-ask-user'
136
+
137
+ - id: tool-todo
138
+ name: '@deepseek-ai/dsh-tool-todo'
139
+ config:
140
+ allowParallelInProgress: true
141
+
142
+ - id: present
143
+ name: '@deepseek-ai/dsh-tool-present'
@@ -0,0 +1,3 @@
1
+ name: Crowdy Studio game
2
+ description: Edits the bound game repository as a draft the player's world previews, commits it to GitHub when the player asks, and follows the game's own guidance and skills. No shell and no disk access, because the repository is not on this machine.
3
+ order: 1
@@ -30,5 +30,8 @@
30
30
  config:
31
31
  root: !!js process.env.CROWDY_MOUNT ?? require('node:os').homedir() + '/crowdy-mount'
32
32
 
33
+ - id: crowdy-bridge-client
34
+ name: '@crowdedkingdoms/crowdy-dsh/bridge-client'
35
+
33
36
  - id: crowdy-bridge
34
37
  name: '@crowdedkingdoms/crowdy-dsh/bridge'
@@ -10,7 +10,8 @@
10
10
  # the unmodified read/write/edit/read_image tools operate on the project;
11
11
  # 2. the sharp-backed attachment store is replaced by an in-memory one that
12
12
  # works without native modules, so screenshots reach the model;
13
- # 3. the page bridge joins, and the `crowdy` preset becomes the default.
13
+ # 3. the page bridge joins, and the `crowdy` preset becomes the default (a
14
+ # game-mode boot's settings.yaml makes it `crowdy-game`).
14
15
  #
15
16
  # Connection settings arrive at boot as `$DSH_HOME/crowdy.json` (an overlay the
16
17
  # Studio page writes), never from this file.
@@ -69,6 +70,8 @@
69
70
  default: crowdy
70
71
 
71
72
  - insert:
73
+ # One row, one ctx.fs: the mod crates, or the game draft when crowdy.json
74
+ # says studioMode game (the page owns that draft).
72
75
  - id: crowdy-fs
73
76
  name: '@crowdedkingdoms/crowdy-dsh/fs'
74
77
  config:
@@ -76,6 +79,12 @@
76
79
  # project mount so a session's cwd IS the project.
77
80
  root: /dsh/workspace
78
81
 
82
+ # The page channel on its own: the game filesystem and the bridge both use it.
83
+ - id: crowdy-bridge-client
84
+ name: '@crowdedkingdoms/crowdy-dsh/bridge-client'
85
+ config:
86
+ timeoutMs: 15000
87
+
79
88
  - id: attachment-crowdy
80
89
  name: '@crowdedkingdoms/crowdy-dsh/attachments'
81
90
  config:
@@ -84,8 +93,6 @@
84
93
 
85
94
  - id: crowdy-bridge
86
95
  name: '@crowdedkingdoms/crowdy-dsh/bridge'
87
- config:
88
- timeoutMs: 15000
89
96
 
90
97
  # Mirror sessions, projection caches and settings into the origin-private
91
98
  # file system; the page restores them as an overlay on the next boot.