@ai4b-team/fsaos-gateway-sdk 4.0.0 → 4.2.0
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/README.md +26 -0
- package/dist/iife/gateway.js +4 -4
- package/dist/iife/gateway.js.map +4 -4
- package/dist/iife/ui.js +1 -1
- package/dist/index.cjs +90 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +197 -2
- package/dist/index.d.ts +197 -2
- package/dist/index.js +81 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -23,6 +23,8 @@ __export(src_exports, {
|
|
|
23
23
|
InteractionTrackingError: () => InteractionTrackingError,
|
|
24
24
|
KernelProvider: () => KernelProvider,
|
|
25
25
|
QueryClientProvider: () => QueryClientProvider,
|
|
26
|
+
acceptInvite: () => acceptInvite,
|
|
27
|
+
answerInput: () => answerInput,
|
|
26
28
|
assignPersonalSection: () => assignPersonalSection,
|
|
27
29
|
auth: () => auth,
|
|
28
30
|
awaitAnchorReady: () => awaitAnchorReady,
|
|
@@ -33,6 +35,7 @@ __export(src_exports, {
|
|
|
33
35
|
clearCachedToken: () => clearCachedToken,
|
|
34
36
|
clearSession: () => clearSession,
|
|
35
37
|
configureGatewayReads: () => configureGatewayReads,
|
|
38
|
+
createAgent: () => createAgent,
|
|
36
39
|
createItem: () => createItem,
|
|
37
40
|
disconnectSSE: () => disconnectSSE,
|
|
38
41
|
disposeVfsRealtimeWs: () => disposeVfsRealtimeWs,
|
|
@@ -89,6 +92,7 @@ __export(src_exports, {
|
|
|
89
92
|
invalidatePathAndParent: () => invalidatePathAndParent,
|
|
90
93
|
invalidateSubtree: () => invalidateSubtree,
|
|
91
94
|
invalidateTypes: () => invalidateTypes,
|
|
95
|
+
inviteMember: () => inviteMember,
|
|
92
96
|
isAnchorReady: () => isAnchorReady,
|
|
93
97
|
isChannelPath: () => isChannelPath,
|
|
94
98
|
isListableItemsFilter: () => isListableItemsFilter,
|
|
@@ -112,6 +116,7 @@ __export(src_exports, {
|
|
|
112
116
|
resetAllSdkState: () => resetAllSdkState,
|
|
113
117
|
resolvePrincipalId: () => resolvePrincipalId,
|
|
114
118
|
resubscribePath: () => resubscribePath,
|
|
119
|
+
seatMember: () => seatMember,
|
|
115
120
|
selectMount: () => selectMount,
|
|
116
121
|
serverDeadlinePassed: () => serverDeadlinePassed,
|
|
117
122
|
serverMsUntil: () => serverMsUntil,
|
|
@@ -138,9 +143,11 @@ __export(src_exports, {
|
|
|
138
143
|
unmountRealtimeScope: () => unmountRealtimeScope,
|
|
139
144
|
updateItem: () => updateItem,
|
|
140
145
|
uploadFile: () => uploadFile,
|
|
146
|
+
useAcceptInvite: () => useAcceptInvite,
|
|
141
147
|
useAccounts: () => useAccounts,
|
|
142
148
|
useAgentTimeline: () => useAgentTimeline,
|
|
143
149
|
useAllChannels: () => useAllChannels,
|
|
150
|
+
useAnswerInput: () => useAnswerInput,
|
|
144
151
|
useArrangement: () => useArrangement,
|
|
145
152
|
useArtifactStream: () => useArtifactStream,
|
|
146
153
|
useAsset: () => useAsset,
|
|
@@ -150,6 +157,7 @@ __export(src_exports, {
|
|
|
150
157
|
useChildren: () => useChildren,
|
|
151
158
|
useComponent: () => useComponent,
|
|
152
159
|
useCreate: () => useCreate,
|
|
160
|
+
useCreateAgent: () => useCreateAgent,
|
|
153
161
|
useDelete: () => useDelete,
|
|
154
162
|
useDmChannels: () => useDmChannels,
|
|
155
163
|
useEdges: () => useEdges,
|
|
@@ -159,6 +167,7 @@ __export(src_exports, {
|
|
|
159
167
|
useInfiniteChannelMessages: () => useInfiniteChannelMessages,
|
|
160
168
|
useInfiniteChildren: () => useInfiniteChildren,
|
|
161
169
|
useInfiniteItems: () => useInfiniteItems,
|
|
170
|
+
useInviteMember: () => useInviteMember,
|
|
162
171
|
useItem: () => useItem,
|
|
163
172
|
useItemById: () => useItemById,
|
|
164
173
|
useItemHistory: () => useItemHistory,
|
|
@@ -186,6 +195,7 @@ __export(src_exports, {
|
|
|
186
195
|
useScope: () => useScope,
|
|
187
196
|
useScopeReady: () => useScopeReady,
|
|
188
197
|
useSearch: () => useSearch,
|
|
198
|
+
useSeatMember: () => useSeatMember,
|
|
189
199
|
useTheme: () => useTheme,
|
|
190
200
|
useTimelineHistory: () => useTimelineHistory,
|
|
191
201
|
useTool: () => useTool,
|
|
@@ -2055,6 +2065,7 @@ function parseChannelMessages(rawItems) {
|
|
|
2055
2065
|
principal_id: td.principal_id,
|
|
2056
2066
|
member_id: typeof td.member_id === "string" ? td.member_id : void 0,
|
|
2057
2067
|
reply_count: td.reply_count || 0,
|
|
2068
|
+
member_count: td.member_count || 0,
|
|
2058
2069
|
parent_message_id: td.parent_message_id,
|
|
2059
2070
|
intent_card: metadata.intent_card,
|
|
2060
2071
|
metadata: Object.keys(metadata).length > 0 ? metadata : void 0,
|
|
@@ -3844,6 +3855,8 @@ function useChannelMessages(options) {
|
|
|
3844
3855
|
/** Cards that are direct siblings of the channel (not nested under a message). */
|
|
3845
3856
|
siblingCards,
|
|
3846
3857
|
threads: useMemo(() => messages.filter((m) => m.reply_count > 0), [messages]),
|
|
3858
|
+
/** Top-level messages with members of their own: breakouts (Agent System Master Spec D21). */
|
|
3859
|
+
breakouts: useMemo(() => messages.filter((m) => m.member_count > 0), [messages]),
|
|
3847
3860
|
isLoading: query.isLoading,
|
|
3848
3861
|
isFetching: query.isFetching,
|
|
3849
3862
|
error: query.error,
|
|
@@ -4042,6 +4055,8 @@ function useInfiniteChannelMessages(options) {
|
|
|
4042
4055
|
/** Cards that are direct siblings of the channel (not nested under a message). */
|
|
4043
4056
|
siblingCards,
|
|
4044
4057
|
threads: messages.filter((m) => m.reply_count > 0),
|
|
4058
|
+
/** Top-level messages with members of their own: breakouts (Agent System Master Spec D21). */
|
|
4059
|
+
breakouts: messages.filter((m) => m.member_count > 0),
|
|
4045
4060
|
isLoading: query.isLoading,
|
|
4046
4061
|
isFetching: query.isFetching,
|
|
4047
4062
|
error: query.error,
|
|
@@ -5449,6 +5464,71 @@ function setupRequireShim() {
|
|
|
5449
5464
|
};
|
|
5450
5465
|
window.__FSAOS_MOUNT__ = gateway.mount;
|
|
5451
5466
|
}
|
|
5467
|
+
function inviteMember(params) {
|
|
5468
|
+
return gatewayCall("invite-member", params);
|
|
5469
|
+
}
|
|
5470
|
+
function acceptInvite(params) {
|
|
5471
|
+
return gatewayCall("accept-invite", params);
|
|
5472
|
+
}
|
|
5473
|
+
function seatMember(params) {
|
|
5474
|
+
const context = {};
|
|
5475
|
+
if (params.role) context.role = params.role;
|
|
5476
|
+
return gatewayCall("link", {
|
|
5477
|
+
source_id: params.chat_id,
|
|
5478
|
+
target_id: params.member_id,
|
|
5479
|
+
edge_type: "has_member",
|
|
5480
|
+
context
|
|
5481
|
+
});
|
|
5482
|
+
}
|
|
5483
|
+
function createAgent(params) {
|
|
5484
|
+
return gatewayCall("create-agent", params);
|
|
5485
|
+
}
|
|
5486
|
+
function answerInput(params) {
|
|
5487
|
+
if (!params.input_request_id && !params.input_request) {
|
|
5488
|
+
return Promise.reject(new Error("answerInput needs input_request_id or the input_request object read from the step."));
|
|
5489
|
+
}
|
|
5490
|
+
return gatewayCall("todo-control", { action: "answer_input", ...params });
|
|
5491
|
+
}
|
|
5492
|
+
function useInviteMember() {
|
|
5493
|
+
return useMutation$1({ mutationFn: inviteMember });
|
|
5494
|
+
}
|
|
5495
|
+
function useAcceptInvite() {
|
|
5496
|
+
const qc = useQueryClient();
|
|
5497
|
+
return useMutation$1({
|
|
5498
|
+
mutationFn: acceptInvite,
|
|
5499
|
+
onSuccess: () => {
|
|
5500
|
+
qc.invalidateQueries({ queryKey: ["memberships"] });
|
|
5501
|
+
}
|
|
5502
|
+
});
|
|
5503
|
+
}
|
|
5504
|
+
function useSeatMember() {
|
|
5505
|
+
const qc = useQueryClient();
|
|
5506
|
+
return useMutation$1({
|
|
5507
|
+
mutationFn: seatMember,
|
|
5508
|
+
onSuccess: (_data, variables) => {
|
|
5509
|
+
qc.invalidateQueries({ queryKey: vfsKeys.edges(variables.chat_id) });
|
|
5510
|
+
qc.invalidateQueries({ queryKey: vfsKeys.edges(variables.member_id) });
|
|
5511
|
+
}
|
|
5512
|
+
});
|
|
5513
|
+
}
|
|
5514
|
+
function useCreateAgent() {
|
|
5515
|
+
const qc = useQueryClient();
|
|
5516
|
+
return useMutation$1({
|
|
5517
|
+
mutationFn: createAgent,
|
|
5518
|
+
onSuccess: () => {
|
|
5519
|
+
qc.invalidateQueries({ queryKey: ["memberships"] });
|
|
5520
|
+
}
|
|
5521
|
+
});
|
|
5522
|
+
}
|
|
5523
|
+
function useAnswerInput() {
|
|
5524
|
+
const qc = useQueryClient();
|
|
5525
|
+
return useMutation$1({
|
|
5526
|
+
mutationFn: answerInput,
|
|
5527
|
+
onSuccess: (_data, variables) => {
|
|
5528
|
+
qc.invalidateQueries({ queryKey: vfsKeys.itemById(variables.step_id) });
|
|
5529
|
+
}
|
|
5530
|
+
});
|
|
5531
|
+
}
|
|
5452
5532
|
|
|
5453
5533
|
// src/schema-utils.ts
|
|
5454
5534
|
function keyToLabel(key) {
|
|
@@ -6248,6 +6328,6 @@ function usePersonalSections(contextId, collection) {
|
|
|
6248
6328
|
// src/index.ts
|
|
6249
6329
|
__registerSdkExports(src_exports);
|
|
6250
6330
|
|
|
6251
|
-
export { CHANNEL_AI_MODES, ComponentRenderer, EnforcementDeniedError, FormSubmissionError, GatewayRequestError, InteractionTrackingError, KernelProvider, assignPersonalSection, auth, awaitAnchorReady, awaitScopeReady, callTool, cancelQueuedTurn, cancelTurn, clearCachedToken, clearSession, configureGatewayReads, createItem, disconnectSSE, disposeVfsRealtimeWs, electHomeAnchor, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchChannelMessagesWithCards, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchOpenEnvelope, fetchRecentActivity, fetchResolvedItems, fetchTimelineHistory, fetchTurnQueueEntries, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAnchor, getAnchorRef, getAnchorVersion, getAssetUrl, getDefaultSort, getHomeAnchor, getMountVersion, getMounts, getPathSubscriptionState, getQueryClient, getRequiredFormFields, getScope, getScopeVersion, getServerClockOffsetMs, getServerClockSyncedAt, getSessionEntry, hasServerClock, initSession, initVfsRealtimeWs, initializeFsaos, initializeWorkspace, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, isAnchorReady, isChannelPath, isListableItemsFilter, isScopeReady, itemsFilterFromQueryFilter, listChildren, loadMounts, mount2 as mount, mountRealtimeScope, normalizeItem, onConnectionStateChange, pathSubscriptionMatches, personalSectionsKey, ping, pushChanges, queryClient, readItem, refreshQuery, registerCleanup, replaceMounts, resetAllSdkState, resolvePrincipalId, resubscribePath, selectMount, serverDeadlinePassed, serverMsUntil, serverNow, setAnchor, setCachedToken, setQueryClient, setScope, setupRequireShim, signal, startTracking, steerTurn, submitForm, subscribeAnchor, subscribeArtifactStream, subscribeMounts, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, trackAction, trackEvent, trackPageView, unmountRealtimeScope, updateItem, uploadFile, useAccounts, useAgentTimeline, useAllChannels, useArrangement, useArtifactStream, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useIncrementalItems, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMintedAsset, useMounts, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePersonalItemOrder, usePersonalSections, usePinnedItems, usePrincipal, useRealtimeQuery, useRecentActivity, useResolve, useResolvedItems, useScope, useScopeReady, useSearch, useTheme, useTimelineHistory, useTool, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, useUpdatePrincipal, vfsKeys, waitForPathReady };
|
|
6331
|
+
export { CHANNEL_AI_MODES, ComponentRenderer, EnforcementDeniedError, FormSubmissionError, GatewayRequestError, InteractionTrackingError, KernelProvider, acceptInvite, answerInput, assignPersonalSection, auth, awaitAnchorReady, awaitScopeReady, callTool, cancelQueuedTurn, cancelTurn, clearCachedToken, clearSession, configureGatewayReads, createAgent, createItem, disconnectSSE, disposeVfsRealtimeWs, electHomeAnchor, emitEvent, fetchChannelMessages, fetchChannelMessagesPage, fetchChannelMessagesWithCards, fetchEdgesForItem, fetchItemHistory, fetchItemVersions, fetchItems, fetchMemberFocus, fetchOpenEnvelope, fetchRecentActivity, fetchResolvedItems, fetchTimelineHistory, fetchTurnQueueEntries, fetchTypeDefinitions, fetchVfsChildren, fetchVfsChildrenPage, fetchVfsItem, fetchVfsItemById, fetchVfsTree, gatewayCall, getAccessToken, getAnchor, getAnchorRef, getAnchorVersion, getAssetUrl, getDefaultSort, getHomeAnchor, getMountVersion, getMounts, getPathSubscriptionState, getQueryClient, getRequiredFormFields, getScope, getScopeVersion, getServerClockOffsetMs, getServerClockSyncedAt, getSessionEntry, hasServerClock, initSession, initVfsRealtimeWs, initializeFsaos, initializeWorkspace, interpretSchema, invalidateAllVfs, invalidateChannelMessages, invalidateChildren, invalidateItem, invalidateOpenEnvelope, invalidatePathAndParent, invalidateSubtree, invalidateTypes, inviteMember, isAnchorReady, isChannelPath, isListableItemsFilter, isScopeReady, itemsFilterFromQueryFilter, listChildren, loadMounts, mount2 as mount, mountRealtimeScope, normalizeItem, onConnectionStateChange, pathSubscriptionMatches, personalSectionsKey, ping, pushChanges, queryClient, readItem, refreshQuery, registerCleanup, replaceMounts, resetAllSdkState, resolvePrincipalId, resubscribePath, seatMember, selectMount, serverDeadlinePassed, serverMsUntil, serverNow, setAnchor, setCachedToken, setQueryClient, setScope, setupRequireShim, signal, startTracking, steerTurn, submitForm, subscribeAnchor, subscribeArtifactStream, subscribeMounts, subscribeScope, subscribeToEvents, subscribeToPath, subscribeToScope, trackAction, trackEvent, trackPageView, unmountRealtimeScope, updateItem, uploadFile, useAcceptInvite, useAccounts, useAgentTimeline, useAllChannels, useAnswerInput, useArrangement, useArtifactStream, useAsset, useAuth, useChannelMessages, useChannels, useChildren, useComponent, useCreate, useCreateAgent, useDelete, useDmChannels, useEdges, useEventStream, useFileUpload, useIncrementalItems, useInfiniteChannelMessages, useInfiniteChildren, useInfiniteItems, useInviteMember, useItem, useItemById, useItemHistory, useItemVersions, useItems, useLink, useList, useMemberFocus, useMintedAsset, useMounts, useMove, useMutation, useNotifications, useOpen, usePermission, usePermissions, usePersonalItemOrder, usePersonalSections, usePinnedItems, usePrincipal, useRealtimeQuery, useRecentActivity, useResolve, useResolvedItems, useScope, useScopeReady, useSearch, useSeatMember, useTheme, useTimelineHistory, useTool, useTree, useType, useTypeHelpers, useTypes, useUnreadCounts, useUpdate, useUpdatePrincipal, vfsKeys, waitForPathReady };
|
|
6252
6332
|
//# sourceMappingURL=index.js.map
|
|
6253
6333
|
//# sourceMappingURL=index.js.map
|