@shadowob/shared 1.1.7 → 1.1.9
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-EXZEQO5X.js → chunk-KKRZTKE6.js} +12 -59
- package/dist/chunk-X6FS22AL.js +175 -0
- package/dist/index.cjs +198 -60
- package/dist/index.d.cts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +29 -4
- package/dist/{message.types-TGJmaffM.d.cts → message.types-D5IHsEOR.d.cts} +122 -1
- package/dist/{message.types-TGJmaffM.d.ts → message.types-D5IHsEOR.d.ts} +122 -1
- package/dist/play-catalog/index.cjs +12 -60
- package/dist/play-catalog/index.d.cts +1 -13
- package/dist/play-catalog/index.d.ts +1 -13
- package/dist/play-catalog/index.js +1 -3
- package/dist/types/index.cjs +195 -0
- package/dist/types/index.d.cts +66 -2
- package/dist/types/index.d.ts +66 -2
- package/dist/types/index.js +30 -1
- package/dist/utils/index.d.cts +1 -1
- package/dist/utils/index.d.ts +1 -1
- package/package.json +1 -1
- package/dist/chunk-6H4LIJZC.js +0 -0
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
|
-
export { DEFAULT_HOMEPLAY_CATALOG,
|
|
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, VoiceChannelCredentials, VoiceChannelJoinResult, VoiceChannelLeaveResult, VoiceChannelPolicy, VoiceChannelState, VoiceParticipant } 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
|
|
2
|
+
export { DEFAULT_HOMEPLAY_CATALOG, ShadowHomePlayCatalogItem, ShadowPlayAction, ShadowPlayAvailability, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername } from './play-catalog/index.cjs';
|
|
3
|
+
export { Agent, AgentCapability, AgentInfo, AgentKernelType, AgentStatus, AuthResponse, BUDDY_INBOX_TOPIC_PREFIX, BuddyInboxAdmissionMode, BuddyInboxAdmissionPendingDelivery, BuddyInboxAdmissionPendingTask, BuddyInboxAdmissionPolicy, BuddyInboxAdmissionRule, BuddyInboxAdmissionSubjectKind, Channel, ChannelSortBy, ChannelSortDirection, ChannelSortOptions, ChannelType, CreateAgentRequest, CreateChannelRequest, CreateServerRequest, DEFAULT_BUDDY_INBOX_ADMISSION_POLICY, FriendEntry, FriendSource, Friendship, FriendshipStatus, LoginRequest, Member, MemberRole, RegisterRequest, Server, TASK_MESSAGE_CARD_STATUSES, TASK_MESSAGE_CARD_STATUS_TRANSITIONS, TERMINAL_TASK_MESSAGE_CARD_STATUSES, UpdateChannelRequest, UpdateServerRequest, User, UserMembership, UserMembershipTier, UserProfile, UserStatus, VoiceChannelCredentials, VoiceChannelJoinResult, VoiceChannelLeaveResult, VoiceChannelPolicy, VoiceChannelState, VoiceParticipant, buddyInboxAdmissionRuleKey, buddyInboxTopic, canTransitionTaskMessageCardStatus, isBuddyInboxTopic, isTerminalTaskMessageCardStatus, normalizeBuddyInboxAdmissionPendingDeliveries, normalizeBuddyInboxAdmissionPolicy, parseBuddyInboxAgentId } from './types/index.cjs';
|
|
4
|
+
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, h as MessageCardSource, i as MessageCardStatus, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from './message.types-D5IHsEOR.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
|
-
export { DEFAULT_HOMEPLAY_CATALOG,
|
|
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, VoiceChannelCredentials, VoiceChannelJoinResult, VoiceChannelLeaveResult, VoiceChannelPolicy, VoiceChannelState, VoiceParticipant } 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
|
|
2
|
+
export { DEFAULT_HOMEPLAY_CATALOG, ShadowHomePlayCatalogItem, ShadowPlayAction, ShadowPlayAvailability, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername } from './play-catalog/index.js';
|
|
3
|
+
export { Agent, AgentCapability, AgentInfo, AgentKernelType, AgentStatus, AuthResponse, BUDDY_INBOX_TOPIC_PREFIX, BuddyInboxAdmissionMode, BuddyInboxAdmissionPendingDelivery, BuddyInboxAdmissionPendingTask, BuddyInboxAdmissionPolicy, BuddyInboxAdmissionRule, BuddyInboxAdmissionSubjectKind, Channel, ChannelSortBy, ChannelSortDirection, ChannelSortOptions, ChannelType, CreateAgentRequest, CreateChannelRequest, CreateServerRequest, DEFAULT_BUDDY_INBOX_ADMISSION_POLICY, FriendEntry, FriendSource, Friendship, FriendshipStatus, LoginRequest, Member, MemberRole, RegisterRequest, Server, TASK_MESSAGE_CARD_STATUSES, TASK_MESSAGE_CARD_STATUS_TRANSITIONS, TERMINAL_TASK_MESSAGE_CARD_STATUSES, UpdateChannelRequest, UpdateServerRequest, User, UserMembership, UserMembershipTier, UserProfile, UserStatus, VoiceChannelCredentials, VoiceChannelJoinResult, VoiceChannelLeaveResult, VoiceChannelPolicy, VoiceChannelState, VoiceParticipant, buddyInboxAdmissionRuleKey, buddyInboxTopic, canTransitionTaskMessageCardStatus, isBuddyInboxTopic, isTerminalTaskMessageCardStatus, normalizeBuddyInboxAdmissionPendingDeliveries, normalizeBuddyInboxAdmissionPolicy, parseBuddyInboxAgentId } from './types/index.js';
|
|
4
|
+
export { A as Attachment, C as CommerceMessageCard, a as CommerceOfferCardInput, b as CommerceProductCard, G as GenericMessageCard, M as MentionSuggestion, c as MentionSuggestionTrigger, d as Message, e as MessageCard, f as MessageCardCapability, g as MessageCardClaim, h as MessageCardSource, i as MessageCardStatus, j as MessageMention, k as MessageMentionKind, l as MessageMentionRange, m as MessageMetadata, N as Notification, n as NotificationType, O as OAuthLinkCard, P as PaidFileCard, R as ReactionGroup, S as SendMessageRequest, o as ServerAppMessageCard, T as TaskMessageCard, p as Thread, U as UpdateMessageRequest } from './message.types-D5IHsEOR.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
|
@@ -5,12 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-J34E7LGB.js";
|
|
6
6
|
import {
|
|
7
7
|
DEFAULT_HOMEPLAY_CATALOG,
|
|
8
|
-
SHADOW_PLAY_SERVER_TEMPLATE,
|
|
9
8
|
getDefaultHomePlay,
|
|
10
9
|
getPlayBuddyEmail,
|
|
11
10
|
getPlayBuddyUsername
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-6H4LIJZC.js";
|
|
11
|
+
} from "./chunk-KKRZTKE6.js";
|
|
14
12
|
import {
|
|
15
13
|
CAT_AVATAR_COUNT,
|
|
16
14
|
assignMentionRanges,
|
|
@@ -33,15 +31,37 @@ import {
|
|
|
33
31
|
segmentTextByMentions,
|
|
34
32
|
slugify
|
|
35
33
|
} from "./chunk-44D7I4ZW.js";
|
|
34
|
+
import {
|
|
35
|
+
BUDDY_INBOX_TOPIC_PREFIX,
|
|
36
|
+
DEFAULT_BUDDY_INBOX_ADMISSION_POLICY,
|
|
37
|
+
TASK_MESSAGE_CARD_STATUSES,
|
|
38
|
+
TASK_MESSAGE_CARD_STATUS_TRANSITIONS,
|
|
39
|
+
TERMINAL_TASK_MESSAGE_CARD_STATUSES,
|
|
40
|
+
buddyInboxAdmissionRuleKey,
|
|
41
|
+
buddyInboxTopic,
|
|
42
|
+
canTransitionTaskMessageCardStatus,
|
|
43
|
+
isBuddyInboxTopic,
|
|
44
|
+
isTerminalTaskMessageCardStatus,
|
|
45
|
+
normalizeBuddyInboxAdmissionPendingDeliveries,
|
|
46
|
+
normalizeBuddyInboxAdmissionPolicy,
|
|
47
|
+
parseBuddyInboxAgentId
|
|
48
|
+
} from "./chunk-X6FS22AL.js";
|
|
36
49
|
export {
|
|
50
|
+
BUDDY_INBOX_TOPIC_PREFIX,
|
|
37
51
|
CAT_AVATAR_COUNT,
|
|
38
52
|
CLIENT_EVENTS,
|
|
53
|
+
DEFAULT_BUDDY_INBOX_ADMISSION_POLICY,
|
|
39
54
|
DEFAULT_HOMEPLAY_CATALOG,
|
|
40
55
|
LIMITS,
|
|
41
56
|
SERVER_EVENTS,
|
|
42
|
-
|
|
57
|
+
TASK_MESSAGE_CARD_STATUSES,
|
|
58
|
+
TASK_MESSAGE_CARD_STATUS_TRANSITIONS,
|
|
59
|
+
TERMINAL_TASK_MESSAGE_CARD_STATUSES,
|
|
43
60
|
assignMentionRanges,
|
|
61
|
+
buddyInboxAdmissionRuleKey,
|
|
62
|
+
buddyInboxTopic,
|
|
44
63
|
buildMentionMarkdownLinks,
|
|
64
|
+
canTransitionTaskMessageCardStatus,
|
|
45
65
|
canonicalMentionToken,
|
|
46
66
|
canonicalizeMentionContent,
|
|
47
67
|
escapeMarkdownLinkLabel,
|
|
@@ -55,9 +75,14 @@ export {
|
|
|
55
75
|
getDefaultHomePlay,
|
|
56
76
|
getPlayBuddyEmail,
|
|
57
77
|
getPlayBuddyUsername,
|
|
78
|
+
isBuddyInboxTopic,
|
|
58
79
|
isCanonicalMentionToken,
|
|
80
|
+
isTerminalTaskMessageCardStatus,
|
|
59
81
|
isValidEmail,
|
|
60
82
|
mentionDisplayText,
|
|
83
|
+
normalizeBuddyInboxAdmissionPendingDeliveries,
|
|
84
|
+
normalizeBuddyInboxAdmissionPolicy,
|
|
85
|
+
parseBuddyInboxAgentId,
|
|
61
86
|
parseCanonicalMentionToken,
|
|
62
87
|
renderCatSvg,
|
|
63
88
|
segmentTextByMentions,
|
|
@@ -59,11 +59,108 @@ interface MessageMetadata {
|
|
|
59
59
|
interactive?: Record<string, unknown>;
|
|
60
60
|
interactiveResponse?: Record<string, unknown>;
|
|
61
61
|
interactiveState?: Record<string, unknown>;
|
|
62
|
+
cards?: MessageCard[];
|
|
62
63
|
commerceCards?: CommerceMessageCard[];
|
|
63
64
|
paidFileCards?: PaidFileCard[];
|
|
64
65
|
oauthLinkCards?: OAuthLinkCard[];
|
|
65
66
|
[key: string]: unknown;
|
|
66
67
|
}
|
|
68
|
+
type MessageCardStatus = 'queued' | 'claimed' | 'running' | 'completed' | 'failed' | 'canceled' | 'transferred';
|
|
69
|
+
interface MessageCardSource {
|
|
70
|
+
kind: 'user' | 'pat' | 'oauth' | 'agent' | 'system' | 'server_app' | 'buddy';
|
|
71
|
+
id?: string;
|
|
72
|
+
label?: string;
|
|
73
|
+
userId?: string;
|
|
74
|
+
agentId?: string;
|
|
75
|
+
appId?: string;
|
|
76
|
+
serverId?: string;
|
|
77
|
+
channelId?: string;
|
|
78
|
+
command?: string;
|
|
79
|
+
resource?: {
|
|
80
|
+
kind: string;
|
|
81
|
+
id: string;
|
|
82
|
+
label?: string;
|
|
83
|
+
url?: string;
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
};
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
}
|
|
88
|
+
interface MessageCardClaim {
|
|
89
|
+
id: string;
|
|
90
|
+
actor: MessageCardSource;
|
|
91
|
+
claimedAt: string;
|
|
92
|
+
expiresAt: string;
|
|
93
|
+
}
|
|
94
|
+
interface MessageCardCapability {
|
|
95
|
+
kind: 'task';
|
|
96
|
+
scope: string[];
|
|
97
|
+
issuedAt: string;
|
|
98
|
+
expiresAt: string;
|
|
99
|
+
claimId?: string;
|
|
100
|
+
binding?: {
|
|
101
|
+
messageId?: string;
|
|
102
|
+
cardId: string;
|
|
103
|
+
workspaceId?: string;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
interface TaskMessageCard {
|
|
107
|
+
id: string;
|
|
108
|
+
kind: 'task';
|
|
109
|
+
version: number;
|
|
110
|
+
title: string;
|
|
111
|
+
body?: string;
|
|
112
|
+
status: MessageCardStatus;
|
|
113
|
+
priority?: 'low' | 'normal' | 'high' | 'urgent';
|
|
114
|
+
assignee?: {
|
|
115
|
+
agentId?: string;
|
|
116
|
+
userId?: string;
|
|
117
|
+
label?: string;
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
};
|
|
120
|
+
source?: MessageCardSource;
|
|
121
|
+
claim?: MessageCardClaim;
|
|
122
|
+
capability?: MessageCardCapability;
|
|
123
|
+
progress?: Array<{
|
|
124
|
+
at: string;
|
|
125
|
+
status: MessageCardStatus;
|
|
126
|
+
note?: string;
|
|
127
|
+
actor?: MessageCardSource;
|
|
128
|
+
[key: string]: unknown;
|
|
129
|
+
}>;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
updatedAt?: string;
|
|
132
|
+
data?: Record<string, unknown> & {
|
|
133
|
+
task?: {
|
|
134
|
+
workspaceId?: string;
|
|
135
|
+
[key: string]: unknown;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
[key: string]: unknown;
|
|
139
|
+
}
|
|
140
|
+
type GenericMessageCard = {
|
|
141
|
+
id?: string;
|
|
142
|
+
kind: string;
|
|
143
|
+
version?: number;
|
|
144
|
+
title?: string;
|
|
145
|
+
data?: Record<string, unknown>;
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
interface ServerAppMessageCard {
|
|
149
|
+
id?: string;
|
|
150
|
+
kind: 'server_app';
|
|
151
|
+
version?: number;
|
|
152
|
+
appKey: string;
|
|
153
|
+
title: string;
|
|
154
|
+
description?: string;
|
|
155
|
+
label?: string;
|
|
156
|
+
action?: {
|
|
157
|
+
mode: 'open_app';
|
|
158
|
+
path?: string;
|
|
159
|
+
};
|
|
160
|
+
data?: Record<string, unknown>;
|
|
161
|
+
[key: string]: unknown;
|
|
162
|
+
}
|
|
163
|
+
type MessageCard = TaskMessageCard | ServerAppMessageCard | GenericMessageCard;
|
|
67
164
|
interface CommerceOfferCardInput {
|
|
68
165
|
id?: string;
|
|
69
166
|
kind: 'offer';
|
|
@@ -174,6 +271,30 @@ interface Attachment {
|
|
|
174
271
|
size: number;
|
|
175
272
|
width: number | null;
|
|
176
273
|
height: number | null;
|
|
274
|
+
workspaceNodeId?: string | null;
|
|
275
|
+
kind?: 'file' | 'image' | 'voice';
|
|
276
|
+
durationMs?: number | null;
|
|
277
|
+
audioCodec?: string | null;
|
|
278
|
+
audioContainer?: string | null;
|
|
279
|
+
waveformPeaks?: number[] | null;
|
|
280
|
+
waveformVersion?: number | null;
|
|
281
|
+
transcript?: {
|
|
282
|
+
id: string;
|
|
283
|
+
status: 'pending' | 'processing' | 'ready' | 'failed';
|
|
284
|
+
text: string | null;
|
|
285
|
+
language: string | null;
|
|
286
|
+
source: 'client' | 'server' | 'runtime';
|
|
287
|
+
provider?: string | null;
|
|
288
|
+
confidence?: number | null;
|
|
289
|
+
errorCode?: string | null;
|
|
290
|
+
updatedAt?: string;
|
|
291
|
+
} | null;
|
|
292
|
+
playback?: {
|
|
293
|
+
played: boolean;
|
|
294
|
+
completed: boolean;
|
|
295
|
+
lastPositionMs: number;
|
|
296
|
+
playedCount?: number;
|
|
297
|
+
} | null;
|
|
177
298
|
createdAt: string;
|
|
178
299
|
}
|
|
179
300
|
interface ReactionGroup {
|
|
@@ -214,4 +335,4 @@ interface Notification {
|
|
|
214
335
|
createdAt: string;
|
|
215
336
|
}
|
|
216
337
|
|
|
217
|
-
export type { Attachment as A, CommerceMessageCard as C, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S,
|
|
338
|
+
export type { Attachment as A, CommerceMessageCard as C, GenericMessageCard as G, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S, TaskMessageCard as T, UpdateMessageRequest as U, CommerceOfferCardInput as a, CommerceProductCard as b, MentionSuggestionTrigger as c, Message as d, MessageCard as e, MessageCardCapability as f, MessageCardClaim as g, MessageCardSource as h, MessageCardStatus as i, MessageMention as j, MessageMentionKind as k, MessageMentionRange as l, MessageMetadata as m, NotificationType as n, ServerAppMessageCard as o, Thread as p };
|
|
@@ -59,11 +59,108 @@ interface MessageMetadata {
|
|
|
59
59
|
interactive?: Record<string, unknown>;
|
|
60
60
|
interactiveResponse?: Record<string, unknown>;
|
|
61
61
|
interactiveState?: Record<string, unknown>;
|
|
62
|
+
cards?: MessageCard[];
|
|
62
63
|
commerceCards?: CommerceMessageCard[];
|
|
63
64
|
paidFileCards?: PaidFileCard[];
|
|
64
65
|
oauthLinkCards?: OAuthLinkCard[];
|
|
65
66
|
[key: string]: unknown;
|
|
66
67
|
}
|
|
68
|
+
type MessageCardStatus = 'queued' | 'claimed' | 'running' | 'completed' | 'failed' | 'canceled' | 'transferred';
|
|
69
|
+
interface MessageCardSource {
|
|
70
|
+
kind: 'user' | 'pat' | 'oauth' | 'agent' | 'system' | 'server_app' | 'buddy';
|
|
71
|
+
id?: string;
|
|
72
|
+
label?: string;
|
|
73
|
+
userId?: string;
|
|
74
|
+
agentId?: string;
|
|
75
|
+
appId?: string;
|
|
76
|
+
serverId?: string;
|
|
77
|
+
channelId?: string;
|
|
78
|
+
command?: string;
|
|
79
|
+
resource?: {
|
|
80
|
+
kind: string;
|
|
81
|
+
id: string;
|
|
82
|
+
label?: string;
|
|
83
|
+
url?: string;
|
|
84
|
+
[key: string]: unknown;
|
|
85
|
+
};
|
|
86
|
+
[key: string]: unknown;
|
|
87
|
+
}
|
|
88
|
+
interface MessageCardClaim {
|
|
89
|
+
id: string;
|
|
90
|
+
actor: MessageCardSource;
|
|
91
|
+
claimedAt: string;
|
|
92
|
+
expiresAt: string;
|
|
93
|
+
}
|
|
94
|
+
interface MessageCardCapability {
|
|
95
|
+
kind: 'task';
|
|
96
|
+
scope: string[];
|
|
97
|
+
issuedAt: string;
|
|
98
|
+
expiresAt: string;
|
|
99
|
+
claimId?: string;
|
|
100
|
+
binding?: {
|
|
101
|
+
messageId?: string;
|
|
102
|
+
cardId: string;
|
|
103
|
+
workspaceId?: string;
|
|
104
|
+
};
|
|
105
|
+
}
|
|
106
|
+
interface TaskMessageCard {
|
|
107
|
+
id: string;
|
|
108
|
+
kind: 'task';
|
|
109
|
+
version: number;
|
|
110
|
+
title: string;
|
|
111
|
+
body?: string;
|
|
112
|
+
status: MessageCardStatus;
|
|
113
|
+
priority?: 'low' | 'normal' | 'high' | 'urgent';
|
|
114
|
+
assignee?: {
|
|
115
|
+
agentId?: string;
|
|
116
|
+
userId?: string;
|
|
117
|
+
label?: string;
|
|
118
|
+
[key: string]: unknown;
|
|
119
|
+
};
|
|
120
|
+
source?: MessageCardSource;
|
|
121
|
+
claim?: MessageCardClaim;
|
|
122
|
+
capability?: MessageCardCapability;
|
|
123
|
+
progress?: Array<{
|
|
124
|
+
at: string;
|
|
125
|
+
status: MessageCardStatus;
|
|
126
|
+
note?: string;
|
|
127
|
+
actor?: MessageCardSource;
|
|
128
|
+
[key: string]: unknown;
|
|
129
|
+
}>;
|
|
130
|
+
createdAt: string;
|
|
131
|
+
updatedAt?: string;
|
|
132
|
+
data?: Record<string, unknown> & {
|
|
133
|
+
task?: {
|
|
134
|
+
workspaceId?: string;
|
|
135
|
+
[key: string]: unknown;
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
[key: string]: unknown;
|
|
139
|
+
}
|
|
140
|
+
type GenericMessageCard = {
|
|
141
|
+
id?: string;
|
|
142
|
+
kind: string;
|
|
143
|
+
version?: number;
|
|
144
|
+
title?: string;
|
|
145
|
+
data?: Record<string, unknown>;
|
|
146
|
+
[key: string]: unknown;
|
|
147
|
+
};
|
|
148
|
+
interface ServerAppMessageCard {
|
|
149
|
+
id?: string;
|
|
150
|
+
kind: 'server_app';
|
|
151
|
+
version?: number;
|
|
152
|
+
appKey: string;
|
|
153
|
+
title: string;
|
|
154
|
+
description?: string;
|
|
155
|
+
label?: string;
|
|
156
|
+
action?: {
|
|
157
|
+
mode: 'open_app';
|
|
158
|
+
path?: string;
|
|
159
|
+
};
|
|
160
|
+
data?: Record<string, unknown>;
|
|
161
|
+
[key: string]: unknown;
|
|
162
|
+
}
|
|
163
|
+
type MessageCard = TaskMessageCard | ServerAppMessageCard | GenericMessageCard;
|
|
67
164
|
interface CommerceOfferCardInput {
|
|
68
165
|
id?: string;
|
|
69
166
|
kind: 'offer';
|
|
@@ -174,6 +271,30 @@ interface Attachment {
|
|
|
174
271
|
size: number;
|
|
175
272
|
width: number | null;
|
|
176
273
|
height: number | null;
|
|
274
|
+
workspaceNodeId?: string | null;
|
|
275
|
+
kind?: 'file' | 'image' | 'voice';
|
|
276
|
+
durationMs?: number | null;
|
|
277
|
+
audioCodec?: string | null;
|
|
278
|
+
audioContainer?: string | null;
|
|
279
|
+
waveformPeaks?: number[] | null;
|
|
280
|
+
waveformVersion?: number | null;
|
|
281
|
+
transcript?: {
|
|
282
|
+
id: string;
|
|
283
|
+
status: 'pending' | 'processing' | 'ready' | 'failed';
|
|
284
|
+
text: string | null;
|
|
285
|
+
language: string | null;
|
|
286
|
+
source: 'client' | 'server' | 'runtime';
|
|
287
|
+
provider?: string | null;
|
|
288
|
+
confidence?: number | null;
|
|
289
|
+
errorCode?: string | null;
|
|
290
|
+
updatedAt?: string;
|
|
291
|
+
} | null;
|
|
292
|
+
playback?: {
|
|
293
|
+
played: boolean;
|
|
294
|
+
completed: boolean;
|
|
295
|
+
lastPositionMs: number;
|
|
296
|
+
playedCount?: number;
|
|
297
|
+
} | null;
|
|
177
298
|
createdAt: string;
|
|
178
299
|
}
|
|
179
300
|
interface ReactionGroup {
|
|
@@ -214,4 +335,4 @@ interface Notification {
|
|
|
214
335
|
createdAt: string;
|
|
215
336
|
}
|
|
216
337
|
|
|
217
|
-
export type { Attachment as A, CommerceMessageCard as C, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S,
|
|
338
|
+
export type { Attachment as A, CommerceMessageCard as C, GenericMessageCard as G, MentionSuggestion as M, Notification as N, OAuthLinkCard as O, PaidFileCard as P, ReactionGroup as R, SendMessageRequest as S, TaskMessageCard as T, UpdateMessageRequest as U, CommerceOfferCardInput as a, CommerceProductCard as b, MentionSuggestionTrigger as c, Message as d, MessageCard as e, MessageCardCapability as f, MessageCardClaim as g, MessageCardSource as h, MessageCardStatus as i, MessageMention as j, MessageMentionKind as k, MessageMentionRange as l, MessageMetadata as m, NotificationType as n, ServerAppMessageCard as o, Thread as p };
|
|
@@ -21,7 +21,6 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
21
21
|
var play_catalog_exports = {};
|
|
22
22
|
__export(play_catalog_exports, {
|
|
23
23
|
DEFAULT_HOMEPLAY_CATALOG: () => DEFAULT_HOMEPLAY_CATALOG,
|
|
24
|
-
SHADOW_PLAY_SERVER_TEMPLATE: () => SHADOW_PLAY_SERVER_TEMPLATE,
|
|
25
24
|
getDefaultHomePlay: () => getDefaultHomePlay,
|
|
26
25
|
getPlayBuddyEmail: () => getPlayBuddyEmail,
|
|
27
26
|
getPlayBuddyUsername: () => getPlayBuddyUsername
|
|
@@ -36,24 +35,21 @@ var playTemplate = (id) => ({
|
|
|
36
35
|
},
|
|
37
36
|
materials: { cover: playCover(id) }
|
|
38
37
|
});
|
|
39
|
-
var communityAction = (channelName
|
|
38
|
+
var communityAction = (channelName) => ({
|
|
40
39
|
kind: "public_channel",
|
|
41
40
|
channelName,
|
|
42
|
-
buddyTemplateSlug: channelName
|
|
43
|
-
...greeting ? { greeting } : {}
|
|
41
|
+
buddyTemplateSlug: channelName
|
|
44
42
|
});
|
|
45
|
-
var roomAction = (namePrefix
|
|
43
|
+
var roomAction = (namePrefix) => ({
|
|
46
44
|
kind: "private_room",
|
|
47
45
|
namePrefix,
|
|
48
|
-
buddyTemplateSlug: namePrefix
|
|
49
|
-
...greeting ? { greeting } : {}
|
|
46
|
+
buddyTemplateSlug: namePrefix
|
|
50
47
|
});
|
|
51
|
-
var cloudAction = (templateSlug, resourceTier = "lightweight"
|
|
48
|
+
var cloudAction = (templateSlug, resourceTier = "lightweight") => ({
|
|
52
49
|
kind: "cloud_deploy",
|
|
53
50
|
templateSlug,
|
|
54
51
|
buddyTemplateSlug: templateSlug,
|
|
55
|
-
resourceTier
|
|
56
|
-
...defaultChannelName ? { defaultChannelName } : {}
|
|
52
|
+
resourceTier
|
|
57
53
|
});
|
|
58
54
|
function getPlayBuddyUsername(templateSlug) {
|
|
59
55
|
const normalized = templateSlug.trim().toLowerCase().replace(/[^a-z0-9]+/g, "_").replace(/^_+|_+$/g, "").slice(0, 27) || "play";
|
|
@@ -62,55 +58,15 @@ function getPlayBuddyUsername(templateSlug) {
|
|
|
62
58
|
function getPlayBuddyEmail(templateSlug) {
|
|
63
59
|
return `${getPlayBuddyUsername(templateSlug)}@shadowob.bot`;
|
|
64
60
|
}
|
|
65
|
-
var SHADOW_PLAY_SERVER_TEMPLATE = {
|
|
66
|
-
slug: "shadow-plays",
|
|
67
|
-
name: "Shadow Plays",
|
|
68
|
-
description: "Default public community space for launchable homepage plays.",
|
|
69
|
-
channels: [
|
|
70
|
-
{
|
|
71
|
-
name: "general",
|
|
72
|
-
topic: "General discussion for new players and Shadow community members."
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "world-pulse",
|
|
76
|
-
topic: "A public room for real-time global events and daily signal."
|
|
77
|
-
},
|
|
78
|
-
{
|
|
79
|
-
name: "financial-freedom",
|
|
80
|
-
topic: "A public room for lightweight financial freedom simulations and planning prompts."
|
|
81
|
-
},
|
|
82
|
-
{
|
|
83
|
-
name: "ai-werewolf",
|
|
84
|
-
topic: "A public room for AI-hosted social deduction sessions."
|
|
85
|
-
},
|
|
86
|
-
{
|
|
87
|
-
name: "code-arena",
|
|
88
|
-
topic: "A public room for coding challenges and real-time battles."
|
|
89
|
-
},
|
|
90
|
-
{
|
|
91
|
-
name: "brain-fix",
|
|
92
|
-
topic: "A calm public room for one-minute focus resets and reflection."
|
|
93
|
-
},
|
|
94
|
-
{
|
|
95
|
-
name: "gitstory",
|
|
96
|
-
topic: "A public room for turning software history into stories and retrospectives."
|
|
97
|
-
},
|
|
98
|
-
{
|
|
99
|
-
name: "gstack",
|
|
100
|
-
topic: "A public room for founder strategy, product stress tests, and launch planning."
|
|
101
|
-
}
|
|
102
|
-
]
|
|
103
|
-
};
|
|
104
61
|
function cloudPlay(id, input) {
|
|
105
|
-
const { defaultChannelName, ...content } = input;
|
|
106
62
|
return {
|
|
107
63
|
id,
|
|
108
64
|
image: playCover(id),
|
|
109
65
|
status: "gated",
|
|
110
|
-
action: cloudAction(id, "lightweight"
|
|
66
|
+
action: cloudAction(id, "lightweight"),
|
|
111
67
|
gates: { auth: "required", membership: "required", profile: "optional" },
|
|
112
68
|
...playTemplate(id),
|
|
113
|
-
...
|
|
69
|
+
...input
|
|
114
70
|
};
|
|
115
71
|
}
|
|
116
72
|
var DEFAULT_HOMEPLAY_CATALOG = [
|
|
@@ -274,7 +230,7 @@ var DEFAULT_HOMEPLAY_CATALOG = [
|
|
|
274
230
|
accentColor: "#f59e0b",
|
|
275
231
|
hot: true,
|
|
276
232
|
status: "gated",
|
|
277
|
-
action: cloudAction("little-match-girl", "lightweight"
|
|
233
|
+
action: cloudAction("little-match-girl", "lightweight"),
|
|
278
234
|
gates: { auth: "required", membership: "required", profile: "optional" },
|
|
279
235
|
...playTemplate("little-match-girl"),
|
|
280
236
|
materials: { cover: "/home-assets/topics/night-radio.jpg" }
|
|
@@ -288,8 +244,7 @@ var DEFAULT_HOMEPLAY_CATALOG = [
|
|
|
288
244
|
categoryEn: "Buddy Teams",
|
|
289
245
|
starts: "16.4k",
|
|
290
246
|
accentColor: "#22d3ee",
|
|
291
|
-
hot: true
|
|
292
|
-
defaultChannelName: "choose"
|
|
247
|
+
hot: true
|
|
293
248
|
}),
|
|
294
249
|
cloudPlay("bmad-method-buddy", {
|
|
295
250
|
title: "BMAD \u65B9\u6CD5 Buddy",
|
|
@@ -299,8 +254,7 @@ var DEFAULT_HOMEPLAY_CATALOG = [
|
|
|
299
254
|
category: "Buddy \u56E2\u961F",
|
|
300
255
|
categoryEn: "Buddy Teams",
|
|
301
256
|
starts: "13.7k",
|
|
302
|
-
accentColor: "#60a5fa"
|
|
303
|
-
defaultChannelName: "delivery"
|
|
257
|
+
accentColor: "#60a5fa"
|
|
304
258
|
}),
|
|
305
259
|
cloudPlay("claude-ads-buddy", {
|
|
306
260
|
title: "Claude Ads Buddy",
|
|
@@ -363,8 +317,7 @@ var DEFAULT_HOMEPLAY_CATALOG = [
|
|
|
363
317
|
categoryEn: "Hacker & Painter",
|
|
364
318
|
starts: "15.1k",
|
|
365
319
|
accentColor: "#fb923c",
|
|
366
|
-
hot: true
|
|
367
|
-
defaultChannelName: "office-hours"
|
|
320
|
+
hot: true
|
|
368
321
|
}),
|
|
369
322
|
cloudPlay("marketingskills-buddy", {
|
|
370
323
|
title: "\u8425\u9500\u6280\u80FD Buddy",
|
|
@@ -450,7 +403,6 @@ function getDefaultHomePlay(playId) {
|
|
|
450
403
|
// Annotate the CommonJS export names for ESM import in node:
|
|
451
404
|
0 && (module.exports = {
|
|
452
405
|
DEFAULT_HOMEPLAY_CATALOG,
|
|
453
|
-
SHADOW_PLAY_SERVER_TEMPLATE,
|
|
454
406
|
getDefaultHomePlay,
|
|
455
407
|
getPlayBuddyEmail,
|
|
456
408
|
getPlayBuddyUsername
|
|
@@ -2,7 +2,6 @@ type ShadowPlayAvailability = 'available' | 'gated' | 'coming_soon' | 'misconfig
|
|
|
2
2
|
type PlayActionBase = {
|
|
3
3
|
buddyUserIds?: string[];
|
|
4
4
|
buddyTemplateSlug?: string;
|
|
5
|
-
greeting?: string;
|
|
6
5
|
};
|
|
7
6
|
type ShadowPlayAction = (PlayActionBase & {
|
|
8
7
|
kind: 'public_channel';
|
|
@@ -20,7 +19,6 @@ type ShadowPlayAction = (PlayActionBase & {
|
|
|
20
19
|
kind: 'cloud_deploy';
|
|
21
20
|
templateSlug: string;
|
|
22
21
|
resourceTier?: 'lightweight' | 'standard' | 'pro';
|
|
23
|
-
defaultChannelName?: string;
|
|
24
22
|
}) | {
|
|
25
23
|
kind: 'external_oauth_app';
|
|
26
24
|
clientId: string;
|
|
@@ -59,19 +57,9 @@ interface ShadowHomePlayCatalogItem {
|
|
|
59
57
|
cover: string;
|
|
60
58
|
};
|
|
61
59
|
}
|
|
62
|
-
interface ShadowPlayServerTemplate {
|
|
63
|
-
slug: string;
|
|
64
|
-
name: string;
|
|
65
|
-
description: string;
|
|
66
|
-
channels: Array<{
|
|
67
|
-
name: string;
|
|
68
|
-
topic: string;
|
|
69
|
-
}>;
|
|
70
|
-
}
|
|
71
60
|
declare function getPlayBuddyUsername(templateSlug: string): string;
|
|
72
61
|
declare function getPlayBuddyEmail(templateSlug: string): string;
|
|
73
|
-
declare const SHADOW_PLAY_SERVER_TEMPLATE: ShadowPlayServerTemplate;
|
|
74
62
|
declare const DEFAULT_HOMEPLAY_CATALOG: ShadowHomePlayCatalogItem[];
|
|
75
63
|
declare function getDefaultHomePlay(playId: string): ShadowHomePlayCatalogItem | null;
|
|
76
64
|
|
|
77
|
-
export { DEFAULT_HOMEPLAY_CATALOG,
|
|
65
|
+
export { DEFAULT_HOMEPLAY_CATALOG, type ShadowHomePlayCatalogItem, type ShadowPlayAction, type ShadowPlayAvailability, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername };
|
|
@@ -2,7 +2,6 @@ type ShadowPlayAvailability = 'available' | 'gated' | 'coming_soon' | 'misconfig
|
|
|
2
2
|
type PlayActionBase = {
|
|
3
3
|
buddyUserIds?: string[];
|
|
4
4
|
buddyTemplateSlug?: string;
|
|
5
|
-
greeting?: string;
|
|
6
5
|
};
|
|
7
6
|
type ShadowPlayAction = (PlayActionBase & {
|
|
8
7
|
kind: 'public_channel';
|
|
@@ -20,7 +19,6 @@ type ShadowPlayAction = (PlayActionBase & {
|
|
|
20
19
|
kind: 'cloud_deploy';
|
|
21
20
|
templateSlug: string;
|
|
22
21
|
resourceTier?: 'lightweight' | 'standard' | 'pro';
|
|
23
|
-
defaultChannelName?: string;
|
|
24
22
|
}) | {
|
|
25
23
|
kind: 'external_oauth_app';
|
|
26
24
|
clientId: string;
|
|
@@ -59,19 +57,9 @@ interface ShadowHomePlayCatalogItem {
|
|
|
59
57
|
cover: string;
|
|
60
58
|
};
|
|
61
59
|
}
|
|
62
|
-
interface ShadowPlayServerTemplate {
|
|
63
|
-
slug: string;
|
|
64
|
-
name: string;
|
|
65
|
-
description: string;
|
|
66
|
-
channels: Array<{
|
|
67
|
-
name: string;
|
|
68
|
-
topic: string;
|
|
69
|
-
}>;
|
|
70
|
-
}
|
|
71
60
|
declare function getPlayBuddyUsername(templateSlug: string): string;
|
|
72
61
|
declare function getPlayBuddyEmail(templateSlug: string): string;
|
|
73
|
-
declare const SHADOW_PLAY_SERVER_TEMPLATE: ShadowPlayServerTemplate;
|
|
74
62
|
declare const DEFAULT_HOMEPLAY_CATALOG: ShadowHomePlayCatalogItem[];
|
|
75
63
|
declare function getDefaultHomePlay(playId: string): ShadowHomePlayCatalogItem | null;
|
|
76
64
|
|
|
77
|
-
export { DEFAULT_HOMEPLAY_CATALOG,
|
|
65
|
+
export { DEFAULT_HOMEPLAY_CATALOG, type ShadowHomePlayCatalogItem, type ShadowPlayAction, type ShadowPlayAvailability, getDefaultHomePlay, getPlayBuddyEmail, getPlayBuddyUsername };
|
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
import {
|
|
2
2
|
DEFAULT_HOMEPLAY_CATALOG,
|
|
3
|
-
SHADOW_PLAY_SERVER_TEMPLATE,
|
|
4
3
|
getDefaultHomePlay,
|
|
5
4
|
getPlayBuddyEmail,
|
|
6
5
|
getPlayBuddyUsername
|
|
7
|
-
} from "../chunk-
|
|
6
|
+
} from "../chunk-KKRZTKE6.js";
|
|
8
7
|
export {
|
|
9
8
|
DEFAULT_HOMEPLAY_CATALOG,
|
|
10
|
-
SHADOW_PLAY_SERVER_TEMPLATE,
|
|
11
9
|
getDefaultHomePlay,
|
|
12
10
|
getPlayBuddyEmail,
|
|
13
11
|
getPlayBuddyUsername
|