@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/http-api.js
DELETED
|
@@ -1,334 +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
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
36
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.HttpApi = void 0;
|
|
40
|
-
const express_1 = __importDefault(require("express"));
|
|
41
|
-
const fs = __importStar(require("fs"));
|
|
42
|
-
const path = __importStar(require("path"));
|
|
43
|
-
const os = __importStar(require("os"));
|
|
44
|
-
const codevibe_core_1 = require("@quantiya/codevibe-core");
|
|
45
|
-
const logger_1 = require("./logger");
|
|
46
|
-
const types_1 = require("./types");
|
|
47
|
-
class HttpApi {
|
|
48
|
-
constructor() {
|
|
49
|
-
this.assignedPort = 0;
|
|
50
|
-
this.app = (0, express_1.default)();
|
|
51
|
-
this.setupMiddleware();
|
|
52
|
-
this.setupRoutes();
|
|
53
|
-
}
|
|
54
|
-
/**
|
|
55
|
-
* Set the session ID for this server instance (used for port file naming)
|
|
56
|
-
*/
|
|
57
|
-
setSessionId(sessionId) {
|
|
58
|
-
this.sessionId = sessionId;
|
|
59
|
-
}
|
|
60
|
-
/**
|
|
61
|
-
* Get the assigned port after server starts
|
|
62
|
-
*/
|
|
63
|
-
getPort() {
|
|
64
|
-
return this.assignedPort;
|
|
65
|
-
}
|
|
66
|
-
setupMiddleware() {
|
|
67
|
-
// Parse JSON bodies
|
|
68
|
-
this.app.use(express_1.default.json({ limit: '1mb' }));
|
|
69
|
-
// Request logging
|
|
70
|
-
this.app.use((req, res, next) => {
|
|
71
|
-
logger_1.logger.debug(`${req.method} ${req.path}`, {
|
|
72
|
-
body: req.body,
|
|
73
|
-
query: req.query,
|
|
74
|
-
});
|
|
75
|
-
next();
|
|
76
|
-
});
|
|
77
|
-
// Error handling middleware
|
|
78
|
-
this.app.use((err, req, res, next) => {
|
|
79
|
-
logger_1.logger.error('Express error:', err);
|
|
80
|
-
const response = {
|
|
81
|
-
success: false,
|
|
82
|
-
error: err.message || 'Internal server error',
|
|
83
|
-
};
|
|
84
|
-
res.status(500).json(response);
|
|
85
|
-
});
|
|
86
|
-
}
|
|
87
|
-
setupRoutes() {
|
|
88
|
-
// Health check endpoint
|
|
89
|
-
this.app.get('/health', this.handleHealth.bind(this));
|
|
90
|
-
// Event endpoint for hooks
|
|
91
|
-
this.app.post('/event', this.handleEvent.bind(this));
|
|
92
|
-
// Development testing endpoint
|
|
93
|
-
if (process.env.NODE_ENV !== 'production') {
|
|
94
|
-
this.app.post('/test/execute', this.handleTestExecute.bind(this));
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
handleHealth(req, res) {
|
|
98
|
-
const response = {
|
|
99
|
-
success: true,
|
|
100
|
-
data: {
|
|
101
|
-
status: 'healthy',
|
|
102
|
-
uptime: process.uptime(),
|
|
103
|
-
version: '0.1.0',
|
|
104
|
-
timestamp: new Date().toISOString(),
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
res.json(response);
|
|
108
|
-
}
|
|
109
|
-
async handleEvent(req, res) {
|
|
110
|
-
try {
|
|
111
|
-
const hookInput = req.body;
|
|
112
|
-
// Validate required fields
|
|
113
|
-
if (!hookInput.session_id) {
|
|
114
|
-
const response = {
|
|
115
|
-
success: false,
|
|
116
|
-
error: 'Missing required field: session_id',
|
|
117
|
-
};
|
|
118
|
-
res.status(400).json(response);
|
|
119
|
-
return;
|
|
120
|
-
}
|
|
121
|
-
if (!hookInput.hook_event_name) {
|
|
122
|
-
const response = {
|
|
123
|
-
success: false,
|
|
124
|
-
error: 'Missing required field: hook_event_name',
|
|
125
|
-
};
|
|
126
|
-
res.status(400).json(response);
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
// Transform hook input to event payload
|
|
130
|
-
const eventPayload = this.transformHookToEvent(hookInput);
|
|
131
|
-
logger_1.logger.info('Received event from hook', {
|
|
132
|
-
sessionId: hookInput.session_id,
|
|
133
|
-
hookEvent: hookInput.hook_event_name,
|
|
134
|
-
type: eventPayload.type,
|
|
135
|
-
});
|
|
136
|
-
// Call event handler if registered
|
|
137
|
-
if (this.eventHandler) {
|
|
138
|
-
await this.eventHandler(eventPayload);
|
|
139
|
-
}
|
|
140
|
-
else {
|
|
141
|
-
logger_1.logger.warn('No event handler registered');
|
|
142
|
-
}
|
|
143
|
-
const response = {
|
|
144
|
-
success: true,
|
|
145
|
-
message: 'Event processed successfully',
|
|
146
|
-
};
|
|
147
|
-
res.json(response);
|
|
148
|
-
}
|
|
149
|
-
catch (error) {
|
|
150
|
-
logger_1.logger.error('Error handling event:', error);
|
|
151
|
-
const response = {
|
|
152
|
-
success: false,
|
|
153
|
-
error: error instanceof Error ? error.message : 'Unknown error',
|
|
154
|
-
};
|
|
155
|
-
res.status(500).json(response);
|
|
156
|
-
}
|
|
157
|
-
}
|
|
158
|
-
async handleTestExecute(req, res) {
|
|
159
|
-
try {
|
|
160
|
-
const { sessionId, prompt } = req.body;
|
|
161
|
-
if (!sessionId || !prompt) {
|
|
162
|
-
const response = {
|
|
163
|
-
success: false,
|
|
164
|
-
error: 'Missing required fields: sessionId, prompt',
|
|
165
|
-
};
|
|
166
|
-
res.status(400).json(response);
|
|
167
|
-
return;
|
|
168
|
-
}
|
|
169
|
-
logger_1.logger.info('Test execute request', { sessionId, prompt });
|
|
170
|
-
const response = {
|
|
171
|
-
success: true,
|
|
172
|
-
message: 'Test execution endpoint - not implemented yet',
|
|
173
|
-
data: { sessionId, prompt },
|
|
174
|
-
};
|
|
175
|
-
res.json(response);
|
|
176
|
-
}
|
|
177
|
-
catch (error) {
|
|
178
|
-
logger_1.logger.error('Error in test execute:', error);
|
|
179
|
-
const response = {
|
|
180
|
-
success: false,
|
|
181
|
-
error: error instanceof Error ? error.message : 'Unknown error',
|
|
182
|
-
};
|
|
183
|
-
res.status(500).json(response);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
transformHookToEvent(hookInput) {
|
|
187
|
-
let type;
|
|
188
|
-
let content;
|
|
189
|
-
const metadata = {
|
|
190
|
-
cwd: hookInput.cwd,
|
|
191
|
-
hook_event_name: hookInput.hook_event_name,
|
|
192
|
-
...(hookInput.metadata || {}), // Merge any metadata from hook
|
|
193
|
-
};
|
|
194
|
-
// Check if hook explicitly provides type and content (from Stop hook transcript parsing)
|
|
195
|
-
if (hookInput.type && hookInput.content !== undefined) {
|
|
196
|
-
type = hookInput.type;
|
|
197
|
-
content = hookInput.content;
|
|
198
|
-
}
|
|
199
|
-
else {
|
|
200
|
-
// Determine event type and content based on hook event name
|
|
201
|
-
switch (hookInput.hook_event_name) {
|
|
202
|
-
case 'SessionStart':
|
|
203
|
-
type = types_1.EventType.NOTIFICATION;
|
|
204
|
-
content = 'Session started';
|
|
205
|
-
metadata.source = hookInput.source;
|
|
206
|
-
break;
|
|
207
|
-
case 'SessionEnd':
|
|
208
|
-
type = types_1.EventType.NOTIFICATION;
|
|
209
|
-
content = `Session ended: ${hookInput.reason || 'unknown'}`;
|
|
210
|
-
metadata.reason = hookInput.reason;
|
|
211
|
-
break;
|
|
212
|
-
case 'UserPromptSubmit':
|
|
213
|
-
type = types_1.EventType.USER_PROMPT;
|
|
214
|
-
content = hookInput.prompt || '';
|
|
215
|
-
break;
|
|
216
|
-
case 'PostToolUse':
|
|
217
|
-
type = types_1.EventType.TOOL_USE;
|
|
218
|
-
content = JSON.stringify({
|
|
219
|
-
tool_name: hookInput.tool_name,
|
|
220
|
-
tool_input: hookInput.tool_input,
|
|
221
|
-
tool_response: hookInput.tool_response,
|
|
222
|
-
});
|
|
223
|
-
metadata.tool_name = hookInput.tool_name;
|
|
224
|
-
break;
|
|
225
|
-
case 'Notification':
|
|
226
|
-
type = types_1.EventType.NOTIFICATION;
|
|
227
|
-
content = hookInput.message || '';
|
|
228
|
-
metadata.notification_type = hookInput.notification_type;
|
|
229
|
-
break;
|
|
230
|
-
default:
|
|
231
|
-
type = types_1.EventType.NOTIFICATION;
|
|
232
|
-
content = `Hook event: ${hookInput.hook_event_name}`;
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
return {
|
|
236
|
-
session_id: hookInput.session_id,
|
|
237
|
-
hook_event_name: hookInput.hook_event_name,
|
|
238
|
-
type,
|
|
239
|
-
source: types_1.EventSource.DESKTOP, // Events from hooks are always from desktop
|
|
240
|
-
content,
|
|
241
|
-
metadata,
|
|
242
|
-
};
|
|
243
|
-
}
|
|
244
|
-
// Register event handler
|
|
245
|
-
onEvent(handler) {
|
|
246
|
-
this.eventHandler = handler;
|
|
247
|
-
}
|
|
248
|
-
// Start the HTTP server with dynamic port allocation
|
|
249
|
-
async start(sessionId) {
|
|
250
|
-
// Use provided sessionId or the one set earlier
|
|
251
|
-
const sid = sessionId || this.sessionId;
|
|
252
|
-
if (sid) {
|
|
253
|
-
this.sessionId = sid;
|
|
254
|
-
}
|
|
255
|
-
return new Promise((resolve, reject) => {
|
|
256
|
-
try {
|
|
257
|
-
const config = (0, codevibe_core_1.getConfig)();
|
|
258
|
-
// Use port 0 for dynamic allocation, or configured port as fallback
|
|
259
|
-
const requestedPort = config.server.dynamicPort ? 0 : config.server.port;
|
|
260
|
-
this.server = this.app.listen(requestedPort, config.server.host, () => {
|
|
261
|
-
const address = this.server.address();
|
|
262
|
-
this.assignedPort = address.port;
|
|
263
|
-
logger_1.logger.info(`HTTP API listening on http://${config.server.host}:${this.assignedPort}`);
|
|
264
|
-
// Write port to session-specific file for hooks to discover
|
|
265
|
-
if (this.sessionId) {
|
|
266
|
-
this.writePortFile(this.sessionId, this.assignedPort);
|
|
267
|
-
}
|
|
268
|
-
resolve(this.assignedPort);
|
|
269
|
-
});
|
|
270
|
-
this.server.on('error', (error) => {
|
|
271
|
-
logger_1.logger.error('HTTP server error:', error);
|
|
272
|
-
reject(error);
|
|
273
|
-
});
|
|
274
|
-
}
|
|
275
|
-
catch (error) {
|
|
276
|
-
reject(error);
|
|
277
|
-
}
|
|
278
|
-
});
|
|
279
|
-
}
|
|
280
|
-
/**
|
|
281
|
-
* Write port to a session-specific file for hooks to discover
|
|
282
|
-
*/
|
|
283
|
-
writePortFile(sessionId, port) {
|
|
284
|
-
const portFilePath = path.join(os.tmpdir(), `codevibe-claude-${sessionId}.port`);
|
|
285
|
-
try {
|
|
286
|
-
fs.writeFileSync(portFilePath, port.toString());
|
|
287
|
-
logger_1.logger.info(`Port file written: ${portFilePath} -> ${port}`);
|
|
288
|
-
}
|
|
289
|
-
catch (error) {
|
|
290
|
-
logger_1.logger.error(`Failed to write port file: ${portFilePath}`, error);
|
|
291
|
-
}
|
|
292
|
-
}
|
|
293
|
-
/**
|
|
294
|
-
* Remove the port file on shutdown
|
|
295
|
-
*/
|
|
296
|
-
removePortFile() {
|
|
297
|
-
if (this.sessionId) {
|
|
298
|
-
const portFilePath = path.join(os.tmpdir(), `codevibe-claude-${this.sessionId}.port`);
|
|
299
|
-
try {
|
|
300
|
-
if (fs.existsSync(portFilePath)) {
|
|
301
|
-
fs.unlinkSync(portFilePath);
|
|
302
|
-
logger_1.logger.info(`Port file removed: ${portFilePath}`);
|
|
303
|
-
}
|
|
304
|
-
}
|
|
305
|
-
catch (error) {
|
|
306
|
-
logger_1.logger.warn(`Failed to remove port file: ${portFilePath}`, error);
|
|
307
|
-
}
|
|
308
|
-
}
|
|
309
|
-
}
|
|
310
|
-
// Stop the HTTP server
|
|
311
|
-
async stop() {
|
|
312
|
-
return new Promise((resolve, reject) => {
|
|
313
|
-
// Remove port file first
|
|
314
|
-
this.removePortFile();
|
|
315
|
-
if (this.server) {
|
|
316
|
-
this.server.close((err) => {
|
|
317
|
-
if (err) {
|
|
318
|
-
logger_1.logger.error('Error stopping HTTP server:', err);
|
|
319
|
-
reject(err);
|
|
320
|
-
}
|
|
321
|
-
else {
|
|
322
|
-
logger_1.logger.info('HTTP API stopped');
|
|
323
|
-
resolve();
|
|
324
|
-
}
|
|
325
|
-
});
|
|
326
|
-
}
|
|
327
|
-
else {
|
|
328
|
-
resolve();
|
|
329
|
-
}
|
|
330
|
-
});
|
|
331
|
-
}
|
|
332
|
-
}
|
|
333
|
-
exports.HttpApi = HttpApi;
|
|
334
|
-
//# sourceMappingURL=http-api.js.map
|
package/dist/key-manager.js
DELETED
|
@@ -1,287 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
//
|
|
3
|
-
// key-manager.ts
|
|
4
|
-
// CodeVibe Claude Plugin
|
|
5
|
-
//
|
|
6
|
-
// Manages device encryption keys and session keys for E2E encryption
|
|
7
|
-
//
|
|
8
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
9
|
-
if (k2 === undefined) k2 = k;
|
|
10
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
11
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
12
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
13
|
-
}
|
|
14
|
-
Object.defineProperty(o, k2, desc);
|
|
15
|
-
}) : (function(o, m, k, k2) {
|
|
16
|
-
if (k2 === undefined) k2 = k;
|
|
17
|
-
o[k2] = m[k];
|
|
18
|
-
}));
|
|
19
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
20
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
21
|
-
}) : function(o, v) {
|
|
22
|
-
o["default"] = v;
|
|
23
|
-
});
|
|
24
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
25
|
-
var ownKeys = function(o) {
|
|
26
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
27
|
-
var ar = [];
|
|
28
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
29
|
-
return ar;
|
|
30
|
-
};
|
|
31
|
-
return ownKeys(o);
|
|
32
|
-
};
|
|
33
|
-
return function (mod) {
|
|
34
|
-
if (mod && mod.__esModule) return mod;
|
|
35
|
-
var result = {};
|
|
36
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
37
|
-
__setModuleDefault(result, mod);
|
|
38
|
-
return result;
|
|
39
|
-
};
|
|
40
|
-
})();
|
|
41
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
42
|
-
exports.keyManager = exports.KeyManager = exports.KeyManagerError = void 0;
|
|
43
|
-
const fs = __importStar(require("fs"));
|
|
44
|
-
const path = __importStar(require("path"));
|
|
45
|
-
const os = __importStar(require("os"));
|
|
46
|
-
const uuid_1 = require("uuid");
|
|
47
|
-
const crypto_service_1 = require("./crypto-service");
|
|
48
|
-
const logger_1 = require("./logger");
|
|
49
|
-
// Errors that can occur during key management
|
|
50
|
-
class KeyManagerError extends Error {
|
|
51
|
-
constructor(message) {
|
|
52
|
-
super(message);
|
|
53
|
-
this.name = 'KeyManagerError';
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
exports.KeyManagerError = KeyManagerError;
|
|
57
|
-
// Storage directory for keys
|
|
58
|
-
const CONFIG_DIR = path.join(os.homedir(), '.codevibe-claude');
|
|
59
|
-
const DEVICE_KEY_FILE = 'device-key.json';
|
|
60
|
-
/**
|
|
61
|
-
* Manages device and session encryption keys
|
|
62
|
-
*/
|
|
63
|
-
class KeyManager {
|
|
64
|
-
constructor() {
|
|
65
|
-
this.deviceKey = null;
|
|
66
|
-
this.sessionKeyCache = new Map(); // sessionId -> base64 session key
|
|
67
|
-
this.isRegistered = false;
|
|
68
|
-
this.ensureConfigDir();
|
|
69
|
-
this.loadDeviceKey();
|
|
70
|
-
}
|
|
71
|
-
static getInstance() {
|
|
72
|
-
if (!KeyManager.instance) {
|
|
73
|
-
KeyManager.instance = new KeyManager();
|
|
74
|
-
}
|
|
75
|
-
return KeyManager.instance;
|
|
76
|
-
}
|
|
77
|
-
// MARK: - Device Key Management
|
|
78
|
-
/**
|
|
79
|
-
* Get or generate the device ID
|
|
80
|
-
*/
|
|
81
|
-
getDeviceId() {
|
|
82
|
-
if (this.deviceKey) {
|
|
83
|
-
return this.deviceKey.deviceId;
|
|
84
|
-
}
|
|
85
|
-
// Generate and store new device key if none exists
|
|
86
|
-
this.generateAndStoreDeviceKey();
|
|
87
|
-
return this.deviceKey.deviceId;
|
|
88
|
-
}
|
|
89
|
-
/**
|
|
90
|
-
* Get the current device's key pair, generating if needed
|
|
91
|
-
*/
|
|
92
|
-
getOrCreateDeviceKeyPair() {
|
|
93
|
-
if (!this.deviceKey) {
|
|
94
|
-
this.generateAndStoreDeviceKey();
|
|
95
|
-
}
|
|
96
|
-
return {
|
|
97
|
-
privateKey: this.deviceKey.privateKey,
|
|
98
|
-
publicKey: this.deviceKey.publicKey,
|
|
99
|
-
};
|
|
100
|
-
}
|
|
101
|
-
/**
|
|
102
|
-
* Get the device's public key (base64)
|
|
103
|
-
*/
|
|
104
|
-
getDevicePublicKey() {
|
|
105
|
-
const keyPair = this.getOrCreateDeviceKeyPair();
|
|
106
|
-
return keyPair.publicKey;
|
|
107
|
-
}
|
|
108
|
-
/**
|
|
109
|
-
* Check if we have a device key
|
|
110
|
-
*/
|
|
111
|
-
hasDeviceKey() {
|
|
112
|
-
return this.deviceKey !== null;
|
|
113
|
-
}
|
|
114
|
-
/**
|
|
115
|
-
* Check if device key is registered with backend
|
|
116
|
-
*/
|
|
117
|
-
getIsRegistered() {
|
|
118
|
-
return this.isRegistered;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Set registration status
|
|
122
|
-
*/
|
|
123
|
-
setIsRegistered(registered) {
|
|
124
|
-
this.isRegistered = registered;
|
|
125
|
-
}
|
|
126
|
-
// MARK: - Session Key Management
|
|
127
|
-
/**
|
|
128
|
-
* Get session key for a session, decrypting from encryptedKeys if needed
|
|
129
|
-
*/
|
|
130
|
-
getSessionKey(sessionId, encryptedKeys) {
|
|
131
|
-
// Check cache first
|
|
132
|
-
const cachedKey = this.sessionKeyCache.get(sessionId);
|
|
133
|
-
if (cachedKey) {
|
|
134
|
-
return cachedKey;
|
|
135
|
-
}
|
|
136
|
-
// Try to decrypt from encrypted keys
|
|
137
|
-
if (!encryptedKeys || encryptedKeys.length === 0) {
|
|
138
|
-
return null;
|
|
139
|
-
}
|
|
140
|
-
const deviceId = this.getDeviceId();
|
|
141
|
-
const ourEncryptedKey = encryptedKeys.find((k) => k.deviceId === deviceId);
|
|
142
|
-
if (!ourEncryptedKey) {
|
|
143
|
-
return null;
|
|
144
|
-
}
|
|
145
|
-
// Load our private key
|
|
146
|
-
if (!this.deviceKey) {
|
|
147
|
-
throw new KeyManagerError('Device key not found');
|
|
148
|
-
}
|
|
149
|
-
// Decrypt session key
|
|
150
|
-
const sessionKey = crypto_service_1.cryptoService.decryptSessionKey(ourEncryptedKey, this.deviceKey.privateKey);
|
|
151
|
-
// Cache for future use
|
|
152
|
-
this.sessionKeyCache.set(sessionId, sessionKey);
|
|
153
|
-
return sessionKey;
|
|
154
|
-
}
|
|
155
|
-
/**
|
|
156
|
-
* Generate and encrypt a new session key for all devices
|
|
157
|
-
*/
|
|
158
|
-
createSessionKey(devicePublicKeys) {
|
|
159
|
-
// Generate random session key
|
|
160
|
-
const sessionKey = crypto_service_1.cryptoService.generateSessionKey();
|
|
161
|
-
// Encrypt for each device
|
|
162
|
-
const encryptedKeys = devicePublicKeys.map((device) => {
|
|
163
|
-
const encrypted = crypto_service_1.cryptoService.encryptSessionKey(sessionKey, device.publicKey);
|
|
164
|
-
return {
|
|
165
|
-
deviceId: device.deviceId,
|
|
166
|
-
encryptedKey: encrypted.encryptedKey,
|
|
167
|
-
ephemeralPublicKey: encrypted.ephemeralPublicKey,
|
|
168
|
-
};
|
|
169
|
-
});
|
|
170
|
-
return { sessionKey, encryptedKeys };
|
|
171
|
-
}
|
|
172
|
-
/**
|
|
173
|
-
* Cache a session key (after successfully decrypting or creating)
|
|
174
|
-
*/
|
|
175
|
-
cacheSessionKey(sessionId, sessionKey) {
|
|
176
|
-
this.sessionKeyCache.set(sessionId, sessionKey);
|
|
177
|
-
}
|
|
178
|
-
/**
|
|
179
|
-
* Clear cached session key (on session end)
|
|
180
|
-
*/
|
|
181
|
-
clearSessionKey(sessionId) {
|
|
182
|
-
this.sessionKeyCache.delete(sessionId);
|
|
183
|
-
}
|
|
184
|
-
/**
|
|
185
|
-
* Clear all cached session keys (on sign out)
|
|
186
|
-
*/
|
|
187
|
-
clearAllSessionKeys() {
|
|
188
|
-
this.sessionKeyCache.clear();
|
|
189
|
-
}
|
|
190
|
-
// MARK: - Key Storage
|
|
191
|
-
ensureConfigDir() {
|
|
192
|
-
if (!fs.existsSync(CONFIG_DIR)) {
|
|
193
|
-
fs.mkdirSync(CONFIG_DIR, { recursive: true, mode: 0o700 });
|
|
194
|
-
}
|
|
195
|
-
}
|
|
196
|
-
getKeyFilePath() {
|
|
197
|
-
return path.join(CONFIG_DIR, DEVICE_KEY_FILE);
|
|
198
|
-
}
|
|
199
|
-
loadDeviceKey() {
|
|
200
|
-
const keyFilePath = this.getKeyFilePath();
|
|
201
|
-
if (!fs.existsSync(keyFilePath)) {
|
|
202
|
-
this.deviceKey = null;
|
|
203
|
-
return;
|
|
204
|
-
}
|
|
205
|
-
try {
|
|
206
|
-
const data = fs.readFileSync(keyFilePath, 'utf8');
|
|
207
|
-
const stored = JSON.parse(data);
|
|
208
|
-
this.deviceKey = stored.device;
|
|
209
|
-
logger_1.logger.info(`[KeyManager] Loaded device key: ${this.deviceKey.deviceId}`);
|
|
210
|
-
}
|
|
211
|
-
catch (error) {
|
|
212
|
-
logger_1.logger.error(`[KeyManager] Failed to load device key: ${error}`);
|
|
213
|
-
this.deviceKey = null;
|
|
214
|
-
}
|
|
215
|
-
}
|
|
216
|
-
saveDeviceKey() {
|
|
217
|
-
if (!this.deviceKey) {
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
const keyFilePath = this.getKeyFilePath();
|
|
221
|
-
const stored = {
|
|
222
|
-
device: this.deviceKey,
|
|
223
|
-
};
|
|
224
|
-
try {
|
|
225
|
-
fs.writeFileSync(keyFilePath, JSON.stringify(stored, null, 2), {
|
|
226
|
-
mode: 0o600, // Owner read/write only
|
|
227
|
-
});
|
|
228
|
-
logger_1.logger.info(`[KeyManager] Saved device key: ${this.deviceKey.deviceId}`);
|
|
229
|
-
}
|
|
230
|
-
catch (error) {
|
|
231
|
-
logger_1.logger.error(`[KeyManager] Failed to save device key: ${error}`);
|
|
232
|
-
throw new KeyManagerError(`Failed to save device key: ${error}`);
|
|
233
|
-
}
|
|
234
|
-
}
|
|
235
|
-
generateAndStoreDeviceKey() {
|
|
236
|
-
const keyPair = crypto_service_1.cryptoService.generateKeyPair();
|
|
237
|
-
const deviceId = (0, uuid_1.v4)().toUpperCase();
|
|
238
|
-
this.deviceKey = {
|
|
239
|
-
deviceId,
|
|
240
|
-
privateKey: keyPair.privateKey,
|
|
241
|
-
publicKey: keyPair.publicKey,
|
|
242
|
-
createdAt: new Date().toISOString(),
|
|
243
|
-
};
|
|
244
|
-
this.saveDeviceKey();
|
|
245
|
-
logger_1.logger.info(`[KeyManager] Generated new device key: ${deviceId}`);
|
|
246
|
-
}
|
|
247
|
-
// MARK: - Helpers
|
|
248
|
-
/**
|
|
249
|
-
* Get device name for registration
|
|
250
|
-
*/
|
|
251
|
-
getDeviceName() {
|
|
252
|
-
return os.hostname() || 'CLI Client';
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* Get platform for registration
|
|
256
|
-
*/
|
|
257
|
-
getDevicePlatform() {
|
|
258
|
-
const platform = os.platform();
|
|
259
|
-
if (platform === 'darwin') {
|
|
260
|
-
return 'MACOS';
|
|
261
|
-
}
|
|
262
|
-
else if (platform === 'linux') {
|
|
263
|
-
return 'LINUX';
|
|
264
|
-
}
|
|
265
|
-
else if (platform === 'win32') {
|
|
266
|
-
return 'WINDOWS';
|
|
267
|
-
}
|
|
268
|
-
return 'CLI';
|
|
269
|
-
}
|
|
270
|
-
/**
|
|
271
|
-
* Clear all encryption data (on sign out)
|
|
272
|
-
*/
|
|
273
|
-
clearAllData() {
|
|
274
|
-
const keyFilePath = this.getKeyFilePath();
|
|
275
|
-
if (fs.existsSync(keyFilePath)) {
|
|
276
|
-
fs.unlinkSync(keyFilePath);
|
|
277
|
-
}
|
|
278
|
-
this.deviceKey = null;
|
|
279
|
-
this.sessionKeyCache.clear();
|
|
280
|
-
this.isRegistered = false;
|
|
281
|
-
logger_1.logger.info('[KeyManager] Cleared all encryption data');
|
|
282
|
-
}
|
|
283
|
-
}
|
|
284
|
-
exports.KeyManager = KeyManager;
|
|
285
|
-
// Export singleton instance
|
|
286
|
-
exports.keyManager = KeyManager.getInstance();
|
|
287
|
-
//# sourceMappingURL=key-manager.js.map
|
package/dist/logger.js
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.logger = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Plugin-specific logger for CodeVibe Claude Plugin
|
|
9
|
-
*/
|
|
10
|
-
const os_1 = __importDefault(require("os"));
|
|
11
|
-
const path_1 = __importDefault(require("path"));
|
|
12
|
-
const codevibe_core_1 = require("@quantiya/codevibe-core");
|
|
13
|
-
exports.logger = (0, codevibe_core_1.createLogger)({
|
|
14
|
-
name: 'codevibe-claude',
|
|
15
|
-
logFile: path_1.default.join(os_1.default.tmpdir(), 'codevibe-claude-mcp.log'),
|
|
16
|
-
level: 'info',
|
|
17
|
-
});
|
|
18
|
-
//# sourceMappingURL=logger.js.map
|