@centralu/darwin-arm64 0.1.0-beta.10

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 (87) hide show
  1. package/Centralu.app/Contents/Info.plist +51 -0
  2. package/Centralu.app/Contents/MacOS/centralu +0 -0
  3. package/Centralu.app/Contents/Resources/icon.icns +0 -0
  4. package/Centralu.app/Contents/Resources/resources/host/app-template/AGENTS.md +107 -0
  5. package/Centralu.app/Contents/Resources/resources/host/app-template/CLAUDE.md +1 -0
  6. package/Centralu.app/Contents/Resources/resources/host/app-template/centralu.app.json +9 -0
  7. package/Centralu.app/Contents/Resources/resources/host/app-template/gitattributes +2 -0
  8. package/Centralu.app/Contents/Resources/resources/host/app-template/runtime/THIRD_PARTY_LICENSES.txt +950 -0
  9. package/Centralu.app/Contents/Resources/resources/host/app-template/runtime/centralu-app-runtime.mjs +82 -0
  10. package/Centralu.app/Contents/Resources/resources/host/app-template/runtime/centralu-app-runtime.mjs.map +1 -0
  11. package/Centralu.app/Contents/Resources/resources/host/app-template/runtime/mcp-app.js +104 -0
  12. package/Centralu.app/Contents/Resources/resources/host/app-template/server.mjs +71 -0
  13. package/Centralu.app/Contents/Resources/resources/host/app-template/ui/index.html +105 -0
  14. package/Centralu.app/Contents/Resources/resources/host/bundle-info.json +8 -0
  15. package/Centralu.app/Contents/Resources/resources/host/codex-orchestrator-bridge.mjs +3858 -0
  16. package/Centralu.app/Contents/Resources/resources/host/main.mjs +111554 -0
  17. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  18. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/binding.js +62 -0
  19. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/darwin-arm64.js +3 -0
  20. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/darwin-x64.js +3 -0
  21. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/database.js +109 -0
  22. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/index.js +3 -0
  23. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/linux-arm64.js +3 -0
  24. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/linux-x64.js +3 -0
  25. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/linuxmusl-arm64.js +4 -0
  26. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/linuxmusl-x64.js +4 -0
  27. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
  28. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
  29. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/explain.js +9 -0
  30. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/function.js +31 -0
  31. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
  32. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
  33. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
  34. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/table.js +195 -0
  35. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
  36. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
  37. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/sqlite-error.js +25 -0
  38. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/util.js +12 -0
  39. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/win32-arm64.js +3 -0
  40. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/lib/win32-x64.js +3 -0
  41. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/package.json +67 -0
  42. package/Centralu.app/Contents/Resources/resources/host/node_modules/better-sqlite3/prebuilds/darwin-arm64.node +0 -0
  43. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/conpty_console_list_agent.js +16 -0
  44. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/conpty_console_list_agent.js.map +1 -0
  45. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/eventEmitter2.js +47 -0
  46. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/eventEmitter2.js.map +1 -0
  47. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/eventEmitter2.test.js +30 -0
  48. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/eventEmitter2.test.js.map +1 -0
  49. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/index.js +52 -0
  50. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/index.js.map +1 -0
  51. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/interfaces.js +7 -0
  52. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/interfaces.js.map +1 -0
  53. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/shared/conout.js +11 -0
  54. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/shared/conout.js.map +1 -0
  55. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/terminal.js +190 -0
  56. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/terminal.js.map +1 -0
  57. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/terminal.test.js +139 -0
  58. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/terminal.test.js.map +1 -0
  59. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/testUtils.test.js +28 -0
  60. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/testUtils.test.js.map +1 -0
  61. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/types.js +7 -0
  62. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/types.js.map +1 -0
  63. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/unixTerminal.js +346 -0
  64. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/unixTerminal.js.map +1 -0
  65. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/unixTerminal.test.js +351 -0
  66. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/unixTerminal.test.js.map +1 -0
  67. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/utils.js +39 -0
  68. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/utils.js.map +1 -0
  69. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsConoutConnection.js +125 -0
  70. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsConoutConnection.js.map +1 -0
  71. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsPtyAgent.js +320 -0
  72. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsPtyAgent.js.map +1 -0
  73. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsPtyAgent.test.js +90 -0
  74. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +1 -0
  75. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsTerminal.js +199 -0
  76. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsTerminal.js.map +1 -0
  77. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsTerminal.test.js +219 -0
  78. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/windowsTerminal.test.js.map +1 -0
  79. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
  80. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +1 -0
  81. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/package.json +64 -0
  82. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/prebuilds/darwin-arm64/pty.node +0 -0
  83. package/Centralu.app/Contents/Resources/resources/host/node_modules/node-pty/prebuilds/darwin-arm64/spawn-helper +0 -0
  84. package/Centralu.app/Contents/Resources/resources/host/schema.sql +94 -0
  85. package/Centralu.app/Contents/_CodeSignature/CodeResources +1019 -0
  86. package/README.md +7 -0
  87. package/package.json +21 -0
@@ -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,105 @@
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 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.
13
+ */
14
+ body {
15
+ 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);
18
+ background: transparent;
19
+ }
20
+ .count { font-size: 32px; font-variant-numeric: tabular-nums; margin-bottom: 12px; }
21
+ button {
22
+ font: inherit;
23
+ 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);
27
+ padding: 4px 12px;
28
+ cursor: pointer;
29
+ }
30
+ button:hover { background: var(--color-background-tertiary, #353535); }
31
+ .error { color: var(--color-text-danger, #ffa198); margin-top: 8px; white-space: pre-wrap; }
32
+
33
+ /*
34
+ * 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.
36
+ */
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); }
39
+ ::-webkit-scrollbar-thumb {
40
+ background: var(--centralu-scrollbar-thumb, #292929);
41
+ border: var(--centralu-scrollbar-inset, 3px) solid transparent;
42
+ background-clip: content-box;
43
+ border-radius: var(--centralu-scrollbar-radius, 999px);
44
+ }
45
+ ::-webkit-scrollbar-thumb:hover { background: var(--centralu-scrollbar-thumb-hover, #353535); background-clip: content-box; }
46
+ /* Only where ::-webkit-scrollbar does not exist: elsewhere scrollbar-color would switch it off */
47
+ @supports not selector(::-webkit-scrollbar) {
48
+ * { scrollbar-color: var(--centralu-scrollbar-thumb, #292929) var(--centralu-scrollbar-track, transparent); scrollbar-width: thin; }
49
+ }
50
+ </style>
51
+ </head>
52
+ <body>
53
+ <div class="count" id="count">…</div>
54
+ <button id="increment">+1</button>
55
+ <button id="reset">Reset</button>
56
+ <div class="error" id="error"></div>
57
+
58
+ <!-- Centralu replaces this tag with the MCP App bridge (runtime/mcp-app.js). Keep it. -->
59
+ <script src="centralu:mcp-app.js"></script>
60
+ <script>
61
+ // The screen holds no state of its own: it shows what the server says, and asks again when
62
+ // Centralu says the app's state changed (someone — the person or an agent — called a tool).
63
+ const app = new McpApp.App({ name: '{{APP_ID}}', version: '0.1.0' })
64
+ const $ = (id) => document.getElementById(id)
65
+
66
+ function show(result) {
67
+ $('error').textContent = result?.isError ? (result.content ?? []).map((c) => c.text ?? '').join('\n') : ''
68
+ const count = result?.structuredContent?.count
69
+ if (count !== undefined) $('count').textContent = String(count)
70
+ }
71
+ async function call(name, args = {}) {
72
+ try {
73
+ show(await app.callServerTool({ name, arguments: args }))
74
+ } catch (e) {
75
+ $('error').textContent = String(e?.message ?? e)
76
+ }
77
+ }
78
+ const reread = () => call('show')
79
+
80
+ // Centralu's theme (the MCP Apps host context). Keep this: it applies the colour scheme, the
81
+ // standard style variables, and Centralu's own (the signal colour and the scrollbar). A change
82
+ // notification carries only what changed, so it reads the whole context the bridge keeps.
83
+ const applyTheme = () => {
84
+ const ctx = app.getHostContext() ?? {}
85
+ const root = document.documentElement
86
+ if (ctx.theme === 'light' || ctx.theme === 'dark') root.style.colorScheme = ctx.theme
87
+ const vars = { ...ctx.styles?.variables, ...ctx.centralu?.variables }
88
+ for (const [name, value] of Object.entries(vars)) if (typeof value === 'string' && value) root.style.setProperty(name, value)
89
+ }
90
+ app.onhostcontextchanged = applyTheme
91
+
92
+ app.ontoolresult = (params) => show(params)
93
+ // Centralu's own notification (not part of the MCP Apps standard): the app's state changed.
94
+ app.fallbackNotificationHandler = async (n) => {
95
+ if (n.method === 'centralu/notifications/changed') await reread()
96
+ }
97
+ $('increment').onclick = () => call('increment', { by: 1 })
98
+ $('reset').onclick = () => call('reset')
99
+ app.connect().then(() => {
100
+ applyTheme()
101
+ return reread()
102
+ })
103
+ </script>
104
+ </body>
105
+ </html>
@@ -0,0 +1,8 @@
1
+ {
2
+ "commit": "7bec5ad",
3
+ "protocolVersion": 1,
4
+ "builtAt": "2026-10-05T04:26:33.512Z",
5
+ "runtime": "system-node",
6
+ "platform": "darwin",
7
+ "arch": "arm64"
8
+ }