@centralu/win32-x64 0.1.0-beta.9

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 (85) hide show
  1. package/Centralu/centralu.exe +0 -0
  2. package/Centralu/resources/host/app-template/AGENTS.md +87 -0
  3. package/Centralu/resources/host/app-template/CLAUDE.md +1 -0
  4. package/Centralu/resources/host/app-template/centralu.app.json +9 -0
  5. package/Centralu/resources/host/app-template/gitattributes +2 -0
  6. package/Centralu/resources/host/app-template/runtime/THIRD_PARTY_LICENSES.txt +950 -0
  7. package/Centralu/resources/host/app-template/runtime/centralu-app-runtime.mjs +82 -0
  8. package/Centralu/resources/host/app-template/runtime/centralu-app-runtime.mjs.map +1 -0
  9. package/Centralu/resources/host/app-template/runtime/mcp-app.js +104 -0
  10. package/Centralu/resources/host/app-template/server.mjs +71 -0
  11. package/Centralu/resources/host/app-template/ui/index.html +74 -0
  12. package/Centralu/resources/host/bundle-info.json +8 -0
  13. package/Centralu/resources/host/codex-orchestrator-bridge.mjs +3858 -0
  14. package/Centralu/resources/host/main.mjs +111374 -0
  15. package/Centralu/resources/host/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
  16. package/Centralu/resources/host/node_modules/better-sqlite3/lib/binding.js +62 -0
  17. package/Centralu/resources/host/node_modules/better-sqlite3/lib/darwin-arm64.js +3 -0
  18. package/Centralu/resources/host/node_modules/better-sqlite3/lib/darwin-x64.js +3 -0
  19. package/Centralu/resources/host/node_modules/better-sqlite3/lib/database.js +109 -0
  20. package/Centralu/resources/host/node_modules/better-sqlite3/lib/index.js +3 -0
  21. package/Centralu/resources/host/node_modules/better-sqlite3/lib/linux-arm64.js +3 -0
  22. package/Centralu/resources/host/node_modules/better-sqlite3/lib/linux-x64.js +3 -0
  23. package/Centralu/resources/host/node_modules/better-sqlite3/lib/linuxmusl-arm64.js +4 -0
  24. package/Centralu/resources/host/node_modules/better-sqlite3/lib/linuxmusl-x64.js +4 -0
  25. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/aggregate.js +43 -0
  26. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/backup.js +67 -0
  27. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/explain.js +9 -0
  28. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/function.js +31 -0
  29. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/inspect.js +7 -0
  30. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/pragma.js +12 -0
  31. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/serialize.js +16 -0
  32. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/table.js +195 -0
  33. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/transaction.js +78 -0
  34. package/Centralu/resources/host/node_modules/better-sqlite3/lib/methods/wrappers.js +54 -0
  35. package/Centralu/resources/host/node_modules/better-sqlite3/lib/sqlite-error.js +25 -0
  36. package/Centralu/resources/host/node_modules/better-sqlite3/lib/util.js +12 -0
  37. package/Centralu/resources/host/node_modules/better-sqlite3/lib/win32-arm64.js +3 -0
  38. package/Centralu/resources/host/node_modules/better-sqlite3/lib/win32-x64.js +3 -0
  39. package/Centralu/resources/host/node_modules/better-sqlite3/package.json +67 -0
  40. package/Centralu/resources/host/node_modules/better-sqlite3/prebuilds/win32-x64.node +0 -0
  41. package/Centralu/resources/host/node_modules/node-pty/lib/conpty_console_list_agent.js +16 -0
  42. package/Centralu/resources/host/node_modules/node-pty/lib/conpty_console_list_agent.js.map +1 -0
  43. package/Centralu/resources/host/node_modules/node-pty/lib/eventEmitter2.js +47 -0
  44. package/Centralu/resources/host/node_modules/node-pty/lib/eventEmitter2.js.map +1 -0
  45. package/Centralu/resources/host/node_modules/node-pty/lib/eventEmitter2.test.js +30 -0
  46. package/Centralu/resources/host/node_modules/node-pty/lib/eventEmitter2.test.js.map +1 -0
  47. package/Centralu/resources/host/node_modules/node-pty/lib/index.js +52 -0
  48. package/Centralu/resources/host/node_modules/node-pty/lib/index.js.map +1 -0
  49. package/Centralu/resources/host/node_modules/node-pty/lib/interfaces.js +7 -0
  50. package/Centralu/resources/host/node_modules/node-pty/lib/interfaces.js.map +1 -0
  51. package/Centralu/resources/host/node_modules/node-pty/lib/shared/conout.js +11 -0
  52. package/Centralu/resources/host/node_modules/node-pty/lib/shared/conout.js.map +1 -0
  53. package/Centralu/resources/host/node_modules/node-pty/lib/terminal.js +190 -0
  54. package/Centralu/resources/host/node_modules/node-pty/lib/terminal.js.map +1 -0
  55. package/Centralu/resources/host/node_modules/node-pty/lib/terminal.test.js +139 -0
  56. package/Centralu/resources/host/node_modules/node-pty/lib/terminal.test.js.map +1 -0
  57. package/Centralu/resources/host/node_modules/node-pty/lib/testUtils.test.js +28 -0
  58. package/Centralu/resources/host/node_modules/node-pty/lib/testUtils.test.js.map +1 -0
  59. package/Centralu/resources/host/node_modules/node-pty/lib/types.js +7 -0
  60. package/Centralu/resources/host/node_modules/node-pty/lib/types.js.map +1 -0
  61. package/Centralu/resources/host/node_modules/node-pty/lib/unixTerminal.js +346 -0
  62. package/Centralu/resources/host/node_modules/node-pty/lib/unixTerminal.js.map +1 -0
  63. package/Centralu/resources/host/node_modules/node-pty/lib/unixTerminal.test.js +351 -0
  64. package/Centralu/resources/host/node_modules/node-pty/lib/unixTerminal.test.js.map +1 -0
  65. package/Centralu/resources/host/node_modules/node-pty/lib/utils.js +39 -0
  66. package/Centralu/resources/host/node_modules/node-pty/lib/utils.js.map +1 -0
  67. package/Centralu/resources/host/node_modules/node-pty/lib/windowsConoutConnection.js +125 -0
  68. package/Centralu/resources/host/node_modules/node-pty/lib/windowsConoutConnection.js.map +1 -0
  69. package/Centralu/resources/host/node_modules/node-pty/lib/windowsPtyAgent.js +320 -0
  70. package/Centralu/resources/host/node_modules/node-pty/lib/windowsPtyAgent.js.map +1 -0
  71. package/Centralu/resources/host/node_modules/node-pty/lib/windowsPtyAgent.test.js +90 -0
  72. package/Centralu/resources/host/node_modules/node-pty/lib/windowsPtyAgent.test.js.map +1 -0
  73. package/Centralu/resources/host/node_modules/node-pty/lib/windowsTerminal.js +199 -0
  74. package/Centralu/resources/host/node_modules/node-pty/lib/windowsTerminal.js.map +1 -0
  75. package/Centralu/resources/host/node_modules/node-pty/lib/windowsTerminal.test.js +219 -0
  76. package/Centralu/resources/host/node_modules/node-pty/lib/windowsTerminal.test.js.map +1 -0
  77. package/Centralu/resources/host/node_modules/node-pty/lib/worker/conoutSocketWorker.js +22 -0
  78. package/Centralu/resources/host/node_modules/node-pty/lib/worker/conoutSocketWorker.js.map +1 -0
  79. package/Centralu/resources/host/node_modules/node-pty/package.json +64 -0
  80. package/Centralu/resources/host/node_modules/node-pty/prebuilds/win32-x64/conpty.node +0 -0
  81. package/Centralu/resources/host/node_modules/node-pty/prebuilds/win32-x64/conpty_console_list.node +0 -0
  82. package/Centralu/resources/host/node_modules/node-pty/prebuilds/win32-x64/pty.node +0 -0
  83. package/Centralu/resources/host/schema.sql +94 -0
  84. package/README.md +12 -0
  85. package/package.json +21 -0
Binary file
@@ -0,0 +1,87 @@
1
+ # {{APP_NAME}} — a Centralu app
2
+
3
+ This folder is one app. Centralu runs `server.mjs` as an MCP server; people use it through its
4
+ screen (`ui/index.html`) and agents call the same tools as functions. Same tools, one code path.
5
+
6
+ ## Files
7
+
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.
10
+ - `server.mjs` — the MCP server. Change it.
11
+ - `ui/index.html` — the screen. Change it. It is read on every open, so edits show without a restart.
12
+ - `runtime/` — **generated by Centralu. Never edit, format, move, or read it in full.** It is replaced
13
+ when Centralu updates. Everything you need is imported from `./runtime/centralu-app-runtime.mjs`:
14
+ `McpServer`, `serveStdio`, `z` (zod), `centralu`, `inputRequired`, `acceptedContent`.
15
+
16
+ ## Rules
17
+
18
+ 1. **No installs.** No `npm install`, no `package.json`, no imports other than Node built-ins
19
+ (`node:*`) and the runtime. The app must start with `node server.mjs` alone.
20
+ 2. **Tool names** use letters, digits, `_` or `-`. **Never `__`** (two underscores separate names
21
+ in agent sessions; Centralu drops such tools).
22
+ 3. **Register tools with `centralu.tool(server, name, config, handler)`** (same arguments as
23
+ `server.registerTool`). The handler then knows which call it is serving, which
24
+ `centralu.agent()` needs.
25
+ 4. **Annotate every tool**: `annotations: { readOnlyHint: true }` if it only reads,
26
+ `readOnlyHint: false` if it changes anything. Read-only tools run without asking the person;
27
+ the others follow the session's approval setting. The same hint decides refreshes: every call to
28
+ a tool that is not `readOnlyHint: true` tells this app's open screens to read again (rule 8). A
29
+ read tool left unannotated costs a refresh cycle each time it is called, and screens that re-read
30
+ with it keep refreshing each other.
31
+ 5. **Visibility**: by default a tool is visible to agents and to the screen. A tool only the screen
32
+ should call gets `_meta: { ui: { visibility: ['app'] } }`; one only agents should call gets
33
+ `['model']`.
34
+ 6. **A tool with a screen** gets `_meta: { ui: { resourceUri: 'ui://{{APP_ID}}/…' } }`, and the
35
+ resource is registered with `centralu.uiResource(server, name, uri, new URL('./ui/…', import.meta.url))`.
36
+ The `home` tool must have one and must be visible to the screen.
37
+ 7. **State lives in the server, never in the screen.** Keep it in memory and save it in the data
38
+ folder with `await centralu.readJson(file, fallback)` / `await centralu.writeJson(file, value)`
39
+ (or any file under `centralu.dataDir`). **Never write files into this folder** — a project app's
40
+ folder is committed to git and shared with the team. The screen may not use browser storage
41
+ (it runs in an isolated frame).
42
+ 8. **The screen re-reads, it does not remember.** When anyone calls one of this app's tools that
43
+ is not `readOnlyHint: true`, Centralu sends open screens `centralu/notifications/changed` (the
44
+ screen that made the call does not get it: it already has the answer); the template's screen
45
+ then calls `show` again. Keep that handler, and keep `show` read-only.
46
+ 9. **stdout is the MCP channel.** `console.log` is redirected to stderr for you; never write to
47
+ `process.stdout` yourself. stderr is shown to the person when the app fails.
48
+ 10. **Asking the agent**: inside a tool handler, `await centralu.agent('prompt', { schema, tool })`
49
+ asks the agent of the person using Centralu. Each call runs in a new session under this app
50
+ (the person can read it), with the `safe` approval setting, and returns the agent's final
51
+ answer: text, or with `schema` (a JSON Schema whose top level is an object) JSON of that shape,
52
+ checked by Centralu. Under `safe` the agent reads without asking, but every file write and
53
+ command waits for the person to approve it in that session, so ask the agent for an answer and
54
+ do the writing in your own tool code. Declare `"uses": { "agent": true }` in the manifest for the person's
55
+ default agent, or a list such as `["codex"]` to pick one with `tool`. The prompt reaches the
56
+ agent marked as written by this app, not by the person, so say plainly what you need. A run
57
+ takes seconds to minutes; the helper keeps the call alive while it waits. An app runs one agent
58
+ at a time and at most 5 a minute: put a batch of work into one prompt instead of a loop.
59
+ 11. **Calling another app**: inside a tool handler, `await centralu.callApp('other-app', 'tool', args)`
60
+ calls a tool of another app and returns its answer (JSON if the tool returns structured
61
+ content, else text). Declare the app in `"uses": { "apps": ["other-app"] }`. Only tools open to
62
+ agents (visibility `model`) can be called. A project app reaches apps of its own project first,
63
+ then apps in the person's user folder; an app in the user folder reaches only user-folder apps.
64
+ A chain of apps calling apps stops at 3 calls deep, and an app tool already in the chain cannot
65
+ be called again from inside it.
66
+ 12. **Reading Centralu's data**: inside a tool handler, `await centralu.host('sessions.list')` or
67
+ `await centralu.host('git.status')` returns JSON. These two names are the whole list; declare
68
+ each one you use in `"uses": { "host": [...] }`. `sessions.list` gives this project's sessions
69
+ (the names shown in the sidebar and their states, never the conversations); `git.status` gives this project's branch and changed
70
+ files (project apps only).
71
+
72
+ All three throw an error that says what Centralu answered. The first time the app uses each of them (an
73
+ agent tool, another app, a host name), Centralu asks the person once — on the session's approval card
74
+ when an agent's call started it, on this app's screen when the screen did — and remembers the answer
75
+ until the manifest's `uses` changes. The call waits while the person decides (up to 5 minutes). A
76
+ refusal comes back as that error: show it plainly instead of retrying.
77
+
78
+ ## Checking your work
79
+
80
+ - Call Centralu's **`check`** tool after changes. It validates the manifest, starts the app, lists
81
+ its tools for real, reads every screen the tools point to, and reports problems (tool names,
82
+ visibility, missing annotations, a `home` without a screen) with the app's stderr.
83
+ - Centralu restarts the app once at the end of your turn if this folder changed; calls in progress
84
+ finish first. Agents in other sessions see changed tools from their next turn (Claude) or next
85
+ thread (Codex).
86
+ - Errors in `server.mjs` are printed with file and line. A failure inside `runtime/` is almost always
87
+ a wrong argument from `server.mjs` — look at the first frame outside `runtime/`.
@@ -0,0 +1 @@
1
+ @AGENTS.md
@@ -0,0 +1,9 @@
1
+ {
2
+ "manifestVersion": 1,
3
+ "id": "{{APP_ID}}",
4
+ "name": "{{APP_NAME}}",
5
+ "version": "0.1.0",
6
+ "description": "{{APP_DESCRIPTION}}",
7
+ "server": { "command": "node", "args": ["--enable-source-maps", "server.mjs"] },
8
+ "home": "show"
9
+ }
@@ -0,0 +1,2 @@
1
+ # runtime/ is generated by Centralu and replaced when Centralu updates — not reviewed, not diffed.
2
+ runtime/** linguist-generated=true -diff