@crowdedkingdoms/crowdy-dsh 0.2.1 → 0.3.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 (40) hide show
  1. package/README.md +5 -4
  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/index.js +3 -0
  5. package/lib/bridge/index.js.map +1 -1
  6. package/lib/bridge/protocol.js +9 -1
  7. package/lib/bridge/protocol.js.map +1 -1
  8. package/lib/crowdy/client.js +10 -0
  9. package/lib/crowdy/client.js.map +1 -1
  10. package/lib/crowdy/config.js +1 -3
  11. package/lib/crowdy/config.js.map +1 -1
  12. package/lib/crowdy/project-store.js +97 -181
  13. package/lib/crowdy/project-store.js.map +1 -1
  14. package/lib/fs/crowdy-file-system.js +14 -34
  15. package/lib/fs/crowdy-file-system.js.map +1 -1
  16. package/lib/index.js +1 -1
  17. package/lib/index.js.map +1 -1
  18. package/lib/scripts/probe.js +4 -7
  19. package/lib/scripts/probe.js.map +1 -1
  20. package/lib/types/bridge/index.d.ts.map +1 -1
  21. package/lib/types/bridge/protocol.d.ts +21 -2
  22. package/lib/types/bridge/protocol.d.ts.map +1 -1
  23. package/lib/types/crowdy/client.d.ts +17 -1
  24. package/lib/types/crowdy/client.d.ts.map +1 -1
  25. package/lib/types/crowdy/config.d.ts +0 -2
  26. package/lib/types/crowdy/config.d.ts.map +1 -1
  27. package/lib/types/crowdy/project-store.d.ts +39 -47
  28. package/lib/types/crowdy/project-store.d.ts.map +1 -1
  29. package/lib/types/fs/crowdy-file-system.d.ts +6 -6
  30. package/lib/types/fs/crowdy-file-system.d.ts.map +1 -1
  31. package/lib/types/index.d.ts +2 -2
  32. package/lib/types/index.d.ts.map +1 -1
  33. package/lib/vendor/crowdyjs-sdk.js +322 -114
  34. package/lib/vendor/crowdyjs-sdk.version.json +1 -1
  35. package/package.json +7 -7
  36. package/profile/crowdy-web.patch.yml +0 -1
  37. package/lib/crowdy/github-layout.js +0 -97
  38. package/lib/crowdy/github-layout.js.map +0 -1
  39. package/lib/types/crowdy/github-layout.d.ts +0 -36
  40. package/lib/types/crowdy/github-layout.d.ts.map +0 -1
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@crowdedkingdoms/crowdyjs",
3
- "version": "16.0.0",
3
+ "version": "17.0.0-dev.1",
4
4
  "source": "node_modules"
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@crowdedkingdoms/crowdy-dsh",
3
- "version": "0.2.1",
3
+ "version": "0.3.0-dev.1",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -15,7 +15,7 @@
15
15
  "access": "public"
16
16
  },
17
17
  "type": "module",
18
- "description": "DeepSeek Harness plugins whose filesystem is a Crowdy Studio project (GitHub-bound when possible), plus the packed in-browser harness image Crowdy Studio embeds.",
18
+ "description": "DeepSeek Harness plugins whose filesystem is a Crowdy Studio project (a bound GitHub repository when the owner chose one), plus the packed in-browser harness image Crowdy Studio embeds.",
19
19
  "exports": {
20
20
  ".": {
21
21
  "types": "./lib/types/index.d.ts",
@@ -94,11 +94,11 @@
94
94
  "crowdyDsh": {
95
95
  "build": {
96
96
  "package": "@crowdedkingdoms/crowdy-dsh",
97
- "version": "0.2.1",
98
- "builtAt": "2026-09-12T22:48:01.334Z",
97
+ "version": "0.3.0",
98
+ "builtAt": "2026-09-13T15:25:22.992Z",
99
99
  "source": {
100
100
  "repository": "CrowdedKingdoms/crowdy-dsh",
101
- "commit": "25f53e9a329040d37e265543347ac81d5edab7a4",
101
+ "commit": "3e4b7cc0099609a275a9ecce2b2560151f9296e1",
102
102
  "dirty": false
103
103
  },
104
104
  "upstream": {
@@ -109,7 +109,7 @@
109
109
  },
110
110
  "crowdyjs": {
111
111
  "name": "@crowdedkingdoms/crowdyjs",
112
- "version": "16.0.0",
112
+ "version": "17.0.0-dev.1",
113
113
  "source": "node_modules"
114
114
  },
115
115
  "files": {
@@ -206,7 +206,7 @@
206
206
  "manifest.webmanifest": "sha256:9b54d57eea00f2fdd1affe6e7999a4209a515755f12ac1a3299da2d55e178d4c",
207
207
  "preview/bootstrap-CYECZNXt.js": "sha256:9f303a0485c0badfdd19fad0c357ef050c5b9a343744ab5bf0c70015e7d95092",
208
208
  "preview/crowdy-boot-Cklh1qNl.js": "sha256:b21e8eb126e1cd8a52159d2d577e610df6c8af36a436f9ed5028cfabd11a85ff",
209
- "preview/vfs-image.tar.gz": "sha256:651d148ba24961cc73b2ba8b27c0ca1d0372ac01f98b7649ea2a8ed61a73625f",
209
+ "preview/vfs-image.tar.gz": "sha256:87b85a2319ae1a64327c8620d4fafc74017ddc2bebee472ae666d41b3b5ad24f",
210
210
  "preview/worker-C8-_ANaz.js": "sha256:81099e5732dfe0c32bacd5897316b7956c5a0a22da01b4a0c6e21d0a3b9d9aa1"
211
211
  }
212
212
  }
@@ -75,7 +75,6 @@
75
75
  # The image root is /dsh; the stock workspace directory becomes the
76
76
  # project mount so a session's cwd IS the project.
77
77
  root: /dsh/workspace
78
- githubFirst: true
79
78
 
80
79
  - id: attachment-crowdy
81
80
  name: '@crowdedkingdoms/crowdy-dsh/attachments'
@@ -1,97 +0,0 @@
1
- /**
2
- * Repository layout of a GitHub-bound Crowdy Studio project.
3
- *
4
- * Mirrors `CrowdyJS/src/crowdy-studio/github/sync.ts` (the Studio panel's
5
- * push/pull), which is the source of truth. It is restated here rather than
6
- * imported because that module lives in the `crowdy-studio` entry beside the
7
- * Monaco editor, and the worker image must not carry the editor.
8
- *
9
- * Layout (from `crowdy.json` at the repo root, else inferred from the tree):
10
- *
11
- * SERVER src/lib.rs <-> <serverRoot>/src/lib.rs
12
- * CLIENT src/lib.rs <-> <clientRoot>/src/lib.rs
13
- *
14
- * @module @crowdedkingdoms/crowdy-dsh/crowdy/github-layout
15
- */
16
- export const DEFAULT_FULL_STACK_CROWDY_JSON = `{
17
- "server": "server",
18
- "client": "client"
19
- }
20
- `;
21
- const SKIP_DIRS = new Set(['.git', 'node_modules', 'target', 'dist', '.cursor', '.github']);
22
- const SKIP_FILES = new Set(['crowdy.json', 'readme.md', 'license', '.gitignore']);
23
- export function trimSlash(path) {
24
- let start = 0;
25
- let end = path.length;
26
- while (start < end && path.charCodeAt(start) === 47)
27
- start += 1;
28
- while (end > start && path.charCodeAt(end - 1) === 47)
29
- end -= 1;
30
- return start === 0 && end === path.length ? path : path.slice(start, end);
31
- }
32
- export function joinRepo(root, rel) {
33
- const base = trimSlash(root);
34
- const rest = trimSlash(rel);
35
- if (!base || base === '.')
36
- return rest;
37
- return rest ? `${base}/${rest}` : base;
38
- }
39
- export function underRoot(path, root) {
40
- if (root == null)
41
- return null;
42
- const base = trimSlash(root);
43
- if (!base || base === '.')
44
- return path;
45
- if (path === base)
46
- return '';
47
- if (path.startsWith(`${base}/`))
48
- return path.slice(base.length + 1);
49
- return null;
50
- }
51
- export function parseCrowdyJson(content) {
52
- try {
53
- const parsed = JSON.parse(content);
54
- const server = typeof parsed.server === 'string' ? parsed.server.trim() || '.' : null;
55
- const clientRoot = typeof parsed.client === 'string' ? parsed.client.trim() || '.' : null;
56
- if (server == null && clientRoot == null)
57
- return null;
58
- return { serverRoot: server, clientRoot };
59
- }
60
- catch {
61
- return null;
62
- }
63
- }
64
- export function layoutFromTree(entries) {
65
- const hasDir = (name) => entries.some((e) => e.type === 'tree' && e.path === name);
66
- const hasClient = hasDir('client');
67
- const hasServer = hasDir('server');
68
- if (hasServer && hasClient)
69
- return { serverRoot: 'server', clientRoot: 'client' };
70
- if (hasClient)
71
- return { serverRoot: '.', clientRoot: 'client' };
72
- if (hasServer)
73
- return { serverRoot: 'server', clientRoot: null };
74
- return { serverRoot: '.', clientRoot: null };
75
- }
76
- export function repoPathToStudioFile(layout, repoPath) {
77
- const segments = repoPath.split('/');
78
- if (segments.some((s) => SKIP_DIRS.has(s)))
79
- return null;
80
- const name = segments[segments.length - 1]?.toLowerCase() ?? '';
81
- if (SKIP_FILES.has(name) || SKIP_FILES.has(repoPath.toLowerCase()))
82
- return null;
83
- const clientRel = underRoot(repoPath, layout.clientRoot);
84
- if (clientRel != null && clientRel !== '')
85
- return { target: 'CLIENT', path: clientRel };
86
- const serverRel = underRoot(repoPath, layout.serverRoot);
87
- if (serverRel != null && serverRel !== '')
88
- return { target: 'SERVER', path: serverRel };
89
- return null;
90
- }
91
- export function studioFileToRepoPath(layout, target, path) {
92
- const root = target === 'CLIENT' ? layout.clientRoot : layout.serverRoot;
93
- if (root == null)
94
- return null;
95
- return joinRepo(root, path);
96
- }
97
- //# sourceMappingURL=github-layout.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github-layout.js","sourceRoot":"","sources":["../../src/crowdy/github-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAcH,MAAM,CAAC,MAAM,8BAA8B,GAAG;;;;CAI7C,CAAA;AAED,MAAM,SAAS,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,cAAc,EAAE,QAAQ,EAAE,MAAM,EAAE,SAAS,EAAE,SAAS,CAAC,CAAC,CAAA;AAC3F,MAAM,UAAU,GAAG,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,WAAW,EAAE,SAAS,EAAE,YAAY,CAAC,CAAC,CAAA;AAEjF,MAAM,UAAU,SAAS,CAAC,IAAY;IACpC,IAAI,KAAK,GAAG,CAAC,CAAA;IACb,IAAI,GAAG,GAAG,IAAI,CAAC,MAAM,CAAA;IACrB,OAAO,KAAK,GAAG,GAAG,IAAI,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE;QAAE,KAAK,IAAI,CAAC,CAAA;IAC/D,OAAO,GAAG,GAAG,KAAK,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,GAAG,CAAC,CAAC,KAAK,EAAE;QAAE,GAAG,IAAI,CAAC,CAAA;IAC/D,OAAO,KAAK,KAAK,CAAC,IAAI,GAAG,KAAK,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AAE,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;QAAE,OAAO,IAAI,CAAA;IACvD,MAAM,IAAI,GAAG,QAAQ,CAAC,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,CAAA;IAC/D,IAAI,UAAU,CAAC,GAAG,CAAC,IAAI,CAAC,IAAI,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,WAAW,EAAE,CAAC;QAAE,OAAO,IAAI,CAAA;IAC/E,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,CAAA;IACxD,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;IACvF,MAAM,SAAS,GAAG,SAAS,CAAC,QAAQ,EAAE,MAAM,CAAC,UAAU,CAAC,CAAA;IACxD,IAAI,SAAS,IAAI,IAAI,IAAI,SAAS,KAAK,EAAE;QAAE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,CAAA;IACvF,OAAO,IAAI,CAAA;AACb,CAAC;AAED,MAAM,UAAU,oBAAoB,CAClC,MAAoB,EACpB,MAAoB,EACpB,IAAY;IAEZ,MAAM,IAAI,GAAG,MAAM,KAAK,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,CAAC,MAAM,CAAC,UAAU,CAAA;IACxE,IAAI,IAAI,IAAI,IAAI;QAAE,OAAO,IAAI,CAAA;IAC7B,OAAO,QAAQ,CAAC,IAAI,EAAE,IAAI,CAAC,CAAA;AAC7B,CAAC"}
@@ -1,36 +0,0 @@
1
- /**
2
- * Repository layout of a GitHub-bound Crowdy Studio project.
3
- *
4
- * Mirrors `CrowdyJS/src/crowdy-studio/github/sync.ts` (the Studio panel's
5
- * push/pull), which is the source of truth. It is restated here rather than
6
- * imported because that module lives in the `crowdy-studio` entry beside the
7
- * Monaco editor, and the worker image must not carry the editor.
8
- *
9
- * Layout (from `crowdy.json` at the repo root, else inferred from the tree):
10
- *
11
- * SERVER src/lib.rs <-> <serverRoot>/src/lib.rs
12
- * CLIENT src/lib.rs <-> <clientRoot>/src/lib.rs
13
- *
14
- * @module @crowdedkingdoms/crowdy-dsh/crowdy/github-layout
15
- */
16
- import type { CrowdyTarget } from './client.js';
17
- export interface GitHubLayout {
18
- serverRoot: string | null;
19
- clientRoot: string | null;
20
- }
21
- export interface GitHubTreeEntryLike {
22
- path: string;
23
- type: string;
24
- }
25
- export declare const DEFAULT_FULL_STACK_CROWDY_JSON = "{\n \"server\": \"server\",\n \"client\": \"client\"\n}\n";
26
- export declare function trimSlash(path: string): string;
27
- export declare function joinRepo(root: string, rel: string): string;
28
- export declare function underRoot(path: string, root: string | null): string | null;
29
- export declare function parseCrowdyJson(content: string): GitHubLayout | null;
30
- export declare function layoutFromTree(entries: ReadonlyArray<GitHubTreeEntryLike>): GitHubLayout;
31
- export declare function repoPathToStudioFile(layout: GitHubLayout, repoPath: string): {
32
- target: CrowdyTarget;
33
- path: string;
34
- } | null;
35
- export declare function studioFileToRepoPath(layout: GitHubLayout, target: CrowdyTarget, path: string): string | null;
36
- //# sourceMappingURL=github-layout.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"github-layout.d.ts","sourceRoot":"","sources":["../../../src/crowdy/github-layout.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAE/C,MAAM,WAAW,YAAY;IAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;CAC1B;AAED,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;CACb;AAED,eAAO,MAAM,8BAA8B,gEAI1C,CAAA;AAKD,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAM9C;AAED,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,CAK1D;AAED,wBAAgB,SAAS,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,GAAG,IAAI,CAO1E;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,GAAG,YAAY,GAAG,IAAI,CAUpE;AAED,wBAAgB,cAAc,CAAC,OAAO,EAAE,aAAa,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAQxF;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,QAAQ,EAAE,MAAM,GACf;IAAE,MAAM,EAAE,YAAY,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,GAAG,IAAI,CAU/C;AAED,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,YAAY,EACpB,IAAI,EAAE,MAAM,GACX,MAAM,GAAG,IAAI,CAIf"}