diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 70ec96b9db..a950a2dfce 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -927,4 +927,4 @@ jobs: uses: actions/upload-artifact@v4 with: name: TraceX-Linux - path: ./qms-desktop-package/deploy/TraceX-linux-*.zip \ No newline at end of file + path: ./qms-desktop-package/deploy/TraceX-linux-*.zip diff --git a/common/config/rush/.npmrc b/common/config/rush/.npmrc index 05fbfbb884..4bb3c57a4e 100644 --- a/common/config/rush/.npmrc +++ b/common/config/rush/.npmrc @@ -4,20 +4,30 @@ # # NOTE: The "rush publish" command uses .npmrc-publish instead. # -# Before invoking the package manager, Rush will copy this file to the folder where installation -# is performed. The copied file will omit any config lines that reference environment variables +# Before invoking the package manager, Rush will generate an .npmrc in the folder where installation +# is performed. This generated file will omit any config lines that reference environment variables # that are undefined in that session; this avoids problems that would otherwise result due to # a missing variable being replaced by an empty string. # +# If "subspacesEnabled" is true in subspaces.json, the generated file will merge settings from +# "common/config/rush/.npmrc" and "common/config/subspaces//.npmrc", with the latter taking +# precedence. +# # * * * SECURITY WARNING * * * # # It is NOT recommended to store authentication tokens in a text file on a lab machine, because -# other unrelated processes may be able to read the file. Also, the file may persist indefinitely, +# other unrelated processes may be able to read that file. Also, the file may persist indefinitely, # for example if the machine loses power. A safer practice is to pass the token via an # environment variable, which can be referenced from .npmrc using ${} expansion. For example: # # //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} # -registry=https://registry.npmjs.org/ -@hcengineering:registry=https://npm.pkg.github.com +# Explicitly specify the NPM registry that "rush install" and "rush update" will use by default: +registry=https://registry.npmjs.org/ + +# Optionally provide an authentication token for the above registry URL (if it is a private registry): +//registry.npmjs.org/:_authToken=${NPM_TOKEN} + +# Change this to "true" if your registry requires authentication for read-only operations: +always-auth=false diff --git a/common/config/rush/.npmrc-publish b/common/config/rush/.npmrc-publish index 7ab44c18d6..951a4918cf 100644 --- a/common/config/rush/.npmrc-publish +++ b/common/config/rush/.npmrc-publish @@ -18,3 +18,12 @@ # # //registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN} # + +# Explicitly specify the NPM registry that "rush publish" will use by default: +registry=https://registry.npmjs.org/ + +# Optionally provide an authentication token for the above registry URL (if it is a private registry): +//registry.npmjs.org/:_authToken=${NPM_TOKEN} + +# Change this to "true" if your registry requires authentication for read-only operations: +always-auth=false diff --git a/common/config/rush/artifactory.json b/common/config/rush/artifactory.json index 268065478a..685fda23c0 100644 --- a/common/config/rush/artifactory.json +++ b/common/config/rush/artifactory.json @@ -65,13 +65,11 @@ * "This monorepo consumes packages from an Artifactory private NPM registry." */ // "introduction": "", - /** * Overrides the message that normally says: * "Please contact the repository maintainers for help with setting up an Artifactory user account." */ // "obtainAnAccount": "", - /** * Overrides the message that normally says: * "Please open this URL in your web browser:" @@ -79,26 +77,22 @@ * The "artifactoryWebsiteUrl" string is printed after this message. */ // "visitWebsite": "", - /** * Overrides the message that normally says: * "Your user name appears in the upper-right corner of the JFrog website." */ // "locateUserName": "", - /** * Overrides the message that normally says: * "Click 'Edit Profile' on the JFrog website. Click the 'Generate API Key' * button if you haven't already done so previously." */ // "locateApiKey": "" - /** * Overrides the message that normally prompts: * "What is your Artifactory user name?" */ // "userNamePrompt": "" - /** * Overrides the message that normally prompts: * "What is your Artifactory API key?" diff --git a/common/config/rush/cobuild.json b/common/config/rush/cobuild.json new file mode 100644 index 0000000000..a47fad18d5 --- /dev/null +++ b/common/config/rush/cobuild.json @@ -0,0 +1,22 @@ +/** + * This configuration file manages Rush's cobuild feature. + * More documentation is available on the Rush website: https://rushjs.io + */ + { + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/cobuild.schema.json", + + /** + * (Required) EXPERIMENTAL - Set this to true to enable the cobuild feature. + * RUSH_COBUILD_CONTEXT_ID should always be specified as an environment variable with an non-empty string, + * otherwise the cobuild feature will be disabled. + */ + "cobuildFeatureEnabled": false, + + /** + * (Required) Choose where cobuild lock will be acquired. + * + * The lock provider is registered by the rush plugins. + * For example, @rushstack/rush-redis-cobuild-plugin registers the "redis" lock provider. + */ + "cobuildLockProvider": "redis" +} diff --git a/common/config/rush/custom-tips.json b/common/config/rush/custom-tips.json new file mode 100644 index 0000000000..31e540d6ad --- /dev/null +++ b/common/config/rush/custom-tips.json @@ -0,0 +1,29 @@ +/** + * This configuration file allows repo maintainers to configure extra details to be + * printed alongside certain Rush messages. More documentation is available on the + * Rush website: https://rushjs.io + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/custom-tips.schema.json", + + /** + * Custom tips allow you to annotate Rush's console messages with advice tailored for + * your specific monorepo. + */ + "customTips": [ + // { + // /** + // * (REQUIRED) An identifier indicating a message that may be printed by Rush. + // * If that message is printed, then this custom tip will be shown. + // * The list of available tip identifiers can be found on this page: + // * https://rushjs.io/pages/maintainer/custom_tips/ + // */ + // "tipId": "TIP_RUSH_INCONSISTENT_VERSIONS", + // + // /** + // * (REQUIRED) The message text to be displayed for this tip. + // */ + // "message": "For additional troubleshooting information, refer this wiki article:\n\nhttps://intranet.contoso.com/docs/pnpm-mismatch" + // } + ] +} diff --git a/common/config/rush/experiments.json b/common/config/rush/experiments.json index d5d905013f..a3433db121 100644 --- a/common/config/rush/experiments.json +++ b/common/config/rush/experiments.json @@ -3,7 +3,7 @@ * Rush features. More documentation is available on the Rush website: https://rushjs.io */ { - "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/experiments.schema.json", + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/experiments.schema.json" /** * By default, 'rush install' passes --no-prefer-frozen-lockfile to 'pnpm install'. @@ -17,6 +17,13 @@ */ // "usePnpmPreferFrozenLockfileForRushUpdate": true, + /** + * By default, 'rush update' runs as a single operation. + * Set this option to true to instead update the lockfile with `--lockfile-only`, then perform a `--frozen-lockfile` install. + * Necessary when using the `afterAllResolved` hook in .pnpmfile.cjs. + */ + // "usePnpmLockfileOnlyThenFrozenLockfileForRushUpdate": true, + /** * If using the 'preventManualShrinkwrapChanges' option, restricts the hash to only include the layout of external dependencies. * Used to allow links between workspace projects or the addition/removal of references to existing dependency versions to not @@ -34,7 +41,13 @@ * If true, build caching will respect the allowWarningsInSuccessfulBuild flag and cache builds with warnings. * This will not replay warnings from the cached build. */ - "buildCacheWithAllowWarningsInSuccessfulBuild": true, + // "buildCacheWithAllowWarningsInSuccessfulBuild": true, + + /** + * If true, build skipping will respect the allowWarningsInSuccessfulBuild flag and skip builds with warnings. + * This will not replay warnings from the skipped build. + */ + // "buildSkipWithAllowWarningsInSuccessfulBuild": true, /** * If true, perform a clean install after when running `rush install` or `rush update` if the @@ -50,5 +63,58 @@ /** * If true, Rush will not allow node_modules in the repo folder or in parent folders. */ - // "forbidPhantomResolvableNodeModulesFolders": true + // "forbidPhantomResolvableNodeModulesFolders": true, + + /** + * (UNDER DEVELOPMENT) For certain installation problems involving peer dependencies, PNPM cannot + * correctly satisfy versioning requirements without installing duplicate copies of a package inside the + * node_modules folder. This poses a problem for "workspace:*" dependencies, as they are normally + * installed by making a symlink to the local project source folder. PNPM's "injected dependencies" + * feature provides a model for copying the local project folder into node_modules, however copying + * must occur AFTER the dependency project is built and BEFORE the consuming project starts to build. + * The "pnpm-sync" tool manages this operation; see its documentation for details. + * Enable this experiment if you want "rush" and "rushx" commands to resync injected dependencies + * by invoking "pnpm-sync" during the build. + */ + // "usePnpmSyncForInjectedDependencies": true, + + /** + * If set to true, Rush will generate a `project-impact-graph.yaml` file in the repository root during `rush update`. + */ + // "generateProjectImpactGraphDuringRushUpdate": true, + + /** + * If true, when running in watch mode, Rush will check for phase scripts named `_phase::ipc` and run them instead + * of `_phase:` if they exist. The created child process will be provided with an IPC channel and expected to persist + * across invocations. + */ + // "useIPCScriptsInWatchMode": true, + + /** + * (UNDER DEVELOPMENT) The Rush alerts feature provides a way to send announcements to engineers + * working in the monorepo, by printing directly in the user's shell window when they invoke Rush commands. + * This ensures that important notices will be seen by anyone doing active development, since people often + * ignore normal discussion group messages or don't know to subscribe. + */ + // "rushAlerts": true, + + /** + * When using cobuilds, this experiment allows uncacheable operations to benefit from cobuild orchestration without using the build cache. + */ + // "allowCobuildWithoutCache": true, + + /** + * By default, rush perform a full scan of the entire repository. For example, Rush runs `git status` to check for local file changes. + * When this toggle is enabled, Rush will only scan specific paths, significantly speeding up Git operations. + */ + // "enableSubpathScan": true, + + /** + * Rush has a policy that normally requires Rush projects to specify `workspace:*` in package.json when depending + * on other projects in the workspace, unless they are explicitly declared as `decoupledLocalDependencies` + * in rush.json. Enabling this experiment will remove that requirement for dependencies belonging to a different + * subspace. This is useful for large product groups who work in separate subspaces and generally prefer to consume + * each other's packages via the NPM registry. + */ + // "exemptDecoupledDependenciesBetweenSubspaces": false } diff --git a/common/config/rush/pnpm-config.json b/common/config/rush/pnpm-config.json new file mode 100644 index 0000000000..09324842f6 --- /dev/null +++ b/common/config/rush/pnpm-config.json @@ -0,0 +1,329 @@ +/** + * This configuration file provides settings specific to the PNPM package manager. + * More documentation is available on the Rush website: https://rushjs.io + * + * Rush normally looks for this file in `common/config/rush/pnpm-config.json`. However, + * if `subspacesEnabled` is true in subspaces.json, then Rush will instead first look + * for `common/config/subspaces//pnpm-config.json`. (If the file exists in both places, + * then the file under `common/config/rush` is ignored.) + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/pnpm-config.schema.json", + + /** + * If true, then `rush install` and `rush update` will use the PNPM workspaces feature + * to perform the install, instead of the old model where Rush generated the symlinks + * for each projects's node_modules folder. + * + * When using workspaces, Rush will generate a `common/temp/pnpm-workspace.yaml` file referencing + * all local projects to install. Rush will also generate a `.pnpmfile.cjs` shim which implements + * Rush-specific features such as preferred versions. The user's `common/config/rush/.pnpmfile.cjs` + * is invoked by the shim. + * + * This option is strongly recommended. The default value is false. + */ + "useWorkspaces": false, + + /** + * This setting determines how PNPM chooses version numbers during `rush update`. + * For example, suppose `lib-x@3.0.0` depends on `"lib-y": "^1.2.3"` whose latest major + * releases are `1.8.9` and `2.3.4`. The resolution mode `lowest-direct` might choose + * `lib-y@1.2.3`, wheres `highest` will choose 1.8.9, and `time-based` will pick the + * highest compatible version at the time when `lib-x@3.0.0` itself was published (ensuring + * that the version could have been tested by the maintainer of "lib-x"). For local workspace + * projects, `time-based` instead works like `lowest-direct`, avoiding upgrades unless + * they are explicitly requested. Although `time-based` is the most robust option, it may be + * slightly slower with registries such as npmjs.com that have not implemented an optimization. + * + * IMPORTANT: Be aware that PNPM 8.0.0 initially defaulted to `lowest-direct` instead of + * `highest`, but PNPM reverted this decision in 8.6.12 because it caused confusion for users. + * Rush version 5.106.0 and newer avoids this confusion by consistently defaulting to + * `highest` when `resolutionMode` is not explicitly set in pnpm-config.json or .npmrc, + * regardless of your PNPM version. + * + * PNPM documentation: https://pnpm.io/npmrc#resolution-mode + * + * Possible values are: `highest`, `time-based`, and `lowest-direct`. + * The default is `highest`. + */ + // "resolutionMode": "time-based", + + /** + * This setting determines whether PNPM will automatically install (non-optional) + * missing peer dependencies instead of reporting an error. Doing so conveniently + * avoids the need to specify peer versions in package.json, but in a large monorepo + * this often creates worse problems. The reason is that peer dependency behavior + * is inherently complicated, and it is easier to troubleshoot consequences of an explicit + * version than an invisible heuristic. The original NPM RFC discussion pointed out + * some other problems with this feature: https://github.com/npm/rfcs/pull/43 + + * IMPORTANT: Without Rush, the setting defaults to true for PNPM 8 and newer; however, + * as of Rush version 5.109.0 the default is always false unless `autoInstallPeers` + * is specified in pnpm-config.json or .npmrc, regardless of your PNPM version. + + * PNPM documentation: https://pnpm.io/npmrc#auto-install-peers + + * The default value is false. + */ + // "autoInstallPeers": false, + + /** + * If true, then Rush will add the `--strict-peer-dependencies` command-line parameter when + * invoking PNPM. This causes `rush update` to fail if there are unsatisfied peer dependencies, + * which is an invalid state that can cause build failures or incompatible dependency versions. + * (For historical reasons, JavaScript package managers generally do not treat this invalid + * state as an error.) + * + * PNPM documentation: https://pnpm.io/npmrc#strict-peer-dependencies + * + * The default value is false to avoid legacy compatibility issues. + * It is strongly recommended to set `strictPeerDependencies=true`. + */ + "strictPeerDependencies": false, + + /** + * Environment variables that will be provided to PNPM. + */ + // "environmentVariables": { + // "NODE_OPTIONS": { + // "value": "--max-old-space-size=4096", + // "override": false + // } + // }, + + /** + * Specifies the location of the PNPM store. There are two possible values: + * + * - `local` - use the `pnpm-store` folder in the current configured temp folder: + * `common/temp/pnpm-store` by default. + * - `global` - use PNPM's global store, which has the benefit of being shared + * across multiple repo folders, but the disadvantage of less isolation for builds + * (for example, bugs or incompatibilities when two repos use different releases of PNPM) + * + * In both cases, the store path can be overridden by the environment variable `RUSH_PNPM_STORE_PATH`. + * + * The default value is `local`. + */ + // "pnpmStore": "global", + + /** + * If true, then `rush install` will report an error if manual modifications + * were made to the PNPM shrinkwrap file without running `rush update` afterwards. + * + * This feature protects against accidental inconsistencies that may be introduced + * if the PNPM shrinkwrap file (`pnpm-lock.yaml`) is manually edited. When this + * feature is enabled, `rush update` will append a hash to the file as a YAML comment, + * and then `rush update` and `rush install` will validate the hash. Note that this + * does not prohibit manual modifications, but merely requires `rush update` be run + * afterwards, ensuring that PNPM can report or repair any potential inconsistencies. + * + * To temporarily disable this validation when invoking `rush install`, use the + * `--bypass-policy` command-line parameter. + * + * The default value is false. + */ + // "preventManualShrinkwrapChanges": true, + + /** + * When a project uses `workspace:` to depend on another Rush project, PNPM normally installs + * it by creating a symlink under `node_modules`. This generally works well, but in certain + * cases such as differing `peerDependencies` versions, symlinking may cause trouble + * such as incorrectly satisfied versions. For such cases, the dependency can be declared + * as "injected", causing PNPM to copy its built output into `node_modules` like a real + * install from a registry. Details here: https://rushjs.io/pages/advanced/injected_deps/ + * + * When using Rush subspaces, these sorts of versioning problems are much more likely if + * `workspace:` refers to a project from a different subspace. This is because the symlink + * would point to a separate `node_modules` tree installed by a different PNPM lockfile. + * A comprehensive solution is to enable `alwaysInjectDependenciesFromOtherSubspaces`, + * which automatically treats all projects from other subspaces as injected dependencies + * without having to manually configure them. + * + * NOTE: Use carefully -- excessive file copying can slow down the `rush install` and + * `pnpm-sync` operations if too many dependencies become injected. + * + * The default value is false. + */ + // "alwaysInjectDependenciesFromOtherSubspaces": false, + + /** + * Defines the policies to be checked for the `pnpm-lock.yaml` file. + */ + "pnpmLockfilePolicies": { + /** + * This policy will cause "rush update" to report an error if `pnpm-lock.yaml` contains + * any SHA1 integrity hashes. + * + * For each NPM dependency, `pnpm-lock.yaml` normally stores an `integrity` hash. Although + * its main purpose is to detect corrupted or truncated network requests, this hash can also + * serve as a security fingerprint to protect against attacks that would substitute a + * malicious tarball, for example if a misconfigured .npmrc caused a machine to accidentally + * download a matching package name+version from npmjs.com instead of the private NPM registry. + * NPM originally used a SHA1 hash; this was insecure because an attacker can too easily craft + * a tarball with a matching fingerprint. For this reason, NPM later deprecated SHA1 and + * instead adopted a cryptographically strong SHA512 hash. Nonetheless, SHA1 hashes can + * occasionally reappear during "rush update", for example due to missing metadata fallbacks + * (https://github.com/orgs/pnpm/discussions/6194) or an incompletely migrated private registry. + * The `disallowInsecureSha1` policy prevents this, avoiding potential security/compliance alerts. + */ + // "disallowInsecureSha1": { + // /** + // * Enables the "disallowInsecureSha1" policy. The default value is false. + // */ + // "enabled": true, + // + // /** + // * In rare cases, a private NPM registry may continue to serve SHA1 hashes for very old + // * package versions, perhaps due to a caching issue or database migration glitch. To avoid + // * having to disable the "disallowInsecureSha1" policy for the entire monorepo, the problematic + // * package versions can be individually ignored. The "exemptPackageVersions" key is the + // * package name, and the array value lists exact version numbers to be ignored. + // */ + // "exemptPackageVersions": { + // "example1": ["1.0.0"], + // "example2": ["2.0.0", "2.0.1"] + // } + // } + }, + + /** + * The "globalOverrides" setting provides a simple mechanism for overriding version selections + * for all dependencies of all projects in the monorepo workspace. The settings are copied + * into the `pnpm.overrides` field of the `common/temp/package.json` file that is generated + * by Rush during installation. + * + * Order of precedence: `.pnpmfile.cjs` has the highest precedence, followed by + * `unsupportedPackageJsonSettings`, `globalPeerDependencyRules`, `globalPackageExtensions`, + * and `globalOverrides` has lowest precedence. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmoverrides + */ + "globalOverrides": { + // "example1": "^1.0.0", + // "example2": "npm:@company/example2@^1.0.0" + }, + + /** + * The `globalPeerDependencyRules` setting provides various settings for suppressing validation errors + * that are reported during installation with `strictPeerDependencies=true`. The settings are copied + * into the `pnpm.peerDependencyRules` field of the `common/temp/package.json` file that is generated + * by Rush during installation. + * + * Order of precedence: `.pnpmfile.cjs` has the highest precedence, followed by + * `unsupportedPackageJsonSettings`, `globalPeerDependencyRules`, `globalPackageExtensions`, + * and `globalOverrides` has lowest precedence. + * + * https://pnpm.io/package_json#pnpmpeerdependencyrules + */ + "globalPeerDependencyRules": { + // "ignoreMissing": ["@eslint/*"], + // "allowedVersions": { "react": "17" }, + // "allowAny": ["@babel/*"] + }, + + /** + * The `globalPackageExtension` setting provides a way to patch arbitrary package.json fields + * for any PNPM dependency of the monorepo. The settings are copied into the `pnpm.packageExtensions` + * field of the `common/temp/package.json` file that is generated by Rush during installation. + * The `globalPackageExtension` setting has similar capabilities as `.pnpmfile.cjs` but without + * the downsides of an executable script (nondeterminism, unreliable caching, performance concerns). + * + * Order of precedence: `.pnpmfile.cjs` has the highest precedence, followed by + * `unsupportedPackageJsonSettings`, `globalPeerDependencyRules`, `globalPackageExtensions`, + * and `globalOverrides` has lowest precedence. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmpackageextensions + */ + "globalPackageExtensions": { + // "fork-ts-checker-webpack-plugin": { + // "dependencies": { + // "@babel/core": "1" + // }, + // "peerDependencies": { + // "eslint": ">= 6" + // }, + // "peerDependenciesMeta": { + // "eslint": { + // "optional": true + // } + // } + // } + }, + + /** + * The `globalNeverBuiltDependencies` setting suppresses the `preinstall`, `install`, and `postinstall` + * lifecycle events for the specified NPM dependencies. This is useful for scripts with poor practices + * such as downloading large binaries without retries or attempting to invoke OS tools such as + * a C++ compiler. (PNPM's terminology refers to these lifecycle events as "building" a package; + * it has nothing to do with build system operations such as `rush build` or `rushx build`.) + * The settings are copied into the `pnpm.neverBuiltDependencies` field of the `common/temp/package.json` + * file that is generated by Rush during installation. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmneverbuiltdependencies + */ + "globalNeverBuiltDependencies": [ + // "fsevents" + ], + + /** + * The `globalIgnoredOptionalDependencies` setting suppresses the installation of optional NPM + * dependencies specified in the list. This is useful when certain optional dependencies are + * not needed in your environment, such as platform-specific packages or dependencies that + * fail during installation but are not critical to your project. + * These settings are copied into the `pnpm.overrides` field of the `common/temp/package.json` + * file that is generated by Rush during installation, instructing PNPM to ignore the specified + * optional dependencies. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmignoredoptionaldependencies + */ + "globalIgnoredOptionalDependencies": [ + // "fsevents" + ], + + /** + * The `globalAllowedDeprecatedVersions` setting suppresses installation warnings for package + * versions that the NPM registry reports as being deprecated. This is useful if the + * deprecated package is an indirect dependency of an external package that has not released a fix. + * The settings are copied into the `pnpm.allowedDeprecatedVersions` field of the `common/temp/package.json` + * file that is generated by Rush during installation. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmalloweddeprecatedversions + * + * If you are working to eliminate a deprecated version, it's better to specify `allowedDeprecatedVersions` + * in the package.json file for individual Rush projects. + */ + "globalAllowedDeprecatedVersions": { + // "request": "*" + }, + + /** + * (THIS FIELD IS MACHINE GENERATED) The "globalPatchedDependencies" field is updated automatically + * by the `rush-pnpm patch-commit` command. It is a dictionary, where the key is an NPM package name + * and exact version, and the value is a relative path to the associated patch file. + * + * PNPM documentation: https://pnpm.io/package_json#pnpmpatcheddependencies + */ + "globalPatchedDependencies": {}, + + /** + * (USE AT YOUR OWN RISK) This is a free-form property bag that will be copied into + * the `common/temp/package.json` file that is generated by Rush during installation. + * This provides a way to experiment with new PNPM features. These settings will override + * any other Rush configuration associated with a given JSON field except for `.pnpmfile.cjs`. + * + * USAGE OF THIS SETTING IS NOT SUPPORTED BY THE RUSH MAINTAINERS AND MAY CAUSE RUSH + * TO MALFUNCTION. If you encounter a missing PNPM setting that you believe should + * be supported, please create a GitHub issue or PR. Note that Rush does not aim to + * support every possible PNPM setting, but rather to promote a battle-tested installation + * strategy that is known to provide a good experience for large teams with lots of projects. + */ + "unsupportedPackageJsonSettings": { + // "dependencies": { + // "not-a-good-practice": "*" + // }, + // "scripts": { + // "do-something": "echo Also not a good practice" + // }, + // "pnpm": { "futurePnpmFeature": true } + } +} diff --git a/common/config/rush/pnpm-lock.yaml b/common/config/rush/pnpm-lock.yaml index 5b5c5e6123..1e9b1f0b4b 100644 --- a/common/config/rush/pnpm-lock.yaml +++ b/common/config/rush/pnpm-lock.yaml @@ -133,6 +133,15 @@ importers: '@rush-temp/activity-resources': specifier: file:./projects/activity-resources.tgz version: file:projects/activity-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + '@rush-temp/ai-assistant': + specifier: file:./projects/ai-assistant.tgz + version: file:projects/ai-assistant.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + '@rush-temp/ai-assistant-assets': + specifier: file:./projects/ai-assistant-assets.tgz + version: file:projects/ai-assistant-assets.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + '@rush-temp/ai-assistant-resources': + specifier: file:./projects/ai-assistant-resources.tgz + version: file:projects/ai-assistant-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) '@rush-temp/ai-bot': specifier: file:./projects/ai-bot.tgz version: file:projects/ai-bot.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) @@ -559,6 +568,9 @@ importers: '@rush-temp/model-activity': specifier: file:./projects/model-activity.tgz version: file:projects/model-activity.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + '@rush-temp/model-ai-assistant': + specifier: file:./projects/model-ai-assistant.tgz + version: file:projects/model-ai-assistant.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) '@rush-temp/model-ai-bot': specifier: file:./projects/model-ai-bot.tgz version: file:projects/model-ai-bot.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) @@ -1895,14 +1907,14 @@ importers: specifier: ~22.8.7 version: 22.8.8 electron: - specifier: ^36.3.1 - version: 36.3.1 + specifier: ^38.1.1 + version: 38.1.1 electron-builder: specifier: ^25.1.8 version: 25.1.8 electron-context-menu: specifier: ^4.0.4 - version: 4.0.4 + version: 4.1.1 electron-log: specifier: ^5.1.7 version: 5.1.7 @@ -2815,8 +2827,8 @@ packages: resolution: {integrity: sha512-6uQ1pVXutwz1Krwooo67W+3K8BwH1ASMh1WoHTpomUzw8EXecXN5lHIJ9EPqTHuv1WqR2LKkSJyagcq0HYUJpg==} engines: {node: '>=12'} - '@electron/asar@3.2.10': - resolution: {integrity: sha512-mvBSwIBUeiRscrCeJE1LwctAriBj65eUDm0Pc11iE5gRwzkmsdbS7FnZ1XUWjpSeQWL1L5g12Fc/SchPM9DUOw==} + '@electron/asar@3.2.18': + resolution: {integrity: sha512-2XyvMe3N3Nrs8cV39IKELRHTYUWFKrmqqSY1U+GMlc0jvqjIVnoxhNd2H4JolWQncbJi1DCvb5TNxZuI2fEjWg==} engines: {node: '>=10.12.0'} hasBin: true @@ -4379,6 +4391,18 @@ packages: resolution: {integrity: sha512-6ZhlPiyVd+TRx0o0qdULlvoalPU0FlX8HS5NAkSgjhkdKMHuvDNDNpIhPjTZ4DZrXPpNBZZyXSiarXAKD4G8Qw==, tarball: file:projects/activity.tgz} version: 0.0.0 + '@rush-temp/ai-assistant-assets@file:projects/ai-assistant-assets.tgz': + resolution: {integrity: sha512-xMeqPY9WNH6VNmUx0H+MYd+6a7X9/p+ETR+1kFr/NN5TAALQqG4+7POW8a1z/YQESI0aEt1MXqzbpCXdN6MRSg==, tarball: file:projects/ai-assistant-assets.tgz} + version: 0.0.0 + + '@rush-temp/ai-assistant-resources@file:projects/ai-assistant-resources.tgz': + resolution: {integrity: sha512-aDNUOd/pe/cLE9TuPx2N0b8qPbYLWui5iCYXUs32W7WAYbrXJDOZj2tYJlZR0kl0j4ydoHeJzn3x6uE1WteM7w==, tarball: file:projects/ai-assistant-resources.tgz} + version: 0.0.0 + + '@rush-temp/ai-assistant@file:projects/ai-assistant.tgz': + resolution: {integrity: sha512-zV980Axii2zE/l6RXcue6zoj267Mh2GIg8G+4Ih/+vzBtPP2gjojU7kg2jvxUlTAp/ovYd2PALmutDTUShw60A==, tarball: file:projects/ai-assistant.tgz} + version: 0.0.0 + '@rush-temp/ai-bot-resources@file:projects/ai-bot-resources.tgz': resolution: {integrity: sha512-Ne8uj1rTTgpgWHs/SZ9wwZQacLv4LLKx0n7qVcgBoR2rl5kRcjChiUlEA2+NLMTXfwqoUBJORNQSRnpLZkUp8g==, tarball: file:projects/ai-bot-resources.tgz} version: 0.0.0 @@ -4632,7 +4656,7 @@ packages: version: 0.0.0 '@rush-temp/desktop-1@file:projects/desktop-1.tgz': - resolution: {integrity: sha512-MJ+6X/Ribex9FwxKHOU07v1aOI3VDEo0LWusEzSdTQm7xk/Gf8Aztvf/tvB5RIfClR4ub5nqgkohYZnOfLeo3Q==, tarball: file:projects/desktop-1.tgz} + resolution: {integrity: sha512-dPp96/9DSN+gU39n7ynlwyGH7CpOQz+sZ4Z5S4dSGhv+incEDzyOQQUZJYNz3jFL3OOUiWiEI22lJ0nlyoLpJA==, tarball: file:projects/desktop-1.tgz} version: 0.0.0 '@rush-temp/desktop-downloads-assets@file:projects/desktop-downloads-assets.tgz': @@ -4660,7 +4684,7 @@ packages: version: 0.0.0 '@rush-temp/desktop@file:projects/desktop.tgz': - resolution: {integrity: sha512-LB9wCmyPPqzwihsL8yWC+gk92v4/VkKdooa0q0ylkChu46c0b5QdH40QoWSDJgNqqSO5XRFwM5jpmtRlMm29lg==, tarball: file:projects/desktop.tgz} + resolution: {integrity: sha512-kMVLNqalurSBKidY00TqK2GIBSaEvgAKScF/32N4vsmx+pzMBkE6U63HiW+RxsqVC/ig9QikeohoDXx7Ps9kHg==, tarball: file:projects/desktop.tgz} version: 0.0.0 '@rush-temp/devmodel-resources@file:projects/devmodel-resources.tgz': @@ -4808,7 +4832,7 @@ packages: version: 0.0.0 '@rush-temp/hulylake-client@file:projects/hulylake-client.tgz': - resolution: {integrity: sha512-Oa6Lzz3ZCoPuU+BAO3IvxxiYdgp45AKWndYXhxPRb7rvEuswKZLjKzunt8Dsx0hT5GAQ3XmPNquwntBKIGwZBg==, tarball: file:projects/hulylake-client.tgz} + resolution: {integrity: sha512-0sAr+WkQpteDpwkXdeGMiC4VhoOU5uTVJqUE4m/mpmCQcTRzjZJwB+H0Rwwsd+NRWqEgsp8mu5uuEA8W0lkXfw==, tarball: file:projects/hulylake-client.tgz} version: 0.0.0 '@rush-temp/hulypulse-client@file:projects/hulypulse-client.tgz': @@ -4943,6 +4967,10 @@ packages: resolution: {integrity: sha512-ZNulrcnrHfqoQt8d2s3Ef83wxd1DeX+r9HDWpOclei6CuuebWnNGVSEIXmJ9fr9DQj6yJVbkj481qLgI7e3K5g==, tarball: file:projects/model-activity.tgz} version: 0.0.0 + '@rush-temp/model-ai-assistant@file:projects/model-ai-assistant.tgz': + resolution: {integrity: sha512-H9B1vpwWN8SAb94yJbs6Kh+klMeefGcf4blEAHefllxpeSY4lRIUsKabraQ9/oKLTnWX6IA5CcYb4c/3+qgLzQ==, tarball: file:projects/model-ai-assistant.tgz} + version: 0.0.0 + '@rush-temp/model-ai-bot@file:projects/model-ai-bot.tgz': resolution: {integrity: sha512-24xp2zEvYzmo/W4PDZRdhTmoNANfgqa7M3wOsvbEwpeXZhhEaWfE+yZEF3ZRlqdgIUK+EpmugoM3KScCYT6+XQ==, tarball: file:projects/model-ai-bot.tgz} version: 0.0.0 @@ -5088,7 +5116,7 @@ packages: version: 0.0.0 '@rush-temp/model-process@file:projects/model-process.tgz': - resolution: {integrity: sha512-yr6N1H/fZwYAZ4EzGItVd7ZqZlL6O2Ed2XeMiUsX2BMBdcPR2zlEv5DkCs3LNNiRMrbNZFTyhaCRAUsczNIG9Q==, tarball: file:projects/model-process.tgz} + resolution: {integrity: sha512-/Qar0A6nR5NxD11A64Alers7Dugvmcdo5h7TAV8NB20EroGB2ATe+rqEb6IQzGQ95zwU0QdZ6znWIAXseFCiHA==, tarball: file:projects/model-process.tgz} version: 0.0.0 '@rush-temp/model-products@file:projects/model-products.tgz': @@ -5540,7 +5568,7 @@ packages: version: 0.0.0 '@rush-temp/qms-desktop@file:projects/qms-desktop.tgz': - resolution: {integrity: sha512-euhJQtYB9bi4EajhGq+TYdDJkmGP5CyFcaAVBLPkmhhKENYJFcLd+E/QbDkWPAZZu7lP9EQ88yFHL5oRBOzyrw==, tarball: file:projects/qms-desktop.tgz} + resolution: {integrity: sha512-Ovno/T0s/QbkFGK+7olnz2h6NvbmUNmXuNNJFXHhI869c3V3Eyh9PDSmLlzR/xM3mQo5hP260Ksv9icoEqxDgw==, tarball: file:projects/qms-desktop.tgz} version: 0.0.0 '@rush-temp/qms-doc-import-tool@file:projects/qms-doc-import-tool.tgz': @@ -8505,6 +8533,10 @@ packages: resolution: {integrity: sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==} engines: {node: '>= 8'} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + crypt@0.0.2: resolution: {integrity: sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==} @@ -9126,8 +9158,8 @@ packages: engines: {node: '>=14.0.0'} hasBin: true - electron-context-menu@4.0.4: - resolution: {integrity: sha512-XPGj35npL8+MG9Lx5ukmK/h8KLmjYJ3e1GvwWKrNZvf2ocv746WXIyltoV1yWtkEPT7g2kQ8hFmu0ZupK5KieA==} + electron-context-menu@4.1.1: + resolution: {integrity: sha512-kebXha4K2DmR7zrKpO8muzXlUAdhgqQIT7DpPeT4cAKZugwCB/NbuEuT+1SDjOH9vXJYjWK2UQuFvnVw0u0lHg==} engines: {node: '>=18'} electron-dl@4.0.0: @@ -9160,8 +9192,8 @@ packages: electron-windows-badge@1.1.0: resolution: {integrity: sha512-hWFbUk9u3fQHcKzTAcjZAN7XH9bL9oH9g20RRDU/DVDNqdMI03GzlBZfR/R8R1krYu9AT4biLqSCAxnt9LMAfA==} - electron@36.3.1: - resolution: {integrity: sha512-LeOZ+tVahmctHaAssLCGRRUa2SAO09GXua3pKdG+WzkbSDMh+3iOPONNVPTqGp8HlWnzGj4r6mhsIbM2RgH+eQ==} + electron@38.1.1: + resolution: {integrity: sha512-LTFGxXpbIdU07AwSHLoVYVLbZHDiauT1KgTX1fgCPgPDoQIAGnYft/ABx6PkA+9ulQfBEEqg0mYTWaoReHG8Ag==} engines: {node: '>= 12.20.55'} hasBin: true @@ -13607,8 +13639,8 @@ packages: tar-stream@3.1.7: resolution: {integrity: sha512-qJj60CXt7IU1Ffyc3NJMjh6EkuCFej46zUqJ4J7pqYlThyd9bO0XBTmcOIhSzZJVWfsLks0+nle/j538YAW9RQ==} - tar@6.2.0: - resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} + tar@6.2.1: + resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} tar@7.4.3: @@ -15360,7 +15392,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@electron/asar@3.2.10': + '@electron/asar@3.2.18': dependencies: commander: 5.1.0 glob: 7.2.3 @@ -15399,7 +15431,7 @@ snapshots: '@electron/osx-sign@1.3.1': dependencies: compare-version: 0.1.2 - debug: 4.3.5 + debug: 4.4.0 fs-extra: 10.1.0 isbinaryfile: 4.0.10 minimist: 1.2.8 @@ -15411,8 +15443,8 @@ snapshots: dependencies: '@malept/cross-spawn-promise': 2.0.0 chalk: 4.1.2 - debug: 4.3.5 - detect-libc: 2.0.2 + debug: 4.4.0 + detect-libc: 2.0.4 fs-extra: 10.1.0 got: 11.8.6 node-abi: 3.55.0 @@ -15421,16 +15453,16 @@ snapshots: ora: 5.4.1 read-binary-file-arch: 1.0.6 semver: 7.7.2 - tar: 6.2.0 + tar: 6.2.1 yargs: 17.7.2 transitivePeerDependencies: - supports-color '@electron/universal@2.0.1': dependencies: - '@electron/asar': 3.2.10 + '@electron/asar': 3.2.18 '@malept/cross-spawn-promise': 2.0.0 - debug: 4.3.5 + debug: 4.4.0 dir-compare: 4.2.0 fs-extra: 11.2.0 minimatch: 9.0.5 @@ -16261,11 +16293,11 @@ snapshots: '@malept/cross-spawn-promise@2.0.0': dependencies: - cross-spawn: 7.0.3 + cross-spawn: 7.0.6 '@malept/flatpak-bundler@0.4.0': dependencies: - debug: 4.3.5 + debug: 4.4.0 fs-extra: 9.1.0 lodash: 4.17.21 tmp-promise: 3.0.3 @@ -17557,6 +17589,96 @@ snapshots: - supports-color - ts-node + '@rush-temp/ai-assistant-assets@file:projects/ai-assistant-assets.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))': + dependencies: + '@types/jest': 29.5.12 + '@types/node': 22.15.29 + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.8.3) + eslint: 8.56.0 + eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.8.3) + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 15.7.0(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) + jest: 29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + prettier: 3.2.5 + ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(jest@29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - '@babel/core' + - '@jest/types' + - babel-jest + - babel-plugin-macros + - esbuild + - node-notifier + - supports-color + - ts-node + + '@rush-temp/ai-assistant-resources@file:projects/ai-assistant-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))': + dependencies: + '@types/jest': 29.5.12 + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.8.3) + eslint: 8.56.0 + eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.8.3) + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 15.7.0(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) + eslint-plugin-svelte: 2.35.1(eslint@8.56.0)(svelte@4.2.20)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + jest: 29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + prettier: 3.2.5 + prettier-plugin-svelte: 3.2.2(prettier@3.2.5)(svelte@4.2.20) + sass: 1.71.1 + svelte: 4.2.20 + svelte-check: 3.6.9(@babel/core@7.23.9)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(sass@1.71.1)(svelte@4.2.20) + svelte-eslint-parser: 0.33.1(svelte@4.2.20) + svelte-loader: 3.2.0(svelte@4.2.20) + svelte-preprocess: 5.1.3(@babel/core@7.23.9)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(sass@1.71.1)(svelte@4.2.20)(typescript@5.8.3) + ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(jest@29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - '@babel/core' + - '@jest/types' + - '@types/node' + - babel-jest + - babel-plugin-macros + - coffeescript + - esbuild + - less + - node-notifier + - postcss + - postcss-load-config + - pug + - stylus + - sugarss + - supports-color + - ts-node + + '@rush-temp/ai-assistant@file:projects/ai-assistant.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))': + dependencies: + '@types/jest': 29.5.12 + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.8.3) + eslint: 8.56.0 + eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.8.3) + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 15.7.0(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) + jest: 29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + prettier: 3.2.5 + ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(jest@29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - '@babel/core' + - '@jest/types' + - '@types/node' + - babel-jest + - babel-plugin-macros + - esbuild + - node-notifier + - supports-color + - ts-node + '@rush-temp/ai-bot-resources@file:projects/ai-bot-resources.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(@types/node@22.15.29)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(postcss-load-config@4.0.2(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(postcss@8.5.3)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))': dependencies: '@types/jest': 29.5.12 @@ -19464,7 +19586,7 @@ snapshots: '@vercel/webpack-asset-relocator-loader': 1.7.4 cross-env: 7.0.3 dotenv: 16.0.3 - electron: 36.3.1 + electron: 38.1.1 electron-builder: 25.1.8 electron-squirrel-startup: 1.0.1 node-loader: 2.0.0(webpack@5.97.1) @@ -19673,8 +19795,8 @@ snapshots: css-loader: 5.2.7(webpack@5.97.1) dotenv: 16.0.3 dotenv-webpack: 8.0.1(webpack@5.97.1) - electron: 36.3.1 - electron-context-menu: 4.0.4 + electron: 38.1.1 + electron-context-menu: 4.1.1 electron-log: 5.1.7 electron-squirrel-startup: 1.0.1 electron-store: 8.2.0 @@ -21918,6 +22040,31 @@ snapshots: - supports-color - ts-node + '@rush-temp/model-ai-assistant@file:projects/model-ai-assistant.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))': + dependencies: + '@types/jest': 29.5.12 + '@types/node': 22.15.29 + '@typescript-eslint/eslint-plugin': 6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3) + '@typescript-eslint/parser': 6.21.0(eslint@8.56.0)(typescript@5.8.3) + eslint: 8.56.0 + eslint-config-standard-with-typescript: 40.0.0(@typescript-eslint/eslint-plugin@6.21.0(@typescript-eslint/parser@6.21.0(eslint@8.56.0)(typescript@5.8.3))(eslint@8.56.0)(typescript@5.8.3))(eslint-plugin-import@2.29.1(eslint@8.56.0))(eslint-plugin-n@15.7.0(eslint@8.56.0))(eslint-plugin-promise@6.1.1(eslint@8.56.0))(eslint@8.56.0)(typescript@5.8.3) + eslint-plugin-import: 2.29.1(eslint@8.56.0) + eslint-plugin-n: 15.7.0(eslint@8.56.0) + eslint-plugin-promise: 6.1.1(eslint@8.56.0) + jest: 29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)) + prettier: 3.2.5 + ts-jest: 29.1.2(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(jest@29.7.0(@types/node@22.15.29)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3)))(typescript@5.8.3) + typescript: 5.8.3 + transitivePeerDependencies: + - '@babel/core' + - '@jest/types' + - babel-jest + - babel-plugin-macros + - esbuild + - node-notifier + - supports-color + - ts-node + '@rush-temp/model-ai-bot@file:projects/model-ai-bot.tgz(@babel/core@7.23.9)(@jest/types@29.6.3)(babel-jest@29.7.0(@babel/core@7.23.9))(esbuild@0.25.9)(ts-node@10.9.2(@swc/core@1.13.5)(@types/node@22.15.29)(typescript@5.8.3))': dependencies: '@types/jest': 29.5.12 @@ -26351,7 +26498,7 @@ snapshots: '@vercel/webpack-asset-relocator-loader': 1.7.4 cross-env: 7.0.3 dotenv: 16.0.3 - electron: 36.3.1 + electron: 38.1.1 electron-builder: 25.1.8 electron-squirrel-startup: 1.0.1 node-loader: 2.0.0(webpack@5.97.1) @@ -32664,7 +32811,7 @@ snapshots: builder-util-runtime: 9.2.10 chromium-pickle-js: 0.2.0 config-file-ts: 0.2.8-rc1 - debug: 4.3.5 + debug: 4.4.0 dmg-builder: 25.1.8 dotenv: 16.4.5 dotenv-expand: 11.0.6 @@ -32682,7 +32829,7 @@ snapshots: resedit: 1.7.1 sanitize-filename: 1.6.3 semver: 7.7.2 - tar: 6.2.0 + tar: 6.2.1 temp-file: 3.4.0 transitivePeerDependencies: - supports-color @@ -33110,7 +33257,7 @@ snapshots: builder-util-runtime@9.2.10: dependencies: - debug: 4.3.5 + debug: 4.4.0 sax: 1.3.0 transitivePeerDependencies: - supports-color @@ -33130,8 +33277,8 @@ snapshots: bluebird-lst: 1.0.9 builder-util-runtime: 9.2.10 chalk: 4.1.2 - cross-spawn: 7.0.3 - debug: 4.3.5 + cross-spawn: 7.0.6 + debug: 4.4.0 fs-extra: 10.1.0 http-proxy-agent: 7.0.2 https-proxy-agent: 7.0.5 @@ -33173,7 +33320,7 @@ snapshots: promise-inflight: 1.0.1 rimraf: 3.0.2 ssri: 9.0.1 - tar: 6.2.0 + tar: 6.2.1 unique-filename: 2.0.1 cache-content-type@1.0.1: @@ -33646,6 +33793,12 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + crypt@0.0.2: {} crypto-js@4.2.0: {} @@ -34295,7 +34448,7 @@ snapshots: - electron-builder-squirrel-windows - supports-color - electron-context-menu@4.0.4: + electron-context-menu@4.1.1: dependencies: cli-truncate: 4.0.0 electron-dl: 4.0.0 @@ -34349,7 +34502,7 @@ snapshots: electron-windows-badge@1.1.0: {} - electron@36.3.1: + electron@38.1.1: dependencies: '@electron/get': 2.0.3 '@types/node': 22.15.29 @@ -37615,7 +37768,7 @@ snapshots: npmlog: 6.0.2 rimraf: 3.0.2 semver: 7.7.2 - tar: 6.2.0 + tar: 6.2.1 which: 2.0.2 transitivePeerDependencies: - supports-color @@ -39629,7 +39782,7 @@ snapshots: fast-fifo: 1.3.2 streamx: 2.16.1 - tar@6.2.0: + tar@6.2.1: dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 diff --git a/common/config/rush/repo-state.json b/common/config/rush/repo-state.json new file mode 100644 index 0000000000..5cf866a708 --- /dev/null +++ b/common/config/rush/repo-state.json @@ -0,0 +1,2 @@ +// DO NOT MODIFY THIS FILE MANUALLY BUT DO COMMIT IT. It is generated and used by Rush. +{} diff --git a/common/config/rush/subspaces.json b/common/config/rush/subspaces.json new file mode 100644 index 0000000000..d3c3ae8c51 --- /dev/null +++ b/common/config/rush/subspaces.json @@ -0,0 +1,35 @@ +/** + * This configuration file manages the experimental "subspaces" feature for Rush, + * which allows multiple PNPM lockfiles to be used in a single Rush workspace. + * For full documentation, please see https://rushjs.io + */ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rush/v5/subspaces.schema.json", + + /** + * Set this flag to "true" to enable usage of subspaces. + */ + "subspacesEnabled": false, + + /** + * (DEPRECATED) This is a temporary workaround for migrating from an earlier prototype + * of this feature: https://github.com/microsoft/rushstack/pull/3481 + * It allows subspaces with only one project to store their config files in the project folder. + */ + "splitWorkspaceCompatibility": false, + + /** + * When a command such as "rush update" is invoked without the "--subspace" or "--to" + * parameters, Rush will install all subspaces. In a huge monorepo with numerous subspaces, + * this would be extremely slow. Set "preventSelectingAllSubspaces" to true to avoid this + * mistake by always requiring selection parameters for commands such as "rush update". + */ + "preventSelectingAllSubspaces": false, + + /** + * The list of subspace names, which should be lowercase alphanumeric words separated by + * hyphens, for example "my-subspace". The corresponding config files will have paths + * such as "common/config/subspaces/my-subspace/package-lock.yaml". + */ + "subspaceNames": [] +} diff --git a/common/config/rush/version-policies.json b/common/config/rush/version-policies.json index 6da276b059..e9b9022bfb 100644 --- a/common/config/rush/version-policies.json +++ b/common/config/rush/version-policies.json @@ -20,30 +20,30 @@ // * SemVer range is usually restricted to a single version. // */ // "definitionName": "lockStepVersion", - // + // // /** // * (Required) The name that will be used for the "versionPolicyName" field in rush.json. // * This name is also used command-line parameters such as "--version-policy" // * and "--to-version-policy". // */ // "policyName": "MyBigFramework", - // + // // /** // * (Required) The current version. All packages belonging to the set should have this version // * in the current branch. When bumping versions, Rush uses this to determine the next version. // * (The "version" field in package.json is NOT considered.) // */ // "version": "1.0.0", - // + // // /** // * (Required) The type of bump that will be performed when publishing the next release. // * When creating a release branch in Git, this field should be updated according to the // * type of release. // * - // * Valid values are: "prerelease", "minor", "patch", "major" + // * Valid values are: "prerelease", "preminor", "minor", "patch", "major" // */ // "nextBump": "prerelease", - // + // // /** // * (Optional) If specified, all packages in the set share a common CHANGELOG.md file. // * This file is stored with the specified "main" project, which must be a member of the set. @@ -52,7 +52,7 @@ // * package in the set. // */ // "mainProject": "my-app", - // + // // /** // * (Optional) If enabled, the "rush change" command will prompt the user for their email address // * and include it in the JSON change files. If an organization maintains multiple repos, tracking @@ -63,7 +63,7 @@ // */ // // "includeEmailInChangeFile": true // }, - // + // // { // /** // * (Required) Indicates the kind of version policy being defined ("lockStepVersion" or "individualVersion"). @@ -76,9 +76,9 @@ // * is changed. // */ // "definitionName": "individualVersion", - // + // // "policyName": "MyRandomLibraries", - // + // // /** // * (Optional) This can be used to enforce that all packages in the set must share a common // * major version number, e.g. because they are from the same major release branch. @@ -87,7 +87,7 @@ // * to the types of changes made to each project, according to the "rush change" command. // */ // "lockedMajor": 3, - // + // // /** // * (Optional) When publishing is managed by Rush, by default the "rush change" command will // * request changes for any projects that are modified by a pull request. These change entries @@ -96,7 +96,7 @@ // * belonging to this version policy. // */ // "exemptFromRushChange": false, - // + // // // "includeEmailInChangeFile": true // } ] diff --git a/desktop-package/package.json b/desktop-package/package.json index 843e7c30b4..815584a5dd 100644 --- a/desktop-package/package.json +++ b/desktop-package/package.json @@ -21,7 +21,7 @@ "node-loader": "~2.0.0", "cross-env": "~7.0.3", "typescript": "^5.8.3", - "electron": "^36.3.1", + "electron": "^38.1.1", "@types/node": "^22.15.29", "electron-builder": "^25.1.8", "@electron/notarize": "^2.3.2" diff --git a/desktop/package.json b/desktop/package.json index 00aee948fa..68e63b56f1 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -50,7 +50,7 @@ "typescript": "^5.8.3", "ts-node": "^10.8.0", "ts-node-dev": "^2.0.0", - "electron": "^36.3.1", + "electron": "^38.1.1", "@types/node": "^22.15.29", "copy-webpack-plugin": "^11.0.0", "@typescript-eslint/eslint-plugin": "^6.11.0", @@ -258,6 +258,9 @@ "@hcengineering/huly-mail": "^0.6.0", "@hcengineering/huly-mail-assets": "^0.6.0", "@hcengineering/huly-mail-resources": "^0.6.0", + "@hcengineering/ai-assistant": "^0.6.0", + "@hcengineering/ai-assistant-assets": "^0.6.0", + "@hcengineering/ai-assistant-resources": "^0.6.0", "electron-squirrel-startup": "~1.0.0", "dotenv": "~16.0.0", "electron-context-menu": "^4.0.4", diff --git a/desktop/src/ui/platform.ts b/desktop/src/ui/platform.ts index 1e0e4f0c48..36570461ff 100644 --- a/desktop/src/ui/platform.ts +++ b/desktop/src/ui/platform.ts @@ -68,6 +68,7 @@ import { achievementId } from '@hcengineering/achievement' import communication, { communicationId } from '@hcengineering/communication' import { emojiId } from '@hcengineering/emoji' import { hulyMailId } from '@hcengineering/huly-mail' +import { aiAssistantId } from '@hcengineering/ai-assistant' import billingPlugin, { billingId } from '@hcengineering/billing' import '@hcengineering/activity-assets' @@ -125,6 +126,7 @@ import '@hcengineering/media-assets' import '@hcengineering/communication-assets' import '@hcengineering/billing-assets' import '@hcengineering/huly-mail-assets' +import '@hcengineering/ai-assistant-assets' import analyticsCollector, { analyticsCollectorId } from '@hcengineering/analytics-collector' import { coreId } from '@hcengineering/core' @@ -246,6 +248,7 @@ function configureI18n (): void { addStringsLoader(emojiId, async (lang: string) => await import(`@hcengineering/emoji-assets/lang/${lang}.json`)) addStringsLoader(billingId, async (lang: string) => await import(`@hcengineering/billing-assets/lang/${lang}.json`)) addStringsLoader(hulyMailId, async (lang: string) => await import(`@hcengineering/huly-mail-assets/lang/${lang}.json`)) + addStringsLoader(aiAssistantId, async (lang: string) => await import(`@hcengineering/ai-assistant-assets/lang/${lang}.json`)) } export class PlatformBranding { diff --git a/dev/prod/package.json b/dev/prod/package.json index e64a90c620..094e4fd85d 100644 --- a/dev/prod/package.json +++ b/dev/prod/package.json @@ -279,6 +279,9 @@ "@hcengineering/huly-mail": "^0.6.0", "@hcengineering/huly-mail-assets": "^0.6.0", "@hcengineering/huly-mail-resources": "^0.6.0", + "@hcengineering/ai-assistant": "^0.6.0", + "@hcengineering/ai-assistant-assets": "^0.6.0", + "@hcengineering/ai-assistant-resources": "^0.6.0", "@sentry/svelte": "^9.22.0", "posthog-js": "^1.246.0", "readable-stream": "^4.7.0", diff --git a/dev/prod/src/platform.ts b/dev/prod/src/platform.ts index 9cebe18e4a..2e8490e115 100644 --- a/dev/prod/src/platform.ts +++ b/dev/prod/src/platform.ts @@ -77,6 +77,7 @@ import communication, { communicationId } from '@hcengineering/communication' import {emojiId} from '@hcengineering/emoji' import billingPlugin, {billingId} from '@hcengineering/billing' import { hulyMailId } from '@hcengineering/huly-mail' +import { aiAssistantId } from '@hcengineering/ai-assistant' import '@hcengineering/activity-assets' import '@hcengineering/analytics-collector-assets' @@ -133,6 +134,7 @@ import '@hcengineering/communication-assets' import '@hcengineering/emoji-assets' import '@hcengineering/billing-assets' import '@hcengineering/huly-mail-assets' +import '@hcengineering/ai-assistant-assets' import { coreId } from '@hcengineering/core' import presentation, { @@ -375,6 +377,7 @@ function configureI18n(): void { addStringsLoader(emojiId, async (lang: string) => await import(`@hcengineering/emoji-assets/lang/${lang}.json`)) addStringsLoader(billingId, async (lang: string) => await import(`@hcengineering/billing-assets/lang/${lang}.json`)) addStringsLoader(hulyMailId, async (lang: string) => await import(`@hcengineering/huly-mail-assets/lang/${lang}.json`)) + addStringsLoader(aiAssistantId, async (lang: string) => await import(`@hcengineering/ai-assistant-assets/lang/${lang}.json`)) } export async function configurePlatform() { @@ -586,6 +589,7 @@ export async function configurePlatform() { addLocation(emojiId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/emoji-resources')) addLocation(billingId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/billing-resources')) addLocation(hulyMailId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/huly-mail-resources')) + addLocation(aiAssistantId, () => import(/* webpackChunkName: "achievement" */ '@hcengineering/ai-assistant-resources')) setMetadata(client.metadata.FilterModel, 'ui') setMetadata(client.metadata.ExtraPlugins, ['preference' as Plugin]) diff --git a/models/ai-assistant/.eslintrc.js b/models/ai-assistant/.eslintrc.js new file mode 100644 index 0000000000..c1cf82cba0 --- /dev/null +++ b/models/ai-assistant/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['./node_modules/@hcengineering/platform-rig/profiles/model/eslint.config.json'], + parserOptions: { + tsconfigRootDir: __dirname, + project: './tsconfig.json' + } +} diff --git a/models/ai-assistant/.npmignore b/models/ai-assistant/.npmignore new file mode 100644 index 0000000000..e3ec093c38 --- /dev/null +++ b/models/ai-assistant/.npmignore @@ -0,0 +1,4 @@ +* +!/lib/** +!CHANGELOG.md +/lib/**/__tests__/ diff --git a/models/ai-assistant/config/rig.json b/models/ai-assistant/config/rig.json new file mode 100644 index 0000000000..2f6be36605 --- /dev/null +++ b/models/ai-assistant/config/rig.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + "rigPackageName": "@hcengineering/platform-rig", + "rigProfile": "model" +} diff --git a/models/ai-assistant/jest.config.js b/models/ai-assistant/jest.config.js new file mode 100644 index 0000000000..2cfd408b67 --- /dev/null +++ b/models/ai-assistant/jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'], + roots: ["./src"], + coverageReporters: ["text-summary", "html"] +} diff --git a/models/ai-assistant/package.json b/models/ai-assistant/package.json new file mode 100644 index 0000000000..20ea89f86f --- /dev/null +++ b/models/ai-assistant/package.json @@ -0,0 +1,46 @@ +{ + "name": "@hcengineering/model-ai-assistant", + "version": "0.6.0", + "main": "lib/index.js", + "svelte": "src/index.ts", + "types": "types/index.d.ts", + "author": "Copyright © Hardcore Engineering Inc.", + "template": "@hcengineering/model-package", + "license": "EPL-2.0", + "scripts": { + "build": "compile", + "build:watch": "compile", + "format": "format src", + "_phase:build": "compile transpile src", + "_phase:format": "format src", + "_phase:validate": "compile validate", + "_phase:test": "jest --passWithNoTests --silent --forceExit", + "test": "jest --passWithNoTests --silent --forceExit" + }, + "devDependencies": { + "@hcengineering/platform-rig": "^0.6.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-n": "^15.4.0", + "eslint": "^8.54.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-config-standard-with-typescript": "^40.0.0", + "prettier": "^3.1.0", + "typescript": "^5.8.3", + "@types/node": "^22.15.29", + "jest": "^29.7.0", + "@types/jest": "^29.5.5", + "ts-jest": "^29.1.1" + }, + "dependencies": { + "@hcengineering/model": "^0.6.11", + "@hcengineering/core": "^0.6.32", + "@hcengineering/platform": "^0.6.11", + "@hcengineering/model-core": "^0.6.0", + "@hcengineering/ai-assistant": "^0.6.0", + "@hcengineering/ai-assistant-resources": "^0.6.0", + "@hcengineering/setting": "^0.6.17", + "@hcengineering/ui": "^0.6.15" + } +} diff --git a/models/ai-assistant/src/index.ts b/models/ai-assistant/src/index.ts new file mode 100644 index 0000000000..d4d8b64101 --- /dev/null +++ b/models/ai-assistant/src/index.ts @@ -0,0 +1,43 @@ +// +// Copyright © 2025 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import { aiAssistantIntegrationKind } from '@hcengineering/ai-assistant' +import { type Builder } from '@hcengineering/model' +import core from '@hcengineering/model-core' +import setting from '@hcengineering/setting' + +import aiAssistant from './plugin' + +export { aiAssistantId } from '@hcengineering/ai-assistant' +export { default } from './plugin' + +export function createModel (builder: Builder): void { + builder.createDoc( + setting.class.IntegrationType, + core.space.Model, + { + label: aiAssistant.string.IntegrationLabel, + description: aiAssistant.string.IntegrationDescription, + icon: aiAssistant.component.IconHulyAssistant, + allowMultiple: false, + createComponent: aiAssistant.component.Connect, + onDisconnect: aiAssistant.handler.DisconnectHandler, + onDisconnectAll: aiAssistant.handler.DisconnectAllHandler, + reconnectComponent: aiAssistant.component.Connect, + kind: aiAssistantIntegrationKind + }, + aiAssistant.integrationType.AiAssistant + ) +} diff --git a/models/ai-assistant/src/plugin.ts b/models/ai-assistant/src/plugin.ts new file mode 100644 index 0000000000..707cb68f10 --- /dev/null +++ b/models/ai-assistant/src/plugin.ts @@ -0,0 +1,27 @@ +// +// Copyright © 2025 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import { type IntlString, mergeIds } from '@hcengineering/platform' +import { aiAssistantId } from '@hcengineering/ai-assistant' +import aiAssistant from '@hcengineering/ai-assistant-resources/src/plugin' + +export default mergeIds(aiAssistantId, aiAssistant, { + string: { + ConfigLabel: '' as IntlString, + ConfigDescription: '' as IntlString, + IntegrationLabel: '' as IntlString, + IntegrationDescription: '' as IntlString + } +}) diff --git a/models/ai-assistant/tsconfig.json b/models/ai-assistant/tsconfig.json new file mode 100644 index 0000000000..367a8578c9 --- /dev/null +++ b/models/ai-assistant/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "./node_modules/@hcengineering/platform-rig/profiles/model/tsconfig.json", + + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "declarationDir": "./types", + "tsBuildInfoFile": ".build/build.tsbuildinfo" + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "lib", "dist", "types", "bundle"] +} \ No newline at end of file diff --git a/models/all/package.json b/models/all/package.json index a689d7bfce..1cfa9299fa 100644 --- a/models/all/package.json +++ b/models/all/package.json @@ -132,6 +132,7 @@ "@hcengineering/model-communication": "^0.6.0", "@hcengineering/model-emoji": "^0.6.0", "@hcengineering/model-billing": "^0.6.0", - "@hcengineering/model-huly-mail": "^0.6.0" + "@hcengineering/model-huly-mail": "^0.6.0", + "@hcengineering/model-ai-assistant": "^0.6.0" } } diff --git a/models/all/src/index.ts b/models/all/src/index.ts index b42a39f427..5b82ed2d90 100644 --- a/models/all/src/index.ts +++ b/models/all/src/index.ts @@ -108,6 +108,7 @@ import testManagement, { } from '@hcengineering/model-test-management' import { mailId, createModel as mailModel } from '@hcengineering/model-mail' import { hulyMailId, createModel as hulyMailModel } from '@hcengineering/model-huly-mail' +import aiAssistant, { aiAssistantId, createModel as aiAssistantModel } from '@hcengineering/model-ai-assistant' import { serverDocumentsId, @@ -481,6 +482,18 @@ export default function buildModel (): Builder { [mailModel, mailId], [billingModel, billingId, { beta: false, hidden: true, enabled: true }], [hulyMailModel, hulyMailId], + [ + aiAssistantModel, + aiAssistantId, + { + label: aiAssistant.string.ConfigLabel, + description: aiAssistant.string.ConfigDescription, + hidden: true, + enabled: false, + beta: true, + classFilter: defaultFilter + } + ], [serverCoreModel, serverCoreId], [serverAttachmentModel, serverAttachmentId], diff --git a/models/server-process/src/index.ts b/models/server-process/src/index.ts index 3e74c4a094..9cc3d90c7b 100644 --- a/models/server-process/src/index.ts +++ b/models/server-process/src/index.ts @@ -269,7 +269,7 @@ export function createModel (builder: Builder): void { builder.createDoc(serverCore.class.Trigger, core.space.Model, { trigger: serverProcess.trigger.OnCardUpdate, txMatch: { - _class: core.class.TxUpdateDoc, + _class: { $in: [core.class.TxUpdateDoc, core.class.TxMixin] }, objectClass: cardPlugin.class.Card } }) diff --git a/packages/account-client/package.json b/packages/account-client/package.json index 4b011ae1a8..bc3c6b72b5 100644 --- a/packages/account-client/package.json +++ b/packages/account-client/package.json @@ -45,7 +45,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/account-client/src/client.ts b/packages/account-client/src/client.ts index 268dd4dc52..b6f8de7c7c 100644 --- a/packages/account-client/src/client.ts +++ b/packages/account-client/src/client.ts @@ -223,6 +223,7 @@ export interface AccountClient { mergeSpecifiedPersons: (primaryPerson: PersonUuid, secondaryPerson: PersonUuid) => Promise mergeSpecifiedAccounts: (primaryAccount: AccountUuid, secondaryAccount: AccountUuid) => Promise addEmailSocialId: (email: string) => Promise + addHulyAssistantSocialId: () => Promise setCookie: () => Promise deleteCookie: () => Promise @@ -1098,6 +1099,15 @@ class AccountClientImpl implements AccountClient { return await this.rpc(request) } + async addHulyAssistantSocialId (): Promise { + const request = { + method: 'addHulyAssistantSocialId' as const, + params: {} + } + + return await this.rpc(request) + } + async setCookie (): Promise { const url = concatLink(this.url, '/cookie') const response = await fetch(url, { ...this.request, method: 'PUT' }) diff --git a/packages/analytics-providers/package.json b/packages/analytics-providers/package.json index 4f71a822fe..b8e3ff3fb9 100644 --- a/packages/analytics-providers/package.json +++ b/packages/analytics-providers/package.json @@ -52,7 +52,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/analytics-service/package.json b/packages/analytics-service/package.json index 0e9795cb6a..0dd58651e5 100644 --- a/packages/analytics-service/package.json +++ b/packages/analytics-service/package.json @@ -47,6 +47,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/analytics/package.json b/packages/analytics/package.json index c789ca3578..ef7ed9beda 100644 --- a/packages/analytics/package.json +++ b/packages/analytics/package.json @@ -42,7 +42,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/api-client/package.json b/packages/api-client/package.json index 03b4f471d2..7169daa05d 100644 --- a/packages/api-client/package.json +++ b/packages/api-client/package.json @@ -62,7 +62,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "optionalDependencies": { "ws": "^8.18.2" diff --git a/packages/billing-client/package.json b/packages/billing-client/package.json index 84b5f2d229..11ea787959 100644 --- a/packages/billing-client/package.json +++ b/packages/billing-client/package.json @@ -45,7 +45,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/collaborator-client/package.json b/packages/collaborator-client/package.json index 536b66ed3b..f8a6ea1693 100644 --- a/packages/collaborator-client/package.json +++ b/packages/collaborator-client/package.json @@ -44,7 +44,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/core/package.json b/packages/core/package.json index 46a5a62c9f..dca0881af8 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -46,7 +46,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/core/src/classes.ts b/packages/core/src/classes.ts index c0e9f25bd4..17673915a0 100644 --- a/packages/core/src/classes.ts +++ b/packages/core/src/classes.ts @@ -869,7 +869,8 @@ export enum SocialIdType { PHONE = 'phone', OIDC = 'oidc', HULY = 'huly', - TELEGRAM = 'telegram' + TELEGRAM = 'telegram', + HULY_ASSISTANT = 'huly-assistant' } export interface SocialId { diff --git a/packages/core/src/utils.ts b/packages/core/src/utils.ts index cfb63fbf33..3314a14f12 100644 --- a/packages/core/src/utils.ts +++ b/packages/core/src/utils.ts @@ -977,7 +977,7 @@ export function pickPrimarySocialId (socialIds: SocialId[]): SocialId { return hulySocialIds[0] ?? activeSocialIds[0] } -export const loginSocialTypes = [SocialIdType.EMAIL, SocialIdType.GOOGLE, SocialIdType.GITHUB] +export const loginSocialTypes = [SocialIdType.EMAIL, SocialIdType.GOOGLE, SocialIdType.GITHUB, SocialIdType.OIDC] export function notEmpty (id: T | undefined | null): id is T { return id !== undefined && id !== null && id !== '' diff --git a/packages/hls/package.json b/packages/hls/package.json index 0e2de14508..189e722f20 100644 --- a/packages/hls/package.json +++ b/packages/hls/package.json @@ -48,6 +48,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/importer/package.json b/packages/importer/package.json index 0046b1de62..6e6ab06937 100644 --- a/packages/importer/package.json +++ b/packages/importer/package.json @@ -68,6 +68,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/integration-client/package.json b/packages/integration-client/package.json index 786a20bb06..140fa83125 100644 --- a/packages/integration-client/package.json +++ b/packages/integration-client/package.json @@ -50,7 +50,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/kvs-client/package.json b/packages/kvs-client/package.json index b8cd145301..75b746329b 100644 --- a/packages/kvs-client/package.json +++ b/packages/kvs-client/package.json @@ -46,7 +46,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/measurements-otlp/package.json b/packages/measurements-otlp/package.json index 8ffa1ad9d2..79f67f2ae7 100644 --- a/packages/measurements-otlp/package.json +++ b/packages/measurements-otlp/package.json @@ -56,6 +56,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/measurements/package.json b/packages/measurements/package.json index 56430b1497..9f78a24bd3 100644 --- a/packages/measurements/package.json +++ b/packages/measurements/package.json @@ -37,10 +37,9 @@ "ts-jest": "^29.1.1", "@types/jest": "^29.5.5" }, - "dependencies": {}, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/platform/package.json b/packages/platform/package.json index 761ecba1f7..02979f282b 100644 --- a/packages/platform/package.json +++ b/packages/platform/package.json @@ -41,7 +41,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/presentation/package.json b/packages/presentation/package.json index 7b9eabb4ca..62bd5e93cc 100644 --- a/packages/presentation/package.json +++ b/packages/presentation/package.json @@ -69,6 +69,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/query/package.json b/packages/query/package.json index 63597eddb8..e2ba01e6f3 100644 --- a/packages/query/package.json +++ b/packages/query/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/rank/package.json b/packages/rank/package.json index 484dfd0c19..071d93c1b8 100644 --- a/packages/rank/package.json +++ b/packages/rank/package.json @@ -42,6 +42,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/retry/package.json b/packages/retry/package.json index 0dd36ddcc2..ee1c3d904a 100644 --- a/packages/retry/package.json +++ b/packages/retry/package.json @@ -32,6 +32,5 @@ "jest": "^29.7.0", "ts-jest": "^29.1.1", "@types/jest": "^29.5.5" - }, - "dependencies": {} + } } diff --git a/packages/text-core/package.json b/packages/text-core/package.json index 603d55534d..a97d00fb6f 100644 --- a/packages/text-core/package.json +++ b/packages/text-core/package.json @@ -44,7 +44,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/text-html/package.json b/packages/text-html/package.json index ad9476c63b..607baebcd5 100644 --- a/packages/text-html/package.json +++ b/packages/text-html/package.json @@ -42,7 +42,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/text-markdown/package.json b/packages/text-markdown/package.json index c28d8b4870..7fefc70f35 100644 --- a/packages/text-markdown/package.json +++ b/packages/text-markdown/package.json @@ -45,7 +45,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/text-ydoc/package.json b/packages/text-ydoc/package.json index d91b8aa17a..4f476f5423 100644 --- a/packages/text-ydoc/package.json +++ b/packages/text-ydoc/package.json @@ -46,6 +46,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/text/package.json b/packages/text/package.json index e2e0a0fdc0..52f61e0605 100644 --- a/packages/text/package.json +++ b/packages/text/package.json @@ -81,7 +81,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/packages/theme/package.json b/packages/theme/package.json index 1c56ff2b90..168635d0ef 100644 --- a/packages/theme/package.json +++ b/packages/theme/package.json @@ -42,6 +42,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/packages/ui/package.json b/packages/ui/package.json index 1afa72703c..bb8fc15c03 100644 --- a/packages/ui/package.json +++ b/packages/ui/package.json @@ -58,6 +58,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/achievement/package.json b/plugins/achievement/package.json index 4bd97879f0..7216f31f20 100644 --- a/plugins/achievement/package.json +++ b/plugins/achievement/package.json @@ -43,6 +43,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/activity/package.json b/plugins/activity/package.json index 39bc8049f3..bd43ca7a76 100644 --- a/plugins/activity/package.json +++ b/plugins/activity/package.json @@ -46,6 +46,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/ai-assistant-assets/.eslintrc.js b/plugins/ai-assistant-assets/.eslintrc.js new file mode 100644 index 0000000000..e73094bc7e --- /dev/null +++ b/plugins/ai-assistant-assets/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['./node_modules/@hcengineering/platform-rig/profiles/assets/eslint.config.json'], + parserOptions: { + tsconfigRootDir: __dirname, + project: './tsconfig.json' + } +} diff --git a/plugins/ai-assistant-assets/config/rig.json b/plugins/ai-assistant-assets/config/rig.json new file mode 100644 index 0000000000..b75800b9b7 --- /dev/null +++ b/plugins/ai-assistant-assets/config/rig.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + "rigPackageName": "@hcengineering/platform-rig", + "rigProfile": "assets" +} diff --git a/plugins/ai-assistant-assets/jest.config.js b/plugins/ai-assistant-assets/jest.config.js new file mode 100644 index 0000000000..2cfd408b67 --- /dev/null +++ b/plugins/ai-assistant-assets/jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'], + roots: ["./src"], + coverageReporters: ["text-summary", "html"] +} diff --git a/plugins/ai-assistant-assets/lang/cs.json b/plugins/ai-assistant-assets/lang/cs.json new file mode 100644 index 0000000000..f844d714c2 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/cs.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "AI Asistent", + "IntegrationDescription": "Váš AI asistent poháněný umělou inteligencí, který pomáhá organizovat, automatizovat a zjednodušit váš denní pracovní tok napříč platformou", + "ConfigLabel": "AI Asistent", + "ConfigDescription": "Osobní asistent poháněný umělou inteligencí", + "Connect": "Připojit", + "Cancel": "Zrušit", + "Status": "Stav", + "FailedToConnect": "Služba AI Asistenta není dostupná", + "Configure": "Konfigurovat AI Asistenta" + } +} \ No newline at end of file diff --git a/plugins/ai-assistant-assets/lang/de.json b/plugins/ai-assistant-assets/lang/de.json new file mode 100644 index 0000000000..3cb57e19a2 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/de.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "KI-Assistent", + "IntegrationDescription": "Ihr KI-unterstützter persönlicher Assistent, der hilft, Ihren täglichen Arbeitsablauf auf der Plattform zu organisieren, automatisieren und zu optimieren", + "ConfigLabel": "KI-Assistent", + "ConfigDescription": "KI-unterstützter persönlicher Assistent", + "Connect": "Verbinden", + "Cancel": "Abbrechen", + "Status": "Status", + "FailedToConnect": "KI-Assistent-Service ist nicht verfügbar", + "Configure": "KI-Assistent konfigurieren" + } +} \ No newline at end of file diff --git a/plugins/ai-assistant-assets/lang/en.json b/plugins/ai-assistant-assets/lang/en.json new file mode 100644 index 0000000000..979cfe2826 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/en.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "AI Assistant", + "IntegrationDescription": "Your AI-powered personal assistant that helps organize, automate, and streamline your daily workflow across the platform", + "ConfigLabel": "AI Assistant", + "ConfigDescription": "AI-powered personal assistant", + "Connect": "Connect", + "Cancel": "Cancel", + "Status": "Status", + "FailedToConnect": "AI Assistant service is not available", + "Configure": "Configure AI Assistant" + } +} \ No newline at end of file diff --git a/plugins/ai-assistant-assets/lang/es.json b/plugins/ai-assistant-assets/lang/es.json new file mode 100644 index 0000000000..a682808c46 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/es.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "Asistente de IA", + "IntegrationDescription": "Tu asistente personal impulsado por IA que ayuda a organizar, automatizar y optimizar tu flujo de trabajo diario en toda la plataforma", + "ConfigLabel": "Asistente de IA", + "ConfigDescription": "Asistente personal impulsado por IA", + "Connect": "Conectar", + "Cancel": "Cancelar", + "Status": "Estado", + "FailedToConnect": "El servicio del Asistente de IA no está disponible", + "Configure": "Configurar Asistente de IA" + } +} \ No newline at end of file diff --git a/plugins/ai-assistant-assets/lang/fr.json b/plugins/ai-assistant-assets/lang/fr.json new file mode 100644 index 0000000000..d181c54861 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/fr.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "Assistant IA", + "IntegrationDescription": "Votre assistant personnel alimenté par IA qui aide à organiser, automatiser et rationaliser votre flux de travail quotidien sur la plateforme", + "ConfigLabel": "Assistant IA", + "ConfigDescription": "Assistant personnel alimenté par IA", + "Connect": "Se connecter", + "Cancel": "Annuler", + "Status": "Statut", + "FailedToConnect": "Le service Assistant IA n'est pas disponible", + "Configure": "Configurer l'Assistant IA" + } +} \ No newline at end of file diff --git a/plugins/ai-assistant-assets/lang/it.json b/plugins/ai-assistant-assets/lang/it.json new file mode 100644 index 0000000000..afc7c5a53d --- /dev/null +++ b/plugins/ai-assistant-assets/lang/it.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "Assistente AI", + "IntegrationDescription": "Il tuo assistente personale basato sull'AI che aiuta a organizzare, automatizzare e snellire il tuo flusso di lavoro quotidiano sulla piattaforma", + "ConfigLabel": "Assistente AI", + "ConfigDescription": "Assistente personale basato sull'AI", + "Connect": "Connetti", + "Cancel": "Annulla", + "Status": "Stato", + "FailedToConnect": "Il servizio Assistente AI non è disponibile", + "Configure": "Configura Assistente AI" + } +} diff --git a/plugins/ai-assistant-assets/lang/ja.json b/plugins/ai-assistant-assets/lang/ja.json new file mode 100644 index 0000000000..a50add10c7 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/ja.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "AIアシスタント", + "IntegrationDescription": "プラットフォーム全体で日常のワークフローを整理、自動化、効率化するAI搭載のパーソナルアシスタント", + "ConfigLabel": "AIアシスタント", + "ConfigDescription": "AI搭載のパーソナルアシスタント", + "Connect": "接続", + "Cancel": "キャンセル", + "Status": "ステータス", + "FailedToConnect": "AIアシスタントサービスは利用できません", + "Configure": "AIアシスタント設定" + } +} diff --git a/plugins/ai-assistant-assets/lang/pt.json b/plugins/ai-assistant-assets/lang/pt.json new file mode 100644 index 0000000000..010171b807 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/pt.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "Assistente de IA", + "IntegrationDescription": "Seu assistente pessoal alimentado por IA que ajuda a organizar, automatizar e simplificar seu fluxo de trabalho diário na plataforma", + "ConfigLabel": "Assistente de IA", + "ConfigDescription": "Assistente pessoal alimentado por IA", + "Connect": "Conectar", + "Cancel": "Cancelar", + "Status": "Status", + "FailedToConnect": "O serviço do Assistente de IA não está disponível", + "Configure": "Configurar Assistente de IA" + } +} \ No newline at end of file diff --git a/plugins/ai-assistant-assets/lang/ru.json b/plugins/ai-assistant-assets/lang/ru.json new file mode 100644 index 0000000000..c89f40ff08 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/ru.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "ИИ Помощник", + "IntegrationDescription": "Ваш персональный помощник на основе ИИ, который помогает организовать, автоматизировать и оптимизировать ваш ежедневный рабочий процесс на платформе", + "ConfigLabel": "ИИ Помощник", + "ConfigDescription": "Персональный помощник на основе ИИ", + "Connect": "Подключить", + "Cancel": "Отмена", + "Status": "Статус", + "FailedToConnect": "Служба ИИ Помощника недоступна", + "Configure": "Настроить ИИ Помощника" + } +} \ No newline at end of file diff --git a/plugins/ai-assistant-assets/lang/zh.json b/plugins/ai-assistant-assets/lang/zh.json new file mode 100644 index 0000000000..1b238a3f24 --- /dev/null +++ b/plugins/ai-assistant-assets/lang/zh.json @@ -0,0 +1,13 @@ +{ + "string": { + "IntegrationLabel": "AI 助手", + "IntegrationDescription": "您的 AI 驱动的个人助手,帮助组织、自动化和简化您在平台上的日常工作流程", + "ConfigLabel": "AI 助手", + "ConfigDescription": "AI 驱动的个人助手", + "Connect": "连接", + "Cancel": "取消", + "Status": "状态", + "FailedToConnect": "AI 助手服务不可用", + "Configure": "配置 AI 助手" + } +} diff --git a/plugins/ai-assistant-assets/package.json b/plugins/ai-assistant-assets/package.json new file mode 100644 index 0000000000..0fa4911128 --- /dev/null +++ b/plugins/ai-assistant-assets/package.json @@ -0,0 +1,39 @@ +{ + "name": "@hcengineering/ai-assistant-assets", + "version": "0.6.0", + "main": "src/index.ts", + "author": "Copyright © Hardcore Engineering Inc.", + "template": "@hcengineering/assets-package", + "license": "EPL-2.0", + "scripts": { + "build": "compile", + "test": "jest --passWithNoTests --silent", + "format": "format src", + "build:watch": "compile", + "build:docs": "", + "_phase:build": "compile transpile src", + "_phase:test": "jest --passWithNoTests --silent", + "_phase:format": "format src", + "_phase:validate": "compile validate" + }, + "devDependencies": { + "@hcengineering/platform-rig": "^0.6.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-config-standard-with-typescript": "^40.0.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-n": "^15.4.0", + "eslint-plugin-promise": "^6.1.1", + "eslint": "^8.54.0", + "prettier": "^3.1.0", + "typescript": "^5.8.3", + "@types/node": "^22.15.29", + "jest": "^29.7.0", + "ts-jest": "^29.1.1", + "@types/jest": "^29.5.5" + }, + "dependencies": { + "@hcengineering/platform": "^0.6.11", + "@hcengineering/ai-assistant": "^0.6.0" + } +} diff --git a/plugins/ai-assistant-assets/src/__tests__/lang.test.ts b/plugins/ai-assistant-assets/src/__tests__/lang.test.ts new file mode 100644 index 0000000000..cf96c6dcf7 --- /dev/null +++ b/plugins/ai-assistant-assets/src/__tests__/lang.test.ts @@ -0,0 +1,6 @@ +import { makeLocalesTest } from '@hcengineering/platform' + +it( + 'Locales are equale', + makeLocalesTest((lang) => import(`../../lang/${lang}.json`)) +) diff --git a/plugins/ai-assistant-assets/src/index.ts b/plugins/ai-assistant-assets/src/index.ts new file mode 100644 index 0000000000..0c56ed7ff6 --- /dev/null +++ b/plugins/ai-assistant-assets/src/index.ts @@ -0,0 +1,14 @@ +// +// Copyright © 2025 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// diff --git a/plugins/ai-assistant-assets/tsconfig.json b/plugins/ai-assistant-assets/tsconfig.json new file mode 100644 index 0000000000..2857a41ad2 --- /dev/null +++ b/plugins/ai-assistant-assets/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "./node_modules/@hcengineering/platform-rig/profiles/assets/tsconfig.json", + + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "declarationDir": "./types", + "types": ["node", "jest"], + "tsBuildInfoFile": ".build/build.tsbuildinfo" + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "lib", "dist", "types", "bundle"] +} \ No newline at end of file diff --git a/plugins/ai-assistant-resources/.eslintrc.js b/plugins/ai-assistant-resources/.eslintrc.js new file mode 100644 index 0000000000..bb8fd7450d --- /dev/null +++ b/plugins/ai-assistant-resources/.eslintrc.js @@ -0,0 +1,4 @@ +module.exports = { + extends: ['./node_modules/@hcengineering/platform-rig/profiles/ui/eslint.config.json'], + parserOptions: { tsconfigRootDir: __dirname } +} diff --git a/plugins/ai-assistant-resources/.prettierrc b/plugins/ai-assistant-resources/.prettierrc new file mode 100644 index 0000000000..792942803a --- /dev/null +++ b/plugins/ai-assistant-resources/.prettierrc @@ -0,0 +1,22 @@ +{ + "$schema": "http://json-schema.org/draft-04/schema#", + "trailingComma": "none", + "tabWidth": 2, + "semi": false, + "singleQuote": true, + "printWidth": 120, + "useTabs": false, + "bracketSpacing": true, + "proseWrap": "preserve", + "plugins": [ + "prettier-plugin-svelte" + ], + "overrides": [ + { + "files": "*.svelte", + "options": { + "parser": "svelte" + } + } + ] +} \ No newline at end of file diff --git a/plugins/ai-assistant-resources/config/rig.json b/plugins/ai-assistant-resources/config/rig.json new file mode 100644 index 0000000000..bcad6f7c33 --- /dev/null +++ b/plugins/ai-assistant-resources/config/rig.json @@ -0,0 +1,5 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + "rigPackageName": "@hcengineering/platform-rig", + "rigProfile": "ui" +} diff --git a/plugins/ai-assistant-resources/jest.config.js b/plugins/ai-assistant-resources/jest.config.js new file mode 100644 index 0000000000..3656e284d3 --- /dev/null +++ b/plugins/ai-assistant-resources/jest.config.js @@ -0,0 +1,5 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'] +} diff --git a/plugins/ai-assistant-resources/package.json b/plugins/ai-assistant-resources/package.json new file mode 100644 index 0000000000..f71faae516 --- /dev/null +++ b/plugins/ai-assistant-resources/package.json @@ -0,0 +1,59 @@ +{ + "name": "@hcengineering/ai-assistant-resources", + "version": "0.6.0", + "main": "src/index.ts", + "author": "Copyright © Hardcore Engineering Inc.", + "license": "EPL-2.0", + "scripts": { + "build": "compile ui", + "build:docs": "api-extractor run --local", + "format": "format src", + "svelte-check": "do-svelte-check", + "_phase:svelte-check": "do-svelte-check", + "build:watch": "compile ui", + "_phase:build": "compile ui", + "_phase:format": "format src", + "_phase:validate": "compile validate" + }, + "devDependencies": { + "@hcengineering/platform-rig": "^0.6.0", + "svelte-loader": "^3.2.0", + "sass": "^1.53.0", + "svelte-preprocess": "^5.1.3", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-n": "^15.4.0", + "eslint": "^8.54.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-config-standard-with-typescript": "^40.0.0", + "eslint-plugin-svelte": "^2.35.1", + "prettier-plugin-svelte": "^3.2.2", + "prettier": "^3.1.0", + "svelte-check": "^3.6.9", + "typescript": "^5.8.3", + "jest": "^29.7.0", + "ts-jest": "^29.1.1", + "@types/jest": "^29.5.5", + "svelte-eslint-parser": "^0.33.1" + }, + "dependencies": { + "@hcengineering/platform": "^0.6.11", + "svelte": "^4.2.20", + "@hcengineering/ai-assistant": "^0.6.0", + "@hcengineering/ui": "^0.6.15", + "@hcengineering/presentation": "^0.6.3", + "@hcengineering/card": "^0.6.0", + "@hcengineering/card-resources": "^0.6.0", + "@hcengineering/contact": "^0.6.24", + "@hcengineering/setting": "^0.6.17", + "@hcengineering/login": "^0.6.12", + "@hcengineering/core": "^0.6.32", + "@hcengineering/panel": "^0.6.23", + "@hcengineering/analytics": "^0.6.0", + "@hcengineering/integration-client": "^0.6.0", + "@hcengineering/account-client": "^0.6.0", + "@hcengineering/setting-resources": "^0.6.0", + "@hcengineering/view-resources": "^0.6.0" + } +} diff --git a/plugins/ai-assistant-resources/postcss.config.js b/plugins/ai-assistant-resources/postcss.config.js new file mode 100644 index 0000000000..88752c6cb0 --- /dev/null +++ b/plugins/ai-assistant-resources/postcss.config.js @@ -0,0 +1,5 @@ +module.exports = { + plugins: [ + require('autoprefixer') + ] +} diff --git a/plugins/ai-assistant-resources/src/components/Configure.svelte b/plugins/ai-assistant-resources/src/components/Configure.svelte new file mode 100644 index 0000000000..db3075465c --- /dev/null +++ b/plugins/ai-assistant-resources/src/components/Configure.svelte @@ -0,0 +1,99 @@ + + + + { + dispatch('close') + }} + canSave={false} + fullSize + okLabel={presentation.string.Ok} + on:close={() => dispatch('close')} + on:changeContent +> + +
+ + + +
+
+
+ {#if isLoading} +
+
+ +
+
+ {/if} +
+
diff --git a/plugins/ai-assistant-resources/src/components/icons/HulyAssistant.svelte b/plugins/ai-assistant-resources/src/components/icons/HulyAssistant.svelte new file mode 100644 index 0000000000..12fa244573 --- /dev/null +++ b/plugins/ai-assistant-resources/src/components/icons/HulyAssistant.svelte @@ -0,0 +1,436 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugins/ai-assistant-resources/src/index.ts b/plugins/ai-assistant-resources/src/index.ts new file mode 100644 index 0000000000..1fd3346e67 --- /dev/null +++ b/plugins/ai-assistant-resources/src/index.ts @@ -0,0 +1,47 @@ +// +// Copyright © 2025 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import { type Resources } from '@hcengineering/platform' +import type { Integration } from '@hcengineering/account-client' + +import Configure from './components/Configure.svelte' +import IconHulyAssistant from './components/icons/HulyAssistant.svelte' +import { getIntegrationClient } from './utils' + +export default async (): Promise => ({ + component: { + Connect: Configure, + Configure, + IconHulyAssistant + }, + handler: { + DisconnectHandler: async (integration: Integration): Promise => { + if (integration == null) { + console.error('Missing required argument integration in DisconnectHandler') + return + } + const integrationClient = await getIntegrationClient() + await integrationClient.removeIntegration(integration.socialId, integration.workspaceUuid) + }, + DisconnectAllHandler: async (integration: Integration): Promise => { + if (integration == null) { + console.error('Missing required argument integration in DisconnectHandler') + return + } + const integrationClient = await getIntegrationClient() + await integrationClient.removeConnection(integration) + } + } +}) diff --git a/plugins/ai-assistant-resources/src/plugin.ts b/plugins/ai-assistant-resources/src/plugin.ts new file mode 100644 index 0000000000..b6b36d8fed --- /dev/null +++ b/plugins/ai-assistant-resources/src/plugin.ts @@ -0,0 +1,26 @@ +// +// Copyright © 2025 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import { type IntlString, mergeIds } from '@hcengineering/platform' + +import aiAssistant, { aiAssistantId } from '@hcengineering/ai-assistant' + +export default mergeIds(aiAssistantId, aiAssistant, { + string: { + Connect: '' as IntlString, + FailedToConnect: '' as IntlString, + Configure: '' as IntlString + } +}) diff --git a/plugins/ai-assistant-resources/src/utils.ts b/plugins/ai-assistant-resources/src/utils.ts new file mode 100644 index 0000000000..55b5ad86ea --- /dev/null +++ b/plugins/ai-assistant-resources/src/utils.ts @@ -0,0 +1,39 @@ +// +// Copyright © 2025 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// +import { getMetadata } from '@hcengineering/platform' +import presentation from '@hcengineering/presentation' +import login from '@hcengineering/login' +import { aiAssistantIntegrationKind } from '@hcengineering/ai-assistant' +import { + getIntegrationClient as getIntegrationClientRaw, + type IntegrationClient +} from '@hcengineering/integration-client' +import { getClient as getAccountClientRaw, type AccountClient } from '@hcengineering/account-client' + +export async function getIntegrationClient (): Promise { + const accountsUrl = getMetadata(login.metadata.AccountsUrl) + const token = getMetadata(presentation.metadata.Token) + if (accountsUrl === undefined || token === undefined) { + throw new Error('Accounts URL or token is not defined') + } + return getIntegrationClientRaw(accountsUrl, token, aiAssistantIntegrationKind, 'ai-assistant') +} + +export function getAccountClient (): AccountClient { + const accountsUrl = getMetadata(login.metadata.AccountsUrl) + const token = getMetadata(presentation.metadata.Token) + + return getAccountClientRaw(accountsUrl, token) +} diff --git a/plugins/ai-assistant-resources/svelte.config.js b/plugins/ai-assistant-resources/svelte.config.js new file mode 100644 index 0000000000..944a06f73e --- /dev/null +++ b/plugins/ai-assistant-resources/svelte.config.js @@ -0,0 +1,5 @@ +const sveltePreprocess = require('svelte-preprocess') + +module.exports = { + preprocess: sveltePreprocess() +}; \ No newline at end of file diff --git a/plugins/ai-assistant-resources/tsconfig.json b/plugins/ai-assistant-resources/tsconfig.json new file mode 100644 index 0000000000..14ada1dc34 --- /dev/null +++ b/plugins/ai-assistant-resources/tsconfig.json @@ -0,0 +1,11 @@ +{ + "extends": "./node_modules/@hcengineering/platform-rig/profiles/ui/tsconfig.json", + + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "declarationDir": "./types" + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "lib", "dist", "types", "bundle"] +} \ No newline at end of file diff --git a/plugins/ai-assistant/.eslintrc.js b/plugins/ai-assistant/.eslintrc.js new file mode 100644 index 0000000000..72235dc283 --- /dev/null +++ b/plugins/ai-assistant/.eslintrc.js @@ -0,0 +1,7 @@ +module.exports = { + extends: ['./node_modules/@hcengineering/platform-rig/profiles/default/eslint.config.json'], + parserOptions: { + tsconfigRootDir: __dirname, + project: './tsconfig.json' + } +} diff --git a/plugins/ai-assistant/.npmignore b/plugins/ai-assistant/.npmignore new file mode 100644 index 0000000000..e3ec093c38 --- /dev/null +++ b/plugins/ai-assistant/.npmignore @@ -0,0 +1,4 @@ +* +!/lib/** +!CHANGELOG.md +/lib/**/__tests__/ diff --git a/plugins/ai-assistant/config/rig.json b/plugins/ai-assistant/config/rig.json new file mode 100644 index 0000000000..0110930f55 --- /dev/null +++ b/plugins/ai-assistant/config/rig.json @@ -0,0 +1,4 @@ +{ + "$schema": "https://developer.microsoft.com/json-schemas/rig-package/rig.schema.json", + "rigPackageName": "@hcengineering/platform-rig" +} diff --git a/plugins/ai-assistant/jest.config.js b/plugins/ai-assistant/jest.config.js new file mode 100644 index 0000000000..2cfd408b67 --- /dev/null +++ b/plugins/ai-assistant/jest.config.js @@ -0,0 +1,7 @@ +module.exports = { + preset: 'ts-jest', + testEnvironment: 'node', + testMatch: ['**/?(*.)+(spec|test).[jt]s?(x)'], + roots: ["./src"], + coverageReporters: ["text-summary", "html"] +} diff --git a/plugins/ai-assistant/package.json b/plugins/ai-assistant/package.json new file mode 100644 index 0000000000..32ffd30b41 --- /dev/null +++ b/plugins/ai-assistant/package.json @@ -0,0 +1,45 @@ +{ + "name": "@hcengineering/ai-assistant", + "version": "0.6.0", + "main": "lib/index.js", + "svelte": "src/index.ts", + "types": "types/index.d.ts", + "files": [ + "lib/**/*", + "types/**/*", + "tsconfig.json" + ], + "author": "Copyright © Hardcore Engineering Inc.", + "license": "EPL-2.0", + "scripts": { + "build": "compile", + "build:watch": "compile", + "format": "format src", + "test": "jest --passWithNoTests --silent", + "_phase:build": "compile transpile src", + "_phase:test": "jest --passWithNoTests --silent", + "_phase:format": "format src", + "_phase:validate": "compile validate" + }, + "devDependencies": { + "@hcengineering/platform-rig": "^0.6.0", + "@typescript-eslint/eslint-plugin": "^6.11.0", + "eslint-plugin-import": "^2.26.0", + "eslint-plugin-promise": "^6.1.1", + "eslint-plugin-n": "^15.4.0", + "eslint": "^8.54.0", + "@typescript-eslint/parser": "^6.11.0", + "eslint-config-standard-with-typescript": "^40.0.0", + "prettier": "^3.1.0", + "typescript": "^5.8.3", + "jest": "^29.7.0", + "ts-jest": "^29.1.1", + "@types/jest": "^29.5.5" + }, + "dependencies": { + "@hcengineering/platform": "^0.6.11", + "@hcengineering/core": "^0.6.32", + "@hcengineering/ui": "^0.6.15", + "@hcengineering/setting": "^0.6.17" + } +} diff --git a/plugins/ai-assistant/src/index.ts b/plugins/ai-assistant/src/index.ts new file mode 100644 index 0000000000..07167adc17 --- /dev/null +++ b/plugins/ai-assistant/src/index.ts @@ -0,0 +1,44 @@ +// +// Copyright © 2025 Hardcore Engineering Inc. +// +// Licensed under the Eclipse Public License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. You may +// obtain a copy of the License at https://www.eclipse.org/legal/epl-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// +// See the License for the specific language governing permissions and +// limitations under the License. +// + +import type { Ref, IntegrationKind } from '@hcengineering/core' +import { type Plugin, plugin } from '@hcengineering/platform' +import type { Handler, IntegrationType } from '@hcengineering/setting' +import type { AnyComponent } from '@hcengineering/ui' + +/** + * @public + */ +export const aiAssistantIntegrationKind = 'ai-assistant' as IntegrationKind + +/** + * @public + */ +export const aiAssistantId = 'ai-assistant' as Plugin + +export default plugin(aiAssistantId, { + component: { + Connect: '' as AnyComponent, + IconHulyAssistant: '' as AnyComponent, + Configure: '' as AnyComponent + }, + integrationType: { + AiAssistant: '' as Ref + }, + handler: { + DisconnectHandler: '' as Handler, + DisconnectAllHandler: '' as Handler + } +}) diff --git a/plugins/ai-assistant/tsconfig.json b/plugins/ai-assistant/tsconfig.json new file mode 100644 index 0000000000..b5ae22f6e4 --- /dev/null +++ b/plugins/ai-assistant/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "./node_modules/@hcengineering/platform-rig/profiles/default/tsconfig.json", + + "compilerOptions": { + "rootDir": "./src", + "outDir": "./lib", + "declarationDir": "./types", + "tsBuildInfoFile": ".build/build.tsbuildinfo" + }, + "include": ["src/**/*"], + "exclude": ["node_modules", "lib", "dist", "types", "bundle"] +} \ No newline at end of file diff --git a/plugins/attachment-resources/package.json b/plugins/attachment-resources/package.json index faba0935d5..af74a12989 100644 --- a/plugins/attachment-resources/package.json +++ b/plugins/attachment-resources/package.json @@ -62,6 +62,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/attachment/package.json b/plugins/attachment/package.json index a5364d0a59..c2b2c3f49a 100644 --- a/plugins/attachment/package.json +++ b/plugins/attachment/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/billing/package.json b/plugins/billing/package.json index 4c8f8b7994..60cadd196e 100644 --- a/plugins/billing/package.json +++ b/plugins/billing/package.json @@ -43,6 +43,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/bitrix-resources/package.json b/plugins/bitrix-resources/package.json index 733a6de47a..5cc7004ab6 100644 --- a/plugins/bitrix-resources/package.json +++ b/plugins/bitrix-resources/package.json @@ -63,6 +63,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/bitrix/package.json b/plugins/bitrix/package.json index 92ae8d77f0..bf72d2a58b 100644 --- a/plugins/bitrix/package.json +++ b/plugins/bitrix/package.json @@ -53,6 +53,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/board/package.json b/plugins/board/package.json index 729d676549..8161891583 100644 --- a/plugins/board/package.json +++ b/plugins/board/package.json @@ -48,6 +48,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/calendar/package.json b/plugins/calendar/package.json index 17564f071d..f0e95e09da 100644 --- a/plugins/calendar/package.json +++ b/plugins/calendar/package.json @@ -47,7 +47,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/plugins/card/package.json b/plugins/card/package.json index 47f902f1bf..9b15a11e3b 100644 --- a/plugins/card/package.json +++ b/plugins/card/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/chat-assets/package.json b/plugins/chat-assets/package.json index c21aecb3da..5da8a5ced1 100644 --- a/plugins/chat-assets/package.json +++ b/plugins/chat-assets/package.json @@ -38,6 +38,6 @@ }, "repository": "https://github.com/hcenginneing/anticrm", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/chat/package.json b/plugins/chat/package.json index bd428bb5de..8f7726ed82 100644 --- a/plugins/chat/package.json +++ b/plugins/chat/package.json @@ -43,6 +43,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/chunter-resources/src/components/ChannelTypingInfo.svelte b/plugins/chunter-resources/src/components/ChannelTypingInfo.svelte index df39108fb4..ec0064ed1b 100644 --- a/plugins/chunter-resources/src/components/ChannelTypingInfo.svelte +++ b/plugins/chunter-resources/src/components/ChannelTypingInfo.svelte @@ -64,6 +64,7 @@ async function updateTypingSub (objectId: Ref): Promise { await unsubscribe?.() + typingInfo = new Map>() unsubscribe = await subscribeTyping(objectId, handleTypingInfo) } diff --git a/plugins/chunter/package.json b/plugins/chunter/package.json index 8566bf80e0..265aeac4eb 100644 --- a/plugins/chunter/package.json +++ b/plugins/chunter/package.json @@ -49,6 +49,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/client-resources/package.json b/plugins/client-resources/package.json index f8874e7d3d..cfc88623e8 100644 --- a/plugins/client-resources/package.json +++ b/plugins/client-resources/package.json @@ -49,7 +49,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/plugins/client/package.json b/plugins/client/package.json index 2626c653dc..345f99d8c2 100644 --- a/plugins/client/package.json +++ b/plugins/client/package.json @@ -42,7 +42,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/plugins/communication-resources/src/components/TypingPresenter.svelte b/plugins/communication-resources/src/components/TypingPresenter.svelte index fe8d46c89e..cbf8f74c49 100644 --- a/plugins/communication-resources/src/components/TypingPresenter.svelte +++ b/plugins/communication-resources/src/components/TypingPresenter.svelte @@ -64,6 +64,7 @@ async function updateTypingSub (cardId: CardID): Promise { await unsubscribe?.() + typingInfo = new Map>() unsubscribe = await subscribeTyping(cardId, handleTypingInfo) } diff --git a/plugins/contact/package.json b/plugins/contact/package.json index 502e30c8f5..703bb73909 100644 --- a/plugins/contact/package.json +++ b/plugins/contact/package.json @@ -54,6 +54,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/document/package.json b/plugins/document/package.json index 75fdfa44d8..4fbd047a2f 100644 --- a/plugins/document/package.json +++ b/plugins/document/package.json @@ -47,6 +47,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/drive/package.json b/plugins/drive/package.json index d401b88c9c..49671dfde3 100644 --- a/plugins/drive/package.json +++ b/plugins/drive/package.json @@ -44,6 +44,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/emoji/package.json b/plugins/emoji/package.json index 492aeed122..30a93718b1 100644 --- a/plugins/emoji/package.json +++ b/plugins/emoji/package.json @@ -46,6 +46,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/gmail/package.json b/plugins/gmail/package.json index 13b2f42c53..7d6c87d6ef 100644 --- a/plugins/gmail/package.json +++ b/plugins/gmail/package.json @@ -46,6 +46,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/hr/package.json b/plugins/hr/package.json index 8ba82b840d..30d0357e7f 100644 --- a/plugins/hr/package.json +++ b/plugins/hr/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/inventory/package.json b/plugins/inventory/package.json index 27d765582b..c528fb6183 100644 --- a/plugins/inventory/package.json +++ b/plugins/inventory/package.json @@ -42,6 +42,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/login/package.json b/plugins/login/package.json index bb28b6b31d..7c2f171be5 100644 --- a/plugins/login/package.json +++ b/plugins/login/package.json @@ -44,6 +44,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/love/package.json b/plugins/love/package.json index ec228e7315..3ca8317598 100644 --- a/plugins/love/package.json +++ b/plugins/love/package.json @@ -51,7 +51,7 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" }, "exports": { ".": { diff --git a/plugins/mail/package.json b/plugins/mail/package.json index c81bb17c7e..fab6661d38 100644 --- a/plugins/mail/package.json +++ b/plugins/mail/package.json @@ -43,6 +43,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/media/package.json b/plugins/media/package.json index 659226c431..84b73ab147 100644 --- a/plugins/media/package.json +++ b/plugins/media/package.json @@ -46,6 +46,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/notification/package.json b/plugins/notification/package.json index 98864b2d28..0673f509c3 100644 --- a/plugins/notification/package.json +++ b/plugins/notification/package.json @@ -50,6 +50,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/preference/package.json b/plugins/preference/package.json index 7c7737ea42..9bdfcdf808 100644 --- a/plugins/preference/package.json +++ b/plugins/preference/package.json @@ -43,6 +43,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/presence/package.json b/plugins/presence/package.json index 425e4716d8..138d42191f 100644 --- a/plugins/presence/package.json +++ b/plugins/presence/package.json @@ -44,6 +44,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/process-resources/src/components/settings/AsideTransitionEditor.svelte b/plugins/process-resources/src/components/settings/AsideTransitionEditor.svelte index c593bb205c..935e6472fb 100644 --- a/plugins/process-resources/src/components/settings/AsideTransitionEditor.svelte +++ b/plugins/process-resources/src/components/settings/AsideTransitionEditor.svelte @@ -78,7 +78,7 @@ items={triggersItems} bind:selected={selectedTrigger} label={plugin.string.Trigger} - on:change={() => { + on:selected={() => { params = {} result = null }} diff --git a/plugins/process-resources/src/utils.ts b/plugins/process-resources/src/utils.ts index 6b5c4affa4..ac6a848728 100644 --- a/plugins/process-resources/src/utils.ts +++ b/plugins/process-resources/src/utils.ts @@ -629,7 +629,7 @@ export async function subProcessesDoneCheck ( params: Record, context: Record ): Promise { - const res = client.findOne(process.class.Execution, { + const res = await client.findOne(process.class.Execution, { parentId: execution._id, status: ExecutionStatus.Active }) diff --git a/plugins/recorder/package.json b/plugins/recorder/package.json index 2a2f8a7a1c..331e12c490 100644 --- a/plugins/recorder/package.json +++ b/plugins/recorder/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/recruit/package.json b/plugins/recruit/package.json index c210ca58ac..22c5f8e075 100644 --- a/plugins/recruit/package.json +++ b/plugins/recruit/package.json @@ -49,6 +49,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/request/package.json b/plugins/request/package.json index b28b87efdb..895eb5c88a 100644 --- a/plugins/request/package.json +++ b/plugins/request/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/setting/package.json b/plugins/setting/package.json index 7387dd265f..de924fec94 100644 --- a/plugins/setting/package.json +++ b/plugins/setting/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/support-resources/package.json b/plugins/support-resources/package.json index 2a9ff39b8b..777333c7a3 100644 --- a/plugins/support-resources/package.json +++ b/plugins/support-resources/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/support/package.json b/plugins/support/package.json index f6b429fbc7..0b78c60c54 100644 --- a/plugins/support/package.json +++ b/plugins/support/package.json @@ -42,6 +42,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/survey-assets/package.json b/plugins/survey-assets/package.json index c5c7c2af16..3c50bc3e87 100644 --- a/plugins/survey-assets/package.json +++ b/plugins/survey-assets/package.json @@ -38,6 +38,6 @@ }, "repository": "https://github.com/hcenginneing/anticrm", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/survey/package.json b/plugins/survey/package.json index da98db0a86..5e144e942f 100644 --- a/plugins/survey/package.json +++ b/plugins/survey/package.json @@ -44,6 +44,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/tags/package.json b/plugins/tags/package.json index 04005b207d..21fe8e6b73 100644 --- a/plugins/tags/package.json +++ b/plugins/tags/package.json @@ -45,6 +45,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/task/package.json b/plugins/task/package.json index e209ef62bb..b7bd5047ac 100644 --- a/plugins/task/package.json +++ b/plugins/task/package.json @@ -47,6 +47,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/telegram/package.json b/plugins/telegram/package.json index 76bf331949..dfd0a67ad9 100644 --- a/plugins/telegram/package.json +++ b/plugins/telegram/package.json @@ -48,6 +48,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/templates/package.json b/plugins/templates/package.json index d433d062fb..a27a3e2a2c 100644 --- a/plugins/templates/package.json +++ b/plugins/templates/package.json @@ -43,6 +43,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/test-management/package.json b/plugins/test-management/package.json index 82cd985117..4d57bbce4f 100644 --- a/plugins/test-management/package.json +++ b/plugins/test-management/package.json @@ -51,6 +51,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/time/package.json b/plugins/time/package.json index bd2908c265..0eb702d3f5 100644 --- a/plugins/time/package.json +++ b/plugins/time/package.json @@ -47,6 +47,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/tracker/package.json b/plugins/tracker/package.json index df2c0eb75d..cb449ed39a 100644 --- a/plugins/tracker/package.json +++ b/plugins/tracker/package.json @@ -52,6 +52,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/uploader/package.json b/plugins/uploader/package.json index 824e90b1f4..417d601038 100644 --- a/plugins/uploader/package.json +++ b/plugins/uploader/package.json @@ -43,6 +43,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/view/package.json b/plugins/view/package.json index d357b615c7..92c4e51646 100644 --- a/plugins/view/package.json +++ b/plugins/view/package.json @@ -44,6 +44,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/plugins/workbench/package.json b/plugins/workbench/package.json index 948303a6fe..c7279a5986 100644 --- a/plugins/workbench/package.json +++ b/plugins/workbench/package.json @@ -46,6 +46,6 @@ }, "repository": "https://github.com/hcengineering/platform", "publishConfig": { - "registry": "https://npm.pkg.github.com" + "access": "public" } } diff --git a/qms-desktop-package/package.json b/qms-desktop-package/package.json index 533fdb0cd9..cb20965b03 100644 --- a/qms-desktop-package/package.json +++ b/qms-desktop-package/package.json @@ -21,7 +21,7 @@ "node-loader": "~2.0.0", "cross-env": "~7.0.3", "typescript": "^5.8.3", - "electron": "^36.3.1", + "electron": "^38.1.1", "@types/node": "^22.15.29", "electron-builder": "^25.1.8", "@electron/notarize": "^2.3.2" diff --git a/rush.json b/rush.json index 42a4cdaed0..820c09f1c7 100644 --- a/rush.json +++ b/rush.json @@ -31,88 +31,6 @@ // "npmVersion": "4.5.0", // "yarnVersion": "1.9.4", - /** - * Options that are only used when the PNPM package manager is selected - */ - "pnpmOptions": { - /** - * Specifies the location of the PNPM store. There are two possible values: - * - * - "local" - use the "pnpm-store" folder in the current configured temp folder: - * "common/temp/pnpm-store" by default. - * - "global" - use PNPM's global store, which has the benefit of being shared - * across multiple repo folders, but the disadvantage of less isolation for builds - * (e.g. bugs or incompatibilities when two repos use different releases of PNPM) - * - * RUSH_PNPM_STORE_PATH will override the directory that will be used as the store - * - * In all cases, the store path will be overridden by the environment variable RUSH_PNPM_STORE_PATH. - * - * The default value is "local". - */ - // "pnpmStore": "local", - - /** - * If true, then Rush will add the "--strict-peer-dependencies" option when invoking PNPM. - * This causes "rush install" to fail if there are unsatisfied peer dependencies, which is - * an invalid state that can cause build failures or incompatible dependency versions. - * (For historical reasons, JavaScript package managers generally do not treat this invalid - * state as an error.) - * - * The default value is false to avoid legacy compatibility issues. - * It is strongly recommended to set strictPeerDependencies=true. - */ - "strictPeerDependencies": false - - /** - * Configures the strategy used to select versions during installation. - * - * This feature requires PNPM version 3.1 or newer. It corresponds to the "--resolution-strategy" command-line - * option for PNPM. Possible values are "fast" and "fewer-dependencies". PNPM's default is "fast", but this may - * be incompatible with certain packages, for example the "@types" packages from DefinitelyTyped. Rush's default - * is "fewer-dependencies", which causes PNPM to avoid installing a newer version if an already installed version - * can be reused; this is more similar to NPM's algorithm. - * - * After modifying this field, it's recommended to run "rush update --full" so that the package manager - * will recalculate all version selections. - */ - // "resolutionStrategy": "fast", - - /** - * If true, then `rush install` will report an error if manual modifications - * were made to the PNPM shrinkwrap file without running "rush update" afterwards. - * - * This feature protects against accidental inconsistencies that may be introduced - * if the PNPM shrinkwrap file ("pnpm-lock.yaml") is manually edited. When this - * feature is enabled, "rush update" will append a hash to the file as a YAML comment, - * and then "rush update" and "rush install" will validate the hash. Note that this does not prohibit - * manual modifications, but merely requires "rush update" be run - * afterwards, ensuring that PNPM can report or repair any potential inconsistencies. - * - * To temporarily disable this validation when invoking "rush install", use the - * "--bypass-policy" command-line parameter. - * - * The default value is false. - */ - // "preventManualShrinkwrapChanges": true, - - /** - * If true, then `rush install` will use the PNPM workspaces feature to perform the - * install. - * - * This feature uses PNPM to perform the entire monorepo install. When using workspaces, Rush will - * generate a "pnpm-workspace.yaml" file referencing all local projects to install. Rush will - * also generate a "pnpmfile.js" which is used to provide preferred versions support. When install - * is run, this pnpmfile will be used to replace dependency version ranges with a smaller subset - * of the original range. If the preferred version is not fully a subset of the original version - * range, it will be left as-is. After this, the pnpmfile.js provided in the repository (if one - * exists) will be called to further modify package dependencies. - * - * This option is experimental. The default value is false. - */ - // "useWorkspaces": true - }, - /** * Older releases of the Node.js engine may be missing features required by your system. * Other releases may have bugs. In particular, the "latest" version will not be a @@ -124,7 +42,7 @@ * LTS schedule: https://nodejs.org/en/about/releases/ * LTS versions: https://nodejs.org/en/download/releases/ */ - "nodeSupportedVersionRange": ">=20.0.0 <23.0.0", + "nodeSupportedVersionRange": ">=20.0.0 <25.0.0", /** * Odd-numbered major versions of Node.js are experimental. Even-numbered releases @@ -137,7 +55,7 @@ * pre-LTS versions in preparation for supporting the first LTS version, you can use this setting * to disable Rush's warning. */ - // "suppressNodeLtsWarning": false, + "suppressNodeLtsWarning": true, /** * If you would like the version specifiers for your dependencies to be consistent, then @@ -150,7 +68,7 @@ * version. In those cases, you will need to add an entry to the "allowedAlternativeVersions" * section of the common-versions.json. */ - // "ensureConsistentVersions": true, + "ensureConsistentVersions": false, /** * Large monorepos can become intimidating for newcomers if project folder paths don't follow @@ -2678,6 +2596,26 @@ "projectFolder": "plugins/huly-mail-resources", "shouldPublish": false }, + { + "packageName": "@hcengineering/model-ai-assistant", + "projectFolder": "models/ai-assistant", + "shouldPublish": false + }, + { + "packageName": "@hcengineering/ai-assistant", + "projectFolder": "plugins/ai-assistant", + "shouldPublish": false + }, + { + "packageName": "@hcengineering/ai-assistant-assets", + "projectFolder": "plugins/ai-assistant-assets", + "shouldPublish": false + }, + { + "packageName": "@hcengineering/ai-assistant-resources", + "projectFolder": "plugins/ai-assistant-resources", + "shouldPublish": false + }, { "packageName": "@hcengineering/pod-worker", "projectFolder": "services/worker", diff --git a/server-plugins/process-resources/src/functions.ts b/server-plugins/process-resources/src/functions.ts index e0a1f0c500..505bf5897f 100644 --- a/server-plugins/process-resources/src/functions.ts +++ b/server-plugins/process-resources/src/functions.ts @@ -14,7 +14,20 @@ // import cardPlugin, { Card, MasterTag, Tag } from '@hcengineering/card' -import core, { Association, Data, Doc, generateId, matchQuery, Ref, Relation, Tx } from '@hcengineering/core' +import core, { + Association, + checkMixinKey, + Data, + Doc, + generateId, + getObjectValue, + matchQuery, + Ref, + Relation, + splitMixinUpdate, + Tx, + TxProcessor +} from '@hcengineering/core' import process, { Execution, ExecutionContext, @@ -24,7 +37,7 @@ import process, { processError, ProcessToDo } from '@hcengineering/process' -import { ExecuteResult, ProcessControl } from '@hcengineering/server-process' +import { ExecuteResult, ProcessControl, SuccessExecutionContext } from '@hcengineering/server-process' import time, { ToDoPriority } from '@hcengineering/time' export async function CheckToDoDone ( @@ -60,7 +73,7 @@ export async function CheckToDoCancelled ( } export async function CheckSubProcessesDone (control: ProcessControl, execution: Execution): Promise { - const res = control.client.findOne(process.class.Execution, { + const res = await control.client.findOne(process.class.Execution, { parentId: execution._id, status: ExecutionStatus.Active }) @@ -74,7 +87,9 @@ export function OnCardUpdateCheck ( context: Record ): boolean { if (context.card === undefined) return false - const res = matchQuery([context.card], params, context.card._class, control.client.getHierarchy(), true) + const process = control.client.getModel().findObject(execution.process) + if (process === undefined) return false + const res = matchQuery([context.card], params, process.masterTag, control.client.getHierarchy(), true) return res.length > 0 } @@ -108,9 +123,19 @@ export async function AddRelation ( docA, docB } - const res: Tx[] = [control.client.txFactory.createTxCreateDoc(core.class.Relation, core.space.Workspace, data, _id)] + const resTx = control.client.txFactory.createTxCreateDoc(core.class.Relation, core.space.Workspace, data, _id) + const res: Tx[] = [resTx] const rollback: Tx[] = [control.client.txFactory.createTxRemoveDoc(core.class.Relation, core.space.Workspace, _id)] - return { txes: res, rollback, context: _id } + return { + txes: res, + rollback, + context: [ + { + _id, + value: TxProcessor.createDoc2Doc(resTx, true) + } + ] + } } export async function UpdateCard ( @@ -121,16 +146,49 @@ export async function UpdateCard ( if (Object.keys(params).length === 0) throw processError(process.error.RequiredParamsNotProvided, { params: 'ANY' }) const target = control.cache.get(execution.card) if (target === undefined) throw processError(process.error.ObjectNotFound, { _id: execution.card }) + const hierarchy = control.client.getHierarchy() + const _process = control.client.getModel().findObject(execution.process) + if (_process === undefined) throw processError(process.error.ObjectNotFound, { _id: execution.process }) const update: Record = {} const prevValue: Record = {} for (const key in params) { - prevValue[key] = target[key] + const prevKey = checkMixinKey(key, _process.masterTag, hierarchy) + prevValue[key] = getObjectValue(prevKey, target) update[key] = (params as any)[key] } - const res: Tx[] = [control.client.txFactory.createTxUpdateDoc(target._class, target.space, target._id, update)] - const rollback: Tx[] = [ - control.client.txFactory.createTxUpdateDoc(target._class, target.space, target._id, prevValue) - ] + + const res: Tx[] = [] + const rollback: Tx[] = [] + if (hierarchy.isMixin(_process.masterTag)) { + const baseClass = hierarchy.getBaseClass(target._class) + const byClass = splitMixinUpdate(control.client.getHierarchy(), update, _process.masterTag, baseClass) + for (const it of byClass) { + if (hierarchy.isMixin(it[0])) { + res.push(control.client.txFactory.createTxMixin(target._id, baseClass, target.space, it[0], it[1])) + const rollbackData: Record = {} + for (const key in it[1]) { + rollbackData[key] = prevValue[key] + } + if (Object.keys(rollbackData).length > 0) { + rollback.push( + control.client.txFactory.createTxMixin(target._id, baseClass, target.space, it[0], rollbackData) + ) + } + } else { + res.push(control.client.txFactory.createTxUpdateDoc(baseClass, target.space, target._id, it[1])) + const rollbackData: Record = {} + for (const key in it[1]) { + rollbackData[key] = prevValue[key] + } + if (Object.keys(rollbackData).length > 0) { + rollback.push(control.client.txFactory.createTxUpdateDoc(baseClass, target.space, target._id, rollbackData)) + } + } + } + } else { + res.push(control.client.txFactory.createTxUpdateDoc(target._class, target.space, target._id, update)) + rollback.push(control.client.txFactory.createTxUpdateDoc(target._class, target.space, target._id, prevValue)) + } return { txes: res, rollback, context: null } } @@ -142,19 +200,29 @@ export async function AddTag ( const { _id, props } = params if (_id === undefined) throw processError(process.error.RequiredParamsNotProvided, { params: '_id' }) const res: Tx[] = [] - const context: Ref[] = [execution.card] const _process = control.client.getModel().findObject(execution.process) if (_process === undefined) throw processError(process.error.ObjectNotFound, { _id: execution.process }) - res.push( - control.client.txFactory.createTxMixin( - execution.card, - _process.masterTag, - core.space.Workspace, - _id as Ref, - props - ) + const tx = control.client.txFactory.createTxMixin( + execution.card, + _process.masterTag, + core.space.Workspace, + _id as Ref, + props ) - return { txes: res, rollback: undefined, context } + res.push(tx) + const card = control.cache.get(execution.card) + const cardWithMixin = + card !== undefined ? TxProcessor.updateMixin4Doc(control.client.getHierarchy().clone(card), tx) : undefined + return { + txes: res, + rollback: undefined, + context: [ + { + _id: execution.card, + value: cardWithMixin + } + ] + } } export async function RunSubProcess ( @@ -168,7 +236,7 @@ export async function RunSubProcess ( const target = control.client.getModel().findObject(processId) if (target === undefined) throw processError(process.error.ObjectNotFound, { _id: processId }) const res: Tx[] = [] - const resultContext: Ref[] = [] + const resultContext: SuccessExecutionContext[] = [] for (const _card of Array.isArray(card) ? card : [card]) { if (target.parallelExecutionForbidden === true) { const currentExecution = await control.client.findAll(process.class.Execution, { @@ -186,24 +254,27 @@ export async function RunSubProcess ( .findAllSync(process.class.Transition, { process: target._id, from: null })[0] // eslint-disable-next-line @typescript-eslint/consistent-type-assertions const context = params.context ?? ({} as ExecutionContext) - const id = generateId() - res.push( - control.client.txFactory.createTxCreateDoc( - process.class.Execution, - core.space.Workspace, - { - process: processId, - currentState: initTransition.to, - card: _card, - context, - status: ExecutionStatus.Active, - rollback: [], - parentId: execution._id - }, - id - ) + const _id = generateId() + const tx = control.client.txFactory.createTxCreateDoc( + process.class.Execution, + core.space.Workspace, + { + process: processId, + currentState: initTransition.to, + card: _card, + context, + status: ExecutionStatus.Active, + rollback: [], + parentId: execution._id + }, + _id ) - resultContext.push(id) + + res.push(tx) + resultContext.push({ + _id, + value: TxProcessor.createDoc2Doc(tx, true) + }) } return { txes: res, rollback: undefined, context: resultContext } } @@ -223,30 +294,38 @@ export async function CreateToDo ( const res: Tx[] = [] const rollback: Tx[] = [] const id = generateId() - res.push( - control.client.txFactory.createTxCreateDoc( - process.class.ProcessToDo, - time.space.ToDos, - { - attachedTo: execution.card, - attachedToClass: cardPlugin.class.Card, - collection: 'todos', - workslots: 0, - execution: execution._id, - title: params.title, - user: params.user, - description: params.description ?? '', - dueDate: params.dueDate, - priority: params.priority ?? ToDoPriority.NoPriority, - visibility: 'public', - doneOn: null, - rank: '', - withRollback: params.withRollback ?? false - }, - id - ) + const tx = control.client.txFactory.createTxCreateDoc( + process.class.ProcessToDo, + time.space.ToDos, + { + attachedTo: execution.card, + attachedToClass: cardPlugin.class.Card, + collection: 'todos', + workslots: 0, + execution: execution._id, + title: params.title, + user: params.user, + description: params.description ?? '', + dueDate: params.dueDate, + priority: params.priority ?? ToDoPriority.NoPriority, + visibility: 'public', + doneOn: null, + rank: '', + withRollback: params.withRollback ?? false + }, + id ) - return { txes: res, rollback, context: id } + res.push(tx) + return { + txes: res, + rollback, + context: [ + { + _id: id, + value: TxProcessor.createDoc2Doc(tx, true) + } + ] + } } export async function CreateCard ( @@ -266,9 +345,19 @@ export async function CreateCard ( title, ...attrs } as any - const res: Tx[] = [control.client.txFactory.createTxCreateDoc(_class as Ref, execution.space, data, _id)] + const tx = control.client.txFactory.createTxCreateDoc(_class as Ref, execution.space, data, _id) + const res: Tx[] = [tx] const rollback: Tx[] = [control.client.txFactory.createTxRemoveDoc(_class as Ref, execution.space, _id)] - return { txes: res, rollback, context: _id } + return { + txes: res, + rollback, + context: [ + { + _id, + value: TxProcessor.createDoc2Doc(tx, true) + } + ] + } } function isEmpty (value: any): boolean { diff --git a/server-plugins/process-resources/src/utils.ts b/server-plugins/process-resources/src/utils.ts index f1ebda3d36..5137fd46ac 100644 --- a/server-plugins/process-resources/src/utils.ts +++ b/server-plugins/process-resources/src/utils.ts @@ -13,7 +13,7 @@ // limitations under the License. // -import core, { ArrOf, Doc, getObjectValue, RefTo } from '@hcengineering/core' +import core, { ArrOf, checkMixinKey, Doc, getObjectValue, RefTo } from '@hcengineering/core' import { getEmbeddedLabel, getResource } from '@hcengineering/platform' import process, { Execution, @@ -65,10 +65,18 @@ export async function getContextValue (value: any, control: ProcessControl, exec } } +function getValue (control: ProcessControl, execution: Execution, rawKey: string, card: Doc): any { + const hierarchy = control.client.getHierarchy() + const _process = control.client.getModel().findObject(execution.process) + if (_process === undefined) throw processError(process.error.ObjectNotFound, { _id: execution.process }) + const key = checkMixinKey(rawKey, _process.masterTag, hierarchy) + return getObjectValue(key, card) +} + function getAttributeValue (control: ProcessControl, execution: Execution, context: SelectedContext): any { const card = control.cache.get(execution.card) if (card !== undefined) { - const val = getObjectValue(context.key, card) + const val = getValue(control, execution, context.key, card) if (val == null) { const attr = control.client.getHierarchy().findAttribute(card._class, context.key) throw processError( @@ -111,7 +119,7 @@ async function getNestedValue ( if (card === undefined) throw processError(process.error.ObjectNotFound, { _id: execution.card }, {}, true) const attr = control.client.getHierarchy().findAttribute(card._class, context.path) if (attr === undefined) throw processError(process.error.AttributeNotExists, { key: context.path }) - const nestedValue = getObjectValue(context.path, card) + const nestedValue = getValue(control, execution, context.path, card) if (nestedValue === undefined) throw processError(process.error.EmptyAttributeContextValue, {}, { attr: attr.label }) const parentType = attr.type._class === core.class.ArrOf ? (attr.type as ArrOf).of : attr.type const targetClass = parentType._class === core.class.RefTo ? (parentType as RefTo).to : parentType._class @@ -132,8 +140,8 @@ async function getNestedValue ( const f = await getResource(funcImpl.func) const reduced = await f(target, {}, control, execution) const val = Array.isArray(reduced) - ? reduced.map((v) => getObjectValue(context.key, v)) - : getObjectValue(context.key, reduced) + ? reduced.map((v) => getValue(control, execution, context.key, v)) + : getValue(control, execution, context.key, reduced) if (val == null) { throw processError( process.error.EmptyRelatedObjectValue, @@ -145,8 +153,8 @@ async function getNestedValue ( } const val = Array.isArray(target) && target.length > 1 - ? target.map((v) => getObjectValue(context.key, v)) - : getObjectValue(context.key, target[0]) + ? target.map((v) => getValue(control, execution, context.key, v)) + : getValue(control, execution, context.key, target[0]) if (val == null) { throw processError( process.error.EmptyRelatedObjectValue, @@ -187,8 +195,8 @@ async function getRelationValue ( const f = await getResource(funcImpl.func) const reduced = await f(target, {}, control, execution) const val = Array.isArray(reduced) - ? reduced.map((v) => getObjectValue(context.key, v)) - : getObjectValue(context.key, reduced) + ? reduced.map((v) => getValue(control, execution, context.key, v)) + : getValue(control, execution, context.key, reduced) if (val == null) { throw processError( process.error.EmptyRelatedObjectValue, @@ -200,8 +208,8 @@ async function getRelationValue ( } const val = Array.isArray(target) && target.length > 1 - ? target.map((v) => getObjectValue(context.key, v)) - : getObjectValue(context.key, target[0]) + ? target.map((v) => getValue(control, execution, context.key, v)) + : getValue(control, execution, context.key, target[0]) if (val == null) { throw processError( process.error.EmptyRelatedObjectValue, @@ -267,9 +275,10 @@ async function getExecutionContextValue ( if (userContext !== undefined) { if (context.key === '' || context.key === '_id') return userContext if (processContext !== undefined) { - const contextVal = await control.client.findOne(processContext?._class, { _id: userContext }) + const contextVal = + control.cache.get(userContext) ?? (await control.client.findOne(processContext?._class, { _id: userContext })) if (contextVal !== undefined) { - const val = getObjectValue(context.key, contextVal) + const val = getValue(control, execution, context.key, contextVal) return val } } diff --git a/server-plugins/process/src/types.ts b/server-plugins/process/src/types.ts index ed46759de0..2873a3b7e5 100644 --- a/server-plugins/process/src/types.ts +++ b/server-plugins/process/src/types.ts @@ -13,7 +13,12 @@ export type ExecuteResult = SuccessExecutionResult | ExecutionError export interface SuccessExecutionResult { txes: Tx[] rollback: Tx[] | undefined - context: any | null + context: SuccessExecutionContext[] | null +} + +export interface SuccessExecutionContext { + _id: string + value: any } export type TransformFunc = ( diff --git a/server/account/src/collections/postgres/migrations.ts b/server/account/src/collections/postgres/migrations.ts index 8f55909028..405e973876 100644 --- a/server/account/src/collections/postgres/migrations.ts +++ b/server/account/src/collections/postgres/migrations.ts @@ -33,7 +33,8 @@ export function getMigrations (ns: string): [string, string][] { getV12Migration(ns), getV13Migration(ns), getV14Migration(ns), - getV15Migration(ns) + getV15Migration(ns), + getV16Migration(ns) ] } @@ -436,3 +437,12 @@ function getV15Migration (ns: string): [string, string] { ` ] } + +function getV16Migration (ns: string): [string, string] { + return [ + 'account_db_v16_add_huly_assistant_social_id_type', + ` + ALTER TYPE ${ns}.social_id_type ADD VALUE 'huly-assistant' AFTER 'telegram'; + ` + ] +} diff --git a/server/account/src/operations.ts b/server/account/src/operations.ts index 33fd4487d5..65f4ef5f8f 100644 --- a/server/account/src/operations.ts +++ b/server/account/src/operations.ts @@ -2293,6 +2293,17 @@ async function addEmailSocialId ( return await sendOtp(ctx, db, branding, targetSocialId) } +async function addHulyAssistantSocialId ( + ctx: MeasureContext, + db: AccountDB, + branding: Branding | null, + token: string +): Promise { + const { account } = decodeTokenVerbose(ctx, token) + + return await addSocialIdBase(db, account, SocialIdType.HULY_ASSISTANT, account, true) +} + export async function releaseSocialId ( ctx: MeasureContext, db: AccountDB, @@ -2421,6 +2432,7 @@ export type AccountMethods = | 'getAccountInfo' | 'isReadOnlyGuest' | 'addEmailSocialId' + | 'addHulyAssistantSocialId' | 'releaseSocialId' | 'deleteAccount' @@ -2464,6 +2476,7 @@ export function getMethods (hasSignUp: boolean = true): Partial { - const transitions = control.client.getModel().findAllSync(process.class.Transition, { - from: execution.currentState, - process: execution.process, - trigger: process.trigger.OnTime - }) - if (transitions.length === 0) return - const temporalClient = await getTemporalClient() - for (const transition of transitions) { - await setTimer(control, execution, transition, temporalClient) + try { + const transitions = control.client.getModel().findAllSync(process.class.Transition, { + from: execution.currentState, + process: execution.process, + trigger: process.trigger.OnTime + }) + if (transitions.length === 0) return + const temporalClient = await getTemporalClient() + for (const transition of transitions) { + await setTimer(control, execution, transition, temporalClient) + } + } catch (err) { + control.ctx.error('Error setting next timers:', { error: err, execution: execution._id }) } } async function setNextTimers (control: ProcessControl, execution: Execution): Promise { - const temporalClient = await getTemporalClient() - await cleanTimers(execution, temporalClient) - const transitions = control.client.getModel().findAllSync(process.class.Transition, { - from: execution.currentState, - process: execution.process, - trigger: process.trigger.OnTime - }) - for (const transition of transitions) { - await setTimer(control, execution, transition, temporalClient) + try { + const temporalClient = await getTemporalClient() + await cleanTimers(execution, temporalClient) + const transitions = control.client.getModel().findAllSync(process.class.Transition, { + from: execution.currentState, + process: execution.process, + trigger: process.trigger.OnTime + }) + for (const transition of transitions) { + await setTimer(control, execution, transition, temporalClient) + } + } catch (err) { + control.ctx.error('Error setting next timers:', { error: err, execution: execution._id }) } } @@ -449,7 +457,11 @@ async function executeAction ( const f = await getResource(impl.func) const res = await f(params, execution, control) if (!isError(res) && action.context?._id != null && res.context != null) { - execution.context[action.context._id] = res.context + execution.context[action.context._id] = + res.context.length === 1 ? res.context[0]._id : res.context.map((it) => it._id) + for (const ctx of res.context) { + control.cache.set(ctx._id, ctx.value) + } } return res } catch (err) { @@ -481,31 +493,35 @@ async function fillParams ( } async function checkParent (execution: Execution, control: ProcessControl): Promise { - const subProcesses = await control.client.findAll(process.class.Execution, { - parentId: execution.parentId, - status: ExecutionStatus.Active - }) - const filtered = subProcesses.filter((it) => it._id !== execution._id) - if (filtered.length !== 0) return - const parent = (await control.client.findAll(process.class.Execution, { _id: execution.parentId }))[0] - if (parent === undefined) return - const _process = control.client.getModel().findObject(parent.process) - if (_process === undefined) return - if (parent.status !== ExecutionStatus.Active) return - const transitions = control.client.getModel().findAllSync( - process.class.Transition, - { - from: parent.currentState, - process: parent.process, - trigger: process.trigger.OnSubProcessesDone - }, - { - sort: { rank: SortingOrder.Ascending } - } - ) - const transition = await pickTransition(control, execution, transitions, {}) - if (transition === undefined) return - await executeTransition(parent, transition, control) + try { + const subProcesses = await control.client.findAll(process.class.Execution, { + parentId: execution.parentId, + status: ExecutionStatus.Active + }) + const filtered = subProcesses.filter((it) => it._id !== execution._id) + if (filtered.length !== 0) return + const parent = (await control.client.findAll(process.class.Execution, { _id: execution.parentId }))[0] + if (parent === undefined) return + const _process = control.client.getModel().findObject(parent.process) + if (_process === undefined) return + if (parent.status !== ExecutionStatus.Active) return + const transitions = control.client.getModel().findAllSync( + process.class.Transition, + { + from: parent.currentState, + process: parent.process, + trigger: process.trigger.OnSubProcessesDone + }, + { + sort: { rank: SortingOrder.Ascending } + } + ) + const transition = await pickTransition(control, parent, transitions, {}) + if (transition === undefined) return + await executeTransition(parent, transition, control) + } catch (err) { + control.ctx.error('Error checking parent execution:', { error: err, execution: execution._id }) + } } async function checkNext (control: ProcessControl, execution: Execution): Promise {