@pome-sh/cli 0.1.0 → 0.1.1
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/dist/build-info.json +3 -3
- package/dist/src/doctor/checks.js +2 -2
- package/node_modules/@pome-sh/sdk/dist/db.d.ts +4 -4
- package/node_modules/@pome-sh/sdk/dist/db.js +93 -25
- package/node_modules/@pome-sh/sdk/dist/db.js.map +1 -1
- package/node_modules/@pome-sh/sdk/package.json +2 -6
- package/node_modules/@pome-sh/twin-github/README.md +2 -1
- package/node_modules/@pome-sh/twin-github/package.json +2 -3
- package/node_modules/@pome-sh/twin-slack/package.json +2 -3
- package/node_modules/@pome-sh/twin-stripe/README.md +2 -2
- package/node_modules/@pome-sh/twin-stripe/package.json +2 -3
- package/package.json +6 -7
- package/dist/src/recorder/verdictArtifact.d.ts +0 -71
- package/dist/src/recorder/verdictArtifact.js +0 -207
- package/dist/src/score/view.d.ts +0 -38
- package/dist/src/score/view.js +0 -59
- package/dist/src/twin/github/app.d.ts +0 -10
- package/dist/src/twin/github/app.js +0 -316
- package/dist/src/twin/github/db/migrations.d.ts +0 -2
- package/dist/src/twin/github/db/migrations.js +0 -64
- package/dist/src/twin/github/db/openDatabase.d.ts +0 -2
- package/dist/src/twin/github/db/openDatabase.js +0 -13
- package/dist/src/twin/github/db/queries.d.ts +0 -77
- package/dist/src/twin/github/db/queries.js +0 -93
- package/dist/src/twin/github/domain/seed.d.ts +0 -74
- package/dist/src/twin/github/domain/seed.js +0 -104
- package/dist/src/twin/github/domain/serializers.d.ts +0 -113
- package/dist/src/twin/github/domain/serializers.js +0 -76
- package/dist/src/twin/github/types.d.ts +0 -66
- package/dist/src/twin/github/types.js +0 -1
- package/dist/src/twin-github/app.d.ts +0 -9
- package/dist/src/twin-github/app.js +0 -327
- package/dist/src/twin-github/auth.d.ts +0 -16
- package/dist/src/twin-github/auth.js +0 -142
- package/dist/src/twin-github/build-info.d.ts +0 -7
- package/dist/src/twin-github/build-info.js +0 -52
- package/dist/src/twin-github/db.d.ts +0 -4
- package/dist/src/twin-github/db.js +0 -362
- package/dist/src/twin-github/domain.d.ts +0 -1649
- package/dist/src/twin-github/domain.js +0 -957
- package/dist/src/twin-github/errors.d.ts +0 -14
- package/dist/src/twin-github/errors.js +0 -34
- package/dist/src/twin-github/index.d.ts +0 -9
- package/dist/src/twin-github/index.js +0 -7
- package/dist/src/twin-github/mcp.d.ts +0 -17
- package/dist/src/twin-github/mcp.js +0 -281
- package/dist/src/twin-github/recorder.d.ts +0 -2
- package/dist/src/twin-github/recorder.js +0 -29
- package/dist/src/twin-github/seed.d.ts +0 -74
- package/dist/src/twin-github/seed.js +0 -107
- package/dist/src/twin-github/serializers.d.ts +0 -449
- package/dist/src/twin-github/serializers.js +0 -429
- package/dist/src/twin-github/server.d.ts +0 -1
- package/dist/src/twin-github/server.js +0 -34
- package/dist/src/twin-github/tools.d.ts +0 -1545
- package/dist/src/twin-github/tools.js +0 -347
- package/dist/src/twin-github/types.d.ts +0 -198
- package/dist/src/twin-github/types.js +0 -1
- package/dist/src/twin-github/unsupported-envelope.d.ts +0 -10
- package/dist/src/twin-github/unsupported-envelope.js +0 -29
- package/dist/src/twin-github/util.d.ts +0 -13
- package/dist/src/twin-github/util.js +0 -61
- package/dist/src/twin-slack/app.d.ts +0 -17
- package/dist/src/twin-slack/app.js +0 -683
- package/dist/src/twin-slack/auth.d.ts +0 -38
- package/dist/src/twin-slack/auth.js +0 -219
- package/dist/src/twin-slack/build-info.d.ts +0 -7
- package/dist/src/twin-slack/build-info.js +0 -9
- package/dist/src/twin-slack/db.d.ts +0 -4
- package/dist/src/twin-slack/db.js +0 -213
- package/dist/src/twin-slack/domain.d.ts +0 -236
- package/dist/src/twin-slack/domain.js +0 -1293
- package/dist/src/twin-slack/errors.d.ts +0 -16
- package/dist/src/twin-slack/errors.js +0 -60
- package/dist/src/twin-slack/index.d.ts +0 -8
- package/dist/src/twin-slack/index.js +0 -8
- package/dist/src/twin-slack/mcp.d.ts +0 -17
- package/dist/src/twin-slack/mcp.js +0 -226
- package/dist/src/twin-slack/recorder.d.ts +0 -2
- package/dist/src/twin-slack/recorder.js +0 -15
- package/dist/src/twin-slack/seed.d.ts +0 -49
- package/dist/src/twin-slack/seed.js +0 -139
- package/dist/src/twin-slack/serializers.d.ts +0 -141
- package/dist/src/twin-slack/serializers.js +0 -377
- package/dist/src/twin-slack/tools.d.ts +0 -97
- package/dist/src/twin-slack/tools.js +0 -171
- package/dist/src/twin-slack/types.d.ts +0 -164
- package/dist/src/twin-slack/types.js +0 -1
- package/dist/src/twin-slack/unsupported-envelope.d.ts +0 -12
- package/dist/src/twin-slack/unsupported-envelope.js +0 -61
- package/dist/src/twin-slack/upstream-types.d.ts +0 -19
- package/dist/src/twin-slack/upstream-types.js +0 -1
- package/dist/src/twin-slack/util.d.ts +0 -31
- package/dist/src/twin-slack/util.js +0 -136
- 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/better-sqlite3/LICENSE +0 -21
- package/node_modules/better-sqlite3/README.md +0 -99
- package/node_modules/better-sqlite3/binding.gyp +0 -38
- package/node_modules/better-sqlite3/build/Release/better_sqlite3.node +0 -0
- package/node_modules/better-sqlite3/deps/common.gypi +0 -68
- package/node_modules/better-sqlite3/deps/copy.js +0 -31
- package/node_modules/better-sqlite3/deps/defines.gypi +0 -42
- package/node_modules/better-sqlite3/deps/download.sh +0 -123
- package/node_modules/better-sqlite3/deps/patches/1208.patch +0 -15
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.c +0 -269395
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3.h +0 -14347
- package/node_modules/better-sqlite3/deps/sqlite3/sqlite3ext.h +0 -739
- package/node_modules/better-sqlite3/deps/sqlite3.gyp +0 -80
- package/node_modules/better-sqlite3/deps/test_extension.c +0 -21
- package/node_modules/better-sqlite3/lib/database.js +0 -90
- package/node_modules/better-sqlite3/lib/index.js +0 -3
- package/node_modules/better-sqlite3/lib/methods/aggregate.js +0 -43
- package/node_modules/better-sqlite3/lib/methods/backup.js +0 -67
- package/node_modules/better-sqlite3/lib/methods/function.js +0 -31
- package/node_modules/better-sqlite3/lib/methods/inspect.js +0 -7
- package/node_modules/better-sqlite3/lib/methods/pragma.js +0 -12
- package/node_modules/better-sqlite3/lib/methods/serialize.js +0 -16
- package/node_modules/better-sqlite3/lib/methods/table.js +0 -189
- package/node_modules/better-sqlite3/lib/methods/transaction.js +0 -78
- package/node_modules/better-sqlite3/lib/methods/wrappers.js +0 -54
- package/node_modules/better-sqlite3/lib/sqlite-error.js +0 -20
- package/node_modules/better-sqlite3/lib/util.js +0 -12
- package/node_modules/better-sqlite3/package.json +0 -59
- package/node_modules/better-sqlite3/src/addon.cpp +0 -47
- package/node_modules/better-sqlite3/src/better_sqlite3.cpp +0 -74
- package/node_modules/better-sqlite3/src/objects/backup.cpp +0 -120
- package/node_modules/better-sqlite3/src/objects/backup.hpp +0 -36
- package/node_modules/better-sqlite3/src/objects/database.cpp +0 -417
- package/node_modules/better-sqlite3/src/objects/database.hpp +0 -103
- package/node_modules/better-sqlite3/src/objects/statement-iterator.cpp +0 -113
- package/node_modules/better-sqlite3/src/objects/statement-iterator.hpp +0 -50
- package/node_modules/better-sqlite3/src/objects/statement.cpp +0 -383
- package/node_modules/better-sqlite3/src/objects/statement.hpp +0 -58
- package/node_modules/better-sqlite3/src/util/bind-map.cpp +0 -73
- package/node_modules/better-sqlite3/src/util/binder.cpp +0 -193
- package/node_modules/better-sqlite3/src/util/constants.cpp +0 -172
- package/node_modules/better-sqlite3/src/util/custom-aggregate.cpp +0 -121
- package/node_modules/better-sqlite3/src/util/custom-function.cpp +0 -59
- package/node_modules/better-sqlite3/src/util/custom-table.cpp +0 -409
- package/node_modules/better-sqlite3/src/util/data-converter.cpp +0 -17
- package/node_modules/better-sqlite3/src/util/data.cpp +0 -194
- package/node_modules/better-sqlite3/src/util/helpers.cpp +0 -109
- package/node_modules/better-sqlite3/src/util/macros.cpp +0 -90
- package/node_modules/better-sqlite3/src/util/query-macros.cpp +0 -71
- package/node_modules/better-sqlite3/src/util/row-builder.cpp +0 -49
- package/node_modules/bindings/LICENSE.md +0 -22
- package/node_modules/bindings/README.md +0 -98
- package/node_modules/bindings/bindings.js +0 -221
- package/node_modules/bindings/package.json +0 -28
- 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/file-uri-to-path/.npmignore +0 -1
- package/node_modules/file-uri-to-path/.travis.yml +0 -30
- package/node_modules/file-uri-to-path/History.md +0 -21
- package/node_modules/file-uri-to-path/LICENSE +0 -20
- package/node_modules/file-uri-to-path/README.md +0 -74
- package/node_modules/file-uri-to-path/index.d.ts +0 -2
- package/node_modules/file-uri-to-path/index.js +0 -66
- package/node_modules/file-uri-to-path/package.json +0 -32
- package/node_modules/file-uri-to-path/test/test.js +0 -24
- package/node_modules/file-uri-to-path/test/tests.json +0 -13
- 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/inherits/LICENSE +0 -16
- package/node_modules/inherits/README.md +0 -42
- package/node_modules/inherits/inherits.js +0 -9
- package/node_modules/inherits/inherits_browser.js +0 -27
- package/node_modules/inherits/package.json +0 -29
- 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/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 -453
- package/node_modules/node-abi/index.js +0 -179
- package/node_modules/node-abi/package.json +0 -45
- package/node_modules/once/LICENSE +0 -15
- package/node_modules/once/README.md +0 -79
- package/node_modules/once/once.js +0 -42
- package/node_modules/once/package.json +0 -33
- 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 -680
- package/node_modules/semver/bin/semver.js +0 -195
- 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 -577
- package/node_modules/semver/classes/semver.js +0 -350
- 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/truncate.js +0 -48
- package/node_modules/semver/functions/valid.js +0 -8
- package/node_modules/semver/index.js +0 -93
- 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 -17
- 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 -392
- package/node_modules/tar-fs/package.json +0 -46
- 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 -457
- 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/node_modules/wrappy/LICENSE +0 -15
- package/node_modules/wrappy/README.md +0 -36
- package/node_modules/wrappy/package.json +0 -29
- package/node_modules/wrappy/wrappy.js +0 -33
|
@@ -1,171 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
import { z } from "zod";
|
|
3
|
-
// Slack MCP tools — the 8 visible Slack-agent tools exposed by tools/list.
|
|
4
|
-
// Schemas use z.strictObject so toJSONSchema emits `additionalProperties:false`.
|
|
5
|
-
export const toolDefinitions = [
|
|
6
|
-
{
|
|
7
|
-
name: "slack_post_message",
|
|
8
|
-
description: "Post a new message to a Slack channel",
|
|
9
|
-
readOnly: false,
|
|
10
|
-
schema: z
|
|
11
|
-
.strictObject({
|
|
12
|
-
channel_id: z.string(),
|
|
13
|
-
text: z.string(),
|
|
14
|
-
})
|
|
15
|
-
.strict(),
|
|
16
|
-
},
|
|
17
|
-
{
|
|
18
|
-
name: "slack_reply_to_thread",
|
|
19
|
-
description: "Reply to a specific message thread in Slack",
|
|
20
|
-
readOnly: false,
|
|
21
|
-
schema: z
|
|
22
|
-
.strictObject({
|
|
23
|
-
channel_id: z.string(),
|
|
24
|
-
thread_ts: z.string(),
|
|
25
|
-
text: z.string(),
|
|
26
|
-
})
|
|
27
|
-
.strict(),
|
|
28
|
-
},
|
|
29
|
-
{
|
|
30
|
-
name: "slack_add_reaction",
|
|
31
|
-
description: "Add a reaction emoji to a message",
|
|
32
|
-
readOnly: false,
|
|
33
|
-
schema: z
|
|
34
|
-
.strictObject({
|
|
35
|
-
channel_id: z.string(),
|
|
36
|
-
timestamp: z.string(),
|
|
37
|
-
reaction: z.string(),
|
|
38
|
-
})
|
|
39
|
-
.strict(),
|
|
40
|
-
},
|
|
41
|
-
{
|
|
42
|
-
name: "slack_get_channel_history",
|
|
43
|
-
description: "Get recent messages from a channel",
|
|
44
|
-
readOnly: true,
|
|
45
|
-
schema: z
|
|
46
|
-
.strictObject({
|
|
47
|
-
channel_id: z.string(),
|
|
48
|
-
limit: z.number().optional(),
|
|
49
|
-
})
|
|
50
|
-
.strict(),
|
|
51
|
-
},
|
|
52
|
-
{
|
|
53
|
-
name: "slack_get_thread_replies",
|
|
54
|
-
description: "Get all replies in a message thread",
|
|
55
|
-
readOnly: true,
|
|
56
|
-
schema: z
|
|
57
|
-
.strictObject({
|
|
58
|
-
channel_id: z.string(),
|
|
59
|
-
thread_ts: z.string(),
|
|
60
|
-
})
|
|
61
|
-
.strict(),
|
|
62
|
-
},
|
|
63
|
-
{
|
|
64
|
-
name: "slack_list_channels",
|
|
65
|
-
description: "List public or pre-defined channels in the workspace with pagination",
|
|
66
|
-
readOnly: true,
|
|
67
|
-
schema: z
|
|
68
|
-
.strictObject({
|
|
69
|
-
limit: z.number().optional(),
|
|
70
|
-
cursor: z.string().optional(),
|
|
71
|
-
})
|
|
72
|
-
.strict(),
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
name: "slack_get_users",
|
|
76
|
-
description: "Get a list of all users in the workspace with their basic profile information",
|
|
77
|
-
readOnly: true,
|
|
78
|
-
schema: z
|
|
79
|
-
.strictObject({
|
|
80
|
-
cursor: z.string().optional(),
|
|
81
|
-
limit: z.number().optional(),
|
|
82
|
-
})
|
|
83
|
-
.strict(),
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
name: "slack_get_user_profile",
|
|
87
|
-
description: "Get detailed profile information for a specific user",
|
|
88
|
-
readOnly: true,
|
|
89
|
-
schema: z
|
|
90
|
-
.strictObject({
|
|
91
|
-
user_id: z.string(),
|
|
92
|
-
})
|
|
93
|
-
.strict(),
|
|
94
|
-
},
|
|
95
|
-
];
|
|
96
|
-
export const MUTATING_TOOL_NAMES = new Set([
|
|
97
|
-
"slack_post_message",
|
|
98
|
-
"slack_reply_to_thread",
|
|
99
|
-
"slack_add_reaction",
|
|
100
|
-
]);
|
|
101
|
-
export function isMutatingTool(name) {
|
|
102
|
-
return MUTATING_TOOL_NAMES.has(name);
|
|
103
|
-
}
|
|
104
|
-
function toJsonSchema(schema) {
|
|
105
|
-
const json = z.toJSONSchema(schema, { target: "draft-7" });
|
|
106
|
-
return {
|
|
107
|
-
type: "object",
|
|
108
|
-
properties: json.properties ?? {},
|
|
109
|
-
required: json.required ?? [],
|
|
110
|
-
additionalProperties: false,
|
|
111
|
-
};
|
|
112
|
-
}
|
|
113
|
-
export function listTools() {
|
|
114
|
-
return toolDefinitions.map((tool) => ({
|
|
115
|
-
name: tool.name,
|
|
116
|
-
description: tool.description,
|
|
117
|
-
input_schema: toJsonSchema(tool.schema),
|
|
118
|
-
...(tool.readOnly ? { annotations: { readOnlyHint: true } } : {}),
|
|
119
|
-
}));
|
|
120
|
-
}
|
|
121
|
-
export function listToolsForMcp() {
|
|
122
|
-
return toolDefinitions.map((tool) => ({
|
|
123
|
-
name: tool.name,
|
|
124
|
-
description: tool.description,
|
|
125
|
-
inputSchema: toJsonSchema(tool.schema),
|
|
126
|
-
...(tool.readOnly ? { annotations: { readOnlyHint: true } } : {}),
|
|
127
|
-
}));
|
|
128
|
-
}
|
|
129
|
-
export function executeTool(domain, name, args, onDelta, actor = {}) {
|
|
130
|
-
const def = toolDefinitions.find((t) => t.name === name);
|
|
131
|
-
if (!def)
|
|
132
|
-
throw new Error(`Unknown tool: ${name}`);
|
|
133
|
-
const parsed = def.schema.parse(args);
|
|
134
|
-
const delta = (d) => onDelta?.(d);
|
|
135
|
-
switch (name) {
|
|
136
|
-
case "slack_post_message": {
|
|
137
|
-
const p = parsed;
|
|
138
|
-
return domain.chatPostMessage({ channel: p.channel_id, text: p.text }, actor, delta);
|
|
139
|
-
}
|
|
140
|
-
case "slack_reply_to_thread": {
|
|
141
|
-
const p = parsed;
|
|
142
|
-
return domain.chatPostMessage({ channel: p.channel_id, thread_ts: p.thread_ts, text: p.text }, actor, delta);
|
|
143
|
-
}
|
|
144
|
-
case "slack_add_reaction": {
|
|
145
|
-
const p = parsed;
|
|
146
|
-
return domain.reactionsAdd({ channel: p.channel_id, timestamp: p.timestamp, name: p.reaction }, actor, delta);
|
|
147
|
-
}
|
|
148
|
-
case "slack_get_channel_history": {
|
|
149
|
-
const p = parsed;
|
|
150
|
-
return domain.conversationsHistory({ channel: p.channel_id, limit: p.limit }, actor);
|
|
151
|
-
}
|
|
152
|
-
case "slack_get_thread_replies": {
|
|
153
|
-
const p = parsed;
|
|
154
|
-
return domain.conversationsReplies({ channel: p.channel_id, ts: p.thread_ts }, actor);
|
|
155
|
-
}
|
|
156
|
-
case "slack_list_channels": {
|
|
157
|
-
const p = parsed;
|
|
158
|
-
return domain.conversationsList({ limit: p.limit, cursor: p.cursor });
|
|
159
|
-
}
|
|
160
|
-
case "slack_get_users": {
|
|
161
|
-
const p = parsed;
|
|
162
|
-
return domain.usersList({ cursor: p.cursor, limit: p.limit });
|
|
163
|
-
}
|
|
164
|
-
case "slack_get_user_profile": {
|
|
165
|
-
const p = parsed;
|
|
166
|
-
return domain.usersProfileGet({ user: p.user_id }, actor);
|
|
167
|
-
}
|
|
168
|
-
default:
|
|
169
|
-
throw new Error(`Unknown tool: ${name}`);
|
|
170
|
-
}
|
|
171
|
-
}
|
|
@@ -1,164 +0,0 @@
|
|
|
1
|
-
import type Database from "better-sqlite3";
|
|
2
|
-
import type { RecorderEvent } from "@pome-sh/shared-types";
|
|
3
|
-
export type { RecorderEvent } from "@pome-sh/shared-types";
|
|
4
|
-
export type SlackTwinDatabase = Database.Database;
|
|
5
|
-
export type SeedTeam = {
|
|
6
|
-
id?: string;
|
|
7
|
-
name?: string;
|
|
8
|
-
domain?: string;
|
|
9
|
-
};
|
|
10
|
-
export type SeedUser = {
|
|
11
|
-
id?: string;
|
|
12
|
-
name: string;
|
|
13
|
-
real_name?: string;
|
|
14
|
-
email?: string;
|
|
15
|
-
is_bot?: boolean;
|
|
16
|
-
is_admin?: boolean;
|
|
17
|
-
tz?: string;
|
|
18
|
-
profile?: Record<string, unknown>;
|
|
19
|
-
};
|
|
20
|
-
export type SeedReaction = {
|
|
21
|
-
name: string;
|
|
22
|
-
user: string;
|
|
23
|
-
};
|
|
24
|
-
export type SeedMessage = {
|
|
25
|
-
ts?: string;
|
|
26
|
-
user: string;
|
|
27
|
-
text: string;
|
|
28
|
-
thread_ts?: string;
|
|
29
|
-
reactions?: SeedReaction[];
|
|
30
|
-
};
|
|
31
|
-
export type SeedChannel = {
|
|
32
|
-
id?: string;
|
|
33
|
-
name: string;
|
|
34
|
-
is_private?: boolean;
|
|
35
|
-
topic?: string;
|
|
36
|
-
purpose?: string;
|
|
37
|
-
creator?: string;
|
|
38
|
-
members?: string[];
|
|
39
|
-
messages?: SeedMessage[];
|
|
40
|
-
};
|
|
41
|
-
export type SlackStateSeed = {
|
|
42
|
-
team?: SeedTeam;
|
|
43
|
-
users?: SeedUser[];
|
|
44
|
-
channels?: SeedChannel[];
|
|
45
|
-
};
|
|
46
|
-
export type WorkspaceRow = {
|
|
47
|
-
id: string;
|
|
48
|
-
name: string;
|
|
49
|
-
domain: string;
|
|
50
|
-
url: string;
|
|
51
|
-
enterprise_id: string | null;
|
|
52
|
-
created_at: string;
|
|
53
|
-
entity_counter: number;
|
|
54
|
-
};
|
|
55
|
-
export type UserRow = {
|
|
56
|
-
id: string;
|
|
57
|
-
team_id: string;
|
|
58
|
-
name: string;
|
|
59
|
-
real_name: string;
|
|
60
|
-
display_name: string;
|
|
61
|
-
email: string | null;
|
|
62
|
-
is_bot: 0 | 1;
|
|
63
|
-
is_admin: 0 | 1;
|
|
64
|
-
deleted: 0 | 1;
|
|
65
|
-
tz: string;
|
|
66
|
-
profile_json: string;
|
|
67
|
-
created_at: string;
|
|
68
|
-
updated_at: string;
|
|
69
|
-
};
|
|
70
|
-
export type ChannelRow = {
|
|
71
|
-
id: string;
|
|
72
|
-
team_id: string;
|
|
73
|
-
name: string;
|
|
74
|
-
is_channel: 0 | 1;
|
|
75
|
-
is_group: 0 | 1;
|
|
76
|
-
is_im: 0 | 1;
|
|
77
|
-
is_mpim: 0 | 1;
|
|
78
|
-
is_private: 0 | 1;
|
|
79
|
-
is_archived: 0 | 1;
|
|
80
|
-
topic: string;
|
|
81
|
-
purpose: string;
|
|
82
|
-
creator: string;
|
|
83
|
-
created_at: string;
|
|
84
|
-
ts_counter: number;
|
|
85
|
-
dm_signature: string | null;
|
|
86
|
-
};
|
|
87
|
-
export type ChannelMemberRow = {
|
|
88
|
-
channel_id: string;
|
|
89
|
-
user_id: string;
|
|
90
|
-
joined_at: string;
|
|
91
|
-
last_read: string;
|
|
92
|
-
};
|
|
93
|
-
export type MessageRow = {
|
|
94
|
-
channel_id: string;
|
|
95
|
-
ts: string;
|
|
96
|
-
user_id: string;
|
|
97
|
-
text: string;
|
|
98
|
-
subtype: string | null;
|
|
99
|
-
thread_ts: string | null;
|
|
100
|
-
reply_count: number;
|
|
101
|
-
reply_users_count: number;
|
|
102
|
-
latest_reply: string | null;
|
|
103
|
-
edited_user_id: string | null;
|
|
104
|
-
edited_ts: string | null;
|
|
105
|
-
blocks_json: string;
|
|
106
|
-
attachments_json: string;
|
|
107
|
-
bot_id: string | null;
|
|
108
|
-
app_id: string | null;
|
|
109
|
-
username: string | null;
|
|
110
|
-
icon_url: string | null;
|
|
111
|
-
icon_emoji: string | null;
|
|
112
|
-
};
|
|
113
|
-
export type ReactionRow = {
|
|
114
|
-
channel_id: string;
|
|
115
|
-
message_ts: string;
|
|
116
|
-
name: string;
|
|
117
|
-
user_id: string;
|
|
118
|
-
added_at: string;
|
|
119
|
-
};
|
|
120
|
-
export type PinRow = {
|
|
121
|
-
channel_id: string;
|
|
122
|
-
message_ts: string;
|
|
123
|
-
pinned_by: string;
|
|
124
|
-
pinned_at: string;
|
|
125
|
-
};
|
|
126
|
-
export type FileRow = {
|
|
127
|
-
id: string;
|
|
128
|
-
team_id: string;
|
|
129
|
-
user_id: string;
|
|
130
|
-
name: string;
|
|
131
|
-
title: string;
|
|
132
|
-
mimetype: string;
|
|
133
|
-
filetype: string;
|
|
134
|
-
size: number;
|
|
135
|
-
url_private: string;
|
|
136
|
-
channels_json: string;
|
|
137
|
-
deleted: 0 | 1;
|
|
138
|
-
content: string | null;
|
|
139
|
-
created_at: string;
|
|
140
|
-
};
|
|
141
|
-
export type BookmarkRow = {
|
|
142
|
-
id: string;
|
|
143
|
-
channel_id: string;
|
|
144
|
-
title: string;
|
|
145
|
-
link: string;
|
|
146
|
-
emoji: string | null;
|
|
147
|
-
type: string;
|
|
148
|
-
created_by: string;
|
|
149
|
-
created_at: string;
|
|
150
|
-
};
|
|
151
|
-
export type ScheduledMessageRow = {
|
|
152
|
-
id: string;
|
|
153
|
-
channel_id: string;
|
|
154
|
-
user_id: string;
|
|
155
|
-
text: string;
|
|
156
|
-
thread_ts: string | null;
|
|
157
|
-
post_at: number;
|
|
158
|
-
date_created: number;
|
|
159
|
-
blocks_json: string;
|
|
160
|
-
};
|
|
161
|
-
export type Recorder = {
|
|
162
|
-
record(event: RecorderEvent): void;
|
|
163
|
-
events(): RecorderEvent[];
|
|
164
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
export declare const SUPPORTED_SURFACES: string[];
|
|
2
|
-
export declare const unsupportedEnvelope: {
|
|
3
|
-
readonly status: 501;
|
|
4
|
-
readonly body: {
|
|
5
|
-
readonly ok: false;
|
|
6
|
-
readonly error: "unsupported_endpoint";
|
|
7
|
-
readonly _twin: {
|
|
8
|
-
readonly fidelity: "unsupported";
|
|
9
|
-
readonly supported_surfaces: string[];
|
|
10
|
-
};
|
|
11
|
-
};
|
|
12
|
-
};
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
//
|
|
3
|
-
// Canonical loud-501 "unsupported endpoint" envelope for the Slack twin.
|
|
4
|
-
//
|
|
5
|
-
// Twin-only metadata (`fidelity`, `supported_surfaces`) lives under the `_twin`
|
|
6
|
-
// namespace, matching twin-github / twin-stripe. Kept in this dependency-light
|
|
7
|
-
// module — no sqlite, no http, no hono — so the cross-twin namespace lint
|
|
8
|
-
// (tools/fidelity/lint-twin-namespace.ts) can import the real wire shape without
|
|
9
|
-
// booting the app. `app.ts` builds its catch-all body from here, so the lint can
|
|
10
|
-
// never drift from what ships.
|
|
11
|
-
export const SUPPORTED_SURFACES = [
|
|
12
|
-
"auth.test",
|
|
13
|
-
"conversations.list",
|
|
14
|
-
"conversations.info",
|
|
15
|
-
"conversations.create",
|
|
16
|
-
"conversations.archive",
|
|
17
|
-
"conversations.invite",
|
|
18
|
-
"conversations.join",
|
|
19
|
-
"conversations.leave",
|
|
20
|
-
"conversations.kick",
|
|
21
|
-
"conversations.members",
|
|
22
|
-
"conversations.history",
|
|
23
|
-
"conversations.replies",
|
|
24
|
-
"conversations.open",
|
|
25
|
-
"chat.postMessage",
|
|
26
|
-
"chat.update",
|
|
27
|
-
"chat.delete",
|
|
28
|
-
"chat.scheduleMessage",
|
|
29
|
-
"chat.deleteScheduledMessage",
|
|
30
|
-
"reactions.add",
|
|
31
|
-
"reactions.remove",
|
|
32
|
-
"reactions.get",
|
|
33
|
-
"users.list",
|
|
34
|
-
"users.info",
|
|
35
|
-
"users.lookupByEmail",
|
|
36
|
-
"users.profile.get",
|
|
37
|
-
"users.profile.set",
|
|
38
|
-
"pins.add",
|
|
39
|
-
"pins.remove",
|
|
40
|
-
"pins.list",
|
|
41
|
-
"search.messages",
|
|
42
|
-
"files.upload",
|
|
43
|
-
"files.info",
|
|
44
|
-
"files.list",
|
|
45
|
-
"files.delete",
|
|
46
|
-
"bookmarks.add",
|
|
47
|
-
"bookmarks.remove",
|
|
48
|
-
"bookmarks.list",
|
|
49
|
-
"team.info",
|
|
50
|
-
];
|
|
51
|
-
export const unsupportedEnvelope = {
|
|
52
|
-
status: 501,
|
|
53
|
-
body: {
|
|
54
|
-
ok: false,
|
|
55
|
-
error: "unsupported_endpoint",
|
|
56
|
-
_twin: {
|
|
57
|
-
fidelity: "unsupported",
|
|
58
|
-
supported_surfaces: SUPPORTED_SURFACES,
|
|
59
|
-
},
|
|
60
|
-
},
|
|
61
|
-
};
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
type SlackUpstreamShape = {
|
|
2
|
-
[key: string]: unknown;
|
|
3
|
-
};
|
|
4
|
-
export type SlackWorkspace = SlackUpstreamShape;
|
|
5
|
-
export type SlackUserProfile = SlackUpstreamShape;
|
|
6
|
-
export type SlackUser = SlackUpstreamShape;
|
|
7
|
-
export type SlackChannel = SlackUpstreamShape;
|
|
8
|
-
export type SlackMessage = SlackUpstreamShape;
|
|
9
|
-
export type SlackReaction = SlackUpstreamShape;
|
|
10
|
-
export type SlackFileInfo = SlackUpstreamShape;
|
|
11
|
-
export type SlackBookmark = SlackUpstreamShape;
|
|
12
|
-
export type SlackScheduledMessage = SlackUpstreamShape;
|
|
13
|
-
export type DeepPartial<T> = T extends (infer U)[] ? Array<DeepPartial<U>> : T extends object ? {
|
|
14
|
-
[K in keyof T]?: DeepPartial<T[K]>;
|
|
15
|
-
} : T;
|
|
16
|
-
export type AssertNoUncovered<Upstream, Emitted, Allow extends PropertyKey> = Exclude<keyof Upstream, keyof Emitted | Allow> extends never ? true : {
|
|
17
|
-
__UNCOVERED_UPSTREAM_FIELDS__: Exclude<keyof Upstream, keyof Emitted | Allow>;
|
|
18
|
-
};
|
|
19
|
-
export {};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import type { Context } from "hono";
|
|
2
|
-
export declare function nowIso(): string;
|
|
3
|
-
export declare function nowUnix(): number;
|
|
4
|
-
export declare function requestId(): string;
|
|
5
|
-
/**
|
|
6
|
-
* Slack SDKs default to `application/x-www-form-urlencoded` request bodies;
|
|
7
|
-
* MCP clients send `application/json`. We dispatch on content-type and accept
|
|
8
|
-
* only those two (plus multipart/form-data). Any other or missing
|
|
9
|
-
* content-type returns an empty object — callers that need a particular
|
|
10
|
-
* field will surface a Zod validation error.
|
|
11
|
-
*
|
|
12
|
-
* Refusing to sniff bodies prevents JSON-typed values from being smuggled
|
|
13
|
-
* via `Content-Type: text/plain` (etc.) into endpoints that assume
|
|
14
|
-
* `args.foo` is a string after coerceFormValues.
|
|
15
|
-
*/
|
|
16
|
-
export declare function parseFormOrJson(c: Context): Promise<Record<string, unknown>>;
|
|
17
|
-
export declare function asString(value: unknown, fallback?: string): string;
|
|
18
|
-
export declare function asOptionalString(value: unknown): string | undefined;
|
|
19
|
-
export declare function asNumber(value: unknown, fallback: number): number;
|
|
20
|
-
export declare function asBool(value: unknown, fallback?: boolean): boolean;
|
|
21
|
-
export declare function csvList(value: unknown): string[];
|
|
22
|
-
export declare function cursorEncode(payload: {
|
|
23
|
-
offset: number;
|
|
24
|
-
}): string;
|
|
25
|
-
export declare function cursorDecode(cursor: string | undefined | null): {
|
|
26
|
-
offset: number;
|
|
27
|
-
} | null;
|
|
28
|
-
export declare function normalizeTs(value: unknown): string | undefined;
|
|
29
|
-
export declare const DETERMINISTIC_TS_BASE_SECONDS = 1735689600;
|
|
30
|
-
export declare function tsBaseSeconds(): number;
|
|
31
|
-
export declare function padTsCounter(counter: number): string;
|
|
@@ -1,136 +0,0 @@
|
|
|
1
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
2
|
-
import { randomUUID } from "node:crypto";
|
|
3
|
-
export function nowIso() {
|
|
4
|
-
return new Date().toISOString();
|
|
5
|
-
}
|
|
6
|
-
export function nowUnix() {
|
|
7
|
-
return Math.floor(Date.now() / 1000);
|
|
8
|
-
}
|
|
9
|
-
export function requestId() {
|
|
10
|
-
return `req_${randomUUID()}`;
|
|
11
|
-
}
|
|
12
|
-
/**
|
|
13
|
-
* Slack SDKs default to `application/x-www-form-urlencoded` request bodies;
|
|
14
|
-
* MCP clients send `application/json`. We dispatch on content-type and accept
|
|
15
|
-
* only those two (plus multipart/form-data). Any other or missing
|
|
16
|
-
* content-type returns an empty object — callers that need a particular
|
|
17
|
-
* field will surface a Zod validation error.
|
|
18
|
-
*
|
|
19
|
-
* Refusing to sniff bodies prevents JSON-typed values from being smuggled
|
|
20
|
-
* via `Content-Type: text/plain` (etc.) into endpoints that assume
|
|
21
|
-
* `args.foo` is a string after coerceFormValues.
|
|
22
|
-
*/
|
|
23
|
-
export async function parseFormOrJson(c) {
|
|
24
|
-
const contentType = (c.req.header("content-type") ?? "").toLowerCase();
|
|
25
|
-
if (contentType.includes("application/json")) {
|
|
26
|
-
try {
|
|
27
|
-
const body = await c.req.json();
|
|
28
|
-
if (body && typeof body === "object" && !Array.isArray(body)) {
|
|
29
|
-
return body;
|
|
30
|
-
}
|
|
31
|
-
return {};
|
|
32
|
-
}
|
|
33
|
-
catch {
|
|
34
|
-
return {};
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
if (contentType.includes("application/x-www-form-urlencoded") || contentType.includes("multipart/form-data")) {
|
|
38
|
-
try {
|
|
39
|
-
const body = await c.req.parseBody();
|
|
40
|
-
return coerceFormValues(body);
|
|
41
|
-
}
|
|
42
|
-
catch {
|
|
43
|
-
return {};
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
return {};
|
|
47
|
-
}
|
|
48
|
-
function coerceFormValues(raw) {
|
|
49
|
-
const out = {};
|
|
50
|
-
for (const [key, value] of Object.entries(raw)) {
|
|
51
|
-
out[key] = value;
|
|
52
|
-
}
|
|
53
|
-
return out;
|
|
54
|
-
}
|
|
55
|
-
export function asString(value, fallback = "") {
|
|
56
|
-
if (typeof value === "string")
|
|
57
|
-
return value;
|
|
58
|
-
if (value === undefined || value === null)
|
|
59
|
-
return fallback;
|
|
60
|
-
return String(value);
|
|
61
|
-
}
|
|
62
|
-
export function asOptionalString(value) {
|
|
63
|
-
if (typeof value !== "string")
|
|
64
|
-
return undefined;
|
|
65
|
-
if (value.length === 0)
|
|
66
|
-
return undefined;
|
|
67
|
-
return value;
|
|
68
|
-
}
|
|
69
|
-
export function asNumber(value, fallback) {
|
|
70
|
-
if (typeof value === "number" && Number.isFinite(value))
|
|
71
|
-
return value;
|
|
72
|
-
if (typeof value === "string" && value.length > 0) {
|
|
73
|
-
const parsed = Number(value);
|
|
74
|
-
if (Number.isFinite(parsed))
|
|
75
|
-
return parsed;
|
|
76
|
-
}
|
|
77
|
-
return fallback;
|
|
78
|
-
}
|
|
79
|
-
export function asBool(value, fallback = false) {
|
|
80
|
-
if (typeof value === "boolean")
|
|
81
|
-
return value;
|
|
82
|
-
if (typeof value === "string") {
|
|
83
|
-
const v = value.toLowerCase().trim();
|
|
84
|
-
if (v === "1" || v === "true" || v === "yes")
|
|
85
|
-
return true;
|
|
86
|
-
if (v === "0" || v === "false" || v === "no")
|
|
87
|
-
return false;
|
|
88
|
-
}
|
|
89
|
-
if (typeof value === "number")
|
|
90
|
-
return value !== 0;
|
|
91
|
-
return fallback;
|
|
92
|
-
}
|
|
93
|
-
export function csvList(value) {
|
|
94
|
-
if (Array.isArray(value))
|
|
95
|
-
return value.map(String).map((s) => s.trim()).filter(Boolean);
|
|
96
|
-
if (typeof value !== "string")
|
|
97
|
-
return [];
|
|
98
|
-
return value.split(",").map((s) => s.trim()).filter(Boolean);
|
|
99
|
-
}
|
|
100
|
-
export function cursorEncode(payload) {
|
|
101
|
-
return Buffer.from(JSON.stringify(payload), "utf8").toString("base64url");
|
|
102
|
-
}
|
|
103
|
-
export function cursorDecode(cursor) {
|
|
104
|
-
if (!cursor)
|
|
105
|
-
return null;
|
|
106
|
-
try {
|
|
107
|
-
const decoded = Buffer.from(cursor, "base64url").toString("utf8");
|
|
108
|
-
const parsed = JSON.parse(decoded);
|
|
109
|
-
if (parsed && typeof parsed === "object" && Number.isInteger(parsed.offset) && parsed.offset >= 0) {
|
|
110
|
-
return { offset: parsed.offset };
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
catch {
|
|
114
|
-
// fall through
|
|
115
|
-
}
|
|
116
|
-
return null;
|
|
117
|
-
}
|
|
118
|
-
export function normalizeTs(value) {
|
|
119
|
-
if (typeof value !== "string")
|
|
120
|
-
return undefined;
|
|
121
|
-
// Slack ts shape: "<unix_seconds>.<6-digit-counter>"
|
|
122
|
-
if (/^\d+\.\d{1,6}$/.test(value))
|
|
123
|
-
return value;
|
|
124
|
-
return undefined;
|
|
125
|
-
}
|
|
126
|
-
// Base unix seconds for deterministic ts generation. Controlled by
|
|
127
|
-
// SLACK_DETERMINISTIC_TS=1 in tests so output is byte-identical across runs.
|
|
128
|
-
export const DETERMINISTIC_TS_BASE_SECONDS = 1735689600; // 2025-01-01 UTC
|
|
129
|
-
export function tsBaseSeconds() {
|
|
130
|
-
if (process.env.SLACK_DETERMINISTIC_TS === "1")
|
|
131
|
-
return DETERMINISTIC_TS_BASE_SECONDS;
|
|
132
|
-
return Math.floor(Date.now() / 1000);
|
|
133
|
-
}
|
|
134
|
-
export function padTsCounter(counter) {
|
|
135
|
-
return String(counter).padStart(6, "0");
|
|
136
|
-
}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
The MIT License (MIT)
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2014 Jameson Little
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in
|
|
13
|
-
all copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
-
THE SOFTWARE.
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
base64-js
|
|
2
|
-
=========
|
|
3
|
-
|
|
4
|
-
`base64-js` does basic base64 encoding/decoding in pure JS.
|
|
5
|
-
|
|
6
|
-
[](http://travis-ci.org/beatgammit/base64-js)
|
|
7
|
-
|
|
8
|
-
Many browsers already have base64 encoding/decoding functionality, but it is for text data, not all-purpose binary data.
|
|
9
|
-
|
|
10
|
-
Sometimes encoding/decoding binary data in the browser is useful, and that is what this module does.
|
|
11
|
-
|
|
12
|
-
## install
|
|
13
|
-
|
|
14
|
-
With [npm](https://npmjs.org) do:
|
|
15
|
-
|
|
16
|
-
`npm install base64-js` and `var base64js = require('base64-js')`
|
|
17
|
-
|
|
18
|
-
For use in web browsers do:
|
|
19
|
-
|
|
20
|
-
`<script src="base64js.min.js"></script>`
|
|
21
|
-
|
|
22
|
-
[Get supported base64-js with the Tidelift Subscription](https://tidelift.com/subscription/pkg/npm-base64-js?utm_source=npm-base64-js&utm_medium=referral&utm_campaign=readme)
|
|
23
|
-
|
|
24
|
-
## methods
|
|
25
|
-
|
|
26
|
-
`base64js` has three exposed functions, `byteLength`, `toByteArray` and `fromByteArray`, which both take a single argument.
|
|
27
|
-
|
|
28
|
-
* `byteLength` - Takes a base64 string and returns length of byte array
|
|
29
|
-
* `toByteArray` - Takes a base64 string and returns a byte array
|
|
30
|
-
* `fromByteArray` - Takes a byte array and returns a base64 string
|
|
31
|
-
|
|
32
|
-
## license
|
|
33
|
-
|
|
34
|
-
MIT
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(function(a){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=a();else if("function"==typeof define&&define.amd)define([],a);else{var b;b="undefined"==typeof window?"undefined"==typeof global?"undefined"==typeof self?this:self:global:window,b.base64js=a()}})(function(){return function(){function b(d,e,g){function a(j,i){if(!e[j]){if(!d[j]){var f="function"==typeof require&&require;if(!i&&f)return f(j,!0);if(h)return h(j,!0);var c=new Error("Cannot find module '"+j+"'");throw c.code="MODULE_NOT_FOUND",c}var k=e[j]={exports:{}};d[j][0].call(k.exports,function(b){var c=d[j][1][b];return a(c||b)},k,k.exports,b,d,e,g)}return e[j].exports}for(var h="function"==typeof require&&require,c=0;c<g.length;c++)a(g[c]);return a}return b}()({"/":[function(a,b,c){'use strict';function d(a){var b=a.length;if(0<b%4)throw new Error("Invalid string. Length must be a multiple of 4");var c=a.indexOf("=");-1===c&&(c=b);var d=c===b?0:4-c%4;return[c,d]}function e(a,b,c){return 3*(b+c)/4-c}function f(a){var b,c,f=d(a),g=f[0],h=f[1],j=new m(e(a,g,h)),k=0,n=0<h?g-4:g;for(c=0;c<n;c+=4)b=l[a.charCodeAt(c)]<<18|l[a.charCodeAt(c+1)]<<12|l[a.charCodeAt(c+2)]<<6|l[a.charCodeAt(c+3)],j[k++]=255&b>>16,j[k++]=255&b>>8,j[k++]=255&b;return 2===h&&(b=l[a.charCodeAt(c)]<<2|l[a.charCodeAt(c+1)]>>4,j[k++]=255&b),1===h&&(b=l[a.charCodeAt(c)]<<10|l[a.charCodeAt(c+1)]<<4|l[a.charCodeAt(c+2)]>>2,j[k++]=255&b>>8,j[k++]=255&b),j}function g(a){return k[63&a>>18]+k[63&a>>12]+k[63&a>>6]+k[63&a]}function h(a,b,c){for(var d,e=[],f=b;f<c;f+=3)d=(16711680&a[f]<<16)+(65280&a[f+1]<<8)+(255&a[f+2]),e.push(g(d));return e.join("")}function j(a){for(var b,c=a.length,d=c%3,e=[],f=16383,g=0,j=c-d;g<j;g+=f)e.push(h(a,g,g+f>j?j:g+f));return 1===d?(b=a[c-1],e.push(k[b>>2]+k[63&b<<4]+"==")):2===d&&(b=(a[c-2]<<8)+a[c-1],e.push(k[b>>10]+k[63&b>>4]+k[63&b<<2]+"=")),e.join("")}c.byteLength=function(a){var b=d(a),c=b[0],e=b[1];return 3*(c+e)/4-e},c.toByteArray=f,c.fromByteArray=j;for(var k=[],l=[],m="undefined"==typeof Uint8Array?Array:Uint8Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=0,p=n.length;o<p;++o)k[o]=n[o],l[n.charCodeAt(o)]=o;l[45]=62,l[95]=63},{}]},{},[])("/")});
|