@bongos/core 1.19.883 → 1.19.885

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 (73) hide show
  1. package/.bongos-core.json +31 -291
  2. package/clients/bongos-client/index.d.ts +1 -1
  3. package/docs/api/openapi.json +4 -2
  4. package/docs/architecture.md +0 -1
  5. package/docs/file-map.md +0 -1
  6. package/docs/module-api-changelog.md +4 -0
  7. package/modules/lifecycle/routes/tasks.js +18 -4
  8. package/package-lock.json +2 -2
  9. package/package.json +1 -1
  10. package/scripts/gds/ship-land.js +103 -14
  11. package/scripts/gds/ship-merge.js +28 -0
  12. package/scripts/gds/ship.js +8 -0
  13. package/src/bongos/serve-internal.js +10 -56
  14. package/src/module-api.js +1 -1
  15. package/src/platform-server.js +0 -1
  16. package/tests/host_topology_skips.mjs +0 -1
  17. package/tests/instance_release_config.mjs +27 -26
  18. package/tests/publish_branch_route.mjs +70 -2
  19. package/tests/session_rename_fallback.mjs +8 -90
  20. package/tests/ship_land_proof.mjs +218 -0
  21. package/modules/dev-box/app/README.md +0 -74
  22. package/modules/dev-box/app/assets/tray/mac-alertTemplate.png +0 -0
  23. package/modules/dev-box/app/assets/tray/mac-alertTemplate@2x.png +0 -0
  24. package/modules/dev-box/app/assets/tray/mac-busyTemplate.png +0 -0
  25. package/modules/dev-box/app/assets/tray/mac-busyTemplate@2x.png +0 -0
  26. package/modules/dev-box/app/assets/tray/mac-offTemplate.png +0 -0
  27. package/modules/dev-box/app/assets/tray/mac-offTemplate@2x.png +0 -0
  28. package/modules/dev-box/app/assets/tray/mac-onTemplate.png +0 -0
  29. package/modules/dev-box/app/assets/tray/mac-onTemplate@2x.png +0 -0
  30. package/modules/dev-box/app/assets/tray/win-alert.png +0 -0
  31. package/modules/dev-box/app/assets/tray/win-busy.png +0 -0
  32. package/modules/dev-box/app/assets/tray/win-off.png +0 -0
  33. package/modules/dev-box/app/assets/tray/win-on.png +0 -0
  34. package/modules/dev-box/app/build-resources/dmg-background.png +0 -0
  35. package/modules/dev-box/app/build-resources/dmg-background@2x.png +0 -0
  36. package/modules/dev-box/app/build-resources/icon.png +0 -0
  37. package/modules/dev-box/app/electron-builder.tmpl.yml +0 -95
  38. package/modules/dev-box/app/electron-builder.yml +0 -95
  39. package/modules/dev-box/app/package-lock.json +0 -5291
  40. package/modules/dev-box/app/package.json +0 -30
  41. package/modules/dev-box/app/renderer/app.js +0 -319
  42. package/modules/dev-box/app/renderer/index.html +0 -45
  43. package/modules/dev-box/app/renderer/styles.css +0 -248
  44. package/modules/dev-box/app/renderer/theme.generated.css +0 -16
  45. package/modules/dev-box/app/scripts/apply-dmg-backdrop.sh +0 -82
  46. package/modules/dev-box/app/scripts/dmgbuild-settings.py +0 -39
  47. package/modules/dev-box/app/scripts/gen-brand.js +0 -138
  48. package/modules/dev-box/app/scripts/gen-dmg-backdrop.py +0 -323
  49. package/modules/dev-box/app/scripts/gen-icons.js +0 -286
  50. package/modules/dev-box/app/scripts/vendor-client.js +0 -23
  51. package/modules/dev-box/app/src/box-controller.js +0 -287
  52. package/modules/dev-box/app/src/brand.generated.json +0 -13
  53. package/modules/dev-box/app/src/brand.js +0 -16
  54. package/modules/dev-box/app/src/config.js +0 -31
  55. package/modules/dev-box/app/src/gds-client.js +0 -96
  56. package/modules/dev-box/app/src/main.js +0 -610
  57. package/modules/dev-box/app/src/pairing.js +0 -57
  58. package/modules/dev-box/app/src/preload.js +0 -29
  59. package/modules/dev-box/app/src/session-store.js +0 -82
  60. package/modules/dev-box/app/src/ssh-setup.js +0 -569
  61. package/modules/dev-box/app/src/task-picker.js +0 -70
  62. package/modules/dev-box/app/src/tray.js +0 -99
  63. package/modules/dev-box/app/src/updater.js +0 -55
  64. package/modules/dev-box/app/src/vendor/bongos-client.cjs +0 -1014
  65. package/modules/dev-box/app/test/unit.mjs +0 -526
  66. package/src/devbox-downloads.js +0 -67
  67. package/tests/devbox_artifact_gate.mjs +0 -75
  68. package/tests/devbox_dmg_backdrop.mjs +0 -137
  69. package/tests/devbox_downloads.mjs +0 -140
  70. package/tests/devbox_icons.mjs +0 -304
  71. package/tests/devbox_installer_brand.mjs +0 -232
  72. package/tests/devbox_key_register.mjs +0 -234
  73. package/tests/devbox_update_path.mjs +0 -84
@@ -1,29 +0,0 @@
1
- // devbox-app/src/preload.js — the renderer's ONLY door into the main process.
2
- // Sandboxed + contextIsolated; every capability is a named verb (no raw URLs,
3
- // no arbitrary IPC) so a compromised renderer can do nothing the panel UI
4
- // couldn't already do.
5
-
6
- const { contextBridge, ipcRenderer } = require('electron');
7
-
8
- contextBridge.exposeInMainWorld('otb', {
9
- getState: () => ipcRenderer.invoke('state:get'),
10
- signIn: () => ipcRenderer.invoke('auth:signIn'),
11
- cancelPairing: () => ipcRenderer.invoke('auth:cancelPairing'),
12
- signOut: () => ipcRenderer.invoke('auth:signOut'),
13
- boxOn: () => ipcRenderer.invoke('box:on'),
14
- boxOff: () => ipcRenderer.invoke('box:off'),
15
- claimable: () => ipcRenderer.invoke('tasks:claimable'),
16
- pickTask: (taskId) => ipcRenderer.invoke('tasks:pick', taskId),
17
- openTerminal: () => ipcRenderer.invoke('open:terminal'),
18
- openHall: () => ipcRenderer.invoke('open:hall'),
19
- openPairPage: () => ipcRenderer.invoke('open:pairPage'),
20
- openUpdate: () => ipcRenderer.invoke('open:update'),
21
- copy: (what) => ipcRenderer.invoke('copy', what),
22
- installSettings: () => ipcRenderer.invoke('settings:install'),
23
- retryHostKeys: () => ipcRenderer.invoke('hostkeys:retry'),
24
- retryKey: () => ipcRenderer.invoke('key:retry'),
25
- hide: () => ipcRenderer.invoke('panel:hide'),
26
- onState: (cb) => {
27
- ipcRenderer.on('state', (_e, payload) => cb(payload));
28
- },
29
- });
@@ -1,82 +0,0 @@
1
- // devbox-app/src/session-store.js — the app shares the GDS CLI's session file.
2
- //
3
- // ~/.config/<instance>/bongos-session.json is the same file scripts/gds/cli-lib.js and
4
- // paste-token.js read/write: { token, builder, api_base, ... }. Sharing it is
5
- // a deliberate UX decision (ADR 0045): pairing the app also signs in every
6
- // /builder-* skill on this machine, and a builder who already ran
7
- // /builder-setup opens the app already signed in. Writes are merge-preserving
8
- // (unknown fields like gemini_api_key survive, mirroring paste-token.js) and
9
- // 0600 like the CLI's.
10
-
11
- const fs = require('node:fs');
12
- const path = require('node:path');
13
- const os = require('node:os');
14
- const brand = require('./brand');
15
-
16
- // The instance's CLI config dir (branding configDir) — so the app shares the
17
- // exact session file the /builder-* CLI uses on this machine.
18
- const DIR = path.join(os.homedir(), '.config', brand.CONFIG_DIR);
19
- const FILE = path.join(DIR, 'bongos-session.json');
20
- // Read-side legacy names only — accepted on read, never written to, so the app
21
- // keeps working on a machine whose CLI has not yet re-authenticated. Newest
22
- // first, mirroring SESSION_FILENAMES in src/instance-config.js; this app ships as
23
- // its own bundle (own brand module, no core imports), so the list is duplicated
24
- // rather than imported, and pinned against the real one by
25
- // tests/session_rename_fallback.mjs (task 1003704).
26
- const FILES_LEGACY = [
27
- path.join(DIR, 'gds-session.json'),
28
- path.join(DIR, 'pms-session.json'),
29
- ];
30
- const FILES_READ = [FILE, ...FILES_LEGACY];
31
-
32
- function read() {
33
- for (const f of FILES_READ) {
34
- try {
35
- const data = JSON.parse(fs.readFileSync(f, 'utf8'));
36
- if (data && typeof data.token === 'string' && data.token) return data;
37
- } catch { /* missing or unparsable → keep looking */ }
38
- }
39
- return null;
40
- }
41
-
42
- function write({ token, builder, apiBase }) {
43
- const existing = read() || {};
44
- const next = {
45
- ...existing,
46
- token,
47
- builder: builder ?? existing.builder ?? null,
48
- api_base: apiBase ?? existing.api_base ?? null,
49
- };
50
- fs.mkdirSync(DIR, { recursive: true });
51
- fs.writeFileSync(FILE, `${JSON.stringify(next, null, 2)}\n`, { mode: 0o600 });
52
- // Re-assert the mode for pre-existing files (chmod is a no-op on Windows,
53
- // where the home-dir ACL is the protection — same posture as the CLI).
54
- try { fs.chmodSync(FILE, 0o600); } catch { /* best-effort */ }
55
- return next;
56
- }
57
-
58
- // Sign-out: drop ONLY our credential fields; preserve everything else
59
- // (gemini_api_key etc.) so the app never destroys CLI-adjacent config.
60
- //
61
- // Strips EVERY accepted filename, not just the current one. read() falls through
62
- // to an older name when the current file carries no token, so clearing FILE alone
63
- // would leave a live token in a superseded file and the very next read would sign
64
- // the builder straight back in. That was survivable while the only legacy name was
65
- // the long-dead `pms-session.json`; with `gds-session.json` now on the read list
66
- // it is the common case on every machine that has not re-authenticated yet
67
- // (task 1003704).
68
- function clear() {
69
- for (const target of FILES_READ) {
70
- let existing = null;
71
- try {
72
- existing = JSON.parse(fs.readFileSync(target, 'utf8'));
73
- } catch {
74
- continue; // missing or unparsable → nothing to strip
75
- }
76
- if (!existing || typeof existing !== 'object') continue;
77
- const { token: _t, builder: _b, ...rest } = existing;
78
- fs.writeFileSync(target, `${JSON.stringify(rest, null, 2)}\n`, { mode: 0o600 });
79
- }
80
- }
81
-
82
- module.exports = { read, write, clear, FILE };