@cloudgrid-io/mcp 0.20.4 → 0.20.6

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 (126) hide show
  1. package/package.json +3 -2
  2. package/src/corpus/capability-map.md +8 -8
  3. package/src/corpus/cloudgrid-yaml.md +5 -5
  4. package/src/corpus/cookbook.md +1 -1
  5. package/src/corpus/skill-claim.md +1 -1
  6. package/src/corpus/skill-plug.md +1 -1
  7. package/src/corpus/skills-readme.md +1 -1
  8. package/src/corpus/templates/ai-knowledge-base/AGENTS.md +1 -1
  9. package/src/corpus/templates/ai-knowledge-base/index.md +1 -1
  10. package/src/corpus/templates/api-docs/README.md +2 -2
  11. package/src/corpus/templates/api-docs/index.md +3 -3
  12. package/src/corpus/templates/appointment-booking/AGENTS.md +7 -7
  13. package/src/corpus/templates/appointment-booking/index.md +5 -5
  14. package/src/corpus/templates/approval-workflow/AGENTS.md +2 -2
  15. package/src/corpus/templates/approval-workflow/index.md +2 -2
  16. package/src/corpus/templates/billing-dashboard/index.md +1 -1
  17. package/src/corpus/templates/calendar-scheduler/AGENTS.md +1 -1
  18. package/src/corpus/templates/calendar-scheduler/index.md +1 -1
  19. package/src/corpus/templates/changelog/README.md +2 -2
  20. package/src/corpus/templates/changelog/index.md +3 -3
  21. package/src/corpus/templates/company-website/README.md +3 -3
  22. package/src/corpus/templates/company-website/cloudgrid.yaml +1 -1
  23. package/src/corpus/templates/company-website/index.md +3 -3
  24. package/src/corpus/templates/course-platform/index.md +1 -1
  25. package/src/corpus/templates/dashboard/cloudgrid.yaml +1 -1
  26. package/src/corpus/templates/dashboard/index.md +3 -3
  27. package/src/corpus/templates/deck/cloudgrid.yaml +1 -1
  28. package/src/corpus/templates/deck/index.md +3 -3
  29. package/src/corpus/templates/docs-site/README.md +2 -2
  30. package/src/corpus/templates/docs-site/index.md +3 -3
  31. package/src/corpus/templates/forum/AGENTS.md +4 -4
  32. package/src/corpus/templates/forum/index.md +1 -1
  33. package/src/corpus/templates/hr-portal/index.md +1 -1
  34. package/src/corpus/templates/internal-tools-portal/index.md +1 -1
  35. package/src/corpus/templates/landing-page/cloudgrid.yaml +1 -1
  36. package/src/corpus/templates/landing-page/index.md +3 -3
  37. package/src/corpus/templates/lms/index.md +1 -1
  38. package/src/corpus/templates/marketplace/AGENTS.md +1 -1
  39. package/src/corpus/templates/marketplace/index.md +1 -1
  40. package/src/corpus/templates/membership-site/AGENTS.md +7 -7
  41. package/src/corpus/templates/membership-site/index.md +5 -5
  42. package/src/corpus/templates/online-store/index.md +1 -1
  43. package/src/corpus/templates/portfolio/README.md +2 -2
  44. package/src/corpus/templates/portfolio/index.md +3 -3
  45. package/src/corpus/templates/product-launch/README.md +3 -3
  46. package/src/corpus/templates/product-launch/cloudgrid.yaml +1 -1
  47. package/src/corpus/templates/product-launch/index.md +3 -3
  48. package/src/corpus/templates/report/cloudgrid.yaml +1 -1
  49. package/src/corpus/templates/report/index.md +3 -3
  50. package/src/corpus/templates/restaurant-reservations/AGENTS.md +7 -7
  51. package/src/corpus/templates/restaurant-reservations/index.md +2 -2
  52. package/src/corpus/templates/saas-marketing/README.md +2 -2
  53. package/src/corpus/templates/saas-marketing/index.md +3 -3
  54. package/src/corpus/templates/status-page/README.md +2 -2
  55. package/src/corpus/templates/status-page/index.md +3 -3
  56. package/src/corpus/templates/subscription-management/AGENTS.md +7 -7
  57. package/src/corpus/templates/subscription-management/index.md +5 -5
  58. package/src/corpus/templates/waitlist/README.md +2 -2
  59. package/src/corpus/templates/waitlist/index.md +3 -3
  60. package/src/corpus/templates/web-app/cloudgrid.yaml +1 -1
  61. package/src/corpus/templates/web-app/index.md +3 -3
  62. package/src/corpus/usage.md +1 -1
  63. package/src/corpus/workflows/admin-dashboard.md +4 -4
  64. package/src/corpus/workflows/ai-app.md +6 -6
  65. package/src/corpus/workflows/ai-knowledge-base.md +4 -4
  66. package/src/corpus/workflows/analytics-dashboard.md +4 -4
  67. package/src/corpus/workflows/api-dashboard.md +4 -4
  68. package/src/corpus/workflows/api-docs.md +2 -2
  69. package/src/corpus/workflows/api-service.md +6 -6
  70. package/src/corpus/workflows/app-with-data.md +6 -6
  71. package/src/corpus/workflows/appointment-booking.md +6 -6
  72. package/src/corpus/workflows/approval-workflow.md +4 -4
  73. package/src/corpus/workflows/billing-dashboard.md +6 -6
  74. package/src/corpus/workflows/blog-cms.md +4 -4
  75. package/src/corpus/workflows/booking-system.md +5 -5
  76. package/src/corpus/workflows/calendar-scheduler.md +4 -4
  77. package/src/corpus/workflows/changelog.md +2 -2
  78. package/src/corpus/workflows/company-website.md +3 -3
  79. package/src/corpus/workflows/course-platform.md +5 -5
  80. package/src/corpus/workflows/crm.md +5 -5
  81. package/src/corpus/workflows/dashboard.md +3 -3
  82. package/src/corpus/workflows/directory.md +4 -4
  83. package/src/corpus/workflows/docs-app.md +6 -6
  84. package/src/corpus/workflows/docs-site.md +2 -2
  85. package/src/corpus/workflows/erp.md +5 -5
  86. package/src/corpus/workflows/event-board.md +4 -4
  87. package/src/corpus/workflows/expense-tracker.md +4 -4
  88. package/src/corpus/workflows/feature-request-board.md +4 -4
  89. package/src/corpus/workflows/financial-dashboard.md +4 -4
  90. package/src/corpus/workflows/forum.md +5 -5
  91. package/src/corpus/workflows/hr-portal.md +5 -5
  92. package/src/corpus/workflows/internal-tools-portal.md +5 -5
  93. package/src/corpus/workflows/inventory.md +4 -4
  94. package/src/corpus/workflows/invoice.md +4 -4
  95. package/src/corpus/workflows/job-board.md +4 -4
  96. package/src/corpus/workflows/kanban.md +5 -5
  97. package/src/corpus/workflows/landing-page.md +3 -3
  98. package/src/corpus/workflows/lms.md +5 -5
  99. package/src/corpus/workflows/marketplace.md +4 -4
  100. package/src/corpus/workflows/membership-site.md +6 -6
  101. package/src/corpus/workflows/monitoring-dashboard.md +4 -4
  102. package/src/corpus/workflows/online-store.md +6 -6
  103. package/src/corpus/workflows/portfolio.md +2 -2
  104. package/src/corpus/workflows/presentation.md +3 -3
  105. package/src/corpus/workflows/product-catalog.md +4 -4
  106. package/src/corpus/workflows/product-launch.md +3 -3
  107. package/src/corpus/workflows/project-management.md +4 -4
  108. package/src/corpus/workflows/property-listings.md +4 -4
  109. package/src/corpus/workflows/quiz-platform.md +4 -4
  110. package/src/corpus/workflows/report.md +3 -3
  111. package/src/corpus/workflows/restaurant-reservations.md +5 -5
  112. package/src/corpus/workflows/revenue-dashboard.md +4 -4
  113. package/src/corpus/workflows/saas-marketing.md +2 -2
  114. package/src/corpus/workflows/semantic-search.md +5 -5
  115. package/src/corpus/workflows/status-page.md +2 -2
  116. package/src/corpus/workflows/subscription-management.md +6 -6
  117. package/src/corpus/workflows/task-manager.md +4 -4
  118. package/src/corpus/workflows/ticket-system.md +4 -4
  119. package/src/corpus/workflows/time-tracking.md +4 -4
  120. package/src/corpus/workflows/travel-booking.md +5 -5
  121. package/src/corpus/workflows/waitlist.md +2 -2
  122. package/src/corpus/workflows/web-app.md +3 -3
  123. package/src/session-logger.js +12 -5
  124. package/src/tools.js +154 -91
  125. package/src/web.js +4 -2
  126. package/src/widgets/org-picker.html +1 -1
@@ -4,7 +4,7 @@ when: calculator, converter, generator, timer, quiz, interactive tool, mini-app,
4
4
  needs: none
5
5
  deploy: inspiration
6
6
  editions: all
7
- capabilities_note: static — no infrastructure, state lives only in memory. Publishes as an inspiration (instant, works on hosted) via grid_plug.
7
+ capabilities_note: static — no infrastructure, state lives only in memory. Publishes as an inspiration (instant, works on hosted) via grid_deploy.
8
8
  summary: Fetch the web-app template, adapt its markup and inline JS to the user's tool, deploy it, and return the live share URL.
9
9
  ---
10
10
 
@@ -14,9 +14,9 @@ Detect the intent ("build me a web app / tool / calculator that does X") and
14
14
  follow this recipe. Do not ask setup questions first; use sensible defaults and
15
15
  build.
16
16
 
17
- 1. **Fetch the template.** Call `grid_fetch("template", "web-app")` to load
17
+ 1. **Fetch the template.** Call `grid_get_template("template", "web-app")` to load
18
18
  the self-contained interactive HTML app template.
19
- 2. **(Optional) Fetch the example.** Call `grid_fetch("example", "web-app")`
19
+ 2. **(Optional) Fetch the example.** Call `grid_get_template("example", "web-app")`
20
20
  to see a real working tool as a reference for structure and inline logic.
21
21
  3. **Adapt the template.** Rework the markup and inline JavaScript into the tool
22
22
  the user asked for:
@@ -179,13 +179,13 @@ export class SessionLogger {
179
179
  key: this._keyResult(name, result),
180
180
  duration_ms: durationMs,
181
181
  });
182
- // Only a deploy failure (grid_plug) is the QA "failure" trigger. Other
182
+ // Only a deploy failure (grid_deploy) is the QA "failure" trigger. Other
183
183
  // tools' fail() results are recorded but must not flush/freeze the session
184
184
  // (grid_fetch typo, login-status "none", etc. are routine, not terminal).
185
185
  const s = result?.structuredContent;
186
- if (name === "grid_plug" && outcome === "error") {
186
+ if (name === "grid_deploy" && outcome === "error") {
187
187
  this.flush("error").catch(() => {});
188
- } else if (name === "grid_plug" && (s?.url || s?.poll_url)) {
188
+ } else if (name === "grid_deploy" && (s?.url || s?.poll_url)) {
189
189
  this.flush("live").catch(() => {});
190
190
  } else {
191
191
  this._resetIdle();
@@ -237,11 +237,18 @@ export class SessionLogger {
237
237
  }
238
238
 
239
239
  setUserRequest(text) {
240
- try { if (!this.userRequest && text) this.userRequest = scrubText(text); } catch { /* noop */ }
240
+ // Scrub FIRST, then cap — capping before scrub could clip a credential
241
+ // mid-token, and an uncapped value would push the whole trail past the
242
+ // Slack 38KB clip. Only-if-unset (stdio env/header value wins).
243
+ try { if (!this.userRequest && text) this.userRequest = scrubText(text).slice(0, 2000); } catch { /* noop */ }
241
244
  }
242
245
 
243
246
  setNarrative(text) {
244
- try { if (text) this.narrative = String(text).slice(0, 4000); } catch { /* noop */ }
247
+ // Scrub FIRST, then cap: slicing before scrub can leave a partial token
248
+ // prefix at the 4000 boundary that no longer matches the redaction patterns.
249
+ // Last-write-wins — a later note replaces an earlier one. (flush() scrubs
250
+ // again, a harmless double-scrub.)
251
+ try { if (text) this.narrative = scrubText(String(text)).slice(0, 4000); } catch { /* noop */ }
245
252
  }
246
253
  }
247
254