@mcsherrylabs/pi-meerkat 0.7.0 → 0.10.1

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 (63) hide show
  1. package/README.md +109 -33
  2. package/dist/installer/committee-init.sh +117 -0
  3. package/dist/installer/committee.conf +102 -0
  4. package/dist/installer/genesis.devnet.conf +92 -0
  5. package/dist/installer/node-join.sh +235 -0
  6. package/dist/installer/node.conf +238 -0
  7. package/dist/installer/node.devnet.conf +238 -0
  8. package/dist/installer/runtime.json +1 -0
  9. package/dist/installer-runtime/dist/scripts/recover-owner.js +15 -0
  10. package/dist/installer-runtime/dist/scripts/subscriptions-init.js +35 -0
  11. package/dist/installer-runtime/dist/scripts/versions.mjs +86 -0
  12. package/dist/installer-runtime/dist/scripts/wait-for-chain.js +90 -0
  13. package/dist/installer-runtime/dist/src/announcements.js +448 -0
  14. package/dist/installer-runtime/dist/src/app.js +552 -0
  15. package/dist/installer-runtime/dist/src/chainfetch.js +87 -0
  16. package/dist/installer-runtime/dist/src/env.js +437 -0
  17. package/dist/installer-runtime/dist/src/registry/announce.js +77 -0
  18. package/dist/installer-runtime/dist/src/registry/announcement.js +141 -0
  19. package/dist/installer-runtime/dist/src/registry/dependencies.js +28 -0
  20. package/dist/installer-runtime/dist/src/registry/detail.js +87 -0
  21. package/dist/installer-runtime/dist/src/registry/drainer.js +131 -0
  22. package/dist/installer-runtime/dist/src/registry/http.js +194 -0
  23. package/dist/installer-runtime/dist/src/registry/index.js +61 -0
  24. package/dist/installer-runtime/dist/src/registry/lease.js +35 -0
  25. package/dist/installer-runtime/dist/src/registry/ownership.js +31 -0
  26. package/dist/installer-runtime/dist/src/registry/provision.js +225 -0
  27. package/dist/installer-runtime/dist/src/registry/store.js +242 -0
  28. package/dist/installer-runtime/dist/src/registry/sweep.js +9 -0
  29. package/dist/installer-runtime/dist/src/registry/worker-module.js +87 -0
  30. package/dist/installer-runtime/dist/src/runtime.js +192 -0
  31. package/dist/installer-runtime/dist/src/store.js +138 -0
  32. package/dist/installer-runtime/package.json +1 -0
  33. package/dist/installer.d.ts +401 -0
  34. package/dist/installer.d.ts.map +1 -0
  35. package/dist/installer.js +446 -0
  36. package/dist/installer.js.map +1 -0
  37. package/dist/mcp-announce.d.ts +18 -0
  38. package/dist/mcp-announce.d.ts.map +1 -1
  39. package/dist/mcp-announce.js +18 -4
  40. package/dist/mcp-announce.js.map +1 -1
  41. package/dist/mcp-cli.d.ts.map +1 -1
  42. package/dist/mcp-cli.js +41 -5
  43. package/dist/mcp-cli.js.map +1 -1
  44. package/dist/mcp-config.d.ts +1 -0
  45. package/dist/mcp-config.d.ts.map +1 -1
  46. package/dist/mcp-config.js +2 -1
  47. package/dist/mcp-config.js.map +1 -1
  48. package/dist/mcp-upstream.d.ts +1 -1
  49. package/dist/mcp-upstream.d.ts.map +1 -1
  50. package/dist/mcp-upstream.js +7 -2
  51. package/dist/mcp-upstream.js.map +1 -1
  52. package/dist/registry.d.ts.map +1 -1
  53. package/dist/registry.js +8 -4
  54. package/dist/registry.js.map +1 -1
  55. package/dist/tools.js +4 -4
  56. package/dist/tools.js.map +1 -1
  57. package/installer/Committee.Dockerfile +6 -0
  58. package/installer/Node.Dockerfile +10 -0
  59. package/installer/Registry.Dockerfile +13 -0
  60. package/installer/runtime-control.mjs +335 -0
  61. package/installer/session-files.mjs +16 -0
  62. package/package.json +8 -7
  63. package/skills/channel-subscription/SKILL.md +3 -3
@@ -0,0 +1,401 @@
1
+ export type Mode = 'devnet' | 'local';
2
+ export interface Installation {
3
+ version: 1;
4
+ uid: number;
5
+ id: string;
6
+ dir: string;
7
+ project: string;
8
+ mode: Mode;
9
+ nodeId: string;
10
+ committeeId?: string;
11
+ identity: string;
12
+ registryOperator: string;
13
+ channel: string;
14
+ ports: [number, number, number];
15
+ packageVersion: string;
16
+ daemonId: string;
17
+ initialization: 'pending' | 'attempted' | 'complete';
18
+ ready?: true;
19
+ binding?: {
20
+ chainId: string;
21
+ nodeId: string;
22
+ };
23
+ }
24
+ export interface InstallerDeps {
25
+ command(command: string, args: string[], env?: NodeJS.ProcessEnv, cwd?: string): Promise<string>;
26
+ committeeReady?(state: Installation, env: NodeJS.ProcessEnv): Promise<void>;
27
+ nodeBinding(state: Installation, env: NodeJS.ProcessEnv): Promise<{
28
+ chainId: string;
29
+ nodeId: string;
30
+ }>;
31
+ registryReady(state: Installation, env: NodeJS.ProcessEnv): Promise<void>;
32
+ bootstrap(state: Installation, env: NodeJS.ProcessEnv): Promise<void>;
33
+ claimChannel?(state: Installation, env: NodeJS.ProcessEnv): Promise<void>;
34
+ }
35
+ export declare function managedDirectory(env?: NodeJS.ProcessEnv): string;
36
+ /** Per-mode state directory. The 0.8.0 path `<state>/meerkat/` (installation.json) is never used. */
37
+ export declare function modeDirectory(mode: Mode, env?: NodeJS.ProcessEnv): string;
38
+ export declare const managedConfigPath: (mode?: Mode, env?: NodeJS.ProcessEnv) => string;
39
+ export declare function pinnedRegistration(version: string, mode?: Mode): {
40
+ mcpServers: {
41
+ meerkat: {
42
+ command: string;
43
+ args: string[];
44
+ };
45
+ };
46
+ };
47
+ export declare function renderDeployment(state: Installation): {
48
+ name: string;
49
+ services: {
50
+ node: {
51
+ image: string;
52
+ labels: {
53
+ "io.meerkat.installation": string;
54
+ };
55
+ container_name: string;
56
+ entrypoint: string[];
57
+ build: {
58
+ context: string;
59
+ dockerfile: string;
60
+ labels: {
61
+ "io.meerkat.installation": string;
62
+ };
63
+ args: {
64
+ EVOLVER_NODE_IMAGE: string;
65
+ };
66
+ };
67
+ environment: {
68
+ APP_NODE_ID: string;
69
+ DEVNET_API: string;
70
+ EVOLVER_UPSTREAM_NODE_ID: string;
71
+ EVOLVER_DA_PEERS: string;
72
+ EVOLVER_ALLOWED_OUTBOUND: string;
73
+ EVOLVER_EXECUTION_ENABLED: string;
74
+ EVOLVER_NODE_PORT: string;
75
+ EVOLVER_NODE_CONFIG: string;
76
+ CLAIM_TIMEOUT?: undefined;
77
+ CLAIM_WATCH_SECS?: undefined;
78
+ };
79
+ group_add: string[];
80
+ volumes: string[];
81
+ restart: string;
82
+ };
83
+ registry: {
84
+ image: string;
85
+ labels: {
86
+ "io.meerkat.installation": string;
87
+ };
88
+ container_name: string;
89
+ build: {
90
+ context: string;
91
+ dockerfile: string;
92
+ labels: {
93
+ "io.meerkat.installation": string;
94
+ };
95
+ };
96
+ user: string;
97
+ group_add: string[];
98
+ environment: {
99
+ EVOLVER_FAUCET_URL: string;
100
+ EVOLVER_CHAIN_ID: string;
101
+ APP_NODE_ID: string;
102
+ EVOLVER_SUBSCRIPTIONS_FILE: string;
103
+ REGISTRY_CHANNEL: string;
104
+ REGISTRY_CHANNEL_OPERATOR: string;
105
+ REGISTRY_READ_ONLY: string;
106
+ REGISTRY_CONTENT_URL: string;
107
+ PROCESSOR_HTTP_PORT: string;
108
+ PROCESSOR_READ_HOST: string;
109
+ EVOLVER_PROCESSOR_CONTROL_SOCKET: string;
110
+ EVOLVER_DEVNET_URL?: string | undefined;
111
+ EVOLVER_TARGET: string;
112
+ EVOLVER_NODE: string;
113
+ };
114
+ volumes: string[];
115
+ restart: string;
116
+ };
117
+ 'subscriptions-init': {
118
+ image: string;
119
+ labels: {
120
+ "io.meerkat.installation": string;
121
+ };
122
+ profiles: string[];
123
+ user: string;
124
+ environment: {
125
+ EVOLVER_INITIAL_CHANNELS: string;
126
+ EVOLVER_OPERATOR_UID: string;
127
+ EVOLVER_OPERATOR_GID: string;
128
+ EVOLVER_FAUCET_URL: string;
129
+ EVOLVER_CHAIN_ID: string;
130
+ APP_NODE_ID: string;
131
+ EVOLVER_SUBSCRIPTIONS_FILE: string;
132
+ REGISTRY_CHANNEL: string;
133
+ REGISTRY_CHANNEL_OPERATOR: string;
134
+ REGISTRY_READ_ONLY: string;
135
+ REGISTRY_CONTENT_URL: string;
136
+ PROCESSOR_HTTP_PORT: string;
137
+ PROCESSOR_READ_HOST: string;
138
+ EVOLVER_PROCESSOR_CONTROL_SOCKET: string;
139
+ EVOLVER_DEVNET_URL?: string | undefined;
140
+ EVOLVER_TARGET: string;
141
+ EVOLVER_NODE: string;
142
+ };
143
+ entrypoint: string[];
144
+ command: string[];
145
+ volumes: string[];
146
+ };
147
+ committee?: undefined;
148
+ };
149
+ volumes: {
150
+ 'node-data': {
151
+ name: string;
152
+ labels: {
153
+ "io.meerkat.installation": string;
154
+ };
155
+ };
156
+ 'app-state': {
157
+ name: string;
158
+ labels: {
159
+ "io.meerkat.installation": string;
160
+ };
161
+ };
162
+ subscriptions: {
163
+ name: string;
164
+ labels: {
165
+ "io.meerkat.installation": string;
166
+ };
167
+ };
168
+ 'agent-state': {
169
+ name: string;
170
+ labels: {
171
+ "io.meerkat.installation": string;
172
+ };
173
+ };
174
+ 'node-control': {
175
+ name: string;
176
+ labels: {
177
+ "io.meerkat.installation": string;
178
+ };
179
+ };
180
+ control: {
181
+ name: string;
182
+ labels: {
183
+ "io.meerkat.installation": string;
184
+ };
185
+ };
186
+ 'committee-data'?: undefined;
187
+ genesis?: undefined;
188
+ };
189
+ networks: {
190
+ default: {
191
+ name: string;
192
+ labels: {
193
+ "io.meerkat.installation": string;
194
+ };
195
+ internal?: undefined;
196
+ };
197
+ };
198
+ } | {
199
+ name: string;
200
+ services: {
201
+ committee: {
202
+ image: string;
203
+ labels: {
204
+ "io.meerkat.installation": string;
205
+ };
206
+ container_name: string;
207
+ build: {
208
+ context: string;
209
+ dockerfile: string;
210
+ labels: {
211
+ "io.meerkat.installation": string;
212
+ };
213
+ args: {
214
+ EVOLVER_NODE_IMAGE: string;
215
+ };
216
+ };
217
+ entrypoint: string[];
218
+ environment: {
219
+ NODE_ID: string | undefined;
220
+ PUBLIC_HOST: string;
221
+ };
222
+ group_add: string[];
223
+ volumes: string[];
224
+ restart: string;
225
+ };
226
+ node: {
227
+ image: string;
228
+ labels: {
229
+ "io.meerkat.installation": string;
230
+ };
231
+ container_name: string;
232
+ entrypoint: string[];
233
+ build: {
234
+ context: string;
235
+ dockerfile: string;
236
+ labels: {
237
+ "io.meerkat.installation": string;
238
+ };
239
+ args: {
240
+ EVOLVER_NODE_IMAGE: string;
241
+ };
242
+ };
243
+ environment: {
244
+ APP_NODE_ID: string;
245
+ DEVNET_API: string;
246
+ EVOLVER_UPSTREAM_NODE_ID: string | undefined;
247
+ EVOLVER_ALLOWED_OUTBOUND: string;
248
+ EVOLVER_EXECUTION_ENABLED: string;
249
+ EVOLVER_NODE_PORT: string;
250
+ CLAIM_TIMEOUT: string;
251
+ CLAIM_WATCH_SECS: string;
252
+ EVOLVER_DA_PEERS?: undefined;
253
+ EVOLVER_NODE_CONFIG?: undefined;
254
+ };
255
+ group_add: string[];
256
+ volumes: string[];
257
+ restart: string;
258
+ };
259
+ registry: {
260
+ image: string;
261
+ labels: {
262
+ "io.meerkat.installation": string;
263
+ };
264
+ container_name: string;
265
+ build: {
266
+ context: string;
267
+ dockerfile: string;
268
+ labels: {
269
+ "io.meerkat.installation": string;
270
+ };
271
+ };
272
+ user: string;
273
+ group_add: string[];
274
+ environment: {
275
+ EVOLVER_FAUCET_URL: string;
276
+ EVOLVER_CHAIN_ID: string;
277
+ APP_NODE_ID: string;
278
+ EVOLVER_SUBSCRIPTIONS_FILE: string;
279
+ REGISTRY_CHANNEL: string;
280
+ REGISTRY_CHANNEL_OPERATOR: string;
281
+ REGISTRY_READ_ONLY: string;
282
+ REGISTRY_CONTENT_URL: string;
283
+ PROCESSOR_HTTP_PORT: string;
284
+ PROCESSOR_READ_HOST: string;
285
+ EVOLVER_PROCESSOR_CONTROL_SOCKET: string;
286
+ EVOLVER_DEVNET_URL?: string | undefined;
287
+ EVOLVER_TARGET: string;
288
+ EVOLVER_NODE: string;
289
+ };
290
+ volumes: string[];
291
+ restart: string;
292
+ };
293
+ 'subscriptions-init': {
294
+ image: string;
295
+ labels: {
296
+ "io.meerkat.installation": string;
297
+ };
298
+ profiles: string[];
299
+ user: string;
300
+ environment: {
301
+ EVOLVER_INITIAL_CHANNELS: string;
302
+ EVOLVER_OPERATOR_UID: string;
303
+ EVOLVER_OPERATOR_GID: string;
304
+ EVOLVER_FAUCET_URL: string;
305
+ EVOLVER_CHAIN_ID: string;
306
+ APP_NODE_ID: string;
307
+ EVOLVER_SUBSCRIPTIONS_FILE: string;
308
+ REGISTRY_CHANNEL: string;
309
+ REGISTRY_CHANNEL_OPERATOR: string;
310
+ REGISTRY_READ_ONLY: string;
311
+ REGISTRY_CONTENT_URL: string;
312
+ PROCESSOR_HTTP_PORT: string;
313
+ PROCESSOR_READ_HOST: string;
314
+ EVOLVER_PROCESSOR_CONTROL_SOCKET: string;
315
+ EVOLVER_DEVNET_URL?: string | undefined;
316
+ EVOLVER_TARGET: string;
317
+ EVOLVER_NODE: string;
318
+ };
319
+ entrypoint: string[];
320
+ command: string[];
321
+ volumes: string[];
322
+ };
323
+ };
324
+ volumes: {
325
+ 'committee-data': {
326
+ name: string;
327
+ labels: {
328
+ "io.meerkat.installation": string;
329
+ };
330
+ };
331
+ genesis: {
332
+ name: string;
333
+ labels: {
334
+ "io.meerkat.installation": string;
335
+ };
336
+ };
337
+ 'node-data': {
338
+ name: string;
339
+ labels: {
340
+ "io.meerkat.installation": string;
341
+ };
342
+ };
343
+ 'app-state': {
344
+ name: string;
345
+ labels: {
346
+ "io.meerkat.installation": string;
347
+ };
348
+ };
349
+ subscriptions: {
350
+ name: string;
351
+ labels: {
352
+ "io.meerkat.installation": string;
353
+ };
354
+ };
355
+ 'agent-state': {
356
+ name: string;
357
+ labels: {
358
+ "io.meerkat.installation": string;
359
+ };
360
+ };
361
+ 'node-control': {
362
+ name: string;
363
+ labels: {
364
+ "io.meerkat.installation": string;
365
+ };
366
+ };
367
+ control: {
368
+ name: string;
369
+ labels: {
370
+ "io.meerkat.installation": string;
371
+ };
372
+ };
373
+ };
374
+ networks: {
375
+ default: {
376
+ name: string;
377
+ internal: boolean;
378
+ labels: {
379
+ "io.meerkat.installation": string;
380
+ };
381
+ };
382
+ };
383
+ };
384
+ export declare function operatorEnvironment(env: NodeJS.ProcessEnv): NodeJS.ProcessEnv;
385
+ export declare function managedInstallation(mode?: Mode, env?: NodeJS.ProcessEnv): Promise<Installation | undefined>;
386
+ /** Protocol-only stdio bridge, one new facade/private child/session per harness connection.
387
+ * Docker exec works even when daemon and harness share neither filesystem nor loopback. */
388
+ export declare function serveManaged(state: Installation, env?: NodeJS.ProcessEnv): Promise<void>;
389
+ export declare function installMeerkat(mode?: Mode, env?: NodeJS.ProcessEnv, deps?: InstallerDeps): Promise<{
390
+ dir: string;
391
+ configPath: string;
392
+ registration: {
393
+ mcpServers: {
394
+ meerkat: {
395
+ command: string;
396
+ args: string[];
397
+ };
398
+ };
399
+ };
400
+ }>;
401
+ //# sourceMappingURL=installer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"installer.d.ts","sourceRoot":"","sources":["../src/installer.ts"],"names":[],"mappings":"AAyCA,MAAM,MAAM,IAAI,GAAG,QAAQ,GAAG,OAAO,CAAC;AAEtC,MAAM,WAAW,YAAY;IAC3B,OAAO,EAAE,CAAC,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,EAAE,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,IAAI,CAAC;IAC9E,MAAM,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAAC,gBAAgB,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAClG,KAAK,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,QAAQ,EAAE,MAAM,CAAC;IAC1E,cAAc,EAAE,SAAS,GAAG,WAAW,GAAG,UAAU,CAAC;IAAC,KAAK,CAAC,EAAE,IAAI,CAAC;IAAC,OAAO,CAAC,EAAE;QAAE,OAAO,EAAE,MA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