yepanywhere 0.1.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/bundled/@yep-anywhere/shared/dist/app-types.d.ts +229 -0
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/app-types.js +46 -0
- package/bundled/@yep-anywhere/shared/dist/app-types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/DocumentContentSchema.d.ts +16 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/DocumentContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/DocumentContentSchema.js +17 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/DocumentContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ImageContentSchema.d.ts +15 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ImageContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ImageContentSchema.js +10 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ImageContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/TextContentSchema.d.ts +6 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/TextContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/TextContentSchema.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/TextContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ThinkingContentSchema.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ThinkingContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ThinkingContentSchema.js +7 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ThinkingContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolResultContentSchema.d.ts +24 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolResultContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolResultContentSchema.js +13 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolResultContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolUseContentSchema.d.ts +8 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolUseContentSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolUseContentSchema.js +8 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/content/ToolUseContentSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.d.ts +78 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.js +13 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/BaseEntrySchema.d.ts +18 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/BaseEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/BaseEntrySchema.js +19 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/BaseEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/FileHistorySnapshotEntrySchema.d.ts +13 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/FileHistorySnapshotEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/FileHistorySnapshotEntrySchema.js +14 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/FileHistorySnapshotEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.d.ts +68 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.js +37 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SummaryEntrySchema.d.ts +8 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SummaryEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SummaryEntrySchema.js +7 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SummaryEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts +52 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.js +29 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/UserEntrySchema.d.ts +72 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/UserEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/UserEntrySchema.js +10 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/UserEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/normalizeQueueOperationContent.d.ts +14 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/normalizeQueueOperationContent.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/normalizeQueueOperationContent.js +39 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/normalizeQueueOperationContent.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.d.ts +15 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.js +26 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/guards.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts +566 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.js +39 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.d.ts +93 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.js +40 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/UserMessageSchema.d.ts +105 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/UserMessageSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/UserMessageSchema.js +20 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/UserMessageSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/CommonToolSchema.d.ts +53 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/CommonToolSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/CommonToolSchema.js +54 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/CommonToolSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/StructuredPatchSchema.d.ts +9 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/StructuredPatchSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/StructuredPatchSchema.js +9 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/StructuredPatchSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/TodoSchema.d.ts +32 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/TodoSchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/TodoSchema.js +12 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/TodoSchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.d.ts +288 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.js +293 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/ToolResultSchemas.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/index.d.ts +83 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/index.js +10 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/tool/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/types.d.ts +42 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/types.js +11 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/content.d.ts +99 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/content.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/content.js +64 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/content.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.d.ts +17 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.js +17 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.d.ts +600 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.js +282 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/types.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/types.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/dag.d.ts +35 -0
- package/bundled/@yep-anywhere/shared/dist/dag.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/dag.js +75 -0
- package/bundled/@yep-anywhere/shared/dist/dag.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.d.ts +72 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.js +376 -0
- package/bundled/@yep-anywhere/shared/dist/filePathDetection.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/content.d.ts +95 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/content.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/content.js +57 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/content.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/events.d.ts +174 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/events.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/events.js +117 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/events.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/index.d.ts +18 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/index.js +18 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/session.d.ts +267 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/session.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/session.js +147 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/session.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/types.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/types.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/gemini-schema/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/ideMetadata.d.ts +30 -0
- package/bundled/@yep-anywhere/shared/dist/ideMetadata.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/ideMetadata.js +58 -0
- package/bundled/@yep-anywhere/shared/dist/ideMetadata.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts +24 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.js +17 -0
- package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.d.ts +457 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.js +217 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/events.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/index.d.ts +23 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/index.js +23 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.d.ts +149 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.js +158 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/session.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/types.d.ts +7 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/types.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/opencode-schema/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/projectId.d.ts +48 -0
- package/bundled/@yep-anywhere/shared/dist/projectId.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/projectId.js +74 -0
- package/bundled/@yep-anywhere/shared/dist/projectId.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/SessionView.d.ts +171 -0
- package/bundled/@yep-anywhere/shared/dist/session/SessionView.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/SessionView.js +189 -0
- package/bundled/@yep-anywhere/shared/dist/session/SessionView.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.d.ts +31 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.js +2 -0
- package/bundled/@yep-anywhere/shared/dist/session/UnifiedSession.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/index.d.ts +3 -0
- package/bundled/@yep-anywhere/shared/dist/session/index.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/session/index.js +2 -0
- package/bundled/@yep-anywhere/shared/dist/session/index.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/types.d.ts +172 -0
- package/bundled/@yep-anywhere/shared/dist/types.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/types.js +33 -0
- package/bundled/@yep-anywhere/shared/dist/types.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/upload.d.ts +58 -0
- package/bundled/@yep-anywhere/shared/dist/upload.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/upload.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/upload.js.map +1 -0
- package/bundled/@yep-anywhere/shared/package.json +7 -0
- package/client-dist/assets/index-C7DeAWG4.css +1 -0
- package/client-dist/assets/index-yX0HPwrz.js +147 -0
- package/client-dist/badge-96.png +0 -0
- package/client-dist/badge.svg +20 -0
- package/client-dist/debug-streaming.html +746 -0
- package/client-dist/favicon.ico +0 -0
- package/client-dist/icon-192.png +0 -0
- package/client-dist/icon-512.png +0 -0
- package/client-dist/icon.svg +27 -0
- package/client-dist/index.html +35 -0
- package/client-dist/manifest.json +23 -0
- package/client-dist/sw.js +482 -0
- package/dist/app.d.ts +67 -0
- package/dist/app.d.ts.map +1 -0
- package/dist/app.js +236 -0
- package/dist/app.js.map +1 -0
- package/dist/augments/augment-generator.d.ts +30 -0
- package/dist/augments/augment-generator.d.ts.map +1 -0
- package/dist/augments/augment-generator.js +171 -0
- package/dist/augments/augment-generator.js.map +1 -0
- package/dist/augments/block-detector.d.ts +81 -0
- package/dist/augments/block-detector.d.ts.map +1 -0
- package/dist/augments/block-detector.js +615 -0
- package/dist/augments/block-detector.js.map +1 -0
- package/dist/augments/edit-augments.d.ts +138 -0
- package/dist/augments/edit-augments.d.ts.map +1 -0
- package/dist/augments/edit-augments.js +665 -0
- package/dist/augments/edit-augments.js.map +1 -0
- package/dist/augments/index.d.ts +14 -0
- package/dist/augments/index.d.ts.map +1 -0
- package/dist/augments/index.js +20 -0
- package/dist/augments/index.js.map +1 -0
- package/dist/augments/markdown-augments.d.ts +33 -0
- package/dist/augments/markdown-augments.d.ts.map +1 -0
- package/dist/augments/markdown-augments.js +128 -0
- package/dist/augments/markdown-augments.js.map +1 -0
- package/dist/augments/read-augments.d.ts +40 -0
- package/dist/augments/read-augments.d.ts.map +1 -0
- package/dist/augments/read-augments.js +64 -0
- package/dist/augments/read-augments.js.map +1 -0
- package/dist/augments/stream-coordinator.d.ts +32 -0
- package/dist/augments/stream-coordinator.d.ts.map +1 -0
- package/dist/augments/stream-coordinator.js +115 -0
- package/dist/augments/stream-coordinator.js.map +1 -0
- package/dist/augments/write-augments.d.ts +32 -0
- package/dist/augments/write-augments.d.ts.map +1 -0
- package/dist/augments/write-augments.js +27 -0
- package/dist/augments/write-augments.js.map +1 -0
- package/dist/auth/AuthService.d.ts +98 -0
- package/dist/auth/AuthService.d.ts.map +1 -0
- package/dist/auth/AuthService.js +217 -0
- package/dist/auth/AuthService.js.map +1 -0
- package/dist/auth/index.d.ts +3 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +3 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/routes.d.ts +13 -0
- package/dist/auth/routes.d.ts.map +1 -0
- package/dist/auth/routes.js +149 -0
- package/dist/auth/routes.js.map +1 -0
- package/dist/cli.d.ts +19 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +152 -0
- package/dist/cli.js.map +1 -0
- package/dist/config.d.ts +76 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +124 -0
- package/dist/config.js.map +1 -0
- package/dist/dev-mock.d.ts +18 -0
- package/dist/dev-mock.d.ts.map +1 -0
- package/dist/dev-mock.js +260 -0
- package/dist/dev-mock.js.map +1 -0
- package/dist/frontend/index.d.ts +10 -0
- package/dist/frontend/index.d.ts.map +1 -0
- package/dist/frontend/index.js +10 -0
- package/dist/frontend/index.js.map +1 -0
- package/dist/frontend/proxy.d.ts +70 -0
- package/dist/frontend/proxy.d.ts.map +1 -0
- package/dist/frontend/proxy.js +329 -0
- package/dist/frontend/proxy.js.map +1 -0
- package/dist/frontend/static.d.ts +16 -0
- package/dist/frontend/static.d.ts.map +1 -0
- package/dist/frontend/static.js +106 -0
- package/dist/frontend/static.js.map +1 -0
- package/dist/highlighting/index.d.ts +43 -0
- package/dist/highlighting/index.d.ts.map +1 -0
- package/dist/highlighting/index.js +224 -0
- package/dist/highlighting/index.js.map +1 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +259 -0
- package/dist/index.js.map +1 -0
- package/dist/indexes/SessionIndexService.d.ts +106 -0
- package/dist/indexes/SessionIndexService.d.ts.map +1 -0
- package/dist/indexes/SessionIndexService.js +356 -0
- package/dist/indexes/SessionIndexService.js.map +1 -0
- package/dist/indexes/index.d.ts +3 -0
- package/dist/indexes/index.d.ts.map +1 -0
- package/dist/indexes/index.js +2 -0
- package/dist/indexes/index.js.map +1 -0
- package/dist/indexes/types.d.ts +55 -0
- package/dist/indexes/types.d.ts.map +1 -0
- package/dist/indexes/types.js +8 -0
- package/dist/indexes/types.js.map +1 -0
- package/dist/logging/index.d.ts +2 -0
- package/dist/logging/index.d.ts.map +1 -0
- package/dist/logging/index.js +2 -0
- package/dist/logging/index.js.map +1 -0
- package/dist/logging/logger.d.ts +81 -0
- package/dist/logging/logger.d.ts.map +1 -0
- package/dist/logging/logger.js +257 -0
- package/dist/logging/logger.js.map +1 -0
- package/dist/maintenance/debug-routes.d.ts +39 -0
- package/dist/maintenance/debug-routes.d.ts.map +1 -0
- package/dist/maintenance/debug-routes.js +561 -0
- package/dist/maintenance/debug-routes.js.map +1 -0
- package/dist/maintenance/index.d.ts +3 -0
- package/dist/maintenance/index.d.ts.map +1 -0
- package/dist/maintenance/index.js +3 -0
- package/dist/maintenance/index.js.map +1 -0
- package/dist/maintenance/server.d.ts +53 -0
- package/dist/maintenance/server.d.ts.map +1 -0
- package/dist/maintenance/server.js +419 -0
- package/dist/maintenance/server.js.map +1 -0
- package/dist/metadata/SessionMetadataService.d.ts +96 -0
- package/dist/metadata/SessionMetadataService.d.ts.map +1 -0
- package/dist/metadata/SessionMetadataService.js +209 -0
- package/dist/metadata/SessionMetadataService.js.map +1 -0
- package/dist/metadata/index.d.ts +2 -0
- package/dist/metadata/index.d.ts.map +1 -0
- package/dist/metadata/index.js +2 -0
- package/dist/metadata/index.js.map +1 -0
- package/dist/middleware/auth.d.ts +18 -0
- package/dist/middleware/auth.d.ts.map +1 -0
- package/dist/middleware/auth.js +53 -0
- package/dist/middleware/auth.js.map +1 -0
- package/dist/middleware/security.d.ts +4 -0
- package/dist/middleware/security.d.ts.map +1 -0
- package/dist/middleware/security.js +28 -0
- package/dist/middleware/security.js.map +1 -0
- package/dist/notifications/NotificationService.d.ts +76 -0
- package/dist/notifications/NotificationService.d.ts.map +1 -0
- package/dist/notifications/NotificationService.js +155 -0
- package/dist/notifications/NotificationService.js.map +1 -0
- package/dist/notifications/index.d.ts +2 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +2 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/projects/codex-scanner.d.ts +52 -0
- package/dist/projects/codex-scanner.d.ts.map +1 -0
- package/dist/projects/codex-scanner.js +167 -0
- package/dist/projects/codex-scanner.js.map +1 -0
- package/dist/projects/gemini-project-map.d.ts +54 -0
- package/dist/projects/gemini-project-map.d.ts.map +1 -0
- package/dist/projects/gemini-project-map.js +116 -0
- package/dist/projects/gemini-project-map.js.map +1 -0
- package/dist/projects/gemini-scanner.d.ts +58 -0
- package/dist/projects/gemini-scanner.d.ts.map +1 -0
- package/dist/projects/gemini-scanner.js +210 -0
- package/dist/projects/gemini-scanner.js.map +1 -0
- package/dist/projects/index.d.ts +16 -0
- package/dist/projects/index.d.ts.map +1 -0
- package/dist/projects/index.js +17 -0
- package/dist/projects/index.js.map +1 -0
- package/dist/projects/paths.d.ts +127 -0
- package/dist/projects/paths.d.ts.map +1 -0
- package/dist/projects/paths.js +185 -0
- package/dist/projects/paths.js.map +1 -0
- package/dist/projects/scanner.d.ts +45 -0
- package/dist/projects/scanner.d.ts.map +1 -0
- package/dist/projects/scanner.js +287 -0
- package/dist/projects/scanner.js.map +1 -0
- package/dist/push/PushNotifier.d.ts +48 -0
- package/dist/push/PushNotifier.d.ts.map +1 -0
- package/dist/push/PushNotifier.js +145 -0
- package/dist/push/PushNotifier.js.map +1 -0
- package/dist/push/PushService.d.ts +95 -0
- package/dist/push/PushService.d.ts.map +1 -0
- package/dist/push/PushService.js +245 -0
- package/dist/push/PushService.js.map +1 -0
- package/dist/push/index.d.ts +9 -0
- package/dist/push/index.d.ts.map +1 -0
- package/dist/push/index.js +8 -0
- package/dist/push/index.js.map +1 -0
- package/dist/push/routes.d.ts +10 -0
- package/dist/push/routes.d.ts.map +1 -0
- package/dist/push/routes.js +111 -0
- package/dist/push/routes.js.map +1 -0
- package/dist/push/types.d.ts +80 -0
- package/dist/push/types.d.ts.map +1 -0
- package/dist/push/types.js +5 -0
- package/dist/push/types.js.map +1 -0
- package/dist/push/vapid.d.ts +42 -0
- package/dist/push/vapid.d.ts.map +1 -0
- package/dist/push/vapid.js +132 -0
- package/dist/push/vapid.js.map +1 -0
- package/dist/recents/RecentsService.d.ts +77 -0
- package/dist/recents/RecentsService.d.ts.map +1 -0
- package/dist/recents/RecentsService.js +155 -0
- package/dist/recents/RecentsService.js.map +1 -0
- package/dist/recents/index.d.ts +2 -0
- package/dist/recents/index.d.ts.map +1 -0
- package/dist/recents/index.js +2 -0
- package/dist/recents/index.js.map +1 -0
- package/dist/routes/activity.d.ts +7 -0
- package/dist/routes/activity.d.ts.map +1 -0
- package/dist/routes/activity.js +80 -0
- package/dist/routes/activity.js.map +1 -0
- package/dist/routes/beads.d.ts +42 -0
- package/dist/routes/beads.d.ts.map +1 -0
- package/dist/routes/beads.js +101 -0
- package/dist/routes/beads.js.map +1 -0
- package/dist/routes/debug-streaming.d.ts +7 -0
- package/dist/routes/debug-streaming.d.ts.map +1 -0
- package/dist/routes/debug-streaming.js +88 -0
- package/dist/routes/debug-streaming.js.map +1 -0
- package/dist/routes/dev.d.ts +11 -0
- package/dist/routes/dev.d.ts.map +1 -0
- package/dist/routes/dev.js +55 -0
- package/dist/routes/dev.js.map +1 -0
- package/dist/routes/files.d.ts +7 -0
- package/dist/routes/files.d.ts.map +1 -0
- package/dist/routes/files.js +429 -0
- package/dist/routes/files.js.map +1 -0
- package/dist/routes/global-sessions.d.ts +76 -0
- package/dist/routes/global-sessions.d.ts.map +1 -0
- package/dist/routes/global-sessions.js +207 -0
- package/dist/routes/global-sessions.js.map +1 -0
- package/dist/routes/health.d.ts +3 -0
- package/dist/routes/health.d.ts.map +1 -0
- package/dist/routes/health.js +6 -0
- package/dist/routes/health.js.map +1 -0
- package/dist/routes/inbox.d.ts +45 -0
- package/dist/routes/inbox.d.ts.map +1 -0
- package/dist/routes/inbox.js +174 -0
- package/dist/routes/inbox.js.map +1 -0
- package/dist/routes/processes.d.ts +16 -0
- package/dist/routes/processes.d.ts.map +1 -0
- package/dist/routes/processes.js +82 -0
- package/dist/routes/processes.js.map +1 -0
- package/dist/routes/projects.d.ts +30 -0
- package/dist/routes/projects.d.ts.map +1 -0
- package/dist/routes/projects.js +316 -0
- package/dist/routes/projects.js.map +1 -0
- package/dist/routes/providers.d.ts +9 -0
- package/dist/routes/providers.d.ts.map +1 -0
- package/dist/routes/providers.js +63 -0
- package/dist/routes/providers.js.map +1 -0
- package/dist/routes/recents.d.ts +14 -0
- package/dist/routes/recents.d.ts.map +1 -0
- package/dist/routes/recents.js +82 -0
- package/dist/routes/recents.js.map +1 -0
- package/dist/routes/sessions.d.ts +26 -0
- package/dist/routes/sessions.d.ts.map +1 -0
- package/dist/routes/sessions.js +962 -0
- package/dist/routes/sessions.js.map +1 -0
- package/dist/routes/stream.d.ts +7 -0
- package/dist/routes/stream.d.ts.map +1 -0
- package/dist/routes/stream.js +561 -0
- package/dist/routes/stream.js.map +1 -0
- package/dist/routes/upload.d.ts +14 -0
- package/dist/routes/upload.d.ts.map +1 -0
- package/dist/routes/upload.js +278 -0
- package/dist/routes/upload.js.map +1 -0
- package/dist/sdk/cli-detection.d.ts +47 -0
- package/dist/sdk/cli-detection.d.ts.map +1 -0
- package/dist/sdk/cli-detection.js +122 -0
- package/dist/sdk/cli-detection.js.map +1 -0
- package/dist/sdk/messageLogger.d.ts +15 -0
- package/dist/sdk/messageLogger.d.ts.map +1 -0
- package/dist/sdk/messageLogger.js +68 -0
- package/dist/sdk/messageLogger.js.map +1 -0
- package/dist/sdk/messageQueue.d.ts +49 -0
- package/dist/sdk/messageQueue.d.ts.map +1 -0
- package/dist/sdk/messageQueue.js +186 -0
- package/dist/sdk/messageQueue.js.map +1 -0
- package/dist/sdk/mock.d.ts +16 -0
- package/dist/sdk/mock.d.ts.map +1 -0
- package/dist/sdk/mock.js +81 -0
- package/dist/sdk/mock.js.map +1 -0
- package/dist/sdk/providers/__mocks__/base.d.ts +78 -0
- package/dist/sdk/providers/__mocks__/base.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/base.js +185 -0
- package/dist/sdk/providers/__mocks__/base.js.map +1 -0
- package/dist/sdk/providers/__mocks__/claude.d.ts +33 -0
- package/dist/sdk/providers/__mocks__/claude.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/claude.js +146 -0
- package/dist/sdk/providers/__mocks__/claude.js.map +1 -0
- package/dist/sdk/providers/__mocks__/codex.d.ts +45 -0
- package/dist/sdk/providers/__mocks__/codex.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/codex.js +160 -0
- package/dist/sdk/providers/__mocks__/codex.js.map +1 -0
- package/dist/sdk/providers/__mocks__/factory.d.ts +40 -0
- package/dist/sdk/providers/__mocks__/factory.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/factory.js +183 -0
- package/dist/sdk/providers/__mocks__/factory.js.map +1 -0
- package/dist/sdk/providers/__mocks__/gemini.d.ts +43 -0
- package/dist/sdk/providers/__mocks__/gemini.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/gemini.js +198 -0
- package/dist/sdk/providers/__mocks__/gemini.js.map +1 -0
- package/dist/sdk/providers/__mocks__/index.d.ts +23 -0
- package/dist/sdk/providers/__mocks__/index.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/index.js +25 -0
- package/dist/sdk/providers/__mocks__/index.js.map +1 -0
- package/dist/sdk/providers/__mocks__/opencode.d.ts +33 -0
- package/dist/sdk/providers/__mocks__/opencode.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/opencode.js +136 -0
- package/dist/sdk/providers/__mocks__/opencode.js.map +1 -0
- package/dist/sdk/providers/__mocks__/types.d.ts +50 -0
- package/dist/sdk/providers/__mocks__/types.d.ts.map +1 -0
- package/dist/sdk/providers/__mocks__/types.js +8 -0
- package/dist/sdk/providers/__mocks__/types.js.map +1 -0
- package/dist/sdk/providers/claude.d.ts +63 -0
- package/dist/sdk/providers/claude.d.ts.map +1 -0
- package/dist/sdk/providers/claude.js +252 -0
- package/dist/sdk/providers/claude.js.map +1 -0
- package/dist/sdk/providers/codex-oss.d.ts +108 -0
- package/dist/sdk/providers/codex-oss.d.ts.map +1 -0
- package/dist/sdk/providers/codex-oss.js +744 -0
- package/dist/sdk/providers/codex-oss.js.map +1 -0
- package/dist/sdk/providers/codex.d.ts +82 -0
- package/dist/sdk/providers/codex.d.ts.map +1 -0
- package/dist/sdk/providers/codex.js +597 -0
- package/dist/sdk/providers/codex.js.map +1 -0
- package/dist/sdk/providers/gemini.d.ts +78 -0
- package/dist/sdk/providers/gemini.d.ts.map +1 -0
- package/dist/sdk/providers/gemini.js +536 -0
- package/dist/sdk/providers/gemini.js.map +1 -0
- package/dist/sdk/providers/index.d.ts +22 -0
- package/dist/sdk/providers/index.d.ts.map +1 -0
- package/dist/sdk/providers/index.js +53 -0
- package/dist/sdk/providers/index.js.map +1 -0
- package/dist/sdk/providers/opencode.d.ts +95 -0
- package/dist/sdk/providers/opencode.d.ts.map +1 -0
- package/dist/sdk/providers/opencode.js +586 -0
- package/dist/sdk/providers/opencode.js.map +1 -0
- package/dist/sdk/providers/types.d.ts +99 -0
- package/dist/sdk/providers/types.d.ts.map +1 -0
- package/dist/sdk/providers/types.js +2 -0
- package/dist/sdk/providers/types.js.map +1 -0
- package/dist/sdk/real.d.ts +20 -0
- package/dist/sdk/real.d.ts.map +1 -0
- package/dist/sdk/real.js +22 -0
- package/dist/sdk/real.js.map +1 -0
- package/dist/sdk/types.d.ts +113 -0
- package/dist/sdk/types.d.ts.map +1 -0
- package/dist/sdk/types.js +3 -0
- package/dist/sdk/types.js.map +1 -0
- package/dist/sessions/Session.d.ts +80 -0
- package/dist/sessions/Session.d.ts.map +1 -0
- package/dist/sessions/Session.js +119 -0
- package/dist/sessions/Session.js.map +1 -0
- package/dist/sessions/codex-reader.d.ts +166 -0
- package/dist/sessions/codex-reader.d.ts.map +1 -0
- package/dist/sessions/codex-reader.js +664 -0
- package/dist/sessions/codex-reader.js.map +1 -0
- package/dist/sessions/dag.d.ts +62 -0
- package/dist/sessions/dag.d.ts.map +1 -0
- package/dist/sessions/dag.js +175 -0
- package/dist/sessions/dag.js.map +1 -0
- package/dist/sessions/fork.d.ts +34 -0
- package/dist/sessions/fork.d.ts.map +1 -0
- package/dist/sessions/fork.js +58 -0
- package/dist/sessions/fork.js.map +1 -0
- package/dist/sessions/gemini-reader.d.ts +103 -0
- package/dist/sessions/gemini-reader.d.ts.map +1 -0
- package/dist/sessions/gemini-reader.js +332 -0
- package/dist/sessions/gemini-reader.js.map +1 -0
- package/dist/sessions/normalization.d.ts +7 -0
- package/dist/sessions/normalization.d.ts.map +1 -0
- package/dist/sessions/normalization.js +429 -0
- package/dist/sessions/normalization.js.map +1 -0
- package/dist/sessions/opencode-reader.d.ts +99 -0
- package/dist/sessions/opencode-reader.d.ts.map +1 -0
- package/dist/sessions/opencode-reader.js +370 -0
- package/dist/sessions/opencode-reader.js.map +1 -0
- package/dist/sessions/reader.d.ts +118 -0
- package/dist/sessions/reader.d.ts.map +1 -0
- package/dist/sessions/reader.js +444 -0
- package/dist/sessions/reader.js.map +1 -0
- package/dist/sessions/types.d.ts +77 -0
- package/dist/sessions/types.d.ts.map +1 -0
- package/dist/sessions/types.js +8 -0
- package/dist/sessions/types.js.map +1 -0
- package/dist/supervisor/ExternalSessionTracker.d.ts +94 -0
- package/dist/supervisor/ExternalSessionTracker.d.ts.map +1 -0
- package/dist/supervisor/ExternalSessionTracker.js +507 -0
- package/dist/supervisor/ExternalSessionTracker.js.map +1 -0
- package/dist/supervisor/Process.d.ts +230 -0
- package/dist/supervisor/Process.d.ts.map +1 -0
- package/dist/supervisor/Process.js +878 -0
- package/dist/supervisor/Process.js.map +1 -0
- package/dist/supervisor/Supervisor.d.ts +191 -0
- package/dist/supervisor/Supervisor.d.ts.map +1 -0
- package/dist/supervisor/Supervisor.js +933 -0
- package/dist/supervisor/Supervisor.js.map +1 -0
- package/dist/supervisor/WorkerQueue.d.ts +113 -0
- package/dist/supervisor/WorkerQueue.d.ts.map +1 -0
- package/dist/supervisor/WorkerQueue.js +148 -0
- package/dist/supervisor/WorkerQueue.js.map +1 -0
- package/dist/supervisor/types.d.ts +176 -0
- package/dist/supervisor/types.d.ts.map +1 -0
- package/dist/supervisor/types.js +7 -0
- package/dist/supervisor/types.js.map +1 -0
- package/dist/testing/mockProjectData.d.ts +5 -0
- package/dist/testing/mockProjectData.d.ts.map +1 -0
- package/dist/testing/mockProjectData.js +27 -0
- package/dist/testing/mockProjectData.js.map +1 -0
- package/dist/uploads/index.d.ts +3 -0
- package/dist/uploads/index.d.ts.map +1 -0
- package/dist/uploads/index.js +2 -0
- package/dist/uploads/index.js.map +1 -0
- package/dist/uploads/manager.d.ts +84 -0
- package/dist/uploads/manager.d.ts.map +1 -0
- package/dist/uploads/manager.js +215 -0
- package/dist/uploads/manager.js.map +1 -0
- package/dist/utils/fileLock.d.ts +57 -0
- package/dist/utils/fileLock.d.ts.map +1 -0
- package/dist/utils/fileLock.js +91 -0
- package/dist/utils/fileLock.js.map +1 -0
- package/dist/watcher/BatchProcessor.d.ts +58 -0
- package/dist/watcher/BatchProcessor.d.ts.map +1 -0
- package/dist/watcher/BatchProcessor.js +105 -0
- package/dist/watcher/BatchProcessor.js.map +1 -0
- package/dist/watcher/EventBus.d.ts +157 -0
- package/dist/watcher/EventBus.d.ts.map +1 -0
- package/dist/watcher/EventBus.js +36 -0
- package/dist/watcher/EventBus.js.map +1 -0
- package/dist/watcher/FileWatcher.d.ts +42 -0
- package/dist/watcher/FileWatcher.d.ts.map +1 -0
- package/dist/watcher/FileWatcher.js +165 -0
- package/dist/watcher/FileWatcher.js.map +1 -0
- package/dist/watcher/SourceWatcher.d.ts +36 -0
- package/dist/watcher/SourceWatcher.d.ts.map +1 -0
- package/dist/watcher/SourceWatcher.js +97 -0
- package/dist/watcher/SourceWatcher.js.map +1 -0
- package/dist/watcher/index.d.ts +9 -0
- package/dist/watcher/index.d.ts.map +1 -0
- package/dist/watcher/index.js +5 -0
- package/dist/watcher/index.js.map +1 -0
- package/package.json +54 -0
- package/scripts/postinstall.js +48 -0
|
@@ -0,0 +1,429 @@
|
|
|
1
|
+
import { getMessageContent, isConversationEntry } from "@yep-anywhere/shared";
|
|
2
|
+
import { buildDag, findOrphanedToolUses } from "./dag.js";
|
|
3
|
+
/**
|
|
4
|
+
* Normalize a UnifiedSession into the generic Session format expected by the frontend.
|
|
5
|
+
*/
|
|
6
|
+
export function normalizeSession(loaded) {
|
|
7
|
+
const { summary, data } = loaded;
|
|
8
|
+
switch (data.provider) {
|
|
9
|
+
case "claude": {
|
|
10
|
+
// Claude sessions are stored as raw messages in the session file.
|
|
11
|
+
// We need to build the DAG to find the active branch.
|
|
12
|
+
const rawMessages = data.session.messages;
|
|
13
|
+
// Build DAG and get active branch (filters out dead branches)
|
|
14
|
+
const { activeBranch } = buildDag(rawMessages);
|
|
15
|
+
// Calculate orphaned tools (default behavior was includeOrphans=true)
|
|
16
|
+
// We can't access "options" here easily unless we pass it, but standard normalization usually wants them.
|
|
17
|
+
const orphanedToolUses = findOrphanedToolUses(activeBranch);
|
|
18
|
+
// Convert to Message objects (only active branch)
|
|
19
|
+
const messages = activeBranch.map((node, index) => convertClaudeMessage(node.raw, index, orphanedToolUses));
|
|
20
|
+
return {
|
|
21
|
+
...summary,
|
|
22
|
+
messages,
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
case "codex":
|
|
26
|
+
case "codex-oss":
|
|
27
|
+
return {
|
|
28
|
+
...summary,
|
|
29
|
+
messages: convertCodexEntries(data.session.entries),
|
|
30
|
+
};
|
|
31
|
+
case "gemini":
|
|
32
|
+
return {
|
|
33
|
+
...summary,
|
|
34
|
+
messages: convertGeminiMessages(data.session.messages),
|
|
35
|
+
};
|
|
36
|
+
case "opencode":
|
|
37
|
+
return {
|
|
38
|
+
...summary,
|
|
39
|
+
messages: convertOpenCodeEntries(data.session.messages),
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
// --- Claude Conversion Logic ---
|
|
44
|
+
function convertClaudeMessage(raw, _index, orphanedToolUses) {
|
|
45
|
+
// Normalize content blocks - pass through all fields
|
|
46
|
+
let content;
|
|
47
|
+
const rawContent = getMessageContent(raw);
|
|
48
|
+
if (typeof rawContent === "string") {
|
|
49
|
+
content = rawContent;
|
|
50
|
+
}
|
|
51
|
+
else if (Array.isArray(rawContent)) {
|
|
52
|
+
// Pass through all fields from each content block
|
|
53
|
+
// Filter out string items (which can appear in user message content)
|
|
54
|
+
content = rawContent
|
|
55
|
+
.filter((block) => typeof block !== "string")
|
|
56
|
+
.map((block) => ({ ...block }));
|
|
57
|
+
}
|
|
58
|
+
// Build message by spreading all raw fields, then override with normalized values
|
|
59
|
+
// Use type assertion since we're converting to a looser Message type
|
|
60
|
+
const rawAny = raw;
|
|
61
|
+
const message = {
|
|
62
|
+
...rawAny,
|
|
63
|
+
// Include normalized content if message had content
|
|
64
|
+
...(isConversationEntry(raw) && {
|
|
65
|
+
message: {
|
|
66
|
+
...raw.message,
|
|
67
|
+
...(content !== undefined && { content }),
|
|
68
|
+
},
|
|
69
|
+
}),
|
|
70
|
+
// Ensure type is set
|
|
71
|
+
type: raw.type,
|
|
72
|
+
};
|
|
73
|
+
// Identify orphaned tool_use IDs in this message's content
|
|
74
|
+
if (Array.isArray(content)) {
|
|
75
|
+
const orphanedIds = content
|
|
76
|
+
.filter((b) => b.type === "tool_use" &&
|
|
77
|
+
typeof b.id === "string" &&
|
|
78
|
+
orphanedToolUses.has(b.id))
|
|
79
|
+
.map((b) => b.id);
|
|
80
|
+
if (orphanedIds.length > 0) {
|
|
81
|
+
message.orphanedToolUseIds = orphanedIds;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
return message;
|
|
85
|
+
}
|
|
86
|
+
// --- Codex Conversion Logic ---
|
|
87
|
+
function convertCodexEntries(entries) {
|
|
88
|
+
const messages = [];
|
|
89
|
+
let messageIndex = 0;
|
|
90
|
+
const hasResponseItemUser = hasCodexResponseItemUserMessages(entries);
|
|
91
|
+
// Track function calls for pairing with outputs
|
|
92
|
+
const pendingCalls = new Map();
|
|
93
|
+
for (const entry of entries) {
|
|
94
|
+
if (entry.type === "response_item") {
|
|
95
|
+
const msg = convertCodexResponseItem(entry, messageIndex++, pendingCalls);
|
|
96
|
+
if (msg) {
|
|
97
|
+
messages.push(msg);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
else if (entry.type === "event_msg") {
|
|
101
|
+
// Only process user_message events - agent_message events are
|
|
102
|
+
// duplicates of the response_item data (streaming tokens)
|
|
103
|
+
if (entry.payload.type === "user_message" && !hasResponseItemUser) {
|
|
104
|
+
const msg = convertCodexEventMsg(entry, messageIndex++);
|
|
105
|
+
if (msg) {
|
|
106
|
+
messages.push(msg);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
return messages;
|
|
112
|
+
}
|
|
113
|
+
function hasCodexResponseItemUserMessages(entries) {
|
|
114
|
+
return entries.some((entry) => entry.type === "response_item" &&
|
|
115
|
+
entry.payload.type === "message" &&
|
|
116
|
+
entry.payload.role === "user");
|
|
117
|
+
}
|
|
118
|
+
function convertCodexResponseItem(entry, index, pendingCalls) {
|
|
119
|
+
const payload = entry.payload;
|
|
120
|
+
const uuid = `codex-${index}-${entry.timestamp}`;
|
|
121
|
+
switch (payload.type) {
|
|
122
|
+
case "message":
|
|
123
|
+
return convertCodexMessagePayload(payload, uuid, entry.timestamp);
|
|
124
|
+
case "reasoning":
|
|
125
|
+
return convertCodexReasoningPayload(payload, uuid, entry.timestamp);
|
|
126
|
+
case "function_call":
|
|
127
|
+
pendingCalls.set(payload.call_id, {
|
|
128
|
+
name: payload.name,
|
|
129
|
+
arguments: payload.arguments,
|
|
130
|
+
timestamp: entry.timestamp,
|
|
131
|
+
});
|
|
132
|
+
return convertCodexFunctionCallPayload(payload, uuid, entry.timestamp);
|
|
133
|
+
case "function_call_output":
|
|
134
|
+
return convertCodexFunctionCallOutputPayload(payload, uuid, entry.timestamp);
|
|
135
|
+
case "ghost_snapshot":
|
|
136
|
+
return null;
|
|
137
|
+
default:
|
|
138
|
+
return null;
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function convertCodexMessagePayload(payload, uuid, timestamp) {
|
|
142
|
+
const fullText = payload.content.map((c) => c.text).join("");
|
|
143
|
+
if (!fullText.trim()) {
|
|
144
|
+
return {
|
|
145
|
+
uuid,
|
|
146
|
+
type: payload.role,
|
|
147
|
+
message: {
|
|
148
|
+
role: payload.role,
|
|
149
|
+
content: [],
|
|
150
|
+
},
|
|
151
|
+
timestamp,
|
|
152
|
+
};
|
|
153
|
+
}
|
|
154
|
+
const content = [
|
|
155
|
+
{
|
|
156
|
+
type: "text",
|
|
157
|
+
text: fullText,
|
|
158
|
+
},
|
|
159
|
+
];
|
|
160
|
+
return {
|
|
161
|
+
uuid,
|
|
162
|
+
type: payload.role,
|
|
163
|
+
message: {
|
|
164
|
+
role: payload.role,
|
|
165
|
+
content,
|
|
166
|
+
},
|
|
167
|
+
timestamp,
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
function convertCodexReasoningPayload(payload, uuid, timestamp) {
|
|
171
|
+
const summaryText = payload.summary
|
|
172
|
+
?.map((s) => s.text)
|
|
173
|
+
.join("\n")
|
|
174
|
+
.trim();
|
|
175
|
+
const content = [];
|
|
176
|
+
if (summaryText) {
|
|
177
|
+
content.push({
|
|
178
|
+
type: "thinking",
|
|
179
|
+
thinking: summaryText,
|
|
180
|
+
});
|
|
181
|
+
}
|
|
182
|
+
if (payload.encrypted_content) {
|
|
183
|
+
content.push({
|
|
184
|
+
type: "text",
|
|
185
|
+
text: "[Encrypted reasoning content]",
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
return {
|
|
189
|
+
uuid,
|
|
190
|
+
type: "assistant",
|
|
191
|
+
message: {
|
|
192
|
+
role: "assistant",
|
|
193
|
+
content,
|
|
194
|
+
},
|
|
195
|
+
timestamp,
|
|
196
|
+
};
|
|
197
|
+
}
|
|
198
|
+
function convertCodexFunctionCallPayload(payload, uuid, timestamp) {
|
|
199
|
+
let input;
|
|
200
|
+
try {
|
|
201
|
+
input = JSON.parse(payload.arguments);
|
|
202
|
+
}
|
|
203
|
+
catch {
|
|
204
|
+
input = { raw: payload.arguments };
|
|
205
|
+
}
|
|
206
|
+
const content = [
|
|
207
|
+
{
|
|
208
|
+
type: "tool_use",
|
|
209
|
+
id: payload.call_id,
|
|
210
|
+
name: payload.name,
|
|
211
|
+
input,
|
|
212
|
+
},
|
|
213
|
+
];
|
|
214
|
+
return {
|
|
215
|
+
uuid,
|
|
216
|
+
type: "assistant",
|
|
217
|
+
message: {
|
|
218
|
+
role: "assistant",
|
|
219
|
+
content,
|
|
220
|
+
},
|
|
221
|
+
timestamp,
|
|
222
|
+
};
|
|
223
|
+
}
|
|
224
|
+
function convertCodexFunctionCallOutputPayload(payload, uuid, timestamp) {
|
|
225
|
+
return {
|
|
226
|
+
uuid,
|
|
227
|
+
type: "tool_result",
|
|
228
|
+
toolUseResult: {
|
|
229
|
+
tool_use_id: payload.call_id,
|
|
230
|
+
content: payload.output,
|
|
231
|
+
},
|
|
232
|
+
timestamp,
|
|
233
|
+
};
|
|
234
|
+
}
|
|
235
|
+
function convertCodexEventMsg(entry, index) {
|
|
236
|
+
const payload = entry.payload;
|
|
237
|
+
const uuid = `codex-event-${index}-${entry.timestamp}`;
|
|
238
|
+
switch (payload.type) {
|
|
239
|
+
case "user_message":
|
|
240
|
+
return {
|
|
241
|
+
uuid,
|
|
242
|
+
type: "user",
|
|
243
|
+
message: {
|
|
244
|
+
role: "user",
|
|
245
|
+
content: payload.message,
|
|
246
|
+
},
|
|
247
|
+
timestamp: entry.timestamp,
|
|
248
|
+
};
|
|
249
|
+
case "agent_message":
|
|
250
|
+
return {
|
|
251
|
+
uuid,
|
|
252
|
+
type: "assistant",
|
|
253
|
+
message: {
|
|
254
|
+
role: "assistant",
|
|
255
|
+
content: [{ type: "text", text: payload.message }],
|
|
256
|
+
},
|
|
257
|
+
timestamp: entry.timestamp,
|
|
258
|
+
};
|
|
259
|
+
case "agent_reasoning":
|
|
260
|
+
return {
|
|
261
|
+
uuid,
|
|
262
|
+
type: "assistant",
|
|
263
|
+
message: {
|
|
264
|
+
role: "assistant",
|
|
265
|
+
content: [{ type: "thinking", thinking: payload.text }],
|
|
266
|
+
},
|
|
267
|
+
timestamp: entry.timestamp,
|
|
268
|
+
};
|
|
269
|
+
default:
|
|
270
|
+
return null;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
// --- Gemini Conversion Logic ---
|
|
274
|
+
function convertGeminiMessages(sessionMessages) {
|
|
275
|
+
const messages = [];
|
|
276
|
+
for (const msg of sessionMessages) {
|
|
277
|
+
if (msg.type === "user") {
|
|
278
|
+
const userMsg = msg;
|
|
279
|
+
messages.push({
|
|
280
|
+
uuid: userMsg.id,
|
|
281
|
+
type: "user",
|
|
282
|
+
message: {
|
|
283
|
+
role: "user",
|
|
284
|
+
content: userMsg.content,
|
|
285
|
+
},
|
|
286
|
+
timestamp: userMsg.timestamp,
|
|
287
|
+
});
|
|
288
|
+
}
|
|
289
|
+
else if (msg.type === "gemini") {
|
|
290
|
+
const assistantMsg = msg;
|
|
291
|
+
const content = [];
|
|
292
|
+
if (assistantMsg.thoughts) {
|
|
293
|
+
for (const thought of assistantMsg.thoughts) {
|
|
294
|
+
content.push({
|
|
295
|
+
type: "thinking",
|
|
296
|
+
thinking: `${thought.subject}: ${thought.description}`,
|
|
297
|
+
});
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
if (assistantMsg.content) {
|
|
301
|
+
content.push({
|
|
302
|
+
type: "text",
|
|
303
|
+
text: assistantMsg.content,
|
|
304
|
+
});
|
|
305
|
+
}
|
|
306
|
+
if (assistantMsg.toolCalls) {
|
|
307
|
+
for (const toolCall of assistantMsg.toolCalls) {
|
|
308
|
+
content.push({
|
|
309
|
+
type: "tool_use",
|
|
310
|
+
id: toolCall.id,
|
|
311
|
+
name: toolCall.name,
|
|
312
|
+
input: toolCall.args,
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
messages.push({
|
|
317
|
+
uuid: assistantMsg.id,
|
|
318
|
+
type: "assistant",
|
|
319
|
+
message: {
|
|
320
|
+
role: "assistant",
|
|
321
|
+
content,
|
|
322
|
+
},
|
|
323
|
+
timestamp: assistantMsg.timestamp,
|
|
324
|
+
});
|
|
325
|
+
if (assistantMsg.toolCalls) {
|
|
326
|
+
for (const toolCall of assistantMsg.toolCalls) {
|
|
327
|
+
if (toolCall.result && toolCall.result.length > 0) {
|
|
328
|
+
for (const result of toolCall.result) {
|
|
329
|
+
messages.push({
|
|
330
|
+
uuid: `${assistantMsg.id}-result-${result.functionResponse.id}`,
|
|
331
|
+
type: "tool_result",
|
|
332
|
+
toolUseResult: {
|
|
333
|
+
tool_use_id: result.functionResponse.id,
|
|
334
|
+
content: result.functionResponse.response.output,
|
|
335
|
+
},
|
|
336
|
+
timestamp: toolCall.timestamp ?? assistantMsg.timestamp,
|
|
337
|
+
});
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
return messages;
|
|
345
|
+
}
|
|
346
|
+
// --- OpenCode Conversion Logic ---
|
|
347
|
+
function convertOpenCodeEntries(entries) {
|
|
348
|
+
const messages = [];
|
|
349
|
+
for (const entry of entries) {
|
|
350
|
+
const { message, parts } = entry;
|
|
351
|
+
const uuid = message.id;
|
|
352
|
+
const timestamp = message.time?.created
|
|
353
|
+
? new Date(message.time.created).toISOString()
|
|
354
|
+
: undefined;
|
|
355
|
+
const content = convertOpenCodeParts(parts);
|
|
356
|
+
messages.push({
|
|
357
|
+
uuid,
|
|
358
|
+
type: message.role,
|
|
359
|
+
message: {
|
|
360
|
+
role: message.role,
|
|
361
|
+
content,
|
|
362
|
+
model: message.modelID,
|
|
363
|
+
usage: message.tokens
|
|
364
|
+
? {
|
|
365
|
+
input_tokens: message.tokens.input,
|
|
366
|
+
output_tokens: message.tokens.output,
|
|
367
|
+
cache_read_input_tokens: message.tokens.cache?.read,
|
|
368
|
+
}
|
|
369
|
+
: undefined,
|
|
370
|
+
},
|
|
371
|
+
timestamp,
|
|
372
|
+
// Include OpenCode-specific fields
|
|
373
|
+
...(message.parentID && { parentId: message.parentID }),
|
|
374
|
+
...(message.mode && { mode: message.mode }),
|
|
375
|
+
...(message.agent && { agent: message.agent }),
|
|
376
|
+
...(message.finish && { finish: message.finish }),
|
|
377
|
+
});
|
|
378
|
+
}
|
|
379
|
+
return messages;
|
|
380
|
+
}
|
|
381
|
+
function convertOpenCodeParts(parts) {
|
|
382
|
+
const blocks = [];
|
|
383
|
+
for (const part of parts) {
|
|
384
|
+
switch (part.type) {
|
|
385
|
+
case "text":
|
|
386
|
+
if (part.text) {
|
|
387
|
+
blocks.push({
|
|
388
|
+
type: "text",
|
|
389
|
+
text: part.text,
|
|
390
|
+
});
|
|
391
|
+
}
|
|
392
|
+
break;
|
|
393
|
+
case "tool":
|
|
394
|
+
if (part.tool && part.callID) {
|
|
395
|
+
// Tool use block
|
|
396
|
+
blocks.push({
|
|
397
|
+
type: "tool_use",
|
|
398
|
+
id: part.callID,
|
|
399
|
+
name: part.tool,
|
|
400
|
+
input: part.state?.input ?? {},
|
|
401
|
+
});
|
|
402
|
+
// If tool has completed, add tool result block
|
|
403
|
+
if (part.state?.status === "completed") {
|
|
404
|
+
const resultContent = part.state.error
|
|
405
|
+
? part.state.error
|
|
406
|
+
: typeof part.state.output === "string"
|
|
407
|
+
? part.state.output
|
|
408
|
+
: JSON.stringify(part.state.output ?? "");
|
|
409
|
+
blocks.push({
|
|
410
|
+
type: "tool_result",
|
|
411
|
+
tool_use_id: part.callID,
|
|
412
|
+
content: resultContent,
|
|
413
|
+
is_error: !!part.state.error,
|
|
414
|
+
});
|
|
415
|
+
}
|
|
416
|
+
}
|
|
417
|
+
break;
|
|
418
|
+
// Skip step-start and step-finish (metadata, not content)
|
|
419
|
+
case "step-start":
|
|
420
|
+
case "step-finish":
|
|
421
|
+
break;
|
|
422
|
+
default:
|
|
423
|
+
// Unknown part type - skip
|
|
424
|
+
break;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
return blocks;
|
|
428
|
+
}
|
|
429
|
+
//# sourceMappingURL=normalization.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"normalization.js","sourceRoot":"","sources":["../../src/sessions/normalization.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE9E,OAAO,EAAE,QAAQ,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAC;AAS1D;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,MAAqB;IACpD,MAAM,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,MAAM,CAAC;IAEjC,QAAQ,IAAI,CAAC,QAAQ,EAAE,CAAC;QACtB,KAAK,QAAQ,CAAC,CAAC,CAAC;YACd,kEAAkE;YAClE,sDAAsD;YACtD,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC;YAE1C,8DAA8D;YAC9D,MAAM,EAAE,YAAY,EAAE,GAAG,QAAQ,CAAC,WAAW,CAAC,CAAC;YAE/C,sEAAsE;YACtE,0GAA0G;YAC1G,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,YAAY,CAAC,CAAC;YAE5D,kDAAkD;YAClD,MAAM,QAAQ,GAAc,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,KAAK,EAAE,EAAE,CAC3D,oBAAoB,CAAC,IAAI,CAAC,GAAG,EAAE,KAAK,EAAE,gBAAgB,CAAC,CACxD,CAAC;YAEF,OAAO;gBACL,GAAG,OAAO;gBACV,QAAQ;aACT,CAAC;QACJ,CAAC;QACD,KAAK,OAAO,CAAC;QACb,KAAK,WAAW;YACd,OAAO;gBACL,GAAG,OAAO;gBACV,QAAQ,EAAE,mBAAmB,CAAC,IAAI,CAAC,OAAO,CAAC,OAAO,CAAC;aACpD,CAAC;QACJ,KAAK,QAAQ;YACX,OAAO;gBACL,GAAG,OA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AM;gBACT,IAAI,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,MAAM,EAAE,CAAC;oBAC7B,iBAAiB;oBACjB,MAAM,CAAC,IAAI,CAAC;wBACV,IAAI,EAAE,UAAU;wBAChB,EAAE,EAAE,IAAI,CAAC,MAAM;wBACf,IAAI,EAAE,IAAI,CAAC,IAAI;wBACf,KAAK,EAAE,IAAI,CAAC,KAAK,EAAE,KAAK,IAAI,EAAE;qBAC/B,CAAC,CAAC;oBAEH,+CAA+C;oBAC/C,IAAI,IAAI,CAAC,KAAK,EAAE,MAAM,KAAK,WAAW,EAAE,CAAC;wBACvC,MAAM,aAAa,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK;4BACpC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK;4BAClB,CAAC,CAAC,OAAO,IAAI,CAAC,KAAK,CAAC,MAAM,KAAK,QAAQ;gCACrC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM;gCACnB,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC;wBAE9C,MAAM,CAAC,IAAI,CAAC;4BACV,IAAI,EAAE,aAAa;4BACnB,WAAW,EAAE,IAAI,CAAC,MAAM;4BACxB,OAAO,EAAE,aAAa;4BACtB,QAAQ,EAAE,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK;yBAC7B,CAAC,CAAC;oBACL,CAAC;gBACH,CAAC;gBACD,MAAM;YAER,0DAA0D;YAC1D,KAAK,YAAY,CAAC;YAClB,KAAK,aAAa;gBAChB,MAAM;YAER;gBACE,2BAA2B;gBAC3B,MAAM;QACV,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
import { type UrlProjectId } from "@yep-anywhere/shared";
|
|
2
|
+
import type { Message, SessionSummary } from "../supervisor/types.js";
|
|
3
|
+
import type { GetSessionOptions, ISessionReader, LoadedSession } from "./types.js";
|
|
4
|
+
/** Default OpenCode storage directory */
|
|
5
|
+
export declare const OPENCODE_STORAGE_DIR: string;
|
|
6
|
+
/**
|
|
7
|
+
* OpenCode storage directory structure:
|
|
8
|
+
* ~/.local/share/opencode/storage/
|
|
9
|
+
* project/{projectId}.json - Project metadata
|
|
10
|
+
* session/{projectId}/{sessionId}.json - Session metadata
|
|
11
|
+
* message/{sessionId}/{messageId}.json - Message metadata
|
|
12
|
+
* part/{messageId}/{partId}.json - Message parts (text, tool-use, tool-result)
|
|
13
|
+
*/
|
|
14
|
+
export interface OpenCodeSessionReaderOptions {
|
|
15
|
+
/** Base storage directory (e.g., ~/.local/share/opencode/storage) */
|
|
16
|
+
storageDir?: string;
|
|
17
|
+
/** Project path (used to look up the OpenCode project ID) */
|
|
18
|
+
projectPath: string;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Find the OpenCode project ID for a given project path by scanning project files.
|
|
22
|
+
*
|
|
23
|
+
* OpenCode uses an opaque hash as project ID. This function reads all project
|
|
24
|
+
* JSON files and returns the ID whose worktree matches the given path.
|
|
25
|
+
*
|
|
26
|
+
* @param projectPath - The absolute path to the project directory
|
|
27
|
+
* @param storageDir - The OpenCode storage directory (default: ~/.local/share/opencode/storage)
|
|
28
|
+
* @returns The OpenCode project ID, or null if not found
|
|
29
|
+
*/
|
|
30
|
+
export declare function findOpenCodeProjectId(projectPath: string, storageDir?: string): Promise<string | null>;
|
|
31
|
+
/**
|
|
32
|
+
* OpenCode-specific session reader for OpenCode's file-based storage.
|
|
33
|
+
*
|
|
34
|
+
* OpenCode stores sessions in a directory structure rather than JSONL files:
|
|
35
|
+
* - Project info in project/{id}.json
|
|
36
|
+
* - Sessions in session/{projectId}/{sessionId}.json
|
|
37
|
+
* - Messages in message/{sessionId}/{messageId}.json
|
|
38
|
+
* - Parts (content) in part/{messageId}/{partId}.json
|
|
39
|
+
*/
|
|
40
|
+
export declare class OpenCodeSessionReader implements ISessionReader {
|
|
41
|
+
private storageDir;
|
|
42
|
+
private projectPath;
|
|
43
|
+
private openCodeProjectIdCache;
|
|
44
|
+
constructor(options: OpenCodeSessionReaderOptions);
|
|
45
|
+
/**
|
|
46
|
+
* Get the OpenCode project ID, looking it up lazily from storage.
|
|
47
|
+
* Returns null if no OpenCode project exists for this path.
|
|
48
|
+
*/
|
|
49
|
+
private getOpenCodeProjectId;
|
|
50
|
+
listSessions(projectId: UrlProjectId): Promise<SessionSummary[]>;
|
|
51
|
+
getSessionSummary(sessionId: string, projectId: UrlProjectId): Promise<SessionSummary | null>;
|
|
52
|
+
getSession(sessionId: string, projectId: UrlProjectId, afterMessageId?: string, _options?: GetSessionOptions): Promise<LoadedSession | null>;
|
|
53
|
+
getSessionSummaryIfChanged(sessionId: string, projectId: UrlProjectId, cachedMtime: number, cachedSize: number): Promise<{
|
|
54
|
+
summary: SessionSummary;
|
|
55
|
+
mtime: number;
|
|
56
|
+
size: number;
|
|
57
|
+
} | null>;
|
|
58
|
+
/**
|
|
59
|
+
* OpenCode doesn't have agent sessions like Claude's Task tool.
|
|
60
|
+
* Return empty array.
|
|
61
|
+
*/
|
|
62
|
+
getAgentMappings(): Promise<{
|
|
63
|
+
toolUseId: string;
|
|
64
|
+
agentId: string;
|
|
65
|
+
}[]>;
|
|
66
|
+
/**
|
|
67
|
+
* OpenCode doesn't have agent sessions like Claude's Task tool.
|
|
68
|
+
* Return null.
|
|
69
|
+
*/
|
|
70
|
+
getAgentSession(_agentId: string): Promise<{
|
|
71
|
+
messages: Message[];
|
|
72
|
+
status: string;
|
|
73
|
+
} | null>;
|
|
74
|
+
/**
|
|
75
|
+
* Load all messages for a session, optionally after a specific message ID.
|
|
76
|
+
*/
|
|
77
|
+
private loadSessionMessages;
|
|
78
|
+
/**
|
|
79
|
+
* Load a single message with its parts as an OpenCodeSessionEntry.
|
|
80
|
+
*/
|
|
81
|
+
private loadMessageEntry;
|
|
82
|
+
/**
|
|
83
|
+
* Load all parts for a message.
|
|
84
|
+
*/
|
|
85
|
+
private loadMessageParts;
|
|
86
|
+
/**
|
|
87
|
+
* Get the text content of a message by loading its parts.
|
|
88
|
+
*/
|
|
89
|
+
private getMessageText;
|
|
90
|
+
/**
|
|
91
|
+
* Extract context usage from the last assistant message's tokens.
|
|
92
|
+
*/
|
|
93
|
+
private extractContextUsage;
|
|
94
|
+
/**
|
|
95
|
+
* Truncate title to max length.
|
|
96
|
+
*/
|
|
97
|
+
private truncateTitle;
|
|
98
|
+
}
|
|
99
|
+
//# sourceMappingURL=opencode-reader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"opencode-reader.d.ts","sourceRoot":"","sources":["../../src/sessions/opencode-reader.ts"],"names":[],"mappings":"AAGA,OAAO,EAKL,KAAK,YAAY,EAClB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAEV,OAAO,EACP,cAAc,EACf,MAAM,wBAAwB,CAAC;AAChC,OAAO,KAAK,EACV,iBAAiB,EACjB,cAAc,EACd,aAAa,EACd,MAAM,YAAY,CAAC;AAKpB,yCAAyC;AACzC,eAAO,MAAM,oBAAoB,QAMhC,CAAC;AAEF;;;;;;;GAOG;AAEH,MAAM,WAAW,4BAA4B;IAC3C,qEAAqE;IACrE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6DAA6D;IAC7D,WAAW,EAAE,MAAM,CAAC;CACrB;AAkCD;;;;;;;;;GASG;AACH,wBAAsB,qBAAqB,CACzC,WAAW,EAAE,MAAM,EACnB,UAAU,GAAE,MAA6B,GACxC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAyBxB;AAED;;;;;;;;GAQG;AACH,qBAAa,qBAAsB,YAAW,cAAc;IAC1D,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,WAAW,CAAS;IAC5B,OAAO,CAAC,sBAAsB,CAAwC;gBAE1D,OAAO,EAAE,4BAA4B;IAKjD;;;OAGG;YACW,oBAAoB;I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