@centralu/darwin-arm64 0.1.0-beta.42 → 0.1.0-beta.44
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.
- package/Centralu.app/Contents/Info.plist +2 -2
- package/Centralu.app/Contents/MacOS/centralu +0 -0
- package/Centralu.app/Contents/MacOS/centralu-keeper +0 -0
- package/Centralu.app/Contents/Resources/content/centralu-keeper +0 -0
- package/Centralu.app/Contents/Resources/content/content-manifest.json +8 -8
- package/Centralu.app/Contents/Resources/content/content-manifest.json.sig +1 -1
- package/Centralu.app/Contents/Resources/content/host/bundle-info.json +2 -2
- package/Centralu.app/Contents/Resources/content/host/centralu-package.json +5 -5
- package/Centralu.app/Contents/Resources/content/host/main.mjs +7099 -4132
- package/Centralu.app/Contents/Resources/content/host/pty-broker.mjs +42 -16
- package/Centralu.app/Contents/Resources/resources/host/bundle-info.json +2 -2
- package/Centralu.app/Contents/Resources/resources/host/centralu-package.json +5 -5
- package/Centralu.app/Contents/Resources/resources/host/main.mjs +7099 -4132
- package/Centralu.app/Contents/Resources/resources/host/pty-broker.mjs +42 -16
- package/Centralu.app/Contents/_CodeSignature/CodeResources +24 -24
- package/package.json +1 -1
|
@@ -11,18 +11,20 @@
|
|
|
11
11
|
* what the terminals do on stdout.
|
|
12
12
|
*
|
|
13
13
|
* - in: `{op:'spawn', id, file, args, cwd, env, cols, rows}` · `{op:'write', id, data}` · `{op:'resize', id, cols, rows}`
|
|
14
|
-
* · `{op:'kill', id}`
|
|
14
|
+
* · `{op:'kill', id}` · `{op:'open', url}` (an `https` address in the person's browser, review of #1685)
|
|
15
15
|
* - out: `{ev:'ready'}` once · `{ev:'spawned', id, pid}` · `{ev:'error', id, message}` · `{ev:'data', id, data}` ·
|
|
16
16
|
* `{ev:'exit', id, exitCode, signal}`
|
|
17
17
|
*
|
|
18
18
|
* Its stdin closing means the host is gone: it exits, which closes every pseudoconsole and so ends each shell as the
|
|
19
19
|
* host's own would have. What a shell started outside its console stays.
|
|
20
20
|
*/
|
|
21
|
+
import { spawn } from 'node:child_process'
|
|
21
22
|
import { createRequire } from 'node:module'
|
|
22
23
|
import { createInterface } from 'node:readline'
|
|
23
24
|
|
|
24
25
|
const require = createRequire(import.meta.url)
|
|
25
|
-
|
|
26
|
+
/** node-pty, loaded as the broker starts (`main`); a test that imports this file for `handle` loads none */
|
|
27
|
+
let pty
|
|
26
28
|
|
|
27
29
|
/** @type {Map<number, any>} */
|
|
28
30
|
const ptys = new Map()
|
|
@@ -48,7 +50,25 @@ function spawnPty(m) {
|
|
|
48
50
|
}
|
|
49
51
|
}
|
|
50
52
|
|
|
51
|
-
|
|
53
|
+
/**
|
|
54
|
+
* The person's browser at an address (Antigravity's sign-in page): started from here, outside the host's job, so it
|
|
55
|
+
* outlives the sign-in and the host. `detached`, so libuv puts it in no job of this process's either (it ends with this
|
|
56
|
+
* one otherwise); never through a shell, and only an `https` address. `start` is `spawn` (a test gives its own)
|
|
57
|
+
*/
|
|
58
|
+
function open(url, start) {
|
|
59
|
+
if (typeof url !== 'string' || !/^https:\/\//i.test(url)) return
|
|
60
|
+
try {
|
|
61
|
+
const child = start('rundll32', ['url.dll,FileProtocolHandler', url], { detached: true, stdio: 'ignore', windowsHide: true })
|
|
62
|
+
child.on('error', () => {})
|
|
63
|
+
child.unref()
|
|
64
|
+
} catch {
|
|
65
|
+
// The sign-in times out, which says the browser did not open
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** One request from the host. `start` starts what `open` opens: `spawn`, or a test's stand-in so no browser opens */
|
|
70
|
+
export function handle(m, start = spawn) {
|
|
71
|
+
if (m.op === 'open') return open(m.url, start)
|
|
52
72
|
if (m.op === 'spawn') {
|
|
53
73
|
let p
|
|
54
74
|
try {
|
|
@@ -81,16 +101,22 @@ function handle(m) {
|
|
|
81
101
|
}
|
|
82
102
|
}
|
|
83
103
|
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
m
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
104
|
+
function main() {
|
|
105
|
+
pty = require('node-pty')
|
|
106
|
+
const lines = createInterface({ input: process.stdin })
|
|
107
|
+
lines.on('line', (line) => {
|
|
108
|
+
let m
|
|
109
|
+
try {
|
|
110
|
+
m = JSON.parse(line)
|
|
111
|
+
} catch {
|
|
112
|
+
return
|
|
113
|
+
}
|
|
114
|
+
handle(m)
|
|
115
|
+
})
|
|
116
|
+
// The host is gone (closed, crashed, killed): every pseudoconsole closes with this process
|
|
117
|
+
lines.on('close', () => process.exit(0))
|
|
118
|
+
send({ ev: 'ready' })
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// Started as the broker (`node pty-broker.mjs`, which every start is); a test imports it with this flag set to read `handle`
|
|
122
|
+
if (!globalThis.__ccPtyBrokerImported) main()
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
2
|
+
"commit": "6e6bc62",
|
|
3
3
|
"protocolVersion": 1,
|
|
4
4
|
"hostProof": 1,
|
|
5
5
|
"tokenOnStdin": 1,
|
|
6
|
-
"builtAt": "2026-10-
|
|
6
|
+
"builtAt": "2026-10-28T16:08:33.601Z",
|
|
7
7
|
"runtime": "system-node",
|
|
8
8
|
"platform": "darwin",
|
|
9
9
|
"arch": "arm64"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "centralu",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.44",
|
|
4
4
|
"description": "Run, watch and steer several Claude Code and Codex CLI sessions from one window",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "ijun17",
|
|
@@ -38,9 +38,9 @@
|
|
|
38
38
|
"win32"
|
|
39
39
|
],
|
|
40
40
|
"optionalDependencies": {
|
|
41
|
-
"@centralu/darwin-arm64": "0.1.0-beta.
|
|
42
|
-
"@centralu/linux-arm64": "0.1.0-beta.
|
|
43
|
-
"@centralu/linux-x64": "0.1.0-beta.
|
|
44
|
-
"@centralu/win32-x64": "0.1.0-beta.
|
|
41
|
+
"@centralu/darwin-arm64": "0.1.0-beta.44",
|
|
42
|
+
"@centralu/linux-arm64": "0.1.0-beta.44",
|
|
43
|
+
"@centralu/linux-x64": "0.1.0-beta.44",
|
|
44
|
+
"@centralu/win32-x64": "0.1.0-beta.44"
|
|
45
45
|
}
|
|
46
46
|
}
|