MCPcopy Create free account
hub / github.com/altic-dev/Pilot / create

Method create

src/lib/progress-store.ts:18–38  ·  view source on GitHub ↗
(id: string, inputHash?: string)

Source from the content-addressed store, hash-verified

16 private inputHashToExecutionId = new Map<string, string>();
17
18 create(id: string, inputHash?: string): void {
19 this.executions.set(id, {
20 id,
21 messages: [],
22 completed: false,
23 subscribers: new Set(),
24 });
25
26 // Store input hash mapping if provided
27 if (inputHash) {
28 this.inputHashToExecutionId.set(inputHash, id);
29 }
30
31 // Clean up after 5 minutes
32 setTimeout(() => {
33 this.executions.delete(id);
34 if (inputHash) {
35 this.inputHashToExecutionId.delete(inputHash);
36 }
37 }, 5 * 60 * 1000);
38 }
39
40 getExecutionIdByInputHash(inputHash: string): string | null {
41 return this.inputHashToExecutionId.get(inputHash) || null;

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected