@quantiya/codevibe-claude-plugin 1.0.11 → 1.0.13
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/dist/server.js +16 -1162
- package/package.json +5 -5
- package/dist/appsync-client.js +0 -858
- package/dist/auth-cli.js +0 -472
- package/dist/command-executor.js +0 -127
- package/dist/config.js +0 -106
- package/dist/crypto-service.js +0 -278
- package/dist/http-api.js +0 -334
- package/dist/key-manager.js +0 -287
- package/dist/logger.js +0 -18
- package/dist/prompt-responder.js +0 -132
- package/dist/token-storage.js +0 -169
- package/dist/types.js +0 -17
- package/node_modules/@quantiya/codevibe-core/README.md +0 -170
- package/node_modules/@quantiya/codevibe-core/bin/codevibe.js +0 -7
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.d.ts +0 -132
- package/node_modules/@quantiya/codevibe-core/dist/appsync/appsync-client.js +0 -576
- package/node_modules/@quantiya/codevibe-core/dist/appsync/index.d.ts +0 -2
- package/node_modules/@quantiya/codevibe-core/dist/appsync/index.js +0 -10
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.d.ts +0 -16
- package/node_modules/@quantiya/codevibe-core/dist/appsync/queries.js +0 -189
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-cli.d.ts +0 -5
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-cli.js +0 -217
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-service.d.ts +0 -87
- package/node_modules/@quantiya/codevibe-core/dist/auth/auth-service.js +0 -464
- package/node_modules/@quantiya/codevibe-core/dist/auth/fetch-helpers.d.ts +0 -11
- package/node_modules/@quantiya/codevibe-core/dist/auth/fetch-helpers.js +0 -165
- package/node_modules/@quantiya/codevibe-core/dist/auth/index.d.ts +0 -2
- package/node_modules/@quantiya/codevibe-core/dist/auth/index.js +0 -9
- package/node_modules/@quantiya/codevibe-core/dist/config/config.d.ts +0 -53
- package/node_modules/@quantiya/codevibe-core/dist/config/config.js +0 -123
- package/node_modules/@quantiya/codevibe-core/dist/config/index.d.ts +0 -2
- package/node_modules/@quantiya/codevibe-core/dist/config/index.js +0 -8
- package/node_modules/@quantiya/codevibe-core/dist/crypto/crypto-service.d.ts +0 -118
- package/node_modules/@quantiya/codevibe-core/dist/crypto/crypto-service.js +0 -284
- package/node_modules/@quantiya/codevibe-core/dist/crypto/index.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/crypto/index.js +0 -9
- package/node_modules/@quantiya/codevibe-core/dist/index.d.ts +0 -14
- package/node_modules/@quantiya/codevibe-core/dist/index.js +0 -68
- package/node_modules/@quantiya/codevibe-core/dist/keychain/index.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/keychain/index.js +0 -8
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.d.ts +0 -125
- package/node_modules/@quantiya/codevibe-core/dist/keychain/keychain-manager.js +0 -375
- package/node_modules/@quantiya/codevibe-core/dist/logger/index.d.ts +0 -1
- package/node_modules/@quantiya/codevibe-core/dist/logger/index.js +0 -8
- package/node_modules/@quantiya/codevibe-core/dist/logger/logger.d.ts +0 -35
- package/node_modules/@quantiya/codevibe-core/dist/logger/logger.js +0 -142
- package/node_modules/@quantiya/codevibe-core/dist/prompt-parser.d.ts +0 -39
- package/node_modules/@quantiya/codevibe-core/dist/prompt-parser.js +0 -236
- package/node_modules/@quantiya/codevibe-core/dist/session/index.d.ts +0 -2
- package/node_modules/@quantiya/codevibe-core/dist/session/index.js +0 -7
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.d.ts +0 -55
- package/node_modules/@quantiya/codevibe-core/dist/session/session-resume.js +0 -151
- package/node_modules/@quantiya/codevibe-core/dist/types/auth.d.ts +0 -15
- package/node_modules/@quantiya/codevibe-core/dist/types/auth.js +0 -3
- package/node_modules/@quantiya/codevibe-core/dist/types/encryption.d.ts +0 -54
- package/node_modules/@quantiya/codevibe-core/dist/types/encryption.js +0 -3
- package/node_modules/@quantiya/codevibe-core/dist/types/events.d.ts +0 -74
- package/node_modules/@quantiya/codevibe-core/dist/types/events.js +0 -28
- package/node_modules/@quantiya/codevibe-core/dist/types/index.d.ts +0 -4
- package/node_modules/@quantiya/codevibe-core/dist/types/index.js +0 -22
- package/node_modules/@quantiya/codevibe-core/dist/types/session.d.ts +0 -59
- package/node_modules/@quantiya/codevibe-core/dist/types/session.js +0 -22
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CHANGELOG.md +0 -274
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/CONTRIBUTING.md +0 -18
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/LICENSE.md +0 -9
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/README.md +0 -466
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/bin/uuid +0 -2
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/index.js +0 -79
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/md5.js +0 -223
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/native.js +0 -11
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/nil.js +0 -8
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/parse.js +0 -45
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/regex.js +0 -8
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/rng.js +0 -25
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/sha1.js +0 -104
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/stringify.js +0 -44
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v1.js +0 -107
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v3.js +0 -16
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v35.js +0 -80
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v4.js +0 -43
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/v5.js +0 -16
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/validate.js +0 -17
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/commonjs-browser/version.js +0 -21
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/index.js +0 -9
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/md5.js +0 -215
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/native.js +0 -4
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/nil.js +0 -1
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/parse.js +0 -35
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/regex.js +0 -1
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/rng.js +0 -18
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/sha1.js +0 -96
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/stringify.js +0 -33
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v1.js +0 -95
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v3.js +0 -4
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v35.js +0 -66
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v4.js +0 -29
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/v5.js +0 -4
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/validate.js +0 -7
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-browser/version.js +0 -11
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/index.js +0 -9
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/md5.js +0 -13
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/native.js +0 -4
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/nil.js +0 -1
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/parse.js +0 -35
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/regex.js +0 -1
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/rng.js +0 -12
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/sha1.js +0 -13
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/stringify.js +0 -33
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v1.js +0 -95
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v3.js +0 -4
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v35.js +0 -66
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v4.js +0 -29
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/v5.js +0 -4
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/validate.js +0 -7
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/esm-node/version.js +0 -11
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/index.js +0 -79
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5-browser.js +0 -223
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/md5.js +0 -23
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native-browser.js +0 -11
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/native.js +0 -15
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/nil.js +0 -8
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/parse.js +0 -45
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/regex.js +0 -8
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng-browser.js +0 -25
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/rng.js +0 -24
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1-browser.js +0 -104
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/sha1.js +0 -23
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/stringify.js +0 -44
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/uuid-bin.js +0 -85
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v1.js +0 -107
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v3.js +0 -16
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v35.js +0 -80
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v4.js +0 -43
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/v5.js +0 -16
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/validate.js +0 -17
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/dist/version.js +0 -21
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/package.json +0 -135
- package/node_modules/@quantiya/codevibe-core/node_modules/uuid/wrapper.mjs +0 -10
- package/node_modules/@quantiya/codevibe-core/package.json +0 -51
- package/node_modules/base64-js/LICENSE +0 -21
- package/node_modules/base64-js/README.md +0 -34
- package/node_modules/base64-js/base64js.min.js +0 -1
- package/node_modules/base64-js/index.d.ts +0 -3
- package/node_modules/base64-js/index.js +0 -150
- package/node_modules/base64-js/package.json +0 -47
- package/node_modules/bl/.travis.yml +0 -17
- package/node_modules/bl/BufferList.js +0 -396
- package/node_modules/bl/LICENSE.md +0 -13
- package/node_modules/bl/README.md +0 -247
- package/node_modules/bl/bl.js +0 -84
- package/node_modules/bl/package.json +0 -37
- package/node_modules/bl/test/convert.js +0 -21
- package/node_modules/bl/test/indexOf.js +0 -492
- package/node_modules/bl/test/isBufferList.js +0 -32
- package/node_modules/bl/test/test.js +0 -869
- package/node_modules/buffer/AUTHORS.md +0 -70
- package/node_modules/buffer/LICENSE +0 -21
- package/node_modules/buffer/README.md +0 -410
- package/node_modules/buffer/index.d.ts +0 -186
- package/node_modules/buffer/index.js +0 -1817
- package/node_modules/buffer/package.json +0 -96
- package/node_modules/chownr/LICENSE +0 -15
- package/node_modules/chownr/README.md +0 -3
- package/node_modules/chownr/chownr.js +0 -167
- package/node_modules/chownr/package.json +0 -29
- package/node_modules/decompress-response/index.d.ts +0 -22
- package/node_modules/decompress-response/index.js +0 -58
- package/node_modules/decompress-response/license +0 -9
- package/node_modules/decompress-response/package.json +0 -56
- package/node_modules/decompress-response/readme.md +0 -48
- package/node_modules/deep-extend/CHANGELOG.md +0 -46
- package/node_modules/deep-extend/LICENSE +0 -20
- package/node_modules/deep-extend/README.md +0 -91
- package/node_modules/deep-extend/index.js +0 -1
- package/node_modules/deep-extend/lib/deep-extend.js +0 -150
- package/node_modules/deep-extend/package.json +0 -62
- package/node_modules/detect-libc/LICENSE +0 -201
- package/node_modules/detect-libc/README.md +0 -163
- package/node_modules/detect-libc/index.d.ts +0 -14
- package/node_modules/detect-libc/lib/detect-libc.js +0 -313
- package/node_modules/detect-libc/lib/elf.js +0 -39
- package/node_modules/detect-libc/lib/filesystem.js +0 -51
- package/node_modules/detect-libc/lib/process.js +0 -24
- package/node_modules/detect-libc/package.json +0 -44
- package/node_modules/end-of-stream/LICENSE +0 -21
- package/node_modules/end-of-stream/README.md +0 -54
- package/node_modules/end-of-stream/index.js +0 -96
- package/node_modules/end-of-stream/package.json +0 -37
- package/node_modules/expand-template/.travis.yml +0 -6
- package/node_modules/expand-template/LICENSE +0 -21
- package/node_modules/expand-template/README.md +0 -43
- package/node_modules/expand-template/index.js +0 -26
- package/node_modules/expand-template/package.json +0 -29
- package/node_modules/expand-template/test.js +0 -67
- package/node_modules/fs-constants/LICENSE +0 -21
- package/node_modules/fs-constants/README.md +0 -26
- package/node_modules/fs-constants/browser.js +0 -1
- package/node_modules/fs-constants/index.js +0 -1
- package/node_modules/fs-constants/package.json +0 -19
- package/node_modules/github-from-package/.travis.yml +0 -4
- package/node_modules/github-from-package/LICENSE +0 -18
- package/node_modules/github-from-package/example/package.json +0 -8
- package/node_modules/github-from-package/example/url.js +0 -3
- package/node_modules/github-from-package/index.js +0 -17
- package/node_modules/github-from-package/package.json +0 -30
- package/node_modules/github-from-package/readme.markdown +0 -53
- package/node_modules/github-from-package/test/a.json +0 -8
- package/node_modules/github-from-package/test/b.json +0 -5
- package/node_modules/github-from-package/test/c.json +0 -5
- package/node_modules/github-from-package/test/d.json +0 -7
- package/node_modules/github-from-package/test/e.json +0 -5
- package/node_modules/github-from-package/test/url.js +0 -19
- package/node_modules/ieee754/LICENSE +0 -11
- package/node_modules/ieee754/README.md +0 -51
- package/node_modules/ieee754/index.d.ts +0 -10
- package/node_modules/ieee754/index.js +0 -85
- package/node_modules/ieee754/package.json +0 -52
- package/node_modules/ini/LICENSE +0 -15
- package/node_modules/ini/README.md +0 -102
- package/node_modules/ini/ini.js +0 -206
- package/node_modules/ini/package.json +0 -33
- package/node_modules/keytar/LICENSE.md +0 -20
- package/node_modules/keytar/README.md +0 -94
- package/node_modules/keytar/binding.gyp +0 -66
- package/node_modules/keytar/build/Release/keytar.node +0 -0
- package/node_modules/keytar/keytar.d.ts +0 -51
- package/node_modules/keytar/lib/keytar.js +0 -43
- package/node_modules/keytar/package.json +0 -66
- package/node_modules/keytar/src/async.cc +0 -242
- package/node_modules/keytar/src/async.h +0 -103
- package/node_modules/keytar/src/credentials.h +0 -13
- package/node_modules/keytar/src/keytar.h +0 -41
- package/node_modules/keytar/src/keytar_mac.cc +0 -296
- package/node_modules/keytar/src/keytar_posix.cc +0 -184
- package/node_modules/keytar/src/keytar_win.cc +0 -272
- package/node_modules/keytar/src/main.cc +0 -139
- package/node_modules/mimic-response/index.d.ts +0 -17
- package/node_modules/mimic-response/index.js +0 -77
- package/node_modules/mimic-response/license +0 -9
- package/node_modules/mimic-response/package.json +0 -42
- package/node_modules/mimic-response/readme.md +0 -78
- package/node_modules/minimist/.eslintrc +0 -29
- package/node_modules/minimist/.github/FUNDING.yml +0 -12
- package/node_modules/minimist/.nycrc +0 -14
- package/node_modules/minimist/CHANGELOG.md +0 -298
- package/node_modules/minimist/LICENSE +0 -18
- package/node_modules/minimist/README.md +0 -121
- package/node_modules/minimist/example/parse.js +0 -4
- package/node_modules/minimist/index.js +0 -263
- package/node_modules/minimist/package.json +0 -75
- package/node_modules/minimist/test/all_bool.js +0 -34
- package/node_modules/minimist/test/bool.js +0 -177
- package/node_modules/minimist/test/dash.js +0 -43
- package/node_modules/minimist/test/default_bool.js +0 -37
- package/node_modules/minimist/test/dotted.js +0 -24
- package/node_modules/minimist/test/kv_short.js +0 -32
- package/node_modules/minimist/test/long.js +0 -33
- package/node_modules/minimist/test/num.js +0 -38
- package/node_modules/minimist/test/parse.js +0 -209
- package/node_modules/minimist/test/parse_modified.js +0 -11
- package/node_modules/minimist/test/proto.js +0 -64
- package/node_modules/minimist/test/short.js +0 -69
- package/node_modules/minimist/test/stop_early.js +0 -17
- package/node_modules/minimist/test/unknown.js +0 -104
- package/node_modules/minimist/test/whitespace.js +0 -10
- package/node_modules/mkdirp-classic/LICENSE +0 -21
- package/node_modules/mkdirp-classic/README.md +0 -18
- package/node_modules/mkdirp-classic/index.js +0 -98
- package/node_modules/mkdirp-classic/package.json +0 -18
- package/node_modules/napi-build-utils/.github/workflows/run-npm-tests.yml +0 -31
- package/node_modules/napi-build-utils/LICENSE +0 -21
- package/node_modules/napi-build-utils/README.md +0 -52
- package/node_modules/napi-build-utils/index.js +0 -214
- package/node_modules/napi-build-utils/index.md +0 -0
- package/node_modules/napi-build-utils/package.json +0 -42
- package/node_modules/node-abi/LICENSE +0 -21
- package/node_modules/node-abi/README.md +0 -54
- package/node_modules/node-abi/abi_registry.json +0 -432
- package/node_modules/node-abi/index.js +0 -179
- package/node_modules/node-abi/package.json +0 -45
- package/node_modules/node-addon-api/LICENSE.md +0 -13
- package/node_modules/node-addon-api/README.md +0 -293
- package/node_modules/node-addon-api/common.gypi +0 -21
- package/node_modules/node-addon-api/except.gypi +0 -25
- package/node_modules/node-addon-api/index.js +0 -11
- package/node_modules/node-addon-api/napi-inl.deprecated.h +0 -192
- package/node_modules/node-addon-api/napi-inl.h +0 -6209
- package/node_modules/node-addon-api/napi.h +0 -2983
- package/node_modules/node-addon-api/node_api.gyp +0 -9
- package/node_modules/node-addon-api/noexcept.gypi +0 -26
- package/node_modules/node-addon-api/nothing.c +0 -0
- package/node_modules/node-addon-api/package-support.json +0 -21
- package/node_modules/node-addon-api/package.json +0 -399
- package/node_modules/node-addon-api/tools/README.md +0 -73
- package/node_modules/node-addon-api/tools/check-napi.js +0 -100
- package/node_modules/node-addon-api/tools/clang-format.js +0 -68
- package/node_modules/node-addon-api/tools/conversion.js +0 -309
- package/node_modules/node-addon-api/tools/eslint-format.js +0 -71
- package/node_modules/prebuild-install/CHANGELOG.md +0 -131
- package/node_modules/prebuild-install/CONTRIBUTING.md +0 -6
- package/node_modules/prebuild-install/LICENSE +0 -21
- package/node_modules/prebuild-install/README.md +0 -163
- package/node_modules/prebuild-install/asset.js +0 -44
- package/node_modules/prebuild-install/bin.js +0 -78
- package/node_modules/prebuild-install/download.js +0 -142
- package/node_modules/prebuild-install/error.js +0 -14
- package/node_modules/prebuild-install/help.txt +0 -16
- package/node_modules/prebuild-install/index.js +0 -1
- package/node_modules/prebuild-install/log.js +0 -33
- package/node_modules/prebuild-install/package.json +0 -67
- package/node_modules/prebuild-install/proxy.js +0 -35
- package/node_modules/prebuild-install/rc.js +0 -64
- package/node_modules/prebuild-install/util.js +0 -143
- package/node_modules/pump/.github/FUNDING.yml +0 -2
- package/node_modules/pump/.travis.yml +0 -5
- package/node_modules/pump/LICENSE +0 -21
- package/node_modules/pump/README.md +0 -74
- package/node_modules/pump/SECURITY.md +0 -5
- package/node_modules/pump/empty.js +0 -1
- package/node_modules/pump/index.js +0 -86
- package/node_modules/pump/package.json +0 -30
- package/node_modules/pump/test-browser.js +0 -66
- package/node_modules/pump/test-node.js +0 -53
- package/node_modules/rc/LICENSE.APACHE2 +0 -15
- package/node_modules/rc/LICENSE.BSD +0 -26
- package/node_modules/rc/LICENSE.MIT +0 -24
- package/node_modules/rc/README.md +0 -227
- package/node_modules/rc/browser.js +0 -7
- package/node_modules/rc/cli.js +0 -4
- package/node_modules/rc/index.js +0 -53
- package/node_modules/rc/lib/utils.js +0 -104
- package/node_modules/rc/package.json +0 -29
- package/node_modules/rc/test/ini.js +0 -16
- package/node_modules/rc/test/nested-env-vars.js +0 -50
- package/node_modules/rc/test/test.js +0 -59
- package/node_modules/readable-stream/CONTRIBUTING.md +0 -38
- package/node_modules/readable-stream/GOVERNANCE.md +0 -136
- package/node_modules/readable-stream/LICENSE +0 -47
- package/node_modules/readable-stream/README.md +0 -106
- package/node_modules/readable-stream/errors-browser.js +0 -127
- package/node_modules/readable-stream/errors.js +0 -116
- package/node_modules/readable-stream/experimentalWarning.js +0 -17
- package/node_modules/readable-stream/lib/_stream_duplex.js +0 -126
- package/node_modules/readable-stream/lib/_stream_passthrough.js +0 -37
- package/node_modules/readable-stream/lib/_stream_readable.js +0 -1027
- package/node_modules/readable-stream/lib/_stream_transform.js +0 -190
- package/node_modules/readable-stream/lib/_stream_writable.js +0 -641
- package/node_modules/readable-stream/lib/internal/streams/async_iterator.js +0 -180
- package/node_modules/readable-stream/lib/internal/streams/buffer_list.js +0 -183
- package/node_modules/readable-stream/lib/internal/streams/destroy.js +0 -96
- package/node_modules/readable-stream/lib/internal/streams/end-of-stream.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/from-browser.js +0 -3
- package/node_modules/readable-stream/lib/internal/streams/from.js +0 -52
- package/node_modules/readable-stream/lib/internal/streams/pipeline.js +0 -86
- package/node_modules/readable-stream/lib/internal/streams/state.js +0 -22
- package/node_modules/readable-stream/lib/internal/streams/stream-browser.js +0 -1
- package/node_modules/readable-stream/lib/internal/streams/stream.js +0 -1
- package/node_modules/readable-stream/package.json +0 -68
- package/node_modules/readable-stream/readable-browser.js +0 -9
- package/node_modules/readable-stream/readable.js +0 -16
- package/node_modules/safe-buffer/LICENSE +0 -21
- package/node_modules/safe-buffer/README.md +0 -584
- package/node_modules/safe-buffer/index.d.ts +0 -187
- package/node_modules/safe-buffer/index.js +0 -65
- package/node_modules/safe-buffer/package.json +0 -51
- package/node_modules/semver/LICENSE +0 -15
- package/node_modules/semver/README.md +0 -665
- package/node_modules/semver/bin/semver.js +0 -191
- package/node_modules/semver/classes/comparator.js +0 -143
- package/node_modules/semver/classes/index.js +0 -7
- package/node_modules/semver/classes/range.js +0 -557
- package/node_modules/semver/classes/semver.js +0 -333
- package/node_modules/semver/functions/clean.js +0 -8
- package/node_modules/semver/functions/cmp.js +0 -54
- package/node_modules/semver/functions/coerce.js +0 -62
- package/node_modules/semver/functions/compare-build.js +0 -9
- package/node_modules/semver/functions/compare-loose.js +0 -5
- package/node_modules/semver/functions/compare.js +0 -7
- package/node_modules/semver/functions/diff.js +0 -60
- package/node_modules/semver/functions/eq.js +0 -5
- package/node_modules/semver/functions/gt.js +0 -5
- package/node_modules/semver/functions/gte.js +0 -5
- package/node_modules/semver/functions/inc.js +0 -21
- package/node_modules/semver/functions/lt.js +0 -5
- package/node_modules/semver/functions/lte.js +0 -5
- package/node_modules/semver/functions/major.js +0 -5
- package/node_modules/semver/functions/minor.js +0 -5
- package/node_modules/semver/functions/neq.js +0 -5
- package/node_modules/semver/functions/parse.js +0 -18
- package/node_modules/semver/functions/patch.js +0 -5
- package/node_modules/semver/functions/prerelease.js +0 -8
- package/node_modules/semver/functions/rcompare.js +0 -5
- package/node_modules/semver/functions/rsort.js +0 -5
- package/node_modules/semver/functions/satisfies.js +0 -12
- package/node_modules/semver/functions/sort.js +0 -5
- package/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/semver/index.js +0 -91
- package/node_modules/semver/internal/constants.js +0 -37
- package/node_modules/semver/internal/debug.js +0 -11
- package/node_modules/semver/internal/identifiers.js +0 -29
- package/node_modules/semver/internal/lrucache.js +0 -42
- package/node_modules/semver/internal/parse-options.js +0 -17
- package/node_modules/semver/internal/re.js +0 -223
- package/node_modules/semver/package.json +0 -78
- package/node_modules/semver/preload.js +0 -4
- package/node_modules/semver/range.bnf +0 -16
- package/node_modules/semver/ranges/gtr.js +0 -6
- package/node_modules/semver/ranges/intersects.js +0 -9
- package/node_modules/semver/ranges/ltr.js +0 -6
- package/node_modules/semver/ranges/max-satisfying.js +0 -27
- package/node_modules/semver/ranges/min-satisfying.js +0 -26
- package/node_modules/semver/ranges/min-version.js +0 -63
- package/node_modules/semver/ranges/outside.js +0 -82
- package/node_modules/semver/ranges/simplify.js +0 -49
- package/node_modules/semver/ranges/subset.js +0 -249
- package/node_modules/semver/ranges/to-comparators.js +0 -10
- package/node_modules/semver/ranges/valid.js +0 -13
- package/node_modules/simple-concat/.travis.yml +0 -3
- package/node_modules/simple-concat/LICENSE +0 -20
- package/node_modules/simple-concat/README.md +0 -44
- package/node_modules/simple-concat/index.js +0 -15
- package/node_modules/simple-concat/package.json +0 -47
- package/node_modules/simple-concat/test/basic.js +0 -41
- package/node_modules/simple-get/.github/dependabot.yml +0 -15
- package/node_modules/simple-get/.github/workflows/ci.yml +0 -23
- package/node_modules/simple-get/LICENSE +0 -20
- package/node_modules/simple-get/README.md +0 -333
- package/node_modules/simple-get/index.js +0 -108
- package/node_modules/simple-get/package.json +0 -67
- package/node_modules/string_decoder/LICENSE +0 -48
- package/node_modules/string_decoder/README.md +0 -47
- package/node_modules/string_decoder/lib/string_decoder.js +0 -296
- package/node_modules/string_decoder/package.json +0 -34
- package/node_modules/strip-json-comments/index.js +0 -70
- package/node_modules/strip-json-comments/license +0 -21
- package/node_modules/strip-json-comments/package.json +0 -42
- package/node_modules/strip-json-comments/readme.md +0 -64
- package/node_modules/tar-fs/.travis.yml +0 -6
- package/node_modules/tar-fs/LICENSE +0 -21
- package/node_modules/tar-fs/README.md +0 -165
- package/node_modules/tar-fs/index.js +0 -363
- package/node_modules/tar-fs/package.json +0 -41
- package/node_modules/tar-fs/test/fixtures/a/hello.txt +0 -1
- package/node_modules/tar-fs/test/fixtures/b/a/test.txt +0 -1
- 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 +0 -346
- package/node_modules/tar-stream/LICENSE +0 -21
- package/node_modules/tar-stream/README.md +0 -168
- package/node_modules/tar-stream/extract.js +0 -257
- package/node_modules/tar-stream/headers.js +0 -295
- package/node_modules/tar-stream/index.js +0 -2
- package/node_modules/tar-stream/pack.js +0 -255
- package/node_modules/tar-stream/package.json +0 -58
- package/node_modules/tar-stream/sandbox.js +0 -11
- package/node_modules/tunnel-agent/LICENSE +0 -55
- package/node_modules/tunnel-agent/README.md +0 -4
- package/node_modules/tunnel-agent/index.js +0 -244
- package/node_modules/tunnel-agent/package.json +0 -22
- package/node_modules/util-deprecate/History.md +0 -16
- package/node_modules/util-deprecate/LICENSE +0 -24
- package/node_modules/util-deprecate/README.md +0 -53
- package/node_modules/util-deprecate/browser.js +0 -67
- package/node_modules/util-deprecate/node.js +0 -6
- package/node_modules/util-deprecate/package.json +0 -27
package/dist/auth-cli.js
DELETED
|
@@ -1,472 +0,0 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
"use strict";
|
|
3
|
-
/**
|
|
4
|
-
* CLI OAuth Authentication for CodeVibe
|
|
5
|
-
*
|
|
6
|
-
* Usage:
|
|
7
|
-
* node auth-cli.js login - Authenticate via browser OAuth
|
|
8
|
-
* node auth-cli.js logout - Clear stored tokens
|
|
9
|
-
* node auth-cli.js status - Show current authentication status
|
|
10
|
-
*/
|
|
11
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
12
|
-
if (k2 === undefined) k2 = k;
|
|
13
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
14
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
15
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
16
|
-
}
|
|
17
|
-
Object.defineProperty(o, k2, desc);
|
|
18
|
-
}) : (function(o, m, k, k2) {
|
|
19
|
-
if (k2 === undefined) k2 = k;
|
|
20
|
-
o[k2] = m[k];
|
|
21
|
-
}));
|
|
22
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
23
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
24
|
-
}) : function(o, v) {
|
|
25
|
-
o["default"] = v;
|
|
26
|
-
});
|
|
27
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
28
|
-
var ownKeys = function(o) {
|
|
29
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
30
|
-
var ar = [];
|
|
31
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
32
|
-
return ar;
|
|
33
|
-
};
|
|
34
|
-
return ownKeys(o);
|
|
35
|
-
};
|
|
36
|
-
return function (mod) {
|
|
37
|
-
if (mod && mod.__esModule) return mod;
|
|
38
|
-
var result = {};
|
|
39
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
40
|
-
__setModuleDefault(result, mod);
|
|
41
|
-
return result;
|
|
42
|
-
};
|
|
43
|
-
})();
|
|
44
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
45
|
-
exports.refreshTokens = refreshTokens;
|
|
46
|
-
const crypto = __importStar(require("crypto"));
|
|
47
|
-
const http = __importStar(require("http"));
|
|
48
|
-
const path = __importStar(require("path"));
|
|
49
|
-
const child_process_1 = require("child_process");
|
|
50
|
-
const dotenv = __importStar(require("dotenv"));
|
|
51
|
-
// Load environment-specific .env file from the plugin directory
|
|
52
|
-
// Only load .env files if ENVIRONMENT is explicitly set (for development)
|
|
53
|
-
// This ensures marketplace users get production defaults without needing .env files
|
|
54
|
-
const pluginDir = path.resolve(__dirname, '..');
|
|
55
|
-
const environment = process.env.ENVIRONMENT || 'production';
|
|
56
|
-
if (process.env.ENVIRONMENT) {
|
|
57
|
-
const envFile = `.env.${environment}`;
|
|
58
|
-
dotenv.config({ path: path.join(pluginDir, envFile), debug: false });
|
|
59
|
-
// Fallback to default .env if environment-specific file didn't load
|
|
60
|
-
if (!process.env.APPSYNC_URL) {
|
|
61
|
-
dotenv.config({ path: path.join(pluginDir, '.env'), debug: false });
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
const config_1 = require("./config");
|
|
65
|
-
const logger_1 = require("./logger");
|
|
66
|
-
const token_storage_1 = require("./token-storage");
|
|
67
|
-
// OAuth configuration
|
|
68
|
-
const CALLBACK_PORT = 8080;
|
|
69
|
-
const CALLBACK_PATH = '/callback';
|
|
70
|
-
const REDIRECT_URI = `http://localhost:${CALLBACK_PORT}${CALLBACK_PATH}`;
|
|
71
|
-
// Colors for terminal output
|
|
72
|
-
const colors = {
|
|
73
|
-
reset: '\x1b[0m',
|
|
74
|
-
green: '\x1b[32m',
|
|
75
|
-
red: '\x1b[31m',
|
|
76
|
-
yellow: '\x1b[33m',
|
|
77
|
-
cyan: '\x1b[36m',
|
|
78
|
-
dim: '\x1b[2m',
|
|
79
|
-
};
|
|
80
|
-
/**
|
|
81
|
-
* Open URL in default browser
|
|
82
|
-
*/
|
|
83
|
-
function openBrowser(url) {
|
|
84
|
-
// macOS
|
|
85
|
-
(0, child_process_1.spawn)('open', [url], { detached: true, stdio: 'ignore' }).unref();
|
|
86
|
-
}
|
|
87
|
-
/**
|
|
88
|
-
* Generate a random state parameter for CSRF protection
|
|
89
|
-
*/
|
|
90
|
-
function generateState() {
|
|
91
|
-
return crypto.randomBytes(32).toString('hex');
|
|
92
|
-
}
|
|
93
|
-
/**
|
|
94
|
-
* Build the Cognito Hosted UI authorization URL
|
|
95
|
-
*/
|
|
96
|
-
function buildAuthUrl(state) {
|
|
97
|
-
const params = new URLSearchParams({
|
|
98
|
-
client_id: config_1.config.aws.cognitoClientId,
|
|
99
|
-
response_type: 'code',
|
|
100
|
-
scope: 'email openid profile',
|
|
101
|
-
redirect_uri: REDIRECT_URI,
|
|
102
|
-
state: state,
|
|
103
|
-
});
|
|
104
|
-
return `https://${config_1.config.aws.cognitoDomain}/oauth2/authorize?${params.toString()}`;
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Exchange authorization code for tokens
|
|
108
|
-
*/
|
|
109
|
-
async function exchangeCodeForTokens(code) {
|
|
110
|
-
const tokenUrl = `https://${config_1.config.aws.cognitoDomain}/oauth2/token`;
|
|
111
|
-
const params = new URLSearchParams({
|
|
112
|
-
grant_type: 'authorization_code',
|
|
113
|
-
client_id: config_1.config.aws.cognitoClientId,
|
|
114
|
-
code: code,
|
|
115
|
-
redirect_uri: REDIRECT_URI,
|
|
116
|
-
});
|
|
117
|
-
const response = await fetch(tokenUrl, {
|
|
118
|
-
method: 'POST',
|
|
119
|
-
headers: {
|
|
120
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
121
|
-
},
|
|
122
|
-
body: params.toString(),
|
|
123
|
-
});
|
|
124
|
-
if (!response.ok) {
|
|
125
|
-
const errorText = await response.text();
|
|
126
|
-
throw new Error(`Token exchange failed: ${response.status} ${errorText}`);
|
|
127
|
-
}
|
|
128
|
-
const data = await response.json();
|
|
129
|
-
return {
|
|
130
|
-
accessToken: data.access_token,
|
|
131
|
-
idToken: data.id_token,
|
|
132
|
-
refreshToken: data.refresh_token,
|
|
133
|
-
expiresIn: data.expires_in,
|
|
134
|
-
};
|
|
135
|
-
}
|
|
136
|
-
/**
|
|
137
|
-
* Decode JWT to extract user info
|
|
138
|
-
*/
|
|
139
|
-
function decodeJwt(token) {
|
|
140
|
-
const parts = token.split('.');
|
|
141
|
-
if (parts.length !== 3) {
|
|
142
|
-
throw new Error('Invalid JWT format');
|
|
143
|
-
}
|
|
144
|
-
const payload = Buffer.from(parts[1], 'base64').toString('utf-8');
|
|
145
|
-
return JSON.parse(payload);
|
|
146
|
-
}
|
|
147
|
-
/**
|
|
148
|
-
* Refresh tokens using refresh token
|
|
149
|
-
*/
|
|
150
|
-
async function refreshTokens(refreshToken) {
|
|
151
|
-
const tokenUrl = `https://${config_1.config.aws.cognitoDomain}/oauth2/token`;
|
|
152
|
-
const params = new URLSearchParams({
|
|
153
|
-
grant_type: 'refresh_token',
|
|
154
|
-
client_id: config_1.config.aws.cognitoClientId,
|
|
155
|
-
refresh_token: refreshToken,
|
|
156
|
-
});
|
|
157
|
-
const response = await fetch(tokenUrl, {
|
|
158
|
-
method: 'POST',
|
|
159
|
-
headers: {
|
|
160
|
-
'Content-Type': 'application/x-www-form-urlencoded',
|
|
161
|
-
},
|
|
162
|
-
body: params.toString(),
|
|
163
|
-
});
|
|
164
|
-
if (!response.ok) {
|
|
165
|
-
const errorText = await response.text();
|
|
166
|
-
throw new Error(`Token refresh failed: ${response.status} ${errorText}`);
|
|
167
|
-
}
|
|
168
|
-
const data = await response.json();
|
|
169
|
-
return {
|
|
170
|
-
accessToken: data.access_token,
|
|
171
|
-
idToken: data.id_token,
|
|
172
|
-
expiresIn: data.expires_in,
|
|
173
|
-
};
|
|
174
|
-
}
|
|
175
|
-
/**
|
|
176
|
-
* Login command - OAuth browser flow
|
|
177
|
-
*/
|
|
178
|
-
async function login() {
|
|
179
|
-
console.log(`${colors.cyan}CodeVibe Login${colors.reset}\n`);
|
|
180
|
-
// Check if already logged in
|
|
181
|
-
const existingTokens = (0, token_storage_1.loadTokens)();
|
|
182
|
-
if (existingTokens && !(0, token_storage_1.isTokenExpired)(existingTokens)) {
|
|
183
|
-
console.log(`${colors.yellow}Already logged in as: ${existingTokens.email}${colors.reset}`);
|
|
184
|
-
console.log(`Token expires: ${new Date(existingTokens.expiresAt).toLocaleString()}`);
|
|
185
|
-
console.log(`\nRun '${colors.dim}codevibe-claude logout${colors.reset}' to sign out first.`);
|
|
186
|
-
return;
|
|
187
|
-
}
|
|
188
|
-
// Generate state for CSRF protection
|
|
189
|
-
const state = generateState();
|
|
190
|
-
const authUrl = buildAuthUrl(state);
|
|
191
|
-
console.log('Opening browser for authentication...');
|
|
192
|
-
console.log(`${colors.dim}Waiting for callback on ${REDIRECT_URI}...${colors.reset}\n`);
|
|
193
|
-
// Start local server to receive callback
|
|
194
|
-
return new Promise((resolve, reject) => {
|
|
195
|
-
const server = http.createServer(async (req, res) => {
|
|
196
|
-
if (!req.url?.startsWith(CALLBACK_PATH)) {
|
|
197
|
-
res.writeHead(404);
|
|
198
|
-
res.end('Not found');
|
|
199
|
-
return;
|
|
200
|
-
}
|
|
201
|
-
try {
|
|
202
|
-
const url = new URL(req.url, `http://localhost:${CALLBACK_PORT}`);
|
|
203
|
-
const code = url.searchParams.get('code');
|
|
204
|
-
const returnedState = url.searchParams.get('state');
|
|
205
|
-
const error = url.searchParams.get('error');
|
|
206
|
-
const errorDescription = url.searchParams.get('error_description');
|
|
207
|
-
// Check for errors
|
|
208
|
-
if (error) {
|
|
209
|
-
throw new Error(`OAuth error: ${error} - ${errorDescription}`);
|
|
210
|
-
}
|
|
211
|
-
// Verify state
|
|
212
|
-
if (returnedState !== state) {
|
|
213
|
-
throw new Error('State mismatch - possible CSRF attack');
|
|
214
|
-
}
|
|
215
|
-
if (!code) {
|
|
216
|
-
throw new Error('No authorization code received');
|
|
217
|
-
}
|
|
218
|
-
// Exchange code for tokens
|
|
219
|
-
console.log('Exchanging authorization code for tokens...');
|
|
220
|
-
const tokens = await exchangeCodeForTokens(code);
|
|
221
|
-
// Decode ID token to get user info
|
|
222
|
-
const idTokenPayload = decodeJwt(tokens.idToken);
|
|
223
|
-
const userId = idTokenPayload.sub;
|
|
224
|
-
const email = idTokenPayload.email || 'unknown';
|
|
225
|
-
// Calculate expiration
|
|
226
|
-
const expiresAt = Date.now() + (tokens.expiresIn * 1000);
|
|
227
|
-
// Save tokens
|
|
228
|
-
const storedTokens = {
|
|
229
|
-
accessToken: tokens.accessToken,
|
|
230
|
-
idToken: tokens.idToken,
|
|
231
|
-
refreshToken: tokens.refreshToken,
|
|
232
|
-
expiresAt,
|
|
233
|
-
userId,
|
|
234
|
-
email,
|
|
235
|
-
};
|
|
236
|
-
(0, token_storage_1.saveTokens)(storedTokens);
|
|
237
|
-
// Send success response to browser
|
|
238
|
-
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
239
|
-
res.end(`
|
|
240
|
-
<!DOCTYPE html>
|
|
241
|
-
<html>
|
|
242
|
-
<head>
|
|
243
|
-
<meta charset="UTF-8">
|
|
244
|
-
<title>Authentication Successful</title>
|
|
245
|
-
<style>
|
|
246
|
-
body { font-family: system-ui; max-width: 600px; margin: 50px auto; text-align: center; }
|
|
247
|
-
.success { color: #22c55e; font-size: 48px; }
|
|
248
|
-
.info { color: #6b7280; margin-top: 20px; }
|
|
249
|
-
</style>
|
|
250
|
-
</head>
|
|
251
|
-
<body>
|
|
252
|
-
<div class="success">✓</div>
|
|
253
|
-
<h1>Authentication Successful!</h1>
|
|
254
|
-
<p>You are now signed in as <strong>${email}</strong></p>
|
|
255
|
-
<p class="info">You can close this window and return to the terminal.</p>
|
|
256
|
-
</body>
|
|
257
|
-
</html>
|
|
258
|
-
`);
|
|
259
|
-
// Print success to terminal
|
|
260
|
-
console.log(`\n${colors.green}✓ Authentication successful!${colors.reset}`);
|
|
261
|
-
console.log(` User: ${email}`);
|
|
262
|
-
console.log(` User ID: ${userId}`);
|
|
263
|
-
console.log(` Tokens stored in: ${(0, token_storage_1.getTokenFilePath)()}`);
|
|
264
|
-
console.log(` Expires: ${new Date(expiresAt).toLocaleString()}`);
|
|
265
|
-
// Close server after a short delay and exit
|
|
266
|
-
setTimeout(() => {
|
|
267
|
-
server.close(() => {
|
|
268
|
-
resolve();
|
|
269
|
-
process.exit(0);
|
|
270
|
-
});
|
|
271
|
-
}, 1000);
|
|
272
|
-
}
|
|
273
|
-
catch (error) {
|
|
274
|
-
logger_1.logger.error('OAuth callback error:', error);
|
|
275
|
-
// Send error response to browser
|
|
276
|
-
res.writeHead(400, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
277
|
-
res.end(`
|
|
278
|
-
<!DOCTYPE html>
|
|
279
|
-
<html>
|
|
280
|
-
<head>
|
|
281
|
-
<meta charset="UTF-8">
|
|
282
|
-
<title>Authentication Failed</title>
|
|
283
|
-
<style>
|
|
284
|
-
body { font-family: system-ui; max-width: 600px; margin: 50px auto; text-align: center; }
|
|
285
|
-
.error { color: #ef4444; font-size: 48px; }
|
|
286
|
-
.info { color: #6b7280; margin-top: 20px; }
|
|
287
|
-
</style>
|
|
288
|
-
</head>
|
|
289
|
-
<body>
|
|
290
|
-
<div class="error">✗</div>
|
|
291
|
-
<h1>Authentication Failed</h1>
|
|
292
|
-
<p>${error.message}</p>
|
|
293
|
-
<p class="info">Please try again.</p>
|
|
294
|
-
</body>
|
|
295
|
-
</html>
|
|
296
|
-
`);
|
|
297
|
-
console.log(`\n${colors.red}✗ Authentication failed${colors.reset}`);
|
|
298
|
-
console.log(` Error: ${error.message}`);
|
|
299
|
-
setTimeout(() => {
|
|
300
|
-
server.close(() => {
|
|
301
|
-
reject(error);
|
|
302
|
-
process.exit(1);
|
|
303
|
-
});
|
|
304
|
-
}, 1000);
|
|
305
|
-
}
|
|
306
|
-
});
|
|
307
|
-
// Handle server errors
|
|
308
|
-
server.on('error', (error) => {
|
|
309
|
-
if (error.code === 'EADDRINUSE') {
|
|
310
|
-
console.log(`${colors.red}Error: Port ${CALLBACK_PORT} is already in use.${colors.reset}`);
|
|
311
|
-
console.log('Please close any other applications using this port and try again.');
|
|
312
|
-
}
|
|
313
|
-
else {
|
|
314
|
-
console.log(`${colors.red}Server error: ${error.message}${colors.reset}`);
|
|
315
|
-
}
|
|
316
|
-
reject(error);
|
|
317
|
-
});
|
|
318
|
-
// Start server and open browser
|
|
319
|
-
server.listen(CALLBACK_PORT, 'localhost', () => {
|
|
320
|
-
logger_1.logger.info('OAuth callback server started', { port: CALLBACK_PORT });
|
|
321
|
-
openBrowser(authUrl);
|
|
322
|
-
});
|
|
323
|
-
// Timeout after 2 minutes
|
|
324
|
-
setTimeout(() => {
|
|
325
|
-
console.log(`\n${colors.yellow}Login timed out. Please try again.${colors.reset}`);
|
|
326
|
-
server.close(() => {
|
|
327
|
-
reject(new Error('Login timed out'));
|
|
328
|
-
process.exit(1);
|
|
329
|
-
});
|
|
330
|
-
}, 2 * 60 * 1000);
|
|
331
|
-
});
|
|
332
|
-
}
|
|
333
|
-
/**
|
|
334
|
-
* Logout command - clear stored tokens and browser session
|
|
335
|
-
*/
|
|
336
|
-
async function logout() {
|
|
337
|
-
console.log(`${colors.cyan}CodeVibe Logout${colors.reset}\n`);
|
|
338
|
-
const tokens = (0, token_storage_1.loadTokens)();
|
|
339
|
-
if (!tokens) {
|
|
340
|
-
console.log(`${colors.yellow}Not logged in.${colors.reset}`);
|
|
341
|
-
return;
|
|
342
|
-
}
|
|
343
|
-
const email = tokens.email;
|
|
344
|
-
const deleted = (0, token_storage_1.deleteTokens)();
|
|
345
|
-
if (!deleted) {
|
|
346
|
-
console.log(`${colors.red}✗ Failed to log out.${colors.reset}`);
|
|
347
|
-
return;
|
|
348
|
-
}
|
|
349
|
-
console.log(`${colors.green}✓ Local tokens cleared.${colors.reset}`);
|
|
350
|
-
console.log(` Previous user: ${email}`);
|
|
351
|
-
console.log(`\n${colors.dim}Clearing browser session...${colors.reset}`);
|
|
352
|
-
// Start a temporary server to receive the logout callback
|
|
353
|
-
return new Promise((resolve) => {
|
|
354
|
-
const server = http.createServer((req, res) => {
|
|
355
|
-
if (req.url?.startsWith('/signout')) {
|
|
356
|
-
// Send success page
|
|
357
|
-
res.writeHead(200, { 'Content-Type': 'text/html; charset=utf-8' });
|
|
358
|
-
res.end(`
|
|
359
|
-
<!DOCTYPE html>
|
|
360
|
-
<html>
|
|
361
|
-
<head>
|
|
362
|
-
<meta charset="UTF-8">
|
|
363
|
-
<title>Logged Out</title>
|
|
364
|
-
<style>
|
|
365
|
-
body { font-family: system-ui; max-width: 600px; margin: 50px auto; text-align: center; }
|
|
366
|
-
.success { color: #22c55e; font-size: 48px; }
|
|
367
|
-
.info { color: #6b7280; margin-top: 20px; }
|
|
368
|
-
</style>
|
|
369
|
-
</head>
|
|
370
|
-
<body>
|
|
371
|
-
<div class="success">✓</div>
|
|
372
|
-
<h1>Logged Out Successfully</h1>
|
|
373
|
-
<p>You have been signed out of CodeVibe.</p>
|
|
374
|
-
<p class="info">You can close this window.</p>
|
|
375
|
-
</body>
|
|
376
|
-
</html>
|
|
377
|
-
`);
|
|
378
|
-
console.log(`${colors.green}✓ Browser session cleared.${colors.reset}`);
|
|
379
|
-
// Close server and exit
|
|
380
|
-
setTimeout(() => {
|
|
381
|
-
server.close(() => {
|
|
382
|
-
resolve();
|
|
383
|
-
process.exit(0);
|
|
384
|
-
});
|
|
385
|
-
}, 500);
|
|
386
|
-
}
|
|
387
|
-
else {
|
|
388
|
-
res.writeHead(404);
|
|
389
|
-
res.end('Not found');
|
|
390
|
-
}
|
|
391
|
-
});
|
|
392
|
-
server.on('error', (error) => {
|
|
393
|
-
if (error.code === 'EADDRINUSE') {
|
|
394
|
-
console.log(`${colors.yellow}Could not clear browser session (port in use).${colors.reset}`);
|
|
395
|
-
}
|
|
396
|
-
resolve();
|
|
397
|
-
process.exit(0);
|
|
398
|
-
});
|
|
399
|
-
// Start server and open logout URL
|
|
400
|
-
server.listen(CALLBACK_PORT, 'localhost', () => {
|
|
401
|
-
const logoutUrl = `https://${config_1.config.aws.cognitoDomain}/logout?` +
|
|
402
|
-
`client_id=${config_1.config.aws.cognitoClientId}&` +
|
|
403
|
-
`logout_uri=${encodeURIComponent(REDIRECT_URI.replace('/callback', '/signout'))}`;
|
|
404
|
-
openBrowser(logoutUrl);
|
|
405
|
-
});
|
|
406
|
-
// Timeout after 10 seconds
|
|
407
|
-
setTimeout(() => {
|
|
408
|
-
console.log(`${colors.yellow}Browser session clear timed out.${colors.reset}`);
|
|
409
|
-
server.close(() => {
|
|
410
|
-
resolve();
|
|
411
|
-
process.exit(0);
|
|
412
|
-
});
|
|
413
|
-
}, 10000);
|
|
414
|
-
});
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
* Status command - show current authentication status
|
|
418
|
-
*/
|
|
419
|
-
async function status() {
|
|
420
|
-
console.log(`${colors.cyan}CodeVibe Auth Status${colors.reset}\n`);
|
|
421
|
-
const tokens = (0, token_storage_1.loadTokens)();
|
|
422
|
-
if (!tokens) {
|
|
423
|
-
console.log(`${colors.yellow}Not authenticated.${colors.reset}`);
|
|
424
|
-
console.log(`\nRun '${colors.dim}codevibe-claude login${colors.reset}' to sign in.`);
|
|
425
|
-
return;
|
|
426
|
-
}
|
|
427
|
-
const expired = (0, token_storage_1.isTokenExpired)(tokens);
|
|
428
|
-
const expiresDate = new Date(tokens.expiresAt);
|
|
429
|
-
if (expired) {
|
|
430
|
-
console.log(`${colors.yellow}⚠ Token expired${colors.reset}`);
|
|
431
|
-
}
|
|
432
|
-
else {
|
|
433
|
-
console.log(`${colors.green}✓ Authenticated${colors.reset}`);
|
|
434
|
-
}
|
|
435
|
-
console.log(` User: ${tokens.email}`);
|
|
436
|
-
console.log(` User ID: ${tokens.userId}`);
|
|
437
|
-
console.log(` Token expires: ${expiresDate.toLocaleString()}`);
|
|
438
|
-
console.log(` Token file: ${(0, token_storage_1.getTokenFilePath)()}`);
|
|
439
|
-
if (expired) {
|
|
440
|
-
console.log(`\n${colors.dim}Note: Token will be automatically refreshed on next use.${colors.reset}`);
|
|
441
|
-
}
|
|
442
|
-
}
|
|
443
|
-
/**
|
|
444
|
-
* Main CLI entry point
|
|
445
|
-
*/
|
|
446
|
-
async function main() {
|
|
447
|
-
const command = process.argv[2];
|
|
448
|
-
switch (command) {
|
|
449
|
-
case 'login':
|
|
450
|
-
await login();
|
|
451
|
-
break;
|
|
452
|
-
case 'logout':
|
|
453
|
-
await logout();
|
|
454
|
-
break;
|
|
455
|
-
case 'status':
|
|
456
|
-
await status();
|
|
457
|
-
break;
|
|
458
|
-
default:
|
|
459
|
-
console.log('CodeVibe Authentication\n');
|
|
460
|
-
console.log('Usage:');
|
|
461
|
-
console.log(' codevibe-claude login - Sign in via browser');
|
|
462
|
-
console.log(' codevibe-claude logout - Sign out');
|
|
463
|
-
console.log(' codevibe-claude status - Show auth status');
|
|
464
|
-
process.exit(1);
|
|
465
|
-
}
|
|
466
|
-
}
|
|
467
|
-
// Run CLI
|
|
468
|
-
main().catch((error) => {
|
|
469
|
-
logger_1.logger.error('Auth CLI error:', error);
|
|
470
|
-
process.exit(1);
|
|
471
|
-
});
|
|
472
|
-
//# sourceMappingURL=auth-cli.js.map
|
package/dist/command-executor.js
DELETED
|
@@ -1,127 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.CommandExecutor = void 0;
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const codevibe_core_1 = require("@quantiya/codevibe-core");
|
|
6
|
-
const logger_1 = require("./logger");
|
|
7
|
-
class CommandExecutor {
|
|
8
|
-
/**
|
|
9
|
-
* Execute a prompt in a specific Claude Code session
|
|
10
|
-
* @param sessionId The session ID to execute the prompt in
|
|
11
|
-
* @param prompt The prompt text to execute
|
|
12
|
-
* @returns Result of the command execution
|
|
13
|
-
*/
|
|
14
|
-
async executePrompt(sessionId, prompt) {
|
|
15
|
-
const config = (0, codevibe_core_1.getConfig)();
|
|
16
|
-
const timeout = config.claude.defaultTimeout;
|
|
17
|
-
logger_1.logger.info('Executing prompt from mobile', {
|
|
18
|
-
sessionId,
|
|
19
|
-
promptLength: prompt.length,
|
|
20
|
-
timeout,
|
|
21
|
-
});
|
|
22
|
-
return new Promise((resolve) => {
|
|
23
|
-
const args = [
|
|
24
|
-
'--resume', sessionId,
|
|
25
|
-
'--print',
|
|
26
|
-
'--output-format', 'stream-json',
|
|
27
|
-
prompt
|
|
28
|
-
];
|
|
29
|
-
logger_1.logger.debug('Spawning Claude command', {
|
|
30
|
-
command: config.claude.command,
|
|
31
|
-
args,
|
|
32
|
-
});
|
|
33
|
-
const child = (0, child_process_1.spawn)(config.claude.command, args, {
|
|
34
|
-
stdio: ['pipe', 'pipe', 'pipe'],
|
|
35
|
-
shell: true,
|
|
36
|
-
});
|
|
37
|
-
let stdout = '';
|
|
38
|
-
let stderr = '';
|
|
39
|
-
let timedOut = false;
|
|
40
|
-
// Set timeout
|
|
41
|
-
const timer = setTimeout(() => {
|
|
42
|
-
timedOut = true;
|
|
43
|
-
logger_1.logger.warn('Command execution timed out', { sessionId, timeout });
|
|
44
|
-
child.kill('SIGTERM');
|
|
45
|
-
}, timeout);
|
|
46
|
-
// Capture stdout
|
|
47
|
-
child.stdout?.on('data', (data) => {
|
|
48
|
-
const output = data.toString();
|
|
49
|
-
stdout += output;
|
|
50
|
-
logger_1.logger.debug('Command stdout', { output: output.slice(0, 200) });
|
|
51
|
-
});
|
|
52
|
-
// Capture stderr
|
|
53
|
-
child.stderr?.on('data', (data) => {
|
|
54
|
-
const output = data.toString();
|
|
55
|
-
stderr += output;
|
|
56
|
-
logger_1.logger.debug('Command stderr', { output: output.slice(0, 200) });
|
|
57
|
-
});
|
|
58
|
-
// Handle process exit
|
|
59
|
-
child.on('close', (code) => {
|
|
60
|
-
clearTimeout(timer);
|
|
61
|
-
const result = {
|
|
62
|
-
success: code === 0 && !timedOut,
|
|
63
|
-
output: stdout,
|
|
64
|
-
error: stderr,
|
|
65
|
-
exitCode: code || undefined,
|
|
66
|
-
timedOut,
|
|
67
|
-
};
|
|
68
|
-
if (result.success) {
|
|
69
|
-
logger_1.logger.info('Command executed successfully', {
|
|
70
|
-
sessionId,
|
|
71
|
-
exitCode: code,
|
|
72
|
-
outputLength: stdout.length,
|
|
73
|
-
});
|
|
74
|
-
}
|
|
75
|
-
else {
|
|
76
|
-
logger_1.logger.error('Command execution failed', {
|
|
77
|
-
sessionId,
|
|
78
|
-
exitCode: code,
|
|
79
|
-
timedOut,
|
|
80
|
-
error: stderr.slice(0, 500),
|
|
81
|
-
});
|
|
82
|
-
}
|
|
83
|
-
resolve(result);
|
|
84
|
-
});
|
|
85
|
-
// Handle errors
|
|
86
|
-
child.on('error', (error) => {
|
|
87
|
-
clearTimeout(timer);
|
|
88
|
-
logger_1.logger.error('Failed to spawn command', { error: error.message });
|
|
89
|
-
resolve({
|
|
90
|
-
success: false,
|
|
91
|
-
error: error.message,
|
|
92
|
-
timedOut: false,
|
|
93
|
-
});
|
|
94
|
-
});
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
/**
|
|
98
|
-
* Check if interactive prompt is present in output
|
|
99
|
-
* This is a simple heuristic - looks for common prompt patterns
|
|
100
|
-
*/
|
|
101
|
-
detectInteractivePrompt(output) {
|
|
102
|
-
const patterns = [
|
|
103
|
-
/\[Y\/n\]/i,
|
|
104
|
-
/\[y\/N\]/i,
|
|
105
|
-
/\(y\/n\)/i,
|
|
106
|
-
/Continue\?/i,
|
|
107
|
-
/Proceed\?/i,
|
|
108
|
-
];
|
|
109
|
-
return patterns.some(pattern => pattern.test(output));
|
|
110
|
-
}
|
|
111
|
-
/**
|
|
112
|
-
* Extract interactive prompt text from output
|
|
113
|
-
*/
|
|
114
|
-
extractPromptText(output) {
|
|
115
|
-
// Look for lines that end with prompt patterns
|
|
116
|
-
const lines = output.split('\n');
|
|
117
|
-
for (let i = lines.length - 1; i >= 0; i--) {
|
|
118
|
-
const line = lines[i].trim();
|
|
119
|
-
if (this.detectInteractivePrompt(line)) {
|
|
120
|
-
return line;
|
|
121
|
-
}
|
|
122
|
-
}
|
|
123
|
-
return null;
|
|
124
|
-
}
|
|
125
|
-
}
|
|
126
|
-
exports.CommandExecutor = CommandExecutor;
|
|
127
|
-
//# sourceMappingURL=command-executor.js.map
|