@centralu/win32-x64 0.1.0-beta.81 → 0.1.0-beta.82
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/centralu.exe
CHANGED
|
Binary file
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
|
-
"commit": "
|
|
2
|
+
"commit": "9684dfb",
|
|
3
3
|
"protocolVersion": 1,
|
|
4
4
|
"hostProof": 1,
|
|
5
5
|
"tokenOnStdin": 1,
|
|
6
6
|
"verifiers": 1,
|
|
7
7
|
"keyPairing": 1,
|
|
8
|
-
"builtAt": "2026-11-
|
|
8
|
+
"builtAt": "2026-11-27T16:57:59.425Z",
|
|
9
9
|
"runtime": "system-node",
|
|
10
10
|
"platform": "win32",
|
|
11
11
|
"arch": "x64"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "centralu",
|
|
3
|
-
"version": "0.1.0-beta.
|
|
3
|
+
"version": "0.1.0-beta.82",
|
|
4
4
|
"description": "Run, watch and steer Claude Code, Codex and other coding agents 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.82",
|
|
42
|
+
"@centralu/linux-arm64": "0.1.0-beta.82",
|
|
43
|
+
"@centralu/linux-x64": "0.1.0-beta.82",
|
|
44
|
+
"@centralu/win32-x64": "0.1.0-beta.82"
|
|
45
45
|
}
|
|
46
46
|
}
|
|
@@ -43046,7 +43046,7 @@ import { dirname as dirname27, join as join57 } from "node:path";
|
|
|
43046
43046
|
import { mkdirSync as mkdirSync21, readFileSync as readFileSync28, writeSync as writeSync4 } from "node:fs";
|
|
43047
43047
|
|
|
43048
43048
|
// packages/protocol/src/version.generated.ts
|
|
43049
|
-
var APP_VERSION = "0.1.0-beta.
|
|
43049
|
+
var APP_VERSION = "0.1.0-beta.82";
|
|
43050
43050
|
|
|
43051
43051
|
// packages/protocol/src/brand.ts
|
|
43052
43052
|
var APP_NAME = "Centralu";
|
|
@@ -60897,6 +60897,8 @@ var hostParams = {
|
|
|
60897
60897
|
* --window` and cannot write to a host it did not start. `cancelled`: the announced end was called off
|
|
60898
60898
|
*/
|
|
60899
60899
|
"host.systemEnding": external_exports.object({ cancelled: external_exports.boolean().optional() }),
|
|
60900
|
+
/** Local dev:live tab pairing code for human message attribution on this socket only */
|
|
60901
|
+
"host.trustDevTab": external_exports.object({ code: external_exports.string().regex(/^[A-Z0-9]{3}-[A-Z0-9]{3}$/) }),
|
|
60900
60902
|
/**
|
|
60901
60903
|
* docs/plans/remote-hub.md §12.7: sent at every connect and when its switch changes. This host calls that hub back only
|
|
60902
60904
|
* on the connection the offer came in on, and shows it "not reachable" once that is gone.
|
|
@@ -60980,6 +60982,7 @@ var hostResults = {
|
|
|
60980
60982
|
]),
|
|
60981
60983
|
"host.handover": external_exports.object({ ok: external_exports.literal(true) }),
|
|
60982
60984
|
"host.systemEnding": external_exports.object({ ok: external_exports.literal(true) }),
|
|
60985
|
+
"host.trustDevTab": external_exports.object({ ok: external_exports.literal(true) }),
|
|
60983
60986
|
// `mail`: this host takes `host.mail`, so the hub's task for a child here says to mail
|
|
60984
60987
|
// `apps`: this host answers `host.apps` and `host.appCall`
|
|
60985
60988
|
// `tasks`: this host takes the hub's tasks as mail and reports them back (`host.mail` with `task`)
|
|
@@ -61187,6 +61190,11 @@ var MessageImage = external_exports.discriminatedUnion("ok", [
|
|
|
61187
61190
|
file: external_exports.string().optional()
|
|
61188
61191
|
})
|
|
61189
61192
|
]);
|
|
61193
|
+
var MessageFileRefusal = external_exports.enum(["not_mentioned", "not_found", "unreadable"]);
|
|
61194
|
+
var MessageFile = external_exports.discriminatedUnion("ok", [
|
|
61195
|
+
external_exports.object({ ok: external_exports.literal(true), file: external_exports.string() }),
|
|
61196
|
+
external_exports.object({ ok: external_exports.literal(false), reason: MessageFileRefusal, message: external_exports.string() })
|
|
61197
|
+
]);
|
|
61190
61198
|
var FsResolvePurpose = external_exports.enum(["trash", "reveal", "open", "project"]);
|
|
61191
61199
|
|
|
61192
61200
|
// packages/protocol/src/commands/projects.ts
|
|
@@ -61689,6 +61697,8 @@ var sessionsParams = {
|
|
|
61689
61697
|
* `path` as the reply wrote it; the host resolves `~`, a path relative to the session's folder and a `file://` URL.
|
|
61690
61698
|
*/
|
|
61691
61699
|
"messages.image": external_exports.object({ sessionId: SessionId, path: external_exports.string().min(1).max(4096) }),
|
|
61700
|
+
/** Resolves a local file or folder link a reply named for native reveal; refuses unmentioned or off-machine paths */
|
|
61701
|
+
"messages.resolveFile": external_exports.object({ sessionId: SessionId, path: external_exports.string().min(1).max(4096) }),
|
|
61692
61702
|
"messages.search": external_exports.object({ query: external_exports.string(), limit: external_exports.number().optional() }),
|
|
61693
61703
|
"sessions.reorder": external_exports.object({ projectId: ProjectId, orderedIds: external_exports.array(external_exports.string()) }),
|
|
61694
61704
|
"sessions.list": external_exports.object({}),
|
|
@@ -61881,6 +61891,7 @@ var sessionsResults = {
|
|
|
61881
61891
|
"agents.sleepPolicy": SleepPolicy,
|
|
61882
61892
|
"agents.setSleepPolicy": SleepPolicy,
|
|
61883
61893
|
"messages.image": MessageImage,
|
|
61894
|
+
"messages.resolveFile": MessageFile,
|
|
61884
61895
|
"messages.search": external_exports.array(external_exports.object({ sessionId: external_exports.string(), seq: external_exports.number(), snippet: external_exports.string() })),
|
|
61885
61896
|
"sessions.reorder": external_exports.array(SessionInfo),
|
|
61886
61897
|
"sessions.list": external_exports.array(SessionInfo),
|
|
@@ -62427,7 +62438,9 @@ var HelloServer = external_exports.object({
|
|
|
62427
62438
|
* The turns this host continues because an update cut them (`host.stop { forUpdate }`), `at` on this host's clock.
|
|
62428
62439
|
* Empty: it continues such turns; absent: it predates that
|
|
62429
62440
|
*/
|
|
62430
|
-
updateContinued: external_exports.array(external_exports.object({ sessionId: external_exports.string(), at: external_exports.number() })).optional().catch(void 0)
|
|
62441
|
+
updateContinued: external_exports.array(external_exports.object({ sessionId: external_exports.string(), at: external_exports.number() })).optional().catch(void 0),
|
|
62442
|
+
/** Sent when the socket authenticated with the limited credential (`'limited'`); absent on full connections and older hosts */
|
|
62443
|
+
rights: external_exports.enum(["full", "limited"]).optional().catch(void 0)
|
|
62431
62444
|
});
|
|
62432
62445
|
var RpcRequest = external_exports.object({
|
|
62433
62446
|
kind: external_exports.literal("rpc"),
|
|
@@ -62730,7 +62743,9 @@ var LONG_CALLS = /* @__PURE__ */ new Set([
|
|
|
62730
62743
|
var GIT_WRITE_BUDGET_MS = GIT_WRITE_TIMEOUT_MS + 6e4;
|
|
62731
62744
|
var GIT_WRITE_CALLS = /* @__PURE__ */ new Set(["git.stage", "git.commit", "git.checkout", "git.push"]);
|
|
62732
62745
|
var APP_CALL_BUDGET_MS = APP_CAPABILITY_QUESTION_MS + APP_CALL_TIMEOUT_MS;
|
|
62746
|
+
var HOST_REQUEST_BUDGET_MS = 15 * 6e4 + 6e4;
|
|
62733
62747
|
function callBudgetMs(method) {
|
|
62748
|
+
if (method === "host.trustDevTab") return HOST_REQUEST_BUDGET_MS;
|
|
62734
62749
|
if (method === "apps.invoke") return APP_CALL_BUDGET_MS;
|
|
62735
62750
|
if (GIT_WRITE_CALLS.has(method)) return GIT_WRITE_BUDGET_MS;
|
|
62736
62751
|
return LONG_CALLS.has(method) ? LONG_CALL_BUDGET_MS : DEFAULT_CALL_BUDGET_MS;
|
|
@@ -63225,10 +63240,10 @@ function samePath(a, b2, family2, cwd) {
|
|
|
63225
63240
|
return pathKey(a, family2, cwd) === pathKey(b2, family2, cwd);
|
|
63226
63241
|
}
|
|
63227
63242
|
function isInside(root3, candidate, family2, cwd) {
|
|
63228
|
-
const
|
|
63243
|
+
const sep14 = pathRules(family2).sep;
|
|
63229
63244
|
const r = pathKey(root3, family2, cwd);
|
|
63230
63245
|
const c = pathKey(candidate, family2, cwd);
|
|
63231
|
-
return c === r || c.startsWith(r.endsWith(
|
|
63246
|
+
return c === r || c.startsWith(r.endsWith(sep14) ? r : r + sep14);
|
|
63232
63247
|
}
|
|
63233
63248
|
function expandHome(path2, home, family2) {
|
|
63234
63249
|
if (path2 === "~") return home;
|
|
@@ -65881,6 +65896,7 @@ var METHOD_RIGHTS = {
|
|
|
65881
65896
|
"agents.account": "everyday",
|
|
65882
65897
|
"usage.history": "everyday",
|
|
65883
65898
|
"messages.image": "everyday",
|
|
65899
|
+
"messages.resolveFile": "everyday",
|
|
65884
65900
|
"messages.search": "everyday",
|
|
65885
65901
|
"messages.load": "everyday",
|
|
65886
65902
|
"messages.subagent": "everyday",
|
|
@@ -66092,6 +66108,11 @@ var METHOD_RIGHTS = {
|
|
|
66092
66108
|
* plant a false end that relabels a real crash as the system's (#1397)
|
|
66093
66109
|
*/
|
|
66094
66110
|
"host.systemEnding": "window",
|
|
66111
|
+
/**
|
|
66112
|
+
* A local `dev:live` browser tab asking the person (via a card with a pairing code and origin) to attribute
|
|
66113
|
+
* messages on that single open WebSocket as human rather than script. Never grants full/window rights.
|
|
66114
|
+
*/
|
|
66115
|
+
"host.trustDevTab": "asks",
|
|
66095
66116
|
"host.hubOffer": "link",
|
|
66096
66117
|
// From a hub that offered on the same connection only (rpc.ts), as `host.hubOffer` (#2067 item 2)
|
|
66097
66118
|
"host.mail": "link",
|
|
@@ -66723,6 +66744,12 @@ function drainToolResult(e) {
|
|
|
66723
66744
|
}
|
|
66724
66745
|
|
|
66725
66746
|
// packages/agent-host/src/transport/server.ts
|
|
66747
|
+
var DEV_TAB_ORIGINS = /* @__PURE__ */ new Set([
|
|
66748
|
+
"http://127.0.0.1:5173",
|
|
66749
|
+
"http://127.0.0.1:5174",
|
|
66750
|
+
"http://localhost:5173",
|
|
66751
|
+
"http://localhost:5174"
|
|
66752
|
+
]);
|
|
66726
66753
|
var DEFAULT_ALLOWED_ORIGINS = [
|
|
66727
66754
|
"http://127.0.0.1:5173",
|
|
66728
66755
|
"http://127.0.0.1:5174",
|
|
@@ -67005,9 +67032,12 @@ var HostServer = class _HostServer {
|
|
|
67005
67032
|
setTimeout(() => ws2.terminate(), this.limits.closeGraceMs).unref();
|
|
67006
67033
|
}
|
|
67007
67034
|
onConnection(ws2, req) {
|
|
67035
|
+
const origin = typeof req.headers.origin === "string" ? req.headers.origin : null;
|
|
67008
67036
|
let authed = false;
|
|
67009
67037
|
let bridgeOf2 = null;
|
|
67010
67038
|
let limited = false;
|
|
67039
|
+
let trustedDev = false;
|
|
67040
|
+
let trustingDev = false;
|
|
67011
67041
|
let session2;
|
|
67012
67042
|
let label = null;
|
|
67013
67043
|
const leaving = new AbortController();
|
|
@@ -67139,7 +67169,7 @@ var HostServer = class _HostServer {
|
|
|
67139
67169
|
this.showing.add(ws2);
|
|
67140
67170
|
this.opts.onShowing?.(this.showing.size);
|
|
67141
67171
|
}
|
|
67142
|
-
this.greet(ws2, frame.data.afterSeq ?? 0, frame.data.streamEpoch);
|
|
67172
|
+
this.greet(ws2, frame.data.afterSeq ?? 0, frame.data.streamEpoch, limited);
|
|
67143
67173
|
return;
|
|
67144
67174
|
}
|
|
67145
67175
|
if (!authed) {
|
|
@@ -67162,10 +67192,93 @@ var HostServer = class _HostServer {
|
|
|
67162
67192
|
if (refusal2 !== null) return this.sendError(ws2, id3, { code: "internal", message: refusal2, retryable: false });
|
|
67163
67193
|
}
|
|
67164
67194
|
if (limited) {
|
|
67195
|
+
if (method === "host.trustDevTab") {
|
|
67196
|
+
const who = `client=${client} label=${JSON.stringify(label)} origin=${JSON.stringify(origin)}`;
|
|
67197
|
+
if (this.opts.servedBy === "serve" || this.opts.fullCredentials !== void 0) {
|
|
67198
|
+
console.error(`[agent-host] refused "host.trustDevTab" (${who}): serve host`);
|
|
67199
|
+
return this.sendError(ws2, id3, {
|
|
67200
|
+
code: "internal",
|
|
67201
|
+
message: "host.trustDevTab is only available on a local desktop host, not a centralu serve host",
|
|
67202
|
+
retryable: false,
|
|
67203
|
+
data: { refused: "rights", rights: "asks" }
|
|
67204
|
+
});
|
|
67205
|
+
}
|
|
67206
|
+
if (session2 !== void 0) {
|
|
67207
|
+
console.error(`[agent-host] refused "host.trustDevTab" (${who}): session credential`);
|
|
67208
|
+
return this.sendError(ws2, id3, {
|
|
67209
|
+
code: "internal",
|
|
67210
|
+
message: "A session credential cannot ask to trust a dev browser tab",
|
|
67211
|
+
retryable: false,
|
|
67212
|
+
data: { refused: "rights", rights: "asks" }
|
|
67213
|
+
});
|
|
67214
|
+
}
|
|
67215
|
+
if (origin === null || !DEV_TAB_ORIGINS.has(origin)) {
|
|
67216
|
+
console.error(`[agent-host] refused "host.trustDevTab" (${who}): non-dev origin`);
|
|
67217
|
+
return this.sendError(ws2, id3, {
|
|
67218
|
+
code: "internal",
|
|
67219
|
+
message: "host.trustDevTab is only allowed from a local dev browser origin (127.0.0.1 or localhost on port 5173 or 5174)",
|
|
67220
|
+
retryable: false,
|
|
67221
|
+
data: { refused: "rights", rights: "asks" }
|
|
67222
|
+
});
|
|
67223
|
+
}
|
|
67224
|
+
const parsed = RpcMethods["host.trustDevTab"].params.safeParse(params);
|
|
67225
|
+
if (!parsed.success) {
|
|
67226
|
+
console.error(`[agent-host] refused "host.trustDevTab" (${who}): invalid params`);
|
|
67227
|
+
return this.sendError(ws2, id3, {
|
|
67228
|
+
code: "internal",
|
|
67229
|
+
message: `host.trustDevTab was not done: ${parsed.error.issues[0]?.message ?? "invalid parameters"}.`,
|
|
67230
|
+
retryable: false,
|
|
67231
|
+
data: { refused: "not_done" }
|
|
67232
|
+
});
|
|
67233
|
+
}
|
|
67234
|
+
if (trustedDev) {
|
|
67235
|
+
this.sendTo(ws2, JSON.stringify({ kind: "res", id: id3, ok: true, result: { ok: true } }));
|
|
67236
|
+
return;
|
|
67237
|
+
}
|
|
67238
|
+
if (trustingDev) {
|
|
67239
|
+
console.error(`[agent-host] refused "host.trustDevTab" (${who}): already waiting`);
|
|
67240
|
+
return this.sendError(ws2, id3, {
|
|
67241
|
+
code: "internal",
|
|
67242
|
+
message: "A trust request for this dev browser tab is already waiting in the Centralu window",
|
|
67243
|
+
retryable: false,
|
|
67244
|
+
data: { refused: "not_done" }
|
|
67245
|
+
});
|
|
67246
|
+
}
|
|
67247
|
+
if (!this.opts.onAsk) {
|
|
67248
|
+
console.error(`[agent-host] refused "host.trustDevTab" (${who}): no host-request handler`);
|
|
67249
|
+
const refusal3 = limitedRefusal(method, params, this.opts.rightsHost ?? null);
|
|
67250
|
+
return this.sendError(ws2, id3, {
|
|
67251
|
+
code: "internal",
|
|
67252
|
+
message: refusal3?.message ?? "host.trustDevTab requires the Centralu window",
|
|
67253
|
+
retryable: false,
|
|
67254
|
+
data: { refused: "rights", rights: refusal3?.rights ?? "asks" }
|
|
67255
|
+
});
|
|
67256
|
+
}
|
|
67257
|
+
trustingDev = true;
|
|
67258
|
+
try {
|
|
67259
|
+
const result = await this.opts.onAsk(method, parsed.data, { client: label, origin }, leaving.signal);
|
|
67260
|
+
if (!leaving.signal.aborted) {
|
|
67261
|
+
trustedDev = true;
|
|
67262
|
+
console.error(`[agent-host] trusted dev tab for human message attribution (${who})`);
|
|
67263
|
+
}
|
|
67264
|
+
this.sendTo(ws2, JSON.stringify({ kind: "res", id: id3, ok: true, result }));
|
|
67265
|
+
} catch (err) {
|
|
67266
|
+
const data = err !== null && typeof err === "object" && "data" in err ? err.data : void 0;
|
|
67267
|
+
this.sendError(ws2, id3, { code: "internal", message: errorMessage(err), retryable: err instanceof DrainCut, ...data !== void 0 ? { data } : {} });
|
|
67268
|
+
} finally {
|
|
67269
|
+
trustingDev = false;
|
|
67270
|
+
}
|
|
67271
|
+
return;
|
|
67272
|
+
}
|
|
67165
67273
|
const refusal2 = limitedRefusal(method, params, this.opts.rightsHost ?? null);
|
|
67166
67274
|
if (refusal2?.rights === "asks" && this.opts.onAsk) {
|
|
67167
67275
|
try {
|
|
67168
|
-
const result = await this.opts.onAsk(
|
|
67276
|
+
const result = await this.opts.onAsk(
|
|
67277
|
+
method,
|
|
67278
|
+
params,
|
|
67279
|
+
{ client: label, ...session2 ? { session: session2 } : {}, ...trustedDev ? { trustedDev: true } : {} },
|
|
67280
|
+
leaving.signal
|
|
67281
|
+
);
|
|
67169
67282
|
this.sendTo(ws2, JSON.stringify({ kind: "res", id: id3, ok: true, result }));
|
|
67170
67283
|
} catch (err) {
|
|
67171
67284
|
const data = err !== null && typeof err === "object" && "data" in err ? err.data : void 0;
|
|
@@ -67180,7 +67293,15 @@ var HostServer = class _HostServer {
|
|
|
67180
67293
|
}
|
|
67181
67294
|
try {
|
|
67182
67295
|
const covered = limited && conditionalRight(method);
|
|
67183
|
-
const run2 = () => this.opts.onRpc(method, params, {
|
|
67296
|
+
const run2 = () => this.opts.onRpc(method, params, {
|
|
67297
|
+
client,
|
|
67298
|
+
rights: limited ? "limited" : "full",
|
|
67299
|
+
label,
|
|
67300
|
+
...covered ? { covered: true } : {},
|
|
67301
|
+
...session2 ? { session: session2 } : {},
|
|
67302
|
+
...trustedDev ? { trustedDev: true } : {},
|
|
67303
|
+
...this.showing.has(ws2) ? { window: true } : {}
|
|
67304
|
+
});
|
|
67184
67305
|
const result = await (this.opts.drain ? this.opts.drain.track(`rpc ${method}`, run2) : run2());
|
|
67185
67306
|
this.sendTo(ws2, JSON.stringify({ kind: "res", id: id3, ok: true, result }));
|
|
67186
67307
|
} catch (err) {
|
|
@@ -67300,7 +67421,7 @@ var HostServer = class _HostServer {
|
|
|
67300
67421
|
this.calls.delete(ws2);
|
|
67301
67422
|
for (const call2 of [...pending.values()]) call2.reject(rpcError(why2, "internal", { retryable: false }));
|
|
67302
67423
|
}
|
|
67303
|
-
helloOk(resyncRequired) {
|
|
67424
|
+
helloOk(resyncRequired, limited = false) {
|
|
67304
67425
|
return JSON.stringify({
|
|
67305
67426
|
kind: "hello_ok",
|
|
67306
67427
|
protocolVersion: PROTOCOL_VERSION,
|
|
@@ -67311,7 +67432,8 @@ var HostServer = class _HostServer {
|
|
|
67311
67432
|
...elevatedField(this.opts.elevated?.()),
|
|
67312
67433
|
...this.opts.logon?.() ? { logon: this.opts.logon() } : {},
|
|
67313
67434
|
...this.opts.handover?.() ? { handover: this.opts.handover() } : {},
|
|
67314
|
-
...this.opts.updateContinued ? { updateContinued: this.opts.updateContinued() } : {}
|
|
67435
|
+
...this.opts.updateContinued ? { updateContinued: this.opts.updateContinued() } : {},
|
|
67436
|
+
...limited ? { rights: "limited" } : {}
|
|
67315
67437
|
});
|
|
67316
67438
|
}
|
|
67317
67439
|
/**
|
|
@@ -67321,17 +67443,17 @@ var HostServer = class _HostServer {
|
|
|
67321
67443
|
* cursor where it was, and the next reconnect would ask for the same oversized window, a loop that never converges (the
|
|
67322
67444
|
* livelock of #91; measured: a 2,000 x 50 kB history replayed to a stalled peer left 99.6 MB buffered)
|
|
67323
67445
|
*/
|
|
67324
|
-
greet(ws2, afterSeq, streamEpoch) {
|
|
67446
|
+
greet(ws2, afterSeq, streamEpoch, limited) {
|
|
67325
67447
|
const window2 = this.log.since(afterSeq, streamEpoch);
|
|
67326
67448
|
const hub = this.hubLinks.has(ws2);
|
|
67327
67449
|
const frames = window2.events.filter((e) => hub || e.event.type !== "host_credential_used").map((e) => JSON.stringify({ kind: "event", seq: e.seq, event: e.event }));
|
|
67328
|
-
let bytes2 = ws2.bufferedAmount + wireBytes(this.helloOk(window2.resyncRequired));
|
|
67450
|
+
let bytes2 = ws2.bufferedAmount + wireBytes(this.helloOk(window2.resyncRequired, limited));
|
|
67329
67451
|
for (const f of frames) bytes2 += wireBytes(f);
|
|
67330
67452
|
if (bytes2 > this.limits.replayBudgetBytes) {
|
|
67331
|
-
this.sendTo(ws2, this.helloOk(true));
|
|
67453
|
+
this.sendTo(ws2, this.helloOk(true, limited));
|
|
67332
67454
|
return;
|
|
67333
67455
|
}
|
|
67334
|
-
this.sendTo(ws2, this.helloOk(window2.resyncRequired));
|
|
67456
|
+
this.sendTo(ws2, this.helloOk(window2.resyncRequired, limited));
|
|
67335
67457
|
for (const f of frames) this.sendTo(ws2, f);
|
|
67336
67458
|
}
|
|
67337
67459
|
sendError(ws2, id3, error51) {
|
|
@@ -128520,20 +128642,20 @@ function notOwnFolder(facts, uid) {
|
|
|
128520
128642
|
}
|
|
128521
128643
|
async function browserFolder(home, platform = HOST_PLATFORM, places = {}, session2) {
|
|
128522
128644
|
const node = places.node ?? process.execPath;
|
|
128523
|
-
const
|
|
128524
|
-
const nodeBad = platform === "win32" ? unusableIn(node,
|
|
128645
|
+
const sep14 = platform === "win32" ? ";" : ":";
|
|
128646
|
+
const nodeBad = platform === "win32" ? unusableIn(node, sep14) : "";
|
|
128525
128647
|
if (nodeBad) return noHelper(`the Node program Centralu runs on is at ${node}, and Antigravity cannot be given a path with ${nodeBad} in it. Install Centralu (or that Node) in a folder whose path has none.`);
|
|
128526
128648
|
await mkdir5(home.root, { recursive: true });
|
|
128527
128649
|
await removeStale(home.root, ".sign-in-");
|
|
128528
128650
|
let dir = resolve13(await mkdtemp3(join34(home.root, `.sign-in-${ownerTag()}-`)));
|
|
128529
|
-
const dataBad = unusableIn(dir,
|
|
128651
|
+
const dataBad = unusableIn(dir, sep14);
|
|
128530
128652
|
if (dataBad) {
|
|
128531
128653
|
await realOs().files.promises.rm(dir, { recursive: true, force: true }).catch(() => {
|
|
128532
128654
|
});
|
|
128533
128655
|
const spare = resolve13(places.spare ?? spareFolder(platform));
|
|
128534
128656
|
const data = `Centralu's data folder is at ${home.root}, and Antigravity cannot be given a path with ${dataBad} in it`;
|
|
128535
128657
|
const move = "Move the data folder to a path without them.";
|
|
128536
|
-
const spareBad = unusableIn(join34(spare, ".sign-in-x"),
|
|
128658
|
+
const spareBad = unusableIn(join34(spare, ".sign-in-x"), sep14);
|
|
128537
128659
|
if (spareBad) return noHelper(`${data}; nor ${spareBad} in ${spare}, the folder Centralu tries instead. ${move}`);
|
|
128538
128660
|
try {
|
|
128539
128661
|
await mkdir5(spare, { recursive: true, mode: 448 });
|
|
@@ -128571,7 +128693,7 @@ exit 0
|
|
|
128571
128693
|
if (browser === "") {
|
|
128572
128694
|
await realOs().files.promises.rm(dir, { recursive: true, force: true }).catch(() => {
|
|
128573
128695
|
});
|
|
128574
|
-
return noHelper(`the helper's folder ${dir} has a path Antigravity cannot be given (it holds ${unusableIn(dir,
|
|
128696
|
+
return noHelper(`the helper's folder ${dir} has a path Antigravity cannot be given (it holds ${unusableIn(dir, sep14)}).`);
|
|
128575
128697
|
}
|
|
128576
128698
|
if (temp) {
|
|
128577
128699
|
try {
|
|
@@ -132598,7 +132720,7 @@ var IDENT = /^[A-Za-z_$][\w$]*$/;
|
|
|
132598
132720
|
function stripComments(text3) {
|
|
132599
132721
|
return text3.replace(/\/\*[\s\S]*?\*\//g, "").replace(/^\s*\/\/.*$/gm, "");
|
|
132600
132722
|
}
|
|
132601
|
-
function splitTop(text3,
|
|
132723
|
+
function splitTop(text3, sep14) {
|
|
132602
132724
|
const parts = [];
|
|
132603
132725
|
let depth = 0;
|
|
132604
132726
|
let quote = "";
|
|
@@ -132613,7 +132735,7 @@ function splitTop(text3, sep13) {
|
|
|
132613
132735
|
if (c === "'" || c === '"' || c === "`") quote = c;
|
|
132614
132736
|
else if ("{[(<".includes(c)) depth++;
|
|
132615
132737
|
else if ("}])>".includes(c) && !(c === ">" && text3[i - 1] === "=")) depth--;
|
|
132616
|
-
else if (c ===
|
|
132738
|
+
else if (c === sep14 && depth === 0) {
|
|
132617
132739
|
parts.push(text3.slice(start3, i));
|
|
132618
132740
|
start3 = i + 1;
|
|
132619
132741
|
}
|
|
@@ -145915,6 +146037,9 @@ var HostCards = class {
|
|
|
145915
146037
|
}
|
|
145916
146038
|
};
|
|
145917
146039
|
|
|
146040
|
+
// packages/agent-host/src/sessions/session-record.ts
|
|
146041
|
+
import { sep as sep12 } from "node:path";
|
|
146042
|
+
|
|
145918
146043
|
// packages/agent-host/src/dev-services/message-image.ts
|
|
145919
146044
|
import { constants as constants8 } from "node:fs";
|
|
145920
146045
|
import { open as open5, realpath as realpath11 } from "node:fs/promises";
|
|
@@ -145932,12 +146057,23 @@ function sniffImage2(b2) {
|
|
|
145932
146057
|
return null;
|
|
145933
146058
|
}
|
|
145934
146059
|
function writtenForms(written) {
|
|
145935
|
-
|
|
146060
|
+
const forms = /* @__PURE__ */ new Set([written]);
|
|
145936
146061
|
try {
|
|
145937
|
-
|
|
146062
|
+
forms.add(encodeURI(written));
|
|
145938
146063
|
} catch {
|
|
145939
146064
|
}
|
|
145940
|
-
|
|
146065
|
+
if (/^file:/i.test(written)) {
|
|
146066
|
+
try {
|
|
146067
|
+
forms.add(decodeURI(written));
|
|
146068
|
+
} catch {
|
|
146069
|
+
}
|
|
146070
|
+
}
|
|
146071
|
+
for (const form of [...forms]) {
|
|
146072
|
+
if (form.includes("(") || form.includes(")")) {
|
|
146073
|
+
forms.add(form.replace(/\(/g, "%28").replace(/\)/g, "%29"));
|
|
146074
|
+
}
|
|
146075
|
+
}
|
|
146076
|
+
return [...forms];
|
|
145941
146077
|
}
|
|
145942
146078
|
var BEFORE = /[\s(<"'`]/;
|
|
145943
146079
|
var AFTER2 = /[\s)>"'`]/;
|
|
@@ -146015,6 +146151,44 @@ async function readMessageImage(abs, max = IMAGE_PREVIEW_MAX_BYTES) {
|
|
|
146015
146151
|
await handle2.close();
|
|
146016
146152
|
}
|
|
146017
146153
|
}
|
|
146154
|
+
function stripFileLocation(written) {
|
|
146155
|
+
if (/^file:/i.test(written)) {
|
|
146156
|
+
const hashAt = written.indexOf("#");
|
|
146157
|
+
const base2 = hashAt >= 0 ? written.slice(0, hashAt) : written;
|
|
146158
|
+
const stripped2 = base2.replace(/:\d+(?::\d+)?$/, "");
|
|
146159
|
+
if (!stripped2 || stripped2 === base2 || /^file:\/\/(?:\/|localhost\/)[A-Za-z]:?$/i.test(stripped2)) return null;
|
|
146160
|
+
return stripped2;
|
|
146161
|
+
}
|
|
146162
|
+
if (/^[A-Za-z]:\d+(?::\d+)?$/.test(written)) return null;
|
|
146163
|
+
const stripped = written.replace(/(?:#L\d+(?:C\d+)?(?:-L?\d+(?:C\d+)?)?|:\d+(?::\d+)?)$/i, "");
|
|
146164
|
+
if (!stripped || stripped === written || /^[A-Za-z]:$/.test(stripped) || stripped === "~") return null;
|
|
146165
|
+
return stripped;
|
|
146166
|
+
}
|
|
146167
|
+
async function resolveMessageFile(abs) {
|
|
146168
|
+
const windows3 = sep11 === "\\";
|
|
146169
|
+
if (windows3) {
|
|
146170
|
+
const walk2 = await walkLinks(abs);
|
|
146171
|
+
if (!walk2.ok && walk2.reason === "elsewhere") {
|
|
146172
|
+
return { ok: false, reason: "not_found", message: `${abs} leads to ${walk2.why}, which is not on this machine` };
|
|
146173
|
+
}
|
|
146174
|
+
if (!walk2.ok) return { ok: false, reason: "unreadable", message: `Centralu cannot check where ${abs} leads: ${walk2.why}` };
|
|
146175
|
+
}
|
|
146176
|
+
let file2;
|
|
146177
|
+
try {
|
|
146178
|
+
file2 = await realpath11(abs);
|
|
146179
|
+
} catch (e) {
|
|
146180
|
+
const code2 = errnoCode(e);
|
|
146181
|
+
if (code2 === "EACCES" || code2 === "EPERM") return { ok: false, reason: "unreadable", message: `Centralu may not inspect ${abs}` };
|
|
146182
|
+
return { ok: false, reason: "not_found", message: `There is no file or folder at ${abs}` };
|
|
146183
|
+
}
|
|
146184
|
+
if (windows3 && !DRIVE_PATH.test(file2)) {
|
|
146185
|
+
return { ok: false, reason: "not_found", message: `${abs} leads to ${file2}, which is not on this machine` };
|
|
146186
|
+
}
|
|
146187
|
+
if (file2 === "/" || /^[A-Za-z]:[\\/]?$/.test(file2)) {
|
|
146188
|
+
return { ok: false, reason: "unreadable", message: `${file2} is a root folder and cannot be revealed` };
|
|
146189
|
+
}
|
|
146190
|
+
return { ok: true, file: file2 };
|
|
146191
|
+
}
|
|
146018
146192
|
|
|
146019
146193
|
// packages/agent-host/src/dev-services/attachments.ts
|
|
146020
146194
|
import { lstat as lstat12, mkdir as mkdir8, readdir as readdir14, writeFile as writeFile6 } from "node:fs/promises";
|
|
@@ -146294,9 +146468,34 @@ var SessionRecord = class {
|
|
|
146294
146468
|
if (!this.repliesName(sessionId, written)) {
|
|
146295
146469
|
return { ok: false, reason: "not_mentioned", message: "No reply in this session names this path, so it is not read" };
|
|
146296
146470
|
}
|
|
146297
|
-
const
|
|
146471
|
+
const cwd = this.host.cwdFor(m);
|
|
146472
|
+
const abs = resolveWrittenPath(written, cwd);
|
|
146473
|
+
if (abs === null) return { ok: false, reason: "not_found", message: `${written} is not a path on this machine` };
|
|
146474
|
+
const first = await readMessageImage(abs);
|
|
146475
|
+
if (first.ok || !shouldRetryWithoutLocation(written, first.reason)) return first;
|
|
146476
|
+
const stripped = stripFileLocation(written);
|
|
146477
|
+
if (!stripped) return first;
|
|
146478
|
+
const fallbackAbs = resolveWrittenPath(stripped, cwd);
|
|
146479
|
+
return fallbackAbs === null ? first : readMessageImage(fallbackAbs);
|
|
146480
|
+
}
|
|
146481
|
+
/**
|
|
146482
|
+
* Resolves a local file or folder one of this session's replies linked (`messages.resolveFile`).
|
|
146483
|
+
* Checks `repliesName` before touching disk so unmentioned paths learn nothing about existence.
|
|
146484
|
+
*/
|
|
146485
|
+
async messageFile(sessionId, written) {
|
|
146486
|
+
const m = this.host.sessionOf(sessionId);
|
|
146487
|
+
if (!this.repliesName(sessionId, written)) {
|
|
146488
|
+
return { ok: false, reason: "not_mentioned", message: "No reply in this session names this path, so it is not opened" };
|
|
146489
|
+
}
|
|
146490
|
+
const cwd = this.host.cwdFor(m);
|
|
146491
|
+
const abs = resolveWrittenPath(written, cwd);
|
|
146298
146492
|
if (abs === null) return { ok: false, reason: "not_found", message: `${written} is not a path on this machine` };
|
|
146299
|
-
|
|
146493
|
+
const first = await resolveMessageFile(abs);
|
|
146494
|
+
if (first.ok || !shouldRetryWithoutLocation(written, first.reason)) return first;
|
|
146495
|
+
const stripped = stripFileLocation(written);
|
|
146496
|
+
if (!stripped) return first;
|
|
146497
|
+
const fallbackAbs = resolveWrittenPath(stripped, cwd);
|
|
146498
|
+
return fallbackAbs === null ? first : resolveMessageFile(fallbackAbs);
|
|
146300
146499
|
}
|
|
146301
146500
|
repliesName(sessionId, written) {
|
|
146302
146501
|
const open6 = this.streams.get(sessionId);
|
|
@@ -146346,6 +146545,10 @@ var SessionRecord = class {
|
|
|
146346
146545
|
);
|
|
146347
146546
|
}
|
|
146348
146547
|
};
|
|
146548
|
+
function shouldRetryWithoutLocation(written, reason) {
|
|
146549
|
+
if (reason === "not_found") return true;
|
|
146550
|
+
return sep12 === "\\" && reason === "unreadable" && /:\d+(?::\d+)?(?:#.*)?$/.test(written);
|
|
146551
|
+
}
|
|
146349
146552
|
|
|
146350
146553
|
// packages/agent-host/src/sessions/tool-queries.ts
|
|
146351
146554
|
var MODEL_LIST_READ_MS = 6e4;
|
|
@@ -154683,7 +154886,7 @@ function createRpcHandler(mgr2, adapters2, { settleDeletedProjects, deleteOutloo
|
|
|
154683
154886
|
if (!r.ok) throw rpcError(r.error ?? "unknown skill");
|
|
154684
154887
|
return { ok: true };
|
|
154685
154888
|
};
|
|
154686
|
-
const scriptAuthor = (_call, ctx) => ctx?.rights === "limited" ? { credential: scriptLabel(ctx.label) } : void 0;
|
|
154889
|
+
const scriptAuthor = (_call, ctx) => ctx?.rights === "limited" && !ctx.trustedDev ? { credential: scriptLabel(ctx.label) } : void 0;
|
|
154687
154890
|
const builderDeps = (call2, ctx) => {
|
|
154688
154891
|
const fromScript = scriptAuthor(call2, ctx);
|
|
154689
154892
|
return { apps: requireExternalApps(), views: views2, builderOf: (ref) => mgr2.appSessions.builderOf(ref), send: (id3, t, a) => mgr2.inputs.send(id3, t, a, void 0, false, fromScript), byScript: fromScript !== void 0 };
|
|
@@ -155078,6 +155281,9 @@ function createRpcHandler(mgr2, adapters2, { settleDeletedProjects, deleteOutloo
|
|
|
155078
155281
|
"messages.image": async ({ sessionId, path: path2 }) => {
|
|
155079
155282
|
return mgr2.record.messageImage(sessionId, path2);
|
|
155080
155283
|
},
|
|
155284
|
+
"messages.resolveFile": async ({ sessionId, path: path2 }) => {
|
|
155285
|
+
return mgr2.record.messageFile(sessionId, path2);
|
|
155286
|
+
},
|
|
155081
155287
|
"messages.subagent": async ({ sessionId, parentCallId, afterSeq, limit }) => {
|
|
155082
155288
|
return mgr2.record.loadSubagentMessages(sessionId, parentCallId, afterSeq, limit);
|
|
155083
155289
|
},
|
|
@@ -155321,7 +155527,8 @@ function createRpcHandler(mgr2, adapters2, { settleDeletedProjects, deleteOutloo
|
|
|
155321
155527
|
return {};
|
|
155322
155528
|
},
|
|
155323
155529
|
"host.handover": async ({ handover: h }) => ack(handover2?.(h)),
|
|
155324
|
-
"host.systemEnding": async ({ cancelled: cancelled2 }) => ack(systemEnding2?.(cancelled2 === true))
|
|
155530
|
+
"host.systemEnding": async ({ cancelled: cancelled2 }) => ack(systemEnding2?.(cancelled2 === true)),
|
|
155531
|
+
"host.trustDevTab": async (_p2) => ({ ok: true })
|
|
155325
155532
|
};
|
|
155326
155533
|
const routes = { ...raw, ...handlers };
|
|
155327
155534
|
return async (method, params, ctx) => {
|
|
@@ -157083,6 +157290,8 @@ var HostRequests = class {
|
|
|
157083
157290
|
if (early) throw unanswered(method, early);
|
|
157084
157291
|
const p = fields3(params);
|
|
157085
157292
|
switch (method) {
|
|
157293
|
+
case "host.trustDevTab":
|
|
157294
|
+
return this.trustDevTab(params, from, signal);
|
|
157086
157295
|
case "trash.purge":
|
|
157087
157296
|
return this.viaTrash(method, from, signal, { action: "delete", sessionId: str5(p.sessionId), what: "session" }, () => ({ ok: true }));
|
|
157088
157297
|
case "trash.purgeSubagentSteps":
|
|
@@ -157093,6 +157302,21 @@ var HostRequests = class {
|
|
|
157093
157302
|
return this.generic(method, params, from, signal);
|
|
157094
157303
|
}
|
|
157095
157304
|
}
|
|
157305
|
+
/**
|
|
157306
|
+
* A local `dev:live` browser tab asking to attribute messages on its single open WebSocket as typed by the person
|
|
157307
|
+
* rather than as a script. The card displays the reported `Origin` header and the tab's 6-char pairing code — the code
|
|
157308
|
+
* match in the desktop window is the security boundary (local processes can spoof `Origin`). Never grants full/window rights.
|
|
157309
|
+
*/
|
|
157310
|
+
async trustDevTab(params, from, signal) {
|
|
157311
|
+
const runs = asItRuns("host.trustDevTab", params);
|
|
157312
|
+
if (!runs.ok) throw refused("not_done", `host.trustDevTab was not done: ${runs.why}.`);
|
|
157313
|
+
if (!from.origin) throw refused("not_done", "host.trustDevTab was not done: no dev browser origin was provided.");
|
|
157314
|
+
const code2 = str5(fields3(runs.params).code);
|
|
157315
|
+
const question = `Trust the dev browser tab at ${plainQuoted(from.origin, 120)} (code ${code2}) to send messages as you? Messages from this open tab (including to linked machines) will be recorded as typed by you rather than as a script until the tab reloads or disconnects. It stays on the limited credential: approvals, deletions, mail, and security settings still require the Centralu desktop window. Allow only if you clicked Trust this tab and see the same code there.`;
|
|
157316
|
+
const answer = await this.card("host.trustDevTab", question, from, signal);
|
|
157317
|
+
if (answer.decision !== "allow") throw unanswered("host.trustDevTab", answer.outcome);
|
|
157318
|
+
return { ok: true };
|
|
157319
|
+
}
|
|
157096
157320
|
/**
|
|
157097
157321
|
* Any other method's card (host-request-targets.ts): the call as its schema parses it is what the card shows and what runs,
|
|
157098
157322
|
* with what it acts on by name and what it loses. After Allow the names are read again, and a call whose target changed
|
|
@@ -157114,7 +157338,7 @@ var HostRequests = class {
|
|
|
157114
157338
|
if (!now.ok || now.text !== targets.text) {
|
|
157115
157339
|
throw refused("not_done", `${method} was not done: what its card named changed while it stood (${now.ok ? `now ${now.text}` : now.why}).`);
|
|
157116
157340
|
}
|
|
157117
|
-
return this.deps.rpc(method, runs.params, { client: -1, rights: "limited", label: from.client });
|
|
157341
|
+
return this.deps.rpc(method, runs.params, { client: -1, rights: "limited", label: from.client, ...from.trustedDev ? { trustedDev: true } : {} });
|
|
157118
157342
|
}
|
|
157119
157343
|
/** The requests waiting, oldest first */
|
|
157120
157344
|
list() {
|
|
@@ -159214,7 +159438,7 @@ function probeTarget(target, opts = {}) {
|
|
|
159214
159438
|
// packages/agent-host/src/links/ssh-config.ts
|
|
159215
159439
|
import { readdirSync as readdirSync18, readFileSync as readFileSync27, statSync as statSync18 } from "node:fs";
|
|
159216
159440
|
import { homedir as homedir17 } from "node:os";
|
|
159217
|
-
import { isAbsolute as isAbsolute10, join as join56, normalize, parse as parse5, sep as
|
|
159441
|
+
import { isAbsolute as isAbsolute10, join as join56, normalize, parse as parse5, sep as sep13 } from "node:path";
|
|
159218
159442
|
var MAX_DEPTH = 16;
|
|
159219
159443
|
function splitConfigLine(raw) {
|
|
159220
159444
|
const m = /^\s*([^\s=#]+)\s*(?:=\s*)?([\s\S]*)$/.exec(raw);
|
|
@@ -159275,7 +159499,7 @@ function expandGlob(path2) {
|
|
|
159275
159499
|
const norm = normalize(path2);
|
|
159276
159500
|
const root3 = parse5(norm).root;
|
|
159277
159501
|
let found = [root3 || "."];
|
|
159278
|
-
for (const seg of norm.slice(root3.length).split(
|
|
159502
|
+
for (const seg of norm.slice(root3.length).split(sep13)) {
|
|
159279
159503
|
if (seg === "") continue;
|
|
159280
159504
|
const next = [];
|
|
159281
159505
|
for (const base2 of found) {
|
|
@@ -159306,7 +159530,7 @@ function expandGlob(path2) {
|
|
|
159306
159530
|
});
|
|
159307
159531
|
}
|
|
159308
159532
|
function tildePath(path2, home) {
|
|
159309
|
-
return path2 === home ? "~" : path2.startsWith(home +
|
|
159533
|
+
return path2 === home ? "~" : path2.startsWith(home + sep13) ? `~${path2.slice(home.length)}` : path2;
|
|
159310
159534
|
}
|
|
159311
159535
|
function readSshConfig(opts) {
|
|
159312
159536
|
const hosts = [];
|
|
@@ -162783,6 +163007,16 @@ var ROUTES = {
|
|
|
162783
163007
|
const { file: _file2, ...rest } = r;
|
|
162784
163008
|
return rest;
|
|
162785
163009
|
}),
|
|
163010
|
+
// A file on a linked machine cannot be revealed in this computer's file manager — refuse locally without forwarding
|
|
163011
|
+
"messages.resolveFile": {
|
|
163012
|
+
kind: "noRemote",
|
|
163013
|
+
key: "sessionId",
|
|
163014
|
+
refuse: () => ({
|
|
163015
|
+
ok: false,
|
|
163016
|
+
reason: "not_found",
|
|
163017
|
+
message: "This file is on another machine and cannot be revealed here"
|
|
163018
|
+
})
|
|
163019
|
+
},
|
|
162786
163020
|
"trash.read": session(messages),
|
|
162787
163021
|
"trash.restore": session(fields4({ session: sessionInfo, project: projectInfo })),
|
|
162788
163022
|
"trash.purge": session(),
|
|
@@ -163003,6 +163237,8 @@ var ROUTES = {
|
|
|
163003
163237
|
"host.handover": HUB,
|
|
163004
163238
|
// The window of this machine telling its own host the system is ending (#1970); never through a link
|
|
163005
163239
|
"host.systemEnding": HUB,
|
|
163240
|
+
// A local dev:live browser tab asking its own host for human message attribution; never through a link
|
|
163241
|
+
"host.trustDevTab": HUB,
|
|
163006
163242
|
"machines.acceptVersions": HUB,
|
|
163007
163243
|
"machines.install": HUB,
|
|
163008
163244
|
"machines.update": HUB,
|
|
@@ -163103,7 +163339,10 @@ var Router = class {
|
|
|
163103
163339
|
case "view":
|
|
163104
163340
|
return this.byView(method, params, route, ctx);
|
|
163105
163341
|
case "noRemote": {
|
|
163106
|
-
if (this.owner(isObj(params) ? params[route.key] : void 0))
|
|
163342
|
+
if (this.owner(isObj(params) ? params[route.key] : void 0)) {
|
|
163343
|
+
if (route.refuse) return route.refuse();
|
|
163344
|
+
throw new NotOnRemoteError(method);
|
|
163345
|
+
}
|
|
163107
163346
|
return this.opts.local(method, params, ctx);
|
|
163108
163347
|
}
|
|
163109
163348
|
case "machine":
|
|
@@ -163124,7 +163363,7 @@ var Router = class {
|
|
|
163124
163363
|
return typeof id3 === "string" ? findMachine(this.opts.machines(), id3) : null;
|
|
163125
163364
|
}
|
|
163126
163365
|
async forward(m, method, params, ctx) {
|
|
163127
|
-
if (ctx?.rights === "limited" && SCRIPT_TEXT.has(method)) {
|
|
163366
|
+
if (ctx?.rights === "limited" && !ctx.trustedDev && SCRIPT_TEXT.has(method)) {
|
|
163128
163367
|
throw rpcError(`A script's message is not sent to ${m.name}: Centralu there would store it as the person's. Run the script on ${m.name} instead.`);
|
|
163129
163368
|
}
|
|
163130
163369
|
if (!m.reachable && ctx === void 0) await m.reachForCall?.();
|
|
@@ -164309,7 +164548,7 @@ var handedToken = launch.tokenOnStdin ? await readHandedToken(process.stdin).cat
|
|
|
164309
164548
|
console.error(`[agent-host] the launcher did not hand over the token: ${e.message}`);
|
|
164310
164549
|
process.exit(1);
|
|
164311
164550
|
}) : launch.token;
|
|
164312
|
-
var BUILD = true ? "
|
|
164551
|
+
var BUILD = true ? "9684dfb" : "dev";
|
|
164313
164552
|
var { values } = parseArgs({
|
|
164314
164553
|
options: {
|
|
164315
164554
|
port: { type: "string", default: "5175" },
|