@axiom-lattice/protocols 4.1.0 → 4.1.2

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.
Files changed (39) hide show
  1. package/.turbo/turbo-build.log +10 -10
  2. package/CHANGELOG.md +12 -0
  3. package/dist/index.d.mts +1021 -26
  4. package/dist/index.d.ts +1021 -26
  5. package/dist/index.js +448 -2
  6. package/dist/index.js.map +1 -1
  7. package/dist/index.mjs +420 -1
  8. package/dist/index.mjs.map +1 -1
  9. package/package.json +3 -2
  10. package/src/BindingProtocol.ts +87 -11
  11. package/src/CapabilityBundleStoreProtocol.ts +78 -0
  12. package/src/CapabilityRuntimeProtocol.ts +82 -0
  13. package/src/ChannelInstallationStoreProtocol.ts +23 -4
  14. package/src/ExactDataSnapshot.ts +119 -0
  15. package/src/PluginProtocol.ts +59 -7
  16. package/src/ProjectBotMembershipStoreProtocol.ts +48 -0
  17. package/src/ProjectMembershipStoreProtocol.ts +58 -0
  18. package/src/ProjectRoomMessageStoreProtocol.ts +26 -0
  19. package/src/ProjectRoomProtocol.ts +143 -0
  20. package/src/ProjectRoomRealtimeProtocol.ts +349 -0
  21. package/src/ProjectRoomStoreProtocol.ts +16 -0
  22. package/src/SkillStoreProtocol.ts +30 -0
  23. package/src/TaskBeliefProtocol.ts +6 -1
  24. package/src/TaskStoreProtocol.ts +66 -2
  25. package/src/TaskWorkItemProtocol.ts +138 -0
  26. package/src/TrustedRunContextProtocol.ts +119 -0
  27. package/src/WorkspaceStoreProtocol.ts +33 -0
  28. package/src/__tests__/BindingProtocol.test.ts +36 -0
  29. package/src/__tests__/ExactDataSnapshot.test.ts +105 -0
  30. package/src/__tests__/ProjectRoomProtocol.test.ts +48 -0
  31. package/src/__tests__/ProjectRoomRealtimeProtocol.test.ts +185 -0
  32. package/src/__tests__/ProjectRoomStores.test.ts +363 -0
  33. package/src/__tests__/ProjectTaskProtocol.test.ts +29 -0
  34. package/src/__tests__/TaskWorkItemProtocol.test.ts +111 -0
  35. package/src/__tests__/TrustedRunContextProtocol.test.ts +265 -0
  36. package/src/__tests__/capability-bundle-types.test.ts +177 -0
  37. package/src/index.ts +13 -0
  38. package/tsconfig.type-tests.json +9 -0
  39. package/type-tests/task-work-item-store-compatibility.ts +37 -0
@@ -0,0 +1,265 @@
1
+ import { parseTrustedRunContext } from "../TrustedRunContextProtocol";
2
+ import vm from "node:vm";
3
+
4
+ function validProjectRoom(): Record<string, unknown> {
5
+ return {
6
+ tenantId: "tenant", workspaceId: "workspace", projectId: "project", roomId: "room",
7
+ sourceRoomMessageId: "source", membershipId: "membership", assistantId: "assistant",
8
+ inputMessageId: "input", role: "coordinator", title: "Coordinator",
9
+ };
10
+ }
11
+
12
+ function validProjectTask(): Record<string, unknown> {
13
+ return {
14
+ tenantId: "tenant-1", workspaceId: "workspace-1", projectId: "project-1",
15
+ roomId: "room-1", membershipId: "member-1", assistantId: "agent-1",
16
+ taskId: "task-1", threadId: "thread-1", inputMessageId: "input-1",
17
+ };
18
+ }
19
+
20
+ describe("parseTrustedRunContext", () => {
21
+ it("returns a canonical clone and accepts null-prototype records", () => {
22
+ const projectRoom = Object.assign(Object.create(null) as Record<string, unknown>, validProjectRoom());
23
+ const context = Object.assign(Object.create(null) as Record<string, unknown>, { projectRoom });
24
+
25
+ const parsed = parseTrustedRunContext(context);
26
+
27
+ expect(parsed).toEqual({ projectRoom: validProjectRoom() });
28
+ expect(Object.getPrototypeOf(parsed)).toBe(Object.prototype);
29
+ expect(Object.getPrototypeOf(parsed.projectRoom)).toBe(Object.prototype);
30
+ });
31
+
32
+ it("accepts exact cross-realm records and returns a canonical local clone", () => {
33
+ const context = vm.runInNewContext(`({ projectRoom: ${JSON.stringify(validProjectRoom())} })`) as unknown;
34
+
35
+ const parsed = parseTrustedRunContext(context);
36
+
37
+ expect(parsed).toEqual({ projectRoom: validProjectRoom() });
38
+ expect(Object.getPrototypeOf(parsed)).toBe(Object.prototype);
39
+ expect(Object.getPrototypeOf(parsed.projectRoom)).toBe(Object.prototype);
40
+ });
41
+
42
+ it("accepts custom prototypes while ignoring inherited values", () => {
43
+ let inheritedReads = 0;
44
+ const inherited = Object.defineProperty({}, "responsibility", {
45
+ enumerable: true,
46
+ get: () => {
47
+ inheritedReads += 1;
48
+ return "malicious";
49
+ },
50
+ });
51
+ const projectRoom = Object.assign(Object.create(inherited) as Record<string, unknown>, validProjectRoom());
52
+ const context = Object.assign(Object.create({ extra: true }) as Record<string, unknown>, { projectRoom });
53
+
54
+ const parsed = parseTrustedRunContext(context);
55
+
56
+ expect(parsed).toEqual({ projectRoom: validProjectRoom() });
57
+ expect(inheritedReads).toBe(0);
58
+ });
59
+
60
+ it("rejects symbol and non-enumerable extra keys", () => {
61
+ const stringExtra = { projectRoom: validProjectRoom(), extra: true };
62
+ const symbolExtra = { projectRoom: validProjectRoom(), [Symbol("extra")]: true };
63
+ const hiddenExtra = { projectRoom: validProjectRoom() };
64
+ Object.defineProperty(hiddenExtra, "extra", { value: true, enumerable: false });
65
+
66
+ expect(() => parseTrustedRunContext(stringExtra)).toThrow("Invalid trusted agent run context");
67
+ expect(() => parseTrustedRunContext(symbolExtra)).toThrow("Invalid trusted agent run context");
68
+ expect(() => parseTrustedRunContext(hiddenExtra)).toThrow("Invalid trusted agent run context");
69
+ });
70
+
71
+ it("rejects a top-level projectRoom getter without invoking it", () => {
72
+ let calls = 0;
73
+ const context = Object.defineProperty({}, "projectRoom", {
74
+ enumerable: true,
75
+ get: () => {
76
+ calls += 1;
77
+ return validProjectRoom();
78
+ },
79
+ });
80
+
81
+ expect(() => parseTrustedRunContext(context)).toThrow("Invalid trusted agent run context");
82
+ expect(calls).toBe(0);
83
+ });
84
+
85
+ it.each(["tenantId", "responsibility"])(
86
+ "rejects a nested %s getter without invoking it",
87
+ (field) => {
88
+ let calls = 0;
89
+ const projectRoom = validProjectRoom();
90
+ Object.defineProperty(projectRoom, field, {
91
+ enumerable: true,
92
+ get: () => {
93
+ calls += 1;
94
+ return field === "responsibility" ? "Lead" : "tenant";
95
+ },
96
+ });
97
+
98
+ expect(() => parseTrustedRunContext({ projectRoom })).toThrow("Invalid trusted agent run context");
99
+ expect(calls).toBe(0);
100
+ },
101
+ );
102
+
103
+ it("returns a canonical clone of an exact project task branch", () => {
104
+ const projectTask = Object.assign(Object.create(null) as Record<string, unknown>, validProjectTask());
105
+ const context = Object.assign(Object.create(null) as Record<string, unknown>, { projectTask });
106
+
107
+ const parsed = parseTrustedRunContext(context);
108
+
109
+ expect(parsed).toEqual({ projectTask: validProjectTask() });
110
+ expect(parsed.projectTask).not.toBe(projectTask);
111
+ expect(Object.getPrototypeOf(parsed)).toBe(Object.prototype);
112
+ expect(Object.getPrototypeOf(parsed.projectTask)).toBe(Object.prototype);
113
+ });
114
+
115
+ it("accepts an exact cross-realm project task branch", () => {
116
+ const context = vm.runInNewContext(`({ projectTask: ${JSON.stringify(validProjectTask())} })`) as unknown;
117
+
118
+ const parsed = parseTrustedRunContext(context);
119
+
120
+ expect(parsed).toEqual({ projectTask: validProjectTask() });
121
+ expect(Object.getPrototypeOf(parsed)).toBe(Object.prototype);
122
+ expect(Object.getPrototypeOf(parsed.projectTask)).toBe(Object.prototype);
123
+ });
124
+
125
+ it("accepts custom prototypes and ignores inherited project task values", () => {
126
+ let inheritedReads = 0;
127
+ const inherited = Object.defineProperty({}, "extra", {
128
+ enumerable: true,
129
+ get: () => {
130
+ inheritedReads += 1;
131
+ return "malicious";
132
+ },
133
+ });
134
+ const projectTask = Object.assign(Object.create(inherited) as Record<string, unknown>, validProjectTask());
135
+ const context = Object.assign(Object.create({ extra: true }) as Record<string, unknown>, { projectTask });
136
+
137
+ expect(parseTrustedRunContext(context)).toEqual({ projectTask: validProjectTask() });
138
+ expect(inheritedReads).toBe(0);
139
+ });
140
+
141
+ it("requires exactly one trusted context branch", () => {
142
+ expect(() => parseTrustedRunContext({})).toThrow("Invalid trusted agent run context");
143
+ expect(() => parseTrustedRunContext({ projectRoom: validProjectRoom(), projectTask: validProjectTask() }))
144
+ .toThrow("Invalid trusted agent run context");
145
+ expect(() => parseTrustedRunContext({ projectTask: undefined }))
146
+ .toThrow("Invalid trusted agent run context");
147
+ });
148
+
149
+ it.each(Object.keys(validProjectTask()))("rejects an empty project task %s", (field) => {
150
+ expect(() => parseTrustedRunContext({
151
+ projectTask: { ...validProjectTask(), [field]: "" },
152
+ })).toThrow("Invalid trusted agent run context");
153
+ });
154
+
155
+ it.each(Object.keys(validProjectTask()))("rejects a missing project task %s", (field) => {
156
+ const projectTask = validProjectTask();
157
+ delete projectTask[field];
158
+
159
+ expect(() => parseTrustedRunContext({ projectTask })).toThrow("Invalid trusted agent run context");
160
+ });
161
+
162
+ it("rejects project task string, symbol, and non-enumerable extra keys", () => {
163
+ const stringExtra = { ...validProjectTask(), extra: true };
164
+ const symbolExtra = { ...validProjectTask(), [Symbol("extra")]: true };
165
+ const hiddenExtra = validProjectTask();
166
+ Object.defineProperty(hiddenExtra, "extra", { value: true, enumerable: false });
167
+
168
+ expect(() => parseTrustedRunContext({ projectTask: stringExtra })).toThrow("Invalid trusted agent run context");
169
+ expect(() => parseTrustedRunContext({ projectTask: symbolExtra })).toThrow("Invalid trusted agent run context");
170
+ expect(() => parseTrustedRunContext({ projectTask: hiddenExtra })).toThrow("Invalid trusted agent run context");
171
+ });
172
+
173
+ it("rejects projectTask root symbol and non-enumerable extra keys", () => {
174
+ const symbolExtra = { projectTask: validProjectTask(), [Symbol("extra")]: true };
175
+ const hiddenExtra = { projectTask: validProjectTask() };
176
+ Object.defineProperty(hiddenExtra, "extra", { value: true, enumerable: false });
177
+
178
+ expect(() => parseTrustedRunContext(symbolExtra)).toThrow("Invalid trusted agent run context");
179
+ expect(() => parseTrustedRunContext(hiddenExtra)).toThrow("Invalid trusted agent run context");
180
+ });
181
+
182
+ it("rejects a top-level projectTask getter without invoking it", () => {
183
+ let calls = 0;
184
+ const context = Object.defineProperty({}, "projectTask", {
185
+ enumerable: true,
186
+ get: () => {
187
+ calls += 1;
188
+ return validProjectTask();
189
+ },
190
+ });
191
+
192
+ expect(() => parseTrustedRunContext(context)).toThrow("Invalid trusted agent run context");
193
+ expect(calls).toBe(0);
194
+ });
195
+
196
+ it.each(Object.keys(validProjectTask()))(
197
+ "rejects a nested project task %s getter without invoking it",
198
+ (field) => {
199
+ let calls = 0;
200
+ const projectTask = validProjectTask();
201
+ Object.defineProperty(projectTask, field, {
202
+ enumerable: true,
203
+ get: () => {
204
+ calls += 1;
205
+ return "malicious";
206
+ },
207
+ });
208
+
209
+ expect(() => parseTrustedRunContext({ projectTask })).toThrow("Invalid trusted agent run context");
210
+ expect(calls).toBe(0);
211
+ },
212
+ );
213
+
214
+ it("rejects inherited required project task fields without invoking getters", () => {
215
+ let calls = 0;
216
+ const inherited = Object.defineProperty({}, "tenantId", {
217
+ enumerable: true,
218
+ get: () => {
219
+ calls += 1;
220
+ return "tenant-1";
221
+ },
222
+ });
223
+ const projectTask = validProjectTask();
224
+ delete projectTask.tenantId;
225
+ Object.setPrototypeOf(projectTask, inherited);
226
+
227
+ expect(() => parseTrustedRunContext({ projectTask })).toThrow("Invalid trusted agent run context");
228
+ expect(calls).toBe(0);
229
+ });
230
+
231
+ it("rejects task accessors without reading polluted descriptor prototypes", () => {
232
+ const originalValue = Object.getOwnPropertyDescriptor(Object.prototype, "value");
233
+ const originalEnumerable = Object.getOwnPropertyDescriptor(Object.prototype, "enumerable");
234
+ let inheritedReads = 0;
235
+ const projectTask = validProjectTask();
236
+ Object.defineProperty(projectTask, "tenantId", {
237
+ enumerable: true,
238
+ get: () => "tenant-1",
239
+ });
240
+ try {
241
+ Object.defineProperty(Object.prototype, "value", {
242
+ configurable: true,
243
+ get: () => {
244
+ inheritedReads += 1;
245
+ return "tenant-1";
246
+ },
247
+ });
248
+ Object.defineProperty(Object.prototype, "enumerable", Object.assign(Object.create(null), {
249
+ configurable: true,
250
+ get: () => {
251
+ inheritedReads += 1;
252
+ return true;
253
+ },
254
+ }));
255
+
256
+ expect(() => parseTrustedRunContext({ projectTask })).toThrow("Invalid trusted agent run context");
257
+ expect(inheritedReads).toBe(0);
258
+ } finally {
259
+ if (originalValue) Object.defineProperty(Object.prototype, "value", originalValue);
260
+ else delete (Object.prototype as { value?: unknown }).value;
261
+ if (originalEnumerable) Object.defineProperty(Object.prototype, "enumerable", originalEnumerable);
262
+ else delete (Object.prototype as { enumerable?: unknown }).enumerable;
263
+ }
264
+ });
265
+ });
@@ -0,0 +1,177 @@
1
+ import type {
2
+ AgentMiddlewareConfig,
3
+ CapabilityBundle,
4
+ CapabilityBundleStore,
5
+ CapabilityFieldSource,
6
+ CapabilityOverride,
7
+ CapabilityPreview,
8
+ CapabilityPreviewIssue,
9
+ CapabilityRuntime,
10
+ CreateCapabilityBundleInput,
11
+ PluginMetaOutput,
12
+ Plugin,
13
+ PluginStandardConnectionConfig,
14
+ ProjectCapabilityConfig,
15
+ ProjectStore,
16
+ UpdateCapabilityBundleInput,
17
+ } from "../index";
18
+
19
+ const standardConnectionConfig: PluginStandardConnectionConfig = {
20
+ connections: ["crm-prod"],
21
+ connectAll: false,
22
+ };
23
+
24
+ const standardConnectionPlugin: Plugin = {
25
+ meta: {
26
+ type: "crm",
27
+ name: "CRM",
28
+ description: "CRM plugin",
29
+ capabilityBundleEligible: true,
30
+ configSchema: {
31
+ connections: { type: "array", items: { type: "string" } },
32
+ connectAll: { type: "boolean" },
33
+ },
34
+ defaultConfig: standardConnectionConfig,
35
+ },
36
+ connection: {
37
+ fields: [{ key: "apiKey", type: "password", title: "API key" }],
38
+ },
39
+ };
40
+
41
+ const middleware: AgentMiddlewareConfig = {
42
+ id: "filesystem",
43
+ type: "filesystem",
44
+ name: "Filesystem",
45
+ description: "Read project files",
46
+ enabled: true,
47
+ config: {},
48
+ };
49
+
50
+ const createInput: CreateCapabilityBundleInput = {
51
+ name: "Research",
52
+ description: "Research capabilities",
53
+ capabilities: [middleware],
54
+ };
55
+
56
+ const updateInput: UpdateCapabilityBundleInput = {
57
+ name: "Updated research",
58
+ expectedUpdatedAt: "2026-08-27T00:00:00.000Z",
59
+ };
60
+
61
+ const bundle: CapabilityBundle = {
62
+ id: "bundle-1",
63
+ tenantId: "tenant-1",
64
+ key: "research",
65
+ ...createInput,
66
+ createdAt: "2026-08-27T00:00:00.000Z",
67
+ updatedAt: "2026-08-27T00:00:00.000Z",
68
+ };
69
+
70
+ const source: CapabilityFieldSource = {
71
+ capabilityType: "filesystem",
72
+ fieldPath: "config.root",
73
+ sourceBundleId: bundle.id,
74
+ value: "/workspace",
75
+ };
76
+
77
+ const override: CapabilityOverride = {
78
+ capabilityType: "filesystem",
79
+ fieldPath: "config.root",
80
+ previousValue: "/project",
81
+ nextValue: "/workspace",
82
+ sourceBundleId: bundle.id,
83
+ };
84
+
85
+ const warning: CapabilityPreviewIssue = {
86
+ code: "DUPLICATE_FIELD",
87
+ message: "A later bundle overrides this field",
88
+ bundleId: bundle.id,
89
+ capabilityType: "filesystem",
90
+ fieldPath: "config.root",
91
+ };
92
+
93
+ const preview: CapabilityPreview = {
94
+ bundleIds: [bundle.id],
95
+ capabilities: [middleware],
96
+ overrides: [override],
97
+ sources: [source],
98
+ warnings: [warning],
99
+ errors: [],
100
+ revision: "revision-1",
101
+ };
102
+
103
+ const runtime: CapabilityRuntime = {
104
+ revision: preview.revision,
105
+ middleware: { [middleware.id]: middleware },
106
+ };
107
+
108
+ const projectConfig: ProjectCapabilityConfig = {
109
+ capabilityBundleIds: bundle.id ? [bundle.id] : [],
110
+ };
111
+
112
+ const pluginMeta: PluginMetaOutput = {
113
+ type: "research",
114
+ name: "Research",
115
+ description: "Research plugin",
116
+ capabilityBundleEligible: true,
117
+ };
118
+
119
+ const bundleStore: CapabilityBundleStore = {
120
+ async listByTenant() {
121
+ return [bundle];
122
+ },
123
+ async getById() {
124
+ return bundle;
125
+ },
126
+ async getManyByIds() {
127
+ return [bundle];
128
+ },
129
+ async create(tenantId, input) {
130
+ return { ...bundle, tenantId, ...input };
131
+ },
132
+ async update() {
133
+ return bundle;
134
+ },
135
+ async deleteIfUnreferenced() {
136
+ return "deleted";
137
+ },
138
+ };
139
+
140
+ const projectStore: ProjectStore = {
141
+ getProjectsByWorkspace: async () => [],
142
+ getProjectById: async () => null,
143
+ createProject: async () => {
144
+ throw new Error("not used");
145
+ },
146
+ updateProject: async () => null,
147
+ deleteProject: async () => false,
148
+ isCapabilityBundleReferenced: async () => projectConfig.capabilityBundleIds.includes(bundle.id),
149
+ updateCapabilityBundleIds: async () => ({ status: "project_not_found" }),
150
+ };
151
+
152
+ describe("capability bundle protocol types", () => {
153
+ it("represents bundle storage, runtime, preview provenance, and eligibility", async () => {
154
+ expect(bundle.capabilities).toEqual([middleware]);
155
+ expect(runtime.middleware[middleware.id]).toBe(middleware);
156
+ expect(preview.sources[0]).toEqual(source);
157
+ expect(preview.overrides[0]).toEqual(override);
158
+ expect(pluginMeta.capabilityBundleEligible).toBe(true);
159
+ await expect(projectStore.isCapabilityBundleReferenced("tenant-1", bundle.id)).resolves.toBe(true);
160
+ });
161
+
162
+ it("defines standard connection-backed plugins without duplicate resource fields", () => {
163
+ expect(standardConnectionPlugin.meta.type).toBe("crm");
164
+ expect(standardConnectionPlugin.meta.capabilityBundleEligible).toBe(true);
165
+ expect(standardConnectionPlugin.connection).toBeDefined();
166
+ expect(standardConnectionPlugin.meta.defaultConfig).toEqual(standardConnectionConfig);
167
+ expect(standardConnectionPlugin.meta.configSchema).not.toHaveProperty("connectionType");
168
+ expect(standardConnectionPlugin.meta.configSchema).not.toHaveProperty("resourceType");
169
+ expect(standardConnectionPlugin.meta.configSchema).not.toHaveProperty("resourceSelector");
170
+ expect(standardConnectionPlugin.meta.defaultConfig).not.toHaveProperty("connectionType");
171
+ expect(standardConnectionPlugin.meta.defaultConfig).not.toHaveProperty("resourceType");
172
+ expect(standardConnectionPlugin.meta.defaultConfig).not.toHaveProperty("resourceSelector");
173
+ });
174
+ });
175
+
176
+ void updateInput;
177
+ void bundleStore;
package/src/index.ts CHANGED
@@ -48,6 +48,15 @@ export * from "./A2AApiKeyStoreProtocol";
48
48
  export * from "./ConversationStoreProtocol";
49
49
  export * from "./AgentWebAppStoreProtocol";
50
50
  export * from "./AgentWebAppRuntimeProtocol";
51
+ export * from "./CapabilityBundleStoreProtocol";
52
+ export * from "./CapabilityRuntimeProtocol";
53
+ export * from "./ProjectRoomProtocol";
54
+ export * from "./ProjectRoomStoreProtocol";
55
+ export * from "./ProjectMembershipStoreProtocol";
56
+ export * from "./ProjectBotMembershipStoreProtocol";
57
+ export * from "./ProjectRoomMessageStoreProtocol";
58
+ export * from "./ExactDataSnapshot";
59
+ export * from "./ProjectRoomRealtimeProtocol";
51
60
 
52
61
  // Workflow DSL (concise, public API)
53
62
  export * from "./WorkflowDSL";
@@ -68,8 +77,12 @@ export type {
68
77
  PluginDiscoveredResource,
69
78
  PluginContext,
70
79
  PluginToolMeta,
80
+ PluginSkillResource,
81
+ PluginSkillDefinition,
82
+ PluginStandardConnectionConfig,
71
83
  PluginMiddlewareFactory,
72
84
  } from "./PluginProtocol";
73
85
 
74
86
  // 导出通用类型
75
87
  export * from "./types";
88
+ export * from "./TrustedRunContextProtocol";
@@ -0,0 +1,9 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "incremental": false,
5
+ "noEmit": true,
6
+ "rootDir": "."
7
+ },
8
+ "include": ["type-tests/**/*.ts"]
9
+ }
@@ -0,0 +1,37 @@
1
+ import type {
2
+ ProjectTaskWorkItemStore,
3
+ TaskWorkItem,
4
+ TaskWorkItemStore,
5
+ } from "../src/TaskWorkItemProtocol";
6
+ import { requireProjectTaskWorkItemStore } from "../src/TaskWorkItemProtocol";
7
+
8
+ class LegacyTaskWorkItemStore implements TaskWorkItemStore {
9
+ async create(): Promise<TaskWorkItem> {
10
+ throw new Error("compile fixture");
11
+ }
12
+
13
+ async list(): Promise<TaskWorkItem[]> {
14
+ return [];
15
+ }
16
+
17
+ async findByEventKey(): Promise<TaskWorkItem | null> {
18
+ return null;
19
+ }
20
+
21
+ async createIfAbsentByEventKey(): Promise<TaskWorkItem> {
22
+ throw new Error("compile fixture");
23
+ }
24
+ }
25
+
26
+ const legacyStore: TaskWorkItemStore = new LegacyTaskWorkItemStore();
27
+ const completeStore = Object.assign(new LegacyTaskWorkItemStore(), {
28
+ createIfTaskSnapshot: async () => null,
29
+ listProjectLifecycleEvents: async () => [],
30
+ });
31
+ const baseStore: TaskWorkItemStore = completeStore;
32
+ const projectStore: ProjectTaskWorkItemStore = completeStore;
33
+ const refinedStore: ProjectTaskWorkItemStore = requireProjectTaskWorkItemStore(baseStore);
34
+
35
+ void legacyStore;
36
+ void projectStore;
37
+ void refinedStore;