@occam-scaly/mcp-server 0.1.2

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 (91) hide show
  1. package/README.md +166 -0
  2. package/bin/scaly-mcp.js +6 -0
  3. package/dist/audit.d.ts +25 -0
  4. package/dist/audit.d.ts.map +1 -0
  5. package/dist/audit.js +182 -0
  6. package/dist/audit.js.map +1 -0
  7. package/dist/client.d.ts +16 -0
  8. package/dist/client.d.ts.map +1 -0
  9. package/dist/client.js +142 -0
  10. package/dist/client.js.map +1 -0
  11. package/dist/config.d.ts +24 -0
  12. package/dist/config.d.ts.map +1 -0
  13. package/dist/config.js +76 -0
  14. package/dist/config.js.map +1 -0
  15. package/dist/index.d.ts +3 -0
  16. package/dist/index.d.ts.map +1 -0
  17. package/dist/index.js +279 -0
  18. package/dist/index.js.map +1 -0
  19. package/dist/resources/index.d.ts +17 -0
  20. package/dist/resources/index.d.ts.map +1 -0
  21. package/dist/resources/index.js +505 -0
  22. package/dist/resources/index.js.map +1 -0
  23. package/dist/tools/addons.d.ts +3 -0
  24. package/dist/tools/addons.d.ts.map +1 -0
  25. package/dist/tools/addons.js +128 -0
  26. package/dist/tools/addons.js.map +1 -0
  27. package/dist/tools/apps.d.ts +3 -0
  28. package/dist/tools/apps.d.ts.map +1 -0
  29. package/dist/tools/apps.js +121 -0
  30. package/dist/tools/apps.js.map +1 -0
  31. package/dist/tools/compute.d.ts +3 -0
  32. package/dist/tools/compute.d.ts.map +1 -0
  33. package/dist/tools/compute.js +135 -0
  34. package/dist/tools/compute.js.map +1 -0
  35. package/dist/tools/db.d.ts +3 -0
  36. package/dist/tools/db.d.ts.map +1 -0
  37. package/dist/tools/db.js +597 -0
  38. package/dist/tools/db.js.map +1 -0
  39. package/dist/tools/deployments.d.ts +3 -0
  40. package/dist/tools/deployments.d.ts.map +1 -0
  41. package/dist/tools/deployments.js +354 -0
  42. package/dist/tools/deployments.js.map +1 -0
  43. package/dist/tools/diagnose.d.ts +3 -0
  44. package/dist/tools/diagnose.d.ts.map +1 -0
  45. package/dist/tools/diagnose.js +213 -0
  46. package/dist/tools/diagnose.js.map +1 -0
  47. package/dist/tools/env.d.ts +3 -0
  48. package/dist/tools/env.d.ts.map +1 -0
  49. package/dist/tools/env.js +216 -0
  50. package/dist/tools/env.js.map +1 -0
  51. package/dist/tools/index.d.ts +38 -0
  52. package/dist/tools/index.d.ts.map +1 -0
  53. package/dist/tools/index.js +48 -0
  54. package/dist/tools/index.js.map +1 -0
  55. package/dist/tools/jobs.d.ts +3 -0
  56. package/dist/tools/jobs.d.ts.map +1 -0
  57. package/dist/tools/jobs.js +160 -0
  58. package/dist/tools/jobs.js.map +1 -0
  59. package/dist/tools/logs.d.ts +3 -0
  60. package/dist/tools/logs.d.ts.map +1 -0
  61. package/dist/tools/logs.js +157 -0
  62. package/dist/tools/logs.js.map +1 -0
  63. package/dist/tools/operations.d.ts +3 -0
  64. package/dist/tools/operations.d.ts.map +1 -0
  65. package/dist/tools/operations.js +262 -0
  66. package/dist/tools/operations.js.map +1 -0
  67. package/dist/tools/project.d.ts +3 -0
  68. package/dist/tools/project.d.ts.map +1 -0
  69. package/dist/tools/project.js +341 -0
  70. package/dist/tools/project.js.map +1 -0
  71. package/dist/tools/s3.d.ts +3 -0
  72. package/dist/tools/s3.d.ts.map +1 -0
  73. package/dist/tools/s3.js +256 -0
  74. package/dist/tools/s3.js.map +1 -0
  75. package/dist/tools/status.d.ts +3 -0
  76. package/dist/tools/status.d.ts.map +1 -0
  77. package/dist/tools/status.js +139 -0
  78. package/dist/tools/status.js.map +1 -0
  79. package/dist/tools/write.d.ts +3 -0
  80. package/dist/tools/write.d.ts.map +1 -0
  81. package/dist/tools/write.js +900 -0
  82. package/dist/tools/write.js.map +1 -0
  83. package/dist/utils/jwt.d.ts +3 -0
  84. package/dist/utils/jwt.d.ts.map +1 -0
  85. package/dist/utils/jwt.js +32 -0
  86. package/dist/utils/jwt.js.map +1 -0
  87. package/dist/utils/paths.d.ts +5 -0
  88. package/dist/utils/paths.d.ts.map +1 -0
  89. package/dist/utils/paths.js +26 -0
  90. package/dist/utils/paths.js.map +1 -0
  91. package/package.json +50 -0
@@ -0,0 +1,505 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.resourceTemplates = exports.resourceDefinitions = void 0;
4
+ exports.getResourceMimeType = getResourceMimeType;
5
+ exports.readResource = readResource;
6
+ const client_js_1 = require("../client.js");
7
+ const CAPABILITIES_YAML = `version: "1"
8
+
9
+ runtimes:
10
+ - name: python
11
+ versions: ["3.10", "3.11", "3.12"]
12
+ frameworks:
13
+ - name: fastapi
14
+ detection: "fastapi in requirements.txt"
15
+ entrypoints: ["main.py", "app.py", "asgi.py"]
16
+ - name: flask
17
+ detection: "flask in requirements.txt"
18
+ entrypoints: ["app.py", "wsgi.py"]
19
+ - name: node
20
+ versions: ["18", "20"]
21
+ frameworks:
22
+ - name: nextjs
23
+ detection: "next in package.json dependencies"
24
+ scripts: ["start:scaly", "start:prod", "start"]
25
+ - name: nestjs
26
+ detection: "@nestjs/core in package.json dependencies"
27
+ scripts: ["start:scaly", "start:prod", "start"]
28
+
29
+ stacks:
30
+ sizes:
31
+ - name: Eco
32
+ vcpu: 0.25
33
+ memory_mb: 512
34
+ - name: Basic
35
+ vcpu: 0.5
36
+ memory_mb: 1024
37
+ - name: Standard_1X
38
+ vcpu: 1
39
+ memory_mb: 2048
40
+ - name: Standard_2X
41
+ vcpu: 2
42
+ memory_mb: 4096
43
+ - name: Performance_M
44
+ vcpu: 4
45
+ memory_mb: 8192
46
+ - name: Performance_L
47
+ vcpu: 8
48
+ memory_mb: 16384
49
+
50
+ databases:
51
+ engines:
52
+ - name: POSTGRES_16
53
+ default: true
54
+ - name: POSTGRES_14
55
+ - name: MYSQL_80
56
+
57
+ storage:
58
+ type: s3
59
+ features: [presigned_urls, versioning]
60
+
61
+ auth:
62
+ provider: cognito
63
+ features: [user_pools, groups, mfa, hosted_ui]
64
+ `;
65
+ const CONFIG_SCHEMA_JSON = {
66
+ $schema: 'http://json-schema.org/draft-07/schema#',
67
+ title: 'Scaly Project Configuration (.scaly/config.yaml)',
68
+ description: 'Declarative, version-controlled configuration for Scaly stacks, apps, and add-ons.',
69
+ type: 'object',
70
+ additionalProperties: true,
71
+ required: ['version', 'stack'],
72
+ properties: {
73
+ version: { type: 'string', enum: ['1'] },
74
+ account: {
75
+ type: 'object',
76
+ additionalProperties: true,
77
+ properties: {
78
+ id: { type: 'string', description: 'Optional account id (acct_...)' },
79
+ slug: { type: 'string', description: 'Optional account slug' }
80
+ }
81
+ },
82
+ stack: {
83
+ type: 'object',
84
+ additionalProperties: true,
85
+ required: ['name', 'size'],
86
+ properties: {
87
+ name: { type: 'string' },
88
+ size: {
89
+ type: 'string',
90
+ enum: [
91
+ 'Eco',
92
+ 'Basic',
93
+ 'Standard_1X',
94
+ 'Standard_2X',
95
+ 'Performance_M',
96
+ 'Performance_L'
97
+ ]
98
+ },
99
+ region: {
100
+ type: 'string',
101
+ enum: ['CANADA', 'US', 'EU', 'ASIA_PACIFIC']
102
+ },
103
+ minIdle: { type: 'integer', minimum: 0 }
104
+ }
105
+ },
106
+ app: { $ref: '#/definitions/AppConfig' },
107
+ apps: {
108
+ type: 'array',
109
+ minItems: 1,
110
+ items: { $ref: '#/definitions/AppConfig' }
111
+ },
112
+ addons: {
113
+ type: 'array',
114
+ items: { $ref: '#/definitions/AddOnConfig' }
115
+ },
116
+ domains: {
117
+ type: 'array',
118
+ items: { $ref: '#/definitions/DomainConfig' }
119
+ },
120
+ jobs: {
121
+ type: 'array',
122
+ items: { $ref: '#/definitions/JobConfig' }
123
+ },
124
+ git: { $ref: '#/definitions/GitConfig' }
125
+ },
126
+ allOf: [
127
+ {
128
+ oneOf: [
129
+ { required: ['app'], not: { required: ['apps'] } },
130
+ { required: ['apps'], not: { required: ['app'] } }
131
+ ]
132
+ }
133
+ ],
134
+ definitions: {
135
+ SecretRef: {
136
+ type: 'object',
137
+ additionalProperties: true,
138
+ required: ['name'],
139
+ properties: {
140
+ name: { type: 'string' },
141
+ source_env: {
142
+ type: 'string',
143
+ description: 'Optional CI env var name containing the secret value to sync'
144
+ }
145
+ }
146
+ },
147
+ AuthConfig: {
148
+ type: 'object',
149
+ additionalProperties: true,
150
+ properties: {
151
+ userPool: { type: 'string', description: 'Reference addon by name' },
152
+ groups: { type: 'array', items: { type: 'string' } }
153
+ }
154
+ },
155
+ AppConfig: {
156
+ type: 'object',
157
+ additionalProperties: true,
158
+ required: ['name', 'framework'],
159
+ properties: {
160
+ name: { type: 'string' },
161
+ path: {
162
+ type: 'string',
163
+ description: 'Optional relative path for monorepos'
164
+ },
165
+ framework: {
166
+ type: 'string',
167
+ description: 'Framework identifier used for guidance/detection (e.g., fastapi, nextjs)'
168
+ },
169
+ auth: { $ref: '#/definitions/AuthConfig' },
170
+ env: {
171
+ type: 'object',
172
+ description: 'Non-sensitive env vars only',
173
+ additionalProperties: { type: 'string' }
174
+ },
175
+ secrets: { type: 'array', items: { $ref: '#/definitions/SecretRef' } }
176
+ }
177
+ },
178
+ AddOnConfig: {
179
+ type: 'object',
180
+ additionalProperties: true,
181
+ required: ['name', 'type'],
182
+ properties: {
183
+ name: { type: 'string' },
184
+ type: {
185
+ type: 'string',
186
+ enum: ['database', 'storage', 'cognito', 'cname']
187
+ },
188
+ engine: {
189
+ type: 'string',
190
+ enum: ['POSTGRES_16', 'POSTGRES_14', 'MYSQL_80']
191
+ },
192
+ size: {
193
+ type: 'string',
194
+ enum: ['Micro', 'Small', 'Medium', 'Large', 'XLarge']
195
+ },
196
+ passwordPolicy: { type: 'object', additionalProperties: true },
197
+ mfa: { type: 'string', enum: ['off', 'optional', 'required'] }
198
+ }
199
+ },
200
+ DomainRouteConfig: {
201
+ type: 'object',
202
+ additionalProperties: true,
203
+ required: ['path', 'app'],
204
+ properties: {
205
+ path: { type: 'string' },
206
+ app: { type: 'string' }
207
+ }
208
+ },
209
+ DomainConfig: {
210
+ type: 'object',
211
+ additionalProperties: true,
212
+ required: ['hostname'],
213
+ properties: {
214
+ hostname: { type: 'string' },
215
+ primary: { type: 'boolean' },
216
+ routes: {
217
+ type: 'array',
218
+ items: { $ref: '#/definitions/DomainRouteConfig' }
219
+ }
220
+ }
221
+ },
222
+ JobConfig: {
223
+ type: 'object',
224
+ additionalProperties: true,
225
+ required: ['name', 'schedule', 'command'],
226
+ properties: {
227
+ name: { type: 'string' },
228
+ schedule: { type: 'string', description: 'Cron expression' },
229
+ command: { type: 'string' },
230
+ timezone: { type: 'string' },
231
+ timeout: { type: 'integer', minimum: 1 }
232
+ }
233
+ },
234
+ GitConfig: {
235
+ type: 'object',
236
+ additionalProperties: true,
237
+ properties: {
238
+ provider: { type: 'string', enum: ['github', 'gitlab', 'bitbucket'] },
239
+ repo: { type: 'string' },
240
+ branch: { type: 'string' },
241
+ autoDeploy: { type: 'boolean' }
242
+ }
243
+ }
244
+ }
245
+ };
246
+ const GUIDE_PLATFORM = `# Scaly Platform Guide
247
+
248
+ Scaly deploys apps as **ECS Fargate containers** grouped into **stacks**.
249
+
250
+ Core concepts:
251
+ - **Account**: billing + ownership boundary
252
+ - **Stack**: compute environment where apps run
253
+ - **App**: deployed workload (runtime + config) attached to a stack
254
+ - **AddOn**: managed capability (database, storage, auth)
255
+ - **Deployment**: recorded execution of infrastructure/runtime changes
256
+
257
+ For machine-readable platform constraints, see:
258
+ - \`scaly://capabilities\`
259
+ `;
260
+ const GUIDE_GOLDEN_PATHS = `# Golden Paths
261
+
262
+ ## Form Intake → Database → Report Generator
263
+
264
+ Suggested Scaly resources:
265
+ - Stack: Standard_1X (dev) / Standard_2X (prod)
266
+ - Database: Postgres 16
267
+ - Storage: S3 add-on bucket for uploaded inputs and generated outputs
268
+ - Auth: Cognito add-on with groups (admins/viewers)
269
+ `;
270
+ const FRAMEWORK_GUIDES = {
271
+ fastapi: `# FastAPI on Scaly
272
+
273
+ - Entrypoint: \`uvicorn main:app --host 0.0.0.0 --port $PORT\`
274
+ - Health checks: expose \`/health\` returning 200
275
+ `,
276
+ nextjs: `# Next.js on Scaly
277
+
278
+ - Use \`next build\` during CI/build
279
+ - Runtime: \`next start -p $PORT\`
280
+ `
281
+ };
282
+ const PATTERN_GUIDES = {
283
+ auth: `# Auth Pattern (Cognito)
284
+
285
+ - Use Cognito User Pool for login
286
+ - Use groups for app-level authorization (admins/viewers)
287
+ `,
288
+ database: `# Database Pattern
289
+
290
+ - Prefer server-side migrations tracked in-repo
291
+ - Use read-only queries by default; require explicit confirmation for writes
292
+ `,
293
+ storage: `# Storage Pattern (S3)
294
+
295
+ - Store generated artifacts (reports) in bucket add-on
296
+ - Prefer server-side download/upload tools so file content never lands in transcripts
297
+ `,
298
+ jobs: `# Jobs Pattern
299
+
300
+ - Use scheduled jobs for periodic tasks (e.g., daily report generation)
301
+ - Prefer idempotent job handlers
302
+ `
303
+ };
304
+ exports.resourceDefinitions = [
305
+ {
306
+ uri: 'scaly://capabilities',
307
+ name: 'Scaly Capabilities',
308
+ description: 'Machine-readable capabilities and limits',
309
+ mimeType: 'application/x-yaml'
310
+ },
311
+ {
312
+ uri: 'scaly://resources-schema',
313
+ name: 'Scaly Resources Schema',
314
+ description: 'JSON Schema for `.scaly/config.yaml` (project configuration)',
315
+ mimeType: 'application/schema+json'
316
+ },
317
+ {
318
+ uri: 'scaly://guides/platform',
319
+ name: 'Platform Guide',
320
+ description: 'Core concepts and mental model',
321
+ mimeType: 'text/markdown'
322
+ },
323
+ {
324
+ uri: 'scaly://guides/golden-paths',
325
+ name: 'Golden Paths',
326
+ description: 'Reference architectures for common app types',
327
+ mimeType: 'text/markdown'
328
+ },
329
+ {
330
+ uri: 'scaly://apps',
331
+ name: 'Apps List',
332
+ description: 'List of all apps visible to the current API key',
333
+ mimeType: 'application/json'
334
+ },
335
+ {
336
+ uri: 'scaly://stacks',
337
+ name: 'Stacks List',
338
+ description: 'List of all stacks visible to the current API key',
339
+ mimeType: 'application/json'
340
+ },
341
+ {
342
+ uri: 'scaly://compute',
343
+ name: 'Compute Environments (Deprecated)',
344
+ description: 'DEPRECATED alias for scaly://stacks',
345
+ mimeType: 'application/json'
346
+ }
347
+ ];
348
+ exports.resourceTemplates = [
349
+ {
350
+ uriTemplate: 'scaly://guides/frameworks/{name}',
351
+ name: 'Framework Guide',
352
+ description: 'Framework-specific patterns (fastapi, nextjs, etc.)',
353
+ mimeType: 'text/markdown'
354
+ },
355
+ {
356
+ uriTemplate: 'scaly://guides/patterns/{name}',
357
+ name: 'Pattern Guide',
358
+ description: 'Integration patterns (auth, database, storage, jobs)',
359
+ mimeType: 'text/markdown'
360
+ },
361
+ {
362
+ uriTemplate: 'scaly://apps/{id}',
363
+ name: 'App Details',
364
+ description: 'App details by ID',
365
+ mimeType: 'application/json'
366
+ },
367
+ {
368
+ uriTemplate: 'scaly://stacks/{id}',
369
+ name: 'Stack Details',
370
+ description: 'Stack details by ID',
371
+ mimeType: 'application/json'
372
+ }
373
+ ];
374
+ function getResourceMimeType(uri) {
375
+ const direct = exports.resourceDefinitions.find((r) => r.uri === uri);
376
+ if (direct)
377
+ return direct.mimeType;
378
+ if (/^scaly:\/\/guides\/frameworks\/[^/]+$/.test(uri))
379
+ return 'text/markdown';
380
+ if (/^scaly:\/\/guides\/patterns\/[^/]+$/.test(uri))
381
+ return 'text/markdown';
382
+ if (/^scaly:\/\/apps\/[^/]+$/.test(uri))
383
+ return 'application/json';
384
+ if (/^scaly:\/\/stacks\/[^/]+$/.test(uri))
385
+ return 'application/json';
386
+ return 'text/plain';
387
+ }
388
+ async function readResource(uri) {
389
+ if (uri === 'scaly://capabilities')
390
+ return CAPABILITIES_YAML;
391
+ if (uri === 'scaly://resources-schema') {
392
+ return JSON.stringify(CONFIG_SCHEMA_JSON, null, 2);
393
+ }
394
+ if (uri === 'scaly://guides/platform')
395
+ return GUIDE_PLATFORM;
396
+ if (uri === 'scaly://guides/golden-paths')
397
+ return GUIDE_GOLDEN_PATHS;
398
+ const fw = uri.match(/^scaly:\/\/guides\/frameworks\/([^/]+)$/);
399
+ if (fw) {
400
+ const key = fw[1].toLowerCase();
401
+ const content = FRAMEWORK_GUIDES[key];
402
+ if (!content) {
403
+ throw new Error(`Unknown framework guide: ${fw[1]} (available: ${Object.keys(FRAMEWORK_GUIDES).join(', ')})`);
404
+ }
405
+ return content;
406
+ }
407
+ const pat = uri.match(/^scaly:\/\/guides\/patterns\/([^/]+)$/);
408
+ if (pat) {
409
+ const key = pat[1].toLowerCase();
410
+ const content = PATTERN_GUIDES[key];
411
+ if (!content) {
412
+ throw new Error(`Unknown pattern guide: ${pat[1]} (available: ${Object.keys(PATTERN_GUIDES).join(', ')})`);
413
+ }
414
+ return content;
415
+ }
416
+ if (uri === 'scaly://compute' || uri === 'scaly://stacks') {
417
+ const result = await (0, client_js_1.query)(`
418
+ query ListStacks {
419
+ listStacks {
420
+ id
421
+ name
422
+ status
423
+ accountId
424
+ size
425
+ minIdle
426
+ createdAt
427
+ updatedAt
428
+ }
429
+ }
430
+ `);
431
+ return JSON.stringify(result.listStacks || [], null, 2);
432
+ }
433
+ if (uri === 'scaly://apps') {
434
+ const result = await (0, client_js_1.query)(`
435
+ query ListApps {
436
+ listApps {
437
+ id
438
+ name
439
+ status
440
+ stackId
441
+ accountId
442
+ source
443
+ createdAt
444
+ updatedAt
445
+ }
446
+ }
447
+ `);
448
+ return JSON.stringify(result.listApps || [], null, 2);
449
+ }
450
+ const appMatch = uri.match(/^scaly:\/\/apps\/(.+)$/);
451
+ if (appMatch) {
452
+ const appId = appMatch[1];
453
+ const result = await (0, client_js_1.query)(`
454
+ query GetApp($where: AppWhereUniqueInput!) {
455
+ getApp(where: $where) {
456
+ id
457
+ name
458
+ status
459
+ stackId
460
+ accountId
461
+ source
462
+ createdAt
463
+ updatedAt
464
+ stack {
465
+ id
466
+ name
467
+ status
468
+ size
469
+ minIdle
470
+ }
471
+ envVars {
472
+ id
473
+ name
474
+ }
475
+ }
476
+ }
477
+ `, { where: { id: appId } });
478
+ return JSON.stringify(result.getApp, null, 2);
479
+ }
480
+ const stackMatch = uri.match(/^scaly:\/\/stacks\/(.+)$/);
481
+ if (stackMatch) {
482
+ const stackId = stackMatch[1];
483
+ const result = await (0, client_js_1.query)(`
484
+ query GetStack($where: StackWhereUniqueInput!) {
485
+ getStack(where: $where) {
486
+ id
487
+ name
488
+ status
489
+ accountId
490
+ size
491
+ minIdle
492
+ createdAt
493
+ updatedAt
494
+ apps {
495
+ id
496
+ name
497
+ }
498
+ }
499
+ }
500
+ `, { where: { id: stackId } });
501
+ return JSON.stringify(result.getStack, null, 2);
502
+ }
503
+ throw new Error(`Unknown resource: ${uri}`);
504
+ }
505
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/resources/index.ts"],"names":[],"mappings":";;;AA0YA,kDAUC;AAED,oCAkIC;AAxhBD,4CAAqC;AAgBrC,MAAM,iBAAiB,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyDzB,CAAC;AAEF,MAAM,kBAAkB,GAAG;IACzB,OAAO,EAAE,yCAAyC;IAClD,KAAK,EAAE,kDAAkD;IACzD,WAAW,EACT,oFAAoF;IACtF,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,IAAI;IAC1B,QAAQ,EAAE,CAAC,SAAS,EAAE,OAAO,CAAC;IAC9B,UAAU,EAAE;QACV,OAAO,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC,GAAG,CAAC,EAAE;QACxC,OAAO,EAAE;YACP,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE,IAAI;YAC1B,UAAU,EAAE;gBACV,EAAE,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,gCAAgC,EAAE;gBACrE,IAAI,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,WAAW,EAAE,uBAAuB,EAAE;aAC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;;KAa/C,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,IAAI,EAAE,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IACxD,CAAC;IAED,MAAM,QAAQ,GAAG,GAAG,CAAC,KAAK,CAAC,wBAAwB,CAAC,CAAC;IACrD,IAAI,QAAQ,EAAE,CAAC;QACb,MAAM,KAAK,GAAG,QAAQ,CAAC,CAAC,CAAC,CAAC;QAC1B,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAK,EACxB;;;;;;;;;;;;;;;;;;;;;;;;KAwBD,EACC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,EAAE,EAAE,CACzB,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAChD,CAAC;IAED,MAAM,UAAU,GAAG,GAAG,CAAC,KAAK,CAAC,0BAA0B,CAAC,CAAC;IACzD,IAAI,UAAU,EAAE,CAAC;QACf,MAAM,OAAO,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;QAC9B,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAK,EACxB;;;;;;;;;;;;;;;;;KAiBD,EACC,EAAE,KAAK,EAAE,EAAE,EAAE,EAAE,OAAO,EAAE,EAAE,CAC3B,CAAC;QACF,OAAO,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;IAClD,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,qBAAqB,GAAG,EAAE,CAAC,CAAC;AAC9C,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type ToolDefinition } from './index.js';
2
+ export declare const addOnTools: ToolDefinition[];
3
+ //# sourceMappingURL=addons.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addons.d.ts","sourceRoot":"","sources":["../../src/tools/addons.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,YAAY,CAAC;AA2C3D,eAAO,MAAM,UAAU,EAAE,cAAc,EA8FtC,CAAC"}
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.addOnTools = void 0;
4
+ const zod_1 = require("zod");
5
+ const client_js_1 = require("../client.js");
6
+ const index_js_1 = require("./index.js");
7
+ const ListAddOnsSchema = zod_1.z.object({
8
+ account_id: zod_1.z
9
+ .string()
10
+ .optional()
11
+ .describe('Optional account ID to filter by (if omitted, returns all visible)'),
12
+ type: zod_1.z
13
+ .enum(['database', 'storage', 'cognito', 'cname'])
14
+ .optional()
15
+ .describe('Optional add-on type filter'),
16
+ limit: zod_1.z.number().int().min(1).max(200).optional().default(100)
17
+ });
18
+ const GetAddOnSchema = zod_1.z.object({
19
+ addon_id: zod_1.z.string().describe('The add-on ID')
20
+ });
21
+ function mapTypeFilter(type) {
22
+ if (!type)
23
+ return null;
24
+ const t = type.toLowerCase();
25
+ if (t === 'database')
26
+ return 'DATABASE';
27
+ if (t === 'storage')
28
+ return 'STORAGE_S3';
29
+ if (t === 'cognito')
30
+ return 'COGNITO';
31
+ if (t === 'cname')
32
+ return 'CNAME';
33
+ return null;
34
+ }
35
+ exports.addOnTools = [
36
+ {
37
+ name: 'scaly_list_addons',
38
+ description: 'List add-ons (databases, storage buckets, Cognito user pools) visible to the current API key.',
39
+ inputSchema: ListAddOnsSchema,
40
+ handler: async (input) => {
41
+ try {
42
+ const typeFilter = mapTypeFilter(input.type);
43
+ const where = {
44
+ AND: [{ isDeleted: { equals: false } }]
45
+ };
46
+ if (input.account_id) {
47
+ where.AND.push({ accountId: { equals: input.account_id } });
48
+ }
49
+ if (typeFilter) {
50
+ where.AND.push({ type: { equals: typeFilter } });
51
+ }
52
+ const gql = `
53
+ query ListAddOns($where: AddOnWhereInput, $take: Int) {
54
+ listAddOns(where: $where, take: $take) {
55
+ id
56
+ name
57
+ type
58
+ accountId
59
+ status
60
+ addOnDatabase { size type }
61
+ addOnCognito { userPoolName userPoolId }
62
+ addOnStorageS3 { bucket }
63
+ createdAt
64
+ updatedAt
65
+ }
66
+ }
67
+ `;
68
+ const result = await (0, client_js_1.query)(gql, {
69
+ where,
70
+ take: input.limit
71
+ });
72
+ const addons = result.listAddOns || [];
73
+ return (0, index_js_1.ok)({ addons, count: addons.length });
74
+ }
75
+ catch (err) {
76
+ return (0, index_js_1.fail)({
77
+ code: 'INTERNAL_ERROR',
78
+ message: err.message,
79
+ retriable: true
80
+ });
81
+ }
82
+ }
83
+ },
84
+ {
85
+ name: 'scaly_get_addon',
86
+ description: 'Get details for a single add-on by ID.',
87
+ inputSchema: GetAddOnSchema,
88
+ handler: async (input) => {
89
+ try {
90
+ const gql = `
91
+ query GetAddOn($where: AddOnWhereUniqueInput!) {
92
+ getAddOn(where: $where) {
93
+ id
94
+ name
95
+ type
96
+ accountId
97
+ status
98
+ addOnDatabase { size type dbClusterId credentialsSecretName }
99
+ addOnCognito { userPoolName userPoolId config }
100
+ addOnStorageS3 { bucket }
101
+ createdAt
102
+ updatedAt
103
+ }
104
+ }
105
+ `;
106
+ const result = await (0, client_js_1.query)(gql, {
107
+ where: { id: input.addon_id }
108
+ });
109
+ if (!result.getAddOn) {
110
+ return (0, index_js_1.fail)({
111
+ code: 'RESOURCE_NOT_FOUND',
112
+ message: `Add-on not found: ${input.addon_id}`,
113
+ retriable: false
114
+ });
115
+ }
116
+ return (0, index_js_1.ok)({ addon: result.getAddOn });
117
+ }
118
+ catch (err) {
119
+ return (0, index_js_1.fail)({
120
+ code: 'INTERNAL_ERROR',
121
+ message: err.message,
122
+ retriable: true
123
+ });
124
+ }
125
+ }
126
+ }
127
+ ];
128
+ //# sourceMappingURL=addons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"addons.js","sourceRoot":"","sources":["../../src/tools/addons.ts"],"names":[],"mappings":";;;AAAA,6BAAwB;AACxB,4CAAqC;AACrC,yCAA2D;AAe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;gBACF,MAAM,MAAM,GAAG,MAAM,IAAA,iBAAK,EAA6B,GAAG,EAAE;oBAC1D,KAAK,EAAE,EAAE,EAAE,EAAE,KAAK,CAAC,QAAQ,EAAE;iBAC9B,CAAC,CAAC;gBACH,IAAI,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;oBACrB,OAAO,IAAA,eAAI,EAAC;wBACV,IAAI,EAAE,oBAAoB;wBAC1B,OAAO,EAAE,qBAAqB,KAAK,CAAC,QAAQ,EAAE;wBAC9C,SAAS,EAAE,KAAK;qBACjB,CAAC,CAAC;gBACL,CAAC;gBACD,OAAO,IAAA,aAAE,EAAC,EAAE,KAAK,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC,CAAC;YACxC,CAAC;YAAC,OAAO,GAAQ,EAAE,CAAC;gBAClB,OAAO,IAAA,eAAI,EAAC;oBACV,IAAI,EAAE,gBAAgB;oBACtB,OAAO,EAAE,GAAG,CAAC,OAAO;oBACpB,SAAS,EAAE,IAAI;iBAChB,CAAC,CAAC;YACL,CAAC;QACH,CAAC;KACF;CACF,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { type ToolDefinition } from './index.js';
2
+ export declare const listAppsTools: ToolDefinition[];
3
+ //# sourceMappingURL=apps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"apps.d.ts","sourceRoot":"","sources":["../../src/tools/apps.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,cAAc,EAAY,MAAM,YAAY,CAAC;AAsC3D,eAAO,MAAM,aAAa,EAAE,cAAc,EA6GzC,CAAC"}