@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/prompt-responder.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.PromptResponder = void 0;
|
|
4
|
-
const child_process_1 = require("child_process");
|
|
5
|
-
const util_1 = require("util");
|
|
6
|
-
const logger_1 = require("./logger");
|
|
7
|
-
const execAsync = (0, util_1.promisify)(child_process_1.exec);
|
|
8
|
-
class PromptResponder {
|
|
9
|
-
/**
|
|
10
|
-
* Answer an interactive prompt by sending input to the waiting Claude process
|
|
11
|
-
* Requires tmux session (set by codevibe-claude wrapper)
|
|
12
|
-
*/
|
|
13
|
-
async answerInteractivePrompt(sessionId, response) {
|
|
14
|
-
logger_1.logger.info('Attempting to answer interactive prompt', {
|
|
15
|
-
sessionId,
|
|
16
|
-
response,
|
|
17
|
-
});
|
|
18
|
-
try {
|
|
19
|
-
// Check if running in tmux (set by codevibe-claude wrapper)
|
|
20
|
-
const tmuxSession = process.env.CODEVIBE_TMUX_SESSION;
|
|
21
|
-
logger_1.logger.info('Checking tmux session environment', {
|
|
22
|
-
tmuxSession: tmuxSession || '(not set)',
|
|
23
|
-
allEnvKeys: Object.keys(process.env).filter(k => k.includes('CODEVIBE') || k.includes('TMUX')),
|
|
24
|
-
});
|
|
25
|
-
if (!tmuxSession) {
|
|
26
|
-
logger_1.logger.error('No tmux session found - codevibe-claude wrapper is required', {
|
|
27
|
-
sessionId,
|
|
28
|
-
hint: 'Start Claude Code using the codevibe-claude wrapper script',
|
|
29
|
-
});
|
|
30
|
-
return false;
|
|
31
|
-
}
|
|
32
|
-
// Use tmux send-keys (works even when screen is locked)
|
|
33
|
-
logger_1.logger.info('Using tmux send-keys', { tmuxSession });
|
|
34
|
-
await this.sendViaTmux(tmuxSession, response);
|
|
35
|
-
logger_1.logger.info('Successfully sent response to interactive prompt', {
|
|
36
|
-
sessionId,
|
|
37
|
-
response,
|
|
38
|
-
});
|
|
39
|
-
return true;
|
|
40
|
-
}
|
|
41
|
-
catch (error) {
|
|
42
|
-
logger_1.logger.error('Failed to answer interactive prompt', {
|
|
43
|
-
sessionId,
|
|
44
|
-
error: error instanceof Error ? error.message : String(error),
|
|
45
|
-
});
|
|
46
|
-
return false;
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
/**
|
|
50
|
-
* Send input via tmux send-keys
|
|
51
|
-
* Works even when screen is locked - this is the only supported method
|
|
52
|
-
*/
|
|
53
|
-
async sendViaTmux(sessionName, input) {
|
|
54
|
-
// Escape special characters for tmux
|
|
55
|
-
// tmux send-keys interprets certain sequences, so we need to escape them
|
|
56
|
-
const escaped = input
|
|
57
|
-
.replace(/\\/g, '\\\\') // Escape backslashes first
|
|
58
|
-
.replace(/"/g, '\\"') // Escape double quotes
|
|
59
|
-
.replace(/\$/g, '\\$') // Escape dollar signs
|
|
60
|
-
.replace(/`/g, '\\`'); // Escape backticks
|
|
61
|
-
logger_1.logger.info('Sending via tmux', { sessionName, inputLength: input.length });
|
|
62
|
-
try {
|
|
63
|
-
// Step 1: Send the input text (without Enter)
|
|
64
|
-
const textCmd = `tmux send-keys -t "${sessionName}" -l "${escaped}"`;
|
|
65
|
-
const textResult = await execAsync(textCmd);
|
|
66
|
-
logger_1.logger.info('tmux send-keys (text) completed', {
|
|
67
|
-
stdout: textResult.stdout || '(empty)',
|
|
68
|
-
stderr: textResult.stderr || '(empty)'
|
|
69
|
-
});
|
|
70
|
-
// Step 2: Wait for the text to be processed by the terminal
|
|
71
|
-
// Longer delay needed for Claude Code's interactive prompts
|
|
72
|
-
await this.delay(500);
|
|
73
|
-
// Step 3: Send Enter key separately
|
|
74
|
-
const enterCmd = `tmux send-keys -t "${sessionName}" Enter`;
|
|
75
|
-
const enterResult = await execAsync(enterCmd);
|
|
76
|
-
logger_1.logger.info('tmux send-keys (Enter) completed', {
|
|
77
|
-
stdout: enterResult.stdout || '(empty)',
|
|
78
|
-
stderr: enterResult.stderr || '(empty)'
|
|
79
|
-
});
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
logger_1.logger.error('tmux send-keys failed', { sessionName, error });
|
|
83
|
-
throw error;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
|
-
/**
|
|
87
|
-
* Simple delay helper
|
|
88
|
-
*/
|
|
89
|
-
delay(ms) {
|
|
90
|
-
return new Promise(resolve => setTimeout(resolve, ms));
|
|
91
|
-
}
|
|
92
|
-
/**
|
|
93
|
-
* Check if a response looks like an answer to an interactive prompt
|
|
94
|
-
* Covers Y/N prompts, numbered choices, and other common responses
|
|
95
|
-
*/
|
|
96
|
-
isPromptResponse(content) {
|
|
97
|
-
const normalized = content.trim().toLowerCase();
|
|
98
|
-
// Y/N responses
|
|
99
|
-
if (normalized === 'y' ||
|
|
100
|
-
normalized === 'n' ||
|
|
101
|
-
normalized === 'yes' ||
|
|
102
|
-
normalized === 'no') {
|
|
103
|
-
return true;
|
|
104
|
-
}
|
|
105
|
-
// Numbered choices (1-9, or just digits)
|
|
106
|
-
if (/^[0-9]+$/.test(normalized)) {
|
|
107
|
-
return true;
|
|
108
|
-
}
|
|
109
|
-
// Single letter choices (a, b, c, etc.)
|
|
110
|
-
if (/^[a-z]$/.test(normalized)) {
|
|
111
|
-
return true;
|
|
112
|
-
}
|
|
113
|
-
// Common terminal control inputs
|
|
114
|
-
// These are typically responses to prompts, not new commands
|
|
115
|
-
const controlInputs = [
|
|
116
|
-
'exit',
|
|
117
|
-
'quit',
|
|
118
|
-
'q',
|
|
119
|
-
'continue',
|
|
120
|
-
'skip',
|
|
121
|
-
'abort',
|
|
122
|
-
'retry',
|
|
123
|
-
'cancel',
|
|
124
|
-
];
|
|
125
|
-
if (controlInputs.includes(normalized)) {
|
|
126
|
-
return true;
|
|
127
|
-
}
|
|
128
|
-
return false;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
exports.PromptResponder = PromptResponder;
|
|
132
|
-
//# sourceMappingURL=prompt-responder.js.map
|
package/dist/token-storage.js
DELETED
|
@@ -1,169 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.saveTokens = saveTokens;
|
|
37
|
-
exports.loadTokens = loadTokens;
|
|
38
|
-
exports.deleteTokens = deleteTokens;
|
|
39
|
-
exports.isTokenExpired = isTokenExpired;
|
|
40
|
-
exports.isAuthenticated = isAuthenticated;
|
|
41
|
-
exports.getTokenFilePath = getTokenFilePath;
|
|
42
|
-
exports.getTokenExpiration = getTokenExpiration;
|
|
43
|
-
const fs = __importStar(require("fs"));
|
|
44
|
-
const path = __importStar(require("path"));
|
|
45
|
-
const os = __importStar(require("os"));
|
|
46
|
-
const logger_1 = require("./logger");
|
|
47
|
-
// Token storage location - environment-specific
|
|
48
|
-
const TOKEN_DIR = path.join(os.homedir(), '.codevibe-claude');
|
|
49
|
-
// Get environment-specific token file
|
|
50
|
-
function getTokenFile() {
|
|
51
|
-
const environment = process.env.ENVIRONMENT || 'production';
|
|
52
|
-
return path.join(TOKEN_DIR, `tokens-${environment}.json`);
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Ensure the token directory exists with proper permissions
|
|
56
|
-
*/
|
|
57
|
-
function ensureTokenDir() {
|
|
58
|
-
if (!fs.existsSync(TOKEN_DIR)) {
|
|
59
|
-
fs.mkdirSync(TOKEN_DIR, { mode: 0o700 }); // rwx------
|
|
60
|
-
logger_1.logger.debug('Created token directory', { path: TOKEN_DIR });
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
/**
|
|
64
|
-
* Save tokens to secure file storage
|
|
65
|
-
*/
|
|
66
|
-
function saveTokens(tokens) {
|
|
67
|
-
try {
|
|
68
|
-
ensureTokenDir();
|
|
69
|
-
const tokenFile = getTokenFile();
|
|
70
|
-
const content = JSON.stringify(tokens, null, 2);
|
|
71
|
-
fs.writeFileSync(tokenFile, content, { mode: 0o600 }); // rw-------
|
|
72
|
-
logger_1.logger.info('Tokens saved successfully', {
|
|
73
|
-
userId: tokens.userId,
|
|
74
|
-
email: tokens.email,
|
|
75
|
-
expiresAt: new Date(tokens.expiresAt).toISOString(),
|
|
76
|
-
environment: process.env.ENVIRONMENT || 'production',
|
|
77
|
-
});
|
|
78
|
-
}
|
|
79
|
-
catch (error) {
|
|
80
|
-
logger_1.logger.error('Failed to save tokens:', error);
|
|
81
|
-
throw new Error(`Failed to save tokens: ${error}`);
|
|
82
|
-
}
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Load tokens from secure file storage
|
|
86
|
-
* Returns null if no tokens are stored or if they're invalid
|
|
87
|
-
*/
|
|
88
|
-
function loadTokens() {
|
|
89
|
-
try {
|
|
90
|
-
const tokenFile = getTokenFile();
|
|
91
|
-
if (!fs.existsSync(tokenFile)) {
|
|
92
|
-
logger_1.logger.debug('No tokens file found', { environment: process.env.ENVIRONMENT || 'production' });
|
|
93
|
-
return null;
|
|
94
|
-
}
|
|
95
|
-
const content = fs.readFileSync(tokenFile, 'utf-8');
|
|
96
|
-
const tokens = JSON.parse(content);
|
|
97
|
-
// Validate required fields
|
|
98
|
-
if (!tokens.accessToken || !tokens.refreshToken || !tokens.expiresAt) {
|
|
99
|
-
logger_1.logger.warn('Invalid tokens file - missing required fields');
|
|
100
|
-
return null;
|
|
101
|
-
}
|
|
102
|
-
logger_1.logger.debug('Tokens loaded', {
|
|
103
|
-
userId: tokens.userId,
|
|
104
|
-
email: tokens.email,
|
|
105
|
-
expiresAt: new Date(tokens.expiresAt).toISOString(),
|
|
106
|
-
isExpired: isTokenExpired(tokens),
|
|
107
|
-
});
|
|
108
|
-
return tokens;
|
|
109
|
-
}
|
|
110
|
-
catch (error) {
|
|
111
|
-
logger_1.logger.error('Failed to load tokens:', error);
|
|
112
|
-
return null;
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Delete stored tokens (logout)
|
|
117
|
-
*/
|
|
118
|
-
function deleteTokens() {
|
|
119
|
-
try {
|
|
120
|
-
const tokenFile = getTokenFile();
|
|
121
|
-
if (fs.existsSync(tokenFile)) {
|
|
122
|
-
fs.unlinkSync(tokenFile);
|
|
123
|
-
logger_1.logger.info('Tokens deleted successfully', { environment: process.env.ENVIRONMENT || 'production' });
|
|
124
|
-
return true;
|
|
125
|
-
}
|
|
126
|
-
logger_1.logger.debug('No tokens file to delete', { environment: process.env.ENVIRONMENT || 'production' });
|
|
127
|
-
return false;
|
|
128
|
-
}
|
|
129
|
-
catch (error) {
|
|
130
|
-
logger_1.logger.error('Failed to delete tokens:', error);
|
|
131
|
-
return false;
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
/**
|
|
135
|
-
* Check if the access token is expired or about to expire
|
|
136
|
-
* Considers token expired if less than 5 minutes remaining
|
|
137
|
-
*/
|
|
138
|
-
function isTokenExpired(tokens) {
|
|
139
|
-
const bufferMs = 5 * 60 * 1000; // 5 minutes buffer
|
|
140
|
-
return Date.now() >= (tokens.expiresAt - bufferMs);
|
|
141
|
-
}
|
|
142
|
-
/**
|
|
143
|
-
* Check if user is authenticated (has valid, non-expired tokens)
|
|
144
|
-
*/
|
|
145
|
-
function isAuthenticated() {
|
|
146
|
-
const tokens = loadTokens();
|
|
147
|
-
if (!tokens) {
|
|
148
|
-
return false;
|
|
149
|
-
}
|
|
150
|
-
// Even if access token is expired, we can refresh if we have a refresh token
|
|
151
|
-
return !!tokens.refreshToken;
|
|
152
|
-
}
|
|
153
|
-
/**
|
|
154
|
-
* Get the token file path (for display purposes)
|
|
155
|
-
*/
|
|
156
|
-
function getTokenFilePath() {
|
|
157
|
-
return getTokenFile();
|
|
158
|
-
}
|
|
159
|
-
/**
|
|
160
|
-
* Get token expiration date
|
|
161
|
-
*/
|
|
162
|
-
function getTokenExpiration() {
|
|
163
|
-
const tokens = loadTokens();
|
|
164
|
-
if (!tokens) {
|
|
165
|
-
return null;
|
|
166
|
-
}
|
|
167
|
-
return new Date(tokens.expiresAt);
|
|
168
|
-
}
|
|
169
|
-
//# sourceMappingURL=token-storage.js.map
|
package/dist/types.js
DELETED
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// types.ts
|
|
4
|
-
// CodeVibe Claude Plugin
|
|
5
|
-
//
|
|
6
|
-
// Re-export shared types from codevibe-core and define plugin-specific types
|
|
7
|
-
//
|
|
8
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.AgentType = exports.SessionStatus = exports.DeliveryStatus = exports.EventSource = exports.EventType = void 0;
|
|
10
|
-
// Re-export all shared types from core
|
|
11
|
-
var codevibe_core_1 = require("@quantiya/codevibe-core");
|
|
12
|
-
Object.defineProperty(exports, "EventType", { enumerable: true, get: function () { return codevibe_core_1.EventType; } });
|
|
13
|
-
Object.defineProperty(exports, "EventSource", { enumerable: true, get: function () { return codevibe_core_1.EventSource; } });
|
|
14
|
-
Object.defineProperty(exports, "DeliveryStatus", { enumerable: true, get: function () { return codevibe_core_1.DeliveryStatus; } });
|
|
15
|
-
Object.defineProperty(exports, "SessionStatus", { enumerable: true, get: function () { return codevibe_core_1.SessionStatus; } });
|
|
16
|
-
Object.defineProperty(exports, "AgentType", { enumerable: true, get: function () { return codevibe_core_1.AgentType; } });
|
|
17
|
-
//# sourceMappingURL=types.js.map
|
|
@@ -1,170 +0,0 @@
|
|
|
1
|
-
# @quantiya/codevibe-core
|
|
2
|
-
|
|
3
|
-
Core library for CodeVibe plugins - shared keychain, crypto, AppSync, and authentication functionality.
|
|
4
|
-
|
|
5
|
-
## Installation
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @quantiya/codevibe-core
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
## Features
|
|
12
|
-
|
|
13
|
-
- **Keychain Management** - Secure storage for device keys and OAuth tokens using native keychain (macOS Keychain, Linux libsecret, Windows Credential Manager)
|
|
14
|
-
- **Cryptographic Services** - E2E encryption using ECDH P-256 and AES-256-GCM
|
|
15
|
-
- **AppSync Client** - GraphQL API and WebSocket subscriptions for AWS AppSync
|
|
16
|
-
- **Authentication CLI** - Browser-based OAuth login/logout commands
|
|
17
|
-
- **Shared Types** - TypeScript interfaces for events, sessions, encryption
|
|
18
|
-
|
|
19
|
-
## CLI Usage
|
|
20
|
-
|
|
21
|
-
```bash
|
|
22
|
-
# Sign in via browser (opens Cognito Hosted UI)
|
|
23
|
-
codevibe login
|
|
24
|
-
|
|
25
|
-
# Sign out
|
|
26
|
-
codevibe logout
|
|
27
|
-
|
|
28
|
-
# Check authentication status
|
|
29
|
-
codevibe status
|
|
30
|
-
|
|
31
|
-
# Reset device identity (destructive - old sessions become inaccessible)
|
|
32
|
-
codevibe reset-device
|
|
33
|
-
|
|
34
|
-
# Use specific environment
|
|
35
|
-
codevibe --env development login
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
## API Usage
|
|
39
|
-
|
|
40
|
-
### Keychain Manager
|
|
41
|
-
|
|
42
|
-
```typescript
|
|
43
|
-
import { keychainManager, DeviceIdentity } from '@quantiya/codevibe-core';
|
|
44
|
-
|
|
45
|
-
// Get or create device identity (stored in native keychain)
|
|
46
|
-
const identity = await keychainManager.getOrCreateDeviceIdentity();
|
|
47
|
-
console.log(identity.deviceId, identity.publicKey);
|
|
48
|
-
|
|
49
|
-
// Get OAuth tokens
|
|
50
|
-
const tokens = await keychainManager.getTokens('production');
|
|
51
|
-
if (tokens) {
|
|
52
|
-
console.log(tokens.email, tokens.userId);
|
|
53
|
-
}
|
|
54
|
-
```
|
|
55
|
-
|
|
56
|
-
### Crypto Service
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
import { cryptoService } from '@quantiya/codevibe-core';
|
|
60
|
-
|
|
61
|
-
// Generate key pair
|
|
62
|
-
const keyPair = cryptoService.generateKeyPair();
|
|
63
|
-
|
|
64
|
-
// Generate session key
|
|
65
|
-
const sessionKey = cryptoService.generateSessionKey();
|
|
66
|
-
|
|
67
|
-
// Encrypt content
|
|
68
|
-
const encrypted = cryptoService.encryptContent('Hello World', sessionKey);
|
|
69
|
-
|
|
70
|
-
// Decrypt content
|
|
71
|
-
const decrypted = cryptoService.decryptContent(encrypted, sessionKey);
|
|
72
|
-
```
|
|
73
|
-
|
|
74
|
-
### AppSync Client
|
|
75
|
-
|
|
76
|
-
```typescript
|
|
77
|
-
import { AppSyncClient, loadConfig } from '@quantiya/codevibe-core';
|
|
78
|
-
|
|
79
|
-
// Load environment configuration
|
|
80
|
-
loadConfig('production');
|
|
81
|
-
|
|
82
|
-
// Create client
|
|
83
|
-
const client = new AppSyncClient('production');
|
|
84
|
-
|
|
85
|
-
// Authenticate with stored tokens
|
|
86
|
-
const authenticated = await client.authenticateWithStoredTokens();
|
|
87
|
-
if (!authenticated) {
|
|
88
|
-
console.log('Run "codevibe login" first');
|
|
89
|
-
process.exit(1);
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
// Create session
|
|
93
|
-
const session = await client.createSession({
|
|
94
|
-
userId: client.getCurrentUserId(),
|
|
95
|
-
agentType: 'CLAUDE',
|
|
96
|
-
projectPath: '/path/to/project',
|
|
97
|
-
});
|
|
98
|
-
|
|
99
|
-
// Subscribe to events
|
|
100
|
-
const unsubscribe = client.subscribeToEvents(session.sessionId, (event) => {
|
|
101
|
-
console.log('Event received:', event);
|
|
102
|
-
});
|
|
103
|
-
|
|
104
|
-
// Clean up
|
|
105
|
-
unsubscribe();
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
### Auth Service
|
|
109
|
-
|
|
110
|
-
```typescript
|
|
111
|
-
import { authService, loadConfig } from '@quantiya/codevibe-core';
|
|
112
|
-
|
|
113
|
-
// Set environment
|
|
114
|
-
loadConfig('production');
|
|
115
|
-
authService.setEnvironment('production');
|
|
116
|
-
|
|
117
|
-
// Login (opens browser)
|
|
118
|
-
const tokens = await authService.login();
|
|
119
|
-
|
|
120
|
-
// Check status
|
|
121
|
-
const status = await authService.getStatus();
|
|
122
|
-
console.log(status.authenticated, status.tokens?.email);
|
|
123
|
-
|
|
124
|
-
// Logout
|
|
125
|
-
await authService.logout();
|
|
126
|
-
```
|
|
127
|
-
|
|
128
|
-
## Keychain Storage
|
|
129
|
-
|
|
130
|
-
All sensitive data is stored in the native system keychain:
|
|
131
|
-
|
|
132
|
-
- **Service Name:** `ai.quantiya.app.codevibe`
|
|
133
|
-
- **Device Identity:** Stored as `device-identity` account
|
|
134
|
-
- **Tokens:** Stored as `tokens-{environment}` accounts (e.g., `tokens-production`)
|
|
135
|
-
|
|
136
|
-
This ensures:
|
|
137
|
-
- Data persists across terminal sessions
|
|
138
|
-
- Data is encrypted at rest by the OS
|
|
139
|
-
- Data survives plugin reinstalls/updates
|
|
140
|
-
- Device identity is shared across all CodeVibe plugins
|
|
141
|
-
|
|
142
|
-
## Security
|
|
143
|
-
|
|
144
|
-
- Device keys are ECDH P-256 key pairs
|
|
145
|
-
- Session keys are 256-bit AES keys
|
|
146
|
-
- Content is encrypted with AES-256-GCM
|
|
147
|
-
- Session keys are encrypted per-device using ECDH
|
|
148
|
-
- OAuth tokens are stored securely in native keychain
|
|
149
|
-
|
|
150
|
-
## Development
|
|
151
|
-
|
|
152
|
-
```bash
|
|
153
|
-
# Install dependencies
|
|
154
|
-
npm install
|
|
155
|
-
|
|
156
|
-
# Build
|
|
157
|
-
npm run build
|
|
158
|
-
|
|
159
|
-
# Watch mode
|
|
160
|
-
npm run watch
|
|
161
|
-
|
|
162
|
-
# Local development with plugin
|
|
163
|
-
npm link
|
|
164
|
-
cd ../codevibe-claude-plugin
|
|
165
|
-
npm link @quantiya/codevibe-core
|
|
166
|
-
```
|
|
167
|
-
|
|
168
|
-
## License
|
|
169
|
-
|
|
170
|
-
MIT
|
|
@@ -1,132 +0,0 @@
|
|
|
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
|
-
}
|