vibes-diy 14.3.480 → 14.3.482

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.
@@ -32,4 +32,6 @@ export declare class LiveUnconfirmedBuildError extends UnconfirmedBuildError {
32
32
  readonly exitCode = 3;
33
33
  }
34
34
  export declare function generateErrorExitCode(err: unknown): number;
35
+ export declare const PUBLISH_RECONNECT_RETRIES = 2;
36
+ export declare function isDroppedSocket(err: unknown): boolean;
35
37
  export declare function publishSavedBuild(opts: PublishSavedBuildOptions): Promise<Result<PublishSavedBuildOk>>;
@@ -1,5 +1,5 @@
1
1
  import { BuildURI, Result } from "@adviser/cement";
2
- import { accessFnReferencesAnonymousWrites, } from "@vibes.diy/api-types";
2
+ import { accessFnReferencesAnonymousWrites, isResError, } from "@vibes.diy/api-types";
3
3
  import { HANDLE_REQUIRED_CLI_MESSAGE } from "../handle-required.js";
4
4
  import { formatErr } from "./format-err.js";
5
5
  import { needsAccessFn, noAccessFnRefusalMessage } from "./push-from-dir.js";
@@ -59,6 +59,11 @@ export class LiveUnconfirmedBuildError extends UnconfirmedBuildError {
59
59
  export function generateErrorExitCode(err) {
60
60
  return err instanceof LiveUnconfirmedBuildError ? GENERATE_EXIT_LIVE_UNCONFIRMED : 1;
61
61
  }
62
+ export const PUBLISH_RECONNECT_RETRIES = 2;
63
+ const DROPPED_SOCKET_CODES = ["websocket-closed", "websocket-error"];
64
+ export function isDroppedSocket(err) {
65
+ return isResError(err) && typeof err.error.code === "string" && DROPPED_SOCKET_CODES.includes(err.error.code);
66
+ }
62
67
  export async function publishSavedBuild(opts) {
63
68
  if (opts.fsId === undefined)
64
69
  return Result.Err(new UnconfirmedBuildError(unconfirmedBuildMessage(opts.ownerHandle, opts.appSlug)));
@@ -79,12 +84,18 @@ export async function publishSavedBuild(opts) {
79
84
  if (newer !== undefined) {
80
85
  await note("info", `A newer version (${newer}) is already live — keeping it rather than re-releasing this build (${opts.fsId}).`);
81
86
  }
82
- const rPublish = await opts.api.publishApp({
87
+ const publishReq = {
83
88
  appSlug: opts.appSlug,
84
89
  ownerHandle,
85
90
  fsId: newer ?? opts.fsId,
86
91
  ...(opts.posture === undefined ? {} : { posture: opts.posture }),
87
- });
92
+ };
93
+ let rPublish = await opts.api.publishApp(publishReq);
94
+ for (let attempt = 1; attempt <= PUBLISH_RECONNECT_RETRIES && rPublish.isErr() && isDroppedSocket(rPublish.Err()); attempt++) {
95
+ const fsId = (await newerLiveHead(opts, ownerHandle, opts.fsId)) ?? publishReq.fsId;
96
+ await note("info", `The connection dropped while releasing ${fsId}; releasing it again (${attempt}/${PUBLISH_RECONNECT_RETRIES}).`);
97
+ rPublish = await opts.api.publishApp({ ...publishReq, fsId });
98
+ }
88
99
  if (rPublish.isErr())
89
100
  return Result.Err(`Publish failed: ${formatErr(rPublish.Err())}`);
90
101
  const res = rPublish.Ok();
@@ -40343,14 +40343,23 @@ var init_phone_link = __esm({
40343
40343
  type: "'vibes.diy.req-classify-reaction'",
40344
40344
  auth: dashAuthType,
40345
40345
  /** The person's message, as they texted it. */
40346
- text: "string"
40346
+ text: "string",
40347
+ /**
40348
+ * A group text (lab47, 2026-12-04): who sent it, Vibes's last message in the chat and the friends'
40349
+ * lines since. Present, the server's group tapback reads it in context and may pick 👀 or none.
40350
+ */
40351
+ "group?": {
40352
+ from: "string",
40353
+ "vibes?": "string",
40354
+ "since?": "string[]"
40355
+ }
40347
40356
  })
40348
40357
  );
40349
40358
  resClassifyReaction = lazyType(
40350
40359
  () => type({
40351
40360
  type: "'vibes.diy.res-classify-reaction'",
40352
40361
  /** One of `AGENT_TAPBACK_REACTIONS`; absent when none fits or the classifier didn't answer in time. */
40353
- "reaction?": "'\u2764\uFE0F' | '\u{1F44D}' | '\u{1F44E}' | '\u{1F602}' | '\u203C\uFE0F' | '\u2753'"
40362
+ "reaction?": "'\u2764\uFE0F' | '\u{1F44D}' | '\u{1F44E}' | '\u{1F602}' | '\u203C\uFE0F' | '\u2753' | '\u{1F440}'"
40354
40363
  })
40355
40364
  );
40356
40365
  reqReadVibeWakes = lazyType(
@@ -168846,6 +168855,7 @@ var init_group_asker_writer = __esm({
168846
168855
  init_esm();
168847
168856
  init_agent_actor();
168848
168857
  init_group_payer();
168858
+ init_developer_grants();
168849
168859
  }
168850
168860
  });
168851
168861