@fnndsc/calypso 0.29.14 → 0.30.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 (82) hide show
  1. package/dist/calypso.js +19 -8
  2. package/dist/calypso.js.map +1 -1
  3. package/dist/daemon/attachFile.d.ts +26 -19
  4. package/dist/daemon/attachFile.js +42 -51
  5. package/dist/daemon/attachFile.js.map +1 -1
  6. package/dist/daemon/attachOrigin.d.ts +69 -0
  7. package/dist/daemon/attachOrigin.js +125 -0
  8. package/dist/daemon/attachOrigin.js.map +1 -0
  9. package/dist/daemon/berth.d.ts +265 -26
  10. package/dist/daemon/berth.js +521 -158
  11. package/dist/daemon/berth.js.map +1 -1
  12. package/dist/daemon/claims.js +19 -9
  13. package/dist/daemon/claims.js.map +1 -1
  14. package/dist/daemon/commandLane.d.ts +317 -0
  15. package/dist/daemon/commandLane.js +409 -0
  16. package/dist/daemon/commandLane.js.map +1 -0
  17. package/dist/daemon/console.d.ts +0 -2
  18. package/dist/daemon/console.js +7 -10
  19. package/dist/daemon/console.js.map +1 -1
  20. package/dist/daemon/consoleSession.js +4 -1
  21. package/dist/daemon/consoleSession.js.map +1 -1
  22. package/dist/daemon/elevation.d.ts +0 -3
  23. package/dist/daemon/elevation.js +1 -3
  24. package/dist/daemon/elevation.js.map +1 -1
  25. package/dist/daemon/face.d.ts +18 -4
  26. package/dist/daemon/face.js +77 -32
  27. package/dist/daemon/face.js.map +1 -1
  28. package/dist/daemon/hostControl.d.ts +114 -1
  29. package/dist/daemon/hostControl.js +104 -4
  30. package/dist/daemon/hostControl.js.map +1 -1
  31. package/dist/daemon/hostPty.d.ts +14 -0
  32. package/dist/daemon/hostPty.js +19 -1
  33. package/dist/daemon/hostPty.js.map +1 -1
  34. package/dist/daemon/hostPtyRelay.d.ts +118 -0
  35. package/dist/daemon/hostPtyRelay.js +186 -0
  36. package/dist/daemon/hostPtyRelay.js.map +1 -0
  37. package/dist/daemon/httpRoutes.d.ts +257 -0
  38. package/dist/daemon/httpRoutes.js +537 -0
  39. package/dist/daemon/httpRoutes.js.map +1 -0
  40. package/dist/daemon/instance.d.ts +37 -0
  41. package/dist/daemon/instance.js +59 -0
  42. package/dist/daemon/instance.js.map +1 -0
  43. package/dist/daemon/launch.d.ts +17 -0
  44. package/dist/daemon/launch.js +198 -194
  45. package/dist/daemon/launch.js.map +1 -1
  46. package/dist/daemon/launchBanner.d.ts +76 -0
  47. package/dist/daemon/launchBanner.js +80 -0
  48. package/dist/daemon/launchBanner.js.map +1 -0
  49. package/dist/daemon/rival.d.ts +65 -0
  50. package/dist/daemon/rival.js +67 -0
  51. package/dist/daemon/rival.js.map +1 -0
  52. package/dist/daemon/server.d.ts +104 -190
  53. package/dist/daemon/server.js +358 -866
  54. package/dist/daemon/server.js.map +1 -1
  55. package/dist/daemon/settings.d.ts +42 -0
  56. package/dist/daemon/settings.js +43 -0
  57. package/dist/daemon/settings.js.map +1 -0
  58. package/dist/daemon/surface.d.ts +103 -0
  59. package/dist/daemon/surface.js +71 -0
  60. package/dist/daemon/surface.js.map +1 -0
  61. package/dist/daemon/surfaceReplies.d.ts +109 -0
  62. package/dist/daemon/surfaceReplies.js +108 -0
  63. package/dist/daemon/surfaceReplies.js.map +1 -0
  64. package/dist/daemon/terminals.js +5 -2
  65. package/dist/daemon/terminals.js.map +1 -1
  66. package/dist/daemon/token.d.ts +41 -5
  67. package/dist/daemon/token.js +43 -12
  68. package/dist/daemon/token.js.map +1 -1
  69. package/dist/daemon/uploadHold.d.ts +85 -0
  70. package/dist/daemon/uploadHold.js +205 -0
  71. package/dist/daemon/uploadHold.js.map +1 -0
  72. package/dist/daemon/vfsHeaders.d.ts +11 -0
  73. package/dist/daemon/vfsHeaders.js +60 -0
  74. package/dist/daemon/vfsHeaders.js.map +1 -0
  75. package/dist/index.d.ts +5 -5
  76. package/dist/index.js +3 -4
  77. package/dist/index.js.map +1 -1
  78. package/dist/notes.json +1 -1
  79. package/package.json +9 -4
  80. package/dist/daemon/discovery.d.ts +0 -23
  81. package/dist/daemon/discovery.js +0 -57
  82. package/dist/daemon/discovery.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fnndsc/calypso",
3
- "version": "0.29.14",
3
+ "version": "0.30.0",
4
4
  "description": "CALYPSO: the ChRIS session daemon — hosts a brasa engine for attached surfaces over a WebSocket",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,6 +30,10 @@
30
30
  "import": "./dist/daemon/berth.js",
31
31
  "types": "./dist/daemon/berth.d.ts"
32
32
  },
33
+ "./settings": {
34
+ "import": "./dist/daemon/settings.js",
35
+ "types": "./dist/daemon/settings.d.ts"
36
+ },
33
37
  "./package.json": "./package.json"
34
38
  },
35
39
  "scripts": {
@@ -55,12 +59,13 @@
55
59
  "typescript": "^5.0.0"
56
60
  },
57
61
  "dependencies": {
58
- "@fnndsc/brasa": "^0.56.3",
59
- "@fnndsc/cumin": "^3.30.5",
62
+ "@fnndsc/brasa": "^0.58.0",
63
+ "@fnndsc/cumin": "^3.31.0",
64
+ "@fnndsc/fond": "^0.7.0",
60
65
  "chalk": "^4.1.2",
61
66
  "ws": "^8.18.0",
62
67
  "zod": "^4.6.7",
63
- "@fnndsc/menu": "^0.41.2"
68
+ "@fnndsc/menu": "^0.42.0"
64
69
  },
65
70
  "optionalDependencies": {
66
71
  "node-pty": "1.1.0"
@@ -1,23 +0,0 @@
1
- /** What the discovery file records. */
2
- export interface Discovery {
3
- url: string;
4
- token: string;
5
- }
6
- /**
7
- * The legacy per-user discovery file path.
8
- *
9
- * @returns The path the daemon writes and a client reads.
10
- */
11
- export declare function discovery_path(): string;
12
- /**
13
- * Writes the discovery file, readable only by the current user.
14
- *
15
- * @param discovery - The URL and token to record.
16
- */
17
- export declare function discovery_write(discovery: Discovery): void;
18
- /**
19
- * Reads the discovery file.
20
- *
21
- * @returns The recorded URL and token, or null when no daemon has advertised.
22
- */
23
- export declare function discovery_read(): Discovery | null;
@@ -1,57 +0,0 @@
1
- /**
2
- * @file Legacy single-file same-user daemon discovery.
3
- *
4
- * Retained for compatibility and its direct tests; current daemon launch and
5
- * ChELL attachment use identity-keyed berths from `berth.ts`. This older model
6
- * records only one daemon per OS user in a 0600 file.
7
- *
8
- * @module
9
- */
10
- import { writeFileSync, readFileSync, existsSync } from 'fs';
11
- import { join } from 'path';
12
- import { tmpdir } from 'os';
13
- import { userInfo } from 'os';
14
- /**
15
- * The legacy per-user discovery file path.
16
- *
17
- * @returns The path the daemon writes and a client reads.
18
- */
19
- export function discovery_path() {
20
- return join(tmpdir(), `chell-calypso-${userInfo().username}.json`);
21
- }
22
- /**
23
- * Writes the discovery file, readable only by the current user.
24
- *
25
- * @param discovery - The URL and token to record.
26
- */
27
- export function discovery_write(discovery) {
28
- writeFileSync(discovery_path(), JSON.stringify(discovery), { mode: 0o600 });
29
- }
30
- /**
31
- * Reads the discovery file.
32
- *
33
- * @returns The recorded URL and token, or null when no daemon has advertised.
34
- */
35
- export function discovery_read() {
36
- const path = discovery_path();
37
- if (!existsSync(path)) {
38
- return null;
39
- }
40
- try {
41
- const parsed = JSON.parse(readFileSync(path, 'utf-8'));
42
- if (typeof parsed === 'object' && parsed !== null &&
43
- typeof parsed.url === 'string' &&
44
- typeof parsed.token === 'string') {
45
- return parsed;
46
- }
47
- return null;
48
- }
49
- catch (error) {
50
- // Same rationale as berth_read: a corrupt discovery file must not be
51
- // indistinguishable from "no daemon running".
52
- const msg = error instanceof Error ? error.message : String(error);
53
- console.error(`[!] Ignoring unreadable discovery file ${path}: ${msg}`);
54
- return null;
55
- }
56
- }
57
- //# sourceMappingURL=discovery.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"discovery.js","sourceRoot":"","sources":["../../src/daemon/discovery.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AACH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,IAAI,CAAC;AAC7D,OAAO,EAAE,IAAI,E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