vibes-diy 14.3.424 → 14.3.425
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.
|
@@ -41707,6 +41707,10 @@ var reqTextTap = lazyType(
|
|
|
41707
41707
|
"utmContent?": UTM_RE,
|
|
41708
41708
|
// The page's arm: a letter on /text (`a`, `g`), a word on /hero (`text`, `preview`, #10455).
|
|
41709
41709
|
"variant?": /^[a-z][a-z0-9-]{0,39}$/,
|
|
41710
|
+
// How many friends' numbers the tap carried (a count, never an address) and the page's own
|
|
41711
|
+
// random id for its Lead, so the Conversions API copy dedupes against the pixel (hero.hbs).
|
|
41712
|
+
"friends?": "0 <= number.integer <= 99",
|
|
41713
|
+
"leadId?": /^[A-Za-z0-9_-]{8,64}$/,
|
|
41710
41714
|
ts: "number"
|
|
41711
41715
|
})
|
|
41712
41716
|
);
|
|
@@ -36540,7 +36540,14 @@ var LEAD_POINTS = {
|
|
|
36540
36540
|
textTap: 25,
|
|
36541
36541
|
groupStart: 125,
|
|
36542
36542
|
groupActive: 250,
|
|
36543
|
-
groupAgain: 125
|
|
36543
|
+
groupAgain: 125,
|
|
36544
|
+
// Chris 2026-11-22 ("adding a friend's number to the field gives lots of points to Meta"):
|
|
36545
|
+
// a /hero tap with a friend's number typed in is the page's strongest signal that a group text is
|
|
36546
|
+
// about to start, so it pays what the real group start pays, five plain taps. c-2656 bids VALUE on
|
|
36547
|
+
// Lead, so this is the number Meta learns to chase. The page inlines it (hero.hbs `FRIEND_TAP_POINTS`;
|
|
36548
|
+
// api/tests/text-lane/hero-friend-lead.test.ts pins the two together), and the tap beacon mirrors it over the
|
|
36549
|
+
// Conversions API with the pixel's event id (svc/public/text-tap.ts). Nothing about the friend goes.
|
|
36550
|
+
friendTap: 125
|
|
36544
36551
|
};
|
|
36545
36552
|
var META_CLICK_WINDOW_MS = 7 * 24 * 60 * 60 * 1e3;
|
|
36546
36553
|
function capiEndpoint(pixelId) {
|
|
@@ -39563,6 +39570,10 @@ var reqTextTap = lazyType(
|
|
|
39563
39570
|
"utmContent?": UTM_RE,
|
|
39564
39571
|
// The page's arm: a letter on /text (`a`, `g`), a word on /hero (`text`, `preview`, #10455).
|
|
39565
39572
|
"variant?": /^[a-z][a-z0-9-]{0,39}$/,
|
|
39573
|
+
// How many friends' numbers the tap carried (a count, never an address) and the page's own
|
|
39574
|
+
// random id for its Lead, so the Conversions API copy dedupes against the pixel (hero.hbs).
|
|
39575
|
+
"friends?": "0 <= number.integer <= 99",
|
|
39576
|
+
"leadId?": /^[A-Za-z0-9_-]{8,64}$/,
|
|
39566
39577
|
ts: "number"
|
|
39567
39578
|
})
|
|
39568
39579
|
);
|
|
@@ -39578,7 +39589,9 @@ function parseTextTap(body) {
|
|
|
39578
39589
|
...r.fbp === void 0 ? {} : { fbp: r.fbp },
|
|
39579
39590
|
...r.utmCampaign === void 0 ? {} : { utmCampaign: r.utmCampaign },
|
|
39580
39591
|
...r.utmContent === void 0 ? {} : { utmContent: r.utmContent },
|
|
39581
|
-
...r.variant === void 0 ? {} : { variant: r.variant }
|
|
39592
|
+
...r.variant === void 0 ? {} : { variant: r.variant },
|
|
39593
|
+
...r.friends === void 0 ? {} : { friends: r.friends },
|
|
39594
|
+
...r.leadId === void 0 ? {} : { leadId: r.leadId }
|
|
39582
39595
|
};
|
|
39583
39596
|
}
|
|
39584
39597
|
__name(parseTextTap, "parseTextTap");
|
|
@@ -87180,6 +87193,22 @@ __name(putTextTap, "putTextTap");
|
|
|
87180
87193
|
// ../vibes.diy/api/svc/public/text-tap.ts
|
|
87181
87194
|
var TEXT_TAP_MAX_BODY = 4096;
|
|
87182
87195
|
var TEXT_TAP_MAX_USER_AGENT = 512;
|
|
87196
|
+
var HERO_EVENT_SOURCE_URL = "https://good.vibes.diy/hero";
|
|
87197
|
+
function planHeroFriendLead(tap, o) {
|
|
87198
|
+
if ((tap.friends ?? 0) < 1 || tap.leadId === void 0 || tap.fbc === void 0) return void 0;
|
|
87199
|
+
if (tap.opener?.startsWith("hero-") !== true) return void 0;
|
|
87200
|
+
if (o.clientIp === void 0 || o.userAgent === void 0) return void 0;
|
|
87201
|
+
return {
|
|
87202
|
+
event_name: "Lead",
|
|
87203
|
+
action_source: "website",
|
|
87204
|
+
event_time: Math.floor(o.now.getTime() / 1e3),
|
|
87205
|
+
event_source_url: HERO_EVENT_SOURCE_URL,
|
|
87206
|
+
event_id: capiEventId("Lead", `herotap:${tap.leadId}`),
|
|
87207
|
+
user_data: { fbc: tap.fbc, client_ip_address: o.clientIp, client_user_agent: o.userAgent },
|
|
87208
|
+
custom_data: { value: LEAD_POINTS.friendTap, currency: "USD" }
|
|
87209
|
+
};
|
|
87210
|
+
}
|
|
87211
|
+
__name(planHeroFriendLead, "planHeroFriendLead");
|
|
87183
87212
|
function tapUserAgent(req2) {
|
|
87184
87213
|
const ua = (req2.headers.get("User-Agent") ?? "").trim().slice(0, TEXT_TAP_MAX_USER_AGENT);
|
|
87185
87214
|
return ua === "" ? void 0 : ua;
|
|
@@ -87205,8 +87234,12 @@ async function receiveTextTap(vctx, body, o) {
|
|
|
87205
87234
|
const rJson = exception2Result157(() => JSON.parse(body));
|
|
87206
87235
|
const tap = rJson.isOk() ? parseTextTap(rJson.Ok()) : void 0;
|
|
87207
87236
|
if (tap === void 0) return { status: 400, json: { type: "error", message: "bad tap" } };
|
|
87237
|
+
const lead = /* @__PURE__ */ __name(() => sendHeroFriendLead(vctx, tap, { clientIp: o.clientIp, userAgent: o.userAgent, now: o.now ?? /* @__PURE__ */ new Date() }), "lead");
|
|
87208
87238
|
const plane = textPlaneOf(vctx);
|
|
87209
|
-
if (plane === void 0)
|
|
87239
|
+
if (plane === void 0) {
|
|
87240
|
+
await lead();
|
|
87241
|
+
return { status: 503, json: { type: "error", message: "not set up" } };
|
|
87242
|
+
}
|
|
87210
87243
|
const rPut = await exception2Result157(
|
|
87211
87244
|
() => putTextTap(vctx, plane, tap, {
|
|
87212
87245
|
now: o.now ?? /* @__PURE__ */ new Date(),
|
|
@@ -87214,6 +87247,8 @@ async function receiveTextTap(vctx, body, o) {
|
|
|
87214
87247
|
...o.userAgent === void 0 ? {} : { userAgent: o.userAgent }
|
|
87215
87248
|
})
|
|
87216
87249
|
);
|
|
87250
|
+
if (vctx.waitUntil === void 0) await lead();
|
|
87251
|
+
else vctx.waitUntil(lead());
|
|
87217
87252
|
if (rPut.isErr()) {
|
|
87218
87253
|
console.warn(`[text-tap] store failed: ${rPut.Err().message.slice(0, 200)}`);
|
|
87219
87254
|
return { status: 503, json: { type: "error", message: "not stored" } };
|
|
@@ -87221,6 +87256,17 @@ async function receiveTextTap(vctx, body, o) {
|
|
|
87221
87256
|
return { status: 200, json: { type: "ok", stored: rPut.Ok() === "stored" } };
|
|
87222
87257
|
}
|
|
87223
87258
|
__name(receiveTextTap, "receiveTextTap");
|
|
87259
|
+
async function sendHeroFriendLead(vctx, tap, o) {
|
|
87260
|
+
const token = vctx.metaCapiToken;
|
|
87261
|
+
const pixelId = vctx.metaPixelId;
|
|
87262
|
+
if (token === void 0 || token === "" || pixelId === void 0 || pixelId === "") return;
|
|
87263
|
+
const event = planHeroFriendLead(tap, o);
|
|
87264
|
+
if (event === void 0) return;
|
|
87265
|
+
const send = vctx.metaCapiSend ?? postCapiEvent;
|
|
87266
|
+
const r = await exception2Result157(() => send(pixelId, { data: [event], access_token: token }, "Lead herotap"));
|
|
87267
|
+
if (r.isErr()) console.warn(`[text-tap] friend lead failed: ${r.Err().message.slice(0, 200)}`);
|
|
87268
|
+
}
|
|
87269
|
+
__name(sendHeroFriendLead, "sendHeroFriendLead");
|
|
87224
87270
|
var textTapHttp = {
|
|
87225
87271
|
hash: "text-tap-http",
|
|
87226
87272
|
validate: /* @__PURE__ */ __name(async (ctx) => {
|
|
@@ -87230,14 +87276,20 @@ var textTapHttp = {
|
|
|
87230
87276
|
}
|
|
87231
87277
|
const rBody = await exception2Result157(() => req2.text());
|
|
87232
87278
|
return Result101.Ok(
|
|
87233
|
-
Option27.Some({
|
|
87279
|
+
Option27.Some({
|
|
87280
|
+
body: rBody.isOk() ? rBody.Ok() : "",
|
|
87281
|
+
country: edgeCountry(req2),
|
|
87282
|
+
userAgent: tapUserAgent(req2),
|
|
87283
|
+
clientIp: req2.headers.get("CF-Connecting-IP") ?? void 0
|
|
87284
|
+
})
|
|
87234
87285
|
);
|
|
87235
87286
|
}, "validate"),
|
|
87236
87287
|
handle: /* @__PURE__ */ __name(async (ctx) => {
|
|
87237
87288
|
const vctx = ctx.ctx.getOrThrow("vibesApiCtx");
|
|
87238
87289
|
const res = await receiveTextTap(vctx, ctx.validated.body, {
|
|
87239
87290
|
country: ctx.validated.country,
|
|
87240
|
-
...ctx.validated.userAgent === void 0 ? {} : { userAgent: ctx.validated.userAgent }
|
|
87291
|
+
...ctx.validated.userAgent === void 0 ? {} : { userAgent: ctx.validated.userAgent },
|
|
87292
|
+
...ctx.validated.clientIp === void 0 ? {} : { clientIp: ctx.validated.clientIp }
|
|
87241
87293
|
});
|
|
87242
87294
|
await ctx.send.send(ctx, answer2(res.status, res.json));
|
|
87243
87295
|
return Result101.Ok(EventoResult22.Stop);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vibes-diy",
|
|
3
|
-
"version": "14.3.
|
|
3
|
+
"version": "14.3.425",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./index.js",
|
|
6
6
|
"description": "Command-line tool for vibes.diy — vibes give agents superpowers: generate, edit, pull, push, and publish AI-built apps. Login is free and easy.",
|
|
@@ -41,13 +41,13 @@
|
|
|
41
41
|
"@neondatabase/serverless": "~1.2.1",
|
|
42
42
|
"@noble/hashes": "~2.4.0",
|
|
43
43
|
"@shadcn/lint": "~0.2.3",
|
|
44
|
-
"@vibes.diy/api-impl": "14.3.
|
|
45
|
-
"@vibes.diy/api-types": "14.3.
|
|
46
|
-
"@vibes.diy/call-ai-v2": "14.3.
|
|
47
|
-
"@vibes.diy/cmd-harness": "14.3.
|
|
48
|
-
"@vibes.diy/cmd-tools": "14.3.
|
|
49
|
-
"@vibes.diy/identity": "14.3.
|
|
50
|
-
"@vibes.diy/prompts": "14.3.
|
|
44
|
+
"@vibes.diy/api-impl": "14.3.425",
|
|
45
|
+
"@vibes.diy/api-types": "14.3.425",
|
|
46
|
+
"@vibes.diy/call-ai-v2": "14.3.425",
|
|
47
|
+
"@vibes.diy/cmd-harness": "14.3.425",
|
|
48
|
+
"@vibes.diy/cmd-tools": "14.3.425",
|
|
49
|
+
"@vibes.diy/identity": "14.3.425",
|
|
50
|
+
"@vibes.diy/prompts": "14.3.425",
|
|
51
51
|
"acorn": "~8.19.0",
|
|
52
52
|
"acorn-jsx": "~5.3.2",
|
|
53
53
|
"arktype": "~2.2.9",
|