@centralu/host-win32-x64 0.1.0-beta.64 → 0.1.0-beta.65

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.
@@ -51,11 +51,13 @@ screen (`ui/index.html`) and agents call the same tools as functions. Same tools
51
51
  `process.stdout` yourself. stderr is shown to the person when the app fails.
52
52
  10. **Asking the agent**: inside a tool handler, `await centralu.agent('prompt', { schema, tool })`
53
53
  asks the agent of the person using Centralu. Each call runs in a new session under this app
54
- (the person can read it), with the `safe` approval setting, and returns the agent's final
55
- answer: text, or with `schema` (a JSON Schema whose top level is an object) JSON of that shape,
56
- checked by Centralu. Under `safe` the agent reads without asking, but every file write and
57
- command waits for the person to approve it in that session, so ask the agent for an answer and
58
- do the writing in your own tool code. Declare `"uses": { "agent": true }` in the manifest for the person's
54
+ (the person can read it) and returns the agent's final answer: text, or with `schema` (a JSON
55
+ Schema whose top level is an object) JSON of that shape, checked by Centralu. That session runs
56
+ under `auto`, but never above the lowest approval setting among the sessions calling into the
57
+ app. It runs under `safe` when nothing says who asked: no call is open, the calling session is
58
+ gone, or the chain of calls can no longer be followed. Under `safe` the agent reads without
59
+ asking, but every file write and command waits for the person to approve it in that session, so
60
+ ask the agent for an answer and do the writing in your own tool code. Declare `"uses": { "agent": true }` in the manifest for the person's
59
61
  default agent, or a list such as `["codex"]` to pick one with `tool`. The prompt reaches the
60
62
  agent marked as written by this app, not by the person, so say plainly what you need. A run
61
63
  takes seconds to minutes; the helper keeps the call alive while it waits. An app runs one agent
@@ -73,11 +75,12 @@ screen (`ui/index.html`) and agents call the same tools as functions. Same tools
73
75
  (the names shown in the sidebar and their states, never the conversations); `git.status` gives this project's branch and changed
74
76
  files (project apps only).
75
77
 
76
- All three throw an error that says what Centralu answered. The first time the app uses each of them (an
77
- agent tool, another app, a host name), Centralu asks the person once — on the session's approval card
78
- when an agent's call started it, on this app's screen when the screen did — and remembers the answer
79
- until the manifest's `uses` changes. The call waits while the person decides (up to 5 minutes). A
80
- refusal comes back as that error: show it plainly instead of retrying.
78
+ All three throw an error that says what Centralu answered. What the manifest declares in `uses` runs
79
+ with no question: the person trusted the app with it. Only while a session under the `safe` preset has a
80
+ call open into the app does Centralu ask the person, once per capability (an agent tool, another app, a
81
+ host name) — on the session's approval card when an agent's call started it, on this app's screen when
82
+ the screen did — and the call waits while the person decides (up to 5 minutes). A refusal, then or
83
+ remembered from before, comes back as that error: show it plainly instead of retrying.
81
84
 
82
85
  **Background work.** Centralu stops an app with no open screen and no call for 5 minutes. An app
83
86
  with work on its own clock (a timer that polls, a queue it drives) declares it in the manifest,
@@ -1,11 +1,11 @@
1
1
  {
2
- "commit": "5ec3da6",
2
+ "commit": "d0e7c4b",
3
3
  "protocolVersion": 1,
4
4
  "hostProof": 1,
5
5
  "tokenOnStdin": 1,
6
6
  "verifiers": 1,
7
7
  "keyPairing": 1,
8
- "builtAt": "2026-11-13T11:46:05.729Z",
8
+ "builtAt": "2026-11-13T12:59:21.269Z",
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.64",
3
+ "version": "0.1.0-beta.65",
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.64",
42
- "@centralu/linux-arm64": "0.1.0-beta.64",
43
- "@centralu/linux-x64": "0.1.0-beta.64",
44
- "@centralu/win32-x64": "0.1.0-beta.64"
41
+ "@centralu/darwin-arm64": "0.1.0-beta.65",
42
+ "@centralu/linux-arm64": "0.1.0-beta.65",
43
+ "@centralu/linux-x64": "0.1.0-beta.65",
44
+ "@centralu/win32-x64": "0.1.0-beta.65"
45
45
  }
46
46
  }
package/host/main.mjs CHANGED
@@ -43046,7 +43046,7 @@ import { dirname as dirname27, join as join58 } from "node:path";
43046
43046
  import { mkdirSync as mkdirSync21, readFileSync as readFileSync27, writeSync as writeSync4 } from "node:fs";
43047
43047
 
43048
43048
  // packages/protocol/src/version.generated.ts
43049
- var APP_VERSION = "0.1.0-beta.64";
43049
+ var APP_VERSION = "0.1.0-beta.65";
43050
43050
 
43051
43051
  // packages/protocol/src/brand.ts
43052
43052
  var APP_NAME = "Centralu";
@@ -58505,6 +58505,10 @@ function usesLines(uses) {
58505
58505
  if (uses.notices) out.push("Post notices into the sessions that called it");
58506
58506
  return out;
58507
58507
  }
58508
+ function appCanLines(lines) {
58509
+ if (!lines.length) return ["Uses nothing beyond its own tools"];
58510
+ return lines.map((l) => `Can ${l.charAt(0).toLowerCase()}${l.slice(1)}`);
58511
+ }
58508
58512
  var HOST_DATA_WORDS = {
58509
58513
  "sessions.list": "the names and states of its project's sessions (sessions.list)",
58510
58514
  "git.status": "its project's branch and changed files (git.status)"
@@ -60888,7 +60892,7 @@ var appsParams = {
60888
60892
  }),
60889
60893
  /** The remembered capability answers for one app (M4 D-4) — shown next to the run history panel (B-7) and can be forgotten there */
60890
60894
  "apps.permissions": external_exports.object({ appId: AppId, projectId: ProjectId.nullable(), ...machineParam }),
60891
- /** Forgets one remembered answer (M4 D-4) — the next attempt to use that capability asks again */
60895
+ /** Forgets one remembered answer (M4 D-4): a forgotten allow makes a caller under `safe` ask again, a forgotten deny lets the app use that again (#2237) */
60892
60896
  "apps.forgetPermission": external_exports.object({
60893
60897
  appId: AppId,
60894
60898
  projectId: ProjectId.nullable(),
@@ -85491,7 +85495,7 @@ var RunAgentArgs = external_exports.object({
85491
85495
  schema: external_exports.record(external_exports.string(), external_exports.unknown()).optional()
85492
85496
  });
85493
85497
  function deniedText(tool, appName, text3) {
85494
- return `${tool} refused: the person did not allow ${appName} to ${text3}. They can change this in the app's Runs panel (Permissions \u2192 Forget), and Centralu asks again when the app's manifest changes what it uses.`;
85498
+ return `${tool} refused: the person did not allow ${appName} to ${text3}. They can change this in the app's Runs panel (Permissions \u2192 Forget).`;
85495
85499
  }
85496
85500
  var NOT_DECLARED = 'this app did not declare "uses": { "agent": \u2026 } in centralu.app.json \u2014 an app may run an agent only if its manifest says so';
85497
85501
  var say = (text3) => ({ status: "ok", result: { content: [{ type: "text", text: text3 }] } });
@@ -85807,15 +85811,20 @@ var BrokerDesk = class {
85807
85811
  return { status: "delegated", result: { content: [{ type: "text", text: `call_app: ${id3}.${tool} ${how} \u2014 ${o.error ?? "no reason was given"}` }], isError: true } };
85808
85812
  }
85809
85813
  /**
85810
- * Capability approval (D-4) — asks the person once, the **first** time a request past the
85811
- * declaration uses that capability. Returns the result to give the app if denied, or null if
85812
- * allowed.
85814
+ * Capability approval (D-4, #2237) — the one decision on a request past the declaration. Returns the
85815
+ * result to give the app if denied, or null if allowed. In this order:
85813
85816
  *
85814
- * The answer is remembered per (app, capability) — an allow and a deny alike. This is the promise
85815
- * that the person is never asked the same thing twice, and an answer pressed by mistake can be
85816
- * forgotten from the runs panel's list (`apps.forgetPermission`). If the manifest's `uses` changes,
85817
- * the fingerprint changes with it and the remembered answer is no longer used — the app's builder
85818
- * has restated what it uses, so the person looks at it again too.
85817
+ * 1. A remembered deny (or any word but `allow`) refuses, whatever `uses` it was given against: with
85818
+ * no card after it, a deny that lapsed on a manifest change would become an allow nobody gave. It
85819
+ * holds until forgotten.
85820
+ * 2. A remembered allow given against the current `uses` allows.
85821
+ * 3. Otherwise the request runs with no card and nothing remembered: the declaration is the consent,
85822
+ * read where it is enforced (an app runs only once the person trusted it with its `uses`), so
85823
+ * nothing is stored that could outlive it. Except:
85824
+ * 4. When the lowest preset among the calls open into the app is `safe` (`BrokerHost.asksPerson`),
85825
+ * the person is asked once per (app, capability), where the chain started, and the answer is
85826
+ * remembered with the `uses` fingerprint: a `safe` session never gains through an app what
85827
+ * `start_agent` would ask it for (#673, #606). A changed `uses` asks it again.
85819
85828
  *
85820
85829
  * The app's call stays alive while this waits (a progress notification over the broker conduit,
85821
85830
  * `broker.ts`). If the person never answers and the cap (5 minutes) passes, this closes as a
@@ -85830,9 +85839,11 @@ var BrokerDesk = class {
85830
85839
  this.apps.denied(call2.parentRunId, { app: app2.ref, name: app2.name, capability: key, text: text3 });
85831
85840
  return refuse2(deniedText(tool, app2.name, text3));
85832
85841
  };
85833
- if (known && known.stamp === stamp2) return known.decision === "allow" ? null : denied();
85842
+ if (known && known.decision !== "allow") return denied();
85843
+ if (known && known.stamp === stamp2) return null;
85834
85844
  const host = this.host;
85835
85845
  if (!host) return refuse2("the broker is unavailable: there is no one to ask for permission");
85846
+ if (!host.asksPerson(this.apps.agentCallers(app2.ref))) return null;
85836
85847
  const slot = `${appKeyOf(app2.ref)} ${key}`;
85837
85848
  let q2 = this.asking.get(slot);
85838
85849
  if (!q2) {
@@ -85892,12 +85903,12 @@ var BrokerDesk = class {
85892
85903
  }
85893
85904
  /**
85894
85905
  * The remembered answers for one app (D-4) — shown and forgettable in the runs panel. `current`
85895
- * means the answer was given against the same fingerprint as the manifest's current declaration; if
85896
- * not, that answer is no longer used (it is asked again).
85906
+ * means the answer is still used: a deny always (`permit` rule 1), an allow when it was given against
85907
+ * the manifest's current declaration (otherwise a `safe` caller is asked again).
85897
85908
  */
85898
85909
  permissions(ref, manifestUses) {
85899
85910
  const stamp2 = manifestUses === null ? null : usesStamp(manifestUses);
85900
- return this.book.list(ref).sort((a, b2) => b2.decidedAt - a.decidedAt).map((d2) => ({ capability: d2.capability, text: d2.text, decision: d2.decision, decidedAt: d2.decidedAt, current: d2.stamp === stamp2 }));
85911
+ return this.book.list(ref).sort((a, b2) => b2.decidedAt - a.decidedAt).map((d2) => ({ capability: d2.capability, text: d2.text, decision: d2.decision, decidedAt: d2.decidedAt, current: d2.decision !== "allow" || d2.stamp === stamp2 }));
85901
85912
  }
85902
85913
  forgetPermission(ref, capability) {
85903
85914
  this.book.forget(ref, capability);
@@ -104468,16 +104479,16 @@ var ExternalApps = class {
104468
104479
  this.desk.attach(host);
104469
104480
  }
104470
104481
  /**
104471
- * The remembered capability answers for one app (D-4), most recent first. `current` means it was
104472
- * given against the manifest's current `uses`; otherwise it is no longer used. Everything is
104473
- * non-current if the manifest is invalid or the app is gone.
104482
+ * The remembered capability answers for one app (D-4), most recent first. `current` means it is
104483
+ * still used: a deny always, an allow when it was given against the manifest's current `uses`
104484
+ * (`BrokerDesk.permissions`). An allow is non-current if the manifest is invalid or the app is gone.
104474
104485
  */
104475
104486
  permissions(ref) {
104476
104487
  ref = this.resolve(ref);
104477
104488
  const m = this.find(ref)?.manifest;
104478
104489
  return this.desk.permissions(ref, m ? m.uses : null);
104479
104490
  }
104480
- /** Forgets one remembered answer (D-4) — the next time that capability is needed, it is asked again */
104491
+ /** Forgets one remembered answer (D-4) — the next time that capability is needed, `permit` decides afresh (#2237) */
104481
104492
  forgetPermission(ref, capability) {
104482
104493
  ref = this.resolve(ref);
104483
104494
  this.desk.forgetPermission(ref, capability);
@@ -109565,7 +109576,8 @@ var UNDOABLE = /* @__PURE__ */ new Set([
109565
109576
  // the person decides on the proposal
109566
109577
  "propose_skill",
109567
109578
  // the same
109568
- // Three that take a remembered answer away, so that step asks again: the person answers it again
109579
+ // Three that take a remembered answer away, so that step asks again: the person answers it again. Forgetting an app's deny
109580
+ // widens instead (#2237): what the app declares then runs unasked, so that command raises its own card (TrustFlow.forgetAnswer)
109569
109581
  "remove_approval_rule",
109570
109582
  "revoke_project_consent",
109571
109583
  "forget_app_answer"
@@ -110857,7 +110869,7 @@ var CENTRALU_TOOLS = [
110857
110869
  },
110858
110870
  {
110859
110871
  name: "forget_app_answer",
110860
- description: "Forgets an app grant: the person's remembered answer to one thing an app asked for, so it asks again. Acts at once.",
110872
+ description: "Forgets an app grant, the person's answer to one thing an app asked for: an allow at once, a deny once the person agrees.",
110861
110873
  schema: external_exports.object({ app: external_exports.string().describe("Its id or name."), project: external_exports.string().optional(), capability: external_exports.string().describe("As list_app_grants names it.") }).strict()
110862
110874
  },
110863
110875
  {
@@ -119101,21 +119113,19 @@ var ROWS2 = 50;
119101
119113
  function rows2(items, line) {
119102
119114
  return [...items.slice(0, ROWS2).map(line), ...items.length > ROWS2 ? [`- and ${items.length - ROWS2} more`] : []];
119103
119115
  }
119104
- function asksLines(a, indent2, lead) {
119116
+ function canLines(a, indent2) {
119105
119117
  if (!a.uses) {
119106
- if (a.status === "invalid") return [`${indent2}What it may ask for is not known: its manifest could not be read (${manifestText(a.error ?? "invalid", 300)}).`];
119107
- if (a.machine) return [`${indent2}What it may ask for is not known: its machine did not say (it runs an older Centralu).`];
119118
+ if (a.status === "invalid") return [`${indent2}What it can do is not known: its manifest could not be read (${manifestText(a.error ?? "invalid", 300)}).`];
119119
+ if (a.machine) return [`${indent2}What it can do is not known: its machine did not say (it runs an older Centralu).`];
119108
119120
  }
119109
- const asks = a.uses ? usesLines(a.uses) : [];
119110
- if (!asks.length) return [`${indent2}Asks for nothing beyond its own tools.`];
119111
- return asks.map((l) => `${indent2}${lead}${manifestText(l.charAt(0).toLowerCase() + l.slice(1))}`);
119121
+ return appCanLines(a.uses ? usesLines(a.uses) : []).map((l) => `${indent2}${manifestText(l)}`);
119112
119122
  }
119113
119123
  function appLines(a) {
119114
119124
  const title = a.name?.trim() ? a.name : a.appId;
119115
119125
  const description = a.description?.trim() ? `: ${plainQuoted(a.description.trim(), 2e3)}` : "";
119116
119126
  const out = [`- ${shown2(title)} (id ${shown2(a.appId)})${description}`];
119117
119127
  if (a.root) out.push(" This project is this app: the Assistant and your other projects can use it.");
119118
- out.push(...asksLines(a, " ", "May ask to: "));
119128
+ out.push(...canLines(a, " "));
119119
119129
  return out;
119120
119130
  }
119121
119131
  var LIMITS = [
@@ -119163,7 +119173,7 @@ var TrustFlow = class {
119163
119173
  case "list_app_grants":
119164
119174
  return await this.listAppGrants(rpc, req.app, req.project);
119165
119175
  case "forget_app_answer":
119166
- return await this.forgetAnswer(rpc, req.app, req.project, req.capability);
119176
+ return await this.forgetAnswer(rpc, sessionId, req.app, req.project, req.capability, signal);
119167
119177
  case "revoke_consent":
119168
119178
  return await this.revokeConsent(rpc, req.from, req.to, req.kind);
119169
119179
  case "share_app":
@@ -119307,7 +119317,7 @@ var TrustFlow = class {
119307
119317
  //
119308
119318
  // An app's own trust follows its project's (#1141: a root app and its inner apps run when the project is trusted, and an
119309
119319
  // imported app is enabled by trusting its project), so trusting is `set_project_trust`. What is left: the answers the
119310
- // person gave to an app's capability questions (forgetting one only makes it ask again), the remembered consents of one
119320
+ // person gave to an app's capability questions (asked only with a caller under safe, #2237), the remembered consents of one
119311
119321
  // project reaching another (revoking one makes the next reach ask again), and sharing a project app with the person's
119312
119322
  // other projects, which widens who can attach it and so asks.
119313
119323
  async listAppGrants(rpc, named3, project2) {
@@ -119329,12 +119339,12 @@ var TrustFlow = class {
119329
119339
  out.push(`- ${appLabel2(a, all)}: ${a.trusted ? "trusted" : "untrusted"}; ${sharing}`);
119330
119340
  if (answers2 === null) out.push(" Its remembered answers could not be read just now.");
119331
119341
  for (const p of answers2 ?? []) {
119332
- out.push(` ${p.decision === "allow" ? "Allowed" : "Denied"}: ${shown2(p.capability)} (${plainQuoted(p.text, 300)}), since ${new Date(p.decidedAt).toISOString().slice(0, 10)}${p.current ? "" : "; no longer applies, its uses changed"}`);
119342
+ out.push(` ${p.decision === "allow" ? "Allowed" : "Denied"}: ${shown2(p.capability)} (${plainQuoted(p.text, 300)}), since ${new Date(p.decidedAt).toISOString().slice(0, 10)}${p.current ? "" : "; its uses changed, so a calling session under safe is asked again"}`);
119333
119343
  }
119334
119344
  }
119335
119345
  if (pool.length > ROWS2) out.push(`- and ${pool.length - ROWS2} more apps`);
119336
119346
  const lines = [
119337
- pool.length ? `${pool.length} ${pool.length === 1 ? "app" : "apps"}, with the answers the person gave to what each asked for (forget_app_answer forgets one, so it asks again; share_app shares a project app):` : "No app.",
119347
+ pool.length ? `${pool.length} ${pool.length === 1 ? "app" : "apps"}, with the answers the person gave when asked (only a calling session under safe asks; forget_app_answer forgets one; share_app shares a project app):` : "No app.",
119338
119348
  ...out
119339
119349
  ];
119340
119350
  if (!named3?.trim() && !project2?.trim()) {
@@ -119346,16 +119356,33 @@ var TrustFlow = class {
119346
119356
  lines.push(...awayLine(all, "the apps and answers kept"));
119347
119357
  return { ok: true, text: lines.join("\n") };
119348
119358
  }
119349
- async forgetAnswer(rpc, named3, project2, capability) {
119359
+ /**
119360
+ * Forgetting an allow only narrows (a caller under `safe` is asked again), so it acts at once. Forgetting a deny widens
119361
+ * since #2237: what the app declares then runs unasked for every caller not under `safe`, so it waits for the person,
119362
+ * on the card every widening raises, and acts only if the deny is still there after Allow.
119363
+ */
119364
+ async forgetAnswer(rpc, caller, named3, project2, capability, signal) {
119350
119365
  const [apps, all] = await Promise.all([callWindow(rpc, "apps.list", {}), readProjects(rpc)]);
119351
119366
  const found = findApp(apps, all, named3, project2);
119352
119367
  if ("error" in found) return { ok: false, error: found.error };
119353
119368
  const a = found.app;
119354
- const answers2 = await callWindow(rpc, "apps.permissions", { appId: a.appId, projectId: a.projectId, ...onMachine(a) });
119355
- const answer = answers2.find((p) => p.capability === capability.trim());
119356
- if (!answer) return { ok: false, error: `${appLabel2(a, all)} has no remembered answer for ${shown2(capability.trim())}; list_app_grants names them.` };
119369
+ const label = appLabel2(a, all);
119370
+ const remembered = async () => (await callWindow(rpc, "apps.permissions", { appId: a.appId, projectId: a.projectId, ...onMachine(a) })).find((p) => p.capability === capability.trim());
119371
+ const answer = await remembered();
119372
+ if (!answer) return { ok: false, error: `${label} has no remembered answer for ${shown2(capability.trim())}; list_app_grants names them.` };
119373
+ if (answer.decision !== "allow") {
119374
+ const question = [
119375
+ `Forget that you denied ${label} to ${plainQuoted(answer.text, 300)} (${shown2(answer.capability)})?`,
119376
+ "The app declares it, so it can then do it without asking, unless a session set to Safe calls it."
119377
+ ].join("\n");
119378
+ const refused2 = await this.ask(caller, question, signal, "forgotten");
119379
+ if (refused2) return { ok: false, error: refused2 };
119380
+ const now = await remembered();
119381
+ if (now?.decision !== answer.decision) return { ok: false, error: `The answer for ${shown2(answer.capability)} of ${label} changed while the card stood, so nothing was forgotten.` };
119382
+ }
119357
119383
  await callWindow(rpc, "apps.forgetPermission", { appId: a.appId, projectId: a.projectId, capability: answer.capability, ...onMachine(a) });
119358
- return { ok: true, text: `Forgot the answer ${answer.decision === "allow" ? "allowing" : "denying"} ${shown2(answer.capability)} for ${appLabel2(a, all)}: the next time it asks for that, the person is asked again.` };
119384
+ const after = answer.decision === "allow" ? "a calling session under safe is asked again before the app uses that" : "the app can use that again, asked first only when a calling session is under safe";
119385
+ return { ok: true, text: `Forgot the answer ${answer.decision === "allow" ? "allowing" : "denying"} ${shown2(answer.capability)} for ${label}: ${after}.` };
119359
119386
  }
119360
119387
  async revokeConsent(rpc, from, to, kind) {
119361
119388
  const [consents, all] = await Promise.all([callWindow(rpc, "projectConsents.list", {}), readProjects(rpc)]);
@@ -119390,14 +119417,14 @@ var TrustFlow = class {
119390
119417
  `Share the app ${label} with your other projects?`,
119391
119418
  "A session in another project can then find it and attach it (find_apps, attach_app), after you allow that pair of projects once.",
119392
119419
  ...home && !home.trusted ? [`Its project is untrusted, so it attaches nowhere until you trust ${shown2(home.name)}.`] : [],
119393
- ...asksLines(a, "", "It may ask to: ")
119420
+ ...canLines(a, "")
119394
119421
  ].join("\n");
119395
119422
  const refused2 = await this.ask(caller, question, signal, "shared");
119396
119423
  if (refused2) return { ok: false, error: refused2 };
119397
119424
  const now = (await callWindow(rpc, "apps.list", {})).find((x) => sameApp(x, a));
119398
119425
  if (!now) return { ok: false, error: `${label} was removed while the card stood, so nothing was shared.` };
119399
119426
  if (now.shared) return { ok: true, text: `${label} was shared while the card stood; nothing more changed.` };
119400
- if (appsKey([now]) !== appsKey([a])) return { ok: false, error: `What ${label} may ask for changed while the card stood, so it is not what the card named and nothing was shared. Ask again to show the person what it asks for now.` };
119427
+ if (appsKey([now]) !== appsKey([a])) return { ok: false, error: `What ${label} can do changed while the card stood, so it is not what the card named and nothing was shared. Ask again to show the person what it can do now.` };
119401
119428
  await callWindow(rpc, "apps.setShared", { ...ref, shared: true });
119402
119429
  return { ok: true, text: `${label} is shared now: a session in another project can attach it once the person allows that pair of projects.` };
119403
119430
  }
@@ -120784,6 +120811,7 @@ var SessionAppWiring = class {
120784
120811
  hostData: (name, app2) => this.host.appSessions.appHostData(name, app2),
120785
120812
  agentLabel: (tool) => this.host.adapters.get(tool)?.descriptor.label ?? tool,
120786
120813
  askCapability: (q2, signal) => this.host.hostCards.askCapability(q2, signal),
120814
+ asksPerson: (callers) => this.host.appSessions.callersPreset(callers) === "safe",
120787
120815
  agentRunEnded: (run2) => this.host.appSessions.agentRunEnded(run2),
120788
120816
  appNotice: (sessionId, text3, app2) => this.host.appNotice(sessionId, text3, app2)
120789
120817
  };
@@ -146752,6 +146780,14 @@ var AppSessions = class {
146752
146780
  }
146753
146781
  }
146754
146782
  }
146783
+ /**
146784
+ * The lowest preset among the calls open into an app (`appAgentPreset` over `AppCalls.agentCallers`): what its agent
146785
+ * runs under, and, at `safe`, whether the person is asked before the app uses what it declares (#2237,
146786
+ * `BrokerHost.asksPerson`). One reading for both, so an agent that would run under `safe` is exactly one that asks first
146787
+ */
146788
+ callersPreset(callers) {
146789
+ return appAgentPreset(callers, (sessionId) => this.host.meta.get(sessionId)?.permissionPreset);
146790
+ }
146755
146791
  /**
146756
146792
  * Runs an agent an app asked for (M4 D-1, plan decision 6) — stands up **a new session per
146757
146793
  * request** under that app, and returns the answer once the turn ends.
@@ -146810,7 +146846,7 @@ var AppSessions = class {
146810
146846
  projectId: req.app.projectId,
146811
146847
  cwd,
146812
146848
  tool: req.tool,
146813
- permissionPreset: appAgentPreset(req.callers, (sessionId) => this.host.meta.get(sessionId)?.permissionPreset),
146849
+ permissionPreset: this.callersPreset(req.callers),
146814
146850
  appId: req.app.appId,
146815
146851
  appAgent: req.schema ? { outputSchema: req.schema } : {}
146816
146852
  });
@@ -162130,7 +162166,7 @@ var handedToken = launch.tokenOnStdin ? await readHandedToken(process.stdin).cat
162130
162166
  console.error(`[agent-host] the launcher did not hand over the token: ${e.message}`);
162131
162167
  process.exit(1);
162132
162168
  }) : launch.token;
162133
- var BUILD = true ? "5ec3da6" : "dev";
162169
+ var BUILD = true ? "d0e7c4b" : "dev";
162134
162170
  var { values } = parseArgs({
162135
162171
  options: {
162136
162172
  port: { type: "string", default: "5175" },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@centralu/host-win32-x64",
3
- "version": "0.1.0-beta.64",
3
+ "version": "0.1.0-beta.65",
4
4
  "description": "Centralu's host without the window, for Windows on x86-64: what a hub installs on a linked machine",
5
5
  "license": "MIT",
6
6
  "author": "ijun17",