@centralu/win32-x64 0.1.0-beta.10 → 0.1.0-beta.11

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.
Binary file
@@ -6,7 +6,11 @@ screen (`ui/index.html`) and agents call the same tools as functions. Same tools
6
6
  ## Files
7
7
 
8
8
  - `centralu.app.json` — the manifest. `id` is `{{APP_ID}}` and must stay equal to this folder's
9
- name. `home` is the tool Centralu calls to open the screen.
9
+ name. `home` is the tool Centralu calls to open the screen. Optionally,
10
+ `"view": { "span": { "cols": 2, "rows": 1 } }` recommends how many grid cells the app's panel takes
11
+ on Centralu's grid (each side 1 to 4; a session panel is 1 × 1). It is only a default: the person's
12
+ own choice, from the panel's top bar or in Settings, comes first, and the window may give the panel
13
+ less. The screen must still work at whatever size it gets.
10
14
  - `server.mjs` — the MCP server. Change it.
11
15
  - `ui/index.html` — the screen. Change it. It is read on every open, so edits show without a restart.
12
16
  - `runtime/` — **generated by Centralu. Never edit, format, move, or read it in full.** It is replaced
@@ -75,6 +79,27 @@ when an agent's call started it, on this app's screen when the screen did — an
75
79
  until the manifest's `uses` changes. The call waits while the person decides (up to 5 minutes). A
76
80
  refusal comes back as that error: show it plainly instead of retrying.
77
81
 
82
+ ## Dragging an item out of the screen
83
+
84
+ An item the person may want to hand to a session (a card, a row, a record) should be draggable and
85
+ carry two standard types, set in its `dragstart` handler:
86
+
87
+ ```js
88
+ node.draggable = true
89
+ node.addEventListener('dragstart', (e) => {
90
+ e.dataTransfer.setData('text/uri-list', item.url) // the item's address
91
+ e.dataTransfer.setData('text/plain', `#${item.id} ${item.title}`) // one line naming it
92
+ e.dataTransfer.effectAllowed = 'copyMove'
93
+ })
94
+ ```
95
+
96
+ Dropped on a session, it goes into the message at the caret as a Markdown link,
97
+ `[#12 Fix login](https://…)`; with no address, the text goes in as it is. Nothing else is needed:
98
+ the browser does not hand a drag from the screen's frame to Centralu, so Centralu carries it out
99
+ itself. Keep your own types next to these two for drags inside the screen (a card moved between
100
+ columns), and keep the title to one line. If the session cannot use this app's tools (another
101
+ project's session, an untrusted project), the link still goes in and Centralu tells the person why.
102
+
78
103
  ## The screen's look
79
104
 
80
105
  Centralu sends the person's theme to the screen (light or dark, their colours), and sends it again
@@ -85,12 +110,20 @@ when they switch. The template's `ui/index.html` already uses it; keep these whe
85
110
  `--font-sans`, `--font-text-md-size`, `--border-radius-md`, …) and Centralu's own
86
111
  (`--centralu-signal`, `--centralu-scrollbar-*`). It reads `app.getHostContext()`, because a change
87
112
  notification carries only what changed.
88
- - **Style with those variables**, each with a fallback (`color: var(--color-text-primary, #e9e9e9)`),
89
- instead of fixed colours. Then the screen follows light and dark and sits on Centralu's background
90
- (keep `background: transparent` on the page). The roles: `primary` / `secondary` / `tertiary` for
113
+ - **Style with those variables only** — colours, and type and shape too (`--font-text-md-size`,
114
+ `--font-text-md-line-height`, `--font-sans`, `--font-weight-semibold`, `--border-radius-md`,
115
+ `--border-width-regular`, …) — instead of fixed values. Give each its fallback once, in the
116
+ `:root` block at the top of the stylesheet (Centralu's dark values, for the moment before the theme
117
+ arrives), and use those names everywhere below. Then the screen follows light and dark, the
118
+ person's font, line height and text size, and sits on Centralu's background (keep
119
+ `background: transparent` on the page). Spacing has no variable; keep it literal. The roles: `primary` / `secondary` / `tertiary` for
91
120
  text and surfaces in falling order; `--color-text-danger` for errors; `--color-text-warning` (the
92
121
  same as `--centralu-signal`) only for what waits on the person — it is Centralu's signal colour,
93
122
  the strongest thing on screen.
123
+ - **Narrow first.** The screen is often a grid panel about 360–480px wide, or the inline view under
124
+ a tool card. Make it work at that width first: no fixed width over about 320px, rows that wrap
125
+ (`flex-wrap`), and below about 520px side-by-side parts stacked into one column (a media query in
126
+ this page measures the panel). Keep what waits on the person first. Check it at 360px.
94
127
  - **The "Centralu's scrollbar" block** in the stylesheet. It draws scrollbars the way Centralu
95
128
  does, from the theme. Do not add `scrollbar-color` or `scrollbar-width` outside its `@supports`
96
129
  guard: in Chromium they switch the styled scrollbar off.
@@ -7,52 +7,92 @@
7
7
  <title>{{APP_NAME}}</title>
8
8
  <style>
9
9
  /*
10
- * Colours, type and corners come from Centralu's theme: it sends MCP Apps style variables
11
- * (applied by the script below), so the screen follows the person's theme, light or dark.
12
- * The fallbacks are Centralu's dark theme, for a moment before the theme arrives.
10
+ * Colours, type and shape come from Centralu's theme: it sends MCP Apps style variables
11
+ * (applied by the script below), so the screen follows the person's theme, light or dark,
12
+ * and their font, line height and text size.
13
+ *
14
+ * Keep the fallbacks in this one block: they are Centralu's dark defaults, for the moment
15
+ * before the theme arrives. Every rule below reads these names, never a colour or size of
16
+ * its own. Spacing (margins, padding, gaps) has no theme variable and stays literal.
13
17
  */
18
+ :root {
19
+ --bg: var(--color-background-secondary, #1d1d1d);
20
+ --bg-hover: var(--color-background-tertiary, #353535);
21
+ --ink: var(--color-text-primary, #e9e9e9);
22
+ --danger: var(--color-text-danger, #ffa198);
23
+ --edge: var(--color-border-secondary, #353535);
24
+ --ring: var(--color-ring-primary, #909090);
25
+ --sans: var(--font-sans, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', system-ui, sans-serif);
26
+ --text: var(--font-text-md-size, 13px);
27
+ --leading: var(--font-text-md-line-height, 1.65);
28
+ --display: var(--font-heading-2xl-size, 28px);
29
+ --leading-tight: var(--font-heading-2xl-line-height, 1.3);
30
+ --radius: var(--border-radius-md, 4px);
31
+ --border: var(--border-width-regular, 1px);
32
+ /* Centralu's scrollbar (the block at the end) */
33
+ --sb-size: var(--centralu-scrollbar-size, 10px);
34
+ --sb-inset: var(--centralu-scrollbar-inset, 3px);
35
+ --sb-radius: var(--centralu-scrollbar-radius, 999px);
36
+ --sb-track: var(--centralu-scrollbar-track, transparent);
37
+ --sb-thumb: var(--centralu-scrollbar-thumb, #292929);
38
+ --sb-thumb-hover: var(--centralu-scrollbar-thumb-hover, #353535);
39
+ }
14
40
  body {
15
41
  margin: 16px;
16
- font: var(--font-text-md-size, 13px) / var(--font-text-md-line-height, 1.65) var(--font-sans, system-ui, sans-serif);
17
- color: var(--color-text-primary, #e9e9e9);
42
+ font-family: var(--sans);
43
+ font-size: var(--text);
44
+ line-height: var(--leading);
45
+ color: var(--ink);
18
46
  background: transparent;
19
47
  }
20
- .count { font-size: 32px; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
48
+ .count { font-size: var(--display); line-height: var(--leading-tight); font-variant-numeric: tabular-nums; margin-bottom: 12px; }
49
+ /*
50
+ * Narrow first (docs/apps.md 6.6): a view may be a grid panel 360px wide or the inline view
51
+ * under a tool card. Rows wrap instead of overflowing, nothing has a fixed width, and the
52
+ * layout only spreads out when there is room.
53
+ */
54
+ .actions { display: flex; flex-wrap: wrap; gap: 8px; }
21
55
  button {
22
56
  font: inherit;
23
57
  color: inherit;
24
- background: var(--color-background-secondary, #1d1d1d);
25
- border: var(--border-width-regular, 1px) solid var(--color-border-secondary, #353535);
26
- border-radius: var(--border-radius-md, 4px);
58
+ background: var(--bg);
59
+ border: var(--border) solid var(--edge);
60
+ border-radius: var(--radius);
27
61
  padding: 4px 12px;
28
62
  cursor: pointer;
29
63
  }
30
- button:hover { background: var(--color-background-tertiary, #353535); }
31
- .error { color: var(--color-text-danger, #ffa198); margin-top: 8px; white-space: pre-wrap; }
64
+ button:hover { background: var(--bg-hover); }
65
+ :focus-visible { outline: var(--border) solid var(--ring); outline-offset: 1px; }
66
+ .error { color: var(--danger); margin-top: 8px; white-space: pre-wrap; overflow-wrap: anywhere; }
67
+ @media (max-width: 420px) {
68
+ body { margin: 12px; }
69
+ }
32
70
 
33
71
  /*
34
72
  * Centralu's scrollbar. Keep this block: it draws scrollbars the way Centralu does, from the
35
- * theme's scrollbar variables, with its dark values as fallbacks.
73
+ * theme's scrollbar variables.
36
74
  */
37
- ::-webkit-scrollbar { width: var(--centralu-scrollbar-size, 10px); height: var(--centralu-scrollbar-size, 10px); }
38
- ::-webkit-scrollbar-track { background: var(--centralu-scrollbar-track, transparent); }
75
+ ::-webkit-scrollbar { width: var(--sb-size); height: var(--sb-size); }
76
+ ::-webkit-scrollbar-track { background: var(--sb-track); }
39
77
  ::-webkit-scrollbar-thumb {
40
- background: var(--centralu-scrollbar-thumb, #292929);
41
- border: var(--centralu-scrollbar-inset, 3px) solid transparent;
78
+ background: var(--sb-thumb);
79
+ border: var(--sb-inset) solid transparent;
42
80
  background-clip: content-box;
43
- border-radius: var(--centralu-scrollbar-radius, 999px);
81
+ border-radius: var(--sb-radius);
44
82
  }
45
- ::-webkit-scrollbar-thumb:hover { background: var(--centralu-scrollbar-thumb-hover, #353535); background-clip: content-box; }
83
+ ::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); background-clip: content-box; }
46
84
  /* Only where ::-webkit-scrollbar does not exist: elsewhere scrollbar-color would switch it off */
47
85
  @supports not selector(::-webkit-scrollbar) {
48
- * { scrollbar-color: var(--centralu-scrollbar-thumb, #292929) var(--centralu-scrollbar-track, transparent); scrollbar-width: thin; }
86
+ * { scrollbar-color: var(--sb-thumb) var(--sb-track); scrollbar-width: thin; }
49
87
  }
50
88
  </style>
51
89
  </head>
52
90
  <body>
53
91
  <div class="count" id="count">…</div>
54
- <button id="increment">+1</button>
55
- <button id="reset">Reset</button>
92
+ <div class="actions">
93
+ <button id="increment">+1</button>
94
+ <button id="reset">Reset</button>
95
+ </div>
56
96
  <div class="error" id="error"></div>
57
97
 
58
98
  <!-- Centralu replaces this tag with the MCP App bridge (runtime/mcp-app.js). Keep it. -->
@@ -1,7 +1,7 @@
1
1
  {
2
- "commit": "7bec5ad",
2
+ "commit": "181a36f",
3
3
  "protocolVersion": 1,
4
- "builtAt": "2026-10-05T04:24:13.098Z",
4
+ "builtAt": "2026-10-06T03:15:42.666Z",
5
5
  "runtime": "system-node",
6
6
  "platform": "win32",
7
7
  "arch": "x64"
@@ -3798,11 +3798,11 @@ async function handle(msg) {
3798
3798
  }
3799
3799
  if (method === "tools/call") {
3800
3800
  try {
3801
- const r = await rpc("orchestrator.tool", {
3802
- sessionId: SESSION_ID,
3803
- name: params?.name,
3804
- args: params?.arguments ?? {}
3805
- });
3801
+ const r = await rpc(
3802
+ "orchestrator.tool",
3803
+ { sessionId: SESSION_ID, name: params?.name, args: params?.arguments ?? {} },
3804
+ APP_CALL_TIMEOUT_MS
3805
+ );
3806
3806
  return ok(id, { content: [{ type: "text", text: r.text }], isError: r.isError === true });
3807
3807
  } catch (e) {
3808
3808
  return ok(id, { content: [{ type: "text", text: `Could not run the tool \u2014 ${e.message}` }], isError: true });