@kigo-dev/sindri 0.1.7 → 0.1.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.
package/README.md CHANGED
@@ -55,7 +55,7 @@ Releasing is therefore the `connector-vX.Y.Z` tag alone; to roll everyone back,
55
55
  **Claude Code:**
56
56
 
57
57
  ```
58
- claude mcp add sindri -- npx -y @kigo-dev/sindri@0.1.7
58
+ claude mcp add sindri -- npx -y @kigo-dev/sindri@latest
59
59
  ```
60
60
 
61
61
  **Manual check without an MCP client:**
package/dist/index.js CHANGED
@@ -35984,7 +35984,9 @@ Tasks: when something must happen on its own on a schedule (sync data from anoth
35984
35984
 
35985
35985
  Design guide: before creating or changing any page, component, layout, style or copy, call \`design_guide\` for the app, first without \`topic\` (the overview and the list of topics), then with the topic that matches what you are building (admin, landing, mini-app, mobile; tokens, writing and checklist when relevant). Follow it; it is for you, never paste its content to the builder. If it answers \`no_design_guide\`, run \`update_template\` once and call \`design_guide\` again.
35986
35986
 
35987
- Rules: synthetic data only (never paste real emails, plates or phone numbers into seeds); one author per app (the builder); never touch files outside the app folder; never read .env.local back to the builder; do not edit middleware.ts, next.config.ts or package.json scripts (publish will refuse them); apps work Monday to Friday 9:05 am to midnight Mexico City time and the link says so outside those hours. When something fails, explain in one line what to do next; never blame the builder.`;
35987
+ Data: seeds and example rows are synthetic (never paste real emails, plates or phone numbers into seeds). Apps never touch Kigo's own databases, APIs or buckets; when the builder needs them, build with synthetic data and say "eso se pide a desarrollo". An app may read an external service the builder already uses (Linear, a Google Sheet) with the builder's own credential through \`set_secret\`; that data is real, so bring only what the screen needs, do not copy personal data (names, emails, phones) unless the app truly needs it, and tell the builder that anyone at Kigo with the link sees it.
35988
+
35989
+ Rules: one author per app (the builder); never touch files outside the app folder; never read .env.local back to the builder; do not edit middleware.ts, next.config.ts or package.json scripts (publish will refuse them); apps work Monday to Friday 9:05 am to midnight Mexico City time and the link says so outside those hours. When something fails, explain in one line what to do next; never blame the builder.`;
35988
35990
 
35989
35991
  // src/tools.ts
35990
35992
  import fs10 from "node:fs/promises";
@@ -36331,6 +36333,7 @@ var ApiError = class extends Error {
36331
36333
  status;
36332
36334
  code;
36333
36335
  };
36336
+ var WAKE_BUDGET_MS = 195e3;
36334
36337
  var ApiClient = class {
36335
36338
  constructor(cfg, fetchImpl = fetch) {
36336
36339
  this.cfg = cfg;
@@ -36403,11 +36406,12 @@ var ApiClient = class {
36403
36406
  method: "POST",
36404
36407
  headers: await this.headers(),
36405
36408
  body: form,
36406
- signal: AbortSignal.timeout(32e4)
36409
+ signal: AbortSignal.timeout(WAKE_BUDGET_MS + 32e4)
36407
36410
  });
36408
36411
  if (!res.ok) throw await this.error(res);
36409
36412
  return await res.json();
36410
36413
  }
36414
+ /** `timeoutMs` is the operation's own budget; the wake budget goes on top of it (see WAKE_BUDGET_MS). */
36411
36415
  async json(method, p, body, timeoutMs = 3e4) {
36412
36416
  const headers = await this.headers();
36413
36417
  if (body !== void 0) headers.set("Content-Type", "application/json");
@@ -36415,7 +36419,7 @@ var ApiClient = class {
36415
36419
  method,
36416
36420
  headers,
36417
36421
  body: body === void 0 ? null : JSON.stringify(body),
36418
- signal: AbortSignal.timeout(timeoutMs)
36422
+ signal: AbortSignal.timeout(WAKE_BUDGET_MS + timeoutMs)
36419
36423
  });
36420
36424
  if (!res.ok) throw await this.error(res);
36421
36425
  if (res.status === 204) return void 0;
@@ -36913,6 +36917,7 @@ function readSchedules(manifestText) {
36913
36917
  import { randomBytes as randomBytes3 } from "node:crypto";
36914
36918
  import http2 from "node:http";
36915
36919
  var SECRET_MAX_BYTES = 8 * 1024;
36920
+ var REFERRER_POLICY = "same-origin";
36916
36921
  var SecretPageBrowserUnavailable = class extends Error {
36917
36922
  constructor() {
36918
36923
  super("browser unavailable");
@@ -36944,7 +36949,7 @@ async function collectSecret(opts) {
36944
36949
  timer = setTimeout(() => reject(new Error("expired")), opts.timeoutMs ?? 5 * 6e4);
36945
36950
  server.on("request", (req, res) => {
36946
36951
  const html = (status, body) => {
36947
- res.writeHead(status, { "Content-Type": "text/html; charset=utf-8", "Cache-Control": "no-store", "Referrer-Policy": "no-referrer", "X-Frame-Options": "DENY" });
36952
+ res.writeHead(status, { "Content-Type": "text/html; charset=utf-8", "Cache-Control": "no-store", "Referrer-Policy": REFERRER_POLICY, "X-Frame-Options": "DENY" });
36948
36953
  res.end(body);
36949
36954
  };
36950
36955
  const u = new URL(req.url ?? "/", origin);
@@ -37041,7 +37046,7 @@ button.primary{background:var(--primary);border-color:var(--primary);color:#fff;
37041
37046
  .note{font-size:13px;margin-top:1rem}
37042
37047
  `;
37043
37048
  function shell(title, body) {
37044
- return `<!doctype html><html lang="es"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="referrer" content="no-referrer"><title>${escapeHtml(title)}</title><style>${STYLE}</style></head><body><main><div class="brand"><i></i>Kigo Sindri</div>${body}</main></body></html>`;
37049
+ return `<!doctype html><html lang="es"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><meta name="referrer" content="${REFERRER_POLICY}"><title>${escapeHtml(title)}</title><style>${STYLE}</style></head><body><main><div class="brand"><i></i>Kigo Sindri</div>${body}</main></body></html>`;
37045
37050
  }
37046
37051
  function FORM_PAGE(app, name, hint, error61) {
37047
37052
  const title = `Guardar secreto para \xAB${app}\xBB`;
@@ -37246,7 +37251,7 @@ var DESCRIPTIONS = {
37246
37251
  },
37247
37252
  preview: {
37248
37253
  title: "Preview locally",
37249
- description: "Runs the app on this computer with test data and opens it in the browser (http://127.0.0.1:<port>). Reuses a running preview. Use it to show the builder changes before publishing; edits reload automatically."
37254
+ description: "Runs the app on this computer with its local database (seed data plus whatever its tasks synced) and opens it in the browser (http://127.0.0.1:<port>). Reuses a running preview. Use it to show the builder changes before publishing; edits reload automatically."
37250
37255
  },
37251
37256
  publish: {
37252
37257
  title: "Publish to Sindri",
@@ -37452,7 +37457,7 @@ function createTools(deps) {
37452
37457
  await openInBrowser(cfg, r.url);
37453
37458
  return {
37454
37459
  ok: true,
37455
- summary: r.reused ? `"${a.app}" ya estaba corriendo; la abr\xED en ${r.url}. Los cambios se ven solos al guardar.` : `"${a.app}" est\xE1 corriendo en ${r.url} con datos de prueba. Los cambios se ven solos al guardar.`,
37460
+ summary: r.reused ? `"${a.app}" ya estaba corriendo; la abr\xED en ${r.url}. Los cambios se ven solos al guardar.` : `"${a.app}" est\xE1 corriendo en ${r.url} con su base local. Los cambios se ven solos al guardar.`,
37456
37461
  preview_url: r.url,
37457
37462
  port: r.port,
37458
37463
  reused: r.reused
@@ -37832,7 +37837,7 @@ function createTools(deps) {
37832
37837
  });
37833
37838
  return { setup, login, create_app, preview, publish, status, list_apps, versions, rollback, update_template, rename_app, delete_app, share, help, design_guide, set_secret, list_secrets, delete_secret, run_task, logout };
37834
37839
  }
37835
- var HELP_SUMMARY = "Sindri te ayuda a crear apps internas peque\xF1as para tu equipo en minutos, con datos de prueba y sin escribir c\xF3digo: t\xFA me cuentas qu\xE9 necesitas y yo la construyo. Puedes pedirme crear una app, verla en tu computadora antes de publicarla, publicarla, cambiarle el nombre o la direcci\xF3n, volver a una versi\xF3n anterior, compartirla en Slack, actualizar su plantilla o borrarla. Ten en cuenta: las apps trabajan con datos sint\xE9ticos, nunca reales; funcionan de lunes a viernes de 9:05 a 24:00, hora de la Ciudad de M\xE9xico; cada app la edita solo quien la cre\xF3; y lo que deba llegar a toda la empresa se pide a desarrollo. Tus apps y sus versiones est\xE1n en https://sindri.kigo.dev.";
37840
+ var HELP_SUMMARY = "Sindri te ayuda a crear apps internas peque\xF1as para tu equipo en minutos, sin escribir c\xF3digo: t\xFA me cuentas qu\xE9 necesitas y yo la construyo. Puedes pedirme crear una app, verla en tu computadora antes de publicarla, publicarla, cambiarle el nombre o la direcci\xF3n, volver a una versi\xF3n anterior, compartirla en Slack, actualizar su plantilla o borrarla. Ten en cuenta: las apps no se conectan a las bases ni a los sistemas de Kigo, eso se pide a desarrollo; s\xED pueden leer servicios que ya usas, como Linear o una hoja de Google, con tu propia clave, y lo que muestren lo ve cualquiera de Kigo con el enlace. Funcionan de lunes a viernes de 9:05 a 24:00, hora de la Ciudad de M\xE9xico; cada app la edita solo quien la cre\xF3; y lo que deba llegar a toda la empresa se pide a desarrollo. Tus apps y sus versiones est\xE1n en https://sindri.kigo.dev.";
37836
37841
  async function moveDir(from, to) {
37837
37842
  await fs10.mkdir(path10.dirname(to), { recursive: true });
37838
37843
  try {
@@ -37909,7 +37914,7 @@ function when(iso, now = /* @__PURE__ */ new Date()) {
37909
37914
  }
37910
37915
 
37911
37916
  // src/index.ts
37912
- var VERSION = "0.1.7";
37917
+ var VERSION = "0.1.9";
37913
37918
  function registerTools(server, tools) {
37914
37919
  for (const name of Object.keys(SCHEMAS)) {
37915
37920
  const meta3 = DESCRIPTIONS[name];
package/manifest.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "manifest_version": "0.2",
3
3
  "name": "sindri",
4
4
  "display_name": "Kigo Sindri",
5
- "version": "0.1.7",
5
+ "version": "0.1.9",
6
6
  "description": "Create, preview and publish Kigo internal apps from your Claude.",
7
7
  "long_description": "Sindri lets anyone at Kigo build small internal apps by talking to Claude. Claude edits the app on your computer; this connector installs what is needed, runs the app locally with test data, publishes it at <name>.sindri.kigo.dev and keeps versions. Sign in with your @cargomovil.com account.",
8
8
  "author": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kigo-dev/sindri",
3
- "version": "0.1.7",
3
+ "version": "0.1.9",
4
4
  "description": "Sindri connector: an MCP server that lets a Kigo PM's Claude create, preview and publish internal apps on Kigo Sindri",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",