@shadowob/shared 1.1.3-dev.281 → 1.1.4
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/dist/{chunk-E3UBH4AI.js → chunk-44D7I4ZW.js} +3 -0
- package/dist/index.cjs +3 -0
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{message.types-Cyp3tmIX.d.cts → message.types-Ca8col0f.d.cts} +9 -1
- package/dist/{message.types-Cyp3tmIX.d.ts → message.types-Ca8col0f.d.ts} +9 -1
- package/dist/types/index.d.cts +1 -1
- package/dist/types/index.d.ts +1 -1
- package/dist/utils/index.cjs +3 -0
- package/dist/utils/index.d.cts +4 -1
- package/dist/utils/index.d.ts +4 -1
- package/dist/utils/index.js +1 -1
- package/package.json +1 -1
|
@@ -190,6 +190,7 @@ function uniqueValues(values) {
|
|
|
190
190
|
function canonicalMentionToken(mention) {
|
|
191
191
|
if (mention.kind === "channel") return `<#${mention.channelId ?? mention.targetId}>`;
|
|
192
192
|
if (mention.kind === "server") return `<@server:${mention.serverId ?? mention.targetId}>`;
|
|
193
|
+
if (mention.kind === "app") return `<@app:${mention.appId ?? mention.targetId}>`;
|
|
193
194
|
if (mention.kind === "here" || mention.kind === "everyone") {
|
|
194
195
|
const scope = mention.serverId ?? mention.targetId;
|
|
195
196
|
return scope ? `<!${mention.kind}:${scope}>` : `<!${mention.kind}>`;
|
|
@@ -197,6 +198,8 @@ function canonicalMentionToken(mention) {
|
|
|
197
198
|
return `<@${mention.userId ?? mention.targetId}>`;
|
|
198
199
|
}
|
|
199
200
|
function parseCanonicalMentionToken(token) {
|
|
201
|
+
const app = token.match(/^<@app:([^>]+)>$/u);
|
|
202
|
+
if (app?.[1]) return { kind: "app", targetId: app[1] };
|
|
200
203
|
const user = token.match(/^<@([^>:]+)>$/u);
|
|
201
204
|
if (user?.[1]) return { kind: "user", targetId: user[1] };
|
|
202
205
|
const server = token.match(/^<@server:([^>]+)>$/u);
|
package/dist/index.cjs
CHANGED
|
@@ -718,6 +718,7 @@ function uniqueValues(values) {
|
|
|
718
718
|
function canonicalMentionToken(mention) {
|
|
719
719
|
if (mention.kind === "channel") return `<#${mention.channelId ?? mention.targetId}>`;
|
|
720
720
|
if (mention.kind === "server") return `<@server:${mention.serverId ?? mention.targetId}>`;
|
|
721
|
+
if (mention.kind === "app") return `<@app:${mention.appId ?? mention.targetId}>`;
|
|
721
722
|
if (mention.kind === "here" || mention.kind === "everyone") {
|
|
722
723
|
const scope = mention.serverId ?? mention.targetId;
|
|
723
724
|
return scope ? `<!${mention.kind}:${scope}>` : `<!${mention.kind}>`;
|
|
@@ -725,6 +726,8 @@ function canonicalMentionToken(mention) {
|
|
|
725
726
|
return `<@${mention.userId ?? mention.targetId}>`;
|
|
726
727
|
}
|
|
727
728
|
function parseCanonicalMentionToken(token) {
|
|
729
|
+
const app = token.match(/^<@app:([^>]+)>$/u);
|
|
730
|
+
if (app?.[1]) return { kind: "app", targetId: app[1] };
|
|
728
731
|
const user = token.match(/^<@([^>:]+)>$/u);
|
|
729
732
|
if (user?.[1]) return { kind: "user", targetId: user[1] };
|
|
730
733
|
const server = token.match(/^<@server:([^>]+)>$/u);
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CLIENT_EVENTS, ClientEvent, LIMITS, SERVER_EVENTS, ServerEvent } from './constants/index.cjs';
|
|
2
2
|
export { DEFAULT_HOMEPLAY_CATALOG, SHADOW_PLAY_SERVER_TEMPLATE, ShadowHomePlayCatalogItem, ShadowPlayAction, ShadowPlayAvailability, ShadowPlayServerTemplate, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername } from './play-catalog/index.cjs';
|
|
3
3
|
export { Agent, AgentCapability, AgentInfo, AgentKernelType, AgentStatus, AuthResponse, Channel, ChannelSortBy, ChannelSortDirection, ChannelSortOptions, ChannelType, CreateAgentRequest, CreateChannelRequest, CreateServerRequest, FriendEntry, FriendSource, Friendship, FriendshipStatus, LoginRequest, Member, MemberRole, RegisterRequest, Server, UpdateChannelRequest, UpdateServerRequest, User, UserMembership, UserMembershipTier, UserProfile, UserStatus } from './types/index.cjs';
|
|
4
|
-
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from './message.types-
|
|
4
|
+
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from './message.types-Ca8col0f.cjs';
|
|
5
5
|
export { BgPattern, CAT_AVATAR_COUNT, CatConfig, CatDecoration, CatExpression, CatPattern, MessageMentionTextSegment, assignMentionRanges, buildMentionMarkdownLinks, canonicalMentionToken, canonicalizeMentionContent, escapeMarkdownLinkLabel, formatDate, generateInviteCode, generateRandomCatConfig, getAllCatAvatars, getCatAvatar, getCatAvatarByUserId, getCatSvgString, isCanonicalMentionToken, isValidEmail, mentionDisplayText, parseCanonicalMentionToken, renderCatSvg, segmentTextByMentions, slugify } from './utils/index.cjs';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CLIENT_EVENTS, ClientEvent, LIMITS, SERVER_EVENTS, ServerEvent } from './constants/index.js';
|
|
2
2
|
export { DEFAULT_HOMEPLAY_CATALOG, SHADOW_PLAY_SERVER_TEMPLATE, ShadowHomePlayCatalogItem, ShadowPlayAction, ShadowPlayAvailability, ShadowPlayServerTemplate, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername } from './play-catalog/index.js';
|
|
3
3
|
export { Agent, AgentCapability, AgentInfo, AgentKernelType, AgentStatus, AuthResponse, Channel, ChannelSortBy, ChannelSortDirection, ChannelSortOptions, ChannelType, CreateAgentRequest, CreateChannelRequest, CreateServerRequest, FriendEntry, FriendSource, Friendship, FriendshipStatus, LoginRequest, Member, MemberRole, RegisterRequest, Server, UpdateChannelRequest, UpdateServerRequest, User, UserMembership, UserMembershipTier, UserProfile, UserStatus } from './types/index.js';
|
|
4
|
-
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from './message.types-
|
|
4
|
+
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from './message.types-Ca8col0f.js';
|
|
5
5
|
export { BgPattern, CAT_AVATAR_COUNT, CatConfig, CatDecoration, CatExpression, CatPattern, MessageMentionTextSegment, assignMentionRanges, buildMentionMarkdownLinks, canonicalMentionToken, canonicalizeMentionContent, escapeMarkdownLinkLabel, formatDate, generateInviteCode, generateRandomCatConfig, getAllCatAvatars, getCatAvatar, getCatAvatarByUserId, getCatSvgString, isCanonicalMentionToken, isValidEmail, mentionDisplayText, parseCanonicalMentionToken, renderCatSvg, segmentTextByMentions, slugify } from './utils/index.js';
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ interface Message {
|
|
|
20
20
|
reactions?: ReactionGroup[];
|
|
21
21
|
metadata?: MessageMetadata | null;
|
|
22
22
|
}
|
|
23
|
-
type MessageMentionKind = 'user' | 'buddy' | 'channel' | 'server' | 'here' | 'everyone';
|
|
23
|
+
type MessageMentionKind = 'user' | 'buddy' | 'app' | 'channel' | 'server' | 'here' | 'everyone';
|
|
24
24
|
interface MessageMentionRange {
|
|
25
25
|
start: number;
|
|
26
26
|
end: number;
|
|
@@ -42,6 +42,10 @@ interface MessageMention {
|
|
|
42
42
|
serverName?: string | null;
|
|
43
43
|
channelId?: string;
|
|
44
44
|
channelName?: string | null;
|
|
45
|
+
appId?: string;
|
|
46
|
+
appKey?: string;
|
|
47
|
+
appName?: string | null;
|
|
48
|
+
iconUrl?: string | null;
|
|
45
49
|
userId?: string;
|
|
46
50
|
username?: string | null;
|
|
47
51
|
displayName?: string | null;
|
|
@@ -148,6 +152,10 @@ interface MentionSuggestion {
|
|
|
148
152
|
serverName?: string | null;
|
|
149
153
|
channelId?: string;
|
|
150
154
|
channelName?: string | null;
|
|
155
|
+
appId?: string;
|
|
156
|
+
appKey?: string;
|
|
157
|
+
appName?: string | null;
|
|
158
|
+
iconUrl?: string | null;
|
|
151
159
|
userId?: string;
|
|
152
160
|
username?: string | null;
|
|
153
161
|
displayName?: string | null;
|
|
@@ -20,7 +20,7 @@ interface Message {
|
|
|
20
20
|
reactions?: ReactionGroup[];
|
|
21
21
|
metadata?: MessageMetadata | null;
|
|
22
22
|
}
|
|
23
|
-
type MessageMentionKind = 'user' | 'buddy' | 'channel' | 'server' | 'here' | 'everyone';
|
|
23
|
+
type MessageMentionKind = 'user' | 'buddy' | 'app' | 'channel' | 'server' | 'here' | 'everyone';
|
|
24
24
|
interface MessageMentionRange {
|
|
25
25
|
start: number;
|
|
26
26
|
end: number;
|
|
@@ -42,6 +42,10 @@ interface MessageMention {
|
|
|
42
42
|
serverName?: string | null;
|
|
43
43
|
channelId?: string;
|
|
44
44
|
channelName?: string | null;
|
|
45
|
+
appId?: string;
|
|
46
|
+
appKey?: string;
|
|
47
|
+
appName?: string | null;
|
|
48
|
+
iconUrl?: string | null;
|
|
45
49
|
userId?: string;
|
|
46
50
|
username?: string | null;
|
|
47
51
|
displayName?: string | null;
|
|
@@ -148,6 +152,10 @@ interface MentionSuggestion {
|
|
|
148
152
|
serverName?: string | null;
|
|
149
153
|
channelId?: string;
|
|
150
154
|
channelName?: string | null;
|
|
155
|
+
appId?: string;
|
|
156
|
+
appKey?: string;
|
|
157
|
+
appName?: string | null;
|
|
158
|
+
iconUrl?: string | null;
|
|
151
159
|
userId?: string;
|
|
152
160
|
username?: string | null;
|
|
153
161
|
displayName?: string | null;
|
package/dist/types/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from '../message.types-
|
|
1
|
+
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from '../message.types-Ca8col0f.cjs';
|
|
2
2
|
|
|
3
3
|
type AgentStatus = 'running' | 'stopped' | 'error';
|
|
4
4
|
type AgentKernelType = 'claude-code' | 'cursor' | 'mcp-server' | 'custom';
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from '../message.types-
|
|
1
|
+
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageMention, f as MessageMentionKind, g as MessageMentionRange, h as MessageMetadata, N as Notification, i as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, T as Thread, U as UpdateMessageRequest } from '../message.types-Ca8col0f.js';
|
|
2
2
|
|
|
3
3
|
type AgentStatus = 'running' | 'stopped' | 'error';
|
|
4
4
|
type AgentKernelType = 'claude-code' | 'cursor' | 'mcp-server' | 'custom';
|
package/dist/utils/index.cjs
CHANGED
|
@@ -233,6 +233,7 @@ function uniqueValues(values) {
|
|
|
233
233
|
function canonicalMentionToken(mention) {
|
|
234
234
|
if (mention.kind === "channel") return `<#${mention.channelId ?? mention.targetId}>`;
|
|
235
235
|
if (mention.kind === "server") return `<@server:${mention.serverId ?? mention.targetId}>`;
|
|
236
|
+
if (mention.kind === "app") return `<@app:${mention.appId ?? mention.targetId}>`;
|
|
236
237
|
if (mention.kind === "here" || mention.kind === "everyone") {
|
|
237
238
|
const scope = mention.serverId ?? mention.targetId;
|
|
238
239
|
return scope ? `<!${mention.kind}:${scope}>` : `<!${mention.kind}>`;
|
|
@@ -240,6 +241,8 @@ function canonicalMentionToken(mention) {
|
|
|
240
241
|
return `<@${mention.userId ?? mention.targetId}>`;
|
|
241
242
|
}
|
|
242
243
|
function parseCanonicalMentionToken(token) {
|
|
244
|
+
const app = token.match(/^<@app:([^>]+)>$/u);
|
|
245
|
+
if (app?.[1]) return { kind: "app", targetId: app[1] };
|
|
243
246
|
const user = token.match(/^<@([^>:]+)>$/u);
|
|
244
247
|
if (user?.[1]) return { kind: "user", targetId: user[1] };
|
|
245
248
|
const server = token.match(/^<@server:([^>]+)>$/u);
|
package/dist/utils/index.d.cts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MessageMentionRange, e as MessageMention } from '../message.types-
|
|
1
|
+
import { g as MessageMentionRange, e as MessageMention } from '../message.types-Ca8col0f.cjs';
|
|
2
2
|
|
|
3
3
|
type CatPattern = 'none' | 'tabby' | 'tuxedo' | 'siamese' | 'calico' | 'bicolor';
|
|
4
4
|
type CatExpression = 'smile' | 'open' | 'flat' | 'sad' | 'surprised' | 'kawaii' | 'winking' | 'smirk';
|
|
@@ -30,6 +30,9 @@ declare function canonicalMentionToken(mention: Pick<MessageMention, 'kind' | 't
|
|
|
30
30
|
declare function parseCanonicalMentionToken(token: string): {
|
|
31
31
|
kind: 'user';
|
|
32
32
|
targetId: string;
|
|
33
|
+
} | {
|
|
34
|
+
kind: 'app';
|
|
35
|
+
targetId: string;
|
|
33
36
|
} | {
|
|
34
37
|
kind: 'channel';
|
|
35
38
|
targetId: string;
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { g as MessageMentionRange, e as MessageMention } from '../message.types-
|
|
1
|
+
import { g as MessageMentionRange, e as MessageMention } from '../message.types-Ca8col0f.js';
|
|
2
2
|
|
|
3
3
|
type CatPattern = 'none' | 'tabby' | 'tuxedo' | 'siamese' | 'calico' | 'bicolor';
|
|
4
4
|
type CatExpression = 'smile' | 'open' | 'flat' | 'sad' | 'surprised' | 'kawaii' | 'winking' | 'smirk';
|
|
@@ -30,6 +30,9 @@ declare function canonicalMentionToken(mention: Pick<MessageMention, 'kind' | 't
|
|
|
30
30
|
declare function parseCanonicalMentionToken(token: string): {
|
|
31
31
|
kind: 'user';
|
|
32
32
|
targetId: string;
|
|
33
|
+
} | {
|
|
34
|
+
kind: 'app';
|
|
35
|
+
targetId: string;
|
|
33
36
|
} | {
|
|
34
37
|
kind: 'channel';
|
|
35
38
|
targetId: string;
|
package/dist/utils/index.js
CHANGED