@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,94 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output formatter for Dev Mode.
|
|
3
|
+
* Formats all output for developer-friendly display.
|
|
4
|
+
*/
|
|
5
|
+
import type { DevSessionState } from './types.js';
|
|
6
|
+
import type { ToolCall } from '../../runtime/llm/types.js';
|
|
7
|
+
import type { TransportType } from '../../config/types.js';
|
|
8
|
+
import type { MCPURL, Command } from '../../types/ids.js';
|
|
9
|
+
/**
|
|
10
|
+
* Formatter options.
|
|
11
|
+
*/
|
|
12
|
+
export interface FormatterOptions {
|
|
13
|
+
/** Whether to use colors */
|
|
14
|
+
useColors?: boolean;
|
|
15
|
+
/** Whether to truncate long outputs */
|
|
16
|
+
truncateLongOutputs?: boolean;
|
|
17
|
+
/** Maximum length before truncation */
|
|
18
|
+
maxOutputLength?: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Dev Mode output formatter.
|
|
22
|
+
*/
|
|
23
|
+
export declare class DevFormatter {
|
|
24
|
+
private readonly options;
|
|
25
|
+
constructor(options?: FormatterOptions);
|
|
26
|
+
/**
|
|
27
|
+
* Format and display the dev mode header.
|
|
28
|
+
*/
|
|
29
|
+
displayHeader(version: string, transport: TransportType, mcpUrl: MCPURL | string | undefined, command: Command | string | undefined, llmProvider: string, toolCount: number): void;
|
|
30
|
+
/**
|
|
31
|
+
* Format and display user input.
|
|
32
|
+
*/
|
|
33
|
+
displayUserInput(input: string): void;
|
|
34
|
+
/**
|
|
35
|
+
* Format and display detected tool calls.
|
|
36
|
+
*/
|
|
37
|
+
displayToolDetection(toolCalls: ToolCall[]): void;
|
|
38
|
+
/**
|
|
39
|
+
* Format and display tool execution start.
|
|
40
|
+
*/
|
|
41
|
+
displayToolExecutionStart(toolName: string): void;
|
|
42
|
+
/**
|
|
43
|
+
* Format and display tool execution end.
|
|
44
|
+
*/
|
|
45
|
+
displayToolExecutionEnd(toolName: string, duration: number): void;
|
|
46
|
+
/**
|
|
47
|
+
* Format and display tool execution result.
|
|
48
|
+
*/
|
|
49
|
+
displayToolResult(toolName: string, result: unknown): void;
|
|
50
|
+
/**
|
|
51
|
+
* Format and display tool execution error.
|
|
52
|
+
*/
|
|
53
|
+
displayToolError(toolName: string, error: string): void;
|
|
54
|
+
/**
|
|
55
|
+
* Format and display LLM response.
|
|
56
|
+
*/
|
|
57
|
+
displayLLMResponse(llmProvider: string, response: string): void;
|
|
58
|
+
/**
|
|
59
|
+
* Format and display session summary.
|
|
60
|
+
*/
|
|
61
|
+
displaySessionSummary(state: DevSessionState): void;
|
|
62
|
+
/**
|
|
63
|
+
* Format and display available tools list.
|
|
64
|
+
*/
|
|
65
|
+
displayToolsList(tools: Array<{
|
|
66
|
+
name: string;
|
|
67
|
+
description?: string;
|
|
68
|
+
}>): void;
|
|
69
|
+
/**
|
|
70
|
+
* Format and display welcome message.
|
|
71
|
+
*/
|
|
72
|
+
displayWelcomeMessage(): void;
|
|
73
|
+
/**
|
|
74
|
+
* Format and display server log message.
|
|
75
|
+
*/
|
|
76
|
+
displayServerLog(type: 'stdout' | 'stderr', message: string): void;
|
|
77
|
+
/**
|
|
78
|
+
* Format and display error message.
|
|
79
|
+
*/
|
|
80
|
+
displayError(message: string): void;
|
|
81
|
+
/**
|
|
82
|
+
* Format and display info message.
|
|
83
|
+
*/
|
|
84
|
+
displayInfo(message: string): void;
|
|
85
|
+
/**
|
|
86
|
+
* Format JSON for display.
|
|
87
|
+
*/
|
|
88
|
+
formatJSON(obj: unknown): string;
|
|
89
|
+
/**
|
|
90
|
+
* Truncate text if it's too long.
|
|
91
|
+
*/
|
|
92
|
+
truncate(text: string, maxLength?: number): string;
|
|
93
|
+
}
|
|
94
|
+
//# sourceMappingURL=formatter.d.ts.map
|
|
@@ -0,0 +1,236 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Output formatter for Dev Mode.
|
|
3
|
+
* Formats all output for developer-friendly display.
|
|
4
|
+
*/
|
|
5
|
+
import { Icons, Labels } from '../../constants/index.js';
|
|
6
|
+
import { log } from '../../utils/logger.js';
|
|
7
|
+
/**
|
|
8
|
+
* Dev Mode output formatter.
|
|
9
|
+
*/
|
|
10
|
+
export class DevFormatter {
|
|
11
|
+
options;
|
|
12
|
+
constructor(options = {}) {
|
|
13
|
+
this.options = options;
|
|
14
|
+
this.options.useColors = options.useColors ?? true;
|
|
15
|
+
this.options.truncateLongOutputs = options.truncateLongOutputs ?? true;
|
|
16
|
+
this.options.maxOutputLength = options.maxOutputLength ?? 500;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Format and display the dev mode header.
|
|
20
|
+
*/
|
|
21
|
+
displayHeader(version, transport, mcpUrl, command, llmProvider, toolCount) {
|
|
22
|
+
log.blank();
|
|
23
|
+
log.success(`${Icons.SUCCESS} Syrin Version: ${version}`);
|
|
24
|
+
log.blank();
|
|
25
|
+
log.plain(`${Labels.TRANSPORT_LAYER}: ${transport}`);
|
|
26
|
+
if (transport === 'http' && mcpUrl) {
|
|
27
|
+
log.plain(`${Labels.MCP_URL}: ${mcpUrl} ${Icons.CHECK} (working)`);
|
|
28
|
+
}
|
|
29
|
+
else if (transport === 'stdio' && command) {
|
|
30
|
+
log.plain(`${Labels.COMMAND}: ${command} ${Icons.CHECK} (working)`);
|
|
31
|
+
}
|
|
32
|
+
log.plain(`LLM: ${llmProvider}`);
|
|
33
|
+
log.blank();
|
|
34
|
+
log.plain(`Total Tools: ${toolCount}`);
|
|
35
|
+
log.blank();
|
|
36
|
+
}
|
|
37
|
+
/**
|
|
38
|
+
* Format and display user input.
|
|
39
|
+
*/
|
|
40
|
+
displayUserInput(input) {
|
|
41
|
+
log.blank();
|
|
42
|
+
log.success(`${Icons.SUCCESS} User > ${input}`);
|
|
43
|
+
log.blank();
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* Format and display detected tool calls.
|
|
47
|
+
*/
|
|
48
|
+
displayToolDetection(toolCalls) {
|
|
49
|
+
if (toolCalls.length === 0) {
|
|
50
|
+
return;
|
|
51
|
+
}
|
|
52
|
+
for (const toolCall of toolCalls) {
|
|
53
|
+
log.plain(`Detected Tool: ${toolCall.name}`);
|
|
54
|
+
log.plain('Detected Arguments:');
|
|
55
|
+
log.plain(JSON.stringify(toolCall.arguments, null, 2));
|
|
56
|
+
log.blank();
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
/**
|
|
60
|
+
* Format and display tool execution start.
|
|
61
|
+
*/
|
|
62
|
+
displayToolExecutionStart(toolName) {
|
|
63
|
+
const timestamp = new Date().toLocaleString('en-GB', {
|
|
64
|
+
day: '2-digit',
|
|
65
|
+
month: '2-digit',
|
|
66
|
+
year: 'numeric',
|
|
67
|
+
hour: '2-digit',
|
|
68
|
+
minute: '2-digit',
|
|
69
|
+
second: '2-digit',
|
|
70
|
+
});
|
|
71
|
+
log.plain(`Calling Tool (${toolName})`);
|
|
72
|
+
log.blank();
|
|
73
|
+
log.plain(`Tool Logs (${toolName}):`);
|
|
74
|
+
log.plain(`[${timestamp} > ${toolName}] Tool calling started!`);
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Format and display tool execution end.
|
|
78
|
+
*/
|
|
79
|
+
displayToolExecutionEnd(toolName, duration) {
|
|
80
|
+
const timestamp = new Date().toLocaleString('en-GB', {
|
|
81
|
+
day: '2-digit',
|
|
82
|
+
month: '2-digit',
|
|
83
|
+
year: 'numeric',
|
|
84
|
+
hour: '2-digit',
|
|
85
|
+
minute: '2-digit',
|
|
86
|
+
second: '2-digit',
|
|
87
|
+
});
|
|
88
|
+
log.plain(`[${timestamp} > ${toolName}] Tool calling ended! (${duration}ms)`);
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* Format and display tool execution result.
|
|
92
|
+
*/
|
|
93
|
+
displayToolResult(toolName, result) {
|
|
94
|
+
log.blank();
|
|
95
|
+
log.plain(`Returned Tool Response (${toolName}):`);
|
|
96
|
+
let resultText;
|
|
97
|
+
if (typeof result === 'string') {
|
|
98
|
+
resultText = result;
|
|
99
|
+
}
|
|
100
|
+
else if (result && typeof result === 'object') {
|
|
101
|
+
// Check if it's a preview result
|
|
102
|
+
if ('preview' in result && result.preview) {
|
|
103
|
+
resultText = JSON.stringify(result, null, 2);
|
|
104
|
+
}
|
|
105
|
+
else {
|
|
106
|
+
resultText = JSON.stringify(result, null, 2);
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
else {
|
|
110
|
+
resultText = String(result);
|
|
111
|
+
}
|
|
112
|
+
// Truncate if needed
|
|
113
|
+
if (this.options.truncateLongOutputs &&
|
|
114
|
+
resultText.length > this.options.maxOutputLength) {
|
|
115
|
+
resultText =
|
|
116
|
+
resultText.substring(0, this.options.maxOutputLength) +
|
|
117
|
+
'\n... (truncated)';
|
|
118
|
+
}
|
|
119
|
+
log.plain(resultText);
|
|
120
|
+
log.blank();
|
|
121
|
+
}
|
|
122
|
+
/**
|
|
123
|
+
* Format and display tool execution error.
|
|
124
|
+
*/
|
|
125
|
+
displayToolError(toolName, error) {
|
|
126
|
+
log.blank();
|
|
127
|
+
log.error(`Tool Execution Error (${toolName}):`);
|
|
128
|
+
log.plain(error);
|
|
129
|
+
log.blank();
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* Format and display LLM response.
|
|
133
|
+
*/
|
|
134
|
+
displayLLMResponse(llmProvider, response) {
|
|
135
|
+
log.blank();
|
|
136
|
+
log.success(`${Icons.SUCCESS} LLM Response (${llmProvider}):`);
|
|
137
|
+
// Split response into lines for better readability
|
|
138
|
+
const lines = response.split('\n');
|
|
139
|
+
for (const line of lines) {
|
|
140
|
+
log.plain(line);
|
|
141
|
+
}
|
|
142
|
+
log.blank();
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Format and display session summary.
|
|
146
|
+
*/
|
|
147
|
+
displaySessionSummary(state) {
|
|
148
|
+
const duration = Date.now() - state.startTime.getTime();
|
|
149
|
+
const durationSeconds = (duration / 1000).toFixed(2);
|
|
150
|
+
log.blank();
|
|
151
|
+
log.plain('─'.repeat(60));
|
|
152
|
+
log.plain('Session Summary:');
|
|
153
|
+
log.plain(` Duration: ${durationSeconds}s`);
|
|
154
|
+
log.plain(` Total Tool Calls: ${state.totalToolCalls}`);
|
|
155
|
+
log.plain(` Total LLM Calls: ${state.totalLLMCalls}`);
|
|
156
|
+
log.plain('─'.repeat(60));
|
|
157
|
+
log.blank();
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Format and display available tools list.
|
|
161
|
+
*/
|
|
162
|
+
displayToolsList(tools) {
|
|
163
|
+
log.blank();
|
|
164
|
+
log.plain('Available Tools:');
|
|
165
|
+
log.plain('─'.repeat(60));
|
|
166
|
+
if (tools.length === 0) {
|
|
167
|
+
log.warning(` ${Icons.WARNING} No tools available`);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
for (const tool of tools) {
|
|
171
|
+
log.plain(` ${Icons.CHECK} ${tool.name}`);
|
|
172
|
+
if (tool.description) {
|
|
173
|
+
log.plain(` ${tool.description}`);
|
|
174
|
+
}
|
|
175
|
+
}
|
|
176
|
+
log.blank();
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Format and display welcome message.
|
|
180
|
+
*/
|
|
181
|
+
displayWelcomeMessage() {
|
|
182
|
+
log.blank();
|
|
183
|
+
log.success(`${Icons.SUCCESS} Syrin's Dev Mode Entered. Talk to the LLM Now!`);
|
|
184
|
+
log.blank();
|
|
185
|
+
}
|
|
186
|
+
/**
|
|
187
|
+
* Format and display server log message.
|
|
188
|
+
*/
|
|
189
|
+
displayServerLog(type, message) {
|
|
190
|
+
const label = type === 'stderr' ? '[Server Error]' : '[Server]';
|
|
191
|
+
if (type === 'stderr') {
|
|
192
|
+
log.error(`${label} ${message}`);
|
|
193
|
+
}
|
|
194
|
+
else {
|
|
195
|
+
log.info(`${label} ${message}`);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
/**
|
|
199
|
+
* Format and display error message.
|
|
200
|
+
*/
|
|
201
|
+
displayError(message) {
|
|
202
|
+
log.blank();
|
|
203
|
+
log.error(message);
|
|
204
|
+
log.blank();
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* Format and display info message.
|
|
208
|
+
*/
|
|
209
|
+
displayInfo(message) {
|
|
210
|
+
log.blank();
|
|
211
|
+
log.info(message);
|
|
212
|
+
log.blank();
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Format JSON for display.
|
|
216
|
+
*/
|
|
217
|
+
formatJSON(obj) {
|
|
218
|
+
try {
|
|
219
|
+
return JSON.stringify(obj, null, 2);
|
|
220
|
+
}
|
|
221
|
+
catch {
|
|
222
|
+
return String(obj);
|
|
223
|
+
}
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Truncate text if it's too long.
|
|
227
|
+
*/
|
|
228
|
+
truncate(text, maxLength) {
|
|
229
|
+
const length = maxLength || this.options.maxOutputLength || 500;
|
|
230
|
+
if (text.length <= length) {
|
|
231
|
+
return text;
|
|
232
|
+
}
|
|
233
|
+
return text.substring(0, length) + '\n... (truncated)';
|
|
234
|
+
}
|
|
235
|
+
}
|
|
236
|
+
//# sourceMappingURL=formatter.js.map
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Interactive REPL (Read-Eval-Print Loop) for Dev Mode.
|
|
3
|
+
* Provides command-line interface with history, autocomplete, and navigation.
|
|
4
|
+
*/
|
|
5
|
+
import type { EventEmitter } from '../../events/emitter.js';
|
|
6
|
+
/**
|
|
7
|
+
* REPL options.
|
|
8
|
+
*/
|
|
9
|
+
export interface REPLOptions {
|
|
10
|
+
/** Prompt prefix (e.g., "User > ") */
|
|
11
|
+
prompt?: string;
|
|
12
|
+
/** Whether to save history to file */
|
|
13
|
+
saveHistory?: boolean;
|
|
14
|
+
/** History file path */
|
|
15
|
+
historyFile?: string;
|
|
16
|
+
/** Maximum history size */
|
|
17
|
+
maxHistorySize?: number;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* REPL special commands.
|
|
21
|
+
*/
|
|
22
|
+
export declare enum REPLCommand {
|
|
23
|
+
EXIT = "/exit",
|
|
24
|
+
QUIT = "/quit",
|
|
25
|
+
CLEAR = "/clear",
|
|
26
|
+
HELP = "/help",
|
|
27
|
+
HISTORY = "/history",
|
|
28
|
+
TOOLS = "/tools"
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* Interactive REPL implementation.
|
|
32
|
+
*/
|
|
33
|
+
export declare class InteractiveREPL {
|
|
34
|
+
private readonly options;
|
|
35
|
+
private readonly eventEmitter?;
|
|
36
|
+
private rl;
|
|
37
|
+
private history;
|
|
38
|
+
private historyIndex;
|
|
39
|
+
private currentInput;
|
|
40
|
+
private readonly maxHistorySize;
|
|
41
|
+
constructor(options?: REPLOptions, eventEmitter?: EventEmitter | undefined);
|
|
42
|
+
/**
|
|
43
|
+
* Start the REPL.
|
|
44
|
+
* @param onInput - Callback for user input
|
|
45
|
+
* @param onClose - Callback for REPL close (can be async)
|
|
46
|
+
*/
|
|
47
|
+
start(onInput: (input: string) => Promise<void> | void, onClose?: () => void | Promise<void>): void;
|
|
48
|
+
/**
|
|
49
|
+
* Load history into readline for arrow key navigation.
|
|
50
|
+
*/
|
|
51
|
+
private loadHistoryIntoReadline;
|
|
52
|
+
/**
|
|
53
|
+
* Stop the REPL.
|
|
54
|
+
*/
|
|
55
|
+
stop(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Set a new prompt.
|
|
58
|
+
*/
|
|
59
|
+
setPrompt(prompt: string): void;
|
|
60
|
+
/**
|
|
61
|
+
* Write output to the console.
|
|
62
|
+
*/
|
|
63
|
+
write(message: string): void;
|
|
64
|
+
/**
|
|
65
|
+
* Write a line to the console.
|
|
66
|
+
*/
|
|
67
|
+
writeLine(message: string): void;
|
|
68
|
+
/**
|
|
69
|
+
* Clear the current line.
|
|
70
|
+
*/
|
|
71
|
+
clearLine(): void;
|
|
72
|
+
/**
|
|
73
|
+
* Get history.
|
|
74
|
+
*/
|
|
75
|
+
getHistory(): string[];
|
|
76
|
+
/**
|
|
77
|
+
* Clear history.
|
|
78
|
+
*/
|
|
79
|
+
clearHistory(): void;
|
|
80
|
+
/**
|
|
81
|
+
* Setup event handlers for history navigation.
|
|
82
|
+
* Note: readline handles arrow keys automatically, but we can enhance it.
|
|
83
|
+
*/
|
|
84
|
+
private setupEventHandlers;
|
|
85
|
+
/**
|
|
86
|
+
* Handle special REPL commands.
|
|
87
|
+
*/
|
|
88
|
+
private handleSpecialCommand;
|
|
89
|
+
/**
|
|
90
|
+
* Show help message.
|
|
91
|
+
*/
|
|
92
|
+
private showHelp;
|
|
93
|
+
/**
|
|
94
|
+
* Show command history.
|
|
95
|
+
*/
|
|
96
|
+
private showHistory;
|
|
97
|
+
/**
|
|
98
|
+
* Add input to history.
|
|
99
|
+
*/
|
|
100
|
+
private addToHistory;
|
|
101
|
+
/**
|
|
102
|
+
* Load history from file.
|
|
103
|
+
*/
|
|
104
|
+
private loadHistory;
|
|
105
|
+
/**
|
|
106
|
+
* Save history to file.
|
|
107
|
+
*/
|
|
108
|
+
private saveHistory;
|
|
109
|
+
/**
|
|
110
|
+
* Completer function for tab completion.
|
|
111
|
+
*/
|
|
112
|
+
private completer;
|
|
113
|
+
}
|
|
114
|
+
//# sourceMappingURL=repl.d.ts.map
|