@quantiya/codevibe-claude-plugin 1.0.13 → 1.0.15
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/.claude-plugin/plugin.json +1 -1
- package/node_modules/@quantiya/codevibe-core/README.md +179 -0
- package/node_modules/@quantiya/codevibe-core/bin/codevibe.js +7 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +132 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/index.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +16 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-cli.d.ts +5 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-service.d.ts +87 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/fetch-helpers.d.ts +11 -0
- package/node_modules/@quantiya/codevibe-core/dist/auth/index.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/config/config.d.ts +53 -0
- package/node_modules/@quantiya/codevibe-core/dist/config/index.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/crypto/crypto-service.d.ts +118 -0
- package/node_modules/@quantiya/codevibe-core/dist/crypto/index.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +14 -0
- package/node_modules/@quantiya/codevibe-core/dist/index.js +220 -0
- package/node_modules/@quantiya/codevibe-core/dist/keychain/index.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-backend.d.ts +3 -0
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +139 -0
- package/node_modules/@quantiya/codevibe-core/dist/logger/index.d.ts +1 -0
- package/node_modules/@quantiya/codevibe-core/dist/logger/logger.d.ts +35 -0
- package/node_modules/@quantiya/codevibe-core/dist/prompt-parser.d.ts +39 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/index.d.ts +2 -0
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +55 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/auth.d.ts +15 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/encryption.d.ts +54 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +74 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/index.d.ts +4 -0
- package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +59 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CHANGELOG.md +274 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CONTRIBUTING.md +18 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/LICENSE.md +9 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/README.md +466 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/bin/uuid +2 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/index.js +79 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/md5.js +223 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/native.js +11 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/nil.js +8 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/parse.js +45 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/regex.js +8 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/rng.js +25 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/sha1.js +104 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/stringify.js +44 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v1.js +107 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v3.js +16 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v35.js +80 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v4.js +43 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v5.js +16 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/validate.js +17 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/version.js +21 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/index.js +9 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/md5.js +215 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/native.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/nil.js +1 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/parse.js +35 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/regex.js +1 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/rng.js +18 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/sha1.js +96 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/stringify.js +33 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v1.js +95 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v3.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v35.js +66 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v4.js +29 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v5.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/validate.js +7 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/version.js +11 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/index.js +9 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/md5.js +13 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/native.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/nil.js +1 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/parse.js +35 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/regex.js +1 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/rng.js +12 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/sha1.js +13 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/stringify.js +33 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v1.js +95 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v3.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v35.js +66 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v4.js +29 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v5.js +4 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/validate.js +7 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/version.js +11 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/index.js +79 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5-browser.js +223 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5.js +23 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native-browser.js +11 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native.js +15 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/nil.js +8 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/parse.js +45 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/regex.js +8 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng-browser.js +25 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng.js +24 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1-browser.js +104 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1.js +23 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/stringify.js +44 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/uuid-bin.js +85 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v1.js +107 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v3.js +16 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v35.js +80 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v4.js +43 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v5.js +16 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/validate.js +17 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/version.js +21 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/package.json +135 -0
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/wrapper.mjs +10 -0
- package/node_modules/@quantiya/codevibe-core/package.json +56 -0
- package/node_modules/base64-js/LICENSE +21 -0
- package/node_modules/base64-js/README.md +34 -0
- package/node_modules/base64-js/base64js.min.js +1 -0
- package/node_modules/base64-js/index.d.ts +3 -0
- package/node_modules/base64-js/index.js +150 -0
- package/node_modules/base64-js/package.json +47 -0
- package/node_modules/bl/.travis.yml +17 -0
- package/node_modules/bl/BufferList.js +396 -0
- package/node_modules/bl/LICENSE.md +13 -0
- package/node_modules/bl/README.md +247 -0
- package/node_modules/bl/bl.js +84 -0
- package/node_modules/bl/package.json +37 -0
- package/node_modules/bl/test/convert.js +21 -0
- package/node_modules/bl/test/indexOf.js +492 -0
- package/node_modules/bl/test/isBufferList.js +32 -0
- package/node_modules/bl/test/test.js +869 -0
- package/node_modules/buffer/AUTHORS.md +70 -0
- package/node_modules/buffer/LICENSE +21 -0
- package/node_modules/buffer/README.md +410 -0
- package/node_modules/buffer/index.d.ts +186 -0
- package/node_modules/buffer/index.js +1817 -0
- package/node_modules/buffer/package.json +96 -0
- package/node_modules/chownr/LICENSE +15 -0
- package/node_modules/chownr/README.md +3 -0
- package/node_modules/chownr/chownr.js +167 -0
- package/node_modules/chownr/package.json +29 -0
- package/node_modules/decompress-response/index.d.ts +22 -0
- package/node_modules/decompress-response/index.js +58 -0
- package/node_modules/decompress-response/license +9 -0
- package/node_modules/decompress-response/package.json +56 -0
- package/node_modules/decompress-response/readme.md +48 -0
- package/node_modules/deep-extend/CHANGELOG.md +46 -0
- package/node_modules/deep-extend/LICENSE +20 -0
- package/node_modules/deep-extend/README.md +91 -0
- package/node_modules/deep-extend/index.js +1 -0
- package/node_modules/deep-extend/lib/deep-extend.js +150 -0
- package/node_modules/deep-extend/package.json +62 -0
- package/node_modules/detect-libc/LICENSE +201 -0
- package/node_modules/detect-libc/README.md +163 -0
- package/node_modules/detect-libc/index.d.ts +14 -0
- package/node_modules/detect-libc/lib/detect-libc.js +313 -0
- package/node_modules/detect-libc/lib/elf.js +39 -0
- package/node_modules/detect-libc/lib/filesystem.js +51 -0
- package/node_modules/detect-libc/lib/process.js +24 -0
- package/node_modules/detect-libc/package.json +44 -0
- package/node_modules/end-of-stream/LICENSE +21 -0
- package/node_modules/end-of-stream/README.md +54 -0
- package/node_modules/end-of-stream/index.js +96 -0
- package/node_modules/end-of-stream/package.json +37 -0
- package/node_modules/expand-template/.travis.yml +6 -0
- package/node_modules/expand-template/LICENSE +21 -0
- package/node_modules/expand-template/README.md +43 -0
- package/node_modules/expand-template/index.js +26 -0
- package/node_modules/expand-template/package.json +29 -0
- package/node_modules/expand-template/test.js +67 -0
- package/node_modules/fs-constants/LICENSE +21 -0
- package/node_modules/fs-constants/README.md +26 -0
- package/node_modules/fs-constants/browser.js +1 -0
- package/node_modules/fs-constants/index.js +1 -0
- package/node_modules/fs-constants/package.json +19 -0
- package/node_modules/github-from-package/.travis.yml +4 -0
- package/node_modules/github-from-package/LICENSE +18 -0
- package/node_modules/github-from-package/example/package.json +8 -0
- package/node_modules/github-from-package/example/url.js +3 -0
- package/node_modules/github-from-package/index.js +17 -0
- package/node_modules/github-from-package/package.json +30 -0
- package/node_modules/github-from-package/readme.markdown +53 -0
- package/node_modules/github-from-package/test/a.json +8 -0
- package/node_modules/github-from-package/test/b.json +5 -0
- package/node_modules/github-from-package/test/c.json +5 -0
- package/node_modules/github-from-package/test/d.json +7 -0
- package/node_modules/github-from-package/test/e.json +5 -0
- package/node_modules/github-from-package/test/url.js +19 -0
- package/node_modules/ieee754/LICENSE +11 -0
- package/node_modules/ieee754/README.md +51 -0
- package/node_modules/ieee754/index.d.ts +10 -0
- package/node_modules/ieee754/index.js +85 -0
- package/node_modules/ieee754/package.json +52 -0
- package/node_modules/ini/LICENSE +15 -0
- package/node_modules/ini/README.md +102 -0
- package/node_modules/ini/ini.js +206 -0
- package/node_modules/ini/package.json +33 -0
- package/node_modules/keytar/LICENSE.md +20 -0
- package/node_modules/keytar/README.md +94 -0
- package/node_modules/keytar/binding.gyp +66 -0
- package/node_modules/keytar/build/Release/keytar.node +0 -0
- package/node_modules/keytar/keytar.d.ts +51 -0
- package/node_modules/keytar/lib/keytar.js +43 -0
- package/node_modules/keytar/package.json +66 -0
- package/node_modules/keytar/src/async.cc +242 -0
- package/node_modules/keytar/src/async.h +103 -0
- package/node_modules/keytar/src/credentials.h +13 -0
- package/node_modules/keytar/src/keytar.h +41 -0
- package/node_modules/keytar/src/keytar_mac.cc +296 -0
- package/node_modules/keytar/src/keytar_posix.cc +184 -0
- package/node_modules/keytar/src/keytar_win.cc +272 -0
- package/node_modules/keytar/src/main.cc +139 -0
- package/node_modules/mimic-response/index.d.ts +17 -0
- package/node_modules/mimic-response/index.js +77 -0
- package/node_modules/mimic-response/license +9 -0
- package/node_modules/mimic-response/package.json +42 -0
- package/node_modules/mimic-response/readme.md +78 -0
- package/node_modules/minimist/.eslintrc +29 -0
- package/node_modules/minimist/.github/FUNDING.yml +12 -0
- package/node_modules/minimist/.nycrc +14 -0
- package/node_modules/minimist/CHANGELOG.md +298 -0
- package/node_modules/minimist/LICENSE +18 -0
- package/node_modules/minimist/README.md +121 -0
- package/node_modules/minimist/example/parse.js +4 -0
- package/node_modules/minimist/index.js +263 -0
- package/node_modules/minimist/package.json +75 -0
- package/node_modules/minimist/test/all_bool.js +34 -0
- package/node_modules/minimist/test/bool.js +177 -0
- package/node_modules/minimist/test/dash.js +43 -0
- package/node_modules/minimist/test/default_bool.js +37 -0
- package/node_modules/minimist/test/dotted.js +24 -0
- package/node_modules/minimist/test/kv_short.js +32 -0
- package/node_modules/minimist/test/long.js +33 -0
- package/node_modules/minimist/test/num.js +38 -0
- package/node_modules/minimist/test/parse.js +209 -0
- package/node_modules/minimist/test/parse_modified.js +11 -0
- package/node_modules/minimist/test/proto.js +64 -0
- package/node_modules/minimist/test/short.js +69 -0
- package/node_modules/minimist/test/stop_early.js +17 -0
- package/node_modules/minimist/test/unknown.js +104 -0
- package/node_modules/minimist/test/whitespace.js +10 -0
- package/node_modules/mkdirp-classic/LICENSE +21 -0
- package/node_modules/mkdirp-classic/README.md +18 -0
- package/node_modules/mkdirp-classic/index.js +98 -0
- package/node_modules/mkdirp-classic/package.json +18 -0
- package/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +31 -0
- package/node_modules/napi-build-utils/LICENSE +21 -0
- package/node_modules/napi-build-utils/README.md +52 -0
- package/node_modules/napi-build-utils/index.js +214 -0
- package/node_modules/napi-build-utils/index.md +0 -0
- package/node_modules/napi-build-utils/package.json +42 -0
- package/node_modules/node-abi/LICENSE +21 -0
- package/node_modules/node-abi/README.md +54 -0
- package/node_modules/node-abi/abi_registry.json +439 -0
- package/node_modules/node-abi/index.js +179 -0
- package/node_modules/node-abi/package.json +45 -0
- package/node_modules/node-addon-api/LICENSE.md +13 -0
- package/node_modules/node-addon-api/README.md +293 -0
- package/node_modules/node-addon-api/common.gypi +21 -0
- package/node_modules/node-addon-api/except.gypi +25 -0
- package/node_modules/node-addon-api/index.js +11 -0
- package/node_modules/node-addon-api/napi-inl.deprecated.h +192 -0
- package/node_modules/node-addon-api/napi-inl.h +6209 -0
- package/node_modules/node-addon-api/napi.h +2983 -0
- package/node_modules/node-addon-api/node_api.gyp +9 -0
- package/node_modules/node-addon-api/noexcept.gypi +26 -0
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +21 -0
- package/node_modules/node-addon-api/package.json +399 -0
- package/node_modules/node-addon-api/tools/README.md +73 -0
- package/node_modules/node-addon-api/tools/check-napi.js +100 -0
- package/node_modules/node-addon-api/tools/clang-format.js +68 -0
- package/node_modules/node-addon-api/tools/conversion.js +309 -0
- package/node_modules/node-addon-api/tools/eslint-format.js +71 -0
- package/node_modules/prebuild-install/CHANGELOG.md +131 -0
- package/node_modules/prebuild-install/CONTRIBUTING.md +6 -0
- package/node_modules/prebuild-install/LICENSE +21 -0
- package/node_modules/prebuild-install/README.md +163 -0
- package/node_modules/prebuild-install/asset.js +44 -0
- package/node_modules/prebuild-install/bin.js +78 -0
- package/node_modules/prebuild-install/download.js +142 -0
- package/node_modules/prebuild-install/error.js +14 -0
- package/node_modules/prebuild-install/help.txt +16 -0
- package/node_modules/prebuild-install/index.js +1 -0
- package/node_modules/prebuild-install/log.js +33 -0
- package/node_modules/prebuild-install/package.json +67 -0
- package/node_modules/prebuild-install/proxy.js +35 -0
- package/node_modules/prebuild-install/rc.js +64 -0
- package/node_modules/prebuild-install/util.js +143 -0
- package/node_modules/pump/.github/FUNDING.yml +2 -0
- package/node_modules/pump/.travis.yml +5 -0
- package/node_modules/pump/LICENSE +21 -0
- package/node_modules/pump/README.md +74 -0
- package/node_modules/pump/SECURITY.md +5 -0
- package/node_modules/pump/empty.js +1 -0
- package/node_modules/pump/index.js +86 -0
- package/node_modules/pump/package.json +30 -0
- package/node_modules/pump/test-browser.js +66 -0
- package/node_modules/pump/test-node.js +53 -0
- package/node_modules/rc/LICENSE.APACHE2 +15 -0
- package/node_modules/rc/LICENSE.BSD +26 -0
- package/node_modules/rc/LICENSE.MIT +24 -0
- package/node_modules/rc/README.md +227 -0
- package/node_modules/rc/browser.js +7 -0
- package/node_modules/rc/cli.js +4 -0
- package/node_modules/rc/index.js +53 -0
- package/node_modules/rc/lib/utils.js +104 -0
- package/node_modules/rc/package.json +29 -0
- package/node_modules/rc/test/ini.js +16 -0
- package/node_modules/rc/test/nested-env-vars.js +50 -0
- package/node_modules/rc/test/test.js +59 -0
- package/node_modules/readable-stream/CONTRIBUTING.md +38 -0
- package/node_modules/readable-stream/GOVERNANCE.md +136 -0
- package/node_modules/readable-stream/LICENSE +47 -0
- package/node_modules/readable-stream/README.md +106 -0
- package/node_modules/readable-stream/errors-browser.js +127 -0
- package/node_modules/readable-stream/errors.js +116 -0
- package/node_modules/readable-stream/experimentalWarning.js +17 -0
- package/node_modules/readable-stream/lib/_stream_duplex.js +126 -0
- package/node_modules/readable-stream/lib/_stream_passthrough.js +37 -0
- package/node_modules/readable-stream/lib/_stream_readable.js +1027 -0
- package/node_modules/readable-stream/lib/_stream_transform.js +190 -0
- package/node_modules/readable-stream/lib/_stream_writable.js +641 -0
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +180 -0
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +183 -0
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +96 -0
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +3 -0
- package/node_modules/readable-stream/lib/internal/streams/from.js +52 -0
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +86 -0
- package/node_modules/readable-stream/lib/internal/streams/state.js +22 -0
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +1 -0
- package/node_modules/readable-stream/lib/internal/streams/stream.js +1 -0
- package/node_modules/readable-stream/package.json +68 -0
- package/node_modules/readable-stream/readable-browser.js +9 -0
- package/node_modules/readable-stream/readable.js +16 -0
- package/node_modules/safe-buffer/LICENSE +21 -0
- package/node_modules/safe-buffer/README.md +584 -0
- package/node_modules/safe-buffer/index.d.ts +187 -0
- package/node_modules/safe-buffer/index.js +65 -0
- package/node_modules/safe-buffer/package.json +51 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +665 -0
- package/node_modules/semver/bin/semver.js +191 -0
- package/node_modules/semver/classes/comparator.js +143 -0
- package/node_modules/semver/classes/index.js +7 -0
- package/node_modules/semver/classes/range.js +557 -0
- package/node_modules/semver/classes/semver.js +333 -0
- package/node_modules/semver/functions/clean.js +8 -0
- package/node_modules/semver/functions/cmp.js +54 -0
- package/node_modules/semver/functions/coerce.js +62 -0
- package/node_modules/semver/functions/compare-build.js +9 -0
- package/node_modules/semver/functions/compare-loose.js +5 -0
- package/node_modules/semver/functions/compare.js +7 -0
- package/node_modules/semver/functions/diff.js +60 -0
- package/node_modules/semver/functions/eq.js +5 -0
- package/node_modules/semver/functions/gt.js +5 -0
- package/node_modules/semver/functions/gte.js +5 -0
- package/node_modules/semver/functions/inc.js +21 -0
- package/node_modules/semver/functions/lt.js +5 -0
- package/node_modules/semver/functions/lte.js +5 -0
- package/node_modules/semver/functions/major.js +5 -0
- package/node_modules/semver/functions/minor.js +5 -0
- package/node_modules/semver/functions/neq.js +5 -0
- package/node_modules/semver/functions/parse.js +18 -0
- package/node_modules/semver/functions/patch.js +5 -0
- package/node_modules/semver/functions/prerelease.js +8 -0
- package/node_modules/semver/functions/rcompare.js +5 -0
- package/node_modules/semver/functions/rsort.js +5 -0
- package/node_modules/semver/functions/satisfies.js +12 -0
- package/node_modules/semver/functions/sort.js +5 -0
- package/node_modules/semver/functions/valid.js +8 -0
- package/node_modules/semver/index.js +91 -0
- package/node_modules/semver/internal/constants.js +37 -0
- package/node_modules/semver/internal/debug.js +11 -0
- package/node_modules/semver/internal/identifiers.js +29 -0
- package/node_modules/semver/internal/lrucache.js +42 -0
- package/node_modules/semver/internal/parse-options.js +17 -0
- package/node_modules/semver/internal/re.js +223 -0
- package/node_modules/semver/package.json +78 -0
- package/node_modules/semver/preload.js +4 -0
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/ranges/gtr.js +6 -0
- package/node_modules/semver/ranges/intersects.js +9 -0
- package/node_modules/semver/ranges/ltr.js +6 -0
- package/node_modules/semver/ranges/max-satisfying.js +27 -0
- package/node_modules/semver/ranges/min-satisfying.js +26 -0
- package/node_modules/semver/ranges/min-version.js +63 -0
- package/node_modules/semver/ranges/outside.js +82 -0
- package/node_modules/semver/ranges/simplify.js +49 -0
- package/node_modules/semver/ranges/subset.js +249 -0
- package/node_modules/semver/ranges/to-comparators.js +10 -0
- package/node_modules/semver/ranges/valid.js +13 -0
- package/node_modules/simple-concat/.travis.yml +3 -0
- package/node_modules/simple-concat/LICENSE +20 -0
- package/node_modules/simple-concat/README.md +44 -0
- package/node_modules/simple-concat/index.js +15 -0
- package/node_modules/simple-concat/package.json +47 -0
- package/node_modules/simple-concat/test/basic.js +41 -0
- package/node_modules/simple-get/.github/dependabot.yml +15 -0
- package/node_modules/simple-get/.github/workflows/ci.yml +23 -0
- package/node_modules/simple-get/LICENSE +20 -0
- package/node_modules/simple-get/README.md +333 -0
- package/node_modules/simple-get/index.js +108 -0
- package/node_modules/simple-get/package.json +67 -0
- package/node_modules/string_decoder/LICENSE +48 -0
- package/node_modules/string_decoder/README.md +47 -0
- package/node_modules/string_decoder/lib/string_decoder.js +296 -0
- package/node_modules/string_decoder/package.json +34 -0
- package/node_modules/strip-json-comments/index.js +70 -0
- package/node_modules/strip-json-comments/license +21 -0
- package/node_modules/strip-json-comments/package.json +42 -0
- package/node_modules/strip-json-comments/readme.md +64 -0
- package/node_modules/tar-fs/.travis.yml +6 -0
- package/node_modules/tar-fs/LICENSE +21 -0
- package/node_modules/tar-fs/README.md +165 -0
- package/node_modules/tar-fs/index.js +363 -0
- package/node_modules/tar-fs/package.json +41 -0
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +1 -0
- package/node_modules/tar-fs/test/fixtures/d/file1 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/file2 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-dir/file5 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file3 +0 -0
- package/node_modules/tar-fs/test/fixtures/d/sub-files/file4 +0 -0
- package/node_modules/tar-fs/test/fixtures/e/directory/.ignore +0 -0
- package/node_modules/tar-fs/test/fixtures/e/file +0 -0
- package/node_modules/tar-fs/test/fixtures/invalid.tar +0 -0
- package/node_modules/tar-fs/test/index.js +346 -0
- package/node_modules/tar-stream/LICENSE +21 -0
- package/node_modules/tar-stream/README.md +168 -0
- package/node_modules/tar-stream/extract.js +257 -0
- package/node_modules/tar-stream/headers.js +295 -0
- package/node_modules/tar-stream/index.js +2 -0
- package/node_modules/tar-stream/pack.js +255 -0
- package/node_modules/tar-stream/package.json +58 -0
- package/node_modules/tar-stream/sandbox.js +11 -0
- package/node_modules/tunnel-agent/LICENSE +55 -0
- package/node_modules/tunnel-agent/README.md +4 -0
- package/node_modules/tunnel-agent/index.js +244 -0
- package/node_modules/tunnel-agent/package.json +22 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/package.json +3 -13
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codevibe-claude",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.15",
|
|
4
4
|
"description": "Sync Claude Code sessions with iOS mobile app via AWS backend. Control Claude Code from your phone with real-time bidirectional synchronization.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "CodeVibe Team"
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
# @quantiya/codevibe-core
|
|
2
|
+
|
|
3
|
+
Core library for CodeVibe plugins — shared keychain, crypto, AppSync, authentication, session lifecycle, and network-resilience functionality. Used by [`@quantiya/codevibe-claude-plugin`](https://www.npmjs.com/package/@quantiya/codevibe-claude-plugin), [`@quantiya/codevibe-gemini-plugin`](https://www.npmjs.com/package/@quantiya/codevibe-gemini-plugin), and [`@quantiya/codevibe-codex-plugin`](https://www.npmjs.com/package/@quantiya/codevibe-codex-plugin).
|
|
4
|
+
|
|
5
|
+
**Current version:** `1.0.3`
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
npm install @quantiya/codevibe-core
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Features
|
|
14
|
+
|
|
15
|
+
- **Keychain Management** — Secure storage for device keys and OAuth tokens using native keychain (macOS Keychain, Linux libsecret, Windows Credential Manager)
|
|
16
|
+
- **Cryptographic Services** — E2E encryption using ECDH P-256 and AES-256-GCM, with dedicated helpers for event content, metadata, and binary attachments
|
|
17
|
+
- **AppSync Client** — GraphQL API and WebSocket subscriptions for AWS AppSync, with automatic token refresh
|
|
18
|
+
- **Two-phase WebSocket reconnection** — exponential backoff (1s→60s) for 10 attempts, then persistent 5-minute retry indefinitely. Survives laptop sleep, network drops, DNS blips, and extended outages without ever giving up.
|
|
19
|
+
- **Session heartbeat system** — `startHeartbeat(sessionId)` sends `updateSession({ lastHeartbeatAt })` every 2 minutes so mobile clients can show desktop connectivity status (green/red dot with 5-minute staleness threshold)
|
|
20
|
+
- **Centralized session lifecycle** — `resumeOrCreateSession()` is the single source of truth for session fingerprint matching, reuse, and per-device ECDH session key distribution. Used identically by all three plugins.
|
|
21
|
+
- **WSL-aware networking** — auto-detects WSL via `/proc/sys/kernel/osrelease` and applies IPv4-first DNS ordering to work around broken WSL IPv6 stacks. Zero behavioral change on macOS, native Linux, and Windows.
|
|
22
|
+
- **Diagnostic fetch wrapper** — `fetchWithDiagnostics()` unpacks undici's generic "fetch failed" errors into detailed platform-specific messages (DNS failures, TLS clock skew, corporate MITM proxies, etc.) so failures are debuggable without trawling logs.
|
|
23
|
+
- **Cross-platform browser launcher** — `AuthService` opens the user's default browser during OAuth login via `wslview` → `cmd.exe` → `powershell.exe` → `xdg-open` fallback chain on Linux/WSL, native `open` on macOS, `cmd /c start` on Windows. Always prints the sign-in URL to stdout as a copy-paste fallback if automatic launching fails.
|
|
24
|
+
- **Authentication CLI** — Browser-based OAuth login/logout commands (Sign in with Apple / Sign in with Google via Cognito)
|
|
25
|
+
- **Prompt Parser** — Extracts numbered options from tmux pane snapshots so plugins can forward the exact options a CLI offers to mobile clients without hardcoding
|
|
26
|
+
- **Shared TypeScript types** — Events, sessions, attachments, encryption structures used across all plugins
|
|
27
|
+
|
|
28
|
+
## CLI Usage
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Sign in via browser (opens Cognito Hosted UI)
|
|
32
|
+
codevibe login
|
|
33
|
+
|
|
34
|
+
# Sign out
|
|
35
|
+
codevibe logout
|
|
36
|
+
|
|
37
|
+
# Check authentication status
|
|
38
|
+
codevibe status
|
|
39
|
+
|
|
40
|
+
# Reset device identity (destructive - old sessions become inaccessible)
|
|
41
|
+
codevibe reset-device
|
|
42
|
+
|
|
43
|
+
# Use specific environment
|
|
44
|
+
codevibe --env development login
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
## API Usage
|
|
48
|
+
|
|
49
|
+
### Keychain Manager
|
|
50
|
+
|
|
51
|
+
```typescript
|
|
52
|
+
import { keychainManager, DeviceIdentity } from '@quantiya/codevibe-core';
|
|
53
|
+
|
|
54
|
+
// Get or create device identity (stored in native keychain)
|
|
55
|
+
const identity = await keychainManager.getOrCreateDeviceIdentity();
|
|
56
|
+
console.log(identity.deviceId, identity.publicKey);
|
|
57
|
+
|
|
58
|
+
// Get OAuth tokens
|
|
59
|
+
const tokens = await keychainManager.getTokens('production');
|
|
60
|
+
if (tokens) {
|
|
61
|
+
console.log(tokens.email, tokens.userId);
|
|
62
|
+
}
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Crypto Service
|
|
66
|
+
|
|
67
|
+
```typescript
|
|
68
|
+
import { cryptoService } from '@quantiya/codevibe-core';
|
|
69
|
+
|
|
70
|
+
// Generate key pair
|
|
71
|
+
const keyPair = cryptoService.generateKeyPair();
|
|
72
|
+
|
|
73
|
+
// Generate session key
|
|
74
|
+
const sessionKey = cryptoService.generateSessionKey();
|
|
75
|
+
|
|
76
|
+
// Encrypt content
|
|
77
|
+
const encrypted = cryptoService.encryptContent('Hello World', sessionKey);
|
|
78
|
+
|
|
79
|
+
// Decrypt content
|
|
80
|
+
const decrypted = cryptoService.decryptContent(encrypted, sessionKey);
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### AppSync Client
|
|
84
|
+
|
|
85
|
+
```typescript
|
|
86
|
+
import { AppSyncClient, loadConfig } from '@quantiya/codevibe-core';
|
|
87
|
+
|
|
88
|
+
// Load environment configuration
|
|
89
|
+
loadConfig('production');
|
|
90
|
+
|
|
91
|
+
// Create client
|
|
92
|
+
const client = new AppSyncClient('production');
|
|
93
|
+
|
|
94
|
+
// Authenticate with stored tokens
|
|
95
|
+
const authenticated = await client.authenticateWithStoredTokens();
|
|
96
|
+
if (!authenticated) {
|
|
97
|
+
console.log('Run "codevibe login" first');
|
|
98
|
+
process.exit(1);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
// Create session
|
|
102
|
+
const session = await client.createSession({
|
|
103
|
+
userId: client.getCurrentUserId(),
|
|
104
|
+
agentType: 'CLAUDE',
|
|
105
|
+
projectPath: '/path/to/project',
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
// Subscribe to events
|
|
109
|
+
const unsubscribe = client.subscribeToEvents(session.sessionId, (event) => {
|
|
110
|
+
console.log('Event received:', event);
|
|
111
|
+
});
|
|
112
|
+
|
|
113
|
+
// Clean up
|
|
114
|
+
unsubscribe();
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
### Auth Service
|
|
118
|
+
|
|
119
|
+
```typescript
|
|
120
|
+
import { authService, loadConfig } from '@quantiya/codevibe-core';
|
|
121
|
+
|
|
122
|
+
// Set environment
|
|
123
|
+
loadConfig('production');
|
|
124
|
+
authService.setEnvironment('production');
|
|
125
|
+
|
|
126
|
+
// Login (opens browser)
|
|
127
|
+
const tokens = await authService.login();
|
|
128
|
+
|
|
129
|
+
// Check status
|
|
130
|
+
const status = await authService.getStatus();
|
|
131
|
+
console.log(status.authenticated, status.tokens?.email);
|
|
132
|
+
|
|
133
|
+
// Logout
|
|
134
|
+
await authService.logout();
|
|
135
|
+
```
|
|
136
|
+
|
|
137
|
+
## Keychain Storage
|
|
138
|
+
|
|
139
|
+
All sensitive data is stored in the native system keychain:
|
|
140
|
+
|
|
141
|
+
- **Service Name:** `ai.quantiya.app.codevibe`
|
|
142
|
+
- **Device Identity:** Stored as `device-identity` account
|
|
143
|
+
- **Tokens:** Stored as `tokens-{environment}` accounts (e.g., `tokens-production`)
|
|
144
|
+
|
|
145
|
+
This ensures:
|
|
146
|
+
- Data persists across terminal sessions
|
|
147
|
+
- Data is encrypted at rest by the OS
|
|
148
|
+
- Data survives plugin reinstalls/updates
|
|
149
|
+
- Device identity is shared across all CodeVibe plugins
|
|
150
|
+
|
|
151
|
+
## Security
|
|
152
|
+
|
|
153
|
+
- Device keys are ECDH P-256 key pairs
|
|
154
|
+
- Session keys are 256-bit AES keys
|
|
155
|
+
- Content is encrypted with AES-256-GCM
|
|
156
|
+
- Session keys are encrypted per-device using ECDH
|
|
157
|
+
- OAuth tokens are stored securely in native keychain
|
|
158
|
+
|
|
159
|
+
## Development
|
|
160
|
+
|
|
161
|
+
```bash
|
|
162
|
+
# Install dependencies
|
|
163
|
+
npm install
|
|
164
|
+
|
|
165
|
+
# Build
|
|
166
|
+
npm run build
|
|
167
|
+
|
|
168
|
+
# Watch mode
|
|
169
|
+
npm run watch
|
|
170
|
+
|
|
171
|
+
# Local development with plugin
|
|
172
|
+
npm link
|
|
173
|
+
cd ../codevibe-claude-plugin
|
|
174
|
+
npm link @quantiya/codevibe-core
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## License
|
|
178
|
+
|
|
179
|
+
MIT
|
|
@@ -0,0 +1,132 @@
|
|
|
1
|
+
import { CreateEventInput, CreateSessionInput, UpdateSessionInput, UpdateEventStatusInput, Event, Session, EventSource, DeviceKey } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Download URL response
|
|
4
|
+
*/
|
|
5
|
+
export interface DownloadUrlResponse {
|
|
6
|
+
downloadUrl: string;
|
|
7
|
+
expiresAt: string;
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* AppSync GraphQL client with WebSocket subscriptions
|
|
11
|
+
*/
|
|
12
|
+
export declare class AppSyncClient {
|
|
13
|
+
private authenticated;
|
|
14
|
+
private currentUserId;
|
|
15
|
+
private currentEmail;
|
|
16
|
+
private tokens;
|
|
17
|
+
private activeSubscriptions;
|
|
18
|
+
private environment;
|
|
19
|
+
constructor();
|
|
20
|
+
/**
|
|
21
|
+
* Get the current authenticated user ID
|
|
22
|
+
*/
|
|
23
|
+
getCurrentUserId(): string;
|
|
24
|
+
/**
|
|
25
|
+
* Get the current authenticated user email
|
|
26
|
+
*/
|
|
27
|
+
getCurrentUserEmail(): string | null;
|
|
28
|
+
/**
|
|
29
|
+
* Authenticate using stored OAuth tokens from keychain
|
|
30
|
+
*/
|
|
31
|
+
authenticateWithStoredTokens(): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Refresh expired tokens
|
|
34
|
+
*/
|
|
35
|
+
private refreshTokens;
|
|
36
|
+
/**
|
|
37
|
+
* Check if authenticated
|
|
38
|
+
*/
|
|
39
|
+
isAuthenticated(): boolean;
|
|
40
|
+
/**
|
|
41
|
+
* Sign out
|
|
42
|
+
*/
|
|
43
|
+
signOut(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Make a GraphQL request
|
|
46
|
+
*/
|
|
47
|
+
private graphqlRequest;
|
|
48
|
+
/**
|
|
49
|
+
* Create a session
|
|
50
|
+
*/
|
|
51
|
+
createSession(input: CreateSessionInput): Promise<Session>;
|
|
52
|
+
/**
|
|
53
|
+
* Update a session
|
|
54
|
+
*/
|
|
55
|
+
updateSession(input: UpdateSessionInput): Promise<Session>;
|
|
56
|
+
/**
|
|
57
|
+
* Get a session
|
|
58
|
+
*/
|
|
59
|
+
getSession(sessionId: string): Promise<Session | null>;
|
|
60
|
+
/**
|
|
61
|
+
* Create an event
|
|
62
|
+
*/
|
|
63
|
+
createEvent(input: CreateEventInput): Promise<Event>;
|
|
64
|
+
/**
|
|
65
|
+
* Update event status
|
|
66
|
+
*/
|
|
67
|
+
updateEventStatus(input: UpdateEventStatusInput): Promise<Event>;
|
|
68
|
+
/**
|
|
69
|
+
* List events for a session
|
|
70
|
+
*/
|
|
71
|
+
listEvents(sessionId: string, source?: EventSource, limit?: number): Promise<Event[]>;
|
|
72
|
+
/**
|
|
73
|
+
* List user device keys
|
|
74
|
+
*/
|
|
75
|
+
listUserDeviceKeys(): Promise<DeviceKey[]>;
|
|
76
|
+
/**
|
|
77
|
+
* Register device key
|
|
78
|
+
*/
|
|
79
|
+
registerDeviceKey(deviceId: string, publicKey: string, platform: string, deviceName: string): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Get attachment download URL
|
|
82
|
+
*/
|
|
83
|
+
getAttachmentDownloadUrl(s3Key: string): Promise<DownloadUrlResponse>;
|
|
84
|
+
/**
|
|
85
|
+
* Subscribe to events for a session
|
|
86
|
+
*/
|
|
87
|
+
subscribeToEvents(sessionId: string, onEvent: (event: Event) => void, onError?: (error: Error) => void): () => void;
|
|
88
|
+
/**
|
|
89
|
+
* Build WebSocket URL
|
|
90
|
+
*/
|
|
91
|
+
private buildRealtimeUrl;
|
|
92
|
+
/**
|
|
93
|
+
* Create WebSocket subscription
|
|
94
|
+
*/
|
|
95
|
+
private createSubscription;
|
|
96
|
+
/**
|
|
97
|
+
* Send subscription start message
|
|
98
|
+
*/
|
|
99
|
+
private sendSubscriptionStart;
|
|
100
|
+
/**
|
|
101
|
+
* Reset keep-alive timer
|
|
102
|
+
*/
|
|
103
|
+
private resetKeepAliveTimer;
|
|
104
|
+
/**
|
|
105
|
+
* Handle subscription error with two-phase reconnection:
|
|
106
|
+
* Phase 1 (urgent): Exponential backoff for first N attempts
|
|
107
|
+
* Phase 2 (persistent): Fixed interval retry indefinitely
|
|
108
|
+
*/
|
|
109
|
+
private handleSubscriptionError;
|
|
110
|
+
/**
|
|
111
|
+
* Cleanup subscription state
|
|
112
|
+
*/
|
|
113
|
+
private cleanupSubscriptionState;
|
|
114
|
+
private heartbeatTimers;
|
|
115
|
+
/**
|
|
116
|
+
* Start periodic heartbeat for a session.
|
|
117
|
+
* Updates lastHeartbeatAt on the session every intervalMs (default 2 minutes).
|
|
118
|
+
*/
|
|
119
|
+
startHeartbeat(sessionId: string, intervalMs?: number): void;
|
|
120
|
+
/**
|
|
121
|
+
* Stop heartbeat for a session.
|
|
122
|
+
*/
|
|
123
|
+
stopHeartbeat(sessionId: string): void;
|
|
124
|
+
/**
|
|
125
|
+
* Send a single heartbeat update.
|
|
126
|
+
*/
|
|
127
|
+
private sendHeartbeat;
|
|
128
|
+
/**
|
|
129
|
+
* Cleanup all subscriptions and heartbeats
|
|
130
|
+
*/
|
|
131
|
+
cleanupSubscriptions(): void;
|
|
132
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export declare const queries: {
|
|
2
|
+
getSession: string;
|
|
3
|
+
listEvents: string;
|
|
4
|
+
listUserDeviceKeys: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const mutations: {
|
|
7
|
+
createSession: string;
|
|
8
|
+
updateSession: string;
|
|
9
|
+
createEvent: string;
|
|
10
|
+
updateEventStatus: string;
|
|
11
|
+
registerDeviceKey: string;
|
|
12
|
+
getAttachmentDownloadUrl: string;
|
|
13
|
+
};
|
|
14
|
+
export declare const subscriptions: {
|
|
15
|
+
onEventCreated: string;
|
|
16
|
+
};
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { TokenData } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Authentication service for OAuth flows
|
|
4
|
+
*/
|
|
5
|
+
export declare class AuthService {
|
|
6
|
+
private static instance;
|
|
7
|
+
private constructor();
|
|
8
|
+
static getInstance(): AuthService;
|
|
9
|
+
/**
|
|
10
|
+
* Open URL in the user's default browser. Cross-platform: macOS, Linux,
|
|
11
|
+
* WSL, Windows. Always prints the URL to stdout first as a fallback —
|
|
12
|
+
* if no browser-opening command is available, the user can copy-paste.
|
|
13
|
+
*
|
|
14
|
+
* On WSL, prefers opening the Windows host browser via WSL interop
|
|
15
|
+
* (wslview → cmd.exe → powershell.exe) before falling back to xdg-open.
|
|
16
|
+
*/
|
|
17
|
+
private openBrowser;
|
|
18
|
+
/**
|
|
19
|
+
* Returns the list of browser-opening commands to try in order, based on
|
|
20
|
+
* the current platform. On WSL, returns WSL interop commands first so the
|
|
21
|
+
* Windows browser opens (which is what users actually want on WSL).
|
|
22
|
+
*/
|
|
23
|
+
private getBrowserCommands;
|
|
24
|
+
/**
|
|
25
|
+
* Detect whether we're running inside WSL (1 or 2). Returns false on
|
|
26
|
+
* any non-Linux platform or if /proc/sys/kernel/osrelease is not readable.
|
|
27
|
+
*/
|
|
28
|
+
private isRunningInWSL;
|
|
29
|
+
/**
|
|
30
|
+
* Try each browser-opening command in order. Advances to the next fallback on:
|
|
31
|
+
* - Spawn failure (ENOENT / the command not being installed)
|
|
32
|
+
* - Synchronous throw from spawn()
|
|
33
|
+
* - Runtime failure where the command spawns but exits with a non-zero
|
|
34
|
+
* code (e.g. wslview when WSL interop is disabled, xdg-open when no
|
|
35
|
+
* default browser is registered, cmd.exe failing to launch start)
|
|
36
|
+
* - Process terminated by signal
|
|
37
|
+
*
|
|
38
|
+
* Stays on the current command when:
|
|
39
|
+
* - Process exits with code 0 (success)
|
|
40
|
+
* - Process is still running after 3 seconds (assumed success — opener
|
|
41
|
+
* is doing real work like launching a slow app, not hung)
|
|
42
|
+
*
|
|
43
|
+
* If all attempts exhaust, logs at debug level — the user still has the
|
|
44
|
+
* sign-in URL printed to stdout as a copy-paste fallback.
|
|
45
|
+
*/
|
|
46
|
+
private tryBrowserCommand;
|
|
47
|
+
/**
|
|
48
|
+
* Generate state for CSRF protection
|
|
49
|
+
*/
|
|
50
|
+
private generateState;
|
|
51
|
+
/**
|
|
52
|
+
* Build authorization URL
|
|
53
|
+
*/
|
|
54
|
+
private buildAuthUrl;
|
|
55
|
+
/**
|
|
56
|
+
* Exchange authorization code for tokens
|
|
57
|
+
*/
|
|
58
|
+
private exchangeCodeForTokens;
|
|
59
|
+
/**
|
|
60
|
+
* Decode JWT payload
|
|
61
|
+
*/
|
|
62
|
+
private decodeJwt;
|
|
63
|
+
/**
|
|
64
|
+
* Refresh tokens
|
|
65
|
+
*/
|
|
66
|
+
refreshTokens(refreshToken: string): Promise<{
|
|
67
|
+
accessToken: string;
|
|
68
|
+
idToken: string;
|
|
69
|
+
expiresIn: number;
|
|
70
|
+
}>;
|
|
71
|
+
/**
|
|
72
|
+
* Login via OAuth browser flow
|
|
73
|
+
*/
|
|
74
|
+
login(): Promise<TokenData | null>;
|
|
75
|
+
/**
|
|
76
|
+
* Logout
|
|
77
|
+
*/
|
|
78
|
+
logout(): Promise<boolean>;
|
|
79
|
+
/**
|
|
80
|
+
* Get current auth status
|
|
81
|
+
*/
|
|
82
|
+
getStatus(): Promise<{
|
|
83
|
+
authenticated: boolean;
|
|
84
|
+
tokens?: TokenData;
|
|
85
|
+
}>;
|
|
86
|
+
}
|
|
87
|
+
export declare const authService: AuthService;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Wraps fetch() and rewrites "fetch failed" errors to include the underlying
|
|
3
|
+
* cause and a user-actionable diagnostic tip when possible. Non-network errors
|
|
4
|
+
* and HTTP error responses (non-2xx) are not affected — the caller still
|
|
5
|
+
* handles response.ok checks themselves.
|
|
6
|
+
*
|
|
7
|
+
* @param url The URL to fetch
|
|
8
|
+
* @param init Standard fetch init options
|
|
9
|
+
* @param context Optional short label (e.g. "token exchange") for the error message
|
|
10
|
+
*/
|
|
11
|
+
export declare function fetchWithDiagnostics(url: string, init?: any, context?: string): Promise<Response>;
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment type
|
|
3
|
+
*/
|
|
4
|
+
export type Environment = 'development' | 'production';
|
|
5
|
+
/**
|
|
6
|
+
* Configuration interface
|
|
7
|
+
*/
|
|
8
|
+
export interface Config {
|
|
9
|
+
environment: Environment;
|
|
10
|
+
aws: {
|
|
11
|
+
region: string;
|
|
12
|
+
appsyncUrl: string;
|
|
13
|
+
cognitoUserPoolId: string;
|
|
14
|
+
cognitoClientId: string;
|
|
15
|
+
cognitoDomain: string;
|
|
16
|
+
};
|
|
17
|
+
keychain: {
|
|
18
|
+
serviceName: string;
|
|
19
|
+
};
|
|
20
|
+
server: {
|
|
21
|
+
port: number;
|
|
22
|
+
host: string;
|
|
23
|
+
dynamicPort: boolean;
|
|
24
|
+
};
|
|
25
|
+
claude: {
|
|
26
|
+
command: string;
|
|
27
|
+
defaultTimeout: number;
|
|
28
|
+
};
|
|
29
|
+
codex: {
|
|
30
|
+
command: string;
|
|
31
|
+
defaultTimeout: number;
|
|
32
|
+
sessionsDir: string;
|
|
33
|
+
approvalTimeoutMs: number;
|
|
34
|
+
};
|
|
35
|
+
gemini: {
|
|
36
|
+
command: string;
|
|
37
|
+
defaultTimeout: number;
|
|
38
|
+
transcriptDir: string;
|
|
39
|
+
};
|
|
40
|
+
}
|
|
41
|
+
/**
|
|
42
|
+
* Get environment from process.env.ENVIRONMENT, defaults to 'production'
|
|
43
|
+
*/
|
|
44
|
+
export declare function getEnvironment(): Environment;
|
|
45
|
+
/**
|
|
46
|
+
* Load configuration for specific environment
|
|
47
|
+
* If no environment specified, uses process.env.ENVIRONMENT or defaults to 'production'
|
|
48
|
+
*/
|
|
49
|
+
export declare function loadConfig(environment?: Environment): Config;
|
|
50
|
+
/**
|
|
51
|
+
* Get current configuration (auto-initializes if not already loaded)
|
|
52
|
+
*/
|
|
53
|
+
export declare function getConfig(): Config;
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
import { EncryptedSessionKey, KeyPair } from '../types';
|
|
2
|
+
/**
|
|
3
|
+
* Error class for cryptographic operations
|
|
4
|
+
*/
|
|
5
|
+
export declare class CryptoError extends Error {
|
|
6
|
+
constructor(message: string);
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Current encryption version for future algorithm upgrades
|
|
10
|
+
*/
|
|
11
|
+
export declare const ENCRYPTION_VERSION = 1;
|
|
12
|
+
/**
|
|
13
|
+
* Service for end-to-end encryption operations
|
|
14
|
+
*/
|
|
15
|
+
export declare class CryptoService {
|
|
16
|
+
private static instance;
|
|
17
|
+
private constructor();
|
|
18
|
+
static getInstance(): CryptoService;
|
|
19
|
+
/**
|
|
20
|
+
* Generate a new ECDH P-256 key pair
|
|
21
|
+
* @returns Object with privateKey (base64), publicKey (base64 raw)
|
|
22
|
+
*/
|
|
23
|
+
generateKeyPair(): KeyPair;
|
|
24
|
+
/**
|
|
25
|
+
* Generate a random 256-bit session key
|
|
26
|
+
* @returns Base64-encoded session key
|
|
27
|
+
*/
|
|
28
|
+
generateSessionKey(): string;
|
|
29
|
+
/**
|
|
30
|
+
* Derive a shared secret using ECDH and HKDF
|
|
31
|
+
* @param privateKeyBase64 Our private key (base64)
|
|
32
|
+
* @param publicKeyBase64 Other party's public key (base64)
|
|
33
|
+
* @returns 256-bit derived key as Buffer
|
|
34
|
+
*/
|
|
35
|
+
deriveSharedKey(privateKeyBase64: string, publicKeyBase64: string): Buffer;
|
|
36
|
+
/**
|
|
37
|
+
* Encrypt a session key for a target device using ECDH
|
|
38
|
+
* @param sessionKeyBase64 The session key to encrypt (base64)
|
|
39
|
+
* @param targetPublicKeyBase64 Target device's public key (base64)
|
|
40
|
+
* @returns EncryptedSessionKey containing encrypted key and ephemeral public key
|
|
41
|
+
*/
|
|
42
|
+
encryptSessionKey(sessionKeyBase64: string, targetPublicKeyBase64: string): Omit<EncryptedSessionKey, 'deviceId'>;
|
|
43
|
+
/**
|
|
44
|
+
* Decrypt a session key using our private key
|
|
45
|
+
* @param encryptedSessionKey The encrypted session key data
|
|
46
|
+
* @param privateKeyBase64 Our device's private key (base64)
|
|
47
|
+
* @returns Decrypted session key (base64)
|
|
48
|
+
*/
|
|
49
|
+
decryptSessionKey(encryptedSessionKey: EncryptedSessionKey, privateKeyBase64: string): string;
|
|
50
|
+
/**
|
|
51
|
+
* Encrypt content using AES-256-GCM
|
|
52
|
+
* @param content String content to encrypt
|
|
53
|
+
* @param sessionKeyBase64 Session key (base64)
|
|
54
|
+
* @returns Base64-encoded ciphertext (nonce + ciphertext + tag)
|
|
55
|
+
*/
|
|
56
|
+
encryptContent(content: string, sessionKeyBase64: string): string;
|
|
57
|
+
/**
|
|
58
|
+
* Decrypt content using AES-256-GCM
|
|
59
|
+
* @param encryptedContent Base64-encoded ciphertext
|
|
60
|
+
* @param sessionKeyBase64 Session key (base64)
|
|
61
|
+
* @returns Decrypted string content
|
|
62
|
+
*/
|
|
63
|
+
decryptContent(encryptedContent: string, sessionKeyBase64: string): string;
|
|
64
|
+
/**
|
|
65
|
+
* Encrypt JSON-serializable metadata
|
|
66
|
+
* @param metadata Object to encrypt
|
|
67
|
+
* @param sessionKeyBase64 Session key (base64)
|
|
68
|
+
* @returns Base64-encoded encrypted JSON
|
|
69
|
+
*/
|
|
70
|
+
encryptMetadata(metadata: Record<string, any>, sessionKeyBase64: string): string;
|
|
71
|
+
/**
|
|
72
|
+
* Decrypt encrypted metadata
|
|
73
|
+
* @param encryptedMetadata Base64-encoded encrypted JSON
|
|
74
|
+
* @param sessionKeyBase64 Session key (base64)
|
|
75
|
+
* @returns Decrypted object
|
|
76
|
+
*/
|
|
77
|
+
decryptMetadata(encryptedMetadata: string, sessionKeyBase64: string): Record<string, any>;
|
|
78
|
+
/**
|
|
79
|
+
* Encrypt binary data using AES-256-GCM
|
|
80
|
+
* @param data Binary data to encrypt (Buffer)
|
|
81
|
+
* @param sessionKeyBase64 Session key (base64)
|
|
82
|
+
* @returns Encrypted data (Buffer containing nonce + ciphertext + tag)
|
|
83
|
+
*/
|
|
84
|
+
encryptData(data: Buffer, sessionKeyBase64: string): Buffer;
|
|
85
|
+
/**
|
|
86
|
+
* Decrypt binary data using AES-256-GCM
|
|
87
|
+
* @param encryptedData Encrypted data (Buffer containing nonce + ciphertext + tag)
|
|
88
|
+
* @param sessionKeyBase64 Session key (base64)
|
|
89
|
+
* @returns Decrypted binary data (Buffer)
|
|
90
|
+
*/
|
|
91
|
+
decryptData(encryptedData: Buffer, sessionKeyBase64: string): Buffer;
|
|
92
|
+
/**
|
|
93
|
+
* Encrypt data using AES-256-GCM
|
|
94
|
+
* @param data Data to encrypt
|
|
95
|
+
* @param key Symmetric key (32 bytes)
|
|
96
|
+
* @returns Combined nonce + ciphertext + tag
|
|
97
|
+
*/
|
|
98
|
+
private encrypt;
|
|
99
|
+
/**
|
|
100
|
+
* Decrypt data using AES-256-GCM
|
|
101
|
+
* @param data Combined nonce + ciphertext + tag
|
|
102
|
+
* @param key Symmetric key (32 bytes)
|
|
103
|
+
* @returns Decrypted data
|
|
104
|
+
*/
|
|
105
|
+
private decrypt;
|
|
106
|
+
/**
|
|
107
|
+
* Serialize a private key for storage
|
|
108
|
+
*/
|
|
109
|
+
serializePrivateKey(privateKeyBase64: string): string;
|
|
110
|
+
/**
|
|
111
|
+
* Deserialize a private key from storage
|
|
112
|
+
*/
|
|
113
|
+
deserializePrivateKey(base64: string): string;
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Export singleton instance
|
|
117
|
+
*/
|
|
118
|
+
export declare const cryptoService: CryptoService;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { CryptoService, cryptoService, CryptoError, ENCRYPTION_VERSION } from './crypto-service';
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export { KeychainManager, keychainManager, KeychainError } from './keychain';
|
|
2
|
+
export { CryptoService, cryptoService, CryptoError, ENCRYPTION_VERSION } from './crypto';
|
|
3
|
+
export { AppSyncClient, DownloadUrlResponse } from './appsync';
|
|
4
|
+
export { queries, mutations, subscriptions } from './appsync';
|
|
5
|
+
export { AuthService, authService } from './auth';
|
|
6
|
+
export { runAuthCli } from './auth';
|
|
7
|
+
export { loadConfig, getConfig, getEnvironment } from './config';
|
|
8
|
+
export type { Config, Environment } from './config';
|
|
9
|
+
export { Logger, logger, createLogger } from './logger';
|
|
10
|
+
export { parseInteractivePrompt, normalizeSnapshot, } from './prompt-parser';
|
|
11
|
+
export type { ParsedInteractivePrompt, PromptKind, InteractivePromptOption, } from './prompt-parser';
|
|
12
|
+
export { resumeOrCreateSession, prepareSessionEncryption } from './session';
|
|
13
|
+
export type { ResumeOrCreateSessionInput, ResumeOrCreateSessionResult } from './session';
|
|
14
|
+
export * from './types';
|