Skip to content

Commit

Permalink
Merge pull request #43 from ubiquity-os-marketplace/development
Browse files Browse the repository at this point in the history
Merge development into main
  • Loading branch information
gentlementlegen authored Nov 30, 2024
2 parents 86303ce + 3077657 commit 77d0876
Show file tree
Hide file tree
Showing 38 changed files with 909 additions and 9,194 deletions.
14 changes: 13 additions & 1 deletion .cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,19 @@
"Superbase",
"SUPABASE",
"CODEOWNER",
"nosniff"
"nosniff",
"voyageai",
"OPENROUTER",
"reranked",
"rerank",
"Reranked",
"ftse",
"Reranking",
"VOYAGEAI",
"supergroup",
"ubiquityos",
"newtask",
"supergroup"
],
"dictionaries": ["typescript", "node", "software-terms"],
"import": ["@cspell/dict-typescript/cspell-ext.json", "@cspell/dict-node/cspell-ext.json", "@cspell/dict-software-terms"],
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/compute.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ on:
description: "Ref"
signature:
description: "Signature to identify the Kernel"
command:
description: "Command"

jobs:
compute:
Expand All @@ -39,4 +41,4 @@ jobs:
env:
TELEGRAM_BOT_ENV: ${{ secrets.TELEGRAM_BOT_ENV }}
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
2 changes: 1 addition & 1 deletion .github/workflows/conventional-commits.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ jobs:
name: Conventional Commits
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: ubiquity/action-conventional-commits@master
9 changes: 3 additions & 6 deletions .github/workflows/cspell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,10 @@ jobs:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "20.10.0"
- uses: oven-sh/setup-bun@v2

- name: Install cspell
run: yarn add cspell
run: bun add cspell

- name: Run cspell
run: yarn format:cspell
run: bun run format:cspell
6 changes: 2 additions & 4 deletions .github/workflows/jest-testing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,14 @@ jobs:
permissions: write-all
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
with:
node-version: "20.10.0"
- uses: oven-sh/setup-bun@v2

- uses: actions/checkout@master
with:
fetch-depth: 0

- name: Jest With Coverage
run: yarn install --immutable --immutable-cache --check-cache && yarn test
run: bun install --frozen-lockfile && bun run test

- name: Add Jest Report to Summary
if: always()
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/knip.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,19 +11,16 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: 20.10.0
- uses: oven-sh/setup-bun@v2

- name: Install toolchain
run: yarn install
run: bun install

- name: Store PR number
run: echo ${{ github.event.number }} > pr-number.txt

- name: Run Knip
run: yarn knip || yarn knip --reporter json > knip-results.json
run: bun run knip || bun run knip --reporter json > knip-results.json

- name: Upload knip result
if: failure()
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/update-configuration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,9 @@ jobs:
steps:
- uses: ubiquity-os/action-deploy-plugin@main
with:
pluginEntry: '${{ github.workspace }}/src/workflow-entry.ts'
schemaPath: '${{ github.workspace }}/src/types/plugin-inputs.ts'
pluginEntry: "${{ github.workspace }}/src/workflow-entry.ts"
schemaPath: "${{ github.workspace }}/src/types/plugin-inputs.ts"
treatAsEsm: true
env:
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
8 changes: 1 addition & 7 deletions .github/workflows/worker-delete.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,7 @@ jobs:
runs-on: ubuntu-latest
name: Delete Deployment
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.10.0"

- name: Enable corepack
run: corepack enable
- uses: oven-sh/setup-bun@v2

- uses: actions/checkout@v4

Expand Down
18 changes: 11 additions & 7 deletions .github/workflows/worker-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@ jobs:
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: "20.10.0"

- name: Enable corepack
run: corepack enable
- uses: oven-sh/setup-bun@v2

- uses: actions/checkout@v4

Expand All @@ -42,10 +36,20 @@ jobs:
TELEGRAM_BOT_ENV
APP_ID
APP_PRIVATE_KEY
CLOUDFLARE_ACCOUNT_ID
CLOUDFLARE_API_TOKEN
OPENAI_API_KEY
OPENROUTER_API_KEY
VOYAGEAI_API_KEY
env:
TELEGRAM_BOT_ENV: ${{ secrets.TELEGRAM_BOT_ENV }}
APP_ID: ${{ secrets.APP_ID }}
APP_PRIVATE_KEY: ${{ secrets.APP_PRIVATE_KEY }}
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
OPENROUTER_API_KEY: ${{ secrets.OPENROUTER_API_KEY }}
VOYAGEAI_API_KEY: ${{ secrets.VOYAGEAI_API_KEY }}

- name: Write Deployment URL to Summary
run: |
Expand Down
26 changes: 26 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# Changelog

## 1.0.0 (2024-11-01)

### Features

- callback proxy ([0673806](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/067380691740ae30f26834cb6caec496e088ea5d))
- create room on assignment, skip if exists ([390e3ed](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/390e3ed5c4ea26e3bae5371991c7c19f04187321))
- disqualification trigger ([8e5ace4](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/8e5ace47770c6c363801e6dddb3345da05ce5d61))
- GitHub storage adapter ([db459b6](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/db459b6cdd38dd64aaadd8441bac5ff6c7301050))
- payment notifications ([14b0843](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/14b0843a48a0f9ad5d91e50e2ef3ad71210417ce))
- reminder trigger ([c72012f](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/c72012fc07c98d9d2ace6f474d9c5c1bfa8bf5c5))
- repo secret saving, guided env setup ([00d9d42](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/00d9d422fd69aaf3dd605c351643480c589afa9a))
- review trigger ([bf3a904](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/bf3a9048f503fea64c315edf90811f67c94da041))
- session & storage manager ([50976ed](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/50976ed8373762a2765aebc205e8fd6132939de0))
- storage app ([c471790](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/c4717907eb5a1cc584eded77015e815a24cca066))
- subscribe command ([3afcea7](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/3afcea74d779885ec12e81162210f090c99803cd))
- targetBranch config item ([0947e07](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/0947e076e2365b4f3d31ddade203843d967e0863))
- telegram register command ([c46e204](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/c46e204893e5c1677e8632841cc1cf9989bcf61e))

### Bug Fixes

- add Telegram Room action and update workflows ([fcc10b1](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/fcc10b10e00329f8907ae224a5b4e9352b5b6a0e))
- configure Jest to support ES modules in TypeScript ([47403a0](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/47403a02b98198a601615c44684b6b36102b2ee5))
- proxy usage, event support for labeled/close/reopen with storage ([bf8dee4](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/bf8dee418132a1f58ff6a9ab59734d2f2436de93))
- update logger and add support for multiple Octokit types ([71d2836](https://github.com/ubiquity-os-marketplace/ubiquity-os-kernel-telegram/commit/71d283650ddda609868578902906196cf41b1df5))
Binary file added bun.lockb
Binary file not shown.
148 changes: 148 additions & 0 deletions dist/33.index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
export const id = 33;
export const ids = [33];
export const modules = {

/***/ 57666:
/***/ ((module, __unused_webpack_exports, __webpack_require__) => {

/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */

if (!globalThis.DOMException) {
try {
const { MessageChannel } = __webpack_require__(28167),
port = new MessageChannel().port1,
ab = new ArrayBuffer()
port.postMessage(ab, [ab, ab])
} catch (err) {
err.constructor.name === 'DOMException' && (
globalThis.DOMException = err.constructor
)
}
}

module.exports = globalThis.DOMException


/***/ }),

/***/ 42033:
/***/ ((__unused_webpack___webpack_module__, __webpack_exports__, __webpack_require__) => {


// EXPORTS
__webpack_require__.d(__webpack_exports__, {
fileFromPath: () => (/* binding */ fileFromPath)
});

// UNUSED EXPORTS: fileFromPathSync, isFile

// EXTERNAL MODULE: external "fs"
var external_fs_ = __webpack_require__(79896);
// EXTERNAL MODULE: external "path"
var external_path_ = __webpack_require__(16928);
// EXTERNAL MODULE: ./node_modules/node-domexception/index.js
var node_domexception = __webpack_require__(57666);
// EXTERNAL MODULE: ./node_modules/formdata-node/lib/esm/File.js
var File = __webpack_require__(2928);
;// CONCATENATED MODULE: ./node_modules/formdata-node/lib/esm/isPlainObject.js
const getType = (value) => (Object.prototype.toString.call(value).slice(8, -1).toLowerCase());
function isPlainObject(value) {
if (getType(value) !== "object") {
return false;
}
const pp = Object.getPrototypeOf(value);
if (pp === null || pp === undefined) {
return true;
}
const Ctor = pp.constructor && pp.constructor.toString();
return Ctor === Object.toString();
}
/* harmony default export */ const esm_isPlainObject = (isPlainObject);

// EXTERNAL MODULE: ./node_modules/formdata-node/lib/esm/isFile.js
var isFile = __webpack_require__(80928);
;// CONCATENATED MODULE: ./node_modules/formdata-node/lib/esm/fileFromPath.js
var __classPrivateFieldSet = (undefined && undefined.__classPrivateFieldSet) || function (receiver, state, value, kind, f) {
if (kind === "m") throw new TypeError("Private method is not writable");
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
};
var __classPrivateFieldGet = (undefined && undefined.__classPrivateFieldGet) || function (receiver, state, kind, f) {
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a getter");
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
};
var _FileFromPath_path, _FileFromPath_start;






const MESSAGE = "The requested file could not be read, "
+ "typically due to permission problems that have occurred after a reference "
+ "to a file was acquired.";
class FileFromPath {
constructor(input) {
_FileFromPath_path.set(this, void 0);
_FileFromPath_start.set(this, void 0);
__classPrivateFieldSet(this, _FileFromPath_path, input.path, "f");
__classPrivateFieldSet(this, _FileFromPath_start, input.start || 0, "f");
this.name = (0,external_path_.basename)(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
this.size = input.size;
this.lastModified = input.lastModified;
}
slice(start, end) {
return new FileFromPath({
path: __classPrivateFieldGet(this, _FileFromPath_path, "f"),
lastModified: this.lastModified,
size: end - start,
start
});
}
async *stream() {
const { mtimeMs } = await external_fs_.promises.stat(__classPrivateFieldGet(this, _FileFromPath_path, "f"));
if (mtimeMs > this.lastModified) {
throw new node_domexception(MESSAGE, "NotReadableError");
}
if (this.size) {
yield* (0,external_fs_.createReadStream)(__classPrivateFieldGet(this, _FileFromPath_path, "f"), {
start: __classPrivateFieldGet(this, _FileFromPath_start, "f"),
end: __classPrivateFieldGet(this, _FileFromPath_start, "f") + this.size - 1
});
}
}
get [(_FileFromPath_path = new WeakMap(), _FileFromPath_start = new WeakMap(), Symbol.toStringTag)]() {
return "File";
}
}
function createFileFromPath(path, { mtimeMs, size }, filenameOrOptions, options = {}) {
let filename;
if (esm_isPlainObject(filenameOrOptions)) {
[options, filename] = [filenameOrOptions, undefined];
}
else {
filename = filenameOrOptions;
}
const file = new FileFromPath({ path, size, lastModified: mtimeMs });
if (!filename) {
filename = file.name;
}
return new File/* File */.Z([file], filename, {
...options, lastModified: file.lastModified
});
}
function fileFromPathSync(path, filenameOrOptions, options = {}) {
const stats = statSync(path);
return createFileFromPath(path, stats, filenameOrOptions, options);
}
async function fileFromPath(path, filenameOrOptions, options) {
const stats = await external_fs_.promises.stat(path);
return createFileFromPath(path, stats, filenameOrOptions, options);
}


/***/ })

};
36 changes: 31 additions & 5 deletions dist/index.js

Large diffs are not rendered by default.

3 changes: 3 additions & 0 deletions dist/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"type": "module"
}
2 changes: 1 addition & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export default tsEslint.config({
"@typescript-eslint": tsEslint.plugin,
"check-file": checkFile,
},
ignores: [".github/knip.ts", "tests/**/*.ts", "eslint.config.mjs", ".wrangler/**/*.{js,ts}", "coverage/**/*.js"],
ignores: [".github/knip.ts", "tests/**/*.ts", "eslint.config.mjs", ".wrangler/**/*.{js,ts}", "coverage/**/*.js", "dist/**/*.js"],
extends: [eslint.configs.recommended, ...tsEslint.configs.recommended, sonarjs.configs.recommended],
languageOptions: {
parser: tsEslint.parser,
Expand Down
Loading

0 comments on commit 77d0876

Please sign in to comment.