@undefineds.co/xpod 0.3.48 → 0.3.49
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/bin/xpod.js +0 -0
- package/dist/api/chatkit/pod-store.d.ts +16 -17
- package/dist/api/chatkit/pod-store.js +299 -231
- package/dist/api/chatkit/pod-store.js.map +1 -1
- package/dist/api/chatkit/schema.d.ts +1 -1
- package/dist/api/chatkit/service.js +13 -11
- package/dist/api/chatkit/service.js.map +1 -1
- package/dist/api/chatkit/store.d.ts +1 -0
- package/dist/api/chatkit/store.js +23 -11
- package/dist/api/chatkit/store.js.map +1 -1
- package/dist/api/chatkit/types.d.ts +17 -10
- package/dist/api/chatkit/types.js +97 -14
- package/dist/api/chatkit/types.js.map +1 -1
- package/dist/api/container/common.js +16 -2
- package/dist/api/container/common.js.map +1 -1
- package/dist/api/container/routes.js +3 -0
- package/dist/api/container/routes.js.map +1 -1
- package/dist/api/container/types.d.ts +3 -0
- package/dist/api/container/types.js.map +1 -1
- package/dist/api/handlers/ChatKitV1Handler.js +1 -2
- package/dist/api/handlers/ChatKitV1Handler.js.map +1 -1
- package/dist/api/handlers/CoordinationHandler.d.ts +6 -0
- package/dist/api/handlers/CoordinationHandler.js +115 -0
- package/dist/api/handlers/CoordinationHandler.js.map +1 -0
- package/dist/api/handlers/MatrixHandler.d.ts +11 -0
- package/dist/api/handlers/MatrixHandler.js +120 -2
- package/dist/api/handlers/MatrixHandler.js.map +1 -1
- package/dist/api/handlers/RunHandler.js +33 -15
- package/dist/api/handlers/RunHandler.js.map +1 -1
- package/dist/api/handlers/index.d.ts +1 -0
- package/dist/api/handlers/index.js +1 -0
- package/dist/api/handlers/index.js.map +1 -1
- package/dist/api/index.d.ts +1 -0
- package/dist/api/index.js +1 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/matrix/PodMatrixStore.d.ts +25 -1
- package/dist/api/matrix/PodMatrixStore.js +243 -38
- package/dist/api/matrix/PodMatrixStore.js.map +1 -1
- package/dist/api/matrix/index.d.ts +1 -1
- package/dist/api/matrix/index.js.map +1 -1
- package/dist/api/matrix/types.d.ts +23 -2
- package/dist/api/matrix/types.js.map +1 -1
- package/dist/api/protocol-metadata.d.ts +4 -0
- package/dist/api/protocol-metadata.js +54 -0
- package/dist/api/protocol-metadata.js.map +1 -0
- package/dist/api/reconciler/ClientReconcilerCoordinator.d.ts +42 -0
- package/dist/api/reconciler/ClientReconcilerCoordinator.js +250 -0
- package/dist/api/reconciler/ClientReconcilerCoordinator.js.map +1 -0
- package/dist/api/reconciler/ClientReconcilerCoordinator.jsonld +186 -0
- package/dist/api/reconciler/ServerGroupReconcilerService.d.ts +39 -0
- package/dist/api/reconciler/ServerGroupReconcilerService.js +91 -0
- package/dist/api/reconciler/ServerGroupReconcilerService.js.map +1 -0
- package/dist/api/reconciler/ServerGroupReconcilerService.jsonld +146 -0
- package/dist/api/reconciler/WakeAgentQueue.d.ts +23 -0
- package/dist/api/reconciler/WakeAgentQueue.js +123 -0
- package/dist/api/reconciler/WakeAgentQueue.js.map +1 -0
- package/dist/api/reconciler/WakeAgentQueue.jsonld +91 -0
- package/dist/api/reconciler/coordination.d.ts +61 -0
- package/dist/api/reconciler/coordination.js +109 -0
- package/dist/api/reconciler/coordination.js.map +1 -0
- package/dist/api/reconciler/coordination.jsonld +186 -0
- package/dist/api/reconciler/index.d.ts +4 -0
- package/dist/api/reconciler/index.js +21 -0
- package/dist/api/reconciler/index.js.map +1 -0
- package/dist/api/runs/ManagedRunWorker.js +0 -5
- package/dist/api/runs/ManagedRunWorker.js.map +1 -1
- package/dist/api/runs/RunStateCenter.d.ts +1 -1
- package/dist/api/runs/RunStateCenter.js +12 -28
- package/dist/api/runs/RunStateCenter.js.map +1 -1
- package/dist/api/runs/store.d.ts +12 -15
- package/dist/api/runs/store.js +24 -15
- package/dist/api/runs/store.js.map +1 -1
- package/dist/api/tasks/TaskMaterializer.d.ts +1 -0
- package/dist/api/tasks/TaskMaterializer.js +10 -13
- package/dist/api/tasks/TaskMaterializer.js.map +1 -1
- package/dist/api/tasks/TaskService.d.ts +0 -2
- package/dist/api/tasks/TaskService.js +6 -16
- package/dist/api/tasks/TaskService.js.map +1 -1
- package/dist/api/tasks/store.d.ts +0 -2
- package/dist/api/tasks/store.js.map +1 -1
- package/dist/cli/commands/auth.d.ts +1 -1
- package/dist/cli/commands/auth.js +4 -5
- package/dist/cli/commands/auth.js.map +1 -1
- package/dist/cli/commands/backup.js +1 -1
- package/dist/cli/commands/backup.js.map +1 -1
- package/dist/cli/commands/login.js +1 -1
- package/dist/cli/commands/login.js.map +1 -1
- package/dist/cli/commands/pod.js +1 -1
- package/dist/cli/commands/pod.js.map +1 -1
- package/dist/cli/lib/auth-helper.d.ts +5 -3
- package/dist/cli/lib/auth-helper.js +5 -3
- package/dist/cli/lib/auth-helper.js.map +1 -1
- package/dist/cli/lib/credentials-store.d.ts +22 -4
- package/dist/cli/lib/credentials-store.js +68 -51
- package/dist/cli/lib/credentials-store.js.map +1 -1
- package/dist/components/components.jsonld +5 -1
- package/dist/components/context.jsonld +103 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +15 -0
- package/dist/index.js.map +1 -1
- package/dist/provision/LocalPodProvisioningService.d.ts +1 -0
- package/dist/provision/LocalPodProvisioningService.js +9 -0
- package/dist/provision/LocalPodProvisioningService.js.map +1 -1
- package/dist/provision/LocalPodProvisioningService.jsonld +4 -0
- package/package.json +2 -2
package/bin/xpod.js
CHANGED
|
File without changes
|
|
@@ -4,8 +4,10 @@ import { type RunListOptions, type RunRecordData, type RunStepRecordData, type R
|
|
|
4
4
|
import { type TaskListOptions, type TaskRecordData, type TaskStore } from '../tasks/store';
|
|
5
5
|
import { type TaskAuthBindingRepository } from '../tasks/TaskAuthBinding';
|
|
6
6
|
import { CredentialStatus } from '../../credential/schema/types';
|
|
7
|
+
import { type ServerGroupReconcilerService } from '../reconciler';
|
|
7
8
|
export interface PodChatKitStoreOptions {
|
|
8
9
|
tokenEndpoint: string;
|
|
10
|
+
serverGroupReconcilerService?: ServerGroupReconcilerService;
|
|
9
11
|
}
|
|
10
12
|
/**
|
|
11
13
|
* Pod-based ChatKit Store implementation
|
|
@@ -13,13 +15,13 @@ export interface PodChatKitStoreOptions {
|
|
|
13
15
|
* 数据模型映射:
|
|
14
16
|
* - ChatKit thread = Thread (sioc:Thread)
|
|
15
17
|
* - ChatKit thread item = Message (meeting:Message)
|
|
16
|
-
* -
|
|
17
|
-
*
|
|
18
|
-
* 每个 Thread 属于一个 Chat 容器。默认使用 'default' Chat。
|
|
18
|
+
* - Thread 通过 sioc:has_parent 归属到 Chat 或 Task command surface。
|
|
19
|
+
* - ChatKit/API 的 opaque 字段不进入 Pod 持久 metadata;内部存储路径从 parent/id 派生。
|
|
19
20
|
*/
|
|
20
21
|
export declare class PodChatKitStore implements ChatKitStore<StoreContext>, RunStore<StoreContext>, TaskStore<StoreContext>, TaskAuthBindingRepository<StoreContext> {
|
|
21
22
|
private readonly logger;
|
|
22
23
|
private readonly tokenEndpoint;
|
|
24
|
+
private readonly serverGroupReconcilerService?;
|
|
23
25
|
/** 默认 Chat 容器 ID */
|
|
24
26
|
private static readonly DEFAULT_CHAT_ID;
|
|
25
27
|
constructor(options: PodChatKitStoreOptions);
|
|
@@ -47,19 +49,25 @@ export declare class PodChatKitStore implements ChatKitStore<StoreContext>, RunS
|
|
|
47
49
|
* 将字符串转为 ThreadStatus 对象
|
|
48
50
|
*/
|
|
49
51
|
private stringToStatus;
|
|
50
|
-
private
|
|
51
|
-
private getSurfaceIdFromMetadata;
|
|
52
|
+
private readMetadataString;
|
|
52
53
|
private isBaseRelativeChatResourceId;
|
|
53
54
|
private buildChatResourceId;
|
|
55
|
+
private buildMessageParentResourceId;
|
|
54
56
|
private chatSurfaceIdFromResourceId;
|
|
55
57
|
private chatSurfaceIdFromResource;
|
|
58
|
+
private commandSurfaceFromResourceRef;
|
|
59
|
+
private resolveTaskParentResource;
|
|
60
|
+
private resolveExplicitThreadParentResource;
|
|
61
|
+
private resolveThreadParent;
|
|
62
|
+
private threadStoredMetadata;
|
|
63
|
+
private mentionsFromUserMessageContent;
|
|
56
64
|
/**
|
|
57
65
|
* 确保 Chat 容器存在,如果不存在则创建
|
|
58
66
|
*/
|
|
59
67
|
private ensureChat;
|
|
60
68
|
/**
|
|
61
|
-
* 将 ThreadRecord 转为 ThreadMetadata
|
|
62
|
-
*
|
|
69
|
+
* 将 ThreadRecord 转为 ThreadMetadata。
|
|
70
|
+
* Pod 中以 thread.parent 作为权威归属关系,metadata 只返回业务扩展字段。
|
|
63
71
|
*/
|
|
64
72
|
private threadRecordToMetadata;
|
|
65
73
|
private timestampToIso;
|
|
@@ -90,16 +98,6 @@ export declare class PodChatKitStore implements ChatKitStore<StoreContext>, RunS
|
|
|
90
98
|
* thread_id 返回 Message 所属的 Thread ID
|
|
91
99
|
*/
|
|
92
100
|
private messageRecordToItem;
|
|
93
|
-
/**
|
|
94
|
-
* 获取或构建 Chat resource -> surface id 的映射缓存。
|
|
95
|
-
* drizzle-solid 的 link(Chat) 字段返回完整资源引用,通过 Chat 的 @id 比对还原路径槽位。
|
|
96
|
-
*/
|
|
97
|
-
private getChatResourceMap;
|
|
98
|
-
/**
|
|
99
|
-
* 从 Chat resource 还原 surface id。
|
|
100
|
-
* 优先通过 @id 映射;若调用方本来给的是裸 ID,则原样使用。
|
|
101
|
-
*/
|
|
102
|
-
private resolveChatSurfaceFromResource;
|
|
103
101
|
private isAbsoluteHttpResource;
|
|
104
102
|
private parseThreadResource;
|
|
105
103
|
private normalizeThreadCacheKey;
|
|
@@ -131,6 +129,7 @@ export declare class PodChatKitStore implements ChatKitStore<StoreContext>, RunS
|
|
|
131
129
|
deleteThread(thread: ThreadRef, context: StoreContext): Promise<void>;
|
|
132
130
|
loadThreadItems(thread: ThreadRef, after: string | undefined, limit: number, order: string, context: StoreContext): Promise<Page<ThreadItem>>;
|
|
133
131
|
addThreadItem(thread: ThreadRef, item: ThreadItem, context: StoreContext): Promise<void>;
|
|
132
|
+
private reconcileGroupUserMessage;
|
|
134
133
|
private recentlyCreatedIds;
|
|
135
134
|
saveItem(thread: ThreadRef, item: ThreadItem, context: StoreContext): Promise<void>;
|
|
136
135
|
/**
|