@murphai/murph 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +3885 -0
- package/config.schema.json +731 -60
- package/dist/bin.js +6 -4
- package/dist/bin.js.map +1 -1
- package/dist/cli-entry.d.ts +8 -1
- package/dist/cli-entry.d.ts.map +1 -1
- package/dist/cli-entry.js +80 -4
- package/dist/cli-entry.js.map +1 -1
- package/dist/commands/audit-command-helpers.d.ts.map +1 -1
- package/dist/commands/audit-command-helpers.js +7 -5
- package/dist/commands/audit-command-helpers.js.map +1 -1
- package/dist/commands/automation.d.ts +143 -104
- package/dist/commands/automation.d.ts.map +1 -1
- package/dist/commands/automation.js +71 -13
- package/dist/commands/automation.js.map +1 -1
- package/dist/commands/batch.d.ts +7 -4
- package/dist/commands/batch.d.ts.map +1 -1
- package/dist/commands/batch.js +16 -62
- package/dist/commands/batch.js.map +1 -1
- package/dist/commands/clinical-imports.d.ts +103 -103
- package/dist/commands/command-factory-primitives.d.ts +1 -1
- package/dist/commands/command-factory-primitives.d.ts.map +1 -1
- package/dist/commands/command-factory-primitives.js +1 -1
- package/dist/commands/command-factory-primitives.js.map +1 -1
- package/dist/commands/commons.d.ts +59 -0
- package/dist/commands/commons.d.ts.map +1 -1
- package/dist/commands/commons.js +83 -5
- package/dist/commands/commons.js.map +1 -1
- package/dist/commands/document.d.ts.map +1 -1
- package/dist/commands/document.js +31 -1
- package/dist/commands/document.js.map +1 -1
- package/dist/commands/encounter.d.ts +128 -128
- package/dist/commands/event.d.ts.map +1 -1
- package/dist/commands/event.js +7 -1
- package/dist/commands/event.js.map +1 -1
- package/dist/commands/exercise.d.ts.map +1 -1
- package/dist/commands/exercise.js +16 -3
- package/dist/commands/exercise.js.map +1 -1
- package/dist/commands/experiment-progress-card-image.d.ts.map +1 -1
- package/dist/commands/experiment-progress-card-image.js +76 -16
- package/dist/commands/experiment-progress-card-image.js.map +1 -1
- package/dist/commands/experiment.d.ts.map +1 -1
- package/dist/commands/experiment.js +51 -5
- package/dist/commands/experiment.js.map +1 -1
- package/dist/commands/export-intake-read-helpers.d.ts.map +1 -1
- package/dist/commands/export-intake-read-helpers.js +9 -6
- package/dist/commands/export-intake-read-helpers.js.map +1 -1
- package/dist/commands/food.d.ts.map +1 -1
- package/dist/commands/food.js +13 -11
- package/dist/commands/food.js.map +1 -1
- package/dist/commands/habitat.d.ts.map +1 -1
- package/dist/commands/habitat.js +120 -9
- package/dist/commands/habitat.js.map +1 -1
- package/dist/commands/health-blood-test-save.d.ts.map +1 -1
- package/dist/commands/health-blood-test-save.js +42 -8
- package/dist/commands/health-blood-test-save.js.map +1 -1
- package/dist/commands/meal.d.ts.map +1 -1
- package/dist/commands/meal.js +58 -4
- package/dist/commands/meal.js.map +1 -1
- package/dist/commands/measurement.d.ts +1 -0
- package/dist/commands/measurement.d.ts.map +1 -1
- package/dist/commands/measurement.js +51 -2
- package/dist/commands/measurement.js.map +1 -1
- package/dist/commands/medication.d.ts +6 -6
- package/dist/commands/model.js +7 -11
- package/dist/commands/model.js.map +1 -1
- package/dist/commands/murph-age.d.ts +9 -1
- package/dist/commands/murph-age.d.ts.map +1 -1
- package/dist/commands/murph-age.js +132 -7
- package/dist/commands/murph-age.js.map +1 -1
- package/dist/commands/occurred-at-option.d.ts.map +1 -1
- package/dist/commands/occurred-at-option.js +7 -41
- package/dist/commands/occurred-at-option.js.map +1 -1
- package/dist/commands/payload-schema-command.d.ts +2 -2
- package/dist/commands/payload-schema-command.d.ts.map +1 -1
- package/dist/commands/payload-schema-command.js +1 -1
- package/dist/commands/payload-schema-command.js.map +1 -1
- package/dist/commands/public-validation-issue.d.ts +7 -0
- package/dist/commands/public-validation-issue.d.ts.map +1 -0
- package/dist/commands/public-validation-issue.js +7 -0
- package/dist/commands/public-validation-issue.js.map +1 -0
- package/dist/commands/research.d.ts.map +1 -1
- package/dist/commands/research.js +26 -28
- package/dist/commands/research.js.map +1 -1
- package/dist/commands/route.d.ts.map +1 -1
- package/dist/commands/route.js +45 -1
- package/dist/commands/route.js.map +1 -1
- package/dist/commands/scheduled-log.d.ts +142 -124
- package/dist/commands/scheduled-log.d.ts.map +1 -1
- package/dist/commands/scheduled-log.js +456 -106
- package/dist/commands/scheduled-log.js.map +1 -1
- package/dist/commands/wearables.d.ts +1520 -145
- package/dist/commands/wearables.d.ts.map +1 -1
- package/dist/commands/wearables.js +135 -3
- package/dist/commands/wearables.js.map +1 -1
- package/dist/commands/workout-live.d.ts +3 -0
- package/dist/commands/workout-live.d.ts.map +1 -0
- package/dist/commands/workout-live.js +372 -0
- package/dist/commands/workout-live.js.map +1 -0
- package/dist/commands/workout-typed-options.d.ts +38 -0
- package/dist/commands/workout-typed-options.d.ts.map +1 -0
- package/dist/commands/workout-typed-options.js +90 -0
- package/dist/commands/workout-typed-options.js.map +1 -0
- package/dist/commands/workout.d.ts.map +1 -1
- package/dist/commands/workout.js +115 -84
- package/dist/commands/workout.js.map +1 -1
- package/dist/food-labels.d.ts +549 -277
- package/dist/food-labels.d.ts.map +1 -1
- package/dist/food-labels.js +19 -3
- package/dist/food-labels.js.map +1 -1
- package/dist/foreground-terminal-logging.js +0 -2
- package/dist/foreground-terminal-logging.js.map +1 -1
- package/dist/hosted-data-api-labels.d.ts +1683 -871
- package/dist/hosted-data-api-labels.d.ts.map +1 -1
- package/dist/hosted-data-api-labels.js +224 -31
- package/dist/hosted-data-api-labels.js.map +1 -1
- package/dist/incur-error-bridge.d.ts.map +1 -1
- package/dist/incur-error-bridge.js +7 -15
- package/dist/incur-error-bridge.js.map +1 -1
- package/dist/incur.generated.d.ts +158 -3
- package/dist/incur.generated.d.ts.map +1 -1
- package/dist/mapbox-address.d.ts +41 -0
- package/dist/mapbox-address.d.ts.map +1 -0
- package/dist/mapbox-address.js +469 -0
- package/dist/mapbox-address.js.map +1 -0
- package/dist/mapbox-route-client.d.ts +2 -2
- package/dist/mapbox-route-client.d.ts.map +1 -1
- package/dist/mapbox-route-client.js +49 -12
- package/dist/mapbox-route-client.js.map +1 -1
- package/dist/mapbox-route-contracts.d.ts +60 -60
- package/dist/mapbox-route-contracts.d.ts.map +1 -1
- package/dist/mapbox-route-contracts.js +1 -1
- package/dist/mapbox-route-contracts.js.map +1 -1
- package/dist/mapbox-route-directions.d.ts.map +1 -1
- package/dist/mapbox-route-directions.js +1 -2
- package/dist/mapbox-route-directions.js.map +1 -1
- package/dist/mapbox-route-elevation.js +0 -1
- package/dist/mapbox-route-elevation.js.map +1 -1
- package/dist/mapbox-route-points.js +0 -2
- package/dist/mapbox-route-points.js.map +1 -1
- package/dist/mapbox-route.d.ts.map +1 -1
- package/dist/mapbox-route.js +1 -1
- package/dist/mapbox-route.js.map +1 -1
- package/dist/research-scout-client.d.ts +3 -2
- package/dist/research-scout-client.d.ts.map +1 -1
- package/dist/research-scout-client.js +166 -37
- package/dist/research-scout-client.js.map +1 -1
- package/dist/research-scout.d.ts +1 -1
- package/dist/research-scout.d.ts.map +1 -1
- package/dist/research-scout.js +1 -1
- package/dist/research-scout.js.map +1 -1
- package/dist/supplement-labels.d.ts +545 -275
- package/dist/supplement-labels.d.ts.map +1 -1
- package/dist/supplement-labels.js +0 -1
- package/dist/supplement-labels.js.map +1 -1
- package/dist/vault-cli-command-manifest.d.ts +2472 -700
- package/dist/vault-cli-command-manifest.d.ts.map +1 -1
- package/dist/vault-cli-command-manifest.js +35 -10
- package/dist/vault-cli-command-manifest.js.map +1 -1
- package/dist/vault-cli-skill-hash.generated.d.ts +1 -1
- package/dist/vault-cli-skill-hash.generated.js +1 -1
- package/dist/vault-cli-vault-context.js +0 -1
- package/dist/vault-cli-vault-context.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/service.d.ts +9 -0
- package/node_modules/@murphai/assistant-cli/dist/assistant/service.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/chat-controller-models.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/chat-controller-models.js +0 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/chat-controller-models.js.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink.js +10 -8
- package/node_modules/@murphai/assistant-cli/dist/assistant/ui/ink.js.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 +19 -9
- 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 +20 -56
- package/node_modules/@murphai/assistant-cli/dist/commands/assistant.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/README.md +73 -16
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-controller.d.ts +21 -4
- 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 +173 -43
- 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 +75 -70
- 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/active-turn-input-journal.js +44 -19
- package/node_modules/@murphai/assistant-engine/dist/assistant/active-turn-input-journal.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.d.ts +3 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.js +28 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/ask-continuation.js.map +1 -1
- 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 +4 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/attachment-evidence-model.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/cross-session-route-state.d.ts +77 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/cross-session-route-state.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/cross-session-route-state.js +777 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/cross-session-route-state.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/grouping.d.ts +1 -0
- 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 +36 -4
- 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.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/input-summary.js +3 -1
- 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 +3 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/operation-scope.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/prompt-builder.d.ts +10 -2
- 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 +33 -13
- 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 +12 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/reply.js +851 -171
- 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 +2 -0
- 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 +51 -18
- 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 +2 -0
- 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 +59 -30
- 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 +3 -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 +3 -0
- 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 +10 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.js +62 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation/target-override.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/automation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channel-adapters.d.ts +1 -1
- 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/channels/descriptors.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/channels/descriptors.js +107 -44
- 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 +3 -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 +34 -3
- 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 +22 -14
- 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 +352 -78
- 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 +43 -8
- 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 +1 -0
- 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 +6 -5
- 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 +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-base-instructions.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-base-instructions.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-base-instructions.js +14 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-base-instructions.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-runtime.d.ts +17 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-runtime.js +25 -19
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-runtime.js.map +1 -1
- 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 +9 -9
- 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/planning.d.ts +4 -8
- 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 +284 -59
- 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 +5 -3
- 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 +152 -24
- package/node_modules/@murphai/assistant-engine/dist/assistant/codex-turn-runner.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/content-types.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/content-types.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.d.ts +4 -1
- 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 +76 -24
- package/node_modules/@murphai/assistant-engine/dist/assistant/context-snapshot.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-persistence.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-persistence.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-persistence.js +0 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-persistence.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-ref.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-ref.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-ref.js +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/conversation-ref.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/authoring.d.ts +5 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/authoring.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/authoring.js +178 -31
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/authoring.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/canonical-jobs.d.ts +32 -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 +147 -31
- 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 +8 -0
- 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 +73 -15
- 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 +8 -1
- 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 +438 -116
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/execution.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/mutations.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/mutations.js +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/mutations.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/output-history.d.ts +11 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/output-history.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/output-history.js +153 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/output-history.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/runtime-state.d.ts +47 -47
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/runtime-state.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/runtime-state.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/runtime-state.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.d.ts +10 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.js +28 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/schedule.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/store.d.ts +49 -39
- 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 +19 -1
- 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.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.js +1 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/targets.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/timing-verification.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/timing-verification.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/timing-verification.js +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron/timing-verification.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron.d.ts +9 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/cron.js +31 -2
- 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 +8 -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 +38 -8
- package/node_modules/@murphai/assistant-engine/dist/assistant/delivery-service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.d.ts +2 -1
- 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 +8 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/device-activity-cron-tags.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.d.ts +123 -13
- 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 +57 -11
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-context.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-plan.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-plan.js +2 -8
- package/node_modules/@murphai/assistant-engine/dist/assistant/execution-plan.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.js +10 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/experiment-support-automations.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-response-card-schema.d.ts +115 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-response-card-schema.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-response-card-schema.js +162 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-response-card-schema.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-response-card.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-response-card.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-response-card.js +118 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-response-card.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-scorecard-schema.d.ts +83 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-scorecard-schema.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-scorecard-schema.js +27 -22
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-scorecard-schema.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-scorecard.js +8 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-challenge-scorecard.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-email-outbox.d.ts +20 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-email-outbox.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/{newsletter-outbox.js → group-email-outbox.js} +65 -36
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-email-outbox.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-newsletter-automation.d.ts +2 -48
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-newsletter-automation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-newsletter-automation.js +14 -98
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-newsletter-automation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-room-model.d.ts +22 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-room-model.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-room-model.js +87 -28
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-room-model.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-shared-freshness.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-shared-freshness.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-shared-freshness.js +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-shared-freshness.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-shared-read-limits.d.ts +3 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-shared-read-limits.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-shared-read-limits.js +21 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-shared-read-limits.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-image-completion.d.ts +31 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-image-completion.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-image-completion.js +164 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-image-completion.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.d.ts +80 -24
- 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 +191 -62
- package/node_modules/@murphai/assistant-engine/dist/assistant/hosted-tool-context.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-source.d.ts +1 -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 +2 -1
- 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 +273 -269
- 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 +6 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/input-store.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/issue-reporting.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/issue-reporting.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/issue-reporting.js +26 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/issue-reporting.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/linq-delivery-posture.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/linq-delivery-posture.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/linq-delivery-posture.js +20 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/linq-delivery-posture.js.map +1 -0
- 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 +886 -436
- 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 +3 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.js +245 -6
- package/node_modules/@murphai/assistant-engine/dist/assistant/maintenance-evidence.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.d.ts +22 -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 +338 -47
- package/node_modules/@murphai/assistant-engine/dist/assistant/managed-automations.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/message-target-selection.d.ts +13 -22
- package/node_modules/@murphai/assistant-engine/dist/assistant/message-target-selection.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/message-target-selection.js +8 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/message-target-selection.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.d.ts +2 -0
- 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 +43 -9
- package/node_modules/@murphai/assistant-engine/dist/assistant/model-behavior.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.d.ts +16 -14
- 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 +339 -62
- package/node_modules/@murphai/assistant-engine/dist/assistant/notification-turn.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-first-personal-read-automation.d.ts +14 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-first-personal-read-automation.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-first-personal-read-automation.js +94 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-first-personal-read-automation.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-automation.d.ts +22 -3
- 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 +81 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-automation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-seed.d.ts +25 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-seed.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-seed.js +72 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-followup-seed.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-goal-checkin-automation.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-goal-checkin-automation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-goal-checkin-automation.js +184 -83
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-goal-checkin-automation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.d.ts +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.js +15 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/onboarding-state.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/automation-authority.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/automation-authority.js +24 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/automation-authority.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.d.ts +15 -3
- 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 +314 -53
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/dispatch-state.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/intents.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/intents.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/intents.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/intents.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/receipt-repair.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/receipt-repair.js +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/receipt-repair.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/retry-policy.d.ts +4 -1
- 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 +33 -8
- 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 +38 -4
- 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 +1034 -41
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/store.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/summary.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/summary.js +7 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox/summary.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.d.ts +65 -8
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.js +569 -67
- package/node_modules/@murphai/assistant-engine/dist/assistant/outbox.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/private-completion-continuity.d.ts +23 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/private-completion-continuity.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/private-completion-continuity.js +294 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/private-completion-continuity.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/prompt-time.d.ts +12 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/prompt-time.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/prompt-time.js +38 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/prompt-time.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-catalog.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-catalog.js +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-catalog.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-start-critical-path.d.ts +48 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-start-critical-path.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-start-critical-path.js +101 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/provider-start-critical-path.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/providers/codex-cli.d.ts +6 -0
- 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 +86 -97
- 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 +16 -5
- 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 +379 -644
- 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 +40 -1
- 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/redaction.d.ts +2 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/redaction.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/redaction.js +6 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/redaction.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/reminder-availability-maintenance.d.ts +17 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/reminder-availability-maintenance.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/reminder-availability-maintenance.js +287 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/reminder-availability-maintenance.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 +10 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/reply-delivery-context.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/response-media.d.ts +33 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/response-media.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/response-media.js +173 -3
- package/node_modules/@murphai/assistant-engine/dist/assistant/response-media.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.d.ts +25 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.js +137 -69
- package/node_modules/@murphai/assistant-engine/dist/assistant/runtime-residue.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-contracts.d.ts +20 -4
- 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 +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 +18 -8
- 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 +5 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/service-usage.js +31 -11
- 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 +12 -2
- 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 -3
- 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.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.js +71 -16
- package/node_modules/@murphai/assistant-engine/dist/assistant/session-resolution.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/shared.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/shared.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/shared.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/shared.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/state-secrets.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/state-secrets.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/state-secrets.js +0 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/state-secrets.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/persistence.d.ts +11 -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 +410 -139
- 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 +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/store/types.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/store.js +54 -13
- 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 +7 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.js +312 -138
- package/node_modules/@murphai/assistant-engine/dist/assistant/system-prompt.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-digest.d.ts +10 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-digest.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-digest.js +150 -10
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-digest.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-feedback.d.ts +8 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-feedback.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-feedback.js +74 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/tool-validation-feedback.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turn-finalizer.js +115 -16
- 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 +3 -2
- 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-progress.d.ts +9 -2
- 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 +49 -6
- 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 +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant/turns.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/turns.js +62 -22
- 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 +7 -0
- 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 +47 -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 +4 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.js +57 -23
- package/node_modules/@murphai/assistant-engine/dist/assistant-ask.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-channel-adapters.d.ts +1 -1
- 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 +13 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-cli-access.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/action-diagnostics.d.ts +8 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/action-diagnostics.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/action-diagnostics.js +136 -19
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/action-diagnostics.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/action-outcome.d.ts +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/action-outcome.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/action-outcome.js +36 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/action-outcome.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/analyze-video-tool.d.ts +49 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/analyze-video-tool.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/analyze-video-tool.js +387 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/analyze-video-tool.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-protocol.d.ts +59 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-protocol.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-protocol.js +180 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-protocol.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/app-server-requests.d.ts +6 -3
- 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 +35 -10
- 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 +3 -4
- 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 +9 -15
- 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/ask-grok-tool.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/ask-grok-tool.js +77 -11
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/ask-grok-tool.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/command-family.d.ts +21 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/command-family.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/command-family.js +213 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/command-family.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tool-catalog.d.ts +3320 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tool-catalog.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tool-catalog.js +1403 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tool-catalog.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/analyze-video.d.ts +50 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/analyze-video.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/analyze-video.js +79 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/analyze-video.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/ask-grok.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/ask-grok.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/ask-grok.js +2 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/ask-grok.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.d.ts +15 -32
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.js +11 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/assistant-style.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation-model-input-schema.d.ts +4 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation-model-input-schema.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation-model-input-schema.js +153 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation-model-input-schema.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation.d.ts +29 -150
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation.js +537 -109
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/automation.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/clinical-records.js +4 -4
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/clinical-records.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/connected-apps.d.ts +10 -54
- 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 +134 -109
- 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/device.d.ts +6 -13
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/device.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/device.js +44 -10
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/device.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/dynamic-tool-wrapper.d.ts +8 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/dynamic-tool-wrapper.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/dynamic-tool-wrapper.js +2 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/dynamic-tool-wrapper.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-song.d.ts +9 -2
- 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 +31 -3
- 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 +7 -6
- 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/generate-voice-memo.js +12 -8
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/generate-voice-memo.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/group-room-model.d.ts +10 -19
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/group-room-model.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/group-room-model.js +19 -7
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/group-room-model.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/labs.d.ts +2 -16
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/labs.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/labs.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/labs.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/member-memory.d.ts +60 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/member-memory.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/member-memory.js +91 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/member-memory.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/pending-vault-files.d.ts +65 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/pending-vault-files.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/pending-vault-files.js +214 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/pending-vault-files.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/phone-calls.d.ts +24 -16
- 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 +78 -7
- 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/physical-notes.d.ts +131 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/physical-notes.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/physical-notes.js +275 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools/physical-notes.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/dynamic-tools.d.ts +131 -2427
- 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 +2505 -1575
- 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.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/failures.js +39 -95
- 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 +5 -2
- 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 +88 -101
- 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 +58 -13
- 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 +85 -122
- 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.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/image-reference-resolver.js +5 -3
- 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/images.d.ts +15 -2
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/images.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/images.js +99 -8
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/images.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/managed-voice-memo-runtime.d.ts +17 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/managed-voice-memo-runtime.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/managed-voice-memo-runtime.js +12 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/managed-voice-memo-runtime.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.d.ts +7 -11
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/openai-image-generation.js +237 -52
- 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/response-card-validation-feedback.d.ts +3 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/response-card-validation-feedback.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/response-card-validation-feedback.js +5 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/response-card-validation-feedback.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/workout-delivery-context.d.ts +19 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/workout-delivery-context.d.ts.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/workout-delivery-context.js +203 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex/workout-delivery-context.js.map +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex-events.js +189 -486
- 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 +42 -6
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.js +1196 -339
- package/node_modules/@murphai/assistant-engine/dist/assistant-codex.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime-residue.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime-residue.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime-residue.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime-residue.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime.d.ts +2 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime.js +1 -0
- package/node_modules/@murphai/assistant-engine/dist/assistant-runtime.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.d.ts +24 -24
- 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 +27 -27
- package/node_modules/@murphai/assistant-engine/dist/assistant-skill-assets.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/attachment-prompt-contracts.d.ts +27 -27
- package/node_modules/@murphai/assistant-engine/dist/attachment-prompt-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/attachment-prompt-contracts.js +1 -1
- package/node_modules/@murphai/assistant-engine/dist/attachment-prompt-contracts.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/index.d.ts +9 -3
- package/node_modules/@murphai/assistant-engine/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/index.js +7 -1
- package/node_modules/@murphai/assistant-engine/dist/index.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/knowledge/documents.d.ts +1 -1
- package/node_modules/@murphai/assistant-engine/dist/knowledge/documents.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/knowledge/documents.js +5 -1
- package/node_modules/@murphai/assistant-engine/dist/knowledge/documents.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/knowledge/service.d.ts +1 -0
- package/node_modules/@murphai/assistant-engine/dist/knowledge/service.d.ts.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/knowledge/service.js +16 -2
- package/node_modules/@murphai/assistant-engine/dist/knowledge/service.js.map +1 -1
- package/node_modules/@murphai/assistant-engine/dist/outbound-channel.d.ts +5 -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/skills/README.md +29 -0
- package/node_modules/@murphai/assistant-engine/skills/appointment-scheduling/SKILL.md +23 -0
- package/node_modules/@murphai/assistant-engine/skills/automatic-meal-capture/SKILL.md +180 -12
- package/node_modules/@murphai/assistant-engine/skills/behavior-followthrough/SKILL.md +155 -116
- package/node_modules/@murphai/assistant-engine/skills/body-composition/SKILL.md +137 -27
- package/node_modules/@murphai/assistant-engine/skills/body-composition/references/evidence.md +150 -0
- package/node_modules/@murphai/assistant-engine/skills/body-composition/references/fat-loss.md +132 -0
- package/node_modules/@murphai/assistant-engine/skills/body-composition/references/muscle-gain.md +135 -0
- package/node_modules/@murphai/assistant-engine/skills/body-composition/references/safety.md +171 -0
- package/node_modules/@murphai/assistant-engine/skills/body-composition/references/tracking-and-adjustment.md +193 -0
- package/node_modules/@murphai/assistant-engine/skills/cardiometabolic-health/SKILL.md +10 -1
- package/node_modules/@murphai/assistant-engine/skills/computer-use/SKILL.md +0 -4
- package/node_modules/@murphai/assistant-engine/skills/connected-apps/SKILL.md +86 -12
- package/node_modules/@murphai/assistant-engine/skills/connected-apps/references/provider-data-exports.md +209 -0
- package/node_modules/@murphai/assistant-engine/skills/daily-activity/SKILL.md +27 -4
- package/node_modules/@murphai/assistant-engine/skills/experiment-onboarding/SKILL.md +22 -9
- package/node_modules/@murphai/assistant-engine/skills/food-journal/SKILL.md +200 -14
- package/node_modules/@murphai/assistant-engine/skills/group-challenge/SKILL.md +17 -737
- package/node_modules/@murphai/assistant-engine/skills/group-challenge-scorecards/SKILL.md +17 -328
- package/node_modules/@murphai/assistant-engine/skills/group-chat/SKILL.md +18 -912
- package/node_modules/@murphai/assistant-engine/skills/group-newsletter/SKILL.md +16 -237
- package/node_modules/@murphai/assistant-engine/skills/groupchat-comedy/SKILL.md +19 -351
- package/node_modules/@murphai/assistant-engine/skills/hosted-low-usage/SKILL.md +310 -118
- package/node_modules/@murphai/assistant-engine/skills/micronutrients-supplements/SKILL.md +30 -8
- package/node_modules/@murphai/assistant-engine/skills/mobility-posture/SKILL.md +1 -1
- package/node_modules/@murphai/assistant-engine/skills/murph-family/SKILL.md +91 -26
- package/node_modules/@murphai/assistant-engine/skills/murph-onboarding/SKILL.md +75 -751
- package/node_modules/@murphai/assistant-engine/skills/murph-onboarding/references/aspiration-foundation-delegation.md +443 -0
- package/node_modules/@murphai/assistant-engine/skills/murph-onboarding/references/persistence-recovery-follow-up.md +155 -0
- package/node_modules/@murphai/assistant-engine/skills/murph-onboarding/references/return-launch-completion.md +246 -0
- package/node_modules/@murphai/assistant-engine/skills/music-generation/SKILL.md +31 -163
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/SKILL.md +84 -7
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/daily-nutrition-card-goals.md +313 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/named-diets/carnivore-animal-based.md +145 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/named-diets/dash.md +183 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/named-diets/intermittent-fasting.md +153 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/named-diets/ketogenic.md +149 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/named-diets/low-carbohydrate.md +167 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/named-diets/mediterranean.md +141 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/named-diets/vegan-plant-based.md +175 -0
- package/node_modules/@murphai/assistant-engine/skills/nutrition-strategy/references/named-diets/vegetarian-spectrum.md +131 -0
- package/node_modules/@murphai/assistant-engine/skills/phone-calls/SKILL.md +47 -67
- package/node_modules/@murphai/assistant-engine/skills/physical-notes/SKILL.md +167 -0
- package/node_modules/@murphai/assistant-engine/skills/physical-therapy/SKILL.md +4 -2
- package/node_modules/@murphai/assistant-engine/skills/self-management-experiments/SKILL.md +19 -3
- package/node_modules/@murphai/assistant-engine/skills/shared/exercise-catalog-runtime.md +36 -19
- package/node_modules/@murphai/assistant-engine/skills/signup-link/SKILL.md +30 -0
- package/node_modules/@murphai/assistant-engine/skills/strength-training/SKILL.md +17 -1
- package/node_modules/@murphai/assistant-engine/skills/tracked-table/SKILL.md +292 -0
- package/node_modules/@murphai/assistant-engine/skills/workout-csv-import/SKILL.md +129 -0
- package/node_modules/@murphai/assistantd/dist/client.d.ts +2 -0
- package/node_modules/@murphai/assistantd/dist/client.d.ts.map +1 -1
- package/node_modules/@murphai/assistantd/dist/client.js +33 -0
- package/node_modules/@murphai/assistantd/dist/client.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 +25 -1
- package/node_modules/@murphai/assistantd/dist/http-protocol.js.map +1 -1
- package/node_modules/@murphai/clinical-records/dist/index.d.ts +660 -660
- package/node_modules/@murphai/clinical-records/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/clinical-records/dist/index.js +1 -1
- package/node_modules/@murphai/clinical-records/dist/index.js.map +1 -1
- package/node_modules/@murphai/core/dist/automation-availability.d.ts +51 -0
- package/node_modules/@murphai/core/dist/automation-availability.d.ts.map +1 -0
- package/node_modules/@murphai/core/dist/automation-availability.js +226 -0
- package/node_modules/@murphai/core/dist/automation-availability.js.map +1 -0
- package/node_modules/@murphai/core/dist/automation.d.ts +9 -2
- package/node_modules/@murphai/core/dist/automation.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/automation.js +121 -19
- package/node_modules/@murphai/core/dist/automation.js.map +1 -1
- package/node_modules/@murphai/core/dist/bank/habitat.d.ts +2 -0
- package/node_modules/@murphai/core/dist/bank/habitat.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/bank/habitat.js +35 -1
- package/node_modules/@murphai/core/dist/bank/habitat.js.map +1 -1
- package/node_modules/@murphai/core/dist/bank/regimens.js +1 -1
- package/node_modules/@murphai/core/dist/bank/regimens.js.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/attachment-backed.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/attachment-backed.js +9 -123
- 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 +33 -0
- package/node_modules/@murphai/core/dist/domains/events/capture-lookup.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/capture-lookup.js +119 -0
- package/node_modules/@murphai/core/dist/domains/events/capture-lookup.js.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events/generated-image-capture-retention.d.ts +24 -0
- package/node_modules/@murphai/core/dist/domains/events/generated-image-capture-retention.d.ts.map +1 -0
- package/node_modules/@murphai/core/dist/domains/events/generated-image-capture-retention.js +409 -0
- package/node_modules/@murphai/core/dist/domains/events/generated-image-capture-retention.js.map +1 -0
- package/node_modules/@murphai/core/dist/domains/events/ledger.d.ts +34 -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 +188 -15
- package/node_modules/@murphai/core/dist/domains/events/ledger.js.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events.d.ts +6 -2
- package/node_modules/@murphai/core/dist/domains/events.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/domains/events.js +3 -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 +5 -1
- package/node_modules/@murphai/core/dist/domains/experiments.js.map +1 -1
- package/node_modules/@murphai/core/dist/history/api.d.ts +8 -5
- package/node_modules/@murphai/core/dist/history/api.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/history/api.js +268 -20
- package/node_modules/@murphai/core/dist/history/api.js.map +1 -1
- package/node_modules/@murphai/core/dist/index.d.ts +11 -6
- package/node_modules/@murphai/core/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/index.js +8 -4
- package/node_modules/@murphai/core/dist/index.js.map +1 -1
- package/node_modules/@murphai/core/dist/memory.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/memory.js +1 -0
- package/node_modules/@murphai/core/dist/memory.js.map +1 -1
- package/node_modules/@murphai/core/dist/mutations.d.ts +45 -4
- package/node_modules/@murphai/core/dist/mutations.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/mutations.js +2204 -97
- package/node_modules/@murphai/core/dist/mutations.js.map +1 -1
- package/node_modules/@murphai/core/dist/operations/index.d.ts +1 -1
- package/node_modules/@murphai/core/dist/operations/index.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/operations/index.js +1 -1
- package/node_modules/@murphai/core/dist/operations/index.js.map +1 -1
- package/node_modules/@murphai/core/dist/operations/write-batch.d.ts +5 -0
- package/node_modules/@murphai/core/dist/operations/write-batch.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/operations/write-batch.js +40 -2
- package/node_modules/@murphai/core/dist/operations/write-batch.js.map +1 -1
- package/node_modules/@murphai/core/dist/protocols.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/protocols.js +52 -9
- package/node_modules/@murphai/core/dist/protocols.js.map +1 -1
- package/node_modules/@murphai/core/dist/public-mutations.d.ts +3 -2
- package/node_modules/@murphai/core/dist/public-mutations.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/public-mutations.js +9 -4
- package/node_modules/@murphai/core/dist/public-mutations.js.map +1 -1
- package/node_modules/@murphai/core/dist/scheduled-logs.d.ts +3 -0
- package/node_modules/@murphai/core/dist/scheduled-logs.d.ts.map +1 -1
- package/node_modules/@murphai/core/dist/scheduled-logs.js +65 -29
- package/node_modules/@murphai/core/dist/scheduled-logs.js.map +1 -1
- package/node_modules/@murphai/device-syncd/README.md +237 -0
- package/node_modules/@murphai/device-syncd/dist/client.d.ts +15 -0
- package/node_modules/@murphai/device-syncd/dist/client.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/client.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/connect-routes.d.ts +29 -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 +78 -2
- package/node_modules/@murphai/device-syncd/dist/config/connect-routes.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/connect-targets.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/connect-targets.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.d.ts +2 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.js +2 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-client-config.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-config.d.ts +1 -0
- package/node_modules/@murphai/device-syncd/dist/config/junction-config.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-config.js +9 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-config.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/junction-connect-sources.js +2 -2
- package/node_modules/@murphai/device-syncd/dist/config/junction-connect-sources.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-configs.d.ts +2 -2
- 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 +2 -2
- 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 +4 -2
- 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 +6 -0
- package/node_modules/@murphai/device-syncd/dist/config/provider-env.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.d.ts +614 -0
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/provider-manifests.js +216 -148
- 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 +11 -0
- 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 +2 -2
- 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.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config/serializable-provider-configs.js +2 -0
- 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 +1 -1
- package/node_modules/@murphai/device-syncd/dist/config.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/config.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/config.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.d.ts +1 -1
- package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/configured-provider-runtime-descriptors.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.d.ts +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/connect-config.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/fitbit-migration.d.ts +57 -0
- package/node_modules/@murphai/device-syncd/dist/fitbit-migration.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/fitbit-migration.js +166 -0
- package/node_modules/@murphai/device-syncd/dist/fitbit-migration.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/hosted-runtime.d.ts +87 -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 +296 -6
- package/node_modules/@murphai/device-syncd/dist/hosted-runtime.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/index.d.ts +1 -1
- 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 +27 -0
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.js +464 -9
- package/node_modules/@murphai/device-syncd/dist/junction-historical-backfill-progress.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-inline-authority.d.ts +17 -2
- package/node_modules/@murphai/device-syncd/dist/junction-inline-authority.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-inline-authority.js +99 -40
- package/node_modules/@murphai/device-syncd/dist/junction-inline-authority.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-resources.d.ts +16 -0
- package/node_modules/@murphai/device-syncd/dist/junction-resources.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-resources.js +32 -0
- package/node_modules/@murphai/device-syncd/dist/junction-resources.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/junction-source-reconnect.d.ts +17 -0
- package/node_modules/@murphai/device-syncd/dist/junction-source-reconnect.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/junction-source-reconnect.js +45 -0
- package/node_modules/@murphai/device-syncd/dist/junction-source-reconnect.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/junction-timeseries-progress.d.ts +15 -0
- package/node_modules/@murphai/device-syncd/dist/junction-timeseries-progress.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/junction-timeseries-progress.js +24 -0
- package/node_modules/@murphai/device-syncd/dist/junction-timeseries-progress.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/prepared-webhook.d.ts +29 -0
- package/node_modules/@murphai/device-syncd/dist/prepared-webhook.d.ts.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/prepared-webhook.js +263 -0
- package/node_modules/@murphai/device-syncd/dist/prepared-webhook.js.map +1 -0
- package/node_modules/@murphai/device-syncd/dist/provider-configs.d.ts +1 -1
- package/node_modules/@murphai/device-syncd/dist/provider-configs.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/provider-configs.js +1 -1
- package/node_modules/@murphai/device-syncd/dist/provider-configs.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/provider-label.d.ts +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 +4 -2
- 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 +30 -1
- 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 +1005 -193
- package/node_modules/@murphai/device-syncd/dist/providers/junction-client.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction.d.ts +11 -2
- package/node_modules/@murphai/device-syncd/dist/providers/junction.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/junction.js +5033 -310
- package/node_modules/@murphai/device-syncd/dist/providers/junction.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/oura.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/oura.js +2 -1
- package/node_modules/@murphai/device-syncd/dist/providers/oura.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/shared-oauth.d.ts +12 -3
- package/node_modules/@murphai/device-syncd/dist/providers/shared-oauth.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/shared-oauth.js +50 -12
- package/node_modules/@murphai/device-syncd/dist/providers/shared-oauth.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/strava.d.ts +3 -1
- package/node_modules/@murphai/device-syncd/dist/providers/strava.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/strava.js +51 -38
- package/node_modules/@murphai/device-syncd/dist/providers/strava.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/whoop.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/providers/whoop.js +11 -1
- package/node_modules/@murphai/device-syncd/dist/providers/whoop.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-account.d.ts +54 -2
- package/node_modules/@murphai/device-syncd/dist/public-account.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-account.js +243 -1
- 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 -2
- package/node_modules/@murphai/device-syncd/dist/public-ingress.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/public-ingress.js +634 -199
- package/node_modules/@murphai/device-syncd/dist/public-ingress.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/service.d.ts +21 -4
- package/node_modules/@murphai/device-syncd/dist/service.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/service.js +728 -68
- package/node_modules/@murphai/device-syncd/dist/service.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/source-staleness.d.ts +15 -0
- package/node_modules/@murphai/device-syncd/dist/source-staleness.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/source-staleness.js +25 -1
- package/node_modules/@murphai/device-syncd/dist/source-staleness.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/accounts.d.ts +3 -1
- package/node_modules/@murphai/device-syncd/dist/store/accounts.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/accounts.js +25 -2
- 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.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/hosted-account-hydration.js +7 -1
- 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 +22 -3
- package/node_modules/@murphai/device-syncd/dist/store/jobs.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/jobs.js +266 -21
- 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 +3 -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 +62 -4
- 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 +25 -3
- package/node_modules/@murphai/device-syncd/dist/store/schema.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/sources.d.ts +25 -2
- package/node_modules/@murphai/device-syncd/dist/store/sources.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/sources.js +268 -58
- package/node_modules/@murphai/device-syncd/dist/store/sources.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/sync-state.d.ts +7 -2
- 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 +82 -28
- package/node_modules/@murphai/device-syncd/dist/store/sync-state.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store/webhook-traces.js +2 -2
- package/node_modules/@murphai/device-syncd/dist/store/webhook-traces.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store.d.ts +30 -5
- package/node_modules/@murphai/device-syncd/dist/store.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/store.js +146 -13
- package/node_modules/@murphai/device-syncd/dist/store.js.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/types.d.ts +260 -8
- package/node_modules/@murphai/device-syncd/dist/types.d.ts.map +1 -1
- package/node_modules/@murphai/device-syncd/dist/types.js +7 -0
- package/node_modules/@murphai/device-syncd/dist/types.js.map +1 -1
- package/node_modules/@murphai/device-syncd/package.json +16 -0
- package/node_modules/@murphai/health-commons/content/biomarkers/bilirubin.md +18 -0
- package/node_modules/@murphai/health-commons/content/biomarkers/carbon-dioxide.md +18 -0
- package/node_modules/@murphai/health-commons/content/biomarkers/potassium.md +18 -0
- package/node_modules/@murphai/health-commons/content/biomarkers/sodium.md +18 -0
- package/node_modules/@murphai/health-commons/content/families/general-eye-health.md +190 -0
- package/node_modules/@murphai/health-commons/content/families/photobiomodulation.md +97 -0
- package/node_modules/@murphai/health-commons/content/families/recovery-modalities.md +73 -0
- package/node_modules/@murphai/health-commons/content/protocols/whole-body-photobiomodulation/whole-body-red-and-near-infrared-light-exposure.md +1 -1
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/cdc-contact-lens-infection-symptoms.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/cdc-contact-lens-prevention.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/cdc-stroke-signs.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/cochrane-blue-light-filtering-lenses.md +21 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/fda-buying-contact-lenses.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/fda-eye-drops.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/imi-myopia-interventions.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/medlineplus-eye-emergencies.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/medlineplus-eye-pain.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/nei-angle-closure-glaucoma.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/nei-areds2-faq.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/nei-contact-lenses.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/nei-dry-eye.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/nei-healthy-vision.md +21 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/nei-myopia.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/nei-retinal-detachment.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/nih-dream-omega3-dry-eye.md +21 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/osha-computer-monitors.md +20 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/pmc-9840372.md +22 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/pmid-35597519.md +21 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/pmid-36473088.md +21 -0
- package/node_modules/@murphai/health-commons/content/sources/general-eye-health/pmid-37062428.md +21 -0
- package/node_modules/@murphai/health-commons/content/sources/whole-body-photobiomodulation/clinicaltrials-gov-nct07047248-2026-04-23.md +0 -1
- package/node_modules/@murphai/health-commons/dist/biomarker-fallback-ranges.d.ts +3 -0
- package/node_modules/@murphai/health-commons/dist/biomarker-fallback-ranges.d.ts.map +1 -0
- package/node_modules/@murphai/health-commons/dist/biomarker-fallback-ranges.js +2 -0
- package/node_modules/@murphai/health-commons/dist/biomarker-fallback-ranges.js.map +1 -0
- package/node_modules/@murphai/health-commons/dist/biomarker-runtime-artifacts.d.ts +17 -0
- package/node_modules/@murphai/health-commons/dist/biomarker-runtime-artifacts.d.ts.map +1 -0
- package/node_modules/@murphai/health-commons/dist/biomarker-runtime-artifacts.js +16 -0
- package/node_modules/@murphai/health-commons/dist/biomarker-runtime-artifacts.js.map +1 -0
- package/node_modules/@murphai/health-commons/dist/build.d.ts.map +1 -1
- package/node_modules/@murphai/health-commons/dist/build.js +41 -7
- package/node_modules/@murphai/health-commons/dist/build.js.map +1 -1
- package/node_modules/@murphai/health-commons/dist/index.d.ts +1 -0
- package/node_modules/@murphai/health-commons/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/health-commons/dist/index.js +1 -0
- package/node_modules/@murphai/health-commons/dist/index.js.map +1 -1
- package/node_modules/@murphai/health-commons/dist/knowledge-index.d.ts +44 -0
- package/node_modules/@murphai/health-commons/dist/knowledge-index.d.ts.map +1 -0
- package/node_modules/@murphai/health-commons/dist/knowledge-index.js +540 -0
- package/node_modules/@murphai/health-commons/dist/knowledge-index.js.map +1 -0
- package/node_modules/@murphai/health-commons/dist/runtime.d.ts +17 -1
- package/node_modules/@murphai/health-commons/dist/runtime.d.ts.map +1 -1
- package/node_modules/@murphai/health-commons/dist/runtime.js +58 -4
- package/node_modules/@murphai/health-commons/dist/runtime.js.map +1 -1
- package/node_modules/@murphai/health-commons/generated/biomarker-desired-directions.json +410 -0
- package/node_modules/@murphai/health-commons/generated/catalog.hash +1 -1
- package/node_modules/@murphai/health-commons/generated/knowledge.sqlite +0 -0
- package/node_modules/@murphai/health-commons/generated/protocol-family-graph.json +187 -46
- package/node_modules/@murphai/health-commons/generated/protocol-index.json +47 -47
- package/node_modules/@murphai/health-commons/generated/protocol-run-specs.json +967 -967
- package/node_modules/@murphai/health-commons/generated/source-artifact-index.json +1 -1
- package/node_modules/@murphai/health-commons/generated/source-identities.ndjson +28 -0
- package/node_modules/@murphai/health-commons/generated/source-index.json +694 -2
- package/node_modules/@murphai/health-commons/generated/web/browse/biomarkers.json +77 -9
- package/node_modules/@murphai/health-commons/generated/web/browse/experiments.json +37 -37
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/absolute-basophils.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/absolute-eosinophils.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/absolute-immature-granulocytes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/absolute-lymphocytes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/absolute-monocytes.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/absolute-neutrophils.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/adjusted-calcium.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/albumin-globulin-ratio.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/albumin.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/alkaline-phosphatase.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ana-screen.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/anion-gap.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/arachidonic-acid-epa-ratio.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/arachidonic-acid.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/basophil-percentage.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/bedtime-delay.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/bilirubin.json +3 -3
- 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/bun-creatinine-ratio.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/c-peptide.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/calcium.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/carbon-dioxide.json +3 -3
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/chloride.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/cholesterol-hdl-ratio.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/cortisol.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 +4 -4
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/dha.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/dhea-sulfate.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/dpa.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/egfr-ckd-epi.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/eosinophil-percentage.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/epa.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/estradiol.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/ferritin.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/fib4.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/follicle-stimulating-hormone.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/free-t3.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/free-t4.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/free-testosterone.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/gfr-mdrd-af-amer.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/gfr-mdrd-non-af-amer.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ggt.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/hba1c.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/hematocrit.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hemoglobin.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/homocysteine.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hrv-rmssd.json +4 -4
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/hs-crp.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/immature-granulocyte-percentage.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/insulin.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/iron-saturation.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/iron.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/ldh.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-calculated.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-chol-calc-nih.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/ldl-large-particles.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-medium-particles.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-particle-number.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-pattern.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-peak-size.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/ldl-small-particles.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lead.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/linoleic-acid.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lipoprotein-a.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/luteinizing-hormone.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/lymphocyte-percentage.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/magnesium-rbc.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/mean-corpuscular-hemoglobin-concentration.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/mean-corpuscular-hemoglobin.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/mean-corpuscular-volume.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/mean-platelet-volume.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/mercury.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/methylmalonic-acid.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/monocyte-percentage.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/neutrophil-percentage.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/omega-3-total-omegacheck.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/omega-6-3-ratio.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/omega-6-total.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/omegacheck-total.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/phosphate.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/platelet-count.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/poc-troponin-i.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/potassium.json +3 -3
- 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/prolactin.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/psa-free.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/psa-percent-free.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/psa-total.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/red-blood-cell-count.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/red-cell-distribution-width.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 +4 -4
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/rheumatoid-factor.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/sex-hormone-binding-globulin.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 +4 -4
- 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/sodium.json +3 -3
- 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/thyroglobulin-antibodies.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/thyroid-peroxidase-antibodies.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/thyroid-stimulating-hormone.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-globulin.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/total-iron-binding-capacity.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/total-protein.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/total-testosterone.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/urine-albumin-random-without-creatinine.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/urine-protein.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/vldl-cholesterol-calculated.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-after-sleep-onset.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/biomarker/white-blood-cell-count.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/biomarker/zinc.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/bryan-johnson-blueprint.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/daily-step-floor.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/five-minute-tomorrow-list.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/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/pneumatic-compression-pants.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/bundles/protocol_variant/protein-floor-high-protein-intake.json +3 -3
- 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 +7 -8
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/bryan-johnson-blueprint.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/finnish-sauna.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/shell/experiments/five-minute-tomorrow-list.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/protein-floor-high-protein-intake.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 +3 -3
- 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/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/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/five-minute-tomorrow-list/protocol.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/five-minute-tomorrow-list/research.json +1 -1
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/five-minute-tomorrow-list/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/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/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 +3 -3
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/whole-body-red-and-near-infrared-light-exposure/research.json +3 -3
- package/node_modules/@murphai/health-commons/generated/web/tabs/experiments/whole-body-red-and-near-infrared-light-exposure/results-public.json +5 -5
- package/node_modules/@murphai/health-commons/package.json +5 -0
- package/node_modules/@murphai/health-metrics/dist/catalog.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/catalog.js +22 -2
- package/node_modules/@murphai/health-metrics/dist/catalog.js.map +1 -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 +165 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/activity.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/body.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/body.js +69 -2
- package/node_modules/@murphai/health-metrics/dist/definitions/body.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/definitions/physiology.d.ts +55 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/physiology.d.ts.map +1 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/physiology.js +92 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/physiology.js.map +1 -0
- package/node_modules/@murphai/health-metrics/dist/definitions/vitals.d.ts +1 -1
- package/node_modules/@murphai/health-metrics/dist/index.d.ts +1 -0
- package/node_modules/@murphai/health-metrics/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/index.js +1 -0
- package/node_modules/@murphai/health-metrics/dist/index.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/lab-reference-ranges.d.ts +45 -0
- package/node_modules/@murphai/health-metrics/dist/lab-reference-ranges.d.ts.map +1 -0
- package/node_modules/@murphai/health-metrics/dist/lab-reference-ranges.js +502 -0
- package/node_modules/@murphai/health-metrics/dist/lab-reference-ranges.js.map +1 -0
- package/node_modules/@murphai/health-metrics/dist/normalize.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/normalize.js +5 -0
- package/node_modules/@murphai/health-metrics/dist/normalize.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/selectors.d.ts +3 -0
- package/node_modules/@murphai/health-metrics/dist/selectors.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/selectors.js +52 -6
- package/node_modules/@murphai/health-metrics/dist/selectors.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/types.d.ts +1 -0
- package/node_modules/@murphai/health-metrics/dist/types.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-metric-catalog.d.ts +12 -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 +34 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-metric-catalog.js.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.d.ts +79 -0
- package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.d.ts.map +1 -1
- package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.js +19 -0
- package/node_modules/@murphai/health-metrics/dist/wearable-provider-catalog.js.map +1 -1
- package/node_modules/@murphai/importers/README.md +2 -0
- package/node_modules/@murphai/importers/dist/assessment/import-assessment-response.js +1 -1
- package/node_modules/@murphai/importers/dist/assessment/import-assessment-response.js.map +1 -1
- package/node_modules/@murphai/importers/dist/core-port.d.ts +16 -1
- package/node_modules/@murphai/importers/dist/core-port.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/core-port.js.map +1 -1
- package/node_modules/@murphai/importers/dist/create-importers.d.ts +9 -1
- package/node_modules/@murphai/importers/dist/create-importers.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/create-importers.js +12 -2
- package/node_modules/@murphai/importers/dist/create-importers.js.map +1 -1
- package/node_modules/@murphai/importers/dist/csv-sample-import-planner.d.ts +1 -0
- package/node_modules/@murphai/importers/dist/csv-sample-import-planner.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/csv-sample-import-planner.js +1 -1
- package/node_modules/@murphai/importers/dist/csv-sample-import-planner.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.d.ts +17 -3
- package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.js +103 -9
- package/node_modules/@murphai/importers/dist/device-providers/import-device-provider-snapshot.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/index.d.ts +5 -4
- package/node_modules/@murphai/importers/dist/device-providers/index.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/index.js +4 -3
- package/node_modules/@murphai/importers/dist/device-providers/index.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-bounded-features.d.ts +37 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-bounded-features.d.ts.map +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-bounded-features.js +796 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-bounded-features.js.map +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-origin.d.ts +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-origin.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-origin.js +7 -2
- package/node_modules/@murphai/importers/dist/device-providers/junction-origin.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-resources.d.ts +7 -12
- 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 +55 -103
- package/node_modules/@murphai/importers/dist/device-providers/junction-resources.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-features.d.ts +79 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-features.d.ts.map +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-features.js +356 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-features.js.map +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-fidelity.d.ts +285 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-fidelity.d.ts.map +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-fidelity.js +870 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction-timeseries-fidelity.js.map +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/junction.d.ts +111 -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 +4058 -306
- package/node_modules/@murphai/importers/dist/device-providers/junction.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/oura.js +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/oura.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/shared-normalization.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/shared-normalization.js +1 -0
- package/node_modules/@murphai/importers/dist/device-providers/shared-normalization.js.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/types.d.ts +9 -1
- package/node_modules/@murphai/importers/dist/device-providers/types.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/whoop.js +1 -1
- package/node_modules/@murphai/importers/dist/device-providers/whoop.js.map +1 -1
- package/node_modules/@murphai/importers/dist/document-importer.d.ts +1 -0
- package/node_modules/@murphai/importers/dist/document-importer.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/document-importer.js +3 -1
- package/node_modules/@murphai/importers/dist/document-importer.js.map +1 -1
- package/node_modules/@murphai/importers/dist/index.d.ts +3 -2
- package/node_modules/@murphai/importers/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/index.js +2 -1
- package/node_modules/@murphai/importers/dist/index.js.map +1 -1
- package/node_modules/@murphai/importers/dist/meal-importer.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/meal-importer.js +2 -1
- package/node_modules/@murphai/importers/dist/meal-importer.js.map +1 -1
- package/node_modules/@murphai/importers/dist/preset-registry.js +1 -1
- package/node_modules/@murphai/importers/dist/preset-registry.js.map +1 -1
- package/node_modules/@murphai/importers/dist/shared.d.ts +1 -1
- package/node_modules/@murphai/importers/dist/shared.d.ts.map +1 -1
- package/node_modules/@murphai/importers/dist/shared.js +1 -1
- package/node_modules/@murphai/importers/dist/shared.js.map +1 -1
- package/node_modules/@murphai/importers/dist/workout-csv-planner.d.ts +49 -0
- package/node_modules/@murphai/importers/dist/workout-csv-planner.d.ts.map +1 -0
- package/node_modules/@murphai/importers/dist/workout-csv-planner.js +860 -0
- package/node_modules/@murphai/importers/dist/workout-csv-planner.js.map +1 -0
- package/node_modules/@murphai/inbox-services/dist/inbox-app/bootstrap-doctor-strategies.d.ts +2 -5
- package/node_modules/@murphai/inbox-services/dist/inbox-app/bootstrap-doctor-strategies.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/bootstrap-doctor-strategies.js +3 -50
- package/node_modules/@murphai/inbox-services/dist/inbox-app/bootstrap-doctor-strategies.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/bootstrap-doctor.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/bootstrap-doctor.js +9 -11
- 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.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/environment.js +0 -160
- package/node_modules/@murphai/inbox-services/dist/inbox-app/environment.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/runtime.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/runtime.js +2 -4
- package/node_modules/@murphai/inbox-services/dist/inbox-app/runtime.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/sources.d.ts +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/sources.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/sources.js +2 -32
- package/node_modules/@murphai/inbox-services/dist/inbox-app/sources.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/types.d.ts +2 -79
- package/node_modules/@murphai/inbox-services/dist/inbox-app/types.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/types.js +0 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-app/types.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/connectors.d.ts +1 -2
- package/node_modules/@murphai/inbox-services/dist/inbox-services/connectors.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/connectors.js +15 -37
- package/node_modules/@murphai/inbox-services/dist/inbox-services/connectors.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/promotions.d.ts +21 -21
- 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 +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/shared.d.ts +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/shared.d.ts.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/shared.js +0 -1
- package/node_modules/@murphai/inbox-services/dist/inbox-services/shared.js.map +1 -1
- package/node_modules/@murphai/inbox-services/dist/index.d.ts +1 -1
- package/node_modules/@murphai/inbox-services/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/README.md +4 -4
- 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 +56 -5
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize-parsed.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/linq/normalize.js +8 -0
- package/node_modules/@murphai/inboxd/dist/connectors/linq/normalize.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/telegram/normalize.d.ts +1 -0
- package/node_modules/@murphai/inboxd/dist/connectors/telegram/normalize.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/connectors/telegram/normalize.js +1 -0
- package/node_modules/@murphai/inboxd/dist/connectors/telegram/normalize.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/index.d.ts +0 -5
- package/node_modules/@murphai/inboxd/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/index.js +0 -2
- package/node_modules/@murphai/inboxd/dist/index.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/attachment-storage-normalizer.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/attachment-storage-normalizer.js +141 -4
- package/node_modules/@murphai/inboxd/dist/indexing/attachment-storage-normalizer.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/retention.d.ts +6 -0
- package/node_modules/@murphai/inboxd/dist/indexing/retention.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/indexing/retention.js +64 -18
- package/node_modules/@murphai/inboxd/dist/indexing/retention.js.map +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.d.ts +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.d.ts.map +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.js +1 -1
- package/node_modules/@murphai/inboxd/dist/retention.js.map +1 -1
- package/node_modules/@murphai/messaging-ingress/README.md +5 -1
- package/node_modules/@murphai/messaging-ingress/dist/linq-webhook.d.ts +27 -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 +164 -17
- package/node_modules/@murphai/messaging-ingress/dist/linq-webhook.js.map +1 -1
- package/node_modules/@murphai/messaging-ingress/dist/telegram-webhook-payload.d.ts +1 -0
- package/node_modules/@murphai/messaging-ingress/dist/telegram-webhook-payload.d.ts.map +1 -1
- package/node_modules/@murphai/messaging-ingress/dist/telegram-webhook-payload.js +2 -0
- package/node_modules/@murphai/messaging-ingress/dist/telegram-webhook-payload.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/codex-resume-state.d.ts +3 -3
- 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 +1 -1
- 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 +1 -1
- 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 +7 -19
- package/node_modules/@murphai/operator-config/dist/assistant/current-delivery-route.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/hosted-config.d.ts +31 -33
- package/node_modules/@murphai/operator-config/dist/assistant/hosted-config.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/hosted-config.js +5 -8
- package/node_modules/@murphai/operator-config/dist/assistant/hosted-config.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/provider-config.d.ts +1 -15
- package/node_modules/@murphai/operator-config/dist/assistant/provider-config.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/provider-config.js +52 -84
- package/node_modules/@murphai/operator-config/dist/assistant/provider-config.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant/target-runtime.d.ts +31 -48
- 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 +33 -56
- 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 +11 -11
- package/node_modules/@murphai/operator-config/dist/assistant-backend.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant-backend.js +33 -45
- package/node_modules/@murphai/operator-config/dist/assistant-backend.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.d.ts +1714 -1566
- 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 +198 -23
- package/node_modules/@murphai/operator-config/dist/assistant-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/assistant-response-cards.d.ts +468 -0
- package/node_modules/@murphai/operator-config/dist/assistant-response-cards.d.ts.map +1 -0
- package/node_modules/@murphai/operator-config/dist/assistant-response-cards.js +1051 -0
- package/node_modules/@murphai/operator-config/dist/assistant-response-cards.js.map +1 -0
- package/node_modules/@murphai/operator-config/dist/command-helpers.d.ts +4 -2
- package/node_modules/@murphai/operator-config/dist/command-helpers.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/command-helpers.js +36 -1
- package/node_modules/@murphai/operator-config/dist/command-helpers.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-cli-contracts.d.ts +181 -181
- 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 +1 -1
- package/node_modules/@murphai/operator-config/dist/device-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-sync-client.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/device-sync-client.js +2 -6
- package/node_modules/@murphai/operator-config/dist/device-sync-client.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/elevenlabs-runtime.d.ts +3 -0
- package/node_modules/@murphai/operator-config/dist/elevenlabs-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/elevenlabs-runtime.js +301 -63
- package/node_modules/@murphai/operator-config/dist/elevenlabs-runtime.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/hosted-assistant-config-constants.d.ts +3 -2
- 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-constants.js +3 -0
- package/node_modules/@murphai/operator-config/dist/hosted-assistant-config-constants.js.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/hosted-assistant-config.js +2 -6
- package/node_modules/@murphai/operator-config/dist/hosted-assistant-config.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/http-json-retry.d.ts +7 -2
- package/node_modules/@murphai/operator-config/dist/http-json-retry.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/http-json-retry.js +33 -14
- package/node_modules/@murphai/operator-config/dist/http-json-retry.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/inbox-cli-contracts.d.ts +427 -462
- 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 +2 -14
- 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 +35 -1
- package/node_modules/@murphai/operator-config/dist/linq-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/linq-runtime.js +1115 -180
- package/node_modules/@murphai/operator-config/dist/linq-runtime.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/message-formatting.d.ts +1 -0
- package/node_modules/@murphai/operator-config/dist/message-formatting.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/message-formatting.js +3 -1
- package/node_modules/@murphai/operator-config/dist/message-formatting.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/message-table-fallback.d.ts +7 -0
- package/node_modules/@murphai/operator-config/dist/message-table-fallback.d.ts.map +1 -0
- package/node_modules/@murphai/operator-config/dist/message-table-fallback.js +109 -0
- package/node_modules/@murphai/operator-config/dist/message-table-fallback.js.map +1 -0
- package/node_modules/@murphai/operator-config/dist/operator-config/self-delivery-targets.d.ts +12 -12
- 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/self-delivery-targets.js +1 -1
- package/node_modules/@murphai/operator-config/dist/operator-config/self-delivery-targets.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/operator-config.d.ts +50 -53
- package/node_modules/@murphai/operator-config/dist/operator-config.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/operator-config.js +4 -5
- 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 +225 -226
- package/node_modules/@murphai/operator-config/dist/setup-cli-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/setup-cli-contracts.js +2 -2
- package/node_modules/@murphai/operator-config/dist/setup-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/setup-runtime-env.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/setup-runtime-env.js +0 -19
- package/node_modules/@murphai/operator-config/dist/setup-runtime-env.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.d.ts +402 -294
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.js +94 -8
- package/node_modules/@murphai/operator-config/dist/vault-cli-contracts.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-error-projection.d.ts +24 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-error-projection.d.ts.map +1 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-error-projection.js +219 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-error-projection.js.map +1 -0
- package/node_modules/@murphai/operator-config/dist/vault-cli-errors.d.ts.map +1 -1
- package/node_modules/@murphai/operator-config/dist/vault-cli-errors.js.map +1 -1
- package/node_modules/@murphai/operator-config/dist/workout-action-binding.d.ts +14 -0
- package/node_modules/@murphai/operator-config/dist/workout-action-binding.d.ts.map +1 -0
- package/node_modules/@murphai/operator-config/dist/workout-action-binding.js +127 -0
- package/node_modules/@murphai/operator-config/dist/workout-action-binding.js.map +1 -0
- package/node_modules/@murphai/operator-config/package.json +15 -5
- package/node_modules/@murphai/parsers/dist/adapters/ffmpeg.d.ts +2 -0
- package/node_modules/@murphai/parsers/dist/adapters/ffmpeg.d.ts.map +1 -1
- package/node_modules/@murphai/parsers/dist/adapters/ffmpeg.js +18 -0
- package/node_modules/@murphai/parsers/dist/adapters/ffmpeg.js.map +1 -1
- package/node_modules/@murphai/query/README.md +29 -5
- package/node_modules/@murphai/query/dist/automation.d.ts +5 -2
- package/node_modules/@murphai/query/dist/automation.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/automation.js +33 -8
- package/node_modules/@murphai/query/dist/automation.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-biomarkers.d.ts +2 -2
- package/node_modules/@murphai/query/dist/browser-biomarkers.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-biomarkers.js +1 -1
- package/node_modules/@murphai/query/dist/browser-biomarkers.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-experiments.d.ts +2 -2
- package/node_modules/@murphai/query/dist/browser-experiments.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-experiments.js +1 -1
- package/node_modules/@murphai/query/dist/browser-experiments.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-murph-age.d.ts +1 -1
- package/node_modules/@murphai/query/dist/browser-murph-age.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-overview.d.ts +2 -1
- package/node_modules/@murphai/query/dist/browser-overview.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/biomarker-panel.d.ts +2 -2
- package/node_modules/@murphai/query/dist/browser-replica/biomarker-panel.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/build.d.ts +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/build.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/build.js +68 -41
- package/node_modules/@murphai/query/dist/browser-replica/build.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/client-overview.d.ts +3 -3
- package/node_modules/@murphai/query/dist/browser-replica/client-overview.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/client-overview.js +3 -0
- package/node_modules/@murphai/query/dist/browser-replica/client-overview.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/device-metrics.d.ts +2 -2
- package/node_modules/@murphai/query/dist/browser-replica/device-metrics.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/device-metrics.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/experiment-run-cards.d.ts +8 -0
- package/node_modules/@murphai/query/dist/browser-replica/experiment-run-cards.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/experiment-run-cards.js +548 -0
- package/node_modules/@murphai/query/dist/browser-replica/experiment-run-cards.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/experiments.d.ts +22 -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 +209 -63
- package/node_modules/@murphai/query/dist/browser-replica/experiments.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/json.d.ts +6 -0
- package/node_modules/@murphai/query/dist/browser-replica/json.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/json.js +103 -0
- package/node_modules/@murphai/query/dist/browser-replica/json.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/lab-result-status.d.ts +11 -0
- package/node_modules/@murphai/query/dist/browser-replica/lab-result-status.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/lab-result-status.js +233 -0
- package/node_modules/@murphai/query/dist/browser-replica/lab-result-status.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/lab-results.d.ts +4 -3
- package/node_modules/@murphai/query/dist/browser-replica/lab-results.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/lab-results.js +24 -5
- package/node_modules/@murphai/query/dist/browser-replica/lab-results.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/metric-buckets.d.ts +14 -0
- package/node_modules/@murphai/query/dist/browser-replica/metric-buckets.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/metric-buckets.js +25 -0
- package/node_modules/@murphai/query/dist/browser-replica/metric-buckets.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/murph-age.d.ts +2 -2
- 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.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/parse.d.ts +8 -0
- package/node_modules/@murphai/query/dist/browser-replica/parse.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/parse.js +327 -7
- package/node_modules/@murphai/query/dist/browser-replica/parse.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/query.d.ts +24 -1
- package/node_modules/@murphai/query/dist/browser-replica/query.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/query.js +246 -41
- package/node_modules/@murphai/query/dist/browser-replica/query.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/search-row.d.ts +3 -0
- package/node_modules/@murphai/query/dist/browser-replica/search-row.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/search-row.js +16 -0
- package/node_modules/@murphai/query/dist/browser-replica/search-row.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/shards.d.ts +76 -0
- package/node_modules/@murphai/query/dist/browser-replica/shards.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/shards.js +232 -0
- package/node_modules/@murphai/query/dist/browser-replica/shards.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/shared.d.ts +144 -9
- 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/source.d.ts +13 -0
- package/node_modules/@murphai/query/dist/browser-replica/source.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/source.js +45 -0
- package/node_modules/@murphai/query/dist/browser-replica/source.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/tracked-experiments.d.ts +3 -3
- package/node_modules/@murphai/query/dist/browser-replica/tracked-experiments.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/tracked-experiments.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/training.d.ts +7 -0
- package/node_modules/@murphai/query/dist/browser-replica/training.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/training.js +241 -0
- package/node_modules/@murphai/query/dist/browser-replica/training.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica/views.d.ts +5 -5
- package/node_modules/@murphai/query/dist/browser-replica/views.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica/views.js +3 -0
- package/node_modules/@murphai/query/dist/browser-replica/views.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica-client.d.ts +11 -4
- package/node_modules/@murphai/query/dist/browser-replica-client.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica-client.js +7 -3
- package/node_modules/@murphai/query/dist/browser-replica-client.js.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica-server.d.ts +7 -0
- package/node_modules/@murphai/query/dist/browser-replica-server.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica-server.js +7 -0
- package/node_modules/@murphai/query/dist/browser-replica-server.js.map +1 -0
- package/node_modules/@murphai/query/dist/browser-replica.d.ts +13 -5
- package/node_modules/@murphai/query/dist/browser-replica.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/browser-replica.js +9 -4
- 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-observation-metrics.d.ts +16 -0
- package/node_modules/@murphai/query/dist/canonical-observation-metrics.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/canonical-observation-metrics.js +70 -0
- package/node_modules/@murphai/query/dist/canonical-observation-metrics.js.map +1 -0
- package/node_modules/@murphai/query/dist/experiment-adherence.d.ts +20 -0
- package/node_modules/@murphai/query/dist/experiment-adherence.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/experiment-adherence.js +175 -29
- package/node_modules/@murphai/query/dist/experiment-adherence.js.map +1 -1
- package/node_modules/@murphai/query/dist/experiment-progress-card.d.ts +1 -0
- package/node_modules/@murphai/query/dist/experiment-progress-card.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/experiment-progress-card.js +1 -0
- package/node_modules/@murphai/query/dist/experiment-progress-card.js.map +1 -1
- package/node_modules/@murphai/query/dist/experiments.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/experiments.js +46 -22
- package/node_modules/@murphai/query/dist/experiments.js.map +1 -1
- package/node_modules/@murphai/query/dist/group-weekly.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/group-weekly.js +52 -1
- package/node_modules/@murphai/query/dist/group-weekly.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/blood-tests.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/blood-tests.js +3 -2
- package/node_modules/@murphai/query/dist/health/blood-tests.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.d.ts +11 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/canonical-collector.js +39 -16
- package/node_modules/@murphai/query/dist/health/canonical-collector.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/entity-slices.d.ts +9 -3
- package/node_modules/@murphai/query/dist/health/entity-slices.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/entity-slices.js +6 -6
- package/node_modules/@murphai/query/dist/health/entity-slices.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/immunizations.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/immunizations.js +14 -11
- package/node_modules/@murphai/query/dist/health/immunizations.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/loaders.d.ts +21 -7
- package/node_modules/@murphai/query/dist/health/loaders.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/loaders.js +53 -15
- package/node_modules/@murphai/query/dist/health/loaders.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/registries.d.ts +1 -0
- package/node_modules/@murphai/query/dist/health/registries.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/health/registries.js.map +1 -1
- package/node_modules/@murphai/query/dist/health/shared.js +1 -1
- package/node_modules/@murphai/query/dist/health/shared.js.map +1 -1
- package/node_modules/@murphai/query/dist/index.d.ts +25 -7
- package/node_modules/@murphai/query/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/index.js +18 -6
- package/node_modules/@murphai/query/dist/index.js.map +1 -1
- package/node_modules/@murphai/query/dist/knowledge-contracts.d.ts +78 -75
- package/node_modules/@murphai/query/dist/knowledge-contracts.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/knowledge-contracts.js +2 -1
- package/node_modules/@murphai/query/dist/knowledge-contracts.js.map +1 -1
- package/node_modules/@murphai/query/dist/knowledge-graph.d.ts +1 -0
- package/node_modules/@murphai/query/dist/knowledge-graph.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/knowledge-graph.js +17 -1
- package/node_modules/@murphai/query/dist/knowledge-graph.js.map +1 -1
- package/node_modules/@murphai/query/dist/meal-nutrition.d.ts +27 -1
- package/node_modules/@murphai/query/dist/meal-nutrition.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/meal-nutrition.js +120 -7
- package/node_modules/@murphai/query/dist/meal-nutrition.js.map +1 -1
- package/node_modules/@murphai/query/dist/metrics/index.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/metrics/index.js +14 -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 +123 -3
- package/node_modules/@murphai/query/dist/metrics/projection.js.map +1 -1
- package/node_modules/@murphai/query/dist/murph-age.d.ts +5 -1
- package/node_modules/@murphai/query/dist/murph-age.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/murph-age.js +22 -8
- package/node_modules/@murphai/query/dist/murph-age.js.map +1 -1
- package/node_modules/@murphai/query/dist/personal-patterns.d.ts +55 -0
- package/node_modules/@murphai/query/dist/personal-patterns.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/personal-patterns.js +401 -0
- package/node_modules/@murphai/query/dist/personal-patterns.js.map +1 -0
- package/node_modules/@murphai/query/dist/projection/entity-store.js +4 -4
- package/node_modules/@murphai/query/dist/projection/entity-store.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/schema.d.ts +1 -1
- package/node_modules/@murphai/query/dist/projection/schema.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/projection/schema.js +5 -1
- package/node_modules/@murphai/query/dist/projection/schema.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-compose.js +8 -0
- package/node_modules/@murphai/query/dist/projection/wearable-summary-compose.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-projector.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-projector.js +6 -2
- package/node_modules/@murphai/query/dist/projection/wearable-summary-projector.js.map +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-stored-codec.js +1 -1
- package/node_modules/@murphai/query/dist/projection/wearable-summary-stored-codec.js.map +1 -1
- package/node_modules/@murphai/query/dist/query-projection.d.ts +14 -0
- package/node_modules/@murphai/query/dist/query-projection.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/query-projection.js +31 -0
- package/node_modules/@murphai/query/dist/query-projection.js.map +1 -1
- package/node_modules/@murphai/query/dist/query-visibility.d.ts +5 -0
- package/node_modules/@murphai/query/dist/query-visibility.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/query-visibility.js +11 -5
- package/node_modules/@murphai/query/dist/query-visibility.js.map +1 -1
- package/node_modules/@murphai/query/dist/read-model.d.ts +8 -0
- package/node_modules/@murphai/query/dist/read-model.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/read-model.js +11 -1
- package/node_modules/@murphai/query/dist/read-model.js.map +1 -1
- package/node_modules/@murphai/query/dist/scheduled-logs.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/scheduled-logs.js +55 -79
- package/node_modules/@murphai/query/dist/scheduled-logs.js.map +1 -1
- package/node_modules/@murphai/query/dist/vault-source.d.ts +22 -4
- package/node_modules/@murphai/query/dist/vault-source.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/vault-source.js +188 -59
- package/node_modules/@murphai/query/dist/vault-source.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/candidates.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/candidates.js +32 -15
- package/node_modules/@murphai/query/dist/wearables/candidates.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/public-output.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/public-output.js +43 -2
- package/node_modules/@murphai/query/dist/wearables/public-output.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/sleep-pattern.d.ts +5 -1
- package/node_modules/@murphai/query/dist/wearables/sleep-pattern.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/sleep-pattern.js +16 -3
- package/node_modules/@murphai/query/dist/wearables/sleep-pattern.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/source-health.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/source-health.js +31 -4
- package/node_modules/@murphai/query/dist/wearables/source-health.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/types.d.ts +54 -4
- package/node_modules/@murphai/query/dist/wearables/types.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/types.js +36 -0
- package/node_modules/@murphai/query/dist/wearables/types.js.map +1 -1
- package/node_modules/@murphai/query/dist/wearables/workout-features.d.ts +5 -0
- package/node_modules/@murphai/query/dist/wearables/workout-features.d.ts.map +1 -0
- package/node_modules/@murphai/query/dist/wearables/workout-features.js +179 -0
- package/node_modules/@murphai/query/dist/wearables/workout-features.js.map +1 -0
- package/node_modules/@murphai/query/dist/wearables.d.ts.map +1 -1
- package/node_modules/@murphai/query/dist/wearables.js +74 -6
- package/node_modules/@murphai/query/dist/wearables.js.map +1 -1
- package/node_modules/@murphai/query/package.json +15 -0
- package/node_modules/@murphai/runtime-state/README.md +3 -3
- package/node_modules/@murphai/runtime-state/dist/assistant-local-state-descriptors.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/assistant-local-state-descriptors.js +15 -2
- package/node_modules/@murphai/runtime-state/dist/assistant-local-state-descriptors.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/assistant-runtime-issues.d.ts +4 -0
- package/node_modules/@murphai/runtime-state/dist/assistant-runtime-issues.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/assistant-runtime-issues.js +16 -3
- package/node_modules/@murphai/runtime-state/dist/assistant-runtime-issues.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-bundles.d.ts +2 -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 +76 -20
- package/node_modules/@murphai/runtime-state/dist/hosted-bundles.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-crypto-keyrings.d.ts +32 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-crypto-keyrings.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-crypto-keyrings.js +327 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-crypto-keyrings.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-domain-crypto.d.ts +3 -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 +23 -3
- 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 +5 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-email.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/hosted-email.js +10 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-email.js.map +1 -1
- package/node_modules/@murphai/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 +1 -0
- package/node_modules/@murphai/runtime-state/dist/hosted-storage.js.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/sqlite.d.ts.map +1 -1
- package/node_modules/@murphai/runtime-state/dist/sqlite.js +22 -6
- package/node_modules/@murphai/runtime-state/dist/sqlite.js.map +1 -1
- package/node_modules/@murphai/setup-cli/README.md +1 -1
- package/node_modules/@murphai/setup-cli/dist/incur-error-bridge.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/incur-error-bridge.js +6 -15
- package/node_modules/@murphai/setup-cli/dist/incur-error-bridge.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/index.d.ts +0 -1
- package/node_modules/@murphai/setup-cli/dist/index.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/index.js +0 -1
- package/node_modules/@murphai/setup-cli/dist/index.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-assistant-account.js +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.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-assistant-defaults.js +14 -24
- package/node_modules/@murphai/setup-cli/dist/setup-assistant-defaults.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-assistant.js +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 +1 -2
- package/node_modules/@murphai/setup-cli/dist/setup-cli.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-cli.js +2 -4
- package/node_modules/@murphai/setup-cli/dist/setup-cli.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-services/channels.d.ts +0 -4
- package/node_modules/@murphai/setup-cli/dist/setup-services/channels.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-services/channels.js +126 -420
- package/node_modules/@murphai/setup-cli/dist/setup-services/channels.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-services.d.ts +0 -3
- package/node_modules/@murphai/setup-cli/dist/setup-services.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-services.js +0 -7
- package/node_modules/@murphai/setup-cli/dist/setup-services.js.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-wizard-options.d.ts.map +1 -1
- package/node_modules/@murphai/setup-cli/dist/setup-wizard-options.js +0 -7
- package/node_modules/@murphai/setup-cli/dist/setup-wizard-options.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/README.md +9 -0
- package/node_modules/@murphai/vault-usecases/dist/clinical-records.js +1 -1
- package/node_modules/@murphai/vault-usecases/dist/clinical-records.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.d.ts +6 -0
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.js +49 -1
- package/node_modules/@murphai/vault-usecases/dist/commands/query-record-command-helpers.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/experiment-onboarding-options.d.ts +3 -3
- package/node_modules/@murphai/vault-usecases/dist/experiment-onboarding-options.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/experiment-onboarding-options.js +1 -1
- package/node_modules/@murphai/vault-usecases/dist/experiment-onboarding-options.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/export-packs.d.ts +7 -0
- package/node_modules/@murphai/vault-usecases/dist/export-packs.d.ts.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/export-packs.js +45 -0
- package/node_modules/@murphai/vault-usecases/dist/export-packs.js.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/health-cli-descriptors.d.ts +28 -28
- package/node_modules/@murphai/vault-usecases/dist/health-cli-descriptors.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/health-cli-descriptors.js +1 -1
- package/node_modules/@murphai/vault-usecases/dist/health-cli-descriptors.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/json-input.d.ts +1 -1
- package/node_modules/@murphai/vault-usecases/dist/json-input.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/json-input.js +1 -1
- package/node_modules/@murphai/vault-usecases/dist/json-input.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/query-runtime.d.ts +5 -1
- package/node_modules/@murphai/vault-usecases/dist/query-runtime.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/query-runtime.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.d.ts +1 -1
- package/node_modules/@murphai/vault-usecases/dist/testing/junction-wearable-fixture.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.d.ts +21 -21
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.js +23 -13
- package/node_modules/@murphai/vault-usecases/dist/usecases/capture.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/clinical-imports.d.ts +193 -193
- 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 +2 -4
- 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 +12 -12
- 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 +25 -19
- 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 +130 -130
- package/node_modules/@murphai/vault-usecases/dist/usecases/encounter.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/encounter.js +2 -4
- package/node_modules/@murphai/vault-usecases/dist/usecases/encounter.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/event-record-mutations.d.ts +9 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/event-record-mutations.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/event-record-mutations.js +78 -5
- package/node_modules/@murphai/vault-usecases/dist/usecases/event-record-mutations.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/exact-event-record.d.ts +20 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/exact-event-record.d.ts.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/exact-event-record.js +72 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/exact-event-record.js.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.d.ts +29 -6
- 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 +267 -46
- package/node_modules/@murphai/vault-usecases/dist/usecases/experiment-journal-vault.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/explicit-health-family-services.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/explicit-health-family-services.js +158 -24
- package/node_modules/@murphai/vault-usecases/dist/usecases/explicit-health-family-services.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/food-autolog.d.ts +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/food-autolog.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/food-autolog.js +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/food-autolog.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/food.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/food.js +98 -6
- package/node_modules/@murphai/vault-usecases/dist/usecases/food.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.js +97 -13
- package/node_modules/@murphai/vault-usecases/dist/usecases/integrated-services.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.js +49 -24
- package/node_modules/@murphai/vault-usecases/dist/usecases/intervention-experiment-link.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.d.ts +95 -13
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.js +149 -14
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement-read.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement.js +3 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/measurement.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.d.ts +4 -4
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.js +19 -12
- package/node_modules/@murphai/vault-usecases/dist/usecases/provider-event.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.d.ts +3 -3
- package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.js +44 -2
- package/node_modules/@murphai/vault-usecases/dist/usecases/recipe.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/runtime.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/runtime.js +2 -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.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.js +1 -3
- package/node_modules/@murphai/vault-usecases/dist/usecases/shared.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/types.d.ts +44 -1
- 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.d.ts +2 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/vault-usecase-helpers.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/vault-usecase-helpers.js +24 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/vault-usecase-helpers.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-core.d.ts +7 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-core.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-core.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-format.d.ts +4 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-format.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-import.d.ts +60 -7
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-import.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-import.js +1282 -494
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-import.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-model.d.ts +116 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-model.d.ts.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-model.js +231 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-model.js.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-state.d.ts +36 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-state.d.ts.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-state.js +287 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live-state.js.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live.d.ts +134 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live.d.ts.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live.js +744 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-live.js.map +1 -0
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-model.d.ts +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-model.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout-model.js +2 -0
- 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 +13 -13
- 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 +22 -19
- 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 +39 -2
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout.js +144 -4
- package/node_modules/@murphai/vault-usecases/dist/usecases/workout.js.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 +3 -0
- package/node_modules/@murphai/vault-usecases/dist/vault-services.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/workouts.d.ts +1 -0
- package/node_modules/@murphai/vault-usecases/dist/workouts.d.ts.map +1 -1
- package/node_modules/@murphai/vault-usecases/dist/workouts.js +1 -0
- package/node_modules/@murphai/vault-usecases/dist/workouts.js.map +1 -1
- package/node_modules/@murphai/vault-usecases/package.json +4 -0
- package/node_modules/incur/dist/Cli.js +7 -32
- package/node_modules/incur/dist/Errors.d.ts +17 -0
- package/node_modules/incur/dist/Errors.js +23 -0
- package/node_modules/incur/dist/internal/command.d.ts +2 -0
- package/node_modules/incur/dist/internal/command.js +2 -6
- package/node_modules/incur/src/Cli.ts +11 -32
- package/node_modules/incur/src/Errors.ts +36 -0
- package/node_modules/incur/src/internal/command.ts +4 -6
- package/node_modules/ink/build/ansi-tokenizer.d.ts +38 -0
- package/node_modules/ink/build/ansi-tokenizer.js +316 -0
- package/node_modules/ink/build/ansi-tokenizer.js.map +1 -0
- package/node_modules/ink/build/apply-styles.js +175 -0
- package/node_modules/ink/build/build-layout.js +77 -0
- package/node_modules/ink/build/calculate-wrapped-text.js +53 -0
- package/node_modules/ink/build/colorize.d.ts +3 -0
- package/node_modules/ink/build/colorize.js +48 -0
- package/node_modules/ink/build/colorize.js.map +1 -0
- package/node_modules/ink/build/components/AccessibilityContext.d.ts +3 -0
- package/node_modules/ink/build/components/AccessibilityContext.js +5 -0
- package/node_modules/ink/build/components/AccessibilityContext.js.map +1 -0
- package/node_modules/ink/build/components/App.d.ts +18 -0
- package/node_modules/ink/build/components/App.js +351 -0
- package/node_modules/ink/build/components/App.js.map +1 -0
- package/node_modules/ink/build/components/AppContext.d.ts +15 -0
- package/node_modules/ink/build/components/AppContext.js +11 -0
- package/node_modules/ink/build/components/AppContext.js.map +1 -0
- package/node_modules/ink/build/components/BackgroundContext.d.ts +4 -0
- package/node_modules/ink/build/components/BackgroundContext.js +3 -0
- package/node_modules/ink/build/components/BackgroundContext.js.map +1 -0
- package/node_modules/ink/build/components/Box.d.ts +117 -0
- package/node_modules/ink/build/components/Box.js +34 -0
- package/node_modules/ink/build/components/Box.js.map +1 -0
- package/node_modules/ink/build/components/Color.js +62 -0
- package/node_modules/ink/build/components/Cursor.d.ts +83 -0
- package/node_modules/ink/build/components/Cursor.js +53 -0
- package/node_modules/ink/build/components/Cursor.js.map +1 -0
- package/node_modules/ink/build/components/CursorContext.d.ts +11 -0
- package/node_modules/ink/build/components/CursorContext.js +8 -0
- package/node_modules/ink/build/components/CursorContext.js.map +1 -0
- package/node_modules/ink/build/components/ErrorBoundary.d.ts +18 -0
- package/node_modules/ink/build/components/ErrorBoundary.js +23 -0
- package/node_modules/ink/build/components/ErrorBoundary.js.map +1 -0
- package/node_modules/ink/build/components/ErrorOverview.d.ts +6 -0
- package/node_modules/ink/build/components/ErrorOverview.js +84 -0
- package/node_modules/ink/build/components/ErrorOverview.js.map +1 -0
- package/node_modules/ink/build/components/FocusContext.d.ts +16 -0
- package/node_modules/ink/build/components/FocusContext.js +17 -0
- package/node_modules/ink/build/components/FocusContext.js.map +1 -0
- package/node_modules/ink/build/components/Newline.d.ts +13 -0
- package/node_modules/ink/build/components/Newline.js +8 -0
- package/node_modules/ink/build/components/Newline.js.map +1 -0
- package/node_modules/ink/build/components/Spacer.d.ts +7 -0
- package/node_modules/ink/build/components/Spacer.js +11 -0
- package/node_modules/ink/build/components/Spacer.js.map +1 -0
- package/node_modules/ink/build/components/Static.d.ts +24 -0
- package/node_modules/ink/build/components/Static.js +28 -0
- package/node_modules/ink/build/components/Static.js.map +1 -0
- package/node_modules/ink/build/components/StderrContext.d.ts +15 -0
- package/node_modules/ink/build/components/StderrContext.js +13 -0
- package/node_modules/ink/build/components/StderrContext.js.map +1 -0
- package/node_modules/ink/build/components/StdinContext.d.ts +22 -0
- package/node_modules/ink/build/components/StdinContext.js +19 -0
- package/node_modules/ink/build/components/StdinContext.js.map +1 -0
- package/node_modules/ink/build/components/StdoutContext.d.ts +15 -0
- package/node_modules/ink/build/components/StdoutContext.js +13 -0
- package/node_modules/ink/build/components/StdoutContext.js.map +1 -0
- package/node_modules/ink/build/components/Text.d.ts +55 -0
- package/node_modules/ink/build/components/Text.js +50 -0
- package/node_modules/ink/build/components/Text.js.map +1 -0
- package/node_modules/ink/build/components/Transform.d.ts +16 -0
- package/node_modules/ink/build/components/Transform.js +15 -0
- package/node_modules/ink/build/components/Transform.js.map +1 -0
- package/node_modules/ink/build/cursor-helpers.d.ts +38 -0
- package/node_modules/ink/build/cursor-helpers.js +56 -0
- package/node_modules/ink/build/cursor-helpers.js.map +1 -0
- package/node_modules/ink/build/devtools-window-polyfill.d.ts +1 -0
- package/node_modules/ink/build/devtools-window-polyfill.js +65 -0
- package/node_modules/ink/build/devtools-window-polyfill.js.map +1 -0
- package/node_modules/ink/build/devtools.d.ts +1 -0
- package/node_modules/ink/build/devtools.js +11 -0
- package/node_modules/ink/build/devtools.js.map +1 -0
- package/node_modules/ink/build/dom.d.ts +56 -0
- package/node_modules/ink/build/dom.js +124 -0
- package/node_modules/ink/build/dom.js.map +1 -0
- package/node_modules/ink/build/experimental/apply-style.js +140 -0
- package/node_modules/ink/build/experimental/dom.js +123 -0
- package/node_modules/ink/build/experimental/output.js +91 -0
- package/node_modules/ink/build/experimental/reconciler.js +141 -0
- package/node_modules/ink/build/experimental/renderer.js +81 -0
- package/node_modules/ink/build/get-max-width.d.ts +3 -0
- package/node_modules/ink/build/get-max-width.js +10 -0
- package/node_modules/ink/build/get-max-width.js.map +1 -0
- package/node_modules/ink/build/hooks/use-app.d.ts +5 -0
- package/node_modules/ink/build/hooks/use-app.js +8 -0
- package/node_modules/ink/build/hooks/use-app.js.map +1 -0
- package/node_modules/ink/build/hooks/use-cursor.d.ts +12 -0
- package/node_modules/ink/build/hooks/use-cursor.js +29 -0
- package/node_modules/ink/build/hooks/use-cursor.js.map +1 -0
- package/node_modules/ink/build/hooks/use-focus-manager.d.ts +28 -0
- package/node_modules/ink/build/hooks/use-focus-manager.js +17 -0
- package/node_modules/ink/build/hooks/use-focus-manager.js.map +1 -0
- package/node_modules/ink/build/hooks/use-focus.d.ts +29 -0
- package/node_modules/ink/build/hooks/use-focus.js +42 -0
- package/node_modules/ink/build/hooks/use-focus.js.map +1 -0
- package/node_modules/ink/build/hooks/use-input.d.ts +131 -0
- package/node_modules/ink/build/hooks/use-input.js +124 -0
- package/node_modules/ink/build/hooks/use-input.js.map +1 -0
- package/node_modules/ink/build/hooks/use-is-screen-reader-enabled.d.ts +5 -0
- package/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js +11 -0
- package/node_modules/ink/build/hooks/use-is-screen-reader-enabled.js.map +1 -0
- package/node_modules/ink/build/hooks/use-stderr.d.ts +5 -0
- package/node_modules/ink/build/hooks/use-stderr.js +8 -0
- package/node_modules/ink/build/hooks/use-stderr.js.map +1 -0
- package/node_modules/ink/build/hooks/use-stdin.d.ts +5 -0
- package/node_modules/ink/build/hooks/use-stdin.js +8 -0
- package/node_modules/ink/build/hooks/use-stdin.js.map +1 -0
- package/node_modules/ink/build/hooks/use-stdout.d.ts +5 -0
- package/node_modules/ink/build/hooks/use-stdout.js +8 -0
- package/node_modules/ink/build/hooks/use-stdout.js.map +1 -0
- package/node_modules/ink/build/hooks/useInput.js +38 -0
- package/node_modules/ink/build/index.d.ts +34 -0
- package/node_modules/ink/build/index.js +20 -0
- package/node_modules/ink/build/index.js.map +1 -0
- package/node_modules/ink/build/ink.d.ts +90 -0
- package/node_modules/ink/build/ink.js +637 -0
- package/node_modules/ink/build/ink.js.map +1 -0
- package/node_modules/ink/build/input-parser.d.ts +7 -0
- package/node_modules/ink/build/input-parser.js +154 -0
- package/node_modules/ink/build/input-parser.js.map +1 -0
- package/node_modules/ink/build/instance.js +205 -0
- package/node_modules/ink/build/instances.d.ts +3 -0
- package/node_modules/ink/build/instances.js +8 -0
- package/node_modules/ink/build/instances.js.map +1 -0
- package/node_modules/ink/build/kitty-keyboard.d.ts +23 -0
- package/node_modules/ink/build/kitty-keyboard.js +32 -0
- package/node_modules/ink/build/kitty-keyboard.js.map +1 -0
- package/node_modules/ink/build/layout.d.ts +7 -0
- package/node_modules/ink/build/layout.js +33 -0
- package/node_modules/ink/build/layout.js.map +1 -0
- package/node_modules/ink/build/log-update.d.ts +19 -0
- package/node_modules/ink/build/log-update.js +242 -0
- package/node_modules/ink/build/log-update.js.map +1 -0
- package/node_modules/ink/build/measure-element.d.ts +16 -0
- package/node_modules/ink/build/measure-element.js +9 -0
- package/node_modules/ink/build/measure-element.js.map +1 -0
- package/node_modules/ink/build/measure-text.d.ts +6 -0
- package/node_modules/ink/build/measure-text.js +21 -0
- package/node_modules/ink/build/measure-text.js.map +1 -0
- package/node_modules/ink/build/options.d.ts +52 -0
- package/node_modules/ink/build/options.js +2 -0
- package/node_modules/ink/build/options.js.map +1 -0
- package/node_modules/ink/build/output.d.ts +35 -0
- package/node_modules/ink/build/output.js +183 -0
- package/node_modules/ink/build/output.js.map +1 -0
- package/node_modules/ink/build/parse-keypress.d.ts +22 -0
- package/node_modules/ink/build/parse-keypress.js +493 -0
- package/node_modules/ink/build/parse-keypress.js.map +1 -0
- package/node_modules/ink/build/reconciler.d.ts +4 -0
- package/node_modules/ink/build/reconciler.js +274 -0
- package/node_modules/ink/build/reconciler.js.map +1 -0
- package/node_modules/ink/build/render-background.d.ts +4 -0
- package/node_modules/ink/build/render-background.js +25 -0
- package/node_modules/ink/build/render-background.js.map +1 -0
- package/node_modules/ink/build/render-border.d.ts +4 -0
- package/node_modules/ink/build/render-border.js +73 -0
- package/node_modules/ink/build/render-border.js.map +1 -0
- package/node_modules/ink/build/render-node-to-output.d.ts +14 -0
- package/node_modules/ink/build/render-node-to-output.js +147 -0
- package/node_modules/ink/build/render-node-to-output.js.map +1 -0
- package/node_modules/ink/build/render-to-string.d.ts +38 -0
- package/node_modules/ink/build/render-to-string.js +115 -0
- package/node_modules/ink/build/render-to-string.js.map +1 -0
- package/node_modules/ink/build/render.d.ts +121 -0
- package/node_modules/ink/build/render.js +55 -0
- package/node_modules/ink/build/render.js.map +1 -0
- package/node_modules/ink/build/renderer.d.ts +8 -0
- package/node_modules/ink/build/renderer.js +55 -0
- package/node_modules/ink/build/renderer.js.map +1 -0
- package/node_modules/ink/build/sanitize-ansi.d.ts +2 -0
- package/node_modules/ink/build/sanitize-ansi.js +27 -0
- package/node_modules/ink/build/sanitize-ansi.js.map +1 -0
- package/node_modules/ink/build/screen-reader-update.d.ts +13 -0
- package/node_modules/ink/build/screen-reader-update.js +38 -0
- package/node_modules/ink/build/screen-reader-update.js.map +1 -0
- package/node_modules/ink/build/squash-text-nodes.d.ts +3 -0
- package/node_modules/ink/build/squash-text-nodes.js +36 -0
- package/node_modules/ink/build/squash-text-nodes.js.map +1 -0
- package/node_modules/ink/build/styles.d.ts +240 -0
- package/node_modules/ink/build/styles.js +232 -0
- package/node_modules/ink/build/styles.js.map +1 -0
- package/node_modules/ink/build/utils.d.ts +2 -0
- package/node_modules/ink/build/utils.js +4 -0
- package/node_modules/ink/build/utils.js.map +1 -0
- package/node_modules/ink/build/wrap-text.d.ts +3 -0
- package/node_modules/ink/build/wrap-text.js +31 -0
- package/node_modules/ink/build/wrap-text.js.map +1 -0
- package/node_modules/ink/build/write-synchronized.d.ts +4 -0
- package/node_modules/ink/build/write-synchronized.js +7 -0
- package/node_modules/ink/build/write-synchronized.js.map +1 -0
- package/node_modules/ink/package.json +126 -0
- package/package.json +35 -5
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-phone-call-preview-authority.d.ts +0 -24
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-phone-call-preview-authority.d.ts.map +0 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-phone-call-preview-authority.js +0 -125
- package/node_modules/@murphai/assistant-engine/dist/assistant/group-phone-call-preview-authority.js.map +0 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.d.ts +0 -19
- package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.d.ts.map +0 -1
- package/node_modules/@murphai/assistant-engine/dist/assistant/newsletter-outbox.js.map +0 -1
- package/node_modules/@murphai/assistant-engine/skills/general-eye-health/SKILL.md +0 -77
- package/node_modules/@murphai/assistant-engine/skills/general-eye-health/references/evidence-register.md +0 -34
- package/node_modules/@murphai/assistant-engine/skills/general-eye-health/references/triage-and-contact-lenses.md +0 -103
- package/node_modules/@murphai/assistant-engine/skills/recovery-modalities/SKILL.md +0 -57
- package/node_modules/@murphai/assistant-engine/skills/red-light-therapy/SKILL.md +0 -145
- package/node_modules/@murphai/assistant-engine/skills/red-light-therapy/device-seeds.json +0 -259
- package/node_modules/@murphai/inboxd/dist/connectors/email/connector.d.ts +0 -57
- package/node_modules/@murphai/inboxd/dist/connectors/email/connector.d.ts.map +0 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/connector.js +0 -259
- package/node_modules/@murphai/inboxd/dist/connectors/email/connector.js.map +0 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.d.ts +0 -44
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.d.ts.map +0 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.js +0 -212
- package/node_modules/@murphai/inboxd/dist/connectors/email/normalize.js.map +0 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/types.d.ts +0 -69
- package/node_modules/@murphai/inboxd/dist/connectors/email/types.d.ts.map +0 -1
- package/node_modules/@murphai/inboxd/dist/connectors/email/types.js +0 -2
- package/node_modules/@murphai/inboxd/dist/connectors/email/types.js.map +0 -1
- package/node_modules/@murphai/operator-config/dist/agentmail-runtime.d.ts +0 -194
- package/node_modules/@murphai/operator-config/dist/agentmail-runtime.d.ts.map +0 -1
- package/node_modules/@murphai/operator-config/dist/agentmail-runtime.js +0 -385
- package/node_modules/@murphai/operator-config/dist/agentmail-runtime.js.map +0 -1
- package/node_modules/@murphai/setup-cli/dist/setup-agentmail.d.ts +0 -30
- package/node_modules/@murphai/setup-cli/dist/setup-agentmail.d.ts.map +0 -1
- package/node_modules/@murphai/setup-cli/dist/setup-agentmail.js +0 -135
- package/node_modules/@murphai/setup-cli/dist/setup-agentmail.js.map +0 -1
- package/node_modules/incur/src/Cli.test.ts +0 -4808
- package/node_modules/incur/src/Completions.test.ts +0 -543
- package/node_modules/incur/src/Errors.test.ts +0 -100
- package/node_modules/incur/src/Fetch.test.ts +0 -285
- package/node_modules/incur/src/Filter.test.ts +0 -237
- package/node_modules/incur/src/Formatter.test.ts +0 -326
- package/node_modules/incur/src/Help.test.ts +0 -414
- package/node_modules/incur/src/Mcp.test.ts +0 -413
- package/node_modules/incur/src/Openapi.test.ts +0 -389
- package/node_modules/incur/src/Parser.test.ts +0 -378
- package/node_modules/incur/src/Schema.test.ts +0 -167
- package/node_modules/incur/src/Skill.test.ts +0 -441
- package/node_modules/incur/src/Skillgen.test.ts +0 -77
- package/node_modules/incur/src/SyncMcp.test.ts +0 -136
- package/node_modules/incur/src/SyncSkills.test.ts +0 -301
- package/node_modules/incur/src/Typegen.test.ts +0 -205
- package/node_modules/incur/src/bun-compile.test.ts +0 -84
- package/node_modules/incur/src/e2e.test.ts +0 -3441
- package/node_modules/incur/src/internal/configSchema.test.ts +0 -193
- package/node_modules/incur/src/internal/dereference.test.ts +0 -695
- package/node_modules/incur/src/internal/helpers.test.ts +0 -75
- package/node_modules/incur/src/internal/pm.test.ts +0 -38
- package/node_modules/incur/src/internal/utils.test.ts +0 -50
- package/node_modules/incur/src/middleware.test.ts +0 -6
|
@@ -1,4808 +0,0 @@
|
|
|
1
|
-
import { Cli, Errors, z } from 'incur'
|
|
2
|
-
import { mkdir, mkdtemp, readFile, rm, writeFile } from 'node:fs/promises'
|
|
3
|
-
import { homedir, tmpdir } from 'node:os'
|
|
4
|
-
import { join } from 'node:path'
|
|
5
|
-
|
|
6
|
-
const originalIsTTY = process.stdout.isTTY
|
|
7
|
-
beforeAll(() => {
|
|
8
|
-
;(process.stdout as any).isTTY = false
|
|
9
|
-
})
|
|
10
|
-
afterAll(() => {
|
|
11
|
-
;(process.stdout as any).isTTY = originalIsTTY
|
|
12
|
-
})
|
|
13
|
-
|
|
14
|
-
let __mockSkillsHash: string | undefined
|
|
15
|
-
let __mockSkillsInstalled = true
|
|
16
|
-
|
|
17
|
-
vi.mock('./SyncSkills.js', async (importOriginal) => {
|
|
18
|
-
const actual = await importOriginal<typeof import('./SyncSkills.js')>()
|
|
19
|
-
return {
|
|
20
|
-
...actual,
|
|
21
|
-
hasInstalledSkills: () => __mockSkillsInstalled,
|
|
22
|
-
readHash: () => __mockSkillsHash,
|
|
23
|
-
}
|
|
24
|
-
})
|
|
25
|
-
|
|
26
|
-
async function serve(
|
|
27
|
-
cli: { serve: Cli.Cli['serve'] },
|
|
28
|
-
argv: string[],
|
|
29
|
-
options: Cli.serve.Options = {},
|
|
30
|
-
) {
|
|
31
|
-
let output = ''
|
|
32
|
-
let exitCode: number | undefined
|
|
33
|
-
await cli.serve(argv, {
|
|
34
|
-
stdout(s) {
|
|
35
|
-
output += s
|
|
36
|
-
},
|
|
37
|
-
exit(code) {
|
|
38
|
-
exitCode = code
|
|
39
|
-
},
|
|
40
|
-
...options,
|
|
41
|
-
})
|
|
42
|
-
return {
|
|
43
|
-
output: output.replace(/duration: \d+ms/, 'duration: <stripped>'),
|
|
44
|
-
exitCode,
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
function createConfigCli(flag?: string) {
|
|
49
|
-
const project = Cli.create('project').command('list', {
|
|
50
|
-
options: z.object({
|
|
51
|
-
label: z.array(z.string()).default([]),
|
|
52
|
-
limit: z.number().default(10),
|
|
53
|
-
}),
|
|
54
|
-
run(c) {
|
|
55
|
-
return c.options
|
|
56
|
-
},
|
|
57
|
-
})
|
|
58
|
-
|
|
59
|
-
const cli = Cli.create('test', {
|
|
60
|
-
config: flag !== undefined ? { flag } : {},
|
|
61
|
-
options: z.object({
|
|
62
|
-
rootValue: z.string().default('root-default'),
|
|
63
|
-
}),
|
|
64
|
-
run(c) {
|
|
65
|
-
return c.options
|
|
66
|
-
},
|
|
67
|
-
})
|
|
68
|
-
|
|
69
|
-
cli.command('echo', {
|
|
70
|
-
options: z.object({
|
|
71
|
-
prefix: z.string().default(''),
|
|
72
|
-
upper: z.boolean().default(false),
|
|
73
|
-
}),
|
|
74
|
-
run(c) {
|
|
75
|
-
return c.options
|
|
76
|
-
},
|
|
77
|
-
})
|
|
78
|
-
|
|
79
|
-
cli.command(project)
|
|
80
|
-
|
|
81
|
-
return cli
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
describe('create', () => {
|
|
85
|
-
test('returns cli instance with name', () => {
|
|
86
|
-
const cli = Cli.create('test')
|
|
87
|
-
expect(cli.name).toBe('test')
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
test('accepts version and description options', () => {
|
|
91
|
-
const cli = Cli.create('test', { version: '1.0.0', description: 'A test CLI' })
|
|
92
|
-
expect(cli.name).toBe('test')
|
|
93
|
-
})
|
|
94
|
-
})
|
|
95
|
-
|
|
96
|
-
describe('command', () => {
|
|
97
|
-
test('registers a command and is chainable', () => {
|
|
98
|
-
const cli = Cli.create('test')
|
|
99
|
-
const result = cli.command('greet', {
|
|
100
|
-
args: z.object({ name: z.string() }),
|
|
101
|
-
run(c) {
|
|
102
|
-
return { message: `hello ${c.args.name}` }
|
|
103
|
-
},
|
|
104
|
-
})
|
|
105
|
-
expect(result).toBe(cli)
|
|
106
|
-
})
|
|
107
|
-
})
|
|
108
|
-
|
|
109
|
-
describe('config defaults', () => {
|
|
110
|
-
let cwd: string
|
|
111
|
-
let dir: string
|
|
112
|
-
|
|
113
|
-
beforeEach(async () => {
|
|
114
|
-
cwd = process.cwd()
|
|
115
|
-
dir = await mkdtemp(join(tmpdir(), 'incur-config-'))
|
|
116
|
-
process.chdir(dir)
|
|
117
|
-
})
|
|
118
|
-
|
|
119
|
-
afterEach(async () => {
|
|
120
|
-
process.chdir(cwd)
|
|
121
|
-
await rm(dir, { force: true, recursive: true })
|
|
122
|
-
})
|
|
123
|
-
|
|
124
|
-
test('auto-loads <cli>.json for leaf commands', async () => {
|
|
125
|
-
await writeFile(
|
|
126
|
-
join(dir, 'test.json'),
|
|
127
|
-
JSON.stringify({
|
|
128
|
-
commands: {
|
|
129
|
-
echo: {
|
|
130
|
-
options: {
|
|
131
|
-
prefix: 'cfg',
|
|
132
|
-
upper: true,
|
|
133
|
-
},
|
|
134
|
-
},
|
|
135
|
-
},
|
|
136
|
-
}),
|
|
137
|
-
)
|
|
138
|
-
|
|
139
|
-
const { output } = await serve(createConfigCli(), ['echo', '--json'])
|
|
140
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'cfg', upper: true })
|
|
141
|
-
})
|
|
142
|
-
|
|
143
|
-
test('ignores a missing auto config file', async () => {
|
|
144
|
-
const { output } = await serve(createConfigCli(), ['echo', '--json'])
|
|
145
|
-
expect(JSON.parse(output)).toEqual({ prefix: '', upper: false })
|
|
146
|
-
})
|
|
147
|
-
|
|
148
|
-
test('root options coexist with subcommand keys', async () => {
|
|
149
|
-
await writeFile(
|
|
150
|
-
join(dir, 'test.json'),
|
|
151
|
-
JSON.stringify({
|
|
152
|
-
options: { rootValue: 'cfg-root' },
|
|
153
|
-
commands: {
|
|
154
|
-
echo: { options: { prefix: 'cfg' } },
|
|
155
|
-
},
|
|
156
|
-
}),
|
|
157
|
-
)
|
|
158
|
-
|
|
159
|
-
const rootResult = await serve(createConfigCli(), ['--json'])
|
|
160
|
-
expect(JSON.parse(rootResult.output)).toEqual({ rootValue: 'cfg-root' })
|
|
161
|
-
|
|
162
|
-
const echoResult = await serve(createConfigCli(), ['echo', '--json'])
|
|
163
|
-
expect(JSON.parse(echoResult.output)).toEqual({ prefix: 'cfg', upper: false })
|
|
164
|
-
})
|
|
165
|
-
|
|
166
|
-
test('walks nested command sections in config tree', async () => {
|
|
167
|
-
await writeFile(
|
|
168
|
-
join(dir, 'test.json'),
|
|
169
|
-
JSON.stringify({
|
|
170
|
-
commands: {
|
|
171
|
-
project: {
|
|
172
|
-
commands: {
|
|
173
|
-
list: {
|
|
174
|
-
options: {
|
|
175
|
-
label: ['cfg'],
|
|
176
|
-
limit: 25,
|
|
177
|
-
},
|
|
178
|
-
},
|
|
179
|
-
},
|
|
180
|
-
},
|
|
181
|
-
},
|
|
182
|
-
}),
|
|
183
|
-
)
|
|
184
|
-
|
|
185
|
-
const { output } = await serve(createConfigCli(), ['project', 'list', '--json'])
|
|
186
|
-
expect(JSON.parse(output)).toEqual({ label: ['cfg'], limit: 25 })
|
|
187
|
-
})
|
|
188
|
-
|
|
189
|
-
test('uses an explicit --config path instead of the auto file', async () => {
|
|
190
|
-
await writeFile(
|
|
191
|
-
join(dir, 'test.json'),
|
|
192
|
-
JSON.stringify({
|
|
193
|
-
commands: { echo: { options: { prefix: 'auto' } } },
|
|
194
|
-
}),
|
|
195
|
-
)
|
|
196
|
-
await writeFile(
|
|
197
|
-
join(dir, 'custom.json'),
|
|
198
|
-
JSON.stringify({
|
|
199
|
-
commands: { echo: { options: { prefix: 'custom', upper: true } } },
|
|
200
|
-
}),
|
|
201
|
-
)
|
|
202
|
-
|
|
203
|
-
const { output } = await serve(createConfigCli('config'), [
|
|
204
|
-
'echo',
|
|
205
|
-
'--config',
|
|
206
|
-
'custom.json',
|
|
207
|
-
'--json',
|
|
208
|
-
])
|
|
209
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'custom', upper: true })
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
test('--no-config disables earlier config flags, and a later --config wins again', async () => {
|
|
213
|
-
await writeFile(
|
|
214
|
-
join(dir, 'one.json'),
|
|
215
|
-
JSON.stringify({
|
|
216
|
-
commands: { echo: { options: { prefix: 'one' } } },
|
|
217
|
-
}),
|
|
218
|
-
)
|
|
219
|
-
await writeFile(
|
|
220
|
-
join(dir, 'two.json'),
|
|
221
|
-
JSON.stringify({
|
|
222
|
-
commands: { echo: { options: { prefix: 'two' } } },
|
|
223
|
-
}),
|
|
224
|
-
)
|
|
225
|
-
|
|
226
|
-
const first = await serve(createConfigCli('config'), [
|
|
227
|
-
'echo',
|
|
228
|
-
'--config',
|
|
229
|
-
'one.json',
|
|
230
|
-
'--no-config',
|
|
231
|
-
'--json',
|
|
232
|
-
])
|
|
233
|
-
expect(JSON.parse(first.output)).toEqual({ prefix: '', upper: false })
|
|
234
|
-
|
|
235
|
-
const second = await serve(createConfigCli('config'), [
|
|
236
|
-
'echo',
|
|
237
|
-
'--config',
|
|
238
|
-
'one.json',
|
|
239
|
-
'--no-config',
|
|
240
|
-
'--config=two.json',
|
|
241
|
-
'--json',
|
|
242
|
-
])
|
|
243
|
-
expect(JSON.parse(second.output)).toEqual({ prefix: 'two', upper: false })
|
|
244
|
-
})
|
|
245
|
-
|
|
246
|
-
test('fails when an explicit config file is missing', async () => {
|
|
247
|
-
const { exitCode, output } = await serve(createConfigCli('config'), [
|
|
248
|
-
'echo',
|
|
249
|
-
'--config',
|
|
250
|
-
'missing.json',
|
|
251
|
-
])
|
|
252
|
-
expect(exitCode).toBe(1)
|
|
253
|
-
expect(output).toContain('Config file not found')
|
|
254
|
-
})
|
|
255
|
-
|
|
256
|
-
test('fails on invalid JSON config files', async () => {
|
|
257
|
-
await writeFile(join(dir, 'test.json'), '{ invalid')
|
|
258
|
-
|
|
259
|
-
const { exitCode, output } = await serve(createConfigCli(), ['echo'])
|
|
260
|
-
expect(exitCode).toBe(1)
|
|
261
|
-
expect(output).toContain('Invalid JSON config file')
|
|
262
|
-
})
|
|
263
|
-
|
|
264
|
-
test('fails when the config file top level is not an object', async () => {
|
|
265
|
-
await writeFile(join(dir, 'test.json'), JSON.stringify(['bad']))
|
|
266
|
-
|
|
267
|
-
const { exitCode, output } = await serve(createConfigCli(), ['echo'])
|
|
268
|
-
expect(exitCode).toBe(1)
|
|
269
|
-
expect(output).toContain('expected a top-level object')
|
|
270
|
-
})
|
|
271
|
-
|
|
272
|
-
test('fails when the selected config section is not an object', async () => {
|
|
273
|
-
await writeFile(join(dir, 'test.json'), JSON.stringify({ commands: { echo: true } }))
|
|
274
|
-
|
|
275
|
-
const { exitCode, output } = await serve(createConfigCli(), ['echo'])
|
|
276
|
-
expect(exitCode).toBe(1)
|
|
277
|
-
expect(output).toContain("Invalid config section for 'echo'")
|
|
278
|
-
})
|
|
279
|
-
|
|
280
|
-
test('fails validation when config option values are invalid', async () => {
|
|
281
|
-
await writeFile(
|
|
282
|
-
join(dir, 'test.json'),
|
|
283
|
-
JSON.stringify({
|
|
284
|
-
commands: { echo: { options: { upper: 'nope' } } },
|
|
285
|
-
}),
|
|
286
|
-
)
|
|
287
|
-
|
|
288
|
-
const { exitCode, output } = await serve(createConfigCli(), ['echo'])
|
|
289
|
-
expect(exitCode).toBe(1)
|
|
290
|
-
expect(output).toContain('VALIDATION_ERROR')
|
|
291
|
-
})
|
|
292
|
-
|
|
293
|
-
test('argv overrides invalid config values at the CLI layer', async () => {
|
|
294
|
-
await writeFile(
|
|
295
|
-
join(dir, 'test.json'),
|
|
296
|
-
JSON.stringify({
|
|
297
|
-
commands: { echo: { options: { prefix: 123 } } },
|
|
298
|
-
}),
|
|
299
|
-
)
|
|
300
|
-
|
|
301
|
-
const { output } = await serve(createConfigCli(), ['echo', '--prefix', 'cli', '--json'])
|
|
302
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'cli', upper: false })
|
|
303
|
-
})
|
|
304
|
-
|
|
305
|
-
test('built-in commands ignore config loading', async () => {
|
|
306
|
-
await writeFile(join(dir, 'test.json'), '{ invalid')
|
|
307
|
-
|
|
308
|
-
const { output, exitCode } = await serve(createConfigCli(), ['--help'])
|
|
309
|
-
expect(exitCode).toBeUndefined()
|
|
310
|
-
expect(output).toContain('Global Options:')
|
|
311
|
-
})
|
|
312
|
-
|
|
313
|
-
test('config without flag does not reserve --config', async () => {
|
|
314
|
-
const cli = Cli.create('test', { config: {} })
|
|
315
|
-
cli.command('echo', {
|
|
316
|
-
options: z.object({ config: z.string().default('') }),
|
|
317
|
-
run(c) {
|
|
318
|
-
return c.options
|
|
319
|
-
},
|
|
320
|
-
})
|
|
321
|
-
|
|
322
|
-
const { output } = await serve(cli, ['echo', '--config', 'my-value', '--json'])
|
|
323
|
-
expect(JSON.parse(output)).toEqual({ config: 'my-value' })
|
|
324
|
-
})
|
|
325
|
-
|
|
326
|
-
test('--help shows config flags only when flag name is set', async () => {
|
|
327
|
-
const { output } = await serve(createConfigCli('config'), ['--help'])
|
|
328
|
-
expect(output).toContain('--config <path>')
|
|
329
|
-
expect(output).toContain('--no-config')
|
|
330
|
-
|
|
331
|
-
const { output: noFlagOutput } = await serve(createConfigCli(), ['--help'])
|
|
332
|
-
expect(noFlagOutput).not.toContain('--config')
|
|
333
|
-
})
|
|
334
|
-
|
|
335
|
-
test('custom flag name is used for config path override', async () => {
|
|
336
|
-
await writeFile(
|
|
337
|
-
join(dir, 'custom.json'),
|
|
338
|
-
JSON.stringify({
|
|
339
|
-
commands: { echo: { options: { prefix: 'custom' } } },
|
|
340
|
-
}),
|
|
341
|
-
)
|
|
342
|
-
|
|
343
|
-
const { output } = await serve(createConfigCli('settings'), [
|
|
344
|
-
'echo',
|
|
345
|
-
'--settings',
|
|
346
|
-
'custom.json',
|
|
347
|
-
'--json',
|
|
348
|
-
])
|
|
349
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'custom', upper: false })
|
|
350
|
-
})
|
|
351
|
-
|
|
352
|
-
test('searches files list in order, first match wins', async () => {
|
|
353
|
-
await writeFile(
|
|
354
|
-
join(dir, '.testrc.json'),
|
|
355
|
-
JSON.stringify({ commands: { echo: { options: { prefix: 'rc' } } } }),
|
|
356
|
-
)
|
|
357
|
-
|
|
358
|
-
const cli = Cli.create('test', {
|
|
359
|
-
config: { files: ['test.json', '.testrc.json'] },
|
|
360
|
-
})
|
|
361
|
-
cli.command('echo', {
|
|
362
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
363
|
-
run: (c) => c.options,
|
|
364
|
-
})
|
|
365
|
-
|
|
366
|
-
const { output } = await serve(cli, ['echo', '--json'])
|
|
367
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'rc' })
|
|
368
|
-
})
|
|
369
|
-
|
|
370
|
-
test('files: [] disables auto-discovery', async () => {
|
|
371
|
-
await writeFile(
|
|
372
|
-
join(dir, 'test.json'),
|
|
373
|
-
JSON.stringify({ commands: { echo: { options: { prefix: 'should-not-load' } } } }),
|
|
374
|
-
)
|
|
375
|
-
|
|
376
|
-
const cli = Cli.create('test', {
|
|
377
|
-
config: { files: [] },
|
|
378
|
-
})
|
|
379
|
-
cli.command('echo', {
|
|
380
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
381
|
-
run: (c) => c.options,
|
|
382
|
-
})
|
|
383
|
-
|
|
384
|
-
const { output } = await serve(cli, ['echo', '--json'])
|
|
385
|
-
expect(JSON.parse(output)).toEqual({ prefix: '' })
|
|
386
|
-
})
|
|
387
|
-
|
|
388
|
-
test('files supports ~ for home directory', async () => {
|
|
389
|
-
const configDir = join(homedir(), '.config', 'test-incur-files-tilde')
|
|
390
|
-
await mkdir(configDir, { recursive: true })
|
|
391
|
-
try {
|
|
392
|
-
await writeFile(
|
|
393
|
-
join(configDir, 'config.json'),
|
|
394
|
-
JSON.stringify({ commands: { echo: { options: { prefix: 'home' } } } }),
|
|
395
|
-
)
|
|
396
|
-
|
|
397
|
-
const cli = Cli.create('test', {
|
|
398
|
-
config: { files: ['test.json', '~/.config/test-incur-files-tilde/config.json'] },
|
|
399
|
-
})
|
|
400
|
-
cli.command('echo', {
|
|
401
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
402
|
-
run: (c) => c.options,
|
|
403
|
-
})
|
|
404
|
-
|
|
405
|
-
const { output } = await serve(cli, ['echo', '--json'])
|
|
406
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'home' })
|
|
407
|
-
} finally {
|
|
408
|
-
await rm(configDir, { recursive: true, force: true })
|
|
409
|
-
}
|
|
410
|
-
})
|
|
411
|
-
|
|
412
|
-
test('explicit --flag overrides files list', async () => {
|
|
413
|
-
await writeFile(
|
|
414
|
-
join(dir, '.testrc.json'),
|
|
415
|
-
JSON.stringify({ commands: { echo: { options: { prefix: 'rc' } } } }),
|
|
416
|
-
)
|
|
417
|
-
await writeFile(
|
|
418
|
-
join(dir, 'override.json'),
|
|
419
|
-
JSON.stringify({ commands: { echo: { options: { prefix: 'override' } } } }),
|
|
420
|
-
)
|
|
421
|
-
|
|
422
|
-
const cli = Cli.create('test', {
|
|
423
|
-
config: { flag: 'config', files: ['.testrc.json'] },
|
|
424
|
-
})
|
|
425
|
-
cli.command('echo', {
|
|
426
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
427
|
-
run: (c) => c.options,
|
|
428
|
-
})
|
|
429
|
-
|
|
430
|
-
const { output } = await serve(cli, ['echo', '--config', 'override.json', '--json'])
|
|
431
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'override' })
|
|
432
|
-
})
|
|
433
|
-
|
|
434
|
-
test('custom loader replaces JSON parsing', async () => {
|
|
435
|
-
await writeFile(join(dir, 'test.ini'), 'prefix=ini-value')
|
|
436
|
-
|
|
437
|
-
const cli = Cli.create('test', {
|
|
438
|
-
config: {
|
|
439
|
-
files: ['test.ini'],
|
|
440
|
-
async loader(path) {
|
|
441
|
-
if (!path) return undefined
|
|
442
|
-
const raw = await readFile(path, 'utf8')
|
|
443
|
-
const obj: Record<string, unknown> = {}
|
|
444
|
-
for (const line of raw.split('\n')) {
|
|
445
|
-
const eq = line.indexOf('=')
|
|
446
|
-
if (eq !== -1) obj[line.slice(0, eq).trim()] = line.slice(eq + 1).trim()
|
|
447
|
-
}
|
|
448
|
-
return { commands: { echo: { options: obj } } }
|
|
449
|
-
},
|
|
450
|
-
},
|
|
451
|
-
})
|
|
452
|
-
cli.command('echo', {
|
|
453
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
454
|
-
run: (c) => c.options,
|
|
455
|
-
})
|
|
456
|
-
|
|
457
|
-
const { output } = await serve(cli, ['echo', '--json'])
|
|
458
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'ini-value' })
|
|
459
|
-
})
|
|
460
|
-
|
|
461
|
-
test('loader with files: [] receives undefined path', async () => {
|
|
462
|
-
const cli = Cli.create('test', {
|
|
463
|
-
config: {
|
|
464
|
-
files: [],
|
|
465
|
-
loader: async (path) => {
|
|
466
|
-
expect(path).toBeUndefined()
|
|
467
|
-
return { commands: { echo: { options: { prefix: 'from-loader' } } } }
|
|
468
|
-
},
|
|
469
|
-
},
|
|
470
|
-
})
|
|
471
|
-
cli.command('echo', {
|
|
472
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
473
|
-
run: (c) => c.options,
|
|
474
|
-
})
|
|
475
|
-
|
|
476
|
-
const { output } = await serve(cli, ['echo', '--json'])
|
|
477
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'from-loader' })
|
|
478
|
-
})
|
|
479
|
-
|
|
480
|
-
test('loader returning undefined applies no defaults', async () => {
|
|
481
|
-
const cli = Cli.create('test', {
|
|
482
|
-
config: { files: [], loader: async () => undefined },
|
|
483
|
-
})
|
|
484
|
-
cli.command('echo', {
|
|
485
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
486
|
-
run: (c) => c.options,
|
|
487
|
-
})
|
|
488
|
-
|
|
489
|
-
const { output } = await serve(cli, ['echo', '--json'])
|
|
490
|
-
expect(JSON.parse(output)).toEqual({ prefix: '' })
|
|
491
|
-
})
|
|
492
|
-
|
|
493
|
-
test('--no-flag skips loader entirely', async () => {
|
|
494
|
-
let loaderCalled = false
|
|
495
|
-
const cli = Cli.create('test', {
|
|
496
|
-
config: {
|
|
497
|
-
flag: 'config',
|
|
498
|
-
files: [],
|
|
499
|
-
loader: async () => {
|
|
500
|
-
loaderCalled = true
|
|
501
|
-
return { commands: { echo: { options: { prefix: 'should-not-load' } } } }
|
|
502
|
-
},
|
|
503
|
-
},
|
|
504
|
-
})
|
|
505
|
-
cli.command('echo', {
|
|
506
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
507
|
-
run: (c) => c.options,
|
|
508
|
-
})
|
|
509
|
-
|
|
510
|
-
const { output } = await serve(cli, ['echo', '--no-config', '--json'])
|
|
511
|
-
expect(JSON.parse(output)).toEqual({ prefix: '' })
|
|
512
|
-
expect(loaderCalled).toBe(false)
|
|
513
|
-
})
|
|
514
|
-
|
|
515
|
-
test('loader errors propagate', async () => {
|
|
516
|
-
const cli = Cli.create('test', {
|
|
517
|
-
config: {
|
|
518
|
-
files: [],
|
|
519
|
-
loader: async () => {
|
|
520
|
-
throw new Error('Remote config server unreachable')
|
|
521
|
-
},
|
|
522
|
-
},
|
|
523
|
-
})
|
|
524
|
-
cli.command('echo', {
|
|
525
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
526
|
-
run: (c) => c.options,
|
|
527
|
-
})
|
|
528
|
-
|
|
529
|
-
const { exitCode, output } = await serve(cli, ['echo'])
|
|
530
|
-
expect(exitCode).toBe(1)
|
|
531
|
-
expect(output).toContain('Remote config server unreachable')
|
|
532
|
-
})
|
|
533
|
-
|
|
534
|
-
test('--no-flag disables auto-discovery without prior --flag', async () => {
|
|
535
|
-
await writeFile(
|
|
536
|
-
join(dir, 'test.json'),
|
|
537
|
-
JSON.stringify({ commands: { echo: { options: { prefix: 'auto-loaded' } } } }),
|
|
538
|
-
)
|
|
539
|
-
|
|
540
|
-
const { output } = await serve(createConfigCli('config'), ['echo', '--no-config', '--json'])
|
|
541
|
-
expect(JSON.parse(output)).toEqual({ prefix: '', upper: false })
|
|
542
|
-
})
|
|
543
|
-
|
|
544
|
-
test('--config without a value produces an error', async () => {
|
|
545
|
-
const { exitCode, output } = await serve(createConfigCli('config'), ['echo', '--config'])
|
|
546
|
-
expect(exitCode).toBe(1)
|
|
547
|
-
expect(output).toContain('Missing value for flag')
|
|
548
|
-
})
|
|
549
|
-
|
|
550
|
-
test('--config= (empty value) produces an error', async () => {
|
|
551
|
-
const { exitCode, output } = await serve(createConfigCli('config'), ['echo', '--config='])
|
|
552
|
-
expect(exitCode).toBe(1)
|
|
553
|
-
expect(output).toContain('Missing value for flag')
|
|
554
|
-
})
|
|
555
|
-
|
|
556
|
-
test('--no-settings works with custom flag name', async () => {
|
|
557
|
-
await writeFile(
|
|
558
|
-
join(dir, 'test.json'),
|
|
559
|
-
JSON.stringify({ commands: { echo: { options: { prefix: 'auto' } } } }),
|
|
560
|
-
)
|
|
561
|
-
|
|
562
|
-
const { output } = await serve(createConfigCli('settings'), ['echo', '--no-settings', '--json'])
|
|
563
|
-
expect(JSON.parse(output)).toEqual({ prefix: '', upper: false })
|
|
564
|
-
})
|
|
565
|
-
|
|
566
|
-
test('camelCase config keys are accepted at cli level', async () => {
|
|
567
|
-
const cli = Cli.create('test', { config: {} })
|
|
568
|
-
cli.command('echo', {
|
|
569
|
-
options: z.object({ saveDev: z.boolean().default(false) }),
|
|
570
|
-
run: (c) => c.options,
|
|
571
|
-
})
|
|
572
|
-
|
|
573
|
-
await writeFile(
|
|
574
|
-
join(dir, 'test.json'),
|
|
575
|
-
JSON.stringify({ commands: { echo: { options: { 'save-dev': true } } } }),
|
|
576
|
-
)
|
|
577
|
-
|
|
578
|
-
const { output } = await serve(cli, ['echo', '--json'])
|
|
579
|
-
expect(JSON.parse(output)).toEqual({ saveDev: true })
|
|
580
|
-
})
|
|
581
|
-
|
|
582
|
-
test('config defaults with only subcommand namespaces yields no option defaults', async () => {
|
|
583
|
-
await writeFile(
|
|
584
|
-
join(dir, 'test.json'),
|
|
585
|
-
JSON.stringify({
|
|
586
|
-
commands: {
|
|
587
|
-
echo: { options: { prefix: 'child' } },
|
|
588
|
-
project: { commands: { list: { options: { limit: 50 } } } },
|
|
589
|
-
},
|
|
590
|
-
}),
|
|
591
|
-
)
|
|
592
|
-
|
|
593
|
-
const rootResult = await serve(createConfigCli(), ['--json'])
|
|
594
|
-
expect(JSON.parse(rootResult.output)).toEqual({ rootValue: 'root-default' })
|
|
595
|
-
})
|
|
596
|
-
|
|
597
|
-
test('explicit --flag path is forwarded to custom loader', async () => {
|
|
598
|
-
await writeFile(join(dir, 'custom.dat'), 'prefix=custom-loader')
|
|
599
|
-
|
|
600
|
-
const cli = Cli.create('test', {
|
|
601
|
-
config: {
|
|
602
|
-
flag: 'config',
|
|
603
|
-
async loader(path) {
|
|
604
|
-
if (!path) return undefined
|
|
605
|
-
const raw = await readFile(path, 'utf8')
|
|
606
|
-
const [, value] = raw.split('=')
|
|
607
|
-
return { commands: { echo: { options: { prefix: value!.trim() } } } }
|
|
608
|
-
},
|
|
609
|
-
},
|
|
610
|
-
})
|
|
611
|
-
cli.command('echo', {
|
|
612
|
-
options: z.object({ prefix: z.string().default('') }),
|
|
613
|
-
run: (c) => c.options,
|
|
614
|
-
})
|
|
615
|
-
|
|
616
|
-
const { output } = await serve(cli, ['echo', '--config', 'custom.dat', '--json'])
|
|
617
|
-
expect(JSON.parse(output)).toEqual({ prefix: 'custom-loader' })
|
|
618
|
-
})
|
|
619
|
-
})
|
|
620
|
-
|
|
621
|
-
describe('serve', () => {
|
|
622
|
-
test('outputs data only by default', async () => {
|
|
623
|
-
const cli = Cli.create('test')
|
|
624
|
-
cli.command('greet', {
|
|
625
|
-
args: z.object({ name: z.string() }),
|
|
626
|
-
run(c) {
|
|
627
|
-
return { message: `hello ${c.args.name}` }
|
|
628
|
-
},
|
|
629
|
-
})
|
|
630
|
-
|
|
631
|
-
const { output } = await serve(cli, ['greet', 'world'])
|
|
632
|
-
expect(output).toMatchInlineSnapshot(`
|
|
633
|
-
"message: hello world
|
|
634
|
-
"
|
|
635
|
-
`)
|
|
636
|
-
})
|
|
637
|
-
|
|
638
|
-
test('--full-output outputs full envelope', async () => {
|
|
639
|
-
const cli = Cli.create('test')
|
|
640
|
-
cli.command('greet', {
|
|
641
|
-
args: z.object({ name: z.string() }),
|
|
642
|
-
run(c) {
|
|
643
|
-
return { message: `hello ${c.args.name}` }
|
|
644
|
-
},
|
|
645
|
-
})
|
|
646
|
-
|
|
647
|
-
const { output } = await serve(cli, ['greet', 'world', '--full-output'])
|
|
648
|
-
expect(output).toMatchInlineSnapshot(`
|
|
649
|
-
"ok: true
|
|
650
|
-
data:
|
|
651
|
-
message: hello world
|
|
652
|
-
meta:
|
|
653
|
-
command: greet
|
|
654
|
-
duration: <stripped>
|
|
655
|
-
"
|
|
656
|
-
`)
|
|
657
|
-
})
|
|
658
|
-
|
|
659
|
-
test('parses positional args by schema key order', async () => {
|
|
660
|
-
const cli = Cli.create('test')
|
|
661
|
-
let receivedArgs: any
|
|
662
|
-
cli.command('add', {
|
|
663
|
-
args: z.object({ a: z.string(), b: z.string() }),
|
|
664
|
-
run(c) {
|
|
665
|
-
receivedArgs = c.args
|
|
666
|
-
return {}
|
|
667
|
-
},
|
|
668
|
-
})
|
|
669
|
-
|
|
670
|
-
await serve(cli, ['add', 'foo', 'bar'])
|
|
671
|
-
expect(receivedArgs).toEqual({ a: 'foo', b: 'bar' })
|
|
672
|
-
})
|
|
673
|
-
|
|
674
|
-
test('serializes output as TOON', async () => {
|
|
675
|
-
const cli = Cli.create('test')
|
|
676
|
-
cli.command('ping', {
|
|
677
|
-
run() {
|
|
678
|
-
return { pong: true }
|
|
679
|
-
},
|
|
680
|
-
})
|
|
681
|
-
|
|
682
|
-
const { output } = await serve(cli, ['ping'])
|
|
683
|
-
expect(() => JSON.parse(output)).toThrow()
|
|
684
|
-
expect(output).toMatchInlineSnapshot(`
|
|
685
|
-
"pong: true
|
|
686
|
-
"
|
|
687
|
-
`)
|
|
688
|
-
})
|
|
689
|
-
|
|
690
|
-
test('outputs error details for unknown command', async () => {
|
|
691
|
-
const cli = Cli.create('test')
|
|
692
|
-
|
|
693
|
-
const { output, exitCode } = await serve(cli, ['nonexistent'])
|
|
694
|
-
expect(exitCode).toBe(1)
|
|
695
|
-
expect(output).toMatchInlineSnapshot(`
|
|
696
|
-
"code: COMMAND_NOT_FOUND
|
|
697
|
-
message: 'nonexistent' is not a command for 'test'.
|
|
698
|
-
cta:
|
|
699
|
-
description: "Suggested command:"
|
|
700
|
-
commands[1]{command,description}:
|
|
701
|
-
test --help,see all available commands
|
|
702
|
-
"
|
|
703
|
-
`)
|
|
704
|
-
})
|
|
705
|
-
|
|
706
|
-
test('outputs human error for unknown command in TTY', async () => {
|
|
707
|
-
;(process.stdout as any).isTTY = true
|
|
708
|
-
const cli = Cli.create('test')
|
|
709
|
-
|
|
710
|
-
const { output, exitCode } = await serve(cli, ['nonexistent'])
|
|
711
|
-
;(process.stdout as any).isTTY = false
|
|
712
|
-
expect(exitCode).toBe(1)
|
|
713
|
-
expect(output).toMatchInlineSnapshot(`
|
|
714
|
-
"Error: 'nonexistent' is not a command for 'test'.
|
|
715
|
-
|
|
716
|
-
Suggested command:
|
|
717
|
-
test --help # see all available commands
|
|
718
|
-
"
|
|
719
|
-
`)
|
|
720
|
-
})
|
|
721
|
-
|
|
722
|
-
test('--full-output outputs full error envelope for unknown command', async () => {
|
|
723
|
-
const cli = Cli.create('test')
|
|
724
|
-
|
|
725
|
-
const { output, exitCode } = await serve(cli, ['nonexistent', '--full-output'])
|
|
726
|
-
expect(exitCode).toBe(1)
|
|
727
|
-
expect(output).toMatchInlineSnapshot(`
|
|
728
|
-
"ok: false
|
|
729
|
-
error:
|
|
730
|
-
code: COMMAND_NOT_FOUND
|
|
731
|
-
message: 'nonexistent' is not a command for 'test'.
|
|
732
|
-
meta:
|
|
733
|
-
command: nonexistent
|
|
734
|
-
cta:
|
|
735
|
-
description: "Suggested command:"
|
|
736
|
-
commands[1]{command,description}:
|
|
737
|
-
test --help,see all available commands
|
|
738
|
-
duration: <stripped>
|
|
739
|
-
"
|
|
740
|
-
`)
|
|
741
|
-
})
|
|
742
|
-
|
|
743
|
-
test('suggests similar command for typos', async () => {
|
|
744
|
-
const cli = Cli.create('test')
|
|
745
|
-
cli.command('deploy', { run: () => ({}) })
|
|
746
|
-
cli.command('status', { run: () => ({}) })
|
|
747
|
-
|
|
748
|
-
const { output, exitCode } = await serve(cli, ['deplyo'])
|
|
749
|
-
expect(exitCode).toBe(1)
|
|
750
|
-
expect(output).toMatchInlineSnapshot(`
|
|
751
|
-
"code: COMMAND_NOT_FOUND
|
|
752
|
-
message: 'deplyo' is not a command for 'test'. Did you mean 'deploy'?
|
|
753
|
-
cta:
|
|
754
|
-
description: "Suggested commands:"
|
|
755
|
-
commands[2]:
|
|
756
|
-
- command: test deploy
|
|
757
|
-
- command: test --help
|
|
758
|
-
description: see all available commands
|
|
759
|
-
"
|
|
760
|
-
`)
|
|
761
|
-
})
|
|
762
|
-
|
|
763
|
-
test('suggests similar command for typos in TTY', async () => {
|
|
764
|
-
;(process.stdout as any).isTTY = true
|
|
765
|
-
const cli = Cli.create('test')
|
|
766
|
-
cli.command('deploy', { run: () => ({}) })
|
|
767
|
-
|
|
768
|
-
const { output, exitCode } = await serve(cli, ['deplyo'])
|
|
769
|
-
;(process.stdout as any).isTTY = false
|
|
770
|
-
expect(exitCode).toBe(1)
|
|
771
|
-
expect(output).toMatchInlineSnapshot(`
|
|
772
|
-
"Error: 'deplyo' is not a command for 'test'. Did you mean 'deploy'?
|
|
773
|
-
|
|
774
|
-
Suggested commands:
|
|
775
|
-
test deploy
|
|
776
|
-
test --help # see all available commands
|
|
777
|
-
"
|
|
778
|
-
`)
|
|
779
|
-
})
|
|
780
|
-
|
|
781
|
-
test('suggests builtin commands for typos', async () => {
|
|
782
|
-
const cli = Cli.create('test')
|
|
783
|
-
cli.command('ping', { run: () => ({}) })
|
|
784
|
-
|
|
785
|
-
const { output, exitCode } = await serve(cli, ['mpc'])
|
|
786
|
-
expect(exitCode).toBe(1)
|
|
787
|
-
expect(output).toContain("Did you mean 'mcp'?")
|
|
788
|
-
expect(output).toContain('test mcp')
|
|
789
|
-
})
|
|
790
|
-
|
|
791
|
-
test('preserves flags in suggestion CTA', async () => {
|
|
792
|
-
const cli = Cli.create('test')
|
|
793
|
-
cli.command('deploy', { run: () => ({}) })
|
|
794
|
-
|
|
795
|
-
const { output } = await serve(cli, ['deplyo', '--full-output'])
|
|
796
|
-
expect(output).toContain('test deploy --full-output')
|
|
797
|
-
})
|
|
798
|
-
|
|
799
|
-
test('no suggestion when input is too far from any command', async () => {
|
|
800
|
-
const cli = Cli.create('test')
|
|
801
|
-
cli.command('deploy', { run: () => ({}) })
|
|
802
|
-
|
|
803
|
-
const { output } = await serve(cli, ['xyz'])
|
|
804
|
-
expect(output).not.toContain('Did you mean')
|
|
805
|
-
})
|
|
806
|
-
|
|
807
|
-
test('suggests similar subcommand for typos', async () => {
|
|
808
|
-
const cli = Cli.create('test')
|
|
809
|
-
const pr = Cli.create('pr')
|
|
810
|
-
.command('list', { run: () => ({}) })
|
|
811
|
-
.command('create', { run: () => ({}) })
|
|
812
|
-
cli.command(pr)
|
|
813
|
-
|
|
814
|
-
const { output, exitCode } = await serve(cli, ['pr', 'craete'])
|
|
815
|
-
expect(exitCode).toBe(1)
|
|
816
|
-
expect(output).toMatchInlineSnapshot(`
|
|
817
|
-
"code: COMMAND_NOT_FOUND
|
|
818
|
-
message: 'craete' is not a command for 'test pr'. Did you mean 'create'?
|
|
819
|
-
cta:
|
|
820
|
-
description: "Suggested commands:"
|
|
821
|
-
commands[2]:
|
|
822
|
-
- command: test pr create
|
|
823
|
-
- command: test pr --help
|
|
824
|
-
description: see all available commands
|
|
825
|
-
"
|
|
826
|
-
`)
|
|
827
|
-
})
|
|
828
|
-
|
|
829
|
-
test('wraps handler errors in error output', async () => {
|
|
830
|
-
const cli = Cli.create('test')
|
|
831
|
-
cli.command('fail', {
|
|
832
|
-
run() {
|
|
833
|
-
throw new Error('boom')
|
|
834
|
-
},
|
|
835
|
-
})
|
|
836
|
-
|
|
837
|
-
const { output, exitCode } = await serve(cli, ['fail'])
|
|
838
|
-
expect(exitCode).toBe(1)
|
|
839
|
-
expect(output).toMatchInlineSnapshot(`
|
|
840
|
-
"code: UNKNOWN
|
|
841
|
-
message: boom
|
|
842
|
-
"
|
|
843
|
-
`)
|
|
844
|
-
})
|
|
845
|
-
|
|
846
|
-
test('wraps handler errors in human format in TTY', async () => {
|
|
847
|
-
;(process.stdout as any).isTTY = true
|
|
848
|
-
const cli = Cli.create('test')
|
|
849
|
-
cli.command('fail', {
|
|
850
|
-
run() {
|
|
851
|
-
throw new Error('boom')
|
|
852
|
-
},
|
|
853
|
-
})
|
|
854
|
-
|
|
855
|
-
const { output, exitCode } = await serve(cli, ['fail'])
|
|
856
|
-
;(process.stdout as any).isTTY = false
|
|
857
|
-
expect(exitCode).toBe(1)
|
|
858
|
-
expect(output).toMatchInlineSnapshot(`
|
|
859
|
-
"Error: boom
|
|
860
|
-
"
|
|
861
|
-
`)
|
|
862
|
-
})
|
|
863
|
-
|
|
864
|
-
test('IncurError in run() populates code/retryable', async () => {
|
|
865
|
-
const cli = Cli.create('test')
|
|
866
|
-
cli.command('fail', {
|
|
867
|
-
run() {
|
|
868
|
-
throw new Errors.IncurError({
|
|
869
|
-
code: 'NOT_AUTHENTICATED',
|
|
870
|
-
message: 'Token not found',
|
|
871
|
-
retryable: false,
|
|
872
|
-
})
|
|
873
|
-
},
|
|
874
|
-
})
|
|
875
|
-
|
|
876
|
-
const { output, exitCode } = await serve(cli, ['fail'])
|
|
877
|
-
expect(exitCode).toBe(1)
|
|
878
|
-
expect(output).toMatchInlineSnapshot(`
|
|
879
|
-
"code: NOT_AUTHENTICATED
|
|
880
|
-
message: Token not found
|
|
881
|
-
retryable: false
|
|
882
|
-
"
|
|
883
|
-
`)
|
|
884
|
-
})
|
|
885
|
-
|
|
886
|
-
test('IncurError shows human format in TTY', async () => {
|
|
887
|
-
;(process.stdout as any).isTTY = true
|
|
888
|
-
const cli = Cli.create('test')
|
|
889
|
-
cli.command('fail', {
|
|
890
|
-
run() {
|
|
891
|
-
throw new Errors.IncurError({
|
|
892
|
-
code: 'NOT_AUTHENTICATED',
|
|
893
|
-
message: 'Token not found',
|
|
894
|
-
retryable: false,
|
|
895
|
-
})
|
|
896
|
-
},
|
|
897
|
-
})
|
|
898
|
-
|
|
899
|
-
const { output, exitCode } = await serve(cli, ['fail'])
|
|
900
|
-
;(process.stdout as any).isTTY = false
|
|
901
|
-
expect(exitCode).toBe(1)
|
|
902
|
-
expect(output).toMatchInlineSnapshot(`
|
|
903
|
-
"Error (NOT_AUTHENTICATED): Token not found
|
|
904
|
-
"
|
|
905
|
-
`)
|
|
906
|
-
})
|
|
907
|
-
|
|
908
|
-
test('ValidationError includes fieldErrors', async () => {
|
|
909
|
-
const cli = Cli.create('test')
|
|
910
|
-
cli.command('greet', {
|
|
911
|
-
args: z.object({ name: z.string() }),
|
|
912
|
-
run(c) {
|
|
913
|
-
return { message: `hello ${c.args.name}` }
|
|
914
|
-
},
|
|
915
|
-
})
|
|
916
|
-
|
|
917
|
-
const { output, exitCode } = await serve(cli, ['greet'])
|
|
918
|
-
expect(exitCode).toBe(1)
|
|
919
|
-
expect(output).toContain('VALIDATION_ERROR')
|
|
920
|
-
})
|
|
921
|
-
|
|
922
|
-
test('ValidationError shows human format in TTY', async () => {
|
|
923
|
-
;(process.stdout as any).isTTY = true
|
|
924
|
-
const cli = Cli.create('test')
|
|
925
|
-
cli.command('greet', {
|
|
926
|
-
args: z.object({ name: z.string() }),
|
|
927
|
-
run(c) {
|
|
928
|
-
return { message: `hello ${c.args.name}` }
|
|
929
|
-
},
|
|
930
|
-
})
|
|
931
|
-
|
|
932
|
-
const { output, exitCode } = await serve(cli, ['greet'])
|
|
933
|
-
;(process.stdout as any).isTTY = false
|
|
934
|
-
expect(exitCode).toBe(1)
|
|
935
|
-
expect(output).toContain('Error: missing required argument <name>')
|
|
936
|
-
})
|
|
937
|
-
|
|
938
|
-
test('ValidationError preserves Zod messages in machine output', async () => {
|
|
939
|
-
const cli = Cli.create('test')
|
|
940
|
-
cli.command('send', {
|
|
941
|
-
options: z.object({ address: z.string().min(32) }),
|
|
942
|
-
run() {
|
|
943
|
-
return {}
|
|
944
|
-
},
|
|
945
|
-
})
|
|
946
|
-
|
|
947
|
-
const { output, exitCode } = await serve(cli, ['send', '--address', 'abc', '--format', 'json'])
|
|
948
|
-
expect(exitCode).toBe(1)
|
|
949
|
-
expect(JSON.parse(output)).toMatchObject({
|
|
950
|
-
code: 'VALIDATION_ERROR',
|
|
951
|
-
fieldErrors: [
|
|
952
|
-
{
|
|
953
|
-
code: 'too_small',
|
|
954
|
-
message: 'Too small: expected string to have >=32 characters',
|
|
955
|
-
missing: false,
|
|
956
|
-
path: 'address',
|
|
957
|
-
},
|
|
958
|
-
],
|
|
959
|
-
})
|
|
960
|
-
})
|
|
961
|
-
|
|
962
|
-
test('ValidationError shows invalid option messages in TTY', async () => {
|
|
963
|
-
;(process.stdout as any).isTTY = true
|
|
964
|
-
const cli = Cli.create('test')
|
|
965
|
-
cli.command('send', {
|
|
966
|
-
options: z.object({ address: z.string().min(32) }),
|
|
967
|
-
run() {
|
|
968
|
-
return {}
|
|
969
|
-
},
|
|
970
|
-
})
|
|
971
|
-
|
|
972
|
-
const { output, exitCode } = await serve(cli, ['send', '--address', 'abc'])
|
|
973
|
-
;(process.stdout as any).isTTY = false
|
|
974
|
-
expect(exitCode).toBe(1)
|
|
975
|
-
expect(output).toContain(
|
|
976
|
-
'Error: invalid value for --address: Too small: expected string to have >=32 characters',
|
|
977
|
-
)
|
|
978
|
-
expect(output).not.toContain('Error: missing required argument <address>')
|
|
979
|
-
})
|
|
980
|
-
|
|
981
|
-
test('ValidationError shows missing required options in TTY', async () => {
|
|
982
|
-
;(process.stdout as any).isTTY = true
|
|
983
|
-
const cli = Cli.create('test')
|
|
984
|
-
cli.command('send', {
|
|
985
|
-
options: z.object({ address: z.string() }),
|
|
986
|
-
run() {
|
|
987
|
-
return {}
|
|
988
|
-
},
|
|
989
|
-
})
|
|
990
|
-
|
|
991
|
-
const { output, exitCode } = await serve(cli, ['send'])
|
|
992
|
-
;(process.stdout as any).isTTY = false
|
|
993
|
-
expect(exitCode).toBe(1)
|
|
994
|
-
expect(output).toContain('Error: missing required option --address')
|
|
995
|
-
})
|
|
996
|
-
|
|
997
|
-
test('ValidationError shows invalid enum messages in TTY', async () => {
|
|
998
|
-
;(process.stdout as any).isTTY = true
|
|
999
|
-
const cli = Cli.create('test')
|
|
1000
|
-
cli.command('list', {
|
|
1001
|
-
options: z.object({ state: z.enum(['open', 'closed']) }),
|
|
1002
|
-
run() {
|
|
1003
|
-
return {}
|
|
1004
|
-
},
|
|
1005
|
-
})
|
|
1006
|
-
|
|
1007
|
-
const { output, exitCode } = await serve(cli, ['list', '--state', 'invalid'])
|
|
1008
|
-
;(process.stdout as any).isTTY = false
|
|
1009
|
-
expect(exitCode).toBe(1)
|
|
1010
|
-
expect(output).toContain(
|
|
1011
|
-
'Error: invalid value for --state: Invalid option: expected one of "open"|"closed"',
|
|
1012
|
-
)
|
|
1013
|
-
})
|
|
1014
|
-
|
|
1015
|
-
test('ValidationError shows positional refinement messages in TTY', async () => {
|
|
1016
|
-
;(process.stdout as any).isTTY = true
|
|
1017
|
-
const cli = Cli.create('test')
|
|
1018
|
-
cli.command('get', {
|
|
1019
|
-
args: z.object({
|
|
1020
|
-
id: z.string().refine((value) => value.startsWith('x'), { message: 'must start with x' }),
|
|
1021
|
-
}),
|
|
1022
|
-
run() {
|
|
1023
|
-
return {}
|
|
1024
|
-
},
|
|
1025
|
-
})
|
|
1026
|
-
|
|
1027
|
-
const { output, exitCode } = await serve(cli, ['get', 'abc'])
|
|
1028
|
-
;(process.stdout as any).isTTY = false
|
|
1029
|
-
expect(exitCode).toBe(1)
|
|
1030
|
-
expect(output).toContain('Error: invalid value for <id>: must start with x')
|
|
1031
|
-
})
|
|
1032
|
-
|
|
1033
|
-
test('agent is true when not TTY', async () => {
|
|
1034
|
-
let agent: boolean | undefined
|
|
1035
|
-
const cli = Cli.create('test')
|
|
1036
|
-
cli.command('ping', {
|
|
1037
|
-
run(c) {
|
|
1038
|
-
agent = c.agent
|
|
1039
|
-
return {}
|
|
1040
|
-
},
|
|
1041
|
-
})
|
|
1042
|
-
|
|
1043
|
-
await serve(cli, ['ping'])
|
|
1044
|
-
expect(agent).toBe(true)
|
|
1045
|
-
})
|
|
1046
|
-
|
|
1047
|
-
test('agent is false when TTY', async () => {
|
|
1048
|
-
;(process.stdout as any).isTTY = true
|
|
1049
|
-
let agent: boolean | undefined
|
|
1050
|
-
const cli = Cli.create('test')
|
|
1051
|
-
cli.command('ping', {
|
|
1052
|
-
run(c) {
|
|
1053
|
-
agent = c.agent
|
|
1054
|
-
return {}
|
|
1055
|
-
},
|
|
1056
|
-
})
|
|
1057
|
-
|
|
1058
|
-
await serve(cli, ['ping'])
|
|
1059
|
-
;(process.stdout as any).isTTY = false
|
|
1060
|
-
expect(agent).toBe(false)
|
|
1061
|
-
})
|
|
1062
|
-
|
|
1063
|
-
test('supports async handlers', async () => {
|
|
1064
|
-
const cli = Cli.create('test')
|
|
1065
|
-
cli.command('async', {
|
|
1066
|
-
async run() {
|
|
1067
|
-
await new Promise((r) => setTimeout(r, 10))
|
|
1068
|
-
return { done: true }
|
|
1069
|
-
},
|
|
1070
|
-
})
|
|
1071
|
-
|
|
1072
|
-
const { output } = await serve(cli, ['async'])
|
|
1073
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1074
|
-
"done: true
|
|
1075
|
-
"
|
|
1076
|
-
`)
|
|
1077
|
-
})
|
|
1078
|
-
|
|
1079
|
-
test('--format json outputs JSON data', async () => {
|
|
1080
|
-
const cli = Cli.create('test')
|
|
1081
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
1082
|
-
const { output } = await serve(cli, ['ping', '--format', 'json'])
|
|
1083
|
-
expect(JSON.parse(output)).toEqual({ pong: true })
|
|
1084
|
-
})
|
|
1085
|
-
|
|
1086
|
-
test('--json is shorthand for --format json', async () => {
|
|
1087
|
-
const cli = Cli.create('test')
|
|
1088
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
1089
|
-
const { output } = await serve(cli, ['ping', '--json'])
|
|
1090
|
-
expect(JSON.parse(output)).toEqual({ pong: true })
|
|
1091
|
-
})
|
|
1092
|
-
|
|
1093
|
-
test('--json parses top-level JSON strings instead of quoting them again', async () => {
|
|
1094
|
-
const cli = Cli.create('test')
|
|
1095
|
-
cli.command('snapshot', {
|
|
1096
|
-
output: z.string(),
|
|
1097
|
-
run: () => JSON.stringify({ url: 'https://example.com/', title: '' }),
|
|
1098
|
-
})
|
|
1099
|
-
|
|
1100
|
-
const { output } = await serve(cli, ['snapshot', '--json'])
|
|
1101
|
-
expect(JSON.parse(output)).toEqual({ url: 'https://example.com/', title: '' })
|
|
1102
|
-
})
|
|
1103
|
-
|
|
1104
|
-
test('--full-output --format json outputs full envelope as JSON', async () => {
|
|
1105
|
-
const cli = Cli.create('test')
|
|
1106
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
1107
|
-
const { output } = await serve(cli, ['ping', '--full-output', '--format', 'json'])
|
|
1108
|
-
const parsed = JSON.parse(output)
|
|
1109
|
-
expect(parsed.ok).toBe(true)
|
|
1110
|
-
expect(parsed.data).toEqual({ pong: true })
|
|
1111
|
-
expect(parsed.meta.command).toBe('ping')
|
|
1112
|
-
})
|
|
1113
|
-
|
|
1114
|
-
test('error output respects --format json', async () => {
|
|
1115
|
-
const cli = Cli.create('test')
|
|
1116
|
-
cli.command('fail', {
|
|
1117
|
-
run() {
|
|
1118
|
-
throw new Error('boom')
|
|
1119
|
-
},
|
|
1120
|
-
})
|
|
1121
|
-
const { output, exitCode } = await serve(cli, ['fail', '--format', 'json'])
|
|
1122
|
-
expect(exitCode).toBe(1)
|
|
1123
|
-
const parsed = JSON.parse(output)
|
|
1124
|
-
expect(parsed.code).toBe('UNKNOWN')
|
|
1125
|
-
expect(parsed.message).toBe('boom')
|
|
1126
|
-
})
|
|
1127
|
-
})
|
|
1128
|
-
|
|
1129
|
-
describe('--llms-full', () => {
|
|
1130
|
-
test('outputs manifest with version and commands', async () => {
|
|
1131
|
-
const cli = Cli.create('test')
|
|
1132
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
1133
|
-
|
|
1134
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
1135
|
-
const manifest = JSON.parse(output)
|
|
1136
|
-
expect(manifest.version).toBe('incur.v1')
|
|
1137
|
-
expect(manifest.commands).toHaveLength(1)
|
|
1138
|
-
expect(manifest.commands[0].name).toBe('ping')
|
|
1139
|
-
expect(manifest.commands[0].description).toBe('Health check')
|
|
1140
|
-
})
|
|
1141
|
-
|
|
1142
|
-
test('manifest includes schema.input from args and options', async () => {
|
|
1143
|
-
const cli = Cli.create('test')
|
|
1144
|
-
cli.command('greet', {
|
|
1145
|
-
args: z.object({ name: z.string() }),
|
|
1146
|
-
options: z.object({ loud: z.boolean().default(false) }),
|
|
1147
|
-
run: ({ args }) => ({ message: `hello ${args.name}` }),
|
|
1148
|
-
})
|
|
1149
|
-
|
|
1150
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
1151
|
-
const manifest = JSON.parse(output)
|
|
1152
|
-
expect(manifest.commands[0].schema.args).toEqual({
|
|
1153
|
-
type: 'object',
|
|
1154
|
-
properties: { name: { type: 'string' } },
|
|
1155
|
-
required: ['name'],
|
|
1156
|
-
additionalProperties: false,
|
|
1157
|
-
})
|
|
1158
|
-
expect(manifest.commands[0].schema.options).toEqual({
|
|
1159
|
-
type: 'object',
|
|
1160
|
-
properties: { loud: { type: 'boolean', default: false } },
|
|
1161
|
-
required: ['loud'],
|
|
1162
|
-
additionalProperties: false,
|
|
1163
|
-
})
|
|
1164
|
-
})
|
|
1165
|
-
|
|
1166
|
-
test('manifest includes schema.output when defined', async () => {
|
|
1167
|
-
const cli = Cli.create('test')
|
|
1168
|
-
cli.command('greet', {
|
|
1169
|
-
args: z.object({ name: z.string() }),
|
|
1170
|
-
output: z.object({ message: z.string() }),
|
|
1171
|
-
run: ({ args }) => ({ message: `hello ${args.name}` }),
|
|
1172
|
-
})
|
|
1173
|
-
|
|
1174
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
1175
|
-
const manifest = JSON.parse(output)
|
|
1176
|
-
expect(manifest.commands[0].schema.output).toEqual({
|
|
1177
|
-
type: 'object',
|
|
1178
|
-
properties: { message: { type: 'string' } },
|
|
1179
|
-
required: ['message'],
|
|
1180
|
-
additionalProperties: false,
|
|
1181
|
-
})
|
|
1182
|
-
})
|
|
1183
|
-
|
|
1184
|
-
test('manifest omits schema when no schemas defined', async () => {
|
|
1185
|
-
const cli = Cli.create('test')
|
|
1186
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
1187
|
-
|
|
1188
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
1189
|
-
const manifest = JSON.parse(output)
|
|
1190
|
-
expect(manifest.commands[0].schema).toBeUndefined()
|
|
1191
|
-
})
|
|
1192
|
-
|
|
1193
|
-
test('nested commands appear with full path in manifest', async () => {
|
|
1194
|
-
const cli = Cli.create('test')
|
|
1195
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1196
|
-
.command('list', {
|
|
1197
|
-
description: 'List PRs',
|
|
1198
|
-
options: z.object({ state: z.enum(['open', 'closed']).default('open') }),
|
|
1199
|
-
run: () => ({ items: [] }),
|
|
1200
|
-
})
|
|
1201
|
-
.command('create', {
|
|
1202
|
-
description: 'Create PR',
|
|
1203
|
-
args: z.object({ title: z.string() }),
|
|
1204
|
-
run: ({ args }) => ({ title: args.title }),
|
|
1205
|
-
})
|
|
1206
|
-
cli.command(pr)
|
|
1207
|
-
|
|
1208
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
1209
|
-
const manifest = JSON.parse(output)
|
|
1210
|
-
expect(manifest.commands).toHaveLength(2)
|
|
1211
|
-
expect(manifest.commands[0].name).toBe('pr create')
|
|
1212
|
-
expect(manifest.commands[1].name).toBe('pr list')
|
|
1213
|
-
})
|
|
1214
|
-
|
|
1215
|
-
test('deeply nested commands in manifest', async () => {
|
|
1216
|
-
const cli = Cli.create('test')
|
|
1217
|
-
const review = Cli.create('review', { description: 'Reviews' }).command('approve', {
|
|
1218
|
-
description: 'Approve a review',
|
|
1219
|
-
run: () => ({ approved: true }),
|
|
1220
|
-
})
|
|
1221
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1222
|
-
pr.command(review)
|
|
1223
|
-
cli.command(pr)
|
|
1224
|
-
|
|
1225
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
1226
|
-
const manifest = JSON.parse(output)
|
|
1227
|
-
expect(manifest.commands[0].name).toBe('pr review approve')
|
|
1228
|
-
expect(manifest.commands[0].description).toBe('Approve a review')
|
|
1229
|
-
})
|
|
1230
|
-
|
|
1231
|
-
test('defaults to markdown format', async () => {
|
|
1232
|
-
const cli = Cli.create('test')
|
|
1233
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
1234
|
-
|
|
1235
|
-
const { output } = await serve(cli, ['--llms-full'])
|
|
1236
|
-
expect(output).toContain('# test ping')
|
|
1237
|
-
expect(output).toContain('Health check')
|
|
1238
|
-
})
|
|
1239
|
-
|
|
1240
|
-
test('respects --format yaml', async () => {
|
|
1241
|
-
const cli = Cli.create('test')
|
|
1242
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
1243
|
-
|
|
1244
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'yaml'])
|
|
1245
|
-
expect(output).toContain('version: incur.v1')
|
|
1246
|
-
expect(output).toContain('name: ping')
|
|
1247
|
-
})
|
|
1248
|
-
|
|
1249
|
-
test('full manifest snapshot', async () => {
|
|
1250
|
-
const cli = Cli.create('test')
|
|
1251
|
-
cli.command('greet', {
|
|
1252
|
-
description: 'Greet someone',
|
|
1253
|
-
args: z.object({ name: z.string().describe('Name to greet') }),
|
|
1254
|
-
options: z.object({ loud: z.boolean().default(false).describe('Shout it') }),
|
|
1255
|
-
output: z.object({ message: z.string() }),
|
|
1256
|
-
run: ({ args }) => ({ message: `hello ${args.name}` }),
|
|
1257
|
-
})
|
|
1258
|
-
|
|
1259
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
1260
|
-
expect(JSON.parse(output)).toMatchInlineSnapshot(`
|
|
1261
|
-
{
|
|
1262
|
-
"commands": [
|
|
1263
|
-
{
|
|
1264
|
-
"description": "Greet someone",
|
|
1265
|
-
"name": "greet",
|
|
1266
|
-
"schema": {
|
|
1267
|
-
"args": {
|
|
1268
|
-
"additionalProperties": false,
|
|
1269
|
-
"properties": {
|
|
1270
|
-
"name": {
|
|
1271
|
-
"description": "Name to greet",
|
|
1272
|
-
"type": "string",
|
|
1273
|
-
},
|
|
1274
|
-
},
|
|
1275
|
-
"required": [
|
|
1276
|
-
"name",
|
|
1277
|
-
],
|
|
1278
|
-
"type": "object",
|
|
1279
|
-
},
|
|
1280
|
-
"options": {
|
|
1281
|
-
"additionalProperties": false,
|
|
1282
|
-
"properties": {
|
|
1283
|
-
"loud": {
|
|
1284
|
-
"default": false,
|
|
1285
|
-
"description": "Shout it",
|
|
1286
|
-
"type": "boolean",
|
|
1287
|
-
},
|
|
1288
|
-
},
|
|
1289
|
-
"required": [
|
|
1290
|
-
"loud",
|
|
1291
|
-
],
|
|
1292
|
-
"type": "object",
|
|
1293
|
-
},
|
|
1294
|
-
"output": {
|
|
1295
|
-
"additionalProperties": false,
|
|
1296
|
-
"properties": {
|
|
1297
|
-
"message": {
|
|
1298
|
-
"type": "string",
|
|
1299
|
-
},
|
|
1300
|
-
},
|
|
1301
|
-
"required": [
|
|
1302
|
-
"message",
|
|
1303
|
-
],
|
|
1304
|
-
"type": "object",
|
|
1305
|
-
},
|
|
1306
|
-
},
|
|
1307
|
-
},
|
|
1308
|
-
],
|
|
1309
|
-
"version": "incur.v1",
|
|
1310
|
-
}
|
|
1311
|
-
`)
|
|
1312
|
-
})
|
|
1313
|
-
|
|
1314
|
-
test('--llms --format md outputs skill files', async () => {
|
|
1315
|
-
const cli = Cli.create('test')
|
|
1316
|
-
cli.command('greet', {
|
|
1317
|
-
description: 'Greet someone',
|
|
1318
|
-
args: z.object({ name: z.string().describe('Name to greet') }),
|
|
1319
|
-
output: z.object({ message: z.string() }),
|
|
1320
|
-
run: ({ args }) => ({ message: `hello ${args.name}` }),
|
|
1321
|
-
})
|
|
1322
|
-
|
|
1323
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'md'])
|
|
1324
|
-
expect(output).toContain('# test greet')
|
|
1325
|
-
expect(output).toContain('## Arguments')
|
|
1326
|
-
expect(output).toContain('## Output')
|
|
1327
|
-
expect(output).not.toMatch(/^---$/m)
|
|
1328
|
-
})
|
|
1329
|
-
})
|
|
1330
|
-
|
|
1331
|
-
describe('--llms', () => {
|
|
1332
|
-
test('outputs compact command index', async () => {
|
|
1333
|
-
const cli = Cli.create('test')
|
|
1334
|
-
cli.command('ping', { description: 'Health check', run: () => ({}) })
|
|
1335
|
-
cli.command('greet', {
|
|
1336
|
-
description: 'Greet someone',
|
|
1337
|
-
args: z.object({ name: z.string() }),
|
|
1338
|
-
run: () => ({}),
|
|
1339
|
-
})
|
|
1340
|
-
|
|
1341
|
-
const { output } = await serve(cli, ['--llms-full'])
|
|
1342
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1343
|
-
"# test greet
|
|
1344
|
-
|
|
1345
|
-
Greet someone
|
|
1346
|
-
|
|
1347
|
-
## Arguments
|
|
1348
|
-
|
|
1349
|
-
| Name | Type | Required | Description |
|
|
1350
|
-
|------|------|----------|-------------|
|
|
1351
|
-
| \`name\` | \`string\` | yes | |
|
|
1352
|
-
|
|
1353
|
-
# test ping
|
|
1354
|
-
|
|
1355
|
-
Health check
|
|
1356
|
-
"
|
|
1357
|
-
`)
|
|
1358
|
-
})
|
|
1359
|
-
|
|
1360
|
-
test('--llms --json strips schemas', async () => {
|
|
1361
|
-
const cli = Cli.create('test')
|
|
1362
|
-
cli.command('greet', {
|
|
1363
|
-
description: 'Greet someone',
|
|
1364
|
-
args: z.object({ name: z.string() }),
|
|
1365
|
-
output: z.object({ message: z.string() }),
|
|
1366
|
-
run: () => ({ message: 'hi' }),
|
|
1367
|
-
})
|
|
1368
|
-
|
|
1369
|
-
const { output } = await serve(cli, ['--llms', '--json'])
|
|
1370
|
-
const manifest = JSON.parse(output)
|
|
1371
|
-
expect(manifest.version).toBe('incur.v1')
|
|
1372
|
-
expect(manifest.commands).toHaveLength(1)
|
|
1373
|
-
expect(manifest.commands[0].name).toBe('greet')
|
|
1374
|
-
expect(manifest.commands[0].description).toBe('Greet someone')
|
|
1375
|
-
expect(manifest.commands[0].schema).toBeUndefined()
|
|
1376
|
-
expect(manifest.commands[0].examples).toBeUndefined()
|
|
1377
|
-
})
|
|
1378
|
-
|
|
1379
|
-
test('scopes to subtree', async () => {
|
|
1380
|
-
const cli = Cli.create('test')
|
|
1381
|
-
const group = Cli.create('auth', { description: 'Authentication' })
|
|
1382
|
-
group.command('login', { description: 'Log in', run: () => ({}) })
|
|
1383
|
-
group.command('logout', { description: 'Log out', run: () => ({}) })
|
|
1384
|
-
cli.command(group)
|
|
1385
|
-
cli.command('ping', { description: 'Health check', run: () => ({}) })
|
|
1386
|
-
|
|
1387
|
-
const { output } = await serve(cli, ['auth', '--llms'])
|
|
1388
|
-
expect(output).toContain('test auth auth login')
|
|
1389
|
-
expect(output).toContain('test auth auth logout')
|
|
1390
|
-
expect(output).not.toContain('ping')
|
|
1391
|
-
})
|
|
1392
|
-
|
|
1393
|
-
test('--llms includes root command', async () => {
|
|
1394
|
-
const cli = Cli.create('my-cli', {
|
|
1395
|
-
description: 'Fetch URLs',
|
|
1396
|
-
args: z.object({ url: z.string().describe('URL to fetch') }),
|
|
1397
|
-
options: z.object({ objective: z.string().optional().describe('Narrow content') }),
|
|
1398
|
-
run: ({ args }) => args.url,
|
|
1399
|
-
})
|
|
1400
|
-
cli.command('auth', { description: 'Auth commands', run: () => ({}) })
|
|
1401
|
-
|
|
1402
|
-
const { output } = await serve(cli, ['--llms'])
|
|
1403
|
-
expect(output).toContain('| `my-cli <url>` | Fetch URLs |')
|
|
1404
|
-
expect(output).toContain('| `my-cli auth` | Auth commands |')
|
|
1405
|
-
})
|
|
1406
|
-
|
|
1407
|
-
test('--llms-full includes root command with args/options', async () => {
|
|
1408
|
-
const cli = Cli.create('my-cli', {
|
|
1409
|
-
description: 'Fetch URLs',
|
|
1410
|
-
args: z.object({ url: z.string().describe('URL to fetch') }),
|
|
1411
|
-
options: z.object({ objective: z.string().optional().describe('Narrow content') }),
|
|
1412
|
-
output: z.string().describe('Page content'),
|
|
1413
|
-
run: ({ args }) => args.url,
|
|
1414
|
-
})
|
|
1415
|
-
cli.command('auth', { description: 'Auth commands', run: () => ({}) })
|
|
1416
|
-
|
|
1417
|
-
const { output } = await serve(cli, ['--llms-full'])
|
|
1418
|
-
expect(output).toContain('# my-cli\n\nFetch URLs')
|
|
1419
|
-
expect(output).toContain('| `url` | `string` | yes | URL to fetch |')
|
|
1420
|
-
expect(output).toContain('| `--objective` | `string` | | Narrow content |')
|
|
1421
|
-
expect(output).toContain('# my-cli auth')
|
|
1422
|
-
expect(output).not.toContain('# my-cli \n')
|
|
1423
|
-
})
|
|
1424
|
-
})
|
|
1425
|
-
|
|
1426
|
-
describe('--schema', () => {
|
|
1427
|
-
test('returns command schema in toon format', async () => {
|
|
1428
|
-
const cli = Cli.create('test')
|
|
1429
|
-
cli.command('greet', {
|
|
1430
|
-
args: z.object({ name: z.string().describe('Name to greet') }),
|
|
1431
|
-
options: z.object({ loud: z.boolean().default(false).describe('Shout') }),
|
|
1432
|
-
output: z.object({ message: z.string() }),
|
|
1433
|
-
run(c) {
|
|
1434
|
-
return { message: `hello ${c.args.name}` }
|
|
1435
|
-
},
|
|
1436
|
-
})
|
|
1437
|
-
const { output } = await serve(cli, ['greet', '--schema'])
|
|
1438
|
-
expect(output).toContain('args')
|
|
1439
|
-
expect(output).toContain('options')
|
|
1440
|
-
expect(output).toContain('output')
|
|
1441
|
-
})
|
|
1442
|
-
|
|
1443
|
-
test('returns command schema as JSON', async () => {
|
|
1444
|
-
const cli = Cli.create('test')
|
|
1445
|
-
cli.command('greet', {
|
|
1446
|
-
args: z.object({ name: z.string().describe('Name to greet') }),
|
|
1447
|
-
options: z.object({ loud: z.boolean().default(false).describe('Shout') }),
|
|
1448
|
-
output: z.object({ message: z.string() }),
|
|
1449
|
-
run(c) {
|
|
1450
|
-
return { message: `hello ${c.args.name}` }
|
|
1451
|
-
},
|
|
1452
|
-
})
|
|
1453
|
-
const { output } = await serve(cli, ['greet', '--schema', '--format', 'json'])
|
|
1454
|
-
expect(JSON.parse(output)).toMatchInlineSnapshot(`
|
|
1455
|
-
{
|
|
1456
|
-
"args": {
|
|
1457
|
-
"additionalProperties": false,
|
|
1458
|
-
"properties": {
|
|
1459
|
-
"name": {
|
|
1460
|
-
"description": "Name to greet",
|
|
1461
|
-
"type": "string",
|
|
1462
|
-
},
|
|
1463
|
-
},
|
|
1464
|
-
"required": [
|
|
1465
|
-
"name",
|
|
1466
|
-
],
|
|
1467
|
-
"type": "object",
|
|
1468
|
-
},
|
|
1469
|
-
"options": {
|
|
1470
|
-
"additionalProperties": false,
|
|
1471
|
-
"properties": {
|
|
1472
|
-
"loud": {
|
|
1473
|
-
"default": false,
|
|
1474
|
-
"description": "Shout",
|
|
1475
|
-
"type": "boolean",
|
|
1476
|
-
},
|
|
1477
|
-
},
|
|
1478
|
-
"required": [
|
|
1479
|
-
"loud",
|
|
1480
|
-
],
|
|
1481
|
-
"type": "object",
|
|
1482
|
-
},
|
|
1483
|
-
"output": {
|
|
1484
|
-
"additionalProperties": false,
|
|
1485
|
-
"properties": {
|
|
1486
|
-
"message": {
|
|
1487
|
-
"type": "string",
|
|
1488
|
-
},
|
|
1489
|
-
},
|
|
1490
|
-
"required": [
|
|
1491
|
-
"message",
|
|
1492
|
-
],
|
|
1493
|
-
"type": "object",
|
|
1494
|
-
},
|
|
1495
|
-
}
|
|
1496
|
-
`)
|
|
1497
|
-
})
|
|
1498
|
-
|
|
1499
|
-
test('on root command', async () => {
|
|
1500
|
-
const cli = Cli.create('test', {
|
|
1501
|
-
args: z.object({ name: z.string() }),
|
|
1502
|
-
output: z.object({ greeting: z.string() }),
|
|
1503
|
-
run(c) {
|
|
1504
|
-
return { greeting: `hi ${c.args.name}` }
|
|
1505
|
-
},
|
|
1506
|
-
})
|
|
1507
|
-
const { output } = await serve(cli, ['--schema', '--format', 'json'])
|
|
1508
|
-
const parsed = JSON.parse(output)
|
|
1509
|
-
expect(parsed.args).toBeDefined()
|
|
1510
|
-
expect(parsed.output).toBeDefined()
|
|
1511
|
-
})
|
|
1512
|
-
|
|
1513
|
-
test('on unknown command shows error', async () => {
|
|
1514
|
-
const cli = Cli.create('test')
|
|
1515
|
-
cli.command('greet', { run: () => ({}) })
|
|
1516
|
-
const { output, exitCode } = await serve(cli, ['nope', '--schema'])
|
|
1517
|
-
expect(output).toContain("'nope' is not a command")
|
|
1518
|
-
expect(exitCode).toBe(1)
|
|
1519
|
-
})
|
|
1520
|
-
|
|
1521
|
-
test('on unknown command suggests similar', async () => {
|
|
1522
|
-
const cli = Cli.create('test')
|
|
1523
|
-
cli.command('greet', { run: () => ({}) })
|
|
1524
|
-
const { output, exitCode } = await serve(cli, ['grete', '--schema'])
|
|
1525
|
-
expect(output).toContain("Did you mean 'greet'?")
|
|
1526
|
-
expect(exitCode).toBe(1)
|
|
1527
|
-
})
|
|
1528
|
-
|
|
1529
|
-
test('on group shows available commands', async () => {
|
|
1530
|
-
const cli = Cli.create('test')
|
|
1531
|
-
const pr = Cli.create('pr', { description: 'PR management' }).command('list', {
|
|
1532
|
-
description: 'List PRs',
|
|
1533
|
-
run: () => ({ items: [] }),
|
|
1534
|
-
})
|
|
1535
|
-
cli.command(pr)
|
|
1536
|
-
const { output } = await serve(cli, ['pr', '--schema'])
|
|
1537
|
-
expect(output).toContain('pr')
|
|
1538
|
-
expect(output).toContain('list')
|
|
1539
|
-
})
|
|
1540
|
-
|
|
1541
|
-
test('omits empty schema sections', async () => {
|
|
1542
|
-
const cli = Cli.create('test')
|
|
1543
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
1544
|
-
const { output } = await serve(cli, ['ping', '--schema', '--format', 'json'])
|
|
1545
|
-
expect(JSON.parse(output)).toMatchInlineSnapshot('{}')
|
|
1546
|
-
})
|
|
1547
|
-
})
|
|
1548
|
-
|
|
1549
|
-
describe('subcommands', () => {
|
|
1550
|
-
test('creates a command group with name and description', () => {
|
|
1551
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1552
|
-
expect(pr.name).toBe('pr')
|
|
1553
|
-
expect(pr.description).toBe('PR management')
|
|
1554
|
-
})
|
|
1555
|
-
|
|
1556
|
-
test('group registers sub-commands and is chainable', () => {
|
|
1557
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1558
|
-
const result = pr.command('list', { run: () => ({ count: 0 }) })
|
|
1559
|
-
expect(result).toBe(pr)
|
|
1560
|
-
})
|
|
1561
|
-
|
|
1562
|
-
test('routes to sub-command', async () => {
|
|
1563
|
-
const cli = Cli.create('test')
|
|
1564
|
-
const pr = Cli.create('pr', { description: 'PR management' }).command('list', {
|
|
1565
|
-
run: () => ({ count: 0 }),
|
|
1566
|
-
})
|
|
1567
|
-
cli.command(pr)
|
|
1568
|
-
|
|
1569
|
-
const { output } = await serve(cli, ['pr', 'list'])
|
|
1570
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1571
|
-
"count: 0
|
|
1572
|
-
"
|
|
1573
|
-
`)
|
|
1574
|
-
})
|
|
1575
|
-
|
|
1576
|
-
test('sub-command receives parsed args and options', async () => {
|
|
1577
|
-
const cli = Cli.create('test')
|
|
1578
|
-
const pr = Cli.create('pr', { description: 'PR management' }).command('get', {
|
|
1579
|
-
args: z.object({ id: z.string() }),
|
|
1580
|
-
options: z.object({ draft: z.boolean().default(false) }),
|
|
1581
|
-
run: ({ args, options }) => ({ id: args.id, draft: options.draft }),
|
|
1582
|
-
})
|
|
1583
|
-
cli.command(pr)
|
|
1584
|
-
|
|
1585
|
-
const { output } = await serve(cli, ['pr', 'get', '42', '--draft'])
|
|
1586
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1587
|
-
"id: "42"
|
|
1588
|
-
draft: true
|
|
1589
|
-
"
|
|
1590
|
-
`)
|
|
1591
|
-
})
|
|
1592
|
-
|
|
1593
|
-
test('--full-output shows full command path in meta', async () => {
|
|
1594
|
-
const cli = Cli.create('test')
|
|
1595
|
-
const pr = Cli.create('pr', { description: 'PR management' }).command('list', {
|
|
1596
|
-
run: () => ({ count: 0 }),
|
|
1597
|
-
})
|
|
1598
|
-
cli.command(pr)
|
|
1599
|
-
|
|
1600
|
-
const { output } = await serve(cli, ['pr', 'list', '--full-output'])
|
|
1601
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1602
|
-
"ok: true
|
|
1603
|
-
data:
|
|
1604
|
-
count: 0
|
|
1605
|
-
meta:
|
|
1606
|
-
command: pr list
|
|
1607
|
-
duration: <stripped>
|
|
1608
|
-
"
|
|
1609
|
-
`)
|
|
1610
|
-
})
|
|
1611
|
-
|
|
1612
|
-
test('routes to deeply nested sub-commands', async () => {
|
|
1613
|
-
const cli = Cli.create('test')
|
|
1614
|
-
const review = Cli.create('review', { description: 'Reviews' }).command('approve', {
|
|
1615
|
-
run: () => ({ approved: true }),
|
|
1616
|
-
})
|
|
1617
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1618
|
-
pr.command(review)
|
|
1619
|
-
cli.command(pr)
|
|
1620
|
-
|
|
1621
|
-
const { output } = await serve(cli, ['pr', 'review', 'approve'])
|
|
1622
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1623
|
-
"approved: true
|
|
1624
|
-
"
|
|
1625
|
-
`)
|
|
1626
|
-
})
|
|
1627
|
-
|
|
1628
|
-
test('nested group shows full path in full-output meta', async () => {
|
|
1629
|
-
const cli = Cli.create('test')
|
|
1630
|
-
const review = Cli.create('review', { description: 'Reviews' }).command('approve', {
|
|
1631
|
-
run: () => ({ approved: true }),
|
|
1632
|
-
})
|
|
1633
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1634
|
-
pr.command(review)
|
|
1635
|
-
cli.command(pr)
|
|
1636
|
-
|
|
1637
|
-
const { output } = await serve(cli, ['pr', 'review', 'approve', '--full-output'])
|
|
1638
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1639
|
-
"ok: true
|
|
1640
|
-
data:
|
|
1641
|
-
approved: true
|
|
1642
|
-
meta:
|
|
1643
|
-
command: pr review approve
|
|
1644
|
-
duration: <stripped>
|
|
1645
|
-
"
|
|
1646
|
-
`)
|
|
1647
|
-
})
|
|
1648
|
-
|
|
1649
|
-
test('unknown subcommand lists available commands', async () => {
|
|
1650
|
-
const cli = Cli.create('test')
|
|
1651
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1652
|
-
.command('list', { run: () => ({}) })
|
|
1653
|
-
.command('create', { run: () => ({}) })
|
|
1654
|
-
cli.command(pr)
|
|
1655
|
-
|
|
1656
|
-
const { output, exitCode } = await serve(cli, ['pr', 'unknown'])
|
|
1657
|
-
expect(exitCode).toBe(1)
|
|
1658
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1659
|
-
"code: COMMAND_NOT_FOUND
|
|
1660
|
-
message: 'unknown' is not a command for 'test pr'.
|
|
1661
|
-
cta:
|
|
1662
|
-
description: "Suggested command:"
|
|
1663
|
-
commands[1]{command,description}:
|
|
1664
|
-
test pr --help,see all available commands
|
|
1665
|
-
"
|
|
1666
|
-
`)
|
|
1667
|
-
})
|
|
1668
|
-
|
|
1669
|
-
test('unknown subcommand shows human error in TTY', async () => {
|
|
1670
|
-
;(process.stdout as any).isTTY = true
|
|
1671
|
-
const cli = Cli.create('test')
|
|
1672
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1673
|
-
.command('list', { run: () => ({}) })
|
|
1674
|
-
.command('create', { run: () => ({}) })
|
|
1675
|
-
cli.command(pr)
|
|
1676
|
-
|
|
1677
|
-
const { output, exitCode } = await serve(cli, ['pr', 'unknown'])
|
|
1678
|
-
;(process.stdout as any).isTTY = false
|
|
1679
|
-
expect(exitCode).toBe(1)
|
|
1680
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1681
|
-
"Error: 'unknown' is not a command for 'test pr'.
|
|
1682
|
-
|
|
1683
|
-
Suggested command:
|
|
1684
|
-
test pr --help # see all available commands
|
|
1685
|
-
"
|
|
1686
|
-
`)
|
|
1687
|
-
})
|
|
1688
|
-
|
|
1689
|
-
test('group without subcommand shows help', async () => {
|
|
1690
|
-
const cli = Cli.create('test')
|
|
1691
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
1692
|
-
.command('list', { run: () => ({}) })
|
|
1693
|
-
.command('create', { run: () => ({}) })
|
|
1694
|
-
cli.command(pr)
|
|
1695
|
-
|
|
1696
|
-
const { output, exitCode } = await serve(cli, ['pr'])
|
|
1697
|
-
expect(exitCode).toBeUndefined()
|
|
1698
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1699
|
-
"test pr — PR management
|
|
1700
|
-
|
|
1701
|
-
Usage: test pr <command>
|
|
1702
|
-
|
|
1703
|
-
Commands:
|
|
1704
|
-
create
|
|
1705
|
-
list
|
|
1706
|
-
|
|
1707
|
-
Global Options:
|
|
1708
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
1709
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
1710
|
-
--full-output Show full output envelope
|
|
1711
|
-
--help Show help
|
|
1712
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
1713
|
-
--schema Show JSON Schema for command
|
|
1714
|
-
--token-count Print token count of output (instead of output)
|
|
1715
|
-
--token-limit <n> Limit output to n tokens
|
|
1716
|
-
--token-offset <n> Skip first n tokens of output
|
|
1717
|
-
"
|
|
1718
|
-
`)
|
|
1719
|
-
})
|
|
1720
|
-
|
|
1721
|
-
test('sub-commands from separate module can be mounted', async () => {
|
|
1722
|
-
function createPrCommands() {
|
|
1723
|
-
return Cli.create('pr', { description: 'PR management' }).command('list', {
|
|
1724
|
-
run: () => ({ count: 0 }),
|
|
1725
|
-
})
|
|
1726
|
-
}
|
|
1727
|
-
|
|
1728
|
-
const cli = Cli.create('test')
|
|
1729
|
-
cli.command(createPrCommands())
|
|
1730
|
-
|
|
1731
|
-
const { output } = await serve(cli, ['pr', 'list'])
|
|
1732
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1733
|
-
"count: 0
|
|
1734
|
-
"
|
|
1735
|
-
`)
|
|
1736
|
-
})
|
|
1737
|
-
|
|
1738
|
-
test('error in sub-command wraps in error envelope', async () => {
|
|
1739
|
-
const cli = Cli.create('test')
|
|
1740
|
-
const pr = Cli.create('pr', { description: 'PR management' }).command('fail', {
|
|
1741
|
-
run() {
|
|
1742
|
-
throw new Error('sub-boom')
|
|
1743
|
-
},
|
|
1744
|
-
})
|
|
1745
|
-
cli.command(pr)
|
|
1746
|
-
|
|
1747
|
-
const { output, exitCode } = await serve(cli, ['pr', 'fail'])
|
|
1748
|
-
expect(exitCode).toBe(1)
|
|
1749
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1750
|
-
"code: UNKNOWN
|
|
1751
|
-
message: sub-boom
|
|
1752
|
-
"
|
|
1753
|
-
`)
|
|
1754
|
-
})
|
|
1755
|
-
|
|
1756
|
-
test('error in sub-command shows human format in TTY', async () => {
|
|
1757
|
-
;(process.stdout as any).isTTY = true
|
|
1758
|
-
const cli = Cli.create('test')
|
|
1759
|
-
const pr = Cli.create('pr', { description: 'PR management' }).command('fail', {
|
|
1760
|
-
run() {
|
|
1761
|
-
throw new Error('sub-boom')
|
|
1762
|
-
},
|
|
1763
|
-
})
|
|
1764
|
-
cli.command(pr)
|
|
1765
|
-
|
|
1766
|
-
const { output, exitCode } = await serve(cli, ['pr', 'fail'])
|
|
1767
|
-
;(process.stdout as any).isTTY = false
|
|
1768
|
-
expect(exitCode).toBe(1)
|
|
1769
|
-
expect(output).toMatchInlineSnapshot(`
|
|
1770
|
-
"Error: sub-boom
|
|
1771
|
-
"
|
|
1772
|
-
`)
|
|
1773
|
-
})
|
|
1774
|
-
|
|
1775
|
-
test('group error respects --format json', async () => {
|
|
1776
|
-
const cli = Cli.create('test')
|
|
1777
|
-
const pr = Cli.create('pr', { description: 'PR management' }).command('list', {
|
|
1778
|
-
run: () => ({}),
|
|
1779
|
-
})
|
|
1780
|
-
cli.command(pr)
|
|
1781
|
-
|
|
1782
|
-
const { output, exitCode } = await serve(cli, ['pr', 'unknown', '--format', 'json'])
|
|
1783
|
-
expect(exitCode).toBe(1)
|
|
1784
|
-
const parsed = JSON.parse(output)
|
|
1785
|
-
expect(parsed.code).toBe('COMMAND_NOT_FOUND')
|
|
1786
|
-
expect(parsed.message).toContain('unknown')
|
|
1787
|
-
})
|
|
1788
|
-
})
|
|
1789
|
-
|
|
1790
|
-
describe('cta', () => {
|
|
1791
|
-
test('string shorthand for cta commands', async () => {
|
|
1792
|
-
const cli = Cli.create('test')
|
|
1793
|
-
cli.command('list', {
|
|
1794
|
-
run(c) {
|
|
1795
|
-
return c.ok({ items: [] }, { cta: { commands: ['get 1', 'get 2'] } })
|
|
1796
|
-
},
|
|
1797
|
-
})
|
|
1798
|
-
|
|
1799
|
-
const { output } = await serve(cli, ['list', '--full-output', '--format', 'json'])
|
|
1800
|
-
const parsed = JSON.parse(output)
|
|
1801
|
-
expect(parsed.meta.cta).toEqual({
|
|
1802
|
-
description: 'Suggested commands:',
|
|
1803
|
-
commands: [{ command: 'test get 1' }, { command: 'test get 2' }],
|
|
1804
|
-
})
|
|
1805
|
-
})
|
|
1806
|
-
|
|
1807
|
-
test('tuple shorthand with description', async () => {
|
|
1808
|
-
const cli = Cli.create('test')
|
|
1809
|
-
cli.command('list', {
|
|
1810
|
-
run(c) {
|
|
1811
|
-
return c.ok(
|
|
1812
|
-
{ items: [] },
|
|
1813
|
-
{
|
|
1814
|
-
cta: { commands: [{ command: 'get 1', description: 'View item 1' }] },
|
|
1815
|
-
},
|
|
1816
|
-
)
|
|
1817
|
-
},
|
|
1818
|
-
})
|
|
1819
|
-
|
|
1820
|
-
const { output } = await serve(cli, ['list', '--full-output', '--format', 'json'])
|
|
1821
|
-
const parsed = JSON.parse(output)
|
|
1822
|
-
expect(parsed.meta.cta.commands).toEqual([
|
|
1823
|
-
{ command: 'test get 1', description: 'View item 1' },
|
|
1824
|
-
])
|
|
1825
|
-
})
|
|
1826
|
-
|
|
1827
|
-
test('tuple form with args/options', async () => {
|
|
1828
|
-
const cli = Cli.create('test')
|
|
1829
|
-
cli.command('create', {
|
|
1830
|
-
run(c) {
|
|
1831
|
-
return c.ok(
|
|
1832
|
-
{ id: 1 },
|
|
1833
|
-
{
|
|
1834
|
-
cta: {
|
|
1835
|
-
commands: [
|
|
1836
|
-
{
|
|
1837
|
-
command: 'get',
|
|
1838
|
-
args: { id: 1 },
|
|
1839
|
-
options: { limit: 10 },
|
|
1840
|
-
description: 'View the item',
|
|
1841
|
-
},
|
|
1842
|
-
],
|
|
1843
|
-
},
|
|
1844
|
-
},
|
|
1845
|
-
)
|
|
1846
|
-
},
|
|
1847
|
-
})
|
|
1848
|
-
|
|
1849
|
-
const { output } = await serve(cli, ['create', '--full-output', '--format', 'json'])
|
|
1850
|
-
const parsed = JSON.parse(output)
|
|
1851
|
-
expect(parsed.meta.cta.commands).toEqual([
|
|
1852
|
-
{ command: 'test get 1 --limit 10', description: 'View the item' },
|
|
1853
|
-
])
|
|
1854
|
-
})
|
|
1855
|
-
|
|
1856
|
-
test('tuple form boolean args format as placeholders', async () => {
|
|
1857
|
-
const cli = Cli.create('test')
|
|
1858
|
-
cli.command('list', {
|
|
1859
|
-
run(c) {
|
|
1860
|
-
return c.ok(
|
|
1861
|
-
{ items: [] },
|
|
1862
|
-
{
|
|
1863
|
-
cta: { commands: [{ command: 'get', args: { id: true }, options: { format: true } }] },
|
|
1864
|
-
},
|
|
1865
|
-
)
|
|
1866
|
-
},
|
|
1867
|
-
})
|
|
1868
|
-
|
|
1869
|
-
const { output } = await serve(cli, ['list', '--full-output', '--format', 'json'])
|
|
1870
|
-
const parsed = JSON.parse(output)
|
|
1871
|
-
expect(parsed.meta.cta.commands).toEqual([{ command: 'test get <id> --format <format>' }])
|
|
1872
|
-
})
|
|
1873
|
-
|
|
1874
|
-
test('custom cta description', async () => {
|
|
1875
|
-
const cli = Cli.create('test')
|
|
1876
|
-
cli.command('create', {
|
|
1877
|
-
run(c) {
|
|
1878
|
-
return c.ok(
|
|
1879
|
-
{ id: 1 },
|
|
1880
|
-
{
|
|
1881
|
-
cta: { description: 'View the created item:', commands: ['get 1'] },
|
|
1882
|
-
},
|
|
1883
|
-
)
|
|
1884
|
-
},
|
|
1885
|
-
})
|
|
1886
|
-
|
|
1887
|
-
const { output } = await serve(cli, ['create', '--full-output', '--format', 'json'])
|
|
1888
|
-
const parsed = JSON.parse(output)
|
|
1889
|
-
expect(parsed.meta.cta.description).toBe('View the created item:')
|
|
1890
|
-
})
|
|
1891
|
-
|
|
1892
|
-
test('plain return omits meta.cta', async () => {
|
|
1893
|
-
const cli = Cli.create('test')
|
|
1894
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
1895
|
-
|
|
1896
|
-
const { output } = await serve(cli, ['ping', '--full-output', '--format', 'json'])
|
|
1897
|
-
const parsed = JSON.parse(output)
|
|
1898
|
-
expect(parsed.meta.cta).toBeUndefined()
|
|
1899
|
-
})
|
|
1900
|
-
|
|
1901
|
-
test('empty commands array omits meta.cta', async () => {
|
|
1902
|
-
const cli = Cli.create('test')
|
|
1903
|
-
cli.command('noop', {
|
|
1904
|
-
run({ ok }) {
|
|
1905
|
-
return ok({ done: true }, { cta: { commands: [] } })
|
|
1906
|
-
},
|
|
1907
|
-
})
|
|
1908
|
-
|
|
1909
|
-
const { output } = await serve(cli, ['noop', '--full-output', '--format', 'json'])
|
|
1910
|
-
const parsed = JSON.parse(output)
|
|
1911
|
-
expect(parsed.meta.cta).toBeUndefined()
|
|
1912
|
-
})
|
|
1913
|
-
|
|
1914
|
-
test('error() with cta', async () => {
|
|
1915
|
-
const cli = Cli.create('test')
|
|
1916
|
-
cli.command('fail', {
|
|
1917
|
-
run({ error }) {
|
|
1918
|
-
return error({
|
|
1919
|
-
code: 'NOT_AUTHENTICATED',
|
|
1920
|
-
message: 'Not logged in',
|
|
1921
|
-
cta: {
|
|
1922
|
-
description: 'Authenticate to continue:',
|
|
1923
|
-
commands: ['auth login'],
|
|
1924
|
-
},
|
|
1925
|
-
})
|
|
1926
|
-
},
|
|
1927
|
-
})
|
|
1928
|
-
|
|
1929
|
-
const { output, exitCode } = await serve(cli, ['fail', '--full-output', '--format', 'json'])
|
|
1930
|
-
expect(exitCode).toBe(1)
|
|
1931
|
-
const parsed = JSON.parse(output)
|
|
1932
|
-
expect(parsed.ok).toBe(false)
|
|
1933
|
-
expect(parsed.meta.cta).toEqual({
|
|
1934
|
-
description: 'Authenticate to continue:',
|
|
1935
|
-
commands: [{ command: 'test auth login' }],
|
|
1936
|
-
})
|
|
1937
|
-
})
|
|
1938
|
-
|
|
1939
|
-
test('error() without cta omits meta.cta', async () => {
|
|
1940
|
-
const cli = Cli.create('test')
|
|
1941
|
-
cli.command('fail', {
|
|
1942
|
-
run({ error }) {
|
|
1943
|
-
return error({ code: 'FAILED', message: 'Something went wrong' })
|
|
1944
|
-
},
|
|
1945
|
-
})
|
|
1946
|
-
|
|
1947
|
-
const { output, exitCode } = await serve(cli, ['fail', '--full-output', '--format', 'json'])
|
|
1948
|
-
expect(exitCode).toBe(1)
|
|
1949
|
-
const parsed = JSON.parse(output)
|
|
1950
|
-
expect(parsed.meta.cta).toBeUndefined()
|
|
1951
|
-
})
|
|
1952
|
-
|
|
1953
|
-
test('thrown error does not include cta', async () => {
|
|
1954
|
-
const cli = Cli.create('test')
|
|
1955
|
-
cli.command('fail', {
|
|
1956
|
-
run() {
|
|
1957
|
-
throw new Error('boom')
|
|
1958
|
-
},
|
|
1959
|
-
})
|
|
1960
|
-
|
|
1961
|
-
const { output } = await serve(cli, ['fail', '--full-output', '--format', 'json'])
|
|
1962
|
-
const parsed = JSON.parse(output)
|
|
1963
|
-
expect(parsed.ok).toBe(false)
|
|
1964
|
-
expect(parsed.meta.cta).toBeUndefined()
|
|
1965
|
-
})
|
|
1966
|
-
|
|
1967
|
-
test('ok() cta works with sub-commands', async () => {
|
|
1968
|
-
const cli = Cli.create('test')
|
|
1969
|
-
const pr = Cli.create('pr', { description: 'PR management' }).command('create', {
|
|
1970
|
-
args: z.object({ title: z.string() }),
|
|
1971
|
-
output: z.object({ id: z.number(), title: z.string() }),
|
|
1972
|
-
run({ args, ok }) {
|
|
1973
|
-
return ok(
|
|
1974
|
-
{ id: 42, title: args.title },
|
|
1975
|
-
{
|
|
1976
|
-
cta: { commands: [{ command: 'pr get 42', description: 'View the PR' }] },
|
|
1977
|
-
},
|
|
1978
|
-
)
|
|
1979
|
-
},
|
|
1980
|
-
})
|
|
1981
|
-
cli.command(pr)
|
|
1982
|
-
|
|
1983
|
-
const { output } = await serve(cli, [
|
|
1984
|
-
'pr',
|
|
1985
|
-
'create',
|
|
1986
|
-
'my-pr',
|
|
1987
|
-
'--full-output',
|
|
1988
|
-
'--format',
|
|
1989
|
-
'json',
|
|
1990
|
-
])
|
|
1991
|
-
const parsed = JSON.parse(output)
|
|
1992
|
-
expect(parsed.meta.cta).toEqual({
|
|
1993
|
-
description: 'Suggested command:',
|
|
1994
|
-
commands: [{ command: 'test pr get 42', description: 'View the PR' }],
|
|
1995
|
-
})
|
|
1996
|
-
})
|
|
1997
|
-
})
|
|
1998
|
-
|
|
1999
|
-
describe('leaf cli', () => {
|
|
2000
|
-
test('create with run returns a cli with command method', () => {
|
|
2001
|
-
const cli = Cli.create('ping', { run: () => ({ pong: true }) })
|
|
2002
|
-
expect(cli.name).toBe('ping')
|
|
2003
|
-
expect('command' in cli).toBe(true)
|
|
2004
|
-
})
|
|
2005
|
-
|
|
2006
|
-
test('serves without a command name in argv', async () => {
|
|
2007
|
-
const cli = Cli.create('ping', { run: () => ({ pong: true }) })
|
|
2008
|
-
const { output } = await serve(cli, [])
|
|
2009
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2010
|
-
"pong: true
|
|
2011
|
-
"
|
|
2012
|
-
`)
|
|
2013
|
-
})
|
|
2014
|
-
|
|
2015
|
-
test('parses args and options', async () => {
|
|
2016
|
-
const cli = Cli.create('greet', {
|
|
2017
|
-
args: z.object({ name: z.string() }),
|
|
2018
|
-
options: z.object({ loud: z.boolean().default(false) }),
|
|
2019
|
-
run({ args, options }) {
|
|
2020
|
-
return { message: options.loud ? `HELLO ${args.name}` : `hello ${args.name}` }
|
|
2021
|
-
},
|
|
2022
|
-
})
|
|
2023
|
-
const { output } = await serve(cli, ['world', '--loud'])
|
|
2024
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2025
|
-
"message: HELLO world
|
|
2026
|
-
"
|
|
2027
|
-
`)
|
|
2028
|
-
})
|
|
2029
|
-
|
|
2030
|
-
test('command option named verbose is parsed by the command', async () => {
|
|
2031
|
-
const cli = Cli.create('ping', {
|
|
2032
|
-
options: z.object({ verbose: z.boolean().default(false) }),
|
|
2033
|
-
run({ options }) {
|
|
2034
|
-
return options
|
|
2035
|
-
},
|
|
2036
|
-
})
|
|
2037
|
-
|
|
2038
|
-
const { output } = await serve(cli, ['--verbose'])
|
|
2039
|
-
|
|
2040
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2041
|
-
"verbose: true
|
|
2042
|
-
"
|
|
2043
|
-
`)
|
|
2044
|
-
})
|
|
2045
|
-
|
|
2046
|
-
test('--full-output outputs full envelope', async () => {
|
|
2047
|
-
const cli = Cli.create('ping', { run: () => ({ pong: true }) })
|
|
2048
|
-
const { output } = await serve(cli, ['--full-output'])
|
|
2049
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2050
|
-
"ok: true
|
|
2051
|
-
data:
|
|
2052
|
-
pong: true
|
|
2053
|
-
meta:
|
|
2054
|
-
command: ping
|
|
2055
|
-
duration: <stripped>
|
|
2056
|
-
"
|
|
2057
|
-
`)
|
|
2058
|
-
})
|
|
2059
|
-
|
|
2060
|
-
test('--format json works', async () => {
|
|
2061
|
-
const cli = Cli.create('ping', { run: () => ({ pong: true }) })
|
|
2062
|
-
const { output } = await serve(cli, ['--format', 'json'])
|
|
2063
|
-
expect(JSON.parse(output)).toEqual({ pong: true })
|
|
2064
|
-
})
|
|
2065
|
-
|
|
2066
|
-
test('errors wrap in error envelope', async () => {
|
|
2067
|
-
const cli = Cli.create('fail', {
|
|
2068
|
-
run() {
|
|
2069
|
-
throw new Error('boom')
|
|
2070
|
-
},
|
|
2071
|
-
})
|
|
2072
|
-
const { output, exitCode } = await serve(cli, [])
|
|
2073
|
-
expect(exitCode).toBe(1)
|
|
2074
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2075
|
-
"code: UNKNOWN
|
|
2076
|
-
message: boom
|
|
2077
|
-
"
|
|
2078
|
-
`)
|
|
2079
|
-
})
|
|
2080
|
-
|
|
2081
|
-
test('errors show human format in TTY', async () => {
|
|
2082
|
-
;(process.stdout as any).isTTY = true
|
|
2083
|
-
const cli = Cli.create('fail', {
|
|
2084
|
-
run() {
|
|
2085
|
-
throw new Error('boom')
|
|
2086
|
-
},
|
|
2087
|
-
})
|
|
2088
|
-
const { output, exitCode } = await serve(cli, [])
|
|
2089
|
-
;(process.stdout as any).isTTY = false
|
|
2090
|
-
expect(exitCode).toBe(1)
|
|
2091
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2092
|
-
"Error: boom
|
|
2093
|
-
"
|
|
2094
|
-
`)
|
|
2095
|
-
})
|
|
2096
|
-
|
|
2097
|
-
test('can be mounted on a parent as a single command', async () => {
|
|
2098
|
-
const ping = Cli.create('ping', {
|
|
2099
|
-
description: 'Health check',
|
|
2100
|
-
run: () => ({ pong: true }),
|
|
2101
|
-
})
|
|
2102
|
-
const cli = Cli.create('app')
|
|
2103
|
-
cli.command(ping)
|
|
2104
|
-
|
|
2105
|
-
const { output } = await serve(cli, ['ping'])
|
|
2106
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2107
|
-
"pong: true
|
|
2108
|
-
"
|
|
2109
|
-
`)
|
|
2110
|
-
})
|
|
2111
|
-
|
|
2112
|
-
test('mounted leaf with args/options works', async () => {
|
|
2113
|
-
const greet = Cli.create('greet', {
|
|
2114
|
-
args: z.object({ name: z.string() }),
|
|
2115
|
-
options: z.object({ loud: z.boolean().default(false) }),
|
|
2116
|
-
run({ args, options }) {
|
|
2117
|
-
return { message: options.loud ? `HELLO ${args.name}` : `hello ${args.name}` }
|
|
2118
|
-
},
|
|
2119
|
-
})
|
|
2120
|
-
const cli = Cli.create('app')
|
|
2121
|
-
cli.command(greet)
|
|
2122
|
-
|
|
2123
|
-
const { output } = await serve(cli, ['greet', 'world', '--loud'])
|
|
2124
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2125
|
-
"message: HELLO world
|
|
2126
|
-
"
|
|
2127
|
-
`)
|
|
2128
|
-
})
|
|
2129
|
-
|
|
2130
|
-
test('mounted leaf appears in --llms manifest', async () => {
|
|
2131
|
-
const ping = Cli.create('ping', {
|
|
2132
|
-
description: 'Health check',
|
|
2133
|
-
run: () => ({ pong: true }),
|
|
2134
|
-
})
|
|
2135
|
-
const cli = Cli.create('app')
|
|
2136
|
-
cli.command(ping)
|
|
2137
|
-
|
|
2138
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
2139
|
-
const manifest = JSON.parse(output)
|
|
2140
|
-
expect(manifest.commands).toHaveLength(1)
|
|
2141
|
-
expect(manifest.commands[0].name).toBe('ping')
|
|
2142
|
-
expect(manifest.commands[0].description).toBe('Health check')
|
|
2143
|
-
})
|
|
2144
|
-
})
|
|
2145
|
-
|
|
2146
|
-
describe('help', () => {
|
|
2147
|
-
test('router with no subcommand shows help', async () => {
|
|
2148
|
-
const cli = Cli.create('tool')
|
|
2149
|
-
cli.command('ping', {
|
|
2150
|
-
description: 'Health check',
|
|
2151
|
-
run: () => ({ pong: true }),
|
|
2152
|
-
})
|
|
2153
|
-
|
|
2154
|
-
const { output, exitCode } = await serve(cli, [])
|
|
2155
|
-
expect(exitCode).toBeUndefined()
|
|
2156
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2157
|
-
"tool
|
|
2158
|
-
|
|
2159
|
-
Usage: tool <command>
|
|
2160
|
-
|
|
2161
|
-
Commands:
|
|
2162
|
-
ping Health check
|
|
2163
|
-
|
|
2164
|
-
Integrations:
|
|
2165
|
-
completions Generate shell completion script
|
|
2166
|
-
mcp add Register as MCP server
|
|
2167
|
-
skills Sync skill files to agents (add, list)
|
|
2168
|
-
|
|
2169
|
-
Global Options:
|
|
2170
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
2171
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
2172
|
-
--full-output Show full output envelope
|
|
2173
|
-
--help Show help
|
|
2174
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
2175
|
-
--mcp Start as MCP stdio server
|
|
2176
|
-
--schema Show JSON Schema for command
|
|
2177
|
-
--token-count Print token count of output (instead of output)
|
|
2178
|
-
--token-limit <n> Limit output to n tokens
|
|
2179
|
-
--token-offset <n> Skip first n tokens of output
|
|
2180
|
-
--version Show version
|
|
2181
|
-
"
|
|
2182
|
-
`)
|
|
2183
|
-
})
|
|
2184
|
-
|
|
2185
|
-
test('--help on root shows help', async () => {
|
|
2186
|
-
const cli = Cli.create('tool')
|
|
2187
|
-
cli.command('ping', {
|
|
2188
|
-
description: 'Health check',
|
|
2189
|
-
run: () => ({ pong: true }),
|
|
2190
|
-
})
|
|
2191
|
-
|
|
2192
|
-
const { output, exitCode } = await serve(cli, ['--help'])
|
|
2193
|
-
expect(exitCode).toBeUndefined()
|
|
2194
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2195
|
-
"tool
|
|
2196
|
-
|
|
2197
|
-
Usage: tool <command>
|
|
2198
|
-
|
|
2199
|
-
Commands:
|
|
2200
|
-
ping Health check
|
|
2201
|
-
|
|
2202
|
-
Integrations:
|
|
2203
|
-
completions Generate shell completion script
|
|
2204
|
-
mcp add Register as MCP server
|
|
2205
|
-
skills Sync skill files to agents (add, list)
|
|
2206
|
-
|
|
2207
|
-
Global Options:
|
|
2208
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
2209
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
2210
|
-
--full-output Show full output envelope
|
|
2211
|
-
--help Show help
|
|
2212
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
2213
|
-
--mcp Start as MCP stdio server
|
|
2214
|
-
--schema Show JSON Schema for command
|
|
2215
|
-
--token-count Print token count of output (instead of output)
|
|
2216
|
-
--token-limit <n> Limit output to n tokens
|
|
2217
|
-
--token-offset <n> Skip first n tokens of output
|
|
2218
|
-
--version Show version
|
|
2219
|
-
"
|
|
2220
|
-
`)
|
|
2221
|
-
})
|
|
2222
|
-
|
|
2223
|
-
test('--help on leaf shows command help', async () => {
|
|
2224
|
-
const cli = Cli.create('tool')
|
|
2225
|
-
cli.command('greet', {
|
|
2226
|
-
description: 'Greet someone',
|
|
2227
|
-
args: z.object({ name: z.string().describe('Name') }),
|
|
2228
|
-
run: ({ args }) => ({ message: `hi ${args.name}` }),
|
|
2229
|
-
})
|
|
2230
|
-
|
|
2231
|
-
const { output, exitCode } = await serve(cli, ['greet', '--help'])
|
|
2232
|
-
expect(exitCode).toBeUndefined()
|
|
2233
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2234
|
-
"tool greet — Greet someone
|
|
2235
|
-
|
|
2236
|
-
Usage: tool greet <name>
|
|
2237
|
-
|
|
2238
|
-
Arguments:
|
|
2239
|
-
name Name
|
|
2240
|
-
|
|
2241
|
-
Global Options:
|
|
2242
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
2243
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
2244
|
-
--full-output Show full output envelope
|
|
2245
|
-
--help Show help
|
|
2246
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
2247
|
-
--schema Show JSON Schema for command
|
|
2248
|
-
--token-count Print token count of output (instead of output)
|
|
2249
|
-
--token-limit <n> Limit output to n tokens
|
|
2250
|
-
--token-offset <n> Skip first n tokens of output
|
|
2251
|
-
"
|
|
2252
|
-
`)
|
|
2253
|
-
})
|
|
2254
|
-
|
|
2255
|
-
test('group with no subcommand shows help', async () => {
|
|
2256
|
-
const pr = Cli.create('pr', { description: 'Pull request commands' })
|
|
2257
|
-
pr.command('list', {
|
|
2258
|
-
description: 'List PRs',
|
|
2259
|
-
run: () => ({}),
|
|
2260
|
-
})
|
|
2261
|
-
|
|
2262
|
-
const cli = Cli.create('gh')
|
|
2263
|
-
cli.command(pr)
|
|
2264
|
-
|
|
2265
|
-
const { output, exitCode } = await serve(cli, ['pr'])
|
|
2266
|
-
expect(exitCode).toBeUndefined()
|
|
2267
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2268
|
-
"gh pr — Pull request commands
|
|
2269
|
-
|
|
2270
|
-
Usage: gh pr <command>
|
|
2271
|
-
|
|
2272
|
-
Commands:
|
|
2273
|
-
list List PRs
|
|
2274
|
-
|
|
2275
|
-
Global Options:
|
|
2276
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
2277
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
2278
|
-
--full-output Show full output envelope
|
|
2279
|
-
--help Show help
|
|
2280
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
2281
|
-
--schema Show JSON Schema for command
|
|
2282
|
-
--token-count Print token count of output (instead of output)
|
|
2283
|
-
--token-limit <n> Limit output to n tokens
|
|
2284
|
-
--token-offset <n> Skip first n tokens of output
|
|
2285
|
-
"
|
|
2286
|
-
`)
|
|
2287
|
-
})
|
|
2288
|
-
|
|
2289
|
-
test('root command with required args shows help when no args provided (human)', async () => {
|
|
2290
|
-
;(process.stdout as any).isTTY = true
|
|
2291
|
-
const cli = Cli.create('fetch', {
|
|
2292
|
-
description: 'Fetch a URL',
|
|
2293
|
-
args: z.object({ url: z.string().describe('URL to fetch') }),
|
|
2294
|
-
run: ({ args }) => args.url,
|
|
2295
|
-
})
|
|
2296
|
-
const { output, exitCode } = await serve(cli, [])
|
|
2297
|
-
;(process.stdout as any).isTTY = false
|
|
2298
|
-
expect(exitCode).toBeUndefined()
|
|
2299
|
-
expect(output).toContain('fetch — Fetch a URL')
|
|
2300
|
-
expect(output).toContain('Usage: fetch <url>')
|
|
2301
|
-
})
|
|
2302
|
-
|
|
2303
|
-
test('root command with optional args runs command when no args provided (human)', async () => {
|
|
2304
|
-
;(process.stdout as any).isTTY = true
|
|
2305
|
-
const cli = Cli.create('fetch', {
|
|
2306
|
-
description: 'Fetch a URL',
|
|
2307
|
-
args: z.object({ url: z.string().optional().describe('URL to fetch') }),
|
|
2308
|
-
run: ({ args }) => args.url ?? 'no url',
|
|
2309
|
-
})
|
|
2310
|
-
const { output } = await serve(cli, [])
|
|
2311
|
-
;(process.stdout as any).isTTY = false
|
|
2312
|
-
expect(output).toContain('no url')
|
|
2313
|
-
})
|
|
2314
|
-
|
|
2315
|
-
test('root command with optional args runs command when no args provided (agent)', async () => {
|
|
2316
|
-
const cli = Cli.create('fetch', {
|
|
2317
|
-
description: 'Fetch a URL',
|
|
2318
|
-
args: z.object({ url: z.string().optional().describe('URL to fetch') }),
|
|
2319
|
-
run: ({ args }) => args.url ?? 'no url',
|
|
2320
|
-
})
|
|
2321
|
-
const { output } = await serve(cli, [])
|
|
2322
|
-
expect(output).toContain('no url')
|
|
2323
|
-
})
|
|
2324
|
-
|
|
2325
|
-
test('invalid subcommand in group returns COMMAND_NOT_FOUND instead of falling through to root', async () => {
|
|
2326
|
-
const cli = Cli.create('tool', {
|
|
2327
|
-
args: z.object({ url: z.string().describe('URL') }),
|
|
2328
|
-
run: ({ args }) => ({ url: args.url }),
|
|
2329
|
-
})
|
|
2330
|
-
const auth = Cli.create('auth').command('login', { run: () => ({ ok: true }) })
|
|
2331
|
-
cli.command(auth)
|
|
2332
|
-
|
|
2333
|
-
const { output, exitCode } = await serve(cli, ['auth', 'badcmd', '--format', 'json'])
|
|
2334
|
-
expect(exitCode).toBe(1)
|
|
2335
|
-
const parsed = JSON.parse(output)
|
|
2336
|
-
expect(parsed.code).toBe('COMMAND_NOT_FOUND')
|
|
2337
|
-
expect(parsed.message).toContain('badcmd')
|
|
2338
|
-
})
|
|
2339
|
-
|
|
2340
|
-
test('--version outputs version string', async () => {
|
|
2341
|
-
const cli = Cli.create('tool', { version: '1.2.3' })
|
|
2342
|
-
cli.command('ping', { run: () => ({}) })
|
|
2343
|
-
|
|
2344
|
-
const { output, exitCode } = await serve(cli, ['--version'])
|
|
2345
|
-
expect(exitCode).toBeUndefined()
|
|
2346
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2347
|
-
"1.2.3
|
|
2348
|
-
"
|
|
2349
|
-
`)
|
|
2350
|
-
})
|
|
2351
|
-
|
|
2352
|
-
test('--help takes precedence over --version', async () => {
|
|
2353
|
-
const cli = Cli.create('tool', { version: '1.2.3' })
|
|
2354
|
-
cli.command('ping', { description: 'Ping', run: () => ({}) })
|
|
2355
|
-
|
|
2356
|
-
const { output } = await serve(cli, ['--help', '--version'])
|
|
2357
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2358
|
-
"tool@1.2.3
|
|
2359
|
-
|
|
2360
|
-
Usage: tool <command>
|
|
2361
|
-
|
|
2362
|
-
Commands:
|
|
2363
|
-
ping Ping
|
|
2364
|
-
|
|
2365
|
-
Integrations:
|
|
2366
|
-
completions Generate shell completion script
|
|
2367
|
-
mcp add Register as MCP server
|
|
2368
|
-
skills Sync skill files to agents (add, list)
|
|
2369
|
-
|
|
2370
|
-
Global Options:
|
|
2371
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
2372
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
2373
|
-
--full-output Show full output envelope
|
|
2374
|
-
--help Show help
|
|
2375
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
2376
|
-
--mcp Start as MCP stdio server
|
|
2377
|
-
--schema Show JSON Schema for command
|
|
2378
|
-
--token-count Print token count of output (instead of output)
|
|
2379
|
-
--token-limit <n> Limit output to n tokens
|
|
2380
|
-
--token-offset <n> Skip first n tokens of output
|
|
2381
|
-
--version Show version
|
|
2382
|
-
"
|
|
2383
|
-
`)
|
|
2384
|
-
})
|
|
2385
|
-
|
|
2386
|
-
test('--help shows hint after examples', async () => {
|
|
2387
|
-
const cli = Cli.create('tool')
|
|
2388
|
-
cli.command('deploy', {
|
|
2389
|
-
description: 'Deploy the app',
|
|
2390
|
-
hint: 'Run "tool status" to check deployment progress.',
|
|
2391
|
-
run: () => ({ ok: true }),
|
|
2392
|
-
})
|
|
2393
|
-
|
|
2394
|
-
const { output } = await serve(cli, ['deploy', '--help'])
|
|
2395
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2396
|
-
"tool deploy — Deploy the app
|
|
2397
|
-
|
|
2398
|
-
Usage: tool deploy
|
|
2399
|
-
|
|
2400
|
-
Run "tool status" to check deployment progress.
|
|
2401
|
-
|
|
2402
|
-
Global Options:
|
|
2403
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
2404
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
2405
|
-
--full-output Show full output envelope
|
|
2406
|
-
--help Show help
|
|
2407
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
2408
|
-
--schema Show JSON Schema for command
|
|
2409
|
-
--token-count Print token count of output (instead of output)
|
|
2410
|
-
--token-limit <n> Limit output to n tokens
|
|
2411
|
-
--token-offset <n> Skip first n tokens of output
|
|
2412
|
-
"
|
|
2413
|
-
`)
|
|
2414
|
-
})
|
|
2415
|
-
|
|
2416
|
-
test('--help omits hint when not set', async () => {
|
|
2417
|
-
const cli = Cli.create('tool')
|
|
2418
|
-
cli.command('ping', {
|
|
2419
|
-
description: 'Health check',
|
|
2420
|
-
run: () => ({ pong: true }),
|
|
2421
|
-
})
|
|
2422
|
-
|
|
2423
|
-
const { output } = await serve(cli, ['ping', '--help'])
|
|
2424
|
-
expect(output).not.toContain('hint')
|
|
2425
|
-
})
|
|
2426
|
-
})
|
|
2427
|
-
|
|
2428
|
-
describe('env', () => {
|
|
2429
|
-
test('parses env vars and passes to handler', async () => {
|
|
2430
|
-
const cli = Cli.create('test')
|
|
2431
|
-
let receivedEnv: any
|
|
2432
|
-
cli.command('deploy', {
|
|
2433
|
-
env: z.object({
|
|
2434
|
-
API_TOKEN: z.string().describe('Auth token'),
|
|
2435
|
-
}),
|
|
2436
|
-
run(c) {
|
|
2437
|
-
receivedEnv = c.env
|
|
2438
|
-
return { ok: true }
|
|
2439
|
-
},
|
|
2440
|
-
})
|
|
2441
|
-
|
|
2442
|
-
await serve(cli, ['deploy'], { env: { API_TOKEN: 'secret-123' } })
|
|
2443
|
-
expect(receivedEnv).toEqual({ API_TOKEN: 'secret-123' })
|
|
2444
|
-
})
|
|
2445
|
-
|
|
2446
|
-
test('env validation error for missing required var', async () => {
|
|
2447
|
-
;(process.stdout as any).isTTY = true
|
|
2448
|
-
const cli = Cli.create('test')
|
|
2449
|
-
cli.command('deploy', {
|
|
2450
|
-
env: z.object({
|
|
2451
|
-
API_TOKEN: z.string().describe('Auth token'),
|
|
2452
|
-
}),
|
|
2453
|
-
run() {
|
|
2454
|
-
return {}
|
|
2455
|
-
},
|
|
2456
|
-
})
|
|
2457
|
-
|
|
2458
|
-
const { output, exitCode } = await serve(cli, ['deploy'], { env: {} })
|
|
2459
|
-
;(process.stdout as any).isTTY = false
|
|
2460
|
-
expect(exitCode).toBe(1)
|
|
2461
|
-
expect(output).toContain('Error: missing required environment variable API_TOKEN')
|
|
2462
|
-
})
|
|
2463
|
-
|
|
2464
|
-
test('env validation error for invalid var shows human message in TTY', async () => {
|
|
2465
|
-
;(process.stdout as any).isTTY = true
|
|
2466
|
-
const cli = Cli.create('test')
|
|
2467
|
-
cli.command('deploy', {
|
|
2468
|
-
env: z.object({
|
|
2469
|
-
API_TOKEN: z.string().min(8).describe('Auth token'),
|
|
2470
|
-
}),
|
|
2471
|
-
run() {
|
|
2472
|
-
return {}
|
|
2473
|
-
},
|
|
2474
|
-
})
|
|
2475
|
-
|
|
2476
|
-
const { output, exitCode } = await serve(cli, ['deploy'], { env: { API_TOKEN: 'short' } })
|
|
2477
|
-
;(process.stdout as any).isTTY = false
|
|
2478
|
-
expect(exitCode).toBe(1)
|
|
2479
|
-
expect(output).toContain(
|
|
2480
|
-
'Error: invalid value for environment variable API_TOKEN: Too small: expected string to have >=8 characters',
|
|
2481
|
-
)
|
|
2482
|
-
})
|
|
2483
|
-
|
|
2484
|
-
test('env with defaults works when var is unset', async () => {
|
|
2485
|
-
const cli = Cli.create('test')
|
|
2486
|
-
let receivedEnv: any
|
|
2487
|
-
cli.command('deploy', {
|
|
2488
|
-
env: z.object({
|
|
2489
|
-
API_URL: z.string().default('https://api.example.com').describe('API URL'),
|
|
2490
|
-
}),
|
|
2491
|
-
run(c) {
|
|
2492
|
-
receivedEnv = c.env
|
|
2493
|
-
return { ok: true }
|
|
2494
|
-
},
|
|
2495
|
-
})
|
|
2496
|
-
|
|
2497
|
-
await serve(cli, ['deploy'], { env: {} })
|
|
2498
|
-
expect(receivedEnv).toEqual({ API_URL: 'https://api.example.com' })
|
|
2499
|
-
})
|
|
2500
|
-
|
|
2501
|
-
test('--help shows environment variables section', async () => {
|
|
2502
|
-
const cli = Cli.create('test')
|
|
2503
|
-
cli.command('deploy', {
|
|
2504
|
-
env: z.object({
|
|
2505
|
-
API_TOKEN: z.string().describe('Auth token'),
|
|
2506
|
-
API_URL: z.string().default('https://api.example.com').describe('API URL'),
|
|
2507
|
-
}),
|
|
2508
|
-
run() {
|
|
2509
|
-
return {}
|
|
2510
|
-
},
|
|
2511
|
-
})
|
|
2512
|
-
|
|
2513
|
-
const { output } = await serve(cli, ['deploy', '--help'])
|
|
2514
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2515
|
-
"test deploy
|
|
2516
|
-
|
|
2517
|
-
Usage: test deploy
|
|
2518
|
-
|
|
2519
|
-
Global Options:
|
|
2520
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
2521
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
2522
|
-
--full-output Show full output envelope
|
|
2523
|
-
--help Show help
|
|
2524
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
2525
|
-
--schema Show JSON Schema for command
|
|
2526
|
-
--token-count Print token count of output (instead of output)
|
|
2527
|
-
--token-limit <n> Limit output to n tokens
|
|
2528
|
-
--token-offset <n> Skip first n tokens of output
|
|
2529
|
-
|
|
2530
|
-
Environment Variables:
|
|
2531
|
-
API_TOKEN Auth token
|
|
2532
|
-
API_URL API URL (default: https://api.example.com)
|
|
2533
|
-
"
|
|
2534
|
-
`)
|
|
2535
|
-
})
|
|
2536
|
-
|
|
2537
|
-
test('--help shows (set) for env vars present in process.env', async () => {
|
|
2538
|
-
const cli = Cli.create('test')
|
|
2539
|
-
cli.command('deploy', {
|
|
2540
|
-
env: z.object({
|
|
2541
|
-
API_TOKEN: z.string().describe('Auth token'),
|
|
2542
|
-
API_URL: z.string().default('https://api.example.com').describe('API URL'),
|
|
2543
|
-
}),
|
|
2544
|
-
run() {
|
|
2545
|
-
return {}
|
|
2546
|
-
},
|
|
2547
|
-
})
|
|
2548
|
-
|
|
2549
|
-
process.env.API_TOKEN = 'secret'
|
|
2550
|
-
try {
|
|
2551
|
-
const { output } = await serve(cli, ['deploy', '--help'])
|
|
2552
|
-
expect(output).toMatchInlineSnapshot(`
|
|
2553
|
-
"test deploy
|
|
2554
|
-
|
|
2555
|
-
Usage: test deploy
|
|
2556
|
-
|
|
2557
|
-
Global Options:
|
|
2558
|
-
--filter-output <keys> Filter output by key paths (e.g. foo,bar.baz,a[0,3])
|
|
2559
|
-
--format <toon|json|yaml|md|jsonl> Output format
|
|
2560
|
-
--full-output Show full output envelope
|
|
2561
|
-
--help Show help
|
|
2562
|
-
--llms, --llms-full Print LLM-readable manifest
|
|
2563
|
-
--schema Show JSON Schema for command
|
|
2564
|
-
--token-count Print token count of output (instead of output)
|
|
2565
|
-
--token-limit <n> Limit output to n tokens
|
|
2566
|
-
--token-offset <n> Skip first n tokens of output
|
|
2567
|
-
|
|
2568
|
-
Environment Variables:
|
|
2569
|
-
API_TOKEN Auth token (set: ****cret)
|
|
2570
|
-
API_URL API URL (default: https://api.example.com)
|
|
2571
|
-
"
|
|
2572
|
-
`)
|
|
2573
|
-
|
|
2574
|
-
// Both set and default shown together
|
|
2575
|
-
process.env.API_URL = 'https://custom.example.com'
|
|
2576
|
-
const { output: output2 } = await serve(cli, ['deploy', '--help'])
|
|
2577
|
-
expect(output2).toContain(
|
|
2578
|
-
'API_URL API URL (set: ****.com, default: https://api.example.com)',
|
|
2579
|
-
)
|
|
2580
|
-
} finally {
|
|
2581
|
-
delete process.env.API_TOKEN
|
|
2582
|
-
delete process.env.API_URL
|
|
2583
|
-
}
|
|
2584
|
-
})
|
|
2585
|
-
|
|
2586
|
-
test('--help respects env source override for set display', async () => {
|
|
2587
|
-
const cli = Cli.create('test')
|
|
2588
|
-
cli.command('deploy', {
|
|
2589
|
-
env: z.object({
|
|
2590
|
-
API_TOKEN: z.string().describe('Auth token'),
|
|
2591
|
-
}),
|
|
2592
|
-
run() {
|
|
2593
|
-
return {}
|
|
2594
|
-
},
|
|
2595
|
-
})
|
|
2596
|
-
|
|
2597
|
-
// When env source override does not include the var, "set:" should not appear
|
|
2598
|
-
const { output } = await serve(cli, ['deploy', '--help'], { env: {} })
|
|
2599
|
-
expect(output).toContain('API_TOKEN Auth token')
|
|
2600
|
-
expect(output).not.toContain('set:')
|
|
2601
|
-
|
|
2602
|
-
// When env source override includes the var, "set:" should appear
|
|
2603
|
-
const { output: output2 } = await serve(cli, ['deploy', '--help'], {
|
|
2604
|
-
env: { API_TOKEN: 'secret' },
|
|
2605
|
-
})
|
|
2606
|
-
expect(output2).toContain('set: ****cret')
|
|
2607
|
-
})
|
|
2608
|
-
|
|
2609
|
-
test('--llms json includes schema.env', async () => {
|
|
2610
|
-
const cli = Cli.create('test')
|
|
2611
|
-
cli.command('deploy', {
|
|
2612
|
-
env: z.object({
|
|
2613
|
-
API_TOKEN: z.string().describe('Auth token'),
|
|
2614
|
-
}),
|
|
2615
|
-
run() {
|
|
2616
|
-
return {}
|
|
2617
|
-
},
|
|
2618
|
-
})
|
|
2619
|
-
|
|
2620
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json'])
|
|
2621
|
-
const cmd = JSON.parse(output).commands.find((c: any) => c.name === 'deploy')
|
|
2622
|
-
expect(cmd.schema.env).toMatchInlineSnapshot(`
|
|
2623
|
-
{
|
|
2624
|
-
"additionalProperties": false,
|
|
2625
|
-
"properties": {
|
|
2626
|
-
"API_TOKEN": {
|
|
2627
|
-
"description": "Auth token",
|
|
2628
|
-
"type": "string",
|
|
2629
|
-
},
|
|
2630
|
-
},
|
|
2631
|
-
"required": [
|
|
2632
|
-
"API_TOKEN",
|
|
2633
|
-
],
|
|
2634
|
-
"type": "object",
|
|
2635
|
-
}
|
|
2636
|
-
`)
|
|
2637
|
-
})
|
|
2638
|
-
|
|
2639
|
-
test('--llms markdown includes environment variables table', async () => {
|
|
2640
|
-
const cli = Cli.create('test')
|
|
2641
|
-
cli.command('deploy', {
|
|
2642
|
-
env: z.object({
|
|
2643
|
-
API_TOKEN: z.string().describe('Auth token'),
|
|
2644
|
-
}),
|
|
2645
|
-
run() {
|
|
2646
|
-
return {}
|
|
2647
|
-
},
|
|
2648
|
-
})
|
|
2649
|
-
|
|
2650
|
-
const { output } = await serve(cli, ['--llms-full'])
|
|
2651
|
-
expect(output).toContain('Environment Variables')
|
|
2652
|
-
expect(output).toContain('`API_TOKEN`')
|
|
2653
|
-
})
|
|
2654
|
-
|
|
2655
|
-
test('env coerces boolean and number values', async () => {
|
|
2656
|
-
const cli = Cli.create('test')
|
|
2657
|
-
let receivedEnv: any
|
|
2658
|
-
cli.command('deploy', {
|
|
2659
|
-
env: z.object({
|
|
2660
|
-
DEBUG: z.boolean().default(false).describe('Debug mode'),
|
|
2661
|
-
PORT: z.number().default(3000).describe('Port'),
|
|
2662
|
-
}),
|
|
2663
|
-
run(c) {
|
|
2664
|
-
receivedEnv = c.env
|
|
2665
|
-
return { ok: true }
|
|
2666
|
-
},
|
|
2667
|
-
})
|
|
2668
|
-
|
|
2669
|
-
await serve(cli, ['deploy'], { env: { DEBUG: 'true', PORT: '8080' } })
|
|
2670
|
-
expect(receivedEnv).toEqual({ DEBUG: true, PORT: 8080 })
|
|
2671
|
-
})
|
|
2672
|
-
})
|
|
2673
|
-
|
|
2674
|
-
describe('built-in commands', () => {
|
|
2675
|
-
test('bare completions shows help', async () => {
|
|
2676
|
-
const cli = Cli.create('test')
|
|
2677
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2678
|
-
const { output } = await serve(cli, ['completions'])
|
|
2679
|
-
expect(output).toContain('Generate shell completion script')
|
|
2680
|
-
})
|
|
2681
|
-
|
|
2682
|
-
test('completions --help shows help', async () => {
|
|
2683
|
-
const cli = Cli.create('test')
|
|
2684
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2685
|
-
const { output } = await serve(cli, ['completions', '--help'])
|
|
2686
|
-
expect(output).toContain('test completions')
|
|
2687
|
-
expect(output).toContain('Generate shell completion script')
|
|
2688
|
-
})
|
|
2689
|
-
|
|
2690
|
-
test('bare mcp shows help with subcommands', async () => {
|
|
2691
|
-
const cli = Cli.create('test')
|
|
2692
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2693
|
-
const { output } = await serve(cli, ['mcp'])
|
|
2694
|
-
expect(output).toContain('test mcp')
|
|
2695
|
-
expect(output).toContain('Register as MCP server')
|
|
2696
|
-
expect(output).toContain('add')
|
|
2697
|
-
})
|
|
2698
|
-
|
|
2699
|
-
test('mcp --help shows help with subcommands', async () => {
|
|
2700
|
-
const cli = Cli.create('test')
|
|
2701
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2702
|
-
const { output } = await serve(cli, ['mcp', '--help'])
|
|
2703
|
-
expect(output).toContain('test mcp')
|
|
2704
|
-
expect(output).toContain('add')
|
|
2705
|
-
})
|
|
2706
|
-
|
|
2707
|
-
test('mcp add --help shows options', async () => {
|
|
2708
|
-
const cli = Cli.create('test')
|
|
2709
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2710
|
-
const { output } = await serve(cli, ['mcp', 'add', '--help'])
|
|
2711
|
-
expect(output).toContain('test mcp add')
|
|
2712
|
-
expect(output).toContain('--command')
|
|
2713
|
-
expect(output).toContain('--no-global')
|
|
2714
|
-
expect(output).toContain('--agent')
|
|
2715
|
-
})
|
|
2716
|
-
|
|
2717
|
-
test('bare skills shows help with subcommands', async () => {
|
|
2718
|
-
const cli = Cli.create('test')
|
|
2719
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2720
|
-
const { output } = await serve(cli, ['skills'])
|
|
2721
|
-
expect(output).toContain('test skills')
|
|
2722
|
-
expect(output).toContain('Sync skill files to agents')
|
|
2723
|
-
expect(output).toContain('add')
|
|
2724
|
-
})
|
|
2725
|
-
|
|
2726
|
-
test('skills --help shows help with subcommands', async () => {
|
|
2727
|
-
const cli = Cli.create('test')
|
|
2728
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2729
|
-
const { output } = await serve(cli, ['skills', '--help'])
|
|
2730
|
-
expect(output).toContain('test skills')
|
|
2731
|
-
expect(output).toContain('add')
|
|
2732
|
-
})
|
|
2733
|
-
|
|
2734
|
-
test('skills typo suggests add', async () => {
|
|
2735
|
-
const cli = Cli.create('test')
|
|
2736
|
-
cli.command('ping', { run: () => ({}) })
|
|
2737
|
-
const { output, exitCode } = await serve(cli, ['skills', 'addd'])
|
|
2738
|
-
expect(exitCode).toBe(1)
|
|
2739
|
-
expect(output).toContain("Did you mean 'add'?")
|
|
2740
|
-
expect(output).toContain('test skills add')
|
|
2741
|
-
expect(output).toContain('test skills --help')
|
|
2742
|
-
})
|
|
2743
|
-
|
|
2744
|
-
test('mcp typo suggests add', async () => {
|
|
2745
|
-
const cli = Cli.create('test')
|
|
2746
|
-
cli.command('ping', { run: () => ({}) })
|
|
2747
|
-
const { output, exitCode } = await serve(cli, ['mcp', 'addd'])
|
|
2748
|
-
expect(exitCode).toBe(1)
|
|
2749
|
-
expect(output).toContain("Did you mean 'add'?")
|
|
2750
|
-
expect(output).toContain('test mcp add')
|
|
2751
|
-
})
|
|
2752
|
-
|
|
2753
|
-
test('skills add --help shows options', async () => {
|
|
2754
|
-
const cli = Cli.create('test')
|
|
2755
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2756
|
-
const { output } = await serve(cli, ['skills', 'add', '--help'])
|
|
2757
|
-
expect(output).toContain('test skills add')
|
|
2758
|
-
expect(output).toContain('--depth')
|
|
2759
|
-
expect(output).toContain('--no-global')
|
|
2760
|
-
})
|
|
2761
|
-
|
|
2762
|
-
test('skills list --help shows description', async () => {
|
|
2763
|
-
const cli = Cli.create('test')
|
|
2764
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2765
|
-
const { output } = await serve(cli, ['skills', 'list', '--help'])
|
|
2766
|
-
expect(output).toContain('test skills list')
|
|
2767
|
-
expect(output).toContain('Aliases: ls')
|
|
2768
|
-
expect(output).toContain('List skills')
|
|
2769
|
-
})
|
|
2770
|
-
|
|
2771
|
-
test('skills ls resolves to list', async () => {
|
|
2772
|
-
const cli = Cli.create('test')
|
|
2773
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
2774
|
-
const { output: aliased } = await serve(cli, ['skills', 'ls'])
|
|
2775
|
-
const { output: canonical } = await serve(cli, ['skills', 'list'])
|
|
2776
|
-
expect(aliased).toBe(canonical)
|
|
2777
|
-
})
|
|
2778
|
-
|
|
2779
|
-
test('skills list shows skills with install status', async () => {
|
|
2780
|
-
const cli = Cli.create('test')
|
|
2781
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
2782
|
-
cli.command('greet', { description: 'Say hello', run: () => ({ hi: true }) })
|
|
2783
|
-
const { output } = await serve(cli, ['skills', 'list'])
|
|
2784
|
-
expect(output).toContain('✗')
|
|
2785
|
-
expect(output).toContain('test-ping')
|
|
2786
|
-
expect(output).toContain('test-greet')
|
|
2787
|
-
expect(output).toContain('installed')
|
|
2788
|
-
})
|
|
2789
|
-
})
|
|
2790
|
-
|
|
2791
|
-
describe('skills staleness', () => {
|
|
2792
|
-
let stderrSpy: ReturnType<typeof vi.spyOn>
|
|
2793
|
-
|
|
2794
|
-
beforeEach(() => {
|
|
2795
|
-
stderrSpy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true)
|
|
2796
|
-
__mockSkillsHash = undefined
|
|
2797
|
-
__mockSkillsInstalled = true
|
|
2798
|
-
})
|
|
2799
|
-
|
|
2800
|
-
afterEach(() => {
|
|
2801
|
-
stderrSpy.mockRestore()
|
|
2802
|
-
__mockSkillsHash = undefined
|
|
2803
|
-
__mockSkillsInstalled = true
|
|
2804
|
-
})
|
|
2805
|
-
|
|
2806
|
-
test('includes skills CTA when stale', async () => {
|
|
2807
|
-
__mockSkillsHash = '0000000000000000'
|
|
2808
|
-
const cli = Cli.create('test')
|
|
2809
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
2810
|
-
|
|
2811
|
-
const { output } = await serve(cli, ['ping'])
|
|
2812
|
-
expect(output).toContain('Skills are out of date:')
|
|
2813
|
-
expect(output).toContain('skills add')
|
|
2814
|
-
})
|
|
2815
|
-
|
|
2816
|
-
test('uses displayName for stale skills CTA when invoked directly', async () => {
|
|
2817
|
-
const savedArgv1 = process.argv[1]
|
|
2818
|
-
const savedAgent = process.env.npm_config_user_agent
|
|
2819
|
-
const savedExec = process.env.npm_execpath
|
|
2820
|
-
try {
|
|
2821
|
-
process.argv[1] = '/usr/local/bin/mc'
|
|
2822
|
-
delete process.env.npm_config_user_agent
|
|
2823
|
-
delete process.env.npm_execpath
|
|
2824
|
-
|
|
2825
|
-
__mockSkillsHash = '0000000000000000'
|
|
2826
|
-
const cli = Cli.create({ name: 'my-cli', aliases: ['mc'] })
|
|
2827
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
2828
|
-
|
|
2829
|
-
const { output } = await serve(cli, ['ping'])
|
|
2830
|
-
|
|
2831
|
-
expect(output).toContain('mc skills add')
|
|
2832
|
-
expect(output).not.toContain('npx my-cli skills add')
|
|
2833
|
-
} finally {
|
|
2834
|
-
if (savedArgv1 === undefined) process.argv[1] = undefined as any
|
|
2835
|
-
else process.argv[1] = savedArgv1
|
|
2836
|
-
process.env.npm_config_user_agent = savedAgent
|
|
2837
|
-
process.env.npm_execpath = savedExec
|
|
2838
|
-
}
|
|
2839
|
-
})
|
|
2840
|
-
|
|
2841
|
-
test('merges skills CTA with command CTA', async () => {
|
|
2842
|
-
__mockSkillsHash = '0000000000000000'
|
|
2843
|
-
;(process.stdout as any).isTTY = true
|
|
2844
|
-
const cli = Cli.create('test')
|
|
2845
|
-
cli.command('ping', {
|
|
2846
|
-
description: 'Health check',
|
|
2847
|
-
run: (c) => c.ok({ pong: true }, { cta: { commands: ['status'] } }),
|
|
2848
|
-
})
|
|
2849
|
-
|
|
2850
|
-
const { output } = await serve(cli, ['ping'])
|
|
2851
|
-
;(process.stdout as any).isTTY = false
|
|
2852
|
-
expect(output).toContain('status')
|
|
2853
|
-
expect(output).toContain('skills add')
|
|
2854
|
-
})
|
|
2855
|
-
|
|
2856
|
-
test('does not warn when hash matches', async () => {
|
|
2857
|
-
const { Skill } = await import('incur')
|
|
2858
|
-
__mockSkillsHash = Skill.hash([{ name: 'ping', description: 'Health check' }])
|
|
2859
|
-
const cli = Cli.create('test')
|
|
2860
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
2861
|
-
|
|
2862
|
-
const { output } = await serve(cli, ['ping'])
|
|
2863
|
-
expect(output).not.toContain('Skills are out of date')
|
|
2864
|
-
})
|
|
2865
|
-
|
|
2866
|
-
test('does not warn when no hash stored', async () => {
|
|
2867
|
-
__mockSkillsHash = undefined
|
|
2868
|
-
const cli = Cli.create('test')
|
|
2869
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2870
|
-
|
|
2871
|
-
const { output } = await serve(cli, ['ping'])
|
|
2872
|
-
expect(output).not.toContain('Skills are out of date')
|
|
2873
|
-
})
|
|
2874
|
-
|
|
2875
|
-
test('does not warn when skills are not installed', async () => {
|
|
2876
|
-
__mockSkillsHash = '0000000000000000'
|
|
2877
|
-
__mockSkillsInstalled = false
|
|
2878
|
-
const cli = Cli.create('test')
|
|
2879
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
2880
|
-
|
|
2881
|
-
const { output } = await serve(cli, ['ping'])
|
|
2882
|
-
expect(output).not.toContain('Skills are out of date')
|
|
2883
|
-
})
|
|
2884
|
-
|
|
2885
|
-
test('does not warn for skills add', async () => {
|
|
2886
|
-
__mockSkillsHash = '0000000000000000'
|
|
2887
|
-
const cli = Cli.create('test')
|
|
2888
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2889
|
-
|
|
2890
|
-
await serve(cli, ['skills', 'add'])
|
|
2891
|
-
expect(stderrSpy).not.toHaveBeenCalled()
|
|
2892
|
-
})
|
|
2893
|
-
|
|
2894
|
-
test('does not warn for --help', async () => {
|
|
2895
|
-
__mockSkillsHash = '0000000000000000'
|
|
2896
|
-
const cli = Cli.create('test')
|
|
2897
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2898
|
-
|
|
2899
|
-
const { output } = await serve(cli, ['--help'])
|
|
2900
|
-
expect(output).not.toContain('Skills are out of date')
|
|
2901
|
-
})
|
|
2902
|
-
})
|
|
2903
|
-
|
|
2904
|
-
describe('outputPolicy', () => {
|
|
2905
|
-
beforeEach(() => {
|
|
2906
|
-
;(process.stdout as any).isTTY = true
|
|
2907
|
-
})
|
|
2908
|
-
afterEach(() => {
|
|
2909
|
-
;(process.stdout as any).isTTY = false
|
|
2910
|
-
})
|
|
2911
|
-
|
|
2912
|
-
test('default (all): displays data in human mode', async () => {
|
|
2913
|
-
const cli = Cli.create('test')
|
|
2914
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2915
|
-
|
|
2916
|
-
const { output } = await serve(cli, ['ping'])
|
|
2917
|
-
expect(output).toContain('pong: true')
|
|
2918
|
-
})
|
|
2919
|
-
|
|
2920
|
-
test('agent-only on command: suppresses data in human mode', async () => {
|
|
2921
|
-
const cli = Cli.create('test')
|
|
2922
|
-
cli.command('ping', { outputPolicy: 'agent-only', run: () => ({ pong: true }) })
|
|
2923
|
-
|
|
2924
|
-
const { output } = await serve(cli, ['ping'])
|
|
2925
|
-
expect(output).toBe('')
|
|
2926
|
-
})
|
|
2927
|
-
|
|
2928
|
-
test('agent-only on command: still outputs in agent mode (--json)', async () => {
|
|
2929
|
-
const cli = Cli.create('test')
|
|
2930
|
-
cli.command('ping', { outputPolicy: 'agent-only', run: () => ({ pong: true }) })
|
|
2931
|
-
|
|
2932
|
-
const { output } = await serve(cli, ['ping', '--json'])
|
|
2933
|
-
expect(output).toContain('"pong"')
|
|
2934
|
-
})
|
|
2935
|
-
|
|
2936
|
-
test('agent-only on root CLI: inherited by commands', async () => {
|
|
2937
|
-
const cli = Cli.create('test', { outputPolicy: 'agent-only' })
|
|
2938
|
-
cli.command('ping', { run: () => ({ pong: true }) })
|
|
2939
|
-
|
|
2940
|
-
const { output } = await serve(cli, ['ping'])
|
|
2941
|
-
expect(output).toBe('')
|
|
2942
|
-
})
|
|
2943
|
-
|
|
2944
|
-
test('agent-only on group: inherited by child commands', async () => {
|
|
2945
|
-
const cli = Cli.create('test')
|
|
2946
|
-
const sub = Cli.create('sub', { outputPolicy: 'agent-only' })
|
|
2947
|
-
sub.command('ping', { run: () => ({ pong: true }) })
|
|
2948
|
-
cli.command(sub)
|
|
2949
|
-
|
|
2950
|
-
const { output } = await serve(cli, ['sub', 'ping'])
|
|
2951
|
-
expect(output).toBe('')
|
|
2952
|
-
})
|
|
2953
|
-
|
|
2954
|
-
test('command overrides group outputPolicy', async () => {
|
|
2955
|
-
const cli = Cli.create('test')
|
|
2956
|
-
const sub = Cli.create('sub', { outputPolicy: 'agent-only' })
|
|
2957
|
-
sub.command('ping', { outputPolicy: 'all', run: () => ({ pong: true }) })
|
|
2958
|
-
cli.command(sub)
|
|
2959
|
-
|
|
2960
|
-
const { output } = await serve(cli, ['sub', 'ping'])
|
|
2961
|
-
expect(output).toContain('pong: true')
|
|
2962
|
-
})
|
|
2963
|
-
|
|
2964
|
-
test('agent-only suppresses streaming chunks in human mode', async () => {
|
|
2965
|
-
const cli = Cli.create('test')
|
|
2966
|
-
cli.command('stream', {
|
|
2967
|
-
outputPolicy: 'agent-only',
|
|
2968
|
-
async *run() {
|
|
2969
|
-
yield { step: 1 }
|
|
2970
|
-
yield { step: 2 }
|
|
2971
|
-
},
|
|
2972
|
-
})
|
|
2973
|
-
|
|
2974
|
-
const { output } = await serve(cli, ['stream'])
|
|
2975
|
-
expect(output).toBe('')
|
|
2976
|
-
})
|
|
2977
|
-
|
|
2978
|
-
test('agent-only still shows errors in human mode', async () => {
|
|
2979
|
-
const cli = Cli.create('test')
|
|
2980
|
-
cli.command('fail', {
|
|
2981
|
-
outputPolicy: 'agent-only',
|
|
2982
|
-
run(c) {
|
|
2983
|
-
return c.error({ code: 'FAILED', message: 'something broke' })
|
|
2984
|
-
},
|
|
2985
|
-
})
|
|
2986
|
-
|
|
2987
|
-
const { output } = await serve(cli, ['fail'])
|
|
2988
|
-
expect(output).toContain('Error (FAILED): something broke')
|
|
2989
|
-
})
|
|
2990
|
-
|
|
2991
|
-
test('agent-only still shows CTAs in human mode', async () => {
|
|
2992
|
-
const cli = Cli.create('test')
|
|
2993
|
-
cli.command('ping', {
|
|
2994
|
-
outputPolicy: 'agent-only',
|
|
2995
|
-
run(c) {
|
|
2996
|
-
return c.ok({ pong: true }, { cta: { commands: ['ping'] } })
|
|
2997
|
-
},
|
|
2998
|
-
})
|
|
2999
|
-
|
|
3000
|
-
const { output } = await serve(cli, ['ping'])
|
|
3001
|
-
expect(output).not.toContain('pong')
|
|
3002
|
-
expect(output).toContain('ping')
|
|
3003
|
-
})
|
|
3004
|
-
|
|
3005
|
-
test('agent-only suppresses data when TTY', async () => {
|
|
3006
|
-
;(process.stdout as any).isTTY = true
|
|
3007
|
-
const cli = Cli.create('test')
|
|
3008
|
-
cli.command('ping', { outputPolicy: 'agent-only', run: () => ({ pong: true }) })
|
|
3009
|
-
|
|
3010
|
-
const { output } = await serve(cli, ['ping'])
|
|
3011
|
-
expect(output).toBe('')
|
|
3012
|
-
})
|
|
3013
|
-
|
|
3014
|
-
test('agent-only still displays data when not TTY (piped)', async () => {
|
|
3015
|
-
;(process.stdout as any).isTTY = false
|
|
3016
|
-
const cli = Cli.create('test')
|
|
3017
|
-
cli.command('ping', { outputPolicy: 'agent-only', run: () => ({ pong: true }) })
|
|
3018
|
-
|
|
3019
|
-
const { output } = await serve(cli, ['ping'])
|
|
3020
|
-
expect(output).toContain('pong')
|
|
3021
|
-
})
|
|
3022
|
-
|
|
3023
|
-
test('all displays data regardless of TTY', async () => {
|
|
3024
|
-
const cli = Cli.create('test')
|
|
3025
|
-
cli.command('ping', { outputPolicy: 'all', run: () => ({ pong: true }) })
|
|
3026
|
-
|
|
3027
|
-
;(process.stdout as any).isTTY = true
|
|
3028
|
-
const tty = await serve(cli, ['ping'])
|
|
3029
|
-
expect(tty.output).toContain('pong: true')
|
|
3030
|
-
|
|
3031
|
-
;(process.stdout as any).isTTY = false
|
|
3032
|
-
const piped = await serve(cli, ['ping'])
|
|
3033
|
-
expect(piped.output).toContain('pong')
|
|
3034
|
-
})
|
|
3035
|
-
|
|
3036
|
-
test('agent-only streaming suppresses when TTY, outputs when piped', async () => {
|
|
3037
|
-
const cli = Cli.create('test')
|
|
3038
|
-
cli.command('stream', {
|
|
3039
|
-
outputPolicy: 'agent-only',
|
|
3040
|
-
async *run() {
|
|
3041
|
-
yield { step: 1 }
|
|
3042
|
-
},
|
|
3043
|
-
})
|
|
3044
|
-
|
|
3045
|
-
;(process.stdout as any).isTTY = true
|
|
3046
|
-
const tty = await serve(cli, ['stream'])
|
|
3047
|
-
expect(tty.output).toBe('')
|
|
3048
|
-
|
|
3049
|
-
;(process.stdout as any).isTTY = false
|
|
3050
|
-
const piped = await serve(cli, ['stream'])
|
|
3051
|
-
expect(piped.output).toContain('step: 1')
|
|
3052
|
-
})
|
|
3053
|
-
|
|
3054
|
-
test('streaming respects CLI-level default format json', async () => {
|
|
3055
|
-
const cli = Cli.create('test', { format: 'json' })
|
|
3056
|
-
cli.command('stream', {
|
|
3057
|
-
async *run() {
|
|
3058
|
-
yield { step: 1 }
|
|
3059
|
-
yield { step: 2 }
|
|
3060
|
-
},
|
|
3061
|
-
})
|
|
3062
|
-
|
|
3063
|
-
const { output } = await serve(cli, ['stream'])
|
|
3064
|
-
expect(output).toContain('"step": 1')
|
|
3065
|
-
expect(output).toContain('"step": 2')
|
|
3066
|
-
expect(output).not.toContain('step: 1') // should not be toon format
|
|
3067
|
-
})
|
|
3068
|
-
|
|
3069
|
-
test('streaming respects CLI-level default format jsonl', async () => {
|
|
3070
|
-
const cli = Cli.create('test', { format: 'jsonl' })
|
|
3071
|
-
cli.command('stream', {
|
|
3072
|
-
async *run() {
|
|
3073
|
-
yield { step: 1 }
|
|
3074
|
-
yield { step: 2 }
|
|
3075
|
-
},
|
|
3076
|
-
})
|
|
3077
|
-
|
|
3078
|
-
const { output } = await serve(cli, ['stream'])
|
|
3079
|
-
expect(output).toContain('{"type":"chunk","data":{"step":1}}')
|
|
3080
|
-
expect(output).toContain('{"type":"chunk","data":{"step":2}}')
|
|
3081
|
-
})
|
|
3082
|
-
|
|
3083
|
-
test('e2e: realistic multi-level CLI with mixed policies', async () => {
|
|
3084
|
-
const cli = Cli.create('tool', { description: 'A deployment tool' })
|
|
3085
|
-
|
|
3086
|
-
// Top-level command with agent-only
|
|
3087
|
-
cli.command('deploy', {
|
|
3088
|
-
outputPolicy: 'agent-only',
|
|
3089
|
-
args: z.object({ env: z.enum(['staging', 'production']) }),
|
|
3090
|
-
run(c) {
|
|
3091
|
-
return c.ok(
|
|
3092
|
-
{ id: 'deploy-123', url: `https://${c.args.env}.example.com` },
|
|
3093
|
-
{ cta: { commands: [{ command: 'status', description: 'Check status' }] } },
|
|
3094
|
-
)
|
|
3095
|
-
},
|
|
3096
|
-
})
|
|
3097
|
-
|
|
3098
|
-
// Group with inherited agent-only
|
|
3099
|
-
const internal = Cli.create('internal', {
|
|
3100
|
-
description: 'Internal commands',
|
|
3101
|
-
outputPolicy: 'agent-only',
|
|
3102
|
-
})
|
|
3103
|
-
internal.command('sync', { run: () => ({ synced: 42, duration: '1.2s' }) })
|
|
3104
|
-
internal.command('healthcheck', {
|
|
3105
|
-
outputPolicy: 'all',
|
|
3106
|
-
run: () => ({ healthy: true }),
|
|
3107
|
-
})
|
|
3108
|
-
|
|
3109
|
-
// Group without policy — children default to 'all'
|
|
3110
|
-
const db = Cli.create('db', { description: 'Database commands' })
|
|
3111
|
-
db.command('migrate', { run: () => ({ migrated: 3 }) })
|
|
3112
|
-
|
|
3113
|
-
cli.command(internal)
|
|
3114
|
-
cli.command(db)
|
|
3115
|
-
|
|
3116
|
-
// deploy: agent-only suppresses data, shows CTA
|
|
3117
|
-
const deploy = await serve(cli, ['deploy', 'staging'])
|
|
3118
|
-
expect(deploy.output).not.toContain('deploy-123')
|
|
3119
|
-
expect(deploy.output).toContain('Check status')
|
|
3120
|
-
|
|
3121
|
-
// deploy --full-output: agent mode shows everything
|
|
3122
|
-
const deployFullOutput = await serve(cli, ['deploy', 'staging', '--full-output'])
|
|
3123
|
-
expect(deployFullOutput.output).toContain('deploy-123')
|
|
3124
|
-
expect(deployFullOutput.output).toContain('staging.example.com')
|
|
3125
|
-
|
|
3126
|
-
// deploy --json: agent mode shows data
|
|
3127
|
-
const deployJson = await serve(cli, ['deploy', 'staging', '--json'])
|
|
3128
|
-
expect(deployJson.output).toContain('deploy-123')
|
|
3129
|
-
|
|
3130
|
-
// internal sync: inherits agent-only from group
|
|
3131
|
-
const sync = await serve(cli, ['internal', 'sync'])
|
|
3132
|
-
expect(sync.output).toBe('')
|
|
3133
|
-
|
|
3134
|
-
// internal sync --json: agent mode works
|
|
3135
|
-
const syncJson = await serve(cli, ['internal', 'sync', '--json'])
|
|
3136
|
-
expect(syncJson.output).toContain('42')
|
|
3137
|
-
|
|
3138
|
-
// internal healthcheck: overrides to 'all'
|
|
3139
|
-
const health = await serve(cli, ['internal', 'healthcheck'])
|
|
3140
|
-
expect(health.output).toContain('healthy: true')
|
|
3141
|
-
|
|
3142
|
-
// db migrate: no policy, defaults to 'all'
|
|
3143
|
-
const migrate = await serve(cli, ['db', 'migrate'])
|
|
3144
|
-
expect(migrate.output).toContain('migrated: 3')
|
|
3145
|
-
})
|
|
3146
|
-
|
|
3147
|
-
test('e2e: middleware runs in order around handler', async () => {
|
|
3148
|
-
const order: string[] = []
|
|
3149
|
-
const cli = Cli.create('test')
|
|
3150
|
-
.use(async (_c, next) => {
|
|
3151
|
-
order.push('mw1:before')
|
|
3152
|
-
await next()
|
|
3153
|
-
order.push('mw1:after')
|
|
3154
|
-
})
|
|
3155
|
-
.use(async (_c, next) => {
|
|
3156
|
-
order.push('mw2:before')
|
|
3157
|
-
await next()
|
|
3158
|
-
order.push('mw2:after')
|
|
3159
|
-
})
|
|
3160
|
-
.command('ping', {
|
|
3161
|
-
run() {
|
|
3162
|
-
order.push('handler')
|
|
3163
|
-
return { pong: true }
|
|
3164
|
-
},
|
|
3165
|
-
})
|
|
3166
|
-
|
|
3167
|
-
const { output } = await serve(cli, ['ping'])
|
|
3168
|
-
expect(output).toContain('pong: true')
|
|
3169
|
-
expect(order).toEqual(['mw1:before', 'mw2:before', 'handler', 'mw2:after', 'mw1:after'])
|
|
3170
|
-
})
|
|
3171
|
-
|
|
3172
|
-
test('e2e: middleware can short-circuit by not calling next', async () => {
|
|
3173
|
-
const cli = Cli.create('test')
|
|
3174
|
-
.use(async (_c, _next) => {
|
|
3175
|
-
throw new Errors.IncurError({ code: 'FORBIDDEN', message: 'nope' })
|
|
3176
|
-
})
|
|
3177
|
-
.command('deploy', {
|
|
3178
|
-
run() {
|
|
3179
|
-
return { deployed: true }
|
|
3180
|
-
},
|
|
3181
|
-
})
|
|
3182
|
-
|
|
3183
|
-
const { output, exitCode } = await serve(cli, ['deploy'])
|
|
3184
|
-
expect(output).toContain('FORBIDDEN')
|
|
3185
|
-
expect(output).toContain('nope')
|
|
3186
|
-
expect(exitCode).toBe(1)
|
|
3187
|
-
})
|
|
3188
|
-
|
|
3189
|
-
test('e2e: group-scoped middleware only runs for group commands', async () => {
|
|
3190
|
-
const order: string[] = []
|
|
3191
|
-
const admin = Cli.create('admin', { description: 'Admin' })
|
|
3192
|
-
.use(async (_c, next) => {
|
|
3193
|
-
order.push('admin-mw')
|
|
3194
|
-
await next()
|
|
3195
|
-
})
|
|
3196
|
-
.command('reset', {
|
|
3197
|
-
run() {
|
|
3198
|
-
return { reset: true }
|
|
3199
|
-
},
|
|
3200
|
-
})
|
|
3201
|
-
|
|
3202
|
-
const cli = Cli.create('test')
|
|
3203
|
-
.use(async (_c, next) => {
|
|
3204
|
-
order.push('root-mw')
|
|
3205
|
-
await next()
|
|
3206
|
-
})
|
|
3207
|
-
.command('ping', { run: () => ({ pong: true }) })
|
|
3208
|
-
.command(admin)
|
|
3209
|
-
|
|
3210
|
-
// Group command: both root + admin middleware run
|
|
3211
|
-
order.length = 0
|
|
3212
|
-
await serve(cli, ['admin', 'reset'])
|
|
3213
|
-
expect(order).toEqual(['root-mw', 'admin-mw'])
|
|
3214
|
-
|
|
3215
|
-
// Non-group command: only root middleware runs
|
|
3216
|
-
order.length = 0
|
|
3217
|
-
await serve(cli, ['ping'])
|
|
3218
|
-
expect(order).toEqual(['root-mw'])
|
|
3219
|
-
})
|
|
3220
|
-
|
|
3221
|
-
test('e2e: vars with defaults and middleware set()', async () => {
|
|
3222
|
-
const cli = Cli.create('test', {
|
|
3223
|
-
vars: z.object({
|
|
3224
|
-
requestId: z.string().default('default-id'),
|
|
3225
|
-
user: z.string().default('anon'),
|
|
3226
|
-
}),
|
|
3227
|
-
})
|
|
3228
|
-
.use(async (c, next) => {
|
|
3229
|
-
c.set('user', 'alice')
|
|
3230
|
-
await next()
|
|
3231
|
-
})
|
|
3232
|
-
.command('whoami', {
|
|
3233
|
-
run(c) {
|
|
3234
|
-
return { user: c.var.user, requestId: c.var.requestId }
|
|
3235
|
-
},
|
|
3236
|
-
})
|
|
3237
|
-
|
|
3238
|
-
const { output } = await serve(cli, ['whoami'])
|
|
3239
|
-
expect(output).toContain('user: alice')
|
|
3240
|
-
expect(output).toContain('requestId: default-id')
|
|
3241
|
-
})
|
|
3242
|
-
|
|
3243
|
-
test('e2e: middleware does not run for --help', async () => {
|
|
3244
|
-
let middlewareRan = false
|
|
3245
|
-
const cli = Cli.create('test')
|
|
3246
|
-
.use(async (_c, next) => {
|
|
3247
|
-
middlewareRan = true
|
|
3248
|
-
await next()
|
|
3249
|
-
})
|
|
3250
|
-
.command('ping', { description: 'Ping', run: () => ({ pong: true }) })
|
|
3251
|
-
|
|
3252
|
-
await serve(cli, ['--help'])
|
|
3253
|
-
expect(middlewareRan).toBe(false)
|
|
3254
|
-
|
|
3255
|
-
await serve(cli, ['ping', '--help'])
|
|
3256
|
-
expect(middlewareRan).toBe(false)
|
|
3257
|
-
})
|
|
3258
|
-
|
|
3259
|
-
test('e2e: middleware receives parsed CLI-level env', async () => {
|
|
3260
|
-
let capturedEnv: any
|
|
3261
|
-
const cli = Cli.create('test', {
|
|
3262
|
-
env: z.object({
|
|
3263
|
-
API_TOKEN: z.string(),
|
|
3264
|
-
API_URL: z.string().default('https://api.example.com'),
|
|
3265
|
-
}),
|
|
3266
|
-
})
|
|
3267
|
-
.use(async (c, next) => {
|
|
3268
|
-
capturedEnv = c.env
|
|
3269
|
-
await next()
|
|
3270
|
-
})
|
|
3271
|
-
.command('deploy', { run: () => ({ ok: true }) })
|
|
3272
|
-
|
|
3273
|
-
await serve(cli, ['deploy'], { env: { API_TOKEN: 'secret-123' } })
|
|
3274
|
-
expect(capturedEnv).toEqual({ API_TOKEN: 'secret-123', API_URL: 'https://api.example.com' })
|
|
3275
|
-
})
|
|
3276
|
-
|
|
3277
|
-
test('e2e: CLI-level env validation error before middleware runs', async () => {
|
|
3278
|
-
const cli = Cli.create('test', {
|
|
3279
|
-
env: z.object({ API_TOKEN: z.string() }),
|
|
3280
|
-
})
|
|
3281
|
-
.use(async (_c, next) => {
|
|
3282
|
-
await next()
|
|
3283
|
-
})
|
|
3284
|
-
.command('deploy', { run: () => ({ ok: true }) })
|
|
3285
|
-
|
|
3286
|
-
const { output, exitCode } = await serve(cli, ['deploy'], { env: {} })
|
|
3287
|
-
expect(exitCode).toBe(1)
|
|
3288
|
-
expect(output).toContain('Error')
|
|
3289
|
-
})
|
|
3290
|
-
|
|
3291
|
-
test('e2e: per-command middleware receives parsed CLI-level env', async () => {
|
|
3292
|
-
let capturedEnv: any
|
|
3293
|
-
const cli = Cli.create('test', {
|
|
3294
|
-
env: z.object({
|
|
3295
|
-
API_TOKEN: z.string(),
|
|
3296
|
-
}),
|
|
3297
|
-
}).command('deploy', {
|
|
3298
|
-
middleware: [
|
|
3299
|
-
async (c, next) => {
|
|
3300
|
-
capturedEnv = c.env
|
|
3301
|
-
await next()
|
|
3302
|
-
},
|
|
3303
|
-
],
|
|
3304
|
-
run: () => ({ ok: true }),
|
|
3305
|
-
})
|
|
3306
|
-
|
|
3307
|
-
await serve(cli, ['deploy'], { env: { API_TOKEN: 'from-cmd-mw' } })
|
|
3308
|
-
expect(capturedEnv).toEqual({ API_TOKEN: 'from-cmd-mw' })
|
|
3309
|
-
})
|
|
3310
|
-
|
|
3311
|
-
test('e2e: CLI-level env available without middleware', async () => {
|
|
3312
|
-
const cli = Cli.create('test', {
|
|
3313
|
-
env: z.object({ API_TOKEN: z.string() }),
|
|
3314
|
-
}).command('deploy', { run: () => ({ ok: true }) })
|
|
3315
|
-
|
|
3316
|
-
// Validation still runs even without middleware
|
|
3317
|
-
const { exitCode } = await serve(cli, ['deploy'], { env: {} })
|
|
3318
|
-
expect(exitCode).toBe(1)
|
|
3319
|
-
})
|
|
3320
|
-
|
|
3321
|
-
test('e2e: middleware context has correct agent and command', async () => {
|
|
3322
|
-
let captured: { agent: boolean; command: string } | undefined
|
|
3323
|
-
const cli = Cli.create('test')
|
|
3324
|
-
.use(async (c, next) => {
|
|
3325
|
-
captured = { agent: c.agent, command: c.command }
|
|
3326
|
-
await next()
|
|
3327
|
-
})
|
|
3328
|
-
.command('deploy', { run: () => ({ ok: true }) })
|
|
3329
|
-
|
|
3330
|
-
await serve(cli, ['deploy'])
|
|
3331
|
-
expect(captured).toEqual({ agent: false, command: 'deploy' })
|
|
3332
|
-
})
|
|
3333
|
-
|
|
3334
|
-
test('e2e: middleware and run context expose format metadata', async () => {
|
|
3335
|
-
let mwCaptured:
|
|
3336
|
-
| {
|
|
3337
|
-
format: string
|
|
3338
|
-
formatExplicit: boolean
|
|
3339
|
-
}
|
|
3340
|
-
| undefined
|
|
3341
|
-
let runCaptured:
|
|
3342
|
-
| {
|
|
3343
|
-
format: string
|
|
3344
|
-
formatExplicit: boolean
|
|
3345
|
-
}
|
|
3346
|
-
| undefined
|
|
3347
|
-
|
|
3348
|
-
const cli = Cli.create('test')
|
|
3349
|
-
.use(async (c, next) => {
|
|
3350
|
-
mwCaptured = {
|
|
3351
|
-
format: c.format,
|
|
3352
|
-
formatExplicit: c.formatExplicit,
|
|
3353
|
-
}
|
|
3354
|
-
await next()
|
|
3355
|
-
})
|
|
3356
|
-
.command('deploy', {
|
|
3357
|
-
run(c) {
|
|
3358
|
-
runCaptured = {
|
|
3359
|
-
format: c.format,
|
|
3360
|
-
formatExplicit: c.formatExplicit,
|
|
3361
|
-
}
|
|
3362
|
-
return { ok: true }
|
|
3363
|
-
},
|
|
3364
|
-
})
|
|
3365
|
-
|
|
3366
|
-
await serve(cli, ['deploy', '--format', 'json'])
|
|
3367
|
-
expect(mwCaptured).toEqual({ format: 'json', formatExplicit: true })
|
|
3368
|
-
expect(runCaptured).toEqual({ format: 'json', formatExplicit: true })
|
|
3369
|
-
})
|
|
3370
|
-
|
|
3371
|
-
test('e2e: middleware works with streaming handlers', async () => {
|
|
3372
|
-
const order: string[] = []
|
|
3373
|
-
const cli = Cli.create('test')
|
|
3374
|
-
.use(async (_c, next) => {
|
|
3375
|
-
order.push('before')
|
|
3376
|
-
await next()
|
|
3377
|
-
order.push('after')
|
|
3378
|
-
})
|
|
3379
|
-
.command('stream', {
|
|
3380
|
-
async *run() {
|
|
3381
|
-
order.push('chunk1')
|
|
3382
|
-
yield { n: 1 }
|
|
3383
|
-
order.push('chunk2')
|
|
3384
|
-
yield { n: 2 }
|
|
3385
|
-
},
|
|
3386
|
-
})
|
|
3387
|
-
|
|
3388
|
-
const { output } = await serve(cli, ['stream'])
|
|
3389
|
-
expect(output).toContain('n: 1')
|
|
3390
|
-
expect(output).toContain('n: 2')
|
|
3391
|
-
expect(order).toEqual(['before', 'chunk1', 'chunk2', 'after'])
|
|
3392
|
-
})
|
|
3393
|
-
|
|
3394
|
-
test('e2e: middleware errors propagate through catch', async () => {
|
|
3395
|
-
const cli = Cli.create('test')
|
|
3396
|
-
.use(async (_c, next) => {
|
|
3397
|
-
await next()
|
|
3398
|
-
throw new Error('after-error')
|
|
3399
|
-
})
|
|
3400
|
-
.command('ping', { run: () => ({ pong: true }) })
|
|
3401
|
-
|
|
3402
|
-
const { output, exitCode } = await serve(cli, ['ping'])
|
|
3403
|
-
expect(output).toContain('after-error')
|
|
3404
|
-
expect(exitCode).toBe(1)
|
|
3405
|
-
})
|
|
3406
|
-
|
|
3407
|
-
test('e2e: per-command middleware runs after root middleware', async () => {
|
|
3408
|
-
const order: string[] = []
|
|
3409
|
-
const cli = Cli.create('test')
|
|
3410
|
-
.use(async (_c, next) => {
|
|
3411
|
-
order.push('root')
|
|
3412
|
-
await next()
|
|
3413
|
-
})
|
|
3414
|
-
.command('ping', {
|
|
3415
|
-
middleware: [
|
|
3416
|
-
async (_c, next) => {
|
|
3417
|
-
order.push('cmd')
|
|
3418
|
-
await next()
|
|
3419
|
-
},
|
|
3420
|
-
],
|
|
3421
|
-
run() {
|
|
3422
|
-
order.push('run')
|
|
3423
|
-
return { pong: true }
|
|
3424
|
-
},
|
|
3425
|
-
})
|
|
3426
|
-
.command('other', {
|
|
3427
|
-
run() {
|
|
3428
|
-
order.push('other-run')
|
|
3429
|
-
return { ok: true }
|
|
3430
|
-
},
|
|
3431
|
-
})
|
|
3432
|
-
|
|
3433
|
-
await serve(cli, ['ping'])
|
|
3434
|
-
expect(order).toEqual(['root', 'cmd', 'run'])
|
|
3435
|
-
|
|
3436
|
-
// per-command middleware does not run for other commands
|
|
3437
|
-
order.length = 0
|
|
3438
|
-
await serve(cli, ['other'])
|
|
3439
|
-
expect(order).toEqual(['root', 'other-run'])
|
|
3440
|
-
})
|
|
3441
|
-
|
|
3442
|
-
test('e2e: per-command middleware composes with group middleware', async () => {
|
|
3443
|
-
const order: string[] = []
|
|
3444
|
-
const cli = Cli.create('test')
|
|
3445
|
-
const admin = Cli.create('admin', { description: 'Admin' })
|
|
3446
|
-
.use(async (_c, next) => {
|
|
3447
|
-
order.push('group')
|
|
3448
|
-
await next()
|
|
3449
|
-
})
|
|
3450
|
-
.command('reset', {
|
|
3451
|
-
middleware: [
|
|
3452
|
-
async (_c, next) => {
|
|
3453
|
-
order.push('cmd')
|
|
3454
|
-
await next()
|
|
3455
|
-
},
|
|
3456
|
-
],
|
|
3457
|
-
run() {
|
|
3458
|
-
order.push('run')
|
|
3459
|
-
return { reset: true }
|
|
3460
|
-
},
|
|
3461
|
-
})
|
|
3462
|
-
|
|
3463
|
-
cli.command(admin)
|
|
3464
|
-
await serve(cli, ['admin', 'reset'])
|
|
3465
|
-
expect(order).toEqual(['group', 'cmd', 'run'])
|
|
3466
|
-
})
|
|
3467
|
-
|
|
3468
|
-
test('e2e: per-command middleware can short-circuit', async () => {
|
|
3469
|
-
const cli = Cli.create('test').command('guarded', {
|
|
3470
|
-
middleware: [
|
|
3471
|
-
async () => {
|
|
3472
|
-
throw new Error('blocked')
|
|
3473
|
-
},
|
|
3474
|
-
],
|
|
3475
|
-
run: () => ({ ok: true }),
|
|
3476
|
-
})
|
|
3477
|
-
|
|
3478
|
-
const { output, exitCode } = await serve(cli, ['guarded'])
|
|
3479
|
-
expect(output).toContain('blocked')
|
|
3480
|
-
expect(exitCode).toBe(1)
|
|
3481
|
-
})
|
|
3482
|
-
|
|
3483
|
-
test('e2e: middleware error() short-circuits before run()', async () => {
|
|
3484
|
-
const vars = z.object({ authed: z.boolean().default(false) })
|
|
3485
|
-
const cli = Cli.create('test', { vars })
|
|
3486
|
-
.use((c, _next) => {
|
|
3487
|
-
if (!c.var.authed) return c.error({ code: 'DENIED', message: 'Not allowed' })
|
|
3488
|
-
})
|
|
3489
|
-
.command('secret', {
|
|
3490
|
-
output: z.string(),
|
|
3491
|
-
run: () => 'should not reach',
|
|
3492
|
-
})
|
|
3493
|
-
|
|
3494
|
-
const { output, exitCode } = await serve(cli, ['secret'])
|
|
3495
|
-
expect(exitCode).toBe(1)
|
|
3496
|
-
expect(output).toContain('DENIED')
|
|
3497
|
-
expect(output).toContain('Not allowed')
|
|
3498
|
-
expect(output).not.toContain('should not reach')
|
|
3499
|
-
})
|
|
3500
|
-
|
|
3501
|
-
test('e2e: middleware error() with CTA', async () => {
|
|
3502
|
-
const cli = Cli.create('test')
|
|
3503
|
-
.use((c, _next) => {
|
|
3504
|
-
return c.error({
|
|
3505
|
-
code: 'AUTH',
|
|
3506
|
-
message: 'Not authenticated',
|
|
3507
|
-
cta: {
|
|
3508
|
-
description: 'Log in:',
|
|
3509
|
-
commands: [{ command: 'auth login', description: 'Log in' }],
|
|
3510
|
-
},
|
|
3511
|
-
})
|
|
3512
|
-
})
|
|
3513
|
-
.command('deploy', { run: () => ({ ok: true }) })
|
|
3514
|
-
|
|
3515
|
-
const { output, exitCode } = await serve(cli, ['deploy'])
|
|
3516
|
-
expect(exitCode).toBe(1)
|
|
3517
|
-
expect(output).toContain('AUTH')
|
|
3518
|
-
expect(output).toContain('Not authenticated')
|
|
3519
|
-
})
|
|
3520
|
-
|
|
3521
|
-
test('e2e: agent-only with streaming and error in nested group', async () => {
|
|
3522
|
-
const cli = Cli.create('tool')
|
|
3523
|
-
const ops = Cli.create('ops', {
|
|
3524
|
-
description: 'Operations',
|
|
3525
|
-
outputPolicy: 'agent-only',
|
|
3526
|
-
})
|
|
3527
|
-
|
|
3528
|
-
ops.command('logs', {
|
|
3529
|
-
async *run() {
|
|
3530
|
-
yield { line: 'Starting...' }
|
|
3531
|
-
yield { line: 'Processing...' }
|
|
3532
|
-
yield { line: 'Done.' }
|
|
3533
|
-
},
|
|
3534
|
-
})
|
|
3535
|
-
|
|
3536
|
-
ops.command('restart', {
|
|
3537
|
-
run(c) {
|
|
3538
|
-
return c.error({ code: 'PERMISSION_DENIED', message: 'Requires admin role' })
|
|
3539
|
-
},
|
|
3540
|
-
})
|
|
3541
|
-
|
|
3542
|
-
cli.command(ops)
|
|
3543
|
-
|
|
3544
|
-
// Streaming: agent-only suppresses chunks in human mode
|
|
3545
|
-
const logs = await serve(cli, ['ops', 'logs'])
|
|
3546
|
-
expect(logs.output).toBe('')
|
|
3547
|
-
|
|
3548
|
-
// Streaming: --format jsonl still works
|
|
3549
|
-
const logsJsonl = await serve(cli, ['ops', 'logs', '--format', 'jsonl'])
|
|
3550
|
-
expect(logsJsonl.output).toContain('"type":"chunk"')
|
|
3551
|
-
expect(logsJsonl.output).toContain('Starting...')
|
|
3552
|
-
|
|
3553
|
-
// Errors still display in human mode despite agent-only
|
|
3554
|
-
const restart = await serve(cli, ['ops', 'restart'])
|
|
3555
|
-
expect(restart.output).toContain('Error (PERMISSION_DENIED): Requires admin role')
|
|
3556
|
-
expect(restart.exitCode).toBe(1)
|
|
3557
|
-
})
|
|
3558
|
-
})
|
|
3559
|
-
|
|
3560
|
-
test('--llms scoped to leaf command', async () => {
|
|
3561
|
-
const cli = Cli.create('test')
|
|
3562
|
-
cli.command('ping', { description: 'Health check', run: () => ({ pong: true }) })
|
|
3563
|
-
cli.command('greet', { description: 'Greet someone', run: () => ({}) })
|
|
3564
|
-
|
|
3565
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json', 'ping'])
|
|
3566
|
-
const manifest = JSON.parse(output)
|
|
3567
|
-
expect(manifest.commands).toHaveLength(1)
|
|
3568
|
-
expect(manifest.commands[0].name).toBe('ping')
|
|
3569
|
-
})
|
|
3570
|
-
|
|
3571
|
-
test('--llms scoped to group', async () => {
|
|
3572
|
-
const cli = Cli.create('test')
|
|
3573
|
-
const pr = Cli.create('pr', { description: 'PR management' })
|
|
3574
|
-
.command('list', { description: 'List PRs', run: () => ({}) })
|
|
3575
|
-
.command('create', { description: 'Create PR', run: () => ({}) })
|
|
3576
|
-
cli.command(pr)
|
|
3577
|
-
cli.command('ping', { description: 'Health check', run: () => ({}) })
|
|
3578
|
-
|
|
3579
|
-
const { output } = await serve(cli, ['--llms-full', '--format', 'json', 'pr'])
|
|
3580
|
-
const manifest = JSON.parse(output)
|
|
3581
|
-
expect(manifest.commands).toHaveLength(2)
|
|
3582
|
-
expect(manifest.commands.every((c: any) => c.name.startsWith('pr '))).toBe(true)
|
|
3583
|
-
})
|
|
3584
|
-
|
|
3585
|
-
test('--help on root with rootCommand shows command help with subcommands', async () => {
|
|
3586
|
-
const cli = Cli.create('tool', {
|
|
3587
|
-
description: 'A tool',
|
|
3588
|
-
args: z.object({ name: z.string().describe('Name') }),
|
|
3589
|
-
run: () => ({}),
|
|
3590
|
-
})
|
|
3591
|
-
cli.command('status', { description: 'Show status', run: () => ({}) })
|
|
3592
|
-
|
|
3593
|
-
const { output } = await serve(cli, ['--help'])
|
|
3594
|
-
expect(output).toContain('tool — A tool')
|
|
3595
|
-
expect(output).toContain('name')
|
|
3596
|
-
expect(output).toContain('status')
|
|
3597
|
-
})
|
|
3598
|
-
|
|
3599
|
-
test('streaming: generator yields error in incremental mode', async () => {
|
|
3600
|
-
const cli = Cli.create('test')
|
|
3601
|
-
cli.command('fail', {
|
|
3602
|
-
async *run(c) {
|
|
3603
|
-
yield { step: 1 }
|
|
3604
|
-
yield c.error({ code: 'STREAM_ERR', message: 'mid-stream failure' })
|
|
3605
|
-
},
|
|
3606
|
-
})
|
|
3607
|
-
|
|
3608
|
-
const { output, exitCode } = await serve(cli, ['fail'])
|
|
3609
|
-
expect(exitCode).toBe(1)
|
|
3610
|
-
expect(output).toContain('STREAM_ERR')
|
|
3611
|
-
expect(output).toContain('mid-stream failure')
|
|
3612
|
-
})
|
|
3613
|
-
|
|
3614
|
-
test('streaming: generator yields error in jsonl mode', async () => {
|
|
3615
|
-
const cli = Cli.create('test')
|
|
3616
|
-
cli.command('fail', {
|
|
3617
|
-
async *run(c) {
|
|
3618
|
-
yield { step: 1 }
|
|
3619
|
-
yield c.error({ code: 'STREAM_ERR', message: 'mid-stream failure' })
|
|
3620
|
-
},
|
|
3621
|
-
})
|
|
3622
|
-
|
|
3623
|
-
const { output, exitCode } = await serve(cli, ['fail', '--format', 'jsonl'])
|
|
3624
|
-
expect(exitCode).toBe(1)
|
|
3625
|
-
expect(output).toContain('"type":"error"')
|
|
3626
|
-
expect(output).toContain('STREAM_ERR')
|
|
3627
|
-
})
|
|
3628
|
-
|
|
3629
|
-
test('streaming: generator yields error in buffered mode', async () => {
|
|
3630
|
-
const cli = Cli.create('test')
|
|
3631
|
-
cli.command('fail', {
|
|
3632
|
-
async *run(c) {
|
|
3633
|
-
yield { step: 1 }
|
|
3634
|
-
yield c.error({ code: 'BUF_ERR', message: 'buffered failure' })
|
|
3635
|
-
},
|
|
3636
|
-
})
|
|
3637
|
-
|
|
3638
|
-
const { output, exitCode } = await serve(cli, ['fail', '--format', 'json'])
|
|
3639
|
-
expect(exitCode).toBe(1)
|
|
3640
|
-
expect(output).toContain('BUF_ERR')
|
|
3641
|
-
})
|
|
3642
|
-
|
|
3643
|
-
test('streaming: generator throws in buffered mode', async () => {
|
|
3644
|
-
const cli = Cli.create('test')
|
|
3645
|
-
cli.command('boom', {
|
|
3646
|
-
async *run() {
|
|
3647
|
-
yield { step: 1 }
|
|
3648
|
-
throw new Error('generator exploded')
|
|
3649
|
-
},
|
|
3650
|
-
})
|
|
3651
|
-
|
|
3652
|
-
const { output, exitCode } = await serve(cli, ['boom', '--format', 'json'])
|
|
3653
|
-
expect(exitCode).toBe(1)
|
|
3654
|
-
expect(output).toContain('generator exploded')
|
|
3655
|
-
})
|
|
3656
|
-
|
|
3657
|
-
test('streaming: generator returns error in buffered mode', async () => {
|
|
3658
|
-
const cli = Cli.create('test')
|
|
3659
|
-
cli.command('fail', {
|
|
3660
|
-
async *run(c) {
|
|
3661
|
-
yield { step: 1 }
|
|
3662
|
-
return c.error({ code: 'RET_ERR', message: 'returned error' })
|
|
3663
|
-
},
|
|
3664
|
-
})
|
|
3665
|
-
|
|
3666
|
-
const { output, exitCode } = await serve(cli, ['fail', '--format', 'json'])
|
|
3667
|
-
expect(exitCode).toBe(1)
|
|
3668
|
-
expect(output).toContain('RET_ERR')
|
|
3669
|
-
})
|
|
3670
|
-
|
|
3671
|
-
test('c.error({ exitCode }) uses custom exit code', async () => {
|
|
3672
|
-
const cli = Cli.create('test')
|
|
3673
|
-
cli.command('fail', {
|
|
3674
|
-
run(c) {
|
|
3675
|
-
return c.error({ code: 'AUTH', message: 'not authed', exitCode: 10 })
|
|
3676
|
-
},
|
|
3677
|
-
})
|
|
3678
|
-
|
|
3679
|
-
const { output, exitCode } = await serve(cli, ['fail'])
|
|
3680
|
-
expect(exitCode).toBe(10)
|
|
3681
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3682
|
-
"code: AUTH
|
|
3683
|
-
message: not authed
|
|
3684
|
-
"
|
|
3685
|
-
`)
|
|
3686
|
-
})
|
|
3687
|
-
|
|
3688
|
-
test('c.error() without exitCode defaults to 1', async () => {
|
|
3689
|
-
const cli = Cli.create('test')
|
|
3690
|
-
cli.command('fail', {
|
|
3691
|
-
run(c) {
|
|
3692
|
-
return c.error({ code: 'BAD', message: 'fail' })
|
|
3693
|
-
},
|
|
3694
|
-
})
|
|
3695
|
-
|
|
3696
|
-
const { output, exitCode } = await serve(cli, ['fail'])
|
|
3697
|
-
expect(exitCode).toBe(1)
|
|
3698
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3699
|
-
"code: BAD
|
|
3700
|
-
message: fail
|
|
3701
|
-
"
|
|
3702
|
-
`)
|
|
3703
|
-
})
|
|
3704
|
-
|
|
3705
|
-
test('middleware c.error({ exitCode }) uses custom exit code', async () => {
|
|
3706
|
-
const cli = Cli.create('test')
|
|
3707
|
-
cli.use((c) => {
|
|
3708
|
-
return c.error({ code: 'MW_ERR', message: 'blocked', exitCode: 42 })
|
|
3709
|
-
})
|
|
3710
|
-
cli.command('anything', { run: () => ({}) })
|
|
3711
|
-
|
|
3712
|
-
const { output, exitCode } = await serve(cli, ['anything'])
|
|
3713
|
-
expect(exitCode).toBe(42)
|
|
3714
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3715
|
-
"code: MW_ERR
|
|
3716
|
-
message: blocked
|
|
3717
|
-
"
|
|
3718
|
-
`)
|
|
3719
|
-
})
|
|
3720
|
-
|
|
3721
|
-
test('thrown IncurError with exitCode uses custom exit code', async () => {
|
|
3722
|
-
const cli = Cli.create('test')
|
|
3723
|
-
cli.command('fail', {
|
|
3724
|
-
run() {
|
|
3725
|
-
throw new Errors.IncurError({ code: 'RATE_LIMITED', message: 'too fast', exitCode: 99 })
|
|
3726
|
-
},
|
|
3727
|
-
})
|
|
3728
|
-
|
|
3729
|
-
const { output, exitCode } = await serve(cli, ['fail'])
|
|
3730
|
-
expect(exitCode).toBe(99)
|
|
3731
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3732
|
-
"code: RATE_LIMITED
|
|
3733
|
-
message: too fast
|
|
3734
|
-
retryable: false
|
|
3735
|
-
"
|
|
3736
|
-
`)
|
|
3737
|
-
})
|
|
3738
|
-
|
|
3739
|
-
test('streaming: c.error({ exitCode }) in yield uses custom exit code', async () => {
|
|
3740
|
-
const cli = Cli.create('test')
|
|
3741
|
-
cli.command('fail', {
|
|
3742
|
-
async *run(c) {
|
|
3743
|
-
yield { step: 1 }
|
|
3744
|
-
yield c.error({ code: 'STREAM_ERR', message: 'mid-stream', exitCode: 77 })
|
|
3745
|
-
},
|
|
3746
|
-
})
|
|
3747
|
-
|
|
3748
|
-
const { output, exitCode } = await serve(cli, ['fail', '--format', 'jsonl'])
|
|
3749
|
-
expect(exitCode).toBe(77)
|
|
3750
|
-
expect(output).toContain('STREAM_ERR')
|
|
3751
|
-
})
|
|
3752
|
-
|
|
3753
|
-
test('deprecated short flag emits warning', async () => {
|
|
3754
|
-
const cli = Cli.create('app').command('deploy', {
|
|
3755
|
-
options: z.object({
|
|
3756
|
-
zone: z.string().optional().describe('Availability zone').meta({ deprecated: true }),
|
|
3757
|
-
}),
|
|
3758
|
-
alias: { zone: 'z' },
|
|
3759
|
-
run: ({ options }) => ({ zone: options.zone }),
|
|
3760
|
-
})
|
|
3761
|
-
|
|
3762
|
-
const spy = vi.spyOn(process.stderr, 'write').mockImplementation(() => true)
|
|
3763
|
-
;(process.stdout as any).isTTY = true
|
|
3764
|
-
try {
|
|
3765
|
-
await serve(cli, ['deploy', '-z', 'us-east-1'])
|
|
3766
|
-
expect(spy).toHaveBeenCalledWith('Warning: --zone is deprecated\n')
|
|
3767
|
-
} finally {
|
|
3768
|
-
;(process.stdout as any).isTTY = false
|
|
3769
|
-
spy.mockRestore()
|
|
3770
|
-
}
|
|
3771
|
-
})
|
|
3772
|
-
|
|
3773
|
-
test('--llms includes hint in skill output', async () => {
|
|
3774
|
-
const cli = Cli.create('test')
|
|
3775
|
-
cli.command('deploy', {
|
|
3776
|
-
description: 'Deploy the app',
|
|
3777
|
-
hint: 'Always confirm before deploying to production',
|
|
3778
|
-
run: () => ({}),
|
|
3779
|
-
})
|
|
3780
|
-
|
|
3781
|
-
const { output } = await serve(cli, ['--llms-full'])
|
|
3782
|
-
expect(output).toContain('Always confirm before deploying to production')
|
|
3783
|
-
})
|
|
3784
|
-
|
|
3785
|
-
describe('fetch', async () => {
|
|
3786
|
-
const { app } = await import('../test/fixtures/hono-api.js')
|
|
3787
|
-
|
|
3788
|
-
test('command with fetch: GET /users', async () => {
|
|
3789
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3790
|
-
description: 'Hono API',
|
|
3791
|
-
fetch: app.fetch,
|
|
3792
|
-
})
|
|
3793
|
-
const { output } = await serve(cli, ['api', 'users'])
|
|
3794
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3795
|
-
"users[1]{id,name}:
|
|
3796
|
-
1,Alice
|
|
3797
|
-
limit: 10
|
|
3798
|
-
"
|
|
3799
|
-
`)
|
|
3800
|
-
})
|
|
3801
|
-
|
|
3802
|
-
test('GET with query params', async () => {
|
|
3803
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3804
|
-
fetch: app.fetch,
|
|
3805
|
-
})
|
|
3806
|
-
const { output } = await serve(cli, ['api', 'users', '--limit', '5'])
|
|
3807
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3808
|
-
"users[1]{id,name}:
|
|
3809
|
-
1,Alice
|
|
3810
|
-
limit: 5
|
|
3811
|
-
"
|
|
3812
|
-
`)
|
|
3813
|
-
})
|
|
3814
|
-
|
|
3815
|
-
test('GET /users/:id via path segments', async () => {
|
|
3816
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3817
|
-
fetch: app.fetch,
|
|
3818
|
-
})
|
|
3819
|
-
const { output } = await serve(cli, ['api', 'users', '42'])
|
|
3820
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3821
|
-
"id: 42
|
|
3822
|
-
name: Alice
|
|
3823
|
-
"
|
|
3824
|
-
`)
|
|
3825
|
-
})
|
|
3826
|
-
|
|
3827
|
-
test('POST with -X and -d', async () => {
|
|
3828
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3829
|
-
fetch: app.fetch,
|
|
3830
|
-
})
|
|
3831
|
-
const { output } = await serve(cli, ['api', 'users', '-X', 'POST', '-d', '{"name":"Bob"}'])
|
|
3832
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3833
|
-
"created: true
|
|
3834
|
-
name: Bob
|
|
3835
|
-
"
|
|
3836
|
-
`)
|
|
3837
|
-
})
|
|
3838
|
-
|
|
3839
|
-
test('implicit POST with --body', async () => {
|
|
3840
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3841
|
-
fetch: app.fetch,
|
|
3842
|
-
})
|
|
3843
|
-
const { output } = await serve(cli, ['api', 'users', '--body', '{"name":"Eve"}'])
|
|
3844
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3845
|
-
"created: true
|
|
3846
|
-
name: Eve
|
|
3847
|
-
"
|
|
3848
|
-
`)
|
|
3849
|
-
})
|
|
3850
|
-
|
|
3851
|
-
test('DELETE with --method', async () => {
|
|
3852
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3853
|
-
fetch: app.fetch,
|
|
3854
|
-
})
|
|
3855
|
-
const { output } = await serve(cli, ['api', 'users', '1', '--method', 'DELETE'])
|
|
3856
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3857
|
-
"deleted: true
|
|
3858
|
-
id: 1
|
|
3859
|
-
"
|
|
3860
|
-
`)
|
|
3861
|
-
})
|
|
3862
|
-
|
|
3863
|
-
test('error response → exit code 1', async () => {
|
|
3864
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3865
|
-
fetch: app.fetch,
|
|
3866
|
-
})
|
|
3867
|
-
const { exitCode, output } = await serve(cli, ['api', 'error'])
|
|
3868
|
-
expect(exitCode).toBe(1)
|
|
3869
|
-
expect(output).toContain('HTTP_404')
|
|
3870
|
-
})
|
|
3871
|
-
|
|
3872
|
-
test('--format json', async () => {
|
|
3873
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3874
|
-
fetch: app.fetch,
|
|
3875
|
-
})
|
|
3876
|
-
const { output } = await serve(cli, ['api', 'health', '--format', 'json'])
|
|
3877
|
-
expect(JSON.parse(output)).toEqual({ ok: true })
|
|
3878
|
-
})
|
|
3879
|
-
|
|
3880
|
-
test('--full-output includes request/response meta', async () => {
|
|
3881
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3882
|
-
fetch: app.fetch,
|
|
3883
|
-
})
|
|
3884
|
-
const { output } = await serve(cli, ['api', 'health', '--full-output', '--format', 'json'])
|
|
3885
|
-
const parsed = JSON.parse(output)
|
|
3886
|
-
expect(parsed.ok).toBe(true)
|
|
3887
|
-
expect(parsed.data).toEqual({ ok: true })
|
|
3888
|
-
expect(parsed.meta.command).toBe('api')
|
|
3889
|
-
})
|
|
3890
|
-
|
|
3891
|
-
test('native + fetch commands coexist', async () => {
|
|
3892
|
-
const cli = Cli.create('test', { description: 'test' })
|
|
3893
|
-
.command('api', { fetch: app.fetch })
|
|
3894
|
-
.command('ping', { run: () => ({ pong: true }) })
|
|
3895
|
-
const { output: fetchOut } = await serve(cli, ['api', 'health'])
|
|
3896
|
-
expect(fetchOut).toContain('ok: true')
|
|
3897
|
-
const { output: nativeOut } = await serve(cli, ['ping'])
|
|
3898
|
-
expect(nativeOut).toContain('pong: true')
|
|
3899
|
-
})
|
|
3900
|
-
|
|
3901
|
-
test('root-level fetch', async () => {
|
|
3902
|
-
const cli = Cli.create('api', { description: 'API', fetch: app.fetch })
|
|
3903
|
-
const { output } = await serve(cli, ['users'])
|
|
3904
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3905
|
-
"users[1]{id,name}:
|
|
3906
|
-
1,Alice
|
|
3907
|
-
limit: 10
|
|
3908
|
-
"
|
|
3909
|
-
`)
|
|
3910
|
-
})
|
|
3911
|
-
|
|
3912
|
-
test('root-level fetch with typo of known command → did you mean', async () => {
|
|
3913
|
-
const cli = Cli.create('api', { description: 'API', fetch: app.fetch }).command('upgrade', {
|
|
3914
|
-
run: () => ({ upgraded: true }),
|
|
3915
|
-
})
|
|
3916
|
-
const { output, exitCode } = await serve(cli, ['upgra'])
|
|
3917
|
-
expect(exitCode).toBe(1)
|
|
3918
|
-
expect(output).toContain("Did you mean 'upgrade'?")
|
|
3919
|
-
})
|
|
3920
|
-
|
|
3921
|
-
test('root-level fetch with no args → root path', async () => {
|
|
3922
|
-
const cli = Cli.create('api', { description: 'API', fetch: app.fetch })
|
|
3923
|
-
// Hono returns 404 for / since we don't have a root route
|
|
3924
|
-
const { exitCode } = await serve(cli, [])
|
|
3925
|
-
expect(exitCode).toBe(1)
|
|
3926
|
-
})
|
|
3927
|
-
|
|
3928
|
-
test('--help on fetch command', async () => {
|
|
3929
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3930
|
-
description: 'Proxy to Hono API',
|
|
3931
|
-
fetch: app.fetch,
|
|
3932
|
-
})
|
|
3933
|
-
const { output } = await serve(cli, ['api', '--help'])
|
|
3934
|
-
expect(output).toContain('Proxy to Hono API')
|
|
3935
|
-
expect(output).toContain('--method')
|
|
3936
|
-
expect(output).toContain('--header')
|
|
3937
|
-
expect(output).toContain('--body')
|
|
3938
|
-
})
|
|
3939
|
-
|
|
3940
|
-
test('text response', async () => {
|
|
3941
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3942
|
-
fetch: app.fetch,
|
|
3943
|
-
})
|
|
3944
|
-
const { output } = await serve(cli, ['api', 'text'])
|
|
3945
|
-
expect(output).toContain('hello world')
|
|
3946
|
-
})
|
|
3947
|
-
|
|
3948
|
-
test('middleware runs before fetch handler', async () => {
|
|
3949
|
-
let middlewareRan = false
|
|
3950
|
-
const cli = Cli.create('test', { description: 'test' })
|
|
3951
|
-
.use(async (_c, next) => {
|
|
3952
|
-
middlewareRan = true
|
|
3953
|
-
await next()
|
|
3954
|
-
})
|
|
3955
|
-
.command('api', { fetch: app.fetch })
|
|
3956
|
-
await serve(cli, ['api', 'health'])
|
|
3957
|
-
expect(middlewareRan).toBe(true)
|
|
3958
|
-
})
|
|
3959
|
-
|
|
3960
|
-
test('fetch command appears in --llms', async () => {
|
|
3961
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3962
|
-
description: 'Proxy to API',
|
|
3963
|
-
fetch: app.fetch,
|
|
3964
|
-
})
|
|
3965
|
-
const { output } = await serve(cli, ['--llms-full'])
|
|
3966
|
-
expect(output).toContain('api')
|
|
3967
|
-
expect(output).toContain('Proxy to API')
|
|
3968
|
-
})
|
|
3969
|
-
|
|
3970
|
-
test('fetch command appears in --help root', async () => {
|
|
3971
|
-
const cli = Cli.create('test', { description: 'test' }).command('api', {
|
|
3972
|
-
description: 'Proxy to API',
|
|
3973
|
-
fetch: app.fetch,
|
|
3974
|
-
})
|
|
3975
|
-
const { output } = await serve(cli, ['--help'])
|
|
3976
|
-
expect(output).toContain('api')
|
|
3977
|
-
expect(output).toContain('Proxy to API')
|
|
3978
|
-
})
|
|
3979
|
-
})
|
|
3980
|
-
|
|
3981
|
-
describe('--filter-output', () => {
|
|
3982
|
-
test('selects specific keys', async () => {
|
|
3983
|
-
const cli = Cli.create('test')
|
|
3984
|
-
cli.command('user', {
|
|
3985
|
-
run() {
|
|
3986
|
-
return { name: 'alice', age: 30, email: 'alice@example.com' }
|
|
3987
|
-
},
|
|
3988
|
-
})
|
|
3989
|
-
const { output } = await serve(cli, ['user', '--filter-output', 'name,age'])
|
|
3990
|
-
expect(output).toMatchInlineSnapshot(`
|
|
3991
|
-
"name: alice
|
|
3992
|
-
age: 30
|
|
3993
|
-
"
|
|
3994
|
-
`)
|
|
3995
|
-
})
|
|
3996
|
-
|
|
3997
|
-
test('returns scalar for single key', async () => {
|
|
3998
|
-
const cli = Cli.create('test')
|
|
3999
|
-
cli.command('greet', {
|
|
4000
|
-
args: z.object({ name: z.string() }),
|
|
4001
|
-
run(c) {
|
|
4002
|
-
return { message: `hello ${c.args.name}` }
|
|
4003
|
-
},
|
|
4004
|
-
})
|
|
4005
|
-
const { output } = await serve(cli, ['greet', 'world', '--filter-output', 'message'])
|
|
4006
|
-
expect(output).toMatchInlineSnapshot(`
|
|
4007
|
-
"hello world
|
|
4008
|
-
"
|
|
4009
|
-
`)
|
|
4010
|
-
})
|
|
4011
|
-
|
|
4012
|
-
test('dot notation filters nested keys', async () => {
|
|
4013
|
-
const cli = Cli.create('test')
|
|
4014
|
-
cli.command('profile', {
|
|
4015
|
-
run() {
|
|
4016
|
-
return { user: { name: 'alice', email: 'a@b.com' }, status: 'active' }
|
|
4017
|
-
},
|
|
4018
|
-
})
|
|
4019
|
-
const { output } = await serve(cli, ['profile', '--filter-output', 'user.name'])
|
|
4020
|
-
expect(output).toMatchInlineSnapshot(`
|
|
4021
|
-
"user:
|
|
4022
|
-
name: alice
|
|
4023
|
-
"
|
|
4024
|
-
`)
|
|
4025
|
-
})
|
|
4026
|
-
|
|
4027
|
-
test('array slice', async () => {
|
|
4028
|
-
const cli = Cli.create('test')
|
|
4029
|
-
cli.command('list', {
|
|
4030
|
-
run() {
|
|
4031
|
-
return { items: [1, 2, 3, 4, 5] }
|
|
4032
|
-
},
|
|
4033
|
-
})
|
|
4034
|
-
const { output } = await serve(cli, ['list', '--filter-output', 'items[0,3]'])
|
|
4035
|
-
expect(output).toMatchInlineSnapshot(`
|
|
4036
|
-
"items[3]: 1,2,3
|
|
4037
|
-
"
|
|
4038
|
-
`)
|
|
4039
|
-
})
|
|
4040
|
-
|
|
4041
|
-
test('works with --format json', async () => {
|
|
4042
|
-
const cli = Cli.create('test')
|
|
4043
|
-
cli.command('user', {
|
|
4044
|
-
run() {
|
|
4045
|
-
return { name: 'alice', age: 30, email: 'alice@example.com' }
|
|
4046
|
-
},
|
|
4047
|
-
})
|
|
4048
|
-
const { output } = await serve(cli, ['user', '--filter-output', 'name,age', '--format', 'json'])
|
|
4049
|
-
const parsed = JSON.parse(output)
|
|
4050
|
-
expect(parsed).toEqual({ name: 'alice', age: 30 })
|
|
4051
|
-
})
|
|
4052
|
-
})
|
|
4053
|
-
|
|
4054
|
-
async function fetchJson(cli: Cli.Cli<any, any, any>, req: Request) {
|
|
4055
|
-
const res = await cli.fetch(req)
|
|
4056
|
-
const body = await res.json()
|
|
4057
|
-
body.meta.duration = '<stripped>'
|
|
4058
|
-
return { status: res.status, body }
|
|
4059
|
-
}
|
|
4060
|
-
|
|
4061
|
-
describe('fetch', () => {
|
|
4062
|
-
test('GET /health → 200', async () => {
|
|
4063
|
-
const cli = Cli.create('test')
|
|
4064
|
-
cli.command('health', { run: () => ({ ok: true }) })
|
|
4065
|
-
expect(await fetchJson(cli, new Request('http://localhost/health'))).toMatchInlineSnapshot(`
|
|
4066
|
-
{
|
|
4067
|
-
"body": {
|
|
4068
|
-
"data": {
|
|
4069
|
-
"ok": true,
|
|
4070
|
-
},
|
|
4071
|
-
"meta": {
|
|
4072
|
-
"command": "health",
|
|
4073
|
-
"duration": "<stripped>",
|
|
4074
|
-
},
|
|
4075
|
-
"ok": true,
|
|
4076
|
-
},
|
|
4077
|
-
"status": 200,
|
|
4078
|
-
}
|
|
4079
|
-
`)
|
|
4080
|
-
})
|
|
4081
|
-
|
|
4082
|
-
test('GET /unknown → 404', async () => {
|
|
4083
|
-
const cli = Cli.create('test')
|
|
4084
|
-
cli.command('health', { run: () => ({}) })
|
|
4085
|
-
expect(await fetchJson(cli, new Request('http://localhost/unknown'))).toMatchInlineSnapshot(`
|
|
4086
|
-
{
|
|
4087
|
-
"body": {
|
|
4088
|
-
"error": {
|
|
4089
|
-
"code": "COMMAND_NOT_FOUND",
|
|
4090
|
-
"message": "'unknown' is not a command for 'test'.",
|
|
4091
|
-
},
|
|
4092
|
-
"meta": {
|
|
4093
|
-
"command": "unknown",
|
|
4094
|
-
"duration": "<stripped>",
|
|
4095
|
-
},
|
|
4096
|
-
"ok": false,
|
|
4097
|
-
},
|
|
4098
|
-
"status": 404,
|
|
4099
|
-
}
|
|
4100
|
-
`)
|
|
4101
|
-
})
|
|
4102
|
-
|
|
4103
|
-
test('GET /helath → 404 with suggestion', async () => {
|
|
4104
|
-
const cli = Cli.create('test')
|
|
4105
|
-
cli.command('health', { run: () => ({}) })
|
|
4106
|
-
const res = await fetchJson(cli, new Request('http://localhost/helath'))
|
|
4107
|
-
expect(res.status).toBe(404)
|
|
4108
|
-
expect(res.body.error.message).toContain("Did you mean 'health'?")
|
|
4109
|
-
})
|
|
4110
|
-
|
|
4111
|
-
test('GET / with root command → 200', async () => {
|
|
4112
|
-
const cli = Cli.create('test', { run: () => ({ root: true }) })
|
|
4113
|
-
expect(await fetchJson(cli, new Request('http://localhost/'))).toMatchInlineSnapshot(`
|
|
4114
|
-
{
|
|
4115
|
-
"body": {
|
|
4116
|
-
"data": {
|
|
4117
|
-
"root": true,
|
|
4118
|
-
},
|
|
4119
|
-
"meta": {
|
|
4120
|
-
"command": "test",
|
|
4121
|
-
"duration": "<stripped>",
|
|
4122
|
-
},
|
|
4123
|
-
"ok": true,
|
|
4124
|
-
},
|
|
4125
|
-
"status": 200,
|
|
4126
|
-
}
|
|
4127
|
-
`)
|
|
4128
|
-
})
|
|
4129
|
-
|
|
4130
|
-
test('GET / without root command → 404', async () => {
|
|
4131
|
-
const cli = Cli.create('test')
|
|
4132
|
-
cli.command('health', { run: () => ({}) })
|
|
4133
|
-
expect(await fetchJson(cli, new Request('http://localhost/'))).toMatchInlineSnapshot(`
|
|
4134
|
-
{
|
|
4135
|
-
"body": {
|
|
4136
|
-
"error": {
|
|
4137
|
-
"code": "COMMAND_NOT_FOUND",
|
|
4138
|
-
"message": "No root command defined.",
|
|
4139
|
-
},
|
|
4140
|
-
"meta": {
|
|
4141
|
-
"command": "/",
|
|
4142
|
-
"duration": "<stripped>",
|
|
4143
|
-
},
|
|
4144
|
-
"ok": false,
|
|
4145
|
-
},
|
|
4146
|
-
"status": 404,
|
|
4147
|
-
}
|
|
4148
|
-
`)
|
|
4149
|
-
})
|
|
4150
|
-
|
|
4151
|
-
test('GET search params → options', async () => {
|
|
4152
|
-
const cli = Cli.create('test')
|
|
4153
|
-
cli.command('users', {
|
|
4154
|
-
options: z.object({ limit: z.coerce.number().default(10) }),
|
|
4155
|
-
run: (c) => ({ limit: c.options.limit }),
|
|
4156
|
-
})
|
|
4157
|
-
expect(await fetchJson(cli, new Request('http://localhost/users?limit=5')))
|
|
4158
|
-
.toMatchInlineSnapshot(`
|
|
4159
|
-
{
|
|
4160
|
-
"body": {
|
|
4161
|
-
"data": {
|
|
4162
|
-
"limit": 5,
|
|
4163
|
-
},
|
|
4164
|
-
"meta": {
|
|
4165
|
-
"command": "users",
|
|
4166
|
-
"duration": "<stripped>",
|
|
4167
|
-
},
|
|
4168
|
-
"ok": true,
|
|
4169
|
-
},
|
|
4170
|
-
"status": 200,
|
|
4171
|
-
}
|
|
4172
|
-
`)
|
|
4173
|
-
})
|
|
4174
|
-
|
|
4175
|
-
test('POST body → options', async () => {
|
|
4176
|
-
const cli = Cli.create('test')
|
|
4177
|
-
cli.command('users', {
|
|
4178
|
-
options: z.object({ name: z.string() }),
|
|
4179
|
-
run: (c) => ({ created: true, name: c.options.name }),
|
|
4180
|
-
})
|
|
4181
|
-
const req = new Request('http://localhost/users', {
|
|
4182
|
-
method: 'POST',
|
|
4183
|
-
headers: { 'content-type': 'application/json' },
|
|
4184
|
-
body: JSON.stringify({ name: 'Bob' }),
|
|
4185
|
-
})
|
|
4186
|
-
expect(await fetchJson(cli, req)).toMatchInlineSnapshot(`
|
|
4187
|
-
{
|
|
4188
|
-
"body": {
|
|
4189
|
-
"data": {
|
|
4190
|
-
"created": true,
|
|
4191
|
-
"name": "Bob",
|
|
4192
|
-
},
|
|
4193
|
-
"meta": {
|
|
4194
|
-
"command": "users",
|
|
4195
|
-
"duration": "<stripped>",
|
|
4196
|
-
},
|
|
4197
|
-
"ok": true,
|
|
4198
|
-
},
|
|
4199
|
-
"status": 200,
|
|
4200
|
-
}
|
|
4201
|
-
`)
|
|
4202
|
-
})
|
|
4203
|
-
|
|
4204
|
-
test('trailing path segments → positional args', async () => {
|
|
4205
|
-
const cli = Cli.create('test')
|
|
4206
|
-
cli.command('users', {
|
|
4207
|
-
args: z.object({ id: z.coerce.number() }),
|
|
4208
|
-
run: (c) => ({ id: c.args.id }),
|
|
4209
|
-
})
|
|
4210
|
-
expect(await fetchJson(cli, new Request('http://localhost/users/42'))).toMatchInlineSnapshot(`
|
|
4211
|
-
{
|
|
4212
|
-
"body": {
|
|
4213
|
-
"data": {
|
|
4214
|
-
"id": 42,
|
|
4215
|
-
},
|
|
4216
|
-
"meta": {
|
|
4217
|
-
"command": "users",
|
|
4218
|
-
"duration": "<stripped>",
|
|
4219
|
-
},
|
|
4220
|
-
"ok": true,
|
|
4221
|
-
},
|
|
4222
|
-
"status": 200,
|
|
4223
|
-
}
|
|
4224
|
-
`)
|
|
4225
|
-
})
|
|
4226
|
-
|
|
4227
|
-
test('nested command resolution', async () => {
|
|
4228
|
-
const sub = Cli.create('users')
|
|
4229
|
-
sub.command('list', { run: () => ({ users: [] }) })
|
|
4230
|
-
const cli = Cli.create('test')
|
|
4231
|
-
cli.command(sub)
|
|
4232
|
-
expect(await fetchJson(cli, new Request('http://localhost/users/list'))).toMatchInlineSnapshot(`
|
|
4233
|
-
{
|
|
4234
|
-
"body": {
|
|
4235
|
-
"data": {
|
|
4236
|
-
"users": [],
|
|
4237
|
-
},
|
|
4238
|
-
"meta": {
|
|
4239
|
-
"command": "users list",
|
|
4240
|
-
"duration": "<stripped>",
|
|
4241
|
-
},
|
|
4242
|
-
"ok": true,
|
|
4243
|
-
},
|
|
4244
|
-
"status": 200,
|
|
4245
|
-
}
|
|
4246
|
-
`)
|
|
4247
|
-
})
|
|
4248
|
-
|
|
4249
|
-
test('validation error → 400', async () => {
|
|
4250
|
-
const cli = Cli.create('test')
|
|
4251
|
-
cli.command('users', {
|
|
4252
|
-
args: z.object({ id: z.coerce.number() }),
|
|
4253
|
-
run: (c) => ({ id: c.args.id }),
|
|
4254
|
-
})
|
|
4255
|
-
const { status, body } = await fetchJson(cli, new Request('http://localhost/users'))
|
|
4256
|
-
expect(status).toBe(400)
|
|
4257
|
-
expect(body.ok).toBe(false)
|
|
4258
|
-
expect(body.error.code).toBe('VALIDATION_ERROR')
|
|
4259
|
-
})
|
|
4260
|
-
|
|
4261
|
-
test('thrown error → 500', async () => {
|
|
4262
|
-
const cli = Cli.create('test')
|
|
4263
|
-
cli.command('fail', {
|
|
4264
|
-
run() {
|
|
4265
|
-
throw new Error('boom')
|
|
4266
|
-
},
|
|
4267
|
-
})
|
|
4268
|
-
expect(await fetchJson(cli, new Request('http://localhost/fail'))).toMatchInlineSnapshot(`
|
|
4269
|
-
{
|
|
4270
|
-
"body": {
|
|
4271
|
-
"error": {
|
|
4272
|
-
"code": "UNKNOWN",
|
|
4273
|
-
"message": "boom",
|
|
4274
|
-
},
|
|
4275
|
-
"meta": {
|
|
4276
|
-
"command": "fail",
|
|
4277
|
-
"duration": "<stripped>",
|
|
4278
|
-
},
|
|
4279
|
-
"ok": false,
|
|
4280
|
-
},
|
|
4281
|
-
"status": 500,
|
|
4282
|
-
}
|
|
4283
|
-
`)
|
|
4284
|
-
})
|
|
4285
|
-
|
|
4286
|
-
test('async generator → NDJSON streaming response', async () => {
|
|
4287
|
-
const cli = Cli.create('test')
|
|
4288
|
-
cli.command('stream', {
|
|
4289
|
-
async *run() {
|
|
4290
|
-
yield { progress: 1 }
|
|
4291
|
-
yield { progress: 2 }
|
|
4292
|
-
return { done: true }
|
|
4293
|
-
},
|
|
4294
|
-
})
|
|
4295
|
-
const res = await cli.fetch(new Request('http://localhost/stream'))
|
|
4296
|
-
expect(res.status).toBe(200)
|
|
4297
|
-
expect(res.headers.get('content-type')).toBe('application/x-ndjson')
|
|
4298
|
-
const text = await res.text()
|
|
4299
|
-
const lines = text
|
|
4300
|
-
.trim()
|
|
4301
|
-
.split('\n')
|
|
4302
|
-
.map((l) => JSON.parse(l))
|
|
4303
|
-
expect(lines).toMatchInlineSnapshot(`
|
|
4304
|
-
[
|
|
4305
|
-
{
|
|
4306
|
-
"data": {
|
|
4307
|
-
"progress": 1,
|
|
4308
|
-
},
|
|
4309
|
-
"type": "chunk",
|
|
4310
|
-
},
|
|
4311
|
-
{
|
|
4312
|
-
"data": {
|
|
4313
|
-
"progress": 2,
|
|
4314
|
-
},
|
|
4315
|
-
"type": "chunk",
|
|
4316
|
-
},
|
|
4317
|
-
{
|
|
4318
|
-
"meta": {
|
|
4319
|
-
"command": "stream",
|
|
4320
|
-
},
|
|
4321
|
-
"ok": true,
|
|
4322
|
-
"type": "done",
|
|
4323
|
-
},
|
|
4324
|
-
]
|
|
4325
|
-
`)
|
|
4326
|
-
})
|
|
4327
|
-
|
|
4328
|
-
test('middleware sets var → command sees it', async () => {
|
|
4329
|
-
const cli = Cli.create('test', {
|
|
4330
|
-
vars: z.object({ user: z.string().default('anonymous') }),
|
|
4331
|
-
})
|
|
4332
|
-
cli.use(async (c, next) => {
|
|
4333
|
-
c.set('user', 'alice')
|
|
4334
|
-
await next()
|
|
4335
|
-
})
|
|
4336
|
-
cli.command('whoami', {
|
|
4337
|
-
run: (c) => ({ user: c.var.user }),
|
|
4338
|
-
})
|
|
4339
|
-
expect(await fetchJson(cli, new Request('http://localhost/whoami'))).toMatchInlineSnapshot(`
|
|
4340
|
-
{
|
|
4341
|
-
"body": {
|
|
4342
|
-
"data": {
|
|
4343
|
-
"user": "alice",
|
|
4344
|
-
},
|
|
4345
|
-
"meta": {
|
|
4346
|
-
"command": "whoami",
|
|
4347
|
-
"duration": "<stripped>",
|
|
4348
|
-
},
|
|
4349
|
-
"ok": true,
|
|
4350
|
-
},
|
|
4351
|
-
"status": 200,
|
|
4352
|
-
}
|
|
4353
|
-
`)
|
|
4354
|
-
})
|
|
4355
|
-
|
|
4356
|
-
test('middleware error → error response', async () => {
|
|
4357
|
-
const cli = Cli.create('test')
|
|
4358
|
-
cli.use((c) => {
|
|
4359
|
-
c.error({ code: 'UNAUTHORIZED', message: 'not allowed' })
|
|
4360
|
-
})
|
|
4361
|
-
cli.command('secret', { run: () => ({ secret: true }) })
|
|
4362
|
-
expect(await fetchJson(cli, new Request('http://localhost/secret'))).toMatchInlineSnapshot(`
|
|
4363
|
-
{
|
|
4364
|
-
"body": {
|
|
4365
|
-
"error": {
|
|
4366
|
-
"code": "UNAUTHORIZED",
|
|
4367
|
-
"message": "not allowed",
|
|
4368
|
-
},
|
|
4369
|
-
"meta": {
|
|
4370
|
-
"command": "secret",
|
|
4371
|
-
"duration": "<stripped>",
|
|
4372
|
-
},
|
|
4373
|
-
"ok": false,
|
|
4374
|
-
},
|
|
4375
|
-
"status": 500,
|
|
4376
|
-
}
|
|
4377
|
-
`)
|
|
4378
|
-
})
|
|
4379
|
-
|
|
4380
|
-
test('fetch gateway → forwards request', async () => {
|
|
4381
|
-
const handler = (req: Request) => {
|
|
4382
|
-
const url = new URL(req.url)
|
|
4383
|
-
return new Response(JSON.stringify({ path: url.pathname }), {
|
|
4384
|
-
headers: { 'content-type': 'application/json' },
|
|
4385
|
-
})
|
|
4386
|
-
}
|
|
4387
|
-
const cli = Cli.create('test')
|
|
4388
|
-
cli.command('api', { fetch: handler })
|
|
4389
|
-
const res = await cli.fetch(new Request('http://localhost/api/users/list'))
|
|
4390
|
-
expect(res.status).toBe(200)
|
|
4391
|
-
const body = await res.json()
|
|
4392
|
-
expect(body).toMatchInlineSnapshot(`
|
|
4393
|
-
{
|
|
4394
|
-
"path": "/api/users/list",
|
|
4395
|
-
}
|
|
4396
|
-
`)
|
|
4397
|
-
})
|
|
4398
|
-
|
|
4399
|
-
test('group middleware runs for nested commands', async () => {
|
|
4400
|
-
const sub = Cli.create('admin', {
|
|
4401
|
-
vars: z.object({ role: z.string().default('none') }),
|
|
4402
|
-
})
|
|
4403
|
-
sub.use(async (c, next) => {
|
|
4404
|
-
c.set('role', 'admin')
|
|
4405
|
-
await next()
|
|
4406
|
-
})
|
|
4407
|
-
sub.command('status', {
|
|
4408
|
-
run: (c) => ({ role: c.var.role }),
|
|
4409
|
-
})
|
|
4410
|
-
const cli = Cli.create('test', {
|
|
4411
|
-
vars: z.object({ role: z.string().default('none') }),
|
|
4412
|
-
})
|
|
4413
|
-
cli.command(sub)
|
|
4414
|
-
expect(await fetchJson(cli, new Request('http://localhost/admin/status')))
|
|
4415
|
-
.toMatchInlineSnapshot(`
|
|
4416
|
-
{
|
|
4417
|
-
"body": {
|
|
4418
|
-
"data": {
|
|
4419
|
-
"role": "admin",
|
|
4420
|
-
},
|
|
4421
|
-
"meta": {
|
|
4422
|
-
"command": "admin status",
|
|
4423
|
-
"duration": "<stripped>",
|
|
4424
|
-
},
|
|
4425
|
-
"ok": true,
|
|
4426
|
-
},
|
|
4427
|
-
"status": 200,
|
|
4428
|
-
}
|
|
4429
|
-
`)
|
|
4430
|
-
})
|
|
4431
|
-
|
|
4432
|
-
test('cli-level env schema is parsed', async () => {
|
|
4433
|
-
const cli = Cli.create('test', {
|
|
4434
|
-
env: z.object({ APP_TOKEN: z.string().default('fallback') }),
|
|
4435
|
-
})
|
|
4436
|
-
cli.use(async (c, next) => {
|
|
4437
|
-
// env should be parsed from envSchema
|
|
4438
|
-
;(globalThis as any).__testEnv = c.env
|
|
4439
|
-
await next()
|
|
4440
|
-
})
|
|
4441
|
-
cli.command('check', { run: () => ({ ok: true }) })
|
|
4442
|
-
await cli.fetch(new Request('http://localhost/check'))
|
|
4443
|
-
expect((globalThis as any).__testEnv).toEqual({ APP_TOKEN: 'fallback' })
|
|
4444
|
-
delete (globalThis as any).__testEnv
|
|
4445
|
-
})
|
|
4446
|
-
|
|
4447
|
-
test('retryable error is propagated', async () => {
|
|
4448
|
-
const cli = Cli.create('test')
|
|
4449
|
-
cli.command('rate-limit', {
|
|
4450
|
-
run: (c) => c.error({ code: 'RATE_LIMITED', message: 'slow down', retryable: true }),
|
|
4451
|
-
})
|
|
4452
|
-
const { body } = await fetchJson(cli, new Request('http://localhost/rate-limit'))
|
|
4453
|
-
expect(body.ok).toBe(false)
|
|
4454
|
-
expect(body.error.retryable).toBe(true)
|
|
4455
|
-
})
|
|
4456
|
-
|
|
4457
|
-
test('cta block is propagated', async () => {
|
|
4458
|
-
const cli = Cli.create('test')
|
|
4459
|
-
cli.command('done', {
|
|
4460
|
-
run: (c) =>
|
|
4461
|
-
c.ok({ id: 1 }, { cta: { commands: ['list'], description: 'Suggested commands:' } }),
|
|
4462
|
-
})
|
|
4463
|
-
const { body } = await fetchJson(cli, new Request('http://localhost/done'))
|
|
4464
|
-
expect(body.ok).toBe(true)
|
|
4465
|
-
expect(body.meta.cta).toMatchInlineSnapshot(`
|
|
4466
|
-
{
|
|
4467
|
-
"commands": [
|
|
4468
|
-
{
|
|
4469
|
-
"command": "test list",
|
|
4470
|
-
},
|
|
4471
|
-
],
|
|
4472
|
-
"description": "Suggested commands:",
|
|
4473
|
-
}
|
|
4474
|
-
`)
|
|
4475
|
-
})
|
|
4476
|
-
|
|
4477
|
-
describe('mcp over http', () => {
|
|
4478
|
-
function mcpCli() {
|
|
4479
|
-
const cli = Cli.create('test', { version: '1.0.0' })
|
|
4480
|
-
cli.command('greet', {
|
|
4481
|
-
description: 'Greet someone',
|
|
4482
|
-
args: z.object({ name: z.string() }),
|
|
4483
|
-
run: (c) => ({ message: `hello ${c.args.name}` }),
|
|
4484
|
-
})
|
|
4485
|
-
cli.command('ping', {
|
|
4486
|
-
description: 'Ping',
|
|
4487
|
-
run: () => ({ pong: true }),
|
|
4488
|
-
})
|
|
4489
|
-
return cli
|
|
4490
|
-
}
|
|
4491
|
-
|
|
4492
|
-
async function mcpRequest(cli: Cli.Cli<any, any, any>, body: unknown, sessionId?: string) {
|
|
4493
|
-
const headers: Record<string, string> = {
|
|
4494
|
-
'content-type': 'application/json',
|
|
4495
|
-
accept: 'application/json, text/event-stream',
|
|
4496
|
-
}
|
|
4497
|
-
if (sessionId) headers['mcp-session-id'] = sessionId
|
|
4498
|
-
return cli.fetch(
|
|
4499
|
-
new Request('http://localhost/mcp', {
|
|
4500
|
-
method: 'POST',
|
|
4501
|
-
headers,
|
|
4502
|
-
body: JSON.stringify(body),
|
|
4503
|
-
}),
|
|
4504
|
-
)
|
|
4505
|
-
}
|
|
4506
|
-
|
|
4507
|
-
async function initSession(cli: Cli.Cli<any, any, any>) {
|
|
4508
|
-
const res = await mcpRequest(cli, {
|
|
4509
|
-
jsonrpc: '2.0',
|
|
4510
|
-
id: 1,
|
|
4511
|
-
method: 'initialize',
|
|
4512
|
-
params: {
|
|
4513
|
-
protocolVersion: '2025-03-26',
|
|
4514
|
-
capabilities: {},
|
|
4515
|
-
clientInfo: { name: 'test-client', version: '1.0.0' },
|
|
4516
|
-
},
|
|
4517
|
-
})
|
|
4518
|
-
const sessionId = res.headers.get('mcp-session-id')
|
|
4519
|
-
const body = await res.json()
|
|
4520
|
-
// Send initialized notification
|
|
4521
|
-
await mcpRequest(cli, { jsonrpc: '2.0', method: 'notifications/initialized' }, sessionId!)
|
|
4522
|
-
return { sessionId: sessionId!, body }
|
|
4523
|
-
}
|
|
4524
|
-
|
|
4525
|
-
test('POST /mcp with initialize → valid MCP response', async () => {
|
|
4526
|
-
const cli = mcpCli()
|
|
4527
|
-
const res = await mcpRequest(cli, {
|
|
4528
|
-
jsonrpc: '2.0',
|
|
4529
|
-
id: 1,
|
|
4530
|
-
method: 'initialize',
|
|
4531
|
-
params: {
|
|
4532
|
-
protocolVersion: '2025-03-26',
|
|
4533
|
-
capabilities: {},
|
|
4534
|
-
clientInfo: { name: 'test-client', version: '1.0.0' },
|
|
4535
|
-
},
|
|
4536
|
-
})
|
|
4537
|
-
expect(res.status).toBe(200)
|
|
4538
|
-
const body = await res.json()
|
|
4539
|
-
expect({
|
|
4540
|
-
serverInfo: body.result.serverInfo,
|
|
4541
|
-
hasTools: 'tools' in (body.result.capabilities ?? {}),
|
|
4542
|
-
}).toMatchInlineSnapshot(`
|
|
4543
|
-
{
|
|
4544
|
-
"hasTools": true,
|
|
4545
|
-
"serverInfo": {
|
|
4546
|
-
"name": "test",
|
|
4547
|
-
"version": "1.0.0",
|
|
4548
|
-
},
|
|
4549
|
-
}
|
|
4550
|
-
`)
|
|
4551
|
-
})
|
|
4552
|
-
|
|
4553
|
-
test('POST /mcp with tools/list → returns registered tools', async () => {
|
|
4554
|
-
const cli = mcpCli()
|
|
4555
|
-
const { sessionId } = await initSession(cli)
|
|
4556
|
-
const res = await mcpRequest(
|
|
4557
|
-
cli,
|
|
4558
|
-
{ jsonrpc: '2.0', id: 2, method: 'tools/list', params: {} },
|
|
4559
|
-
sessionId,
|
|
4560
|
-
)
|
|
4561
|
-
expect(res.status).toBe(200)
|
|
4562
|
-
const body = await res.json()
|
|
4563
|
-
const tools = body.result.tools.map((t: any) => ({
|
|
4564
|
-
name: t.name,
|
|
4565
|
-
description: t.description,
|
|
4566
|
-
hasInputSchema: Object.keys(t.inputSchema?.properties ?? {}).length > 0,
|
|
4567
|
-
}))
|
|
4568
|
-
expect(tools).toMatchInlineSnapshot(`
|
|
4569
|
-
[
|
|
4570
|
-
{
|
|
4571
|
-
"description": "Greet someone",
|
|
4572
|
-
"hasInputSchema": true,
|
|
4573
|
-
"name": "greet",
|
|
4574
|
-
},
|
|
4575
|
-
{
|
|
4576
|
-
"description": "Ping",
|
|
4577
|
-
"hasInputSchema": false,
|
|
4578
|
-
"name": "ping",
|
|
4579
|
-
},
|
|
4580
|
-
]
|
|
4581
|
-
`)
|
|
4582
|
-
})
|
|
4583
|
-
|
|
4584
|
-
test('POST /mcp with tools/call → executes command', async () => {
|
|
4585
|
-
const cli = mcpCli()
|
|
4586
|
-
const { sessionId } = await initSession(cli)
|
|
4587
|
-
const res = await mcpRequest(
|
|
4588
|
-
cli,
|
|
4589
|
-
{
|
|
4590
|
-
jsonrpc: '2.0',
|
|
4591
|
-
id: 3,
|
|
4592
|
-
method: 'tools/call',
|
|
4593
|
-
params: { name: 'greet', arguments: { name: 'world' } },
|
|
4594
|
-
},
|
|
4595
|
-
sessionId,
|
|
4596
|
-
)
|
|
4597
|
-
expect(res.status).toBe(200)
|
|
4598
|
-
const body = await res.json()
|
|
4599
|
-
expect({
|
|
4600
|
-
isError: body.result.isError,
|
|
4601
|
-
content: JSON.parse(body.result.content[0].text),
|
|
4602
|
-
}).toMatchInlineSnapshot(`
|
|
4603
|
-
{
|
|
4604
|
-
"content": {
|
|
4605
|
-
"message": "hello world",
|
|
4606
|
-
},
|
|
4607
|
-
"isError": undefined,
|
|
4608
|
-
}
|
|
4609
|
-
`)
|
|
4610
|
-
})
|
|
4611
|
-
|
|
4612
|
-
test('non-/mcp paths still route to command API', async () => {
|
|
4613
|
-
const cli = mcpCli()
|
|
4614
|
-
const { body } = await fetchJson(cli, new Request('http://localhost/ping'))
|
|
4615
|
-
expect(body.data).toMatchInlineSnapshot(`
|
|
4616
|
-
{
|
|
4617
|
-
"pong": true,
|
|
4618
|
-
}
|
|
4619
|
-
`)
|
|
4620
|
-
})
|
|
4621
|
-
})
|
|
4622
|
-
})
|
|
4623
|
-
|
|
4624
|
-
describe('displayName', () => {
|
|
4625
|
-
beforeEach(() => {
|
|
4626
|
-
const savedArgv1 = process.argv[1]
|
|
4627
|
-
return () => {
|
|
4628
|
-
process.argv[1] = savedArgv1!
|
|
4629
|
-
}
|
|
4630
|
-
})
|
|
4631
|
-
|
|
4632
|
-
test('defaults to name when argv[1] is not an alias', async () => {
|
|
4633
|
-
process.argv[1] = '/usr/local/bin/my-cli'
|
|
4634
|
-
const cli = Cli.create({
|
|
4635
|
-
name: 'my-cli',
|
|
4636
|
-
aliases: ['mc'],
|
|
4637
|
-
}).command('ping', {
|
|
4638
|
-
run: (c) => c.ok({ displayName: c.displayName }),
|
|
4639
|
-
})
|
|
4640
|
-
const { output } = await serve(cli, ['ping', '--json'])
|
|
4641
|
-
expect(JSON.parse(output).displayName).toBe('my-cli')
|
|
4642
|
-
})
|
|
4643
|
-
|
|
4644
|
-
test('resolves alias from argv[1]', async () => {
|
|
4645
|
-
process.argv[1] = '/usr/local/bin/mc'
|
|
4646
|
-
const cli = Cli.create({
|
|
4647
|
-
name: 'my-cli',
|
|
4648
|
-
aliases: ['mc'],
|
|
4649
|
-
}).command('ping', {
|
|
4650
|
-
run: (c) => c.ok({ displayName: c.displayName }),
|
|
4651
|
-
})
|
|
4652
|
-
const { output } = await serve(cli, ['ping', '--json'])
|
|
4653
|
-
expect(JSON.parse(output).displayName).toBe('mc')
|
|
4654
|
-
})
|
|
4655
|
-
|
|
4656
|
-
test('falls back to name when argv[1] is undefined', async () => {
|
|
4657
|
-
process.argv[1] = undefined as any
|
|
4658
|
-
const cli = Cli.create({
|
|
4659
|
-
name: 'my-cli',
|
|
4660
|
-
aliases: ['mc'],
|
|
4661
|
-
}).command('ping', {
|
|
4662
|
-
run: (c) => c.ok({ displayName: c.displayName }),
|
|
4663
|
-
})
|
|
4664
|
-
const { output } = await serve(cli, ['ping', '--json'])
|
|
4665
|
-
expect(JSON.parse(output).displayName).toBe('my-cli')
|
|
4666
|
-
})
|
|
4667
|
-
|
|
4668
|
-
test('available in middleware context', async () => {
|
|
4669
|
-
process.argv[1] = '/usr/local/bin/mc'
|
|
4670
|
-
let middlewareDisplayName: string | undefined
|
|
4671
|
-
const cli = Cli.create({
|
|
4672
|
-
name: 'my-cli',
|
|
4673
|
-
aliases: ['mc'],
|
|
4674
|
-
})
|
|
4675
|
-
.use((c, next) => {
|
|
4676
|
-
middlewareDisplayName = c.displayName
|
|
4677
|
-
return next()
|
|
4678
|
-
})
|
|
4679
|
-
.command('ping', {
|
|
4680
|
-
run: (c) => c.ok({ ok: true }),
|
|
4681
|
-
})
|
|
4682
|
-
await serve(cli, ['ping', '--json'])
|
|
4683
|
-
expect(middlewareDisplayName).toBe('mc')
|
|
4684
|
-
})
|
|
4685
|
-
|
|
4686
|
-
test('available in root run context', async () => {
|
|
4687
|
-
process.argv[1] = '/usr/local/bin/mc'
|
|
4688
|
-
const cli = Cli.create({
|
|
4689
|
-
name: 'my-cli',
|
|
4690
|
-
aliases: ['mc'],
|
|
4691
|
-
run: (c) => c.ok({ displayName: c.displayName }),
|
|
4692
|
-
})
|
|
4693
|
-
const { output } = await serve(cli, ['--json'])
|
|
4694
|
-
expect(JSON.parse(output).displayName).toBe('mc')
|
|
4695
|
-
})
|
|
4696
|
-
|
|
4697
|
-
test('cta commands use displayName', async () => {
|
|
4698
|
-
process.argv[1] = '/usr/local/bin/mc'
|
|
4699
|
-
const cli = Cli.create({
|
|
4700
|
-
name: 'my-cli',
|
|
4701
|
-
aliases: ['mc'],
|
|
4702
|
-
}).command('ping', {
|
|
4703
|
-
run: (c) => c.ok({ ok: true }, { cta: { commands: ['login'] } }),
|
|
4704
|
-
})
|
|
4705
|
-
const { output } = await serve(cli, ['ping', '--json', '--full-output'])
|
|
4706
|
-
const parsed = JSON.parse(output)
|
|
4707
|
-
expect(parsed.meta.cta.commands[0].command).toBe('mc login')
|
|
4708
|
-
})
|
|
4709
|
-
})
|
|
4710
|
-
|
|
4711
|
-
test('--format rejects invalid format values', async () => {
|
|
4712
|
-
const cli = Cli.create('test').command('hello', {
|
|
4713
|
-
run: (c) => c.ok({ message: 'hi' }),
|
|
4714
|
-
})
|
|
4715
|
-
|
|
4716
|
-
const { exitCode, output } = await serve(cli, ['hello', '--format', 'xml'])
|
|
4717
|
-
expect(exitCode).toBe(1)
|
|
4718
|
-
expect(output).toMatch(/invalid|unsupported|unknown.*format/i)
|
|
4719
|
-
})
|
|
4720
|
-
|
|
4721
|
-
test('--token-limit with non-numeric value errors', async () => {
|
|
4722
|
-
const cli = Cli.create('test').command('hello', {
|
|
4723
|
-
run: (c) => c.ok({ message: 'hello world' }),
|
|
4724
|
-
})
|
|
4725
|
-
|
|
4726
|
-
const { exitCode, output } = await serve(cli, ['hello', '--token-limit', 'foo', '--json'])
|
|
4727
|
-
expect(exitCode).toBe(1)
|
|
4728
|
-
expect(output).not.toContain('NaN')
|
|
4729
|
-
})
|
|
4730
|
-
|
|
4731
|
-
test('--token-offset with non-numeric value errors', async () => {
|
|
4732
|
-
const cli = Cli.create('test').command('hello', {
|
|
4733
|
-
run: (c) => c.ok({ message: 'hello world' }),
|
|
4734
|
-
})
|
|
4735
|
-
|
|
4736
|
-
const { exitCode, output } = await serve(cli, ['hello', '--token-offset', 'foo', '--json'])
|
|
4737
|
-
expect(exitCode).toBe(1)
|
|
4738
|
-
expect(output).not.toContain('NaN')
|
|
4739
|
-
})
|
|
4740
|
-
|
|
4741
|
-
describe('command aliases', () => {
|
|
4742
|
-
function makeAliasedCli() {
|
|
4743
|
-
return Cli.create('gh').command('extension', {
|
|
4744
|
-
aliases: ['extensions', 'ext'],
|
|
4745
|
-
description: 'Manage extensions',
|
|
4746
|
-
run: () => ({ result: 'ok' }),
|
|
4747
|
-
})
|
|
4748
|
-
}
|
|
4749
|
-
|
|
4750
|
-
test('resolves canonical command name', async () => {
|
|
4751
|
-
const { output } = await serve(makeAliasedCli(), ['extension'])
|
|
4752
|
-
expect(output).toContain('ok')
|
|
4753
|
-
})
|
|
4754
|
-
|
|
4755
|
-
test('resolves alias name', async () => {
|
|
4756
|
-
const { output } = await serve(makeAliasedCli(), ['extensions'])
|
|
4757
|
-
expect(output).toContain('ok')
|
|
4758
|
-
})
|
|
4759
|
-
|
|
4760
|
-
test('resolves short alias name', async () => {
|
|
4761
|
-
const { output } = await serve(makeAliasedCli(), ['ext'])
|
|
4762
|
-
expect(output).toContain('ok')
|
|
4763
|
-
})
|
|
4764
|
-
|
|
4765
|
-
test('root help does not show aliases', async () => {
|
|
4766
|
-
const { output } = await serve(makeAliasedCli(), ['--help'])
|
|
4767
|
-
const commandsSection = output.split('Commands:')[1]!.split('Integrations:')[0]!
|
|
4768
|
-
const names = commandsSection
|
|
4769
|
-
.trim()
|
|
4770
|
-
.split('\n')
|
|
4771
|
-
.map((l) => l.trim().split(/\s{2,}/)[0]!)
|
|
4772
|
-
expect(names).toContain('extension')
|
|
4773
|
-
expect(names).not.toContain('extensions')
|
|
4774
|
-
expect(names).not.toContain('ext')
|
|
4775
|
-
})
|
|
4776
|
-
|
|
4777
|
-
test('command help shows aliases line', async () => {
|
|
4778
|
-
const { output } = await serve(makeAliasedCli(), ['extension', '--help'])
|
|
4779
|
-
expect(output).toContain('Aliases: extensions, ext')
|
|
4780
|
-
})
|
|
4781
|
-
|
|
4782
|
-
test('aliases work inside command groups', async () => {
|
|
4783
|
-
const sub = Cli.create('repo', { description: 'Manage repos' }).command('list', {
|
|
4784
|
-
aliases: ['ls'],
|
|
4785
|
-
description: 'List repos',
|
|
4786
|
-
run: () => ({ repos: [] }),
|
|
4787
|
-
})
|
|
4788
|
-
const cli = Cli.create('gh').command(sub)
|
|
4789
|
-
const { output } = await serve(cli, ['repo', 'ls'])
|
|
4790
|
-
expect(output).toContain('repos')
|
|
4791
|
-
})
|
|
4792
|
-
|
|
4793
|
-
test('did-you-mean suggests aliases', async () => {
|
|
4794
|
-
const { output } = await serve(makeAliasedCli(), ['exten'])
|
|
4795
|
-
expect(output).toMatch(/did you mean.*extension/i)
|
|
4796
|
-
})
|
|
4797
|
-
|
|
4798
|
-
test('root CLI aliases register as command aliases', async () => {
|
|
4799
|
-
const update = Cli.create('update', {
|
|
4800
|
-
aliases: ['upgrade'],
|
|
4801
|
-
description: 'Update packages',
|
|
4802
|
-
run: () => ({ result: 'updated' }),
|
|
4803
|
-
})
|
|
4804
|
-
const cli = Cli.create('pkg').command(update)
|
|
4805
|
-
const { output } = await serve(cli, ['upgrade'])
|
|
4806
|
-
expect(output).toContain('updated')
|
|
4807
|
-
})
|
|
4808
|
-
})
|