@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
package/LICENSE
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026, Syrin Labs Team
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
|
|
15
|
+
OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
# Syrin
|
|
2
|
+
|
|
3
|
+

|
|
4
|
+
|
|
5
|
+
[](https://badge.fury.io/js/%40syrin%2Fsyrin) [](https://opensource.org/licenses/ISC) [](https://nodejs.org/)
|
|
6
|
+
|
|
7
|
+
**Syrin is a runtime intelligence system for MCP servers.**
|
|
8
|
+
|
|
9
|
+
It helps developers **see, validate, and reason about MCP execution** before systems reach production.
|
|
10
|
+
|
|
11
|
+
Documentation: [https://docs.syrin.dev](https://docs.syrin.dev)
|
|
12
|
+
|
|
13
|
+
---
|
|
14
|
+
|
|
15
|
+
## The Problem
|
|
16
|
+
|
|
17
|
+
Building MCP servers today usually looks like this:
|
|
18
|
+
|
|
19
|
+
1. Define tools and prompts
|
|
20
|
+
2. Connect an LLM
|
|
21
|
+
3. Run the server
|
|
22
|
+
4. Hope execution behaves as expected
|
|
23
|
+
|
|
24
|
+
When things go wrong:
|
|
25
|
+
|
|
26
|
+
- Tools are called for unclear reasons
|
|
27
|
+
- Behaviour changes between runs
|
|
28
|
+
- Debugging relies on logs and guesswork
|
|
29
|
+
- Contract issues surface only after failures
|
|
30
|
+
|
|
31
|
+
Most problems are discovered **after** deployment.
|
|
32
|
+
|
|
33
|
+
---
|
|
34
|
+
|
|
35
|
+
## Installation
|
|
36
|
+
|
|
37
|
+
### Quick start
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
npx @syrin/syrin init
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
### Global install
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
npm install -g @syrin/syrin
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
### Local install (recommended for CI)
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
npm install @syrin/syrin
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
Requirements:
|
|
56
|
+
|
|
57
|
+
- Node.js ≥ 18
|
|
58
|
+
- npm ≥ 9
|
|
59
|
+
|
|
60
|
+
---
|
|
61
|
+
|
|
62
|
+
## The Syrin Way
|
|
63
|
+
|
|
64
|
+
Syrin changes the workflow.
|
|
65
|
+
|
|
66
|
+
Instead of guessing how MCP behaves, you **inspect and validate it explicitly**.
|
|
67
|
+
|
|
68
|
+
**Before:**
|
|
69
|
+
|
|
70
|
+
```text
|
|
71
|
+
Write tools → Connect LLM → Run server → Debug via logs
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**With Syrin:**
|
|
75
|
+
|
|
76
|
+
```text
|
|
77
|
+
Define tools
|
|
78
|
+
→ Analyse contracts
|
|
79
|
+
→ Validate protocol
|
|
80
|
+
→ Inspect behaviour interactively
|
|
81
|
+
→ Enable execution with confidence
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
Syrin does not replace MCP.
|
|
85
|
+
It makes MCP systems understandable and testable.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## What Syrin Does
|
|
90
|
+
|
|
91
|
+
- Validates MCP protocol compliance
|
|
92
|
+
- Analyses tool contracts statically
|
|
93
|
+
- Lets you interact with MCP servers using real LLMs
|
|
94
|
+
- Shows which tools are proposed and why
|
|
95
|
+
- Prevents accidental execution by default
|
|
96
|
+
- Surfaces configuration and contract errors early
|
|
97
|
+
|
|
98
|
+
---
|
|
99
|
+
|
|
100
|
+
## Key Capabilities
|
|
101
|
+
|
|
102
|
+
### Static Tool Contract Analysis (`syrin analyse`)
|
|
103
|
+
|
|
104
|
+
LLMs rely entirely on tool contracts.
|
|
105
|
+
If contracts are vague or incomplete, behaviour becomes unreliable.
|
|
106
|
+
|
|
107
|
+
`syrin analyse` inspects:
|
|
108
|
+
|
|
109
|
+
- Tool definitions
|
|
110
|
+
- Parameter schemas
|
|
111
|
+
- Description clarity
|
|
112
|
+
- Implicit dependencies between tools
|
|
113
|
+
|
|
114
|
+
This catches issues **before runtime**.
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
syrin analyse
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
This is especially useful in CI:
|
|
121
|
+
|
|
122
|
+
```bash
|
|
123
|
+
syrin analyse --ci
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
---
|
|
127
|
+
|
|
128
|
+
### Interactive Execution Inspection (`syrin dev`)
|
|
129
|
+
|
|
130
|
+
`syrin dev` provides a governed chat interface for MCP servers.
|
|
131
|
+
|
|
132
|
+
- Preview tool calls before execution
|
|
133
|
+
- Execute tools only when explicitly enabled
|
|
134
|
+
- Switch between LLM providers
|
|
135
|
+
- Inspect large tool outputs safely
|
|
136
|
+
|
|
137
|
+
```bash
|
|
138
|
+
syrin dev
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
Enable execution only when ready:
|
|
142
|
+
|
|
143
|
+
```bash
|
|
144
|
+
syrin dev --exec
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
---
|
|
148
|
+
|
|
149
|
+
### Tool-Level Structural Safety Validation (`syrin test`)
|
|
150
|
+
|
|
151
|
+
**v1.3.0 Feature**: `syrin test` now validates tool contracts through sandboxed execution.
|
|
152
|
+
|
|
153
|
+
This acts as a "hard design gate" to ensure each tool is individually safe for agent-driven systems:
|
|
154
|
+
|
|
155
|
+
- **Tool Unit Contracts**: Define behavioral guarantees in `tools/<tool-name>.yaml` files
|
|
156
|
+
- **Sandboxed Execution**: Tools tested in isolated environments with resource limits
|
|
157
|
+
- **Behavioral Observation**: Detects side effects, non-determinism, output explosions, hidden dependencies
|
|
158
|
+
- **Process Reuse**: Optimized for performance (100+ tools in 1-3 minutes)
|
|
159
|
+
|
|
160
|
+
```bash
|
|
161
|
+
# Validate all tools
|
|
162
|
+
syrin test
|
|
163
|
+
|
|
164
|
+
# Test specific tool
|
|
165
|
+
syrin test --tool fetch_user
|
|
166
|
+
|
|
167
|
+
# Strict mode (warnings become errors)
|
|
168
|
+
syrin test --strict
|
|
169
|
+
|
|
170
|
+
# JSON output for CI
|
|
171
|
+
syrin test --json
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
**Connection Testing** (legacy behavior):
|
|
175
|
+
|
|
176
|
+
```bash
|
|
177
|
+
syrin test --connection
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
### Protocol and Configuration Validation
|
|
181
|
+
|
|
182
|
+
Before running anything, Syrin validates assumptions.
|
|
183
|
+
|
|
184
|
+
```bash
|
|
185
|
+
syrin doctor
|
|
186
|
+
syrin test --connection # Test MCP connection only
|
|
187
|
+
```
|
|
188
|
+
|
|
189
|
+
These commands ensure:
|
|
190
|
+
|
|
191
|
+
- Configuration is valid
|
|
192
|
+
- Environment variables are set
|
|
193
|
+
- MCP protocol is followed correctly
|
|
194
|
+
|
|
195
|
+
---
|
|
196
|
+
|
|
197
|
+
## Typical Workflow
|
|
198
|
+
|
|
199
|
+
```bash
|
|
200
|
+
syrin init # Initialise configuration
|
|
201
|
+
syrin doctor # Validate setup
|
|
202
|
+
syrin analyse # Static analysis of tool contracts
|
|
203
|
+
syrin test # Validate tool contracts (sandboxed execution)
|
|
204
|
+
syrin test --connection # Test MCP protocol connection
|
|
205
|
+
syrin dev # Inspect behaviour interactively
|
|
206
|
+
```
|
|
207
|
+
|
|
208
|
+
This workflow is designed to catch issues **before production**.
|
|
209
|
+
|
|
210
|
+
---
|
|
211
|
+
|
|
212
|
+
## Commands Overview
|
|
213
|
+
|
|
214
|
+
| Command | Purpose |
|
|
215
|
+
| ------------------------- | --------------------------------------------- |
|
|
216
|
+
| `syrin init` | Initialise a Syrin project |
|
|
217
|
+
| `syrin doctor` | Validate configuration and environment |
|
|
218
|
+
| `syrin analyse` | Static analysis of MCP tool contracts |
|
|
219
|
+
| `syrin test` | Validate tool contracts (sandboxed execution) |
|
|
220
|
+
| `syrin test --connection` | Test MCP protocol connection (legacy) |
|
|
221
|
+
| `syrin list` | Inspect tools, resources, and prompts |
|
|
222
|
+
| `syrin dev` | Interactive execution inspection |
|
|
223
|
+
|
|
224
|
+
Full documentation: [https://docs.syrin.dev/commands](https://docs.syrin.dev/commands)
|
|
225
|
+
|
|
226
|
+
---
|
|
227
|
+
|
|
228
|
+
## Tool Contracts (v1.3.0)
|
|
229
|
+
|
|
230
|
+
Define behavioral guarantees for your tools in `tools/<tool-name>.yaml` files:
|
|
231
|
+
|
|
232
|
+
```yaml
|
|
233
|
+
version: 1
|
|
234
|
+
tool: fetch_user
|
|
235
|
+
|
|
236
|
+
contract:
|
|
237
|
+
input_schema: FetchUserRequest
|
|
238
|
+
output_schema: User
|
|
239
|
+
|
|
240
|
+
guarantees:
|
|
241
|
+
side_effects: none
|
|
242
|
+
max_output_size: 10kb
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
See [Tool Contracts Documentation](./docs/tool-contracts.md) for details.
|
|
246
|
+
|
|
247
|
+
## Configuration
|
|
248
|
+
|
|
249
|
+
Syrin uses a single configuration file:
|
|
250
|
+
|
|
251
|
+
```bash
|
|
252
|
+
syrin.yaml
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
This file defines:
|
|
256
|
+
|
|
257
|
+
- Transport type (`stdio` or `http`)
|
|
258
|
+
- MCP server connection
|
|
259
|
+
- Allowed LLM providers
|
|
260
|
+
|
|
261
|
+
Configuration reference: [https://docs.syrin.dev/configuration](https://docs.syrin.dev/configuration)
|
|
262
|
+
|
|
263
|
+
---
|
|
264
|
+
|
|
265
|
+
## Transport Support
|
|
266
|
+
|
|
267
|
+
- **stdio** – Syrin manages the MCP server process (recommended for development)
|
|
268
|
+
- **http** – Syrin connects to an existing server (common in production)
|
|
269
|
+
|
|
270
|
+
Transport documentation: [https://docs.syrin.dev/configuration/transport](https://docs.syrin.dev/configuration/transport)
|
|
271
|
+
|
|
272
|
+
---
|
|
273
|
+
|
|
274
|
+
## LLM Providers
|
|
275
|
+
|
|
276
|
+
Supported providers:
|
|
277
|
+
|
|
278
|
+
- OpenAI
|
|
279
|
+
- Claude (Anthropic)
|
|
280
|
+
- Ollama (local models)
|
|
281
|
+
|
|
282
|
+
LLMs propose actions.
|
|
283
|
+
Syrin governs execution.
|
|
284
|
+
|
|
285
|
+
Provider configuration: [https://docs.syrin.dev/configuration/llm](https://docs.syrin.dev/configuration/llm)
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## Links
|
|
290
|
+
|
|
291
|
+
- Documentation: [https://docs.syrin.dev](https://docs.syrin.dev)
|
|
292
|
+
- GitHub: [https://github.com/syrin-labs/cli](https://github.com/syrin-labs/cli)
|
|
293
|
+
- Issues: [https://github.com/syrin-labs/cli/issues](https://github.com/syrin-labs/cli/issues)
|
|
294
|
+
- npm: [https://www.npmjs.com/package/@syrin/cli](https://www.npmjs.com/package/@syrin/cli)
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## License
|
|
299
|
+
|
|
300
|
+
ISC License. See LICENSE for details.
|
|
301
|
+
|
|
302
|
+
Made with ❤️ by **Syrin Labs**.
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `syrin analyse` command implementation.
|
|
3
|
+
* Performs static analysis on MCP tool contracts.
|
|
4
|
+
*/
|
|
5
|
+
import { type TransportCommandOptions } from '../../cli/utils/index.js';
|
|
6
|
+
interface AnalyseCommandOptions extends TransportCommandOptions {
|
|
7
|
+
ci?: boolean;
|
|
8
|
+
json?: boolean;
|
|
9
|
+
graph?: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Execute the analyse command.
|
|
13
|
+
*/
|
|
14
|
+
export declare function executeAnalyse(options: AnalyseCommandOptions): Promise<void>;
|
|
15
|
+
export {};
|
|
16
|
+
//# sourceMappingURL=analyse.d.ts.map
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `syrin analyse` command implementation.
|
|
3
|
+
* Performs static analysis on MCP tool contracts.
|
|
4
|
+
*/
|
|
5
|
+
import { analyseTools } from '../../runtime/analysis/index.js';
|
|
6
|
+
import { displayAnalysisResult } from '../../presentation/analysis-ui.js';
|
|
7
|
+
import { handleCommandError, resolveTransportConfig, establishConnection, safeCloseConnection, flushOutput, } from '../../cli/utils/index.js';
|
|
8
|
+
import { Messages } from '../../constants/index.js';
|
|
9
|
+
import { log } from '../../utils/logger.js';
|
|
10
|
+
/**
|
|
11
|
+
* Execute the analyse command.
|
|
12
|
+
*/
|
|
13
|
+
export async function executeAnalyse(options) {
|
|
14
|
+
try {
|
|
15
|
+
// Resolve transport configuration
|
|
16
|
+
const { transport: finalTransport, url: mcpUrl, script: mcpCommand, urlSource, env, authHeaders, } = resolveTransportConfig(options);
|
|
17
|
+
if (!options.ci && !options.json) {
|
|
18
|
+
log.info(Messages.ANALYSE_CONNECTING);
|
|
19
|
+
}
|
|
20
|
+
// Connect to MCP server with centralized error handling
|
|
21
|
+
const { client, transport } = await establishConnection({
|
|
22
|
+
transport: finalTransport,
|
|
23
|
+
url: mcpUrl,
|
|
24
|
+
script: mcpCommand,
|
|
25
|
+
urlSource,
|
|
26
|
+
env,
|
|
27
|
+
authHeaders,
|
|
28
|
+
});
|
|
29
|
+
try {
|
|
30
|
+
if (!options.ci && !options.json) {
|
|
31
|
+
log.info(Messages.ANALYSE_LOADING_TOOLS);
|
|
32
|
+
}
|
|
33
|
+
// Run analysis
|
|
34
|
+
const result = await analyseTools(client);
|
|
35
|
+
// Display results
|
|
36
|
+
displayAnalysisResult(result, {
|
|
37
|
+
ci: options.ci,
|
|
38
|
+
json: options.json,
|
|
39
|
+
graph: options.graph,
|
|
40
|
+
});
|
|
41
|
+
// Ensure all output is flushed before exiting
|
|
42
|
+
await flushOutput();
|
|
43
|
+
// Exit with appropriate code
|
|
44
|
+
if (result.errors.length > 0) {
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
process.exit(0);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
finally {
|
|
52
|
+
// Always close the connection safely, even if errors occur
|
|
53
|
+
await safeCloseConnection(transport);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
catch (error) {
|
|
57
|
+
handleCommandError(error, Messages.ANALYSE_ERROR_FAILED);
|
|
58
|
+
process.exit(1);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
//# sourceMappingURL=analyse.js.map
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `syrin dev` command implementation.
|
|
3
|
+
* Interactive development mode for testing MCP tools with LLMs.
|
|
4
|
+
*/
|
|
5
|
+
export interface DevCommandOptions {
|
|
6
|
+
/** Execute tool calls (default: preview mode) */
|
|
7
|
+
exec?: boolean;
|
|
8
|
+
/** Override default LLM provider */
|
|
9
|
+
llm?: string;
|
|
10
|
+
/** Project root directory */
|
|
11
|
+
projectRoot?: string;
|
|
12
|
+
/** Save events to file */
|
|
13
|
+
saveEvents?: boolean;
|
|
14
|
+
/** Event file path */
|
|
15
|
+
eventFile?: string;
|
|
16
|
+
/** Run script to spawn server internally */
|
|
17
|
+
runScript?: boolean;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Execute the dev command.
|
|
21
|
+
*/
|
|
22
|
+
export declare function executeDev(options?: DevCommandOptions): Promise<void>;
|
|
23
|
+
//# sourceMappingURL=dev.d.ts.map
|