@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,219 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2017, Daniel Imms (MIT License).
4
+ * Copyright (c) 2018, Microsoft Corporation (MIT License).
5
+ */
6
+ Object.defineProperty(exports, "__esModule", { value: true });
7
+ var fs = require("fs");
8
+ var assert = require("assert");
9
+ var windowsTerminal_1 = require("./windowsTerminal");
10
+ var path = require("path");
11
+ var psList = require("ps-list");
12
+ function pollForProcessState(desiredState, intervalMs, timeoutMs) {
13
+ if (intervalMs === void 0) { intervalMs = 100; }
14
+ if (timeoutMs === void 0) { timeoutMs = 2000; }
15
+ return new Promise(function (resolve) {
16
+ var tries = 0;
17
+ var interval = setInterval(function () {
18
+ psList({ all: true }).then(function (ps) {
19
+ var success = true;
20
+ var pids = Object.keys(desiredState).map(function (k) { return parseInt(k, 10); });
21
+ console.log('expected pids', JSON.stringify(pids));
22
+ pids.forEach(function (pid) {
23
+ if (desiredState[pid]) {
24
+ if (!ps.some(function (p) { return p.pid === pid; })) {
25
+ console.log("pid " + pid + " does not exist");
26
+ success = false;
27
+ }
28
+ }
29
+ else {
30
+ if (ps.some(function (p) { return p.pid === pid; })) {
31
+ console.log("pid " + pid + " still exists");
32
+ success = false;
33
+ }
34
+ }
35
+ });
36
+ if (success) {
37
+ clearInterval(interval);
38
+ resolve();
39
+ return;
40
+ }
41
+ tries++;
42
+ if (tries * intervalMs >= timeoutMs) {
43
+ clearInterval(interval);
44
+ var processListing = pids.map(function (k) { return k + ": " + desiredState[k]; }).join('\n');
45
+ assert.fail("Bad process state, expected:\n" + processListing);
46
+ resolve();
47
+ }
48
+ });
49
+ }, intervalMs);
50
+ });
51
+ }
52
+ function pollForProcessTreeSize(pid, size, intervalMs, timeoutMs) {
53
+ if (intervalMs === void 0) { intervalMs = 100; }
54
+ if (timeoutMs === void 0) { timeoutMs = 2000; }
55
+ return new Promise(function (resolve) {
56
+ var tries = 0;
57
+ var interval = setInterval(function () {
58
+ psList({ all: true }).then(function (ps) {
59
+ var openList = [];
60
+ openList.push(ps.filter(function (p) { return p.pid === pid; }).map(function (p) {
61
+ return { name: p.name, pid: p.pid };
62
+ })[0]);
63
+ var list = [];
64
+ var _loop_1 = function () {
65
+ var current = openList.shift();
66
+ ps.filter(function (p) { return p.ppid === current.pid; }).map(function (p) {
67
+ return { name: p.name, pid: p.pid };
68
+ }).forEach(function (p) { return openList.push(p); });
69
+ list.push(current);
70
+ };
71
+ while (openList.length) {
72
+ _loop_1();
73
+ }
74
+ console.log('list', JSON.stringify(list));
75
+ var success = list.length === size;
76
+ if (success) {
77
+ clearInterval(interval);
78
+ resolve(list);
79
+ return;
80
+ }
81
+ tries++;
82
+ if (tries * intervalMs >= timeoutMs) {
83
+ clearInterval(interval);
84
+ assert.fail("Bad process state, expected: " + size + ", actual: " + list.length);
85
+ }
86
+ });
87
+ }, intervalMs);
88
+ });
89
+ }
90
+ if (process.platform === 'win32') {
91
+ [[false, false], [true, false], [true, true]].forEach(function (_a) {
92
+ var useConpty = _a[0], useConptyDll = _a[1];
93
+ describe("WindowsTerminal (useConpty = " + useConpty + ", useConptyDll = " + useConptyDll + ")", function () {
94
+ describe('kill', function () {
95
+ it('should not crash parent process', function (done) {
96
+ this.timeout(20000);
97
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
98
+ term.on('exit', function () { return done(); });
99
+ term.kill();
100
+ });
101
+ it('should kill the process tree', function (done) {
102
+ this.timeout(20000);
103
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
104
+ // Start sub-processes
105
+ term.write('powershell.exe\r');
106
+ term.write('node.exe\r');
107
+ console.log('start poll for tree size');
108
+ pollForProcessTreeSize(term.pid, 3, 500, 5000).then(function (list) {
109
+ assert.strictEqual(list[0].name.toLowerCase(), 'cmd.exe');
110
+ assert.strictEqual(list[1].name.toLowerCase(), 'powershell.exe');
111
+ assert.strictEqual(list[2].name.toLowerCase(), 'node.exe');
112
+ term.kill();
113
+ var desiredState = {};
114
+ desiredState[list[0].pid] = false;
115
+ desiredState[list[1].pid] = false;
116
+ desiredState[list[2].pid] = false;
117
+ term.on('exit', function () {
118
+ pollForProcessState(desiredState, 1000, 5000).then(function () {
119
+ done();
120
+ });
121
+ });
122
+ });
123
+ });
124
+ });
125
+ describe('resize', function () {
126
+ it('should throw a non-native exception when resizing an invalid value', function (done) {
127
+ this.timeout(20000);
128
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
129
+ assert.throws(function () { return term.resize(-1, -1); });
130
+ assert.throws(function () { return term.resize(0, 0); });
131
+ assert.doesNotThrow(function () { return term.resize(1, 1); });
132
+ term.on('exit', function () {
133
+ done();
134
+ });
135
+ term.kill();
136
+ });
137
+ it('should throw a non-native exception when resizing a killed terminal', function (done) {
138
+ this.timeout(20000);
139
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', [], { useConpty: useConpty, useConptyDll: useConptyDll });
140
+ term._defer(function () {
141
+ term.once('exit', function () {
142
+ assert.throws(function () { return term.resize(1, 1); });
143
+ done();
144
+ });
145
+ term.destroy();
146
+ });
147
+ });
148
+ });
149
+ describe('Args as CommandLine', function () {
150
+ it('should not fail running a file containing a space in the path', function (done) {
151
+ this.timeout(10000);
152
+ var spaceFolder = path.resolve(__dirname, '..', 'fixtures', 'space folder');
153
+ if (!fs.existsSync(spaceFolder)) {
154
+ fs.mkdirSync(spaceFolder);
155
+ }
156
+ var cmdCopiedPath = path.resolve(spaceFolder, 'cmd.exe');
157
+ var data = fs.readFileSync(process.env.windir + "\\System32\\cmd.exe");
158
+ fs.writeFileSync(cmdCopiedPath, data);
159
+ if (!fs.existsSync(cmdCopiedPath)) {
160
+ // Skip test if git bash isn't installed
161
+ return;
162
+ }
163
+ var term = new windowsTerminal_1.WindowsTerminal(cmdCopiedPath, '/c echo "hello world"', { useConpty: useConpty, useConptyDll: useConptyDll });
164
+ var result = '';
165
+ term.on('data', function (data) {
166
+ result += data;
167
+ });
168
+ term.on('exit', function () {
169
+ assert.ok(result.indexOf('hello world') >= 1);
170
+ done();
171
+ });
172
+ });
173
+ });
174
+ describe('env', function () {
175
+ it('should set environment variables of the shell', function (done) {
176
+ this.timeout(10000);
177
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C echo %FOO%', { useConpty: useConpty, useConptyDll: useConptyDll, env: { FOO: 'BAR' } });
178
+ var result = '';
179
+ term.on('data', function (data) {
180
+ result += data;
181
+ });
182
+ term.on('exit', function () {
183
+ assert.ok(result.indexOf('BAR') >= 0);
184
+ done();
185
+ });
186
+ });
187
+ });
188
+ describe('On close', function () {
189
+ it('should return process zero exit codes', function (done) {
190
+ this.timeout(10000);
191
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C exit', { useConpty: useConpty, useConptyDll: useConptyDll });
192
+ term.on('exit', function (code) {
193
+ assert.strictEqual(code, 0);
194
+ done();
195
+ });
196
+ });
197
+ it('should return process non-zero exit codes', function (done) {
198
+ this.timeout(10000);
199
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '/C exit 2', { useConpty: useConpty, useConptyDll: useConptyDll });
200
+ term.on('exit', function (code) {
201
+ assert.strictEqual(code, 2);
202
+ done();
203
+ });
204
+ });
205
+ });
206
+ describe('Write', function () {
207
+ it('should accept input', function (done) {
208
+ this.timeout(10000);
209
+ var term = new windowsTerminal_1.WindowsTerminal('cmd.exe', '', { useConpty: useConpty, useConptyDll: useConptyDll });
210
+ term.write('exit\r');
211
+ term.on('exit', function () {
212
+ done();
213
+ });
214
+ });
215
+ });
216
+ });
217
+ });
218
+ }
219
+ //# sourceMappingURL=windowsTerminal.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"windowsTerminal.test.js","sourceRoot":"","sources":["../src/windowsTerminal.test.ts"],"names":[],"mappings":";AAAA;;;GAGG;;AAEH,uBAAyB;AACzB,+BAAiC;AACjC,qDAAoD;AACpD,2BAA6B;AAC7B,gCAAkC;AAYlC,SAAS,mBAAmB,CAAC,YAA2B,EAAE,UAAwB,EAAE,SAAwB;IAAlD,2BAAA,EAAA,gBAAwB;IAAE,0BAAA,EAAA,gBAAwB;IAC1G,OAAO,IAAI,O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C;oBAC7E,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;oBACrB,IAAI,CAAC,EAAE,CAAC,MAAM,EAAE;wBACd,IAAI,EAAE,CAAC;oBACT,CAAC,CAAC,CAAC;gBACL,CAAC,CAAC,CAAC;YACL,CAAC,CAAC,CAAC;QACL,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;CACJ"}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+ /**
3
+ * Copyright (c) 2020, Microsoft Corporation (MIT License).
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ var worker_threads_1 = require("worker_threads");
7
+ var net_1 = require("net");
8
+ var conout_1 = require("../shared/conout");
9
+ var conoutPipeName = worker_threads_1.workerData.conoutPipeName;
10
+ var conoutSocket = new net_1.Socket();
11
+ conoutSocket.setEncoding('utf8');
12
+ conoutSocket.connect(conoutPipeName, function () {
13
+ var server = net_1.createServer(function (workerSocket) {
14
+ conoutSocket.pipe(workerSocket);
15
+ });
16
+ server.listen(conout_1.getWorkerPipeName(conoutPipeName));
17
+ if (!worker_threads_1.parentPort) {
18
+ throw new Error('worker_threads parentPort is null');
19
+ }
20
+ worker_threads_1.parentPort.postMessage(1 /* READY */);
21
+ });
22
+ //# sourceMappingURL=conoutSocketWorker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"conoutSocketWorker.js","sourceRoot":"","sources":["../../src/worker/conoutSocketWorker.ts"],"names":[],"mappings":";AAAA;;GAEG;;AAEH,iDAAwD;AACxD,2BAA2C;AAC3C,2CAAuF;AAE/E,IAAA,cAAc,GAAM,2BAA0B,eAAhC,CAAiC;AAEvD,IAAM,YAAY,GAAG,IAAI,YAAM,EAAE,CAAC;AAClC,YAAY,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;AACjC,YAAY,CAAC,OAAO,CAAC,cAAc,EAAE;IACnC,IAAM,MAAM,GAAG,kBAAY,CAAC,UAAA,YAAY;QACtC,YAAY,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;IAClC,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,MAAM,CAAC,0BAAiB,CAAC,cAAc,CAAC,CAAC,CAAC;IACjD,IAAI,CAAC,2BAAU,EAAE;QACf,MAAM,IAAI,KAAK,CAAC,mCAAmC,CAAC,CAAC;KACtD;IACD,2BAAU,CAAC,WAAW,eAA2B,CAAC;AACpD,CAAC,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ {
2
+ "name": "node-pty",
3
+ "description": "Fork pseudoterminals in Node.JS",
4
+ "author": {
5
+ "name": "Microsoft Corporation"
6
+ },
7
+ "version": "1.1.0",
8
+ "license": "MIT",
9
+ "main": "./lib/index.js",
10
+ "types": "./typings/node-pty.d.ts",
11
+ "repository": {
12
+ "type": "git",
13
+ "url": "git://github.com/microsoft/node-pty.git"
14
+ },
15
+ "files": [
16
+ "binding.gyp",
17
+ "lib/",
18
+ "scripts/",
19
+ "src/",
20
+ "deps/",
21
+ "prebuilds/",
22
+ "third_party/",
23
+ "typings/"
24
+ ],
25
+ "homepage": "https://github.com/microsoft/node-pty",
26
+ "bugs": {
27
+ "url": "https://github.com/microsoft/node-pty/issues"
28
+ },
29
+ "keywords": [
30
+ "pty",
31
+ "tty",
32
+ "terminal",
33
+ "pseudoterminal",
34
+ "forkpty",
35
+ "openpty"
36
+ ],
37
+ "scripts": {
38
+ "build": "tsc -b ./src/tsconfig.json",
39
+ "watch": "tsc -b -w ./src/tsconfig.json",
40
+ "lint": "eslint -c .eslintrc.js --ext .ts src/",
41
+ "install": "node scripts/prebuild.js || node-gyp rebuild",
42
+ "postinstall": "node scripts/post-install.js",
43
+ "compileCommands": "node scripts/gen-compile-commands.js",
44
+ "test": "cross-env NODE_ENV=test mocha -R spec --exit lib/*.test.js",
45
+ "posttest": "npm run lint",
46
+ "prepare": "npm run build",
47
+ "prepublishOnly": "npm run build"
48
+ },
49
+ "dependencies": {
50
+ "node-addon-api": "^7.1.0"
51
+ },
52
+ "devDependencies": {
53
+ "@types/mocha": "^7.0.2",
54
+ "@types/node": "12",
55
+ "@typescript-eslint/eslint-plugin": "^2.27.0",
56
+ "@typescript-eslint/parser": "^2.27.0",
57
+ "cross-env": "^5.1.4",
58
+ "eslint": "^6.8.0",
59
+ "mocha": "10",
60
+ "node-gyp": "^11.4.2",
61
+ "ps-list": "^6.0.0",
62
+ "typescript": "^3.8.3"
63
+ }
64
+ }
@@ -0,0 +1,98 @@
1
+ -- Centralu local storage schema v1
2
+ -- Read by the host (better-sqlite3). Migrations are handled by the steps in dev-services/store.ts.
3
+ --
4
+ -- **user_version is never set here.** This file runs every time the database is opened (safe,
5
+ -- since every table uses CREATE IF NOT EXISTS), so if `PRAGMA user_version = 1` were here, a
6
+ -- database already at v27 would reset to 1 on every open and **rerun all 26 migrations**.
7
+ -- Measured (2026-09-02, store.db at 94MB, 66,700 messages): 4.4 to 5.0 seconds per open, of
8
+ -- which v3 (1.4s), v11 (1.7s) and v21 (1.7s) were each a full table scan — a startup cost that
9
+ -- only grows as the conversation history piles up.
10
+ --
11
+ -- Leaving the value unset entirely means a new database starts at 0 and runs every step once
12
+ -- (the same as before), while an existing database keeps whatever number the last step left
13
+ -- behind, so nothing reruns.
14
+
15
+ CREATE TABLE IF NOT EXISTS projects (
16
+ id TEXT PRIMARY KEY,
17
+ path TEXT NOT NULL UNIQUE,
18
+ name TEXT NOT NULL,
19
+ default_tool TEXT NOT NULL DEFAULT 'claude',
20
+ -- The default model and effort per tool (#107): {"codex":{"model":"gpt-5.6","effort":"high"}, ...}.
21
+ -- This is where the scalars default_model/default_effort used to be — a model name is a tool's
22
+ -- own vocabulary, so remembering a single one with no tool attached meant a session for a
23
+ -- different tool inherited that name and died on its first turn.
24
+ default_models TEXT,
25
+ sidebar_order INTEGER NOT NULL DEFAULT 0,
26
+ created_at INTEGER NOT NULL
27
+ );
28
+
29
+ CREATE TABLE IF NOT EXISTS sessions (
30
+ id TEXT PRIMARY KEY,
31
+ -- The orchestrator does not belong to any project (one per app, crossing all projects).
32
+ -- Making this NOT NULL would force it to hang off some project, and deleting that project
33
+ -- would kill it too via CASCADE.
34
+ project_id TEXT REFERENCES projects(id) ON DELETE CASCADE,
35
+ tool TEXT NOT NULL,
36
+ external_id TEXT,
37
+ name TEXT NOT NULL,
38
+ auto_named INTEGER NOT NULL DEFAULT 1,
39
+ state TEXT NOT NULL DEFAULT 'idle',
40
+ is_orchestrator INTEGER NOT NULL DEFAULT 0,
41
+ last_read_seq INTEGER NOT NULL DEFAULT 0,
42
+ waiting_since INTEGER,
43
+ created_at INTEGER NOT NULL
44
+ );
45
+ CREATE INDEX IF NOT EXISTS idx_sessions_project ON sessions(project_id);
46
+
47
+ CREATE TABLE IF NOT EXISTS messages (
48
+ session_id TEXT NOT NULL REFERENCES sessions(id) ON DELETE CASCADE,
49
+ seq INTEGER NOT NULL,
50
+ role TEXT NOT NULL,
51
+ kind TEXT NOT NULL,
52
+ payload TEXT NOT NULL,
53
+ ts INTEGER NOT NULL,
54
+ PRIMARY KEY (session_id, seq)
55
+ );
56
+
57
+ -- "Always allow" rules (FR-3). Uses session_id when scope=session, project_id when scope=project
58
+ CREATE TABLE IF NOT EXISTS approval_rules (
59
+ id INTEGER PRIMARY KEY AUTOINCREMENT,
60
+ scope TEXT NOT NULL,
61
+ project_id TEXT,
62
+ session_id TEXT,
63
+ matcher TEXT NOT NULL,
64
+ decision TEXT NOT NULL,
65
+ created_at INTEGER NOT NULL
66
+ );
67
+
68
+ -- Unused: a usage aggregate planned for the first milestone and never built (docs/agent-host.md §6); no build has ever
69
+ -- written a row. Released builds up to v0.1.0-beta.10 still run `DELETE FROM usage_facts` when a project is deleted.
70
+ -- Dropping it is a contract step (docs/agent-host.md §5.1 rule 2: an older copy of this file creates it), so it waits
71
+ -- for a release after the first one that no longer touches the table (#372 follow-up).
72
+ CREATE TABLE IF NOT EXISTS usage_facts (
73
+ date TEXT NOT NULL,
74
+ tool TEXT NOT NULL,
75
+ model TEXT NOT NULL,
76
+ project_id TEXT,
77
+ input_tokens INTEGER NOT NULL DEFAULT 0,
78
+ output_tokens INTEGER NOT NULL DEFAULT 0,
79
+ cache_tokens INTEGER NOT NULL DEFAULT 0,
80
+ cost_est REAL NOT NULL DEFAULT 0,
81
+ PRIMARY KEY (date, tool, model, project_id)
82
+ );
83
+
84
+ CREATE TABLE IF NOT EXISTS workspace (
85
+ id INTEGER PRIMARY KEY CHECK (id = 1),
86
+ layout TEXT NOT NULL,
87
+ updated_at INTEGER NOT NULL
88
+ );
89
+
90
+ -- Commit attribution (#50): which session made this commit — recorded only here, never in the repository.
91
+ -- The hash is picked up from the agent's git commit tool output, so it can be short (matched by prefix).
92
+ CREATE TABLE IF NOT EXISTS commit_sessions (
93
+ project_id TEXT NOT NULL,
94
+ sha TEXT NOT NULL,
95
+ session_id TEXT NOT NULL,
96
+ ts INTEGER NOT NULL,
97
+ PRIMARY KEY (project_id, sha)
98
+ );
@@ -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": "6d18a3e",
3
3
  "protocolVersion": 1,
4
- "builtAt": "2026-10-05T04:26:33.512Z",
4
+ "builtAt": "2026-10-08T05:46:15.346Z",
5
5
  "runtime": "system-node",
6
6
  "platform": "darwin",
7
7
  "arch": "arm64"
@@ -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 });