@murphai/murph 1.2.0 → 1.2.3
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 +1298 -0
- package/config.schema.json +412 -50
- package/dist/cli-entry.d.ts.map +1 -1
- package/dist/cli-entry.js +13 -20
- package/dist/cli-entry.js.map +1 -1
- package/dist/commands/audit-command-helpers.js.map +1 -1
- package/dist/commands/audit.js +2 -2
- package/dist/commands/automation.d.ts +118 -7
- package/dist/commands/automation.d.ts.map +1 -1
- package/dist/commands/automation.js +140 -54
- package/dist/commands/automation.js.map +1 -1
- package/dist/commands/batch.d.ts.map +1 -1
- package/dist/commands/batch.js +12 -4
- package/dist/commands/batch.js.map +1 -1
- package/dist/commands/capture.d.ts +9 -9
- package/dist/commands/capture.d.ts.map +1 -1
- package/dist/commands/clinical-imports.d.ts +101 -101
- package/dist/commands/command-factory-primitives.d.ts +3 -3
- package/dist/commands/command-factory-primitives.d.ts.map +1 -1
- package/dist/commands/command-factory-primitives.js +1 -1
- package/dist/commands/commons.d.ts +9 -9
- package/dist/commands/document.d.ts.map +1 -1
- package/dist/commands/document.js +3 -0
- package/dist/commands/document.js.map +1 -1
- package/dist/commands/encounter.d.ts +42 -42
- package/dist/commands/encounter.d.ts.map +1 -1
- package/dist/commands/event.js +1 -1
- package/dist/commands/exercise.js.map +1 -1
- package/dist/commands/experiment.d.ts.map +1 -1
- package/dist/commands/experiment.js +1 -0
- package/dist/commands/experiment.js.map +1 -1
- package/dist/commands/export-intake-read-helpers.d.ts +4 -4
- package/dist/commands/export-intake-read-helpers.d.ts.map +1 -1
- package/dist/commands/export-intake-read-helpers.js +1 -1
- package/dist/commands/export-intake-read-helpers.js.map +1 -1
- package/dist/commands/export.js +1 -1
- package/dist/commands/food.d.ts +4 -4
- package/dist/commands/food.js +1 -1
- package/dist/commands/group.d.ts +81 -0
- package/dist/commands/group.d.ts.map +1 -0
- package/dist/commands/group.js +242 -0
- package/dist/commands/group.js.map +1 -0
- package/dist/commands/habitat.d.ts +3 -0
- package/dist/commands/habitat.d.ts.map +1 -0
- package/dist/commands/habitat.js +282 -0
- package/dist/commands/habitat.js.map +1 -0
- package/dist/commands/health-allergy-save.d.ts.map +1 -1
- package/dist/commands/health-allergy-save.js +1 -1
- package/dist/commands/health-allergy-save.js.map +1 -1
- package/dist/commands/health-condition-save.d.ts.map +1 -1
- package/dist/commands/health-condition-save.js +1 -1
- package/dist/commands/health-condition-save.js.map +1 -1
- package/dist/commands/health-goal-save.d.ts.map +1 -1
- package/dist/commands/health-goal-save.js +1 -1
- package/dist/commands/health-goal-save.js.map +1 -1
- package/dist/commands/intake.js +1 -1
- package/dist/commands/intervention.d.ts.map +1 -1
- package/dist/commands/intervention.js +10 -0
- package/dist/commands/intervention.js.map +1 -1
- package/dist/commands/knowledge.js +2 -2
- package/dist/commands/measurement.d.ts +7 -7
- package/dist/commands/measurement.d.ts.map +1 -1
- package/dist/commands/medication.d.ts +3 -3
- package/dist/commands/memory.d.ts.map +1 -1
- package/dist/commands/memory.js +26 -2
- package/dist/commands/memory.js.map +1 -1
- package/dist/commands/model.js.map +1 -1
- package/dist/commands/murph-age.d.ts +499 -498
- package/dist/commands/murph-age.d.ts.map +1 -1
- package/dist/commands/murph-age.js +3 -2
- package/dist/commands/murph-age.js.map +1 -1
- package/dist/commands/payload-schema-command.d.ts +1 -1
- package/dist/commands/protocol.js +2 -2
- package/dist/commands/provider.js +1 -1
- package/dist/commands/recipe.js +1 -1
- package/dist/commands/record-mutation-command-helpers.d.ts +3 -3
- package/dist/commands/record-mutation-command-helpers.d.ts.map +1 -1
- package/dist/commands/research.js.map +1 -1
- package/dist/commands/sample-batch-command-helpers.js.map +1 -1
- package/dist/commands/sample-import-command-helpers.d.ts.map +1 -1
- package/dist/commands/sample-query-command-helpers.d.ts +1 -1
- package/dist/commands/sample-query-command-helpers.d.ts.map +1 -1
- package/dist/commands/sample-query-command-helpers.js.map +1 -1
- package/dist/commands/samples.js +2 -2
- package/dist/commands/scheduled-log.d.ts +127 -275
- package/dist/commands/scheduled-log.d.ts.map +1 -1
- package/dist/commands/scheduled-log.js +28 -3
- package/dist/commands/scheduled-log.js.map +1 -1
- package/dist/commands/search.js +1 -1
- package/dist/commands/supplement.js +1 -1
- package/dist/commands/vault.d.ts +2 -1
- package/dist/commands/vault.d.ts.map +1 -1
- package/dist/commands/vault.js +111 -1
- package/dist/commands/vault.js.map +1 -1
- package/dist/commands/wearables.d.ts +695 -667
- package/dist/commands/wearables.d.ts.map +1 -1
- package/dist/commands/wearables.js +10 -3
- package/dist/commands/wearables.js.map +1 -1
- package/dist/commands/workout.d.ts.map +1 -1
- package/dist/commands/workout.js +9 -2
- package/dist/commands/workout.js.map +1 -1
- package/dist/device-services.d.ts.map +1 -1
- package/dist/device-services.js +33 -8
- package/dist/device-services.js.map +1 -1
- package/dist/food-labels.d.ts +39 -39
- package/dist/food-labels.js.map +1 -1
- package/dist/foreground-terminal-logging.js.map +1 -1
- package/dist/hosted-data-api-labels.d.ts +117 -117
- package/dist/hosted-data-api-labels.js.map +1 -1
- package/dist/incur.generated.d.ts +93 -0
- package/dist/incur.generated.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/mapbox-route-contracts.d.ts +13 -13
- package/dist/mapbox-route-contracts.d.ts.map +1 -1
- package/dist/mapbox-route.js.map +1 -1
- package/dist/research-scout-client.js.map +1 -1
- package/dist/supplement-labels.d.ts +39 -39
- package/dist/supplement-labels.js.map +1 -1
- package/dist/vault-cli-command-manifest.d.ts +1451 -1478
- package/dist/vault-cli-command-manifest.d.ts.map +1 -1
- package/dist/vault-cli-command-manifest.js +80 -2
- package/dist/vault-cli-command-manifest.js.map +1 -1
- package/dist/vault-cli-command-routing.d.ts.map +1 -1
- package/dist/vault-cli-command-routing.js +79 -2
- package/dist/vault-cli-command-routing.js.map +1 -1
- package/dist/vault-cli-package.d.ts +1 -1
- package/dist/vault-cli-package.d.ts.map +1 -1
- package/dist/vault-cli-package.js.map +1 -1
- package/dist/vault-cli-routing.d.ts +4 -1
- package/dist/vault-cli-routing.d.ts.map +1 -1
- package/dist/vault-cli-routing.js +45 -5
- package/dist/vault-cli-routing.js.map +1 -1
- package/dist/vault-cli-shell.d.ts +3 -1
- package/dist/vault-cli-shell.d.ts.map +1 -1
- package/dist/vault-cli-shell.js +4 -1
- package/dist/vault-cli-shell.js.map +1 -1
- package/dist/vault-cli-skill-hash.generated.d.ts +2 -0
- package/dist/vault-cli-skill-hash.generated.d.ts.map +1 -0
- package/dist/vault-cli-skill-hash.generated.js +3 -0
- package/dist/vault-cli-skill-hash.generated.js.map +1 -0
- package/dist/vault-cli-vault-context.js.map +1 -1
- package/dist/vault-cli.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/automation/run-loop.d.ts +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/doctor-security.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/doctor.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/service.d.ts +24 -22
- package/node_modules/@murphai/assistant-cli/dist/assistant/service.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/stop.d.ts +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/store.d.ts +3 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/store.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/store.js +5 -2
- package/node_modules/@murphai/assistant-cli/dist/assistant/store.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-composer-panel.d.ts +4 -4
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-composer-panel.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-layout.d.ts +9 -9
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-layout.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-message-text.d.ts +4 -4
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-message-text.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-message-text.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-transcript.d.ts +4 -4
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink-transcript.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/theme.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/view-model.d.ts +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/view-model.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant-daemon-client.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant-daemon-client.js +2 -2
- package/node_modules/@murphai/assistant-cli/dist/assistant-daemon-client.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/commands/assistant.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/commands/assistant.js +52 -7
- package/node_modules/@murphai/assistant-cli/dist/commands/assistant.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/run-terminal-logging.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/README.md +55 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-experiment-context.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-experiment-context.js +36 -24
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-experiment-context.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.d.ts +10 -0
- 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 +89 -7
- 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.d.ts +36 -36
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-journal.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.d.ts +32 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.js +347 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-artifact-paths.d.ts +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-artifact-paths.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.d.ts +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.js +163 -42
- package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/evidence.d.ts +3 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/evidence.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/evidence.js +8 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/evidence.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.d.ts +2 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.js +11 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.js +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.d.ts +11 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.js +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.d.ts +18 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.js +66 -16
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.d.ts +26 -8
- 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 +644 -158
- 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 +15 -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 +90 -29
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/run-loop.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/scanner.d.ts +6 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/scanner.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/scanner.js +18 -6
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/scanner.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/shared.d.ts +9 -1
- 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/automation/target-override.d.ts +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.js +30 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/turn-envelope.d.ts +4 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/turn-envelope.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/turn-envelope.js +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/turn-envelope.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation.d.ts +5 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation.js +3 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/bindings.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/bindings.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/bindings.js +22 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/bindings.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.d.ts +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-typing.d.ts +4 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-typing.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-typing.js +51 -18
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-typing.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/descriptors.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/descriptors.js +87 -49
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/descriptors.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/helpers.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/helpers.js +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/helpers.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/runtime.d.ts +2 -10
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/runtime.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/runtime.js +80 -61
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/runtime.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/types.d.ts +31 -20
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/types.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/types.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-bootstrap.d.ts +5 -24
- package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-bootstrap.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-bootstrap.js +95 -228
- package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-bootstrap.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-contract.generated.json +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cli-surface-manifest.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-contract-fingerprint.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-resume-binding.d.ts +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-resume-binding.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-resume-binding.js +24 -5
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-resume-binding.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-thread-route.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-thread-route.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-thread-route.js +26 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-thread-route.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/attempt-observability.d.ts +0 -29
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/attempt-observability.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/attempt-observability.js +50 -129
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/attempt-observability.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn/planning.d.ts +22 -19
- 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 +186 -109
- 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 +9 -8
- 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 +42 -73
- 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.d.ts +3 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.js +83 -91
- package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-policy.d.ts +4 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-policy.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-policy.js +48 -11
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-policy.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-ref.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-ref.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.d.ts +3 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.js +33 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/delivery-reconciliation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/delivery-reconciliation.js +38 -31
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/delivery-reconciliation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.d.ts +47 -6
- 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 +881 -117
- 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.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.js +84 -19
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/scheduled-log.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/scheduled-log.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/scheduled-log.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/scheduled-log.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.d.ts +4 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.js +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.d.ts +7 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.js +27 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron.d.ts +9 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron.js +134 -65
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron.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 +131 -22
- package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-automations.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-automations.js +58 -90
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-automations.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.d.ts +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.js +9 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/diagnostics.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/diagnostics.js +6 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/diagnostics.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.d.ts +43 -3
- 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 +79 -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 +5 -3
- 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 +73 -6
- package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/fault-injection.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/first-contact-welcome.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/first-contact-welcome.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/generate-cli-surface-contract.js +1 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/generate-cli-surface-contract.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-context-diagnostics.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-context-diagnostics.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-context-diagnostics.js +0 -27
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-context-diagnostics.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-mailbox-input-items.d.ts +22 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-mailbox-input-items.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-mailbox-input-items.js +78 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-mailbox-input-items.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.d.ts +46 -3
- 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 +47 -5
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-turn-timing.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-turn-timing.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-turn-timing.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-turn-timing.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/inbox-attachment-evidence.js +23 -12
- package/node_modules/@murphai/assistant-engine/dist/assistant/inbox-attachment-evidence.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.d.ts +8 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.js +37 -6
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.d.ts +109 -44
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.js +46 -10
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.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 +335 -120
- package/node_modules/@murphai/assistant-engine/dist/assistant/local-service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.d.ts +7 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.js +101 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.d.ts +69 -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 +234 -49
- 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 +1 -1
- 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 +3 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.d.ts +12 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.js +294 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.d.ts +20 -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 +556 -113
- package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-automation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-automation.js +11 -9
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-automation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/operator-authority.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/operator-authority.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.js +132 -21
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/ordering.d.ts +7 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/ordering.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/ordering.js +140 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/ordering.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.js +79 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.js.map +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 +28 -2
- 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 +20 -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 +154 -19
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/progress-constants.d.ts +7 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/progress-constants.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/progress-constants.js +16 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/progress-constants.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-progress.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-progress.d.ts.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 +55 -173
- 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.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/helpers.js +5 -3
- 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 +24 -25
- 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/receipts.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/receipts.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-bubbles.d.ts +6 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-bubbles.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-bubbles.js +47 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-bubbles.js.map +1 -0
- 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 +8 -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-budget-policy.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budgets.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budgets.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budgets.js +92 -40
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-budgets.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.d.ts +3 -0
- 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 +107 -37
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-write-lock.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-write-lock.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-write-lock.js +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-write-lock.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-contracts.d.ts +15 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-turn-routes.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-turn-routes.js +11 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-turn-routes.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.d.ts +2 -0
- 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 +9 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service.d.ts +29 -24
- package/node_modules/@murphai/assistant-engine/dist/assistant/service.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service.js +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.js +81 -13
- package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/state-write-lock.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/state-write-lock.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/state-write-lock.js +35 -5
- package/node_modules/@murphai/assistant-engine/dist/assistant/state-write-lock.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/status.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/status.js +36 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant/status.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/paths.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/paths.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/paths.js +23 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/paths.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.d.ts +6 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.js +137 -16
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.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 +6 -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 +94 -22
- 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 +16 -6
- 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 +546 -230
- package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/transcript-audit.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.d.ts +16 -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 +58 -10
- 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 +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-input.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-input.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-plan.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-plan.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-plan.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-progress.d.ts +3 -6
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-progress.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-progress.js +29 -22
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-progress.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turns.d.ts +7 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turns.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turns.js +33 -5
- package/node_modules/@murphai/assistant-engine/dist/assistant/turns.js.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/vault-file-send.d.ts +12 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/vault-file-send.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/vault-file-send.js +53 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/vault-file-send.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.d.ts +70 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.js +218 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.d.ts +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-runtime.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-runtime.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-runtime.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 +4 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-cli-access.js.map +1 -1
- 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 +25 -1
- 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 +5 -0
- 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 +12 -5
- 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/dynamic-tools/assistant-style.d.ts +82 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.js +190 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.d.ts +18 -18
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.js +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.d.ts +8 -8
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-voice-memo.d.ts +10 -10
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-voice-memo.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.d.ts +4 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.js +17 -8
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.d.ts +1273 -268
- 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 +1724 -34
- 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.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.js +4 -13
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-image-tool.d.ts +3 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-image-tool.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-image-tool.js +352 -74
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-image-tool.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-voice-memo-tool.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-voice-memo-tool.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-voice-memo-tool.js +6 -12
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/generate-voice-memo-tool.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.d.ts +2 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.js +89 -39
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.js +4 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.d.ts +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.js +1 -6
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.d.ts +23 -15
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.js +868 -533
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-service.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-service.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-service.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.d.ts +140 -48
- 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 +118 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-env.d.ts +2 -2
- package/node_modules/@murphai/assistant-engine/dist/attachment-prompt-contracts.d.ts +17 -17
- package/node_modules/@murphai/assistant-engine/dist/attachment-prompt-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/codex-lifecycle.d.ts +3 -1
- package/node_modules/@murphai/assistant-engine/dist/codex-lifecycle.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/codex-lifecycle.js +7 -1
- package/node_modules/@murphai/assistant-engine/dist/codex-lifecycle.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/inbox-routing-vision.d.ts +2 -2
- package/node_modules/@murphai/assistant-engine/dist/inbox-routing-vision.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/index.d.ts +2 -0
- 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/dist/knowledge/service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/outbound-channel.d.ts +3 -2
- package/node_modules/@murphai/assistant-engine/dist/outbound-channel.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/outbound-channel.js +4 -2
- package/node_modules/@murphai/assistant-engine/dist/outbound-channel.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/package.json +4 -0
- package/node_modules/@murphai/assistant-engine/skills/aerobic-fitness/SKILL.md +56 -0
- package/node_modules/@murphai/assistant-engine/skills/appointment-scheduling/SKILL.md +249 -0
- package/node_modules/@murphai/assistant-engine/skills/behavior-followthrough/SKILL.md +18 -9
- package/node_modules/@murphai/assistant-engine/skills/body-composition/SKILL.md +56 -0
- package/node_modules/@murphai/assistant-engine/skills/cardiometabolic-health/SKILL.md +56 -0
- package/node_modules/@murphai/assistant-engine/skills/circadian-rhythm/SKILL.md +57 -0
- package/node_modules/@murphai/assistant-engine/skills/cognitive-focus/SKILL.md +55 -0
- package/node_modules/@murphai/assistant-engine/skills/computer-use/SKILL.md +163 -121
- package/node_modules/@murphai/assistant-engine/skills/computer-use/references/health-browser-playbook.md +16 -9
- package/node_modules/@murphai/assistant-engine/skills/cycle-hormonal-health/SKILL.md +55 -0
- package/node_modules/@murphai/assistant-engine/skills/daily-activity/SKILL.md +55 -0
- package/node_modules/@murphai/assistant-engine/skills/energy-fatigue/SKILL.md +57 -0
- package/node_modules/@murphai/assistant-engine/skills/experiment-onboarding/SKILL.md +24 -10
- package/node_modules/@murphai/assistant-engine/skills/food-journal/SKILL.md +26 -0
- package/node_modules/@murphai/assistant-engine/skills/general-eye-health/SKILL.md +77 -0
- package/node_modules/@murphai/assistant-engine/skills/general-eye-health/references/evidence-register.md +34 -0
- package/node_modules/@murphai/assistant-engine/skills/general-eye-health/references/triage-and-contact-lenses.md +103 -0
- package/node_modules/@murphai/assistant-engine/skills/group-challenge/SKILL.md +346 -0
- package/node_modules/@murphai/assistant-engine/skills/group-chat/SKILL.md +296 -0
- package/node_modules/@murphai/assistant-engine/skills/group-newsletter/SKILL.md +210 -0
- package/node_modules/@murphai/assistant-engine/skills/groupchat-comedy/SKILL.md +182 -0
- package/node_modules/@murphai/assistant-engine/skills/gut-digestion/SKILL.md +57 -0
- package/node_modules/@murphai/assistant-engine/skills/hrv-resting-heart-rate/SKILL.md +55 -0
- package/node_modules/@murphai/assistant-engine/skills/micronutrients-supplements/SKILL.md +80 -0
- package/node_modules/@murphai/assistant-engine/skills/mobility-posture/SKILL.md +56 -0
- package/node_modules/@murphai/assistant-engine/skills/murph-onboarding/SKILL.md +358 -124
- package/node_modules/@murphai/assistant-engine/skills/music-generation/SKILL.md +162 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/SKILL.md +73 -109
- package/node_modules/@murphai/assistant-engine/skills/physical-therapy/SKILL.md +3 -1
- package/node_modules/@murphai/assistant-engine/skills/recovery-modalities/SKILL.md +57 -0
- package/node_modules/@murphai/assistant-engine/skills/red-light-therapy/SKILL.md +145 -0
- package/node_modules/@murphai/assistant-engine/skills/red-light-therapy/device-seeds.json +259 -0
- package/node_modules/@murphai/assistant-engine/skills/shared/exercise-catalog-runtime.md +29 -0
- package/node_modules/@murphai/assistant-engine/skills/shared/murph-character-sheet-v1.png +0 -0
- package/node_modules/@murphai/assistant-engine/skills/sleep-improvement/SKILL.md +60 -0
- package/node_modules/@murphai/assistant-engine/skills/sleep-recovery-readiness/SKILL.md +68 -178
- package/node_modules/@murphai/assistant-engine/skills/strength-training/SKILL.md +1 -1
- package/node_modules/@murphai/assistant-engine/skills/substance-load/SKILL.md +56 -0
- package/node_modules/@murphai/assistantd/dist/client.js.map +1 -1
- package/node_modules/@murphai/assistantd/dist/config.js.map +1 -1
- package/node_modules/@murphai/assistantd/dist/http-protocol.d.ts.map +1 -1
- package/node_modules/@murphai/assistantd/dist/http-protocol.js.map +1 -1
- package/node_modules/@murphai/clinical-records/README.md +82 -0
- package/node_modules/@murphai/clinical-records/dist/index.d.ts +1865 -0
- package/node_modules/@murphai/clinical-records/dist/index.d.ts.map +1 -0
- package/node_modules/@murphai/clinical-records/dist/index.js +488 -0
- package/node_modules/@murphai/clinical-records/dist/index.js.map +1 -0
- package/node_modules/@murphai/clinical-records/package.json +27 -0
- package/node_modules/@murphai/core/dist/atomic-write.d.ts +4 -0
- package/node_modules/@murphai/core/dist/atomic-write.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/atomic-write.js +26 -0
- package/node_modules/@murphai/core/dist/atomic-write.js.map +1 -1
- package/node_modules/@murphai/core/dist/automation.d.ts +8 -2
- package/node_modules/@murphai/core/dist/automation.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/automation.js +66 -2
- package/node_modules/@murphai/core/dist/automation.js.map +1 -1
- package/node_modules/@murphai/core/dist/bank/goals.js.map +1 -1
- package/node_modules/@murphai/core/dist/bank/habitat.d.ts +36 -0
- package/node_modules/@murphai/core/dist/bank/habitat.d.ts.map +1 -0
- package/node_modules/@murphai/core/dist/bank/habitat.js +179 -0
- package/node_modules/@murphai/core/dist/bank/habitat.js.map +1 -0
- package/node_modules/@murphai/core/dist/bank/regimens.js.map +1 -1
- package/node_modules/@murphai/core/dist/constants.d.ts +4 -0
- package/node_modules/@murphai/core/dist/constants.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/attachment-backed.d.ts +41 -1
- package/node_modules/@murphai/core/dist/domains/events/attachment-backed.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/attachment-backed.js +311 -5
- package/node_modules/@murphai/core/dist/domains/events/attachment-backed.js.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/capture-lookup.d.ts +6 -0
- package/node_modules/@murphai/core/dist/domains/events/capture-lookup.d.ts.map +1 -0
- package/node_modules/@murphai/core/dist/domains/events/capture-lookup.js +7 -0
- package/node_modules/@murphai/core/dist/domains/events/capture-lookup.js.map +1 -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 +4 -0
- 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/domains/experiments.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/domains/experiments.js +9 -3
- package/node_modules/@murphai/core/dist/domains/experiments.js.map +1 -1
- package/node_modules/@murphai/core/dist/domains/shared.js.map +1 -1
- package/node_modules/@murphai/core/dist/errors.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/errors.js.map +1 -1
- package/node_modules/@murphai/core/dist/event-attachments.d.ts +2 -1
- package/node_modules/@murphai/core/dist/event-attachments.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/event-attachments.js +1 -0
- package/node_modules/@murphai/core/dist/event-attachments.js.map +1 -1
- package/node_modules/@murphai/core/dist/experiment-media-repair.d.ts +33 -0
- package/node_modules/@murphai/core/dist/experiment-media-repair.d.ts.map +1 -0
- package/node_modules/@murphai/core/dist/experiment-media-repair.js +685 -0
- package/node_modules/@murphai/core/dist/experiment-media-repair.js.map +1 -0
- package/node_modules/@murphai/core/dist/experiment-storage.d.ts +12 -0
- package/node_modules/@murphai/core/dist/experiment-storage.d.ts.map +1 -0
- package/node_modules/@murphai/core/dist/experiment-storage.js +70 -0
- package/node_modules/@murphai/core/dist/experiment-storage.js.map +1 -0
- package/node_modules/@murphai/core/dist/frontmatter.js.map +1 -1
- package/node_modules/@murphai/core/dist/fs.d.ts +1 -0
- package/node_modules/@murphai/core/dist/fs.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/fs.js +3 -0
- package/node_modules/@murphai/core/dist/fs.js.map +1 -1
- package/node_modules/@murphai/core/dist/history/api.d.ts +11 -0
- package/node_modules/@murphai/core/dist/history/api.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/history/api.js +60 -3
- package/node_modules/@murphai/core/dist/history/api.js.map +1 -1
- package/node_modules/@murphai/core/dist/history/types.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/ids.js.map +1 -1
- package/node_modules/@murphai/core/dist/index.d.ts +12 -6
- package/node_modules/@murphai/core/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/index.js +6 -4
- package/node_modules/@murphai/core/dist/index.js.map +1 -1
- package/node_modules/@murphai/core/dist/integration-ingest-migration.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/integration-ingest-migration.js +1 -1
- package/node_modules/@murphai/core/dist/integration-ingest-migration.js.map +1 -1
- package/node_modules/@murphai/core/dist/integration-ingests.d.ts +73 -2
- package/node_modules/@murphai/core/dist/integration-ingests.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/integration-ingests.js +1196 -77
- package/node_modules/@murphai/core/dist/integration-ingests.js.map +1 -1
- package/node_modules/@murphai/core/dist/jsonl.d.ts +10 -0
- package/node_modules/@murphai/core/dist/jsonl.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/jsonl.js +63 -12
- package/node_modules/@murphai/core/dist/jsonl.js.map +1 -1
- package/node_modules/@murphai/core/dist/markdown-documents.js.map +1 -1
- package/node_modules/@murphai/core/dist/memory.d.ts +7 -2
- package/node_modules/@murphai/core/dist/memory.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/memory.js +36 -1
- package/node_modules/@murphai/core/dist/memory.js.map +1 -1
- package/node_modules/@murphai/core/dist/mutations.d.ts +33 -5
- package/node_modules/@murphai/core/dist/mutations.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/mutations.js +1684 -205
- package/node_modules/@murphai/core/dist/mutations.js.map +1 -1
- package/node_modules/@murphai/core/dist/operations/canonical-resource-lock.js.map +1 -1
- package/node_modules/@murphai/core/dist/operations/canonical-write-lock.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 +34 -1
- package/node_modules/@murphai/core/dist/operations/write-batch.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/operations/write-batch.js +684 -39
- package/node_modules/@murphai/core/dist/operations/write-batch.js.map +1 -1
- package/node_modules/@murphai/core/dist/path-safety.js.map +1 -1
- package/node_modules/@murphai/core/dist/preferences.d.ts +21 -2
- package/node_modules/@murphai/core/dist/preferences.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/preferences.js +249 -12
- package/node_modules/@murphai/core/dist/preferences.js.map +1 -1
- package/node_modules/@murphai/core/dist/public-mutations.d.ts +13 -2
- package/node_modules/@murphai/core/dist/public-mutations.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/public-mutations.js +20 -3
- package/node_modules/@murphai/core/dist/public-mutations.js.map +1 -1
- package/node_modules/@murphai/core/dist/raw-artifact-integrity.js.map +1 -1
- package/node_modules/@murphai/core/dist/registry/api.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/scheduled-logs.d.ts +1 -0
- package/node_modules/@murphai/core/dist/scheduled-logs.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/scheduled-logs.js +1 -0
- package/node_modules/@murphai/core/dist/scheduled-logs.js.map +1 -1
- package/node_modules/@murphai/core/dist/vault.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/vault.js +174 -11
- package/node_modules/@murphai/core/dist/vault.js.map +1 -1
- package/node_modules/@murphai/core/dist/wearable-receipts.js.map +1 -1
- package/node_modules/@murphai/core/dist/wearable-storage-migration.js.map +1 -1
- package/node_modules/@murphai/core/dist/write-policy.d.ts +3 -0
- package/node_modules/@murphai/core/dist/write-policy.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/write-policy.js +54 -3
- package/node_modules/@murphai/core/dist/write-policy.js.map +1 -1
- package/node_modules/@murphai/device-syncd/README.md +45 -5
- package/node_modules/@murphai/device-syncd/dist/callback-redirect.d.ts +7 -0
- package/node_modules/@murphai/device-syncd/dist/callback-redirect.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/callback-redirect.js +9 -0
- package/node_modules/@murphai/device-syncd/dist/callback-redirect.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/client.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/companion-health-metadata-parser.d.ts +30 -0
- package/node_modules/@murphai/device-syncd/dist/companion-health-metadata-parser.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/companion-health-metadata-parser.js +130 -0
- package/node_modules/@murphai/device-syncd/dist/companion-health-metadata-parser.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/companion-health-metadata.d.ts +18 -0
- package/node_modules/@murphai/device-syncd/dist/companion-health-metadata.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/companion-health-metadata.js +18 -0
- package/node_modules/@murphai/device-syncd/dist/companion-health-metadata.js.map +1 -0
- 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 +39 -4
- package/node_modules/@murphai/device-syncd/dist/config/connect-routes.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/env-keys.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.d.ts +9 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.js +56 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-config.d.ts +3 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-config.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-config.js +46 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-config.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-connect-sources.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/{providers → config}/junction-connect-sources.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-connect-sources.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/config/provider-configs.d.ts +3 -5
- package/node_modules/@murphai/device-syncd/dist/config/provider-configs.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-configs.js +69 -14
- package/node_modules/@murphai/device-syncd/dist/config/provider-configs.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-env.d.ts +2 -3
- package/node_modules/@murphai/device-syncd/dist/config/provider-env.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-env.js +0 -3
- package/node_modules/@murphai/device-syncd/dist/config/provider-env.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-factory.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-factory.js +9 -5
- package/node_modules/@murphai/device-syncd/dist/config/provider-factory.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.d.ts +26 -16
- 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 +236 -339
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-types.d.ts +62 -5
- package/node_modules/@murphai/device-syncd/dist/config/provider-types.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/runtime-config.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/runtime-config.js +7 -361
- package/node_modules/@murphai/device-syncd/dist/config/runtime-config.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.d.ts +17 -1
- package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.js +104 -11
- package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config.d.ts +5 -3
- package/node_modules/@murphai/device-syncd/dist/config.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config.js +4 -2
- package/node_modules/@murphai/device-syncd/dist/config.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/configured-provider-descriptors.d.ts +6 -0
- package/node_modules/@murphai/device-syncd/dist/configured-provider-descriptors.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/configured-provider-descriptors.js +7 -0
- package/node_modules/@murphai/device-syncd/dist/configured-provider-descriptors.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.d.ts +3 -0
- package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.js +2 -0
- package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/connect-config.d.ts +2 -2
- package/node_modules/@murphai/device-syncd/dist/connect-config.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.js +4 -11
- package/node_modules/@murphai/device-syncd/dist/connect-config.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/errors.d.ts +8 -0
- package/node_modules/@murphai/device-syncd/dist/errors.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/errors.js +26 -0
- package/node_modules/@murphai/device-syncd/dist/errors.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/hosted-hints.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/hosted-hints.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/hosted-runtime.d.ts +24 -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 +187 -28
- package/node_modules/@murphai/device-syncd/dist/hosted-runtime.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/http.d.ts +2 -9
- package/node_modules/@murphai/device-syncd/dist/http.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/http.js +26 -29
- package/node_modules/@murphai/device-syncd/dist/http.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/index.d.ts +7 -7
- package/node_modules/@murphai/device-syncd/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/index.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/index.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.d.ts +60 -0
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.js +382 -0
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/junction-resources.d.ts +17 -0
- package/node_modules/@murphai/device-syncd/dist/junction-resources.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/junction-resources.js +28 -0
- package/node_modules/@murphai/device-syncd/dist/junction-resources.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/metadata.d.ts +1 -0
- package/node_modules/@murphai/device-syncd/dist/metadata.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/metadata.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/metadata.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/provider-configs.d.ts +3 -0
- package/node_modules/@murphai/device-syncd/dist/provider-configs.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/provider-configs.js +2 -0
- package/node_modules/@murphai/device-syncd/dist/provider-configs.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/provider-credential-policy.d.ts +6 -0
- package/node_modules/@murphai/device-syncd/dist/provider-credential-policy.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/provider-credential-policy.js +22 -0
- package/node_modules/@murphai/device-syncd/dist/provider-credential-policy.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/provider-job-definitions.d.ts +7 -0
- package/node_modules/@murphai/device-syncd/dist/provider-job-definitions.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/provider-job-definitions.js +116 -0
- package/node_modules/@murphai/device-syncd/dist/provider-job-definitions.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/provider-label.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/provider-label.js +5 -5
- package/node_modules/@murphai/device-syncd/dist/provider-label.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction-client.d.ts +22 -5
- 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 +93 -58
- package/node_modules/@murphai/device-syncd/dist/providers/junction-client.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction-config.d.ts +3 -0
- package/node_modules/@murphai/device-syncd/dist/providers/junction-config.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/providers/junction-config.js +2 -0
- package/node_modules/@murphai/device-syncd/dist/providers/junction-config.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/providers/junction.d.ts +5 -28
- package/node_modules/@murphai/device-syncd/dist/providers/junction.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction.js +927 -719
- package/node_modules/@murphai/device-syncd/dist/providers/junction.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/oura-webhooks.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/oura.d.ts +2 -14
- package/node_modules/@murphai/device-syncd/dist/providers/oura.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/oura.js +3 -26
- package/node_modules/@murphai/device-syncd/dist/providers/oura.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/provider-diagnostics.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/provider-diagnostics.js +34 -30
- package/node_modules/@murphai/device-syncd/dist/providers/provider-diagnostics.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/shared-oauth.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/strava-webhooks.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/strava.d.ts +2 -15
- package/node_modules/@murphai/device-syncd/dist/providers/strava.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/strava.js +8 -43
- package/node_modules/@murphai/device-syncd/dist/providers/strava.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/whoop.d.ts +2 -12
- package/node_modules/@murphai/device-syncd/dist/providers/whoop.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/whoop.js +3 -22
- package/node_modules/@murphai/device-syncd/dist/providers/whoop.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-account.d.ts +25 -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 +32 -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 +9 -4
- package/node_modules/@murphai/device-syncd/dist/public-ingress.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-ingress.js +125 -40
- package/node_modules/@murphai/device-syncd/dist/public-ingress.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-provider-descriptor-shared.d.ts +3 -0
- package/node_modules/@murphai/device-syncd/dist/public-provider-descriptor-shared.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/public-provider-descriptor-shared.js +4 -0
- package/node_modules/@murphai/device-syncd/dist/public-provider-descriptor-shared.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/public-provider-descriptors.d.ts +10 -0
- package/node_modules/@murphai/device-syncd/dist/public-provider-descriptors.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/public-provider-descriptors.js +41 -0
- package/node_modules/@murphai/device-syncd/dist/public-provider-descriptors.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/registry.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/service.d.ts +1 -1
- package/node_modules/@murphai/device-syncd/dist/service.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/service.js +219 -61
- package/node_modules/@murphai/device-syncd/dist/service.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/shared.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/accounts.d.ts +6 -0
- package/node_modules/@murphai/device-syncd/dist/store/accounts.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/accounts.js +129 -40
- package/node_modules/@murphai/device-syncd/dist/store/accounts.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.d.ts +2 -0
- package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.js +80 -6
- package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/jobs.d.ts +15 -0
- package/node_modules/@murphai/device-syncd/dist/store/jobs.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/jobs.js +119 -39
- package/node_modules/@murphai/device-syncd/dist/store/jobs.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/oauth-states.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/oauth-states.js +14 -8
- package/node_modules/@murphai/device-syncd/dist/store/oauth-states.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 +22 -4
- package/node_modules/@murphai/device-syncd/dist/store/schema.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/sync-state.d.ts +9 -1
- package/node_modules/@murphai/device-syncd/dist/store/sync-state.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/sync-state.js +57 -52
- package/node_modules/@murphai/device-syncd/dist/store/sync-state.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store.d.ts +46 -2
- package/node_modules/@murphai/device-syncd/dist/store.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store.js +103 -6
- package/node_modules/@murphai/device-syncd/dist/store.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/types.d.ts +24 -1
- package/node_modules/@murphai/device-syncd/dist/types.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/types.js.map +1 -1
- package/node_modules/@murphai/device-syncd/package.json +28 -0
- package/node_modules/@murphai/exercise-library/content/seed/at-home-exercise-strength-addon-250.csv +251 -251
- package/node_modules/@murphai/exercise-library/content/seed/at-home-exercise-stretch-addon-500.csv +359 -359
- package/node_modules/@murphai/exercise-library/content/seed/at-home-exercise-stretch.csv +154 -154
- package/node_modules/@murphai/exercise-library/dist/build.js.map +1 -1
- package/node_modules/@murphai/exercise-library/dist/runtime.js.map +1 -1
- package/node_modules/@murphai/exercise-library/dist/schema.d.ts.map +1 -1
- package/node_modules/@murphai/exercise-library/generated/catalog.hash +1 -1
- package/node_modules/@murphai/exercise-library/generated/exercise-details.json +12082 -764
- package/node_modules/@murphai/exercise-library/generated/exercise-facets.json +1 -1
- package/node_modules/@murphai/exercise-library/generated/exercise-index.json +1 -1
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-11776448.md +60 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-18306161.md +60 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-19817517.md +60 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-19913903.md +60 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-19995444.md +62 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-20662037.md +60 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-24568233.md +62 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-26914684.md +60 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-27141153.md +62 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-28186867.md +62 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-36495670.md +62 -0
- package/node_modules/@murphai/health-commons/content/sources/photobiomodulation-intake/pmid-37760145.md +62 -0
- package/node_modules/@murphai/health-commons/dist/build.js.map +1 -1
- package/node_modules/@murphai/health-commons/dist/catalog.d.ts +4 -4
- package/node_modules/@murphai/health-commons/dist/hash-artifact.js.map +1 -1
- package/node_modules/@murphai/health-commons/dist/runtime.d.ts +3 -7
- package/node_modules/@murphai/health-commons/dist/runtime.d.ts.map +1 -1
- package/node_modules/@murphai/health-commons/dist/runtime.js +59 -47
- package/node_modules/@murphai/health-commons/dist/runtime.js.map +1 -1
- package/node_modules/@murphai/health-commons/dist/sync-cloudflare-r2.js.map +1 -1
- package/node_modules/@murphai/health-commons/generated/catalog.hash +1 -1
- package/node_modules/@murphai/health-commons/generated/protocol-family-graph.json +1 -1
- package/node_modules/@murphai/health-commons/generated/protocol-index.json +1 -1
- package/node_modules/@murphai/health-commons/generated/protocol-run-specs.json +1 -1
- package/node_modules/@murphai/health-commons/generated/source-artifact-index.json +1 -1
- package/node_modules/@murphai/health-commons/generated/source-identities.ndjson +54 -0
- package/node_modules/@murphai/health-commons/generated/source-index.json +727 -1
- package/node_modules/@murphai/health-commons/generated/web/browse/biomarkers.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/browse/experiments.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/added-sugar-intake.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/adherence.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/adverse-symptoms.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alanine-aminotransferase.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alcohol-craving.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alcohol-free-days.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alcohol-intake.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/alcohol-withdrawal-symptoms.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ankle-knee-to-wall-distance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/apolipoprotein-b.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/aspartate-aminotransferase.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/bilirubin.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-glucose.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-ketones-beta-hydroxybutyrate.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-oxygen-spo2.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-pressure.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/blood-urea-nitrogen.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/body-fat-percent.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/body-weight.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/chosen-primary-outcome-score.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/continuous-glucose.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/creatine-kinase.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daily-energy-intake-kcal.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daily-protein-g-per-kg.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daily-protein-grams.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daily-step-count.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/daytime-sleepiness.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/deep-sleep-minutes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/dietary-fiber-g-day.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/digestive-comfort.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/egfr.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/estimated-gfr.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/estimated-vo2max.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/fasting-triglycerides.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/gi-symptom-score.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/gi-tolerance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hbot-session-tolerability.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hdl-c.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hrv-rmssd.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lateral-knee-pain.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-c.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-cholesterol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lean-body-mass.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lean-mass.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/leg-heaviness-score.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/liver-enzyme-panel.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/macular-health-safety.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/moderate-to-vigorous-activity-minutes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/mood-affect.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/morning-blood-pressure.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/muscle-soreness-score.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/musculoskeletal-pain.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/non-hdl-c.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/non-hdl-cholesterol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/omega-3-index.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/perceived-recovery-score.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/perceived-recovery.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/perceived-stiffness.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/perceived-stress.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/periocular-wrinkle-score.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/postprandial-glucose-excursion.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/pre-sleep-arousal.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/rem-sleep-minutes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/resting-heart-rate.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/running-tolerance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/saturated-fat-g-day.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sedentary-time.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/self-reported-mood.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/serum-25-hydroxyvitamin-d.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/serum-creatinine.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/serum-uric-acid.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/shoulder-reach-distance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sit-and-reach-distance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/skin-texture-roughness-score.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/skin-tolerability-symptoms.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sleep-efficiency.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sleep-onset-latency.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/sleep-quality.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/standardized-skin-photo-score.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/step-floor-days.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/stretching-adherence-sessions.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/stretching-session-burden.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/stretching-symptoms.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/subjective-eye-strain.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/subjective-satiety.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/supplement-adherence.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/task-performance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/toe-touch-distance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/total-cholesterol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/total-sleep-time.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/training-performance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/training-volume.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/triglycerides.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/urine-albumin-creatinine-ratio.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/visual-fatigue.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/visual-performance.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/waist-circumference.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/wake-time-variability.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/walking-bout-minutes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/walking-cadence.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/walking-safety-events.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/measurement_method/clinic-imaging-upgrade.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/measurement_method/home-standardized-photo-roi-analysis.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/measurement_method/standardized-photo-score-workflow.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/at-home-static-stretching-for-flexibility.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/bryan-johnson-blueprint.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/caffeine-curfew-dose-reset.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/cold-plunge.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/consistent-wake-time.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/creatine-monohydrate.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/daily-step-floor.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/daily-vitamin-d3-supplementation.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/digital-sunset.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/finnish-sauna.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/hydrolyzed-collagen-peptides.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/hyperbaric-oxygen-therapy.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/it-band-syndrome-rehab-and-return-to-run.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/morning-outdoor-light-exposure.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/no-added-sugar-diet.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/norwegian-4x4.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/oral-epa-dha-supplementation.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/pneumatic-compression-pants.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/pre-sleep-resonance-breathing-and-meditation.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/pre-sleep-silent-meditation.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/prolonged-fasting-24-72-hours.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/protein-floor-high-protein-intake.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/psyllium-husk-for-cholesterol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/red-light-glasses-before-bed.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/red-near-infrared-skin-texture-photoaging.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/red-yeast-rice-for-cholesterol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/short-term-alcohol-abstinence.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/social-media-fast.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/tabata-20-10-interval-training.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/time-restricted-eating-18-6.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/walking-after-every-meal.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/whole-body-red-and-near-infrared-light-exposure.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/zone-2-aerobic-base-block.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/blood-oxygen-spo2/overview.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/blood-oxygen-spo2/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/deep-sleep-minutes/overview.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/deep-sleep-minutes/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/estimated-vo2max/overview.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/estimated-vo2max/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/hrv-rmssd/overview.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/hrv-rmssd/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/rem-sleep-minutes/overview.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/rem-sleep-minutes/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/resting-heart-rate/overview.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/pages/biomarkers/resting-heart-rate/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/routes/index.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/blood-oxygen-spo2.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/deep-sleep-minutes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/estimated-vo2max.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/hrv-rmssd.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/rem-sleep-minutes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/biomarkers/resting-heart-rate.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/at-home-static-stretching-for-flexibility.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/bryan-johnson-blueprint.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/caffeine-curfew-dose-reset.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/cold-plunge.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/consistent-wake-time.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/daily-step-floor.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/digital-sunset.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/finnish-sauna.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/hyperbaric-oxygen-therapy.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/morning-outdoor-light-exposure.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/no-added-sugar-diet.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/norwegian-4x4.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/pneumatic-compression-pants.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/pre-sleep-resonance-breathing-and-meditation.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/pre-sleep-silent-meditation.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/prolonged-fasting-24-72-hours.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/protein-floor-high-protein-intake.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/red-light-glasses-before-bed.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/red-near-infrared-skin-texture-photoaging.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/short-term-alcohol-abstinence.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/tabata-20-10-interval-training.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/time-restricted-eating-18-6.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/walking-after-every-meal.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/whole-body-red-and-near-infrared-light-exposure.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/zone-2-aerobic-base-block.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/at-home-static-stretching-for-flexibility/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/at-home-static-stretching-for-flexibility/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/at-home-static-stretching-for-flexibility/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/bryan-johnson-blueprint/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/bryan-johnson-blueprint/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/bryan-johnson-blueprint/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/caffeine-curfew-dose-reset/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/caffeine-curfew-dose-reset/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/caffeine-curfew-dose-reset/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/cold-plunge/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/cold-plunge/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/cold-plunge/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/consistent-wake-time/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/consistent-wake-time/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/consistent-wake-time/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/daily-step-floor/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/daily-step-floor/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/daily-step-floor/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/digital-sunset/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/digital-sunset/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/digital-sunset/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/finnish-sauna/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/finnish-sauna/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/finnish-sauna/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/hyperbaric-oxygen-therapy/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/hyperbaric-oxygen-therapy/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/hyperbaric-oxygen-therapy/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/morning-outdoor-light-exposure/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/morning-outdoor-light-exposure/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/morning-outdoor-light-exposure/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/no-added-sugar-diet/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/no-added-sugar-diet/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/no-added-sugar-diet/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/norwegian-4x4/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/norwegian-4x4/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/norwegian-4x4/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pneumatic-compression-pants/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pneumatic-compression-pants/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pneumatic-compression-pants/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-resonance-breathing-and-meditation/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-resonance-breathing-and-meditation/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-resonance-breathing-and-meditation/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-silent-meditation/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-silent-meditation/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/pre-sleep-silent-meditation/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/prolonged-fasting-24-72-hours/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/prolonged-fasting-24-72-hours/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/prolonged-fasting-24-72-hours/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/protein-floor-high-protein-intake/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/protein-floor-high-protein-intake/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/protein-floor-high-protein-intake/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-light-glasses-before-bed/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-light-glasses-before-bed/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-light-glasses-before-bed/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-near-infrared-skin-texture-photoaging/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-near-infrared-skin-texture-photoaging/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/red-near-infrared-skin-texture-photoaging/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/short-term-alcohol-abstinence/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/short-term-alcohol-abstinence/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/short-term-alcohol-abstinence/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/tabata-20-10-interval-training/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/tabata-20-10-interval-training/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/tabata-20-10-interval-training/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/time-restricted-eating-18-6/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/time-restricted-eating-18-6/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/time-restricted-eating-18-6/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/walking-after-every-meal/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/walking-after-every-meal/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/walking-after-every-meal/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/whole-body-red-and-near-infrared-light-exposure/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/whole-body-red-and-near-infrared-light-exposure/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/whole-body-red-and-near-infrared-light-exposure/results-public.json +2 -2
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/zone-2-aerobic-base-block/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/zone-2-aerobic-base-block/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/zone-2-aerobic-base-block/results-public.json +2 -2
- package/node_modules/@murphai/health-metrics/README.md +4 -0
- package/node_modules/@murphai/health-metrics/dist/catalog.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/activity.d.ts +15 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/activity.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/activity.js +99 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/activity.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/labs.d.ts +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/recovery.d.ts +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/recovery.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/recovery.js +12 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/recovery.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/sleep.d.ts +1 -1
- package/node_modules/@murphai/health-metrics/dist/format.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/goals.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/index.d.ts +0 -2
- package/node_modules/@murphai/health-metrics/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/index.js +0 -2
- package/node_modules/@murphai/health-metrics/dist/index.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/murph-age-source-routes.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/murph-age-source-routes.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/murph-age.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/murph-age.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/normalize.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/selectors.js.map +1 -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.map +1 -1
- 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.map +1 -1
- package/node_modules/@murphai/health-metrics/package.json +10 -0
- package/node_modules/@murphai/importers/README.md +13 -0
- package/node_modules/@murphai/importers/dist/assessment/import-assessment-response.js.map +1 -1
- package/node_modules/@murphai/importers/dist/clinical-records/index.d.ts +19 -0
- package/node_modules/@murphai/importers/dist/clinical-records/index.d.ts.map +1 -0
- package/node_modules/@murphai/importers/dist/clinical-records/index.js +1523 -0
- package/node_modules/@murphai/importers/dist/clinical-records/index.js.map +1 -0
- package/node_modules/@murphai/importers/dist/core-port.d.ts +1 -0
- 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.map +1 -1
- package/node_modules/@murphai/importers/dist/create-importers.js.map +1 -1
- package/node_modules/@murphai/importers/dist/csv-sample-import-planner.js.map +1 -1
- package/node_modules/@murphai/importers/dist/csv-sample-importer.js.map +1 -1
- 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 +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/index.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/index.js +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/index.js.map +1 -1
- 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 +3 -2
- 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 +12 -20
- package/node_modules/@murphai/importers/dist/device-providers/junction-resources.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction.d.ts +18 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction.js +1026 -123
- package/node_modules/@murphai/importers/dist/device-providers/junction.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/provider-descriptors.d.ts +132 -132
- package/node_modules/@murphai/importers/dist/device-providers/provider-descriptors.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/provider-descriptors.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/registry.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/whoop.js.map +1 -1
- package/node_modules/@murphai/importers/dist/document-importer.js.map +1 -1
- package/node_modules/@murphai/importers/dist/meal-importer.js.map +1 -1
- package/node_modules/@murphai/importers/dist/preset-registry.js.map +1 -1
- package/node_modules/@murphai/importers/package.json +5 -0
- package/node_modules/@murphai/inbox-services/dist/inbox-app/bootstrap-doctor.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/environment.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/reads.js +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/reads.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/service.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/service.js +2 -0
- package/node_modules/@murphai/inbox-services/dist/inbox-app/service.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/storage-repair.d.ts +3 -0
- package/node_modules/@murphai/inbox-services/dist/inbox-app/storage-repair.d.ts.map +1 -0
- package/node_modules/@murphai/inbox-services/dist/inbox-app/storage-repair.js +37 -0
- package/node_modules/@murphai/inbox-services/dist/inbox-app/storage-repair.js.map +1 -0
- package/node_modules/@murphai/inbox-services/dist/inbox-app/types.d.ts +22 -2
- package/node_modules/@murphai/inbox-services/dist/inbox-app/types.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/connectors.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/daemon.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/parser.d.ts +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/parser.js +2 -2
- package/node_modules/@murphai/inbox-services/dist/inbox-services/parser.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/promotions.d.ts +2 -2
- package/node_modules/@murphai/inbox-services/dist/inbox-services/promotions.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/promotions.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/query.d.ts +27 -27
- package/node_modules/@murphai/inbox-services/dist/inbox-services/query.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/query.js +2 -2
- package/node_modules/@murphai/inbox-services/dist/inbox-services/query.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/state.js.map +1 -1
- package/node_modules/@murphai/inboxd/README.md +3 -2
- package/node_modules/@murphai/inboxd/dist/checkpoint.d.ts +2 -0
- package/node_modules/@murphai/inboxd/dist/checkpoint.d.ts.map +1 -0
- package/node_modules/@murphai/inboxd/dist/checkpoint.js +2 -0
- package/node_modules/@murphai/inboxd/dist/checkpoint.js.map +1 -0
- package/node_modules/@murphai/inboxd/dist/connectors/email/directness.d.ts +11 -0
- package/node_modules/@murphai/inboxd/dist/connectors/email/directness.d.ts.map +1 -0
- package/node_modules/@murphai/inboxd/dist/connectors/email/directness.js +67 -0
- package/node_modules/@murphai/inboxd/dist/connectors/email/directness.js.map +1 -0
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.d.ts +3 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.js +18 -9
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.d.ts +1 -10
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.js +2 -65
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/hosted-conversation.d.ts +0 -15
- package/node_modules/@murphai/inboxd/dist/connectors/hosted-conversation.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/hosted-conversation.js +0 -33
- package/node_modules/@murphai/inboxd/dist/connectors/hosted-conversation.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/telegram/connector.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/contracts/capture.d.ts +1 -2
- package/node_modules/@murphai/inboxd/dist/contracts/capture.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/contracts/search.d.ts +2 -2
- package/node_modules/@murphai/inboxd/dist/contracts/search.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/index.d.ts +1 -0
- package/node_modules/@murphai/inboxd/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/index.js +1 -0
- package/node_modules/@murphai/inboxd/dist/index.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/envelope-migration.d.ts +21 -0
- package/node_modules/@murphai/inboxd/dist/indexing/envelope-migration.d.ts.map +1 -0
- package/node_modules/@murphai/inboxd/dist/indexing/envelope-migration.js +259 -0
- package/node_modules/@murphai/inboxd/dist/indexing/envelope-migration.js.map +1 -0
- package/node_modules/@murphai/inboxd/dist/indexing/parser-derivatives.d.ts +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/parser-derivatives.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/parser-derivatives.js +7 -4
- package/node_modules/@murphai/inboxd/dist/indexing/parser-derivatives.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/persist/canonical-records.d.ts +13 -1
- package/node_modules/@murphai/inboxd/dist/indexing/persist/canonical-records.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/persist/canonical-records.js +68 -13
- package/node_modules/@murphai/inboxd/dist/indexing/persist/canonical-records.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/persist.d.ts +12 -6
- package/node_modules/@murphai/inboxd/dist/indexing/persist.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/persist.js +226 -73
- package/node_modules/@murphai/inboxd/dist/indexing/persist.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/retention.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/kernel/pipeline.js +4 -4
- package/node_modules/@murphai/inboxd/dist/kernel/pipeline.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/kernel/registry.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/kernel/sqlite/rows.d.ts +2 -2
- package/node_modules/@murphai/inboxd/dist/kernel/sqlite/rows.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/kernel/sqlite/rows.js +3 -3
- package/node_modules/@murphai/inboxd/dist/kernel/sqlite/rows.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/kernel/sqlite.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/kernel/sqlite.js +42 -12
- package/node_modules/@murphai/inboxd/dist/kernel/sqlite.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.d.ts +2 -0
- package/node_modules/@murphai/inboxd/dist/retention.d.ts.map +1 -0
- package/node_modules/@murphai/inboxd/dist/retention.js +2 -0
- package/node_modules/@murphai/inboxd/dist/retention.js.map +1 -0
- package/node_modules/@murphai/inboxd/dist/runtime.d.ts +2 -1
- package/node_modules/@murphai/inboxd/dist/runtime.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/runtime.js +1 -0
- package/node_modules/@murphai/inboxd/dist/runtime.js.map +1 -1
- package/node_modules/@murphai/inboxd/package.json +12 -0
- package/node_modules/@murphai/messaging-ingress/README.md +1 -5
- package/node_modules/@murphai/messaging-ingress/dist/internal.d.ts.map +1 -1
- package/node_modules/@murphai/messaging-ingress/dist/internal.js +4 -0
- package/node_modules/@murphai/messaging-ingress/dist/internal.js.map +1 -1
- package/node_modules/@murphai/messaging-ingress/dist/linq-webhook.d.ts.map +1 -1
- package/node_modules/@murphai/messaging-ingress/dist/linq-webhook.js.map +1 -1
- package/node_modules/@murphai/messaging-ingress/package.json +0 -4
- package/node_modules/@murphai/operator-config/dist/agentmail-runtime.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.d.ts +2 -0
- package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.js +5 -0
- package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.d.ts +5 -0
- package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.js +58 -0
- package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/delivery-failure.d.ts +2 -2
- package/node_modules/@murphai/operator-config/dist/assistant/delivery-failure.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/delivery-failure.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/hosted-config.d.ts +5 -5
- package/node_modules/@murphai/operator-config/dist/assistant/hosted-config.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.d.ts +32 -31
- package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.js +4 -2
- package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant-backend.d.ts +2 -2
- package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.d.ts +488 -317
- 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 +171 -22
- package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-cli-contracts.d.ts +32 -27
- package/node_modules/@murphai/operator-config/dist/device-cli-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-cli-contracts.js +11 -1
- package/node_modules/@murphai/operator-config/dist/device-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-daemon/paths.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-daemon.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-sync-browser-opener.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-sync-client.d.ts +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 +6 -2
- package/node_modules/@murphai/operator-config/dist/device-sync-client.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/hosted-assistant-config-constants.d.ts +1 -1
- package/node_modules/@murphai/operator-config/dist/hosted-assistant-config-constants.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/hosted-assistant-config.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.d.ts +138 -93
- package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.js +40 -3
- package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/linq-runtime.d.ts +7 -11
- package/node_modules/@murphai/operator-config/dist/linq-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/linq-runtime.js +25 -10
- package/node_modules/@murphai/operator-config/dist/linq-runtime.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/message-formatting.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/message-formatting.js +14 -3
- package/node_modules/@murphai/operator-config/dist/message-formatting.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/operator-config/self-delivery-targets.d.ts +4 -2
- package/node_modules/@murphai/operator-config/dist/operator-config/self-delivery-targets.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/operator-config/storage.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/operator-config.d.ts +7 -5
- package/node_modules/@murphai/operator-config/dist/operator-config.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/operator-config.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/setup-cli-contracts.d.ts +54 -54
- package/node_modules/@murphai/operator-config/dist/setup-cli-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/setup-runtime-env.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/telegram-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/telegram-runtime.js +11 -1
- package/node_modules/@murphai/operator-config/dist/telegram-runtime.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.d.ts +85 -85
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.js +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-errors.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/package.json +0 -5
- package/node_modules/@murphai/parsers/README.md +4 -2
- package/node_modules/@murphai/parsers/dist/adapters/ffmpeg.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/adapters/poppler-pdf.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/adapters/text-file.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/adapters/whisper-cpp.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/adapters/zxing-wasm.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/contracts/parser-output.d.ts +15 -0
- package/node_modules/@murphai/parsers/dist/contracts/parser-output.d.ts.map +1 -0
- package/node_modules/@murphai/parsers/dist/contracts/parser-output.js +368 -0
- package/node_modules/@murphai/parsers/dist/contracts/parser-output.js.map +1 -0
- package/node_modules/@murphai/parsers/dist/index.d.ts +5 -2
- package/node_modules/@murphai/parsers/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/parsers/dist/index.js +3 -1
- package/node_modules/@murphai/parsers/dist/index.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/parser-result.d.ts +2 -0
- package/node_modules/@murphai/parsers/dist/parser-result.d.ts.map +1 -0
- package/node_modules/@murphai/parsers/dist/parser-result.js +2 -0
- package/node_modules/@murphai/parsers/dist/parser-result.js.map +1 -0
- package/node_modules/@murphai/parsers/dist/pipelines/parse-attachment.d.ts.map +1 -1
- package/node_modules/@murphai/parsers/dist/pipelines/parse-attachment.js +2 -245
- package/node_modules/@murphai/parsers/dist/pipelines/parse-attachment.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/pipelines/worker.d.ts +1 -1
- package/node_modules/@murphai/parsers/dist/pipelines/worker.d.ts.map +1 -1
- package/node_modules/@murphai/parsers/dist/pipelines/worker.js +12 -4
- package/node_modules/@murphai/parsers/dist/pipelines/worker.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/publish/legacy-attempt-compactor.d.ts +18 -0
- package/node_modules/@murphai/parsers/dist/publish/legacy-attempt-compactor.d.ts.map +1 -0
- package/node_modules/@murphai/parsers/dist/publish/legacy-attempt-compactor.js +480 -0
- package/node_modules/@murphai/parsers/dist/publish/legacy-attempt-compactor.js.map +1 -0
- package/node_modules/@murphai/parsers/dist/publish/writer.d.ts +26 -8
- package/node_modules/@murphai/parsers/dist/publish/writer.d.ts.map +1 -1
- package/node_modules/@murphai/parsers/dist/publish/writer.js +168 -57
- package/node_modules/@murphai/parsers/dist/publish/writer.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/registry/policy.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/registry/registry.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/shared.js.map +1 -1
- package/node_modules/@murphai/parsers/dist/toolchain/discover.js.map +1 -1
- package/node_modules/@murphai/parsers/package.json +4 -0
- package/node_modules/@murphai/query/dist/automation.d.ts +3 -2
- package/node_modules/@murphai/query/dist/automation.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/automation.js +68 -5
- package/node_modules/@murphai/query/dist/automation.js.map +1 -1
- package/node_modules/@murphai/query/dist/biomarker-change-sentiment.d.ts +10 -0
- package/node_modules/@murphai/query/dist/biomarker-change-sentiment.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/biomarker-change-sentiment.js +24 -0
- package/node_modules/@murphai/query/dist/biomarker-change-sentiment.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-experiments.d.ts +4 -0
- package/node_modules/@murphai/query/dist/browser-experiments.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-experiments.js +3 -0
- package/node_modules/@murphai/query/dist/browser-experiments.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/biomarker-panel.js +3 -3
- package/node_modules/@murphai/query/dist/browser-replica/biomarker-panel.js.map +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 +20 -0
- package/node_modules/@murphai/query/dist/browser-replica/build.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/experiments.d.ts +8 -2
- package/node_modules/@murphai/query/dist/browser-replica/experiments.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/experiments.js +128 -26
- package/node_modules/@murphai/query/dist/browser-replica/experiments.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/murph-age.d.ts +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/murph-age.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/murph-age.js +2 -1
- package/node_modules/@murphai/query/dist/browser-replica/murph-age.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/query.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/shared.d.ts +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/shared.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/shared.js +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/shared.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/views.js +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/views.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica.d.ts +1 -3
- package/node_modules/@murphai/query/dist/browser-replica.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica.js +0 -1
- package/node_modules/@murphai/query/dist/browser-replica.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser.d.ts +2 -2
- package/node_modules/@murphai/query/dist/browser.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser.js +1 -1
- package/node_modules/@murphai/query/dist/browser.js.map +1 -1
- package/node_modules/@murphai/query/dist/canonical-entities.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/canonical-entities.js +1 -0
- package/node_modules/@murphai/query/dist/canonical-entities.js.map +1 -1
- package/node_modules/@murphai/query/dist/entity-families.d.ts +1 -1
- package/node_modules/@murphai/query/dist/entity-families.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/entity-families.js +1 -0
- package/node_modules/@murphai/query/dist/entity-families.js.map +1 -1
- package/node_modules/@murphai/query/dist/experiment-adherence.d.ts +55 -2
- package/node_modules/@murphai/query/dist/experiment-adherence.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/experiment-adherence.js +367 -13
- package/node_modules/@murphai/query/dist/experiment-adherence.js.map +1 -1
- package/node_modules/@murphai/query/dist/experiment-progress-card.d.ts +6 -1
- package/node_modules/@murphai/query/dist/experiment-progress-card.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/experiment-progress-card.js +48 -13
- package/node_modules/@murphai/query/dist/experiment-progress-card.js.map +1 -1
- package/node_modules/@murphai/query/dist/experiments.d.ts +11 -1
- package/node_modules/@murphai/query/dist/experiments.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/experiments.js +265 -36
- package/node_modules/@murphai/query/dist/experiments.js.map +1 -1
- package/node_modules/@murphai/query/dist/export-pack.js.map +1 -1
- package/node_modules/@murphai/query/dist/group-weekly.d.ts +32 -0
- package/node_modules/@murphai/query/dist/group-weekly.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/group-weekly.js +166 -0
- package/node_modules/@murphai/query/dist/group-weekly.js.map +1 -0
- package/node_modules/@murphai/query/dist/health/assessments.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/blood-tests.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.d.ts +1 -0
- package/node_modules/@murphai/query/dist/health/canonical-collector.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.js +4 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/foods.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/habitat.d.ts +6 -0
- package/node_modules/@murphai/query/dist/health/habitat.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/health/habitat.js +12 -0
- package/node_modules/@murphai/query/dist/health/habitat.js.map +1 -0
- package/node_modules/@murphai/query/dist/health/immunizations.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/index.d.ts +1 -0
- package/node_modules/@murphai/query/dist/health/index.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/index.js +1 -0
- package/node_modules/@murphai/query/dist/health/index.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/projections.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/projectors/history.d.ts +1 -1
- package/node_modules/@murphai/query/dist/health/providers.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/recipes.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/registries.d.ts +11 -0
- package/node_modules/@murphai/query/dist/health/registries.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/registries.js +18 -2
- package/node_modules/@murphai/query/dist/health/registries.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/supplements.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/workout-formats.js.map +1 -1
- package/node_modules/@murphai/query/dist/id-families.d.ts +1 -13
- package/node_modules/@murphai/query/dist/id-families.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/id-families.js +1 -119
- package/node_modules/@murphai/query/dist/id-families.js.map +1 -1
- package/node_modules/@murphai/query/dist/index.d.ts +10 -15
- package/node_modules/@murphai/query/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/index.js +7 -31
- package/node_modules/@murphai/query/dist/index.js.map +1 -1
- package/node_modules/@murphai/query/dist/knowledge-format.js +1 -1
- package/node_modules/@murphai/query/dist/knowledge-graph.js +4 -4
- package/node_modules/@murphai/query/dist/knowledge-model.d.ts +1 -1
- package/node_modules/@murphai/query/dist/knowledge-search.js +2 -2
- package/node_modules/@murphai/query/dist/knowledge-search.js.map +1 -1
- package/node_modules/@murphai/query/dist/meal-nutrition.js.map +1 -1
- package/node_modules/@murphai/query/dist/memory.d.ts +3 -2
- package/node_modules/@murphai/query/dist/memory.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/memory.js +4 -1
- package/node_modules/@murphai/query/dist/memory.js.map +1 -1
- package/node_modules/@murphai/query/dist/metrics/index.js +23 -1
- package/node_modules/@murphai/query/dist/metrics/index.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 +101 -7
- package/node_modules/@murphai/query/dist/metrics/projection.js.map +1 -1
- package/node_modules/@murphai/query/dist/murph-age.d.ts +1 -1
- package/node_modules/@murphai/query/dist/murph-age.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/murph-age.js +2 -1
- package/node_modules/@murphai/query/dist/murph-age.js.map +1 -1
- package/node_modules/@murphai/query/dist/overview-weekly-stats.js.map +1 -1
- package/node_modules/@murphai/query/dist/overview.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/entity-store.d.ts +2 -0
- package/node_modules/@murphai/query/dist/projection/entity-store.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/projection/entity-store.js +56 -0
- package/node_modules/@murphai/query/dist/projection/entity-store.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/rebuild.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/schema.d.ts +1 -1
- package/node_modules/@murphai/query/dist/projection/schema.js +2 -2
- package/node_modules/@murphai/query/dist/projection/schema.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-compose.js +25 -2
- 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 +1 -0
- package/node_modules/@murphai/query/dist/projection/wearable-summary-projector.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-store.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/protocols.js.map +1 -1
- package/node_modules/@murphai/query/dist/query-projection-types.d.ts +7 -0
- package/node_modules/@murphai/query/dist/query-projection-types.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/query-projection.d.ts +3 -2
- package/node_modules/@murphai/query/dist/query-projection.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/query-projection.js +5 -1
- package/node_modules/@murphai/query/dist/query-projection.js.map +1 -1
- package/node_modules/@murphai/query/dist/read-model.d.ts +4 -0
- package/node_modules/@murphai/query/dist/read-model.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/read-model.js +1 -0
- package/node_modules/@murphai/query/dist/read-model.js.map +1 -1
- package/node_modules/@murphai/query/dist/scheduled-logs.js.map +1 -1
- package/node_modules/@murphai/query/dist/search-shared.js.map +1 -1
- package/node_modules/@murphai/query/dist/search.js.map +1 -1
- package/node_modules/@murphai/query/dist/summaries.js.map +1 -1
- package/node_modules/@murphai/query/dist/timeline.js.map +1 -1
- package/node_modules/@murphai/query/dist/vault-source.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/vault-source.js +39 -3
- package/node_modules/@murphai/query/dist/vault-source.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/candidates.d.ts +5 -2
- package/node_modules/@murphai/query/dist/wearables/candidates.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/candidates.js +305 -7
- package/node_modules/@murphai/query/dist/wearables/candidates.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/dedupe.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/dedupe.js +3 -1
- package/node_modules/@murphai/query/dist/wearables/dedupe.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/observation.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/origin.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/provider-policy.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 -79
- package/node_modules/@murphai/query/dist/wearables/public-output.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/selection.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/selection.js +5 -1
- package/node_modules/@murphai/query/dist/wearables/selection.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/sleep-association.d.ts +9 -0
- package/node_modules/@murphai/query/dist/wearables/sleep-association.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/wearables/sleep-association.js +81 -0
- package/node_modules/@murphai/query/dist/wearables/sleep-association.js.map +1 -0
- package/node_modules/@murphai/query/dist/wearables/types.d.ts +29 -4
- package/node_modules/@murphai/query/dist/wearables/types.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/types.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables.js +50 -50
- 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-state-fs.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/assistant-state-security.js +1 -1
- package/node_modules/@murphai/runtime-state/dist/assistant-state-security.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/atomic-write.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/clinical-records-local-state-descriptors.d.ts +3 -0
- package/node_modules/@murphai/runtime-state/dist/clinical-records-local-state-descriptors.d.ts.map +1 -0
- package/node_modules/@murphai/runtime-state/dist/clinical-records-local-state-descriptors.js +12 -0
- package/node_modules/@murphai/runtime-state/dist/clinical-records-local-state-descriptors.js.map +1 -0
- 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 +65 -31
- package/node_modules/@murphai/runtime-state/dist/hosted-bundles.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.d.ts +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.js +10 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-email.d.ts +11 -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 +56 -3
- package/node_modules/@murphai/runtime-state/dist/hosted-email.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-storage.d.ts +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-storage.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-storage.js +12 -2
- package/node_modules/@murphai/runtime-state/dist/hosted-storage.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/local-state-descriptor-helpers.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/local-state-descriptor-manifests.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/local-state-descriptor-manifests.js +2 -0
- package/node_modules/@murphai/runtime-state/dist/local-state-descriptor-manifests.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/locks.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/loopback-control-plane.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/process-env.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/process-identity.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/runtime-paths.d.ts +2 -0
- package/node_modules/@murphai/runtime-state/dist/runtime-paths.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/runtime-paths.js +2 -0
- package/node_modules/@murphai/runtime-state/dist/runtime-paths.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/shared.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/sqlite-warning-filter.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/sqlite.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/ulid.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-agentmail.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-assistant-account.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-assistant-defaults.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-assistant-wizard.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-assistant.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-cli.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-cli.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-services/toolchain.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-services.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-wizard-options.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/README.md +11 -0
- package/node_modules/@murphai/vault-usecases/dist/assistant-vault-paths.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/clinical-records.d.ts +102 -0
- package/node_modules/@murphai/vault-usecases/dist/clinical-records.d.ts.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/clinical-records.js +374 -0
- package/node_modules/@murphai/vault-usecases/dist/clinical-records.js.map +1 -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 +13 -4
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/experiment-onboarding-options.d.ts +2 -2
- package/node_modules/@murphai/vault-usecases/dist/health-cli-descriptors.d.ts +3 -3
- package/node_modules/@murphai/vault-usecases/dist/health-cli-descriptors.js +1 -1
- package/node_modules/@murphai/vault-usecases/dist/preferences.d.ts +34 -3
- package/node_modules/@murphai/vault-usecases/dist/preferences.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/preferences.js +84 -1
- package/node_modules/@murphai/vault-usecases/dist/preferences.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.d.ts +16 -2
- package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.js +20 -1
- package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/testing.d.ts +2 -2
- package/node_modules/@murphai/vault-usecases/dist/testing.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/testing.js +1 -1
- package/node_modules/@murphai/vault-usecases/dist/testing.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.d.ts +18 -18
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.d.ts +154 -154
- 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 +3 -1
- 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 +10 -9
- 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 +2 -1
- 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 +35 -35
- package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.d.ts +38 -37
- 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 +37 -5
- 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.js +7 -7
- package/node_modules/@murphai/vault-usecases/dist/usecases/food.d.ts +2 -2
- package/node_modules/@murphai/vault-usecases/dist/usecases/food.d.ts.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 +57 -20
- 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 +20 -10
- 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 +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention.d.ts +6 -6
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.d.ts +9 -9
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement.d.ts +4 -4
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.d.ts +13 -13
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.d.ts +3 -3
- package/node_modules/@murphai/vault-usecases/dist/usecases/runtime.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/runtime.js +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/runtime.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.d.ts +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.js +101 -8
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/types.d.ts +34 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/types.d.ts.map +1 -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 +33 -33
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-format.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-measurement.d.ts +4 -4
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-model.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-read.d.ts +8 -8
- 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 +1 -1
- 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 +48 -48
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/vault-services.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/vault-services.js +1 -0
- package/node_modules/@murphai/vault-usecases/dist/vault-services.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/package.json +8 -0
- package/node_modules/incur/dist/Cli.d.ts +4 -0
- package/node_modules/incur/dist/Cli.js +10 -3
- package/node_modules/incur/dist/SyncSkills.d.ts +2 -0
- package/node_modules/incur/dist/SyncSkills.js +5 -2
- package/node_modules/incur/src/Cli.ts +14 -3
- package/node_modules/incur/src/SyncSkills.ts +9 -2
- package/package.json +6 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/turn-attachment-image-refs.d.ts +0 -15
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/turn-attachment-image-refs.d.ts.map +0 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/turn-attachment-image-refs.js +0 -79
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/turn-attachment-image-refs.js.map +0 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction-connect-sources.d.ts.map +0 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction-connect-sources.js.map +0 -1
- package/node_modules/@murphai/messaging-ingress/dist/whatsapp-webhook.d.ts +0 -73
- package/node_modules/@murphai/messaging-ingress/dist/whatsapp-webhook.d.ts.map +0 -1
- package/node_modules/@murphai/messaging-ingress/dist/whatsapp-webhook.js +0 -212
- package/node_modules/@murphai/messaging-ingress/dist/whatsapp-webhook.js.map +0 -1
- package/node_modules/@murphai/operator-config/dist/runtime-errors.d.ts +0 -4
- package/node_modules/@murphai/operator-config/dist/runtime-errors.d.ts.map +0 -1
- package/node_modules/@murphai/operator-config/dist/runtime-errors.js +0 -19
- package/node_modules/@murphai/operator-config/dist/runtime-errors.js.map +0 -1
- package/node_modules/@murphai/operator-config/dist/whatsapp-runtime.d.ts +0 -34
- package/node_modules/@murphai/operator-config/dist/whatsapp-runtime.d.ts.map +0 -1
- package/node_modules/@murphai/operator-config/dist/whatsapp-runtime.js +0 -208
- package/node_modules/@murphai/operator-config/dist/whatsapp-runtime.js.map +0 -1
- package/node_modules/@murphai/vault-usecases/dist/query-id-families.d.ts +0 -4
- package/node_modules/@murphai/vault-usecases/dist/query-id-families.d.ts.map +0 -1
- package/node_modules/@murphai/vault-usecases/dist/query-id-families.js +0 -104
- package/node_modules/@murphai/vault-usecases/dist/query-id-families.js.map +0 -1
- /package/node_modules/@murphai/device-syncd/dist/{providers → config}/junction-connect-sources.d.ts +0 -0
|
@@ -1,16 +1,24 @@
|
|
|
1
1
|
import { createHmac, createHash, timingSafeEqual } from "node:crypto";
|
|
2
2
|
import { HistoricalPullCompleted as JunctionHistoricalPullCompletedSchema } from "@junction-api/sdk/serialization";
|
|
3
|
+
import { COMPANION_HRV_RMSSD_RESOURCE, parseCompanionHrvRmssdAdmissionId, parseSerializedCompanionHrvRmssdObservation, serializeCompanionHrvRmssdObservation, } from "@murphai/contracts";
|
|
4
|
+
import { canNormalizeJunctionSleepCycleRecordToCompactStages, classifyJunctionSummaryNormalizationEvidence, } from "@murphai/importers";
|
|
3
5
|
import { resolveJunctionOrigin } from "@murphai/importers/device-providers/junction-origin";
|
|
4
|
-
import { JUNCTION_ALLOWED_SUMMARY_RESOURCES, JUNCTION_ALLOWED_TIMESERIES_RESOURCES, JUNCTION_DEFAULT_SUMMARY_RESOURCES, JUNCTION_DEFAULT_TIMESERIES_RESOURCES, JUNCTION_KNOWN_TIMESERIES_RESOURCES,
|
|
6
|
+
import { JUNCTION_ALLOWED_SUMMARY_RESOURCES, JUNCTION_ALLOWED_TIMESERIES_RESOURCES, JUNCTION_DEFAULT_SUMMARY_RESOURCES, JUNCTION_DEFAULT_TIMESERIES_RESOURCES, JUNCTION_KNOWN_TIMESERIES_RESOURCES, isJunctionRawDirectIdentityContainerKey, isJunctionRawDirectIdentityKey, normalizeJunctionResourceName, } from "@murphai/importers/device-providers/junction-resources";
|
|
5
7
|
import { JUNCTION_DEVICE_PROVIDER_DESCRIPTOR } from "@murphai/importers/device-providers/provider-descriptors";
|
|
6
8
|
import { deviceSyncError, isDeviceSyncError } from "../errors.js";
|
|
7
|
-
import { sanitizeHostedRuntimeDiagnosticText } from "../hosted-runtime.js";
|
|
9
|
+
import { isHostedRuntimeIdShapedDiagnosticToken, sanitizeHostedRuntimeDiagnosticText, } from "../hosted-runtime.js";
|
|
10
|
+
import { addJunctionHistoricalBackfillEvidence, canCurrentRuntimeMutateJunctionHistoricalBackfillProgress, encodeJunctionHistoricalBackfillStatus, hasJunctionHistoricalBackfillEvidence, JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION, JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS, readJunctionHistoricalBackfillEvidence, readJunctionHistoricalBackfillStatus, } from "../junction-historical-backfill-progress.js";
|
|
11
|
+
import { DEVICE_SYNC_METADATA_MAX_STRING_LENGTH } from "../metadata.js";
|
|
12
|
+
import { DEVICE_SYNC_HISTORICAL_DATA_RECONNECT_REQUIRED_ERROR_CODE, isJunctionHistoricalResetProviderSlug, requiresHistoricalResetDeviceSyncSource, } from "../public-account.js";
|
|
13
|
+
import { assertValidJunctionClientUserIdSecret, normalizeJunctionDeviceSyncRuntimeConfig, } from "../configured-provider-runtime-descriptors.js";
|
|
8
14
|
import { addMilliseconds, normalizeString, sha256Text, subtractDays, } from "../shared.js";
|
|
15
|
+
import { JUNCTION_COMPANION_HRV_OBSERVATION_INVALID_CODE, JUNCTION_COMPANION_HEALTH_METADATA_EVENT_TYPE, JUNCTION_COMPANION_HEALTH_METADATA_MAX_BATCH_BYTES, JUNCTION_COMPANION_HEALTH_METADATA_RESOURCE, JUNCTION_COMPANION_HEALTH_METADATA_SOURCE_PROVIDER, JUNCTION_COMPANION_HEALTH_METADATA_SOURCE_TYPE, JunctionCompanionHealthMetadataParseError, parseJunctionCompanionHealthMetadataBatch, } from "../junction-resources.js";
|
|
9
16
|
import { JunctionClient, } from "./junction-client.js";
|
|
10
|
-
import {
|
|
17
|
+
import { resolveJunctionDeviceConnectRouteByProviderSlug } from "../config/connect-routes.js";
|
|
18
|
+
import { buildJunctionProviderSourceInstanceKey, JUNCTION_DEFAULT_PROVIDER_FILTER, normalizeJunctionProviderFilter, } from "../config/junction-connect-sources.js";
|
|
11
19
|
import { classifyDeviceSyncWebhookAcceptanceMode } from "../types.js";
|
|
12
20
|
export { JUNCTION_DEVICE_PROVIDER_DESCRIPTOR };
|
|
13
|
-
export { JUNCTION_CONNECT_SOURCE_TARGETS, JUNCTION_DEFAULT_PROVIDER_FILTER, JUNCTION_LINK_PROVIDER_SLUGS, normalizeJunctionProviderFilter, resolveJunctionConnectSourceLabel, resolveJunctionConnectTargetForSourceId, } from "
|
|
21
|
+
export { JUNCTION_CONNECT_SOURCE_TARGETS, JUNCTION_DEFAULT_PROVIDER_FILTER, JUNCTION_LINK_PROVIDER_SLUGS, normalizeJunctionProviderFilter, resolveJunctionConnectSourceLabel, resolveJunctionConnectTargetForSourceId, } from "../config/junction-connect-sources.js";
|
|
14
22
|
export const JUNCTION_PROVIDER_CONFIG_KEY = "junction";
|
|
15
23
|
export { JUNCTION_DEFAULT_SUMMARY_RESOURCES, JUNCTION_DEFAULT_TIMESERIES_RESOURCES, };
|
|
16
24
|
const JUNCTION_WEBHOOK_ROOT_FIELDS = Object.freeze({
|
|
@@ -36,235 +44,22 @@ const JUNCTION_HISTORICAL_BACKFILL_COMPLETION_SUMMARY_RESOURCES = Object.freeze(
|
|
|
36
44
|
"electrocardiogram",
|
|
37
45
|
]);
|
|
38
46
|
const JUNCTION_HISTORICAL_BACKFILL_COMPLETION_SUMMARY_RESOURCE_SET = new Set(JUNCTION_HISTORICAL_BACKFILL_COMPLETION_SUMMARY_RESOURCES);
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
"distanceKm",
|
|
50
|
-
"distance_km",
|
|
51
|
-
"floors",
|
|
52
|
-
"floorsClimbed",
|
|
53
|
-
"floors_climbed",
|
|
54
|
-
"floorsAscended",
|
|
55
|
-
"floors_ascended",
|
|
56
|
-
"activityScore",
|
|
57
|
-
"activity_score",
|
|
58
|
-
"score",
|
|
59
|
-
],
|
|
60
|
-
body: [
|
|
61
|
-
"weightKg",
|
|
62
|
-
"weight_kg",
|
|
63
|
-
"weight",
|
|
64
|
-
"bmi",
|
|
65
|
-
"body_mass_index",
|
|
66
|
-
"bodyFatPercentage",
|
|
67
|
-
"body_fat_percentage",
|
|
68
|
-
"body_fat_percent",
|
|
69
|
-
"leanBodyMassKg",
|
|
70
|
-
"lean_body_mass_kg",
|
|
71
|
-
"leanBodyMassKilogram",
|
|
72
|
-
"lean_body_mass_kilogram",
|
|
73
|
-
"leanMassKg",
|
|
74
|
-
"lean_mass_kg",
|
|
75
|
-
"waistCircumference",
|
|
76
|
-
"waist_circumference",
|
|
77
|
-
"waistCircumferenceCentimeter",
|
|
78
|
-
"waist_circumference_centimeter",
|
|
79
|
-
"waistCircumferenceCm",
|
|
80
|
-
"waist_circumference_cm",
|
|
81
|
-
],
|
|
82
|
-
sleep: JUNCTION_SLEEP_SUMMARY_NUMBER_PATHS,
|
|
83
|
-
sleep_cycle: [],
|
|
84
|
-
workouts: [
|
|
85
|
-
"calories",
|
|
86
|
-
"totalCalories",
|
|
87
|
-
"total_calories",
|
|
88
|
-
"averageHeartRate",
|
|
89
|
-
"average_heart_rate",
|
|
90
|
-
"average_hr",
|
|
91
|
-
"avg_hr",
|
|
92
|
-
"maxHeartRate",
|
|
93
|
-
"max_heart_rate",
|
|
94
|
-
"max_hr",
|
|
95
|
-
],
|
|
96
|
-
meal: [],
|
|
97
|
-
menstrual_cycle: [],
|
|
98
|
-
electrocardiogram: [],
|
|
99
|
-
});
|
|
100
|
-
const JUNCTION_RAW_ONLY_COMPLETION_PATHS = Object.freeze({
|
|
101
|
-
meal: {
|
|
102
|
-
strings: [
|
|
103
|
-
"timestamp",
|
|
104
|
-
"recordedAt",
|
|
105
|
-
"recorded_at",
|
|
106
|
-
"loggedAt",
|
|
107
|
-
"logged_at",
|
|
108
|
-
"date",
|
|
109
|
-
"day",
|
|
110
|
-
"calendarDate",
|
|
111
|
-
"calendar_date",
|
|
112
|
-
"name",
|
|
113
|
-
"mealName",
|
|
114
|
-
"meal_name",
|
|
115
|
-
"mealType",
|
|
116
|
-
"meal_type",
|
|
117
|
-
"description",
|
|
118
|
-
"notes",
|
|
119
|
-
],
|
|
120
|
-
numbers: [
|
|
121
|
-
"calories",
|
|
122
|
-
"caloriesKcal",
|
|
123
|
-
"calories_kcal",
|
|
124
|
-
"energyKcal",
|
|
125
|
-
"energy_kcal",
|
|
126
|
-
"kcal",
|
|
127
|
-
"protein",
|
|
128
|
-
"proteinGrams",
|
|
129
|
-
"protein_grams",
|
|
130
|
-
"protein_g",
|
|
131
|
-
"carbs",
|
|
132
|
-
"carbohydrates",
|
|
133
|
-
"carbohydrateGrams",
|
|
134
|
-
"carbohydrate_grams",
|
|
135
|
-
"carbohydrate_g",
|
|
136
|
-
"fat",
|
|
137
|
-
"fatGrams",
|
|
138
|
-
"fat_grams",
|
|
139
|
-
"fat_g",
|
|
140
|
-
"fiber",
|
|
141
|
-
"fibre",
|
|
142
|
-
"water",
|
|
143
|
-
"macros.water",
|
|
144
|
-
"macros.fibre",
|
|
145
|
-
"macros.fiber",
|
|
146
|
-
"energy.value",
|
|
147
|
-
],
|
|
148
|
-
arrays: [
|
|
149
|
-
"foods",
|
|
150
|
-
"foodItems",
|
|
151
|
-
"food_items",
|
|
152
|
-
"items",
|
|
153
|
-
"ingredients",
|
|
154
|
-
"nutrients",
|
|
155
|
-
],
|
|
156
|
-
},
|
|
157
|
-
menstrual_cycle: {
|
|
158
|
-
strings: [
|
|
159
|
-
"timestamp",
|
|
160
|
-
"recordedAt",
|
|
161
|
-
"recorded_at",
|
|
162
|
-
"createdAt",
|
|
163
|
-
"created_at",
|
|
164
|
-
"date",
|
|
165
|
-
"day",
|
|
166
|
-
"cycleStart",
|
|
167
|
-
"cycle_start",
|
|
168
|
-
"cycleEnd",
|
|
169
|
-
"cycle_end",
|
|
170
|
-
"periodStart",
|
|
171
|
-
"period_start",
|
|
172
|
-
"periodEnd",
|
|
173
|
-
"period_end",
|
|
174
|
-
"flow",
|
|
175
|
-
"menstrualFlow",
|
|
176
|
-
"menstrual_flow",
|
|
177
|
-
"cyclePhase",
|
|
178
|
-
"cycle_phase",
|
|
179
|
-
"menstrualPhase",
|
|
180
|
-
"menstrual_phase",
|
|
181
|
-
],
|
|
182
|
-
numbers: [
|
|
183
|
-
"cycleDay",
|
|
184
|
-
"cycle_day",
|
|
185
|
-
"menstrualCycleDay",
|
|
186
|
-
"menstrual_cycle_day",
|
|
187
|
-
"cycleLengthDays",
|
|
188
|
-
"cycle_length_days",
|
|
189
|
-
"periodLengthDays",
|
|
190
|
-
"period_length_days",
|
|
191
|
-
],
|
|
192
|
-
arrays: [
|
|
193
|
-
"menstrualFlow",
|
|
194
|
-
"menstrual_flow",
|
|
195
|
-
"symptoms",
|
|
196
|
-
"sexualActivity",
|
|
197
|
-
"sexual_activity",
|
|
198
|
-
// Facet arrays the importer normalizes; a window containing only
|
|
199
|
-
// these must not be classified as an empty backfill.
|
|
200
|
-
"ovulationTest",
|
|
201
|
-
"ovulation_test",
|
|
202
|
-
"homePregnancyTest",
|
|
203
|
-
"home_pregnancy_test",
|
|
204
|
-
"detectedDeviations",
|
|
205
|
-
"detected_deviations",
|
|
206
|
-
"basalBodyTemperature",
|
|
207
|
-
"basal_body_temperature",
|
|
208
|
-
],
|
|
209
|
-
},
|
|
210
|
-
electrocardiogram: {
|
|
211
|
-
strings: [
|
|
212
|
-
"sessionStart",
|
|
213
|
-
"session_start",
|
|
214
|
-
"classification",
|
|
215
|
-
"inconclusiveCause",
|
|
216
|
-
"inconclusive_cause",
|
|
217
|
-
],
|
|
218
|
-
numbers: [
|
|
219
|
-
"heartRateMean",
|
|
220
|
-
"heart_rate_mean",
|
|
221
|
-
"voltageSampleCount",
|
|
222
|
-
"voltage_sample_count",
|
|
223
|
-
],
|
|
224
|
-
arrays: [],
|
|
225
|
-
},
|
|
226
|
-
});
|
|
47
|
+
// Resource availability describes permission/capability, not whether the
|
|
48
|
+
// member should have a row. Limit connect-window obligations to high-signal
|
|
49
|
+
// daily families; sparse sessions such as workouts and body measurements still
|
|
50
|
+
// count as useful data, but their absence is not evidence of a failed export.
|
|
51
|
+
const JUNCTION_HISTORICAL_BACKFILL_REQUIRED_SUMMARY_RESOURCES = Object.freeze([
|
|
52
|
+
"activity",
|
|
53
|
+
"sleep",
|
|
54
|
+
"sleep_cycle",
|
|
55
|
+
]);
|
|
56
|
+
const JUNCTION_HISTORICAL_BACKFILL_REQUIRED_SUMMARY_RESOURCE_SET = new Set(JUNCTION_HISTORICAL_BACKFILL_REQUIRED_SUMMARY_RESOURCES);
|
|
227
57
|
const JUNCTION_WEBHOOK_NESTED_RECORD_KEYS = Object.freeze([
|
|
228
58
|
"data",
|
|
229
59
|
"results",
|
|
230
60
|
"items",
|
|
231
61
|
"records",
|
|
232
62
|
]);
|
|
233
|
-
const JUNCTION_WORKOUT_START_TIMESTAMP_PATHS = Object.freeze([
|
|
234
|
-
"startAt",
|
|
235
|
-
"start_at",
|
|
236
|
-
"start",
|
|
237
|
-
"timeStart",
|
|
238
|
-
"time_start",
|
|
239
|
-
]);
|
|
240
|
-
const JUNCTION_WORKOUT_END_TIMESTAMP_PATHS = Object.freeze([
|
|
241
|
-
"endAt",
|
|
242
|
-
"end_at",
|
|
243
|
-
"end",
|
|
244
|
-
"timeEnd",
|
|
245
|
-
"time_end",
|
|
246
|
-
]);
|
|
247
|
-
const JUNCTION_WORKOUT_DURATION_MINUTE_PATHS = Object.freeze([
|
|
248
|
-
"durationMinutes",
|
|
249
|
-
"duration_minutes",
|
|
250
|
-
"movingTimeMinutes",
|
|
251
|
-
"moving_time_minutes",
|
|
252
|
-
]);
|
|
253
|
-
const JUNCTION_WORKOUT_DURATION_SECOND_PATHS = Object.freeze([
|
|
254
|
-
"durationSeconds",
|
|
255
|
-
"duration_seconds",
|
|
256
|
-
"movingTime",
|
|
257
|
-
"moving_time",
|
|
258
|
-
"duration",
|
|
259
|
-
]);
|
|
260
|
-
const JUNCTION_WORKOUT_DURATION_MILLISECOND_PATHS = Object.freeze([
|
|
261
|
-
"durationMillis",
|
|
262
|
-
"duration_millis",
|
|
263
|
-
]);
|
|
264
|
-
const JUNCTION_FLOATING_TIMESTAMP_SOURCE_PROVIDER_SLUGS = new Set([
|
|
265
|
-
"abbott_libreview",
|
|
266
|
-
"freestyle_libre",
|
|
267
|
-
]);
|
|
268
63
|
const JUNCTION_TIMESERIES_RESOURCE_NAMES = new Set([
|
|
269
64
|
...JUNCTION_KNOWN_TIMESERIES_RESOURCES,
|
|
270
65
|
]);
|
|
@@ -290,22 +85,13 @@ const EMPTY_HISTORICAL_BACKFILL_RETRY_DELAYS_MS = Object.freeze([
|
|
|
290
85
|
6 * 60 * 60_000,
|
|
291
86
|
24 * 60 * 60_000,
|
|
292
87
|
]);
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
lastEmptyAt: "junctionHistoricalBackfillLastEmptyAt",
|
|
297
|
-
windowStart: "junctionHistoricalBackfillWindowStart",
|
|
298
|
-
windowEnd: "junctionHistoricalBackfillWindowEnd",
|
|
299
|
-
});
|
|
88
|
+
const JUNCTION_SCHEDULED_RECONCILE_PRIORITY = 40;
|
|
89
|
+
const JUNCTION_HISTORICAL_BACKFILL_PRIORITY = 30;
|
|
90
|
+
const JUNCTION_HISTORICAL_BACKFILL_RETRY_PRIORITY = 50;
|
|
300
91
|
export function createJunctionDeviceSyncProvider(config) {
|
|
301
|
-
|
|
92
|
+
const runtimeConfig = normalizeJunctionDeviceSyncRuntimeConfig(config);
|
|
302
93
|
const client = new JunctionClient(toClientConfig(config));
|
|
303
|
-
const
|
|
304
|
-
const timeseriesResources = normalizeOptionalResourceList(config.timeseriesResources, JUNCTION_DEFAULT_TIMESERIES_RESOURCES, JUNCTION_ALLOWED_TIMESERIES_RESOURCES, JUNCTION_KNOWN_TIMESERIES_RESOURCES, "timeseries");
|
|
305
|
-
const providerFilter = normalizeJunctionProviderFilter(config.providerFilter);
|
|
306
|
-
if (providerFilter.length === 0) {
|
|
307
|
-
throw new TypeError("Junction provider filter must include at least one hosted Link provider.");
|
|
308
|
-
}
|
|
94
|
+
const { providerFilter, summaryResources, timeseriesResources } = runtimeConfig;
|
|
309
95
|
const summaryBackfillDays = config.summaryBackfillDays ?? DEFAULT_SUMMARY_BACKFILL_DAYS;
|
|
310
96
|
const timeseriesBackfillDays = config.timeseriesBackfillDays ?? DEFAULT_TIMESERIES_BACKFILL_DAYS;
|
|
311
97
|
const reconcileDays = config.reconcileDays ?? DEFAULT_RECONCILE_DAYS;
|
|
@@ -442,7 +228,7 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
442
228
|
const providers = await client.listUserProviders(userId);
|
|
443
229
|
const providerSlugs = [
|
|
444
230
|
...new Set(providers
|
|
445
|
-
.filter((provider) => mapJunctionSourceStatus(provider.status)
|
|
231
|
+
.filter((provider) => mapJunctionSourceStatus(provider.status) !== "disconnected")
|
|
446
232
|
.map((provider) => normalizeProviderSlug(provider.origin.sourceProviderSlug)
|
|
447
233
|
?? normalizeProviderSlug(provider.slug))
|
|
448
234
|
.filter((providerSlug) => providerSlug !== null)),
|
|
@@ -462,7 +248,7 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
462
248
|
if (failedProviderSlugs.length > 0) {
|
|
463
249
|
throw deviceSyncError({
|
|
464
250
|
code: "JUNCTION_PROVIDER_DEREGISTER_FAILED",
|
|
465
|
-
message: "Junction provider deregistration failed for one or more
|
|
251
|
+
message: "Junction provider deregistration failed for one or more sources.",
|
|
466
252
|
retryable: true,
|
|
467
253
|
httpStatus: 503,
|
|
468
254
|
details: {
|
|
@@ -471,25 +257,119 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
471
257
|
});
|
|
472
258
|
}
|
|
473
259
|
}
|
|
474
|
-
function createScheduledJobs(
|
|
260
|
+
function createScheduledJobs(account, now) {
|
|
261
|
+
const scheduledHistoricalBackfillJobs = buildScheduledHistoricalBackfillJobs(account, now);
|
|
262
|
+
const nextReconcileAt = resolveJunctionNextReconcileAt(account, now, addMilliseconds(now, reconcileIntervalMs));
|
|
475
263
|
return {
|
|
476
264
|
jobs: [
|
|
477
265
|
buildWindowJob({
|
|
478
266
|
kind: "reconcile",
|
|
479
267
|
now,
|
|
480
268
|
windowStart: subtractDays(now, reconcileDays),
|
|
481
|
-
priority:
|
|
269
|
+
priority: JUNCTION_SCHEDULED_RECONCILE_PRIORITY,
|
|
482
270
|
}),
|
|
271
|
+
...scheduledHistoricalBackfillJobs,
|
|
483
272
|
],
|
|
484
|
-
nextReconcileAt
|
|
273
|
+
nextReconcileAt,
|
|
485
274
|
};
|
|
486
275
|
}
|
|
276
|
+
// Connect-time retry state is owned by metadata. The scheduler materializes
|
|
277
|
+
// one due backfill job from that state instead of storing a second retry
|
|
278
|
+
// identity in the job queue.
|
|
279
|
+
function buildScheduledHistoricalBackfillJobs(account, now) {
|
|
280
|
+
const metadata = account.metadata;
|
|
281
|
+
if (!canCurrentRuntimeMutateJunctionHistoricalBackfillProgress(metadata)) {
|
|
282
|
+
return [];
|
|
283
|
+
}
|
|
284
|
+
const statusState = readHistoricalBackfillStatus(metadata);
|
|
285
|
+
const status = statusState?.status ?? null;
|
|
286
|
+
const connectWindow = buildConnectHistoricalBackfillWindow(account, summaryBackfillDays);
|
|
287
|
+
const metadataWindowStart = normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowStart]);
|
|
288
|
+
const metadataWindowEnd = normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowEnd]);
|
|
289
|
+
const metadataMatchesConnectWindow = metadataWindowStart === connectWindow.windowStart
|
|
290
|
+
&& metadataWindowEnd === connectWindow.windowEnd;
|
|
291
|
+
const coverageVersion = statusState?.coverageVersion ?? 0;
|
|
292
|
+
const hasCurrentCoverageSemantics = coverageVersion >= JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION;
|
|
293
|
+
if (hasCurrentCoverageSemantics
|
|
294
|
+
&& (status === "complete" || status === "exhausted")
|
|
295
|
+
&& metadataMatchesConnectWindow) {
|
|
296
|
+
return [];
|
|
297
|
+
}
|
|
298
|
+
if (hasCurrentCoverageSemantics && status === "retrying" && metadataMatchesConnectWindow) {
|
|
299
|
+
const retryAt = readPendingConnectHistoricalBackfillRetryAt(account);
|
|
300
|
+
const retryAtMs = retryAt ? Date.parse(retryAt) : NaN;
|
|
301
|
+
if (retryAt && Number.isFinite(retryAtMs) && Date.parse(now) < retryAtMs) {
|
|
302
|
+
return [];
|
|
303
|
+
}
|
|
304
|
+
return [buildExactWindowJob({
|
|
305
|
+
kind: "backfill",
|
|
306
|
+
windowStart: connectWindow.windowStart,
|
|
307
|
+
windowEnd: connectWindow.windowEnd,
|
|
308
|
+
availableAt: now,
|
|
309
|
+
priority: JUNCTION_HISTORICAL_BACKFILL_RETRY_PRIORITY,
|
|
310
|
+
})];
|
|
311
|
+
}
|
|
312
|
+
// No recorded outcome: the connect-time historical backfill never ran to
|
|
313
|
+
// completion (or predates this bookkeeping). Re-derive its exact window
|
|
314
|
+
// from the connection's connect time and run it until a terminal status
|
|
315
|
+
// lands; imports are idempotent so a redundant pass is safe.
|
|
316
|
+
return [buildExactWindowJob({
|
|
317
|
+
kind: "backfill",
|
|
318
|
+
windowStart: connectWindow.windowStart,
|
|
319
|
+
windowEnd: connectWindow.windowEnd,
|
|
320
|
+
availableAt: now,
|
|
321
|
+
priority: JUNCTION_HISTORICAL_BACKFILL_PRIORITY,
|
|
322
|
+
})];
|
|
323
|
+
}
|
|
324
|
+
function isConnectHistoricalBackfillWindow(account, window) {
|
|
325
|
+
const connectHistoricalWindow = buildConnectHistoricalBackfillWindow(account, summaryBackfillDays);
|
|
326
|
+
return (window.windowStart === connectHistoricalWindow.windowStart
|
|
327
|
+
&& window.windowEnd === connectHistoricalWindow.windowEnd);
|
|
328
|
+
}
|
|
329
|
+
function readPendingConnectHistoricalBackfillRetryAt(account) {
|
|
330
|
+
const connectWindow = buildConnectHistoricalBackfillWindow(account, summaryBackfillDays);
|
|
331
|
+
return readPendingHistoricalBackfillRetryAt(account.metadata, connectWindow.windowStart, connectWindow.windowEnd);
|
|
332
|
+
}
|
|
333
|
+
function resolveJunctionNextReconcileAt(account, now, fallbackNextReconcileAt) {
|
|
334
|
+
const retryAt = readPendingConnectHistoricalBackfillRetryAt(account);
|
|
335
|
+
if (!retryAt) {
|
|
336
|
+
return fallbackNextReconcileAt;
|
|
337
|
+
}
|
|
338
|
+
const retryAtMs = Date.parse(retryAt);
|
|
339
|
+
if (!Number.isFinite(retryAtMs) || Date.parse(now) >= retryAtMs) {
|
|
340
|
+
return fallbackNextReconcileAt;
|
|
341
|
+
}
|
|
342
|
+
const fallbackMs = Date.parse(fallbackNextReconcileAt);
|
|
343
|
+
return Number.isFinite(fallbackMs) && fallbackMs <= retryAtMs
|
|
344
|
+
? fallbackNextReconcileAt
|
|
345
|
+
: retryAt;
|
|
346
|
+
}
|
|
347
|
+
async function loadJunctionHistoricalPullSnapshot(context) {
|
|
348
|
+
try {
|
|
349
|
+
return await client.introspectHistoricalPull({
|
|
350
|
+
signal: context.signal ?? null,
|
|
351
|
+
userId: context.account.externalAccountId,
|
|
352
|
+
userLimit: 1,
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
catch (error) {
|
|
356
|
+
if (context.signal?.aborted) {
|
|
357
|
+
throw error;
|
|
358
|
+
}
|
|
359
|
+
context.logger.warn?.("Junction historical-pull introspection was unavailable; using canonical import evidence.", {
|
|
360
|
+
provider: "junction",
|
|
361
|
+
errorCode: isDeviceSyncError(error) ? error.code : "JUNCTION_HISTORICAL_PULL_INTROSPECTION_FAILED",
|
|
362
|
+
});
|
|
363
|
+
return null;
|
|
364
|
+
}
|
|
365
|
+
}
|
|
487
366
|
async function executeJob(context, job) {
|
|
488
367
|
const skippedOptionalResources = [];
|
|
489
368
|
if (job.kind === "resource") {
|
|
490
369
|
return executeResourceJob(context, job, skippedOptionalResources);
|
|
491
370
|
}
|
|
492
371
|
const window = resolveJobWindow(job, context.now, job.kind === "backfill" ? summaryBackfillDays : reconcileDays);
|
|
372
|
+
const isConnectHistoricalBackfill = isConnectHistoricalBackfillWindow(context.account, window);
|
|
493
373
|
const sourceProviders = await client.listUserProviders(context.account.externalAccountId, {
|
|
494
374
|
signal: context.signal ?? null,
|
|
495
375
|
});
|
|
@@ -509,11 +389,26 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
509
389
|
if (profileSummaryResult.records.length > 0) {
|
|
510
390
|
summaries[JUNCTION_PROFILE_SUMMARY_RESOURCE] = profileSummaryResult.records;
|
|
511
391
|
}
|
|
512
|
-
const
|
|
392
|
+
const importConnections = sanitizeJunctionImportConnections(sourceProviders);
|
|
393
|
+
const importSummaries = sanitizeJunctionImportSnapshots(summaries, sourceProviders);
|
|
394
|
+
const summaryNormalizationEvidence = classifyJunctionSummaryNormalizationEvidence({
|
|
395
|
+
connections: importConnections,
|
|
396
|
+
importedAt: summaryWindow.windowEnd,
|
|
397
|
+
summaries: importSummaries,
|
|
398
|
+
windowEnd: summaryWindow.windowEnd,
|
|
399
|
+
windowStart: summaryWindow.windowStart,
|
|
400
|
+
});
|
|
401
|
+
const historicalSummaryHasRecords = hasJunctionHistoricalBackfillSummaryRecords(summaryNormalizationEvidence);
|
|
513
402
|
const summaryHasFetchedRecords = hasJunctionSnapshotRecords(summaries);
|
|
514
|
-
const
|
|
403
|
+
const baseTimeseriesWindowStart = job.kind === "backfill"
|
|
515
404
|
? maxIsoTimestamp(window.windowStart, subtractDays(window.windowEnd, timeseriesBackfillDays))
|
|
516
405
|
: window.windowStart;
|
|
406
|
+
const timeseriesCursor = job.kind === "backfill"
|
|
407
|
+
? readBackfillTimeseriesCursor(job, window)
|
|
408
|
+
: null;
|
|
409
|
+
const timeseriesWindowStart = timeseriesCursor
|
|
410
|
+
? maxIsoTimestamp(baseTimeseriesWindowStart, timeseriesCursor)
|
|
411
|
+
: baseTimeseriesWindowStart;
|
|
517
412
|
if (job.kind !== "backfill" || summaryHasFetchedRecords) {
|
|
518
413
|
await context.importSnapshot({
|
|
519
414
|
provider: "junction",
|
|
@@ -522,11 +417,19 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
522
417
|
importedAt: summaryWindow.windowEnd,
|
|
523
418
|
windowStart: summaryWindow.windowStart,
|
|
524
419
|
windowEnd: summaryWindow.windowEnd,
|
|
525
|
-
connections:
|
|
526
|
-
summaries:
|
|
420
|
+
connections: importConnections,
|
|
421
|
+
summaries: importSummaries,
|
|
527
422
|
timeseries: {},
|
|
528
423
|
});
|
|
529
424
|
}
|
|
425
|
+
// Current records are durable before the optional historical-status probe.
|
|
426
|
+
// An unavailable introspection endpoint must not hold fresh ingestion hostage.
|
|
427
|
+
const historicalPullSnapshot = isConnectHistoricalBackfill && !context.shouldYield?.()
|
|
428
|
+
? await loadJunctionHistoricalPullSnapshot(context)
|
|
429
|
+
: null;
|
|
430
|
+
const historicalSummaryCoverage = evaluateJunctionHistoricalBackfillCoverage(summaryNormalizationEvidence, sourceProviders, summaryResources, providerFilter, historicalPullSnapshot, isConnectHistoricalBackfill
|
|
431
|
+
? readJunctionHistoricalBackfillEvidence(context.account.metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.evidence])
|
|
432
|
+
: null, window);
|
|
530
433
|
if (job.kind === "backfill"
|
|
531
434
|
|| shouldImportClosedTimeseriesForReconcile(context.account.lastSyncCompletedAt, window.windowEnd)) {
|
|
532
435
|
const timeseriesImport = await importTimeseriesDailySnapshots(context, sourceProviders, timeseriesWindowStart, window.windowEnd, skippedOptionalResources);
|
|
@@ -535,24 +438,108 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
535
438
|
context,
|
|
536
439
|
job,
|
|
537
440
|
windowEnd: window.windowEnd,
|
|
538
|
-
windowStart: timeseriesImport.yieldedAt,
|
|
441
|
+
windowStart: job.kind === "backfill" ? window.windowStart : timeseriesImport.yieldedAt,
|
|
442
|
+
timeseriesCursor: job.kind === "backfill" ? timeseriesImport.yieldedAt : null,
|
|
539
443
|
}), profileMetadataPatch), skippedOptionalResources);
|
|
540
444
|
}
|
|
541
445
|
}
|
|
542
446
|
const backfillFollowUp = job.kind === "backfill"
|
|
543
|
-
?
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
447
|
+
? isConnectHistoricalBackfill
|
|
448
|
+
? buildHistoricalBackfillFollowUp({
|
|
449
|
+
coverageComplete: historicalSummaryCoverage.complete,
|
|
450
|
+
terminalFailure: historicalSummaryCoverage.pendingProviderSlugs.length > 0
|
|
451
|
+
&& historicalSummaryCoverage.pendingProviderSlugs.every((providerSlug) => historicalSummaryCoverage.reconnectProviderSlugs.includes(providerSlug)),
|
|
452
|
+
metadata: context.account.metadata,
|
|
453
|
+
now: context.now,
|
|
454
|
+
windowStart: window.windowStart,
|
|
455
|
+
windowEnd: window.windowEnd,
|
|
456
|
+
})
|
|
457
|
+
: buildNonConnectHistoricalBackfillFollowUp({
|
|
458
|
+
hasRecords: historicalSummaryHasRecords,
|
|
459
|
+
job,
|
|
460
|
+
now: context.now,
|
|
461
|
+
windowStart: window.windowStart,
|
|
462
|
+
windowEnd: window.windowEnd,
|
|
463
|
+
})
|
|
550
464
|
: {};
|
|
465
|
+
const historicalStatusAfterJob = readJunctionHistoricalBackfillStatus(backfillFollowUp.metadataPatch?.[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.status]) ?? readHistoricalBackfillStatus(context.account.metadata);
|
|
466
|
+
const historicalStatusBeforeJob = readHistoricalBackfillStatus(context.account.metadata);
|
|
467
|
+
const saturatedRetryObserved = backfillFollowUp.metadataPatch !== undefined
|
|
468
|
+
&& historicalStatusBeforeJob?.coverageVersion
|
|
469
|
+
=== JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION
|
|
470
|
+
&& historicalStatusBeforeJob.status === "retrying"
|
|
471
|
+
&& readHistoricalBackfillEmptyAttempts(context.account.metadata, window.windowStart, window.windowEnd) >= EMPTY_HISTORICAL_BACKFILL_RETRY_DELAYS_MS.length;
|
|
472
|
+
if (isConnectHistoricalBackfill
|
|
473
|
+
&& (!historicalStatusBeforeJob
|
|
474
|
+
|| historicalStatusBeforeJob.coverageVersion
|
|
475
|
+
<= JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION)
|
|
476
|
+
&& (historicalStatusAfterJob?.status === "exhausted"
|
|
477
|
+
|| saturatedRetryObserved
|
|
478
|
+
|| (historicalSummaryCoverage.complete
|
|
479
|
+
&& historicalStatusBeforeJob?.status === "exhausted"))) {
|
|
480
|
+
const pendingProviderSlugs = new Set(historicalSummaryCoverage.pendingProviderSlugs);
|
|
481
|
+
const hasCoveredProvider = sourceProviders.some((provider) => {
|
|
482
|
+
const providerSlug = resolveJunctionHistoricalCoverageProviderSlug(provider.origin.sourceProviderSlug ?? provider.slug, providerFilter);
|
|
483
|
+
return providerSlug !== null
|
|
484
|
+
&& mapJunctionSourceStatus(provider.status) !== "disconnected"
|
|
485
|
+
&& !pendingProviderSlugs.has(providerSlug);
|
|
486
|
+
});
|
|
487
|
+
if (historicalSummaryCoverage.complete || hasCoveredProvider) {
|
|
488
|
+
await projectJunctionSources(context, sourceProviders, {
|
|
489
|
+
preserveHistoricalReconnectProviderSlugs: historicalSummaryCoverage.pendingProviderSlugs,
|
|
490
|
+
});
|
|
491
|
+
}
|
|
492
|
+
if (!historicalSummaryCoverage.complete) {
|
|
493
|
+
await markJunctionHistoricalReconnectRequired(context, historicalSummaryCoverage.reconnectProviderSlugs);
|
|
494
|
+
}
|
|
495
|
+
}
|
|
496
|
+
const nextReconcileAt = backfillFollowUp.nextReconcileAt ?? resolveJunctionNextReconcileAt(context.account, context.now, addMilliseconds(context.now, reconcileIntervalMs));
|
|
551
497
|
return withJunctionSkippedResourceMetadata(context, withJunctionMetadataPatch({
|
|
552
498
|
...backfillFollowUp,
|
|
553
|
-
nextReconcileAt
|
|
499
|
+
nextReconcileAt,
|
|
554
500
|
}, profileMetadataPatch), skippedOptionalResources);
|
|
555
501
|
}
|
|
502
|
+
async function markJunctionHistoricalReconnectRequired(context, pendingProviderSlugs) {
|
|
503
|
+
if (!context.upsertConnectionSource) {
|
|
504
|
+
return;
|
|
505
|
+
}
|
|
506
|
+
const existingSources = context.listConnectionSources
|
|
507
|
+
? await context.listConnectionSources()
|
|
508
|
+
: [];
|
|
509
|
+
const existingByInstanceKey = new Map(existingSources.map((source) => [source.sourceInstanceKey, source]));
|
|
510
|
+
const recoveryProviderSlugs = new Set(pendingProviderSlugs
|
|
511
|
+
.map(normalizeProviderSlug)
|
|
512
|
+
.filter((providerSlug) => providerSlug !== null));
|
|
513
|
+
for (const providerSlug of recoveryProviderSlugs) {
|
|
514
|
+
if (!isJunctionHistoricalResetProviderSlug(providerSlug)) {
|
|
515
|
+
continue;
|
|
516
|
+
}
|
|
517
|
+
const projectedSourceInstanceKey = buildJunctionProviderSourceInstanceKey({
|
|
518
|
+
connectionId: context.account.id,
|
|
519
|
+
sourceProviderSlug: providerSlug,
|
|
520
|
+
});
|
|
521
|
+
if (!projectedSourceInstanceKey) {
|
|
522
|
+
continue;
|
|
523
|
+
}
|
|
524
|
+
const existing = existingByInstanceKey.get(projectedSourceInstanceKey) ?? existingSources.find((source) => normalizeProviderSlug(source.sourceProviderSlug) === providerSlug);
|
|
525
|
+
if (existing?.status === "error"
|
|
526
|
+
&& existing.lastErrorCode === DEVICE_SYNC_HISTORICAL_DATA_RECONNECT_REQUIRED_ERROR_CODE) {
|
|
527
|
+
continue;
|
|
528
|
+
}
|
|
529
|
+
await context.upsertConnectionSource({
|
|
530
|
+
sourceInstanceKey: existing?.sourceInstanceKey ?? projectedSourceInstanceKey,
|
|
531
|
+
sourceProviderSlug: providerSlug,
|
|
532
|
+
displayName: existing?.displayName ?? null,
|
|
533
|
+
status: "error",
|
|
534
|
+
...(existing
|
|
535
|
+
? { resourceAvailabilitySummary: existing.resourceAvailabilitySummary }
|
|
536
|
+
: {}),
|
|
537
|
+
lastErrorCode: DEVICE_SYNC_HISTORICAL_DATA_RECONNECT_REQUIRED_ERROR_CODE,
|
|
538
|
+
lastErrorMessage: "Historical data remained incomplete after bounded observation. A member-confirmed connection reset is required to restart its history export.",
|
|
539
|
+
lastSeenAt: context.now,
|
|
540
|
+
});
|
|
541
|
+
}
|
|
542
|
+
}
|
|
556
543
|
function readJunctionDirectResourceJobInput(job, window) {
|
|
557
544
|
if (job.kind !== "resource") {
|
|
558
545
|
return null;
|
|
@@ -584,6 +571,10 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
584
571
|
if (!sourceProviderSlug) {
|
|
585
572
|
return null;
|
|
586
573
|
}
|
|
574
|
+
if (resource === "sleep_cycle"
|
|
575
|
+
&& !canNormalizeJunctionSleepCycleRecordToCompactStages(record, sourceProviderSlug)) {
|
|
576
|
+
return null;
|
|
577
|
+
}
|
|
587
578
|
return {
|
|
588
579
|
record,
|
|
589
580
|
resource,
|
|
@@ -593,6 +584,10 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
593
584
|
windowStart: window.windowStart,
|
|
594
585
|
};
|
|
595
586
|
}
|
|
587
|
+
function shouldLoadJunctionDirectResourceSourceProviders(input) {
|
|
588
|
+
return (input.resource === "sleep_cycle" || input.resource === "sleep") &&
|
|
589
|
+
hasJunctionSourceReferenceIdentity(input.record);
|
|
590
|
+
}
|
|
596
591
|
async function diagnoseBackfill(context) {
|
|
597
592
|
const window = resolveDiagnosticBackfillWindow(context, summaryBackfillDays);
|
|
598
593
|
const timeseriesProbeDays = normalizeDiagnosticTimeseriesProbeDays(context.timeseriesProbeDays);
|
|
@@ -634,6 +629,15 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
634
629
|
});
|
|
635
630
|
}
|
|
636
631
|
}
|
|
632
|
+
const summaryNormalizationEvidence = providerSnapshot.ok
|
|
633
|
+
? classifyJunctionSummaryNormalizationEvidence({
|
|
634
|
+
connections: sanitizeJunctionImportConnections(sourceProviders),
|
|
635
|
+
importedAt: window.windowEnd,
|
|
636
|
+
summaries: sanitizeJunctionImportSnapshots(summaries, sourceProviders),
|
|
637
|
+
windowEnd: window.windowEnd,
|
|
638
|
+
windowStart: window.windowStart,
|
|
639
|
+
})
|
|
640
|
+
: [];
|
|
637
641
|
return {
|
|
638
642
|
generatedAt: context.now,
|
|
639
643
|
provider: "junction",
|
|
@@ -646,9 +650,7 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
646
650
|
window,
|
|
647
651
|
sourceProviders: describeJunctionDiagnosticSourceProviders(providerSnapshot),
|
|
648
652
|
summary: {
|
|
649
|
-
hasUsefulHistoricalRecords:
|
|
650
|
-
? hasJunctionHistoricalBackfillSummaryRecords(summaries, sourceProviders)
|
|
651
|
-
: false,
|
|
653
|
+
hasUsefulHistoricalRecords: hasJunctionHistoricalBackfillSummaryRecords(summaryNormalizationEvidence),
|
|
652
654
|
resources: summaryDiagnostics,
|
|
653
655
|
},
|
|
654
656
|
timeseriesProbe: {
|
|
@@ -688,17 +690,17 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
688
690
|
}
|
|
689
691
|
if (endpoint === "introspect_resources" || endpoint === "historical_pull") {
|
|
690
692
|
const sourceProviderSlug = normalizeProviderSlug(context.sourceProviderSlug);
|
|
691
|
-
const
|
|
692
|
-
? client.introspectResources({
|
|
693
|
+
const response = endpoint === "introspect_resources"
|
|
694
|
+
? describeJunctionIntrospectionResources(await runJunctionDiagnosticPayloadCall(() => client.introspectResources({
|
|
693
695
|
sourceProviderSlug,
|
|
694
696
|
userId: context.account.externalAccountId,
|
|
695
697
|
userLimit: 1,
|
|
696
|
-
})
|
|
697
|
-
: client.introspectHistoricalPull({
|
|
698
|
+
})), sourceProviderSlug)
|
|
699
|
+
: describeJunctionIntrospectionHistoricalPull(await runJunctionDiagnosticPayloadCall(() => client.introspectHistoricalPull({
|
|
698
700
|
sourceProviderSlug,
|
|
699
701
|
userId: context.account.externalAccountId,
|
|
700
702
|
userLimit: 1,
|
|
701
|
-
}));
|
|
703
|
+
})), sourceProviderSlug);
|
|
702
704
|
return {
|
|
703
705
|
generatedAt: context.now,
|
|
704
706
|
provider: "junction",
|
|
@@ -715,9 +717,7 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
715
717
|
}),
|
|
716
718
|
sourceFiltered: Boolean(sourceProviderSlug),
|
|
717
719
|
},
|
|
718
|
-
response
|
|
719
|
-
? describeJunctionIntrospectionResources(payloadResult, sourceProviderSlug)
|
|
720
|
-
: describeJunctionIntrospectionHistoricalPull(payloadResult, sourceProviderSlug),
|
|
720
|
+
response,
|
|
721
721
|
},
|
|
722
722
|
};
|
|
723
723
|
}
|
|
@@ -821,18 +821,63 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
821
821
|
};
|
|
822
822
|
}
|
|
823
823
|
async function executeResourceJob(context, job, skippedOptionalResources) {
|
|
824
|
+
if (normalizeString(job.payload.resource) === COMPANION_HRV_RMSSD_RESOURCE) {
|
|
825
|
+
let observation;
|
|
826
|
+
let admissionId;
|
|
827
|
+
try {
|
|
828
|
+
observation = parseSerializedCompanionHrvRmssdObservation(job.payload.companionObservationJson);
|
|
829
|
+
admissionId = parseCompanionHrvRmssdAdmissionId(job.payload.companionAdmissionId);
|
|
830
|
+
const expectedAdmissionId = createHash("sha256")
|
|
831
|
+
.update(serializeCompanionHrvRmssdObservation(observation))
|
|
832
|
+
.digest("hex");
|
|
833
|
+
if (admissionId !== expectedAdmissionId) {
|
|
834
|
+
throw new TypeError("Companion HRV admission identity did not match its observation.");
|
|
835
|
+
}
|
|
836
|
+
}
|
|
837
|
+
catch {
|
|
838
|
+
throw deviceSyncError({
|
|
839
|
+
code: JUNCTION_COMPANION_HRV_OBSERVATION_INVALID_CODE,
|
|
840
|
+
message: "Companion HRV observation payload was invalid.",
|
|
841
|
+
retryable: false,
|
|
842
|
+
});
|
|
843
|
+
}
|
|
844
|
+
await context.importSnapshot({
|
|
845
|
+
provider: "junction",
|
|
846
|
+
accountId: buildJunctionImportAccountId(context.account.externalAccountId),
|
|
847
|
+
connectionId: context.account.id,
|
|
848
|
+
importedAt: context.now,
|
|
849
|
+
companionHrvRmssd: [{ admissionId, observation }],
|
|
850
|
+
});
|
|
851
|
+
return {};
|
|
852
|
+
}
|
|
824
853
|
const window = resolveJobWindow(job, context.now, reconcileDays);
|
|
854
|
+
if (normalizeString(job.payload.resource) === JUNCTION_COMPANION_HEALTH_METADATA_RESOURCE) {
|
|
855
|
+
const records = parseJunctionCompanionHealthMetadataJob(job);
|
|
856
|
+
await importJunctionCompanionHealthMetadataSnapshot(context, records);
|
|
857
|
+
return {
|
|
858
|
+
nextReconcileAt: clampWebhookJobNextReconcileAt(context),
|
|
859
|
+
};
|
|
860
|
+
}
|
|
825
861
|
const resource = normalizeJunctionResourceName(job.payload.resource);
|
|
826
862
|
const resourceCategory = normalizeString(job.payload.resourceCategory);
|
|
827
863
|
const sourceProviderSlug = normalizeProviderSlug(job.payload.sourceProviderSlug);
|
|
864
|
+
let listedSourceProviders = null;
|
|
828
865
|
let projectedSourceProviders = null;
|
|
829
|
-
const
|
|
830
|
-
if (
|
|
831
|
-
return
|
|
866
|
+
const loadSourceProviders = async () => {
|
|
867
|
+
if (listedSourceProviders) {
|
|
868
|
+
return listedSourceProviders;
|
|
832
869
|
}
|
|
833
870
|
const sourceProviders = await client.listUserProviders(context.account.externalAccountId, {
|
|
834
871
|
signal: context.signal ?? null,
|
|
835
872
|
});
|
|
873
|
+
listedSourceProviders = sourceProviders;
|
|
874
|
+
return sourceProviders;
|
|
875
|
+
};
|
|
876
|
+
const loadAndProjectSourceProviders = async () => {
|
|
877
|
+
if (projectedSourceProviders) {
|
|
878
|
+
return projectedSourceProviders;
|
|
879
|
+
}
|
|
880
|
+
const sourceProviders = await loadSourceProviders();
|
|
836
881
|
await projectJunctionSources(context, sourceProviders);
|
|
837
882
|
projectedSourceProviders = sourceProviders;
|
|
838
883
|
return sourceProviders;
|
|
@@ -891,10 +936,13 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
891
936
|
}
|
|
892
937
|
const directInput = readJunctionDirectResourceJobInput(job, window);
|
|
893
938
|
if (directInput) {
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
939
|
+
const sourceProviders = shouldLoadJunctionDirectResourceSourceProviders(directInput)
|
|
940
|
+
? await loadSourceProviders()
|
|
941
|
+
: [];
|
|
942
|
+
const connectHistoricalWindow = buildConnectHistoricalBackfillWindow(context.account, summaryBackfillDays);
|
|
943
|
+
const importResult = await importJunctionDirectResourceSnapshot(context, sourceProviders, directInput.windowStart, directInput.windowEnd, directInput.resource, [directInput.record], connectHistoricalWindow);
|
|
944
|
+
const directHistoricalWindow = readJunctionDirectHistoricalEvidenceWindow(directInput, connectHistoricalWindow, importResult.normalizationEvidence, providerFilter);
|
|
945
|
+
return withJunctionHistoricalCoverageVerification(context, job, directHistoricalWindow, withJunctionDirectHistoricalBackfillEvidence(context, job, directInput, directHistoricalWindow, importResult, { nextReconcileAt: clampWebhookJobNextReconcileAt(context) }));
|
|
898
946
|
}
|
|
899
947
|
if (inferredCategory === "timeseries") {
|
|
900
948
|
const sourceProviders = await loadAndProjectSourceProviders();
|
|
@@ -907,9 +955,9 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
907
955
|
windowStart: timeseriesImport.yieldedAt,
|
|
908
956
|
}), skippedOptionalResources);
|
|
909
957
|
}
|
|
910
|
-
return withJunctionSkippedResourceMetadata(context, {
|
|
958
|
+
return withJunctionHistoricalCoverageVerification(context, job, window, withJunctionSkippedResourceMetadata(context, {
|
|
911
959
|
nextReconcileAt: clampWebhookJobNextReconcileAt(context),
|
|
912
|
-
}, skippedOptionalResources);
|
|
960
|
+
}, skippedOptionalResources));
|
|
913
961
|
}
|
|
914
962
|
const dateQueryFormat = isFullUtcDayWindow(window) ? "date" : "datetime";
|
|
915
963
|
summaries[effectiveResource] = await fetchOptionalJunctionResourceRecords(context, "summary", effectiveResource, skippedOptionalResources, () => client.listSummary({
|
|
@@ -934,9 +982,9 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
934
982
|
summaries: sanitizeJunctionImportSnapshots(summaries, sourceProviders),
|
|
935
983
|
timeseries: {},
|
|
936
984
|
});
|
|
937
|
-
return withJunctionSkippedResourceMetadata(context, {
|
|
985
|
+
return withJunctionHistoricalCoverageVerification(context, job, window, withJunctionSkippedResourceMetadata(context, {
|
|
938
986
|
nextReconcileAt: clampWebhookJobNextReconcileAt(context),
|
|
939
|
-
}, skippedOptionalResources);
|
|
987
|
+
}, skippedOptionalResources));
|
|
940
988
|
}
|
|
941
989
|
function isConfiguredJunctionResource(category, resource) {
|
|
942
990
|
return category === "timeseries"
|
|
@@ -976,6 +1024,75 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
976
1024
|
? scheduledAt
|
|
977
1025
|
: latestAt;
|
|
978
1026
|
}
|
|
1027
|
+
function withJunctionHistoricalCoverageVerification(context, job, resourceWindow, result) {
|
|
1028
|
+
const historicalState = readHistoricalBackfillStatus(context.account.metadata);
|
|
1029
|
+
const eventType = normalizeString(job.payload.eventType);
|
|
1030
|
+
if (!historicalState
|
|
1031
|
+
|| !resourceWindow
|
|
1032
|
+
|| historicalState.coverageVersion > JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION
|
|
1033
|
+
|| historicalState.status !== "exhausted"
|
|
1034
|
+
|| !eventType
|
|
1035
|
+
|| !isJunctionDataEvent(eventType)) {
|
|
1036
|
+
return result;
|
|
1037
|
+
}
|
|
1038
|
+
const connectWindow = buildConnectHistoricalBackfillWindow(context.account, summaryBackfillDays);
|
|
1039
|
+
if (Date.parse(resourceWindow.windowStart) >= Date.parse(connectWindow.windowEnd)
|
|
1040
|
+
|| Date.parse(resourceWindow.windowEnd) <= Date.parse(connectWindow.windowStart)) {
|
|
1041
|
+
return result;
|
|
1042
|
+
}
|
|
1043
|
+
return {
|
|
1044
|
+
...result,
|
|
1045
|
+
scheduledJobs: [
|
|
1046
|
+
...(result.scheduledJobs ?? []),
|
|
1047
|
+
buildExactWindowJob({
|
|
1048
|
+
availableAt: context.now,
|
|
1049
|
+
kind: "backfill",
|
|
1050
|
+
priority: JUNCTION_HISTORICAL_BACKFILL_RETRY_PRIORITY,
|
|
1051
|
+
windowEnd: connectWindow.windowEnd,
|
|
1052
|
+
windowStart: connectWindow.windowStart,
|
|
1053
|
+
}),
|
|
1054
|
+
],
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
function withJunctionDirectHistoricalBackfillEvidence(context, job, directInput, directHistoricalWindow, importResult, result) {
|
|
1058
|
+
const eventType = normalizeString(job.payload.eventType);
|
|
1059
|
+
const providerSlug = resolveJunctionHistoricalCoverageProviderSlug(directInput.sourceProviderSlug, providerFilter);
|
|
1060
|
+
const acceptedCanonicalDelivery = importResult.durableDeliveryAccepted
|
|
1061
|
+
&& providerSlug !== null
|
|
1062
|
+
&& importResult.normalizationEvidence.some((entry) => entry.resource === directInput.resource
|
|
1063
|
+
&& canonicalizeJunctionHistoricalProviderSlug(entry.sourceProviderSlug) === providerSlug);
|
|
1064
|
+
if (!canCurrentRuntimeMutateJunctionHistoricalBackfillProgress(context.account.metadata)
|
|
1065
|
+
|| !directHistoricalWindow
|
|
1066
|
+
|| !acceptedCanonicalDelivery
|
|
1067
|
+
|| !eventType
|
|
1068
|
+
|| !isJunctionDataEvent(eventType)
|
|
1069
|
+
|| !providerSlug
|
|
1070
|
+
|| !isJunctionHistoricalBackfillRequiredSummaryResource(directInput.resource)) {
|
|
1071
|
+
return result;
|
|
1072
|
+
}
|
|
1073
|
+
const connectWindow = buildConnectHistoricalBackfillWindow(context.account, summaryBackfillDays);
|
|
1074
|
+
const evidence = addJunctionHistoricalBackfillEvidence({
|
|
1075
|
+
existingValue: context.account.metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.evidence],
|
|
1076
|
+
providerSlug,
|
|
1077
|
+
resource: directInput.resource,
|
|
1078
|
+
windowEnd: connectWindow.windowEnd,
|
|
1079
|
+
windowStart: connectWindow.windowStart,
|
|
1080
|
+
});
|
|
1081
|
+
if (!evidence) {
|
|
1082
|
+
context.logger.warn?.("Junction historical push evidence exceeded bounded metadata limits.", {
|
|
1083
|
+
provider: "junction",
|
|
1084
|
+
resource: directInput.resource,
|
|
1085
|
+
});
|
|
1086
|
+
return result;
|
|
1087
|
+
}
|
|
1088
|
+
return {
|
|
1089
|
+
...result,
|
|
1090
|
+
metadataPatch: {
|
|
1091
|
+
...(result.metadataPatch ?? {}),
|
|
1092
|
+
[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.evidence]: evidence,
|
|
1093
|
+
},
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
979
1096
|
async function verifyAndParseWebhook(context) {
|
|
980
1097
|
const webhookSecret = normalizeString(config.webhookSecret);
|
|
981
1098
|
if (!webhookSecret) {
|
|
@@ -1088,22 +1205,18 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
1088
1205
|
records.push(...filterJunctionTimeseriesRecordsToWindow(chunkRecords, chunkWindowStart, chunkWindowEnd));
|
|
1089
1206
|
}
|
|
1090
1207
|
catch (error) {
|
|
1091
|
-
const failure = classifyOptionalJunctionResourceFailure(error, "timeseries", resource);
|
|
1208
|
+
const failure = classifyOptionalJunctionResourceFailure(error, "timeseries", resource, context.account.externalAccountId);
|
|
1092
1209
|
if (!failure) {
|
|
1093
1210
|
throw error;
|
|
1094
1211
|
}
|
|
1095
|
-
if (failure.disposition === "ambiguous") {
|
|
1096
|
-
throw buildAmbiguousOptionalJunctionResourceError(error, "timeseries", resource, failure.responseStatus, context.now);
|
|
1097
|
-
}
|
|
1098
1212
|
if (!optionalFailureLogged) {
|
|
1099
1213
|
logSkippedOptionalJunctionResource(context, "timeseries", resource, failure);
|
|
1100
1214
|
optionalFailureLogged = true;
|
|
1101
1215
|
}
|
|
1102
1216
|
skippedOptionalResources.push({
|
|
1103
|
-
|
|
1217
|
+
...failure,
|
|
1104
1218
|
resource,
|
|
1105
1219
|
resourceCategory: "timeseries",
|
|
1106
|
-
responseStatus: failure.responseStatus,
|
|
1107
1220
|
});
|
|
1108
1221
|
break;
|
|
1109
1222
|
}
|
|
@@ -1180,18 +1293,56 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
1180
1293
|
yieldedAt: null,
|
|
1181
1294
|
};
|
|
1182
1295
|
}
|
|
1183
|
-
async function importJunctionDirectResourceSnapshot(context, sourceProviders, windowStart, windowEnd, resource, records) {
|
|
1184
|
-
const
|
|
1185
|
-
const
|
|
1186
|
-
|
|
1296
|
+
async function importJunctionDirectResourceSnapshot(context, sourceProviders, windowStart, windowEnd, resource, records, historicalEvidenceWindow) {
|
|
1297
|
+
const snapshots = { [resource]: [...records] };
|
|
1298
|
+
const connections = sanitizeJunctionImportConnections(sourceProviders);
|
|
1299
|
+
const summaries = sanitizeJunctionImportSnapshots(snapshots, sourceProviders, {
|
|
1300
|
+
blockedStringValues: [context.account.externalAccountId],
|
|
1301
|
+
});
|
|
1302
|
+
const normalizationEvidence = classifyJunctionSummaryNormalizationEvidence({
|
|
1303
|
+
connections,
|
|
1304
|
+
importedAt: context.now,
|
|
1305
|
+
summaries,
|
|
1306
|
+
windowEnd,
|
|
1307
|
+
windowStart,
|
|
1308
|
+
}, historicalEvidenceWindow);
|
|
1309
|
+
const receipt = await context.importSnapshot({
|
|
1187
1310
|
provider: "junction",
|
|
1188
1311
|
accountId: buildJunctionImportAccountId(context.account.externalAccountId),
|
|
1189
1312
|
connectionId: context.account.id,
|
|
1190
1313
|
importedAt: context.now,
|
|
1191
1314
|
windowStart,
|
|
1192
1315
|
windowEnd,
|
|
1193
|
-
connections
|
|
1194
|
-
summaries
|
|
1316
|
+
connections,
|
|
1317
|
+
summaries,
|
|
1318
|
+
timeseries: {},
|
|
1319
|
+
});
|
|
1320
|
+
return {
|
|
1321
|
+
durableDeliveryAccepted: readProviderSnapshotDurableDeliveryAccepted(receipt),
|
|
1322
|
+
normalizationEvidence,
|
|
1323
|
+
};
|
|
1324
|
+
}
|
|
1325
|
+
async function importJunctionCompanionHealthMetadataSnapshot(context, records) {
|
|
1326
|
+
const summaries = {};
|
|
1327
|
+
const sleep = records
|
|
1328
|
+
.filter((record) => record.kind === "recovery_score")
|
|
1329
|
+
.map(buildJunctionCompanionRecoverySummary);
|
|
1330
|
+
const activity = records
|
|
1331
|
+
.filter((record) => record.kind === "workout_strain")
|
|
1332
|
+
.map(buildJunctionCompanionWorkoutStrainSummary);
|
|
1333
|
+
if (sleep.length > 0) {
|
|
1334
|
+
summaries.sleep = sleep;
|
|
1335
|
+
}
|
|
1336
|
+
if (activity.length > 0) {
|
|
1337
|
+
summaries.activity = activity;
|
|
1338
|
+
}
|
|
1339
|
+
await context.importSnapshot({
|
|
1340
|
+
provider: "junction",
|
|
1341
|
+
accountId: buildJunctionImportAccountId(context.account.externalAccountId),
|
|
1342
|
+
windowStart: records.reduce((earliest, record) => minIsoTimestamp(earliest, record.startAt), records[0].startAt),
|
|
1343
|
+
windowEnd: records.reduce((latest, record) => maxIsoTimestamp(latest, record.endAt), records[0].endAt),
|
|
1344
|
+
connections: [],
|
|
1345
|
+
summaries: sanitizeJunctionImportSnapshots(summaries, []),
|
|
1195
1346
|
timeseries: {},
|
|
1196
1347
|
});
|
|
1197
1348
|
}
|
|
@@ -1200,19 +1351,15 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
1200
1351
|
return await load();
|
|
1201
1352
|
}
|
|
1202
1353
|
catch (error) {
|
|
1203
|
-
const failure = classifyOptionalJunctionResourceFailure(error, resourceCategory, resource);
|
|
1354
|
+
const failure = classifyOptionalJunctionResourceFailure(error, resourceCategory, resource, context.account.externalAccountId);
|
|
1204
1355
|
if (!failure) {
|
|
1205
1356
|
throw error;
|
|
1206
1357
|
}
|
|
1207
|
-
if (failure.disposition === "ambiguous") {
|
|
1208
|
-
throw buildAmbiguousOptionalJunctionResourceError(error, resourceCategory, resource, failure.responseStatus, context.now);
|
|
1209
|
-
}
|
|
1210
1358
|
logSkippedOptionalJunctionResource(context, resourceCategory, resource, failure);
|
|
1211
1359
|
skippedOptionalResources.push({
|
|
1212
|
-
|
|
1360
|
+
...failure,
|
|
1213
1361
|
resource,
|
|
1214
1362
|
resourceCategory,
|
|
1215
|
-
responseStatus: failure.responseStatus,
|
|
1216
1363
|
});
|
|
1217
1364
|
return [];
|
|
1218
1365
|
}
|
|
@@ -1225,6 +1372,7 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
1225
1372
|
resource,
|
|
1226
1373
|
resourceCategory,
|
|
1227
1374
|
responseStatus: failure.responseStatus,
|
|
1375
|
+
...(failure.responseDetail ? { responseDetail: failure.responseDetail } : {}),
|
|
1228
1376
|
});
|
|
1229
1377
|
}
|
|
1230
1378
|
function buildYieldedJunctionJobResult(input) {
|
|
@@ -1240,7 +1388,28 @@ export function createJunctionDeviceSyncProvider(config) {
|
|
|
1240
1388
|
if (Date.parse(input.windowStart) >= Date.parse(input.windowEnd)) {
|
|
1241
1389
|
return null;
|
|
1242
1390
|
}
|
|
1243
|
-
if (input.job.kind === "backfill"
|
|
1391
|
+
if (input.job.kind === "backfill") {
|
|
1392
|
+
const cursor = toIsoTimestampIfValid(input.timeseriesCursor);
|
|
1393
|
+
if (!cursor || !isTimestampInHalfOpenWindow(cursor, input)) {
|
|
1394
|
+
return null;
|
|
1395
|
+
}
|
|
1396
|
+
const emptyBackfillAttempts = readHistoricalBackfillJobEmptyAttempts(input.job);
|
|
1397
|
+
const followUp = buildExactWindowJob({
|
|
1398
|
+
kind: "backfill",
|
|
1399
|
+
priority: input.job.priority,
|
|
1400
|
+
windowEnd: input.windowEnd,
|
|
1401
|
+
windowStart: input.windowStart,
|
|
1402
|
+
});
|
|
1403
|
+
return {
|
|
1404
|
+
...followUp,
|
|
1405
|
+
payload: {
|
|
1406
|
+
...followUp.payload,
|
|
1407
|
+
...(emptyBackfillAttempts > 0 ? { emptyBackfillAttempts } : {}),
|
|
1408
|
+
timeseriesCursor: cursor,
|
|
1409
|
+
},
|
|
1410
|
+
};
|
|
1411
|
+
}
|
|
1412
|
+
if (input.job.kind === "reconcile") {
|
|
1244
1413
|
return buildExactWindowJob({
|
|
1245
1414
|
kind: input.job.kind,
|
|
1246
1415
|
priority: input.job.priority,
|
|
@@ -1364,6 +1533,7 @@ function buildJunctionSkippedResourceMetadataPatch(context, skippedOptionalResou
|
|
|
1364
1533
|
last.responseStatus,
|
|
1365
1534
|
last.reason,
|
|
1366
1535
|
].join("."),
|
|
1536
|
+
junctionSkippedResourceLastDetail: last.responseDetail ?? null,
|
|
1367
1537
|
};
|
|
1368
1538
|
}
|
|
1369
1539
|
function readJunctionMetadataCount(value) {
|
|
@@ -1376,7 +1546,7 @@ function hasCheckedJunctionProfileSummary(metadata) {
|
|
|
1376
1546
|
const checkedAt = normalizeString(metadata[JUNCTION_PROFILE_SUMMARY_CHECKED_AT_METADATA_KEY]);
|
|
1377
1547
|
return checkedAt !== undefined && Number.isFinite(Date.parse(checkedAt));
|
|
1378
1548
|
}
|
|
1379
|
-
function classifyOptionalJunctionResourceFailure(error, resourceCategory, resource) {
|
|
1549
|
+
function classifyOptionalJunctionResourceFailure(error, resourceCategory, resource, accountExternalId) {
|
|
1380
1550
|
if (!isDeviceSyncError(error) || error.code !== "JUNCTION_API_REQUEST_FAILED") {
|
|
1381
1551
|
return null;
|
|
1382
1552
|
}
|
|
@@ -1392,7 +1562,6 @@ function classifyOptionalJunctionResourceFailure(error, resourceCategory, resour
|
|
|
1392
1562
|
});
|
|
1393
1563
|
if (reason) {
|
|
1394
1564
|
return {
|
|
1395
|
-
disposition: "skip",
|
|
1396
1565
|
reason,
|
|
1397
1566
|
responseStatus: status,
|
|
1398
1567
|
};
|
|
@@ -1402,118 +1571,45 @@ function classifyOptionalJunctionResourceFailure(error, resourceCategory, resour
|
|
|
1402
1571
|
&& status === 404
|
|
1403
1572
|
&& isJunctionProfileSummaryNotFoundResponse({ responseErrorCode, responseErrorDescription })) {
|
|
1404
1573
|
return {
|
|
1405
|
-
disposition: "skip",
|
|
1406
1574
|
reason: "not_found",
|
|
1407
1575
|
responseStatus: status,
|
|
1408
1576
|
};
|
|
1409
1577
|
}
|
|
1578
|
+
// Unrecognized 404/422 bodies skip only this optional resource. Keep the
|
|
1579
|
+
// provider's own explanation (redacted) so operators can see why it failed
|
|
1580
|
+
// without one broken optional endpoint aborting the whole sync job.
|
|
1581
|
+
const responseDetail = buildJunctionOptionalResourceResponseDetail({
|
|
1582
|
+
accountExternalId,
|
|
1583
|
+
responseErrorCode,
|
|
1584
|
+
responseErrorDescription,
|
|
1585
|
+
});
|
|
1410
1586
|
return {
|
|
1411
|
-
|
|
1587
|
+
reason: "ambiguous",
|
|
1412
1588
|
responseStatus: status,
|
|
1589
|
+
...(responseDetail ? { responseDetail } : {}),
|
|
1413
1590
|
};
|
|
1414
1591
|
}
|
|
1415
|
-
function
|
|
1416
|
-
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
providerOptionalResourceFailureDisposition: "ambiguous",
|
|
1437
|
-
providerOptionalResourceName: safeResource,
|
|
1438
|
-
providerOptionalResourceStatus: responseStatus,
|
|
1439
|
-
},
|
|
1440
|
-
cause: error,
|
|
1441
|
-
});
|
|
1442
|
-
}
|
|
1443
|
-
const JUNCTION_SAFE_API_DETAIL_TOKEN_KEYS = [
|
|
1444
|
-
"requestAuthKind",
|
|
1445
|
-
"requestAuthPlacement",
|
|
1446
|
-
"requestBodyFieldNames",
|
|
1447
|
-
"requestBodyKind",
|
|
1448
|
-
"requestContentType",
|
|
1449
|
-
"requestEndpointKind",
|
|
1450
|
-
"requestMethod",
|
|
1451
|
-
"requestQueryParameterNames",
|
|
1452
|
-
"responseErrorCode",
|
|
1453
|
-
"responseShapeKind",
|
|
1454
|
-
];
|
|
1455
|
-
const JUNCTION_SAFE_API_DETAIL_TEXT_KEYS = [
|
|
1456
|
-
"httpStatusText",
|
|
1457
|
-
"responseErrorDescription",
|
|
1458
|
-
];
|
|
1459
|
-
const JUNCTION_SAFE_API_DETAIL_NUMBER_KEYS = [
|
|
1460
|
-
"requestBodyFieldCount",
|
|
1461
|
-
"requestQueryParameterCount",
|
|
1462
|
-
"status",
|
|
1463
|
-
];
|
|
1464
|
-
const JUNCTION_SAFE_API_DETAIL_BOOLEAN_KEYS = [
|
|
1465
|
-
"requestCredentialPresent",
|
|
1466
|
-
"responseErrorDescriptionFieldPresent",
|
|
1467
|
-
"responseErrorFieldPresent",
|
|
1468
|
-
];
|
|
1469
|
-
function copySafeJunctionApiErrorDetails(error) {
|
|
1470
|
-
if (!isDeviceSyncError(error) || !error.details) {
|
|
1471
|
-
return {};
|
|
1472
|
-
}
|
|
1473
|
-
const details = {};
|
|
1474
|
-
for (const key of JUNCTION_SAFE_API_DETAIL_TOKEN_KEYS) {
|
|
1475
|
-
const value = readJunctionDiagnosticToken(error.details[key]);
|
|
1476
|
-
if (value !== null) {
|
|
1477
|
-
details[key] = value;
|
|
1478
|
-
}
|
|
1479
|
-
}
|
|
1480
|
-
for (const key of JUNCTION_SAFE_API_DETAIL_TEXT_KEYS) {
|
|
1481
|
-
const value = readJunctionDiagnosticText(error.details[key]);
|
|
1482
|
-
if (value !== null) {
|
|
1483
|
-
details[key] = value;
|
|
1484
|
-
}
|
|
1485
|
-
}
|
|
1486
|
-
for (const key of JUNCTION_SAFE_API_DETAIL_NUMBER_KEYS) {
|
|
1487
|
-
const value = readJunctionDiagnosticNumber(error.details[key]);
|
|
1488
|
-
if (value !== null) {
|
|
1489
|
-
details[key] = value;
|
|
1490
|
-
}
|
|
1491
|
-
}
|
|
1492
|
-
for (const key of JUNCTION_SAFE_API_DETAIL_BOOLEAN_KEYS) {
|
|
1493
|
-
if (typeof error.details[key] === "boolean") {
|
|
1494
|
-
details[key] = error.details[key];
|
|
1495
|
-
}
|
|
1496
|
-
}
|
|
1497
|
-
return details;
|
|
1498
|
-
}
|
|
1499
|
-
function buildJunctionOptionalResourceFailureMetadataPatch(input) {
|
|
1500
|
-
const metadataPatch = {
|
|
1501
|
-
junctionResourceDiagnostic: [
|
|
1502
|
-
input.resourceCategory,
|
|
1503
|
-
input.resource,
|
|
1504
|
-
input.responseStatus,
|
|
1505
|
-
"ambiguous",
|
|
1506
|
-
].join("."),
|
|
1507
|
-
junctionResourceDiagnosticAt: input.at,
|
|
1508
|
-
junctionResourceDiagnosticHttpStatus: input.responseStatus,
|
|
1509
|
-
};
|
|
1510
|
-
if (input.responseErrorCode) {
|
|
1511
|
-
metadataPatch.junctionResourceDiagnosticCode = input.responseErrorCode;
|
|
1512
|
-
}
|
|
1513
|
-
if (input.responseShapeKind) {
|
|
1514
|
-
metadataPatch.junctionResourceDiagnosticShape = input.responseShapeKind;
|
|
1515
|
-
}
|
|
1516
|
-
return metadataPatch;
|
|
1592
|
+
function buildJunctionOptionalResourceResponseDetail(input) {
|
|
1593
|
+
// The generic redactor does not know the current Junction user id; strip it
|
|
1594
|
+
// explicitly before the shared sanitizer so provider prose that embeds the
|
|
1595
|
+
// account id can never reach logs or connection metadata. Case-insensitive
|
|
1596
|
+
// because the provider-diagnostics parser lowercases error codes.
|
|
1597
|
+
const accountIdPattern = input.accountExternalId
|
|
1598
|
+
? new RegExp(input.accountExternalId.replace(/[.*+?^${}()|[\]\\]/gu, "\\$&"), "giu")
|
|
1599
|
+
: null;
|
|
1600
|
+
const redactAccountId = (value) => value === null || accountIdPattern === null
|
|
1601
|
+
? value
|
|
1602
|
+
: value.replace(accountIdPattern, "<redacted-account>");
|
|
1603
|
+
const code = readJunctionDiagnosticToken(redactAccountId(input.responseErrorCode));
|
|
1604
|
+
const description = readJunctionDiagnosticText(redactAccountId(input.responseErrorDescription));
|
|
1605
|
+
// Clamp to the stored-metadata string cap so the persisted
|
|
1606
|
+
// junctionSkippedResourceLastDetail is truncated instead of silently dropped.
|
|
1607
|
+
const detail = [code, description]
|
|
1608
|
+
.filter(Boolean)
|
|
1609
|
+
.join(": ")
|
|
1610
|
+
.slice(0, DEVICE_SYNC_METADATA_MAX_STRING_LENGTH)
|
|
1611
|
+
.trimEnd();
|
|
1612
|
+
return detail || null;
|
|
1517
1613
|
}
|
|
1518
1614
|
function classifyClearOptionalJunctionResourceFailureReason(input) {
|
|
1519
1615
|
const rawDescription = input.responseErrorDescription?.trim() ?? "";
|
|
@@ -1603,10 +1699,9 @@ function readJunctionDiagnosticToken(value) {
|
|
|
1603
1699
|
return null;
|
|
1604
1700
|
}
|
|
1605
1701
|
const token = value.trim();
|
|
1606
|
-
return /^[A-Za-z0-9_.:-]{1,128}$/u.test(token)
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
return typeof value === "number" && Number.isFinite(value) ? value : null;
|
|
1702
|
+
return /^[A-Za-z0-9_.:-]{1,128}$/u.test(token) && !isHostedRuntimeIdShapedDiagnosticToken(token)
|
|
1703
|
+
? token
|
|
1704
|
+
: null;
|
|
1610
1705
|
}
|
|
1611
1706
|
async function runJunctionDiagnosticCall(load) {
|
|
1612
1707
|
try {
|
|
@@ -1997,40 +2092,27 @@ function describeJunctionIntrospectionHistoricalPull(result, requestedSourceProv
|
|
|
1997
2092
|
if (!result.ok) {
|
|
1998
2093
|
return describeJunctionDiagnosticPayloadFailure(result, "JUNCTION_INTROSPECT_HISTORICAL_PULL_FAILED");
|
|
1999
2094
|
}
|
|
2000
|
-
const sourceProviders =
|
|
2095
|
+
const sourceProviders = (result.payload?.sources ?? []).filter((source) => !requestedSourceProviderSlug
|
|
2096
|
+
|| normalizeProviderSlug(source.sourceProviderSlug) === requestedSourceProviderSlug);
|
|
2001
2097
|
const sourceKeyMap = buildJunctionDiagnosticSourceKeyMap(sourceProviders);
|
|
2002
2098
|
const pulled = [];
|
|
2003
2099
|
const notPulled = [];
|
|
2004
2100
|
for (const sourceProvider of sourceProviders) {
|
|
2005
|
-
const
|
|
2006
|
-
? sourceProvider.details.not_pulled
|
|
2007
|
-
.map(normalizeProviderSlug)
|
|
2008
|
-
.filter((entry) => Boolean(entry))
|
|
2009
|
-
: [];
|
|
2010
|
-
for (const resource of notPulledResources) {
|
|
2101
|
+
for (const resource of sourceProvider.notPulledResources) {
|
|
2011
2102
|
notPulled.push({
|
|
2012
2103
|
resource,
|
|
2013
2104
|
sourceKey: readJunctionDiagnosticSourceKey(sourceKeyMap, sourceProvider.sourceProviderSlug),
|
|
2014
2105
|
});
|
|
2015
2106
|
}
|
|
2016
|
-
const
|
|
2017
|
-
if (!pulledByResource) {
|
|
2018
|
-
continue;
|
|
2019
|
-
}
|
|
2020
|
-
for (const [resource, rawDetails] of Object.entries(pulledByResource)) {
|
|
2021
|
-
const details = readPlainObject(rawDetails) ?? {};
|
|
2022
|
-
const timeline = readPlainObject(details.timeline);
|
|
2107
|
+
for (const historicalResource of sourceProvider.pulledResources) {
|
|
2023
2108
|
pulled.push({
|
|
2024
|
-
resource,
|
|
2109
|
+
resource: historicalResource.resource,
|
|
2025
2110
|
sourceKey: readJunctionDiagnosticSourceKey(sourceKeyMap, sourceProvider.sourceProviderSlug),
|
|
2026
|
-
status:
|
|
2027
|
-
daysWithData:
|
|
2028
|
-
rangeStart:
|
|
2029
|
-
rangeEnd:
|
|
2030
|
-
|
|
2031
|
-
startedAt: normalizeString(timeline?.started_at ?? timeline?.startedAt) ?? null,
|
|
2032
|
-
endedAt: normalizeString(timeline?.ended_at ?? timeline?.endedAt) ?? null,
|
|
2033
|
-
hasErrorDetails: Boolean(normalizeString(details.error_details ?? details.errorDetails)),
|
|
2111
|
+
status: historicalResource.status,
|
|
2112
|
+
daysWithData: historicalResource.daysWithData,
|
|
2113
|
+
rangeStart: historicalResource.rangeStart,
|
|
2114
|
+
rangeEnd: historicalResource.rangeEnd,
|
|
2115
|
+
hasErrorDetails: historicalResource.errorDetails !== null,
|
|
2034
2116
|
});
|
|
2035
2117
|
}
|
|
2036
2118
|
}
|
|
@@ -2039,6 +2121,7 @@ function describeJunctionIntrospectionHistoricalPull(result, requestedSourceProv
|
|
|
2039
2121
|
return {
|
|
2040
2122
|
ok: true,
|
|
2041
2123
|
responseStatus: result.responseStatus ?? 200,
|
|
2124
|
+
matchedUser: result.payload?.matchedUser ?? false,
|
|
2042
2125
|
sourceProviderCount: sourceProviders.length,
|
|
2043
2126
|
pulledCount: pulled.length,
|
|
2044
2127
|
notPulledCount: notPulled.length,
|
|
@@ -2282,7 +2365,7 @@ function listJunctionDiagnosticAvailableResourcesForSlug(providers, slug) {
|
|
|
2282
2365
|
continue;
|
|
2283
2366
|
}
|
|
2284
2367
|
for (const [key, value] of Object.entries(provider.resourceAvailability)) {
|
|
2285
|
-
if (normalizeProviderSlug(key) && value
|
|
2368
|
+
if (normalizeProviderSlug(key) && isJunctionResourceAdvertisedAvailable(value)) {
|
|
2286
2369
|
resourceNames.add(key);
|
|
2287
2370
|
}
|
|
2288
2371
|
}
|
|
@@ -2292,8 +2375,10 @@ function listJunctionDiagnosticAvailableResourcesForSlug(providers, slug) {
|
|
|
2292
2375
|
.slice(0, JUNCTION_DIAGNOSTIC_RESOURCE_NAME_LIMIT);
|
|
2293
2376
|
}
|
|
2294
2377
|
function readJunctionHistoricalBackfillMetadata(metadata) {
|
|
2378
|
+
const statusState = readHistoricalBackfillStatus(metadata);
|
|
2295
2379
|
return {
|
|
2296
|
-
|
|
2380
|
+
coverageVersion: statusState?.coverageVersion ?? 0,
|
|
2381
|
+
status: statusState?.status ?? null,
|
|
2297
2382
|
emptyAttempts: typeof metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.emptyAttempts] === "number"
|
|
2298
2383
|
? metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.emptyAttempts]
|
|
2299
2384
|
: null,
|
|
@@ -2383,32 +2468,6 @@ function toClientConfig(config) {
|
|
|
2383
2468
|
fetchImpl: config.fetchImpl,
|
|
2384
2469
|
};
|
|
2385
2470
|
}
|
|
2386
|
-
function normalizeRequiredResourceList(value, defaults, allowedResources, label) {
|
|
2387
|
-
const normalized = (value && value.length > 0 ? value : defaults)
|
|
2388
|
-
.map(normalizeJunctionResourceName)
|
|
2389
|
-
.filter((entry) => entry !== null);
|
|
2390
|
-
const allowedResourceSet = new Set(allowedResources);
|
|
2391
|
-
const unsupportedResources = normalized.filter((entry) => !allowedResourceSet.has(entry));
|
|
2392
|
-
if (unsupportedResources.length > 0) {
|
|
2393
|
-
throw new TypeError(`Junction ${label} resources include unsupported resource(s): ${[...new Set(unsupportedResources)].join(", ")}.`);
|
|
2394
|
-
}
|
|
2395
|
-
if (normalized.length === 0) {
|
|
2396
|
-
throw new TypeError(`Junction ${label} resources must include at least one supported resource.`);
|
|
2397
|
-
}
|
|
2398
|
-
return [...new Set(normalized)];
|
|
2399
|
-
}
|
|
2400
|
-
function normalizeOptionalResourceList(value, defaults, allowedResources, knownResources, label) {
|
|
2401
|
-
const normalized = (value === undefined ? defaults : value)
|
|
2402
|
-
.map(normalizeJunctionResourceName)
|
|
2403
|
-
.filter((entry) => entry !== null);
|
|
2404
|
-
const allowedResourceSet = new Set(allowedResources);
|
|
2405
|
-
const knownResourceSet = new Set([...allowedResources, ...knownResources]);
|
|
2406
|
-
const unsupportedResources = normalized.filter((entry) => !knownResourceSet.has(entry));
|
|
2407
|
-
if (unsupportedResources.length > 0) {
|
|
2408
|
-
throw new TypeError(`Junction ${label} resources include unsupported resource(s): ${[...new Set(unsupportedResources)].join(", ")}.`);
|
|
2409
|
-
}
|
|
2410
|
-
return [...new Set(normalized.filter((entry) => allowedResourceSet.has(entry)))];
|
|
2411
|
-
}
|
|
2412
2471
|
function normalizeProviderSlug(value) {
|
|
2413
2472
|
const normalized = normalizeString(value)?.toLowerCase().replace(/[^a-z0-9_]+/gu, "_").replace(/^_+|_+$/gu, "");
|
|
2414
2473
|
return normalized || null;
|
|
@@ -2422,11 +2481,11 @@ function sanitizeJunctionImportConnections(providers) {
|
|
|
2422
2481
|
sourceInstanceId: provider.origin.sourceInstanceId,
|
|
2423
2482
|
}));
|
|
2424
2483
|
}
|
|
2425
|
-
function sanitizeJunctionImportSnapshots(snapshots, providers) {
|
|
2484
|
+
function sanitizeJunctionImportSnapshots(snapshots, providers, options = {}) {
|
|
2426
2485
|
const sourceReferences = buildJunctionSourceReferenceMap(providers);
|
|
2427
2486
|
return Object.fromEntries(Object.entries(snapshots).map(([resource, records]) => [
|
|
2428
2487
|
resource,
|
|
2429
|
-
records.map((record) => sanitizeJunctionImportSnapshotValue(record, sourceReferences)),
|
|
2488
|
+
records.map((record) => sanitizeJunctionImportSnapshotValue(record, sourceReferences, options)),
|
|
2430
2489
|
]));
|
|
2431
2490
|
}
|
|
2432
2491
|
function buildJunctionSourceReferenceMap(providers) {
|
|
@@ -2463,11 +2522,17 @@ function sanitizeJunctionImportSnapshotValue(value, sourceReferences, options =
|
|
|
2463
2522
|
const fallback = readJunctionSourceReference(record, sourceReferences);
|
|
2464
2523
|
const origin = resolveJunctionOrigin(record, fallback);
|
|
2465
2524
|
const sanitized = stripJunctionRawSourceIdentityFields(record, sourceReferences, options);
|
|
2525
|
+
const fallbackSourceInstanceId = normalizeString(fallback.sourceInstanceId);
|
|
2526
|
+
const unresolvedPreservedSourceReference = options.preserveSourceReferenceKeys === true &&
|
|
2527
|
+
!fallbackSourceInstanceId &&
|
|
2528
|
+
hasJunctionSourceReferenceIdentity(record);
|
|
2529
|
+
const sourceInstanceId = fallbackSourceInstanceId ??
|
|
2530
|
+
(unresolvedPreservedSourceReference ? undefined : origin.sourceInstanceId);
|
|
2466
2531
|
return stripUndefined({
|
|
2467
2532
|
...sanitized,
|
|
2468
2533
|
sourceProviderSlug: normalizeProviderSlug(origin.sourceProviderSlug) ?? sanitized.sourceProviderSlug,
|
|
2469
2534
|
sourceType: origin.sourceType ?? sanitized.sourceType,
|
|
2470
|
-
sourceInstanceId:
|
|
2535
|
+
sourceInstanceId: sourceInstanceId ?? sanitized.sourceInstanceId,
|
|
2471
2536
|
});
|
|
2472
2537
|
}
|
|
2473
2538
|
function readJunctionSourceReference(record, sourceReferences) {
|
|
@@ -2491,7 +2556,8 @@ function readJunctionSourceReference(record, sourceReferences) {
|
|
|
2491
2556
|
function stripJunctionRawSourceIdentityFields(record, sourceReferences, options) {
|
|
2492
2557
|
const sanitized = {};
|
|
2493
2558
|
for (const [key, value] of Object.entries(record)) {
|
|
2494
|
-
if (isBlockedJunctionImportSourceIdentityKey(key)
|
|
2559
|
+
if ((isBlockedJunctionImportSourceIdentityKey(key)
|
|
2560
|
+
&& !(options.preserveSourceReferenceKeys && isJunctionSourceReferenceIdentityKey(key)))
|
|
2495
2561
|
|| isBlockedJunctionImportSourceIdentityContainerKey(key)) {
|
|
2496
2562
|
continue;
|
|
2497
2563
|
}
|
|
@@ -2533,6 +2599,24 @@ function isBlockedJunctionImportSourceIdentityKey(key) {
|
|
|
2533
2599
|
|| normalized.includes("devicename")
|
|
2534
2600
|
|| normalized.includes("appname");
|
|
2535
2601
|
}
|
|
2602
|
+
function isJunctionSourceReferenceIdentityKey(key) {
|
|
2603
|
+
const normalized = normalizeJunctionImportSourceIdentityKey(key);
|
|
2604
|
+
return normalized === "connectionid"
|
|
2605
|
+
|| normalized === "providerconnectionid"
|
|
2606
|
+
|| normalized === "sourceid";
|
|
2607
|
+
}
|
|
2608
|
+
function hasJunctionSourceReferenceIdentity(value, seen = new Set()) {
|
|
2609
|
+
if (Array.isArray(value)) {
|
|
2610
|
+
return value.some((entry) => hasJunctionSourceReferenceIdentity(entry, seen));
|
|
2611
|
+
}
|
|
2612
|
+
const record = readPlainObject(value);
|
|
2613
|
+
if (!record || seen.has(record)) {
|
|
2614
|
+
return false;
|
|
2615
|
+
}
|
|
2616
|
+
seen.add(record);
|
|
2617
|
+
return Object.entries(record).some(([key, nested]) => (isJunctionSourceReferenceIdentityKey(key) && normalizeString(nested) !== undefined) ||
|
|
2618
|
+
hasJunctionSourceReferenceIdentity(nested, seen));
|
|
2619
|
+
}
|
|
2536
2620
|
function isBlockedJunctionImportSourceIdentityContainerKey(key) {
|
|
2537
2621
|
const normalized = normalizeJunctionImportSourceIdentityKey(key);
|
|
2538
2622
|
return isJunctionRawDirectIdentityContainerKey(key)
|
|
@@ -2724,6 +2808,22 @@ function resolveJobWindow(job, now, fallbackDays) {
|
|
|
2724
2808
|
windowEnd,
|
|
2725
2809
|
};
|
|
2726
2810
|
}
|
|
2811
|
+
function readBackfillTimeseriesCursor(job, ownerWindow) {
|
|
2812
|
+
const cursor = toIsoTimestampIfValid(job.payload.timeseriesCursor);
|
|
2813
|
+
return cursor && isTimestampInHalfOpenWindow(cursor, ownerWindow)
|
|
2814
|
+
? cursor
|
|
2815
|
+
: null;
|
|
2816
|
+
}
|
|
2817
|
+
function isTimestampInHalfOpenWindow(timestamp, window) {
|
|
2818
|
+
const timestampMs = Date.parse(timestamp);
|
|
2819
|
+
const windowStartMs = Date.parse(window.windowStart);
|
|
2820
|
+
const windowEndMs = Date.parse(window.windowEnd);
|
|
2821
|
+
return Number.isFinite(timestampMs)
|
|
2822
|
+
&& Number.isFinite(windowStartMs)
|
|
2823
|
+
&& Number.isFinite(windowEndMs)
|
|
2824
|
+
&& timestampMs >= windowStartMs
|
|
2825
|
+
&& timestampMs < windowEndMs;
|
|
2826
|
+
}
|
|
2727
2827
|
function resolveCurrentSummaryWindow(now, fallbackDays) {
|
|
2728
2828
|
const windowEnd = new Date(now).toISOString();
|
|
2729
2829
|
return {
|
|
@@ -2810,239 +2910,172 @@ function floorUtcDayTimestamp(timestamp) {
|
|
|
2810
2910
|
function hasJunctionSnapshotRecords(snapshot) {
|
|
2811
2911
|
return Object.values(snapshot).some((records) => records.length > 0);
|
|
2812
2912
|
}
|
|
2813
|
-
function hasJunctionHistoricalBackfillSummaryRecords(
|
|
2814
|
-
|
|
2815
|
-
|
|
2816
|
-
|
|
2817
|
-
|
|
2818
|
-
|
|
2819
|
-
|
|
2820
|
-
|
|
2821
|
-
|
|
2822
|
-
|
|
2823
|
-
|
|
2824
|
-
|
|
2825
|
-
|
|
2826
|
-
|
|
2827
|
-
|
|
2828
|
-
|
|
2829
|
-
|
|
2830
|
-
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2842
|
-
return hasUsefulJunctionRawOnlyHistoricalBackfillSummaryRecord(resource, entry);
|
|
2843
|
-
}
|
|
2844
|
-
return false;
|
|
2845
|
-
}
|
|
2846
|
-
function hasUsefulJunctionRawOnlyHistoricalBackfillSummaryRecord(resource, entry) {
|
|
2847
|
-
// Mirrors the importer invariant: predicted cycles are forecasts, not
|
|
2848
|
-
// facts — they emit no normalized events, so forecast-only windows must
|
|
2849
|
-
// not complete the historical backfill.
|
|
2850
|
-
if (resource === "menstrual_cycle"
|
|
2851
|
-
&& (entry.isPredicted === true || entry.is_predicted === true)) {
|
|
2852
|
-
return false;
|
|
2853
|
-
}
|
|
2854
|
-
const paths = JUNCTION_RAW_ONLY_COMPLETION_PATHS[resource];
|
|
2855
|
-
return hasStringFromJunctionRecordPaths(entry, paths.strings)
|
|
2856
|
-
|| hasFiniteNumberFromJunctionRecordPaths(entry, paths.numbers)
|
|
2857
|
-
|| hasNonEmptyJunctionRecordArrayFromPaths(entry, paths.arrays);
|
|
2858
|
-
}
|
|
2859
|
-
function hasUsefulJunctionSleepCycleStageRecord(entry, sourceProviderSlug) {
|
|
2860
|
-
return collectJunctionSleepCycleStageRecords(entry).some((stage) => hasUsefulJunctionSleepCycleStageInterval(stage, sourceProviderSlug));
|
|
2861
|
-
}
|
|
2862
|
-
function hasJunctionSleepStageValue(entry) {
|
|
2863
|
-
return JUNCTION_SLEEP_STAGE_VALUE_PATHS.some((path) => normalizeJunctionSleepStageValue(readJunctionRecordPath(entry, path)) !== null);
|
|
2864
|
-
}
|
|
2865
|
-
function collectJunctionSleepCycleStageRecords(value) {
|
|
2866
|
-
if (Array.isArray(value)) {
|
|
2867
|
-
return value.flatMap((entry) => collectJunctionSleepCycleStageRecords(entry));
|
|
2868
|
-
}
|
|
2869
|
-
const entry = readPlainObject(value);
|
|
2870
|
-
if (!entry) {
|
|
2871
|
-
return [];
|
|
2872
|
-
}
|
|
2873
|
-
if (hasJunctionSleepStageValue(entry)) {
|
|
2874
|
-
return [entry];
|
|
2875
|
-
}
|
|
2876
|
-
return JUNCTION_SLEEP_STAGE_ARRAY_PATHS.flatMap((path) => {
|
|
2877
|
-
const nested = readJunctionRecordPath(entry, path);
|
|
2878
|
-
return nested === value ? [] : collectJunctionSleepCycleStageRecords(nested);
|
|
2879
|
-
});
|
|
2880
|
-
}
|
|
2881
|
-
function hasUsefulJunctionSleepCycleStageInterval(entry, sourceProviderSlug) {
|
|
2882
|
-
return hasPositiveFiniteNumberFromJunctionRecordPaths(entry, JUNCTION_SLEEP_STAGE_DURATION_PATHS)
|
|
2883
|
-
|| hasPositiveJunctionTimestampRange(entry, JUNCTION_SLEEP_START_TIMESTAMP_PATHS, JUNCTION_SLEEP_END_TIMESTAMP_PATHS, sourceProviderSlug);
|
|
2884
|
-
}
|
|
2885
|
-
function expandJunctionHistoricalBackfillSummaryRecord(value) {
|
|
2886
|
-
const record = readPlainObject(value);
|
|
2887
|
-
if (!record) {
|
|
2888
|
-
return [];
|
|
2889
|
-
}
|
|
2890
|
-
const nestedEntries = readNestedJunctionHistoricalBackfillSummaryEntries(record);
|
|
2891
|
-
if (!nestedEntries) {
|
|
2892
|
-
return [{ entry: record }];
|
|
2913
|
+
function hasJunctionHistoricalBackfillSummaryRecords(evidence) {
|
|
2914
|
+
return evidence.some(({ resource }) => isJunctionHistoricalBackfillCompletionSummaryResource(resource));
|
|
2915
|
+
}
|
|
2916
|
+
function evaluateJunctionHistoricalBackfillCoverage(summaryEvidence, sourceProviders, configuredSummaryResources, providerFilter, historicalPullSnapshot, historicalPushEvidence, window) {
|
|
2917
|
+
const configuredResources = new Set(configuredSummaryResources.filter((resource) => JUNCTION_HISTORICAL_BACKFILL_REQUIRED_SUMMARY_RESOURCE_SET.has(resource)));
|
|
2918
|
+
const advertisedResourcesByProvider = new Map();
|
|
2919
|
+
const connectedProviderSlugs = new Set();
|
|
2920
|
+
const pendingProviderSlugs = new Set();
|
|
2921
|
+
const reconnectProviderSlugs = new Set();
|
|
2922
|
+
const providerStatusBySlug = new Map();
|
|
2923
|
+
for (const provider of sourceProviders) {
|
|
2924
|
+
const providerSlug = resolveJunctionHistoricalCoverageProviderSlug(provider.origin.sourceProviderSlug ?? provider.slug, providerFilter);
|
|
2925
|
+
if (!providerSlug) {
|
|
2926
|
+
continue;
|
|
2927
|
+
}
|
|
2928
|
+
const status = mapJunctionSourceStatus(provider.status);
|
|
2929
|
+
const existingStatus = providerStatusBySlug.get(providerSlug);
|
|
2930
|
+
providerStatusBySlug.set(providerSlug, existingStatus ? mergeJunctionSourceStatus(existingStatus, status) : status);
|
|
2931
|
+
for (const [rawResource, availability] of Object.entries(provider.resourceAvailability)) {
|
|
2932
|
+
const resource = normalizeJunctionResourceName(rawResource);
|
|
2933
|
+
if (!resource
|
|
2934
|
+
|| !configuredResources.has(resource)
|
|
2935
|
+
|| !isJunctionResourceAdvertisedAvailable(availability)) {
|
|
2936
|
+
continue;
|
|
2937
|
+
}
|
|
2938
|
+
const advertisedResources = advertisedResourcesByProvider.get(providerSlug) ?? new Set();
|
|
2939
|
+
advertisedResources.add(resource);
|
|
2940
|
+
advertisedResourcesByProvider.set(providerSlug, advertisedResources);
|
|
2941
|
+
}
|
|
2893
2942
|
}
|
|
2894
|
-
|
|
2895
|
-
|
|
2896
|
-
|
|
2897
|
-
|
|
2898
|
-
}
|
|
2899
|
-
|
|
2900
|
-
for (const
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
|
|
2908
|
-
|
|
2909
|
-
|
|
2943
|
+
const historicalSourcesByProvider = new Map(historicalPullSnapshot?.matchedUser
|
|
2944
|
+
? historicalPullSnapshot.sources.flatMap((source) => {
|
|
2945
|
+
const providerSlug = resolveJunctionHistoricalCoverageProviderSlug(source.sourceProviderSlug, providerFilter);
|
|
2946
|
+
return providerSlug ? [[providerSlug, source]] : [];
|
|
2947
|
+
})
|
|
2948
|
+
: []);
|
|
2949
|
+
for (const [providerSlug, status] of providerStatusBySlug.entries()) {
|
|
2950
|
+
if (status === "disconnected") {
|
|
2951
|
+
continue;
|
|
2952
|
+
}
|
|
2953
|
+
const historicalSource = historicalSourcesByProvider.get(providerSlug);
|
|
2954
|
+
const notPulledResources = new Set(historicalSource?.notPulledResources.flatMap((value) => {
|
|
2955
|
+
const resource = normalizeJunctionResourceName(value);
|
|
2956
|
+
return resource ? [resource] : [];
|
|
2957
|
+
}) ?? []);
|
|
2958
|
+
const historicalResources = new Map(historicalSource?.pulledResources.flatMap((entry) => {
|
|
2959
|
+
const resource = normalizeJunctionResourceName(entry.resource);
|
|
2960
|
+
return resource && configuredResources.has(resource)
|
|
2961
|
+
? [[resource, entry]]
|
|
2962
|
+
: [];
|
|
2963
|
+
}) ?? []);
|
|
2964
|
+
const requiredResources = new Set([
|
|
2965
|
+
...(advertisedResourcesByProvider.get(providerSlug) ?? []),
|
|
2966
|
+
...historicalResources.keys(),
|
|
2967
|
+
].filter((resource) => !notPulledResources.has(resource) || historicalResources.has(resource)));
|
|
2968
|
+
if (status === "connected") {
|
|
2969
|
+
connectedProviderSlugs.add(providerSlug);
|
|
2970
|
+
}
|
|
2971
|
+
if (requiredResources.size === 0) {
|
|
2972
|
+
continue;
|
|
2973
|
+
}
|
|
2974
|
+
if (status !== "connected") {
|
|
2975
|
+
pendingProviderSlugs.add(providerSlug);
|
|
2976
|
+
continue;
|
|
2977
|
+
}
|
|
2978
|
+
let hasPendingResource = false;
|
|
2979
|
+
let everyPendingResourceFailed = true;
|
|
2980
|
+
for (const resource of requiredResources) {
|
|
2981
|
+
if (!isJunctionHistoricalBackfillRequiredSummaryResource(resource)) {
|
|
2982
|
+
continue;
|
|
2983
|
+
}
|
|
2984
|
+
const historicalResource = historicalResources.get(resource);
|
|
2985
|
+
if (historicalSource) {
|
|
2986
|
+
if (historicalResource?.status === "success") {
|
|
2987
|
+
continue;
|
|
2988
|
+
}
|
|
2989
|
+
hasPendingResource = true;
|
|
2990
|
+
if (historicalResource?.status !== "failure") {
|
|
2991
|
+
everyPendingResourceFailed = false;
|
|
2992
|
+
}
|
|
2993
|
+
continue;
|
|
2994
|
+
}
|
|
2995
|
+
const coveredBySummary = summaryEvidence.some((entry) => entry.resource === resource
|
|
2996
|
+
&& canonicalizeJunctionHistoricalProviderSlug(entry.sourceProviderSlug) === providerSlug);
|
|
2997
|
+
const coveredByPush = hasJunctionHistoricalBackfillEvidence(historicalPushEvidence, providerSlug, resource, window.windowStart, window.windowEnd);
|
|
2998
|
+
if (!coveredBySummary && !coveredByPush) {
|
|
2999
|
+
hasPendingResource = true;
|
|
3000
|
+
everyPendingResourceFailed = false;
|
|
3001
|
+
}
|
|
3002
|
+
}
|
|
3003
|
+
if (hasPendingResource) {
|
|
3004
|
+
pendingProviderSlugs.add(providerSlug);
|
|
3005
|
+
if (everyPendingResourceFailed
|
|
3006
|
+
&& isJunctionHistoricalResetProviderSlug(providerSlug)) {
|
|
3007
|
+
reconnectProviderSlugs.add(providerSlug);
|
|
3008
|
+
}
|
|
2910
3009
|
}
|
|
2911
3010
|
}
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
function resolveJunctionSummarySourceProviderSlug(entry, originFallback, sourceReferences) {
|
|
2915
|
-
const resolvedOrigin = resolveJunctionOrigin(entry, buildJunctionSummarySourceFallback(entry, originFallback, sourceReferences));
|
|
2916
|
-
return resolvedOrigin.sourceProviderSlug ?? null;
|
|
2917
|
-
}
|
|
2918
|
-
function buildJunctionSummarySourceFallback(entry, originFallback, sourceReferences) {
|
|
2919
|
-
const entryReference = readJunctionSourceReference(entry, sourceReferences);
|
|
2920
|
-
const fallbackReference = originFallback
|
|
2921
|
-
? readJunctionSourceReference(originFallback, sourceReferences)
|
|
2922
|
-
: {};
|
|
3011
|
+
const sortedPendingProviderSlugs = [...pendingProviderSlugs]
|
|
3012
|
+
.sort((left, right) => left.localeCompare(right));
|
|
2923
3013
|
return {
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
...
|
|
3014
|
+
complete: connectedProviderSlugs.size > 0 && sortedPendingProviderSlugs.length === 0,
|
|
3015
|
+
pendingProviderSlugs: sortedPendingProviderSlugs,
|
|
3016
|
+
reconnectProviderSlugs: [...reconnectProviderSlugs]
|
|
3017
|
+
.sort((left, right) => left.localeCompare(right)),
|
|
2927
3018
|
};
|
|
2928
3019
|
}
|
|
2929
|
-
function
|
|
2930
|
-
const
|
|
2931
|
-
|
|
2932
|
-
|
|
2933
|
-
|| hasPositiveJunctionTimestampRange(entry, JUNCTION_WORKOUT_START_TIMESTAMP_PATHS, JUNCTION_WORKOUT_END_TIMESTAMP_PATHS, sourceProviderSlug);
|
|
2934
|
-
if (!hasDuration) {
|
|
2935
|
-
return false;
|
|
3020
|
+
function canonicalizeJunctionHistoricalProviderSlug(value) {
|
|
3021
|
+
const providerSlug = normalizeProviderSlug(value);
|
|
3022
|
+
if (!providerSlug) {
|
|
3023
|
+
return null;
|
|
2936
3024
|
}
|
|
2937
|
-
|
|
2938
|
-
|
|
2939
|
-
return startAt !== null || (endAt === null && !isJunctionSourceSpecificFloatingTimestampProvider(sourceProviderSlug));
|
|
3025
|
+
return resolveJunctionDeviceConnectRouteByProviderSlug(providerSlug)?.route.sourceProviderSlug
|
|
3026
|
+
?? null;
|
|
2940
3027
|
}
|
|
2941
|
-
function
|
|
2942
|
-
|
|
2943
|
-
|
|
2944
|
-
|
|
2945
|
-
return paths.some((path) => normalizeString(readJunctionRecordPath(entry, path)) !== undefined);
|
|
2946
|
-
}
|
|
2947
|
-
function hasPositiveFiniteNumberFromJunctionRecordPaths(entry, paths) {
|
|
2948
|
-
return paths.some((path) => {
|
|
2949
|
-
const numeric = finiteJunctionNumber(readJunctionRecordPath(entry, path));
|
|
2950
|
-
return numeric !== undefined && numeric > 0;
|
|
2951
|
-
});
|
|
2952
|
-
}
|
|
2953
|
-
function hasNonEmptyJunctionRecordArrayFromPaths(entry, paths) {
|
|
2954
|
-
return paths.some((path) => readJunctionRecordArray(readJunctionRecordPath(entry, path)).some(isUsefulJunctionRawOnlyArrayEntry));
|
|
2955
|
-
}
|
|
2956
|
-
function isUsefulJunctionRawOnlyArrayEntry(value) {
|
|
2957
|
-
if (value === undefined || value === null) {
|
|
2958
|
-
return false;
|
|
3028
|
+
function resolveJunctionHistoricalCoverageProviderSlug(value, providerFilter) {
|
|
3029
|
+
const providerSlug = canonicalizeJunctionHistoricalProviderSlug(value);
|
|
3030
|
+
if (!providerSlug) {
|
|
3031
|
+
return null;
|
|
2959
3032
|
}
|
|
2960
|
-
|
|
2961
|
-
|
|
3033
|
+
const route = resolveJunctionDeviceConnectRouteByProviderSlug(providerSlug)?.route;
|
|
3034
|
+
if (!route) {
|
|
3035
|
+
return null;
|
|
2962
3036
|
}
|
|
2963
|
-
|
|
2964
|
-
|
|
3037
|
+
return route.kind === "junction_sdk" || providerFilter.includes(providerSlug)
|
|
3038
|
+
? providerSlug
|
|
3039
|
+
: null;
|
|
3040
|
+
}
|
|
3041
|
+
function isJunctionHistoricalBackfillRequiredSummaryResource(resource) {
|
|
3042
|
+
return JUNCTION_HISTORICAL_BACKFILL_REQUIRED_SUMMARY_RESOURCE_SET.has(resource);
|
|
3043
|
+
}
|
|
3044
|
+
function readJunctionDirectHistoricalEvidenceWindow(input, connectWindow, evidence, providerFilter) {
|
|
3045
|
+
const providerSlug = resolveJunctionHistoricalCoverageProviderSlug(input.sourceProviderSlug, providerFilter);
|
|
3046
|
+
if (!providerSlug
|
|
3047
|
+
|| !isJunctionHistoricalBackfillRequiredSummaryResource(input.resource)
|
|
3048
|
+
|| !evidence.some((entry) => entry.resource === input.resource
|
|
3049
|
+
&& canonicalizeJunctionHistoricalProviderSlug(entry.sourceProviderSlug) === providerSlug)) {
|
|
3050
|
+
return null;
|
|
2965
3051
|
}
|
|
2966
|
-
|
|
3052
|
+
return connectWindow;
|
|
3053
|
+
}
|
|
3054
|
+
function isJunctionResourceAdvertisedAvailable(value) {
|
|
3055
|
+
if (value === true) {
|
|
2967
3056
|
return true;
|
|
2968
3057
|
}
|
|
2969
|
-
if (
|
|
2970
|
-
return value.
|
|
3058
|
+
if (typeof value === "string") {
|
|
3059
|
+
return value.trim().toLowerCase() === "available";
|
|
2971
3060
|
}
|
|
2972
3061
|
const record = readPlainObject(value);
|
|
2973
3062
|
if (!record) {
|
|
2974
3063
|
return false;
|
|
2975
3064
|
}
|
|
2976
|
-
return
|
|
2977
|
-
|
|
2978
|
-
&& isUsefulJunctionRawOnlyArrayEntry(nested));
|
|
2979
|
-
}
|
|
2980
|
-
function hasPositiveJunctionTimestampRange(entry, startPaths, endPaths, sourceProviderSlug) {
|
|
2981
|
-
const startAt = firstJunctionTimestampMillisFromPaths(entry, startPaths, sourceProviderSlug);
|
|
2982
|
-
const endAt = firstJunctionTimestampMillisFromPaths(entry, endPaths, sourceProviderSlug);
|
|
2983
|
-
return startAt !== null && endAt !== null && endAt > startAt;
|
|
3065
|
+
return record.available === true
|
|
3066
|
+
|| normalizeString(record.status)?.toLowerCase() === "available";
|
|
2984
3067
|
}
|
|
2985
|
-
function
|
|
2986
|
-
|
|
2987
|
-
const timestamp = junctionTimestampMillis(readJunctionRecordPath(entry, path), sourceProviderSlug);
|
|
2988
|
-
if (timestamp !== null) {
|
|
2989
|
-
return timestamp;
|
|
2990
|
-
}
|
|
2991
|
-
}
|
|
2992
|
-
return null;
|
|
2993
|
-
}
|
|
2994
|
-
function readJunctionRecordPath(entry, path) {
|
|
2995
|
-
return path.split(".").reduce((current, key) => {
|
|
2996
|
-
const record = readPlainObject(current);
|
|
2997
|
-
return record ? record[key] : undefined;
|
|
2998
|
-
}, entry);
|
|
3068
|
+
function isJunctionHistoricalBackfillCompletionSummaryResource(resource) {
|
|
3069
|
+
return JUNCTION_HISTORICAL_BACKFILL_COMPLETION_SUMMARY_RESOURCE_SET.has(resource);
|
|
2999
3070
|
}
|
|
3000
3071
|
function readJunctionRecordArray(value) {
|
|
3001
3072
|
return Array.isArray(value) ? value : [];
|
|
3002
3073
|
}
|
|
3003
|
-
function finiteJunctionNumber(value) {
|
|
3004
|
-
if (typeof value === "number" && Number.isFinite(value)) {
|
|
3005
|
-
return value;
|
|
3006
|
-
}
|
|
3007
|
-
if (typeof value === "string" && value.trim()) {
|
|
3008
|
-
const numeric = Number(value);
|
|
3009
|
-
return Number.isFinite(numeric) ? numeric : undefined;
|
|
3010
|
-
}
|
|
3011
|
-
return undefined;
|
|
3012
|
-
}
|
|
3013
|
-
function junctionTimestampMillis(value, sourceProviderSlug) {
|
|
3014
|
-
if (value instanceof Date && Number.isFinite(value.getTime())) {
|
|
3015
|
-
return value.getTime();
|
|
3016
|
-
}
|
|
3017
|
-
if (typeof value === "number" && Number.isFinite(value)) {
|
|
3018
|
-
return value;
|
|
3019
|
-
}
|
|
3020
|
-
if (typeof value !== "string" || !value.trim()) {
|
|
3021
|
-
return null;
|
|
3022
|
-
}
|
|
3023
|
-
const trimmed = value.trim();
|
|
3024
|
-
if (isRejectedJunctionSafeTimestampString(trimmed, sourceProviderSlug)) {
|
|
3025
|
-
return null;
|
|
3026
|
-
}
|
|
3027
|
-
const parsed = Date.parse(trimmed);
|
|
3028
|
-
return Number.isFinite(parsed) ? parsed : null;
|
|
3029
|
-
}
|
|
3030
|
-
function isRejectedJunctionSafeTimestampString(value, sourceProviderSlug) {
|
|
3031
|
-
if (isJunctionSourceSpecificFloatingTimestampProvider(sourceProviderSlug)) {
|
|
3032
|
-
return true;
|
|
3033
|
-
}
|
|
3034
|
-
return /^\d{4}-\d{2}-\d{2}(?:$|[ t]\d{2}:\d{2})/iu.test(value)
|
|
3035
|
-
&& !/z$/iu.test(value)
|
|
3036
|
-
&& !/[+-]\d{2}:?\d{2}$/u.test(value);
|
|
3037
|
-
}
|
|
3038
|
-
function isJunctionSourceSpecificFloatingTimestampProvider(sourceProviderSlug) {
|
|
3039
|
-
const normalizedSourceProviderSlug = normalizeProviderSlug(sourceProviderSlug);
|
|
3040
|
-
return normalizedSourceProviderSlug
|
|
3041
|
-
? JUNCTION_FLOATING_TIMESTAMP_SOURCE_PROVIDER_SLUGS.has(normalizedSourceProviderSlug)
|
|
3042
|
-
: false;
|
|
3043
|
-
}
|
|
3044
3074
|
function buildHistoricalBackfillFollowUp(input) {
|
|
3045
|
-
if (input.
|
|
3075
|
+
if (!canCurrentRuntimeMutateJunctionHistoricalBackfillProgress(input.metadata)) {
|
|
3076
|
+
return {};
|
|
3077
|
+
}
|
|
3078
|
+
if (input.coverageComplete) {
|
|
3046
3079
|
return {
|
|
3047
3080
|
metadataPatch: buildHistoricalBackfillMetadataPatch({
|
|
3048
3081
|
status: "complete",
|
|
@@ -3057,8 +3090,18 @@ function buildHistoricalBackfillFollowUp(input) {
|
|
|
3057
3090
|
|| hasHistoricalBackfillWindowStatus(input.metadata, "exhausted", input.windowStart, input.windowEnd)) {
|
|
3058
3091
|
return {};
|
|
3059
3092
|
}
|
|
3060
|
-
const
|
|
3061
|
-
const
|
|
3093
|
+
const pendingRetryAt = readPendingHistoricalBackfillRetryAt(input.metadata, input.windowStart, input.windowEnd);
|
|
3094
|
+
const pendingRetryAtMs = pendingRetryAt ? Date.parse(pendingRetryAt) : NaN;
|
|
3095
|
+
if (pendingRetryAt && Number.isFinite(pendingRetryAtMs) && Date.parse(input.now) < pendingRetryAtMs) {
|
|
3096
|
+
return { nextReconcileAt: pendingRetryAt };
|
|
3097
|
+
}
|
|
3098
|
+
const previousEmptyAttempts = readHistoricalBackfillEmptyAttempts(input.metadata, input.windowStart, input.windowEnd);
|
|
3099
|
+
let emptyAttempts = previousEmptyAttempts + 1;
|
|
3100
|
+
let retryDelayMs = EMPTY_HISTORICAL_BACKFILL_RETRY_DELAYS_MS[emptyAttempts - 1] ?? null;
|
|
3101
|
+
if (retryDelayMs === null && !input.terminalFailure) {
|
|
3102
|
+
emptyAttempts = EMPTY_HISTORICAL_BACKFILL_RETRY_DELAYS_MS.length;
|
|
3103
|
+
retryDelayMs = EMPTY_HISTORICAL_BACKFILL_RETRY_DELAYS_MS[emptyAttempts - 1] ?? null;
|
|
3104
|
+
}
|
|
3062
3105
|
const status = retryDelayMs === null ? "exhausted" : "retrying";
|
|
3063
3106
|
const metadataPatch = buildHistoricalBackfillMetadataPatch({
|
|
3064
3107
|
status,
|
|
@@ -3070,23 +3113,66 @@ function buildHistoricalBackfillFollowUp(input) {
|
|
|
3070
3113
|
if (retryDelayMs === null) {
|
|
3071
3114
|
return { metadataPatch };
|
|
3072
3115
|
}
|
|
3116
|
+
const retryAt = addMilliseconds(input.now, retryDelayMs);
|
|
3117
|
+
return {
|
|
3118
|
+
metadataPatch,
|
|
3119
|
+
nextReconcileAt: retryAt,
|
|
3120
|
+
};
|
|
3121
|
+
}
|
|
3122
|
+
function readPendingHistoricalBackfillRetryAt(metadata, windowStart, windowEnd) {
|
|
3123
|
+
if (readHistoricalBackfillCoverageVersion(metadata)
|
|
3124
|
+
!== JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION) {
|
|
3125
|
+
return null;
|
|
3126
|
+
}
|
|
3127
|
+
const status = readHistoricalBackfillStatus(metadata)?.status ?? null;
|
|
3128
|
+
if (status !== "retrying") {
|
|
3129
|
+
return null;
|
|
3130
|
+
}
|
|
3131
|
+
const metadataWindowStart = normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowStart]);
|
|
3132
|
+
const metadataWindowEnd = normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowEnd]);
|
|
3133
|
+
if (metadataWindowStart !== windowStart || metadataWindowEnd !== windowEnd) {
|
|
3134
|
+
return null;
|
|
3135
|
+
}
|
|
3136
|
+
const emptyAttempts = Math.max(1, readHistoricalBackfillEmptyAttempts(metadata, windowStart, windowEnd));
|
|
3137
|
+
const retryDelayMs = EMPTY_HISTORICAL_BACKFILL_RETRY_DELAYS_MS[emptyAttempts - 1] ?? null;
|
|
3138
|
+
const lastEmptyAt = normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.lastEmptyAt]);
|
|
3139
|
+
if (retryDelayMs === null || !lastEmptyAt || !Number.isFinite(Date.parse(lastEmptyAt))) {
|
|
3140
|
+
return null;
|
|
3141
|
+
}
|
|
3142
|
+
return addMilliseconds(lastEmptyAt, retryDelayMs);
|
|
3143
|
+
}
|
|
3144
|
+
function buildNonConnectHistoricalBackfillFollowUp(input) {
|
|
3145
|
+
if (input.hasRecords) {
|
|
3146
|
+
return {};
|
|
3147
|
+
}
|
|
3148
|
+
const emptyAttempts = readHistoricalBackfillJobEmptyAttempts(input.job) + 1;
|
|
3149
|
+
const retryDelayMs = EMPTY_HISTORICAL_BACKFILL_RETRY_DELAYS_MS[emptyAttempts - 1] ?? null;
|
|
3150
|
+
if (retryDelayMs === null) {
|
|
3151
|
+
return {};
|
|
3152
|
+
}
|
|
3153
|
+
const retryAt = addMilliseconds(input.now, retryDelayMs);
|
|
3073
3154
|
const retryJob = buildExactWindowJob({
|
|
3074
3155
|
kind: "backfill",
|
|
3156
|
+
priority: Math.max(input.job.priority, JUNCTION_HISTORICAL_BACKFILL_RETRY_PRIORITY),
|
|
3075
3157
|
windowStart: input.windowStart,
|
|
3076
3158
|
windowEnd: input.windowEnd,
|
|
3077
|
-
priority: 30,
|
|
3078
3159
|
});
|
|
3079
3160
|
return {
|
|
3080
|
-
|
|
3081
|
-
|
|
3161
|
+
scheduledJobs: [
|
|
3162
|
+
{
|
|
3082
3163
|
...retryJob,
|
|
3083
|
-
availableAt:
|
|
3084
|
-
|
|
3164
|
+
availableAt: retryAt,
|
|
3165
|
+
payload: {
|
|
3166
|
+
...(retryJob.payload ?? {}),
|
|
3167
|
+
emptyBackfillAttempts: emptyAttempts,
|
|
3168
|
+
},
|
|
3169
|
+
},
|
|
3170
|
+
],
|
|
3085
3171
|
};
|
|
3086
3172
|
}
|
|
3087
3173
|
function buildHistoricalBackfillMetadataPatch(input) {
|
|
3088
3174
|
return {
|
|
3089
|
-
[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.status]: input.status,
|
|
3175
|
+
[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.status]: encodeJunctionHistoricalBackfillStatus(input.status),
|
|
3090
3176
|
[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.emptyAttempts]: input.emptyAttempts,
|
|
3091
3177
|
[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.lastEmptyAt]: input.lastEmptyAt,
|
|
3092
3178
|
[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowStart]: input.windowStart,
|
|
@@ -3094,12 +3180,16 @@ function buildHistoricalBackfillMetadataPatch(input) {
|
|
|
3094
3180
|
};
|
|
3095
3181
|
}
|
|
3096
3182
|
function hasHistoricalBackfillWindowStatus(metadata, status, windowStart, windowEnd) {
|
|
3097
|
-
return
|
|
3183
|
+
return readHistoricalBackfillCoverageVersion(metadata)
|
|
3184
|
+
=== JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION
|
|
3185
|
+
&& readHistoricalBackfillStatus(metadata)?.status === status
|
|
3098
3186
|
&& normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowStart]) === windowStart
|
|
3099
3187
|
&& normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowEnd]) === windowEnd;
|
|
3100
3188
|
}
|
|
3101
3189
|
function readHistoricalBackfillEmptyAttempts(metadata, windowStart, windowEnd) {
|
|
3102
|
-
if (
|
|
3190
|
+
if (readHistoricalBackfillCoverageVersion(metadata)
|
|
3191
|
+
!== JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION
|
|
3192
|
+
|| normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowStart]) !== windowStart
|
|
3103
3193
|
|| normalizeString(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.windowEnd]) !== windowEnd) {
|
|
3104
3194
|
return 0;
|
|
3105
3195
|
}
|
|
@@ -3108,6 +3198,22 @@ function readHistoricalBackfillEmptyAttempts(metadata, windowStart, windowEnd) {
|
|
|
3108
3198
|
? rawAttempts
|
|
3109
3199
|
: 0;
|
|
3110
3200
|
}
|
|
3201
|
+
function readHistoricalBackfillStatus(metadata) {
|
|
3202
|
+
return readJunctionHistoricalBackfillStatus(metadata[JUNCTION_HISTORICAL_BACKFILL_METADATA_KEYS.status]);
|
|
3203
|
+
}
|
|
3204
|
+
function readHistoricalBackfillCoverageVersion(metadata) {
|
|
3205
|
+
return readHistoricalBackfillStatus(metadata)?.coverageVersion ?? 0;
|
|
3206
|
+
}
|
|
3207
|
+
function readHistoricalBackfillJobEmptyAttempts(job) {
|
|
3208
|
+
const rawAttempts = job.payload.emptyBackfillAttempts;
|
|
3209
|
+
return typeof rawAttempts === "number" && Number.isInteger(rawAttempts) && rawAttempts > 0 ? rawAttempts : 0;
|
|
3210
|
+
}
|
|
3211
|
+
function buildConnectHistoricalBackfillWindow(account, summaryBackfillDays) {
|
|
3212
|
+
return {
|
|
3213
|
+
windowStart: floorUtcDayTimestamp(subtractDays(account.connectedAt, summaryBackfillDays)),
|
|
3214
|
+
windowEnd: floorUtcDayTimestamp(account.connectedAt),
|
|
3215
|
+
};
|
|
3216
|
+
}
|
|
3111
3217
|
function buildWindowJob(input) {
|
|
3112
3218
|
const windowEnd = floorUtcDayTimestamp(input.now);
|
|
3113
3219
|
const windowStart = floorUtcDayTimestamp(input.windowStart);
|
|
@@ -3115,6 +3221,7 @@ function buildWindowJob(input) {
|
|
|
3115
3221
|
kind: input.kind,
|
|
3116
3222
|
windowStart,
|
|
3117
3223
|
windowEnd,
|
|
3224
|
+
availableAt: input.now,
|
|
3118
3225
|
priority: input.priority,
|
|
3119
3226
|
});
|
|
3120
3227
|
}
|
|
@@ -3124,8 +3231,10 @@ function buildExactWindowJob(input) {
|
|
|
3124
3231
|
payload: {
|
|
3125
3232
|
windowStart: input.windowStart,
|
|
3126
3233
|
windowEnd: input.windowEnd,
|
|
3234
|
+
...(input.payload ?? {}),
|
|
3127
3235
|
},
|
|
3128
3236
|
priority: input.priority,
|
|
3237
|
+
...(input.availableAt ? { availableAt: input.availableAt } : {}),
|
|
3129
3238
|
dedupeKey: sha256Text(JSON.stringify(["junction", input.kind, input.windowStart, input.windowEnd])),
|
|
3130
3239
|
};
|
|
3131
3240
|
}
|
|
@@ -3133,20 +3242,12 @@ function buildJunctionWebhookJobs(input) {
|
|
|
3133
3242
|
if (isJunctionProviderConnectionEvent(input.eventType)) {
|
|
3134
3243
|
const backfillWindowStart = subtractDays(input.window.windowEnd, input.summaryBackfillDays);
|
|
3135
3244
|
return [
|
|
3136
|
-
{
|
|
3245
|
+
buildExactWindowJob({
|
|
3137
3246
|
kind: "backfill",
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
windowEnd: input.window.windowEnd,
|
|
3141
|
-
},
|
|
3247
|
+
windowStart: backfillWindowStart,
|
|
3248
|
+
windowEnd: input.window.windowEnd,
|
|
3142
3249
|
priority: 35,
|
|
3143
|
-
|
|
3144
|
-
"junction-webhook",
|
|
3145
|
-
"connection-backfill",
|
|
3146
|
-
backfillWindowStart,
|
|
3147
|
-
input.window.windowEnd,
|
|
3148
|
-
])),
|
|
3149
|
-
},
|
|
3250
|
+
}),
|
|
3150
3251
|
{
|
|
3151
3252
|
kind: "reconcile",
|
|
3152
3253
|
payload: {
|
|
@@ -3302,7 +3403,10 @@ function buildJunctionWebhookDataJobJsons(input) {
|
|
|
3302
3403
|
&& isJunctionHistoricalPullCompletedWebhookData(input.data, input.externalAccountId)) {
|
|
3303
3404
|
return [];
|
|
3304
3405
|
}
|
|
3305
|
-
const sanitized = sanitizeJunctionImportSnapshotValue(input.data, new Map(), {
|
|
3406
|
+
const sanitized = sanitizeJunctionImportSnapshotValue(input.data, new Map(), {
|
|
3407
|
+
blockedStringValues: [input.externalAccountId],
|
|
3408
|
+
preserveSourceReferenceKeys: true,
|
|
3409
|
+
});
|
|
3306
3410
|
const record = readPlainObject(sanitized);
|
|
3307
3411
|
if (!record) {
|
|
3308
3412
|
return [];
|
|
@@ -3328,6 +3432,92 @@ function parseJunctionWebhookDataJobRecord(value) {
|
|
|
3328
3432
|
return null;
|
|
3329
3433
|
}
|
|
3330
3434
|
}
|
|
3435
|
+
const JUNCTION_COMPANION_HEALTH_METADATA_TIMESTAMP_PATTERN = /^\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}(?:\.\d{1,9})?(?:Z|[+-]\d{2}:\d{2})$/u;
|
|
3436
|
+
function parseJunctionCompanionHealthMetadataJob(job) {
|
|
3437
|
+
if (job.payload.resource !== JUNCTION_COMPANION_HEALTH_METADATA_RESOURCE) {
|
|
3438
|
+
throw invalidJunctionCompanionHealthMetadataJob("resource is invalid");
|
|
3439
|
+
}
|
|
3440
|
+
if (job.payload.eventType !== JUNCTION_COMPANION_HEALTH_METADATA_EVENT_TYPE) {
|
|
3441
|
+
throw invalidJunctionCompanionHealthMetadataJob("eventType is invalid");
|
|
3442
|
+
}
|
|
3443
|
+
if (job.payload.resourceCategory !== "summary") {
|
|
3444
|
+
throw invalidJunctionCompanionHealthMetadataJob("resourceCategory is invalid");
|
|
3445
|
+
}
|
|
3446
|
+
if (job.payload.sourceProviderSlug !== JUNCTION_COMPANION_HEALTH_METADATA_SOURCE_PROVIDER) {
|
|
3447
|
+
throw invalidJunctionCompanionHealthMetadataJob("sourceProviderSlug is invalid");
|
|
3448
|
+
}
|
|
3449
|
+
const receivedAt = toJunctionCompanionHealthMetadataIsoTimestamp(job.payload.occurredAt);
|
|
3450
|
+
if (!receivedAt) {
|
|
3451
|
+
throw invalidJunctionCompanionHealthMetadataJob("occurredAt is invalid");
|
|
3452
|
+
}
|
|
3453
|
+
const receivedAtMs = Date.parse(receivedAt);
|
|
3454
|
+
const json = typeof job.payload.webhookDataJson === "string"
|
|
3455
|
+
? job.payload.webhookDataJson
|
|
3456
|
+
: null;
|
|
3457
|
+
if (!json || Buffer.byteLength(json, "utf8") > JUNCTION_COMPANION_HEALTH_METADATA_MAX_BATCH_BYTES) {
|
|
3458
|
+
throw invalidJunctionCompanionHealthMetadataJob("batch JSON is missing or too large");
|
|
3459
|
+
}
|
|
3460
|
+
let parsed;
|
|
3461
|
+
try {
|
|
3462
|
+
parsed = JSON.parse(json);
|
|
3463
|
+
}
|
|
3464
|
+
catch {
|
|
3465
|
+
throw invalidJunctionCompanionHealthMetadataJob("batch JSON is invalid");
|
|
3466
|
+
}
|
|
3467
|
+
try {
|
|
3468
|
+
return parseJunctionCompanionHealthMetadataBatch(parsed, receivedAtMs).records;
|
|
3469
|
+
}
|
|
3470
|
+
catch (error) {
|
|
3471
|
+
if (error instanceof JunctionCompanionHealthMetadataParseError) {
|
|
3472
|
+
throw invalidJunctionCompanionHealthMetadataJob(error.message);
|
|
3473
|
+
}
|
|
3474
|
+
throw error;
|
|
3475
|
+
}
|
|
3476
|
+
}
|
|
3477
|
+
function invalidJunctionCompanionHealthMetadataJob(reason) {
|
|
3478
|
+
return deviceSyncError({
|
|
3479
|
+
code: "DEVICE_SYNC_JOB_PAYLOAD_INVALID",
|
|
3480
|
+
message: `Junction companion health metadata ${reason}.`,
|
|
3481
|
+
retryable: false,
|
|
3482
|
+
});
|
|
3483
|
+
}
|
|
3484
|
+
function buildJunctionCompanionRecoverySummary(record) {
|
|
3485
|
+
return stripUndefined({
|
|
3486
|
+
id: record.recordId,
|
|
3487
|
+
date: record.endAt,
|
|
3488
|
+
companionStartAt: record.startAt,
|
|
3489
|
+
companionEndAt: record.endAt,
|
|
3490
|
+
companionSyncVersion: record.syncVersion,
|
|
3491
|
+
recovery_readiness_score: record.value,
|
|
3492
|
+
source: {
|
|
3493
|
+
provider: JUNCTION_COMPANION_HEALTH_METADATA_SOURCE_PROVIDER,
|
|
3494
|
+
type: JUNCTION_COMPANION_HEALTH_METADATA_SOURCE_TYPE,
|
|
3495
|
+
},
|
|
3496
|
+
});
|
|
3497
|
+
}
|
|
3498
|
+
function buildJunctionCompanionWorkoutStrainSummary(record) {
|
|
3499
|
+
return stripUndefined({
|
|
3500
|
+
id: record.recordId,
|
|
3501
|
+
date: record.endAt,
|
|
3502
|
+
companionStartAt: record.startAt,
|
|
3503
|
+
companionEndAt: record.endAt,
|
|
3504
|
+
companionSyncVersion: record.syncVersion,
|
|
3505
|
+
workout_strain: record.value,
|
|
3506
|
+
source: {
|
|
3507
|
+
provider: JUNCTION_COMPANION_HEALTH_METADATA_SOURCE_PROVIDER,
|
|
3508
|
+
type: JUNCTION_COMPANION_HEALTH_METADATA_SOURCE_TYPE,
|
|
3509
|
+
},
|
|
3510
|
+
});
|
|
3511
|
+
}
|
|
3512
|
+
function toJunctionCompanionHealthMetadataIsoTimestamp(value) {
|
|
3513
|
+
if (typeof value !== "string"
|
|
3514
|
+
|| value.length > 64
|
|
3515
|
+
|| !JUNCTION_COMPANION_HEALTH_METADATA_TIMESTAMP_PATTERN.test(value)) {
|
|
3516
|
+
return null;
|
|
3517
|
+
}
|
|
3518
|
+
const parsed = Date.parse(value);
|
|
3519
|
+
return Number.isFinite(parsed) ? new Date(parsed).toISOString() : null;
|
|
3520
|
+
}
|
|
3331
3521
|
function resolveJunctionWebhookDataRecordSourceProviderSlug(record) {
|
|
3332
3522
|
const slugs = new Set();
|
|
3333
3523
|
const addSlug = (value) => {
|
|
@@ -3428,15 +3618,7 @@ function inferJunctionWebhookResource(eventType, data) {
|
|
|
3428
3618
|
category: inferJunctionResourceCategory(explicitCategory, resource),
|
|
3429
3619
|
};
|
|
3430
3620
|
}
|
|
3431
|
-
export { normalizeJunctionResourceName } from "
|
|
3432
|
-
/**
|
|
3433
|
-
* Resolves the normalized Junction resource name carried by a webhook event
|
|
3434
|
-
* type such as `daily.data.sleep.created`. Lifecycle events (for example
|
|
3435
|
-
* `provider.connection.created`) carry no data resource and resolve to null.
|
|
3436
|
-
*/
|
|
3437
|
-
export function readJunctionWebhookResourceName(eventType) {
|
|
3438
|
-
return normalizeJunctionResourceName(readJunctionWebhookResourceFromEventType(eventType));
|
|
3439
|
-
}
|
|
3621
|
+
export { normalizeJunctionResourceName, readJunctionWebhookResourceName } from "../junction-resources.js";
|
|
3440
3622
|
function readJunctionWebhookResourceFromEventType(eventType) {
|
|
3441
3623
|
const parts = eventType.split(".").map((part) => part.trim()).filter(Boolean);
|
|
3442
3624
|
const dataIndex = parts.indexOf("data");
|
|
@@ -3874,26 +4056,56 @@ function describeJunctionWebhookIdentityCandidateDiagnostics(candidates, selecti
|
|
|
3874
4056
|
}
|
|
3875
4057
|
return diagnosticCandidates;
|
|
3876
4058
|
}
|
|
3877
|
-
async function projectJunctionSources(context, providers) {
|
|
4059
|
+
async function projectJunctionSources(context, providers, options = {}) {
|
|
3878
4060
|
if (!context.upsertConnectionSource) {
|
|
3879
4061
|
context.logger.warn?.("Junction source projection skipped because the job context does not expose source storage.", {
|
|
3880
4062
|
provider: "junction",
|
|
3881
4063
|
});
|
|
3882
4064
|
return;
|
|
3883
4065
|
}
|
|
4066
|
+
const historicalState = readHistoricalBackfillStatus(context.account.metadata);
|
|
4067
|
+
const preserveOpaqueHistoricalReconnect = !canCurrentRuntimeMutateJunctionHistoricalBackfillProgress(context.account.metadata);
|
|
4068
|
+
const preserveHistoricalReconnect = options.preserveHistoricalReconnect ?? (options.preserveHistoricalReconnectProviderSlugs !== undefined
|
|
4069
|
+
|| preserveOpaqueHistoricalReconnect
|
|
4070
|
+
|| (historicalState !== null
|
|
4071
|
+
&& historicalState.coverageVersion >= JUNCTION_HISTORICAL_BACKFILL_COVERAGE_VERSION
|
|
4072
|
+
&& historicalState.status !== "complete"));
|
|
4073
|
+
const preserveHistoricalReconnectProviderSlugs = options.preserveHistoricalReconnectProviderSlugs === undefined
|
|
4074
|
+
? null
|
|
4075
|
+
: new Set(options.preserveHistoricalReconnectProviderSlugs);
|
|
4076
|
+
const existingSources = context.listConnectionSources
|
|
4077
|
+
? await context.listConnectionSources()
|
|
4078
|
+
: [];
|
|
4079
|
+
const existingByInstanceKey = new Map(existingSources.map((source) => [source.sourceInstanceKey, source]));
|
|
3884
4080
|
for (const source of projectJunctionSourcesByProviderSlug(context.account.id, providers)) {
|
|
4081
|
+
const existing = existingByInstanceKey.get(source.sourceInstanceKey) ?? existingSources.find((candidate) => normalizeProviderSlug(candidate.sourceProviderSlug) === source.sourceProviderSlug);
|
|
4082
|
+
const keepHistoricalReconnect = preserveHistoricalReconnect
|
|
4083
|
+
&& (preserveHistoricalReconnectProviderSlugs === null
|
|
4084
|
+
|| preserveHistoricalReconnectProviderSlugs.has(source.sourceProviderSlug))
|
|
4085
|
+
&& source.status !== "disconnected"
|
|
4086
|
+
&& existing !== undefined
|
|
4087
|
+
&& (preserveOpaqueHistoricalReconnect
|
|
4088
|
+
? existing.status === "error"
|
|
4089
|
+
&& existing.lastErrorCode === DEVICE_SYNC_HISTORICAL_DATA_RECONNECT_REQUIRED_ERROR_CODE
|
|
4090
|
+
: requiresHistoricalResetDeviceSyncSource(existing));
|
|
4091
|
+
const historicalReconnectError = keepHistoricalReconnect ? existing : null;
|
|
3885
4092
|
await context.upsertConnectionSource({
|
|
3886
|
-
sourceInstanceKey: source.sourceInstanceKey,
|
|
4093
|
+
sourceInstanceKey: existing?.sourceInstanceKey ?? source.sourceInstanceKey,
|
|
3887
4094
|
sourceProviderSlug: source.sourceProviderSlug,
|
|
3888
|
-
displayName: null,
|
|
3889
|
-
status: source.status,
|
|
4095
|
+
displayName: existing?.displayName ?? null,
|
|
4096
|
+
status: keepHistoricalReconnect ? "error" : source.status,
|
|
3890
4097
|
resourceAvailabilitySummary: source.resourceAvailabilitySummary,
|
|
3891
4098
|
// Only assert error fields when this projection saw an errored entry;
|
|
3892
4099
|
// omitting the keys lets the store preserve existing detail while the
|
|
3893
4100
|
// status stays "error" and auto-clear it once the status recovers.
|
|
3894
|
-
...(
|
|
3895
|
-
? {
|
|
3896
|
-
|
|
4101
|
+
...(historicalReconnectError
|
|
4102
|
+
? {
|
|
4103
|
+
lastErrorCode: historicalReconnectError.lastErrorCode,
|
|
4104
|
+
lastErrorMessage: historicalReconnectError.lastErrorMessage,
|
|
4105
|
+
}
|
|
4106
|
+
: source.lastErrorCode !== null || source.lastErrorMessage !== null
|
|
4107
|
+
? { lastErrorCode: source.lastErrorCode, lastErrorMessage: source.lastErrorMessage }
|
|
4108
|
+
: {}),
|
|
3897
4109
|
lastSeenAt: context.now,
|
|
3898
4110
|
});
|
|
3899
4111
|
}
|
|
@@ -4099,12 +4311,8 @@ function readPlainObject(value) {
|
|
|
4099
4311
|
? value
|
|
4100
4312
|
: null;
|
|
4101
4313
|
}
|
|
4102
|
-
function
|
|
4103
|
-
|
|
4104
|
-
if (!normalizedSecret || normalizedSecret.length < 16) {
|
|
4105
|
-
throw new TypeError("JUNCTION_CLIENT_USER_ID_SECRET must be at least 16 characters.");
|
|
4106
|
-
}
|
|
4107
|
-
return normalizedSecret;
|
|
4314
|
+
function readProviderSnapshotDurableDeliveryAccepted(value) {
|
|
4315
|
+
return readPlainObject(value)?.durableDeliveryAccepted === true;
|
|
4108
4316
|
}
|
|
4109
4317
|
function base32UrlEncode(input) {
|
|
4110
4318
|
const alphabet = "abcdefghijklmnopqrstuvwxyz234567";
|