@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,141 +0,0 @@
|
|
|
1
|
-
import type { BookmarkRow, ChannelRow, FileRow, MessageRow, PinRow, ReactionRow, ScheduledMessageRow, UserRow, WorkspaceRow } from "./types.js";
|
|
2
|
-
import type { SlackFileInfo, SlackUser } from "./upstream-types.js";
|
|
3
|
-
export declare const SLACK_TWIN_HOST = "https://pome-twin.slack.com";
|
|
4
|
-
export declare const SLACK_TWIN_FILE_HOST = "https://pome-twin-files.slack.com";
|
|
5
|
-
export declare function slackOk<T extends Record<string, unknown>>(payload: T): {
|
|
6
|
-
ok: true;
|
|
7
|
-
} & T;
|
|
8
|
-
export declare function slackError(code: string, extra?: Record<string, unknown>): {
|
|
9
|
-
ok: false;
|
|
10
|
-
error: string;
|
|
11
|
-
} & Record<string, unknown>;
|
|
12
|
-
export declare function serializeWorkspace(row: WorkspaceRow): {
|
|
13
|
-
id: string;
|
|
14
|
-
name: string;
|
|
15
|
-
domain: string;
|
|
16
|
-
email_domain: string;
|
|
17
|
-
icon: {
|
|
18
|
-
image_default: boolean;
|
|
19
|
-
image_34: string;
|
|
20
|
-
image_44: string;
|
|
21
|
-
image_68: string;
|
|
22
|
-
image_88: string;
|
|
23
|
-
image_102: string;
|
|
24
|
-
image_132: string;
|
|
25
|
-
image_230: string;
|
|
26
|
-
};
|
|
27
|
-
enterprise_id: string | undefined;
|
|
28
|
-
url: string;
|
|
29
|
-
};
|
|
30
|
-
export declare function serializeUserProfile(row: UserRow, opts?: {
|
|
31
|
-
omitEmail?: boolean;
|
|
32
|
-
omitTeam?: boolean;
|
|
33
|
-
}): Record<string, unknown>;
|
|
34
|
-
export declare function serializeUser(row: UserRow, opts?: {
|
|
35
|
-
include_locale?: boolean;
|
|
36
|
-
omitProfileEmail?: boolean;
|
|
37
|
-
}): {
|
|
38
|
-
locale?: string | undefined;
|
|
39
|
-
id: string;
|
|
40
|
-
team_id: string;
|
|
41
|
-
name: string;
|
|
42
|
-
deleted: boolean;
|
|
43
|
-
color: string;
|
|
44
|
-
real_name: string;
|
|
45
|
-
tz: string;
|
|
46
|
-
tz_label: string;
|
|
47
|
-
tz_offset: number;
|
|
48
|
-
profile: SlackUser["profile"];
|
|
49
|
-
is_admin: boolean;
|
|
50
|
-
is_owner: boolean;
|
|
51
|
-
is_primary_owner: boolean;
|
|
52
|
-
is_restricted: boolean;
|
|
53
|
-
is_ultra_restricted: boolean;
|
|
54
|
-
is_bot: boolean;
|
|
55
|
-
is_app_user: boolean;
|
|
56
|
-
updated: number;
|
|
57
|
-
is_email_confirmed: boolean;
|
|
58
|
-
who_can_share_contact_card: string;
|
|
59
|
-
};
|
|
60
|
-
export declare function serializeChannel(row: ChannelRow, opts?: {
|
|
61
|
-
include_members?: string[];
|
|
62
|
-
num_members?: number;
|
|
63
|
-
last_read?: string;
|
|
64
|
-
is_member?: boolean;
|
|
65
|
-
}): Record<string, unknown>;
|
|
66
|
-
export declare function serializeMessage(row: MessageRow, opts?: {
|
|
67
|
-
reactions?: ReactionRow[];
|
|
68
|
-
include_team?: string;
|
|
69
|
-
permalink?: string;
|
|
70
|
-
parent_user_id?: string;
|
|
71
|
-
}): Record<string, unknown>;
|
|
72
|
-
export declare function groupReactions(rows: ReactionRow[]): {
|
|
73
|
-
name: string;
|
|
74
|
-
count: number;
|
|
75
|
-
users: string[];
|
|
76
|
-
}[];
|
|
77
|
-
export declare function serializeFile(row: FileRow): {
|
|
78
|
-
id: string;
|
|
79
|
-
created: number;
|
|
80
|
-
timestamp: number;
|
|
81
|
-
name: string;
|
|
82
|
-
title: string;
|
|
83
|
-
mimetype: string;
|
|
84
|
-
filetype: string;
|
|
85
|
-
pretty_type: string;
|
|
86
|
-
user: string;
|
|
87
|
-
user_team: string;
|
|
88
|
-
editable: boolean;
|
|
89
|
-
size: number;
|
|
90
|
-
mode: string;
|
|
91
|
-
is_external: boolean;
|
|
92
|
-
external_type: string;
|
|
93
|
-
is_public: boolean;
|
|
94
|
-
public_url_shared: boolean;
|
|
95
|
-
display_as_bot: boolean;
|
|
96
|
-
username: string;
|
|
97
|
-
url_private: string;
|
|
98
|
-
url_private_download: string;
|
|
99
|
-
permalink: string;
|
|
100
|
-
permalink_public: string;
|
|
101
|
-
channels: SlackFileInfo["channels"];
|
|
102
|
-
groups: never[];
|
|
103
|
-
ims: never[];
|
|
104
|
-
comments_count: number;
|
|
105
|
-
};
|
|
106
|
-
export declare function serializeBookmark(row: BookmarkRow): {
|
|
107
|
-
id: string;
|
|
108
|
-
channel_id: string;
|
|
109
|
-
title: string;
|
|
110
|
-
link: string;
|
|
111
|
-
emoji: string;
|
|
112
|
-
icon_url: string;
|
|
113
|
-
type: string;
|
|
114
|
-
entity_id: string;
|
|
115
|
-
date_created: number;
|
|
116
|
-
date_updated: number;
|
|
117
|
-
rank: string;
|
|
118
|
-
last_updated_by_user_id: string;
|
|
119
|
-
last_updated_by_team_id: string;
|
|
120
|
-
shortcut_id: string;
|
|
121
|
-
app_id: string;
|
|
122
|
-
app_action_id: string;
|
|
123
|
-
};
|
|
124
|
-
export declare function serializeScheduledMessage(row: ScheduledMessageRow): {
|
|
125
|
-
thread_ts?: string | undefined;
|
|
126
|
-
id: string;
|
|
127
|
-
channel_id: string;
|
|
128
|
-
post_at: number;
|
|
129
|
-
date_created: number;
|
|
130
|
-
text: string;
|
|
131
|
-
};
|
|
132
|
-
export declare function serializePin(pin: PinRow, message: Record<string, unknown>): {
|
|
133
|
-
type: string;
|
|
134
|
-
created: number;
|
|
135
|
-
created_by: string;
|
|
136
|
-
channel: string;
|
|
137
|
-
message: Record<string, unknown>;
|
|
138
|
-
};
|
|
139
|
-
export declare function safeJson(raw: string): unknown;
|
|
140
|
-
export declare function safeJsonArray(raw: string): unknown[];
|
|
141
|
-
export declare function tsToUnix(iso: string): number;
|
|
@@ -1,377 +0,0 @@
|
|
|
1
|
-
export const SLACK_TWIN_HOST = "https://pome-twin.slack.com";
|
|
2
|
-
export const SLACK_TWIN_FILE_HOST = "https://pome-twin-files.slack.com";
|
|
3
|
-
export function slackOk(payload) {
|
|
4
|
-
return { ok: true, ...payload };
|
|
5
|
-
}
|
|
6
|
-
export function slackError(code, extra = {}) {
|
|
7
|
-
return { ok: false, error: code, ...extra };
|
|
8
|
-
}
|
|
9
|
-
export function serializeWorkspace(row) {
|
|
10
|
-
return {
|
|
11
|
-
id: row.id,
|
|
12
|
-
name: row.name,
|
|
13
|
-
domain: row.domain,
|
|
14
|
-
email_domain: row.domain.includes(".") ? row.domain : `${row.domain}.slack.com`,
|
|
15
|
-
icon: {
|
|
16
|
-
image_default: true,
|
|
17
|
-
image_34: `${SLACK_TWIN_HOST}/team_default_v2_0034.png`,
|
|
18
|
-
image_44: `${SLACK_TWIN_HOST}/team_default_v2_0044.png`,
|
|
19
|
-
image_68: `${SLACK_TWIN_HOST}/team_default_v2_0068.png`,
|
|
20
|
-
image_88: `${SLACK_TWIN_HOST}/team_default_v2_0088.png`,
|
|
21
|
-
image_102: `${SLACK_TWIN_HOST}/team_default_v2_0102.png`,
|
|
22
|
-
image_132: `${SLACK_TWIN_HOST}/team_default_v2_0132.png`,
|
|
23
|
-
image_230: `${SLACK_TWIN_HOST}/team_default_v2_0230.png`,
|
|
24
|
-
},
|
|
25
|
-
enterprise_id: row.enterprise_id ?? undefined,
|
|
26
|
-
url: row.url,
|
|
27
|
-
};
|
|
28
|
-
}
|
|
29
|
-
export function serializeUserProfile(row,
|
|
30
|
-
// Real Slack varies the profile field set by ENDPOINT (FDRS-473 Kind B):
|
|
31
|
-
// - users.list embeds the profile WITHOUT `email` (omit it there);
|
|
32
|
-
// - users.profile.get returns the bare profile WITHOUT `team` (omit it there).
|
|
33
|
-
// users.info / lookupByEmail carry both. The flags let each caller match the
|
|
34
|
-
// real per-endpoint shape instead of the twin over-returning a field real Slack
|
|
35
|
-
// omits (a `field-added` divergence).
|
|
36
|
-
opts = {}) {
|
|
37
|
-
const profile = safeJson(row.profile_json);
|
|
38
|
-
// Static literal is anchored to the upstream Profile shape (FDRS-477). The
|
|
39
|
-
// `...profile` spread and the conditional email/team keys are folded in
|
|
40
|
-
// afterward: `team` is not an upstream Profile field (held out of the
|
|
41
|
-
// satisfies object) and the spread is an open Record (untyped values), so
|
|
42
|
-
// both live on the surrounding `out` accumulator, not the anchored literal.
|
|
43
|
-
const base = {
|
|
44
|
-
avatar_hash: "g000000000",
|
|
45
|
-
status_text: profile.status_text ?? "",
|
|
46
|
-
status_emoji: profile.status_emoji ?? "",
|
|
47
|
-
status_expiration: profile.status_expiration ?? 0,
|
|
48
|
-
real_name: row.real_name,
|
|
49
|
-
display_name: row.display_name || row.real_name || row.name,
|
|
50
|
-
real_name_normalized: row.real_name,
|
|
51
|
-
display_name_normalized: row.display_name || row.real_name || row.name,
|
|
52
|
-
image_24: `${SLACK_TWIN_HOST}/avatars/${row.id}_24.png`,
|
|
53
|
-
image_32: `${SLACK_TWIN_HOST}/avatars/${row.id}_32.png`,
|
|
54
|
-
image_48: `${SLACK_TWIN_HOST}/avatars/${row.id}_48.png`,
|
|
55
|
-
image_72: `${SLACK_TWIN_HOST}/avatars/${row.id}_72.png`,
|
|
56
|
-
image_192: `${SLACK_TWIN_HOST}/avatars/${row.id}_192.png`,
|
|
57
|
-
image_512: `${SLACK_TWIN_HOST}/avatars/${row.id}_512.png`,
|
|
58
|
-
};
|
|
59
|
-
const out = {
|
|
60
|
-
...base,
|
|
61
|
-
...profile,
|
|
62
|
-
};
|
|
63
|
-
// email/team are set AFTER the profile_json spread (so the row's canonical value
|
|
64
|
-
// wins), then dropped when the endpoint omits them.
|
|
65
|
-
if (opts.omitEmail) {
|
|
66
|
-
delete out.email;
|
|
67
|
-
}
|
|
68
|
-
else if (row.email != null && out.email === undefined) {
|
|
69
|
-
out.email = row.email;
|
|
70
|
-
}
|
|
71
|
-
if (opts.omitTeam) {
|
|
72
|
-
delete out.team;
|
|
73
|
-
}
|
|
74
|
-
else if (out.team === undefined) {
|
|
75
|
-
out.team = row.team_id;
|
|
76
|
-
}
|
|
77
|
-
return out;
|
|
78
|
-
}
|
|
79
|
-
export function serializeUser(row, opts = {}) {
|
|
80
|
-
return {
|
|
81
|
-
id: row.id,
|
|
82
|
-
team_id: row.team_id,
|
|
83
|
-
name: row.name,
|
|
84
|
-
deleted: Boolean(row.deleted),
|
|
85
|
-
color: "9f69e7",
|
|
86
|
-
real_name: row.real_name,
|
|
87
|
-
tz: row.tz,
|
|
88
|
-
tz_label: row.tz.replace(/_/g, " "),
|
|
89
|
-
tz_offset: 0,
|
|
90
|
-
// The embedded profile carries `team` (both users.list and users.info) but
|
|
91
|
-
// OMITS `email` on users.list — real Slack only returns the email on the
|
|
92
|
-
// single-user reads (users.info / lookupByEmail), not in the list envelope
|
|
93
|
-
// (FDRS-473 Kind B). `omitProfileEmail` is set by the users.list caller.
|
|
94
|
-
// serializeUserProfile returns Record<string, unknown> (its own `...profile`
|
|
95
|
-
// spread is an open record); cast to the upstream Profile shape so the parent
|
|
96
|
-
// `satisfies` stays exact without re-anchoring the nested record here.
|
|
97
|
-
profile: serializeUserProfile(row, { omitEmail: opts.omitProfileEmail }),
|
|
98
|
-
is_admin: Boolean(row.is_admin),
|
|
99
|
-
is_owner: Boolean(row.is_admin),
|
|
100
|
-
is_primary_owner: row.id === "U_PRIMARY",
|
|
101
|
-
is_restricted: false,
|
|
102
|
-
is_ultra_restricted: false,
|
|
103
|
-
is_bot: Boolean(row.is_bot),
|
|
104
|
-
is_app_user: false,
|
|
105
|
-
updated: tsToUnix(row.updated_at),
|
|
106
|
-
is_email_confirmed: Boolean(row.email),
|
|
107
|
-
who_can_share_contact_card: "EVERYONE",
|
|
108
|
-
...(opts.include_locale ? { locale: "en-US" } : {}),
|
|
109
|
-
};
|
|
110
|
-
}
|
|
111
|
-
export function serializeChannel(row, opts = {}) {
|
|
112
|
-
const created = tsToUnix(row.created_at);
|
|
113
|
-
const isIm = Boolean(row.is_im);
|
|
114
|
-
const isMpim = Boolean(row.is_mpim);
|
|
115
|
-
const isPrivate = Boolean(row.is_private || row.is_group);
|
|
116
|
-
// `parent_conversation` (always null) is a twin-only key the upstream Channel
|
|
117
|
-
// type lacks, so it is held out of the satisfies anchor and spread back below
|
|
118
|
-
// (mirrors twin-github repoJson parentRef). `members` (conditional, below) is
|
|
119
|
-
// likewise twin-only and spread back outside the anchor.
|
|
120
|
-
const out = {
|
|
121
|
-
id: row.id,
|
|
122
|
-
name: row.name,
|
|
123
|
-
name_normalized: row.name,
|
|
124
|
-
is_channel: Boolean(row.is_channel) && !isIm && !isMpim,
|
|
125
|
-
is_group: Boolean(row.is_group) || (isPrivate && !isIm && !isMpim),
|
|
126
|
-
is_im: isIm,
|
|
127
|
-
is_mpim: isMpim,
|
|
128
|
-
is_private: isPrivate,
|
|
129
|
-
is_archived: Boolean(row.is_archived),
|
|
130
|
-
is_general: row.name === "general",
|
|
131
|
-
is_shared: false,
|
|
132
|
-
is_org_shared: false,
|
|
133
|
-
is_pending_ext_shared: false,
|
|
134
|
-
pending_shared: [],
|
|
135
|
-
context_team_id: row.team_id,
|
|
136
|
-
creator: row.creator,
|
|
137
|
-
created,
|
|
138
|
-
unlinked: 0,
|
|
139
|
-
topic: {
|
|
140
|
-
value: row.topic,
|
|
141
|
-
creator: row.creator,
|
|
142
|
-
last_set: created,
|
|
143
|
-
},
|
|
144
|
-
purpose: {
|
|
145
|
-
value: row.purpose,
|
|
146
|
-
creator: row.creator,
|
|
147
|
-
last_set: created,
|
|
148
|
-
},
|
|
149
|
-
};
|
|
150
|
-
out.parent_conversation = null;
|
|
151
|
-
// Real Slack OMITS `previous_names` on conversations.info for a channel that was
|
|
152
|
-
// never renamed (it only carries the key once a rename history exists). The twin
|
|
153
|
-
// models no rename history, so it omits the key entirely rather than emitting an
|
|
154
|
-
// empty array — a faithful subset, not an over-returned twin-only field that
|
|
155
|
-
// diffs as `field-added` against real Slack (FDRS-473 Kind B).
|
|
156
|
-
if (opts.num_members !== undefined)
|
|
157
|
-
out.num_members = opts.num_members;
|
|
158
|
-
if (opts.is_member !== undefined)
|
|
159
|
-
out.is_member = opts.is_member;
|
|
160
|
-
if (opts.last_read !== undefined)
|
|
161
|
-
out.last_read = opts.last_read;
|
|
162
|
-
if (opts.include_members)
|
|
163
|
-
out.members = opts.include_members;
|
|
164
|
-
return out;
|
|
165
|
-
}
|
|
166
|
-
export function serializeMessage(row, opts = {}) {
|
|
167
|
-
// Bot identity: prefer persisted column on the message row (set on INSERT
|
|
168
|
-
// when author.is_bot). Fall back to the legacy U*/B* prefix heuristic for
|
|
169
|
-
// rows inserted by older code paths that pre-date the bot_id column.
|
|
170
|
-
const botId = row.bot_id ?? (row.user_id.startsWith("B") ? row.user_id : null);
|
|
171
|
-
const blocks = safeJsonArray(row.blocks_json);
|
|
172
|
-
const attachments = safeJsonArray(row.attachments_json);
|
|
173
|
-
// Every conditional key is folded in via a conditional spread so the whole
|
|
174
|
-
// literal stays under the `satisfies` anchor. `permalink` is the only
|
|
175
|
-
// emitted key absent from the upstream MessageElement type (an @slack/web-api
|
|
176
|
-
// conversations.history typegen gap, not a twin-only invention), so it is held
|
|
177
|
-
// out of the anchor and spread back on the Record accumulator below — mirrors
|
|
178
|
-
// the twin-github repoJson parentRef hold-out.
|
|
179
|
-
const out = {
|
|
180
|
-
type: "message",
|
|
181
|
-
user: row.user_id,
|
|
182
|
-
text: row.text,
|
|
183
|
-
ts: row.ts,
|
|
184
|
-
...(row.subtype ? { subtype: row.subtype } : {}),
|
|
185
|
-
...(row.thread_ts
|
|
186
|
-
? {
|
|
187
|
-
thread_ts: row.thread_ts,
|
|
188
|
-
// parent_user_id is the THREAD PARENT's author, not this row's author.
|
|
189
|
-
...(opts.parent_user_id ? { parent_user_id: opts.parent_user_id } : {}),
|
|
190
|
-
}
|
|
191
|
-
: {}),
|
|
192
|
-
...(row.reply_count > 0
|
|
193
|
-
? {
|
|
194
|
-
reply_count: row.reply_count,
|
|
195
|
-
reply_users_count: row.reply_users_count,
|
|
196
|
-
// row.latest_reply is `string | null`; upstream is `string | undefined`.
|
|
197
|
-
// Cast to the upstream field type — runtime value is unchanged.
|
|
198
|
-
latest_reply: row.latest_reply,
|
|
199
|
-
subscribed: false,
|
|
200
|
-
}
|
|
201
|
-
: {}),
|
|
202
|
-
...(row.edited_user_id && row.edited_ts
|
|
203
|
-
? { edited: { user: row.edited_user_id, ts: row.edited_ts } }
|
|
204
|
-
: {}),
|
|
205
|
-
// safeJsonArray returns unknown[]; cast to the upstream field types so the
|
|
206
|
-
// anchor stays exact (mirrors twin-github `as Upstream["field"]`).
|
|
207
|
-
...(blocks.length > 0 ? { blocks: blocks } : {}),
|
|
208
|
-
...(attachments.length > 0 ? { attachments: attachments } : {}),
|
|
209
|
-
...(opts.reactions && opts.reactions.length > 0
|
|
210
|
-
? { reactions: groupReactions(opts.reactions) }
|
|
211
|
-
: {}),
|
|
212
|
-
...(opts.include_team ? { team: opts.include_team } : {}),
|
|
213
|
-
...(botId
|
|
214
|
-
? {
|
|
215
|
-
bot_id: botId,
|
|
216
|
-
...(row.app_id ? { app_id: row.app_id } : {}),
|
|
217
|
-
bot_profile: {
|
|
218
|
-
id: botId,
|
|
219
|
-
deleted: false,
|
|
220
|
-
name: row.username ?? botId,
|
|
221
|
-
updated: tsToUnix(row.ts),
|
|
222
|
-
app_id: row.app_id ?? "A_POME",
|
|
223
|
-
icons: row.icon_url
|
|
224
|
-
? { image_36: row.icon_url, image_48: row.icon_url, image_72: row.icon_url }
|
|
225
|
-
: {
|
|
226
|
-
image_36: `${SLACK_TWIN_HOST}/avatars/${botId}_36.png`,
|
|
227
|
-
image_48: `${SLACK_TWIN_HOST}/avatars/${botId}_48.png`,
|
|
228
|
-
image_72: `${SLACK_TWIN_HOST}/avatars/${botId}_72.png`,
|
|
229
|
-
},
|
|
230
|
-
team_id: opts.include_team ?? "",
|
|
231
|
-
},
|
|
232
|
-
}
|
|
233
|
-
: {}),
|
|
234
|
-
...(row.username ? { username: row.username } : {}),
|
|
235
|
-
};
|
|
236
|
-
if (opts.permalink)
|
|
237
|
-
out.permalink = opts.permalink;
|
|
238
|
-
if (row.icon_emoji)
|
|
239
|
-
out.icons = { ...(out.icons ?? {}), emoji: row.icon_emoji };
|
|
240
|
-
if (row.icon_url)
|
|
241
|
-
out.icons = { ...(out.icons ?? {}), image_64: row.icon_url };
|
|
242
|
-
return out;
|
|
243
|
-
}
|
|
244
|
-
export function groupReactions(rows) {
|
|
245
|
-
const grouped = new Map();
|
|
246
|
-
for (const row of rows) {
|
|
247
|
-
const existing = grouped.get(row.name);
|
|
248
|
-
if (existing) {
|
|
249
|
-
existing.count += 1;
|
|
250
|
-
existing.users.push(row.user_id);
|
|
251
|
-
}
|
|
252
|
-
else {
|
|
253
|
-
grouped.set(row.name, {
|
|
254
|
-
name: row.name,
|
|
255
|
-
count: 1,
|
|
256
|
-
users: [row.user_id],
|
|
257
|
-
});
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
return [...grouped.values()];
|
|
261
|
-
}
|
|
262
|
-
export function serializeFile(row) {
|
|
263
|
-
return {
|
|
264
|
-
id: row.id,
|
|
265
|
-
created: tsToUnix(row.created_at),
|
|
266
|
-
timestamp: tsToUnix(row.created_at),
|
|
267
|
-
name: row.name,
|
|
268
|
-
title: row.title,
|
|
269
|
-
mimetype: row.mimetype,
|
|
270
|
-
filetype: row.filetype,
|
|
271
|
-
pretty_type: prettyFiletype(row.filetype),
|
|
272
|
-
user: row.user_id,
|
|
273
|
-
user_team: row.team_id,
|
|
274
|
-
editable: row.filetype === "text" || row.filetype === "markdown",
|
|
275
|
-
size: row.size,
|
|
276
|
-
mode: "hosted",
|
|
277
|
-
is_external: false,
|
|
278
|
-
external_type: "",
|
|
279
|
-
is_public: false,
|
|
280
|
-
public_url_shared: false,
|
|
281
|
-
display_as_bot: false,
|
|
282
|
-
username: "",
|
|
283
|
-
url_private: row.url_private || `${SLACK_TWIN_FILE_HOST}/files-pri/${row.team_id}-${row.id}/${row.name}`,
|
|
284
|
-
url_private_download: `${SLACK_TWIN_FILE_HOST}/files-pri/${row.team_id}-${row.id}/download/${row.name}`,
|
|
285
|
-
permalink: `${SLACK_TWIN_HOST}/files/${row.user_id}/${row.id}/${row.name}`,
|
|
286
|
-
permalink_public: `${SLACK_TWIN_FILE_HOST}/${row.team_id}-${row.id}-public/${row.name}`,
|
|
287
|
-
// safeJsonArray returns unknown[]; upstream File.channels is string[]. Cast
|
|
288
|
-
// to the upstream field type (mirrors twin-github `as Upstream["field"]`).
|
|
289
|
-
channels: safeJsonArray(row.channels_json),
|
|
290
|
-
groups: [],
|
|
291
|
-
ims: [],
|
|
292
|
-
comments_count: 0,
|
|
293
|
-
};
|
|
294
|
-
}
|
|
295
|
-
export function serializeBookmark(row) {
|
|
296
|
-
return {
|
|
297
|
-
id: row.id,
|
|
298
|
-
channel_id: row.channel_id,
|
|
299
|
-
title: row.title,
|
|
300
|
-
link: row.link,
|
|
301
|
-
emoji: row.emoji ?? "",
|
|
302
|
-
icon_url: "",
|
|
303
|
-
type: row.type,
|
|
304
|
-
entity_id: "",
|
|
305
|
-
date_created: tsToUnix(row.created_at),
|
|
306
|
-
date_updated: tsToUnix(row.created_at),
|
|
307
|
-
rank: "",
|
|
308
|
-
last_updated_by_user_id: row.created_by,
|
|
309
|
-
last_updated_by_team_id: "",
|
|
310
|
-
shortcut_id: "",
|
|
311
|
-
app_id: "",
|
|
312
|
-
app_action_id: "",
|
|
313
|
-
};
|
|
314
|
-
}
|
|
315
|
-
export function serializeScheduledMessage(row) {
|
|
316
|
-
// `thread_ts` has no key in the upstream ScheduledMessage type, so it is held
|
|
317
|
-
// out of the satisfies anchor and spread back via a narrow cast (mirrors the
|
|
318
|
-
// twin-github repoJson parentRef hold-out).
|
|
319
|
-
const base = {
|
|
320
|
-
id: row.id,
|
|
321
|
-
channel_id: row.channel_id,
|
|
322
|
-
post_at: row.post_at,
|
|
323
|
-
date_created: row.date_created,
|
|
324
|
-
text: row.text,
|
|
325
|
-
};
|
|
326
|
-
return {
|
|
327
|
-
...base,
|
|
328
|
-
...(row.thread_ts ? { thread_ts: row.thread_ts } : {}),
|
|
329
|
-
};
|
|
330
|
-
}
|
|
331
|
-
export function serializePin(pin, message) {
|
|
332
|
-
return {
|
|
333
|
-
type: "message",
|
|
334
|
-
created: tsToUnix(pin.pinned_at),
|
|
335
|
-
created_by: pin.pinned_by,
|
|
336
|
-
channel: pin.channel_id,
|
|
337
|
-
message,
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
export function safeJson(raw) {
|
|
341
|
-
try {
|
|
342
|
-
return JSON.parse(raw);
|
|
343
|
-
}
|
|
344
|
-
catch {
|
|
345
|
-
return {};
|
|
346
|
-
}
|
|
347
|
-
}
|
|
348
|
-
export function safeJsonArray(raw) {
|
|
349
|
-
try {
|
|
350
|
-
const parsed = JSON.parse(raw);
|
|
351
|
-
if (Array.isArray(parsed))
|
|
352
|
-
return parsed;
|
|
353
|
-
return [];
|
|
354
|
-
}
|
|
355
|
-
catch {
|
|
356
|
-
return [];
|
|
357
|
-
}
|
|
358
|
-
}
|
|
359
|
-
export function tsToUnix(iso) {
|
|
360
|
-
const ms = Date.parse(iso);
|
|
361
|
-
if (Number.isNaN(ms))
|
|
362
|
-
return 0;
|
|
363
|
-
return Math.floor(ms / 1000);
|
|
364
|
-
}
|
|
365
|
-
function prettyFiletype(filetype) {
|
|
366
|
-
const mapping = {
|
|
367
|
-
text: "Plain Text",
|
|
368
|
-
markdown: "Markdown",
|
|
369
|
-
pdf: "PDF",
|
|
370
|
-
gif: "GIF",
|
|
371
|
-
png: "PNG",
|
|
372
|
-
jpg: "JPEG",
|
|
373
|
-
jpeg: "JPEG",
|
|
374
|
-
binary: "Binary",
|
|
375
|
-
};
|
|
376
|
-
return mapping[filetype] ?? filetype.toUpperCase();
|
|
377
|
-
}
|
|
@@ -1,97 +0,0 @@
|
|
|
1
|
-
import { z } from "zod";
|
|
2
|
-
import type { StateDelta } from "@pome-sh/shared-types";
|
|
3
|
-
import type { SlackDomain } from "./domain.js";
|
|
4
|
-
export declare const toolDefinitions: readonly [{
|
|
5
|
-
readonly name: "slack_post_message";
|
|
6
|
-
readonly description: "Post a new message to a Slack channel";
|
|
7
|
-
readonly readOnly: false;
|
|
8
|
-
readonly schema: z.ZodObject<{
|
|
9
|
-
channel_id: z.ZodString;
|
|
10
|
-
text: z.ZodString;
|
|
11
|
-
}, z.core.$strict>;
|
|
12
|
-
}, {
|
|
13
|
-
readonly name: "slack_reply_to_thread";
|
|
14
|
-
readonly description: "Reply to a specific message thread in Slack";
|
|
15
|
-
readonly readOnly: false;
|
|
16
|
-
readonly schema: z.ZodObject<{
|
|
17
|
-
channel_id: z.ZodString;
|
|
18
|
-
thread_ts: z.ZodString;
|
|
19
|
-
text: z.ZodString;
|
|
20
|
-
}, z.core.$strict>;
|
|
21
|
-
}, {
|
|
22
|
-
readonly name: "slack_add_reaction";
|
|
23
|
-
readonly description: "Add a reaction emoji to a message";
|
|
24
|
-
readonly readOnly: false;
|
|
25
|
-
readonly schema: z.ZodObject<{
|
|
26
|
-
channel_id: z.ZodString;
|
|
27
|
-
timestamp: z.ZodString;
|
|
28
|
-
reaction: z.ZodString;
|
|
29
|
-
}, z.core.$strict>;
|
|
30
|
-
}, {
|
|
31
|
-
readonly name: "slack_get_channel_history";
|
|
32
|
-
readonly description: "Get recent messages from a channel";
|
|
33
|
-
readonly readOnly: true;
|
|
34
|
-
readonly schema: z.ZodObject<{
|
|
35
|
-
channel_id: z.ZodString;
|
|
36
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
37
|
-
}, z.core.$strict>;
|
|
38
|
-
}, {
|
|
39
|
-
readonly name: "slack_get_thread_replies";
|
|
40
|
-
readonly description: "Get all replies in a message thread";
|
|
41
|
-
readonly readOnly: true;
|
|
42
|
-
readonly schema: z.ZodObject<{
|
|
43
|
-
channel_id: z.ZodString;
|
|
44
|
-
thread_ts: z.ZodString;
|
|
45
|
-
}, z.core.$strict>;
|
|
46
|
-
}, {
|
|
47
|
-
readonly name: "slack_list_channels";
|
|
48
|
-
readonly description: "List public or pre-defined channels in the workspace with pagination";
|
|
49
|
-
readonly readOnly: true;
|
|
50
|
-
readonly schema: z.ZodObject<{
|
|
51
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
52
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
53
|
-
}, z.core.$strict>;
|
|
54
|
-
}, {
|
|
55
|
-
readonly name: "slack_get_users";
|
|
56
|
-
readonly description: "Get a list of all users in the workspace with their basic profile information";
|
|
57
|
-
readonly readOnly: true;
|
|
58
|
-
readonly schema: z.ZodObject<{
|
|
59
|
-
cursor: z.ZodOptional<z.ZodString>;
|
|
60
|
-
limit: z.ZodOptional<z.ZodNumber>;
|
|
61
|
-
}, z.core.$strict>;
|
|
62
|
-
}, {
|
|
63
|
-
readonly name: "slack_get_user_profile";
|
|
64
|
-
readonly description: "Get detailed profile information for a specific user";
|
|
65
|
-
readonly readOnly: true;
|
|
66
|
-
readonly schema: z.ZodObject<{
|
|
67
|
-
user_id: z.ZodString;
|
|
68
|
-
}, z.core.$strict>;
|
|
69
|
-
}];
|
|
70
|
-
export declare const MUTATING_TOOL_NAMES: Set<string>;
|
|
71
|
-
export declare function isMutatingTool(name: string): boolean;
|
|
72
|
-
type ToolJsonSchema = {
|
|
73
|
-
type: "object";
|
|
74
|
-
properties: Record<string, unknown>;
|
|
75
|
-
required: string[];
|
|
76
|
-
additionalProperties: false;
|
|
77
|
-
};
|
|
78
|
-
export declare function listTools(): {
|
|
79
|
-
annotations?: {
|
|
80
|
-
readOnlyHint: boolean;
|
|
81
|
-
} | undefined;
|
|
82
|
-
name: "slack_post_message" | "slack_reply_to_thread" | "slack_add_reaction" | "slack_get_channel_history" | "slack_get_thread_replies" | "slack_list_channels" | "slack_get_users" | "slack_get_user_profile";
|
|
83
|
-
description: "Post a new message to a Slack channel" | "Reply to a specific message thread in Slack" | "Add a reaction emoji to a message" | "Get recent messages from a channel" | "Get all replies in a message thread" | "List public or pre-defined channels in the workspace with pagination" | "Get a list of all users in the workspace with their basic profile information" | "Get detailed profile information for a specific user";
|
|
84
|
-
input_schema: ToolJsonSchema;
|
|
85
|
-
}[];
|
|
86
|
-
export declare function listToolsForMcp(): {
|
|
87
|
-
annotations?: {
|
|
88
|
-
readOnlyHint: boolean;
|
|
89
|
-
} | undefined;
|
|
90
|
-
name: "slack_post_message" | "slack_reply_to_thread" | "slack_add_reaction" | "slack_get_channel_history" | "slack_get_thread_replies" | "slack_list_channels" | "slack_get_users" | "slack_get_user_profile";
|
|
91
|
-
description: "Post a new message to a Slack channel" | "Reply to a specific message thread in Slack" | "Add a reaction emoji to a message" | "Get recent messages from a channel" | "Get all replies in a message thread" | "List public or pre-defined channels in the workspace with pagination" | "Get a list of all users in the workspace with their basic profile information" | "Get detailed profile information for a specific user";
|
|
92
|
-
inputSchema: ToolJsonSchema;
|
|
93
|
-
}[];
|
|
94
|
-
export declare function executeTool(domain: SlackDomain, name: string, args: Record<string, unknown>, onDelta?: (delta: StateDelta) => void, actor?: {
|
|
95
|
-
login?: string;
|
|
96
|
-
}): unknown;
|
|
97
|
-
export {};
|