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,174 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event schemas for Gemini CLI stream-json output.
|
|
3
|
+
*
|
|
4
|
+
* Gemini CLI emits JSON objects with these types:
|
|
5
|
+
* - init: Session initialization with model and session_id
|
|
6
|
+
* - message: User or assistant messages (distinguished by role)
|
|
7
|
+
* - tool_use: Tool invocation
|
|
8
|
+
* - tool_result: Tool execution result
|
|
9
|
+
* - result: Final result with stats
|
|
10
|
+
* - error: Error messages
|
|
11
|
+
*/
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
/**
|
|
14
|
+
* Stats from the result event.
|
|
15
|
+
*/
|
|
16
|
+
export declare const GeminiStatsSchema: z.ZodObject<{
|
|
17
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
18
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
19
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
20
|
+
cached: z.ZodOptional<z.ZodNumber>;
|
|
21
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
22
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
23
|
+
tool_calls: z.ZodOptional<z.ZodNumber>;
|
|
24
|
+
}, z.core.$strip>;
|
|
25
|
+
export type GeminiStats = z.infer<typeof GeminiStatsSchema>;
|
|
26
|
+
/**
|
|
27
|
+
* Init event - session start.
|
|
28
|
+
*/
|
|
29
|
+
export declare const GeminiInitEventSchema: z.ZodObject<{
|
|
30
|
+
type: z.ZodLiteral<"init">;
|
|
31
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
32
|
+
session_id: z.ZodString;
|
|
33
|
+
model: z.ZodOptional<z.ZodString>;
|
|
34
|
+
}, z.core.$strip>;
|
|
35
|
+
export type GeminiInitEvent = z.infer<typeof GeminiInitEventSchema>;
|
|
36
|
+
/**
|
|
37
|
+
* Message event - user or assistant messages.
|
|
38
|
+
*/
|
|
39
|
+
export declare const GeminiMessageEventSchema: z.ZodObject<{
|
|
40
|
+
type: z.ZodLiteral<"message">;
|
|
41
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
42
|
+
role: z.ZodEnum<{
|
|
43
|
+
assistant: "assistant";
|
|
44
|
+
user: "user";
|
|
45
|
+
}>;
|
|
46
|
+
content: z.ZodString;
|
|
47
|
+
delta: z.ZodOptional<z.ZodBoolean>;
|
|
48
|
+
}, z.core.$strip>;
|
|
49
|
+
export type GeminiMessageEvent = z.infer<typeof GeminiMessageEventSchema>;
|
|
50
|
+
/**
|
|
51
|
+
* Tool use event - tool invocation.
|
|
52
|
+
*/
|
|
53
|
+
export declare const GeminiToolUseEventSchema: z.ZodObject<{
|
|
54
|
+
type: z.ZodLiteral<"tool_use">;
|
|
55
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
56
|
+
tool_name: z.ZodString;
|
|
57
|
+
tool_id: z.ZodString;
|
|
58
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
59
|
+
}, z.core.$strip>;
|
|
60
|
+
export type GeminiToolUseEvent = z.infer<typeof GeminiToolUseEventSchema>;
|
|
61
|
+
/**
|
|
62
|
+
* Tool result event - tool execution result.
|
|
63
|
+
*/
|
|
64
|
+
export declare const GeminiToolResultEventSchema: z.ZodObject<{
|
|
65
|
+
type: z.ZodLiteral<"tool_result">;
|
|
66
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
67
|
+
tool_id: z.ZodString;
|
|
68
|
+
status: z.ZodEnum<{
|
|
69
|
+
success: "success";
|
|
70
|
+
error: "error";
|
|
71
|
+
}>;
|
|
72
|
+
output: z.ZodOptional<z.ZodString>;
|
|
73
|
+
error: z.ZodOptional<z.ZodString>;
|
|
74
|
+
}, z.core.$strip>;
|
|
75
|
+
export type GeminiToolResultEvent = z.infer<typeof GeminiToolResultEventSchema>;
|
|
76
|
+
/**
|
|
77
|
+
* Result event - final result with stats.
|
|
78
|
+
*/
|
|
79
|
+
export declare const GeminiResultEventSchema: z.ZodObject<{
|
|
80
|
+
type: z.ZodLiteral<"result">;
|
|
81
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
82
|
+
status: z.ZodEnum<{
|
|
83
|
+
success: "success";
|
|
84
|
+
error: "error";
|
|
85
|
+
cancelled: "cancelled";
|
|
86
|
+
}>;
|
|
87
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
88
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
90
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
91
|
+
cached: z.ZodOptional<z.ZodNumber>;
|
|
92
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
93
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
94
|
+
tool_calls: z.ZodOptional<z.ZodNumber>;
|
|
95
|
+
}, z.core.$strip>>;
|
|
96
|
+
error: z.ZodOptional<z.ZodString>;
|
|
97
|
+
}, z.core.$strip>;
|
|
98
|
+
export type GeminiResultEvent = z.infer<typeof GeminiResultEventSchema>;
|
|
99
|
+
/**
|
|
100
|
+
* Error event.
|
|
101
|
+
*/
|
|
102
|
+
export declare const GeminiErrorEventSchema: z.ZodObject<{
|
|
103
|
+
type: z.ZodLiteral<"error">;
|
|
104
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
105
|
+
error: z.ZodOptional<z.ZodString>;
|
|
106
|
+
message: z.ZodOptional<z.ZodString>;
|
|
107
|
+
code: z.ZodOptional<z.ZodString>;
|
|
108
|
+
}, z.core.$strip>;
|
|
109
|
+
export type GeminiErrorEvent = z.infer<typeof GeminiErrorEventSchema>;
|
|
110
|
+
/**
|
|
111
|
+
* Union of all Gemini event types.
|
|
112
|
+
*/
|
|
113
|
+
export declare const GeminiEventSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
114
|
+
type: z.ZodLiteral<"init">;
|
|
115
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
116
|
+
session_id: z.ZodString;
|
|
117
|
+
model: z.ZodOptional<z.ZodString>;
|
|
118
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
119
|
+
type: z.ZodLiteral<"message">;
|
|
120
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
121
|
+
role: z.ZodEnum<{
|
|
122
|
+
assistant: "assistant";
|
|
123
|
+
user: "user";
|
|
124
|
+
}>;
|
|
125
|
+
content: z.ZodString;
|
|
126
|
+
delta: z.ZodOptional<z.ZodBoolean>;
|
|
127
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
128
|
+
type: z.ZodLiteral<"tool_use">;
|
|
129
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
130
|
+
tool_name: z.ZodString;
|
|
131
|
+
tool_id: z.ZodString;
|
|
132
|
+
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
|
|
133
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
134
|
+
type: z.ZodLiteral<"tool_result">;
|
|
135
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
136
|
+
tool_id: z.ZodString;
|
|
137
|
+
status: z.ZodEnum<{
|
|
138
|
+
success: "success";
|
|
139
|
+
error: "error";
|
|
140
|
+
}>;
|
|
141
|
+
output: z.ZodOptional<z.ZodString>;
|
|
142
|
+
error: z.ZodOptional<z.ZodString>;
|
|
143
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
144
|
+
type: z.ZodLiteral<"result">;
|
|
145
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
146
|
+
status: z.ZodEnum<{
|
|
147
|
+
success: "success";
|
|
148
|
+
error: "error";
|
|
149
|
+
cancelled: "cancelled";
|
|
150
|
+
}>;
|
|
151
|
+
stats: z.ZodOptional<z.ZodObject<{
|
|
152
|
+
total_tokens: z.ZodOptional<z.ZodNumber>;
|
|
153
|
+
input_tokens: z.ZodOptional<z.ZodNumber>;
|
|
154
|
+
output_tokens: z.ZodOptional<z.ZodNumber>;
|
|
155
|
+
cached: z.ZodOptional<z.ZodNumber>;
|
|
156
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
157
|
+
duration_ms: z.ZodOptional<z.ZodNumber>;
|
|
158
|
+
tool_calls: z.ZodOptional<z.ZodNumber>;
|
|
159
|
+
}, z.core.$strip>>;
|
|
160
|
+
error: z.ZodOptional<z.ZodString>;
|
|
161
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
162
|
+
type: z.ZodLiteral<"error">;
|
|
163
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
164
|
+
error: z.ZodOptional<z.ZodString>;
|
|
165
|
+
message: z.ZodOptional<z.ZodString>;
|
|
166
|
+
code: z.ZodOptional<z.ZodString>;
|
|
167
|
+
}, z.core.$strip>], "type">;
|
|
168
|
+
export type GeminiEvent = z.infer<typeof GeminiEventSchema>;
|
|
169
|
+
/**
|
|
170
|
+
* Parse a JSON line into a GeminiEvent.
|
|
171
|
+
* Returns null if parsing fails.
|
|
172
|
+
*/
|
|
173
|
+
export declare function parseGeminiEvent(line: string): GeminiEvent | null;
|
|
174
|
+
//# sourceMappingURL=events.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/gemini-schema/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;iBAQ5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;iBAKhC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC;AAEpE;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;iBAMnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,wBAAwB;;;;;;iBAMnC,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,wBAAwB,CAAC,CAAC;AAE1E;;GAEG;AACH,eAAO,MAAM,2BAA2B;;;;;;;;;;iBAOtC,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAC;AAEhF;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;iBAMlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;iBAMjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE;;GAEG;AACH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAO5B,CAAC;AAEH,MAAM,MAAM,WAAW,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAE5D;;;GAGG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAejE"}
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Event schemas for Gemini CLI stream-json output.
|
|
3
|
+
*
|
|
4
|
+
* Gemini CLI emits JSON objects with these types:
|
|
5
|
+
* - init: Session initialization with model and session_id
|
|
6
|
+
* - message: User or assistant messages (distinguished by role)
|
|
7
|
+
* - tool_use: Tool invocation
|
|
8
|
+
* - tool_result: Tool execution result
|
|
9
|
+
* - result: Final result with stats
|
|
10
|
+
* - error: Error messages
|
|
11
|
+
*/
|
|
12
|
+
import { z } from "zod";
|
|
13
|
+
/**
|
|
14
|
+
* Stats from the result event.
|
|
15
|
+
*/
|
|
16
|
+
export const GeminiStatsSchema = z.object({
|
|
17
|
+
total_tokens: z.number().optional(),
|
|
18
|
+
input_tokens: z.number().optional(),
|
|
19
|
+
output_tokens: z.number().optional(),
|
|
20
|
+
cached: z.number().optional(),
|
|
21
|
+
input: z.number().optional(),
|
|
22
|
+
duration_ms: z.number().optional(),
|
|
23
|
+
tool_calls: z.number().optional(),
|
|
24
|
+
});
|
|
25
|
+
/**
|
|
26
|
+
* Init event - session start.
|
|
27
|
+
*/
|
|
28
|
+
export const GeminiInitEventSchema = z.object({
|
|
29
|
+
type: z.literal("init"),
|
|
30
|
+
timestamp: z.string().optional(),
|
|
31
|
+
session_id: z.string(),
|
|
32
|
+
model: z.string().optional(),
|
|
33
|
+
});
|
|
34
|
+
/**
|
|
35
|
+
* Message event - user or assistant messages.
|
|
36
|
+
*/
|
|
37
|
+
export const GeminiMessageEventSchema = z.object({
|
|
38
|
+
type: z.literal("message"),
|
|
39
|
+
timestamp: z.string().optional(),
|
|
40
|
+
role: z.enum(["user", "assistant"]),
|
|
41
|
+
content: z.string(),
|
|
42
|
+
delta: z.boolean().optional(),
|
|
43
|
+
});
|
|
44
|
+
/**
|
|
45
|
+
* Tool use event - tool invocation.
|
|
46
|
+
*/
|
|
47
|
+
export const GeminiToolUseEventSchema = z.object({
|
|
48
|
+
type: z.literal("tool_use"),
|
|
49
|
+
timestamp: z.string().optional(),
|
|
50
|
+
tool_name: z.string(),
|
|
51
|
+
tool_id: z.string(),
|
|
52
|
+
parameters: z.record(z.string(), z.unknown()).optional(),
|
|
53
|
+
});
|
|
54
|
+
/**
|
|
55
|
+
* Tool result event - tool execution result.
|
|
56
|
+
*/
|
|
57
|
+
export const GeminiToolResultEventSchema = z.object({
|
|
58
|
+
type: z.literal("tool_result"),
|
|
59
|
+
timestamp: z.string().optional(),
|
|
60
|
+
tool_id: z.string(),
|
|
61
|
+
status: z.enum(["success", "error"]),
|
|
62
|
+
output: z.string().optional(),
|
|
63
|
+
error: z.string().optional(),
|
|
64
|
+
});
|
|
65
|
+
/**
|
|
66
|
+
* Result event - final result with stats.
|
|
67
|
+
*/
|
|
68
|
+
export const GeminiResultEventSchema = z.object({
|
|
69
|
+
type: z.literal("result"),
|
|
70
|
+
timestamp: z.string().optional(),
|
|
71
|
+
status: z.enum(["success", "error", "cancelled"]),
|
|
72
|
+
stats: GeminiStatsSchema.optional(),
|
|
73
|
+
error: z.string().optional(),
|
|
74
|
+
});
|
|
75
|
+
/**
|
|
76
|
+
* Error event.
|
|
77
|
+
*/
|
|
78
|
+
export const GeminiErrorEventSchema = z.object({
|
|
79
|
+
type: z.literal("error"),
|
|
80
|
+
timestamp: z.string().optional(),
|
|
81
|
+
error: z.string().optional(),
|
|
82
|
+
message: z.string().optional(),
|
|
83
|
+
code: z.string().optional(),
|
|
84
|
+
});
|
|
85
|
+
/**
|
|
86
|
+
* Union of all Gemini event types.
|
|
87
|
+
*/
|
|
88
|
+
export const GeminiEventSchema = z.discriminatedUnion("type", [
|
|
89
|
+
GeminiInitEventSchema,
|
|
90
|
+
GeminiMessageEventSchema,
|
|
91
|
+
GeminiToolUseEventSchema,
|
|
92
|
+
GeminiToolResultEventSchema,
|
|
93
|
+
GeminiResultEventSchema,
|
|
94
|
+
GeminiErrorEventSchema,
|
|
95
|
+
]);
|
|
96
|
+
/**
|
|
97
|
+
* Parse a JSON line into a GeminiEvent.
|
|
98
|
+
* Returns null if parsing fails.
|
|
99
|
+
*/
|
|
100
|
+
export function parseGeminiEvent(line) {
|
|
101
|
+
try {
|
|
102
|
+
const json = JSON.parse(line);
|
|
103
|
+
const result = GeminiEventSchema.safeParse(json);
|
|
104
|
+
if (result.success) {
|
|
105
|
+
return result.data;
|
|
106
|
+
}
|
|
107
|
+
// Return as unknown event for forward compatibility
|
|
108
|
+
if (json && typeof json === "object" && "type" in json) {
|
|
109
|
+
return json;
|
|
110
|
+
}
|
|
111
|
+
return null;
|
|
112
|
+
}
|
|
113
|
+
catch {
|
|
114
|
+
return null;
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
//# sourceMappingURL=events.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/gemini-schema/events.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini SDK Schema
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for parsing Gemini CLI stream-json output.
|
|
5
|
+
* Based on the event types from `gemini -o stream-json`.
|
|
6
|
+
*
|
|
7
|
+
* Event types:
|
|
8
|
+
* - init: Session initialization with model and session_id
|
|
9
|
+
* - message: User or assistant messages (distinguished by role)
|
|
10
|
+
* - tool_use: Tool invocation
|
|
11
|
+
* - tool_result: Tool execution result
|
|
12
|
+
* - result: Final result with stats
|
|
13
|
+
* - error: Error messages
|
|
14
|
+
*/
|
|
15
|
+
export * from "./events.js";
|
|
16
|
+
export * from "./session.js";
|
|
17
|
+
export * from "./types.js";
|
|
18
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/gemini-schema/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Gemini SDK Schema
|
|
3
|
+
*
|
|
4
|
+
* Zod schemas for parsing Gemini CLI stream-json output.
|
|
5
|
+
* Based on the event types from `gemini -o stream-json`.
|
|
6
|
+
*
|
|
7
|
+
* Event types:
|
|
8
|
+
* - init: Session initialization with model and session_id
|
|
9
|
+
* - message: User or assistant messages (distinguished by role)
|
|
10
|
+
* - tool_use: Tool invocation
|
|
11
|
+
* - tool_result: Tool execution result
|
|
12
|
+
* - result: Final result with stats
|
|
13
|
+
* - error: Error messages
|
|
14
|
+
*/
|
|
15
|
+
export * from "./events.js";
|
|
16
|
+
export * from "./session.js";
|
|
17
|
+
export * from "./types.js";
|
|
18
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/gemini-schema/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,cAAc,aAAa,CAAC;AAC5B,cAAc,cAAc,CAAC;AAC7B,cAAc,YAAY,CAAC"}
|
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Session file schemas for Gemini CLI.
|
|
3
|
+
*
|
|
4
|
+
* Gemini persists sessions to ~/.gemini/tmp/<project-hash>/chats/ as JSON files.
|
|
5
|
+
* Each file is a single JSON object containing the full conversation.
|
|
6
|
+
*
|
|
7
|
+
* This is DIFFERENT from the streaming output format (events.ts).
|
|
8
|
+
* Session files contain all messages in a single array.
|
|
9
|
+
*
|
|
10
|
+
* Structure:
|
|
11
|
+
* - sessionId: Unique session identifier
|
|
12
|
+
* - projectHash: Hash of the project directory
|
|
13
|
+
* - startTime: ISO timestamp of session start
|
|
14
|
+
* - lastUpdated: ISO timestamp of last update
|
|
15
|
+
* - messages[]: Array of user and gemini messages
|
|
16
|
+
*/
|
|
17
|
+
import { z } from "zod";
|
|
18
|
+
/**
|
|
19
|
+
* Function response from tool execution.
|
|
20
|
+
*/
|
|
21
|
+
export declare const GeminiFunctionResponseSchema: z.ZodObject<{
|
|
22
|
+
id: z.ZodString;
|
|
23
|
+
name: z.ZodString;
|
|
24
|
+
response: z.ZodObject<{
|
|
25
|
+
output: z.ZodString;
|
|
26
|
+
}, z.core.$strip>;
|
|
27
|
+
}, z.core.$strip>;
|
|
28
|
+
export type GeminiFunctionResponse = z.infer<typeof GeminiFunctionResponseSchema>;
|
|
29
|
+
/**
|
|
30
|
+
* Tool call result wrapper.
|
|
31
|
+
*/
|
|
32
|
+
export declare const GeminiToolCallResultSchema: z.ZodObject<{
|
|
33
|
+
functionResponse: z.ZodObject<{
|
|
34
|
+
id: z.ZodString;
|
|
35
|
+
name: z.ZodString;
|
|
36
|
+
response: z.ZodObject<{
|
|
37
|
+
output: z.ZodString;
|
|
38
|
+
}, z.core.$strip>;
|
|
39
|
+
}, z.core.$strip>;
|
|
40
|
+
}, z.core.$strip>;
|
|
41
|
+
export type GeminiToolCallResult = z.infer<typeof GeminiToolCallResultSchema>;
|
|
42
|
+
/**
|
|
43
|
+
* Tool call in a gemini message.
|
|
44
|
+
*/
|
|
45
|
+
export declare const GeminiToolCallSchema: z.ZodObject<{
|
|
46
|
+
id: z.ZodString;
|
|
47
|
+
name: z.ZodString;
|
|
48
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
49
|
+
result: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
50
|
+
functionResponse: z.ZodObject<{
|
|
51
|
+
id: z.ZodString;
|
|
52
|
+
name: z.ZodString;
|
|
53
|
+
response: z.ZodObject<{
|
|
54
|
+
output: z.ZodString;
|
|
55
|
+
}, z.core.$strip>;
|
|
56
|
+
}, z.core.$strip>;
|
|
57
|
+
}, z.core.$strip>>>;
|
|
58
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
59
|
+
success: "success";
|
|
60
|
+
pending: "pending";
|
|
61
|
+
error: "error";
|
|
62
|
+
}>>;
|
|
63
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
64
|
+
resultDisplay: z.ZodOptional<z.ZodString>;
|
|
65
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
66
|
+
description: z.ZodOptional<z.ZodString>;
|
|
67
|
+
renderOutputAsMarkdown: z.ZodOptional<z.ZodBoolean>;
|
|
68
|
+
}, z.core.$strip>;
|
|
69
|
+
export type GeminiToolCall = z.infer<typeof GeminiToolCallSchema>;
|
|
70
|
+
/**
|
|
71
|
+
* A single thought/reasoning block.
|
|
72
|
+
*/
|
|
73
|
+
export declare const GeminiThoughtSchema: z.ZodObject<{
|
|
74
|
+
subject: z.ZodString;
|
|
75
|
+
description: z.ZodString;
|
|
76
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
77
|
+
}, z.core.$strip>;
|
|
78
|
+
export type GeminiThought = z.infer<typeof GeminiThoughtSchema>;
|
|
79
|
+
/**
|
|
80
|
+
* Token usage breakdown for a message.
|
|
81
|
+
*/
|
|
82
|
+
export declare const GeminiTokensSchema: z.ZodObject<{
|
|
83
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
84
|
+
output: z.ZodOptional<z.ZodNumber>;
|
|
85
|
+
cached: z.ZodOptional<z.ZodNumber>;
|
|
86
|
+
thoughts: z.ZodOptional<z.ZodNumber>;
|
|
87
|
+
tool: z.ZodOptional<z.ZodNumber>;
|
|
88
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
89
|
+
}, z.core.$strip>;
|
|
90
|
+
export type GeminiTokens = z.infer<typeof GeminiTokensSchema>;
|
|
91
|
+
/**
|
|
92
|
+
* User message in the conversation.
|
|
93
|
+
*/
|
|
94
|
+
export declare const GeminiUserMessageSchema: z.ZodObject<{
|
|
95
|
+
id: z.ZodString;
|
|
96
|
+
timestamp: z.ZodString;
|
|
97
|
+
type: z.ZodLiteral<"user">;
|
|
98
|
+
content: z.ZodString;
|
|
99
|
+
}, z.core.$strip>;
|
|
100
|
+
export type GeminiUserMessage = z.infer<typeof GeminiUserMessageSchema>;
|
|
101
|
+
/**
|
|
102
|
+
* Gemini (assistant) message in the conversation.
|
|
103
|
+
*/
|
|
104
|
+
export declare const GeminiAssistantMessageSchema: z.ZodObject<{
|
|
105
|
+
id: z.ZodString;
|
|
106
|
+
timestamp: z.ZodString;
|
|
107
|
+
type: z.ZodLiteral<"gemini">;
|
|
108
|
+
content: z.ZodString;
|
|
109
|
+
thoughts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
110
|
+
subject: z.ZodString;
|
|
111
|
+
description: z.ZodString;
|
|
112
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
113
|
+
}, z.core.$strip>>>;
|
|
114
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
115
|
+
id: z.ZodString;
|
|
116
|
+
name: z.ZodString;
|
|
117
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
118
|
+
result: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
119
|
+
functionResponse: z.ZodObject<{
|
|
120
|
+
id: z.ZodString;
|
|
121
|
+
name: z.ZodString;
|
|
122
|
+
response: z.ZodObject<{
|
|
123
|
+
output: z.ZodString;
|
|
124
|
+
}, z.core.$strip>;
|
|
125
|
+
}, z.core.$strip>;
|
|
126
|
+
}, z.core.$strip>>>;
|
|
127
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
128
|
+
success: "success";
|
|
129
|
+
pending: "pending";
|
|
130
|
+
error: "error";
|
|
131
|
+
}>>;
|
|
132
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
133
|
+
resultDisplay: z.ZodOptional<z.ZodString>;
|
|
134
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
135
|
+
description: z.ZodOptional<z.ZodString>;
|
|
136
|
+
renderOutputAsMarkdown: z.ZodOptional<z.ZodBoolean>;
|
|
137
|
+
}, z.core.$strip>>>;
|
|
138
|
+
tokens: z.ZodOptional<z.ZodObject<{
|
|
139
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
140
|
+
output: z.ZodOptional<z.ZodNumber>;
|
|
141
|
+
cached: z.ZodOptional<z.ZodNumber>;
|
|
142
|
+
thoughts: z.ZodOptional<z.ZodNumber>;
|
|
143
|
+
tool: z.ZodOptional<z.ZodNumber>;
|
|
144
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
145
|
+
}, z.core.$strip>>;
|
|
146
|
+
model: z.ZodOptional<z.ZodString>;
|
|
147
|
+
}, z.core.$strip>;
|
|
148
|
+
export type GeminiAssistantMessage = z.infer<typeof GeminiAssistantMessageSchema>;
|
|
149
|
+
/**
|
|
150
|
+
* Union of all message types.
|
|
151
|
+
*/
|
|
152
|
+
export declare const GeminiSessionMessageSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
153
|
+
id: z.ZodString;
|
|
154
|
+
timestamp: z.ZodString;
|
|
155
|
+
type: z.ZodLiteral<"user">;
|
|
156
|
+
content: z.ZodString;
|
|
157
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
158
|
+
id: z.ZodString;
|
|
159
|
+
timestamp: z.ZodString;
|
|
160
|
+
type: z.ZodLiteral<"gemini">;
|
|
161
|
+
content: z.ZodString;
|
|
162
|
+
thoughts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
163
|
+
subject: z.ZodString;
|
|
164
|
+
description: z.ZodString;
|
|
165
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
166
|
+
}, z.core.$strip>>>;
|
|
167
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
168
|
+
id: z.ZodString;
|
|
169
|
+
name: z.ZodString;
|
|
170
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
171
|
+
result: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
172
|
+
functionResponse: z.ZodObject<{
|
|
173
|
+
id: z.ZodString;
|
|
174
|
+
name: z.ZodString;
|
|
175
|
+
response: z.ZodObject<{
|
|
176
|
+
output: z.ZodString;
|
|
177
|
+
}, z.core.$strip>;
|
|
178
|
+
}, z.core.$strip>;
|
|
179
|
+
}, z.core.$strip>>>;
|
|
180
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
181
|
+
success: "success";
|
|
182
|
+
pending: "pending";
|
|
183
|
+
error: "error";
|
|
184
|
+
}>>;
|
|
185
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
186
|
+
resultDisplay: z.ZodOptional<z.ZodString>;
|
|
187
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
188
|
+
description: z.ZodOptional<z.ZodString>;
|
|
189
|
+
renderOutputAsMarkdown: z.ZodOptional<z.ZodBoolean>;
|
|
190
|
+
}, z.core.$strip>>>;
|
|
191
|
+
tokens: z.ZodOptional<z.ZodObject<{
|
|
192
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
193
|
+
output: z.ZodOptional<z.ZodNumber>;
|
|
194
|
+
cached: z.ZodOptional<z.ZodNumber>;
|
|
195
|
+
thoughts: z.ZodOptional<z.ZodNumber>;
|
|
196
|
+
tool: z.ZodOptional<z.ZodNumber>;
|
|
197
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
198
|
+
}, z.core.$strip>>;
|
|
199
|
+
model: z.ZodOptional<z.ZodString>;
|
|
200
|
+
}, z.core.$strip>], "type">;
|
|
201
|
+
export type GeminiSessionMessage = z.infer<typeof GeminiSessionMessageSchema>;
|
|
202
|
+
/**
|
|
203
|
+
* Complete Gemini session file structure.
|
|
204
|
+
* This is the top-level object in ~/.gemini/tmp/<hash>/chats/*.json
|
|
205
|
+
*/
|
|
206
|
+
export declare const GeminiSessionFileSchema: z.ZodObject<{
|
|
207
|
+
sessionId: z.ZodString;
|
|
208
|
+
projectHash: z.ZodString;
|
|
209
|
+
startTime: z.ZodString;
|
|
210
|
+
lastUpdated: z.ZodString;
|
|
211
|
+
messages: z.ZodArray<z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
212
|
+
id: z.ZodString;
|
|
213
|
+
timestamp: z.ZodString;
|
|
214
|
+
type: z.ZodLiteral<"user">;
|
|
215
|
+
content: z.ZodString;
|
|
216
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
217
|
+
id: z.ZodString;
|
|
218
|
+
timestamp: z.ZodString;
|
|
219
|
+
type: z.ZodLiteral<"gemini">;
|
|
220
|
+
content: z.ZodString;
|
|
221
|
+
thoughts: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
222
|
+
subject: z.ZodString;
|
|
223
|
+
description: z.ZodString;
|
|
224
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
225
|
+
}, z.core.$strip>>>;
|
|
226
|
+
toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
227
|
+
id: z.ZodString;
|
|
228
|
+
name: z.ZodString;
|
|
229
|
+
args: z.ZodRecord<z.ZodString, z.ZodUnknown>;
|
|
230
|
+
result: z.ZodOptional<z.ZodArray<z.ZodObject<{
|
|
231
|
+
functionResponse: z.ZodObject<{
|
|
232
|
+
id: z.ZodString;
|
|
233
|
+
name: z.ZodString;
|
|
234
|
+
response: z.ZodObject<{
|
|
235
|
+
output: z.ZodString;
|
|
236
|
+
}, z.core.$strip>;
|
|
237
|
+
}, z.core.$strip>;
|
|
238
|
+
}, z.core.$strip>>>;
|
|
239
|
+
status: z.ZodOptional<z.ZodEnum<{
|
|
240
|
+
success: "success";
|
|
241
|
+
pending: "pending";
|
|
242
|
+
error: "error";
|
|
243
|
+
}>>;
|
|
244
|
+
timestamp: z.ZodOptional<z.ZodString>;
|
|
245
|
+
resultDisplay: z.ZodOptional<z.ZodString>;
|
|
246
|
+
displayName: z.ZodOptional<z.ZodString>;
|
|
247
|
+
description: z.ZodOptional<z.ZodString>;
|
|
248
|
+
renderOutputAsMarkdown: z.ZodOptional<z.ZodBoolean>;
|
|
249
|
+
}, z.core.$strip>>>;
|
|
250
|
+
tokens: z.ZodOptional<z.ZodObject<{
|
|
251
|
+
input: z.ZodOptional<z.ZodNumber>;
|
|
252
|
+
output: z.ZodOptional<z.ZodNumber>;
|
|
253
|
+
cached: z.ZodOptional<z.ZodNumber>;
|
|
254
|
+
thoughts: z.ZodOptional<z.ZodNumber>;
|
|
255
|
+
tool: z.ZodOptional<z.ZodNumber>;
|
|
256
|
+
total: z.ZodOptional<z.ZodNumber>;
|
|
257
|
+
}, z.core.$strip>>;
|
|
258
|
+
model: z.ZodOptional<z.ZodString>;
|
|
259
|
+
}, z.core.$strip>], "type">>;
|
|
260
|
+
}, z.core.$strip>;
|
|
261
|
+
export type GeminiSessionFile = z.infer<typeof GeminiSessionFileSchema>;
|
|
262
|
+
/**
|
|
263
|
+
* Parse a Gemini session file.
|
|
264
|
+
* Returns null if parsing fails.
|
|
265
|
+
*/
|
|
266
|
+
export declare function parseGeminiSessionFile(content: string): GeminiSessionFile | null;
|
|
267
|
+
//# sourceMappingURL=session.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"session.d.ts","sourceRoot":"","sources":["../../src/gemini-schema/session.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;iBAMvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;iBAErC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;iBAW/B,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAMlE;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;iBAI9B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAC;AAMhE;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;;;;iBAO7B,CAAC;AAEH,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAM9D;;GAEG;AACH,eAAO,MAAM,uBAAuB;;;;;iBAKlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;GAEG;AACH,eAAO,MAAM,4BAA4B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBASvC,CAAC;AAEH,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAC1C,OAAO,4BAA4B,CACpC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAGrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAM9E;;;GAGG;AACH,eAAO,MAAM,uBAAuB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;iBAMlC,CAAC;AAEH,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAC;AAExE;;;GAGG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,MAAM,GACd,iBAAiB,GAAG,IAAI,CAoB1B"}
|