@syrin/cli 1.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +15 -0
- package/README.md +302 -0
- package/dist/cli/commands/analyse.d.ts +16 -0
- package/dist/cli/commands/analyse.js +61 -0
- package/dist/cli/commands/dev.d.ts +23 -0
- package/dist/cli/commands/dev.js +419 -0
- package/dist/cli/commands/doctor.d.ts +10 -0
- package/dist/cli/commands/doctor.js +195 -0
- package/dist/cli/commands/index.d.ts +12 -0
- package/dist/cli/commands/index.js +12 -0
- package/dist/cli/commands/init.d.ts +16 -0
- package/dist/cli/commands/init.js +90 -0
- package/dist/cli/commands/list.d.ts +15 -0
- package/dist/cli/commands/list.js +50 -0
- package/dist/cli/commands/rollback.d.ts +12 -0
- package/dist/cli/commands/rollback.js +101 -0
- package/dist/cli/commands/test.d.ts +31 -0
- package/dist/cli/commands/test.js +88 -0
- package/dist/cli/commands/update.d.ts +9 -0
- package/dist/cli/commands/update.js +76 -0
- package/dist/cli/index.d.ts +13 -0
- package/dist/cli/index.js +342 -0
- package/dist/cli/prompts/index.d.ts +5 -0
- package/dist/cli/prompts/index.js +5 -0
- package/dist/cli/prompts/init-prompt.d.ts +17 -0
- package/dist/cli/prompts/init-prompt.js +263 -0
- package/dist/cli/utils/command-error-handler.d.ts +14 -0
- package/dist/cli/utils/command-error-handler.js +35 -0
- package/dist/cli/utils/common-types.d.ts +24 -0
- package/dist/cli/utils/common-types.js +6 -0
- package/dist/cli/utils/connection-handler.d.ts +37 -0
- package/dist/cli/utils/connection-handler.js +90 -0
- package/dist/cli/utils/index.d.ts +11 -0
- package/dist/cli/utils/index.js +11 -0
- package/dist/cli/utils/option-parsers.d.ts +41 -0
- package/dist/cli/utils/option-parsers.js +92 -0
- package/dist/cli/utils/output-utils.d.ts +12 -0
- package/dist/cli/utils/output-utils.js +21 -0
- package/dist/cli/utils/transport-resolver.d.ts +33 -0
- package/dist/cli/utils/transport-resolver.js +82 -0
- package/dist/cli/utils/version-banner.d.ts +10 -0
- package/dist/cli/utils/version-banner.js +26 -0
- package/dist/config/env-checker.d.ts +37 -0
- package/dist/config/env-checker.js +136 -0
- package/dist/config/generator.d.ts +19 -0
- package/dist/config/generator.js +196 -0
- package/dist/config/index.d.ts +9 -0
- package/dist/config/index.js +9 -0
- package/dist/config/loader.d.ts +19 -0
- package/dist/config/loader.js +57 -0
- package/dist/config/schema.d.ts +42 -0
- package/dist/config/schema.js +181 -0
- package/dist/config/syrin.template.yaml +127 -0
- package/dist/config/types.d.ts +87 -0
- package/dist/config/types.js +6 -0
- package/dist/constants/app.d.ts +9 -0
- package/dist/constants/app.js +9 -0
- package/dist/constants/commands.d.ts +43 -0
- package/dist/constants/commands.js +43 -0
- package/dist/constants/defaults.d.ts +18 -0
- package/dist/constants/defaults.js +18 -0
- package/dist/constants/env-vars.d.ts +11 -0
- package/dist/constants/env-vars.js +11 -0
- package/dist/constants/icons.d.ts +23 -0
- package/dist/constants/icons.js +23 -0
- package/dist/constants/index.d.ts +17 -0
- package/dist/constants/index.js +17 -0
- package/dist/constants/labels.d.ts +38 -0
- package/dist/constants/labels.js +42 -0
- package/dist/constants/links.d.ts +10 -0
- package/dist/constants/links.js +11 -0
- package/dist/constants/list.d.ts +10 -0
- package/dist/constants/list.js +9 -0
- package/dist/constants/llm.d.ts +26 -0
- package/dist/constants/llm.js +25 -0
- package/dist/constants/messages.d.ts +107 -0
- package/dist/constants/messages.js +138 -0
- package/dist/constants/paths.d.ts +29 -0
- package/dist/constants/paths.js +29 -0
- package/dist/constants/transport.d.ts +9 -0
- package/dist/constants/transport.js +8 -0
- package/dist/events/emitter.d.ts +64 -0
- package/dist/events/emitter.js +142 -0
- package/dist/events/event-type.d.ts +66 -0
- package/dist/events/event-type.js +81 -0
- package/dist/events/payloads/diagnostics.d.ts +24 -0
- package/dist/events/payloads/diagnostics.js +5 -0
- package/dist/events/payloads/index.d.ts +15 -0
- package/dist/events/payloads/index.js +6 -0
- package/dist/events/payloads/llm.d.ts +58 -0
- package/dist/events/payloads/llm.js +6 -0
- package/dist/events/payloads/registry.d.ts +28 -0
- package/dist/events/payloads/registry.js +5 -0
- package/dist/events/payloads/session.d.ts +32 -0
- package/dist/events/payloads/session.js +5 -0
- package/dist/events/payloads/testing.d.ts +17 -0
- package/dist/events/payloads/testing.js +5 -0
- package/dist/events/payloads/tool.d.ts +29 -0
- package/dist/events/payloads/tool.js +5 -0
- package/dist/events/payloads/transport.d.ts +30 -0
- package/dist/events/payloads/transport.js +5 -0
- package/dist/events/payloads/validation.d.ts +37 -0
- package/dist/events/payloads/validation.js +5 -0
- package/dist/events/payloads/workflow.d.ts +45 -0
- package/dist/events/payloads/workflow.js +5 -0
- package/dist/events/store/file-store.d.ts +37 -0
- package/dist/events/store/file-store.js +113 -0
- package/dist/events/store/index.d.ts +7 -0
- package/dist/events/store/index.js +6 -0
- package/dist/events/store/memory-store.d.ts +26 -0
- package/dist/events/store/memory-store.js +39 -0
- package/dist/events/store.d.ts +11 -0
- package/dist/events/store.js +2 -0
- package/dist/events/types.d.ts +14 -0
- package/dist/events/types.js +2 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.js +30 -0
- package/dist/presentation/analysis-ui.d.ts +24 -0
- package/dist/presentation/analysis-ui.js +158 -0
- package/dist/presentation/dev/chat-ui-types.d.ts +68 -0
- package/dist/presentation/dev/chat-ui-types.js +5 -0
- package/dist/presentation/dev/chat-ui.d.ts +61 -0
- package/dist/presentation/dev/chat-ui.js +714 -0
- package/dist/presentation/dev/components/assistant-message.d.ts +19 -0
- package/dist/presentation/dev/components/assistant-message.js +36 -0
- package/dist/presentation/dev/components/header.d.ts +16 -0
- package/dist/presentation/dev/components/header.js +22 -0
- package/dist/presentation/dev/components/index.d.ts +13 -0
- package/dist/presentation/dev/components/index.js +13 -0
- package/dist/presentation/dev/components/input-panel.d.ts +22 -0
- package/dist/presentation/dev/components/input-panel.js +43 -0
- package/dist/presentation/dev/components/message-component.d.ts +16 -0
- package/dist/presentation/dev/components/message-component.js +51 -0
- package/dist/presentation/dev/components/messages-list.d.ts +24 -0
- package/dist/presentation/dev/components/messages-list.js +48 -0
- package/dist/presentation/dev/components/system-message.d.ts +16 -0
- package/dist/presentation/dev/components/system-message.js +26 -0
- package/dist/presentation/dev/components/user-message.d.ts +21 -0
- package/dist/presentation/dev/components/user-message.js +35 -0
- package/dist/presentation/dev/components/welcome-banner.d.ts +24 -0
- package/dist/presentation/dev/components/welcome-banner.js +146 -0
- package/dist/presentation/dev/goodbye-messages.d.ts +31 -0
- package/dist/presentation/dev/goodbye-messages.js +100 -0
- package/dist/presentation/dev/index.d.ts +5 -0
- package/dist/presentation/dev/index.js +5 -0
- package/dist/presentation/dev/text-wrapper.d.ts +30 -0
- package/dist/presentation/dev/text-wrapper.js +74 -0
- package/dist/presentation/dev-ui.d.ts +33 -0
- package/dist/presentation/dev-ui.js +246 -0
- package/dist/presentation/doctor-ui.d.ts +40 -0
- package/dist/presentation/doctor-ui.js +157 -0
- package/dist/presentation/init-ui.d.ts +14 -0
- package/dist/presentation/init-ui.js +41 -0
- package/dist/presentation/list-ui.d.ts +44 -0
- package/dist/presentation/list-ui.js +139 -0
- package/dist/presentation/test-ui.d.ts +49 -0
- package/dist/presentation/test-ui.js +358 -0
- package/dist/runtime/analysis/analyser.d.ts +14 -0
- package/dist/runtime/analysis/analyser.js +88 -0
- package/dist/runtime/analysis/dependencies.d.ts +10 -0
- package/dist/runtime/analysis/dependencies.js +140 -0
- package/dist/runtime/analysis/index.d.ts +10 -0
- package/dist/runtime/analysis/index.js +10 -0
- package/dist/runtime/analysis/indexer.d.ts +10 -0
- package/dist/runtime/analysis/indexer.js +62 -0
- package/dist/runtime/analysis/loader.d.ts +15 -0
- package/dist/runtime/analysis/loader.js +47 -0
- package/dist/runtime/analysis/normalizer.d.ts +14 -0
- package/dist/runtime/analysis/normalizer.js +184 -0
- package/dist/runtime/analysis/rules/__test-helpers__.d.ts +18 -0
- package/dist/runtime/analysis/rules/__test-helpers__.js +40 -0
- package/dist/runtime/analysis/rules/base.d.ts +38 -0
- package/dist/runtime/analysis/rules/base.js +23 -0
- package/dist/runtime/analysis/rules/error-codes.d.ts +64 -0
- package/dist/runtime/analysis/rules/error-codes.js +73 -0
- package/dist/runtime/analysis/rules/errors/e000-tool-not-found.d.ts +35 -0
- package/dist/runtime/analysis/rules/errors/e000-tool-not-found.js +32 -0
- package/dist/runtime/analysis/rules/errors/e001-missing-output-schema.d.ts +22 -0
- package/dist/runtime/analysis/rules/errors/e001-missing-output-schema.js +30 -0
- package/dist/runtime/analysis/rules/errors/e002-underspecified-input.d.ts +24 -0
- package/dist/runtime/analysis/rules/errors/e002-underspecified-input.js +52 -0
- package/dist/runtime/analysis/rules/errors/e003-type-mismatch.d.ts +23 -0
- package/dist/runtime/analysis/rules/errors/e003-type-mismatch.js +73 -0
- package/dist/runtime/analysis/rules/errors/e004-free-text-propagation.d.ts +23 -0
- package/dist/runtime/analysis/rules/errors/e004-free-text-propagation.js +47 -0
- package/dist/runtime/analysis/rules/errors/e005-tool-ambiguity.d.ts +25 -0
- package/dist/runtime/analysis/rules/errors/e005-tool-ambiguity.js +73 -0
- package/dist/runtime/analysis/rules/errors/e006-param-not-in-description.d.ts +22 -0
- package/dist/runtime/analysis/rules/errors/e006-param-not-in-description.js +57 -0
- package/dist/runtime/analysis/rules/errors/e007-output-not-guaranteed.d.ts +23 -0
- package/dist/runtime/analysis/rules/errors/e007-output-not-guaranteed.js +56 -0
- package/dist/runtime/analysis/rules/errors/e008-circular-dependency.d.ts +22 -0
- package/dist/runtime/analysis/rules/errors/e008-circular-dependency.js +84 -0
- package/dist/runtime/analysis/rules/errors/e009-implicit-user-input.d.ts +23 -0
- package/dist/runtime/analysis/rules/errors/e009-implicit-user-input.js +89 -0
- package/dist/runtime/analysis/rules/errors/e010-non-serializable.d.ts +25 -0
- package/dist/runtime/analysis/rules/errors/e010-non-serializable.js +46 -0
- package/dist/runtime/analysis/rules/errors/e011-missing-tool-description.d.ts +24 -0
- package/dist/runtime/analysis/rules/errors/e011-missing-tool-description.js +33 -0
- package/dist/runtime/analysis/rules/errors/e012-side-effect-detected.d.ts +39 -0
- package/dist/runtime/analysis/rules/errors/e012-side-effect-detected.js +40 -0
- package/dist/runtime/analysis/rules/errors/e013-non-deterministic-output.d.ts +37 -0
- package/dist/runtime/analysis/rules/errors/e013-non-deterministic-output.js +34 -0
- package/dist/runtime/analysis/rules/errors/e013-output-explosion.d.ts +39 -0
- package/dist/runtime/analysis/rules/errors/e013-output-explosion.js +36 -0
- package/dist/runtime/analysis/rules/errors/e014-hidden-dependency.d.ts +42 -0
- package/dist/runtime/analysis/rules/errors/e014-hidden-dependency.js +46 -0
- package/dist/runtime/analysis/rules/errors/e014-output-explosion.d.ts +39 -0
- package/dist/runtime/analysis/rules/errors/e014-output-explosion.js +36 -0
- package/dist/runtime/analysis/rules/errors/e015-hidden-dependency.d.ts +42 -0
- package/dist/runtime/analysis/rules/errors/e015-hidden-dependency.js +46 -0
- package/dist/runtime/analysis/rules/errors/e015-unbounded-execution.d.ts +44 -0
- package/dist/runtime/analysis/rules/errors/e015-unbounded-execution.js +66 -0
- package/dist/runtime/analysis/rules/errors/e016-output-validation-failed.d.ts +43 -0
- package/dist/runtime/analysis/rules/errors/e016-output-validation-failed.js +42 -0
- package/dist/runtime/analysis/rules/errors/e016-unbounded-execution.d.ts +44 -0
- package/dist/runtime/analysis/rules/errors/e016-unbounded-execution.js +66 -0
- package/dist/runtime/analysis/rules/errors/e017-input-validation-failed.d.ts +57 -0
- package/dist/runtime/analysis/rules/errors/e017-input-validation-failed.js +80 -0
- package/dist/runtime/analysis/rules/errors/e017-output-validation-failed.d.ts +43 -0
- package/dist/runtime/analysis/rules/errors/e017-output-validation-failed.js +42 -0
- package/dist/runtime/analysis/rules/errors/e018-input-validation-failed.d.ts +57 -0
- package/dist/runtime/analysis/rules/errors/e018-input-validation-failed.js +80 -0
- package/dist/runtime/analysis/rules/errors/e018-tool-execution-failed.d.ts +38 -0
- package/dist/runtime/analysis/rules/errors/e018-tool-execution-failed.js +37 -0
- package/dist/runtime/analysis/rules/errors/e019-tool-execution-failed.d.ts +38 -0
- package/dist/runtime/analysis/rules/errors/e019-tool-execution-failed.js +37 -0
- package/dist/runtime/analysis/rules/errors/e019-unexpected-test-result.d.ts +65 -0
- package/dist/runtime/analysis/rules/errors/e019-unexpected-test-result.js +109 -0
- package/dist/runtime/analysis/rules/errors/e020-unexpected-test-result.d.ts +65 -0
- package/dist/runtime/analysis/rules/errors/e020-unexpected-test-result.js +109 -0
- package/dist/runtime/analysis/rules/errors/e100-missing-output-schema.d.ts +22 -0
- package/dist/runtime/analysis/rules/errors/e100-missing-output-schema.js +30 -0
- package/dist/runtime/analysis/rules/errors/e101-missing-tool-description.d.ts +24 -0
- package/dist/runtime/analysis/rules/errors/e101-missing-tool-description.js +33 -0
- package/dist/runtime/analysis/rules/errors/e102-underspecified-input.d.ts +24 -0
- package/dist/runtime/analysis/rules/errors/e102-underspecified-input.js +52 -0
- package/dist/runtime/analysis/rules/errors/e103-type-mismatch.d.ts +23 -0
- package/dist/runtime/analysis/rules/errors/e103-type-mismatch.js +72 -0
- package/dist/runtime/analysis/rules/errors/e104-param-not-in-description.d.ts +22 -0
- package/dist/runtime/analysis/rules/errors/e104-param-not-in-description.js +57 -0
- package/dist/runtime/analysis/rules/errors/e105-free-text-propagation.d.ts +23 -0
- package/dist/runtime/analysis/rules/errors/e105-free-text-propagation.js +47 -0
- package/dist/runtime/analysis/rules/errors/e106-output-not-guaranteed.d.ts +23 -0
- package/dist/runtime/analysis/rules/errors/e106-output-not-guaranteed.js +58 -0
- package/dist/runtime/analysis/rules/errors/e107-circular-dependency.d.ts +22 -0
- package/dist/runtime/analysis/rules/errors/e107-circular-dependency.js +84 -0
- package/dist/runtime/analysis/rules/errors/e108-implicit-user-input.d.ts +23 -0
- package/dist/runtime/analysis/rules/errors/e108-implicit-user-input.js +94 -0
- package/dist/runtime/analysis/rules/errors/e109-non-serializable.d.ts +25 -0
- package/dist/runtime/analysis/rules/errors/e109-non-serializable.js +44 -0
- package/dist/runtime/analysis/rules/errors/e110-tool-ambiguity.d.ts +25 -0
- package/dist/runtime/analysis/rules/errors/e110-tool-ambiguity.js +73 -0
- package/dist/runtime/analysis/rules/errors/e200-input-validation-failed.d.ts +57 -0
- package/dist/runtime/analysis/rules/errors/e200-input-validation-failed.js +71 -0
- package/dist/runtime/analysis/rules/errors/e300-output-validation-failed.d.ts +43 -0
- package/dist/runtime/analysis/rules/errors/e300-output-validation-failed.js +44 -0
- package/dist/runtime/analysis/rules/errors/e301-output-explosion.d.ts +39 -0
- package/dist/runtime/analysis/rules/errors/e301-output-explosion.js +36 -0
- package/dist/runtime/analysis/rules/errors/e400-tool-execution-failed.d.ts +38 -0
- package/dist/runtime/analysis/rules/errors/e400-tool-execution-failed.js +37 -0
- package/dist/runtime/analysis/rules/errors/e403-unbounded-execution.d.ts +44 -0
- package/dist/runtime/analysis/rules/errors/e403-unbounded-execution.js +66 -0
- package/dist/runtime/analysis/rules/errors/e500-side-effect-detected.d.ts +39 -0
- package/dist/runtime/analysis/rules/errors/e500-side-effect-detected.js +40 -0
- package/dist/runtime/analysis/rules/errors/e501-hidden-dependency.d.ts +47 -0
- package/dist/runtime/analysis/rules/errors/e501-hidden-dependency.js +46 -0
- package/dist/runtime/analysis/rules/errors/e600-unexpected-test-result.d.ts +65 -0
- package/dist/runtime/analysis/rules/errors/e600-unexpected-test-result.js +109 -0
- package/dist/runtime/analysis/rules/index.d.ts +18 -0
- package/dist/runtime/analysis/rules/index.js +94 -0
- package/dist/runtime/analysis/rules/warnings/w001-implicit-dependency.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w001-implicit-dependency.js +39 -0
- package/dist/runtime/analysis/rules/warnings/w002-free-text-without-normalization.d.ts +24 -0
- package/dist/runtime/analysis/rules/warnings/w002-free-text-without-normalization.js +40 -0
- package/dist/runtime/analysis/rules/warnings/w003-missing-examples.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w003-missing-examples.js +84 -0
- package/dist/runtime/analysis/rules/warnings/w004-overloaded-responsibility.d.ts +23 -0
- package/dist/runtime/analysis/rules/warnings/w004-overloaded-responsibility.js +96 -0
- package/dist/runtime/analysis/rules/warnings/w005-generic-description.d.ts +53 -0
- package/dist/runtime/analysis/rules/warnings/w005-generic-description.js +108 -0
- package/dist/runtime/analysis/rules/warnings/w006-optional-as-required.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w006-optional-as-required.js +44 -0
- package/dist/runtime/analysis/rules/warnings/w007-broad-output-schema.d.ts +23 -0
- package/dist/runtime/analysis/rules/warnings/w007-broad-output-schema.js +37 -0
- package/dist/runtime/analysis/rules/warnings/w008-multiple-entry-points.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w008-multiple-entry-points.js +97 -0
- package/dist/runtime/analysis/rules/warnings/w009-hidden-side-effects.d.ts +23 -0
- package/dist/runtime/analysis/rules/warnings/w009-hidden-side-effects.js +88 -0
- package/dist/runtime/analysis/rules/warnings/w010-output-not-reusable.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w010-output-not-reusable.js +81 -0
- package/dist/runtime/analysis/rules/warnings/w021-weak-schema.d.ts +40 -0
- package/dist/runtime/analysis/rules/warnings/w021-weak-schema.js +32 -0
- package/dist/runtime/analysis/rules/warnings/w022-high-entropy-output.d.ts +39 -0
- package/dist/runtime/analysis/rules/warnings/w022-high-entropy-output.js +36 -0
- package/dist/runtime/analysis/rules/warnings/w023-unstable-defaults.d.ts +38 -0
- package/dist/runtime/analysis/rules/warnings/w023-unstable-defaults.js +36 -0
- package/dist/runtime/analysis/rules/warnings/w100-implicit-dependency.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w100-implicit-dependency.js +89 -0
- package/dist/runtime/analysis/rules/warnings/w101-free-text-without-normalization.d.ts +24 -0
- package/dist/runtime/analysis/rules/warnings/w101-free-text-without-normalization.js +40 -0
- package/dist/runtime/analysis/rules/warnings/w102-missing-examples.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w102-missing-examples.js +76 -0
- package/dist/runtime/analysis/rules/warnings/w103-overloaded-responsibility.d.ts +23 -0
- package/dist/runtime/analysis/rules/warnings/w103-overloaded-responsibility.js +91 -0
- package/dist/runtime/analysis/rules/warnings/w104-generic-description.d.ts +53 -0
- package/dist/runtime/analysis/rules/warnings/w104-generic-description.js +108 -0
- package/dist/runtime/analysis/rules/warnings/w105-optional-as-required.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w105-optional-as-required.js +45 -0
- package/dist/runtime/analysis/rules/warnings/w106-broad-output-schema.d.ts +23 -0
- package/dist/runtime/analysis/rules/warnings/w106-broad-output-schema.js +37 -0
- package/dist/runtime/analysis/rules/warnings/w107-multiple-entry-points.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w107-multiple-entry-points.js +97 -0
- package/dist/runtime/analysis/rules/warnings/w108-hidden-side-effects.d.ts +23 -0
- package/dist/runtime/analysis/rules/warnings/w108-hidden-side-effects.js +94 -0
- package/dist/runtime/analysis/rules/warnings/w109-output-not-reusable.d.ts +22 -0
- package/dist/runtime/analysis/rules/warnings/w109-output-not-reusable.js +63 -0
- package/dist/runtime/analysis/rules/warnings/w110-weak-schema.d.ts +40 -0
- package/dist/runtime/analysis/rules/warnings/w110-weak-schema.js +32 -0
- package/dist/runtime/analysis/rules/warnings/w300-high-entropy-output.d.ts +39 -0
- package/dist/runtime/analysis/rules/warnings/w300-high-entropy-output.js +47 -0
- package/dist/runtime/analysis/rules/warnings/w301-unstable-defaults.d.ts +38 -0
- package/dist/runtime/analysis/rules/warnings/w301-unstable-defaults.js +36 -0
- package/dist/runtime/analysis/strict-mode.d.ts +21 -0
- package/dist/runtime/analysis/strict-mode.js +44 -0
- package/dist/runtime/analysis/types.d.ts +133 -0
- package/dist/runtime/analysis/types.js +6 -0
- package/dist/runtime/analysis/utils.d.ts +19 -0
- package/dist/runtime/analysis/utils.js +21 -0
- package/dist/runtime/dev/data-manager.d.ts +55 -0
- package/dist/runtime/dev/data-manager.js +87 -0
- package/dist/runtime/dev/event-mapper.d.ts +100 -0
- package/dist/runtime/dev/event-mapper.js +400 -0
- package/dist/runtime/dev/formatter.d.ts +94 -0
- package/dist/runtime/dev/formatter.js +236 -0
- package/dist/runtime/dev/index.d.ts +9 -0
- package/dist/runtime/dev/index.js +9 -0
- package/dist/runtime/dev/repl.d.ts +114 -0
- package/dist/runtime/dev/repl.js +310 -0
- package/dist/runtime/dev/session.d.ts +86 -0
- package/dist/runtime/dev/session.js +447 -0
- package/dist/runtime/dev/stack-trace.d.ts +77 -0
- package/dist/runtime/dev/stack-trace.js +286 -0
- package/dist/runtime/dev/types.d.ts +54 -0
- package/dist/runtime/dev/types.js +5 -0
- package/dist/runtime/llm/claude.d.ts +27 -0
- package/dist/runtime/llm/claude.js +150 -0
- package/dist/runtime/llm/factory.d.ts +30 -0
- package/dist/runtime/llm/factory.js +78 -0
- package/dist/runtime/llm/index.d.ts +10 -0
- package/dist/runtime/llm/index.js +10 -0
- package/dist/runtime/llm/ollama.d.ts +45 -0
- package/dist/runtime/llm/ollama.js +449 -0
- package/dist/runtime/llm/openai.d.ts +27 -0
- package/dist/runtime/llm/openai.js +170 -0
- package/dist/runtime/llm/provider.d.ts +32 -0
- package/dist/runtime/llm/provider.js +6 -0
- package/dist/runtime/llm/types.d.ts +55 -0
- package/dist/runtime/llm/types.js +6 -0
- package/dist/runtime/mcp/client/base.d.ts +40 -0
- package/dist/runtime/mcp/client/base.js +157 -0
- package/dist/runtime/mcp/client/manager.d.ts +91 -0
- package/dist/runtime/mcp/client/manager.js +248 -0
- package/dist/runtime/mcp/client/process.d.ts +31 -0
- package/dist/runtime/mcp/client/process.js +82 -0
- package/dist/runtime/mcp/connection.d.ts +63 -0
- package/dist/runtime/mcp/connection.js +449 -0
- package/dist/runtime/mcp/index.d.ts +9 -0
- package/dist/runtime/mcp/index.js +9 -0
- package/dist/runtime/mcp/list.d.ts +50 -0
- package/dist/runtime/mcp/list.js +65 -0
- package/dist/runtime/mcp/stdio-transport.d.ts +23 -0
- package/dist/runtime/mcp/stdio-transport.js +71 -0
- package/dist/runtime/mcp/types.d.ts +85 -0
- package/dist/runtime/mcp/types.js +6 -0
- package/dist/runtime/sandbox/executor.d.ts +102 -0
- package/dist/runtime/sandbox/executor.js +537 -0
- package/dist/runtime/sandbox/index.d.ts +9 -0
- package/dist/runtime/sandbox/index.js +9 -0
- package/dist/runtime/sandbox/io-monitor.d.ts +78 -0
- package/dist/runtime/sandbox/io-monitor.js +98 -0
- package/dist/runtime/sandbox/time-parser.d.ts +19 -0
- package/dist/runtime/sandbox/time-parser.js +67 -0
- package/dist/runtime/sandbox/types.d.ts +58 -0
- package/dist/runtime/sandbox/types.js +23 -0
- package/dist/runtime/test/behavior-observer.d.ts +61 -0
- package/dist/runtime/test/behavior-observer.js +140 -0
- package/dist/runtime/test/contract-loader.d.ts +41 -0
- package/dist/runtime/test/contract-loader.js +158 -0
- package/dist/runtime/test/contract-schema.d.ts +46 -0
- package/dist/runtime/test/contract-schema.js +107 -0
- package/dist/runtime/test/contract-types.d.ts +106 -0
- package/dist/runtime/test/contract-types.js +6 -0
- package/dist/runtime/test/dependency-tracker.d.ts +66 -0
- package/dist/runtime/test/dependency-tracker.js +80 -0
- package/dist/runtime/test/formatters.d.ts +18 -0
- package/dist/runtime/test/formatters.js +172 -0
- package/dist/runtime/test/index.d.ts +12 -0
- package/dist/runtime/test/index.js +13 -0
- package/dist/runtime/test/input-generator.d.ts +33 -0
- package/dist/runtime/test/input-generator.js +498 -0
- package/dist/runtime/test/mcp-root-detector.d.ts +31 -0
- package/dist/runtime/test/mcp-root-detector.js +105 -0
- package/dist/runtime/test/orchestrator.d.ts +131 -0
- package/dist/runtime/test/orchestrator.js +738 -0
- package/dist/runtime/test/output-validator.d.ts +44 -0
- package/dist/runtime/test/output-validator.js +262 -0
- package/dist/runtime/test/retry-tester.d.ts +44 -0
- package/dist/runtime/test/retry-tester.js +103 -0
- package/dist/runtime/test/runner.d.ts +28 -0
- package/dist/runtime/test/runner.js +55 -0
- package/dist/runtime/test/synthetic-input-generator.d.ts +11 -0
- package/dist/runtime/test/synthetic-input-generator.js +154 -0
- package/dist/runtime/test/test-runner.d.ts +28 -0
- package/dist/runtime/test/test-runner.js +55 -0
- package/dist/types/factories.d.ts +16 -0
- package/dist/types/factories.js +43 -0
- package/dist/types/ids.d.ts +16 -0
- package/dist/types/ids.js +2 -0
- package/dist/types/opaque.d.ts +4 -0
- package/dist/types/opaque.js +2 -0
- package/dist/utils/errors.d.ts +92 -0
- package/dist/utils/errors.js +97 -0
- package/dist/utils/gitignore.d.ts +11 -0
- package/dist/utils/gitignore.js +59 -0
- package/dist/utils/json-file-saver.d.ts +17 -0
- package/dist/utils/json-file-saver.js +81 -0
- package/dist/utils/json-formatter.d.ts +63 -0
- package/dist/utils/json-formatter.js +344 -0
- package/dist/utils/logger.d.ts +184 -0
- package/dist/utils/logger.js +330 -0
- package/dist/utils/package-manager.d.ts +30 -0
- package/dist/utils/package-manager.js +157 -0
- package/dist/utils/version-checker.d.ts +47 -0
- package/dist/utils/version-checker.js +167 -0
- package/dist/utils/version-display.d.ts +10 -0
- package/dist/utils/version-display.js +20 -0
- package/package.json +106 -0
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { getVersionDisplayString } from '../utils/version-display.js';
|
|
2
|
+
import { log } from '../utils/logger.js';
|
|
3
|
+
/**
|
|
4
|
+
* Display doctor report using plain console output.
|
|
5
|
+
* This avoids Ink taking control of stdin, which disables terminal history.
|
|
6
|
+
*/
|
|
7
|
+
export async function displayDoctorReport(report) {
|
|
8
|
+
const { config, transportCheck, scriptCheck, llmChecks, localLlmChecks } = report;
|
|
9
|
+
const allValid = transportCheck.isValid &&
|
|
10
|
+
(scriptCheck === null || scriptCheck.isValid) &&
|
|
11
|
+
llmChecks.every(l => l.apiKeyCheck.isValid && l.modelCheck.isValid) &&
|
|
12
|
+
(localLlmChecks === undefined ||
|
|
13
|
+
localLlmChecks.every(l => l.check.isValid));
|
|
14
|
+
// Get version info for display
|
|
15
|
+
const versionDisplayString = await getVersionDisplayString();
|
|
16
|
+
// Header
|
|
17
|
+
log.blank();
|
|
18
|
+
log.heading('Syrin Doctor Report');
|
|
19
|
+
log.label('═══════════════════');
|
|
20
|
+
log.labelValue('Version:', versionDisplayString);
|
|
21
|
+
log.blank();
|
|
22
|
+
// Project Info
|
|
23
|
+
log.labelValue('Project:', String(config.project_name));
|
|
24
|
+
log.labelValue('Agent:', String(config.agent_name));
|
|
25
|
+
log.blank();
|
|
26
|
+
// Transport Section
|
|
27
|
+
log.heading('Transport');
|
|
28
|
+
log.labelValue(' Type:', config.transport);
|
|
29
|
+
if (config.transport === 'http') {
|
|
30
|
+
const urlValue = config.mcp_url !== undefined && config.mcp_url !== null
|
|
31
|
+
? config.mcp_url
|
|
32
|
+
: null;
|
|
33
|
+
const urlText = urlValue ? `URL: ${urlValue}` : 'URL: Not configured';
|
|
34
|
+
if (transportCheck.isValid) {
|
|
35
|
+
log.plain(` ${urlText} ${log.tick()}`);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
log.plain(` ${urlText} ${log.cross()}`);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
else {
|
|
42
|
+
const scriptValue = config.script !== undefined && config.script !== null
|
|
43
|
+
? config.script
|
|
44
|
+
: null;
|
|
45
|
+
const scriptText = scriptValue
|
|
46
|
+
? `Script: ${scriptValue}`
|
|
47
|
+
: 'Script: Not configured';
|
|
48
|
+
if (transportCheck.isValid) {
|
|
49
|
+
log.plain(` ${scriptText} ${log.tick()}`);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
log.plain(` ${scriptText} ${log.cross()}`);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
if (!transportCheck.isValid && transportCheck.fix) {
|
|
56
|
+
log.warnSymbol(` ${transportCheck.fix}`);
|
|
57
|
+
}
|
|
58
|
+
log.blank();
|
|
59
|
+
// Script Section (if present)
|
|
60
|
+
if (scriptCheck !== null && config.script) {
|
|
61
|
+
const scriptText = String(config.script);
|
|
62
|
+
log.heading('Script');
|
|
63
|
+
if (scriptCheck.isValid) {
|
|
64
|
+
log.plain(` ${scriptText} ${log.tick()}`);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
log.plain(` ${scriptText} ${log.cross()}`);
|
|
68
|
+
}
|
|
69
|
+
if (!scriptCheck.isValid && scriptCheck.fix) {
|
|
70
|
+
log.warnSymbol(` ${scriptCheck.fix}`);
|
|
71
|
+
}
|
|
72
|
+
log.blank();
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Mask API key to show only first few characters.
|
|
76
|
+
*/
|
|
77
|
+
function maskApiKey(apiKey) {
|
|
78
|
+
if (!apiKey)
|
|
79
|
+
return '';
|
|
80
|
+
if (apiKey.length <= 4)
|
|
81
|
+
return '****';
|
|
82
|
+
return `${apiKey.substring(0, 4)}*****`;
|
|
83
|
+
}
|
|
84
|
+
// LLM Providers Section
|
|
85
|
+
if (llmChecks.length > 0) {
|
|
86
|
+
log.heading('LLM Providers');
|
|
87
|
+
for (const llm of llmChecks) {
|
|
88
|
+
const providerName = llm.provider.charAt(0).toUpperCase() + llm.provider.slice(1);
|
|
89
|
+
const defaultMark = llm.isDefault
|
|
90
|
+
? log.styleText(' (default)', 'cyan')
|
|
91
|
+
: '';
|
|
92
|
+
log.plain(` ${log.styleText(providerName, 'bold')}${defaultMark}`);
|
|
93
|
+
// API Key
|
|
94
|
+
const apiKeyValue = llm.apiKeyCheck.value
|
|
95
|
+
? ` (${maskApiKey(llm.apiKeyCheck.value)})`
|
|
96
|
+
: '';
|
|
97
|
+
const apiKeyLabel = ` API Key: [${llm.apiKeyCheck.message}]${apiKeyValue}`;
|
|
98
|
+
if (llm.apiKeyCheck.isValid) {
|
|
99
|
+
log.plain(`${apiKeyLabel} ${log.tick()}`);
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
log.plain(`${apiKeyLabel} ${log.cross()}`);
|
|
103
|
+
}
|
|
104
|
+
if (!llm.apiKeyCheck.isValid && llm.apiKeyCheck.fix) {
|
|
105
|
+
log.warnSymbol(` ${llm.apiKeyCheck.fix}`);
|
|
106
|
+
}
|
|
107
|
+
// Model
|
|
108
|
+
const modelValue = llm.modelCheck.value
|
|
109
|
+
? ` (${llm.modelCheck.value})`
|
|
110
|
+
: '';
|
|
111
|
+
const modelLabel = ` Model: [${llm.modelCheck.message}]${modelValue}`;
|
|
112
|
+
if (llm.modelCheck.isValid) {
|
|
113
|
+
log.plain(`${modelLabel} ${log.tick()}`);
|
|
114
|
+
}
|
|
115
|
+
else {
|
|
116
|
+
log.plain(`${modelLabel} ${log.cross()}`);
|
|
117
|
+
}
|
|
118
|
+
if (!llm.modelCheck.isValid && llm.modelCheck.fix) {
|
|
119
|
+
log.warnSymbol(` ${llm.modelCheck.fix}`);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
log.blank();
|
|
123
|
+
}
|
|
124
|
+
// Local LLM Providers
|
|
125
|
+
if (localLlmChecks && localLlmChecks.length > 0) {
|
|
126
|
+
log.heading('Local LLM Providers');
|
|
127
|
+
for (const llm of localLlmChecks) {
|
|
128
|
+
log.plain(` ${llm.provider}`);
|
|
129
|
+
if (llm.modelName) {
|
|
130
|
+
const modelLabel = ` Model: ${llm.modelName}`;
|
|
131
|
+
if (llm.check.isValid) {
|
|
132
|
+
log.plain(`${modelLabel} ${log.tick()}`);
|
|
133
|
+
}
|
|
134
|
+
else {
|
|
135
|
+
log.plain(`${modelLabel} ${log.cross()}`);
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
else if (llm.check.isValid) {
|
|
139
|
+
log.plain(` ${log.tick()}`);
|
|
140
|
+
}
|
|
141
|
+
else {
|
|
142
|
+
log.plain(` ${log.cross()}`);
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
log.blank();
|
|
146
|
+
}
|
|
147
|
+
// Summary
|
|
148
|
+
if (allValid) {
|
|
149
|
+
log.success('All checks passed');
|
|
150
|
+
log.blank();
|
|
151
|
+
}
|
|
152
|
+
else {
|
|
153
|
+
log.warning('Some issues found');
|
|
154
|
+
log.blank();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
//# sourceMappingURL=doctor-ui.js.map
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presentation utilities for init command.
|
|
3
|
+
* Separates UI/logic concerns by providing functions for displaying messages.
|
|
4
|
+
*/
|
|
5
|
+
/**
|
|
6
|
+
* Display the "already initialized" message.
|
|
7
|
+
*/
|
|
8
|
+
export declare function displayAlreadyInitialized(): void;
|
|
9
|
+
/**
|
|
10
|
+
* Display the initialization success message.
|
|
11
|
+
* @param configPath - Path to the created config file
|
|
12
|
+
*/
|
|
13
|
+
export declare function displayInitSuccess(configPath: string): void;
|
|
14
|
+
//# sourceMappingURL=init-ui.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presentation utilities for init command.
|
|
3
|
+
* Separates UI/logic concerns by providing functions for displaying messages.
|
|
4
|
+
*/
|
|
5
|
+
import { Icons, Messages, Paths, ToolCommands } from '../constants/index.js';
|
|
6
|
+
import { log } from '../utils/logger.js';
|
|
7
|
+
/**
|
|
8
|
+
* Display the "already initialized" message.
|
|
9
|
+
*/
|
|
10
|
+
export function displayAlreadyInitialized() {
|
|
11
|
+
log.blank();
|
|
12
|
+
log.warning(` ${Messages.INIT_ALREADY_INITIALIZED}`);
|
|
13
|
+
log.blank();
|
|
14
|
+
log.plain(`${Icons.FOLDER} ${Messages.INIT_CONFIG_FILE(Paths.CONFIG_PATH)}`);
|
|
15
|
+
log.blank();
|
|
16
|
+
log.plain(`${Icons.DOCUMENT} ${Messages.INIT_NEXT_STEPS_HEADER}`);
|
|
17
|
+
log.plain(` ${Messages.INIT_ALREADY_INIT_MSG(Paths.CONFIG_PATH)}`);
|
|
18
|
+
log.plain(` ${Messages.INIT_VERIFY_SETUP(ToolCommands.DOCTOR)}`);
|
|
19
|
+
log.blank();
|
|
20
|
+
log.info(Messages.INIT_REINITIALIZE_TIP);
|
|
21
|
+
log.plain(` ${Messages.INIT_REINITIALIZE_INSTRUCTION(ToolCommands.INIT)}`);
|
|
22
|
+
log.blank();
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Display the initialization success message.
|
|
26
|
+
* @param configPath - Path to the created config file
|
|
27
|
+
*/
|
|
28
|
+
export function displayInitSuccess(configPath) {
|
|
29
|
+
log.blank();
|
|
30
|
+
log.success(`${Icons.CHECK} ${Messages.INIT_SUCCESS}`);
|
|
31
|
+
log.blank();
|
|
32
|
+
log.plain(`${Icons.FOLDER} Configuration file: ${configPath}`);
|
|
33
|
+
log.blank();
|
|
34
|
+
log.plain(`${Icons.DOCUMENT} ${Messages.INIT_NEXT_STEPS_HEADER}`);
|
|
35
|
+
log.plain(` 1. ${Messages.INIT_REVIEW_CONFIG(Paths.CONFIG_PATH)}`);
|
|
36
|
+
log.plain(` 2. ${Messages.INIT_SETUP_ENV_VARS}`);
|
|
37
|
+
log.plain(` 3. ${Messages.INIT_RUN_DOCTOR(ToolCommands.DOCTOR)}`);
|
|
38
|
+
log.plain(` 4. ${Messages.INIT_RUN_DEV(ToolCommands.DEV)}`);
|
|
39
|
+
log.blank();
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=init-ui.js.map
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Presentation layer for list command UI components.
|
|
3
|
+
* Provides minimalistic, easy-to-read displays for tools, resources, and prompts.
|
|
4
|
+
*/
|
|
5
|
+
interface ToolInfo {
|
|
6
|
+
name: string;
|
|
7
|
+
title?: string;
|
|
8
|
+
description?: string;
|
|
9
|
+
inputSchema?: unknown;
|
|
10
|
+
outputSchema?: unknown;
|
|
11
|
+
}
|
|
12
|
+
interface ResourceInfo {
|
|
13
|
+
uri: string;
|
|
14
|
+
name?: string;
|
|
15
|
+
description?: string;
|
|
16
|
+
mimeType?: string;
|
|
17
|
+
}
|
|
18
|
+
interface PromptInfo {
|
|
19
|
+
name: string;
|
|
20
|
+
title?: string;
|
|
21
|
+
description?: string;
|
|
22
|
+
arguments?: Array<{
|
|
23
|
+
name: string;
|
|
24
|
+
description?: string;
|
|
25
|
+
required?: boolean;
|
|
26
|
+
}>;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Display tools list using plain console output.
|
|
30
|
+
* This avoids Ink taking control of stdin, which disables terminal history.
|
|
31
|
+
*/
|
|
32
|
+
export declare function displayTools(tools: ToolInfo[]): Promise<void>;
|
|
33
|
+
/**
|
|
34
|
+
* Display resources list using plain console output.
|
|
35
|
+
* This avoids Ink taking control of stdin, which disables terminal history.
|
|
36
|
+
*/
|
|
37
|
+
export declare function displayResources(resources: ResourceInfo[]): Promise<void>;
|
|
38
|
+
/**
|
|
39
|
+
* Display prompts list using plain console output.
|
|
40
|
+
* This avoids Ink taking control of stdin, which disables terminal history.
|
|
41
|
+
*/
|
|
42
|
+
export declare function displayPrompts(prompts: PromptInfo[]): Promise<void>;
|
|
43
|
+
export {};
|
|
44
|
+
//# sourceMappingURL=list-ui.d.ts.map
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import { getVersionDisplayString } from '../utils/version-display.js';
|
|
2
|
+
import { log } from '../utils/logger.js';
|
|
3
|
+
/**
|
|
4
|
+
* Extract and format parameter information from a JSON schema.
|
|
5
|
+
*/
|
|
6
|
+
function extractParameters(schema) {
|
|
7
|
+
if (!schema || typeof schema !== 'object') {
|
|
8
|
+
return [];
|
|
9
|
+
}
|
|
10
|
+
const schemaObj = schema;
|
|
11
|
+
if (!schemaObj.properties) {
|
|
12
|
+
return [];
|
|
13
|
+
}
|
|
14
|
+
const required = new Set(schemaObj.required || []);
|
|
15
|
+
const params = [];
|
|
16
|
+
for (const [name, prop] of Object.entries(schemaObj.properties)) {
|
|
17
|
+
const propObj = prop;
|
|
18
|
+
const type = propObj.type || 'unknown';
|
|
19
|
+
params.push({
|
|
20
|
+
name,
|
|
21
|
+
type,
|
|
22
|
+
required: required.has(name),
|
|
23
|
+
});
|
|
24
|
+
}
|
|
25
|
+
return params;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Display tools list using plain console output.
|
|
29
|
+
* This avoids Ink taking control of stdin, which disables terminal history.
|
|
30
|
+
*/
|
|
31
|
+
export async function displayTools(tools) {
|
|
32
|
+
// Get version info for display
|
|
33
|
+
const versionDisplayString = await getVersionDisplayString();
|
|
34
|
+
log.blank();
|
|
35
|
+
log.label(`Syrin ${versionDisplayString}`);
|
|
36
|
+
log.blank();
|
|
37
|
+
log.heading(`Tools: ${tools.length} ${tools.length === 1 ? 'tool' : 'tools'}`);
|
|
38
|
+
log.blank();
|
|
39
|
+
if (tools.length === 0) {
|
|
40
|
+
log.label(' No tools available');
|
|
41
|
+
log.blank();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
tools.forEach((tool, index) => {
|
|
45
|
+
const inputParams = extractParameters(tool.inputSchema);
|
|
46
|
+
const outputParams = extractParameters(tool.outputSchema);
|
|
47
|
+
log.numberedItem(index + 1, tool.name);
|
|
48
|
+
// Description
|
|
49
|
+
if (tool.description) {
|
|
50
|
+
log.label(` ${tool.description.split('\n')[0]}`);
|
|
51
|
+
}
|
|
52
|
+
// Input parameters summary
|
|
53
|
+
if (inputParams.length > 0) {
|
|
54
|
+
log.label(' Parameters:');
|
|
55
|
+
for (const param of inputParams) {
|
|
56
|
+
const requiredText = param.required ? ' (required)' : '';
|
|
57
|
+
log.plain(` • ${log.styleText(param.name, 'cyan')} ${log.styleText(`(${param.type})`, 'dim')}${requiredText ? log.styleText(requiredText, 'yellow') : ''}`);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
else {
|
|
61
|
+
log.label(' No parameters');
|
|
62
|
+
}
|
|
63
|
+
// Output summary
|
|
64
|
+
if (outputParams.length > 0) {
|
|
65
|
+
log.plain(` ${log.styleText('Returns:', 'dim')} ${log.styleText(String(outputParams.length), 'cyan')} ${log.styleText(outputParams.length === 1 ? 'property' : 'properties', 'dim')}`);
|
|
66
|
+
}
|
|
67
|
+
log.blank();
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
/**
|
|
71
|
+
* Display resources list using plain console output.
|
|
72
|
+
* This avoids Ink taking control of stdin, which disables terminal history.
|
|
73
|
+
*/
|
|
74
|
+
export async function displayResources(resources) {
|
|
75
|
+
// Get version info for display
|
|
76
|
+
const versionDisplayString = await getVersionDisplayString();
|
|
77
|
+
log.blank();
|
|
78
|
+
log.label(`Syrin ${versionDisplayString}`);
|
|
79
|
+
log.blank();
|
|
80
|
+
log.heading(`Resources: ${resources.length} ${resources.length === 1 ? 'resource' : 'resources'}`);
|
|
81
|
+
log.blank();
|
|
82
|
+
if (resources.length === 0) {
|
|
83
|
+
log.label(' No resources available');
|
|
84
|
+
log.blank();
|
|
85
|
+
return;
|
|
86
|
+
}
|
|
87
|
+
resources.forEach((resource, index) => {
|
|
88
|
+
log.numberedItem(index + 1, resource.uri);
|
|
89
|
+
if (resource.name) {
|
|
90
|
+
log.labelValue(' Name:', resource.name);
|
|
91
|
+
}
|
|
92
|
+
if (resource.description) {
|
|
93
|
+
log.label(` ${resource.description.split('\n')[0]}`);
|
|
94
|
+
}
|
|
95
|
+
if (resource.mimeType) {
|
|
96
|
+
log.labelValue(' Type:', resource.mimeType);
|
|
97
|
+
}
|
|
98
|
+
log.blank();
|
|
99
|
+
});
|
|
100
|
+
}
|
|
101
|
+
/**
|
|
102
|
+
* Display prompts list using plain console output.
|
|
103
|
+
* This avoids Ink taking control of stdin, which disables terminal history.
|
|
104
|
+
*/
|
|
105
|
+
export async function displayPrompts(prompts) {
|
|
106
|
+
// Get version info for display
|
|
107
|
+
const versionDisplayString = await getVersionDisplayString();
|
|
108
|
+
log.blank();
|
|
109
|
+
log.label(`Syrin ${versionDisplayString}`);
|
|
110
|
+
log.blank();
|
|
111
|
+
log.heading(`Prompts: ${prompts.length} ${prompts.length === 1 ? 'prompt' : 'prompts'}`);
|
|
112
|
+
log.blank();
|
|
113
|
+
if (prompts.length === 0) {
|
|
114
|
+
log.label(' No prompts available');
|
|
115
|
+
log.blank();
|
|
116
|
+
return;
|
|
117
|
+
}
|
|
118
|
+
prompts.forEach((prompt, index) => {
|
|
119
|
+
log.numberedItem(index + 1, prompt.name);
|
|
120
|
+
if (prompt.description) {
|
|
121
|
+
log.label(` ${prompt.description.split('\n')[0]}`);
|
|
122
|
+
}
|
|
123
|
+
if (prompt.arguments && prompt.arguments.length > 0) {
|
|
124
|
+
log.label(' Arguments:');
|
|
125
|
+
for (const arg of prompt.arguments) {
|
|
126
|
+
const requiredText = arg.required ? ' (required)' : '';
|
|
127
|
+
log.plain(` • ${log.styleText(arg.name, 'cyan')}${requiredText ? log.styleText(requiredText, 'yellow') : ''}`);
|
|
128
|
+
if (arg.description) {
|
|
129
|
+
log.label(` ${arg.description.split('\n')[0]}`);
|
|
130
|
+
}
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
else {
|
|
134
|
+
log.label(' No arguments');
|
|
135
|
+
}
|
|
136
|
+
log.blank();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
//# sourceMappingURL=list-ui.js.map
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Test Results UI for MCP Connection Testing and Tool Validation.
|
|
3
|
+
* Provides a minimalistic, easy-to-read display of connection test results
|
|
4
|
+
* and tool validation results.
|
|
5
|
+
*/
|
|
6
|
+
import type { MCPConnectionResult } from '../runtime/mcp/types.js';
|
|
7
|
+
import type { TransportType } from '../config/types.js';
|
|
8
|
+
import type { TestOrchestratorResult } from '../runtime/test/orchestrator.js';
|
|
9
|
+
/**
|
|
10
|
+
* Context information for tool errors.
|
|
11
|
+
*/
|
|
12
|
+
export interface ToolErrorContext {
|
|
13
|
+
testName?: string;
|
|
14
|
+
testInput?: Record<string, unknown>;
|
|
15
|
+
expectedOutputSchema?: string;
|
|
16
|
+
parsedError?: {
|
|
17
|
+
field?: string;
|
|
18
|
+
message?: string;
|
|
19
|
+
inputValue?: string;
|
|
20
|
+
inputType?: string;
|
|
21
|
+
errorType?: string;
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
export interface TestResultsUIOptions {
|
|
25
|
+
/** Connection test result to display */
|
|
26
|
+
result: MCPConnectionResult;
|
|
27
|
+
/** Transport type being tested */
|
|
28
|
+
transport: TransportType;
|
|
29
|
+
/** Whether to show verbose details (HTTP request/response) */
|
|
30
|
+
verbose?: boolean;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* Display test results using plain console output.
|
|
34
|
+
* This avoids Ink taking control of stdin, which disables terminal history.
|
|
35
|
+
*/
|
|
36
|
+
export declare function displayTestResults(options: TestResultsUIOptions): Promise<void>;
|
|
37
|
+
/**
|
|
38
|
+
* Format test results for CI output (minimal).
|
|
39
|
+
*/
|
|
40
|
+
export declare function formatCIResults(result: TestOrchestratorResult): void;
|
|
41
|
+
/**
|
|
42
|
+
* Format test results for CLI output.
|
|
43
|
+
*/
|
|
44
|
+
export declare function formatCLIResults(result: TestOrchestratorResult): void;
|
|
45
|
+
/**
|
|
46
|
+
* Format test results as JSON.
|
|
47
|
+
*/
|
|
48
|
+
export declare function formatJSONResults(result: TestOrchestratorResult): string;
|
|
49
|
+
//# sourceMappingURL=test-ui.d.ts.map
|