speculos-toolkit 1.2.7 → 1.2.8

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
@@ -117,3 +117,21 @@ configuration into the CLI process itself.
117
117
  Docs: https://unified.speculos.ai · Source: https://github.com/speculosai/unified_platform
118
118
 
119
119
  MIT
120
+
121
+ ### Deployment consistency (1.2.8)
122
+
123
+ An existing application's visibility changes only when the requested release is
124
+ published. Allocation or a backend quota refusal preserves the live audience.
125
+ Private code closes the frontend/backend gates before upload. A definitive bad
126
+ frontend archive restores the prior audience; an ambiguous network failure keeps
127
+ the application private until you retry. Use `npx -y speculos-toolkit@latest` for
128
+ visibility changes to existing applications; older clients receive an upgrade
129
+ message before any visibility change.
130
+
131
+ The CLI carries an app-specific deployment ID through backend and frontend
132
+ publication. Retried requests cannot publish different content under an already
133
+ used ID. A backend release reserves its matching frontend while that release is
134
+ unfinished, and a later dashboard visibility change invalidates an earlier
135
+ allocation. After linking an anonymous terminal, its anonymous deployment and
136
+ usage history is adopted into the verified account; pending adoption retries on
137
+ history reads.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "speculos-toolkit",
3
- "version": "1.2.7",
3
+ "version": "1.2.8",
4
4
  "description": "The Speculos toolkit for coding agents — deploy any frontend/backend to a live URL and build against your linked data connectors (BigQuery, Postgres, Snowflake, Salesforce, …). Built for Claude Code, Codex, Cursor, and friends.",
5
5
  "bin": {
6
6
  "speculos-toolkit": "bin/speculos-toolkit.js"
package/src/index.js CHANGED
@@ -261,7 +261,7 @@ async function cmdDeploy(root, opts) {
261
261
  // ---- identity + slug allocation (mints a machine identity on first use) ----
262
262
  let alloc;
263
263
  try {
264
- alloc = await client.allocate({ userId: identity && identity.userId, userKey: identity && identity.userKey, slug: d.slug, visibility: opts.visibility }, opts);
264
+ alloc = await client.allocate({ userId: identity && identity.userId, userKey: identity && identity.userKey, slug: d.slug, visibility: opts.visibility, deploymentProtocol: 2 }, opts);
265
265
  } catch (e) {
266
266
  // Readable first: emit() is JSON for the agent case, but a person who typed
267
267
  // --private with no account needs to see WHY in plain words.
@@ -287,6 +287,7 @@ async function cmdDeploy(root, opts) {
287
287
  try {
288
288
  created = await client.startBackend({
289
289
  userId, userKey, slug: d.slug, slugUuid, override,
290
+ deploymentId: alloc.deploymentId, finalizeVisibility: !d.frontend,
290
291
  backend: { tarB64: backendTar.base64, runtime: d.backend.runtime, startCmd: d.backend.startCmd, env: opts.env },
291
292
  }, opts);
292
293
  } catch (e) {
@@ -386,9 +387,10 @@ async function cmdDeploy(root, opts) {
386
387
  // directories and build output that copied a public/ credential file.
387
388
  const feTar = packDir(outDir, { dropBuildOutput: false, frontend: true, excludeDirs });
388
389
  let fe;
389
- try { fe = await client.putFrontend({ userId, userKey, slug: d.slug, slugUuid, tarB64: feTar.base64, backendUrl: feBackendUrl, unsetBackend: !!opts.unsetBackend }, opts); }
390
+ try { fe = await client.putFrontend({ userId, userKey, slug: d.slug, slugUuid, deploymentId: alloc.deploymentId, tarB64: feTar.base64, backendUrl: feBackendUrl, unsetBackend: !!opts.unsetBackend }, opts); }
390
391
  catch (e) { emit({ ok: false, error: e.message, code: e.code || "FRONTEND" }); return 1; }
391
392
  frontendUrl = fe.frontendUrl;
393
+ if (fe.visibility) alloc.visibility = fe.visibility;
392
394
  if (fe.historyId) historyIds.push(fe.historyId);
393
395
  }
394
396