drivethrough-cli 0.1.38 → 0.1.40

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 (2) hide show
  1. package/dist/main.mjs +12 -11
  2. package/package.json +1 -1
package/dist/main.mjs CHANGED
@@ -21692,7 +21692,8 @@ var init_integrations = __esm({
21692
21692
  }).strict();
21693
21693
  PullConfig = external_exports.object({
21694
21694
  route: external_exports.string().min(1),
21695
- path: external_exports.string().max(512).optional(),
21695
+ /** Under the route's paths, optionally followed by a literal "?query". */
21696
+ path: external_exports.string().max(2048).optional(),
21696
21697
  into: external_exports.string().min(1),
21697
21698
  map: external_exports.record(external_exports.string(), external_exports.string())
21698
21699
  }).strict();
@@ -41197,7 +41198,7 @@ function registerTools(server, ctx) {
41197
41198
  {
41198
41199
  outputSchema: OUTPUT_SCHEMAS.get_integrations,
41199
41200
  title: "Get integrations",
41200
- description: `Show a site's connections to other services' APIs (Pro plan) and how they last went: which secrets are set (never their values), the declared routes, actions, schedules (next run, last result, failures) and webhooks (URL, last event), and the latest 20 outcomes, including real page use. Read-only. Pass reference: true for the drivethrough.json format these are declared in, with two complete examples \u2014 read it before adding one to a site.`,
41201
+ description: `Show a site's connections to other services' APIs (Plus plan) and how they last went: which secrets are set (never their values), the declared routes, actions, schedules (next run, last result, failures) and webhooks (URL, last event), and the latest 20 outcomes, including real page use. Read-only. Pass reference: true for the drivethrough.json format these are declared in, with two complete examples \u2014 read it before adding one to a site.`,
41201
41202
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
41202
41203
  inputSchema: {
41203
41204
  site: external_exports.string().describe("Site name or id"),
@@ -41218,7 +41219,7 @@ function registerTools(server, ctx) {
41218
41219
  {
41219
41220
  outputSchema: OUTPUT_SCHEMAS.create_integration_setup_link,
41220
41221
  title: "Create integration setup link",
41221
- description: `Get a one-time link where the user sets the API keys a site's integrations need (Pro plan) \u2014 two steps, like create_upload. Call it with the site: it returns a link (10 minutes, one use, no sign-in). Send it to the user as a clickable link and have them paste the keys there. NEVER ask for a key in the chat, and never put one in a file \u2014 this tool never receives or returns a key's value. When they say they're done, call again with the returned session: it reports which names are set. A deploy that needs an unset secret is refused with a fresh link already in the error \u2014 relay that one instead. Pass names to rotate a key that is already set. A webhook's secret comes FROM the other service: tell the user to add a webhook there pointing at its URL (get_integrations and the deploy error give it) and paste the signing secret it shows into the link page; a url_token secret is generated on the link page, which then shows the full URL to paste.`,
41222
+ description: `Get a one-time link where the user sets the API keys a site's integrations need (Plus plan) \u2014 two steps, like create_upload. Call it with the site: it returns a link (10 minutes, one use, no sign-in). Send it to the user as a clickable link and have them paste the keys there. NEVER ask for a key in the chat, and never put one in a file \u2014 this tool never receives or returns a key's value. When they say they're done, call again with the returned session: it reports which names are set. A deploy that needs an unset secret is refused with a fresh link already in the error \u2014 relay that one instead. Pass names to rotate a key that is already set. A webhook's secret comes FROM the other service: tell the user to add a webhook there pointing at its URL (get_integrations and the deploy error give it) and paste the signing secret it shows into the link page; a url_token secret is generated on the link page, which then shows the full URL to paste.`,
41222
41223
  // Destructive: a link can replace a key that is already set, and the old
41223
41224
  // value is gone once the user saves (OpenAI's guidelines reserve false
41224
41225
  // for purely additive writes).
@@ -41273,7 +41274,7 @@ function registerTools(server, ctx) {
41273
41274
  {
41274
41275
  outputSchema: OUTPUT_SCHEMAS.preview_action,
41275
41276
  title: "Preview action",
41276
- description: `Show the exact request one of a site's declared actions would send for a sample row (Pro plan) \u2014 method, URL, headers and JSON body, with every secret value redacted \u2014 or why it can't be built (a secret not set, a bad URL). Nothing is sent, stored or charged. Check that the {{field}} values landed where they should. ${liveCheck}`,
41277
+ description: `Show the exact request one of a site's declared actions would send for a sample row (Plus plan) \u2014 method, URL, headers and JSON body, with every secret value redacted \u2014 or why it can't be built (a secret not set, a bad URL). Nothing is sent, stored or charged. Check that the {{field}} values landed where they should. ${liveCheck}`,
41277
41278
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
41278
41279
  inputSchema: {
41279
41280
  site: external_exports.string().describe("Site name or id"),
@@ -41294,7 +41295,7 @@ function registerTools(server, ctx) {
41294
41295
  {
41295
41296
  outputSchema: OUTPUT_SCHEMAS.preview_schedule,
41296
41297
  title: "Preview schedule",
41297
- description: `Show what a site's declared schedule would send on its next run (Pro plan), with every secret value redacted: for "rotate", the row that comes next and the request its action would send; for "pull", the GET it would make and the type and map its response would fill. Nothing is sent, stored or charged, and the rotation doesn't move. get_integrations shows when it next runs and how its last run went.`,
41298
+ description: `Show what a site's declared schedule would send on its next run (Plus plan), with every secret value redacted: for "rotate", the row that comes next and the request its action would send; for "pull", the GET it would make and the type and map its response would fill. Nothing is sent, stored or charged, and the rotation doesn't move. get_integrations shows when it next runs and how its last run went.`,
41298
41299
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
41299
41300
  inputSchema: {
41300
41301
  site: external_exports.string().describe("Site name or id"),
@@ -41314,7 +41315,7 @@ function registerTools(server, ctx) {
41314
41315
  {
41315
41316
  outputSchema: OUTPUT_SCHEMAS.preview_webhook,
41316
41317
  title: "Preview webhook",
41317
- description: `Dry-run one of a site's declared webhooks (Pro plan): builds an event from sample field values, takes it through the same mapping and validation a real delivery gets, and returns the row it would store and the URL the other service must POST to. Nothing is stored, sent or charged. Real delivery is proven by the other service's own "send test event", then get_integrations (last event).`,
41318
+ description: `Dry-run one of a site's declared webhooks (Plus plan): builds an event from sample field values, takes it through the same mapping and validation a real delivery gets, and returns the row it would store and the URL the other service must POST to. Nothing is stored, sent or charged. Real delivery is proven by the other service's own "send test event", then get_integrations (last event).`,
41318
41319
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
41319
41320
  inputSchema: {
41320
41321
  site: external_exports.string().describe("Site name or id"),
@@ -41336,7 +41337,7 @@ function registerTools(server, ctx) {
41336
41337
  {
41337
41338
  outputSchema: OUTPUT_SCHEMAS.test_route,
41338
41339
  title: "Test route",
41339
- description: `Send one GET through a site's declared API route now, exactly as a page would (Pro plan), and return the other service's HTTP status and the first 1 KB of its response with every secret redacted. Only GET is ever sent, only to a path the route allows, and it counts as one call against the month's integration allowance. Read the preview before telling the user it works \u2014 a 200 with an error body is still a failure.`,
41340
+ description: `Send one GET through a site's declared API route now, exactly as a page would (Plus plan), and return the other service's HTTP status and the first 1 KB of its response with every secret redacted. Only GET is ever sent, only to a path the route allows, and it counts as one call against the month's integration allowance. Read the preview before telling the user it works \u2014 a 200 with an error body is still a failure.`,
41340
41341
  // Not read-only: it reaches a third party (some GETs have effects there)
41341
41342
  // and spends one of the month's metered calls. Open-world for the same reason.
41342
41343
  annotations: { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: true },
@@ -41358,7 +41359,7 @@ function registerTools(server, ctx) {
41358
41359
  {
41359
41360
  outputSchema: OUTPUT_SCHEMAS.run_action,
41360
41361
  title: "Run action",
41361
- description: `Run one of a site's declared actions now, for real (Pro plan): it sends the action's POST to the other service with fields standing in for the row that would normally trigger it, and returns that service's HTTP status and a redacted preview of its response. The other service acts on it as it would on any request \u2014 a display shows the text, a message is sent \u2014 so confirm with the user before running anything that can't be taken back. preview_action shows the same request without sending it.`,
41362
+ description: `Run one of a site's declared actions now, for real (Plus plan): it sends the action's POST to the other service with fields standing in for the row that would normally trigger it, and returns that service's HTTP status and a redacted preview of its response. The other service acts on it as it would on any request \u2014 a display shows the text, a message is sent \u2014 so confirm with the user before running anything that can't be taken back. preview_action shows the same request without sending it.`,
41362
41363
  // Destructive + open-world: the other service may act irreversibly on the request.
41363
41364
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
41364
41365
  inputSchema: {
@@ -41380,7 +41381,7 @@ function registerTools(server, ctx) {
41380
41381
  {
41381
41382
  outputSchema: OUTPUT_SCHEMAS.run_schedule,
41382
41383
  title: "Run schedule",
41383
- description: `Run one of a site's declared schedules once, now, for real (Pro plan), and return the outcome. A "pull" schedule calls its route and saves the response as a new row; a "rotate" schedule sends the next row through its action (the other service acts on it) and advances the rotation. A successful run also re-enables a schedule that was paused after repeated failures. The regular timetable is unchanged. preview_schedule shows the same run without sending anything.`,
41384
+ description: `Run one of a site's declared schedules once, now, for real (Plus plan), and return the outcome. A "pull" schedule calls its route and saves the response as a new row; a "rotate" schedule sends the next row through its action (the other service acts on it) and advances the rotation. A successful run also re-enables a schedule that was paused after repeated failures. The regular timetable is unchanged. preview_schedule shows the same run without sending anything.`,
41384
41385
  // Destructive + open-world: a rotate run fires an action the other service acts on.
41385
41386
  annotations: { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: true },
41386
41387
  inputSchema: {
@@ -41478,7 +41479,7 @@ RECIPE \u2014 a searchable, filterable list (catalogue, directory, archive)
41478
41479
  whose query the config doesn't declare (it will render empty for visitors),
41479
41480
  and a declaration no page uses (pure cost on every insert).
41480
41481
 
41481
- Connecting a site to another service's API (Pro plan): this is site configuration, not something you run. The site's drivethrough.json declares it and deploy_site deploys it, like any other file; get_integrations {reference: true} returns the format with two complete examples. The integration tools: get_integrations (what is declared and how it went), create_integration_setup_link (a one-time link where the user sets API keys \u2014 never ask for a key in the chat), and preview_action, preview_schedule, preview_webhook (show what would be sent or stored; nothing is sent). Preview each piece, then have the user use the page once and confirm the outcome in get_integrations before telling them it works.
41482
+ Connecting a site to another service's API (Plus plan): this is site configuration, not something you run. The site's drivethrough.json declares it and deploy_site deploys it, like any other file; get_integrations {reference: true} returns the format with two complete examples. The integration tools: get_integrations (what is declared and how it went), create_integration_setup_link (a one-time link where the user sets API keys \u2014 never ask for a key in the chat), and preview_action, preview_schedule, preview_webhook (show what would be sent or stored; nothing is sent). Preview each piece, then have the user use the page once and confirm the outcome in get_integrations before telling them it works.
41482
41483
 
41483
41484
  Custom domains (paid plans): manage_domain attaches a domain the user already owns. After attaching, check_domain {action: "connect"} looks up one-click setup at their registrar (relay the URL when offered, else the exact DNS records from attach), and check_domain {action: "status"} polls until "active" \u2014 DNS seen, then TLS issued.`;
41484
41485
  INTEGRATION_EXAMPLE_A = JSON.stringify({
@@ -41517,7 +41518,7 @@ Custom domains (paid plans): manage_domain attaches a domain the user already ow
41517
41518
  },
41518
41519
  schedules: { cycle: { every: "3h", rotate: "quote", action: "show" } }
41519
41520
  });
41520
- INTEGRATION_REFERENCE = `Integrations are declared in the site's drivethrough.json and deployed with deploy_site, like any other file. Keys: "secrets" lists the key names (values are set by the user via create_integration_setup_link, never in chat or a file). "routes" maps a same-origin path under /api/ext/<name> to an upstream, allowing only the listed "methods" and "paths" prefixes, adding "headers" server-side (\${NAME} inserts a secret); "access" is "owner" (default), "viewers" or "public"; "cache" and "query" are optional. "actions" declare a POST ("post" URL, "headers", JSON "body" where {{field}} inserts a row's field); a type with "on_write": "<action>" sends it when a visitor's form or the owner's button on the page saves a row \u2014 never for write_db, imports or schedule pulls. Visitors get "rate_limit": "20/hour" on such a type unless it sets its own. "schedules" repeat every 1h/3h/6h/12h/1d/1w/1mo (no cron strings, times of day or timezones): "rotate": "<type>" with "action" sends the next row of the type through the action; "pull": {route, path, into, map} saves a route's JSON response as a new row ("map" uses $.dotted.paths; numeric strings become numbers). They pause after 10 failures in a row (the owner gets one email) until the next deploy. "webhooks" receive events another service POSTs to https://<site>/api/hook/<name>: "verify" is "stripe", "github", "standard" (Standard Webhooks: Resend, Clerk, Svix\u2026), "hmac_sha256" (with "header": the signature header's name) or, only for services that can't sign, "url_token"; "secret" names the declared secret; "map" (same $.paths) fills a row of "into". Unverified, duplicate and replayed deliveries are never stored. Every mistake is refused at deploy time with the corrected snippet \u2014 follow it. Two complete examples \u2014 a read-only brokerage dashboard that also snapshots equity hourly for a chart: ${INTEGRATION_EXAMPLE_A} \u2014 and a display that shows a quote when the owner clicks, and cycles through saved quotes every 3 hours: ${INTEGRATION_EXAMPLE_B}.`;
41521
+ INTEGRATION_REFERENCE = `Integrations are declared in the site's drivethrough.json and deployed with deploy_site, like any other file. Keys: "secrets" lists the key names (values are set by the user via create_integration_setup_link, never in chat or a file). "routes" maps a same-origin path under /api/ext/<name> to an upstream, allowing only the listed "methods" and "paths" prefixes, adding "headers" server-side (\${NAME} inserts a secret); "access" is "owner" (default), "viewers" or "public"; "cache" and "query" are optional. "actions" declare a POST ("post" URL, "headers", JSON "body" where {{field}} inserts a row's field); a type with "on_write": "<action>" sends it when a visitor's form or the owner's button on the page saves a row \u2014 never for write_db, imports or schedule pulls. Visitors get "rate_limit": "20/hour" on such a type unless it sets its own. "schedules" repeat every 1h/3h/6h/12h/1d/1w/1mo (no cron strings, times of day or timezones): "rotate": "<type>" with "action" sends the next row of the type through the action; "pull": {route, path, into, map} saves a route's JSON response as a new row ("path" may end in a literal query string, like "/v1/forecast?latitude=52.52&longitude=13.41", with \${SECRET} allowed as a value; "map" uses $.dotted.paths; numeric strings become numbers). They pause after 10 failures in a row (the owner gets one email) until the next deploy. "webhooks" receive events another service POSTs to https://<site>/api/hook/<name>: "verify" is "stripe", "github", "standard" (Standard Webhooks: Resend, Clerk, Svix\u2026), "hmac_sha256" (with "header": the signature header's name) or, only for services that can't sign, "url_token"; "secret" names the declared secret; "map" (same $.paths) fills a row of "into". Unverified, duplicate and replayed deliveries are never stored. Every mistake is refused at deploy time with the corrected snippet \u2014 follow it. Two complete examples \u2014 a read-only brokerage dashboard that also snapshots equity hourly for a chart: ${INTEGRATION_EXAMPLE_A} \u2014 and a display that shows a quote when the owner clicks, and cycles through saved quotes every 3 hours: ${INTEGRATION_EXAMPLE_B}.`;
41521
41522
  }
41522
41523
  });
41523
41524
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "drivethrough-cli",
3
- "version": "0.1.38",
3
+ "version": "0.1.40",
4
4
  "description": "Agent-first hosting CLI. Say what you want. Stay in the car.",
5
5
  "type": "module",
6
6
  "license": "MIT",