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,282 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session file schemas for Codex CLI.
|
|
3
|
+
*
|
|
4
|
+
* Codex persists sessions to ~/.codex/sessions/ as JSONL files.
|
|
5
|
+
* Each line is a JSON object with timestamp, type, and payload.
|
|
6
|
+
*
|
|
7
|
+
* This is DIFFERENT from the streaming output format (events.ts).
|
|
8
|
+
* Session files use a wrapper format with explicit payload nesting.
|
|
9
|
+
*
|
|
10
|
+
* Event types in session files:
|
|
11
|
+
* - session_meta: Session initialization metadata
|
|
12
|
+
* - response_item: Message content (user, assistant, reasoning, function calls)
|
|
13
|
+
* - event_msg: Event notifications (user_message, agent_message, token_count, etc.)
|
|
14
|
+
* - turn_context: Per-turn context (cwd, approval policy, model, etc.)
|
|
15
|
+
*/
|
|
16
|
+
import { z } from "zod";
|
|
17
|
+
// =============================================================================
|
|
18
|
+
// Session Metadata
|
|
19
|
+
// =============================================================================
|
|
20
|
+
/**
|
|
21
|
+
* Session metadata payload - first entry in session file.
|
|
22
|
+
*/
|
|
23
|
+
export const CodexSessionMetaPayloadSchema = z.object({
|
|
24
|
+
id: z.string(),
|
|
25
|
+
timestamp: z.string(),
|
|
26
|
+
cwd: z.string(),
|
|
27
|
+
originator: z.string().optional(), // e.g. "codex_exec"
|
|
28
|
+
cli_version: z.string().optional(),
|
|
29
|
+
instructions: z.string().optional(),
|
|
30
|
+
source: z.string().optional(), // e.g. "exec"
|
|
31
|
+
model_provider: z.string().optional(), // e.g. "openai"
|
|
32
|
+
});
|
|
33
|
+
export const CodexSessionMetaEntrySchema = z.object({
|
|
34
|
+
timestamp: z.string(),
|
|
35
|
+
type: z.literal("session_meta"),
|
|
36
|
+
payload: CodexSessionMetaPayloadSchema,
|
|
37
|
+
});
|
|
38
|
+
// =============================================================================
|
|
39
|
+
// Response Item - Messages and Content
|
|
40
|
+
// =============================================================================
|
|
41
|
+
/**
|
|
42
|
+
* Input text content block in user messages.
|
|
43
|
+
*/
|
|
44
|
+
export const CodexInputTextContentSchema = z.object({
|
|
45
|
+
type: z.literal("input_text"),
|
|
46
|
+
text: z.string(),
|
|
47
|
+
});
|
|
48
|
+
/**
|
|
49
|
+
* Output text content block in assistant messages.
|
|
50
|
+
*/
|
|
51
|
+
export const CodexOutputTextContentSchema = z.object({
|
|
52
|
+
type: z.literal("output_text"),
|
|
53
|
+
text: z.string(),
|
|
54
|
+
});
|
|
55
|
+
/**
|
|
56
|
+
* User or assistant message payload.
|
|
57
|
+
*/
|
|
58
|
+
export const CodexMessagePayloadSchema = z.object({
|
|
59
|
+
type: z.literal("message"),
|
|
60
|
+
role: z.enum(["user", "assistant"]),
|
|
61
|
+
content: z.array(z.union([CodexInputTextContentSchema, CodexOutputTextContentSchema])),
|
|
62
|
+
});
|
|
63
|
+
/**
|
|
64
|
+
* Reasoning summary block.
|
|
65
|
+
*/
|
|
66
|
+
export const CodexSummaryTextSchema = z.object({
|
|
67
|
+
type: z.literal("summary_text"),
|
|
68
|
+
text: z.string(),
|
|
69
|
+
});
|
|
70
|
+
/**
|
|
71
|
+
* Reasoning payload (chain-of-thought, may be encrypted).
|
|
72
|
+
*/
|
|
73
|
+
export const CodexReasoningPayloadSchema = z.object({
|
|
74
|
+
type: z.literal("reasoning"),
|
|
75
|
+
summary: z.array(CodexSummaryTextSchema).optional(),
|
|
76
|
+
content: z.unknown().nullable().optional(), // Raw content if available
|
|
77
|
+
encrypted_content: z.string().optional(), // Encrypted reasoning
|
|
78
|
+
});
|
|
79
|
+
/**
|
|
80
|
+
* Function call payload.
|
|
81
|
+
*/
|
|
82
|
+
export const CodexFunctionCallPayloadSchema = z.object({
|
|
83
|
+
type: z.literal("function_call"),
|
|
84
|
+
name: z.string(),
|
|
85
|
+
arguments: z.string(), // JSON string
|
|
86
|
+
call_id: z.string(),
|
|
87
|
+
});
|
|
88
|
+
/**
|
|
89
|
+
* Function call output payload.
|
|
90
|
+
*/
|
|
91
|
+
export const CodexFunctionCallOutputPayloadSchema = z.object({
|
|
92
|
+
type: z.literal("function_call_output"),
|
|
93
|
+
call_id: z.string(),
|
|
94
|
+
output: z.string(),
|
|
95
|
+
});
|
|
96
|
+
/**
|
|
97
|
+
* Ghost commit snapshot for git state tracking.
|
|
98
|
+
*/
|
|
99
|
+
export const CodexGhostSnapshotPayloadSchema = z.object({
|
|
100
|
+
type: z.literal("ghost_snapshot"),
|
|
101
|
+
ghost_commit: z.object({
|
|
102
|
+
id: z.string(),
|
|
103
|
+
parent: z.string(),
|
|
104
|
+
preexisting_untracked_files: z.array(z.string()).optional(),
|
|
105
|
+
preexisting_untracked_dirs: z.array(z.string()).optional(),
|
|
106
|
+
}),
|
|
107
|
+
});
|
|
108
|
+
/**
|
|
109
|
+
* Union of all response item payload types.
|
|
110
|
+
*/
|
|
111
|
+
export const CodexResponseItemPayloadSchema = z.discriminatedUnion("type", [
|
|
112
|
+
CodexMessagePayloadSchema,
|
|
113
|
+
CodexReasoningPayloadSchema,
|
|
114
|
+
CodexFunctionCallPayloadSchema,
|
|
115
|
+
CodexFunctionCallOutputPayloadSchema,
|
|
116
|
+
CodexGhostSnapshotPayloadSchema,
|
|
117
|
+
]);
|
|
118
|
+
export const CodexResponseItemEntrySchema = z.object({
|
|
119
|
+
timestamp: z.string(),
|
|
120
|
+
type: z.literal("response_item"),
|
|
121
|
+
payload: CodexResponseItemPayloadSchema,
|
|
122
|
+
});
|
|
123
|
+
// =============================================================================
|
|
124
|
+
// Event Messages
|
|
125
|
+
// =============================================================================
|
|
126
|
+
/**
|
|
127
|
+
* Rate limit info.
|
|
128
|
+
*/
|
|
129
|
+
export const CodexRateLimitsSchema = z.object({
|
|
130
|
+
primary: z
|
|
131
|
+
.object({
|
|
132
|
+
used_percent: z.number(),
|
|
133
|
+
window_minutes: z.number(),
|
|
134
|
+
resets_at: z.number(),
|
|
135
|
+
})
|
|
136
|
+
.optional(),
|
|
137
|
+
secondary: z
|
|
138
|
+
.object({
|
|
139
|
+
used_percent: z.number(),
|
|
140
|
+
window_minutes: z.number(),
|
|
141
|
+
resets_at: z.number(),
|
|
142
|
+
})
|
|
143
|
+
.optional(),
|
|
144
|
+
credits: z
|
|
145
|
+
.object({
|
|
146
|
+
has_credits: z.boolean(),
|
|
147
|
+
unlimited: z.boolean(),
|
|
148
|
+
balance: z.unknown().nullable(),
|
|
149
|
+
})
|
|
150
|
+
.optional(),
|
|
151
|
+
plan_type: z.string().nullable().optional(),
|
|
152
|
+
});
|
|
153
|
+
/**
|
|
154
|
+
* Token usage info.
|
|
155
|
+
*/
|
|
156
|
+
export const CodexTokenUsageInfoSchema = z.object({
|
|
157
|
+
total_token_usage: z
|
|
158
|
+
.object({
|
|
159
|
+
input_tokens: z.number(),
|
|
160
|
+
cached_input_tokens: z.number().optional(),
|
|
161
|
+
output_tokens: z.number(),
|
|
162
|
+
reasoning_output_tokens: z.number().optional(),
|
|
163
|
+
total_tokens: z.number(),
|
|
164
|
+
})
|
|
165
|
+
.optional(),
|
|
166
|
+
last_token_usage: z
|
|
167
|
+
.object({
|
|
168
|
+
input_tokens: z.number(),
|
|
169
|
+
cached_input_tokens: z.number().optional(),
|
|
170
|
+
output_tokens: z.number(),
|
|
171
|
+
reasoning_output_tokens: z.number().optional(),
|
|
172
|
+
total_tokens: z.number(),
|
|
173
|
+
})
|
|
174
|
+
.optional(),
|
|
175
|
+
model_context_window: z.number().optional(),
|
|
176
|
+
});
|
|
177
|
+
/**
|
|
178
|
+
* User message event.
|
|
179
|
+
*/
|
|
180
|
+
export const CodexUserMessageEventSchema = z.object({
|
|
181
|
+
type: z.literal("user_message"),
|
|
182
|
+
message: z.string(),
|
|
183
|
+
images: z.array(z.unknown()).optional(),
|
|
184
|
+
});
|
|
185
|
+
/**
|
|
186
|
+
* Agent message event.
|
|
187
|
+
*/
|
|
188
|
+
export const CodexAgentMessageEventSchema = z.object({
|
|
189
|
+
type: z.literal("agent_message"),
|
|
190
|
+
message: z.string(),
|
|
191
|
+
});
|
|
192
|
+
/**
|
|
193
|
+
* Agent reasoning event (summary of thinking).
|
|
194
|
+
*/
|
|
195
|
+
export const CodexAgentReasoningEventSchema = z.object({
|
|
196
|
+
type: z.literal("agent_reasoning"),
|
|
197
|
+
text: z.string(),
|
|
198
|
+
});
|
|
199
|
+
/**
|
|
200
|
+
* Token count event.
|
|
201
|
+
*/
|
|
202
|
+
export const CodexTokenCountEventSchema = z.object({
|
|
203
|
+
type: z.literal("token_count"),
|
|
204
|
+
info: CodexTokenUsageInfoSchema.nullable(),
|
|
205
|
+
rate_limits: CodexRateLimitsSchema.optional(),
|
|
206
|
+
});
|
|
207
|
+
/**
|
|
208
|
+
* Union of event message types.
|
|
209
|
+
*/
|
|
210
|
+
export const CodexEventMsgPayloadSchema = z.discriminatedUnion("type", [
|
|
211
|
+
CodexUserMessageEventSchema,
|
|
212
|
+
CodexAgentMessageEventSchema,
|
|
213
|
+
CodexAgentReasoningEventSchema,
|
|
214
|
+
CodexTokenCountEventSchema,
|
|
215
|
+
]);
|
|
216
|
+
export const CodexEventMsgEntrySchema = z.object({
|
|
217
|
+
timestamp: z.string(),
|
|
218
|
+
type: z.literal("event_msg"),
|
|
219
|
+
payload: CodexEventMsgPayloadSchema,
|
|
220
|
+
});
|
|
221
|
+
// =============================================================================
|
|
222
|
+
// Turn Context
|
|
223
|
+
// =============================================================================
|
|
224
|
+
/**
|
|
225
|
+
* Sandbox policy configuration.
|
|
226
|
+
*/
|
|
227
|
+
export const CodexSandboxPolicySchema = z.object({
|
|
228
|
+
type: z.string(),
|
|
229
|
+
network_access: z.boolean().optional(),
|
|
230
|
+
exclude_tmpdir_env_var: z.boolean().optional(),
|
|
231
|
+
exclude_slash_tmp: z.boolean().optional(),
|
|
232
|
+
});
|
|
233
|
+
/**
|
|
234
|
+
* Turn context payload - sent at the start/end of turns.
|
|
235
|
+
*/
|
|
236
|
+
export const CodexTurnContextPayloadSchema = z.object({
|
|
237
|
+
cwd: z.string(),
|
|
238
|
+
approval_policy: z.string(),
|
|
239
|
+
sandbox_policy: CodexSandboxPolicySchema.optional(),
|
|
240
|
+
model: z.string().optional(),
|
|
241
|
+
summary: z.string().optional(),
|
|
242
|
+
});
|
|
243
|
+
export const CodexTurnContextEntrySchema = z.object({
|
|
244
|
+
timestamp: z.string(),
|
|
245
|
+
type: z.literal("turn_context"),
|
|
246
|
+
payload: CodexTurnContextPayloadSchema,
|
|
247
|
+
});
|
|
248
|
+
// =============================================================================
|
|
249
|
+
// Session Entry Union
|
|
250
|
+
// =============================================================================
|
|
251
|
+
/**
|
|
252
|
+
* Union of all session file entry types.
|
|
253
|
+
* Use this for parsing individual JSONL lines from ~/.codex/sessions/.
|
|
254
|
+
*/
|
|
255
|
+
export const CodexSessionEntrySchema = z.discriminatedUnion("type", [
|
|
256
|
+
CodexSessionMetaEntrySchema,
|
|
257
|
+
CodexResponseItemEntrySchema,
|
|
258
|
+
CodexEventMsgEntrySchema,
|
|
259
|
+
CodexTurnContextEntrySchema,
|
|
260
|
+
]);
|
|
261
|
+
/**
|
|
262
|
+
* Parse a JSONL line from a Codex session file.
|
|
263
|
+
* Returns null if parsing fails.
|
|
264
|
+
*/
|
|
265
|
+
export function parseCodexSessionEntry(line) {
|
|
266
|
+
try {
|
|
267
|
+
const json = JSON.parse(line);
|
|
268
|
+
const result = CodexSessionEntrySchema.safeParse(json);
|
|
269
|
+
if (result.success) {
|
|
270
|
+
return result.data;
|
|
271
|
+
}
|
|
272
|
+
// Return raw JSON for forward compatibility with unknown types
|
|
273
|
+
if (json && typeof json === "object" && "type" in json) {
|
|
274
|
+
return json;
|
|
275
|
+
}
|
|
276
|
+
return null;
|
|
277
|
+
}
|
|
278
|
+
catch {
|
|
279
|
+
return null;
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
//# sourceMappingURL=session.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.js","sourceRoot":"","sources":["../../src/codex-schema/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B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,CAAC,CAAC,kBAAkB,CAAC,MAAM,EAAE;IAClE,2BAA2B;IAC3B,4BAA4B;IAC5B,wBAAwB;IACxB,2BAA2B;CAC5B,CAAC,CAAC;AAIH;;;GAGG;AACH,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAC9B,MAAM,MAAM,GAAG,uBAAuB,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;QACvD,IAAI,MAAM,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,MAAM,CAAC,IAAI,CAAC;QACrB,CAAC;QACD,+DAA+D;QAC/D,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,MAAM,IAAI,IAAI,EAAE,CAAC;YACvD,OAAO,IAAyB,CAAC;QACnC,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Type-only exports for Codex schema.
|
|
3
|
+
* Import from here to avoid pulling in Zod runtime.
|
|
4
|
+
*/
|
|
5
|
+
export type { CodexTextContent, CodexToolUseContent, CodexToolResultContent, CodexReasoningContent, CodexContentBlock, CodexMessageContent, } from "./content.js";
|
|
6
|
+
export type { CodexSessionMetaPayload, CodexSessionMetaEntry, CodexMessagePayload, CodexReasoningPayload, CodexFunctionCallPayload, CodexFunctionCallOutputPayload, CodexGhostSnapshotPayload, CodexResponseItemPayload, CodexResponseItemEntry, CodexEventMsgPayload, CodexEventMsgEntry, CodexTurnContextPayload, CodexTurnContextEntry, CodexSessionEntry, } from "./session.js";
|
|
7
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/codex-schema/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,YAAY,EACV,gBAAgB,EAChB,mBAAmB,EACnB,sBAAsB,EACtB,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,GACpB,MAAM,cAAc,CAAC;AAGtB,YAAY,EACV,uBAAuB,EACvB,qBAAqB,EACrB,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,8BAA8B,EAC9B,yBAAyB,EACzB,wBAAwB,EACxB,sBAAsB,EACtB,oBAAoB,EACpB,kBAAkB,EAClB,uBAAuB,EACvB,qBAAqB,EACrB,iBAAiB,GAClB,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/codex-schema/types.ts"],"names":[],"mappings":"AAAA;;;GAGG"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DAG (Directed Acyclic Graph) utilities for parent chain ordering.
|
|
3
|
+
*
|
|
4
|
+
* Messages form a chain via parentUuid: root (null) → ... → tip
|
|
5
|
+
* These utilities help reorder messages when they arrive out of order
|
|
6
|
+
* (e.g., due to race conditions between SSE and JSONL loading).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Interface for items that can be ordered by parent chain.
|
|
10
|
+
* Items must have at least one of `uuid` or `id` for identification.
|
|
11
|
+
*/
|
|
12
|
+
export interface DagOrderable {
|
|
13
|
+
uuid?: string;
|
|
14
|
+
id?: string;
|
|
15
|
+
parentUuid?: string | null;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* Check if items need reordering by verifying each item's parent
|
|
19
|
+
* appears before it in the list. O(n) with just Set operations.
|
|
20
|
+
*
|
|
21
|
+
* @returns true if reordering is needed, false if already correctly ordered
|
|
22
|
+
*/
|
|
23
|
+
export declare function needsReorder<T extends DagOrderable>(items: T[]): boolean;
|
|
24
|
+
/**
|
|
25
|
+
* Order items by walking the parentUuid chain.
|
|
26
|
+
* Items form a chain: root (parentUuid=null) → ... → tip
|
|
27
|
+
*
|
|
28
|
+
* Performance:
|
|
29
|
+
* - Early bailout via needsReorder() check - O(n) with Set operations only
|
|
30
|
+
* - Full reorder only when needed (race condition): O(n) with Map building
|
|
31
|
+
*
|
|
32
|
+
* Items without parentUuid or not connected to the chain are appended at the end.
|
|
33
|
+
*/
|
|
34
|
+
export declare function orderByParentChain<T extends DagOrderable>(items: T[]): T[];
|
|
35
|
+
//# sourceMappingURL=dag.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dag.d.ts","sourceRoot":"","sources":["../src/dag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,UAAU,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC5B;AASD;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,OAAO,CASxE;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,CAAC,EAAE,CAqC1E"}
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* DAG (Directed Acyclic Graph) utilities for parent chain ordering.
|
|
3
|
+
*
|
|
4
|
+
* Messages form a chain via parentUuid: root (null) → ... → tip
|
|
5
|
+
* These utilities help reorder messages when they arrive out of order
|
|
6
|
+
* (e.g., due to race conditions between SSE and JSONL loading).
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Get the canonical ID for a DagOrderable item, preferring uuid over id.
|
|
10
|
+
*/
|
|
11
|
+
function getDagId(item) {
|
|
12
|
+
return item.uuid ?? item.id ?? "";
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Check if items need reordering by verifying each item's parent
|
|
16
|
+
* appears before it in the list. O(n) with just Set operations.
|
|
17
|
+
*
|
|
18
|
+
* @returns true if reordering is needed, false if already correctly ordered
|
|
19
|
+
*/
|
|
20
|
+
export function needsReorder(items) {
|
|
21
|
+
const seen = new Set();
|
|
22
|
+
for (const item of items) {
|
|
23
|
+
if (item.parentUuid && !seen.has(item.parentUuid)) {
|
|
24
|
+
return true;
|
|
25
|
+
}
|
|
26
|
+
seen.add(getDagId(item));
|
|
27
|
+
}
|
|
28
|
+
return false;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Order items by walking the parentUuid chain.
|
|
32
|
+
* Items form a chain: root (parentUuid=null) → ... → tip
|
|
33
|
+
*
|
|
34
|
+
* Performance:
|
|
35
|
+
* - Early bailout via needsReorder() check - O(n) with Set operations only
|
|
36
|
+
* - Full reorder only when needed (race condition): O(n) with Map building
|
|
37
|
+
*
|
|
38
|
+
* Items without parentUuid or not connected to the chain are appended at the end.
|
|
39
|
+
*/
|
|
40
|
+
export function orderByParentChain(items) {
|
|
41
|
+
if (items.length <= 1)
|
|
42
|
+
return items;
|
|
43
|
+
if (!needsReorder(items))
|
|
44
|
+
return items;
|
|
45
|
+
// Build parent→children map
|
|
46
|
+
const children = new Map();
|
|
47
|
+
for (const item of items) {
|
|
48
|
+
const parentKey = item.parentUuid ?? null;
|
|
49
|
+
const siblings = children.get(parentKey) ?? [];
|
|
50
|
+
siblings.push(item);
|
|
51
|
+
children.set(parentKey, siblings);
|
|
52
|
+
}
|
|
53
|
+
// Walk from roots, building ordered result
|
|
54
|
+
const result = [];
|
|
55
|
+
const visited = new Set();
|
|
56
|
+
function visit(parentId) {
|
|
57
|
+
for (const item of children.get(parentId) ?? []) {
|
|
58
|
+
const itemId = getDagId(item);
|
|
59
|
+
if (visited.has(itemId))
|
|
60
|
+
continue;
|
|
61
|
+
visited.add(itemId);
|
|
62
|
+
result.push(item);
|
|
63
|
+
visit(itemId);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
visit(null);
|
|
67
|
+
// Append unvisited items (those not in the parentUuid chain)
|
|
68
|
+
for (const item of items) {
|
|
69
|
+
if (!visited.has(getDagId(item))) {
|
|
70
|
+
result.push(item);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return result;
|
|
74
|
+
}
|
|
75
|
+
//# sourceMappingURL=dag.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dag.js","sourceRoot":"","sources":["../src/dag.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAYH;;GAEG;AACH,SAAS,QAAQ,CAAC,IAAkB;IAClC,OAAO,IAAI,CAAC,IAAI,IAAI,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC;AACpC,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,YAAY,CAAyB,KAAU;IAC7D,MAAM,IAAI,GAAG,IAAI,GAAG,EAAU,CAAC;IAC/B,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,IAAI,CAAC,UAAU,IAAI,CAAC,IAAI,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE,CAAC;YAClD,OAAO,IAAI,CAAC;QACd,CAAC;QACD,IAAI,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,CAAC;IAC3B,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAAyB,KAAU;IACnE,IAAI,KAAK,CAAC,MAAM,IAAI,CAAC;QAAE,OAAO,KAAK,CAAC;IACpC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IAEvC,4BAA4B;IAC5B,MAAM,QAAQ,GAAG,IAAI,GAAG,EAAsB,CAAC;IAC/C,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,IAAI,IAAI,CAAC;QAC1C,MAAM,QAAQ,GAAG,QAAQ,CAAC,GAAG,CAAC,SAAS,CAAC,IAAI,EAAE,CAAC;QAC/C,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,GAAG,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC;IACpC,CAAC;IAED,2CAA2C;IAC3C,MAAM,MAAM,GAAQ,EAAE,CAAC;IACvB,MAAM,OAAO,GAAG,IAAI,GAAG,EAAU,CAAC;IAElC,SAAS,KAAK,CAAC,QAAuB;QACpC,KAAK,MAAM,IAAI,IAAI,QAAQ,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,EAAE,EAAE,CAAC;YAChD,MAAM,MAAM,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;YAC9B,IAAI,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC;gBAAE,SAAS;YAClC,OAAO,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;YACpB,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YAClB,KAAK,CAAC,MAAM,CAAC,CAAC;QAChB,CAAC;IACH,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,CAAC;IAEZ,6DAA6D;IAC7D,KAAK,MAAM,IAAI,IAAI,KAAK,EAAE,CAAC;QACzB,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,EAAE,CAAC;YACjC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;QACpB,CAAC;IACH,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* File path detection utility.
|
|
3
|
+
*
|
|
4
|
+
* Detects file paths in text and provides functionality to split text into
|
|
5
|
+
* segments that can be rendered with clickable file links.
|
|
6
|
+
*
|
|
7
|
+
* This module is shared between server and client for consistent file path
|
|
8
|
+
* detection in both streaming and reload rendering paths.
|
|
9
|
+
*/
|
|
10
|
+
/**
|
|
11
|
+
* A detected file path with optional line/column information.
|
|
12
|
+
*/
|
|
13
|
+
export interface DetectedFilePath {
|
|
14
|
+
/** The original matched string */
|
|
15
|
+
match: string;
|
|
16
|
+
/** The file path portion (without line/column) */
|
|
17
|
+
filePath: string;
|
|
18
|
+
/** Optional line number */
|
|
19
|
+
lineNumber?: number;
|
|
20
|
+
/** Optional column number */
|
|
21
|
+
columnNumber?: number;
|
|
22
|
+
/** Start index in the original text */
|
|
23
|
+
startIndex: number;
|
|
24
|
+
/** End index in the original text */
|
|
25
|
+
endIndex: number;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* A segment of text that is either plain text or a file path.
|
|
29
|
+
*/
|
|
30
|
+
export type TextSegment = {
|
|
31
|
+
type: "text";
|
|
32
|
+
content: string;
|
|
33
|
+
} | {
|
|
34
|
+
type: "filePath";
|
|
35
|
+
detected: DetectedFilePath;
|
|
36
|
+
};
|
|
37
|
+
/**
|
|
38
|
+
* Check if a string is likely a valid file path.
|
|
39
|
+
*/
|
|
40
|
+
export declare function isLikelyFilePath(str: string): boolean;
|
|
41
|
+
/**
|
|
42
|
+
* Parse line and column numbers from a file path string.
|
|
43
|
+
*/
|
|
44
|
+
export declare function parseLineColumn(str: string): {
|
|
45
|
+
path: string;
|
|
46
|
+
line?: number;
|
|
47
|
+
column?: number;
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Detect file paths in a text string.
|
|
51
|
+
*
|
|
52
|
+
* @param text - The text to search for file paths
|
|
53
|
+
* @returns Array of detected file paths with positions
|
|
54
|
+
*/
|
|
55
|
+
export declare function detectFilePaths(text: string): DetectedFilePath[];
|
|
56
|
+
/**
|
|
57
|
+
* Split text into segments of plain text and file paths.
|
|
58
|
+
*
|
|
59
|
+
* @param text - The text to process
|
|
60
|
+
* @returns Array of text segments
|
|
61
|
+
*/
|
|
62
|
+
export declare function splitTextWithFilePaths(text: string): TextSegment[];
|
|
63
|
+
/**
|
|
64
|
+
* Transform text by replacing file paths with HTML links.
|
|
65
|
+
* Used for server-side rendering of file path links.
|
|
66
|
+
*
|
|
67
|
+
* @param text - The text to process
|
|
68
|
+
* @param escapeHtml - Function to escape HTML in non-link text
|
|
69
|
+
* @returns HTML string with file paths as anchor tags
|
|
70
|
+
*/
|
|
71
|
+
export declare function transformFilePathsToHtml(text: string, escapeHtml: (s: string) => string): string;
|
|
72
|
+
//# sourceMappingURL=filePathDetection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"filePathDetection.d.ts","sourceRoot":"","sources":["../src/filePathDetection.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kCAAkC;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,kDAAkD;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,2BAA2B;IAC3B,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,6BAA6B;IAC7B,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,uCAAuC;IACvC,UAAU,EAAE,MAAM,CAAC;IACnB,qCAAqC;IACrC,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;GAEG;AACH,MAAM,MAAM,WAAW,GACnB;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAA;CAAE,GACjC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,QAAQ,EAAE,gBAAgB,CAAA;CAAE,CAAC;AA6MrD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CA2DrD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,GAAG,EAAE,MAAM,GAAG;IAC5C,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAUA;AAED;;;;;GAKG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,gBAAgB,EAAE,CA4BhE;AAED;;;;;GAKG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,EAAE,CAqClE;AAED;;;;;;;GAOG;AACH,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,CAAC,CAAC,EAAE,MAAM,KAAK,MAAM,GAChC,MAAM,CAyBR"}
|