@murphai/murph 1.3.1 → 1.3.2
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/CHANGELOG.md +808 -0
- package/config.schema.json +91 -40
- package/dist/bin.js +6 -4
- package/dist/bin.js.map +1 -1
- package/dist/cli-entry.d.ts +8 -1
- package/dist/cli-entry.d.ts.map +1 -1
- package/dist/cli-entry.js +79 -3
- package/dist/cli-entry.js.map +1 -1
- package/dist/commands/audit-command-helpers.d.ts.map +1 -1
- package/dist/commands/audit-command-helpers.js +7 -5
- package/dist/commands/audit-command-helpers.js.map +1 -1
- package/dist/commands/batch.d.ts +5 -5
- package/dist/commands/batch.d.ts.map +1 -1
- package/dist/commands/batch.js +2 -21
- package/dist/commands/batch.js.map +1 -1
- package/dist/commands/commons.d.ts.map +1 -1
- package/dist/commands/commons.js +2 -4
- package/dist/commands/commons.js.map +1 -1
- package/dist/commands/exercise.d.ts.map +1 -1
- package/dist/commands/exercise.js +16 -3
- package/dist/commands/exercise.js.map +1 -1
- package/dist/commands/experiment-progress-card-image.d.ts.map +1 -1
- package/dist/commands/experiment-progress-card-image.js +63 -12
- package/dist/commands/experiment-progress-card-image.js.map +1 -1
- package/dist/commands/experiment.d.ts.map +1 -1
- package/dist/commands/experiment.js +45 -5
- package/dist/commands/experiment.js.map +1 -1
- package/dist/commands/export-intake-read-helpers.d.ts.map +1 -1
- package/dist/commands/export-intake-read-helpers.js +2 -3
- package/dist/commands/export-intake-read-helpers.js.map +1 -1
- package/dist/commands/food.d.ts.map +1 -1
- package/dist/commands/food.js +1 -7
- package/dist/commands/food.js.map +1 -1
- package/dist/commands/habitat.d.ts.map +1 -1
- package/dist/commands/habitat.js +120 -9
- package/dist/commands/habitat.js.map +1 -1
- package/dist/commands/health-blood-test-save.d.ts.map +1 -1
- package/dist/commands/health-blood-test-save.js +42 -8
- package/dist/commands/health-blood-test-save.js.map +1 -1
- package/dist/commands/meal.d.ts.map +1 -1
- package/dist/commands/meal.js +4 -1
- package/dist/commands/meal.js.map +1 -1
- package/dist/commands/measurement.d.ts.map +1 -1
- package/dist/commands/measurement.js +3 -0
- package/dist/commands/measurement.js.map +1 -1
- package/dist/commands/murph-age.d.ts +9 -1
- package/dist/commands/murph-age.d.ts.map +1 -1
- package/dist/commands/murph-age.js +132 -7
- package/dist/commands/murph-age.js.map +1 -1
- package/dist/commands/public-validation-issue.d.ts +7 -0
- package/dist/commands/public-validation-issue.d.ts.map +1 -0
- package/dist/commands/public-validation-issue.js +7 -0
- package/dist/commands/public-validation-issue.js.map +1 -0
- package/dist/commands/scheduled-log.d.ts +12 -0
- package/dist/commands/scheduled-log.d.ts.map +1 -1
- package/dist/commands/scheduled-log.js +456 -106
- package/dist/commands/scheduled-log.js.map +1 -1
- package/dist/commands/wearables.d.ts +286 -0
- package/dist/commands/wearables.d.ts.map +1 -1
- package/dist/commands/wearables.js +33 -1
- package/dist/commands/wearables.js.map +1 -1
- package/dist/commands/workout-live.d.ts.map +1 -1
- package/dist/commands/workout-live.js +123 -42
- package/dist/commands/workout-live.js.map +1 -1
- package/dist/commands/workout-typed-options.d.ts +38 -0
- package/dist/commands/workout-typed-options.d.ts.map +1 -0
- package/dist/commands/workout-typed-options.js +90 -0
- package/dist/commands/workout-typed-options.js.map +1 -0
- package/dist/commands/workout.d.ts.map +1 -1
- package/dist/commands/workout.js +80 -73
- package/dist/commands/workout.js.map +1 -1
- package/dist/hosted-data-api-labels.d.ts.map +1 -1
- package/dist/hosted-data-api-labels.js +161 -30
- package/dist/hosted-data-api-labels.js.map +1 -1
- package/dist/incur-error-bridge.d.ts.map +1 -1
- package/dist/incur-error-bridge.js +7 -15
- package/dist/incur-error-bridge.js.map +1 -1
- package/dist/incur.generated.d.ts +22 -13
- package/dist/incur.generated.d.ts.map +1 -1
- package/dist/mapbox-address.d.ts.map +1 -1
- package/dist/mapbox-address.js +3 -4
- package/dist/mapbox-address.js.map +1 -1
- package/dist/mapbox-route-client.d.ts +2 -2
- package/dist/mapbox-route-client.d.ts.map +1 -1
- package/dist/mapbox-route-client.js +49 -12
- package/dist/mapbox-route-client.js.map +1 -1
- package/dist/mapbox-route-directions.d.ts.map +1 -1
- package/dist/mapbox-route-directions.js +0 -1
- package/dist/mapbox-route-directions.js.map +1 -1
- package/dist/mapbox-route-elevation.js +0 -1
- package/dist/mapbox-route-elevation.js.map +1 -1
- package/dist/mapbox-route-points.js +0 -2
- package/dist/mapbox-route-points.js.map +1 -1
- package/dist/mapbox-route.d.ts.map +1 -1
- package/dist/mapbox-route.js +1 -1
- package/dist/mapbox-route.js.map +1 -1
- package/dist/vault-cli-command-manifest.d.ts +304 -6
- package/dist/vault-cli-command-manifest.d.ts.map +1 -1
- package/dist/vault-cli-skill-hash.generated.d.ts +1 -1
- package/dist/vault-cli-skill-hash.generated.js +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink.js +6 -2
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/README.md +4 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.d.ts +15 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.js +121 -24
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-journal.js +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-journal.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.js +55 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/run-loop.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/run-loop.js +9 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/run-loop.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/shared.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/shared.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/shared.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-contract.generated.json +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-base-instructions.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-base-instructions.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-base-instructions.js +7 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-base-instructions.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.js +123 -22
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn-runner.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn-runner.js +48 -19
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn-runner.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.js +3 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.d.ts +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.js +24 -10
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.js +12 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.d.ts +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.js +9 -10
- package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.d.ts +41 -9
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.js +9 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.js +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.js +8 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/issue-reporting.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/issue-reporting.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/issue-reporting.js +26 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/issue-reporting.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/local-service.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/local-service.js +687 -370
- package/node_modules/@murphai/assistant-engine/dist/assistant/local-service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.js +54 -18
- package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.d.ts +2 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.js +10 -9
- package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.js +146 -18
- package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-seed.d.ts +25 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-seed.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-seed.js +72 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-seed.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.d.ts +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.js +14 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/store.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/store.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/store.js +8 -5
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/store.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.d.ts +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.js +8 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/private-completion-continuity.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/private-completion-continuity.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/codex-cli.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/codex-cli.js +25 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/codex-cli.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/helpers.d.ts +11 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/helpers.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/helpers.js +67 -176
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/helpers.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/types.d.ts +17 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/types.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/types.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.js +10 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.d.ts +19 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.js +76 -40
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-contracts.d.ts +3 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.d.ts +4 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.js +8 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/shared.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/shared.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/shared.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/shared.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/types.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/types.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store.js +6 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/store.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.js +57 -29
- package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-digest.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-digest.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-digest.js +17 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-digest.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-feedback.d.ts +4 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-feedback.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-feedback.js +21 -6
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-feedback.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.js +6 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-input.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-input.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/usage-attribution.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/usage-attribution.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/usage-attribution.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.js +8 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-cli-access.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-cli-access.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-cli-access.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/analyze-video-tool.d.ts +49 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/analyze-video-tool.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/analyze-video-tool.js +387 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/analyze-video-tool.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-protocol.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-protocol.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-protocol.js +12 -13
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-protocol.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-requests.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-requests.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-requests.js +16 -5
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-requests.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-rpc.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-rpc.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-rpc.js +2 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-rpc.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/command-family.d.ts +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/command-family.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/command-family.js +26 -13
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/command-family.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tool-catalog.d.ts +1024 -1091
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tool-catalog.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tool-catalog.js +354 -330
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tool-catalog.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/analyze-video.d.ts +50 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/analyze-video.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/analyze-video.js +79 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/analyze-video.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation-model-input-schema.d.ts +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation-model-input-schema.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation-model-input-schema.js +153 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation-model-input-schema.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation.d.ts +4 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation.js +29 -35
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/device.d.ts +4 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/device.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/device.js +43 -9
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/device.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/dynamic-tool-wrapper.d.ts +6 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/dynamic-tool-wrapper.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/dynamic-tool-wrapper.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/member-memory.d.ts +60 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/member-memory.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/member-memory.js +91 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/member-memory.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/physical-notes.d.ts +41 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/physical-notes.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/physical-notes.js +85 -9
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/physical-notes.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.d.ts +25 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.js +280 -89
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/response-card-validation-feedback.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/response-card-validation-feedback.js +1 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/response-card-validation-feedback.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/workout-delivery-context.d.ts +19 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/workout-delivery-context.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/workout-delivery-context.js +203 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/workout-delivery-context.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.d.ts +9 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.js +220 -130
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime-residue.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime-residue.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime-residue.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime-residue.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/index.d.ts +2 -1
- package/node_modules/@murphai/assistant-engine/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/index.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/index.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/skills/automatic-meal-capture/SKILL.md +111 -68
- package/node_modules/@murphai/assistant-engine/skills/behavior-followthrough/SKILL.md +0 -2
- package/node_modules/@murphai/assistant-engine/skills/daily-activity/SKILL.md +11 -4
- package/node_modules/@murphai/assistant-engine/skills/food-journal/SKILL.md +83 -22
- package/node_modules/@murphai/assistant-engine/skills/hosted-low-usage/SKILL.md +3 -3
- package/node_modules/@murphai/assistant-engine/skills/murph-family/SKILL.md +1 -1
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/SKILL.md +17 -11
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/daily-nutrition-card-goals.md +62 -34
- package/node_modules/@murphai/assistant-engine/skills/physical-notes/SKILL.md +47 -0
- package/node_modules/@murphai/assistant-engine/skills/shared/exercise-catalog-runtime.md +6 -0
- package/node_modules/@murphai/assistant-engine/skills/signup-link/SKILL.md +1 -1
- package/node_modules/@murphai/assistant-engine/skills/strength-training/SKILL.md +12 -5
- package/node_modules/@murphai/assistant-engine/skills/tracked-table/SKILL.md +156 -66
- package/node_modules/@murphai/core/dist/automation.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/automation.js +17 -9
- package/node_modules/@murphai/core/dist/automation.js.map +1 -1
- package/node_modules/@murphai/core/dist/bank/habitat.d.ts +2 -0
- package/node_modules/@murphai/core/dist/bank/habitat.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/bank/habitat.js +27 -0
- package/node_modules/@murphai/core/dist/bank/habitat.js.map +1 -1
- package/node_modules/@murphai/core/dist/bank/regimens.js +1 -1
- package/node_modules/@murphai/core/dist/bank/regimens.js.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/ledger.d.ts +21 -0
- package/node_modules/@murphai/core/dist/domains/events/ledger.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/ledger.js +102 -8
- package/node_modules/@murphai/core/dist/domains/events/ledger.js.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events.d.ts +2 -2
- package/node_modules/@murphai/core/dist/domains/events.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events.js +1 -1
- package/node_modules/@murphai/core/dist/domains/events.js.map +1 -1
- package/node_modules/@murphai/core/dist/history/api.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/history/api.js +18 -3
- package/node_modules/@murphai/core/dist/history/api.js.map +1 -1
- package/node_modules/@murphai/core/dist/index.d.ts +4 -2
- package/node_modules/@murphai/core/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/index.js +3 -1
- package/node_modules/@murphai/core/dist/index.js.map +1 -1
- package/node_modules/@murphai/core/dist/mutations.d.ts +25 -2
- package/node_modules/@murphai/core/dist/mutations.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/mutations.js +1588 -78
- package/node_modules/@murphai/core/dist/mutations.js.map +1 -1
- package/node_modules/@murphai/core/dist/operations/index.d.ts +1 -1
- package/node_modules/@murphai/core/dist/operations/index.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/operations/index.js +1 -1
- package/node_modules/@murphai/core/dist/operations/index.js.map +1 -1
- package/node_modules/@murphai/core/dist/operations/write-batch.d.ts +2 -0
- package/node_modules/@murphai/core/dist/operations/write-batch.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/operations/write-batch.js +7 -0
- package/node_modules/@murphai/core/dist/operations/write-batch.js.map +1 -1
- package/node_modules/@murphai/core/dist/protocols.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/protocols.js +52 -9
- package/node_modules/@murphai/core/dist/protocols.js.map +1 -1
- package/node_modules/@murphai/core/dist/public-mutations.d.ts +1 -1
- package/node_modules/@murphai/core/dist/public-mutations.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/public-mutations.js +2 -2
- package/node_modules/@murphai/core/dist/public-mutations.js.map +1 -1
- package/node_modules/@murphai/core/dist/scheduled-logs.d.ts +3 -0
- package/node_modules/@murphai/core/dist/scheduled-logs.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/scheduled-logs.js +65 -29
- package/node_modules/@murphai/core/dist/scheduled-logs.js.map +1 -1
- package/node_modules/@murphai/device-syncd/README.md +140 -46
- package/node_modules/@murphai/device-syncd/dist/client.d.ts +14 -0
- package/node_modules/@murphai/device-syncd/dist/client.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/client.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/connect-routes.d.ts +4 -1
- package/node_modules/@murphai/device-syncd/dist/config/connect-routes.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/connect-routes.js +24 -2
- package/node_modules/@murphai/device-syncd/dist/config/connect-routes.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-connect-sources.js +2 -2
- package/node_modules/@murphai/device-syncd/dist/config/junction-connect-sources.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.d.ts +53 -0
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.js +13 -0
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.d.ts +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/fitbit-migration.d.ts +57 -0
- package/node_modules/@murphai/device-syncd/dist/fitbit-migration.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/fitbit-migration.js +166 -0
- package/node_modules/@murphai/device-syncd/dist/fitbit-migration.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/hosted-runtime.d.ts +43 -0
- package/node_modules/@murphai/device-syncd/dist/hosted-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/hosted-runtime.js +129 -5
- package/node_modules/@murphai/device-syncd/dist/hosted-runtime.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.d.ts +3 -0
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.js +36 -16
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-inline-authority.d.ts +17 -2
- package/node_modules/@murphai/device-syncd/dist/junction-inline-authority.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-inline-authority.js +99 -40
- package/node_modules/@murphai/device-syncd/dist/junction-inline-authority.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-source-reconnect.d.ts +17 -0
- package/node_modules/@murphai/device-syncd/dist/junction-source-reconnect.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/junction-source-reconnect.js +45 -0
- package/node_modules/@murphai/device-syncd/dist/junction-source-reconnect.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/junction-timeseries-progress.d.ts +8 -1
- package/node_modules/@murphai/device-syncd/dist/junction-timeseries-progress.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-timeseries-progress.js +12 -1
- package/node_modules/@murphai/device-syncd/dist/junction-timeseries-progress.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction-client.d.ts +7 -0
- package/node_modules/@murphai/device-syncd/dist/providers/junction-client.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction-client.js +285 -46
- package/node_modules/@murphai/device-syncd/dist/providers/junction-client.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction.d.ts +9 -0
- package/node_modules/@murphai/device-syncd/dist/providers/junction.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction.js +2045 -367
- package/node_modules/@murphai/device-syncd/dist/providers/junction.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-account.d.ts +2 -0
- package/node_modules/@murphai/device-syncd/dist/public-account.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-account.js +96 -0
- package/node_modules/@murphai/device-syncd/dist/public-account.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-ingress.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-ingress.js +6 -4
- package/node_modules/@murphai/device-syncd/dist/public-ingress.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/service.d.ts +6 -2
- package/node_modules/@murphai/device-syncd/dist/service.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/service.js +385 -44
- package/node_modules/@murphai/device-syncd/dist/service.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/source-staleness.d.ts +15 -0
- package/node_modules/@murphai/device-syncd/dist/source-staleness.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/source-staleness.js +25 -1
- package/node_modules/@murphai/device-syncd/dist/source-staleness.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/jobs.d.ts +10 -1
- package/node_modules/@murphai/device-syncd/dist/store/jobs.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/jobs.js +95 -1
- package/node_modules/@murphai/device-syncd/dist/store/jobs.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/schema.d.ts +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/schema.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/schema.js +25 -3
- package/node_modules/@murphai/device-syncd/dist/store/schema.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/sources.d.ts +24 -2
- package/node_modules/@murphai/device-syncd/dist/store/sources.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/sources.js +223 -14
- package/node_modules/@murphai/device-syncd/dist/store/sources.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store.d.ts +13 -3
- package/node_modules/@murphai/device-syncd/dist/store.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store.js +104 -22
- package/node_modules/@murphai/device-syncd/dist/store.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/types.d.ts +96 -9
- package/node_modules/@murphai/device-syncd/dist/types.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/types.js +4 -0
- package/node_modules/@murphai/device-syncd/dist/types.js.map +1 -1
- package/node_modules/@murphai/device-syncd/package.json +8 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/activity.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/activity.js +66 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/activity.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/body.js +2 -2
- package/node_modules/@murphai/health-metrics/dist/definitions/body.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/normalize.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/normalize.js +3 -0
- package/node_modules/@murphai/health-metrics/dist/normalize.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-metric-catalog.d.ts +3 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-metric-catalog.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-metric-catalog.js +5 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-metric-catalog.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.d.ts +79 -0
- package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.js +19 -0
- package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.js.map +1 -1
- package/node_modules/@murphai/importers/dist/core-port.d.ts +15 -1
- package/node_modules/@murphai/importers/dist/core-port.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/core-port.js.map +1 -1
- package/node_modules/@murphai/importers/dist/create-importers.d.ts +9 -1
- package/node_modules/@murphai/importers/dist/create-importers.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/create-importers.js +12 -2
- package/node_modules/@murphai/importers/dist/create-importers.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.d.ts +17 -3
- package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.js +102 -8
- package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/index.d.ts +5 -4
- package/node_modules/@murphai/importers/dist/device-providers/index.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/index.js +4 -3
- package/node_modules/@murphai/importers/dist/device-providers/index.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-bounded-features.d.ts +11 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-bounded-features.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-bounded-features.js +420 -27
- package/node_modules/@murphai/importers/dist/device-providers/junction-bounded-features.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-origin.d.ts +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-origin.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-origin.js +7 -2
- package/node_modules/@murphai/importers/dist/device-providers/junction-origin.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-resources.d.ts +4 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-resources.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-resources.js +42 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-resources.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-features.d.ts +79 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-features.d.ts.map +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-features.js +356 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-features.js.map +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction.d.ts +76 -3
- package/node_modules/@murphai/importers/dist/device-providers/junction.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction.js +1676 -347
- package/node_modules/@murphai/importers/dist/device-providers/junction.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/shared-normalization.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/shared-normalization.js +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/shared-normalization.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/types.d.ts +9 -1
- package/node_modules/@murphai/importers/dist/device-providers/types.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/index.d.ts +2 -2
- package/node_modules/@murphai/importers/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/index.js +1 -1
- package/node_modules/@murphai/importers/dist/index.js.map +1 -1
- package/node_modules/@murphai/inboxd/README.md +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/retention.d.ts +6 -0
- package/node_modules/@murphai/inboxd/dist/indexing/retention.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/retention.js +64 -18
- package/node_modules/@murphai/inboxd/dist/indexing/retention.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.d.ts +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.js +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.d.ts +1 -0
- package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.js +5 -0
- package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant-response-cards.d.ts +175 -152
- package/node_modules/@murphai/operator-config/dist/assistant-response-cards.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant-response-cards.js +62 -41
- package/node_modules/@murphai/operator-config/dist/assistant-response-cards.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-sync-client.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-sync-client.js +1 -5
- package/node_modules/@murphai/operator-config/dist/device-sync-client.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.d.ts +66 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.js +58 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-error-projection.d.ts +24 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-error-projection.d.ts.map +1 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-error-projection.js +219 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-error-projection.js.map +1 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-errors.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-errors.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/workout-action-binding.d.ts +9 -0
- package/node_modules/@murphai/operator-config/dist/workout-action-binding.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/workout-action-binding.js +48 -5
- package/node_modules/@murphai/operator-config/dist/workout-action-binding.js.map +1 -1
- package/node_modules/@murphai/operator-config/package.json +5 -0
- package/node_modules/@murphai/query/README.md +20 -5
- package/node_modules/@murphai/query/dist/browser-replica/build.d.ts +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/build.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/build.js +25 -16
- package/node_modules/@murphai/query/dist/browser-replica/build.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/json.d.ts +6 -0
- package/node_modules/@murphai/query/dist/browser-replica/json.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/json.js +103 -0
- package/node_modules/@murphai/query/dist/browser-replica/json.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/shared.d.ts +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/shared.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/source.d.ts +13 -0
- package/node_modules/@murphai/query/dist/browser-replica/source.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/source.js +45 -0
- package/node_modules/@murphai/query/dist/browser-replica/source.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica-server.d.ts +2 -0
- package/node_modules/@murphai/query/dist/browser-replica-server.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica-server.js +2 -0
- package/node_modules/@murphai/query/dist/browser-replica-server.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/blood-tests.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/blood-tests.js +3 -2
- package/node_modules/@murphai/query/dist/health/blood-tests.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.d.ts +11 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.js +39 -16
- package/node_modules/@murphai/query/dist/health/canonical-collector.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/entity-slices.d.ts +9 -3
- package/node_modules/@murphai/query/dist/health/entity-slices.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/entity-slices.js +6 -6
- package/node_modules/@murphai/query/dist/health/entity-slices.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/immunizations.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/immunizations.js +14 -11
- package/node_modules/@murphai/query/dist/health/immunizations.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/loaders.d.ts +21 -7
- package/node_modules/@murphai/query/dist/health/loaders.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/loaders.js +53 -15
- package/node_modules/@murphai/query/dist/health/loaders.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/registries.d.ts +1 -0
- package/node_modules/@murphai/query/dist/health/registries.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/registries.js.map +1 -1
- package/node_modules/@murphai/query/dist/index.d.ts +4 -3
- package/node_modules/@murphai/query/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/index.js +4 -3
- package/node_modules/@murphai/query/dist/index.js.map +1 -1
- package/node_modules/@murphai/query/dist/meal-nutrition.d.ts +1 -1
- package/node_modules/@murphai/query/dist/meal-nutrition.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/meal-nutrition.js +10 -3
- package/node_modules/@murphai/query/dist/meal-nutrition.js.map +1 -1
- package/node_modules/@murphai/query/dist/metrics/projection.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/metrics/projection.js +19 -6
- package/node_modules/@murphai/query/dist/metrics/projection.js.map +1 -1
- package/node_modules/@murphai/query/dist/murph-age.d.ts +5 -1
- package/node_modules/@murphai/query/dist/murph-age.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/murph-age.js +22 -8
- package/node_modules/@murphai/query/dist/murph-age.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/entity-store.js +4 -4
- package/node_modules/@murphai/query/dist/projection/entity-store.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/schema.d.ts +1 -1
- package/node_modules/@murphai/query/dist/projection/schema.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/projection/schema.js +3 -1
- package/node_modules/@murphai/query/dist/projection/schema.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-compose.js +4 -0
- package/node_modules/@murphai/query/dist/projection/wearable-summary-compose.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-projector.js +4 -0
- package/node_modules/@murphai/query/dist/projection/wearable-summary-projector.js.map +1 -1
- package/node_modules/@murphai/query/dist/query-visibility.d.ts +5 -0
- package/node_modules/@murphai/query/dist/query-visibility.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/query-visibility.js +11 -5
- package/node_modules/@murphai/query/dist/query-visibility.js.map +1 -1
- package/node_modules/@murphai/query/dist/read-model.d.ts +8 -0
- package/node_modules/@murphai/query/dist/read-model.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/read-model.js +11 -1
- package/node_modules/@murphai/query/dist/read-model.js.map +1 -1
- package/node_modules/@murphai/query/dist/scheduled-logs.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/scheduled-logs.js +55 -79
- package/node_modules/@murphai/query/dist/scheduled-logs.js.map +1 -1
- package/node_modules/@murphai/query/dist/vault-source.d.ts +22 -4
- package/node_modules/@murphai/query/dist/vault-source.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/vault-source.js +188 -59
- package/node_modules/@murphai/query/dist/vault-source.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/candidates.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/candidates.js +26 -15
- package/node_modules/@murphai/query/dist/wearables/candidates.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/public-output.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/public-output.js +6 -0
- package/node_modules/@murphai/query/dist/wearables/public-output.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/source-health.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/source-health.js +4 -0
- package/node_modules/@murphai/query/dist/wearables/source-health.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/types.d.ts +41 -4
- package/node_modules/@murphai/query/dist/wearables/types.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/types.js +2 -0
- package/node_modules/@murphai/query/dist/wearables/types.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/workout-features.d.ts +5 -0
- package/node_modules/@murphai/query/dist/wearables/workout-features.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/wearables/workout-features.js +179 -0
- package/node_modules/@murphai/query/dist/wearables/workout-features.js.map +1 -0
- package/node_modules/@murphai/query/dist/wearables.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables.js +23 -6
- package/node_modules/@murphai/query/dist/wearables.js.map +1 -1
- package/node_modules/@murphai/query/package.json +5 -0
- package/node_modules/@murphai/runtime-state/README.md +1 -1
- package/node_modules/@murphai/runtime-state/dist/assistant-runtime-issues.d.ts +4 -0
- package/node_modules/@murphai/runtime-state/dist/assistant-runtime-issues.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/assistant-runtime-issues.js +16 -3
- package/node_modules/@murphai/runtime-state/dist/assistant-runtime-issues.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-bundles.d.ts +1 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-bundles.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-bundles.js +31 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-bundles.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-email.d.ts +5 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-email.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-email.js +10 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-email.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/incur-error-bridge.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/incur-error-bridge.js +6 -15
- package/node_modules/@murphai/setup-cli/dist/incur-error-bridge.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/README.md +9 -0
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.d.ts +6 -0
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.js +49 -1
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.js +22 -12
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.js +1 -3
- package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/document-meal-read.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/document-meal-read.js +24 -18
- package/node_modules/@murphai/vault-usecases/dist/usecases/document-meal-read.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/encounter.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/encounter.js +1 -3
- package/node_modules/@murphai/vault-usecases/dist/usecases/encounter.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/event-record-mutations.d.ts +8 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/event-record-mutations.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/event-record-mutations.js +56 -5
- package/node_modules/@murphai/vault-usecases/dist/usecases/event-record-mutations.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/exact-event-record.d.ts +20 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/exact-event-record.d.ts.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/exact-event-record.js +72 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/exact-event-record.js.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.d.ts +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.js +42 -9
- package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/explicit-health-family-services.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/explicit-health-family-services.js +158 -24
- package/node_modules/@murphai/vault-usecases/dist/usecases/explicit-health-family-services.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/food.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/food.js +98 -5
- package/node_modules/@murphai/vault-usecases/dist/usecases/food.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.js +20 -4
- package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.js +49 -24
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.js +13 -11
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.js +18 -11
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.js +43 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.js +1 -3
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/vault-usecase-helpers.d.ts +2 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/vault-usecase-helpers.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/vault-usecase-helpers.js +24 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/vault-usecase-helpers.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-format.d.ts +2 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-format.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-model.d.ts +36 -4
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-model.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-model.js +48 -12
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-model.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-state.d.ts +14 -14
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-state.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-state.js +84 -82
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-state.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live.d.ts +16 -4
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live.js +316 -79
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-read.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-read.js +19 -17
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-read.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout.d.ts +20 -7
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout.js +56 -31
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout.js.map +1 -1
- package/node_modules/incur/dist/Cli.js +7 -32
- package/node_modules/incur/dist/Errors.d.ts +17 -0
- package/node_modules/incur/dist/Errors.js +23 -0
- package/node_modules/incur/dist/internal/command.d.ts +2 -0
- package/node_modules/incur/dist/internal/command.js +2 -6
- package/node_modules/incur/src/Cli.ts +11 -32
- package/node_modules/incur/src/Errors.ts +36 -0
- package/node_modules/incur/src/internal/command.ts +4 -6
- package/package.json +4 -4
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/daily-nutrition-card-safety.md +0 -211
|
@@ -15,7 +15,7 @@ import { emitHostedAssistantContextTimingTrace, emitHostedAssistantContextSessio
|
|
|
15
15
|
import { emitHostedAssistantTurnTimingTrace } from './hosted-turn-timing.js';
|
|
16
16
|
import { deliverAssistantPrecedingReplies, deliverAssistantReaction, deliverAssistantReply as dispatchAssistantReply, deliverAssistantProgressUpdate, finalizeAssistantTurnFromDeliveryOutcome as finalizeDeliveredAssistantTurn, resolveAssistantCurrentAudienceDeliveryFields, resolveAssistantHostedDeliveryIdempotency, } from './delivery-service.js';
|
|
17
17
|
import { applyAssistantReplyDeliveryContext, applyAssistantReplyDeliveryContextOverrides, pickAssistantReplyDeliveryContext, } from './reply-delivery-context.js';
|
|
18
|
-
import { applyAssistantSessionCodexResumeStateAction, clearAssistantSessionCodexResumeState, persistAssistantNoReplyTranscriptMarkers, persistAssistantTurnAndSession as finalizeAssistantTurnArtifacts, resolveAssistantProviderResumeStateAction, } from './turn-finalizer.js';
|
|
18
|
+
import { applyAssistantSessionCodexResumeStateAction, clearAssistantSessionCodexResumeState, persistAssistantNoReplyTranscriptMarkers, persistAssistantTurnAndSession as finalizeAssistantTurnArtifacts, resolveAssistantProviderResumeStateAction, resolveAssistantResumeStateFromProviderTurn, } from './turn-finalizer.js';
|
|
19
19
|
import { bindAssistantResumeStateToThreadCompatibility, } from './codex-resume-binding.js';
|
|
20
20
|
import { readAssistantCodexResume, } from './conversation-persistence.js';
|
|
21
21
|
import { appendAssistantTurnReceiptEvent, createAssistantTurnReceipt, finalizeAssistantTurnReceipt, } from './turns.js';
|
|
@@ -36,6 +36,7 @@ import { assistantDeliveryOutcomeSupersedesTypingIndicator, startAssistantChanne
|
|
|
36
36
|
import { createAssistantProgressDelivery, resolveAssistantProductFeedbackAcceptedInputIds, shouldCreateAssistantProgressDelivery, } from './turn-progress.js';
|
|
37
37
|
import { createAssistantHostedToolContext, } from './hosted-tool-context.js';
|
|
38
38
|
import { resolveAssistantUserActionAcceptedInputIds, } from '../assistant-codex/dynamic-tools/phone-calls.js';
|
|
39
|
+
import { snapshotAnalyzeVideoAttachmentAuthorities, } from '../assistant-codex/analyze-video-tool.js';
|
|
39
40
|
import { createAssistantRuntimeStateService } from './runtime-state-service.js';
|
|
40
41
|
import { requestAssistantVaultFileSend, resolveAssistantVaultFileSendTargetFingerprint, } from './vault-file-send.js';
|
|
41
42
|
import { assertAssistantAcceptedTurnInputAssistantInputEventsExist, assertAssistantAcceptedTurnInputItemInputsAssistantInputEventsExist, } from './active-turn-input-journal.js';
|
|
@@ -49,6 +50,87 @@ import { withAssistantTurnLock } from './turn-lock.js';
|
|
|
49
50
|
export { buildResolveAssistantSessionInput } from './session-resolution.js';
|
|
50
51
|
const DEFAULT_INITIAL_ACCEPTED_TURN_INPUT_ID = 'initial';
|
|
51
52
|
const PHONE_CALL_MANUAL_ACCEPTED_TURN_INPUT_ID_PREFIX = 'manual-phone-call:';
|
|
53
|
+
const ASSISTANT_GROUP_REPLY_RECONSIDERATION_INSTRUCTION = [
|
|
54
|
+
'Additional group messages joined this turn.',
|
|
55
|
+
'Replace the draft with one final result under the group turn rules.',
|
|
56
|
+
'The unsent draft neither answers a request nor keeps Murph\'s floor; the latest accepted message decides who owns the updated beat.',
|
|
57
|
+
'If the latest accepted message gives another human the floor, finish without a reply.',
|
|
58
|
+
'Treat every request answered only in the unsent draft as unanswered; if Murph still owns the beat, include every still-relevant answer in the final result. Response text is not a completed effect.',
|
|
59
|
+
'Do not repeat completed effects or mention the draft or this instruction.',
|
|
60
|
+
].join(' ');
|
|
61
|
+
function shouldHoldAssistantGroupReplyDraft(input) {
|
|
62
|
+
const channel = normalizeNullableString(input.plan.conversationPolicy.audience.channel)?.toLowerCase() ?? normalizeNullableString(input.message.channel)?.toLowerCase();
|
|
63
|
+
return (input.message.deliverResponse === true &&
|
|
64
|
+
input.message.turnTrigger === 'automation-auto-reply' &&
|
|
65
|
+
input.message.scheduledOccurrenceAt == null &&
|
|
66
|
+
input.message.scheduledInvocationAuthority == null &&
|
|
67
|
+
resolveAssistantConversationScope(input.plan.conversationPolicy.audience) === 'group' &&
|
|
68
|
+
(channel === 'linq' || channel === 'telegram'));
|
|
69
|
+
}
|
|
70
|
+
function appendAssistantTurnContext(current, addition) {
|
|
71
|
+
return [normalizeNullableString(current), addition]
|
|
72
|
+
.filter((part) => part !== null)
|
|
73
|
+
.join('\n\n');
|
|
74
|
+
}
|
|
75
|
+
function applyAssistantProviderTurnResumeInMemory(input) {
|
|
76
|
+
const resumeState = resolveAssistantResumeStateFromProviderTurn({
|
|
77
|
+
assistantContractFingerprint: input.providerResult.assistantContractFingerprint,
|
|
78
|
+
codexRolloutRelativePath: input.providerResult.codexRolloutRelativePath,
|
|
79
|
+
codexThreadId: input.providerResult.codexThreadId,
|
|
80
|
+
routeFingerprint: readCodexThreadRouteFingerprint(input.providerResult.route),
|
|
81
|
+
threadCompatibilityFingerprint: readCodexThreadCompatibilityFingerprint(input.providerResult.route),
|
|
82
|
+
});
|
|
83
|
+
if (!resumeState) {
|
|
84
|
+
throw new VaultCliError('ASSISTANT_GROUP_DRAFT_CONTINUATION_UNAVAILABLE', 'The unsent group reply could not be reconsidered in the same provider thread.');
|
|
85
|
+
}
|
|
86
|
+
return {
|
|
87
|
+
...input.session,
|
|
88
|
+
codexResume: resumeState,
|
|
89
|
+
resumeState,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
92
|
+
function rebaseAssistantProviderResultDeliveryContexts(input) {
|
|
93
|
+
if (input.baseOrdinal === 0) {
|
|
94
|
+
return input.providerResult;
|
|
95
|
+
}
|
|
96
|
+
return {
|
|
97
|
+
...input.providerResult,
|
|
98
|
+
acceptedNoReplyDeliveryContextOrdinals: input.providerResult.acceptedNoReplyDeliveryContextOrdinals?.map((ordinal) => ordinal + input.baseOrdinal),
|
|
99
|
+
precedingResponseSegments: input.providerResult.precedingResponseSegments?.map((segment) => ({
|
|
100
|
+
...segment,
|
|
101
|
+
deliveryContextOrdinal: segment.deliveryContextOrdinal + input.baseOrdinal,
|
|
102
|
+
})),
|
|
103
|
+
reactions: input.providerResult.reactions?.map((reaction) => ({
|
|
104
|
+
...reaction,
|
|
105
|
+
deliveryContextOrdinal: reaction.deliveryContextOrdinal + input.baseOrdinal,
|
|
106
|
+
})),
|
|
107
|
+
responseDeliveryContextOrdinal: input.providerResult.responseDeliveryContextOrdinal + input.baseOrdinal,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
function selectAssistantGroupProviderResult(providerResult) {
|
|
111
|
+
const noReplySelected = providerResult.finalAction?.kind === 'none';
|
|
112
|
+
return {
|
|
113
|
+
...providerResult,
|
|
114
|
+
acceptedNoReplyDeliveryContextOrdinals: noReplySelected
|
|
115
|
+
? [
|
|
116
|
+
providerResult.acceptedNoReplyDeliveryContextOrdinals?.at(-1)
|
|
117
|
+
?? providerResult.responseDeliveryContextOrdinal,
|
|
118
|
+
]
|
|
119
|
+
: [],
|
|
120
|
+
precedingResponseSegments: [],
|
|
121
|
+
reactions: noReplySelected
|
|
122
|
+
? providerResult.reactions?.slice(-1)
|
|
123
|
+
: [],
|
|
124
|
+
...(noReplySelected
|
|
125
|
+
? {
|
|
126
|
+
response: '',
|
|
127
|
+
responseCard: null,
|
|
128
|
+
responseMedia: [],
|
|
129
|
+
transcriptResponse: null,
|
|
130
|
+
}
|
|
131
|
+
: {}),
|
|
132
|
+
};
|
|
133
|
+
}
|
|
52
134
|
function resolveAssistantProgressDeliveryChannel(input) {
|
|
53
135
|
return normalizeNullableString(input.sharedPlan.conversationPolicy.audience.channel)
|
|
54
136
|
?? normalizeNullableString(input.session.binding.channel);
|
|
@@ -294,6 +376,10 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
294
376
|
});
|
|
295
377
|
const promptBuildStartedAt = Date.now();
|
|
296
378
|
const sharedPlan = await buildAssistantTurnSharedPlan(input, resolved);
|
|
379
|
+
const holdGroupReplyDraft = shouldHoldAssistantGroupReplyDraft({
|
|
380
|
+
message: input,
|
|
381
|
+
plan: sharedPlan,
|
|
382
|
+
});
|
|
297
383
|
const promptBuildMs = elapsedSince(promptBuildStartedAt);
|
|
298
384
|
const route = resolveAssistantTurnRoute(input, defaults, resolved);
|
|
299
385
|
const receipt = await createAssistantTurnReceipt({
|
|
@@ -326,6 +412,7 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
326
412
|
};
|
|
327
413
|
let currentSession = resolved.session;
|
|
328
414
|
let deliverySupersededTypingIndicator = false;
|
|
415
|
+
let providerRequestOrdinal = 0;
|
|
329
416
|
try {
|
|
330
417
|
if (resolveAssistantConversationScope(sharedPlan.conversationPolicy.audience) === 'unverified-external') {
|
|
331
418
|
userTurn = await persistUserTurn(input, resolved, sharedPlan, receipt.turnId);
|
|
@@ -343,6 +430,32 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
343
430
|
return completed.result;
|
|
344
431
|
}
|
|
345
432
|
const runtimeState = createAssistantRuntimeStateService(input.vault);
|
|
433
|
+
const analyzeVideoAttachmentAuthorities = new Map();
|
|
434
|
+
const snapshottedAnalyzeVideoInputIds = new Set();
|
|
435
|
+
const snapshotAnalyzeVideoAuthorities = async (acceptedInputIds) => {
|
|
436
|
+
const newInputIds = acceptedInputIds.filter((acceptedInputId) => {
|
|
437
|
+
if (snapshottedAnalyzeVideoInputIds.has(acceptedInputId)) {
|
|
438
|
+
return false;
|
|
439
|
+
}
|
|
440
|
+
snapshottedAnalyzeVideoInputIds.add(acceptedInputId);
|
|
441
|
+
return true;
|
|
442
|
+
});
|
|
443
|
+
if (newInputIds.length === 0)
|
|
444
|
+
return;
|
|
445
|
+
const authorities = await snapshotAnalyzeVideoAttachmentAuthorities({
|
|
446
|
+
acceptedInputIds: newInputIds,
|
|
447
|
+
vaultRoot: input.vault,
|
|
448
|
+
});
|
|
449
|
+
for (const authority of authorities) {
|
|
450
|
+
const key = JSON.stringify([
|
|
451
|
+
authority.messageRef,
|
|
452
|
+
authority.ordinal,
|
|
453
|
+
]);
|
|
454
|
+
if (!analyzeVideoAttachmentAuthorities.has(key)) {
|
|
455
|
+
analyzeVideoAttachmentAuthorities.set(key, authority);
|
|
456
|
+
}
|
|
457
|
+
}
|
|
458
|
+
};
|
|
346
459
|
const preProviderSteerAcceptedInputJournals = new Map();
|
|
347
460
|
const turnInputController = createAssistantActiveTurnInputController({
|
|
348
461
|
acceptedInputValidator: async ({ acceptedInputs }) => {
|
|
@@ -350,6 +463,7 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
350
463
|
inputs: acceptedInputs,
|
|
351
464
|
vault: input.vault,
|
|
352
465
|
});
|
|
466
|
+
await snapshotAnalyzeVideoAuthorities(acceptedInputs.map((acceptedInput) => acceptedInput.id));
|
|
353
467
|
},
|
|
354
468
|
admissionHook: input.activeTurnInput,
|
|
355
469
|
beforeProviderSteer: input.beforeProviderAcceptedInputs
|
|
@@ -363,6 +477,7 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
363
477
|
journal: acceptedInputJournal,
|
|
364
478
|
vault: input.vault,
|
|
365
479
|
});
|
|
480
|
+
await snapshotAnalyzeVideoAuthorities(acceptedInputJournal.inputIds);
|
|
366
481
|
const releaseProviderAcceptedInputs = await input.beforeProviderAcceptedInputs?.({
|
|
367
482
|
...event,
|
|
368
483
|
turnId: receipt.turnId,
|
|
@@ -376,6 +491,7 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
376
491
|
resolveAssistantConversationLookupKey(input),
|
|
377
492
|
].filter((key) => key !== null),
|
|
378
493
|
sessionId: resolved.session.sessionId,
|
|
494
|
+
signal: input.abortSignal,
|
|
379
495
|
turnId: receipt.turnId,
|
|
380
496
|
vault: input.vault,
|
|
381
497
|
});
|
|
@@ -400,6 +516,7 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
400
516
|
journal: initialAcceptedInputJournal,
|
|
401
517
|
vault: input.vault,
|
|
402
518
|
});
|
|
519
|
+
await snapshotAnalyzeVideoAuthorities(initialAcceptedInputJournal.inputIds);
|
|
403
520
|
const threadScope = resolveAssistantCodexThreadScope({});
|
|
404
521
|
const turnTimingStartedAt = lockAcquiredAt;
|
|
405
522
|
let currentInput = input;
|
|
@@ -432,6 +549,8 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
432
549
|
? createAssistantProgressDelivery({
|
|
433
550
|
deliver: async (progressInput) => {
|
|
434
551
|
const deliveryContextOrdinal = progressInput.deliveryContextOrdinal ?? 0;
|
|
552
|
+
const absoluteDeliveryContextOrdinal = providerRequestDeliveryContextBaseOrdinal +
|
|
553
|
+
deliveryContextOrdinal;
|
|
435
554
|
const { targetInputId, ...untargetedProgressInput } = progressInput;
|
|
436
555
|
if (targetInputId) {
|
|
437
556
|
await beforeHostedToolExecution(deliveryContextOrdinal);
|
|
@@ -440,7 +559,7 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
440
559
|
? {
|
|
441
560
|
...untargetedProgressInput,
|
|
442
561
|
input: await applyAssistantAcceptedMessageTargetToDeliveryInput({
|
|
443
|
-
acceptedInputIds: resolveAcceptedInputIdsThroughDeliveryContextOrdinal(
|
|
562
|
+
acceptedInputIds: resolveAcceptedInputIdsThroughDeliveryContextOrdinal(absoluteDeliveryContextOrdinal),
|
|
444
563
|
action: 'native-reply',
|
|
445
564
|
input: progressInput.input,
|
|
446
565
|
session: progressInput.session,
|
|
@@ -534,6 +653,9 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
534
653
|
messageInput: currentInput,
|
|
535
654
|
session: currentSession,
|
|
536
655
|
}),
|
|
656
|
+
getAnalyzeVideoAttachmentAuthorities: () => [
|
|
657
|
+
...analyzeVideoAttachmentAuthorities.values(),
|
|
658
|
+
],
|
|
537
659
|
getConversationScope: () => resolveAssistantConversationScope(sharedPlan.conversationPolicy.audience),
|
|
538
660
|
getUserActionAcceptedInputIds: () => resolveAssistantUserActionAcceptedInputIds({
|
|
539
661
|
acceptedInputItems: acceptedInputItemsForProviderRequest,
|
|
@@ -651,7 +773,9 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
651
773
|
: null;
|
|
652
774
|
let providerResult = null;
|
|
653
775
|
let userPromptPersistedToTranscript = currentUserTurn.userPersisted;
|
|
654
|
-
|
|
776
|
+
let providerRequestDeliveryContextBaseOrdinal = 0;
|
|
777
|
+
let nextUsageRecordOrdinal = 0;
|
|
778
|
+
const heldGroupAcceptedTranscriptInputs = [];
|
|
655
779
|
const persistInitialUserPromptToTranscriptIfNeeded = async (persistInput) => {
|
|
656
780
|
if (userPromptPersistedToTranscript) {
|
|
657
781
|
return;
|
|
@@ -685,13 +809,34 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
685
809
|
});
|
|
686
810
|
}
|
|
687
811
|
};
|
|
812
|
+
const persistAcceptedActiveTurnInputTranscripts = async (persistInput) => {
|
|
813
|
+
const transcriptRefsByInputId = await appendAcceptedActiveTurnInputTranscriptEntries({
|
|
814
|
+
acceptedInput: persistInput.acceptedInput,
|
|
815
|
+
acceptedInputItems: persistInput.acceptedInputItems,
|
|
816
|
+
sessionId: resolved.session.sessionId,
|
|
817
|
+
turnId: currentUserTurn.turnId,
|
|
818
|
+
vault: currentInput.vault,
|
|
819
|
+
});
|
|
820
|
+
const transcriptRefUpdates = resolveAcceptedTurnInputTranscriptRefUpdates({
|
|
821
|
+
inputs: persistInput.acceptedInputItems,
|
|
822
|
+
transcriptRefsByInputId,
|
|
823
|
+
});
|
|
824
|
+
if (transcriptRefUpdates.length > 0) {
|
|
825
|
+
await runtimeState.turns.acceptedInputs.updateTranscriptRefs({
|
|
826
|
+
refs: transcriptRefUpdates,
|
|
827
|
+
turnId: currentUserTurn.turnId,
|
|
828
|
+
});
|
|
829
|
+
}
|
|
830
|
+
};
|
|
688
831
|
const acceptActiveTurnInput = async (acceptanceInput) => {
|
|
689
832
|
const previousInput = currentInput;
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
833
|
+
if (!holdGroupReplyDraft) {
|
|
834
|
+
await persistInitialUserPromptToTranscriptIfNeeded({
|
|
835
|
+
detail: 'user prompt persisted before active-turn input',
|
|
836
|
+
prompt: previousInput.prompt,
|
|
837
|
+
vault: previousInput.vault,
|
|
838
|
+
});
|
|
839
|
+
}
|
|
695
840
|
const acceptedInputItems = resolveAcceptedActiveTurnInputItems({
|
|
696
841
|
acceptedInput: acceptanceInput.activeTurnInput,
|
|
697
842
|
input: currentInput,
|
|
@@ -704,7 +849,7 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
704
849
|
inputs: acceptedInputItems,
|
|
705
850
|
});
|
|
706
851
|
}
|
|
707
|
-
|
|
852
|
+
const acceptedInputJournal = preProviderSteerJournal ??
|
|
708
853
|
await runtimeState.turns.acceptedInputs.append({
|
|
709
854
|
inputs: acceptedInputItems,
|
|
710
855
|
sessionId: resolved.session.sessionId,
|
|
@@ -715,23 +860,17 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
715
860
|
journal: acceptedInputJournal,
|
|
716
861
|
vault: currentInput.vault,
|
|
717
862
|
});
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
if (transcriptRefUpdates.length > 0) {
|
|
730
|
-
acceptedInputJournal =
|
|
731
|
-
await runtimeState.turns.acceptedInputs.updateTranscriptRefs({
|
|
732
|
-
refs: transcriptRefUpdates,
|
|
733
|
-
turnId: currentUserTurn.turnId,
|
|
734
|
-
}) ?? acceptedInputJournal;
|
|
863
|
+
if (holdGroupReplyDraft) {
|
|
864
|
+
heldGroupAcceptedTranscriptInputs.push({
|
|
865
|
+
acceptedInput: acceptanceInput.activeTurnInput,
|
|
866
|
+
acceptedInputItems,
|
|
867
|
+
});
|
|
868
|
+
}
|
|
869
|
+
else {
|
|
870
|
+
await persistAcceptedActiveTurnInputTranscripts({
|
|
871
|
+
acceptedInput: acceptanceInput.activeTurnInput,
|
|
872
|
+
acceptedInputItems,
|
|
873
|
+
});
|
|
735
874
|
}
|
|
736
875
|
await appendAssistantTurnReceiptEvent({
|
|
737
876
|
vault: currentInput.vault,
|
|
@@ -754,7 +893,17 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
754
893
|
acceptedInput: acceptanceInput.activeTurnInput,
|
|
755
894
|
input: previousInput,
|
|
756
895
|
});
|
|
757
|
-
currentInput =
|
|
896
|
+
currentInput =
|
|
897
|
+
holdGroupReplyDraft
|
|
898
|
+
? {
|
|
899
|
+
...nextInput,
|
|
900
|
+
prompt: `${previousInput.prompt}\n\n${nextInput.prompt}`,
|
|
901
|
+
userMessageContent: [
|
|
902
|
+
...(previousInput.userMessageContent ?? []),
|
|
903
|
+
...(acceptanceInput.activeTurnInput.userMessageContent ?? []),
|
|
904
|
+
],
|
|
905
|
+
}
|
|
906
|
+
: nextInput;
|
|
758
907
|
acceptedInputIdsForProviderRequest = acceptedInputJournal.inputIds;
|
|
759
908
|
acceptedInputItemsForProviderRequest = acceptedInputJournal.inputs;
|
|
760
909
|
return {
|
|
@@ -795,10 +944,12 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
795
944
|
];
|
|
796
945
|
}
|
|
797
946
|
const authorizeAcceptedMessageTarget = async (authorizationInput) => {
|
|
947
|
+
const deliveryContextOrdinal = providerRequestDeliveryContextBaseOrdinal +
|
|
948
|
+
authorizationInput.deliveryContextOrdinal;
|
|
798
949
|
const acceptedInputIds = authorizationInput.action === 'participant-effect'
|
|
799
|
-
? resolveAcceptedInputIdsThroughDeliveryContextOrdinal(
|
|
800
|
-
: acceptedInputIdsByDeliveryContextOrdinal[
|
|
801
|
-
const deliveryContext = replyDeliveryContexts[
|
|
950
|
+
? resolveAcceptedInputIdsThroughDeliveryContextOrdinal(deliveryContextOrdinal)
|
|
951
|
+
: acceptedInputIdsByDeliveryContextOrdinal[deliveryContextOrdinal];
|
|
952
|
+
const deliveryContext = replyDeliveryContexts[deliveryContextOrdinal];
|
|
802
953
|
if (!acceptedInputIds || !deliveryContext) {
|
|
803
954
|
return null;
|
|
804
955
|
}
|
|
@@ -926,113 +1077,402 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
926
1077
|
await drainLiveSteeredActiveTurnInputs({
|
|
927
1078
|
continuation: providerRequestContinuation,
|
|
928
1079
|
sessionId: currentSession.sessionId,
|
|
929
|
-
throughDeliveryContextOrdinal
|
|
1080
|
+
throughDeliveryContextOrdinal: providerRequestDeliveryContextBaseOrdinal +
|
|
1081
|
+
throughDeliveryContextOrdinal,
|
|
930
1082
|
});
|
|
931
1083
|
};
|
|
932
|
-
const
|
|
933
|
-
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
1084
|
+
const commitSelectedNoReply = async (selectedProviderResult) => {
|
|
1085
|
+
if (selectedProviderResult.finalAction?.kind !== 'none') {
|
|
1086
|
+
return;
|
|
1087
|
+
}
|
|
1088
|
+
await persistInitialUserPromptToTranscriptIfNeeded({
|
|
1089
|
+
detail: 'user prompt persisted before no-reply completion',
|
|
1090
|
+
prompt: currentInput.prompt,
|
|
1091
|
+
vault: currentInput.vault,
|
|
1092
|
+
});
|
|
1093
|
+
const deliveryContextOrdinal = selectedProviderResult.acceptedNoReplyDeliveryContextOrdinals?.at(-1)
|
|
1094
|
+
?? selectedProviderResult.responseDeliveryContextOrdinal;
|
|
1095
|
+
await currentInput.onFinishWithoutReplyAccepted?.({
|
|
1096
|
+
acceptedInputIds: resolveAcceptedInputIdsThroughDeliveryContextOrdinal(deliveryContextOrdinal),
|
|
1097
|
+
deliveryContextOrdinal,
|
|
1098
|
+
messageReactionPending: (selectedProviderResult.reactions ?? []).some((reaction) => reaction.deliveryContextOrdinal <= deliveryContextOrdinal),
|
|
1099
|
+
});
|
|
1100
|
+
};
|
|
1101
|
+
const runCurrentProviderRequest = async (requestInput) => {
|
|
1102
|
+
providerRequestJournal = null;
|
|
1103
|
+
providerRequestContinuation = null;
|
|
1104
|
+
providerRequestAcceptedInputIds = acceptedInputIdsForProviderRequest;
|
|
1105
|
+
providerRequestAcceptedInputItems = acceptedInputItemsForProviderRequest;
|
|
1106
|
+
providerRequestStartedAtMs = null;
|
|
1107
|
+
providerResultReturnedAt = null;
|
|
1108
|
+
const onFirstAssistantResponseCompleted = () => {
|
|
1109
|
+
if (holdGroupReplyDraft && providerRequestOrdinal === 0) {
|
|
1110
|
+
turnInputController.pauseProviderSteering();
|
|
1111
|
+
}
|
|
1112
|
+
else {
|
|
1113
|
+
turnInputController.closeTurnAdmission();
|
|
1114
|
+
}
|
|
1115
|
+
};
|
|
1116
|
+
const activeTurnSteering = {
|
|
1117
|
+
onFirstAssistantResponseCompleted,
|
|
1118
|
+
registerLiveProviderTurn: (liveTurn) => turnInputController.registerLiveProviderTurn(liveTurn),
|
|
1119
|
+
};
|
|
1120
|
+
const providerOutcome = await executeCodexTurnWithRecovery({
|
|
1121
|
+
acceptedInputItems: providerRequestAcceptedInputItems,
|
|
1122
|
+
activeTurnSteering,
|
|
1123
|
+
authorizeAcceptedMessageTarget,
|
|
1124
|
+
input: currentInput,
|
|
1125
|
+
onFinishWithoutReplyAccepted: async (event) => {
|
|
1126
|
+
onFirstAssistantResponseCompleted();
|
|
1127
|
+
const deliveryContextOrdinal = providerRequestDeliveryContextBaseOrdinal +
|
|
1128
|
+
event.deliveryContextOrdinal;
|
|
1129
|
+
await drainLiveSteeredActiveTurnInputs({
|
|
1130
|
+
continuation: providerRequestContinuation,
|
|
1131
|
+
sessionId: currentSession.sessionId,
|
|
1132
|
+
throughDeliveryContextOrdinal: deliveryContextOrdinal,
|
|
1133
|
+
});
|
|
1134
|
+
if (!holdGroupReplyDraft) {
|
|
1135
|
+
await persistInitialUserPromptToTranscriptIfNeeded({
|
|
1136
|
+
detail: 'user prompt persisted before no-reply completion',
|
|
1137
|
+
prompt: currentInput.prompt,
|
|
1138
|
+
vault: currentInput.vault,
|
|
1139
|
+
});
|
|
1140
|
+
const acceptedInputIds = resolveAcceptedInputIdsThroughDeliveryContextOrdinal(deliveryContextOrdinal);
|
|
1141
|
+
await currentInput.onFinishWithoutReplyAccepted?.({
|
|
1142
|
+
acceptedInputIds,
|
|
1143
|
+
deliveryContextOrdinal,
|
|
1144
|
+
messageReactionPending: event.messageReactionPending,
|
|
1145
|
+
});
|
|
1146
|
+
}
|
|
1147
|
+
},
|
|
1148
|
+
onFinishWithoutReplyRecorded: async (event) => {
|
|
1149
|
+
if (!holdGroupReplyDraft) {
|
|
1150
|
+
await persistAssistantNoReplyTranscriptMarkers({
|
|
1151
|
+
deliveryContextOrdinals: [
|
|
1152
|
+
providerRequestDeliveryContextBaseOrdinal +
|
|
1153
|
+
event.deliveryContextOrdinal,
|
|
1154
|
+
],
|
|
1155
|
+
sessionId: currentSession.sessionId,
|
|
1156
|
+
turnCreatedAt: currentUserTurn.turnCreatedAt,
|
|
1157
|
+
turnId: currentUserTurn.turnId,
|
|
1158
|
+
vault: input.vault,
|
|
1159
|
+
});
|
|
1160
|
+
}
|
|
1161
|
+
},
|
|
1162
|
+
onProviderRequestPlanned: async (event) => {
|
|
1163
|
+
providerRequestContinuation = event.codexContinuation;
|
|
1164
|
+
providerRequestJournal =
|
|
1165
|
+
await runtimeState.turns.acceptedInputs.recordProviderRequest({
|
|
1166
|
+
continuation: event.codexContinuation,
|
|
1167
|
+
ordinal: providerRequestOrdinal,
|
|
1168
|
+
providerAttemptId: event.providerAttemptId,
|
|
1169
|
+
turnId: currentUserTurn.turnId,
|
|
1170
|
+
});
|
|
1171
|
+
providerRequestAcceptedInputIds =
|
|
1172
|
+
providerRequestJournal?.inputIds ?? acceptedInputIdsForProviderRequest;
|
|
1173
|
+
providerRequestAcceptedInputItems =
|
|
1174
|
+
providerRequestJournal?.inputs ?? acceptedInputItemsForProviderRequest;
|
|
1175
|
+
acceptedInputIdsForProviderRequest = providerRequestAcceptedInputIds;
|
|
1176
|
+
acceptedInputItemsForProviderRequest = providerRequestAcceptedInputItems;
|
|
1177
|
+
return await input.beforeProviderAcceptedInputs?.({
|
|
1178
|
+
acceptedInputs: providerRequestAcceptedInputItems,
|
|
1179
|
+
turnId: currentUserTurn.turnId,
|
|
1180
|
+
});
|
|
1181
|
+
},
|
|
1182
|
+
onProviderRequestStarted: (event) => {
|
|
1183
|
+
const startedAtMs = Date.parse(event.startedAt);
|
|
1184
|
+
if (Number.isFinite(startedAtMs)) {
|
|
1185
|
+
providerRequestStartedAtMs = startedAtMs;
|
|
1186
|
+
}
|
|
1187
|
+
if (!currentInput.onProviderRequestStarted) {
|
|
1188
|
+
return;
|
|
1189
|
+
}
|
|
1190
|
+
return currentInput.onProviderRequestStarted({
|
|
1191
|
+
...event,
|
|
1192
|
+
acceptedInputIds: providerRequestAcceptedInputIds,
|
|
1193
|
+
admissionMs,
|
|
1194
|
+
preProviderSetupMs,
|
|
1195
|
+
promptBuildMs,
|
|
1196
|
+
providerRequestOrdinal: event.providerRequestOrdinal ?? providerRequestOrdinal,
|
|
1197
|
+
sessionResolveMs,
|
|
1198
|
+
turnLockWaitMs,
|
|
1199
|
+
});
|
|
1200
|
+
},
|
|
1201
|
+
route,
|
|
1202
|
+
plan: sharedPlan,
|
|
1203
|
+
profile: {
|
|
1204
|
+
threadScope,
|
|
1205
|
+
},
|
|
1206
|
+
providerRequestOrdinal,
|
|
1207
|
+
...(providerStartAtPreProviderSetupDone
|
|
1208
|
+
? {
|
|
1209
|
+
providerStartCriticalPath: providerStartAtPreProviderSetupDone,
|
|
1210
|
+
}
|
|
1211
|
+
: {}),
|
|
1212
|
+
resolvedSession: currentSession,
|
|
1213
|
+
turnCreatedAt: currentUserTurn.turnCreatedAt,
|
|
1214
|
+
progressDelivery,
|
|
1215
|
+
hostedToolContext,
|
|
1216
|
+
turnId: currentUserTurn.turnId,
|
|
1217
|
+
});
|
|
1218
|
+
providerResultReturnedAt = Date.now();
|
|
1219
|
+
emitTurnTiming({
|
|
1220
|
+
elapsedMs: elapsedSince(turnTimingStartedAt),
|
|
1221
|
+
providerOutcomeKind: providerOutcome.kind,
|
|
1222
|
+
providerRequestElapsedMs: providerRequestStartedAtMs === null
|
|
1223
|
+
? null
|
|
1224
|
+
: Math.max(0, providerResultReturnedAt - providerRequestStartedAtMs),
|
|
1225
|
+
providerRequestOrdinal,
|
|
1226
|
+
sinceProviderResultMs: 0,
|
|
1227
|
+
stage: 'provider-result-returned',
|
|
1228
|
+
});
|
|
1229
|
+
if (providerOutcome.kind === 'failed_terminal') {
|
|
1230
|
+
if (!providerRequestJournal) {
|
|
1231
|
+
providerRequestJournal =
|
|
1232
|
+
await runtimeState.turns.acceptedInputs.recordProviderRequest({
|
|
1233
|
+
continuation: providerOutcome.codexContinuation,
|
|
1234
|
+
ordinal: providerRequestOrdinal,
|
|
1235
|
+
providerAttemptId: null,
|
|
1236
|
+
turnId: currentUserTurn.turnId,
|
|
1237
|
+
});
|
|
1238
|
+
providerRequestAcceptedInputIds =
|
|
1239
|
+
providerRequestJournal?.inputIds ?? acceptedInputIdsForProviderRequest;
|
|
1240
|
+
providerRequestAcceptedInputItems =
|
|
1241
|
+
providerRequestJournal?.inputs ?? acceptedInputItemsForProviderRequest;
|
|
1242
|
+
acceptedInputIdsForProviderRequest = providerRequestAcceptedInputIds;
|
|
1243
|
+
acceptedInputItemsForProviderRequest = providerRequestAcceptedInputItems;
|
|
1244
|
+
}
|
|
1245
|
+
else {
|
|
1246
|
+
providerRequestJournal =
|
|
1247
|
+
await runtimeState.turns.acceptedInputs.updateProviderRequest({
|
|
1248
|
+
continuation: providerOutcome.codexContinuation,
|
|
1249
|
+
ordinal: providerRequestOrdinal,
|
|
1250
|
+
providerAttemptId: null,
|
|
1251
|
+
turnId: currentUserTurn.turnId,
|
|
1252
|
+
}) ?? providerRequestJournal;
|
|
1253
|
+
providerRequestAcceptedInputIds =
|
|
1254
|
+
providerRequestJournal?.inputIds ?? providerRequestAcceptedInputIds;
|
|
1255
|
+
providerRequestAcceptedInputItems =
|
|
1256
|
+
providerRequestJournal?.inputs ?? providerRequestAcceptedInputItems;
|
|
1257
|
+
acceptedInputIdsForProviderRequest = providerRequestAcceptedInputIds;
|
|
1258
|
+
acceptedInputItemsForProviderRequest = providerRequestAcceptedInputItems;
|
|
1259
|
+
}
|
|
1260
|
+
const failedProviderResult = {
|
|
1261
|
+
attemptCount: providerOutcome.attemptCount,
|
|
1262
|
+
provider: providerOutcome.route.provider,
|
|
1263
|
+
providerOptions: providerOutcome.route.providerOptions,
|
|
1264
|
+
route: providerOutcome.route,
|
|
1265
|
+
session: providerOutcome.session,
|
|
1266
|
+
usage: providerOutcome.usage,
|
|
1267
|
+
usageAttribution: providerOutcome.usageAttribution,
|
|
1268
|
+
};
|
|
1269
|
+
const acceptedNoReplyOrdinals = providerOutcome.acceptedNoReplyDeliveryContextOrdinals ?? [];
|
|
1270
|
+
const latestAcceptedDeliveryContextOrdinal = replyDeliveryContexts.length - 1;
|
|
1271
|
+
const recoverableNoReplyDeliveryContextOrdinal = latestAcceptedDeliveryContextOrdinal >= 0 &&
|
|
1272
|
+
acceptedNoReplyOrdinals.includes(latestAcceptedDeliveryContextOrdinal)
|
|
1273
|
+
? latestAcceptedDeliveryContextOrdinal
|
|
1274
|
+
: null;
|
|
1275
|
+
if (recoverableNoReplyDeliveryContextOrdinal === null ||
|
|
1276
|
+
!requestInput.allowFailedNoReplyRecovery) {
|
|
1277
|
+
await drainLiveSteeredActiveTurnInputs({
|
|
1278
|
+
continuation: providerOutcome.codexContinuation,
|
|
1279
|
+
sessionId: providerOutcome.session.sessionId,
|
|
1280
|
+
});
|
|
1281
|
+
}
|
|
1282
|
+
const usageRecordStartedAt = Date.now();
|
|
1283
|
+
const primaryUsageRecordOrdinal = nextUsageRecordOrdinal;
|
|
1284
|
+
nextUsageRecordOrdinal += 1;
|
|
1285
|
+
await recordAssistantUsageEvent({
|
|
1286
|
+
executionContext,
|
|
1287
|
+
...(providerRequestStartedAtMs === null
|
|
1288
|
+
? {}
|
|
1289
|
+
: { occurredAt: new Date(providerRequestStartedAtMs).toISOString() }),
|
|
1290
|
+
providerRequestAcceptedInputIds,
|
|
1291
|
+
providerRequestOrdinal: primaryUsageRecordOrdinal,
|
|
1292
|
+
providerRequestOutcome: providerOutcome.providerRequestOutcome,
|
|
1293
|
+
providerResult: failedProviderResult,
|
|
1294
|
+
turnId: currentUserTurn.turnId,
|
|
947
1295
|
});
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
1296
|
+
emitTurnTiming({
|
|
1297
|
+
elapsedMs: elapsedSince(turnTimingStartedAt),
|
|
1298
|
+
providerRequestOrdinal,
|
|
1299
|
+
sinceProviderResultMs: providerResultReturnedAt === null
|
|
1300
|
+
? null
|
|
1301
|
+
: elapsedSince(providerResultReturnedAt),
|
|
1302
|
+
stage: 'usage-recorded',
|
|
1303
|
+
stepElapsedMs: elapsedSince(usageRecordStartedAt),
|
|
953
1304
|
});
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
958
|
-
|
|
959
|
-
|
|
1305
|
+
const additionalUsages = providerOutcome.additionalUsages?.map((usageDraft) => ({
|
|
1306
|
+
...usageDraft,
|
|
1307
|
+
providerRequestOrdinal: nextUsageRecordOrdinal++,
|
|
1308
|
+
}));
|
|
1309
|
+
await recordAdditionalAssistantUsageEvents({
|
|
1310
|
+
additionalUsages,
|
|
1311
|
+
effectiveEnv: currentInput.turnEnvironment?.env ?? process.env,
|
|
1312
|
+
executionContext,
|
|
1313
|
+
providerRequestAcceptedInputIds,
|
|
1314
|
+
providerResult: failedProviderResult,
|
|
960
1315
|
turnId: currentUserTurn.turnId,
|
|
961
|
-
vault: input.vault,
|
|
962
1316
|
});
|
|
963
|
-
|
|
964
|
-
|
|
965
|
-
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
969
|
-
|
|
970
|
-
|
|
971
|
-
|
|
1317
|
+
const failedProviderResumeStateAction = providerRequestOrdinal === 1
|
|
1318
|
+
? 'preserve-existing'
|
|
1319
|
+
: resolveAssistantProviderResumeStateAction({
|
|
1320
|
+
codexThreadId: providerOutcome.codexThreadId ?? null,
|
|
1321
|
+
threadScope,
|
|
1322
|
+
});
|
|
1323
|
+
if (progressDeliveredSessionRef.value) {
|
|
1324
|
+
currentSession = applyAssistantProgressDeliveredSession({
|
|
1325
|
+
progressDeliveredSession: progressDeliveredSessionRef.value,
|
|
1326
|
+
session: providerOutcome.session,
|
|
972
1327
|
});
|
|
973
|
-
providerRequestAcceptedInputIds =
|
|
974
|
-
providerRequestJournal?.inputIds ?? acceptedInputIdsForProviderRequest;
|
|
975
|
-
providerRequestAcceptedInputItems =
|
|
976
|
-
providerRequestJournal?.inputs ?? acceptedInputItemsForProviderRequest;
|
|
977
|
-
acceptedInputIdsForProviderRequest = providerRequestAcceptedInputIds;
|
|
978
|
-
acceptedInputItemsForProviderRequest = providerRequestAcceptedInputItems;
|
|
979
|
-
return await input.beforeProviderAcceptedInputs?.({
|
|
980
|
-
acceptedInputs: providerRequestAcceptedInputItems,
|
|
981
|
-
turnId: currentUserTurn.turnId,
|
|
982
|
-
});
|
|
983
|
-
},
|
|
984
|
-
onProviderRequestStarted: (event) => {
|
|
985
|
-
const startedAtMs = Date.parse(event.startedAt);
|
|
986
|
-
if (Number.isFinite(startedAtMs)) {
|
|
987
|
-
providerRequestStartedAtMs = startedAtMs;
|
|
988
|
-
}
|
|
989
|
-
if (!currentInput.onProviderRequestStarted) {
|
|
990
|
-
return;
|
|
991
1328
|
}
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1329
|
+
currentSession = await applyAssistantSessionCodexResumeStateAction({
|
|
1330
|
+
action: failedProviderResumeStateAction,
|
|
1331
|
+
assistantContractFingerprint: providerOutcome.assistantContractFingerprint,
|
|
1332
|
+
codexRolloutRelativePath: providerOutcome.codexRolloutRelativePath,
|
|
1333
|
+
codexThreadId: providerOutcome.codexThreadId,
|
|
1334
|
+
routeFingerprint: readCodexThreadRouteFingerprint(providerOutcome.route),
|
|
1335
|
+
threadCompatibilityFingerprint: readCodexThreadCompatibilityFingerprint(providerOutcome.route),
|
|
1336
|
+
session: currentSession,
|
|
1337
|
+
vault: input.vault,
|
|
1001
1338
|
});
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1339
|
+
if (requestInput.allowFailedNoReplyRecovery &&
|
|
1340
|
+
recoverableNoReplyDeliveryContextOrdinal !== null) {
|
|
1341
|
+
turnInputController.close();
|
|
1342
|
+
await runtimeState.turns.acceptedInputs.updateAdmissionState({
|
|
1343
|
+
admissionState: 'commit-started',
|
|
1344
|
+
turnId: currentUserTurn.turnId,
|
|
1345
|
+
});
|
|
1346
|
+
const recoveredReactions = (providerOutcome.reactions ?? []).filter((reaction) => reaction.deliveryContextOrdinal <= recoverableNoReplyDeliveryContextOrdinal);
|
|
1347
|
+
const failedNoReplySession = currentSession;
|
|
1348
|
+
const failedNoReplyProviderResult = {
|
|
1349
|
+
acceptedNoReplyDeliveryContextOrdinals: acceptedNoReplyOrdinals,
|
|
1350
|
+
assistantContractFingerprint: providerOutcome.assistantContractFingerprint,
|
|
1351
|
+
attemptCount: providerOutcome.attemptCount,
|
|
1352
|
+
codexContinuation: providerOutcome.codexContinuation,
|
|
1353
|
+
codexRolloutRelativePath: providerOutcome.codexRolloutRelativePath,
|
|
1354
|
+
codexThreadId: providerOutcome.codexThreadId,
|
|
1355
|
+
finalAction: {
|
|
1356
|
+
kind: 'none',
|
|
1357
|
+
},
|
|
1358
|
+
provider: providerOutcome.route.provider,
|
|
1359
|
+
providerOptions: providerOutcome.route.providerOptions,
|
|
1360
|
+
rawEvents: providerOutcome.rawEvents,
|
|
1361
|
+
reactions: recoveredReactions,
|
|
1362
|
+
response: '',
|
|
1363
|
+
responseDeliveryContextOrdinal: recoverableNoReplyDeliveryContextOrdinal,
|
|
1364
|
+
responseMedia: [],
|
|
1365
|
+
responseCard: null,
|
|
1366
|
+
route: providerOutcome.route,
|
|
1367
|
+
session: failedNoReplySession,
|
|
1368
|
+
stderr: '',
|
|
1369
|
+
stdout: '',
|
|
1370
|
+
transcriptResponse: null,
|
|
1371
|
+
usage: providerOutcome.usage,
|
|
1372
|
+
usageAttribution: providerOutcome.usageAttribution,
|
|
1373
|
+
workingDirectory: sharedPlan.requestedWorkingDirectory,
|
|
1374
|
+
};
|
|
1375
|
+
const turnArtifactsStartedAt = Date.now();
|
|
1376
|
+
const session = await finalizeAssistantTurnArtifacts({
|
|
1377
|
+
assistantTranscriptText: null,
|
|
1378
|
+
input: currentInput,
|
|
1379
|
+
plan: sharedPlan,
|
|
1380
|
+
precedingAssistantTranscriptTexts: [],
|
|
1381
|
+
providerResult: failedNoReplyProviderResult,
|
|
1382
|
+
providerResumeStateAction: failedProviderResumeStateAction,
|
|
1383
|
+
persistUserPromptToTranscript: !userPromptPersistedToTranscript,
|
|
1384
|
+
session: failedNoReplySession,
|
|
1385
|
+
turnCreatedAt: currentUserTurn.turnCreatedAt,
|
|
1386
|
+
turnId: currentUserTurn.turnId,
|
|
1387
|
+
userContentReceivedAt: currentUserTurn.userContentReceivedAt,
|
|
1388
|
+
});
|
|
1389
|
+
currentSession = session;
|
|
1390
|
+
emitTurnTiming({
|
|
1391
|
+
elapsedMs: elapsedSince(turnTimingStartedAt),
|
|
1392
|
+
finalReplySelected: false,
|
|
1393
|
+
providerRequestOrdinal,
|
|
1394
|
+
sinceProviderResultMs: providerResultReturnedAt === null
|
|
1395
|
+
? null
|
|
1396
|
+
: elapsedSince(providerResultReturnedAt),
|
|
1397
|
+
stage: 'turn-artifacts-finalized',
|
|
1398
|
+
stepElapsedMs: elapsedSince(turnArtifactsStartedAt),
|
|
1399
|
+
});
|
|
1400
|
+
const replyDispatchStartedAt = Date.now();
|
|
1401
|
+
const { deliverySession, reactionDeliveryOutcomes, } = await deliverAssistantProviderReactions({
|
|
1402
|
+
acceptedInputIdsByDeliveryContextOrdinal,
|
|
1403
|
+
currentInput,
|
|
1404
|
+
providerResult: failedNoReplyProviderResult,
|
|
1405
|
+
replyDeliveryContexts,
|
|
1406
|
+
session,
|
|
1407
|
+
sharedPlan,
|
|
1408
|
+
turnId: currentUserTurn.turnId,
|
|
1409
|
+
});
|
|
1410
|
+
const deliveryOutcome = resolveAssistantNoReplyDeliveryOutcome({
|
|
1411
|
+
precedingDeliveryOutcomes: [],
|
|
1412
|
+
session: deliverySession,
|
|
1413
|
+
});
|
|
1414
|
+
const finalDeliveryOutcome = deliveryOutcome.kind === 'not-requested' &&
|
|
1415
|
+
reactionDeliveryOutcomes.length > 0
|
|
1416
|
+
? reactionDeliveryOutcomes[reactionDeliveryOutcomes.length - 1]
|
|
1417
|
+
: deliveryOutcome;
|
|
1418
|
+
emitTurnTiming({
|
|
1419
|
+
deliveryAttempted: reactionDeliveryOutcomes.length > 0,
|
|
1420
|
+
deliveryIntentPresent: 'intentId' in finalDeliveryOutcome
|
|
1421
|
+
? finalDeliveryOutcome.intentId !== null
|
|
1422
|
+
: false,
|
|
1423
|
+
deliveryOutcomeKind: finalDeliveryOutcome.kind,
|
|
1424
|
+
elapsedMs: elapsedSince(turnTimingStartedAt),
|
|
1425
|
+
finalReplySelected: false,
|
|
1426
|
+
providerRequestOrdinal,
|
|
1427
|
+
sinceProviderResultMs: providerResultReturnedAt === null
|
|
1428
|
+
? null
|
|
1429
|
+
: elapsedSince(providerResultReturnedAt),
|
|
1430
|
+
stage: 'reply-dispatched',
|
|
1431
|
+
stepElapsedMs: elapsedSince(replyDispatchStartedAt),
|
|
1432
|
+
});
|
|
1433
|
+
await finalizeDeliveredAssistantTurn({
|
|
1434
|
+
firstContactStateDocIds: sharedPlan.firstContactStateDocIds,
|
|
1435
|
+
outcome: finalDeliveryOutcome,
|
|
1436
|
+
response: '',
|
|
1437
|
+
turnId: currentUserTurn.turnId,
|
|
1438
|
+
vault: input.vault,
|
|
1439
|
+
});
|
|
1440
|
+
const result = normalizeAssistantAskResultForReturn({
|
|
1441
|
+
vault: redactAssistantDisplayPath(input.vault),
|
|
1442
|
+
status: 'completed',
|
|
1443
|
+
prompt: currentInput.prompt,
|
|
1444
|
+
response: '',
|
|
1445
|
+
responseDisposition: 'none',
|
|
1446
|
+
media: finalDeliveryOutcome.media,
|
|
1447
|
+
session: finalDeliveryOutcome.session,
|
|
1448
|
+
delivery: finalDeliveryOutcome.kind === 'sent'
|
|
1449
|
+
? finalDeliveryOutcome.delivery
|
|
1450
|
+
: null,
|
|
1451
|
+
deliveryDeferred: finalDeliveryOutcome.kind === 'queued',
|
|
1452
|
+
deliveryIntentId: finalDeliveryOutcome.kind === 'sent' ||
|
|
1453
|
+
finalDeliveryOutcome.kind === 'queued' ||
|
|
1454
|
+
finalDeliveryOutcome.kind === 'failed'
|
|
1455
|
+
? finalDeliveryOutcome.intentId
|
|
1456
|
+
: null,
|
|
1457
|
+
deliveryError: finalDeliveryOutcome.kind === 'queued' ||
|
|
1458
|
+
finalDeliveryOutcome.kind === 'failed'
|
|
1459
|
+
? finalDeliveryOutcome.error
|
|
1460
|
+
: null,
|
|
1461
|
+
});
|
|
1462
|
+
turnInputController.complete(result);
|
|
1463
|
+
return {
|
|
1464
|
+
kind: 'completed',
|
|
1465
|
+
result,
|
|
1466
|
+
};
|
|
1012
1467
|
}
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
hostedToolContext,
|
|
1018
|
-
turnId: currentUserTurn.turnId,
|
|
1019
|
-
});
|
|
1020
|
-
providerResultReturnedAt = Date.now();
|
|
1021
|
-
emitTurnTiming({
|
|
1022
|
-
elapsedMs: elapsedSince(turnTimingStartedAt),
|
|
1023
|
-
providerOutcomeKind: providerOutcome.kind,
|
|
1024
|
-
providerRequestElapsedMs: providerRequestStartedAtMs === null
|
|
1025
|
-
? null
|
|
1026
|
-
: Math.max(0, providerResultReturnedAt - providerRequestStartedAtMs),
|
|
1027
|
-
providerRequestOrdinal,
|
|
1028
|
-
sinceProviderResultMs: 0,
|
|
1029
|
-
stage: 'provider-result-returned',
|
|
1030
|
-
});
|
|
1031
|
-
if (providerOutcome.kind === 'failed_terminal') {
|
|
1468
|
+
throw providerOutcome.error;
|
|
1469
|
+
}
|
|
1470
|
+
onFirstAssistantResponseCompleted();
|
|
1471
|
+
const currentProviderResult = providerOutcome.providerTurn;
|
|
1032
1472
|
if (!providerRequestJournal) {
|
|
1033
1473
|
providerRequestJournal =
|
|
1034
1474
|
await runtimeState.turns.acceptedInputs.recordProviderRequest({
|
|
1035
|
-
continuation:
|
|
1475
|
+
continuation: currentProviderResult.codexContinuation,
|
|
1036
1476
|
ordinal: providerRequestOrdinal,
|
|
1037
1477
|
providerAttemptId: null,
|
|
1038
1478
|
turnId: currentUserTurn.turnId,
|
|
@@ -1047,7 +1487,7 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
1047
1487
|
else {
|
|
1048
1488
|
providerRequestJournal =
|
|
1049
1489
|
await runtimeState.turns.acceptedInputs.updateProviderRequest({
|
|
1050
|
-
continuation:
|
|
1490
|
+
continuation: currentProviderResult.codexContinuation,
|
|
1051
1491
|
ordinal: providerRequestOrdinal,
|
|
1052
1492
|
providerAttemptId: null,
|
|
1053
1493
|
turnId: currentUserTurn.turnId,
|
|
@@ -1059,37 +1499,35 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
1059
1499
|
acceptedInputIdsForProviderRequest = providerRequestAcceptedInputIds;
|
|
1060
1500
|
acceptedInputItemsForProviderRequest = providerRequestAcceptedInputItems;
|
|
1061
1501
|
}
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
await drainLiveSteeredActiveTurnInputs({
|
|
1079
|
-
continuation: providerOutcome.codexContinuation,
|
|
1080
|
-
sessionId: providerOutcome.session.sessionId,
|
|
1502
|
+
await drainLiveSteeredActiveTurnInputs({
|
|
1503
|
+
continuation: currentProviderResult.codexContinuation,
|
|
1504
|
+
sessionId: currentProviderResult.session.sessionId,
|
|
1505
|
+
throughDeliveryContextOrdinal: providerRequestDeliveryContextBaseOrdinal +
|
|
1506
|
+
currentProviderResult.responseDeliveryContextOrdinal,
|
|
1507
|
+
});
|
|
1508
|
+
currentSession = applyAssistantProgressDeliveredSession({
|
|
1509
|
+
progressDeliveredSession: progressDeliveredSessionRef.value,
|
|
1510
|
+
session: currentProviderResult.session,
|
|
1511
|
+
});
|
|
1512
|
+
if (!holdGroupReplyDraft) {
|
|
1513
|
+
responseText = resolveAssistantPersistedReplyText({
|
|
1514
|
+
messageInput: currentInput,
|
|
1515
|
+
rawResponse: currentProviderResult.response,
|
|
1516
|
+
session: currentSession,
|
|
1517
|
+
sharedPlan,
|
|
1081
1518
|
});
|
|
1082
1519
|
}
|
|
1083
1520
|
const usageRecordStartedAt = Date.now();
|
|
1521
|
+
const primaryUsageRecordOrdinal = nextUsageRecordOrdinal;
|
|
1522
|
+
nextUsageRecordOrdinal += 1;
|
|
1084
1523
|
await recordAssistantUsageEvent({
|
|
1085
1524
|
executionContext,
|
|
1086
1525
|
...(providerRequestStartedAtMs === null
|
|
1087
1526
|
? {}
|
|
1088
1527
|
: { occurredAt: new Date(providerRequestStartedAtMs).toISOString() }),
|
|
1089
1528
|
providerRequestAcceptedInputIds,
|
|
1090
|
-
providerRequestOrdinal,
|
|
1091
|
-
|
|
1092
|
-
providerResult: failedProviderResult,
|
|
1529
|
+
providerRequestOrdinal: primaryUsageRecordOrdinal,
|
|
1530
|
+
providerResult: currentProviderResult,
|
|
1093
1531
|
turnId: currentUserTurn.turnId,
|
|
1094
1532
|
});
|
|
1095
1533
|
emitTurnTiming({
|
|
@@ -1101,235 +1539,90 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
1101
1539
|
stage: 'usage-recorded',
|
|
1102
1540
|
stepElapsedMs: elapsedSince(usageRecordStartedAt),
|
|
1103
1541
|
});
|
|
1542
|
+
const additionalUsages = currentProviderResult.additionalUsages?.map((usageDraft) => ({
|
|
1543
|
+
...usageDraft,
|
|
1544
|
+
providerRequestOrdinal: nextUsageRecordOrdinal++,
|
|
1545
|
+
}));
|
|
1104
1546
|
await recordAdditionalAssistantUsageEvents({
|
|
1105
|
-
additionalUsages
|
|
1547
|
+
additionalUsages,
|
|
1106
1548
|
effectiveEnv: currentInput.turnEnvironment?.env ?? process.env,
|
|
1107
1549
|
executionContext,
|
|
1108
1550
|
providerRequestAcceptedInputIds,
|
|
1109
|
-
providerResult:
|
|
1551
|
+
providerResult: currentProviderResult,
|
|
1110
1552
|
turnId: currentUserTurn.turnId,
|
|
1111
1553
|
});
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
|
|
1129
|
-
|
|
1130
|
-
vault: input.vault,
|
|
1554
|
+
return {
|
|
1555
|
+
kind: 'provider-result',
|
|
1556
|
+
providerResult: rebaseAssistantProviderResultDeliveryContexts({
|
|
1557
|
+
baseOrdinal: providerRequestDeliveryContextBaseOrdinal,
|
|
1558
|
+
providerResult: currentProviderResult,
|
|
1559
|
+
}),
|
|
1560
|
+
};
|
|
1561
|
+
};
|
|
1562
|
+
const firstRequest = await runCurrentProviderRequest({
|
|
1563
|
+
allowFailedNoReplyRecovery: !holdGroupReplyDraft,
|
|
1564
|
+
});
|
|
1565
|
+
if (firstRequest.kind === 'completed') {
|
|
1566
|
+
return firstRequest.result;
|
|
1567
|
+
}
|
|
1568
|
+
providerResult = firstRequest.providerResult;
|
|
1569
|
+
if (holdGroupReplyDraft) {
|
|
1570
|
+
const draftWindowOutcome = await turnInputController.finishDraftWindow({
|
|
1571
|
+
signal: currentInput.abortSignal,
|
|
1131
1572
|
});
|
|
1132
|
-
if (
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
session: failedNoReplySession,
|
|
1177
|
-
turnCreatedAt: currentUserTurn.turnCreatedAt,
|
|
1178
|
-
turnId: currentUserTurn.turnId,
|
|
1179
|
-
userContentReceivedAt: currentUserTurn.userContentReceivedAt,
|
|
1180
|
-
});
|
|
1181
|
-
currentSession = session;
|
|
1182
|
-
emitTurnTiming({
|
|
1183
|
-
elapsedMs: elapsedSince(turnTimingStartedAt),
|
|
1184
|
-
finalReplySelected: false,
|
|
1185
|
-
providerRequestOrdinal,
|
|
1186
|
-
sinceProviderResultMs: providerResultReturnedAt === null
|
|
1187
|
-
? null
|
|
1188
|
-
: elapsedSince(providerResultReturnedAt),
|
|
1189
|
-
stage: 'turn-artifacts-finalized',
|
|
1190
|
-
stepElapsedMs: elapsedSince(turnArtifactsStartedAt),
|
|
1191
|
-
});
|
|
1192
|
-
const replyDispatchStartedAt = Date.now();
|
|
1193
|
-
const { deliverySession, reactionDeliveryOutcomes, } = await deliverAssistantProviderReactions({
|
|
1194
|
-
acceptedInputIdsByDeliveryContextOrdinal,
|
|
1195
|
-
currentInput,
|
|
1196
|
-
providerResult: failedNoReplyProviderResult,
|
|
1197
|
-
replyDeliveryContexts,
|
|
1198
|
-
session,
|
|
1199
|
-
sharedPlan,
|
|
1200
|
-
turnId: currentUserTurn.turnId,
|
|
1201
|
-
});
|
|
1202
|
-
const deliveryOutcome = resolveAssistantNoReplyDeliveryOutcome({
|
|
1203
|
-
precedingDeliveryOutcomes: [],
|
|
1204
|
-
session: deliverySession,
|
|
1205
|
-
});
|
|
1206
|
-
const finalDeliveryOutcome = deliveryOutcome.kind === 'not-requested' &&
|
|
1207
|
-
reactionDeliveryOutcomes.length > 0
|
|
1208
|
-
? reactionDeliveryOutcomes[reactionDeliveryOutcomes.length - 1]
|
|
1209
|
-
: deliveryOutcome;
|
|
1210
|
-
emitTurnTiming({
|
|
1211
|
-
deliveryAttempted: reactionDeliveryOutcomes.length > 0,
|
|
1212
|
-
deliveryIntentPresent: 'intentId' in finalDeliveryOutcome
|
|
1213
|
-
? finalDeliveryOutcome.intentId !== null
|
|
1214
|
-
: false,
|
|
1215
|
-
deliveryOutcomeKind: finalDeliveryOutcome.kind,
|
|
1216
|
-
elapsedMs: elapsedSince(turnTimingStartedAt),
|
|
1217
|
-
finalReplySelected: false,
|
|
1218
|
-
providerRequestOrdinal,
|
|
1219
|
-
sinceProviderResultMs: providerResultReturnedAt === null
|
|
1220
|
-
? null
|
|
1221
|
-
: elapsedSince(providerResultReturnedAt),
|
|
1222
|
-
stage: 'reply-dispatched',
|
|
1223
|
-
stepElapsedMs: elapsedSince(replyDispatchStartedAt),
|
|
1224
|
-
});
|
|
1225
|
-
await finalizeDeliveredAssistantTurn({
|
|
1226
|
-
firstContactStateDocIds: sharedPlan.firstContactStateDocIds,
|
|
1227
|
-
outcome: finalDeliveryOutcome,
|
|
1228
|
-
response: '',
|
|
1229
|
-
turnId: currentUserTurn.turnId,
|
|
1230
|
-
vault: input.vault,
|
|
1231
|
-
});
|
|
1232
|
-
const result = normalizeAssistantAskResultForReturn({
|
|
1233
|
-
vault: redactAssistantDisplayPath(input.vault),
|
|
1234
|
-
status: 'completed',
|
|
1235
|
-
prompt: currentInput.prompt,
|
|
1236
|
-
response: '',
|
|
1237
|
-
responseDisposition: 'none',
|
|
1238
|
-
media: finalDeliveryOutcome.media,
|
|
1239
|
-
session: finalDeliveryOutcome.session,
|
|
1240
|
-
delivery: finalDeliveryOutcome.kind === 'sent'
|
|
1241
|
-
? finalDeliveryOutcome.delivery
|
|
1242
|
-
: null,
|
|
1243
|
-
deliveryDeferred: finalDeliveryOutcome.kind === 'queued',
|
|
1244
|
-
deliveryIntentId: finalDeliveryOutcome.kind === 'sent' ||
|
|
1245
|
-
finalDeliveryOutcome.kind === 'queued' ||
|
|
1246
|
-
finalDeliveryOutcome.kind === 'failed'
|
|
1247
|
-
? finalDeliveryOutcome.intentId
|
|
1248
|
-
: null,
|
|
1249
|
-
deliveryError: finalDeliveryOutcome.kind === 'queued' ||
|
|
1250
|
-
finalDeliveryOutcome.kind === 'failed'
|
|
1251
|
-
? finalDeliveryOutcome.error
|
|
1252
|
-
: null,
|
|
1253
|
-
});
|
|
1254
|
-
turnInputController.complete(result);
|
|
1255
|
-
return result;
|
|
1573
|
+
if (draftWindowOutcome.kind === 'review') {
|
|
1574
|
+
providerRequestOrdinal = 1;
|
|
1575
|
+
try {
|
|
1576
|
+
if (draftWindowOutcome.acceptedInput) {
|
|
1577
|
+
const accepted = await acceptActiveTurnInput({
|
|
1578
|
+
activeTurnInput: draftWindowOutcome.acceptedInput,
|
|
1579
|
+
providerRequestAcceptedInputIds,
|
|
1580
|
+
providerRequestOrdinal,
|
|
1581
|
+
sessionId: currentSession.sessionId,
|
|
1582
|
+
});
|
|
1583
|
+
replyDeliveryContexts.push(pickAssistantReplyDeliveryContext(currentInput));
|
|
1584
|
+
acceptedInputIdsByDeliveryContextOrdinal[replyDeliveryContexts.length - 1] = accepted.acceptedInputItems.map((item) => item.id);
|
|
1585
|
+
}
|
|
1586
|
+
providerRequestDeliveryContextBaseOrdinal =
|
|
1587
|
+
replyDeliveryContexts.length - 1;
|
|
1588
|
+
currentSession = applyAssistantProviderTurnResumeInMemory({
|
|
1589
|
+
providerResult,
|
|
1590
|
+
session: currentSession,
|
|
1591
|
+
});
|
|
1592
|
+
currentInput = {
|
|
1593
|
+
...currentInput,
|
|
1594
|
+
turnContext: appendAssistantTurnContext(currentInput.turnContext, ASSISTANT_GROUP_REPLY_RECONSIDERATION_INSTRUCTION),
|
|
1595
|
+
};
|
|
1596
|
+
const reconsiderationRequest = await runCurrentProviderRequest({
|
|
1597
|
+
allowFailedNoReplyRecovery: false,
|
|
1598
|
+
});
|
|
1599
|
+
if (reconsiderationRequest.kind === 'completed') {
|
|
1600
|
+
throw new VaultCliError('ASSISTANT_GROUP_DRAFT_RECONSIDERATION_INVALID_RECOVERY', 'The group reply reconsideration unexpectedly completed through provider failure recovery.');
|
|
1601
|
+
}
|
|
1602
|
+
providerResult = reconsiderationRequest.providerResult;
|
|
1603
|
+
}
|
|
1604
|
+
finally {
|
|
1605
|
+
currentSession = {
|
|
1606
|
+
...currentSession,
|
|
1607
|
+
codexResume: null,
|
|
1608
|
+
resumeState: null,
|
|
1609
|
+
};
|
|
1610
|
+
await runAssistantTurnBestEffort(async () => {
|
|
1611
|
+
currentSession = await clearAssistantSessionCodexResumeState({
|
|
1612
|
+
session: currentSession,
|
|
1613
|
+
vault: input.vault,
|
|
1614
|
+
});
|
|
1615
|
+
});
|
|
1616
|
+
}
|
|
1256
1617
|
}
|
|
1257
|
-
|
|
1258
|
-
}
|
|
1259
|
-
providerResult = providerOutcome.providerTurn;
|
|
1260
|
-
if (!providerRequestJournal) {
|
|
1261
|
-
providerRequestJournal =
|
|
1262
|
-
await runtimeState.turns.acceptedInputs.recordProviderRequest({
|
|
1263
|
-
continuation: providerResult.codexContinuation,
|
|
1264
|
-
ordinal: providerRequestOrdinal,
|
|
1265
|
-
providerAttemptId: null,
|
|
1266
|
-
turnId: currentUserTurn.turnId,
|
|
1267
|
-
});
|
|
1268
|
-
providerRequestAcceptedInputIds =
|
|
1269
|
-
providerRequestJournal?.inputIds ?? acceptedInputIdsForProviderRequest;
|
|
1270
|
-
providerRequestAcceptedInputItems =
|
|
1271
|
-
providerRequestJournal?.inputs ?? acceptedInputItemsForProviderRequest;
|
|
1272
|
-
acceptedInputIdsForProviderRequest = providerRequestAcceptedInputIds;
|
|
1273
|
-
acceptedInputItemsForProviderRequest = providerRequestAcceptedInputItems;
|
|
1618
|
+
providerResult = selectAssistantGroupProviderResult(providerResult);
|
|
1274
1619
|
}
|
|
1275
|
-
else {
|
|
1276
|
-
providerRequestJournal =
|
|
1277
|
-
await runtimeState.turns.acceptedInputs.updateProviderRequest({
|
|
1278
|
-
continuation: providerResult.codexContinuation,
|
|
1279
|
-
ordinal: providerRequestOrdinal,
|
|
1280
|
-
providerAttemptId: null,
|
|
1281
|
-
turnId: currentUserTurn.turnId,
|
|
1282
|
-
}) ?? providerRequestJournal;
|
|
1283
|
-
providerRequestAcceptedInputIds =
|
|
1284
|
-
providerRequestJournal?.inputIds ?? providerRequestAcceptedInputIds;
|
|
1285
|
-
providerRequestAcceptedInputItems =
|
|
1286
|
-
providerRequestJournal?.inputs ?? providerRequestAcceptedInputItems;
|
|
1287
|
-
acceptedInputIdsForProviderRequest = providerRequestAcceptedInputIds;
|
|
1288
|
-
acceptedInputItemsForProviderRequest = providerRequestAcceptedInputItems;
|
|
1289
|
-
}
|
|
1290
|
-
await drainLiveSteeredActiveTurnInputs({
|
|
1291
|
-
continuation: providerResult.codexContinuation,
|
|
1292
|
-
sessionId: providerResult.session.sessionId,
|
|
1293
|
-
throughDeliveryContextOrdinal: providerResult.responseDeliveryContextOrdinal,
|
|
1294
|
-
});
|
|
1295
|
-
currentSession = applyAssistantProgressDeliveredSession({
|
|
1296
|
-
progressDeliveredSession: progressDeliveredSessionRef.value,
|
|
1297
|
-
session: providerResult.session,
|
|
1298
|
-
});
|
|
1299
1620
|
responseText = resolveAssistantPersistedReplyText({
|
|
1300
1621
|
messageInput: currentInput,
|
|
1301
1622
|
rawResponse: providerResult.response,
|
|
1302
1623
|
session: currentSession,
|
|
1303
1624
|
sharedPlan,
|
|
1304
1625
|
});
|
|
1305
|
-
const usageRecordStartedAt = Date.now();
|
|
1306
|
-
await recordAssistantUsageEvent({
|
|
1307
|
-
executionContext,
|
|
1308
|
-
...(providerRequestStartedAtMs === null
|
|
1309
|
-
? {}
|
|
1310
|
-
: { occurredAt: new Date(providerRequestStartedAtMs).toISOString() }),
|
|
1311
|
-
providerRequestAcceptedInputIds,
|
|
1312
|
-
providerRequestOrdinal,
|
|
1313
|
-
providerResult,
|
|
1314
|
-
turnId: currentUserTurn.turnId,
|
|
1315
|
-
});
|
|
1316
|
-
emitTurnTiming({
|
|
1317
|
-
elapsedMs: elapsedSince(turnTimingStartedAt),
|
|
1318
|
-
providerRequestOrdinal,
|
|
1319
|
-
sinceProviderResultMs: providerResultReturnedAt === null
|
|
1320
|
-
? null
|
|
1321
|
-
: elapsedSince(providerResultReturnedAt),
|
|
1322
|
-
stage: 'usage-recorded',
|
|
1323
|
-
stepElapsedMs: elapsedSince(usageRecordStartedAt),
|
|
1324
|
-
});
|
|
1325
|
-
await recordAdditionalAssistantUsageEvents({
|
|
1326
|
-
additionalUsages: providerResult.additionalUsages,
|
|
1327
|
-
effectiveEnv: currentInput.turnEnvironment?.env ?? process.env,
|
|
1328
|
-
executionContext,
|
|
1329
|
-
providerRequestAcceptedInputIds,
|
|
1330
|
-
providerResult,
|
|
1331
|
-
turnId: currentUserTurn.turnId,
|
|
1332
|
-
});
|
|
1333
1626
|
const resolvedFinalReplyDeliveryContext = resolveAssistantReplyDeliveryContextForSegment({
|
|
1334
1627
|
contexts: replyDeliveryContexts,
|
|
1335
1628
|
deliveryContextOrdinal: providerResult.responseDeliveryContextOrdinal,
|
|
@@ -1349,9 +1642,17 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
1349
1642
|
admissionState: 'commit-started',
|
|
1350
1643
|
turnId: currentUserTurn.turnId,
|
|
1351
1644
|
});
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1645
|
+
if (holdGroupReplyDraft) {
|
|
1646
|
+
await persistInitialUserPromptToTranscriptIfNeeded({
|
|
1647
|
+
detail: 'user prompt persisted after held group reply selection',
|
|
1648
|
+
prompt: input.prompt,
|
|
1649
|
+
vault: input.vault,
|
|
1650
|
+
});
|
|
1651
|
+
for (const heldInput of heldGroupAcceptedTranscriptInputs) {
|
|
1652
|
+
await persistAcceptedActiveTurnInputTranscripts(heldInput);
|
|
1653
|
+
}
|
|
1654
|
+
await commitSelectedNoReply(providerResult);
|
|
1655
|
+
}
|
|
1355
1656
|
const precedingResponseSegments = [];
|
|
1356
1657
|
for (const [segmentOrdinal, segment] of (providerResult.precedingResponseSegments ?? []).entries()) {
|
|
1357
1658
|
const resolvedDeliveryContext = resolveAssistantReplyDeliveryContextForSegment({
|
|
@@ -1377,6 +1678,11 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
1377
1678
|
continue;
|
|
1378
1679
|
}
|
|
1379
1680
|
precedingResponseSegments.push({
|
|
1681
|
+
...(segment.contextReferences === undefined
|
|
1682
|
+
? {}
|
|
1683
|
+
: {
|
|
1684
|
+
contextReferences: segment.contextReferences?.map((reference) => ({ ...reference })) ?? null,
|
|
1685
|
+
}),
|
|
1380
1686
|
deliveryContext: resolvedDeliveryContext.context,
|
|
1381
1687
|
response: segment.response,
|
|
1382
1688
|
...(segment.transcriptResponse === undefined
|
|
@@ -1406,11 +1712,14 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
1406
1712
|
response,
|
|
1407
1713
|
}) ?? response;
|
|
1408
1714
|
});
|
|
1409
|
-
const providerResumeStateAction =
|
|
1410
|
-
|
|
1411
|
-
|
|
1412
|
-
|
|
1413
|
-
|
|
1715
|
+
const providerResumeStateAction = providerRequestOrdinal === 1
|
|
1716
|
+
? 'clear'
|
|
1717
|
+
: resolveAssistantProviderResumeStateAction({
|
|
1718
|
+
codexThreadId: providerResult.codexThreadId ?? null,
|
|
1719
|
+
threadScope,
|
|
1720
|
+
});
|
|
1721
|
+
if (providerRequestOrdinal === 0 &&
|
|
1722
|
+
providerResumeStateAction === 'clear') {
|
|
1414
1723
|
currentSession = await clearAssistantSessionCodexResumeState({
|
|
1415
1724
|
session: currentSession,
|
|
1416
1725
|
vault: input.vault,
|
|
@@ -1578,6 +1887,12 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
1578
1887
|
finalTargetResolutionError = normalizeAssistantDeliveryError(error);
|
|
1579
1888
|
}
|
|
1580
1889
|
}
|
|
1890
|
+
if (providerResult.responseContextReferences !== undefined) {
|
|
1891
|
+
finalDeliveryInput = {
|
|
1892
|
+
...finalDeliveryInput,
|
|
1893
|
+
outboxAutomationContextReferences: providerResult.responseContextReferences?.map((reference) => ({ ...reference })) ?? null,
|
|
1894
|
+
};
|
|
1895
|
+
}
|
|
1581
1896
|
const deliveryOutcome = finalResponseText !== null
|
|
1582
1897
|
? finalTargetResolutionError
|
|
1583
1898
|
? {
|
|
@@ -1722,7 +2037,8 @@ export async function sendAssistantMessageLocal(input) {
|
|
|
1722
2037
|
progressDeliveredSession: progressDeliveredSessionRef.value,
|
|
1723
2038
|
session: currentSession,
|
|
1724
2039
|
});
|
|
1725
|
-
if (
|
|
2040
|
+
if (providerRequestOrdinal === 1 ||
|
|
2041
|
+
failedSession !== currentSession) {
|
|
1726
2042
|
await runAssistantTurnBestEffort(() => saveAssistantSession(input.vault, failedSession));
|
|
1727
2043
|
}
|
|
1728
2044
|
await runAssistantTurnBestEffort(() => persistFailedAssistantPromptAttempt({
|
|
@@ -2189,6 +2505,7 @@ function buildActiveTurnInput(input) {
|
|
|
2189
2505
|
input: input.input,
|
|
2190
2506
|
overrides: input.acceptedInput,
|
|
2191
2507
|
}),
|
|
2508
|
+
outboxAutomationContextReferences: null,
|
|
2192
2509
|
prompt: input.acceptedInput.prompt,
|
|
2193
2510
|
receiptMetadata: input.acceptedInput.receiptMetadata === undefined
|
|
2194
2511
|
? input.input.receiptMetadata
|