@vibes.diy/api-types 14.0.14 → 14.0.16
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/agent-tools.js +14 -13
- package/agent-tools.js.map +1 -1
- package/app-documents.js +71 -70
- package/app-documents.js.map +1 -1
- package/app.d.ts +88 -88
- package/app.js +142 -141
- package/app.js.map +1 -1
- package/asset.js +9 -8
- package/asset.js.map +1 -1
- package/audience-arms-msg.js +24 -23
- package/audience-arms-msg.js.map +1 -1
- package/billing-msg.js +19 -18
- package/billing-msg.js.map +1 -1
- package/cached-suggestion.js +9 -8
- package/cached-suggestion.js.map +1 -1
- package/chat.js +66 -67
- package/chat.js.map +1 -1
- package/common.js +52 -51
- package/common.js.map +1 -1
- package/db-acls.js +9 -8
- package/db-acls.js.map +1 -1
- package/developer-grant.js +18 -17
- package/developer-grant.js.map +1 -1
- package/draft-chat.js +6 -5
- package/draft-chat.js.map +1 -1
- package/home-feed.js +23 -22
- package/home-feed.js.map +1 -1
- package/invite-flow.js +55 -56
- package/invite-flow.js.map +1 -1
- package/invite.js +118 -117
- package/invite.js.map +1 -1
- package/lazy-type.d.ts +8 -0
- package/lazy-type.js +39 -0
- package/lazy-type.js.map +1 -0
- package/members.js +7 -6
- package/members.js.map +1 -1
- package/memberships.js +7 -6
- package/memberships.js.map +1 -1
- package/mint-fire.js +5 -4
- package/mint-fire.js.map +1 -1
- package/notifications.js +24 -23
- package/notifications.js.map +1 -1
- package/package.json +7 -6
- package/prompt.js +31 -30
- package/prompt.js.map +1 -1
- package/related-vibes.js +21 -20
- package/related-vibes.js.map +1 -1
- package/report.js +87 -86
- package/report.js.map +1 -1
- package/request-access.js +53 -54
- package/request-access.js.map +1 -1
- package/research.js +13 -12
- package/research.js.map +1 -1
- package/retention-msg.js +3 -2
- package/retention-msg.js.map +1 -1
- package/screen-shotter.js +3 -2
- package/screen-shotter.js.map +1 -1
- package/settings.js +131 -130
- package/settings.js.map +1 -1
- package/shared-mint.js +5 -4
- package/shared-mint.js.map +1 -1
- package/signin-ticket.js +5 -4
- package/signin-ticket.js.map +1 -1
- package/social-msg.js +62 -61
- package/social-msg.js.map +1 -1
- package/style.js +16 -15
- package/style.js.map +1 -1
- package/turn-variant.d.ts +1 -0
- package/turn-variant.js +5 -1
- package/turn-variant.js.map +1 -1
- package/types.js +18 -17
- package/types.js.map +1 -1
- package/vibes-diy-api.js +3 -2
- package/vibes-diy-api.js.map +1 -1
- package/vibes-diy-serv-ctx.js +9 -8
- package/vibes-diy-serv-ctx.js.map +1 -1
- package/vibes-types.js +3 -2
- package/vibes-types.js.map +1 -1
- package/welcome-msg.js +3 -2
- package/welcome-msg.js.map +1 -1
package/lazy-type.js
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
const RESOLVE = Symbol.for("vibes.diy/lazy-type.resolve");
|
|
2
|
+
export function lazyType(build) {
|
|
3
|
+
let resolved;
|
|
4
|
+
const resolve = () => {
|
|
5
|
+
if (resolved === undefined)
|
|
6
|
+
resolved = build();
|
|
7
|
+
return resolved;
|
|
8
|
+
};
|
|
9
|
+
const target = (() => undefined);
|
|
10
|
+
return new Proxy(target, {
|
|
11
|
+
apply: (_t, _this, args) => Reflect.apply(resolve(), resolve(), args),
|
|
12
|
+
get: (_t, prop, _receiver) => {
|
|
13
|
+
if (prop === RESOLVE)
|
|
14
|
+
return resolve;
|
|
15
|
+
const real = resolve();
|
|
16
|
+
const value = Reflect.get(real, prop, real);
|
|
17
|
+
return typeof value === "function" && typeof value.bind === "function"
|
|
18
|
+
? value.bind(real)
|
|
19
|
+
: value;
|
|
20
|
+
},
|
|
21
|
+
set: (_t, prop, value) => Reflect.set(resolve(), prop, value),
|
|
22
|
+
has: (_t, prop) => prop === RESOLVE || Reflect.has(resolve(), prop),
|
|
23
|
+
ownKeys: () => Reflect.ownKeys(resolve()),
|
|
24
|
+
getOwnPropertyDescriptor: (_t, prop) => {
|
|
25
|
+
const d = Reflect.getOwnPropertyDescriptor(resolve(), prop);
|
|
26
|
+
return d === undefined ? undefined : { ...d, configurable: true };
|
|
27
|
+
},
|
|
28
|
+
getPrototypeOf: () => Reflect.getPrototypeOf(resolve()),
|
|
29
|
+
defineProperty: (_t, prop, desc) => Reflect.defineProperty(resolve(), prop, desc),
|
|
30
|
+
deleteProperty: (_t, prop) => Reflect.deleteProperty(resolve(), prop),
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
export function isLazyType(value) {
|
|
34
|
+
return (typeof value === "function" || (typeof value === "object" && value !== null)) && RESOLVE in value;
|
|
35
|
+
}
|
|
36
|
+
export function resolveLazyType(value) {
|
|
37
|
+
return isLazyType(value) ? value[RESOLVE]() : value;
|
|
38
|
+
}
|
|
39
|
+
//# sourceMappingURL=lazy-type.js.map
|
package/lazy-type.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"lazy-type.js","sourceRoot":"","sources":["../jsr/lazy-type.ts"],"names":[],"mappings":"AA0BA,MAAM,OAAO,GAAG,MAAM,CAAC,GAAG,CAAC,6BAA6B,CAAC,CAAC;AAO1D,MAAM,UAAU,QAAQ,CAAmB,KAAc;IACvD,IAAI,QAAuB,CAAC;IAC5B,MAAM,OAAO,GAAG,GAAM,EAAE;QACtB,IAAI,QAAQ,KAAK,SAAS;YAAE,QAAQ,GAAG,KAAK,EAAE,CAAC;QAC/C,OAAO,QAAQ,CAAC;IAClB,CAAC,CAAC;IAIF,MAAM,MAAM,GAAG,CAAC,GAAG,EAAE,CAAC,SAAS,CAAiB,CAAC;IACjD,OAAO,IAAI,KAAK,CAAC,MAAM,EAAE;QACvB,KAAK,EAAE,CAAC,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,EAA6C,EAAE,OAAO,EAAE,EAAE,IAAI,CAAC;QAChH,GAAG,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE;YAC3B,IAAI,IAAI,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AE,EAAE,IAAI,EAAE,EAAE,CAAC,OAAO,CAAC,cAAc,CAAC,OAAO,EAAE,EAAE,IAAI,CAAC;KACtE,CAAC,CAAC;AACL,CAAC;AAGD,MAAM,UAAU,UAAU,CAAC,KAAc;IACvC,OAAO,CAAC,OAAO,KAAK,KAAK,UAAU,IAAI,CAAC,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,CAAC,CAAC,IAAI,OAAO,IAAK,KAAgB,CAAC;AACxH,CAAC;AAGD,MAAM,UAAU,eAAe,CAAI,KAAQ;IACzC,OAAO,UAAU,CAAC,KAAK,CAAC,CAAC,CAAC,CAAE,KAAK,CAAC,OAAO,CAAC,EAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AAC7D,CAAC"}
|
package/members.js
CHANGED
|
@@ -1,24 +1,25 @@
|
|
|
1
1
|
import { type } from "arktype";
|
|
2
2
|
import { dashAuthType, Role } from "./common.js";
|
|
3
|
-
|
|
3
|
+
import { lazyType } from "./lazy-type.js";
|
|
4
|
+
export const memberItem = lazyType(() => type({
|
|
4
5
|
displayName: "string",
|
|
5
6
|
role: Role,
|
|
6
|
-
});
|
|
7
|
-
export const reqListMembers = type({
|
|
7
|
+
}));
|
|
8
|
+
export const reqListMembers = lazyType(() => type({
|
|
8
9
|
type: "'vibes.diy.req-list-members'",
|
|
9
10
|
"auth?": dashAuthType,
|
|
10
11
|
ownerHandle: "string",
|
|
11
12
|
appSlug: "string",
|
|
12
|
-
});
|
|
13
|
+
}));
|
|
13
14
|
export function isReqListMembers(obj) {
|
|
14
15
|
return !(reqListMembers(obj) instanceof type.errors);
|
|
15
16
|
}
|
|
16
|
-
export const resListMembers = type({
|
|
17
|
+
export const resListMembers = lazyType(() => type({
|
|
17
18
|
type: "'vibes.diy.res-list-members'",
|
|
18
19
|
status: "'ok'",
|
|
19
20
|
members: memberItem.array(),
|
|
20
21
|
"participants?": "string[]",
|
|
21
|
-
});
|
|
22
|
+
}));
|
|
22
23
|
export function isResListMembers(obj) {
|
|
23
24
|
return !(resListMembers(obj) instanceof type.errors);
|
|
24
25
|
}
|
package/members.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"members.js","sourceRoot":"","sources":["../jsr/members.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"members.js","sourceRoot":"","sources":["../jsr/members.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,aAAa,CAAC;AACjD,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAS1C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,GAAG,EAAE,CACtC,IAAI,CAAC;IACH,WAAW,EAAE,QAAQ;IACrB,IAAI,EAAE,IAAI;CACX,CAAC,CACH,CAAC;AAGF,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC1C,IAAI,CAAC;IACH,IAAI,EAAE,8BAA8B;IACpC,OAAO,EAAE,YAAY;IACrB,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,QAAQ;CAClB,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC;AAED,MAAM,CAAC,MAAM,cAAc,GAAG,QAAQ,CAAC,GAAG,EAAE,CAC1C,IAAI,CAAC;IACH,IAAI,EAAE,8BAA8B;IACpC,MAAM,EAAE,MAAM;IACd,OAAO,EAAE,UAAU,CAAC,KAAK,EAAE;IAU3B,eAAe,EAAE,UAAU;CAC5B,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,gBAAgB,CAAC,GAAY;IAC3C,OAAO,CAAC,CAAC,cAAc,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AACvD,CAAC"}
|
package/memberships.js
CHANGED
|
@@ -1,27 +1,28 @@
|
|
|
1
1
|
import { type } from "arktype";
|
|
2
2
|
import { dashAuthType, Role } from "./common.js";
|
|
3
|
-
|
|
3
|
+
import { lazyType } from "./lazy-type.js";
|
|
4
|
+
export const resMembershipItem = lazyType(() => type({
|
|
4
5
|
ownerHandle: "string",
|
|
5
6
|
appSlug: "string",
|
|
6
7
|
activityAt: "string",
|
|
7
8
|
role: Role,
|
|
8
9
|
"title?": "string",
|
|
9
10
|
"icon?": type({ cid: "string", mime: "string" }),
|
|
10
|
-
});
|
|
11
|
-
export const reqListMemberships = type({
|
|
11
|
+
}));
|
|
12
|
+
export const reqListMemberships = lazyType(() => type({
|
|
12
13
|
type: "'vibes.diy.req-list-memberships'",
|
|
13
14
|
auth: dashAuthType,
|
|
14
15
|
"limit?": "number",
|
|
15
16
|
"cursor?": "string",
|
|
16
|
-
});
|
|
17
|
+
}));
|
|
17
18
|
export function isReqListMemberships(obj) {
|
|
18
19
|
return !(reqListMemberships(obj) instanceof type.errors);
|
|
19
20
|
}
|
|
20
|
-
export const resListMemberships = type({
|
|
21
|
+
export const resListMemberships = lazyType(() => type({
|
|
21
22
|
type: "'vibes.diy.res-list-memberships'",
|
|
22
23
|
items: resMembershipItem.array(),
|
|
23
24
|
"nextCursor?": "string",
|
|
24
|
-
});
|
|
25
|
+
}));
|
|
25
26
|
export function isResListMemberships(obj) {
|
|
26
27
|
return !(resListMemberships(obj) instanceof type.errors);
|
|
27
28
|
}
|
package/memberships.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memberships.js","sourceRoot":"","sources":["../jsr/memberships.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B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kB,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AAC3D,CAAC"}
|
package/mint-fire.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { type } from "arktype";
|
|
2
2
|
import { dashAuthType } from "./common.js";
|
|
3
|
-
|
|
3
|
+
import { lazyType } from "./lazy-type.js";
|
|
4
|
+
export const reqMintFire = lazyType(() => type({
|
|
4
5
|
type: "'vibes.diy.req-mint-fire'",
|
|
5
6
|
auth: dashAuthType,
|
|
6
7
|
chatId: "string",
|
|
@@ -10,14 +11,14 @@ export const reqMintFire = type({
|
|
|
10
11
|
prompt: "string",
|
|
11
12
|
"firstTurnAgent?": "boolean",
|
|
12
13
|
"submittedAt?": "number",
|
|
13
|
-
});
|
|
14
|
+
}));
|
|
14
15
|
export function isReqMintFire(obj) {
|
|
15
16
|
return !(reqMintFire(obj) instanceof type.errors);
|
|
16
17
|
}
|
|
17
|
-
export const resMintFire = type({
|
|
18
|
+
export const resMintFire = lazyType(() => type({
|
|
18
19
|
type: "'vibes.diy.res-mint-fire'",
|
|
19
20
|
accepted: "boolean",
|
|
20
|
-
});
|
|
21
|
+
}));
|
|
21
22
|
export function isResMintFire(obj) {
|
|
22
23
|
return !(resMintFire(obj) instanceof type.errors);
|
|
23
24
|
}
|
package/mint-fire.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mint-fire.js","sourceRoot":"","sources":["../jsr/mint-fire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"mint-fire.js","sourceRoot":"","sources":["../jsr/mint-fire.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAC3C,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAY1C,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,IAAI,CAAC;IACH,IAAI,EAAE,2BAA2B;IACjC,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,QAAQ;IAChB,WAAW,EAAE,QAAQ;IACrB,OAAO,EAAE,QAAQ;IAEjB,YAAY,EAAE,QAAQ;IACtB,MAAM,EAAE,QAAQ;IAIhB,iBAAiB,EAAE,SAAS;IAG5B,cAAc,EAAE,QAAQ;CACzB,CAAC,CACH,CAAC;AAGF,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,OAAO,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC;AAKD,MAAM,CAAC,MAAM,WAAW,GAAG,QAAQ,CAAC,GAAG,EAAE,CACvC,IAAI,CAAC;IACH,IAAI,EAAE,2BAA2B;IACjC,QAAQ,EAAE,SAAS;CACpB,CAAC,CACH,CAAC;AAGF,MAAM,UAAU,aAAa,CAAC,GAAY;IACxC,OAAO,CAAC,CAAC,WAAW,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AACpD,CAAC"}
|
package/notifications.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import { type } from "arktype";
|
|
2
|
-
|
|
3
|
-
export const
|
|
2
|
+
import { lazyType } from "./lazy-type.js";
|
|
3
|
+
export const notificationTypeEnum = lazyType(() => type("'build-complete' | 'build-failed' | 'vibe-published' | 'comment-posted' | 'request-approved' | 'request-revoked' | 'vibe-remixed' | 'dm-received' | 'member-joined' | 'access-requested' | 'follow-request' | 'follower-added' | 'follow-approved' | 'app-message' | 'connection-expiring'"));
|
|
4
|
+
export const EvtUserNotification = lazyType(() => type({
|
|
4
5
|
type: "'vibes.diy.evt-user-notification'",
|
|
5
6
|
notificationType: notificationTypeEnum,
|
|
6
7
|
ownerHandle: "string",
|
|
7
8
|
appSlug: "string | null",
|
|
8
9
|
"counterpartHandle?": "string",
|
|
9
10
|
"body?": "string",
|
|
10
|
-
});
|
|
11
|
+
}));
|
|
11
12
|
export function isEvtUserNotification(obj) {
|
|
12
13
|
return !(EvtUserNotification(obj) instanceof type.errors);
|
|
13
14
|
}
|
|
@@ -38,50 +39,50 @@ export function shardBelongsToUser(shard, userId) {
|
|
|
38
39
|
const n = Number(suffix);
|
|
39
40
|
return n >= 1 && n <= MAX_ROLL_INDEX;
|
|
40
41
|
}
|
|
41
|
-
export const ReqSubscribeUserNotificationsRaw = type({
|
|
42
|
+
export const ReqSubscribeUserNotificationsRaw = lazyType(() => type({
|
|
42
43
|
type: "'vibes.diy.req-subscribe-user-notifications'",
|
|
43
|
-
});
|
|
44
|
+
}));
|
|
44
45
|
export function isReqSubscribeUserNotificationsRaw(obj) {
|
|
45
46
|
return !(ReqSubscribeUserNotificationsRaw(obj) instanceof type.errors);
|
|
46
47
|
}
|
|
47
|
-
export const ResSubscribeUserNotifications = type({
|
|
48
|
+
export const ResSubscribeUserNotifications = lazyType(() => type({
|
|
48
49
|
type: "'vibes.diy.res-subscribe-user-notifications'",
|
|
49
50
|
status: "'ok'",
|
|
50
|
-
});
|
|
51
|
+
}));
|
|
51
52
|
export function isResSubscribeUserNotifications(obj) {
|
|
52
53
|
return !(ResSubscribeUserNotifications(obj) instanceof type.errors);
|
|
53
54
|
}
|
|
54
|
-
export const ReqRegisterPushTokenRaw = type({
|
|
55
|
+
export const ReqRegisterPushTokenRaw = lazyType(() => type({
|
|
55
56
|
type: "'vibes.diy.req-register-push-token'",
|
|
56
57
|
token: "string",
|
|
57
58
|
platform: "'ios'",
|
|
58
59
|
appVersion: "string",
|
|
59
|
-
});
|
|
60
|
+
}));
|
|
60
61
|
export function isReqRegisterPushTokenRaw(obj) {
|
|
61
62
|
return !(ReqRegisterPushTokenRaw(obj) instanceof type.errors);
|
|
62
63
|
}
|
|
63
|
-
export const ResRegisterPushToken = type({
|
|
64
|
+
export const ResRegisterPushToken = lazyType(() => type({
|
|
64
65
|
type: "'vibes.diy.res-register-push-token'",
|
|
65
66
|
status: "'ok'",
|
|
66
|
-
});
|
|
67
|
+
}));
|
|
67
68
|
export function isResRegisterPushToken(obj) {
|
|
68
69
|
return !(ResRegisterPushToken(obj) instanceof type.errors);
|
|
69
70
|
}
|
|
70
|
-
export const ReqDeregisterPushTokenRaw = type({
|
|
71
|
+
export const ReqDeregisterPushTokenRaw = lazyType(() => type({
|
|
71
72
|
type: "'vibes.diy.req-deregister-push-token'",
|
|
72
73
|
token: "string",
|
|
73
|
-
});
|
|
74
|
+
}));
|
|
74
75
|
export function isReqDeregisterPushTokenRaw(obj) {
|
|
75
76
|
return !(ReqDeregisterPushTokenRaw(obj) instanceof type.errors);
|
|
76
77
|
}
|
|
77
|
-
export const ResDeregisterPushToken = type({
|
|
78
|
+
export const ResDeregisterPushToken = lazyType(() => type({
|
|
78
79
|
type: "'vibes.diy.res-deregister-push-token'",
|
|
79
80
|
status: "'ok'",
|
|
80
|
-
});
|
|
81
|
+
}));
|
|
81
82
|
export function isResDeregisterPushToken(obj) {
|
|
82
83
|
return !(ResDeregisterPushToken(obj) instanceof type.errors);
|
|
83
84
|
}
|
|
84
|
-
export const notificationRow = type({
|
|
85
|
+
export const notificationRow = lazyType(() => type({
|
|
85
86
|
id: "string",
|
|
86
87
|
userId: "string",
|
|
87
88
|
notificationType: notificationTypeEnum,
|
|
@@ -94,14 +95,14 @@ export const notificationRow = type({
|
|
|
94
95
|
dedupeKey: "string",
|
|
95
96
|
created: "string",
|
|
96
97
|
"readAt?": "string | null",
|
|
97
|
-
});
|
|
98
|
+
}));
|
|
98
99
|
export function isNotificationRow(obj) {
|
|
99
100
|
return !(notificationRow(obj) instanceof type.errors);
|
|
100
101
|
}
|
|
101
|
-
export const evtOwnerDigest = type({
|
|
102
|
+
export const evtOwnerDigest = lazyType(() => type({
|
|
102
103
|
type: "'vibes.diy.evt-owner-digest'",
|
|
103
104
|
userId: "string",
|
|
104
|
-
});
|
|
105
|
+
}));
|
|
105
106
|
export function isEvtOwnerDigest(obj) {
|
|
106
107
|
return !(evtOwnerDigest(obj) instanceof type.errors);
|
|
107
108
|
}
|
|
@@ -132,15 +133,15 @@ export const NOTIFICATION_TYPE_PREF_KEY = {
|
|
|
132
133
|
"app-message": "appMessage",
|
|
133
134
|
"connection-expiring": "connectionExpiring",
|
|
134
135
|
};
|
|
135
|
-
export const evtNotificationEmail = type({
|
|
136
|
+
export const evtNotificationEmail = lazyType(() => type({
|
|
136
137
|
type: "'vibes.diy.evt-notification-email'",
|
|
137
138
|
userId: "string",
|
|
138
139
|
notificationId: "string",
|
|
139
|
-
});
|
|
140
|
+
}));
|
|
140
141
|
export function isEvtNotificationEmail(obj) {
|
|
141
142
|
return !(evtNotificationEmail(obj) instanceof type.errors);
|
|
142
143
|
}
|
|
143
|
-
export const emitNotificationInput = type({
|
|
144
|
+
export const emitNotificationInput = lazyType(() => type({
|
|
144
145
|
userId: "string",
|
|
145
146
|
notificationType: notificationTypeEnum,
|
|
146
147
|
ownerHandle: "string",
|
|
@@ -150,5 +151,5 @@ export const emitNotificationInput = type({
|
|
|
150
151
|
"actorUserId?": "string",
|
|
151
152
|
"targetRef?": "unknown",
|
|
152
153
|
dedupeKey: "string",
|
|
153
|
-
});
|
|
154
|
+
}));
|
|
154
155
|
//# sourceMappingURL=notifications.js.map
|
package/notifications.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../jsr/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"notifications.js","sourceRoot":"","sources":["../jsr/notifications.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAC;AAC/B,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AA8B1C,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E,gBAAgB;IACnC,aAAa,EAAE,YAAY;IAC3B,qBAAqB,EAAE,oBAAoB;CACQ,CAAC;AAKtD,MAAM,CAAC,MAAM,oBAAoB,GAAG,QAAQ,CAAC,GAAG,EAAE,CAChD,IAAI,CAAC;IACH,IAAI,EAAE,oCAAoC;IAC1C,MAAM,EAAE,QAAQ;IAChB,cAAc,EAAE,QAAQ;CACzB,CAAC,CACH,CAAC;AAEF,MAAM,UAAU,sBAAsB,CAAC,GAAY;IACjD,OAAO,CAAC,CAAC,oBAAoB,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AAC7D,CAAC;AAED,MAAM,CAAC,MAAM,qBAAqB,GAAG,QAAQ,CAAC,GAAG,EAAE,CACjD,IAAI,CAAC;IACH,MAAM,EAAE,QAAQ;IAChB,gBAAgB,EAAE,oBAAoB;IACtC,WAAW,EAAE,QAAQ;IAIrB,OAAO,EAAE,eAAe;IACxB,IAAI,EAAE,QAAQ;IACd,cAAc,EAAE,QAAQ;IACxB,cAAc,EAAE,QAAQ;IACxB,YAAY,EAAE,SAAS;IACvB,SAAS,EAAE,QAAQ;CACpB,CAAC,CACH,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vibes.diy/api-types",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.16",
|
|
4
4
|
"license": "Apache-2.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./index.js",
|
|
@@ -8,17 +8,18 @@
|
|
|
8
8
|
".": "./index.js",
|
|
9
9
|
"./db-acls": "./db-acls.js",
|
|
10
10
|
"./app-documents": "./app-documents.js",
|
|
11
|
-
"./access-function": "./access-function.js"
|
|
11
|
+
"./access-function": "./access-function.js",
|
|
12
|
+
"./lazy-type": "./lazy-type.js"
|
|
12
13
|
},
|
|
13
14
|
"scripts": {
|
|
14
15
|
"build": "core-cli tsc"
|
|
15
16
|
},
|
|
16
17
|
"dependencies": {
|
|
17
18
|
"@adviser/cement": "~0.5.34",
|
|
18
|
-
"@cloudflare/workers-types": "~5.
|
|
19
|
-
"@vibes.diy/call-ai-v2": "14.0.
|
|
20
|
-
"@vibes.diy/identity": "14.0.
|
|
21
|
-
"@vibes.diy/vibe-types": "14.0.
|
|
19
|
+
"@cloudflare/workers-types": "~5.20260830.1",
|
|
20
|
+
"@vibes.diy/call-ai-v2": "14.0.16",
|
|
21
|
+
"@vibes.diy/identity": "14.0.16",
|
|
22
|
+
"@vibes.diy/vibe-types": "14.0.16",
|
|
22
23
|
"arktype": "~2.2.3"
|
|
23
24
|
},
|
|
24
25
|
"repository": {
|
package/prompt.js
CHANGED
|
@@ -4,83 +4,84 @@ import { vibeFile } from "./common.js";
|
|
|
4
4
|
import { Style } from "./style.js";
|
|
5
5
|
import { PromptResearch, isPromptResearch } from "./research.js";
|
|
6
6
|
import { CodegenTurnVariant } from "./turn-variant.js";
|
|
7
|
-
|
|
7
|
+
import { lazyType } from "./lazy-type.js";
|
|
8
|
+
export const PromptBase = lazyType(() => type({
|
|
8
9
|
streamId: "string",
|
|
9
10
|
chatId: "string",
|
|
10
11
|
seq: "number",
|
|
11
12
|
timestamp: CoercedDate,
|
|
12
|
-
});
|
|
13
|
-
export const PromptReq = type({
|
|
13
|
+
}));
|
|
14
|
+
export const PromptReq = lazyType(() => type({
|
|
14
15
|
type: "'prompt.req'",
|
|
15
16
|
request: LLMRequest,
|
|
16
17
|
"agentDispatched?": "true",
|
|
17
18
|
"platformInitiated?": "true",
|
|
18
|
-
}).and(PromptBase);
|
|
19
|
+
}).and(PromptBase));
|
|
19
20
|
export function isPromptReq(msg) {
|
|
20
21
|
return !(PromptReq(msg) instanceof type.errors);
|
|
21
22
|
}
|
|
22
|
-
export const PromptFS = type({
|
|
23
|
+
export const PromptFS = lazyType(() => type({
|
|
23
24
|
type: "'prompt.fs'",
|
|
24
25
|
fileSystem: vibeFile.array(),
|
|
25
|
-
}).and(PromptBase);
|
|
26
|
+
}).and(PromptBase));
|
|
26
27
|
export function isPromptFSSet(msg) {
|
|
27
28
|
return !(PromptFS(msg) instanceof type.errors);
|
|
28
29
|
}
|
|
29
|
-
export const PromptBlockBegin = type({
|
|
30
|
+
export const PromptBlockBegin = lazyType(() => type({
|
|
30
31
|
type: "'prompt.block-begin'",
|
|
31
|
-
}).and(PromptBase);
|
|
32
|
-
export const PromptError = type({
|
|
32
|
+
}).and(PromptBase));
|
|
33
|
+
export const PromptError = lazyType(() => type({
|
|
33
34
|
type: "'prompt.error'",
|
|
34
35
|
error: "string",
|
|
35
36
|
"code?": "'turn-lost'",
|
|
36
37
|
"variant?": CodegenTurnVariant,
|
|
37
|
-
}).and(PromptBase);
|
|
38
|
+
}).and(PromptBase));
|
|
38
39
|
export function isPromptError(msg) {
|
|
39
40
|
return !(PromptError(msg) instanceof type.errors);
|
|
40
41
|
}
|
|
41
|
-
export const PromptBlockEnd = type({
|
|
42
|
+
export const PromptBlockEnd = lazyType(() => type({
|
|
42
43
|
type: "'prompt.block-end'",
|
|
43
|
-
}).and(PromptBase);
|
|
44
|
-
export const PromptModelResolved = type({
|
|
44
|
+
}).and(PromptBase));
|
|
45
|
+
export const PromptModelResolved = lazyType(() => type({
|
|
45
46
|
type: "'prompt.model-resolved'",
|
|
46
47
|
model: "string",
|
|
47
|
-
}).and(PromptBase);
|
|
48
|
+
}).and(PromptBase));
|
|
48
49
|
export function isPromptModelResolved(msg) {
|
|
49
50
|
return !(PromptModelResolved(msg) instanceof type.errors);
|
|
50
51
|
}
|
|
51
|
-
export const PromptFsPersisted = type({
|
|
52
|
+
export const PromptFsPersisted = lazyType(() => type({
|
|
52
53
|
type: "'prompt.fs-persisted'",
|
|
53
54
|
fsRef: FileSystemRef,
|
|
54
|
-
}).and(PromptBase);
|
|
55
|
+
}).and(PromptBase));
|
|
55
56
|
export function isPromptFsPersisted(msg) {
|
|
56
57
|
return !(PromptFsPersisted(msg) instanceof type.errors);
|
|
57
58
|
}
|
|
58
|
-
export const PromptSystemPrompt = type({
|
|
59
|
+
export const PromptSystemPrompt = lazyType(() => type({
|
|
59
60
|
type: "'prompt.system-prompt'",
|
|
60
61
|
text: "string",
|
|
61
|
-
}).and(PromptBase);
|
|
62
|
+
}).and(PromptBase));
|
|
62
63
|
export function isPromptSystemPrompt(msg) {
|
|
63
64
|
return !(PromptSystemPrompt(msg) instanceof type.errors);
|
|
64
65
|
}
|
|
65
|
-
export const PromptRaw = type({
|
|
66
|
+
export const PromptRaw = lazyType(() => type({
|
|
66
67
|
type: "'prompt.raw'",
|
|
67
68
|
text: "string",
|
|
68
|
-
}).and(PromptBase);
|
|
69
|
+
}).and(PromptBase));
|
|
69
70
|
export function isPromptRaw(msg) {
|
|
70
71
|
return !(PromptRaw(msg) instanceof type.errors);
|
|
71
72
|
}
|
|
72
|
-
export const PromptDryRunPayload = type({
|
|
73
|
+
export const PromptDryRunPayload = lazyType(() => type({
|
|
73
74
|
type: "'prompt.dry-run-payload'",
|
|
74
75
|
request: LLMRequest,
|
|
75
|
-
}).and(PromptBase);
|
|
76
|
+
}).and(PromptBase));
|
|
76
77
|
export function isPromptDryRunPayload(msg) {
|
|
77
78
|
return !(PromptDryRunPayload(msg) instanceof type.errors);
|
|
78
79
|
}
|
|
79
|
-
export const PromptRestyle = type({
|
|
80
|
+
export const PromptRestyle = lazyType(() => type({
|
|
80
81
|
type: "'prompt.restyle'",
|
|
81
82
|
style: Style,
|
|
82
83
|
description: "string",
|
|
83
|
-
}).and(PromptBase);
|
|
84
|
+
}).and(PromptBase));
|
|
84
85
|
export function isPromptRestyle(msg) {
|
|
85
86
|
return !(PromptRestyle(msg) instanceof type.errors);
|
|
86
87
|
}
|
|
@@ -92,7 +93,7 @@ const WORK_STATUS_MAX_PATH_CHARS = 512;
|
|
|
92
93
|
export function workStatusBlockSeq(round) {
|
|
93
94
|
return WORK_STATUS_SEQ_BASE - round;
|
|
94
95
|
}
|
|
95
|
-
const PromptStatusTool = type({
|
|
96
|
+
const PromptStatusTool = lazyType(() => type({
|
|
96
97
|
name: "string",
|
|
97
98
|
"path?": "string",
|
|
98
99
|
"+": "reject",
|
|
@@ -104,8 +105,8 @@ const PromptStatusTool = type({
|
|
|
104
105
|
return ctx.mustBe("a bounded tool path");
|
|
105
106
|
}
|
|
106
107
|
return true;
|
|
107
|
-
});
|
|
108
|
-
export const PromptStatus = type({
|
|
108
|
+
}));
|
|
109
|
+
export const PromptStatus = lazyType(() => type({
|
|
109
110
|
type: "'prompt.status'",
|
|
110
111
|
streamId: "string",
|
|
111
112
|
chatId: "string",
|
|
@@ -129,11 +130,11 @@ export const PromptStatus = type({
|
|
|
129
130
|
return ctx.mustBe("a valid server timestamp");
|
|
130
131
|
}
|
|
131
132
|
return true;
|
|
132
|
-
});
|
|
133
|
+
}));
|
|
133
134
|
export function isPromptStatus(msg) {
|
|
134
135
|
return !(PromptStatus(msg) instanceof type.errors);
|
|
135
136
|
}
|
|
136
|
-
export const PromptMsgs = PromptBlockBegin.or(PromptBlockEnd)
|
|
137
|
+
export const PromptMsgs = lazyType(() => PromptBlockBegin.or(PromptBlockEnd)
|
|
137
138
|
.or(PromptReq)
|
|
138
139
|
.or(PromptError)
|
|
139
140
|
.or(PromptFS)
|
|
@@ -144,7 +145,7 @@ export const PromptMsgs = PromptBlockBegin.or(PromptBlockEnd)
|
|
|
144
145
|
.or(PromptSystemPrompt)
|
|
145
146
|
.or(PromptRestyle)
|
|
146
147
|
.or(PromptStatus)
|
|
147
|
-
.or(PromptResearch);
|
|
148
|
+
.or(PromptResearch));
|
|
148
149
|
export const isPromptMsg = (msg) => !(PromptMsgs(msg) instanceof type.errors);
|
|
149
150
|
export function isPromptBlockBegin(msg) {
|
|
150
151
|
return !(PromptBlockBegin(msg) instanceof type.errors);
|
package/prompt.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prompt.js","sourceRoot":"","sources":["../jsr/prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAA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AC,MAAM,CAAC,CAAC;AAE1G,MAAM,UAAU,kBAAkB,CAAC,GAAY;IAC7C,OAAO,CAAC,CAAC,gBAAgB,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM,CAAC,CAAC;AACzD,CAAC;AAED,OAAO,EAAE,gBAAgB,EAAE,CAAC;AAE5B,MAAM,UAAU,gBAAgB,CAAC,GAAY,EAAE,QAAiB;IAC9D,IAAI,cAAc,CAAC,GAAG,CAAC,YAAY,IAAI,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IAC7D,OAAO,CAAC,QAAQ,IAAK,GAAsB,CAAC,QAAQ,KAAK,QAAQ,CAAC;AACpE,CAAC"}
|
package/related-vibes.js
CHANGED
|
@@ -1,79 +1,80 @@
|
|
|
1
1
|
import { type } from "arktype";
|
|
2
2
|
import { dashAuthType } from "./common.js";
|
|
3
|
-
|
|
3
|
+
import { lazyType } from "./lazy-type.js";
|
|
4
|
+
export const recommendedCuratedItem = lazyType(() => type({
|
|
4
5
|
id: "string",
|
|
5
6
|
ownerHandle: "string",
|
|
6
7
|
appSlug: "string",
|
|
7
|
-
});
|
|
8
|
-
export const ActiveRecommendedCurated = type({
|
|
8
|
+
}));
|
|
9
|
+
export const ActiveRecommendedCurated = lazyType(() => type({
|
|
9
10
|
type: "'active.recommended-curated'",
|
|
10
11
|
items: recommendedCuratedItem.array(),
|
|
11
|
-
});
|
|
12
|
+
}));
|
|
12
13
|
export function isActiveRecommendedCurated(obj) {
|
|
13
14
|
return !(ActiveRecommendedCurated(obj) instanceof type.errors);
|
|
14
15
|
}
|
|
15
|
-
export const recommendedMaskedItem = type({
|
|
16
|
+
export const recommendedMaskedItem = lazyType(() => type({
|
|
16
17
|
ownerHandle: "string",
|
|
17
18
|
appSlug: "string",
|
|
18
|
-
});
|
|
19
|
-
export const ActiveRecommendedMasked = type({
|
|
19
|
+
}));
|
|
20
|
+
export const ActiveRecommendedMasked = lazyType(() => type({
|
|
20
21
|
type: "'active.recommended-masked'",
|
|
21
22
|
items: recommendedMaskedItem.array(),
|
|
22
|
-
});
|
|
23
|
+
}));
|
|
23
24
|
export function isActiveRecommendedMasked(obj) {
|
|
24
25
|
return !(ActiveRecommendedMasked(obj) instanceof type.errors);
|
|
25
26
|
}
|
|
26
27
|
export const RECOMMENDED_CURATED_CAP = 50;
|
|
27
28
|
export const RECOMMENDED_MASKED_CAP = 200;
|
|
28
|
-
export const reqRelatedVibes = type({
|
|
29
|
+
export const reqRelatedVibes = lazyType(() => type({
|
|
29
30
|
type: "'vibes.diy.req-related-vibes'",
|
|
30
31
|
"auth?": dashAuthType,
|
|
31
32
|
ownerHandle: "string",
|
|
32
33
|
appSlug: "string",
|
|
33
|
-
});
|
|
34
|
+
}));
|
|
34
35
|
export function isReqRelatedVibes(obj) {
|
|
35
36
|
return !(reqRelatedVibes(obj) instanceof type.errors);
|
|
36
37
|
}
|
|
37
|
-
export const resRelatedVibesItem = type({
|
|
38
|
+
export const resRelatedVibesItem = lazyType(() => type({
|
|
38
39
|
id: "string",
|
|
39
40
|
ownerHandle: "string",
|
|
40
41
|
appSlug: "string",
|
|
41
42
|
section: "'chip-link' | 'curated' | 'owner' | 'platform' | 'similar'",
|
|
42
43
|
"title?": "string",
|
|
43
44
|
"icon?": type({ cid: "string", mime: "string" }),
|
|
44
|
-
});
|
|
45
|
-
export const resRelatedVibes = type({
|
|
45
|
+
}));
|
|
46
|
+
export const resRelatedVibes = lazyType(() => type({
|
|
46
47
|
type: "'vibes.diy.res-related-vibes'",
|
|
47
48
|
generatedAt: "string",
|
|
48
49
|
items: resRelatedVibesItem.array(),
|
|
49
|
-
});
|
|
50
|
+
}));
|
|
50
51
|
export function isResRelatedVibes(obj) {
|
|
51
52
|
return !(resRelatedVibes(obj) instanceof type.errors);
|
|
52
53
|
}
|
|
53
54
|
export const SIMILAR_VIBES_LIMIT = 4;
|
|
54
55
|
export const SIMILAR_VIBES_CANDIDATES = 10;
|
|
55
56
|
export const SIMILAR_VIBES_MAX_PROMPT_CHARS = 2000;
|
|
56
|
-
export const reqSimilarVibes = type({
|
|
57
|
+
export const reqSimilarVibes = lazyType(() => type({
|
|
57
58
|
type: "'vibes.diy.req-similar-vibes'",
|
|
58
59
|
auth: dashAuthType,
|
|
59
60
|
promptText: "string",
|
|
60
61
|
"excludeOwnerHandle?": "string",
|
|
61
62
|
"excludeAppSlug?": "string",
|
|
62
|
-
});
|
|
63
|
+
}));
|
|
63
64
|
export function isReqSimilarVibes(obj) {
|
|
64
65
|
return !(reqSimilarVibes(obj) instanceof type.errors);
|
|
65
66
|
}
|
|
66
|
-
export const resSimilarVibesItem = type({
|
|
67
|
+
export const resSimilarVibesItem = lazyType(() => type({
|
|
67
68
|
ownerHandle: "string",
|
|
68
69
|
appSlug: "string",
|
|
69
70
|
"title?": "string",
|
|
70
71
|
"icon?": type({ cid: "string", mime: "string" }),
|
|
71
|
-
});
|
|
72
|
-
export const resSimilarVibes = type({
|
|
72
|
+
}));
|
|
73
|
+
export const resSimilarVibes = lazyType(() => type({
|
|
73
74
|
type: "'vibes.diy.res-similar-vibes'",
|
|
74
75
|
generatedAt: "string",
|
|
75
76
|
items: resSimilarVibesItem.array(),
|
|
76
|
-
});
|
|
77
|
+
}));
|
|
77
78
|
export function isResSimilarVibes(obj) {
|
|
78
79
|
return !(resSimilarVibes(obj) instanceof type.errors);
|
|
79
80
|
}
|