@lazehq/cli 0.1.94 → 0.1.95

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/laze.mjs +73 -14
  2. package/package.json +1 -1
package/dist/laze.mjs CHANGED
@@ -37171,7 +37171,7 @@ function flagText({
37171
37171
  }
37172
37172
 
37173
37173
  // src/rules/cli-version.rules.ts
37174
- var STAMPED = "0.1.94";
37174
+ var STAMPED = "0.1.95";
37175
37175
  function cliVersionOf({ stamped = STAMPED } = {}) {
37176
37176
  return stamped.startsWith("__") ? "dev" : stamped;
37177
37177
  }
@@ -69535,6 +69535,8 @@ var AgentNameSlot = agentUi.component("name");
69535
69535
  var AgentFaceSlot = agentUi.component("face");
69536
69536
  var AgentAccessSlot = agentUi.component("access");
69537
69537
  var AgentConnectDialogSlot = agentUi.component("connectDialog");
69538
+ var AgentConnectWaitSlot = agentUi.component("connectWait");
69539
+ var AgentConnectWaitRowSlot = agentUi.component("connectWaitRow");
69538
69540
  var AgentMigrateDialogSlot = agentUi.component("migrateDialog");
69539
69541
  var AgentChannelLevelSlot = agentUi.component("channelLevel");
69540
69542
  var AgentMuteNoticeSlot = agentUi.component("muteNotice");
@@ -79051,6 +79053,11 @@ var listAppsInputSchemaDefinition = external_exports.object({
79051
79053
  archived: external_exports.boolean().optional()
79052
79054
  });
79053
79055
  var listAppsInputSchema = listAppsInputSchemaDefinition;
79056
+ var findAppInputSchemaDefinition = external_exports.object({
79057
+ workspaceId: external_exports.string().min(1),
79058
+ /** The app's id or its slug; archived apps are found too. */
79059
+ app: external_exports.string().min(1)
79060
+ });
79054
79061
  var renameAppInputSchemaDefinition = external_exports.object({
79055
79062
  ...appRefSchemaDefinition.shape,
79056
79063
  name: external_exports.string().trim().min(1).max(80)
@@ -80336,6 +80343,7 @@ var createAppByKeyInputSchemaDefinition = external_exports.object({
80336
80343
  channel: external_exports.string().min(1).optional()
80337
80344
  });
80338
80345
  var appByKeySchemaDefinition = external_exports.object({ appId: external_exports.string().min(1) });
80346
+ var appFindByKeySchemaDefinition = external_exports.object({ app: external_exports.string().min(1) });
80339
80347
  var appDataByKeySchemaDefinition = external_exports.object({
80340
80348
  ...appByKeySchemaDefinition.shape,
80341
80349
  site: legacySiteSchema
@@ -81618,17 +81626,23 @@ async function readManifest(folder) {
81618
81626
  }
81619
81627
  return parsed.data;
81620
81628
  }
81621
- async function appIdOf({
81629
+ async function appIdOf(input2) {
81630
+ return (await appNamed(input2)).appId;
81631
+ }
81632
+ async function appNamed({
81622
81633
  client,
81623
81634
  args,
81624
81635
  folder
81625
81636
  }) {
81626
81637
  const named = flagText({ args, name: "app" });
81627
81638
  if (named) {
81628
- const matches = (app2) => app2.id === named || app2.slug === named;
81629
- const found = (await client.get("/api/apps")).find(matches) ?? (await client.get("/api/apps?archived=true")).find(matches);
81630
- if (!found) throw new CliUsageError(`No app called ${named} in this workspace`);
81631
- return found.id;
81639
+ const found = await client.post("/api/apps/find", { app: named }).catch((error63) => {
81640
+ if (error63 instanceof LazeApiError && error63.code === "app_not_found") {
81641
+ throw new CliUsageError(`No app called ${named} in this workspace`);
81642
+ }
81643
+ throw error63;
81644
+ });
81645
+ return { appId: found.id, name: found.name };
81632
81646
  }
81633
81647
  const manifest = await readManifest(folder);
81634
81648
  if (!manifest) {
@@ -81636,7 +81650,7 @@ async function appIdOf({
81636
81650
  `No ${APP_MANIFEST_FILE} here: run this in the app's folder or pass --app <id|slug>`
81637
81651
  );
81638
81652
  }
81639
- return manifest.app.id;
81653
+ return { appId: manifest.app.id, name: manifest.app.name };
81640
81654
  }
81641
81655
  async function jsonFlag({
81642
81656
  context,
@@ -82613,14 +82627,12 @@ async function appOfWord({
82613
82627
  }) {
82614
82628
  const scoped = word3 ? { ...args, flags: { ...args.flags, app: word3 } } : args;
82615
82629
  const client = await appClient({ context, args: scoped });
82616
- const appId = await appIdOf({
82630
+ const named = await appNamed({
82617
82631
  client,
82618
82632
  args: scoped,
82619
82633
  folder: folderOf({ context, word: void 0 })
82620
82634
  });
82621
- const apps = await client.get("/api/apps");
82622
- const listed = apps.find((found) => found.id === appId) ?? (await client.get("/api/apps?archived=true")).find((found) => found.id === appId);
82623
- return { client, appId, name: listed?.name ?? appId };
82635
+ return { client, ...named };
82624
82636
  }
82625
82637
  var appCost = async ({ context, args }) => {
82626
82638
  const { client, appId, name: name3 } = await appOfWord({ context, args, word: args.words[2] });
@@ -85985,6 +85997,8 @@ var computeConfig = Config.define((c) => ({
85985
85997
  "LAZE_COMPUTE_MACHINE_IMAGE",
85986
85998
  external_exports.string().min(1).default("rg.fr-par.scw.cloud/laze-prod/laze-browser-machine:latest")
85987
85999
  ),
86000
+ /** `b` on the spare api (ADR-206): its link sweeps run only while it holds machine links. */
86001
+ apiSlot: c.env("LAZE_API_SLOT", external_exports.enum(["a", "b"]).default("a")),
85988
86002
  /** Who sells dedicated IPs, on once its keys are set; `memory` locally, `none` for off. */
85989
86003
  ipVendor: c.env(
85990
86004
  "LAZE_IP_VENDOR",
@@ -86145,7 +86159,8 @@ var accountChangedDefinition = external_exports.object({
86145
86159
  "recharged",
86146
86160
  "recharge_failed",
86147
86161
  "auto_recharge",
86148
- "referral"
86162
+ "referral",
86163
+ "promotion"
86149
86164
  ]),
86150
86165
  plan: storedPlanSchema,
86151
86166
  status: external_exports.string(),
@@ -86154,6 +86169,8 @@ var accountChangedDefinition = external_exports.object({
86154
86169
  extraSeats: external_exports.number().int().nonnegative().optional(),
86155
86170
  /** People a complimentary Team holds; absent or null when the plan sets the limit. */
86156
86171
  seatCap: external_exports.number().int().positive().nullable().optional(),
86172
+ /** The promotion the workspace applied (`tlc-2026-11`); absent or null when none. */
86173
+ promotionId: external_exports.string().nullable().optional(),
86157
86174
  at: external_exports.iso.datetime()
86158
86175
  });
86159
86176
  var usageRecordedDefinition = external_exports.object({
@@ -86182,6 +86199,42 @@ var referralRewardedDefinition = external_exports.object({
86182
86199
  var creditCheckStateDefinition = external_exports.object({ nextWakeAt: external_exports.number().nullable() });
86183
86200
  var creditCheckIntentDefinition = external_exports.object({ workspaceId: external_exports.string().min(1) });
86184
86201
 
86202
+ // ../../modules/billing/contract/src/billing.promotions.ts
86203
+ var promotionStateSchema = external_exports.enum(["waiting", "running", "used", "lapsed"]);
86204
+ var promotionViewDefinition = external_exports.object({
86205
+ id: external_exports.string(),
86206
+ code: external_exports.string(),
86207
+ percentOff: external_exports.number(),
86208
+ months: external_exports.number().int().positive(),
86209
+ redeemBy: external_exports.iso.datetime(),
86210
+ upgradeBy: external_exports.iso.datetime(),
86211
+ appliedAt: external_exports.iso.datetime(),
86212
+ state: promotionStateSchema,
86213
+ /** When the discount stops, once Team started with it. */
86214
+ discountEndsAt: external_exports.iso.datetime().nullable()
86215
+ });
86216
+ var promotionViewSchema = promotionViewDefinition;
86217
+ var promotionRefusalSchema = external_exports.enum([
86218
+ "unknown",
86219
+ "ended",
86220
+ "already_applied",
86221
+ "subscribed",
86222
+ "referral_applied"
86223
+ ]);
86224
+ var applyPromotionInputDefinition = external_exports.object({
86225
+ workspaceId: external_exports.string().min(1),
86226
+ code: external_exports.string().trim().min(1).max(64)
86227
+ });
86228
+ var applyPromotionInputSchema = applyPromotionInputDefinition;
86229
+ var claimPromotionInputDefinition = external_exports.object({ code: external_exports.string().trim().min(1).max(64) });
86230
+ var claimPromotionInputSchema = claimPromotionInputDefinition;
86231
+ var claimPromotionOutputDefinition = external_exports.object({
86232
+ outcome: external_exports.enum(["kept", "applied", "refused"]),
86233
+ reason: promotionRefusalSchema.nullable(),
86234
+ workspaceId: external_exports.string().nullable()
86235
+ });
86236
+ var claimPromotionOutputSchema = claimPromotionOutputDefinition;
86237
+
86185
86238
  // ../../modules/billing/contract/src/billing.ts
86186
86239
  var workspaceInputDefinition2 = external_exports.object({ workspaceId: external_exports.string().min(1) });
86187
86240
  var billingWorkspaceInputSchema = workspaceInputDefinition2;
@@ -86265,6 +86318,8 @@ var billingAccountViewDefinition = external_exports.object({
86265
86318
  /** Rewards earned in the last 365 days, against `REFERRAL_CARD_TERMS.yearlyRewardLimit`. */
86266
86319
  rewardsThisYear: external_exports.number().int().nonnegative().default(0)
86267
86320
  }),
86321
+ /** The promotion code this workspace applied, if any. */
86322
+ promotion: promotionViewSchema.nullable().default(null),
86268
86323
  portalAvailable: external_exports.boolean(),
86269
86324
  /** A Team payment that failed or waits for the buyer's bank, until an invoice is paid. */
86270
86325
  paymentIssue: external_exports.object({
@@ -86380,7 +86435,9 @@ var inviteQuoteDefinition = external_exports.object({
86380
86435
  /** The most people the plan holds; null when it holds everyone. */
86381
86436
  seatCap: external_exports.number().int().positive().nullable(),
86382
86437
  /** How many of the added people the cap leaves waiting. */
86383
- overCap: external_exports.number().int().nonnegative()
86438
+ overCap: external_exports.number().int().nonnegative(),
86439
+ /** A promotion that will discount the Team this invite starts; null when none applies. */
86440
+ promotion: promotionViewSchema.nullable().default(null)
86384
86441
  });
86385
86442
  var inviteQuoteSchema = inviteQuoteDefinition;
86386
86443
  var setCurrencyInputDefinition = external_exports.object({
@@ -86463,7 +86520,7 @@ var grantCreditsInputDefinition = external_exports.object({
86463
86520
  reason: external_exports.string().trim().min(3).max(500)
86464
86521
  });
86465
86522
  var BillingApi = moduleApi()("billing");
86466
- var billingTrpc = defineTrpcContract("billing").query("account").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).query("invoices").withInput(billingWorkspaceInputSchema).withOutput(external_exports.array(billingInvoiceSchema)).mutation("startCheckout").withInput(startCheckoutInputSchema).withOutput(billingRedirectSchema).query("inviteQuote").withInput(inviteQuoteInputSchema).withOutput(inviteQuoteSchema).mutation("openPortal").withInput(openPortalInputSchema).withOutput(billingRedirectSchema).mutation("setCurrency").withInput(setCurrencyInputSchema).withOutput(billingAccountViewSchema).mutation("topUp").withInput(topUpInputSchema).withOutput(billingRedirectSchema).mutation("setAutoRecharge").withInput(setAutoRechargeInputSchema).withOutput(billingAccountViewSchema).mutation("applyReferral").withInput(applyReferralInputSchema).withOutput(billingAccountViewSchema).query("referralCard").withInput(billingWorkspaceInputSchema).withOutput(referralCardSchema).mutation("dismissReferralCard").withInput(billingWorkspaceInputSchema).withOutput(referralCardSchema).mutation("claimReferral").withInput(claimReferralInputSchema).withOutput(claimReferralOutputSchema).query("billingDetails").withInput(billingWorkspaceInputSchema).withOutput(billingDetailsSchema).mutation("setBillingDetails").withInput(setBillingDetailsInputSchema).withOutput(billingDetailsSchema).mutation("cancelPlan").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).mutation("keepPlan").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).build();
86523
+ var billingTrpc = defineTrpcContract("billing").query("account").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).query("invoices").withInput(billingWorkspaceInputSchema).withOutput(external_exports.array(billingInvoiceSchema)).mutation("startCheckout").withInput(startCheckoutInputSchema).withOutput(billingRedirectSchema).query("inviteQuote").withInput(inviteQuoteInputSchema).withOutput(inviteQuoteSchema).mutation("openPortal").withInput(openPortalInputSchema).withOutput(billingRedirectSchema).mutation("setCurrency").withInput(setCurrencyInputSchema).withOutput(billingAccountViewSchema).mutation("topUp").withInput(topUpInputSchema).withOutput(billingRedirectSchema).mutation("setAutoRecharge").withInput(setAutoRechargeInputSchema).withOutput(billingAccountViewSchema).mutation("applyReferral").withInput(applyReferralInputSchema).withOutput(billingAccountViewSchema).query("referralCard").withInput(billingWorkspaceInputSchema).withOutput(referralCardSchema).mutation("dismissReferralCard").withInput(billingWorkspaceInputSchema).withOutput(referralCardSchema).mutation("claimReferral").withInput(claimReferralInputSchema).withOutput(claimReferralOutputSchema).mutation("applyPromotion").withInput(applyPromotionInputSchema).withOutput(billingAccountViewSchema).mutation("claimPromotion").withInput(claimPromotionInputSchema).withOutput(claimPromotionOutputSchema).query("billingDetails").withInput(billingWorkspaceInputSchema).withOutput(billingDetailsSchema).mutation("setBillingDetails").withInput(setBillingDetailsInputSchema).withOutput(billingDetailsSchema).mutation("cancelPlan").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).mutation("keepPlan").withInput(billingWorkspaceInputSchema).withOutput(billingAccountViewSchema).build();
86467
86524
  var stripeWebhookHeadersDefinition = external_exports.object({
86468
86525
  "stripe-signature": external_exports.string().max(1e3).default("")
86469
86526
  });
@@ -87291,6 +87348,8 @@ var whatsappChangeDefinition = external_exports.object({
87291
87348
  sender: external_exports.string().max(500),
87292
87349
  text: external_exports.string(),
87293
87350
  deleted: external_exports.boolean(),
87351
+ /** Numbered again above Laze's floor: a message Laze holds already takes nothing from it. */
87352
+ replay: external_exports.boolean().optional(),
87294
87353
  /** The change's place in the store's change feed; absent from older connectors. */
87295
87354
  seq: external_exports.number().int().min(1).optional(),
87296
87355
  /** Fetched with a "media" request while the store is open; absent from older connectors. */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lazehq/cli",
3
- "version": "0.1.94",
3
+ "version": "0.1.95",
4
4
  "description": "The Laze command line: sign in, read and post in chat, and connect your own Claude Code or Codex session as an agent.",
5
5
  "license": "UNLICENSED",
6
6
  "type": "module",