@polpo-ai/core 0.4.8 → 0.4.10

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.
@@ -1,12 +1,18 @@
1
1
  /**
2
- * Attachment metadata store — tracks files attached to chat sessions.
2
+ * Attachment metadata store — tracks uploaded files.
3
+ *
4
+ * Files can be uploaded without a session (OpenAI-compatible flow:
5
+ * upload first, then reference in a message content part).
6
+ * The sessionId is set later when the file is first referenced
7
+ * in a completions request.
3
8
  *
4
9
  * The actual file content is managed by the FileSystem abstraction.
5
10
  * This store only persists metadata (filename, mimeType, size, path).
6
11
  */
7
12
  export interface Attachment {
8
13
  id: string;
9
- sessionId: string;
14
+ /** Session this file belongs to. Optional — files can be uploaded before a session exists. */
15
+ sessionId?: string;
10
16
  /** Message this attachment belongs to (optional — set when attached to a specific message) */
11
17
  messageId?: string;
12
18
  filename: string;
@@ -22,5 +28,7 @@ export interface AttachmentStore {
22
28
  get(id: string): Promise<Attachment | undefined>;
23
29
  delete(id: string): Promise<boolean>;
24
30
  deleteBySession(sessionId: string): Promise<number>;
31
+ /** Bind a loose file (no session) to a session. Called when the file is first referenced in a completions request. */
32
+ updateSessionId?(id: string, sessionId: string): Promise<void>;
25
33
  }
26
34
  //# sourceMappingURL=attachment-store.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-store.d.ts","sourceRoot":"","sources":["../src/attachment-store.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,8FAA8F;IAC9F,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;IACjB,IAAI,EAAE,MAAM,CAAC;IACb,qFAAqF;IACrF,IAAI,EAAE,MAAM,CAAC;IACb,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,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ACpD,sHAAsH;IACtH,eAAe,CAAC,CAAC,EAAE,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;CAChE"}
@@ -1,5 +1,10 @@
1
1
  /**
2
- * Attachment metadata store — tracks files attached to chat sessions.
2
+ * Attachment metadata store — tracks uploaded files.
3
+ *
4
+ * Files can be uploaded without a session (OpenAI-compatible flow:
5
+ * upload first, then reference in a message content part).
6
+ * The sessionId is set later when the file is first referenced
7
+ * in a completions request.
3
8
  *
4
9
  * The actual file content is managed by the FileSystem abstraction.
5
10
  * This store only persists metadata (filename, mimeType, size, path).
@@ -1 +1 @@
1
- {"version":3,"file":"attachment-store.js","sourceRoot":"","sources":["../src/attachment-store.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
1
+ {"version":3,"file":"attachment-store.js","sourceRoot":"","sources":["../src/attachment-store.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@polpo-ai/core",
3
- "version": "0.4.8",
3
+ "version": "0.4.10",
4
4
  "description": "Pure business logic, types, schemas, and store interfaces for the Polpo AI agent orchestration platform",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",