yepanywhere 0.6.1 → 0.7.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 +71 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/app-types.js +13 -2
- package/bundled/@yep-anywhere/shared/dist/app-types.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/browser-settings-backup.d.ts +12 -0
- package/bundled/@yep-anywhere/shared/dist/browser-settings-backup.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/browser-settings-backup.js +2 -0
- package/bundled/@yep-anywhere/shared/dist/browser-settings-backup.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.d.ts +15 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.js +49 -0
- package/bundled/@yep-anywhere/shared/dist/claude-additional-models.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.d.ts +8 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AssistantEntrySchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AttachmentEntrySchema.d.ts +30 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AttachmentEntrySchema.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AttachmentEntrySchema.js +12 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/AttachmentEntrySchema.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/MetadataEntrySchema.d.ts +9 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/MetadataEntrySchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/MetadataEntrySchema.js +16 -3
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/MetadataEntrySchema.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.d.ts +57 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.js +12 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/QueueOperationEntrySchema.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts +160 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.js +52 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/entry/SystemEntrySchema.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts +511 -2
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.js +3 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/index.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.d.ts +16 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.js +6 -0
- package/bundled/@yep-anywhere/shared/dist/claude-sdk-schema/message/AssistantMessageSchema.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.d.ts +9 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.js +4 -0
- package/bundled/@yep-anywhere/shared/dist/codex-schema/session.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.d.ts +25 -0
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.js +52 -0
- package/bundled/@yep-anywhere/shared/dist/codex-tool-correlation.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-web-run.d.ts +46 -0
- package/bundled/@yep-anywhere/shared/dist/codex-web-run.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/codex-web-run.js +14 -0
- package/bundled/@yep-anywhere/shared/dist/codex-web-run.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-awake.d.ts +27 -0
- package/bundled/@yep-anywhere/shared/dist/host-awake.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-awake.js +19 -0
- package/bundled/@yep-anywhere/shared/dist/host-awake.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-identity.d.ts +12 -0
- package/bundled/@yep-anywhere/shared/dist/host-identity.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/host-identity.js +27 -0
- package/bundled/@yep-anywhere/shared/dist/host-identity.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/index.d.ts +13 -3
- package/bundled/@yep-anywhere/shared/dist/index.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/index.js +9 -2
- package/bundled/@yep-anywhere/shared/dist/index.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.d.ts +17 -0
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.js +87 -0
- package/bundled/@yep-anywhere/shared/dist/jsonlTable.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/project-queue.d.ts +2 -0
- package/bundled/@yep-anywhere/shared/dist/project-queue.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts +106 -1
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.js +135 -0
- package/bundled/@yep-anywhere/shared/dist/server-capabilities.js.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/toon.d.ts +22 -0
- package/bundled/@yep-anywhere/shared/dist/toon.d.ts.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/toon.js +128 -0
- package/bundled/@yep-anywhere/shared/dist/toon.js.map +1 -0
- package/bundled/@yep-anywhere/shared/dist/types.d.ts +11 -0
- package/bundled/@yep-anywhere/shared/dist/types.d.ts.map +1 -1
- package/bundled/@yep-anywhere/shared/dist/types.js.map +1 -1
- package/bundled/@yep-anywhere/shared/package.json +1 -1
- package/client-dist/assets/KaTeX_Size3-Regular-gV2CO0n9.woff2 +0 -0
- package/client-dist/assets/index-7OpGawa_.css +1 -0
- package/client-dist/assets/index-CSJgXvUR.js +593 -0
- package/client-dist/index.html +2 -2
- package/dist/app.d.ts +7 -0
- package/dist/app.d.ts.map +1 -1
- package/dist/app.js +106 -20
- package/dist/app.js.map +1 -1
- package/dist/augments/augment-generator.d.ts.map +1 -1
- package/dist/augments/augment-generator.js +10 -1
- package/dist/augments/augment-generator.js.map +1 -1
- package/dist/cli.js +1 -1
- package/dist/codex/codeModeExec.d.ts +5 -2
- package/dist/codex/codeModeExec.d.ts.map +1 -1
- package/dist/codex/codeModeExec.js +157 -2
- package/dist/codex/codeModeExec.js.map +1 -1
- package/dist/codex/normalization.d.ts.map +1 -1
- package/dist/codex/normalization.js +102 -3
- package/dist/codex/normalization.js.map +1 -1
- package/dist/codex/webRun.d.ts +42 -0
- package/dist/codex/webRun.d.ts.map +1 -0
- package/dist/codex/webRun.js +199 -0
- package/dist/codex/webRun.js.map +1 -0
- package/dist/index.js +26 -1
- package/dist/index.js.map +1 -1
- package/dist/indexes/SessionIndexService.d.ts.map +1 -1
- package/dist/indexes/SessionIndexService.js +32 -3
- package/dist/indexes/SessionIndexService.js.map +1 -1
- package/dist/metadata/SessionMetadataService.d.ts +9 -0
- package/dist/metadata/SessionMetadataService.d.ts.map +1 -1
- package/dist/metadata/SessionMetadataService.js +37 -6
- package/dist/metadata/SessionMetadataService.js.map +1 -1
- package/dist/projects/paths.js +4 -4
- package/dist/projects/paths.js.map +1 -1
- package/dist/routes/bang-commands.d.ts +32 -0
- package/dist/routes/bang-commands.d.ts.map +1 -0
- package/dist/routes/bang-commands.js +273 -0
- package/dist/routes/bang-commands.js.map +1 -0
- package/dist/routes/browser-settings-backup.d.ts +7 -0
- package/dist/routes/browser-settings-backup.d.ts.map +1 -0
- package/dist/routes/browser-settings-backup.js +35 -0
- package/dist/routes/browser-settings-backup.js.map +1 -0
- package/dist/routes/inbox.d.ts.map +1 -1
- package/dist/routes/inbox.js +2 -2
- package/dist/routes/inbox.js.map +1 -1
- package/dist/routes/processes.d.ts +9 -0
- package/dist/routes/processes.d.ts.map +1 -1
- package/dist/routes/processes.js +45 -4
- package/dist/routes/processes.js.map +1 -1
- package/dist/routes/project-queue-response.d.ts.map +1 -1
- package/dist/routes/project-queue-response.js +2 -2
- package/dist/routes/project-queue-response.js.map +1 -1
- package/dist/routes/project-queue.d.ts.map +1 -1
- package/dist/routes/project-queue.js +3 -0
- package/dist/routes/project-queue.js.map +1 -1
- package/dist/routes/providers.d.ts.map +1 -1
- package/dist/routes/providers.js +11 -2
- package/dist/routes/providers.js.map +1 -1
- package/dist/routes/public-shares.d.ts +1 -1
- package/dist/routes/public-shares.d.ts.map +1 -1
- package/dist/routes/public-shares.js +4 -6
- package/dist/routes/public-shares.js.map +1 -1
- package/dist/routes/recents.d.ts.map +1 -1
- package/dist/routes/recents.js +3 -3
- package/dist/routes/recents.js.map +1 -1
- package/dist/routes/sessions.d.ts.map +1 -1
- package/dist/routes/sessions.js +55 -58
- package/dist/routes/sessions.js.map +1 -1
- package/dist/routes/settings-parsers.d.ts +2 -1
- package/dist/routes/settings-parsers.d.ts.map +1 -1
- package/dist/routes/settings-parsers.js +39 -1
- package/dist/routes/settings-parsers.js.map +1 -1
- package/dist/routes/settings.d.ts +3 -0
- package/dist/routes/settings.d.ts.map +1 -1
- package/dist/routes/settings.js +70 -4
- package/dist/routes/settings.js.map +1 -1
- package/dist/routes/version.d.ts +2 -0
- package/dist/routes/version.d.ts.map +1 -1
- package/dist/routes/version.js +13 -7
- package/dist/routes/version.js.map +1 -1
- package/dist/routes/ws-relay-handlers.d.ts.map +1 -1
- package/dist/routes/ws-relay-handlers.js +2 -1
- package/dist/routes/ws-relay-handlers.js.map +1 -1
- package/dist/sdk/cli-detection.d.ts +15 -1
- package/dist/sdk/cli-detection.d.ts.map +1 -1
- package/dist/sdk/cli-detection.js +159 -28
- package/dist/sdk/cli-detection.js.map +1 -1
- package/dist/sdk/providers/acp/client.d.ts +14 -0
- package/dist/sdk/providers/acp/client.d.ts.map +1 -1
- package/dist/sdk/providers/acp/client.js +23 -2
- package/dist/sdk/providers/acp/client.js.map +1 -1
- package/dist/sdk/providers/claude-additional-models.d.ts +5 -0
- package/dist/sdk/providers/claude-additional-models.d.ts.map +1 -0
- package/dist/sdk/providers/claude-additional-models.js +55 -0
- package/dist/sdk/providers/claude-additional-models.js.map +1 -0
- package/dist/sdk/providers/claude.d.ts +6 -1
- package/dist/sdk/providers/claude.d.ts.map +1 -1
- package/dist/sdk/providers/claude.js +57 -17
- package/dist/sdk/providers/claude.js.map +1 -1
- package/dist/sdk/providers/codex-model-catalog.d.ts +4 -1
- package/dist/sdk/providers/codex-model-catalog.d.ts.map +1 -1
- package/dist/sdk/providers/codex-model-catalog.js +144 -98
- package/dist/sdk/providers/codex-model-catalog.js.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ContentItem.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/ContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/FunctionCallOutputContentItem.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/FunctionCallOutputContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/LegacyAppPathString.d.ts +7 -6
- package/dist/sdk/providers/codex-protocol/generated/LegacyAppPathString.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ResponseItem.d.ts +15 -14
- package/dist/sdk/providers/codex-protocol/generated/ResponseItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/ResponseItemId.d.ts +6 -0
- package/dist/sdk/providers/codex-protocol/generated/ResponseItemId.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/ResponseItemId.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/ResponseItemId.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/SleepItem.d.ts +8 -0
- package/dist/sdk/providers/codex-protocol/generated/SleepItem.d.ts.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/SleepItem.js +3 -0
- package/dist/sdk/providers/codex-protocol/generated/SleepItem.js.map +1 -0
- package/dist/sdk/providers/codex-protocol/generated/WebSearchItem.d.ts +8 -0
- package/dist/sdk/providers/codex-protocol/generated/WebSearchItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/DynamicToolCallOutputContentItem.d.ts +3 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/DynamicToolCallOutputContentItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/FileSystemSpecialPath.d.ts +3 -2
- package/dist/sdk/providers/codex-protocol/generated/v2/FileSystemSpecialPath.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpToolCallAppContext.d.ts +0 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/McpToolCallAppContext.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/Thread.d.ts +5 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/Thread.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkParams.d.ts +11 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadForkParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadItem.d.ts +2 -3
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadItem.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeResponse.d.ts +14 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/ThreadResumeResponse.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TokenUsageBreakdown.d.ts +1 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TokenUsageBreakdown.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnEnvironmentParams.d.ts +4 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/TurnEnvironmentParams.d.ts.map +1 -1
- package/dist/sdk/providers/codex-protocol/generated/v2/UserInput.d.ts +6 -0
- package/dist/sdk/providers/codex-protocol/generated/v2/UserInput.d.ts.map +1 -1
- package/dist/sdk/providers/codex.d.ts +1 -1
- package/dist/sdk/providers/codex.d.ts.map +1 -1
- package/dist/sdk/providers/codex.js +164 -59
- package/dist/sdk/providers/codex.js.map +1 -1
- package/dist/sdk/providers/grok-acp.d.ts +33 -12
- package/dist/sdk/providers/grok-acp.d.ts.map +1 -1
- package/dist/sdk/providers/grok-acp.js +327 -20
- package/dist/sdk/providers/grok-acp.js.map +1 -1
- package/dist/sdk/providers/index.d.ts +3 -0
- package/dist/sdk/providers/index.d.ts.map +1 -1
- package/dist/sdk/providers/index.js +1 -0
- package/dist/sdk/providers/index.js.map +1 -1
- package/dist/sdk/providers/pi.d.ts +10 -4
- package/dist/sdk/providers/pi.d.ts.map +1 -1
- package/dist/sdk/providers/pi.js +57 -9
- package/dist/sdk/providers/pi.js.map +1 -1
- package/dist/sdk/providers/types.d.ts +16 -1
- package/dist/sdk/providers/types.d.ts.map +1 -1
- package/dist/sdk/types.d.ts +6 -1
- package/dist/sdk/types.d.ts.map +1 -1
- package/dist/services/BangCommandService.d.ts +86 -0
- package/dist/services/BangCommandService.d.ts.map +1 -0
- package/dist/services/BangCommandService.js +463 -0
- package/dist/services/BangCommandService.js.map +1 -0
- package/dist/services/BrowserSettingsBackupService.d.ts +30 -0
- package/dist/services/BrowserSettingsBackupService.d.ts.map +1 -0
- package/dist/services/BrowserSettingsBackupService.js +136 -0
- package/dist/services/BrowserSettingsBackupService.js.map +1 -0
- package/dist/services/ProjectQueueScheduler.d.ts +1 -0
- package/dist/services/ProjectQueueScheduler.d.ts.map +1 -1
- package/dist/services/ProjectQueueScheduler.js +16 -7
- package/dist/services/ProjectQueueScheduler.js.map +1 -1
- package/dist/services/PublicShareService.d.ts.map +1 -1
- package/dist/services/PublicShareService.js +1 -1
- package/dist/services/PublicShareService.js.map +1 -1
- package/dist/services/ServerSettingsService.d.ts +9 -1
- package/dist/services/ServerSettingsService.d.ts.map +1 -1
- package/dist/services/ServerSettingsService.js +13 -1
- package/dist/services/ServerSettingsService.js.map +1 -1
- package/dist/services/bangCompletions.d.ts +42 -0
- package/dist/services/bangCompletions.d.ts.map +1 -0
- package/dist/services/bangCompletions.js +186 -0
- package/dist/services/bangCompletions.js.map +1 -0
- package/dist/services/host-awake/HostAwakeBackend.d.ts +30 -0
- package/dist/services/host-awake/HostAwakeBackend.d.ts.map +1 -0
- package/dist/services/host-awake/HostAwakeBackend.js +12 -0
- package/dist/services/host-awake/HostAwakeBackend.js.map +1 -0
- package/dist/services/host-awake/HostAwakeService.d.ts +44 -0
- package/dist/services/host-awake/HostAwakeService.d.ts.map +1 -0
- package/dist/services/host-awake/HostAwakeService.js +282 -0
- package/dist/services/host-awake/HostAwakeService.js.map +1 -0
- package/dist/services/host-awake/MacHostAwakeBackend.d.ts +36 -0
- package/dist/services/host-awake/MacHostAwakeBackend.d.ts.map +1 -0
- package/dist/services/host-awake/MacHostAwakeBackend.js +279 -0
- package/dist/services/host-awake/MacHostAwakeBackend.js.map +1 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.d.ts +21 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.d.ts.map +1 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.js +487 -0
- package/dist/services/host-awake/WindowsHostAwakeBackend.js.map +1 -0
- package/dist/services/index.d.ts +2 -0
- package/dist/services/index.d.ts.map +1 -1
- package/dist/services/index.js +2 -0
- package/dist/services/index.js.map +1 -1
- package/dist/sessions/claude-summary.d.ts.map +1 -1
- package/dist/sessions/claude-summary.js +14 -2
- package/dist/sessions/claude-summary.js.map +1 -1
- package/dist/sessions/codex-reader.d.ts +5 -5
- package/dist/sessions/codex-reader.d.ts.map +1 -1
- package/dist/sessions/codex-reader.js +113 -93
- package/dist/sessions/codex-reader.js.map +1 -1
- package/dist/sessions/codex-user-turn-provenance.d.ts +40 -0
- package/dist/sessions/codex-user-turn-provenance.d.ts.map +1 -0
- package/dist/sessions/codex-user-turn-provenance.js +165 -0
- package/dist/sessions/codex-user-turn-provenance.js.map +1 -0
- package/dist/sessions/normalization.d.ts +0 -1
- package/dist/sessions/normalization.d.ts.map +1 -1
- package/dist/sessions/normalization.js +50 -53
- package/dist/sessions/normalization.js.map +1 -1
- package/dist/sessions/pagination.d.ts.map +1 -1
- package/dist/sessions/pagination.js +3 -0
- package/dist/sessions/pagination.js.map +1 -1
- package/dist/sessions/provider-resolution.d.ts +7 -1
- package/dist/sessions/provider-resolution.d.ts.map +1 -1
- package/dist/sessions/provider-resolution.js +82 -0
- package/dist/sessions/provider-resolution.js.map +1 -1
- package/dist/sessions/reader.d.ts +23 -7
- package/dist/sessions/reader.d.ts.map +1 -1
- package/dist/sessions/reader.js +136 -73
- package/dist/sessions/reader.js.map +1 -1
- package/dist/sessions/resume-exemption.d.ts +28 -0
- package/dist/sessions/resume-exemption.d.ts.map +1 -0
- package/dist/sessions/resume-exemption.js +22 -0
- package/dist/sessions/resume-exemption.js.map +1 -0
- package/dist/sessions/types.d.ts +31 -3
- package/dist/sessions/types.d.ts.map +1 -1
- package/dist/sessions/types.js +19 -1
- package/dist/sessions/types.js.map +1 -1
- package/dist/subscriptions.d.ts.map +1 -1
- package/dist/subscriptions.js +8 -0
- package/dist/subscriptions.js.map +1 -1
- package/dist/supervisor/ExternalSessionTracker.d.ts +7 -2
- package/dist/supervisor/ExternalSessionTracker.d.ts.map +1 -1
- package/dist/supervisor/ExternalSessionTracker.js +99 -91
- package/dist/supervisor/ExternalSessionTracker.js.map +1 -1
- package/dist/supervisor/Process.d.ts +48 -6
- package/dist/supervisor/Process.d.ts.map +1 -1
- package/dist/supervisor/Process.js +474 -58
- package/dist/supervisor/Process.js.map +1 -1
- package/dist/supervisor/Supervisor.d.ts +9 -7
- package/dist/supervisor/Supervisor.d.ts.map +1 -1
- package/dist/supervisor/Supervisor.js +127 -19
- package/dist/supervisor/Supervisor.js.map +1 -1
- package/dist/supervisor/types.d.ts +16 -1
- package/dist/supervisor/types.d.ts.map +1 -1
- package/dist/supervisor/types.js.map +1 -1
- package/dist/watcher/EventBus.d.ts +13 -2
- package/dist/watcher/EventBus.d.ts.map +1 -1
- package/dist/watcher/EventBus.js.map +1 -1
- package/dist/watcher/FileWatcher.d.ts.map +1 -1
- package/dist/watcher/FileWatcher.js +5 -3
- package/dist/watcher/FileWatcher.js.map +1 -1
- package/dist/watcher/index.d.ts +1 -1
- package/dist/watcher/index.d.ts.map +1 -1
- package/dist/watcher/index.js.map +1 -1
- package/package.json +3 -3
- package/client-dist/assets/index-C41clQ66.js +0 -561
- package/client-dist/assets/index-LbeFv8ym.css +0 -1
|
@@ -6,11 +6,11 @@
|
|
|
6
6
|
*/
|
|
7
7
|
import { execFile, spawn } from "node:child_process";
|
|
8
8
|
import { homedir } from "node:os";
|
|
9
|
-
import {
|
|
9
|
+
import { CODEX_TOOL_CORRELATION_FIELD, createCodexToolCorrelation, } from "../../../bundled/@yep-anywhere/shared/dist/index.js";
|
|
10
10
|
import { isCodexCorrelationDebugEnabled, logCodexCorrelationDebug, summarizeCodexNormalizedMessage, } from "../../codex/correlationDebugLogger.js";
|
|
11
11
|
import { canonicalizeCodexToolName, isCodexBackgroundProcessOutput, isCodexInterruptedToolOutput, normalizeCodexCommandExecutionOutput, normalizeCodexCustomToolInvocation, normalizeCodexToolInvocation, normalizeCodexToolOutputWithContext, parseCodexToolArguments, } from "../../codex/normalization.js";
|
|
12
12
|
import { getLogger } from "../../logging/logger.js";
|
|
13
|
-
import { findCodexCliPath } from "../cli-detection.js";
|
|
13
|
+
import { findCodexCliPath, getCodexCliVersion } from "../cli-detection.js";
|
|
14
14
|
import { logSDKMessage } from "../messageLogger.js";
|
|
15
15
|
import { MessageQueue } from "../messageQueue.js";
|
|
16
16
|
import { createAgentctlSessionEnvBridge } from "./agentctl-session-env.js";
|
|
@@ -19,7 +19,7 @@ import { asCodexAgentMessageDeltaNotification, asCodexCommandExecutionOutputDelt
|
|
|
19
19
|
import { captureCodexSummaryTextFromNotification, captureCodexSummaryTextFromTurnItems, cleanCodexRecapText, cleanCodexSummaryText, CODEX_RECAP_TIMEOUT_MS, CODEX_SUMMARY_TIMEOUT_MS, createCodexForkSummaryPrompt, createCodexForkSummaryThreadResumeParams, createCodexRecapPrompt, joinCodexSummaryText, resolveCodexRecapHelperModel, } from "./codex-summary-helpers.js";
|
|
20
20
|
import { CODEX_BUILTIN_COMMANDS } from "./staticSlashCommands.js";
|
|
21
21
|
const log = getLogger().child({ component: "codex-provider" });
|
|
22
|
-
const
|
|
22
|
+
const CODEX_DESKTOP_BROWSER_SKILL_NAME = "browser:control-in-app-browser";
|
|
23
23
|
function logSdkCorrelationDebug(sessionId, message, metadata = {}) {
|
|
24
24
|
if (!isCodexCorrelationDebugEnabled())
|
|
25
25
|
return;
|
|
@@ -58,6 +58,8 @@ const MODEL_LIST_TIMEOUT_MS = 8000;
|
|
|
58
58
|
const APP_SERVER_INIT_REQUEST_ID = 1;
|
|
59
59
|
const APP_SERVER_MODEL_LIST_REQUEST_ID = 2;
|
|
60
60
|
const APP_SERVER_SHUTDOWN_GRACE_MS = 1500;
|
|
61
|
+
const APP_SERVER_FORCE_KILL_WAIT_MS = 1000;
|
|
62
|
+
const APP_SERVER_EXIT_POLL_MS = 25;
|
|
61
63
|
const CODEX_FAILURE_TRACE_LIMIT = 12;
|
|
62
64
|
const CODEX_FAILURE_PREVIEW_CHARS = 240;
|
|
63
65
|
const CODEX_THINKING_OFF_MIN_REASONING_EFFORT_PREFIXES = [
|
|
@@ -83,50 +85,77 @@ const CODEX_POLICY_OVERRIDES = {
|
|
|
83
85
|
const DECLARE_CODEX_ORIGINATOR = false;
|
|
84
86
|
const DECLARED_CODEX_ORIGINATOR = "Codex Desktop";
|
|
85
87
|
const YEP_ANYWHERE_ORIGINATOR = "yep-anywhere";
|
|
88
|
+
function isProcessTargetRunning(target) {
|
|
89
|
+
try {
|
|
90
|
+
process.kill(target, 0);
|
|
91
|
+
return true;
|
|
92
|
+
}
|
|
93
|
+
catch (error) {
|
|
94
|
+
if (error.code === "ESRCH") {
|
|
95
|
+
return false;
|
|
96
|
+
}
|
|
97
|
+
if (error.code === "EPERM") {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
100
|
+
throw error;
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
async function waitForProcessTargetExit(target, timeoutMs) {
|
|
104
|
+
const deadline = Date.now() + timeoutMs;
|
|
105
|
+
while (isProcessTargetRunning(target)) {
|
|
106
|
+
const remainingMs = deadline - Date.now();
|
|
107
|
+
if (remainingMs <= 0) {
|
|
108
|
+
return false;
|
|
109
|
+
}
|
|
110
|
+
await new Promise((resolve) => setTimeout(resolve, Math.min(APP_SERVER_EXIT_POLL_MS, remainingMs)));
|
|
111
|
+
}
|
|
112
|
+
return true;
|
|
113
|
+
}
|
|
86
114
|
async function terminateChildProcess(child, graceMs = APP_SERVER_SHUTDOWN_GRACE_MS) {
|
|
87
|
-
if (!child?.pid
|
|
115
|
+
if (!child?.pid) {
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
const pid = child.pid;
|
|
119
|
+
const killTarget = process.platform === "win32" ? pid : -pid;
|
|
120
|
+
if (!isProcessTargetRunning(killTarget)) {
|
|
88
121
|
return;
|
|
89
122
|
}
|
|
90
|
-
const exited = new Promise((resolve) => {
|
|
91
|
-
child.once("exit", () => resolve());
|
|
92
|
-
});
|
|
93
123
|
if (process.platform === "win32") {
|
|
94
124
|
const taskkill = new Promise((resolve) => {
|
|
95
|
-
execFile("taskkill", ["/pid", String(
|
|
125
|
+
execFile("taskkill", ["/pid", String(pid), "/T", "/F"], () => resolve());
|
|
96
126
|
});
|
|
97
127
|
await Promise.race([
|
|
98
128
|
taskkill,
|
|
99
129
|
new Promise((resolve) => setTimeout(resolve, graceMs)),
|
|
100
130
|
]);
|
|
101
|
-
await
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
]);
|
|
131
|
+
if (!(await waitForProcessTargetExit(pid, APP_SERVER_FORCE_KILL_WAIT_MS))) {
|
|
132
|
+
throw new Error(`Failed to terminate Codex app-server PID ${pid}`);
|
|
133
|
+
}
|
|
105
134
|
return;
|
|
106
135
|
}
|
|
107
|
-
const killTarget = child.pid > 0 ? -child.pid : child.pid;
|
|
108
136
|
try {
|
|
109
137
|
process.kill(killTarget, "SIGTERM");
|
|
110
138
|
}
|
|
111
|
-
catch {
|
|
139
|
+
catch (error) {
|
|
140
|
+
if (error.code === "ESRCH") {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
throw error;
|
|
144
|
+
}
|
|
145
|
+
if (await waitForProcessTargetExit(killTarget, graceMs)) {
|
|
112
146
|
return;
|
|
113
147
|
}
|
|
114
|
-
|
|
115
|
-
|
|
148
|
+
try {
|
|
149
|
+
process.kill(killTarget, "SIGKILL");
|
|
150
|
+
}
|
|
151
|
+
catch (error) {
|
|
152
|
+
if (error.code === "ESRCH") {
|
|
116
153
|
return;
|
|
117
154
|
}
|
|
118
|
-
|
|
119
|
-
process.kill(killTarget, "SIGKILL");
|
|
120
|
-
}
|
|
121
|
-
catch {
|
|
122
|
-
// Ignore escalation failures during shutdown.
|
|
123
|
-
}
|
|
124
|
-
}, graceMs);
|
|
125
|
-
try {
|
|
126
|
-
await exited;
|
|
155
|
+
throw error;
|
|
127
156
|
}
|
|
128
|
-
|
|
129
|
-
|
|
157
|
+
if (!(await waitForProcessTargetExit(killTarget, APP_SERVER_FORCE_KILL_WAIT_MS))) {
|
|
158
|
+
throw new Error(`Failed to terminate Codex app-server PID ${pid}`);
|
|
130
159
|
}
|
|
131
160
|
}
|
|
132
161
|
class AsyncQueue {
|
|
@@ -198,7 +227,10 @@ class CodexAppServerClient {
|
|
|
198
227
|
}
|
|
199
228
|
isAlive() {
|
|
200
229
|
const child = this.process;
|
|
201
|
-
|
|
230
|
+
if (!child?.pid)
|
|
231
|
+
return false;
|
|
232
|
+
const target = process.platform === "win32" ? child.pid : -child.pid;
|
|
233
|
+
return isProcessTargetRunning(target);
|
|
202
234
|
}
|
|
203
235
|
nextRequestId = 1;
|
|
204
236
|
pendingRequests = new Map();
|
|
@@ -213,6 +245,9 @@ class CodexAppServerClient {
|
|
|
213
245
|
this.env = env;
|
|
214
246
|
this.shouldSuppressNotification = shouldSuppressNotification;
|
|
215
247
|
}
|
|
248
|
+
get isClosed() {
|
|
249
|
+
return this.closed;
|
|
250
|
+
}
|
|
216
251
|
setServerRequestHandler(handler) {
|
|
217
252
|
this.onServerRequest = handler;
|
|
218
253
|
}
|
|
@@ -421,6 +456,7 @@ class CodexAppServerClient {
|
|
|
421
456
|
params: {
|
|
422
457
|
error: { message: error.message },
|
|
423
458
|
willRetry: false,
|
|
459
|
+
codexProcessExit: true,
|
|
424
460
|
},
|
|
425
461
|
});
|
|
426
462
|
this.notifications.close(error);
|
|
@@ -571,7 +607,9 @@ export class CodexProvider {
|
|
|
571
607
|
return;
|
|
572
608
|
settled = true;
|
|
573
609
|
clearTimeout(timeoutHandle);
|
|
574
|
-
void terminateChildProcess(child)
|
|
610
|
+
void terminateChildProcess(child).catch((error) => {
|
|
611
|
+
log.warn({ error, pid: child.pid }, "Failed to terminate Codex model-list app-server");
|
|
612
|
+
});
|
|
575
613
|
handler();
|
|
576
614
|
};
|
|
577
615
|
const parseAndHandleLine = (line) => {
|
|
@@ -669,11 +707,8 @@ export class CodexProvider {
|
|
|
669
707
|
async getInstalledCodexCliVersion() {
|
|
670
708
|
try {
|
|
671
709
|
const codexCommand = await this.resolveCodexCommand();
|
|
672
|
-
const
|
|
673
|
-
|
|
674
|
-
timeout: 3000,
|
|
675
|
-
});
|
|
676
|
-
return normalizeSemver(stdout);
|
|
710
|
+
const version = await getCodexCliVersion(codexCommand);
|
|
711
|
+
return normalizeSemver(version);
|
|
677
712
|
}
|
|
678
713
|
catch {
|
|
679
714
|
return null;
|
|
@@ -748,9 +783,9 @@ export class CodexProvider {
|
|
|
748
783
|
return {
|
|
749
784
|
iterator,
|
|
750
785
|
queue,
|
|
751
|
-
abort: () => {
|
|
786
|
+
abort: async () => {
|
|
752
787
|
abortController.abort();
|
|
753
|
-
activeClient?.close();
|
|
788
|
+
await activeClient?.close();
|
|
754
789
|
},
|
|
755
790
|
isProcessAlive: () => activeClient?.isAlive() ?? false,
|
|
756
791
|
getProviderActivity: () => activeClient?.getProviderActivity() ?? {
|
|
@@ -1129,10 +1164,13 @@ export class CodexProvider {
|
|
|
1129
1164
|
turnResult.turn.error?.message) {
|
|
1130
1165
|
yield {
|
|
1131
1166
|
type: "error",
|
|
1167
|
+
uuid: `codex-error-${turnResult.turn.id}`,
|
|
1132
1168
|
session_id: sessionId,
|
|
1133
1169
|
error: turnResult.turn.error.message,
|
|
1134
1170
|
codexErrorInfo: turnResult.turn.error.codexErrorInfo ?? null,
|
|
1135
1171
|
codexAdditionalDetails: turnResult.turn.error.additionalDetails ?? null,
|
|
1172
|
+
codexWillRetry: false,
|
|
1173
|
+
codexTurnId: turnResult.turn.id,
|
|
1136
1174
|
codexFailureTrace: this.snapshotCodexFailureTrace(failureTrace),
|
|
1137
1175
|
codexFailureSummary: this.formatCodexFailureTrace(failureTrace),
|
|
1138
1176
|
codexRequestId: this.extractOpenAIRequestId(turnResult.turn.error, turnResult.turn.error.additionalDetails, turnResult.turn.error.message),
|
|
@@ -1146,10 +1184,18 @@ export class CodexProvider {
|
|
|
1146
1184
|
}
|
|
1147
1185
|
catch (error) {
|
|
1148
1186
|
const codexFailureTrace = this.snapshotCodexFailureTrace(failureTrace);
|
|
1149
|
-
log.error({ error, codexFailureTrace }, "Error in codex app-server session");
|
|
1150
1187
|
if (!signal.aborted) {
|
|
1188
|
+
log.error({ error, codexFailureTrace }, "Error in codex app-server session");
|
|
1189
|
+
const isProcessFailure = appServer.isClosed;
|
|
1151
1190
|
yield {
|
|
1152
1191
|
type: "error",
|
|
1192
|
+
...(isProcessFailure
|
|
1193
|
+
? {
|
|
1194
|
+
uuid: `codex-error-${sessionId || "unknown"}-process-exit`,
|
|
1195
|
+
codexWillRetry: false,
|
|
1196
|
+
codexErrorScope: "app_server_process",
|
|
1197
|
+
}
|
|
1198
|
+
: {}),
|
|
1153
1199
|
session_id: sessionId,
|
|
1154
1200
|
error: error instanceof Error ? error.message : String(error),
|
|
1155
1201
|
codexFailureTrace,
|
|
@@ -1189,7 +1235,13 @@ export class CodexProvider {
|
|
|
1189
1235
|
}
|
|
1190
1236
|
if (notification.method === "error") {
|
|
1191
1237
|
const params = asCodexErrorNotification(notification.params);
|
|
1192
|
-
|
|
1238
|
+
if (params) {
|
|
1239
|
+
return params.turnId === turnId && !params.willRetry;
|
|
1240
|
+
}
|
|
1241
|
+
const rawParams = notification.params && typeof notification.params === "object"
|
|
1242
|
+
? notification.params
|
|
1243
|
+
: null;
|
|
1244
|
+
return (rawParams?.codexProcessExit === true && rawParams.willRetry === false);
|
|
1193
1245
|
}
|
|
1194
1246
|
return false;
|
|
1195
1247
|
}
|
|
@@ -1298,7 +1350,7 @@ export class CodexProvider {
|
|
|
1298
1350
|
threadId: options.sessionId,
|
|
1299
1351
|
cwd: options.cwd,
|
|
1300
1352
|
...this.buildThreadPermissionParams(policy),
|
|
1301
|
-
config:
|
|
1353
|
+
config: this.buildThreadConfigOverrides({}),
|
|
1302
1354
|
};
|
|
1303
1355
|
if (experimentalApiEnabled) {
|
|
1304
1356
|
params.excludeTurns = true;
|
|
@@ -1366,11 +1418,25 @@ export class CodexProvider {
|
|
|
1366
1418
|
};
|
|
1367
1419
|
}
|
|
1368
1420
|
buildThreadConfigOverrides(options) {
|
|
1421
|
+
// The OpenAI browser plugin controls a desktop-owned browser backend that
|
|
1422
|
+
// YA's Codex app-server host does not provide. Suppress the unavailable
|
|
1423
|
+
// skill at thread scope so Codex follows YA's Playwright fallback instead
|
|
1424
|
+
// of advertising a browser that fails during backend discovery.
|
|
1425
|
+
const config = {
|
|
1426
|
+
skills: {
|
|
1427
|
+
config: [
|
|
1428
|
+
{
|
|
1429
|
+
name: CODEX_DESKTOP_BROWSER_SKILL_NAME,
|
|
1430
|
+
enabled: false,
|
|
1431
|
+
},
|
|
1432
|
+
],
|
|
1433
|
+
},
|
|
1434
|
+
};
|
|
1369
1435
|
const reasoningEffort = this.mapEffortToReasoningEffort(options.effort, options.thinking, options.model);
|
|
1370
|
-
if (
|
|
1371
|
-
|
|
1436
|
+
if (reasoningEffort) {
|
|
1437
|
+
config.model_reasoning_effort = reasoningEffort;
|
|
1372
1438
|
}
|
|
1373
|
-
return
|
|
1439
|
+
return config;
|
|
1374
1440
|
}
|
|
1375
1441
|
createTurnStartParams(threadId, userPrompt, options, turnPolicy = null) {
|
|
1376
1442
|
return {
|
|
@@ -1784,13 +1850,20 @@ export class CodexProvider {
|
|
|
1784
1850
|
case "error": {
|
|
1785
1851
|
const params = asCodexErrorNotification(notification.params);
|
|
1786
1852
|
const fallbackError = this.extractErrorRecord(notification.params);
|
|
1853
|
+
const rawParams = notification.params && typeof notification.params === "object"
|
|
1854
|
+
? notification.params
|
|
1855
|
+
: null;
|
|
1856
|
+
const willRetry = params?.willRetry ??
|
|
1857
|
+
(typeof rawParams?.willRetry === "boolean"
|
|
1858
|
+
? rawParams.willRetry
|
|
1859
|
+
: false);
|
|
1787
1860
|
const errorMessage = params?.error.message ??
|
|
1788
1861
|
this.getOptionalString(fallbackError?.message) ??
|
|
1789
1862
|
"Codex turn failed";
|
|
1790
1863
|
return base({
|
|
1791
1864
|
sourceEvent: notification.method,
|
|
1792
1865
|
turnId: params?.turnId,
|
|
1793
|
-
phase:
|
|
1866
|
+
phase: willRetry ? "retrying" : "terminal",
|
|
1794
1867
|
errorMessage,
|
|
1795
1868
|
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
1796
1869
|
fallbackError?.codexErrorInfo ??
|
|
@@ -2276,19 +2349,36 @@ export class CodexProvider {
|
|
|
2276
2349
|
}
|
|
2277
2350
|
case "error": {
|
|
2278
2351
|
const params = asCodexErrorNotification(notification.params);
|
|
2279
|
-
const
|
|
2352
|
+
const rawParams = notification.params && typeof notification.params === "object"
|
|
2353
|
+
? notification.params
|
|
2354
|
+
: null;
|
|
2355
|
+
const fallbackError = this.extractErrorRecord(notification.params);
|
|
2356
|
+
const errorMessage = params?.error.message ??
|
|
2357
|
+
this.getOptionalString(fallbackError?.message);
|
|
2358
|
+
const willRetry = params?.willRetry ??
|
|
2359
|
+
(typeof rawParams?.willRetry === "boolean"
|
|
2360
|
+
? rawParams.willRetry
|
|
2361
|
+
: false);
|
|
2362
|
+
const isProcessExit = rawParams?.codexProcessExit === true;
|
|
2280
2363
|
const message = (typeof errorMessage === "string" && errorMessage) ||
|
|
2281
|
-
(typeof
|
|
2282
|
-
|
|
2283
|
-
? notification.params.message
|
|
2364
|
+
(typeof rawParams?.message === "string"
|
|
2365
|
+
? rawParams.message
|
|
2284
2366
|
: "Codex turn failed");
|
|
2285
2367
|
const errorEvent = {
|
|
2286
2368
|
type: "error",
|
|
2369
|
+
uuid: params?.turnId
|
|
2370
|
+
? `codex-error-${params.turnId}`
|
|
2371
|
+
: `codex-error-${sessionId}-${Date.now()}`,
|
|
2287
2372
|
session_id: sessionId,
|
|
2288
2373
|
error: message,
|
|
2289
|
-
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
2290
|
-
|
|
2291
|
-
|
|
2374
|
+
codexErrorInfo: params?.error.codexErrorInfo ??
|
|
2375
|
+
fallbackError?.codexErrorInfo ??
|
|
2376
|
+
null,
|
|
2377
|
+
codexAdditionalDetails: params?.error.additionalDetails ??
|
|
2378
|
+
this.getOptionalString(fallbackError?.additionalDetails) ??
|
|
2379
|
+
null,
|
|
2380
|
+
codexWillRetry: willRetry,
|
|
2381
|
+
codexErrorScope: isProcessExit ? "app_server_process" : "turn",
|
|
2292
2382
|
codexThreadId: params?.threadId,
|
|
2293
2383
|
codexTurnId: params?.turnId,
|
|
2294
2384
|
codexRequestId: this.extractOpenAIRequestId(notification.params, params?.error, message),
|
|
@@ -2415,6 +2505,9 @@ export class CodexProvider {
|
|
|
2415
2505
|
exit_code: this.getOptionalNumber(itemRecord.exit_code) ??
|
|
2416
2506
|
this.getOptionalNumber(itemRecord.exitCode) ??
|
|
2417
2507
|
undefined,
|
|
2508
|
+
durationMs: this.getOptionalNumber(itemRecord.duration_ms) ??
|
|
2509
|
+
this.getOptionalNumber(itemRecord.durationMs) ??
|
|
2510
|
+
undefined,
|
|
2418
2511
|
status: this.normalizeStatus(itemRecord.status),
|
|
2419
2512
|
...(cwd ? { cwd } : {}),
|
|
2420
2513
|
...(commandActions ? { commandActions } : {}),
|
|
@@ -2647,12 +2740,11 @@ export class CodexProvider {
|
|
|
2647
2740
|
buildItemMessageUuid(turnId, itemId) {
|
|
2648
2741
|
return `${itemId}-${turnId}`;
|
|
2649
2742
|
}
|
|
2650
|
-
//
|
|
2651
|
-
//
|
|
2652
|
-
//
|
|
2653
|
-
//
|
|
2654
|
-
//
|
|
2655
|
-
// topics/stream-durable-id-dedup.md (Codex tool calls).
|
|
2743
|
+
// Native tool thread items carry Codex's globally-unique call_id as item.id,
|
|
2744
|
+
// so this uuid aligns directly with the durable response item. A code-mode
|
|
2745
|
+
// commandExecution instead carries an inner exec-* id while rollout stores
|
|
2746
|
+
// the outer call_* id; the client reconciles that scoped exception via
|
|
2747
|
+
// _codexToolCorrelation. See topics/stream-durable-id-dedup.md.
|
|
2656
2748
|
buildItemToolUuid(callId) {
|
|
2657
2749
|
return callId;
|
|
2658
2750
|
}
|
|
@@ -2750,6 +2842,11 @@ export class CodexProvider {
|
|
|
2750
2842
|
session_id: sessionId,
|
|
2751
2843
|
uuid: this.buildItemResultUuid(itemId),
|
|
2752
2844
|
_isStreaming: true,
|
|
2845
|
+
...(sourceEvent === "command_output_delta"
|
|
2846
|
+
? {
|
|
2847
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("command_execution", turnId, itemId),
|
|
2848
|
+
}
|
|
2849
|
+
: {}),
|
|
2753
2850
|
message: {
|
|
2754
2851
|
role: "user",
|
|
2755
2852
|
content: [
|
|
@@ -2885,6 +2982,7 @@ export class CodexProvider {
|
|
|
2885
2982
|
type: "assistant",
|
|
2886
2983
|
session_id: sessionId,
|
|
2887
2984
|
uuid: this.buildItemToolUuid(callId),
|
|
2985
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("custom_tool_call", params.turnId, callId),
|
|
2888
2986
|
message: {
|
|
2889
2987
|
role: "assistant",
|
|
2890
2988
|
content: [
|
|
@@ -2932,6 +3030,7 @@ export class CodexProvider {
|
|
|
2932
3030
|
type: "user",
|
|
2933
3031
|
session_id: sessionId,
|
|
2934
3032
|
uuid: this.buildItemResultUuid(callId),
|
|
3033
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("custom_tool_call", params.turnId, callId),
|
|
2935
3034
|
message: {
|
|
2936
3035
|
role: "user",
|
|
2937
3036
|
content: [toolResult],
|
|
@@ -2977,9 +3076,10 @@ export class CodexProvider {
|
|
|
2977
3076
|
convertItemToSDKMessages(item, sessionId, turnId, sourceEvent) {
|
|
2978
3077
|
const isComplete = sourceEvent === "item/completed";
|
|
2979
3078
|
const observedAt = new Date().toISOString();
|
|
2980
|
-
//
|
|
2981
|
-
//
|
|
2982
|
-
//
|
|
3079
|
+
// Native tool items key the uuid on call_id (item.id). Code-mode
|
|
3080
|
+
// commandExecution items temporarily key on exec-* and carry correlation
|
|
3081
|
+
// metadata for adoption of the outer durable call_* id client-side.
|
|
3082
|
+
// Message/reasoning counters have no durable equivalent and stay scoped.
|
|
2983
3083
|
const uuid = this.isToolBackedThreadItem(item)
|
|
2984
3084
|
? this.buildItemToolUuid(item.id)
|
|
2985
3085
|
: `${item.id}-${turnId}`;
|
|
@@ -3029,6 +3129,9 @@ export class CodexProvider {
|
|
|
3029
3129
|
}
|
|
3030
3130
|
case "command_execution": {
|
|
3031
3131
|
const messages = [];
|
|
3132
|
+
const correlationStartedAt = item.durationMs !== undefined
|
|
3133
|
+
? new Date(Date.parse(observedAt) - Math.max(0, item.durationMs)).toISOString()
|
|
3134
|
+
: observedAt;
|
|
3032
3135
|
const normalizedInvocation = normalizeCodexToolInvocation("Bash", {
|
|
3033
3136
|
command: item.command,
|
|
3034
3137
|
...(item.cwd ? { cwd: item.cwd } : {}),
|
|
@@ -3044,6 +3147,7 @@ export class CodexProvider {
|
|
|
3044
3147
|
type: "assistant",
|
|
3045
3148
|
session_id: sessionId,
|
|
3046
3149
|
uuid,
|
|
3150
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("command_execution", turnId, item.id, correlationStartedAt),
|
|
3047
3151
|
message: {
|
|
3048
3152
|
role: "assistant",
|
|
3049
3153
|
content: [
|
|
@@ -3088,6 +3192,7 @@ export class CodexProvider {
|
|
|
3088
3192
|
type: "user",
|
|
3089
3193
|
session_id: sessionId,
|
|
3090
3194
|
uuid: `${uuid}-result`,
|
|
3195
|
+
[CODEX_TOOL_CORRELATION_FIELD]: createCodexToolCorrelation("command_execution", turnId, item.id, correlationStartedAt),
|
|
3091
3196
|
message: {
|
|
3092
3197
|
role: "user",
|
|
3093
3198
|
content: [toolResultBlock],
|