@centralu/darwin-arm64 0.1.0-beta.10 → 0.1.0-beta.12

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 (100) hide show
  1. package/Centralu.app/Contents/Info.plist +2 -2
  2. package/Centralu.app/Contents/MacOS/centralu +0 -0
  3. package/Centralu.app/Contents/MacOS/centralu-keeper +0 -0
  4. package/Centralu.app/Contents/Resources/content/centralu-keeper +0 -0
  5. package/Centralu.app/Contents/Resources/content/content-manifest.json +500 -0
  6. package/Centralu.app/Contents/Resources/content/content-manifest.json.sig +7 -0
  7. package/Centralu.app/Contents/Resources/content/host/app-template/AGENTS.md +140 -0
  8. package/Centralu.app/Contents/Resources/content/host/app-template/CLAUDE.md +1 -0
  9. package/Centralu.app/Contents/Resources/content/host/app-template/centralu.app.json +9 -0
  10. package/Centralu.app/Contents/Resources/content/host/app-template/gitattributes +2 -0
  11. package/Centralu.app/Contents/Resources/content/host/app-template/runtime/THIRD_PARTY_LICENSES.txt +950 -0
  12. package/Centralu.app/Contents/Resources/content/host/app-template/runtime/centralu-app-runtime.mjs +82 -0
  13. package/Centralu.app/Contents/Resources/content/host/app-template/runtime/centralu-app-runtime.mjs.map +1 -0
  14. package/Centralu.app/Contents/Resources/content/host/app-template/runtime/mcp-app.js +104 -0
  15. package/Centralu.app/Contents/Resources/content/host/app-template/server.mjs +71 -0
  16. package/Centralu.app/Contents/Resources/content/host/app-template/ui/index.html +145 -0
  17. package/Centralu.app/Contents/Resources/content/host/bundle-info.json +8 -0
  18. package/Centralu.app/Contents/Resources/content/host/codex-orchestrator-bridge.mjs +3858 -0
  19. package/Centralu.app/Contents/Resources/content/host/main.mjs +115845 -0
  20. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  21. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/binding.js +62 -0
  22. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/darwin-arm64.js +3 -0
  23. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/darwin-x64.js +3 -0
  24. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/database.js +109 -0
  25. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/index.js +3 -0
  26. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/linux-arm64.js +3 -0
  27. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/linux-x64.js +3 -0
  28. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/linuxmusl-arm64.js +4 -0
  29. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/linuxmusl-x64.js +4 -0
  30. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
  31. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
  32. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/explain.js +9 -0
  33. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/function.js +31 -0
  34. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
  35. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
  36. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
  37. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/table.js +195 -0
  38. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
  39. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
  40. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/sqlite-error.js +25 -0
  41. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/util.js +12 -0
  42. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/win32-arm64.js +3 -0
  43. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/lib/win32-x64.js +3 -0
  44. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/package.json +67 -0
  45. package/Centralu.app/Contents/Resources/content/host/node_modules/better-sqlite3/prebuilds/darwin-arm64.node +0 -0
  46. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/conpty_console_list_agent.js +16 -0
  47. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/conpty_console_list_agent.js.map +1 -0
  48. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/eventEmitter2.js +47 -0
  49. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/eventEmitter2.js.map +1 -0
  50. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/eventEmitter2.test.js +30 -0
  51. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/eventEmitter2.test.js.map +1 -0
  52. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/index.js +52 -0
  53. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/index.js.map +1 -0
  54. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/interfaces.js +7 -0
  55. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/interfaces.js.map +1 -0
  56. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/shared/conout.js +11 -0
  57. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/shared/conout.js.map +1 -0
  58. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/terminal.js +190 -0
  59. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/terminal.js.map +1 -0
  60. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/terminal.test.js +139 -0
  61. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/terminal.test.js.map +1 -0
  62. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/testUtils.test.js +28 -0
  63. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/testUtils.test.js.map +1 -0
  64. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/types.js +7 -0
  65. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/types.js.map +1 -0
  66. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/unixTerminal.js +346 -0
  67. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/unixTerminal.js.map +1 -0
  68. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/unixTerminal.test.js +351 -0
  69. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/unixTerminal.test.js.map +1 -0
  70. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/utils.js +39 -0
  71. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/utils.js.map +1 -0
  72. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsConoutConnection.js +125 -0
  73. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsConoutConnection.js.map +1 -0
  74. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsPtyAgent.js +320 -0
  75. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsPtyAgent.js.map +1 -0
  76. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsPtyAgent.test.js +90 -0
  77. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +1 -0
  78. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsTerminal.js +199 -0
  79. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsTerminal.js.map +1 -0
  80. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsTerminal.test.js +219 -0
  81. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/windowsTerminal.test.js.map +1 -0
  82. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
  83. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +1 -0
  84. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/package.json +64 -0
  85. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  86. package/Centralu.app/Contents/Resources/content/host/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  87. package/Centralu.app/Contents/Resources/content/host/schema.sql +98 -0
  88. package/Centralu.app/Contents/Resources/resources/host/app-template/AGENTS.md +37 -4
  89. package/Centralu.app/Contents/Resources/resources/host/app-template/ui/index.html +61 -21
  90. package/Centralu.app/Contents/Resources/resources/host/bundle-info.json +2 -2
  91. package/Centralu.app/Contents/Resources/resources/host/codex-orchestrator-bridge.mjs +5 -5
  92. package/Centralu.app/Contents/Resources/resources/host/main.mjs +6280 -1989
  93. package/Centralu.app/Contents/Resources/resources/host/schema.sql +4 -0
  94. package/Centralu.app/Contents/Resources/shell/Centralu.app/Contents/Info.plist +82 -0
  95. package/Centralu.app/Contents/Resources/shell/Centralu.app/Contents/MacOS/centralu-shell +0 -0
  96. package/Centralu.app/Contents/Resources/shell/Centralu.app/Contents/Resources/icon.icns +0 -0
  97. package/Centralu.app/Contents/Resources/shell/Centralu.app/Contents/_CodeSignature/CodeResources +128 -0
  98. package/Centralu.app/Contents/Resources/shell/shell.json +6 -0
  99. package/Centralu.app/Contents/_CodeSignature/CodeResources +1000 -12
  100. package/package.json +1 -1
@@ -0,0 +1,71 @@
1
+ // {{APP_NAME}} — this app's MCP server. Centralu starts it (`node server.mjs`, stdio) when it is first
2
+ // needed and restarts it after the builder's turn when this folder changed.
3
+ // Edit this file and ui/index.html freely. Never edit runtime/ (generated by Centralu).
4
+ // Read AGENTS.md for the rules.
5
+ import { McpServer, serveStdio, z, centralu } from './runtime/centralu-app-runtime.mjs'
6
+
7
+ const UI = 'ui://{{APP_ID}}/index.html'
8
+
9
+ // State lives in the server, and is saved in the app's data folder (outside this folder, so it is
10
+ // never committed). The screen only shows it. It survives restarts because it is read back here.
11
+ const state = await centralu.readJson('state.json', { count: 0 })
12
+ const save = () => centralu.writeJson('state.json', state)
13
+ const current = () => ({ content: [{ type: 'text', text: `count = ${state.count}` }], structuredContent: { count: state.count } })
14
+
15
+ serveStdio(() => {
16
+ const server = new McpServer({ name: '{{APP_ID}}', version: '0.1.0' }, { capabilities: { tools: {}, resources: {} } })
17
+
18
+ centralu.uiResource(server, 'main-screen', UI, new URL('./ui/index.html', import.meta.url))
19
+
20
+ // The home tool (centralu.app.json "home"): Centralu calls it to open the app's screen. It only reads,
21
+ // so it says readOnlyHint: true — the screen calls it on every refresh, and a read must not trigger one.
22
+ centralu.tool(
23
+ server,
24
+ 'show',
25
+ {
26
+ title: 'Show the count',
27
+ description: 'Open the screen and return the current count.',
28
+ inputSchema: z.object({}),
29
+ annotations: { readOnlyHint: true },
30
+ _meta: { ui: { resourceUri: UI } },
31
+ },
32
+ async () => current(),
33
+ )
34
+
35
+ // Changes state, so it says readOnlyHint: false. Agents and the screen can both call it.
36
+ centralu.tool(
37
+ server,
38
+ 'increment',
39
+ {
40
+ title: 'Increment',
41
+ description: 'Add to the count (default 1) and return the new count.',
42
+ inputSchema: z.object({ by: z.number().int().default(1).describe('How much to add') }),
43
+ annotations: { readOnlyHint: false },
44
+ },
45
+ async ({ by }) => {
46
+ state.count += by
47
+ await save()
48
+ return current()
49
+ },
50
+ )
51
+
52
+ // Only the screen may call this one (visibility: ['app']); agents never see it.
53
+ centralu.tool(
54
+ server,
55
+ 'reset',
56
+ {
57
+ title: 'Reset',
58
+ description: 'Set the count back to 0.',
59
+ inputSchema: z.object({}),
60
+ annotations: { readOnlyHint: false, destructiveHint: true },
61
+ _meta: { ui: { visibility: ['app'] } },
62
+ },
63
+ async () => {
64
+ state.count = 0
65
+ await save()
66
+ return current()
67
+ },
68
+ )
69
+
70
+ return server
71
+ })
@@ -0,0 +1,145 @@
1
+ <!doctype html>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8" />
5
+ <!-- Until Centralu says which theme shows, follow the system's (Centralu's window follows it too). -->
6
+ <meta name="color-scheme" content="light dark" />
7
+ <title>{{APP_NAME}}</title>
8
+ <style>
9
+ /*
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.
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
+ }
40
+ body {
41
+ margin: 16px;
42
+ font-family: var(--sans);
43
+ font-size: var(--text);
44
+ line-height: var(--leading);
45
+ color: var(--ink);
46
+ background: transparent;
47
+ }
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; }
55
+ button {
56
+ font: inherit;
57
+ color: inherit;
58
+ background: var(--bg);
59
+ border: var(--border) solid var(--edge);
60
+ border-radius: var(--radius);
61
+ padding: 4px 12px;
62
+ cursor: pointer;
63
+ }
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
+ }
70
+
71
+ /*
72
+ * Centralu's scrollbar. Keep this block: it draws scrollbars the way Centralu does, from the
73
+ * theme's scrollbar variables.
74
+ */
75
+ ::-webkit-scrollbar { width: var(--sb-size); height: var(--sb-size); }
76
+ ::-webkit-scrollbar-track { background: var(--sb-track); }
77
+ ::-webkit-scrollbar-thumb {
78
+ background: var(--sb-thumb);
79
+ border: var(--sb-inset) solid transparent;
80
+ background-clip: content-box;
81
+ border-radius: var(--sb-radius);
82
+ }
83
+ ::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover); background-clip: content-box; }
84
+ /* Only where ::-webkit-scrollbar does not exist: elsewhere scrollbar-color would switch it off */
85
+ @supports not selector(::-webkit-scrollbar) {
86
+ * { scrollbar-color: var(--sb-thumb) var(--sb-track); scrollbar-width: thin; }
87
+ }
88
+ </style>
89
+ </head>
90
+ <body>
91
+ <div class="count" id="count">…</div>
92
+ <div class="actions">
93
+ <button id="increment">+1</button>
94
+ <button id="reset">Reset</button>
95
+ </div>
96
+ <div class="error" id="error"></div>
97
+
98
+ <!-- Centralu replaces this tag with the MCP App bridge (runtime/mcp-app.js). Keep it. -->
99
+ <script src="centralu:mcp-app.js"></script>
100
+ <script>
101
+ // The screen holds no state of its own: it shows what the server says, and asks again when
102
+ // Centralu says the app's state changed (someone — the person or an agent — called a tool).
103
+ const app = new McpApp.App({ name: '{{APP_ID}}', version: '0.1.0' })
104
+ const $ = (id) => document.getElementById(id)
105
+
106
+ function show(result) {
107
+ $('error').textContent = result?.isError ? (result.content ?? []).map((c) => c.text ?? '').join('\n') : ''
108
+ const count = result?.structuredContent?.count
109
+ if (count !== undefined) $('count').textContent = String(count)
110
+ }
111
+ async function call(name, args = {}) {
112
+ try {
113
+ show(await app.callServerTool({ name, arguments: args }))
114
+ } catch (e) {
115
+ $('error').textContent = String(e?.message ?? e)
116
+ }
117
+ }
118
+ const reread = () => call('show')
119
+
120
+ // Centralu's theme (the MCP Apps host context). Keep this: it applies the colour scheme, the
121
+ // standard style variables, and Centralu's own (the signal colour and the scrollbar). A change
122
+ // notification carries only what changed, so it reads the whole context the bridge keeps.
123
+ const applyTheme = () => {
124
+ const ctx = app.getHostContext() ?? {}
125
+ const root = document.documentElement
126
+ if (ctx.theme === 'light' || ctx.theme === 'dark') root.style.colorScheme = ctx.theme
127
+ const vars = { ...ctx.styles?.variables, ...ctx.centralu?.variables }
128
+ for (const [name, value] of Object.entries(vars)) if (typeof value === 'string' && value) root.style.setProperty(name, value)
129
+ }
130
+ app.onhostcontextchanged = applyTheme
131
+
132
+ app.ontoolresult = (params) => show(params)
133
+ // Centralu's own notification (not part of the MCP Apps standard): the app's state changed.
134
+ app.fallbackNotificationHandler = async (n) => {
135
+ if (n.method === 'centralu/notifications/changed') await reread()
136
+ }
137
+ $('increment').onclick = () => call('increment', { by: 1 })
138
+ $('reset').onclick = () => call('reset')
139
+ app.connect().then(() => {
140
+ applyTheme()
141
+ return reread()
142
+ })
143
+ </script>
144
+ </body>
145
+ </html>
@@ -0,0 +1,8 @@
1
+ {
2
+ "commit": "6d18a3e",
3
+ "protocolVersion": 1,
4
+ "builtAt": "2026-10-08T05:46:15.346Z",
5
+ "runtime": "system-node",
6
+ "platform": "darwin",
7
+ "arch": "arm64"
8
+ }